# HG changeset patch # User Matt Johnston # Date 1518183845 -28800 # Node ID 6dba84798cd5655997598aebac878de916636bdc # Parent 8bba51a55704262bf1bb2665efffe4757f1f2194 Update to libtomcrypt 1.18.1, merged with Dropbear changes diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/.travis.yml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/.travis.yml Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,135 @@ +dist: trusty +sudo: required + +language: c + +addons: + apt: + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-precise-3.8 + packages: + - clang-3.8 + +install: + - sudo apt-get update -qq + - sudo apt-get install libtommath-dev + +before_script: + - gem install coveralls-lcov + - curl http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz | tar xz + - export PATH=$PATH:`pwd`/lcov-1.11/bin + - curl -s https://packagecloud.io/install/repositories/libtom/packages/script.deb.sh | sudo bash + - sudo apt-get install libtfm-dev=0.13-5 + +matrix: + fast_finish: true +branches: + only: + - master + - develop + - /^release\/.*$/ + +compiler: + - gcc + - clang +script: + - bash "${BUILDSCRIPT}" "${BUILDNAME}" "${BUILDOPTIONS}" "makefile V=1" "-DUSE_LTM -DLTM_DESC" "-ltommath" + - bash "${BUILDSCRIPT}" "${BUILDNAME}" "${BUILDOPTIONS}" "makefile.shared V=1" "-DUSE_TFM -DTFM_DESC" "-ltfm" +env: + - | + BUILDSCRIPT="check_source.sh" + BUILDNAME="CHECK_SOURCES" + BUILDOPTIONS=" " + - | + BUILDSCRIPT="scan_build.sh" + BUILDNAME="SCAN_BUILD" + BUILDOPTIONS=" " + - | + BUILDSCRIPT="coverage.sh" + BUILDNAME="COVERAGE" + BUILDOPTIONS=" " + - | + BUILDSCRIPT="run.sh" + BUILDNAME="STOCK" + BUILDOPTIONS=" " + - | + BUILDSCRIPT="run.sh" + BUILDNAME="EASY" + BUILDOPTIONS="-DLTC_EASY" + - | + BUILDSCRIPT="run.sh" + BUILDNAME="SMALL" + BUILDOPTIONS="-DLTC_SMALL_CODE" + - | + BUILDSCRIPT="run.sh" + BUILDNAME="NOTABLES" + BUILDOPTIONS="-DLTC_NO_TABLES" + - | + BUILDSCRIPT="run.sh" + BUILDNAME="SMALL+NOTABLES" + BUILDOPTIONS="-DLTC_SMALL_CODE -DLTC_NO_TABLES" + - | + BUILDSCRIPT="run.sh" + BUILDNAME="CLEANSTACK" + BUILDOPTIONS="-DLTC_CLEAN_STACK" + - | + BUILDSCRIPT="run.sh" + BUILDNAME="CLEANSTACK+SMALL" + BUILDOPTIONS="-DLTC_SMALL_CODE -DLTC_CLEAN_STACK" + - | + BUILDSCRIPT="run.sh" + BUILDNAME="CLEANSTACK+NOTABLES" + BUILDOPTIONS="-DLTC_NO_TABLES -DLTC_CLEAN_STACK" + - | + BUILDSCRIPT="run.sh" + BUILDNAME="CLEANSTACK+NOTABLES+SMALL" + BUILDOPTIONS="-DLTC_NO_TABLES -DLTC_CLEAN_STACK -DLTC_SMALL_CODE" + - | + BUILDSCRIPT="run.sh" + BUILDNAME="NO_FAST" + BUILDOPTIONS="-DLTC_NO_FAST" + - | + BUILDSCRIPT="run.sh" + BUILDNAME="NO_FAST+NOTABLES" + BUILDOPTIONS="-DLTC_NO_FAST -DLTC_NO_TABLES" + - | + BUILDSCRIPT="run.sh" + BUILDNAME="NO_ASM" + BUILDOPTIONS="-DLTC_NO_ASM" + - | + BUILDSCRIPT="run.sh" + BUILDNAME="NO_TIMING_RESISTANCE" + BUILDOPTIONS="-DLTC_NO_ECC_TIMING_RESISTANT -DLTC_NO_RSA_BLINDING" + - | + BUILDSCRIPT="run.sh" + BUILDNAME="CLEANSTACK+NOTABLES+SMALL+NO_ASM+NO_TIMING_RESISTANCE" + BUILDOPTIONS="-DLTC_CLEAN_STACK -DLTC_NO_TABLES -DLTC_SMALL_CODE -DLTC_NO_ECC_TIMING_RESISTANT -DLTC_NO_RSA_BLINDING" + - | + BUILDSCRIPT="run.sh" + BUILDNAME="PTHREAD" + BUILDOPTIONS="-DLTC_PTHREAD" + - | + BUILDSCRIPT="run.sh" + BUILDNAME="CLEANSTACK+NOTABLES+SMALL+NO_ASM+NO_TIMING_RESISTANCE+PTHREAD" + BUILDOPTIONS="-DLTC_CLEAN_STACK -DLTC_NO_TABLES -DLTC_SMALL_CODE -DLTC_NO_ECC_TIMING_RESISTANT -DLTC_NO_RSA_BLINDING -DLTC_PTHREAD" + - | + BUILDSCRIPT="testbuild.sh" + BUILDNAME="NOTEST" + BUILDOPTIONS="-DLTC_NO_TEST" + - | + BUILDSCRIPT="testbuild.sh" + BUILDNAME="NOFILE" + BUILDOPTIONS="-DLTC_NO_FILE" + +after_failure: + - cat test_std.txt + - cat test_err.txt + - cat tv.txt + +after_script: + - cat gcc_1.txt + - cat gcc_2.txt + +notifications: + irc: "chat.freenode.net#libtom-notifications" diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/LICENSE --- a/libtomcrypt/LICENSE Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/LICENSE Fri Feb 09 21:44:05 2018 +0800 @@ -1,5 +1,29 @@ +LibTomCrypt is licensed under DUAL licensing terms. + +Choose and use the license of your needs. + +[LICENSE #1] + LibTomCrypt is public domain. As should all quality software be. Tom St Denis +[/LICENSE #1] +[LICENSE #2] + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. + +[/LICENSE #2] diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/Makefile.in --- a/libtomcrypt/Makefile.in Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/Makefile.in Fri Feb 09 21:44:05 2018 +0800 @@ -9,8 +9,7 @@ PLATFORM := $(shell uname | sed -e 's/_.*//') -VPATH=@srcdir@ -srcdir=@srcdir@ +srcdir=. # Compiler and Linker Names #CC=gcc diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/build.sh --- a/libtomcrypt/build.sh Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/build.sh Fri Feb 09 21:44:05 2018 +0800 @@ -1,20 +1,59 @@ #!/bin/bash echo "$1 ($2, $3)..." + make clean 1>/dev/null 2>/dev/null + echo -n "building..." -CFLAGS="$2 $CFLAGS $4" EXTRALIBS="$5" make -j4 -f $3 test tv_gen 1>gcc_1.txt 2>gcc_2.txt || (echo "build $1 failed see gcc_2.txt for more information" && cat gcc_2.txt && exit 1) + +if [ -f /proc/cpuinfo ] +then + MAKE_JOBS=$(( ($(cat /proc/cpuinfo | grep -E '^processor[[:space:]]*:' | tail -n -1 | cut -d':' -f2) + 1) * 2 + 1 )) +else + MAKE_JOBS=8 +fi + +CFLAGS="$2 $CFLAGS $4" EXTRALIBS="$5" make -j$MAKE_JOBS -f $3 all_test 1>gcc_1.txt 2>gcc_2.txt +mret=$? +cnt=$(wc -l < gcc_2.txt) +# ignore 1 line since ar prints to stderr instead of stdout and ar is called for +# $(LIBNAME) +if [[ $mret -ne 0 ]] || [[ $cnt -gt 1 ]]; then + echo "build $1 failed! printing gcc_2.txt now for convenience" + cat gcc_2.txt + exit 1 +fi + echo -n "testing..." + if [ -a test ] && [ -f test ] && [ -x test ]; then - ((./test >test_std.txt 2>test_err.txt && ./tv_gen > tv.txt) && echo "$1 test passed." && echo "y" > testok.txt) || (echo "$1 test failed" && cat test_err.txt && exit 1) + ((./test >test_std.txt 2>test_err.txt && ./tv_gen > tv.txt) && echo "$1 test passed." && echo "y" > testok.txt) || (echo "$1 test failed, look at test_err.txt or tv.txt" && exit 1) if find *_tv.txt -type f 1>/dev/null 2>/dev/null ; then - for f in *_tv.txt; do if (diff --ignore-case $f notes/$f) then true; else (echo "tv_gen $f failed" && rm -f testok.txt && exit 1); fi; done + for f in *_tv.txt; do + # check for lines starting with '<' ($f might be a subset of notes/$f) + difftroubles=$(diff -i -w -B $f notes/$f | grep '^<') + if [ -n "$difftroubles" ]; then + echo "FAILURE: $f" + diff -i -w -B $f notes/$f + echo "tv_gen $f failed" && rm -f testok.txt && exit 1 + else + true + fi + done fi fi + + if [ -a testok.txt ] && [ -f testok.txt ]; then + if [ "$LTC_COVERAGE" != "" ]; then + ./coverage_more.sh > test_coverage_more.txt || exit 1 + lcov_opts="--capture --no-external --directory src -q" + lcov_out=$(echo coverage_$1_$2_$3 | tr ' -=+' '_')".info" + lcov $lcov_opts --output-file $lcov_out + fi exit 0 fi exit 1 -# $Source: /cvs/libtom/libtomcrypt/build.sh,v $ -# $Revision: 1.9 $ -# $Date: 2006/03/18 14:10:55 $ +# ref: $Format:%D$ +# git commit: $Format:%H$ +# commit time: $Format:%ai$ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/changes --- a/libtomcrypt/changes Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/changes Fri Feb 09 21:44:05 2018 +0800 @@ -1,3 +1,67 @@ +January 22nd, 2018 +v1.18.1 + -- Fix wrong SHA3 blocksizes, thanks to Claus Fischer for reporting this via Mail (PR #329) + -- Fix NULL-pointer dereference in `ccm_memory()` with LTC_CLEAN_STACK enabled (PR #327) + -- Fix `ccm_process()` being unable to process input buffers longer than 256 bytes (PR #326) + -- Fix the `register_all_{ciphers,hashes,prngs}()` return values (PR #316) + -- Fix some typos, warnings and duplicate prototypes in code & doc (PR's #310 #320 #321 #335) + -- Fix possible undefined behavior with LTC_PTHREAD (PR #337) + -- Fix some DER bugs (PR #339) + -- Fix CTR-mode when accelerator is used (OP-TEE/optee_os #2086) + -- Fix installation procedure (Issue #340) + +October 10th, 2017 +v1.18.0 + -- Bugfix multi2 + -- Bugfix Noekeon + -- Bugfix XTEA + -- Bugfix rng_get_bytes() on windows where we could read from c:\dev\random + -- Fixed the Bleichbacher Signature attack in PKCS#1 v1.5 EMSA, thanks to Alex Dent + -- Fixed a potential cache-based timing attack in CCM, thanks to Sebastian Verschoor + -- Fix GCM counter reuse and potential timing attacks in EAX, OCB and OCBv3, + thanks to Raphaƫl Jamet + -- Implement hardened RSA operations when CRT is used + -- Enabled timing resistant calculations of ECC and RSA operations per default + -- Applied some patches from the OLPC project regarding PKCS#1 and preventing + the hash algorithms from overflowing + -- Larry Bugbee contributed the necessary stuff to more easily call libtomcrypt + from a dynamic language like Python, as shown in his pyTomCrypt + -- Nikos Mavrogiannopoulos contributed RSA blinding and export of RSA and DSA keys + in OpenSSL/GnuTLS compatible format + -- Patrick Pelletier contributed a smart volley of patches + -- Christopher Brown contributed some patches and additions to ASN.1/DER + -- Pascal Brand of STMicroelectronics contributed patches regarding CCM, the + XTS mode and RSA private key operations with keys without CRT parameters + -- RC2 now also works with smaller key-sizes + -- Improved/extended several tests & demos + -- Hardened DSA and RSA by testing (through Karel's perl-CryptX) + against Google's "Wycheproof" and Kudelski Security's "CDF" + -- Fixed all compiler warnings + -- Fixed several build issues on FreeBSD, NetBSD, Linux x32 ABI, HP-UX/IA64, + Mac OS X, Windows (32&64bit, Cygwin, MingW & MSVC) ... + -- Re-worked all makefiles + -- Re-worked most PRNG's + -- The code is now verified by a linter, thanks to Francois Perrad + -- Documentation (crypt.pdf) is now built deterministically, thanks to Michael Stapelberg + -- Add Adler32 and CRC32 checksum algorithms + -- Add Base64-URL de-/encoding and some strict variants + -- Add Blake2b & Blake2s (hash & mac), thanks to Kelvin Sherlock + -- Add Camellia block cipher + -- Add ChaCha (stream cipher), Poly1305 (mac), ChaCha20Poly1305 (encauth) + -- Add constant-time mem-compare mem_neq() + -- Add DER GeneralizedTime de-/encoding + -- Add DSA and ECC key generation FIPS-186-4 compliance + -- Add HKDF, thanks to RyanC (especially for also providing documentation :-) ) + -- Add OCBv3 + -- Add PKCS#1 v1.5 mode of SSL3.0 + -- Add PKCS#1 testvectors from RSA + -- Add PKCS#8 & X.509 import for RSA keys + -- Add stream cipher API + -- Add SHA3 & SHAKE + -- Add SHA512/256 and SHA512/224 + -- Add Triple-DES 2-key mode, thanks to Paul Howarth + -- Brought back Diffie-Hellman + May 12th, 2007 v1.17 -- Cryptography Research Inc. contributed another small volley of patches, one to fix __WCHAR_DEFINED__ for BSD platforms, another to silence MSVC warnings. diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/check_source.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/check_source.sh Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,15 @@ +#!/bin/bash + +# output version +bash printinfo.sh + +make clean > /dev/null + +echo "checking..." +./helper.pl --check-source --check-makefiles --check-defines|| exit 1 + +exit 0 + +# ref: $Format:%D$ +# git commit: $Format:%H$ +# commit time: $Format:%ai$ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/coverage.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/coverage.sh Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,51 @@ +#!/bin/bash + +set -e + +if [ "$TRAVIS_CI" == "private" ]; then + exit 0 +fi + +if [ "$#" != "5" ]; then + echo "Usage is: ${0} \"coverage\" \"\" \"\" \"\" " + echo "CC=gcc ${0} \"coverage\" \" \" \"makefile\" \"-DUSE_LTM -DLTM_DESC -I../libtommath\" ../libtommath/libtommath.a" + exit -1 +fi + +if [ -z "$(echo $CC | grep "gcc")" ]; then + echo "no gcc detected, early exit success" + exit 0 +fi + +if [ "$(echo $3 | grep -v 'makefile[.]')" == "" ]; then + echo "only run $0 for the regular makefile, early exit success" + exit 0 +fi + +# output version +bash printinfo.sh + +bash build.sh " $1" " $2" " $3 COVERAGE=1" "$4" "$5" +if [ -a testok.txt ] && [ -f testok.txt ]; then + echo +else + echo + echo "Test failed" + exit 1 +fi + +./coverage_more.sh > test_coverage_more.txt || { rm -f testok.txt && exit 1 ; } + +make lcov-single +# if this was executed as './coverage.sh ...' create coverage locally +if [[ "${0%% *}" == "./${0##*/}" ]]; then + make lcov-html +else + coveralls-lcov coverage.info +fi + +exit 0 + +# ref: $Format:%D$ +# git commit: $Format:%H$ +# commit time: $Format:%ai$ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/coverage_more.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/coverage_more.sh Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,24 @@ +#!/bin/bash + +set -e + +./sizes +./constants + +for i in $(for j in $(echo $(./hashsum -h | awk '/Algorithms/,EOF' | tail -n +2)); do echo $j; done | sort); do echo -n "$i: " && ./hashsum -a $i tests/test.key ; done > hashsum_tv.txt +difftroubles=$(diff -i -w -B hashsum_tv.txt notes/hashsum_tv.txt | grep '^<') || true +if [ -n "$difftroubles" ]; then + echo "FAILURE: hashsum_tv.tx" + diff -i -w -B hashsum_tv.txt notes/hashsum_tv.txt + echo "hashsum failed" + exit 1 +else + echo "hashsum okay" +fi + + +exit 0 + +# ref: $Format:%D$ +# git commit: $Format:%H$ +# commit time: $Format:%ai$ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/coverity.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/coverity.sh Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,40 @@ +#!/bin/bash + +if [ $# -lt 2 ] +then + echo "usage is: ${0##*/} " + echo "e.g. \"${0##*/} \"/usr/local/bin/coverity\" \"-DLTM_DESC -I/path/to/libtommath/\"\"" + exit -1 +fi + +PATH=$PATH:$1/bin + +make clean +rm -r cov-int/ + +myCflags="" +myCflags="$myCflags -O2 ${2}" +myCflags="$myCflags -pipe -Werror -Wpointer-arith -Winit-self -Wextra -Wall -Wformat -Wformat-security" + +CFLAGS="$myCflags" cov-build --dir cov-int make -f makefile.unix $MAKE_OPTS IGNORE_SPEED=1 1>gcc_1.txt + +if [ $? -ne 0 ] +then + echo "make failed" + exit -1 +fi + +# zipup everything +tar caf libtomcrypt.lzma cov-int + +mytoken=$(cat .coverity_token) +mymail=$(cat .coverity_mail) +myversion=$(git describe --dirty) + +curl -k --form project=libtomcrypt \ + --form token=${mytoken} \ + --form email=${mymail} \ + --form file=@libtomcrypt.lzma \ + --form version=\"${myversion}\" \ + --form description="\"libtomcrypt version ${myversion}\"" \ + https://scan.coverity.com/builds?project=libtom%2Flibtomcrypt diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/crypt.tex --- a/libtomcrypt/crypt.tex Thu Feb 08 23:11:40 2018 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6568 +0,0 @@ -\documentclass[synpaper]{book} -\usepackage[dvips]{geometry} -\usepackage{hyperref} -\usepackage{makeidx} -\usepackage{amssymb} -\usepackage{color} -\usepackage{alltt} -\usepackage{graphicx} -\usepackage{layout} -\usepackage{fancyhdr} -\def\union{\cup} -\def\intersect{\cap} -\def\getsrandom{\stackrel{\rm R}{\gets}} -\def\cross{\times} -\def\cat{\hspace{0.5em} \| \hspace{0.5em}} -\def\catn{$\|$} -\def\divides{\hspace{0.3em} | \hspace{0.3em}} -\def\nequiv{\not\equiv} -\def\approx{\raisebox{0.2ex}{\mbox{\small $\sim$}}} -\def\lcm{{\rm lcm}} -\def\gcd{{\rm gcd}} -\def\log{{\rm log}} -\def\ord{{\rm ord}} -\def\abs{{\mathit abs}} -\def\rep{{\mathit rep}} -\def\mod{{\mathit\ mod\ }} -\renewcommand{\pmod}[1]{\ ({\rm mod\ }{#1})} -\newcommand{\floor}[1]{\left\lfloor{#1}\right\rfloor} -\newcommand{\ceil}[1]{\left\lceil{#1}\right\rceil} -\def\Or{{\rm\ or\ }} -\def\And{{\rm\ and\ }} -\def\iff{\hspace{1em}\Longleftrightarrow\hspace{1em}} -\def\implies{\Rightarrow} -\def\undefined{{\rm \textit{undefined}}} -\def\Proof{\vspace{1ex}\noindent {\bf Proof:}\hspace{1em}} -\let\oldphi\phi -\def\phi{\varphi} -\def\Pr{{\rm Pr}} -\newcommand{\str}[1]{{\mathbf{#1}}} -\def\F{{\mathbb F}} -\def\N{{\mathbb N}} -\def\Z{{\mathbb Z}} -\def\R{{\mathbb R}} -\def\C{{\mathbb C}} -\def\Q{{\mathbb Q}} -\definecolor{DGray}{gray}{0.5} -\newcommand{\emailaddr}[1]{\mbox{$<${#1}$>$}} -\def\twiddle{\raisebox{0.3ex}{\mbox{\tiny $\sim$}}} -\def\gap{\vspace{0.5ex}} -\makeindex -\newcommand{\mysection}[1] % Re-define the chaptering command to use - { % THESE headers. - \section{#1} - \markboth{\textsf{www.libtom.org}}{\thesection ~ {#1}} - } - -\newcommand{\mystarsection}[1] % Re-define the chaptering command to use - { % THESE headers. - \section*{#1} - \markboth{\textsf{www.libtom.org}}{{#1}} - } -\pagestyle{empty} -\begin{document} -\frontmatter -\pagestyle{empty} - -~ - -\vspace{2in} - -~ - -\begin{center} -\begin{Huge}LibTomCrypt\end{Huge} - -~ - -\begin{large}Developer Manual\end{large} - -~ - -\vspace{15mm} - - -\begin{tabular}{c} -Tom St Denis \\ -LibTom Projects -\end{tabular} -\end{center} -\vfil -\newpage -This document is part of the LibTomCrypt package and is hereby released into the public domain. - -~ - -Open Source. Open Academia. Open Minds. - -~ - -\begin{flushright} -Tom St Denis -~ - -Ottawa, Ontario -~ - -Canada -~ -\vfil -\end{flushright} -\newpage - -\tableofcontents -\listoffigures -\pagestyle{myheadings} -\mainmatter -\chapter{Introduction} -\mysection{What is the LibTomCrypt?} -LibTomCrypt is a portable ISO C cryptographic library meant to be a tool set for cryptographers who are -designing cryptosystems. It supports symmetric ciphers, one-way hashes, pseudo-random number generators, -public key cryptography (via PKCS \#1 RSA, DH or ECCDH), and a plethora of support routines. - -The library was designed such that new ciphers/hashes/PRNGs can be added at run-time and the existing API -(and helper API functions) are able to use the new designs automatically. There exists self-check functions for each -block cipher and hash function to ensure that they compile and execute to the published design specifications. The library -also performs extensive parameter error checking to prevent any number of run-time exploits or errors. - -\subsection{What the library IS for?} - -The library serves as a toolkit for developers who have to solve cryptographic problems. Out of the box LibTomCrypt -does not process SSL or OpenPGP messages, it doesn't read X.509 certificates, or write PEM encoded data. It does, however, -provide all of the tools required to build such functionality. LibTomCrypt was designed to be a flexible library that -was not tied to any particular cryptographic problem. - -\mysection{Why did I write it?} -You may be wondering, \textit{Tom, why did you write a crypto library. I already have one.} Well the reason falls into -two categories: -\begin{enumerate} - \item I am too lazy to figure out someone else's API. I'd rather invent my own simpler API and use that. - \item It was (still is) good coding practice. -\end{enumerate} - -The idea is that I am not striving to replace OpenSSL or Crypto++ or Cryptlib or etc. I'm trying to write my -{\bf own} crypto library and hopefully along the way others will appreciate the work. - -With this library all core functions (ciphers, hashes, prngs, and bignum) have the same prototype definition. They all load -and store data in a format independent of the platform. This means if you encrypt with Blowfish on a PPC it should decrypt -on an x86 with zero problems. The consistent API also means that if you learn how to use Blowfish with the library you -know how to use Safer+, RC6, or Serpent as well. With all of the core functions there are central descriptor tables -that can be used to make a program automatically pick between ciphers, hashes and PRNGs at run-time. That means your -application can support all ciphers/hashes/prngs/bignum without changing the source code. - -Not only did I strive to make a consistent and simple API to work with but I also attempted to make the library -configurable in terms of its build options. Out of the box the library will build with any modern version of GCC -without having to use configure scripts. This means that the library will work with platforms where development -tools may be limited (e.g. no autoconf). - -On top of making the build simple and the API approachable I've also attempted for a reasonably high level of -robustness and efficiency. LibTomCrypt traps and returns a series of errors ranging from invalid -arguments to buffer overflows/overruns. It is mostly thread safe and has been clocked on various platforms -with \textit{cycles per byte} timings that are comparable (and often favourable) to other libraries such as OpenSSL and -Crypto++. - -\subsection{Modular} -The LibTomCrypt package has also been written to be very modular. The block ciphers, one--way hashes, -pseudo--random number generators (PRNG), and bignum math routines are all used within the API through \textit{descriptor} tables which -are essentially structures with pointers to functions. While you can still call particular functions -directly (\textit{e.g. sha256\_process()}) this descriptor interface allows the developer to customize their -usage of the library. - -For example, consider a hardware platform with a specialized RNG device. Obviously one would like to tap -that for the PRNG needs within the library (\textit{e.g. making a RSA key}). All the developer has to do -is write a descriptor and the few support routines required for the device. After that the rest of the -API can make use of it without change. Similarly imagine a few years down the road when AES2 -(\textit{or whatever they call it}) has been invented. It can be added to the library and used within applications -with zero modifications to the end applications provided they are written properly. - -This flexibility within the library means it can be used with any combination of primitive algorithms and -unlike libraries like OpenSSL is not tied to direct routines. For instance, in OpenSSL there are CBC block -mode routines for every single cipher. That means every time you add or remove a cipher from the library -you have to update the associated support code as well. In LibTomCrypt the associated code (\textit{chaining modes in this case}) -are not directly tied to the ciphers. That is a new cipher can be added to the library by simply providing -the key setup, ECB decrypt and encrypt and test vector routines. After that all five chaining mode routines -can make use of the cipher right away. - -\mysection{License} - -The project is hereby released as public domain. - -\mysection{Patent Disclosure} - -The author (Tom St Denis) is not a patent lawyer so this section is not to be treated as legal advice. To the best -of the author's knowledge the only patent related issues within the library are the RC5 and RC6 symmetric block ciphers. -They can be removed from a build by simply commenting out the two appropriate lines in \textit{tomcrypt\_custom.h}. The rest -of the ciphers and hashes are patent free or under patents that have since expired. - -The RC2 and RC4 symmetric ciphers are not under patents but are under trademark regulations. This means you can use -the ciphers you just can't advertise that you are doing so. - -\mysection{Thanks} -I would like to give thanks to the following people (in no particular order) for helping me develop this project from -early on: -\begin{enumerate} - \item Richard van de Laarschot - \item Richard Heathfield - \item Ajay K. Agrawal - \item Brian Gladman - \item Svante Seleborg - \item Clay Culver - \item Jason Klapste - \item Dobes Vandermeer - \item Daniel Richards - \item Wayne Scott - \item Andrew Tyler - \item Sky Schulz - \item Christopher Imes -\end{enumerate} - -There have been quite a few other people as well. Please check the change log to see who else has contributed from -time to time. - -\chapter{The Application Programming Interface (API)} -\mysection{Introduction} -\index{CRYPT\_ERROR} \index{CRYPT\_OK} - -In general the API is very simple to memorize and use. Most of the functions return either {\bf void} or {\bf int}. Functions -that return {\bf int} will return {\bf CRYPT\_OK} if the function was successful, or one of the many error codes -if it failed. Certain functions that return int will return $-1$ to indicate an error. These functions will be explicitly -commented upon. When a function does return a CRYPT error code it can be translated into a string with - -\index{error\_to\_string()} -\begin{verbatim} -const char *error_to_string(int err); -\end{verbatim} - -An example of handling an error is: -\begin{small} -\begin{verbatim} -void somefunc(void) -{ - int err; - - /* call a cryptographic function */ - if ((err = some_crypto_function(...)) != CRYPT_OK) { - printf("A crypto error occurred, %s\n", error_to_string(err)); - /* perform error handling */ - } - /* continue on if no error occurred */ -} -\end{verbatim} -\end{small} - -There is no initialization routine for the library and for the most part the code is thread safe. The only thread -related issue is if you use the same symmetric cipher, hash or public key state data in multiple threads. Normally -that is not an issue. - -To include the prototypes for \textit{LibTomCrypt.a} into your own program simply include \textit{tomcrypt.h} like so: -\begin{small} -\begin{verbatim} -#include -int main(void) { - return 0; -} -\end{verbatim} -\end{small} - -The header file \textit{tomcrypt.h} also includes \textit{stdio.h}, \textit{string.h}, \textit{stdlib.h}, \textit{time.h} and \textit{ctype.h}. - -\mysection{Macros} - -There are a few helper macros to make the coding process a bit easier. The first set are related to loading and storing -32/64-bit words in little/big endian format. The macros are: - -\index{STORE32L} \index{STORE64L} \index{LOAD32L} \index{LOAD64L} \index{STORE32H} \index{STORE64H} \index{LOAD32H} \index{LOAD64H} \index{BSWAP} -\newpage -\begin{figure}[hpbt] -\begin{small} -\begin{center} -\begin{tabular}{|c|c|c|} - \hline STORE32L(x, y) & {\bf unsigned long} x, {\bf unsigned char} *y & $x \to y[0 \ldots 3]$ \\ - \hline STORE64L(x, y) & {\bf unsigned long long} x, {\bf unsigned char} *y & $x \to y[0 \ldots 7]$ \\ - \hline LOAD32L(x, y) & {\bf unsigned long} x, {\bf unsigned char} *y & $y[0 \ldots 3] \to x$ \\ - \hline LOAD64L(x, y) & {\bf unsigned long long} x, {\bf unsigned char} *y & $y[0 \ldots 7] \to x$ \\ - \hline STORE32H(x, y) & {\bf unsigned long} x, {\bf unsigned char} *y & $x \to y[3 \ldots 0]$ \\ - \hline STORE64H(x, y) & {\bf unsigned long long} x, {\bf unsigned char} *y & $x \to y[7 \ldots 0]$ \\ - \hline LOAD32H(x, y) & {\bf unsigned long} x, {\bf unsigned char} *y & $y[3 \ldots 0] \to x$ \\ - \hline LOAD64H(x, y) & {\bf unsigned long long} x, {\bf unsigned char} *y & $y[7 \ldots 0] \to x$ \\ - \hline BSWAP(x) & {\bf unsigned long} x & Swap bytes \\ - \hline -\end{tabular} -\caption{Load And Store Macros} -\end{center} -\end{small} -\end{figure} - -There are 32 and 64-bit cyclic rotations as well: -\index{ROL} \index{ROR} \index{ROL64} \index{ROR64} \index{ROLc} \index{RORc} \index{ROL64c} \index{ROR64c} -\begin{figure}[hpbt] -\begin{small} -\begin{center} -\begin{tabular}{|c|c|c|} - \hline ROL(x, y) & {\bf unsigned long} x, {\bf unsigned long} y & $x << y, 0 \le y \le 31$ \\ - \hline ROLc(x, y) & {\bf unsigned long} x, {\bf const unsigned long} y & $x << y, 0 \le y \le 31$ \\ - \hline ROR(x, y) & {\bf unsigned long} x, {\bf unsigned long} y & $x >> y, 0 \le y \le 31$ \\ - \hline RORc(x, y) & {\bf unsigned long} x, {\bf const unsigned long} y & $x >> y, 0 \le y \le 31$ \\ - \hline && \\ - \hline ROL64(x, y) & {\bf unsigned long} x, {\bf unsigned long} y & $x << y, 0 \le y \le 63$ \\ - \hline ROL64c(x, y) & {\bf unsigned long} x, {\bf const unsigned long} y & $x << y, 0 \le y \le 63$ \\ - \hline ROR64(x, y) & {\bf unsigned long} x, {\bf unsigned long} y & $x >> y, 0 \le y \le 63$ \\ - \hline ROR64c(x, y) & {\bf unsigned long} x, {\bf const unsigned long} y & $x >> y, 0 \le y \le 63$ \\ - \hline -\end{tabular} -\caption{Rotate Macros} -\end{center} -\end{small} -\end{figure} - -\mysection{Functions with Variable Length Output} -Certain functions such as (for example) \textit{rsa\_export()} give an output that is variable length. To prevent buffer overflows you -must pass it the length of the buffer where the output will be stored. For example: -\index{rsa\_export()} \index{error\_to\_string()} \index{variable length output} -\begin{small} -\begin{verbatim} -#include -int main(void) { - rsa_key key; - unsigned char buffer[1024]; - unsigned long x; - int err; - - /* ... Make up the RSA key somehow ... */ - - /* lets export the key, set x to the size of the - * output buffer */ - x = sizeof(buffer); - if ((err = rsa_export(buffer, &x, PK_PUBLIC, &key)) != CRYPT_OK) { - printf("Export error: %s\n", error_to_string(err)); - return -1; - } - - /* if rsa_export() was successful then x will have - * the size of the output */ - printf("RSA exported key takes %d bytes\n", x); - - /* ... do something with the buffer */ - - return 0; -} -\end{verbatim} -\end{small} -In the above example if the size of the RSA public key was more than 1024 bytes this function would return an error code -indicating a buffer overflow would have occurred. If the function succeeds, it stores the length of the output back into -\textit{x} so that the calling application will know how many bytes were used. - -As of v1.13, most functions will update your length on failure to indicate the size required by the function. Not all functions -support this so please check the source before you rely on it doing that. - -\mysection{Functions that need a PRNG} -\index{Pseudo Random Number Generator} \index{PRNG} -Certain functions such as \textit{rsa\_make\_key()} require a Pseudo Random Number Generator (PRNG). These functions do not setup -the PRNG themselves so it is the responsibility of the calling function to initialize the PRNG before calling them. - -Certain PRNG algorithms do not require a \textit{prng\_state} argument (sprng for example). The \textit{prng\_state} argument -may be passed as \textbf{NULL} in such situations. - -\index{register\_prng()} \index{rsa\_make\_key()} -\begin{small} -\begin{verbatim} -#include -int main(void) { - rsa_key key; - int err; - - /* register the system RNG */ - register_prng(&sprng_desc) - - /* make a 1024-bit RSA key with the system RNG */ - if ((err = rsa_make_key(NULL, find_prng("sprng"), 1024/8, 65537, &key)) - != CRYPT_OK) { - printf("make_key error: %s\n", error_to_string(err)); - return -1; - } - - /* use the key ... */ - - return 0; -} -\end{verbatim} -\end{small} - -\mysection{Functions that use Arrays of Octets} -Most functions require inputs that are arrays of the data type \textit{unsigned char}. Whether it is a symmetric key, IV -for a chaining mode or public key packet it is assumed that regardless of the actual size of \textit{unsigned char} only the -lower eight bits contain data. For example, if you want to pass a 256 bit key to a symmetric ciphers setup routine, you -must pass in (a pointer to) an array of 32 \textit{unsigned char} variables. Certain routines (such as SAFER+) take -special care to work properly on platforms where an \textit{unsigned char} is not eight bits. - -For the purposes of this library, the term \textit{byte} will refer to an octet or eight bit word. Typically an array of -type \textit{byte} will be synonymous with an array of type \textit{unsigned char.} - -\chapter{Symmetric Block Ciphers} -\mysection{Core Functions} -LibTomCrypt provides several block ciphers with an ECB block mode interface. It is important to first note that you -should never use the ECB modes directly to encrypt data. Instead you should use the ECB functions to make a chaining mode, -or use one of the provided chaining modes. All of the ciphers are written as ECB interfaces since it allows the rest of -the API to grow in a modular fashion. - -\subsection{Key Scheduling} -All ciphers store their scheduled keys in a single data type called \textit{symmetric\_key}. This allows all ciphers to -have the same prototype and store their keys as naturally as possible. This also removes the need for dynamic memory -allocation, and allows you to allocate a fixed sized buffer for storing scheduled keys. All ciphers must provide six visible -functions which are (given that XXX is the name of the cipher) the following: -\index{Cipher Setup} -\begin{verbatim} -int XXX_setup(const unsigned char *key, - int keylen, - int rounds, - symmetric_key *skey); -\end{verbatim} - -The XXX\_setup() routine will setup the cipher to be used with a given number of rounds and a given key length (in bytes). -The number of rounds can be set to zero to use the default, which is generally a good idea. - -If the function returns successfully the variable \textit{skey} will have a scheduled key stored in it. It's important to note -that you should only used this scheduled key with the intended cipher. For example, if you call \textit{blowfish\_setup()} do not -pass the scheduled key onto \textit{rc5\_ecb\_encrypt()}. All built--in setup functions do not allocate memory off the heap so -when you are done with a key you can simply discard it (e.g. they can be on the stack). However, to maintain proper coding -practices you should always call the respective XXX\_done() function. This allows for quicker porting to applications with -externally supplied plugins. - -\subsection{ECB Encryption and Decryption} -To encrypt or decrypt a block in ECB mode there are these two functions per cipher: -\index{Cipher Encrypt} \index{Cipher Decrypt} -\begin{verbatim} -int XXX_ecb_encrypt(const unsigned char *pt, - unsigned char *ct, - symmetric_key *skey); - -int XXX_ecb_decrypt(const unsigned char *ct, - unsigned char *pt, - symmetric_key *skey); -\end{verbatim} -These two functions will encrypt or decrypt (respectively) a single block of text\footnote{The size of which depends on -which cipher you are using.}, storing the result in the \textit{ct} buffer (\textit{pt} resp.). It is possible that the input and output buffer are -the same buffer. For the encrypt function \textit{pt}\footnote{pt stands for plaintext.} is the input and -\textit{ct}\footnote{ct stands for ciphertext.} is the output. For the decryption function it's the opposite. They both -return \textbf{CRYPT\_OK} on success. To test a particular cipher against test vectors\footnote{As published in their design papers.} -call the following self-test function. - -\subsection{Self--Testing} -\index{Cipher Testing} -\begin{verbatim} -int XXX_test(void); -\end{verbatim} -This function will return {\bf CRYPT\_OK} if the cipher matches the test vectors from the design publication it is -based upon. - -\subsection{Key Sizing} -For each cipher there is a function which will help find a desired key size. It is specified as follows: -\index{Key Sizing} -\begin{verbatim} -int XXX_keysize(int *keysize); -\end{verbatim} -Essentially, it will round the input keysize in \textit{keysize} down to the next appropriate key size. This function -will return {\bf CRYPT\_OK} if the key size specified is acceptable. For example: -\begin{small} -\begin{verbatim} -#include -int main(void) -{ - int keysize, err; - - /* now given a 20 byte key what keysize does Twofish want to use? */ - keysize = 20; - if ((err = twofish_keysize(&keysize)) != CRYPT_OK) { - printf("Error getting key size: %s\n", error_to_string(err)); - return -1; - } - printf("Twofish suggested a key size of %d\n", keysize); - return 0; -} -\end{verbatim} -\end{small} -This should indicate a keysize of sixteen bytes is suggested by storing 16 in \textit{keysize.} - -\subsection{Cipher Termination} -When you are finished with a cipher you can de--initialize it with the done function. -\begin{verbatim} -void XXX_done(symmetric_key *skey); -\end{verbatim} -For the software based ciphers within LibTomCrypt, these functions will not do anything. However, user supplied -cipher descriptors may require to be called for resource management purposes. To be compliant, all functions which call a cipher -setup function must also call the respective cipher done function when finished. - -\subsection{Simple Encryption Demonstration} -An example snippet that encodes a block with Blowfish in ECB mode. - -\index{blowfish\_setup()} \index{blowfish\_ecb\_encrypt()} \index{blowfish\_ecb\_decrypt()} \index{blowfish\_done()} -\begin{small} -\begin{verbatim} -#include -int main(void) -{ - unsigned char pt[8], ct[8], key[8]; - symmetric_key skey; - int err; - - /* ... key is loaded appropriately in key ... */ - /* ... load a block of plaintext in pt ... */ - - /* schedule the key */ - if ((err = blowfish_setup(key, /* the key we will use */ - 8, /* key is 8 bytes (64-bits) long */ - 0, /* 0 == use default # of rounds */ - &skey) /* where to put the scheduled key */ - ) != CRYPT_OK) { - printf("Setup error: %s\n", error_to_string(err)); - return -1; - } - - /* encrypt the block */ - blowfish_ecb_encrypt(pt, /* encrypt this 8-byte array */ - ct, /* store encrypted data here */ - &skey); /* our previously scheduled key */ - - /* now ct holds the encrypted version of pt */ - - /* decrypt the block */ - blowfish_ecb_decrypt(ct, /* decrypt this 8-byte array */ - pt, /* store decrypted data here */ - &skey); /* our previously scheduled key */ - - /* now we have decrypted ct to the original plaintext in pt */ - - /* Terminate the cipher context */ - blowfish_done(&skey); - - return 0; -} -\end{verbatim} -\end{small} - -\mysection{Key Sizes and Number of Rounds} -\index{Symmetric Keys} -As a general rule of thumb, do not use symmetric keys under 80 bits if you can help it. Only a few of the ciphers support smaller -keys (mainly for test vectors anyways). Ideally, your application should be making at least 256 bit keys. This is not -because you are to be paranoid. It is because if your PRNG has a bias of any sort the more bits the better. For -example, if you have $\mbox{Pr}\left[X = 1\right] = {1 \over 2} \pm \gamma$ where $\vert \gamma \vert > 0$ then the -total amount of entropy in N bits is $N \cdot -log_2\left ({1 \over 2} + \vert \gamma \vert \right)$. So if $\gamma$ -were $0.25$ (a severe bias) a 256-bit string would have about 106 bits of entropy whereas a 128-bit string would have -only 53 bits of entropy. - -The number of rounds of most ciphers is not an option you can change. Only RC5 allows you to change the number of -rounds. By passing zero as the number of rounds all ciphers will use their default number of rounds. Generally the -ciphers are configured such that the default number of rounds provide adequate security for the given block and key -size. - -\mysection{The Cipher Descriptors} -\index{Cipher Descriptor} -To facilitate automatic routines an array of cipher descriptors is provided in the array \textit{cipher\_descriptor}. An element -of this array has the following (partial) format (See Section \ref{sec:cipherdesc}): - -\begin{small} -\begin{verbatim} -struct _cipher_descriptor { - /** name of cipher */ - char *name; - - /** internal ID */ - unsigned char ID; - - /** min keysize (octets) */ - int min_key_length, - - /** max keysize (octets) */ - max_key_length, - - /** block size (octets) */ - block_length, - - /** default number of rounds */ - default_rounds; -...... -}; -\end{verbatim} -\end{small} - -Where \textit{name} is the lower case ASCII version of the name. The fields \textit{min\_key\_length} and \textit{max\_key\_length} -are the minimum and maximum key sizes in bytes. The \textit{block\_length} member is the block size of the cipher -in bytes. As a good rule of thumb it is assumed that the cipher supports -the min and max key lengths but not always everything in between. The \textit{default\_rounds} field is the default number -of rounds that will be used. - -For a plugin to be compliant it must provide at least each function listed before the accelerators begin. Accelerators are optional, -and if missing will be emulated in software. - -The remaining fields are all pointers to the core functions for each cipher. The end of the cipher\_descriptor array is -marked when \textit{name} equals {\bf NULL}. - -As of this release the current cipher\_descriptors elements are the following: -\vfil -\index{Cipher descriptor table} -\index{blowfish\_desc} \index{xtea\_desc} \index{rc2\_desc} \index{rc5\_desc} \index{rc6\_desc} \index{saferp\_desc} \index{aes\_desc} \index{twofish\_desc} -\index{des\_desc} \index{des3\_desc} \index{noekeon\_desc} \index{skipjack\_desc} \index{anubis\_desc} \index{khazad\_desc} \index{kseed\_desc} \index{kasumi\_desc} -\begin{figure}[hpbt] -\begin{small} -\begin{center} -\begin{tabular}{|c|c|c|c|c|c|} - \hline \textbf{Name} & \textbf{Descriptor Name} & \textbf{Block Size} & \textbf{Key Range} & \textbf{Rounds} \\ - \hline Blowfish & blowfish\_desc & 8 & 8 $\ldots$ 56 & 16 \\ - \hline X-Tea & xtea\_desc & 8 & 16 & 32 \\ - \hline RC2 & rc2\_desc & 8 & 8 $\ldots$ 128 & 16 \\ - \hline RC5-32/12/b & rc5\_desc & 8 & 8 $\ldots$ 128 & 12 $\ldots$ 24 \\ - \hline RC6-32/20/b & rc6\_desc & 16 & 8 $\ldots$ 128 & 20 \\ - \hline SAFER+ & saferp\_desc &16 & 16, 24, 32 & 8, 12, 16 \\ - \hline AES & aes\_desc & 16 & 16, 24, 32 & 10, 12, 14 \\ - & aes\_enc\_desc & 16 & 16, 24, 32 & 10, 12, 14 \\ - \hline Twofish & twofish\_desc & 16 & 16, 24, 32 & 16 \\ - \hline DES & des\_desc & 8 & 8 & 16 \\ - \hline 3DES (EDE mode) & des3\_desc & 8 & 24 & 16 \\ - \hline CAST5 (CAST-128) & cast5\_desc & 8 & 5 $\ldots$ 16 & 12, 16 \\ - \hline Noekeon & noekeon\_desc & 16 & 16 & 16 \\ - \hline Skipjack & skipjack\_desc & 8 & 10 & 32 \\ - \hline Anubis & anubis\_desc & 16 & 16 $\ldots$ 40 & 12 $\ldots$ 18 \\ - \hline Khazad & khazad\_desc & 8 & 16 & 8 \\ - \hline SEED & kseed\_desc & 16 & 16 & 16 \\ - \hline KASUMI & kasumi\_desc & 8 & 16 & 8 \\ - \hline -\end{tabular} -\end{center} -\end{small} -\caption{Built--In Software Ciphers} -\end{figure} - -\subsection{Notes} -\begin{small} -\begin{enumerate} -\item -For AES, (also known as Rijndael) there are four descriptors which complicate issues a little. The descriptors -rijndael\_desc and rijndael\_enc\_desc provide the cipher named \textit{rijndael}. The descriptors aes\_desc and -aes\_enc\_desc provide the cipher name \textit{aes}. Functionally both \textit{rijndael} and \textit{aes} are the same cipher. The -only difference is when you call find\_cipher() you have to pass the correct name. The cipher descriptors with \textit{enc} -in the middle (e.g. rijndael\_enc\_desc) are related to an implementation of Rijndael with only the encryption routine -and tables. The decryption and self--test function pointers of both \textit{encrypt only} descriptors are set to \textbf{NULL} and -should not be called. - -The \textit{encrypt only} descriptors are useful for applications that only use the encryption function of the cipher. Algorithms such -as EAX, PMAC and OMAC only require the encryption function. So far this \textit{encrypt only} functionality has only been implemented for -Rijndael as it makes the most sense for this cipher. - -\item -Note that for \textit{DES} and \textit{3DES} they use 8 and 24 byte keys but only 7 and 21 [respectively] bytes of the keys are in -fact used for the purposes of encryption. My suggestion is just to use random 8/24 byte keys instead of trying to make a 8/24 -byte string from the real 7/21 byte key. - -\item -Note that \textit{Twofish} has additional configuration options (Figure \ref{fig:twofishopts}) that take place at build time. These options are found in -the file \textit{tomcrypt\_cfg.h}. The first option is \textit{TWOFISH\_SMALL} which when defined will force the Twofish code -to not pre-compute the Twofish \textit{$g(X)$} function as a set of four $8 \times 32$ s-boxes. This means that a scheduled -key will require less ram but the resulting cipher will be slower. The second option is \textit{TWOFISH\_TABLES} which when -defined will force the Twofish code to use pre-computed tables for the two s-boxes $q_0, q_1$ as well as the multiplication -by the polynomials 5B and EF used in the MDS multiplication. As a result the code is faster and slightly larger. The -speed increase is useful when \textit{TWOFISH\_SMALL} is defined since the s-boxes and MDS multiply form the heart of the -Twofish round function. - -\begin{figure}[hpbt] -\index{Twofish build options} \index{TWOFISH\_SMALL} \index{TWOFISH\_TABLES} -\begin{small} -\begin{center} -\begin{tabular}{|l|l|l|} -\hline \textbf{TWOFISH\_SMALL} & \textbf{TWOFISH\_TABLES} & \textbf{Speed and Memory (per key)} \\ -\hline undefined & undefined & Very fast, 4.2KB of ram. \\ -\hline undefined & defined & Faster key setup, larger code. \\ -\hline defined & undefined & Very slow, 0.2KB of ram. \\ -\hline defined & defined & Faster, 0.2KB of ram, larger code. \\ -\hline -\end{tabular} -\end{center} -\end{small} -\caption{Twofish Build Options} -\label{fig:twofishopts} -\end{figure} -\end{enumerate} -\end{small} - -To work with the cipher\_descriptor array there is a function: -\index{find\_cipher()} -\begin{verbatim} -int find_cipher(char *name) -\end{verbatim} -Which will search for a given name in the array. It returns $-1$ if the cipher is not found, otherwise it returns -the location in the array where the cipher was found. For example, to indirectly setup Blowfish you can also use: -\begin{small} -\index{register\_cipher()} \index{find\_cipher()} \index{error\_to\_string()} -\begin{verbatim} -#include -int main(void) -{ - unsigned char key[8]; - symmetric_key skey; - int err; - - /* you must register a cipher before you use it */ - if (register_cipher(&blowfish_desc)) == -1) { - printf("Unable to register Blowfish cipher."); - return -1; - } - - /* generic call to function (assuming the key - * in key[] was already setup) */ - if ((err = - cipher_descriptor[find_cipher("blowfish")]. - setup(key, 8, 0, &skey)) != CRYPT_OK) { - printf("Error setting up Blowfish: %s\n", error_to_string(err)); - return -1; - } - - /* ... use cipher ... */ -} -\end{verbatim} -\end{small} - -A good safety would be to check the return value of \textit{find\_cipher()} before accessing the desired function. In order -to use a cipher with the descriptor table you must register it first using: -\index{register\_cipher()} -\begin{verbatim} -int register_cipher(const struct _cipher_descriptor *cipher); -\end{verbatim} -Which accepts a pointer to a descriptor and returns the index into the global descriptor table. If an error occurs such -as there is no more room (it can have 32 ciphers at most) it will return {\bf{-1}}. If you try to add the same cipher more -than once it will just return the index of the first copy. To remove a cipher call: -\index{unregister\_cipher()} -\begin{verbatim} -int unregister_cipher(const struct _cipher_descriptor *cipher); -\end{verbatim} -Which returns {\bf CRYPT\_OK} if it removes the cipher, otherwise it returns {\bf CRYPT\_ERROR}. -\begin{small} -\begin{verbatim} -#include -int main(void) -{ - int err; - - /* register the cipher */ - if (register_cipher(&rijndael_desc) == -1) { - printf("Error registering Rijndael\n"); - return -1; - } - - /* use Rijndael */ - - /* remove it */ - if ((err = unregister_cipher(&rijndael_desc)) != CRYPT_OK) { - printf("Error removing Rijndael: %s\n", error_to_string(err)); - return -1; - } - - return 0; -} -\end{verbatim} -\end{small} -This snippet is a small program that registers Rijndael. - -\mysection{Symmetric Modes of Operations} -\subsection{Background} -A typical symmetric block cipher can be used in chaining modes to effectively encrypt messages larger than the block -size of the cipher. Given a key $k$, a plaintext $P$ and a cipher $E$ we shall denote the encryption of the block -$P$ under the key $k$ as $E_k(P)$. In some modes there exists an initial vector denoted as $C_{-1}$. - -\subsubsection{ECB Mode} -\index{ECB mode} -ECB or Electronic Codebook Mode is the simplest method to use. It is given as: -\begin{equation} -C_i = E_k(P_i) -\end{equation} -This mode is very weak since it allows people to swap blocks and perform replay attacks if the same key is used more -than once. - -\subsubsection{CBC Mode} -\index{CBC mode} -CBC or Cipher Block Chaining mode is a simple mode designed to prevent trivial forms of replay and swap attacks on ciphers. -It is given as: -\begin{equation} -C_i = E_k(P_i \oplus C_{i - 1}) -\end{equation} -It is important that the initial vector be unique and preferably random for each message encrypted under the same key. - -\subsubsection{CTR Mode} -\index{CTR mode} -CTR or Counter Mode is a mode which only uses the encryption function of the cipher. Given a initial vector which is -treated as a large binary counter the CTR mode is given as: -\begin{eqnarray} -C_{-1} = C_{-1} + 1\mbox{ }(\mbox{mod }2^W) \nonumber \\ -C_i = P_i \oplus E_k(C_{-1}) -\end{eqnarray} -Where $W$ is the size of a block in bits (e.g. 64 for Blowfish). As long as the initial vector is random for each message -encrypted under the same key replay and swap attacks are infeasible. CTR mode may look simple but it is as secure -as the block cipher is under a chosen plaintext attack (provided the initial vector is unique). - -\subsubsection{CFB Mode} -\index{CFB mode} -CFB or Ciphertext Feedback Mode is a mode akin to CBC. It is given as: -\begin{eqnarray} -C_i = P_i \oplus C_{-1} \nonumber \\ -C_{-1} = E_k(C_i) -\end{eqnarray} -Note that in this library the output feedback width is equal to the size of the block cipher. That is this mode is used -to encrypt whole blocks at a time. However, the library will buffer data allowing the user to encrypt or decrypt partial -blocks without a delay. When this mode is first setup it will initially encrypt the initial vector as required. - -\subsubsection{OFB Mode} -\index{OFB mode} -OFB or Output Feedback Mode is a mode akin to CBC as well. It is given as: -\begin{eqnarray} -C_{-1} = E_k(C_{-1}) \nonumber \\ -C_i = P_i \oplus C_{-1} -\end{eqnarray} -Like the CFB mode the output width in CFB mode is the same as the width of the block cipher. OFB mode will also -buffer the output which will allow you to encrypt or decrypt partial blocks without delay. - -\subsection{Choice of Mode} -My personal preference is for the CTR mode since it has several key benefits: -\begin{enumerate} - \item No short cycles which is possible in the OFB and CFB modes. - \item Provably as secure as the block cipher being used under a chosen plaintext attack. - \item Technically does not require the decryption routine of the cipher. - \item Allows random access to the plaintext. - \item Allows the encryption of block sizes that are not equal to the size of the block cipher. -\end{enumerate} -The CTR, CFB and OFB routines provided allow you to encrypt block sizes that differ from the ciphers block size. They -accomplish this by buffering the data required to complete a block. This allows you to encrypt or decrypt any size -block of memory with either of the three modes. - -The ECB and CBC modes process blocks of the same size as the cipher at a time. Therefore, they are less flexible than the -other modes. - -\subsection{Ciphertext Stealing} -\index{Ciphertext stealing} -Ciphertext stealing is a method of dealing with messages in CBC mode which are not a multiple of the block length. This is accomplished -by encrypting the last ciphertext block in ECB mode, and XOR'ing the output against the last partial block of plaintext. LibTomCrypt does not -support this mode directly but it is fairly easy to emulate with a call to the cipher's ecb\_encrypt() callback function. - -The more sane way to deal with partial blocks is to pad them with zeroes, and then use CBC normally. - -\subsection{Initialization} -\index{CBC Mode} \index{CTR Mode} -\index{OFB Mode} \index{CFB Mode} -The library provides simple support routines for handling CBC, CTR, CFB, OFB and ECB encoded messages. Assuming the mode -you want is XXX there is a structure called \textit{symmetric\_XXX} that will contain the information required to -use that mode. They have identical setup routines (except CTR and ECB mode): -\index{ecb\_start()} \index{cfb\_start()} \index{cbc\_start()} \index{ofb\_start()} \index{ctr\_start()} -\begin{verbatim} -int XXX_start( int cipher, - const unsigned char *IV, - const unsigned char *key, - int keylen, - int num_rounds, - symmetric_XXX *XXX); - -int ctr_start( int cipher, - const unsigned char *IV, - const unsigned char *key, - int keylen, - int num_rounds, - int ctr_mode, - symmetric_CTR *ctr); - -int ecb_start( int cipher, - const unsigned char *key, - int keylen, - int num_rounds, - symmetric_ECB *ecb); -\end{verbatim} - -In each case, \textit{cipher} is the index into the cipher\_descriptor array of the cipher you want to use. The \textit{IV} value is -the initialization vector to be used with the cipher. You must fill the IV yourself and it is assumed they are the same -length as the block size\footnote{In other words the size of a block of plaintext for the cipher, e.g. 8 for DES, 16 for AES, etc.} -of the cipher you choose. It is important that the IV be random for each unique message you want to encrypt. The -parameters \textit{key}, \textit{keylen} and \textit{num\_rounds} are the same as in the XXX\_setup() function call. The final parameter -is a pointer to the structure you want to hold the information for the mode of operation. - -The routines return {\bf CRYPT\_OK} if the cipher initialized correctly, otherwise, they return an error code. - -\subsubsection{CTR Mode} -In the case of CTR mode there is an additional parameter \textit{ctr\_mode} which specifies the mode that the counter is to be used in. -If \textbf{CTR\_COUNTER\_ LITTLE\_ENDIAN} was specified then the counter will be treated as a little endian value. Otherwise, if -\textbf{CTR\_COUNTER\_BIG\_ENDIAN} was specified the counter will be treated as a big endian value. As of v1.15 the RFC 3686 style of -increment then encrypt is also supported. By OR'ing \textbf{LTC\_CTR\_RFC3686} with the CTR \textit{mode} value, ctr\_start() will increment -the counter before encrypting it for the first time. - -As of V1.17, the library supports variable length counters for CTR mode. The (optional) counter length is specified by OR'ing the octet -length of the counter against the \textit{ctr\_mode} parameter. The default, zero, indicates that a full block length counter will be used. This also -ensures backwards compatibility with software that uses older versions of the library. - -\begin{small} -\begin{verbatim} -symmetric_CTR ctr; -int err; -unsigned char IV[16], key[16]; - -/* use a 32-bit little endian counter */ -if ((err = ctr_start(find_cipher("aes"), - IV, key, 16, 0, - CTR_COUNTER_LITTLE_ENDIAN | 4, - &ctr)) != CRYPT_OK) { - handle_error(err); -} -\end{verbatim} -\end{small} - -Changing the counter size has little (really no) effect on the performance of the CTR chaining mode. It is provided for compatibility -with other software (and hardware) which have smaller fixed sized counters. - -\subsection{Encryption and Decryption} -To actually encrypt or decrypt the following routines are provided: -\index{ecb\_encrypt()} \index{ecb\_decrypt()} \index{cfb\_encrypt()} \index{cfb\_decrypt()} -\index{cbc\_encrypt()} \index{cbc\_decrypt()} \index{ofb\_encrypt()} \index{ofb\_decrypt()} \index{ctr\_encrypt()} \index{ctr\_decrypt()} -\begin{verbatim} -int XXX_encrypt(const unsigned char *pt, - unsigned char *ct, - unsigned long len, - symmetric_YYY *YYY); - -int XXX_decrypt(const unsigned char *ct, - unsigned char *pt, - unsigned long len, - symmetric_YYY *YYY); -\end{verbatim} -Where \textit{XXX} is one of $\lbrace ecb, cbc, ctr, cfb, ofb \rbrace$. - -In all cases, \textit{len} is the size of the buffer (as number of octets) to encrypt or decrypt. The CTR, OFB and CFB modes are order sensitive but not -chunk sensitive. That is you can encrypt \textit{ABCDEF} in three calls like \textit{AB}, \textit{CD}, \textit{EF} or two like \textit{ABCDE} and \textit{F} -and end up with the same ciphertext. However, encrypting \textit{ABC} and \textit{DABC} will result in different ciphertexts. All -five of the modes will return {\bf CRYPT\_OK} on success from the encrypt or decrypt functions. - -In the ECB and CBC cases, \textit{len} must be a multiple of the ciphers block size. In the CBC case, you must manually pad the end of your message (either with -zeroes or with whatever your protocol requires). - -To decrypt in either mode, perform the setup like before (recall you have to fetch the IV value you used), and use the decrypt routine on all of the blocks. - -\subsection{IV Manipulation} -To change or read the IV of a previously initialized chaining mode use the following two functions. -\index{cbc\_setiv()} \index{cbc\_getiv()} \index{ofb\_setiv()} \index{ofb\_getiv()} \index{cfb\_setiv()} \index{cfb\_getiv()} -\index{ctr\_setiv()} \index{ctr\_getiv()} -\begin{verbatim} -int XXX_getiv(unsigned char *IV, - unsigned long *len, - symmetric_XXX *XXX); - -int XXX_setiv(const unsigned char *IV, - unsigned long len, - symmetric_XXX *XXX); -\end{verbatim} - -The XXX\_getiv() functions will read the IV out of the chaining mode and store it into \textit{IV} along with the length of the IV -stored in \textit{len}. The XXX\_setiv will initialize the chaining mode state as if the original IV were the new IV specified. The length -of the IV passed in must be the size of the ciphers block size. - -The XXX\_setiv() functions are handy if you wish to change the IV without re--keying the cipher. - -What the \textit{setiv} function will do depends on the mode being changed. In CBC mode, the new IV replaces the existing IV as if it -were the last ciphertext block. In CFB mode, the IV is encrypted as if it were the prior encrypted pad. In CTR mode, the IV is encrypted without -first incrementing it (regardless of the LTC\_RFC\_3686 flag presence). In F8 mode, the IV is encrypted and becomes the new pad. It does not change -the salted IV, and is only meant to allow seeking within a session. In LRW, it changes the tweak, forcing a computation of the tweak pad, allowing for -seeking within the session. In OFB mode, the IV is encrypted and becomes the new pad. - -\subsection{Stream Termination} -To terminate an open stream call the done function. - -\index{ecb\_done()} \index{cbc\_done()}\index{cfb\_done()}\index{ofb\_done()} \index{ctr\_done()} -\begin{verbatim} -int XXX_done(symmetric_XXX *XXX); -\end{verbatim} - -This will terminate the stream (by terminating the cipher) and return \textbf{CRYPT\_OK} if successful. - -\newpage -\subsection{Examples} -\begin{small} -\begin{verbatim} -#include -int main(void) -{ - unsigned char key[16], IV[16], buffer[512]; - symmetric_CTR ctr; - int x, err; - - /* register twofish first */ - if (register_cipher(&twofish_desc) == -1) { - printf("Error registering cipher.\n"); - return -1; - } - - /* somehow fill out key and IV */ - - /* start up CTR mode */ - if ((err = ctr_start( - find_cipher("twofish"), /* index of desired cipher */ - IV, /* the initial vector */ - key, /* the secret key */ - 16, /* length of secret key (16 bytes) */ - 0, /* 0 == default # of rounds */ - CTR_COUNTER_LITTLE_ENDIAN, /* Little endian counter */ - &ctr) /* where to store the CTR state */ - ) != CRYPT_OK) { - printf("ctr_start error: %s\n", error_to_string(err)); - return -1; - } - - /* somehow fill buffer than encrypt it */ - if ((err = ctr_encrypt( buffer, /* plaintext */ - buffer, /* ciphertext */ - sizeof(buffer), /* length of plaintext pt */ - &ctr) /* CTR state */ - ) != CRYPT_OK) { - printf("ctr_encrypt error: %s\n", error_to_string(err)); - return -1; - } - - /* make use of ciphertext... */ - - /* now we want to decrypt so let's use ctr_setiv */ - if ((err = ctr_setiv( IV, /* the initial IV we gave to ctr_start */ - 16, /* the IV is 16 bytes long */ - &ctr) /* the ctr state we wish to modify */ - ) != CRYPT_OK) { - printf("ctr_setiv error: %s\n", error_to_string(err)); - return -1; - } - - if ((err = ctr_decrypt( buffer, /* ciphertext */ - buffer, /* plaintext */ - sizeof(buffer), /* length of plaintext */ - &ctr) /* CTR state */ - ) != CRYPT_OK) { - printf("ctr_decrypt error: %s\n", error_to_string(err)); - return -1; - } - - /* terminate the stream */ - if ((err = ctr_done(&ctr)) != CRYPT_OK) { - printf("ctr_done error: %s\n", error_to_string(err)); - return -1; - } - - /* clear up and return */ - zeromem(key, sizeof(key)); - zeromem(&ctr, sizeof(ctr)); - - return 0; -} -\end{verbatim} -\end{small} - -\subsection{LRW Mode} -LRW mode is a cipher mode which is meant for indexed encryption like used to handle storage media. It is meant to have efficient seeking and overcome the -security problems of ECB mode while not increasing the storage requirements. It is used much like any other chaining mode except with two key differences. - -The key is specified as two strings the first key $K_1$ is the (normally AES) key and can be any length (typically 16, 24 or 32 octets long). The second key -$K_2$ is the \textit{tweak} key and is always 16 octets long. The tweak value is \textbf{NOT} a nonce or IV value it must be random and secret. - -To initialize LRW mode use: - -\index{lrw\_start()} -\begin{verbatim} -int lrw_start( int cipher, - const unsigned char *IV, - const unsigned char *key, - int keylen, - const unsigned char *tweak, - int num_rounds, - symmetric_LRW *lrw); -\end{verbatim} - -This will initialize the LRW context with the given (16 octet) \textit{IV}, cipher $K_1$ \textit{key} of length \textit{keylen} octets and the (16 octet) $K_2$ \textit{tweak}. -While LRW was specified to be used only with AES, LibTomCrypt will allow any 128--bit block cipher to be specified as indexed by \textit{cipher}. The -number of rounds for the block cipher \textit{num\_rounds} can be 0 to use the default number of rounds for the given cipher. - -To process data use the following functions: - -\index{lrw\_encrypt()} \index{lrw\_decrypt()} -\begin{verbatim} -int lrw_encrypt(const unsigned char *pt, - unsigned char *ct, - unsigned long len, - symmetric_LRW *lrw); - -int lrw_decrypt(const unsigned char *ct, - unsigned char *pt, - unsigned long len, - symmetric_LRW *lrw); -\end{verbatim} - -These will encrypt (or decrypt) the plaintext to the ciphertext buffer (or vice versa). The length is specified by \textit{len} in octets but must be a multiple -of 16. The LRW code uses a fast tweak update such that consecutive blocks are encrypted faster than if random seeking where used. - -To manipulate the IV use the following functions: - -\index{lrw\_getiv()} \index{lrw\_setiv()} -\begin{verbatim} -int lrw_getiv(unsigned char *IV, - unsigned long *len, - symmetric_LRW *lrw); - -int lrw_setiv(const unsigned char *IV, - unsigned long len, - symmetric_LRW *lrw); -\end{verbatim} -These will get or set the 16--octet IV. Note that setting the IV is the same as \textit{seeking} and unlike other modes is not a free operation. It requires -updating the entire tweak which is slower than sequential use. Avoid seeking excessively in performance constrained code. - -To terminate the LRW state use the following: - -\index{lrw\_done()} -\begin{verbatim} -int lrw_done(symmetric_LRW *lrw); -\end{verbatim} - -\subsection{XTS Mode} -As of v1.17, LibTomCrypt supports XTS mode with code donated by Elliptic Semiconductor Inc.\footnote{www.ellipticsemi.com}. -XTS is a chaining mode for 128--bit block ciphers, recommended by IEEE (P1619) -for disk encryption. It is meant to be an encryption mode with random access to the message data without compromising privacy. It requires two private keys (of equal -length) to perform the encryption process. Each encryption invocation includes a sector number or unique identifier specified as a 128--bit string. - -To initialize XTS mode use the following function call: - -\index{xts\_start()} -\begin{verbatim} -int xts_start( int cipher, - const unsigned char *key1, - const unsigned char *key2, - unsigned long keylen, - int num_rounds, - symmetric_xts *xts) -\end{verbatim} -This will start the XTS mode with the two keys pointed to by \textit{key1} and \textit{key2} of length \textit{keylen} octets each. - -To encrypt or decrypt a sector use the following calls: - -\index{xts\_encrypt()} \index{xts\_decrypt()} -\begin{verbatim} -int xts_encrypt( - const unsigned char *pt, unsigned long ptlen, - unsigned char *ct, - const unsigned char *tweak, - symmetric_xts *xts); - -int xts_decrypt( - const unsigned char *ct, unsigned long ptlen, - unsigned char *pt, - const unsigned char *tweak, - symmetric_xts *xts); -\end{verbatim} -The first will encrypt the plaintext pointed to by \textit{pt} of length \textit{ptlen} octets, and store the ciphertext in the array pointed to by -\textit{ct}. It uses the 128--bit tweak pointed to by \textit{tweak} to encrypt the block. The decrypt function performs the opposite operation. Both -functions support ciphertext stealing (blocks that are not multiples of 16 bytes). - -The P1619 specification states the tweak for sector number shall be represented as a 128--bit little endian string. - -To terminate the XTS state call the following function: - -\index{xts\_done()} -\begin{verbatim} -void xts_done(symmetric_xts *xts); -\end{verbatim} - - -\subsection{F8 Mode} -\index{F8 Mode} -The F8 Chaining mode (see RFC 3711 for instance) is yet another chaining mode for block ciphers. It behaves much like CTR mode in that it XORs a keystream -against the plaintext to encrypt. F8 mode comes with the additional twist that the counter value is secret, encrypted by a \textit{salt key}. We -initialize F8 mode with the following function call: - -\index{f8\_start()} -\begin{verbatim} -int f8_start( int cipher, - const unsigned char *IV, - const unsigned char *key, - int keylen, - const unsigned char *salt_key, - int skeylen, - int num_rounds, - symmetric_F8 *f8); -\end{verbatim} -This will start the F8 mode state using \textit{key} as the secret key, \textit{IV} as the counter. It uses the \textit{salt\_key} as IV encryption key -(\textit{m} in the RFC 3711). The salt\_key can be shorter than the secret key but it should not be longer. - -To encrypt or decrypt data we use the following two functions: - -\index{f8\_encrypt()} \index{f8\_decrypt()} -\begin{verbatim} -int f8_encrypt(const unsigned char *pt, - unsigned char *ct, - unsigned long len, - symmetric_F8 *f8); - -int f8_decrypt(const unsigned char *ct, - unsigned char *pt, - unsigned long len, - symmetric_F8 *f8); -\end{verbatim} -These will encrypt or decrypt a variable length array of bytes using the F8 mode state specified. The length is specified in bytes and does not have to be a multiple -of the ciphers block size. - -To change or retrieve the current counter IV value use the following functions: -\index{f8\_getiv()} \index{f8\_setiv()} -\begin{verbatim} -int f8_getiv(unsigned char *IV, - unsigned long *len, - symmetric_F8 *f8); - -int f8_setiv(const unsigned char *IV, - unsigned long len, - symmetric_F8 *f8); -\end{verbatim} -These work with the current IV value only and not the encrypted IV value specified during the call to f8\_start(). The purpose of these two functions is to be -able to seek within a current session only. If you want to change the session IV you will have to call f8\_done() and then start a new state with -f8\_start(). - -To terminate an F8 state call the following function: - -\index{f8\_done()} -\begin{verbatim} -int f8_done(symmetric_F8 *f8); -\end{verbatim} - -\vfil -\mysection{Encrypt and Authenticate Modes} - -\subsection{EAX Mode} -LibTomCrypt provides support for a mode called EAX\footnote{See -M. Bellare, P. Rogaway, D. Wagner, A Conventional Authenticated-Encryption Mode.} in a manner similar to the way it was intended to be used -by the designers. First, a short description of what EAX mode is before we explain how to use it. EAX is a mode that requires a cipher, -CTR and OMAC support and provides encryption and -authentication\footnote{Note that since EAX only requires OMAC and CTR you may use \textit{encrypt only} cipher descriptors with this mode.}. -It is initialized with a random \textit{nonce} that can be shared publicly, a \textit{header} which can be fixed and public, and a random secret symmetric key. - -The \textit{header} data is meant to be meta--data associated with a stream that isn't private (e.g., protocol messages). It can -be added at anytime during an EAX stream, and is part of the authentication tag. That is, changes in the meta-data can be detected by changes in the output tag. - -The mode can then process plaintext producing ciphertext as well as compute a partial checksum. The actual checksum -called a \textit{tag} is only emitted when the message is finished. In the interim, the user can process any arbitrary -sized message block to send to the recipient as ciphertext. This makes the EAX mode especially suited for streaming modes -of operation. - -The mode is initialized with the following function. -\index{eax\_init()} -\begin{verbatim} -int eax_init( eax_state *eax, - int cipher, - const unsigned char *key, - unsigned long keylen, - const unsigned char *nonce, - unsigned long noncelen, - const unsigned char *header, - unsigned long headerlen); -\end{verbatim} - -Where \textit{eax} is the EAX state. The \textit{cipher} parameter is the index of the desired cipher in the descriptor table. -The \textit{key} parameter is the shared secret symmetric key of length \textit{keylen} octets. The \textit{nonce} parameter is the -random public string of length \textit{noncelen} octets. The \textit{header} parameter is the random (or fixed or \textbf{NULL}) header for the -message of length \textit{headerlen} octets. - -When this function completes, the \textit{eax} state will be initialized such that you can now either have data decrypted or -encrypted in EAX mode. Note: if \textit{headerlen} is zero you may pass \textit{header} as \textbf{NULL} to indicate there is no initial header data. - -To encrypt or decrypt data in a streaming mode use the following. -\index{eax\_encrypt()} \index{eax\_decrypt()} -\begin{verbatim} -int eax_encrypt( eax_state *eax, - const unsigned char *pt, - unsigned char *ct, - unsigned long length); - -int eax_decrypt( eax_state *eax, - const unsigned char *ct, - unsigned char *pt, - unsigned long length); -\end{verbatim} -The function \textit{eax\_encrypt} will encrypt the bytes in \textit{pt} of \textit{length} octets, and store the ciphertext in -\textit{ct}. Note: \textit{ct} and \textit{pt} may be the same region in memory. This function will also send the ciphertext -through the OMAC function. The function \textit{eax\_decrypt} decrypts \textit{ct}, and stores it in \textit{pt}. This also allows -\textit{pt} and \textit{ct} to be the same region in memory. - -You cannot both encrypt or decrypt with the same \textit{eax} context. For bi--directional communication you will need to initialize -two EAX contexts (preferably with different headers and nonces). - -Note: both of these functions allow you to send the data in any granularity but the order is important. While -the eax\_init() function allows you to add initial header data to the stream you can also add header data during the -EAX stream with the following. - -\index{eax\_addheader()} -\begin{verbatim} -int eax_addheader( eax_state *eax, - const unsigned char *header, - unsigned long length); -\end{verbatim} -This will add the \textit{length} octet from \textit{header} to the given \textit{eax} header. Once the message is finished, the -\textit{tag} (checksum) may be computed with the following function: - -\index{eax\_done()} -\begin{verbatim} -int eax_done( eax_state *eax, - unsigned char *tag, - unsigned long *taglen); -\end{verbatim} -This will terminate the EAX state \textit{eax}, and store up to \textit{taglen} bytes of the message tag in \textit{tag}. The function -then stores how many bytes of the tag were written out back in to \textit{taglen}. - -The EAX mode code can be tested to ensure it matches the test vectors by calling the following function: -\index{eax\_test()} -\begin{verbatim} -int eax_test(void); -\end{verbatim} -This requires that the AES (or Rijndael) block cipher be registered with the cipher\_descriptor table first. - -\begin{verbatim} -#include -int main(void) -{ - int err; - eax_state eax; - unsigned char pt[64], ct[64], nonce[16], key[16], tag[16]; - unsigned long taglen; - - if (register_cipher(&rijndael_desc) == -1) { - printf("Error registering Rijndael"); - return EXIT_FAILURE; - } - - /* ... make up random nonce and key ... */ - - /* initialize context */ - if ((err = eax_init( &eax, /* context */ - find_cipher("rijndael"), /* cipher id */ - nonce, /* the nonce */ - 16, /* nonce is 16 bytes */ - "TestApp", /* example header */ - 7) /* header length */ - ) != CRYPT_OK) { - printf("Error eax_init: %s", error_to_string(err)); - return EXIT_FAILURE; - } - - /* now encrypt data, say in a loop or whatever */ - if ((err = eax_encrypt( &eax, /* eax context */ - pt, /* plaintext (source) */ - ct, /* ciphertext (destination) */ - sizeof(pt) /* size of plaintext */ - ) != CRYPT_OK) { - printf("Error eax_encrypt: %s", error_to_string(err)); - return EXIT_FAILURE; - } - - /* finish message and get authentication tag */ - taglen = sizeof(tag); - if ((err = eax_done( &eax, /* eax context */ - tag, /* where to put tag */ - &taglen /* length of tag space */ - ) != CRYPT_OK) { - printf("Error eax_done: %s", error_to_string(err)); - return EXIT_FAILURE; - } - - /* now we have the authentication tag in "tag" and - * it's taglen bytes long */ -} -\end{verbatim} - -You can also perform an entire EAX state on a block of memory in a single function call with the -following functions. - - -\index{eax\_encrypt\_authenticate\_memory} \index{eax\_decrypt\_verify\_memory} -\begin{verbatim} -int eax_encrypt_authenticate_memory( - int cipher, - const unsigned char *key, unsigned long keylen, - const unsigned char *nonce, unsigned long noncelen, - const unsigned char *header, unsigned long headerlen, - const unsigned char *pt, unsigned long ptlen, - unsigned char *ct, - unsigned char *tag, unsigned long *taglen); - -int eax_decrypt_verify_memory( - int cipher, - const unsigned char *key, unsigned long keylen, - const unsigned char *nonce, unsigned long noncelen, - const unsigned char *header, unsigned long headerlen, - const unsigned char *ct, unsigned long ctlen, - unsigned char *pt, - unsigned char *tag, unsigned long taglen, - int *res); -\end{verbatim} - -Both essentially just call eax\_init() followed by eax\_encrypt() (or eax\_decrypt() respectively) and eax\_done(). The parameters -have the same meaning as with those respective functions. - -The only difference is eax\_decrypt\_verify\_memory() does not emit a tag. Instead you pass it a tag as input and it compares it against -the tag it computed while decrypting the message. If the tags match then it stores a $1$ in \textit{res}, otherwise it stores a $0$. - -\subsection{OCB Mode} -LibTomCrypt provides support for a mode called OCB\footnote{See -P. Rogaway, M. Bellare, J. Black, T. Krovetz, \textit{OCB: A Block Cipher Mode of Operation for Efficient Authenticated Encryption}.} -. OCB is an encryption protocol that simultaneously provides authentication. It is slightly faster to use than EAX mode -but is less flexible. Let's review how to initialize an OCB context. - -\index{ocb\_init()} -\begin{verbatim} -int ocb_init( ocb_state *ocb, - int cipher, - const unsigned char *key, - unsigned long keylen, - const unsigned char *nonce); -\end{verbatim} - -This will initialize the \textit{ocb} context using cipher descriptor \textit{cipher}. It will use a \textit{key} of length \textit{keylen} -and the random \textit{nonce}. Note that \textit{nonce} must be a random (public) string the same length as the block ciphers -block size (e.g. 16 bytes for AES). - -This mode has no \textit{Associated Data} like EAX mode does which means you cannot authenticate metadata along with the stream. -To encrypt or decrypt data use the following. - -\index{ocb\_encrypt()} \index{ocb\_decrypt()} -\begin{verbatim} -int ocb_encrypt( ocb_state *ocb, - const unsigned char *pt, - unsigned char *ct); - -int ocb_decrypt( ocb_state *ocb, - const unsigned char *ct, - unsigned char *pt); -\end{verbatim} - -This will encrypt (or decrypt for the latter) a fixed length of data from \textit{pt} to \textit{ct} (vice versa for the latter). -They assume that \textit{pt} and \textit{ct} are the same size as the block cipher's block size. Note that you cannot call -both functions given a single \textit{ocb} state. For bi-directional communication you will have to initialize two \textit{ocb} -states (with different nonces). Also \textit{pt} and \textit{ct} may point to the same location in memory. - -\subsubsection{State Termination} - -When you are finished encrypting the message you call the following function to compute the tag. - -\index{ocb\_done\_encrypt()} -\begin{verbatim} -int ocb_done_encrypt( ocb_state *ocb, - const unsigned char *pt, - unsigned long ptlen, - unsigned char *ct, - unsigned char *tag, - unsigned long *taglen); -\end{verbatim} - -This will terminate an encrypt stream \textit{ocb}. If you have trailing bytes of plaintext that will not complete a block -you can pass them here. This will also encrypt the \textit{ptlen} bytes in \textit{pt} and store them in \textit{ct}. It will also -store up to \textit{taglen} bytes of the tag into \textit{tag}. - -Note that \textit{ptlen} must be less than or equal to the block size of block cipher chosen. Also note that if you have -an input message equal to the length of the block size then you pass the data here (not to ocb\_encrypt()) only. - -To terminate a decrypt stream and compared the tag you call the following. - -\index{ocb\_done\_decrypt()} -\begin{verbatim} -int ocb_done_decrypt( ocb_state *ocb, - const unsigned char *ct, - unsigned long ctlen, - unsigned char *pt, - const unsigned char *tag, - unsigned long taglen, - int *res); -\end{verbatim} -Similarly to the previous function you can pass trailing message bytes into this function. This will compute the -tag of the message (internally) and then compare it against the \textit{taglen} bytes of \textit{tag} provided. By default -\textit{res} is set to zero. If all \textit{taglen} bytes of \textit{tag} can be verified then \textit{res} is set to one (authenticated -message). - -\subsubsection{Packet Functions} -To make life simpler the following two functions are provided for memory bound OCB. - -%\index{ocb\_encrypt\_authenticate\_memory()} -\begin{verbatim} -int ocb_encrypt_authenticate_memory( - int cipher, - const unsigned char *key, unsigned long keylen, - const unsigned char *nonce, - const unsigned char *pt, unsigned long ptlen, - unsigned char *ct, - unsigned char *tag, unsigned long *taglen); -\end{verbatim} - -This will OCB encrypt the message \textit{pt} of length \textit{ptlen}, and store the ciphertext in \textit{ct}. The length \textit{ptlen} -can be any arbitrary length. - -\index{ocb\_decrypt\_verify\_memory()} -\begin{verbatim} -int ocb_decrypt_verify_memory( - int cipher, - const unsigned char *key, unsigned long keylen, - const unsigned char *nonce, - const unsigned char *ct, unsigned long ctlen, - unsigned char *pt, - const unsigned char *tag, unsigned long taglen, - int *res); -\end{verbatim} - -Similarly, this will OCB decrypt, and compare the internally computed tag against the tag provided. \textit{res} is set -appropriately. - -\subsection{CCM Mode} -CCM is a NIST proposal for encrypt + authenticate that is centered around using AES (or any 16--byte cipher) as a primitive. Unlike EAX and OCB mode, -it is only meant for \textit{packet} mode where the length of the input is known in advance. Since it is a packet mode function, CCM only has one -function that performs the protocol. - -\index{ccm\_memory()} -\begin{verbatim} -int ccm_memory( - int cipher, - const unsigned char *key, unsigned long keylen, - symmetric_key *uskey, - const unsigned char *nonce, unsigned long noncelen, - const unsigned char *header, unsigned long headerlen, - unsigned char *pt, unsigned long ptlen, - unsigned char *ct, - unsigned char *tag, unsigned long *taglen, - int direction); -\end{verbatim} - -This performs the \textit{CCM} operation on the data. The \textit{cipher} variable indicates which cipher in the descriptor table to use. It must have a -16--byte block size for CCM. - -The key can be specified in one of two fashions. First, it can be passed as an array of octets in \textit{key} of length \textit{keylen}. Alternatively, -it can be passed in as a previously scheduled key in \textit{uskey}. The latter fashion saves time when the same key is used for multiple packets. If -\textit{uskey} is not \textbf{NULL}, then \textit{key} may be \textbf{NULL} (and vice-versa). - -The nonce or salt is \textit{nonce} of length \textit{noncelen} octets. The header is meta--data you want to send with the message but not have -encrypted, it is stored in \textit{header} of length \textit{headerlen} octets. The header can be zero octets long (if $headerlen = 0$ then -you can pass \textit{header} as \textbf{NULL}). - -The plaintext is stored in \textit{pt}, and the ciphertext in \textit{ct}. The length of both are expected to be equal and is passed in as \textit{ptlen}. It is -allowable that $pt = ct$. The \textit{direction} variable indicates whether encryption (direction $=$ \textbf{CCM\_ENCRYPT}) or -decryption (direction $=$ \textbf{CCM\_DECRYPT}) is to be performed. - -As implemented, this version of CCM cannot handle header or plaintext data longer than $2^{32} - 1$ octets long. - -You can test the implementation of CCM with the following function. - -\index{ccm\_test()} -\begin{verbatim} -int ccm_test(void); -\end{verbatim} - -This will return \textbf{CRYPT\_OK} if the CCM routine passes known test vectors. It requires AES or Rijndael to be registered previously, otherwise it will -return \textbf{CRYPT\_NOP}. - -\subsubsection{CCM Example} -The following is a sample of how to call CCM. - -\begin{small} -\begin{verbatim} -#include -int main(void) -{ - unsigned char key[16], nonce[12], pt[32], ct[32], - tag[16], tagcp[16]; - unsigned long taglen; - int err; - - /* register cipher */ - register_cipher(&aes_desc); - - /* somehow fill key, nonce, pt */ - - /* encrypt it */ - taglen = sizeof(tag); - if ((err = - ccm_memory(find_cipher("aes"), - key, 16, /* 128-bit key */ - NULL, /* not prescheduled */ - nonce, 12, /* 96-bit nonce */ - NULL, 0, /* no header */ - pt, 32, /* 32-byte plaintext */ - ct, /* ciphertext */ - tag, &taglen, - CCM_ENCRYPT)) != CRYPT_OK) { - printf("ccm_memory error %s\n", error_to_string(err)); - return -1; - } - /* ct[0..31] and tag[0..15] now hold the output */ - - /* decrypt it */ - taglen = sizeof(tagcp); - if ((err = - ccm_memory(find_cipher("aes"), - key, 16, /* 128-bit key */ - NULL, /* not prescheduled */ - nonce, 12, /* 96-bit nonce */ - NULL, 0, /* no header */ - ct, 32, /* 32-byte ciphertext */ - pt, /* plaintext */ - tagcp, &taglen, - CCM_DECRYPT)) != CRYPT_OK) { - printf("ccm_memory error %s\n", error_to_string(err)); - return -1; - } - - /* now pt[0..31] should hold the original plaintext, - tagcp[0..15] and tag[0..15] should have the same contents */ -} -\end{verbatim} -\end{small} - -\subsection{GCM Mode} -Galois counter mode is an IEEE proposal for authenticated encryption (also it is a planned NIST standard). Like EAX and OCB mode, it can be used in a streaming capacity -however, unlike EAX it cannot accept \textit{additional authentication data} (meta--data) after plaintext has been processed. This mode also only works with -block ciphers with a 16--byte block. - -A GCM stream is meant to be processed in three modes, one after another. First, the initial vector (per session) data is processed. This should be -unique to every session. Next, the the optional additional authentication data is processed, and finally the plaintext (or ciphertext depending on the direction). - -\subsubsection{Initialization} -To initialize the GCM context with a secret key call the following function. - -\index{gcm\_init()} -\begin{verbatim} -int gcm_init( gcm_state *gcm, - int cipher, - const unsigned char *key, - int keylen); -\end{verbatim} -This initializes the GCM state \textit{gcm} for the given cipher indexed by \textit{cipher}, with a secret key \textit{key} of length \textit{keylen} octets. The cipher -chosen must have a 16--byte block size (e.g., AES). - -\subsubsection{Initial Vector} -After the state has been initialized (or reset) the next step is to add the session (or packet) initial vector. It should be unique per packet encrypted. - -\index{gcm\_add\_iv()} -\begin{verbatim} -int gcm_add_iv( gcm_state *gcm, - const unsigned char *IV, - unsigned long IVlen); -\end{verbatim} -This adds the initial vector octets from \textit{IV} of length \textit{IVlen} to the GCM state \textit{gcm}. You can call this function as many times as required -to process the entire IV. - -Note: the GCM protocols provides a \textit{shortcut} for 12--byte IVs where no pre-processing is to be done. If you want to minimize per packet latency it is ideal -to only use 12--byte IVs. You can just increment it like a counter for each packet. - -\subsubsection{Additional Authentication Data} -After the entire IV has been processed, the additional authentication data can be processed. Unlike the IV, a packet/session does not require additional -authentication data (AAD) for security. The AAD is meant to be used as side--channel data you want to be authenticated with the packet. Note: once -you begin adding AAD to the GCM state you cannot return to adding IV data until the state has been reset. - -\index{gcm\_add\_aad()} -\begin{verbatim} -int gcm_add_aad( gcm_state *gcm, - const unsigned char *adata, - unsigned long adatalen); -\end{verbatim} -This adds the additional authentication data \textit{adata} of length \textit{adatalen} to the GCM state \textit{gcm}. - -\subsubsection{Plaintext Processing} -After the AAD has been processed, the plaintext (or ciphertext depending on the direction) can be processed. - -\index{gcm\_process()} -\begin{verbatim} -int gcm_process( gcm_state *gcm, - unsigned char *pt, - unsigned long ptlen, - unsigned char *ct, - int direction); -\end{verbatim} -This processes message data where \textit{pt} is the plaintext and \textit{ct} is the ciphertext. The length of both are equal and stored in \textit{ptlen}. Depending on -the mode \textit{pt} is the input and \textit{ct} is the output (or vice versa). When \textit{direction} equals \textbf{GCM\_ENCRYPT} the plaintext is read, -encrypted and stored in the ciphertext buffer. When \textit{direction} equals \textbf{GCM\_DECRYPT} the opposite occurs. - -\subsubsection{State Termination} -To terminate a GCM state and retrieve the message authentication tag call the following function. - -\index{gcm\_done()} -\begin{verbatim} -int gcm_done( gcm_state *gcm, - unsigned char *tag, - unsigned long *taglen); -\end{verbatim} -This terminates the GCM state \textit{gcm} and stores the tag in \textit{tag} of length \textit{taglen} octets. - -\subsubsection{State Reset} -The call to gcm\_init() will perform considerable pre--computation (when \textbf{GCM\_TABLES} is defined) and if you're going to be dealing with a lot of packets -it is very costly to have to call it repeatedly. To aid in this endeavour, the reset function has been provided. - -\index{gcm\_reset()} -\begin{verbatim} -int gcm_reset(gcm_state *gcm); -\end{verbatim} - -This will reset the GCM state \textit{gcm} to the state that gcm\_init() left it. The user would then call gcm\_add\_iv(), gcm\_add\_aad(), etc. - -\subsubsection{One--Shot Packet} -To process a single packet under any given key the following helper function can be used. - -\index{gcm\_memory()} -\begin{verbatim} -int gcm_memory( - int cipher, - const unsigned char *key, - unsigned long keylen, - const unsigned char *IV, unsigned long IVlen, - const unsigned char *adata, unsigned long adatalen, - unsigned char *pt, unsigned long ptlen, - unsigned char *ct, - unsigned char *tag, unsigned long *taglen, - int direction); -\end{verbatim} - -This will initialize the GCM state with the given key, IV and AAD value then proceed to encrypt or decrypt the message text and store the final -message tag. The definition of the variables is the same as it is for all the manual functions. - -If you are processing many packets under the same key you shouldn't use this function as it invokes the pre--computation with each call. - -\subsubsection{Example Usage} -The following is an example usage of how to use GCM over multiple packets with a shared secret key. - -\begin{small} -\begin{verbatim} -#include - -int send_packet(const unsigned char *pt, unsigned long ptlen, - const unsigned char *iv, unsigned long ivlen, - const unsigned char *aad, unsigned long aadlen, - gcm_state *gcm) -{ - int err; - unsigned long taglen; - unsigned char tag[16]; - - /* reset the state */ - if ((err = gcm_reset(gcm)) != CRYPT_OK) { - return err; - } - - /* Add the IV */ - if ((err = gcm_add_iv(gcm, iv, ivlen)) != CRYPT_OK) { - return err; - } - - /* Add the AAD (note: aad can be NULL if aadlen == 0) */ - if ((err = gcm_add_aad(gcm, aad, aadlen)) != CRYPT_OK) { - return err; - } - - /* process the plaintext */ - if ((err = - gcm_process(gcm, pt, ptlen, pt, GCM_ENCRYPT)) != CRYPT_OK) { - return err; - } - - /* Finish up and get the MAC tag */ - taglen = sizeof(tag); - if ((err = gcm_done(gcm, tag, &taglen)) != CRYPT_OK) { - return err; - } - - /* ... send a header describing the lengths ... */ - - /* depending on the protocol and how IV is - * generated you may have to send it too... */ - send(socket, iv, ivlen, 0); - - /* send the aad */ - send(socket, aad, aadlen, 0); - - /* send the ciphertext */ - send(socket, pt, ptlen, 0); - - /* send the tag */ - send(socket, tag, taglen, 0); - - return CRYPT_OK; -} - -int main(void) -{ - gcm_state gcm; - unsigned char key[16], IV[12], pt[PACKET_SIZE]; - int err, x; - unsigned long ptlen; - - /* somehow fill key/IV with random values */ - - /* register AES */ - register_cipher(&aes_desc); - - /* init the GCM state */ - if ((err = - gcm_init(&gcm, find_cipher("aes"), key, 16)) != CRYPT_OK) { - whine_and_pout(err); - } - - /* handle us some packets */ - for (;;) { - ptlen = make_packet_we_want_to_send(pt); - - /* use IV as counter (12 byte counter) */ - for (x = 11; x >= 0; x--) { - if (++IV[x]) { - break; - } - } - - if ((err = send_packet(pt, ptlen, iv, 12, NULL, 0, &gcm)) - != CRYPT_OK) { - whine_and_pout(err); - } - } - return EXIT_SUCCESS; -} -\end{verbatim} -\end{small} - -\chapter{One-Way Cryptographic Hash Functions} -\mysection{Core Functions} -Like the ciphers, there are hash core functions and a universal data type to hold the hash state called \textit{hash\_state}. To initialize hash -XXX (where XXX is the name) call: -\index{Hash Functions} -\begin{verbatim} -void XXX_init(hash_state *md); -\end{verbatim} - -This simply sets up the hash to the default state governed by the specifications of the hash. To add data to the message being hashed call: -\begin{verbatim} -int XXX_process( hash_state *md, - const unsigned char *in, - unsigned long inlen); -\end{verbatim} -Essentially all hash messages are virtually infinitely\footnote{Most hashes are limited to $2^{64}$ bits or 2,305,843,009,213,693,952 bytes.} long message which -are buffered. The data can be passed in any sized chunks as long as the order of the bytes are the same the message digest (hash output) will be the same. For example, -this means that: -\begin{verbatim} -md5_process(&md, "hello ", 6); -md5_process(&md, "world", 5); -\end{verbatim} -Will produce the same message digest as the single call: -\index{Message Digest} -\begin{verbatim} -md5_process(&md, "hello world", 11); -\end{verbatim} - -To finally get the message digest (the hash) call: -\begin{verbatim} -int XXX_done( hash_state *md, - unsigned char *out); -\end{verbatim} - -This function will finish up the hash and store the result in the \textit{out} array. You must ensure that \textit{out} is long -enough for the hash in question. Often hashes are used to get keys for symmetric ciphers so the \textit{XXX\_done()} functions -will wipe the \textit{md} variable before returning automatically. - -To test a hash function call: -\begin{verbatim} -int XXX_test(void); -\end{verbatim} - -This will return {\bf CRYPT\_OK} if the hash matches the test vectors, otherwise it returns an error code. An -example snippet that hashes a message with md5 is given below. -\begin{small} -\begin{verbatim} -#include -int main(void) -{ - hash_state md; - unsigned char *in = "hello world", out[16]; - - /* setup the hash */ - md5_init(&md); - - /* add the message */ - md5_process(&md, in, strlen(in)); - - /* get the hash in out[0..15] */ - md5_done(&md, out); - - return 0; -} -\end{verbatim} -\end{small} - -\mysection{Hash Descriptors} -Like the set of ciphers, the set of hashes have descriptors as well. They are stored in an array called \textit{hash\_descriptor} and -are defined by: -\begin{verbatim} -struct _hash_descriptor { - char *name; - - unsigned long hashsize; /* digest output size in bytes */ - unsigned long blocksize; /* the block size the hash uses */ - - void (*init) (hash_state *hash); - - int (*process)( hash_state *hash, - const unsigned char *in, - unsigned long inlen); - - int (*done) (hash_state *hash, unsigned char *out); - - int (*test) (void); -}; -\end{verbatim} - -\index{find\_hash()} -The \textit{name} member is the name of the hash function (all lowercase). The \textit{hashsize} member is the size of the digest output -in bytes, while \textit{blocksize} is the size of blocks the hash expects to the compression function. Technically, this detail is not important -for high level developers but is useful to know for performance reasons. - -The \textit{init} member initializes the hash, \textit{process} passes data through the hash, \textit{done} terminates the hash and retrieves the -digest. The \textit{test} member tests the hash against the specified test vectors. - -There is a function to search the array as well called \textit{int find\_hash(char *name)}. It returns -1 if the hash is not found, otherwise, the -position in the descriptor table of the hash. - -In addition, there is also find\_hash\_oid() which finds a hash by the ASN.1 OBJECT IDENTIFIER string. -\index{find\_hash\_oid()} -\begin{verbatim} -int find_hash_oid(const unsigned long *ID, unsigned long IDlen); -\end{verbatim} - -You can use the table to indirectly call a hash function that is chosen at run-time. For example: -\begin{small} -\begin{verbatim} -#include -int main(void) -{ - unsigned char buffer[100], hash[MAXBLOCKSIZE]; - int idx, x; - hash_state md; - - /* register hashes .... */ - if (register_hash(&md5_desc) == -1) { - printf("Error registering MD5.\n"); - return -1; - } - - /* register other hashes ... */ - - /* prompt for name and strip newline */ - printf("Enter hash name: \n"); - fgets(buffer, sizeof(buffer), stdin); - buffer[strlen(buffer) - 1] = 0; - - /* get hash index */ - idx = find_hash(buffer); - if (idx == -1) { - printf("Invalid hash name!\n"); - return -1; - } - - /* hash input until blank line */ - hash_descriptor[idx].init(&md); - while (fgets(buffer, sizeof(buffer), stdin) != NULL) - hash_descriptor[idx].process(&md, buffer, strlen(buffer)); - hash_descriptor[idx].done(&md, hash); - - /* dump to screen */ - for (x = 0; x < hash_descriptor[idx].hashsize; x++) - printf("%02x ", hash[x]); - printf("\n"); - return 0; -} -\end{verbatim} -\end{small} - -Note the usage of \textbf{MAXBLOCKSIZE}. In LibTomCrypt, no symmetric block, key or hash digest is larger than \textbf{MAXBLOCKSIZE} in -length. This provides a simple size you can set your automatic arrays to that will not get overrun. - -There are three helper functions to make working with hashes easier. The first is a function to hash a buffer, and produce the digest in a single -function call. - -\index{hash\_memory()} -\begin{verbatim} -int hash_memory( int hash, - const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen); -\end{verbatim} - -This will hash the data pointed to by \textit{in} of length \textit{inlen}. The hash used is indexed by the \textit{hash} parameter. The message -digest is stored in \textit{out}, and the \textit{outlen} parameter is updated to hold the message digest size. - -The next helper function allows for the hashing of a file based on a file name. -\index{hash\_file()} -\begin{verbatim} -int hash_file( int hash, - const char *fname, - unsigned char *out, - unsigned long *outlen); -\end{verbatim} - -This will hash the file named by \textit{fname} using the hash indexed by \textit{hash}. The file named in this function call must be readable by the -user owning the process performing the request. This function can be omitted by the \textbf{LTC\_NO\_FILE} define, which forces it to return \textbf{CRYPT\_NOP} -when it is called. The message digest is stored in \textit{out}, and the \textit{outlen} parameter is updated to hold the message digest size. - -\index{hash\_filehandle()} -\begin{verbatim} -int hash_filehandle( int hash, - FILE *in, - unsigned char *out, - unsigned long *outlen); -\end{verbatim} - -This will hash the file identified by the handle \textit{in} using the hash indexed by \textit{hash}. This will begin hashing from the current file pointer position, and -will not rewind the file pointer when finished. This function can be omitted by the \textbf{LTC\_NO\_FILE} define, which forces it to return \textbf{CRYPT\_NOP} -when it is called. The message digest is stored in \textit{out}, and the \textit{outlen} parameter is updated to hold the message digest size. - -To perform the above hash with md5 the following code could be used: -\begin{small} -\begin{verbatim} -#include -int main(void) -{ - int idx, err; - unsigned long len; - unsigned char out[MAXBLOCKSIZE]; - - /* register the hash */ - if (register_hash(&md5_desc) == -1) { - printf("Error registering MD5.\n"); - return -1; - } - - /* get the index of the hash */ - idx = find_hash("md5"); - - /* call the hash */ - len = sizeof(out); - if ((err = - hash_memory(idx, "hello world", 11, out, &len)) != CRYPT_OK) { - printf("Error hashing data: %s\n", error_to_string(err)); - return -1; - } - return 0; -} -\end{verbatim} -\end{small} - -\subsection{Hash Registration} -Similar to the cipher descriptor table you must register your hash algorithms before you can use them. These functions -work exactly like those of the cipher registration code. The functions are: -\index{register\_hash()} \index{unregister\_hash()} -\begin{verbatim} -int register_hash(const struct _hash_descriptor *hash); - -int unregister_hash(const struct _hash_descriptor *hash); -\end{verbatim} - -The following hashes are provided as of this release within the LibTomCrypt library: -\index{Hash descriptor table} - -\begin{figure}[here] -\begin{center} -\begin{tabular}{|c|c|c|} - \hline \textbf{Name} & \textbf{Descriptor Name} & \textbf{Size of Message Digest (bytes)} \\ - \hline WHIRLPOOL & whirlpool\_desc & 64 \\ - \hline SHA-512 & sha512\_desc & 64 \\ - \hline SHA-384 & sha384\_desc & 48 \\ - \hline RIPEMD-320 & rmd160\_desc & 40 \\ - \hline SHA-256 & sha256\_desc & 32 \\ - \hline RIPEMD-256 & rmd160\_desc & 32 \\ - \hline SHA-224 & sha224\_desc & 28 \\ - \hline TIGER-192 & tiger\_desc & 24 \\ - \hline SHA-1 & sha1\_desc & 20 \\ - \hline RIPEMD-160 & rmd160\_desc & 20 \\ - \hline RIPEMD-128 & rmd128\_desc & 16 \\ - \hline MD5 & md5\_desc & 16 \\ - \hline MD4 & md4\_desc & 16 \\ - \hline MD2 & md2\_desc & 16 \\ - \hline -\end{tabular} -\end{center} -\caption{Built--In Software Hashes} -\end{figure} -\vfil - -\mysection{Cipher Hash Construction} -\index{Cipher Hash Construction} -An addition to the suite of hash functions is the \textit{Cipher Hash Construction} or \textit{CHC} mode. In this mode -applicable block ciphers (such as AES) can be turned into hash functions that other LTC functions can use. In -particular this allows a cryptosystem to be designed using very few moving parts. - -In order to use the CHC system the developer will have to take a few extra steps. First the \textit{chc\_desc} hash -descriptor must be registered with register\_hash(). At this point the CHC hash cannot be used to hash -data. While it is in the hash system you still have to tell the CHC code which cipher to use. This is accomplished -via the chc\_register() function. - -\index{chc\_register()} -\begin{verbatim} -int chc_register(int cipher); -\end{verbatim} - -A cipher has to be registered with CHC (and also in the cipher descriptor tables with -register\_cipher()). The chc\_register() function will bind a cipher to the CHC system. Only one cipher can -be bound to the CHC hash at a time. There are additional requirements for the system to work. - -\begin{enumerate} - \item The cipher must have a block size greater than 64--bits. - \item The cipher must allow an input key the size of the block size. -\end{enumerate} - -Example of using CHC with the AES block cipher. - -\begin{verbatim} -#include -int main(void) -{ - int err; - - /* register cipher and hash */ - if (register_cipher(&aes_enc_desc) == -1) { - printf("Could not register cipher\n"); - return EXIT_FAILURE; - } - if (register_hash(&chc_desc) == -1) { - printf("Could not register hash\n"); - return EXIT_FAILURE; - } - - /* start chc with AES */ - if ((err = chc_register(find_cipher("aes"))) != CRYPT_OK) { - printf("Error binding AES to CHC: %s\n", - error_to_string(err)); - } - - /* now you can use chc_hash in any LTC function - * [aside from pkcs...] */ -} -\end{verbatim} - - -\mysection{Notice} -It is highly recommended that you \textbf{not} use the MD4 or MD5 hashes for the purposes of digital signatures or authentication codes. -These hashes are provided for completeness and they still can be used for the purposes of password hashing or one-way accumulators -(e.g. Yarrow). - -The other hashes such as the SHA-1, SHA-2 (that includes SHA-512, SHA-384 and SHA-256) and TIGER-192 are still considered secure -for all purposes you would normally use a hash for. - -\chapter{Message Authentication Codes} -\mysection{HMAC Protocol} -Thanks to Dobes Vandermeer, the library now includes support for hash based message authentication codes, or HMAC for short. An HMAC -of a message is a keyed authentication code that only the owner of a private symmetric key will be able to verify. The purpose is -to allow an owner of a private symmetric key to produce an HMAC on a message then later verify if it is correct. Any impostor or -eavesdropper will not be able to verify the authenticity of a message. - -The HMAC support works much like the normal hash functions except that the initialization routine requires you to pass a key -and its length. The key is much like a key you would pass to a cipher. That is, it is simply an array of octets stored in -unsigned characters. The initialization routine is: -\index{hmac\_init()} -\begin{verbatim} -int hmac_init( hmac_state *hmac, - int hash, - const unsigned char *key, - unsigned long keylen); -\end{verbatim} -The \textit{hmac} parameter is the state for the HMAC code. The \textit{hash} parameter is the index into the descriptor table of the hash you want -to use to authenticate the message. The \textit{key} parameter is the pointer to the array of chars that make up the key. The \textit{keylen} parameter is the -length (in octets) of the key you want to use to authenticate the message. To send octets of a message through the HMAC system you must use the following function: -\index{hmac\_process()} -\begin{verbatim} -int hmac_process( hmac_state *hmac, - const unsigned char *in, - unsigned long inlen); -\end{verbatim} -\textit{hmac} is the HMAC state you are working with. \textit{in} is the array of octets to send into the HMAC process. \textit{inlen} is the -number of octets to process. Like the hash process routines, you can send the data in arbitrarily sized chunks. When you -are finished with the HMAC process you must call the following function to get the HMAC code: -\index{hmac\_done()} -\begin{verbatim} -int hmac_done( hmac_state *hmac, - unsigned char *out, - unsigned long *outlen); -\end{verbatim} -The \textit{hmac} parameter is the HMAC state you are working with. The \textit{out} parameter is the array of octets where the HMAC code should be stored. -You must set \textit{outlen} to the size of the destination buffer before calling this function. It is updated with the length of the HMAC code -produced (depending on which hash was picked). If \textit{outlen} is less than the size of the message digest (and ultimately -the HMAC code) then the HMAC code is truncated as per FIPS-198 specifications (e.g. take the first \textit{outlen} bytes). - -There are two utility functions provided to make using HMACs easier to do. They accept the key and information about the -message (file pointer, address in memory), and produce the HMAC result in one shot. These are useful if you want to avoid -calling the three step process yourself. - -\index{hmac\_memory()} -\begin{verbatim} -int hmac_memory( - int hash, - const unsigned char *key, unsigned long keylen, - const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen); -\end{verbatim} -This will produce an HMAC code for the array of octets in \textit{in} of length \textit{inlen}. The index into the hash descriptor -table must be provided in \textit{hash}. It uses the key from \textit{key} with a key length of \textit{keylen}. -The result is stored in the array of octets \textit{out} and the length in \textit{outlen}. The value of \textit{outlen} must be set -to the size of the destination buffer before calling this function. Similarly for files there is the following function: -\index{hmac\_file()} -\begin{verbatim} -int hmac_file( - int hash, - const char *fname, - const unsigned char *key, unsigned long keylen, - unsigned char *out, unsigned long *outlen); -\end{verbatim} -\textit{hash} is the index into the hash descriptor table of the hash you want to use. \textit{fname} is the filename to process. -\textit{key} is the array of octets to use as the key of length \textit{keylen}. \textit{out} is the array of octets where the -result should be stored. - -To test if the HMAC code is working there is the following function: -\index{hmac\_test()} -\begin{verbatim} -int hmac_test(void); -\end{verbatim} -Which returns {\bf CRYPT\_OK} if the code passes otherwise it returns an error code. Some example code for using the -HMAC system is given below. - -\begin{small} -\begin{verbatim} -#include -int main(void) -{ - int idx, err; - hmac_state hmac; - unsigned char key[16], dst[MAXBLOCKSIZE]; - unsigned long dstlen; - - /* register SHA-1 */ - if (register_hash(&sha1_desc) == -1) { - printf("Error registering SHA1\n"); - return -1; - } - - /* get index of SHA1 in hash descriptor table */ - idx = find_hash("sha1"); - - /* we would make up our symmetric key in "key[]" here */ - - /* start the HMAC */ - if ((err = hmac_init(&hmac, idx, key, 16)) != CRYPT_OK) { - printf("Error setting up hmac: %s\n", error_to_string(err)); - return -1; - } - - /* process a few octets */ - if((err = hmac_process(&hmac, "hello", 5) != CRYPT_OK) { - printf("Error processing hmac: %s\n", error_to_string(err)); - return -1; - } - - /* get result (presumably to use it somehow...) */ - dstlen = sizeof(dst); - if ((err = hmac_done(&hmac, dst, &dstlen)) != CRYPT_OK) { - printf("Error finishing hmac: %s\n", error_to_string(err)); - return -1; - } - printf("The hmac is %lu bytes long\n", dstlen); - - /* return */ - return 0; -} -\end{verbatim} -\end{small} - -\mysection{OMAC Support} -\index{OMAC} \index{CMAC} -OMAC\footnote{\url{http://crypt.cis.ibaraki.ac.jp/omac/omac.html}}, which stands for \textit{One-Key CBC MAC} is an -algorithm which produces a Message Authentication Code (MAC) using only a block cipher such as AES. Note: OMAC has been standardized as -CMAC within NIST, for the purposes of this library OMAC and CMAC are synonymous. From an API standpoint, the OMAC routines work much like the -HMAC routines. Instead, in this case a cipher is used instead of a hash. - -To start an OMAC state you call -\index{omac\_init()} -\begin{verbatim} -int omac_init( omac_state *omac, - int cipher, - const unsigned char *key, - unsigned long keylen); -\end{verbatim} -The \textit{omac} parameter is the state for the OMAC algorithm. The \textit{cipher} parameter is the index into the cipher\_descriptor table -of the cipher\footnote{The cipher must have a 64 or 128 bit block size. Such as CAST5, Blowfish, DES, AES, Twofish, etc.} you -wish to use. The \textit{key} and \textit{keylen} parameters are the keys used to authenticate the data. - -To send data through the algorithm call -\index{omac\_process()} -\begin{verbatim} -int omac_process( omac_state *state, - const unsigned char *in, - unsigned long inlen); -\end{verbatim} -This will send \textit{inlen} bytes from \textit{in} through the active OMAC state \textit{state}. Returns \textbf{CRYPT\_OK} if the -function succeeds. The function is not sensitive to the granularity of the data. For example, - -\begin{verbatim} -omac_process(&mystate, "hello", 5); -omac_process(&mystate, " world", 6); -\end{verbatim} - -Would produce the same result as, - -\begin{verbatim} -omac_process(&mystate, "hello world", 11); -\end{verbatim} - -When you are done processing the message you can call the following to compute the message tag. - -\index{omac\_done()} -\begin{verbatim} -int omac_done( omac_state *state, - unsigned char *out, - unsigned long *outlen); -\end{verbatim} -Which will terminate the OMAC and output the \textit{tag} (MAC) to \textit{out}. Note that unlike the HMAC and other code -\textit{outlen} can be smaller than the default MAC size (for instance AES would make a 16-byte tag). Part of the OMAC -specification states that the output may be truncated. So if you pass in $outlen = 5$ and use AES as your cipher than -the output MAC code will only be five bytes long. If \textit{outlen} is larger than the default size it is set to the default -size to show how many bytes were actually used. - -Similar to the HMAC code the file and memory functions are also provided. To OMAC a buffer of memory in one shot use the -following function. - -\index{omac\_memory()} -\begin{verbatim} -int omac_memory( - int cipher, - const unsigned char *key, unsigned long keylen, - const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen); -\end{verbatim} -This will compute the OMAC of \textit{inlen} bytes of \textit{in} using the key \textit{key} of length \textit{keylen} bytes and the cipher -specified by the \textit{cipher}'th entry in the cipher\_descriptor table. It will store the MAC in \textit{out} with the same -rules as omac\_done. - -To OMAC a file use -\index{omac\_file()} -\begin{verbatim} -int omac_file( - int cipher, - const unsigned char *key, unsigned long keylen, - const char *filename, - unsigned char *out, unsigned long *outlen); -\end{verbatim} - -Which will OMAC the entire contents of the file specified by \textit{filename} using the key \textit{key} of length \textit{keylen} bytes -and the cipher specified by the \textit{cipher}'th entry in the cipher\_descriptor table. It will store the MAC in \textit{out} with -the same rules as omac\_done. - -To test if the OMAC code is working there is the following function: -\index{omac\_test()} -\begin{verbatim} -int omac_test(void); -\end{verbatim} -Which returns {\bf CRYPT\_OK} if the code passes otherwise it returns an error code. Some example code for using the -OMAC system is given below. - -\begin{small} -\begin{verbatim} -#include -int main(void) -{ - int idx, err; - omac_state omac; - unsigned char key[16], dst[MAXBLOCKSIZE]; - unsigned long dstlen; - - /* register Rijndael */ - if (register_cipher(&rijndael_desc) == -1) { - printf("Error registering Rijndael\n"); - return -1; - } - - /* get index of Rijndael in cipher descriptor table */ - idx = find_cipher("rijndael"); - - /* we would make up our symmetric key in "key[]" here */ - - /* start the OMAC */ - if ((err = omac_init(&omac, idx, key, 16)) != CRYPT_OK) { - printf("Error setting up omac: %s\n", error_to_string(err)); - return -1; - } - - /* process a few octets */ - if((err = omac_process(&omac, "hello", 5) != CRYPT_OK) { - printf("Error processing omac: %s\n", error_to_string(err)); - return -1; - } - - /* get result (presumably to use it somehow...) */ - dstlen = sizeof(dst); - if ((err = omac_done(&omac, dst, &dstlen)) != CRYPT_OK) { - printf("Error finishing omac: %s\n", error_to_string(err)); - return -1; - } - printf("The omac is %lu bytes long\n", dstlen); - - /* return */ - return 0; -} -\end{verbatim} -\end{small} - -\mysection{PMAC Support} -The PMAC\footnote{J.Black, P.Rogaway, \textit{A Block--Cipher Mode of Operation for Parallelizable Message Authentication}} -protocol is another MAC algorithm that relies solely on a symmetric-key block cipher. It uses essentially the same -API as the provided OMAC code. - -A PMAC state is initialized with the following. - -\index{pmac\_init()} -\begin{verbatim} -int pmac_init( pmac_state *pmac, - int cipher, - const unsigned char *key, - unsigned long keylen); -\end{verbatim} -Which initializes the \textit{pmac} state with the given \textit{cipher} and \textit{key} of length \textit{keylen} bytes. The chosen cipher -must have a 64 or 128 bit block size (e.x. AES). - -To MAC data simply send it through the process function. - -\index{pmac\_process()} -\begin{verbatim} -int pmac_process( pmac_state *state, - const unsigned char *in, - unsigned long inlen); -\end{verbatim} -This will process \textit{inlen} bytes of \textit{in} in the given \textit{state}. The function is not sensitive to the granularity of the -data. For example, - -\begin{verbatim} -pmac_process(&mystate, "hello", 5); -pmac_process(&mystate, " world", 6); -\end{verbatim} - -Would produce the same result as, - -\begin{verbatim} -pmac_process(&mystate, "hello world", 11); -\end{verbatim} - -When a complete message has been processed the following function can be called to compute the message tag. - -\index{pmac\_done()} -\begin{verbatim} -int pmac_done( pmac_state *state, - unsigned char *out, - unsigned long *outlen); -\end{verbatim} -This will store up to \textit{outlen} bytes of the tag for the given \textit{state} into \textit{out}. Note that if \textit{outlen} is larger -than the size of the tag it is set to the amount of bytes stored in \textit{out}. - -Similar to the OMAC code the file and memory functions are also provided. To PMAC a buffer of memory in one shot use the -following function. - -\index{pmac\_memory()} -\begin{verbatim} -int pmac_memory( - int cipher, - const unsigned char *key, unsigned long keylen, - const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen); -\end{verbatim} -This will compute the PMAC of \textit{msglen} bytes of \textit{msg} using the key \textit{key} of length \textit{keylen} bytes, and the cipher -specified by the \textit{cipher}'th entry in the cipher\_descriptor table. It will store the MAC in \textit{out} with the same -rules as pmac\_done(). - -To PMAC a file use -\index{pmac\_file()} -\begin{verbatim} -int pmac_file( - int cipher, - const unsigned char *key, unsigned long keylen, - const char *filename, - unsigned char *out, unsigned long *outlen); -\end{verbatim} - -Which will PMAC the entire contents of the file specified by \textit{filename} using the key \textit{key} of length \textit{keylen} bytes, -and the cipher specified by the \textit{cipher}'th entry in the cipher\_descriptor table. It will store the MAC in \textit{out} with -the same rules as pmac\_done(). - -To test if the PMAC code is working there is the following function: -\index{pmac\_test()} -\begin{verbatim} -int pmac_test(void); -\end{verbatim} -Which returns {\bf CRYPT\_OK} if the code passes otherwise it returns an error code. - -\mysection{Pelican MAC} -Pelican MAC is a new (experimental) MAC by the AES team that uses four rounds of AES as a \textit{mixing function}. It achieves a very high -rate of processing and is potentially very secure. It requires AES to be enabled to function. You do not have to register\_cipher() AES first though -as it calls AES directly. - -\index{pelican\_init()} -\begin{verbatim} -int pelican_init( pelican_state *pelmac, - const unsigned char *key, - unsigned long keylen); -\end{verbatim} -This will initialize the Pelican state with the given AES key. Once this has been done you can begin processing data. - -\index{pelican\_process()} -\begin{verbatim} -int pelican_process( pelican_state *pelmac, - const unsigned char *in, - unsigned long inlen); -\end{verbatim} -This will process \textit{inlen} bytes of \textit{in} through the Pelican MAC. It's best that you pass in multiples of 16 bytes as it makes the -routine more efficient but you may pass in any length of text. You can call this function as many times as required to process -an entire message. - -\index{pelican\_done()} -\begin{verbatim} -int pelican_done(pelican_state *pelmac, unsigned char *out); -\end{verbatim} -This terminates a Pelican MAC and writes the 16--octet tag to \textit{out}. - -\subsection{Example} - -\begin{verbatim} -#include -int main(void) -{ - pelican_state pelstate; - unsigned char key[32], tag[16]; - int err; - - /* somehow initialize a key */ - - /* initialize pelican mac */ - if ((err = pelican_init(&pelstate, /* the state */ - key, /* user key */ - 32 /* key length in octets */ - )) != CRYPT_OK) { - printf("Error initializing Pelican: %s", - error_to_string(err)); - return EXIT_FAILURE; - } - - /* MAC some data */ - if ((err = pelican_process(&pelstate, /* the state */ - "hello world", /* data to mac */ - 11 /* length of data */ - )) != CRYPT_OK) { - printf("Error processing Pelican: %s", - error_to_string(err)); - return EXIT_FAILURE; - } - - /* Terminate the MAC */ - if ((err = pelican_done(&pelstate,/* the state */ - tag /* where to store the tag */ - )) != CRYPT_OK) { - printf("Error terminating Pelican: %s", - error_to_string(err)); - return EXIT_FAILURE; - } - - /* tag[0..15] has the MAC output now */ - - return EXIT_SUCCESS; -} -\end{verbatim} - -\mysection{XCBC-MAC} -As of LibTomCrypt v1.15, XCBC-MAC (RFC 3566) has been provided to support TLS encryption suites. Like OMAC, it computes a message authentication code -by using a cipher in CBC mode. It also uses a single key which it expands into the requisite three keys for the MAC function. A XCBC--MAC state is -initialized with the following function: - -\index{xcbc\_init()} -\begin{verbatim} -int xcbc_init( xcbc_state *xcbc, - int cipher, - const unsigned char *key, - unsigned long keylen); -\end{verbatim} - -This will initialize the XCBC--MAC state \textit{xcbc}, with the key specified in \textit{key} of length \textit{keylen} octets. The cipher indicated -by the \textit{cipher} index can be either a 64 or 128--bit block cipher. This will return \textbf{CRYPT\_OK} on success. - -\index{LTC\_XCBC\_PURE} -It is possible to use XCBC in a three key mode by OR'ing the value \textbf{LTC\_XCBC\_PURE} against the \textit{keylen} parameter. In this mode, the key is -interpretted as three keys. If the cipher has a block size of $n$ octets, the first key is then $keylen - 2n$ octets and is the encryption key. The next -$2n$ octets are the $K_1$ and $K_2$ padding keys (used on the last block). For example, to use AES--192 \textit{keylen} should be $24 + 2 \cdot 16 = 56$ octets. -The three keys are interpretted as if they were concatenated in the \textit{key} buffer. - - -To process data through XCBC--MAC use the following function: - -\index{xcbc\_process()} -\begin{verbatim} -int xcbc_process( xcbc_state *state, - const unsigned char *in, - unsigned long inlen); -\end{verbatim} - -This will add the message octets pointed to by \textit{in} of length \textit{inlen} to the XCBC--MAC state pointed to by \textit{state}. Like the other MAC functions, -the granularity of the input is not important but the order is. This will return \textbf{CRYPT\_OK} on success. - -To compute the MAC tag value use the following function: - -\index{xcbc\_done()} -\begin{verbatim} -int xcbc_done( xcbc_state *state, - unsigned char *out, - unsigned long *outlen); -\end{verbatim} - -This will retrieve the XCBC--MAC tag from the state pointed to by \textit{state}, and store it in the array pointed to by \textit{out}. The \textit{outlen} parameter -specifies the maximum size of the destination buffer, and is updated to hold the final size of the tag when the function returns. This will return \textbf{CRYPT\_OK} on success. - -Helper functions are provided to make parsing memory buffers and files easier. The following functions are provided: - -\index{xcbc\_memory()} -\begin{verbatim} -int xcbc_memory( - int cipher, - const unsigned char *key, unsigned long keylen, - const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen); -\end{verbatim} -This will compute the XCBC--MAC of \textit{msglen} bytes of \textit{msg}, using the key \textit{key} of length \textit{keylen} bytes, and the cipher -specified by the \textit{cipher}'th entry in the cipher\_descriptor table. It will store the MAC in \textit{out} with the same rules as xcbc\_done(). - -To xcbc a file use -\index{xcbc\_file()} -\begin{verbatim} -int xcbc_file( - int cipher, - const unsigned char *key, unsigned long keylen, - const char *filename, - unsigned char *out, unsigned long *outlen); -\end{verbatim} - -Which will XCBC--MAC the entire contents of the file specified by \textit{filename} using the key \textit{key} of length \textit{keylen} bytes, and the cipher -specified by the \textit{cipher}'th entry in the cipher\_descriptor table. It will store the MAC in \textit{out} with the same rules as xcbc\_done(). - - -To test XCBC--MAC for RFC 3566 compliance use the following function: - -\index{xcbc\_test()} -\begin{verbatim} -int xcbc_test(void); -\end{verbatim} - -This will return \textbf{CRYPT\_OK} on success. This requires the AES or Rijndael descriptor be previously registered, otherwise, it will return -\textbf{CRYPT\_NOP}. - -\mysection{F9--MAC} -The F9--MAC is yet another CBC--MAC variant proposed for the 3GPP standard. Originally specified to be used with the KASUMI block cipher, it can also be used -with other ciphers. For LibTomCrypt, the F9--MAC code can use any cipher. - -\subsection{Usage Notice} -F9--MAC differs slightly from the other MAC functions in that it requires the caller to perform the final message padding. The padding quite simply is a direction -bit followed by a 1 bit and enough zeros to make the message a multiple of the cipher block size. If the message is byte aligned, the padding takes on the form of -a single 0x40 or 0xC0 byte followed by enough 0x00 bytes to make the message proper multiple. - -If the user simply wants a MAC function (hint: use OMAC) padding with a single 0x40 byte should be sufficient for security purposes and still be reasonably compatible -with F9--MAC. - -\subsection{F9--MAC Functions} -A F9--MAC state is initialized with the following function: -\index{f9\_init()} -\begin{verbatim} -int f9_init( f9_state *f9, - int cipher, - const unsigned char *key, - unsigned long keylen); -\end{verbatim} - -This will initialize the F9--MAC state \textit{f9}, with the key specified in \textit{key} of length \textit{keylen} octets. The cipher indicated -by the \textit{cipher} index can be either a 64 or 128--bit block cipher. This will return \textbf{CRYPT\_OK} on success. - -To process data through F9--MAC use the following function: -\index{f9\_process()} -\begin{verbatim} -int f9_process( f9_state *state, - const unsigned char *in, - unsigned long inlen); -\end{verbatim} - -This will add the message octets pointed to by \textit{in} of length \textit{inlen} to the F9--MAC state pointed to by \textit{state}. Like the other MAC functions, -the granularity of the input is not important but the order is. This will return \textbf{CRYPT\_OK} on success. - -To compute the MAC tag value use the following function: - -\index{f9\_done()} -\begin{verbatim} -int f9_done( f9_state *state, - unsigned char *out, - unsigned long *outlen); -\end{verbatim} - -This will retrieve the F9--MAC tag from the state pointed to by \textit{state}, and store it in the array pointed to by \textit{out}. The \textit{outlen} parameter -specifies the maximum size of the destination buffer, and is updated to hold the final size of the tag when the function returns. This will return -\textbf{CRYPT\_OK} on success. - -Helper functions are provided to make parsing memory buffers and files easier. The following functions are provided: - -\index{f9\_memory()} -\begin{verbatim} -int f9_memory( - int cipher, - const unsigned char *key, unsigned long keylen, - const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen); -\end{verbatim} -This will compute the F9--MAC of \textit{msglen} bytes of \textit{msg}, using the key \textit{key} of length \textit{keylen} bytes, and the cipher -specified by the \textit{cipher}'th entry in the cipher\_descriptor table. It will store the MAC in \textit{out} with the same rules as f9\_done(). - -To F9--MAC a file use -\index{f9\_file()} -\begin{verbatim} -int f9_file( - int cipher, - const unsigned char *key, unsigned long keylen, - const char *filename, - unsigned char *out, unsigned long *outlen); -\end{verbatim} - -Which will F9--MAC the entire contents of the file specified by \textit{filename} using the key \textit{key} of length \textit{keylen} bytes, and the cipher -specified by the \textit{cipher}'th entry in the cipher\_descriptor table. It will store the MAC in \textit{out} with the same rules as f9\_done(). - - -To test f9--MAC for RFC 3566 compliance use the following function: - -\index{f9\_test()} -\begin{verbatim} -int f9_test(void); -\end{verbatim} - -This will return \textbf{CRYPT\_OK} on success. This requires the AES or Rijndael descriptor be previously registered, otherwise, it will return -\textbf{CRYPT\_NOP}. - -\chapter{Pseudo-Random Number Generators} -\mysection{Core Functions} -The library provides an array of core functions for Pseudo-Random Number Generators (PRNGs) as well. A cryptographic PRNG is -used to expand a shorter bit string into a longer bit string. PRNGs are used wherever random data is required such as Public Key (PK) -key generation. There is a universal structure called \textit{prng\_state}. To initialize a PRNG call: -\index{PRNG start} -\begin{verbatim} -int XXX_start(prng_state *prng); -\end{verbatim} - -This will setup the PRNG for future use and not seed it. In order for the PRNG to be cryptographically useful you must give it -entropy. Ideally you'd have some OS level source to tap like in UNIX. To add entropy to the PRNG call: -\index{PRNG add\_entropy} -\begin{verbatim} -int XXX_add_entropy(const unsigned char *in, - unsigned long inlen, - prng_state *prng); -\end{verbatim} -Which returns {\bf CRYPT\_OK} if the entropy was accepted. Once you think you have enough entropy you call another -function to put the entropy into action. -\index{PRNG ready} -\begin{verbatim} -int XXX_ready(prng_state *prng); -\end{verbatim} - -Which returns {\bf CRYPT\_OK} if it is ready. Finally to actually read bytes call: -\index{PRNG read} -\begin{verbatim} -unsigned long XXX_read(unsigned char *out, - unsigned long outlen, - prng_state *prng); -\end{verbatim} - -Which returns the number of bytes read from the PRNG. When you are finished with a PRNG state you call -the following. - -\index{PRNG done} -\begin{verbatim} -void XXX_done(prng_state *prng); -\end{verbatim} - -This will terminate a PRNG state and free any memory (if any) allocated. To export a PRNG state -so that you can later resume the PRNG call the following. - -\index{PRNG export} -\begin{verbatim} -int XXX_export(unsigned char *out, - unsigned long *outlen, - prng_state *prng); -\end{verbatim} - -This will write a \textit{PRNG state} to the buffer \textit{out} of length \textit{outlen} bytes. The idea of -the export is meant to be used as a \textit{seed file}. That is, when the program starts up there will not likely -be that much entropy available. To import a state to seed a PRNG call the following function. - -\index{PRNG import} -\begin{verbatim} -int XXX_import(const unsigned char *in, - unsigned long inlen, - prng_state *prng); -\end{verbatim} - -This will call the start and add\_entropy functions of the given PRNG. It will use the state in -\textit{in} of length \textit{inlen} as the initial seed. You must pass the same seed length as was exported -by the corresponding export function. - -Note that importing a state will not \textit{resume} the PRNG from where it left off. That is, if you export -a state, emit (say) 8 bytes and then import the previously exported state the next 8 bytes will not -specifically equal the 8 bytes you generated previously. - -When a program is first executed the normal course of operation is: - -\begin{enumerate} - \item Gather entropy from your sources for a given period of time or number of events. - \item Start, use your entropy via add\_entropy and ready the PRNG yourself. -\end{enumerate} - -When your program is finished you simply call the export function and save the state to a medium (disk, -flash memory, etc). The next time your application starts up you can detect the state, feed it to the -import function and go on your way. It is ideal that (as soon as possible) after start up you export a -fresh state. This helps in the case that the program aborts or the machine is powered down without -being given a chance to exit properly. - -Note that even if you have a state to import it is important to add new entropy to the state. However, -there is less pressure to do so. - -To test a PRNG for operational conformity call the following functions. - -\index{PRNG test} -\begin{verbatim} -int XXX_test(void); -\end{verbatim} - -This will return \textbf{CRYPT\_OK} if PRNG is operating properly. - -\subsection{Remarks} - -It is possible to be adding entropy and reading from a PRNG at the same time. For example, if you first seed the PRNG -and call ready() you can now read from it. You can also keep adding new entropy to it. The new entropy will not be used -in the PRNG until ready() is called again. This allows the PRNG to be used and re-seeded at the same time. No real error -checking is guaranteed to see if the entropy is sufficient, or if the PRNG is even in a ready state before reading. - -\subsection{Example} -Below is a simple snippet to read 10 bytes from Yarrow. It is important to note that this snippet is {\bf NOT} secure since -the entropy added is not random. - -\begin{verbatim} -#include -int main(void) -{ - prng_state prng; - unsigned char buf[10]; - int err; - - /* start it */ - if ((err = yarrow_start(&prng)) != CRYPT_OK) { - printf("Start error: %s\n", error_to_string(err)); - } - /* add entropy */ - if ((err = yarrow_add_entropy("hello world", 11, &prng)) - != CRYPT_OK) { - printf("Add_entropy error: %s\n", error_to_string(err)); - } - /* ready and read */ - if ((err = yarrow_ready(&prng)) != CRYPT_OK) { - printf("Ready error: %s\n", error_to_string(err)); - } - printf("Read %lu bytes from yarrow\n", - yarrow_read(buf, sizeof(buf), &prng)); - return 0; -} -\end{verbatim} - -\mysection{PRNG Descriptors} -\index{PRNG Descriptor} -PRNGs have descriptors that allow plugin driven functions to be created using PRNGs. The plugin descriptors are stored in the structure \textit{prng\_descriptor}. The -format of an element is: -\begin{verbatim} -struct _prng_descriptor { - char *name; - int export_size; /* size in bytes of exported state */ - - int (*start) (prng_state *); - - int (*add_entropy)(const unsigned char *, unsigned long, - prng_state *); - - int (*ready) (prng_state *); - - unsigned long (*read)(unsigned char *, unsigned long len, - prng_state *); - - void (*done)(prng_state *); - - int (*export)(unsigned char *, unsigned long *, prng_state *); - - int (*import)(const unsigned char *, unsigned long, prng_state *); - - int (*test)(void); -}; -\end{verbatim} - -To find a PRNG in the descriptor table the following function can be used: -\index{find\_prng()} -\begin{verbatim} -int find_prng(const char *name); -\end{verbatim} -This will search the PRNG descriptor table for the PRNG named \textit{name}. It will return -1 if the PRNG is not found, otherwise, it returns -the index into the descriptor table. - -Just like the ciphers and hashes, you must register your prng before you can use it. The two functions provided work exactly as those for the cipher registry functions. -They are the following: -\index{register\_prng()} \index{unregister\_prng()} -\begin{verbatim} -int register_prng(const struct _prng_descriptor *prng); -int unregister_prng(const struct _prng_descriptor *prng); -\end{verbatim} - -The register function will register the PRNG, and return the index into the table where it was placed (or -1 for error). It will avoid registering the same -descriptor twice, and will return the index of the current placement in the table if the caller attempts to register it more than once. The unregister function -will return \textbf{CRYPT\_OK} if the PRNG was found and removed. Otherwise, it returns \textbf{CRYPT\_ERROR}. - -\subsection{PRNGs Provided} -\begin{figure}[here] -\begin{center} -\begin{small} -\begin{tabular}{|c|c|l|} -\hline \textbf{Name} & \textbf{Descriptor} & \textbf{Usage} \\ -\hline Yarrow & yarrow\_desc & Fast short-term PRNG \\ -\hline Fortuna & fortuna\_desc & Fast long-term PRNG (recommended) \\ -\hline RC4 & rc4\_desc & Stream Cipher \\ -\hline SOBER-128 & sober128\_desc & Stream Cipher (also very fast PRNG) \\ -\hline -\end{tabular} -\end{small} -\end{center} -\caption{List of Provided PRNGs} -\end{figure} - -\subsubsection{Yarrow} -Yarrow is fast PRNG meant to collect an unspecified amount of entropy from sources -(keyboard, mouse, interrupts, etc), and produce an unbounded string of random bytes. - -\textit{Note:} This PRNG is still secure for most tasks but is no longer recommended. Users -should use Fortuna instead. - -\subsubsection{Fortuna} - -Fortuna is a fast attack tolerant and more thoroughly designed PRNG suitable for long term -usage. It is faster than the default implementation of Yarrow\footnote{Yarrow has been implemented -to work with most cipher and hash combos based on which you have chosen to build into the library.} while -providing more security. - -Fortuna is slightly less flexible than Yarrow in the sense that it only works with the AES block cipher -and SHA--256 hash function. Technically, Fortuna will work with any block cipher that accepts a 256--bit -key, and any hash that produces at least a 256--bit output. However, to make the implementation simpler -it has been fixed to those choices. - -Fortuna is more secure than Yarrow in the sense that attackers who learn parts of the entropy being -added to the PRNG learn far less about the state than that of Yarrow. Without getting into to many -details Fortuna has the ability to recover from state determination attacks where the attacker starts -to learn information from the PRNGs output about the internal state. Yarrow on the other hand, cannot -recover from that problem until new entropy is added to the pool and put to use through the ready() function. - -\subsubsection{RC4} - -RC4 is an old stream cipher that can also double duty as a PRNG in a pinch. You key RC4 by -calling add\_entropy(), and setup the key by calling ready(). You can only add up to 256 bytes via -add\_entropy(). - -When you read from RC4, the output is XOR'ed against your buffer you provide. In this manner, you can use rc4\_read() -as an encrypt (and decrypt) function. - -You really should not use RC4. This is not because RC4 is weak, (though biases are known to exist) but simply due to -the fact that faster alternatives exist. - -\subsubsection{SOBER-128} - -SOBER--128 is a stream cipher designed by the QUALCOMM Australia team. Like RC4, you key it by -calling add\_entropy(). There is no need to call ready() for this PRNG as it does not do anything. - -Note: this cipher has several oddities about how it operates. The first call to add\_entropy() sets the cipher's key. -Every other time call to the add\_entropy() function sets the cipher's IV variable. The IV mechanism allows you to -encrypt several messages with the same key, and not re--use the same key material. - -Unlike Yarrow and Fortuna, all of the entropy (and hence security) of this algorithm rests in the data -you pass it on the \textbf{first} call to add\_entropy(). All buffers sent to add\_entropy() must have a length -that is a multiple of four bytes. - -Like RC4, the output of SOBER--128 is XOR'ed against the buffer you provide it. In this manner, you can use -sober128\_read() as an encrypt (and decrypt) function. - -Since SOBER-128 has a fixed keying scheme, and is very fast (faster than RC4) the ideal usage of SOBER-128 is to -key it from the output of Fortuna (or Yarrow), and use it to encrypt messages. It is also ideal for -simulations which need a high quality (and fast) stream of bytes. - -\subsubsection{Example Usage} -\begin{small} -\begin{verbatim} -#include -int main(void) -{ - prng_state prng; - unsigned char buf[32]; - int err; - - if ((err = rc4_start(&prng)) != CRYPT_OK) { - printf("RC4 init error: %s\n", error_to_string(err)); - exit(-1); - } - - /* use "key" as the key */ - if ((err = rc4_add_entropy("key", 3, &prng)) != CRYPT_OK) { - printf("RC4 add entropy error: %s\n", error_to_string(err)); - exit(-1); - } - - /* setup RC4 for use */ - if ((err = rc4_ready(&prng)) != CRYPT_OK) { - printf("RC4 ready error: %s\n", error_to_string(err)); - exit(-1); - } - - /* encrypt buffer */ - strcpy(buf,"hello world"); - if (rc4_read(buf, 11, &prng) != 11) { - printf("RC4 read error\n"); - exit(-1); - } - return 0; -} -\end{verbatim} -\end{small} -To decrypt you have to do the exact same steps. - -\mysection{The Secure RNG} -\index{Secure RNG} -An RNG is related to a PRNG in many ways, except that it does not expand a smaller seed to get the data. They generate their random bits -by performing some computation on fresh input bits. Possibly the hardest thing to get correctly in a cryptosystem is the -PRNG. Computers are deterministic that try hard not to stray from pre--determined paths. This makes gathering entropy needed to seed a PRNG -a hard task. - -There is one small function that may help on certain platforms: -\index{rng\_get\_bytes()} -\begin{verbatim} -unsigned long rng_get_bytes( - unsigned char *buf, - unsigned long len, - void (*callback)(void)); -\end{verbatim} - -Which will try one of three methods of getting random data. The first is to open the popular \textit{/dev/random} device which -on most *NIX platforms provides cryptographic random bits\footnote{This device is available in Windows through the Cygwin compiler suite. It emulates \textit{/dev/random} via the Microsoft CSP.}. -The second method is to try the Microsoft Cryptographic Service Provider, and read the RNG. The third method is an ANSI C -clock drift method that is also somewhat popular but gives bits of lower entropy. The \textit{callback} parameter is a pointer to a function that returns void. It is -used when the slower ANSI C RNG must be used so the calling application can still work. This is useful since the ANSI C RNG has a throughput of roughly three -bytes a second. The callback pointer may be set to {\bf NULL} to avoid using it if you do not want to. The function returns the number of bytes actually read from -any RNG source. There is a function to help setup a PRNG as well: -\index{rng\_make\_prng()} -\begin{verbatim} -int rng_make_prng( int bits, - int wprng, - prng_state *prng, - void (*callback)(void)); -\end{verbatim} -This will try to initialize the prng with a state of at least \textit{bits} of entropy. The \textit{callback} parameter works much like -the callback in \textit{rng\_get\_bytes()}. It is highly recommended that you use this function to setup your PRNGs unless you have a -platform where the RNG does not work well. Example usage of this function is given below: - -\begin{small} -\begin{verbatim} -#include -int main(void) -{ - ecc_key mykey; - prng_state prng; - int err; - - /* register yarrow */ - if (register_prng(&yarrow_desc) == -1) { - printf("Error registering Yarrow\n"); - return -1; - } - - /* setup the PRNG */ - if ((err = rng_make_prng(128, find_prng("yarrow"), &prng, NULL)) - != CRYPT_OK) { - printf("Error setting up PRNG, %s\n", error_to_string(err)); - return -1; - } - - /* make a 192-bit ECC key */ - if ((err = ecc_make_key(&prng, find_prng("yarrow"), 24, &mykey)) - != CRYPT_OK) { - printf("Error making key: %s\n", error_to_string(err)); - return -1; - } - return 0; -} -\end{verbatim} -\end{small} - -\subsection{The Secure PRNG Interface} -It is possible to access the secure RNG through the PRNG interface, and in turn use it within dependent functions such -as the PK API. This simplifies the cryptosystem on platforms where the secure RNG is fast. The secure PRNG never -requires to be started, that is you need not call the start, add\_entropy, or ready functions. For example, consider -the previous example using this PRNG. - -\begin{small} -\begin{verbatim} -#include -int main(void) -{ - ecc_key mykey; - int err; - - /* register SPRNG */ - if (register_prng(&sprng_desc) == -1) { - printf("Error registering SPRNG\n"); - return -1; - } - - /* make a 192-bit ECC key */ - if ((err = ecc_make_key(NULL, find_prng("sprng"), 24, &mykey)) - != CRYPT_OK) { - printf("Error making key: %s\n", error_to_string(err)); - return -1; - } - return 0; -} -\end{verbatim} -\end{small} - -\chapter{RSA Public Key Cryptography} - -\mysection{Introduction} -RSA wrote the PKCS \#1 specifications which detail RSA Public Key Cryptography. In the specifications are -padding algorithms for encryption and signatures. The standard includes the \textit{v1.5} and \textit{v2.1} algorithms. -To simplify matters a little the v2.1 encryption and signature padding algorithms are called OAEP and PSS respectively. - -\mysection{PKCS \#1 Padding} -PKCS \#1 v1.5 padding is so simple that both signature and encryption padding are performed by the same function. Note: the -signature padding does \textbf{not} include the ASN.1 padding required. That is performed by the rsa\_sign\_hash\_ex() function -documented later on in this chapter. - -\subsection{PKCS \#1 v1.5 Encoding} -The following function performs PKCS \#1 v1.5 padding: -\index{pkcs\_1\_v1\_5\_encode()} -\begin{verbatim} -int pkcs_1_v1_5_encode( - const unsigned char *msg, - unsigned long msglen, - int block_type, - unsigned long modulus_bitlen, - prng_state *prng, - int prng_idx, - unsigned char *out, - unsigned long *outlen); -\end{verbatim} - -This will encode the message pointed to by \textit{msg} of length \textit{msglen} octets. The \textit{block\_type} parameter must be set to -\textbf{LTC\_PKCS\_1\_EME} to perform encryption padding. It must be set to \textbf{LTC\_PKCS\_1\_EMSA} to perform signature padding. The \textit{modulus\_bitlen} -parameter indicates the length of the modulus in bits. The padded data is stored in \textit{out} with a length of \textit{outlen} octets. The output will not be -longer than the modulus which helps allocate the correct output buffer size. - -Only encryption padding requires a PRNG. When performing signature padding the \textit{prng\_idx} parameter may be left to zero as it is not checked for validity. - -\subsection{PKCS \#1 v1.5 Decoding} -The following function performs PKCS \#1 v1.5 de--padding: -\index{pkcs\_1\_v1\_5\_decode()} -\begin{verbatim} -int pkcs_1_v1_5_decode( - const unsigned char *msg, - unsigned long msglen, - int block_type, - unsigned long modulus_bitlen, - unsigned char *out, - unsigned long *outlen, - int *is_valid); -\end{verbatim} -\index{LTC\_PKCS\_1\_EME} \index{LTC\_PKCS\_1\_EMSA} -This will remove the PKCS padding data pointed to by \textit{msg} of length \textit{msglen}. The decoded data is stored in \textit{out} of length -\textit{outlen}. If the padding is valid, a 1 is stored in \textit{is\_valid}, otherwise, a 0 is stored. The \textit{block\_type} parameter must be set to either -\textbf{LTC\_PKCS\_1\_EME} or \textbf{LTC\_PKCS\_1\_EMSA} depending on whether encryption or signature padding is being removed. - -\mysection{PKCS \#1 v2.1 Encryption} -PKCS \#1 RSA Encryption amounts to OAEP padding of the input message followed by the modular exponentiation. As far as this portion of -the library is concerned we are only dealing with th OAEP padding of the message. - -\subsection{OAEP Encoding} - -The following function performs PKCS \#1 v2.1 encryption padding: - -\index{pkcs\_1\_oaep\_encode()} -\begin{alltt} -int pkcs_1_oaep_encode( - const unsigned char *msg, - unsigned long msglen, - const unsigned char *lparam, - unsigned long lparamlen, - unsigned long modulus_bitlen, - prng_state *prng, - int prng_idx, - int hash_idx, - unsigned char *out, - unsigned long *outlen); -\end{alltt} - -This accepts \textit{msg} as input of length \textit{msglen} which will be OAEP padded. The \textit{lparam} variable is an additional system specific -tag that can be applied to the encoding. This is useful to identify which system encoded the message. If no variance is desired then -\textit{lparam} can be set to \textbf{NULL}. - -OAEP encoding requires the length of the modulus in bits in order to calculate the size of the output. This is passed as the parameter -\textit{modulus\_bitlen}. \textit{hash\_idx} is the index into the hash descriptor table of the hash desired. PKCS \#1 allows any hash to be -used but both the encoder and decoder must use the same hash in order for this to succeed. The size of hash output affects the maximum - sized input message. \textit{prng\_idx} and \textit{prng} are the random number generator arguments required to randomize the padding process. -The padded message is stored in \textit{out} along with the length in \textit{outlen}. - -If $h$ is the length of the hash and $m$ the length of the modulus (both in octets) then the maximum payload for \textit{msg} is -$m - 2h - 2$. For example, with a $1024$--bit RSA key and SHA--1 as the hash the maximum payload is $86$ bytes. - -Note that when the message is padded it still has not been RSA encrypted. You must pass the output of this function to -rsa\_exptmod() to encrypt it. - -\subsection{OAEP Decoding} - -\index{pkcs\_1\_oaep\_decode()} -\begin{alltt} -int pkcs_1_oaep_decode( - const unsigned char *msg, - unsigned long msglen, - const unsigned char *lparam, - unsigned long lparamlen, - unsigned long modulus_bitlen, - int hash_idx, - unsigned char *out, - unsigned long *outlen, - int *res); -\end{alltt} - -This function decodes an OAEP encoded message and outputs the original message that was passed to the OAEP encoder. \textit{msg} is the -output of pkcs\_1\_oaep\_encode() of length \textit{msglen}. \textit{lparam} is the same system variable passed to the OAEP encoder. If it does not -match what was used during encoding this function will not decode the packet. \textit{modulus\_bitlen} is the size of the RSA modulus in bits -and must match what was used during encoding. Similarly the \textit{hash\_idx} index into the hash descriptor table must match what was used -during encoding. - -If the function succeeds it decodes the OAEP encoded message into \textit{out} of length \textit{outlen} and stores a -$1$ in \textit{res}. If the packet is invalid it stores $0$ in \textit{res} and if the function fails for another reason -it returns an error code. - -\mysection{PKCS \#1 Digital Signatures} - -\subsection{PSS Encoding} -PSS encoding is the second half of the PKCS \#1 standard which is padding to be applied to messages that are signed. - -\index{pkcs\_1\_pss\_encode()} -\begin{alltt} -int pkcs_1_pss_encode( - const unsigned char *msghash, - unsigned long msghashlen, - unsigned long saltlen, - prng_state *prng, - int prng_idx, - int hash_idx, - unsigned long modulus_bitlen, - unsigned char *out, - unsigned long *outlen); -\end{alltt} - -This function assumes the message to be PSS encoded has previously been hashed. The input hash \textit{msghash} is of length -\textit{msghashlen}. PSS allows a variable length random salt (it can be zero length) to be introduced in the signature process. -\textit{hash\_idx} is the index into the hash descriptor table of the hash to use. \textit{prng\_idx} and \textit{prng} are the random -number generator information required for the salt. - -Similar to OAEP encoding \textit{modulus\_bitlen} is the size of the RSA modulus (in bits). It limits the size of the salt. If $m$ is the length -of the modulus $h$ the length of the hash output (in octets) then there can be $m - h - 2$ bytes of salt. - -This function does not actually sign the data it merely pads the hash of a message so that it can be processed by rsa\_exptmod(). - -\subsection{PSS Decoding} - -To decode a PSS encoded signature block you have to use the following. - -\index{pkcs\_1\_pss\_decode()} -\begin{alltt} -int pkcs_1_pss_decode( - const unsigned char *msghash, - unsigned long msghashlen, - const unsigned char *sig, - unsigned long siglen, - unsigned long saltlen, - int hash_idx, - unsigned long modulus_bitlen, - int *res); -\end{alltt} -This will decode the PSS encoded message in \textit{sig} of length \textit{siglen} and compare it to values in \textit{msghash} of length -\textit{msghashlen}. If the block is a valid PSS block and the decoded hash equals the hash supplied \textit{res} is set to non--zero. Otherwise, -it is set to zero. The rest of the parameters are as in the PSS encode call. - -It's important to use the same \textit{saltlen} and hash for both encoding and decoding as otherwise the procedure will not work. - -\mysection{RSA Key Operations} -\subsection{Background} - -RSA is a public key algorithm that is based on the inability to find the \textit{e-th} root modulo a composite of unknown -factorization. Normally the difficulty of breaking RSA is associated with the integer factoring problem but they are -not strictly equivalent. - -The system begins with with two primes $p$ and $q$ and their product $N = pq$. The order or \textit{Euler totient} of the -multiplicative sub-group formed modulo $N$ is given as $\phi(N) = (p - 1)(q - 1)$ which can be reduced to -$\mbox{lcm}(p - 1, q - 1)$. The public key consists of the composite $N$ and some integer $e$ such that -$\mbox{gcd}(e, \phi(N)) = 1$. The private key consists of the composite $N$ and the inverse of $e$ modulo $\phi(N)$ -often simply denoted as $de \equiv 1\mbox{ }(\mbox{mod }\phi(N))$. - -A person who wants to encrypt with your public key simply forms an integer (the plaintext) $M$ such that -$1 < M < N-2$ and computes the ciphertext $C = M^e\mbox{ }(\mbox{mod }N)$. Since finding the inverse exponent $d$ -given only $N$ and $e$ appears to be intractable only the owner of the private key can decrypt the ciphertext and compute -$C^d \equiv \left (M^e \right)^d \equiv M^1 \equiv M\mbox{ }(\mbox{mod }N)$. Similarly the owner of the private key -can sign a message by \textit{decrypting} it. Others can verify it by \textit{encrypting} it. - -Currently RSA is a difficult system to cryptanalyze provided that both primes are large and not close to each other. -Ideally $e$ should be larger than $100$ to prevent direct analysis. For example, if $e$ is three and you do not pad -the plaintext to be encrypted than it is possible that $M^3 < N$ in which case finding the cube-root would be trivial. -The most often suggested value for $e$ is $65537$ since it is large enough to make such attacks impossible and also well -designed for fast exponentiation (requires 16 squarings and one multiplication). - -It is important to pad the input to RSA since it has particular mathematical structure. For instance -$M_1^dM_2^d = (M_1M_2)^d$ which can be used to forge a signature. Suppose $M_3 = M_1M_2$ is a message you want -to have a forged signature for. Simply get the signatures for $M_1$ and $M_2$ on their own and multiply the result -together. Similar tricks can be used to deduce plaintexts from ciphertexts. It is important not only to sign -the hash of documents only but also to pad the inputs with data to remove such structure. - -\subsection{RSA Key Generation} - -For RSA routines a single \textit{rsa\_key} structure is used. To make a new RSA key call: -\index{rsa\_make\_key()} -\begin{verbatim} -int rsa_make_key(prng_state *prng, - int wprng, - int size, - long e, - rsa_key *key); -\end{verbatim} - -Where \textit{wprng} is the index into the PRNG descriptor array. The \textit{size} parameter is the size in bytes of the RSA modulus desired. -The \textit{e} parameter is the encryption exponent desired, typical values are 3, 17, 257 and 65537. Stick with 65537 since it is big enough to prevent -trivial math attacks, and not super slow. The \textit{key} parameter is where the constructed key is placed. All keys must be at -least 128 bytes, and no more than 512 bytes in size (\textit{that is from 1024 to 4096 bits}). - -\index{rsa\_free()} -Note: the \textit{rsa\_make\_key()} function allocates memory at run--time when you make the key. Make sure to call -\textit{rsa\_free()} (see below) when you are finished with the key. If \textit{rsa\_make\_key()} fails it will automatically -free the memory allocated. - -\index{PK\_PRIVATE} \index{PK\_PUBLIC} -There are two types of RSA keys. The types are {\bf PK\_PRIVATE} and {\bf PK\_PUBLIC}. The first type is a private -RSA key which includes the CRT parameters\footnote{As of v0.99 the PK\_PRIVATE\_OPTIMIZED type has been deprecated, and has been replaced by the -PK\_PRIVATE type.} in the form of a RSAPrivateKey (PKCS \#1 compliant). The second type, is a public RSA key which only includes the modulus and public exponent. -It takes the form of a RSAPublicKey (PKCS \#1 compliant). - -\subsection{RSA Exponentiation} -To do raw work with the RSA function, that is without padding, use the following function: -\index{rsa\_exptmod()} -\begin{verbatim} -int rsa_exptmod(const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen, - int which, - rsa_key *key); -\end{verbatim} -This will load the bignum from \textit{in} as a big endian integer in the format PKCS \#1 specifies, raises it to either \textit{e} or \textit{d} and stores the result -in \textit{out} and the size of the result in \textit{outlen}. \textit{which} is set to {\bf PK\_PUBLIC} to use \textit{e} -(i.e. for encryption/verifying) and set to {\bf PK\_PRIVATE} to use \textit{d} as the exponent (i.e. for decrypting/signing). - -Note: the output of this function is zero--padded as per PKCS \#1 specification. This allows this routine to work with PKCS \#1 padding functions properly. - -\mysection{RSA Key Encryption} -Normally RSA is used to encrypt short symmetric keys which are then used in block ciphers to encrypt a message. -To facilitate encrypting short keys the following functions have been provided. - -\index{rsa\_encrypt\_key()} -\begin{verbatim} -int rsa_encrypt_key( - const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen, - const unsigned char *lparam, - unsigned long lparamlen, - prng_state *prng, - int prng_idx, - int hash_idx, - rsa_key *key); -\end{verbatim} -This function will OAEP pad \textit{in} of length \textit{inlen} bytes, RSA encrypt it, and store the ciphertext -in \textit{out} of length \textit{outlen} octets. The \textit{lparam} and \textit{lparamlen} are the same parameters you would pass -to \index{pkcs\_1\_oaep\_encode()} pkcs\_1\_oaep\_encode(). - -\subsection{Extended Encryption} -As of v1.15, the library supports both v1.5 and v2.1 PKCS \#1 style paddings in these higher level functions. The following is the extended -encryption function: - -\index{rsa\_encrypt\_key\_ex()} -\begin{verbatim} -int rsa_encrypt_key_ex( - const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen, - const unsigned char *lparam, - unsigned long lparamlen, - prng_state *prng, - int prng_idx, - int hash_idx, - int padding, - rsa_key *key); -\end{verbatim} - -\index{LTC\_PKCS\_1\_OAEP} \index{LTC\_PKCS\_1\_V1\_5} -The parameters are all the same as for rsa\_encrypt\_key() except for the addition of the \textit{padding} parameter. It must be set to -\textbf{LTC\_PKCS\_1\_V1\_5} to perform v1.5 encryption, or set to \textbf{LTC\_PKCS\_1\_OAEP} to perform v2.1 encryption. - -When performing v1.5 encryption, the hash and lparam parameters are totally ignored and can be set to \textbf{NULL} or zero (respectively). - -\mysection{RSA Key Decryption} -\index{rsa\_decrypt\_key()} -\begin{verbatim} -int rsa_decrypt_key( - const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen, - const unsigned char *lparam, - unsigned long lparamlen, - int hash_idx, - int *stat, - rsa_key *key); -\end{verbatim} -This function will RSA decrypt \textit{in} of length \textit{inlen} then OAEP de-pad the resulting data and store it in -\textit{out} of length \textit{outlen}. The \textit{lparam} and \textit{lparamlen} are the same parameters you would pass -to pkcs\_1\_oaep\_decode(). - -If the RSA decrypted data is not a valid OAEP packet then \textit{stat} is set to $0$. Otherwise, it is set to $1$. - -\subsection{Extended Decryption} -As of v1.15, the library supports both v1.5 and v2.1 PKCS \#1 style paddings in these higher level functions. The following is the extended -decryption function: - -\index{rsa\_decrypt\_key\_ex()} -\begin{verbatim} -int rsa_decrypt_key_ex( - const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen, - const unsigned char *lparam, - unsigned long lparamlen, - int hash_idx, - int padding, - int *stat, - rsa_key *key); -\end{verbatim} - -Similar to the extended encryption, the new parameter \textit{padding} indicates which version of the PKCS \#1 standard to use. -It must be set to \textbf{LTC\_PKCS\_1\_V1\_5} to perform v1.5 decryption, or set to \textbf{LTC\_PKCS\_1\_OAEP} to perform v2.1 decryption. - -When performing v1.5 decryption, the hash and lparam parameters are totally ignored and can be set to \textbf{NULL} or zero (respectively). - - -\mysection{RSA Signature Generation} -Similar to RSA key encryption RSA is also used to \textit{digitally sign} message digests (hashes). To facilitate this -process the following functions have been provided. - -\index{rsa\_sign\_hash()} -\begin{verbatim} -int rsa_sign_hash(const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen, - prng_state *prng, - int prng_idx, - int hash_idx, - unsigned long saltlen, - rsa_key *key); -\end{verbatim} - -This will PSS encode the message digest pointed to by \textit{in} of length \textit{inlen} octets. Next, the PSS encoded hash will be RSA -\textit{signed} and the output stored in the buffer pointed to by \textit{out} of length \textit{outlen} octets. - -The \textit{hash\_idx} parameter indicates which hash will be used to create the PSS encoding. It should be the same as the hash used to -hash the message being signed. The \textit{saltlen} parameter indicates the length of the desired salt, and should typically be small. A good -default value is between 8 and 16 octets. Strictly, it must be small than $modulus\_len - hLen - 2$ where \textit{modulus\_len} is the size of -the RSA modulus (in octets), and \textit{hLen} is the length of the message digest produced by the chosen hash. - -\subsection{Extended Signatures} - -As of v1.15, the library supports both v1.5 and v2.1 signatures. The extended signature generation function has the following prototype: - -\index{rsa\_sign\_hash\_ex()} -\begin{verbatim} -int rsa_sign_hash_ex( - const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen, - int padding, - prng_state *prng, - int prng_idx, - int hash_idx, - unsigned long saltlen, - rsa_key *key); -\end{verbatim} - -This will PKCS encode the message digest pointed to by \textit{in} of length \textit{inlen} octets. Next, the PKCS encoded hash will be RSA -\textit{signed} and the output stored in the buffer pointed to by \textit{out} of length \textit{outlen} octets. The \textit{padding} parameter -must be set to \textbf{LTC\_PKCS\_1\_V1\_5} to produce a v1.5 signature, otherwise, it must be set to \textbf{LTC\_PKCS\_1\_PSS} to produce a -v2.1 signature. - -When performing a v1.5 signature the \textit{prng}, \textit{prng\_idx}, and \textit{hash\_idx} parameters are not checked and can be left to any -values such as $\lbrace$\textbf{NULL}, 0, 0$\rbrace$. - -\mysection{RSA Signature Verification} -\index{rsa\_verify\_hash()} -\begin{verbatim} -int rsa_verify_hash(const unsigned char *sig, - unsigned long siglen, - const unsigned char *msghash, - unsigned long msghashlen, - int hash_idx, - unsigned long saltlen, - int *stat, - rsa_key *key); -\end{verbatim} - -This will RSA \textit{verify} the signature pointed to by \textit{sig} of length \textit{siglen} octets. Next, the RSA decoded data is PSS decoded -and the extracted hash is compared against the message digest pointed to by \textit{msghash} of length \textit{msghashlen} octets. - -If the RSA decoded data is not a valid PSS message, or if the PSS decoded hash does not match the \textit{msghash} -value, \textit{res} is set to $0$. Otherwise, if the function succeeds, and signature is valid \textit{res} is set to $1$. - -\subsection{Extended Verification} - -As of v1.15, the library supports both v1.5 and v2.1 signature verification. The extended signature verification function has the following prototype: - -\index{rsa\_verify\_hash\_ex()} -\begin{verbatim} -int rsa_verify_hash_ex( - const unsigned char *sig, - unsigned long siglen, - const unsigned char *hash, - unsigned long hashlen, - int padding, - int hash_idx, - unsigned long saltlen, - int *stat, - rsa_key *key); -\end{verbatim} - -This will RSA \textit{verify} the signature pointed to by \textit{sig} of length \textit{siglen} octets. Next, the RSA decoded data is PKCS decoded -and the extracted hash is compared against the message digest pointed to by \textit{msghash} of length \textit{msghashlen} octets. - -If the RSA decoded data is not a valid PSS message, or if the PKCS decoded hash does not match the \textit{msghash} -value, \textit{res} is set to $0$. Otherwise, if the function succeeds, and signature is valid \textit{res} is set to $1$. - -The \textit{padding} parameter must be set to \textbf{LTC\_PKCS\_1\_V1\_5} to perform a v1.5 verification. Otherwise, it must be set to -\textbf{LTC\_PKCS\_1\_PSS} to perform a v2.1 verification. When performing a v1.5 verification the \textit{hash\_idx} parameter is ignored. - -\mysection{RSA Encryption Example} -\begin{small} -\begin{verbatim} -#include -int main(void) -{ - int err, hash_idx, prng_idx, res; - unsigned long l1, l2; - unsigned char pt[16], pt2[16], out[1024]; - rsa_key key; - - /* register prng/hash */ - if (register_prng(&sprng_desc) == -1) { - printf("Error registering sprng"); - return EXIT_FAILURE; - } - - /* register a math library (in this case TomsFastMath) - ltc_mp = tfm_desc; - - if (register_hash(&sha1_desc) == -1) { - printf("Error registering sha1"); - return EXIT_FAILURE; - } - hash_idx = find_hash("sha1"); - prng_idx = find_prng("sprng"); - - /* make an RSA-1024 key */ - if ((err = rsa_make_key(NULL, /* PRNG state */ - prng_idx, /* PRNG idx */ - 1024/8, /* 1024-bit key */ - 65537, /* we like e=65537 */ - &key) /* where to store the key */ - ) != CRYPT_OK) { - printf("rsa_make_key %s", error_to_string(err)); - return EXIT_FAILURE; - } - - /* fill in pt[] with a key we want to send ... */ - l1 = sizeof(out); - if ((err = rsa_encrypt_key(pt, /* data we wish to encrypt */ - 16, /* data is 16 bytes long */ - out, /* where to store ciphertext */ - &l1, /* length of ciphertext */ - "TestApp", /* our lparam for this program */ - 7, /* lparam is 7 bytes long */ - NULL, /* PRNG state */ - prng_idx, /* prng idx */ - hash_idx, /* hash idx */ - &key) /* our RSA key */ - ) != CRYPT_OK) { - printf("rsa_encrypt_key %s", error_to_string(err)); - return EXIT_FAILURE; - } - - /* now let's decrypt the encrypted key */ - l2 = sizeof(pt2); - if ((err = rsa_decrypt_key(out, /* encrypted data */ - l1, /* length of ciphertext */ - pt2, /* where to put plaintext */ - &l2, /* plaintext length */ - "TestApp", /* lparam for this program */ - 7, /* lparam is 7 bytes long */ - hash_idx, /* hash idx */ - &res, /* validity of data */ - &key) /* our RSA key */ - ) != CRYPT_OK) { - printf("rsa_decrypt_key %s", error_to_string(err)); - return EXIT_FAILURE; - } - /* if all went well pt == pt2, l2 == 16, res == 1 */ -} -\end{verbatim} -\end{small} - -\mysection{RSA Key Format} - -The RSA key format adopted for exporting and importing keys is the PKCS \#1 format defined by the ASN.1 constructs known as -RSAPublicKey and RSAPrivateKey. Additionally, the OpenSSL key format is supported by the import function only. - -\subsection{RSA Key Export} -To export a RSA key use the following function. - -\index{rsa\_export()} -\begin{verbatim} -int rsa_export(unsigned char *out, - unsigned long *outlen, - int type, - rsa_key *key); -\end{verbatim} -This will export the RSA key in either a RSAPublicKey or RSAPrivateKey (PKCS \#1 types) depending on the value of \textit{type}. When it is -set to \textbf{PK\_PRIVATE} the export format will be RSAPrivateKey and otherwise it will be RSAPublicKey. - -\subsection{RSA Key Import} -To import a RSA key use the following function. - -\index{rsa\_import()} -\begin{verbatim} -int rsa_import(const unsigned char *in, - unsigned long inlen, - rsa_key *key); -\end{verbatim} - -This will import the key stored in \textit{inlen} and import it to \textit{key}. If the function fails it will automatically free any allocated memory. This -function can import both RSAPublicKey and RSAPrivateKey formats. - -As of v1.06 this function can also import OpenSSL DER formatted public RSA keys. They are essentially encapsulated RSAPublicKeys. LibTomCrypt will -import the key, strip off the additional data (it's the preferred hash) and fill in the rsa\_key structure as if it were a native RSAPublicKey. Note that -there is no function provided to export in this format. - -\chapter{Elliptic Curve Cryptography} - -\mysection{Background} -The library provides a set of core ECC functions as well that are designed to be the Elliptic Curve analogy of all of the -Diffie-Hellman routines in the previous chapter. Elliptic curves (of certain forms) have the benefit that they are harder -to attack (no sub-exponential attacks exist unlike normal DH crypto) in fact the fastest attack requires the square root -of the order of the base point in time. That means if you use a base point of order $2^{192}$ (which would represent a -192-bit key) then the work factor is $2^{96}$ in order to find the secret key. - -The curves in this library are taken from the following website: -\begin{verbatim} -http://csrc.nist.gov/cryptval/dss.htm -\end{verbatim} - -As of v1.15 three new curves from the SECG standards are also included they are the secp112r1, secp128r1, and secp160r1 curves. These curves were added to -support smaller devices which do not need as large keys for security. - -They are all curves over the integers modulo a prime. The curves have the basic equation that is: -\begin{equation} -y^2 = x^3 - 3x + b\mbox{ }(\mbox{mod }p) -\end{equation} - -The variable $b$ is chosen such that the number of points is nearly maximal. In fact the order of the base points $\beta$ -provided are very close to $p$ that is $\vert \vert \phi(\beta) \vert \vert \approx \vert \vert p \vert \vert$. The curves -range in order from $\approx 2^{112}$ points to $\approx 2^{521}$. According to the source document any key size greater -than or equal to 256-bits is sufficient for long term security. - -\mysection{Fixed Point Optimizations} -\index{Fixed Point ECC} -\index{MECC\_FP} -As of v1.12 of LibTomCrypt, support for Fixed Point ECC point multiplication has been added. It is a generic optimization that is -supported by any conforming math plugin. It is enabled by defining \textbf{MECC\_FP} during the build, such as - -\begin{verbatim} -CFLAGS="-DTFM_DESC -DMECC_FP" make -\end{verbatim} - -which will build LTC using the TFM math library and enabling this new feature. The feature is not enabled by default as it is \textbf{NOT} thread -safe (by default). It supports the LTC locking macros (such as by enabling LTC\_PTHREAD), but by default is not locked. - -\index{FP\_ENTRIES} -The optimization works by using a Fixed Point multiplier on any base point you use twice or more in a short period of time. It has a limited size -cache (of FP\_ENTRIES entries) which it uses to hold recent bases passed to ltc\_ecc\_mulmod(). Any base detected to be used twice is sent through the -pre--computation phase, and then the fixed point algorithm can be used. For example, if you use a NIST base point twice in a row, the 2$^{nd}$ and -all subsequent point multiplications with that point will use the faster algorithm. - -\index{FP\_LUT} -The optimization uses a window on the multiplicand of FP\_LUT bits (default: 8, min: 2, max: 12), and this controls the memory/time trade-off. The larger the -value the faster the algorithm will be but the more memory it will take. The memory usage is $3 \cdot 2^{FP\_LUT}$ integers which by default -with TFM amounts to about 400kB of memory. Tuning TFM (by changing FP\_SIZE) can decrease the usage by a fair amount. Memory is only used by a cache entry -if it is active. Both FP\_ENTRIES and FP\_LUT are definable on the command line if you wish to override them. For instance, - -\begin{verbatim} -CFLAGS="-DTFM_DESC -DMECC_FP -DFP_ENTRIES=8 -DFP_LUT=6" make -\end{verbatim} - -\begin{flushleft} -\index{FP\_SIZE} \index{TFM} \index{tfm.h} -would define a window of 6 bits and limit the cache to 8 entries. Generally, it is better to first tune TFM by adjusting FP\_SIZE (from tfm.h). It defaults -to 4096 bits (512 bytes) which is way more than what is required by ECC. At most, you need 1152 bits to accommodate ECC--521. If you're only using (say) -ECC--256 you will only need 576 bits, which would reduce the memory usage by 700\%. -\end{flushleft} - -\mysection{Key Format} -LibTomCrypt uses a unique format for ECC public and private keys. While ANSI X9.63 partially specifies key formats, it does it in a less than ideally simple manner. \ -In the case of LibTomCrypt, it is meant \textbf{solely} for NIST and SECG $GF(p)$ curves. The format of the keys is as follows: - -\index{ECC Key Format} -\begin{small} -\begin{verbatim} -ECCPublicKey ::= SEQUENCE { - flags BIT STRING(0), -- public/private flag (always zero), - keySize INTEGER, -- Curve size (in bits) divided by eight - -- and rounded down, e.g. 521 => 65 - pubkey.x INTEGER, -- The X co-ordinate of the public key point - pubkey.y INTEGER, -- The Y co-ordinate of the public key point -} - -ECCPrivateKey ::= SEQUENCE { - flags BIT STRING(1), -- public/private flag (always one), - keySize INTEGER, -- Curve size (in bits) divided by eight - -- and rounded down, e.g. 521 => 65 - pubkey.x INTEGER, -- The X co-ordinate of the public key point - pubkey.y INTEGER, -- The Y co-ordinate of the public key point - secret.k INTEGER, -- The secret key scalar -} -\end{verbatim} -\end{small} - -The first flags bit denotes whether the key is public (zero) or private (one). - -\vfil - -\mysection{ECC Curve Parameters} -The library uses the following structure to describe an elliptic curve. This is used internally, as well as by the new -extended ECC functions which allow the user to specify their own curves. - -\index{ltc\_ecc\_set\_type} -\begin{verbatim} -/** Structure defines a NIST GF(p) curve */ -typedef struct { - /** The size of the curve in octets */ - int size; - - /** name of curve */ - char *name; - - /** The prime that defines the field (encoded in hex) */ - char *prime; - - /** The fields B param (hex) */ - char *B; - - /** The order of the curve (hex) */ - char *order; - - /** The x co-ordinate of the base point on the curve (hex) */ - char *Gx; - - /** The y co-ordinate of the base point on the curve (hex) */ - char *Gy; -} ltc_ecc_set_type; -\end{verbatim} - -The curve must be of the form $y^2 = x^3 - 3x + b$, and all of the integer parameters are encoded in hexadecimal format. - -\mysection{Core Functions} -\subsection{ECC Key Generation} -There is a key structure called \textit{ecc\_key} used by the ECC functions. There is a function to make a key: -\index{ecc\_make\_key()} -\begin{verbatim} -int ecc_make_key(prng_state *prng, - int wprng, - int keysize, - ecc_key *key); -\end{verbatim} - -The \textit{keysize} is the size of the modulus in bytes desired. Currently directly supported values are 12, 16, 20, 24, 28, 32, 48, and 65 bytes which -correspond to key sizes of 112, 128, 160, 192, 224, 256, 384, and 521 bits respectively. If you pass a key size that is between any key size it will round -the keysize up to the next available one. - -The function will free any internally allocated resources if there is an error. - -\subsection{Extended Key Generation} -As of v1.16, the library supports an extended key generation routine which allows the user to specify their own curve. It is specified as follows: - -\index{ecc\_make\_key\_ex()} -\begin{verbatim} -int ecc_make_key_ex( - prng_state *prng, - int wprng, - ecc_key *key, - const ltc_ecc_set_type *dp); -\end{verbatim} - -This function generates a random ECC key over the curve specified by the parameters by \textit{dp}. The rest of the parameters are equivalent to -those from the original key generation function. - -\subsection{ECC Key Free} -To free the memory allocated by a ecc\_make\_key(), ecc\_make\_key\_ex(), ecc\_import(), or ecc\_import\_ex() call use the following function: -\index{ecc\_free()} -\begin{verbatim} -void ecc_free(ecc_key *key); -\end{verbatim} - -\subsection{ECC Key Export} -To export an ECC key using the LibTomCrypt format call the following function: -\index{ecc\_export()} -\begin{verbatim} -int ecc_export(unsigned char *out, - unsigned long *outlen, - int type, - ecc_key *key); -\end{verbatim} -This will export the key with the given \textit{type} (\textbf{PK\_PUBLIC} or \textbf{PK\_PRIVATE}), and store it to \textit{out}. - -\subsection{ECC Key Import} -The following function imports a LibTomCrypt format ECC key: -\index{ecc\_import()} -\begin{verbatim} -int ecc_import(const unsigned char *in, - unsigned long inlen, - ecc_key *key); -\end{verbatim} -This will import the ECC key from \textit{in}, and store it in the ecc\_key structure pointed to by \textit{key}. If the operation fails it will free -any allocated memory automatically. - -\subsection{Extended Key Import} - -The following function imports a LibTomCrypt format ECC key using a specified set of curve parameters: -\index{ecc\_import\_ex()} -\begin{verbatim} -int ecc_import_ex(const unsigned char *in, - unsigned long inlen, - ecc_key *key, - const ltc_ecc_set_type *dp); -\end{verbatim} -This will import the key from the array pointed to by \textit{in} of length \textit{inlen} octets. The key is stored in -the ECC structure pointed to by \textit{key}. The curve is specified by the parameters pointed to by \textit{dp}. The function will free -all internally allocated memory upon error. - -\subsection{ANSI X9.63 Export} -The following function exports an ECC public key in the ANSI X9.63 format: - -\index{ecc\_ansi\_x963\_export()} -\begin{verbatim} -int ecc_ansi_x963_export( ecc_key *key, - unsigned char *out, - unsigned long *outlen); -\end{verbatim} -The ECC key pointed to by \textit{key} is exported in public fashion to the array pointed to by \textit{out}. The ANSI X9.63 format used is from -section 4.3.6 of the standard. It does not allow for the export of private keys. - -\subsection{ANSI X9.63 Import} -The following function imports an ANSI X9.63 section 4.3.6 format public ECC key: - -\index{ecc\_ansi\_x963\_import()} -\begin{verbatim} -int ecc_ansi_x963_import(const unsigned char *in, - unsigned long inlen, - ecc_key *key); -\end{verbatim} -This will import the key stored in the array pointed to by \textit{in} of length \textit{inlen} octets. The imported key is stored in the ECC key pointed to by -\textit{key}. The function will free any allocated memory upon error. - -\subsection{Extended ANSI X9.63 Import} -The following function allows the importing of an ANSI x9.63 section 4.3.6 format public ECC key using user specified domain parameters: - -\index{ecc\_ansi\_x963\_import\_ex()} -\begin{verbatim} -int ecc_ansi_x963_import_ex(const unsigned char *in, - unsigned long inlen, - ecc_key *key, - ltc_ecc_set_type *dp); -\end{verbatim} -This will import the key stored in the array pointed to by \textit{in} of length \textit{inlen} octets using the domain parameters pointed to by \textit{dp}. -The imported key is stored in the ECC key pointed to by \textit{key}. The function will free any allocated memory upon error. - -\subsection{ECC Shared Secret} -To construct a Diffie-Hellman shared secret with a private and public ECC key, use the following function: -\index{ecc\_shared\_secret()} -\begin{verbatim} -int ecc_shared_secret( ecc_key *private_key, - ecc_key *public_key, - unsigned char *out, - unsigned long *outlen); -\end{verbatim} -The \textit{private\_key} is typically the local private key, and \textit{public\_key} is the key the remote party has shared. -Note: this function stores only the $x$ co-ordinate of the shared elliptic point as described in ANSI X9.63 ECC--DH. - -\mysection{ECC Diffie-Hellman Encryption} -ECC--DH Encryption is performed by producing a random key, hashing it, and XOR'ing the digest against the plaintext. It is not strictly ANSI X9.63 compliant -but it is very similar. It has been extended by using an ASN.1 sequence and hash object identifiers to allow portable usage. The following function -encrypts a short string (no longer than the message digest) using this technique: - -\subsection{ECC-DH Encryption} -\index{ecc\_encrypt\_key()} -\begin{verbatim} -int ecc_encrypt_key(const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen, - prng_state *prng, - int wprng, - int hash, - ecc_key *key); -\end{verbatim} - -As the name implies this function encrypts a (symmetric) key, and is not intended for encrypting long messages directly. It will encrypt the -plaintext in the array pointed to by \textit{in} of length \textit{inlen} octets. It uses the public ECC key pointed to by \textit{key}, and -hash algorithm indexed by \textit{hash} to construct a shared secret which may be XOR'ed against the plaintext. The ciphertext is stored in -the output buffer pointed to by \textit{out} of length \textit{outlen} octets. - -The data is encrypted to the public ECC \textit{key} such that only the holder of the private key can decrypt the payload. To have multiple -recipients multiple call to this function for each public ECC key is required. - -\subsection{ECC-DH Decryption} -\index{ecc\_decrypt\_key()} -\begin{verbatim} -int ecc_decrypt_key(const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen, - ecc_key *key); -\end{verbatim} - -This function will decrypt an encrypted payload. The \textit{key} provided must be the private key corresponding to the public key -used during encryption. If the wrong key is provided the function will not specifically return an error code. It is important -to use some form of challenge response in that case (e.g. compute a MAC of a known string). - -\subsection{ECC Encryption Format} -The packet format for the encrypted keys is the following ASN.1 SEQUENCE: - -\begin{verbatim} -ECCEncrypt ::= SEQUENCE { - hashID OBJECT IDENTIFIER, -- OID of hash used - pubkey OCTET STRING , -- Encapsulated ECCPublicKey - skey OCTET STRING -- xor of plaintext and - --"hash of shared secret" -} -\end{verbatim} - -\mysection{EC DSA Signatures} - -There are also functions to sign and verify messages. They use the ANSI X9.62 EC-DSA algorithm to generate and verify signatures in the -ANSI X9.62 format. - -\subsection{EC-DSA Signature Generation} -To sign a message digest (hash) use the following function: - -\index{ecc\_sign\_hash()} -\begin{verbatim} -int ecc_sign_hash(const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen, - prng_state *prng, - int wprng, - ecc_key *key); -\end{verbatim} - -This function will EC--DSA sign the message digest stored in the array pointed to by \textit{in} of length \textit{inlen} octets. The signature -will be stored in the array pointed to by \textit{out} of length \textit{outlen} octets. The function requires a properly seeded PRNG, and -the ECC \textit{key} provided must be a private key. - -\subsection{EC-DSA Signature Verification} -\index{ecc\_verify\_hash()} -\begin{verbatim} -int ecc_verify_hash(const unsigned char *sig, - unsigned long siglen, - const unsigned char *hash, - unsigned long hashlen, - int *stat, - ecc_key *key); -\end{verbatim} - -This function will verify the EC-DSA signature in the array pointed to by \textit{sig} of length \textit{siglen} octets, against the message digest -pointed to by the array \textit{hash} of length \textit{hashlen}. It will store a non--zero value in \textit{stat} if the signature is valid. Note: -the function will not return an error if the signature is invalid. It will return an error, if the actual signature payload is an invalid format. -The ECC \textit{key} must be the public (or private) ECC key corresponding to the key that performed the signature. - -\subsection{Signature Format} -The signature code is an implementation of X9.62 EC--DSA, and the output is compliant for GF(p) curves. - -\mysection{ECC Keysizes} -With ECC if you try to sign a hash that is bigger than your ECC key you can run into problems. The math will still work, and in effect the signature will still -work. With ECC keys the strength of the signature is limited by the size of the hash, or the size of they key, whichever is smaller. For example, if you sign with -SHA256 and an ECC-192 key, you in effect have 96--bits of security. - -The library will not warn you if you make this mistake, so it is important to check yourself before using the signatures. - -\chapter{Digital Signature Algorithm} -\mysection{Introduction} -The Digital Signature Algorithm (or DSA) is a variant of the ElGamal Signature scheme which has been modified to -reduce the bandwidth of the signatures. For example, to have \textit{80-bits of security} with ElGamal, you need a group with an order of at least 1024--bits. -With DSA, you need a group of order at least 160--bits. By comparison, the ElGamal signature would require at least 256 bytes of storage, whereas the DSA signature -would require only at least 40 bytes. - -\mysection{Key Format} -Since no useful public standard for DSA key storage was presented to me during the course of this development I made my own ASN.1 SEQUENCE which I document -now so that others can interoperate with this library. - -\begin{verbatim} -DSAPublicKey ::= SEQUENCE { - publicFlags BIT STRING(0), -- must be 0 - g INTEGER , -- base generator - -- check that g^q mod p == 1 - -- and that 1 < g < p - 1 - p INTEGER , -- prime modulus - q INTEGER , -- order of sub-group - -- (must be prime) - y INTEGER , -- public key, specifically, - -- g^x mod p, - -- check that y^q mod p == 1 - -- and that 1 < y < p - 1 -} - -DSAPrivateKey ::= SEQUENCE { - publicFlags BIT STRING(1), -- must be 1 - g INTEGER , -- base generator - -- check that g^q mod p == 1 - -- and that 1 < g < p - 1 - p INTEGER , -- prime modulus - q INTEGER , -- order of sub-group - -- (must be prime) - y INTEGER , -- public key, specifically, - -- g^x mod p, - -- check that y^q mod p == 1 - -- and that 1 < y < p - 1 - x INTEGER -- private key -} -\end{verbatim} - -The leading BIT STRING has a single bit in it which is zero for public keys and one for private keys. This makes the structure uniquely decodable, -and easy to work with. - -\mysection{Key Generation} -To make a DSA key you must call the following function -\begin{verbatim} -int dsa_make_key(prng_state *prng, - int wprng, - int group_size, - int modulus_size, - dsa_key *key); -\end{verbatim} -The variable \textit{prng} is an active PRNG state and \textit{wprng} the index to the descriptor. \textit{group\_size} and -\textit{modulus\_size} control the difficulty of forging a signature. Both parameters are in bytes. The larger the -\textit{group\_size} the more difficult a forgery becomes upto a limit. The value of $group\_size$ is limited by -$15 < group\_size < 1024$ and $modulus\_size - group\_size < 512$. Suggested values for the pairs are as follows. - -\begin{figure}[here] -\begin{center} -\begin{tabular}{|c|c|c|} -\hline \textbf{Bits of Security} & \textbf{group\_size} & \textbf{modulus\_size} \\ -\hline 80 & 20 & 128 \\ -\hline 120 & 30 & 256 \\ -\hline 140 & 35 & 384 \\ -\hline 160 & 40 & 512 \\ -\hline -\end{tabular} -\end{center} -\caption{DSA Key Sizes} -\end{figure} - -When you are finished with a DSA key you can call the following function to free the memory used. -\index{dsa\_free()} -\begin{verbatim} -void dsa_free(dsa_key *key); -\end{verbatim} - -\mysection{Key Verification} -Each DSA key is composed of the following variables. - -\begin{enumerate} - \item $q$ a small prime of magnitude $256^{group\_size}$. - \item $p = qr + 1$ a large prime of magnitude $256^{modulus\_size}$ where $r$ is a random even integer. - \item $g = h^r \mbox{ (mod }p\mbox{)}$ a generator of order $q$ modulo $p$. $h$ can be any non-trivial random - value. For this library they start at $h = 2$ and step until $g$ is not $1$. - \item $x$ a random secret (the secret key) in the range $1 < x < q$ - \item $y = g^x \mbox{ (mod }p\mbox{)}$ the public key. -\end{enumerate} - -A DSA key is considered valid if it passes all of the following tests. - -\begin{enumerate} - \item $q$ must be prime. - \item $p$ must be prime. - \item $g$ cannot be one of $\lbrace -1, 0, 1 \rbrace$ (modulo $p$). - \item $g$ must be less than $p$. - \item $(p-1) \equiv 0 \mbox{ (mod }q\mbox{)}$. - \item $g^q \equiv 1 \mbox{ (mod }p\mbox{)}$. - \item $1 < y < p - 1$ - \item $y^q \equiv 1 \mbox{ (mod }p\mbox{)}$. -\end{enumerate} - -Tests one and two ensure that the values will at least form a field which is required for the signatures to -function. Tests three and four ensure that the generator $g$ is not set to a trivial value which would make signature -forgery easier. Test five ensures that $q$ divides the order of multiplicative sub-group of $\Z/p\Z$. Test six -ensures that the generator actually generates a prime order group. Tests seven and eight ensure that the public key -is within range and belongs to a group of prime order. Note that test eight does not prove that $g$ generated $y$ only -that $y$ belongs to a multiplicative sub-group of order $q$. - -The following function will perform these tests. - -\index{dsa\_verify\_key()} -\begin{verbatim} -int dsa_verify_key(dsa_key *key, int *stat); -\end{verbatim} - -This will test \textit{key} and store the result in \textit{stat}. If the result is $stat = 0$ the DSA key failed one of the tests -and should not be used at all. If the result is $stat = 1$ the DSA key is valid (as far as valid mathematics are concerned). - -\mysection{Signatures} -\subsection{Signature Generation} -To generate a DSA signature call the following function: - -\index{dsa\_sign\_hash()} -\begin{verbatim} -int dsa_sign_hash(const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen, - prng_state *prng, - int wprng, - dsa_key *key); -\end{verbatim} - -Which will sign the data in \textit{in} of length \textit{inlen} bytes. The signature is stored in \textit{out} and the size -of the signature in \textit{outlen}. If the signature is longer than the size you initially specify in \textit{outlen} nothing -is stored and the function returns an error code. The DSA \textit{key} must be of the \textbf{PK\_PRIVATE} persuasion. - -\subsection{Signature Verification} -To verify a hash created with that function use the following function: - -\index{dsa\_verify\_hash()} -\begin{verbatim} -int dsa_verify_hash(const unsigned char *sig, - unsigned long siglen, - const unsigned char *hash, - unsigned long inlen, - int *stat, - dsa_key *key); -\end{verbatim} -Which will verify the data in \textit{hash} of length \textit{inlen} against the signature stored in \textit{sig} of length \textit{siglen}. -It will set \textit{stat} to $1$ if the signature is valid, otherwise it sets \textit{stat} to $0$. - -\mysection{DSA Encrypt and Decrypt} -As of version 1.07, the DSA keys can be used to encrypt and decrypt small payloads. It works similar to the ECC encryption where -a shared key is computed, and the hash of the shared key XOR'ed against the plaintext forms the ciphertext. The format used is functional port of -the ECC encryption format to the DSA algorithm. - -\subsection{DSA Encryption} -This function will encrypt a small payload with a recipients public DSA key. - -\index{dsa\_encrypt\_key()} -\begin{verbatim} -int dsa_encrypt_key(const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen, - prng_state *prng, - int wprng, - int hash, - dsa_key *key); -\end{verbatim} - -This will encrypt the payload in \textit{in} of length \textit{inlen} and store the ciphertext in the output buffer \textit{out}. The -length of the ciphertext \textit{outlen} must be originally set to the length of the output buffer. The DSA \textit{key} can be -a public key. - -\subsection{DSA Decryption} - -\index{dsa\_decrypt\_key()} -\begin{verbatim} -int dsa_decrypt_key(const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen, - dsa_key *key); -\end{verbatim} -This will decrypt the ciphertext \textit{in} of length \textit{inlen}, and store the original payload in \textit{out} of length \textit{outlen}. -The DSA \textit{key} must be a private key. - -\mysection{DSA Key Import and Export} - -\subsection{DSA Key Export} -To export a DSA key so that it can be transported use the following function: -\index{dsa\_export()} -\begin{verbatim} -int dsa_export(unsigned char *out, - unsigned long *outlen, - int type, - dsa_key *key); -\end{verbatim} -This will export the DSA \textit{key} to the buffer \textit{out} and set the length in \textit{outlen} (which must have been previously -initialized to the maximum buffer size). The \textit{type} variable may be either \textbf{PK\_PRIVATE} or \textbf{PK\_PUBLIC} -depending on whether you want to export a private or public copy of the DSA key. - -\subsection{DSA Key Import} -To import an exported DSA key use the following function -: -\index{dsa\_import()} -\begin{verbatim} -int dsa_import(const unsigned char *in, - unsigned long inlen, - dsa_key *key); -\end{verbatim} - -This will import the DSA key from the buffer \textit{in} of length \textit{inlen} to the \textit{key}. If the process fails the function -will automatically free all of the heap allocated in the process (you don't have to call dsa\_free()). - -\chapter{Standards Support} -\mysection{ASN.1 Formats} -LibTomCrypt supports a variety of ASN.1 data types encoded with the Distinguished Encoding Rules (DER) suitable for various cryptographic protocols. The data types -are all provided with three basic functions with \textit{similar} prototypes. One function has been dedicated to calculate the length in octets of a given -format, and two functions have been dedicated to encoding and decoding the format. - -On top of the basic data types are the SEQUENCE and SET data types which are collections of other ASN.1 types. They are provided -in the same manner as the other data types except they use list of objects known as the \textbf{ltc\_asn1\_list} structure. It is defined as the following: - -\index{ltc\_asn1\_list structure} -\begin{verbatim} -typedef struct { - int type; - void *data; - unsigned long size; - int used; - struct ltc_asn1_list_ *prev, *next, - *child, *parent; -} ltc_asn1_list; -\end{verbatim} - -\index{LTC\_SET\_ASN1 macro} -The \textit{type} field is one of the following ASN.1 field definitions. The \textit{data} pointer is a void pointer to the data to be encoded (or the destination) and the -\textit{size} field is specific to what you are encoding (e.g. number of bits in the BIT STRING data type). The \textit{used} field is primarily for the CHOICE decoder -and reflects if the particular member of a list was the decoded data type. To help build the lists in an orderly fashion the macro -\textit{LTC\_SET\_ASN1(list, index, Type, Data, Size)} has been provided. - -It will assign to the \textit{index}th position in the \textit{list} the triplet (Type, Data, Size). An example usage would be: - -\begin{small} -\begin{verbatim} -... -ltc_asn1_list sequence[3]; -unsigned long three=3; - -LTC_SET_ASN1(sequence, 0, LTC_ASN1_IA5_STRING, "hello", 5); -LTC_SET_ASN1(sequence, 1, LTC_ASN1_SHORT_INTEGER, &three, 1); -LTC_SET_ASN1(sequence, 2, LTC_ASN1_NULL, NULL, 0); -\end{verbatim} -\end{small} - -The macro is relatively safe with respect to modifying variables, for instance the following code is equivalent. - -\begin{small} -\begin{verbatim} -... -ltc_asn1_list sequence[3]; -unsigned long three=3; -int x=0; -LTC_SET_ASN1(sequence, x++, LTC_ASN1_IA5_STRING, "hello", 5); -LTC_SET_ASN1(sequence, x++, LTC_ASN1_SHORT_INTEGER, &three, 1); -LTC_SET_ASN1(sequence, x++, LTC_ASN1_NULL, NULL, 0); -\end{verbatim} -\end{small} - -\begin{figure}[here] -\begin{center} -\begin{small} -\begin{tabular}{|l|l|} -\hline \textbf{Definition} & \textbf{ASN.1 Type} \\ -\hline LTC\_ASN1\_EOL & End of a ASN.1 list structure. \\ -\hline LTC\_ASN1\_BOOLEAN & BOOLEAN type \\ -\hline LTC\_ASN1\_INTEGER & INTEGER (uses mp\_int) \\ -\hline LTC\_ASN1\_SHORT\_INTEGER & INTEGER (32--bit using unsigned long) \\ -\hline LTC\_ASN1\_BIT\_STRING & BIT STRING (one bit per char) \\ -\hline LTC\_ASN1\_OCTET\_STRING & OCTET STRING (one octet per char) \\ -\hline LTC\_ASN1\_NULL & NULL \\ -\hline LTC\_ASN1\_OBJECT\_IDENTIFIER & OBJECT IDENTIFIER \\ -\hline LTC\_ASN1\_IA5\_STRING & IA5 STRING (one octet per char) \\ -\hline LTC\_ASN1\_UTF8\_STRING & UTF8 STRING (one wchar\_t per char) \\ -\hline LTC\_ASN1\_PRINTABLE\_STRING & PRINTABLE STRING (one octet per char) \\ -\hline LTC\_ASN1\_UTCTIME & UTCTIME (see ltc\_utctime structure) \\ -\hline LTC\_ASN1\_SEQUENCE & SEQUENCE (and SEQUENCE OF) \\ -\hline LTC\_ASN1\_SET & SET \\ -\hline LTC\_ASN1\_SETOF & SET OF \\ -\hline LTC\_ASN1\_CHOICE & CHOICE \\ -\hline -\end{tabular} -\caption{List of ASN.1 Supported Types} -\end{small} -\end{center} -\end{figure} - -\subsection{SEQUENCE Type} -The SEQUENCE data type is a collection of other ASN.1 data types encapsulated with a small header which is a useful way of sending multiple data types in one packet. - -\subsubsection{SEQUENCE Encoding} -To encode a sequence a \textbf{ltc\_asn1\_list} array must be initialized with the members of the sequence and their respective pointers. The encoding is performed -with the following function. - -\index{der\_encode\_sequence()} -\begin{verbatim} -int der_encode_sequence(ltc_asn1_list *list, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen); -\end{verbatim} -This encodes a sequence of items pointed to by \textit{list} where the list has \textit{inlen} items in it. The SEQUENCE will be encoded to \textit{out} and of length \textit{outlen}. The -function will terminate when it reads all the items out of the list (upto \textit{inlen}) or it encounters an item in the list with a type of \textbf{LTC\_ASN1\_EOL}. - -The \textit{data} pointer in the list would be the same pointer you would pass to the respective ASN.1 encoder (e.g. der\_encode\_bit\_string()) and it is simply passed on -verbatim to the dependent encoder. The list can contain other SEQUENCE or SET types which enables you to have nested SEQUENCE and SET definitions. In these cases -the \textit{data} pointer is simply a pointer to another \textbf{ltc\_asn1\_list}. - -\subsubsection{SEQUENCE Decoding} - -\index{der\_decode\_sequence()} - -Decoding a SEQUENCE is similar to encoding. You set up an array of \textbf{ltc\_asn1\_list} where in this case the \textit{size} member is the maximum size -(in certain cases). For types such as IA5 STRING, BIT STRING, OCTET STRING (etc) the \textit{size} field is updated after successful decoding to reflect how many -units of the respective type has been loaded. - -\begin{verbatim} -int der_decode_sequence(const unsigned char *in, - unsigned long inlen, - ltc_asn1_list *list, - unsigned long outlen); -\end{verbatim} - -This will decode upto \textit{outlen} items from the input buffer \textit{in} of length \textit{inlen} octets. The function will stop (gracefully) when it runs out of items to decode. -It will fail (for among other reasons) when it runs out of input bytes to read, a data type is invalid or a heap failure occurred. - -For the following types the \textit{size} field will be updated to reflect the number of units read of the given type. -\begin{enumerate} - \item BIT STRING - \item OCTET STRING - \item OBJECT IDENTIFIER - \item IA5 STRING - \item PRINTABLE STRING -\end{enumerate} - -\subsubsection{SEQUENCE Length} - -The length of a SEQUENCE can be determined with the following function. - -\index{der\_length\_sequence()} -\begin{verbatim} -int der_length_sequence(ltc_asn1_list *list, - unsigned long inlen, - unsigned long *outlen); -\end{verbatim} - -This will get the encoding size for the given \textit{list} of length \textit{inlen} and store it in \textit{outlen}. - -\subsubsection{SEQUENCE Multiple Argument Lists} - -For small or simple sequences an encoding or decoding can be performed with one of the following two functions. - -\index{der\_encode\_sequence\_multi()} -\index{der\_decode\_sequence\_multi()} - -\begin{verbatim} -int der_encode_sequence_multi(unsigned char *out, - unsigned long *outlen, ...); - -int der_decode_sequence_multi(const unsigned char *in, - unsigned long inlen, ...); -\end{verbatim} - -These either encode or decode (respectively) a SEQUENCE data type where the items in the sequence are specified after the length parameter. - -The list of items are specified as a triple of the form \textit{(type, size, data)} where \textit{type} is an \textbf{int}, \textit{size} is a \textbf{unsigned long} -and \textit{data} is \textbf{void} pointer. The list of items must be terminated with an item with the type \textbf{LTC\_ASN1\_EOL}. - -It is ideal that you cast the \textit{size} values to unsigned long to ensure that the proper data type is passed to the function. Constants such as \textit{1} without -a cast or prototype are of type \textbf{int} by default. Appending \textit{UL} or pre-pending \textit{(unsigned long)} is enough to cast it to the correct type. - -\begin{small} -\begin{verbatim} -unsigned char buf[MAXBUFSIZE]; -unsigned long buflen; -int err; - - buflen = sizeof(buf); - if ((err = - der_encode_sequence_multi(buf, &buflen, - LTC_ASN1_IA5_STRING, 5UL, "Hello", - LTC_ASN1_IA5_STRING, 7UL, " World!", - LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { - // error handling - } -\end{verbatim} -\end{small} - -This example encodes a SEQUENCE with two IA5 STRING types containing ``Hello'' and `` World!'' respectively. Note the usage of the \textbf{UL} modifier -on the size parameters. This forces the compiler to pass the numbers as the required \textbf{unsigned long} type that the function expects. - -\subsection{SET and SET OF} - -\index{SET} \index{SET OF} -SET and SET OF are related to the SEQUENCE type in that they can be pretty much be decoded with the same code. However, they are different, and they should -be carefully noted. The SET type is an unordered array of ASN.1 types sorted by the TAG (type identifier), whereas the SET OF type is an ordered array of -a \textbf{single} ASN.1 object sorted in ascending order by the DER their respective encodings. - -\subsubsection{SET Encoding} - -SETs use the same array structure of ltc\_asn1\_list that the SEQUENCE functions use. They are encoded with the following function: - -\index{der\_encode\_set()} -\begin{verbatim} -int der_encode_set(ltc_asn1_list *list, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen); -\end{verbatim} - -This will encode the list of ASN.1 objects in \textit{list} of length \textit{inlen} objects, and store the output in \textit{out} of length \textit{outlen} bytes. -The function will make a copy of the list provided, and sort it by the TAG. Objects with identical TAGs are additionally sorted on their original placement in the -array (to make the process deterministic). - -This function will \textbf{NOT} recognize \textit{DEFAULT} objects, and it is the responsibility of the caller to remove them as required. - -\subsubsection{SET Decoding} - -The SET type can be decoded with the following function. - -\index{der\_decode\_set()} -\begin{verbatim} -int der_decode_set(const unsigned char *in, - unsigned long inlen, - ltc_asn1_list *list, - unsigned long outlen); -\end{verbatim} - -This will decode the SET specified by \textit{list} of length \textit{outlen} objects from the input buffer \textit{in} of length \textit{inlen} octets. - -It handles the fact that SETs are not strictly ordered and will make multiple passes (as required) through the list to decode all the objects. - -\subsubsection{SET Length} -The length of a SET can be determined by calling der\_length\_sequence() since they have the same encoding length. - -\subsubsection{SET OF Encoding} -A \textit{SET OF} object is an array of identical objects (e.g. OCTET STRING) sorted in ascending order by the DER encoding of the object. They are -used to store objects deterministically based solely on their encoding. It uses the same array structure of ltc\_asn1\_list that the SEQUENCE functions -use. They are encoded with the following function. - -\index{der\_encode\_setof()} -\begin{verbatim} -int der_encode_setof(ltc_asn1_list *list, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen); -\end{verbatim} - -This will encode a \textit{SET OF} containing the \textit{list} of \textit{inlen} ASN.1 objects and store the encoding in the output buffer \textit{out} of length \textit{outlen}. - -The routine will first encode the SET OF in an unordered fashion (in a temporary buffer) then sort using the XQSORT macro and copy back to the output buffer. This -means you need at least enough memory to keep an additional copy of the output on the heap. - -\subsubsection{SET OF Decoding} -Since the decoding of a \textit{SET OF} object is unambiguous it can be decoded with der\_decode\_sequence(). - -\subsubsection{SET OF Length} -Like the SET type the der\_length\_sequence() function can be used to determine the length of a \textit{SET OF} object. - -\subsection{ASN.1 INTEGER} - -To encode or decode INTEGER data types use the following functions. - -\index{der\_encode\_integer()}\index{der\_decode\_integer()}\index{der\_length\_integer()} -\begin{verbatim} -int der_encode_integer( void *num, - unsigned char *out, - unsigned long *outlen); - -int der_decode_integer(const unsigned char *in, - unsigned long inlen, - void *num); - -int der_length_integer( void *num, - unsigned long *len); -\end{verbatim} - -These will encode or decode a signed INTEGER data type using the bignum data type to store the large INTEGER. To encode smaller values without allocating -a bignum to store the value, the \textit{short} INTEGER functions were made available. - -\index{der\_encode\_short\_integer()}\index{der\_decode\_short\_integer()}\index{der\_length\_short\_integer()} -\begin{verbatim} -int der_encode_short_integer(unsigned long num, - unsigned char *out, - unsigned long *outlen); - -int der_decode_short_integer(const unsigned char *in, - unsigned long inlen, - unsigned long *num); - -int der_length_short_integer(unsigned long num, - unsigned long *outlen); -\end{verbatim} - -These will encode or decode an unsigned \textbf{unsigned long} type (only reads upto 32--bits). For values in the range $0 \dots 2^{32} - 1$ the integer -and short integer functions can encode and decode each others outputs. - -\subsection{ASN.1 BIT STRING} - -\index{der\_encode\_bit\_string()}\index{der\_decode\_bit\_string()}\index{der\_length\_bit\_string()} -\begin{verbatim} -int der_encode_bit_string(const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen); - -int der_decode_bit_string(const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen); - -int der_length_bit_string(unsigned long nbits, - unsigned long *outlen); -\end{verbatim} - -These will encode or decode a BIT STRING data type. The bits are passed in (or read out) using one \textbf{char} per bit. A non--zero value will be interpreted -as a one bit, and a zero value a zero bit. - -\subsection{ASN.1 OCTET STRING} - -\index{der\_encode\_octet\_string()}\index{der\_decode\_octet\_string()}\index{der\_length\_octet\_string()} -\begin{verbatim} -int der_encode_octet_string(const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen); - -int der_decode_octet_string(const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen); - -int der_length_octet_string(unsigned long noctets, - unsigned long *outlen); -\end{verbatim} - -These will encode or decode an OCTET STRING data type. The octets are stored using one \textbf{unsigned char} each. - -\subsection{ASN.1 OBJECT IDENTIFIER} - -\index{der\_encode\_object\_identifier()}\index{der\_decode\_object\_identifier()}\index{der\_length\_object\_identifier()} -\begin{verbatim} -int der_encode_object_identifier(unsigned long *words, - unsigned long nwords, - unsigned char *out, - unsigned long *outlen); - -int der_decode_object_identifier(const unsigned char *in, - unsigned long inlen, - unsigned long *words, - unsigned long *outlen); - -int der_length_object_identifier(unsigned long *words, - unsigned long nwords, - unsigned long *outlen); -\end{verbatim} - -These will encode or decode an OBJECT IDENTIFIER object. The words of the OID are stored in individual \textbf{unsigned long} elements, and must be in the range -$0 \ldots 2^{32} - 1$. - -\subsection{ASN.1 IA5 STRING} - -\index{der\_encode\_ia5\_string()}\index{der\_decode\_ia5\_string()}\index{der\_length\_ia5\_string()} -\begin{verbatim} -int der_encode_ia5_string(const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen); - -int der_decode_ia5_string(const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen); - -int der_length_ia5_string(const unsigned char *octets, - unsigned long noctets, - unsigned long *outlen); -\end{verbatim} - -These will encode or decode an IA5 STRING. The characters are read or stored in individual \textbf{char} elements. These functions performs internal character -to numerical conversions based on the conventions of the compiler being used. For instance, on an x86\_32 machine 'A' == 65 but the same may not be true on -say a SPARC machine. Internally, these functions have a table of literal characters and their numerical ASCII values. This provides a stable conversion provided -that the build platform honours the run--time platforms character conventions. - -\subsection{ASN.1 PRINTABLE STRING} - -\index{der\_encode\_printable\_string()}\index{der\_decode\_printable\_string()}\index{der\_length\_printable\_string()} -\begin{verbatim} -int der_encode_printable_string(const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen); - -int der_decode_printable_string(const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen); - -int der_length_printable_string(const unsigned char *octets, - unsigned long noctets, - unsigned long *outlen); -\end{verbatim} - -These will encode or decode an PRINTABLE STRING. The characters are read or stored in individual \textbf{char} elements. These functions performs internal character -to numerical conversions based on the conventions of the compiler being used. For instance, on an x86\_32 machine 'A' == 65 but the same may not be true on -say a SPARC machine. Internally, these functions have a table of literal characters and their numerical ASCII values. This provides a stable conversion provided -that the build platform honours the run-time platforms character conventions. - -\subsection{ASN.1 UTF8 STRING} - -\index{der\_encode\_utf8\_string()}\index{der\_decode\_utf8\_string()}\index{der\_length\_utf8\_string()} -\begin{verbatim} -int der_encode_utf8_string(const wchar_t *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen); - -int der_decode_utf8_string(const unsigned char *in, - unsigned long inlen, - wchar_t *out, - unsigned long *outlen); - -int der_length_utf8_string(const wchar_t *octets, - unsigned long noctets, - unsigned long *outlen); -\end{verbatim} - -These will encode or decode an UTF8 STRING. The characters are read or stored in individual \textbf{wchar\_t} elements. These function performs no internal -mapping and treat the characters as literals. - -These functions use the \textbf{wchar\_t} type which is not universally available. In those cases, the library will typedef it to \textbf{unsigned long}. If you -intend to use the ISO C functions for working with wide--char arrays, you should make sure that wchar\_t has been defined previously. - -\subsection{ASN.1 UTCTIME} - -The UTCTIME type is to store a date and time in ASN.1 format. It uses the following structure to organize the time. - -\index{ltc\_utctime structure} -\begin{verbatim} -typedef struct { - unsigned YY, /* year 00--99 */ - MM, /* month 01--12 */ - DD, /* day 01--31 */ - hh, /* hour 00--23 */ - mm, /* minute 00--59 */ - ss, /* second 00--59 */ - off_dir, /* timezone offset direction 0 == +, 1 == - */ - off_hh, /* timezone offset hours */ - off_mm; /* timezone offset minutes */ -} ltc_utctime; -\end{verbatim} - -The time can be offset plus or minus a set amount of hours (off\_hh) and minutes (off\_mm). When \textit{off\_dir} is zero, the time will be added otherwise it -will be subtracted. For instance, the array $\lbrace 5, 6, 20, 22, 4, 00, 0, 5, 0 \rbrace$ represents the current time of -\textit{2005, June 20th, 22:04:00} with a time offset of +05h00. - -\index{der\_encode\_utctime()}\index{der\_decode\_utctime()}\index{der\_length\_utctime()} -\begin{verbatim} -int der_encode_utctime( ltc_utctime *utctime, - unsigned char *out, - unsigned long *outlen); - -int der_decode_utctime(const unsigned char *in, - unsigned long *inlen, - ltc_utctime *out); - -int der_length_utctime( ltc_utctime *utctime, - unsigned long *outlen); -\end{verbatim} - -The encoder will store time in one of the two ASN.1 formats, either \textit{YYMMDDhhmmssZ} or \textit{YYMMDDhhmmss$\pm$hhmm}, and perform minimal error checking on the -input. The decoder will read all valid ASN.1 formats and perform range checking on the values (not complete but rational) useful for catching packet errors. - -It is suggested that decoded data be further scrutinized (e.g. days of month in particular). - -\subsection{ASN.1 CHOICE} - -The CHOICE ASN.1 type represents a union of ASN.1 types all of which are stored in a \textit{ltc\_asn1\_list}. There is no encoder for the CHOICE type, only a -decoder. The decoder will scan through the provided list attempting to use the appropriate decoder on the input packet. The list can contain any ASN.1 data -type\footnote{Except it cannot have LTC\_ASN1\_INTEGER and LTC\_ASN1\_SHORT\_INTEGER simultaneously.} except for other CHOICE types. - -There is no encoder for the CHOICE type as the actual DER encoding is the encoding of the chosen type. - -\index{der\_decode\_choice()} -\begin{verbatim} -int der_decode_choice(const unsigned char *in, - unsigned long *inlen, - ltc_asn1_list *list, - unsigned long outlen); -\end{verbatim} - -This will decode the input in the \textit{in} field of length \textit{inlen}. It uses the provided ASN.1 list specified in the \textit{list} field which has -\textit{outlen} elements. The \textit{inlen} field will be updated with the length of the decoded data type, as well as the respective entry in the \textit{list} field -will have the \textit{used} flag set to non--zero to reflect it was the data type decoded. - -\subsection{ASN.1 Flexi Decoder} -The ASN.1 \textit{flexi} decoder allows the developer to decode arbitrary ASN.1 DER packets (provided they use data types LibTomCrypt supports) without first knowing -the structure of the data. Where der\_decode \_sequence() requires the developer to specify the data types to decode in advance the flexi decoder is entirely -free form. - -The flexi decoder uses the same \textit{ltc\_asn1\_list} but instead of being stored in an array it uses the linked list pointers \textit{prev}, \textit{next}, \textit{parent} -and \textit{child}. The list works as a \textit{doubly-linked list} structure where decoded items at the same level are siblings (using next and prev) and items -encoded in a SEQUENCE are stored as a child element. - -When a SEQUENCE or SET has been encountered a SEQUENCE (or SET resp.) item will be added as a sibling (e.g. list.type == LTC\_ASN1\_SEQUENCE) and the child -pointer points to a new list of items contained within the object. - -\index{der\_decode\_sequence\_flexi()} -\begin{verbatim} -int der_decode_sequence_flexi(const unsigned char *in, - unsigned long *inlen, - ltc_asn1_list **out); -\end{verbatim} - -This will decode items in the \textit{in} buffer of max input length \textit{inlen} and store the newly created pointer to the list in \textit{out}. This function allocates -all required memory for the decoding. It stores the number of octets read back into \textit{inlen}. - -The function will terminate when either it hits an invalid ASN.1 tag, or it reads \textit{inlen} octets. An early termination is a soft error, and returns -normally. The decoded list \textit{out} will point to the very first element of the list (e.g. both parent and prev pointers will be \textbf{NULL}). - -An invalid decoding will terminate the process, and free the allocated memory automatically. - -\textbf{Note:} the list decoded by this function is \textbf{NOT} in the correct form for der\_encode\_sequence() to use directly. You will have to first -have to convert the list by first storing all of the siblings in an array then storing all the children as sub-lists of a sequence using the \textit{.data} -pointer. Currently no function in LibTomCrypt provides this ability. - -\subsubsection{Sample Decoding} -Suppose we decode the following structure: -\begin{small} -\begin{verbatim} -User ::= SEQUENCE { - Name IA5 STRING - LoginToken SEQUENCE { - passwdHash OCTET STRING - pubkey ECCPublicKey - } - LastOn UTCTIME -} -\end{verbatim} -\end{small} -\begin{flushleft}and we decoded it with the following code:\end{flushleft} - -\begin{small} -\begin{verbatim} -unsigned char inbuf[MAXSIZE]; -unsigned long inbuflen; -ltc_asn1_list *list; -int err; - -/* somehow fill inbuf/inbuflen */ -if ((err = der_decode_sequence_flexi(inbuf, inbuflen, &list)) != CRYPT_OK) { - printf("Error decoding: %s\n", error_to_string(err)); - exit(EXIT_FAILURE); -} -\end{verbatim} -\end{small} - -At this point \textit{list} would point to the SEQUENCE identified by \textit{User}. It would have no sibblings (prev or next), and only a child node. Walking to the child -node with the following code will bring us to the \textit{Name} portion of the SEQUENCE: -\begin{small} -\begin{verbatim} -list = list->child; -\end{verbatim} -\end{small} -Now \textit{list} points to the \textit{Name} member (with the tag IA5 STRING). The \textit{data}, \textit{size}, and \textit{type} members of \textit{list} should reflect -that of an IA5 STRING. The sibbling will now be the \textit{LoginToken} SEQUENCE. The sibbling has a child node which points to the \textit{passwdHash} OCTET STRING. -We can walk to this node with the following code: -\begin{small} -\begin{verbatim} -/* list already pointing to 'Name' */ -list = list->next->child; -\end{verbatim} -\end{small} -At this point, \textit{list} will point to the \textit{passwdHash} member of the innermost SEQUENCE. This node has a sibbling, the \textit{pubkey} member of the SEQUENCE. -The \textit{LastOn} member of the SEQUENCE is a sibbling of the LoginToken node, if we wanted to walk there we would have to go up and over via: -\begin{small} -\begin{verbatim} -list = list->parent->next; -\end{verbatim} -\end{small} -At this point, we are pointing to the last node of the list. Lists are terminated in all directions by a \textbf{NULL} pointer. All nodes are doubly linked so that you -can walk up and down the nodes without keeping pointers lying around. - - - - - -\subsubsection{Free'ing a Flexi List} -To free the list use the following function. - -\index{der\_sequence\_free()} -\begin{verbatim} -void der_sequence_free(ltc_asn1_list *in); -\end{verbatim} - -This will free all of the memory allocated by der\_decode\_sequence\_flexi(). - -\mysection{Password Based Cryptography} -\subsection{PKCS \#5} -\index{PKCS \#5} -In order to securely handle user passwords for the purposes of creating session keys and chaining IVs the PKCS \#5 was drafted. PKCS \#5 -is made up of two algorithms, Algorithm One and Algorithm Two. Algorithm One is the older fairly limited algorithm which has been implemented -for completeness. Algorithm Two is a bit more modern and more flexible to work with. - -\subsection{Algorithm One} -Algorithm One accepts as input a password, an 8--byte salt, and an iteration counter. The iteration counter is meant to act as delay for -people trying to brute force guess the password. The higher the iteration counter the longer the delay. This algorithm also requires a hash -algorithm and produces an output no longer than the output of the hash. - -\index{pkcs\_5\_alg1()} -\begin{alltt} -int pkcs_5_alg1(const unsigned char *password, - unsigned long password_len, - const unsigned char *salt, - int iteration_count, - int hash_idx, - unsigned char *out, - unsigned long *outlen) -\end{alltt} -Where \textit{password} is the user's password. Since the algorithm allows binary passwords you must also specify the length in \textit{password\_len}. -The \textit{salt} is a fixed size 8--byte array which should be random for each user and session. The \textit{iteration\_count} is the delay desired -on the password. The \textit{hash\_idx} is the index of the hash you wish to use in the descriptor table. - -The output of length up to \textit{outlen} is stored in \textit{out}. If \textit{outlen} is initially larger than the size of the hash functions output -it is set to the number of bytes stored. If it is smaller than not all of the hash output is stored in \textit{out}. - -\subsection{Algorithm Two} - -Algorithm Two is the recommended algorithm for this task. It allows variable length salts, and can produce outputs larger than the -hash functions output. As such, it can easily be used to derive session keys for ciphers and MACs as well initial vectors as required -from a single password and invocation of this algorithm. - -\index{pkcs\_5\_alg2()} -\begin{alltt} -int pkcs_5_alg2(const unsigned char *password, - unsigned long password_len, - const unsigned char *salt, - unsigned long salt_len, - int iteration_count, - int hash_idx, - unsigned char *out, - unsigned long *outlen) -\end{alltt} -Where \textit{password} is the users password. Since the algorithm allows binary passwords you must also specify the length in \textit{password\_len}. -The \textit{salt} is an array of size \textit{salt\_len}. It should be random for each user and session. The \textit{iteration\_count} is the delay desired -on the password. The \textit{hash\_idx} is the index of the hash you wish to use in the descriptor table. The output of length up to -\textit{outlen} is stored in \textit{out}. - -\begin{verbatim} -/* demo to show how to make session state material - * from a password */ -#include -int main(void) -{ - unsigned char password[100], salt[100], - cipher_key[16], cipher_iv[16], - mac_key[16], outbuf[48]; - int err, hash_idx; - unsigned long outlen, password_len, salt_len; - - /* register hash and get it's idx .... */ - - /* get users password and make up a salt ... */ - - /* create the material (100 iterations in algorithm) */ - outlen = sizeof(outbuf); - if ((err = pkcs_5_alg2(password, password_len, salt, - salt_len, 100, hash_idx, outbuf, - &outlen)) - != CRYPT_OK) { - /* error handle */ - } - - /* now extract it */ - memcpy(cipher_key, outbuf, 16); - memcpy(cipher_iv, outbuf+16, 16); - memcpy(mac_key, outbuf+32, 16); - - /* use material (recall to store the salt in the output) */ -} -\end{verbatim} - -\chapter{Miscellaneous} -\mysection{Base64 Encoding and Decoding} -The library provides functions to encode and decode a RFC 1521 base--64 coding scheme. The characters used in the mappings are: -\begin{verbatim} -ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ -\end{verbatim} -Those characters are supported in the 7-bit ASCII map, which means they can be used for transport over -common e-mail, usenet and HTTP mediums. The format of an encoded stream is just a literal sequence of ASCII characters -where a group of four represent 24-bits of input. The first four chars of the encoders output is the length of the -original input. After the first four characters is the rest of the message. - -Often, it is desirable to line wrap the output to fit nicely in an e-mail or usenet posting. The decoder allows you to -put any character (that is not in the above sequence) in between any character of the encoders output. You may not however, -break up the first four characters. - -To encode a binary string in base64 call: -\index{base64\_encode()} \index{base64\_decode()} -\begin{verbatim} -int base64_encode(const unsigned char *in, - unsigned long len, - unsigned char *out, - unsigned long *outlen); -\end{verbatim} -Where \textit{in} is the binary string and \textit{out} is where the ASCII output is placed. You must set the value of \textit{outlen} prior -to calling this function and it sets the length of the base64 output in \textit{outlen} when it is done. To decode a base64 -string call: -\begin{verbatim} -int base64_decode(const unsigned char *in, - unsigned long len, - unsigned char *out, - unsigned long *outlen); -\end{verbatim} - -\mysection{Primality Testing} -\index{Primality Testing} -The library includes primality testing and random prime functions as well. The primality tester will perform the test in -two phases. First it will perform trial division by the first few primes. Second it will perform eight rounds of the -Rabin-Miller primality testing algorithm. If the candidate passes both phases it is declared prime otherwise it is declared -composite. No prime number will fail the two phases but composites can. Each round of the Rabin-Miller algorithm reduces -the probability of a pseudo-prime by $1 \over 4$ therefore after sixteen rounds the probability is no more than -$\left ( { 1 \over 4 } \right )^{8} = 2^{-16}$. In practice the probability of error is in fact much lower than that. - -When making random primes the trial division step is in fact an optimized implementation of \textit{Implementation of Fast RSA Key Generation on Smart Cards}\footnote{Chenghuai Lu, Andre L. M. dos Santos and Francisco R. Pimentel}. -In essence a table of machine-word sized residues are kept of a candidate modulo a set of primes. When the candidate -is rejected and ultimately incremented to test the next number the residues are updated without using multi-word precision -math operations. As a result the routine can scan ahead to the next number required for testing with very little work -involved. - -In the event that a composite did make it through it would most likely cause the the algorithm trying to use it to fail. For -instance, in RSA two primes $p$ and $q$ are required. The order of the multiplicative sub-group (modulo $pq$) is given -as $\phi(pq)$ or $(p - 1)(q - 1)$. The decryption exponent $d$ is found as $de \equiv 1\mbox{ }(\mbox{mod } \phi(pq))$. If either $p$ or $q$ is composite the value of $d$ will be incorrect and the user -will not be able to sign or decrypt messages at all. Suppose $p$ was prime and $q$ was composite this is just a variation of -the multi-prime RSA. Suppose $q = rs$ for two primes $r$ and $s$ then $\phi(pq) = (p - 1)(r - 1)(s - 1)$ which clearly is -not equal to $(p - 1)(rs - 1)$. - -These are not technically part of the LibTomMath library but this is the best place to document them. -To test if a \textit{mp\_int} is prime call: -\begin{verbatim} -int is_prime(mp_int *N, int *result); -\end{verbatim} -This puts a one in \textit{result} if the number is probably prime, otherwise it places a zero in it. It is assumed that if -it returns an error that the value in \textit{result} is undefined. To make -a random prime call: -\begin{verbatim} -int rand_prime( mp_int *N, - unsigned long len, - prng_state *prng, - int wprng); -\end{verbatim} -Where \textit{len} is the size of the prime in bytes ($2 \le len \le 256$). You can set \textit{len} to the negative size you want -to get a prime of the form $p \equiv 3\mbox{ }(\mbox{mod } 4)$. So if you want a 1024-bit prime of this sort pass -\textit{len = -128} to the function. Upon success it will return {\bf CRYPT\_OK} and \textit{N} will contain an integer which -is very likely prime. - -\chapter{Programming Guidelines} - -\mysection{Secure Pseudo Random Number Generators} -Probably the single most vulnerable point of any cryptosystem is the PRNG. Without one, generating and protecting secrets -would be impossible. The requirement that one be setup correctly is vitally important, and to address this point the library -does provide two RNG sources that will address the largest amount of end users as possible. The \textit{sprng} PRNG provides an easy to -access source of entropy for any application on a UNIX (and the like) or Windows computer. - -However, when the end user is not on one of these platforms, the application developer must address the issue of finding -entropy. This manual is not designed to be a text on cryptography. I would just like to highlight that when you design -a cryptosystem make sure the first problem you solve is getting a fresh source of entropy. - -\mysection{Preventing Trivial Errors} -Two simple ways to prevent trivial errors is to prevent overflows, and to check the return values. All of the functions -which output variable length strings will require you to pass the length of the destination. If the size of your output -buffer is smaller than the output it will report an error. Therefore, make sure the size you pass is correct! - -Also, virtually all of the functions return an error code or {\bf CRYPT\_OK}. You should detect all errors, as simple -typos can cause algorithms to fail to work as desired. - -\mysection{Registering Your Algorithms} -To avoid linking and other run--time errors it is important to register the ciphers, hashes and PRNGs you intend to use -before you try to use them. This includes any function which would use an algorithm indirectly through a descriptor table. - -A neat bonus to the registry system is that you can add external algorithms that are not part of the library without -having to hack the library. For example, suppose you have a hardware specific PRNG on your system. You could easily -write the few functions required plus a descriptor. After registering your PRNG, all of the library functions that -need a PRNG can instantly take advantage of it. The same applies for ciphers, hashes, and bignum math routines. - -\mysection{Key Sizes} - -\subsection{Symmetric Ciphers} -For symmetric ciphers, use as large as of a key as possible. For the most part \textit{bits are cheap} so using a 256--bit key -is not a hard thing to do. As a good rule of thumb do not use a key smaller than 128 bits. - -\subsection{Asymmetric Ciphers} -The following chart gives the work factor for solving a DH/RSA public key using the NFS. The work factor for a key of order -$n$ is estimated to be -\begin{equation} -e^{1.923 \cdot ln(n)^{1 \over 3} \cdot ln(ln(n))^{2 \over 3}} -\end{equation} - -Note that $n$ is not the bit-length but the magnitude. For example, for a 1024-bit key $n = 2^{1024}$. The work required -is: -\begin{figure}[here] -\begin{center} -\begin{tabular}{|c|c|} - \hline RSA/DH Key Size (bits) & Work Factor ($log_2$) \\ - \hline 512 & 63.92 \\ - \hline 768 & 76.50 \\ - \hline 1024 & 86.76 \\ - \hline 1536 & 103.37 \\ - \hline 2048 & 116.88 \\ - \hline 2560 & 128.47 \\ - \hline 3072 & 138.73 \\ - \hline 4096 & 156.49 \\ - \hline -\end{tabular} -\end{center} -\caption{RSA/DH Key Strength} -\end{figure} - -The work factor for ECC keys is much higher since the best attack is still fully exponential. Given a key of magnitude -$n$ it requires $\sqrt n$ work. The following table summarizes the work required: -\begin{figure}[here] -\begin{center} -\begin{tabular}{|c|c|} - \hline ECC Key Size (bits) & Work Factor ($log_2$) \\ - \hline 112 & 56 \\ - \hline 128 & 64 \\ - \hline 160 & 80 \\ - \hline 192 & 96 \\ - \hline 224 & 112 \\ - \hline 256 & 128 \\ - \hline 384 & 192 \\ - \hline 521 & 260.5 \\ - \hline -\end{tabular} -\end{center} -\caption{ECC Key Strength} -\end{figure} - -Using the above tables the following suggestions for key sizes seems appropriate: -\begin{center} -\begin{tabular}{|c|c|c|} - \hline Security Goal & RSA/DH Key Size (bits) & ECC Key Size (bits) \\ - \hline Near term & 1024 & 160 \\ - \hline Short term & 1536 & 192 \\ - \hline Long Term & 2560 & 384 \\ - \hline -\end{tabular} -\end{center} - -\mysection{Thread Safety} -The library is not fully thread safe but several simple precautions can be taken to avoid any problems. The registry functions -such as register\_cipher() are not thread safe no matter what you do. It is best to call them from your programs initialization -code before threads are initiated. - -The rest of the code uses state variables you must pass it such as hash\_state, hmac\_state, etc. This means that if each -thread has its own state variables then they will not affect each other, and are fully thread safe. This is fairly simple with symmetric ciphers -and hashes. - -\index{LTC\_PTHREAD} -The only sticky issue is a shared PRNG which can be alleviated with the careful use of mutex devices. Defining LTC\_PTHREAD for instance, enables -pthreads based mutex locking in various routines such as the Yarrow and Fortuna PRNGs, the fixed point ECC multiplier, and other routines. - -\chapter{Configuring and Building the Library} -\mysection{Introduction} -The library is fairly flexible about how it can be built, used, and generally distributed. Additions are being made with -each new release that will make the library even more flexible. Each of the classes of functions can be disabled during -the build process to make a smaller library. This is particularly useful for shared libraries. - -As of v1.06 of the library, the build process has been moved to two steps for the typical LibTomCrypt application. This is because -LibTomCrypt no longer provides a math API on its own and relies on third party libraries (such as LibTomMath, GnuMP, or TomsFastMath). - -The build process now consists of installing a math library first, and then building and installing LibTomCrypt with a math library -configured. Note that LibTomCrypt can be built with no internal math descriptors. This means that one must be provided at either -build, or run time for the application. LibTomCrypt comes with three math descriptors that provide a standard interface to math -libraries. - -\mysection{Makefile variables} - -All GNU driven makefiles (including the makefile for ICC) use a set of common variables to control the build and install process. Most of the -settings can be overwritten from the command line which makes custom installation a breeze. - -\index{MAKE}\index{CC}\index{AR} -\subsection{MAKE, CC and AR} -The MAKE, CC and AR flags can all be overwritten. They default to \textit{make}, \textit{\$CC} and \textit{\$AR} respectively. -Changing MAKE allows you to change what program will be invoked to handle sub--directories. For example, this - -\begin{verbatim} -MAKE=gmake gmake install -\end{verbatim} - -\begin{flushleft} will build and install the libraries with the \textit{gmake} tool. Similarly, \end{flushleft} - -\begin{verbatim} -CC=arm-gcc AR=arm-ar make -\end{verbatim} - -\begin{flushleft} will build the library using \textit{arm--gcc} as the compiler and \textit{arm--ar} as the archiver. \end{flushleft} - -\subsection{IGNORE\_SPEED} -\index{IGNORE\_SPEED} -When \textbf{IGNORE\_SPEED} has been defined the default optimization flags for CFLAGS will be disabled which allows the developer to specify new -CFLAGS on the command line. E.g. to add debugging - -\begin{verbatim} -CFLAGS="-g3" make IGNORE_SPEED=1 -\end{verbatim} - -This will turn off optimizations and add \textit{-g3} to the CFLAGS which enables debugging. - -\subsection{LIBNAME and LIBNAME\_S} -\index{LIBNAME} \index{LIBNAME\_S} -\textbf{LIBNAME} is the name of the output library (archive) to create. It defaults to \textit{libtomcrypt.a} for static builds and \textit{libtomcrypt.la} for -shared. The \textbf{LIBNAME\_S} variable is the static name while doing shared builds. Ideally they should have the same prefix but don't have to. - -\index{LIBTEST} \index{LIBTEST\_S} -Similarly \textbf{LIBTEST} and \textbf{LIBTEST\_S} are the names for the profiling and testing library. The default is \textit{libtomcrypt\_prof.a} for -static and \textit{libtomcrypt\_prof.la} for shared. - -\subsection{Installation Directories} -\index{DESTDIR} \index{LIBPATH} \index{INCPATH} \index{DATADIR} -\textbf{DESTDIR} is the prefix for the installation directories. It defaults to an empty string. \textbf{LIBPATH} is the prefix for the library -directory which defaults to \textit{/usr/lib}. \textbf{INCPATH} is the prefix for the header file directory which defaults to \textit{/usr/include}. -\textbf{DATADIR} is the prefix for the data (documentation) directory which defaults to \textit{/usr/share/doc/libtomcrypt/pdf}. - -All four can be used to create custom install locations depending on the nature of the OS and file system in use. - -\begin{verbatim} -make LIBPATH=/home/tom/project/lib INCPATH=/home/tom/project/include \ - DATAPATH=/home/tom/project/docs install -\end{verbatim} - -This will build the library and install it to the directories under \textit{/home/tom/project/}. e.g. - -\begin{small} -\begin{verbatim} -/home/tom/project/: -total 1 -drwxr-xr-x 2 tom users 80 Jul 30 16:02 docs -drwxr-xr-x 2 tom users 528 Jul 30 16:02 include -drwxr-xr-x 2 tom users 80 Jul 30 16:02 lib - -/home/tom/project/docs: -total 452 --rwxr-xr-x 1 tom users 459009 Jul 30 16:02 crypt.pdf - -/home/tom/project/include: -total 132 --rwxr-xr-x 1 tom users 2482 Jul 30 16:02 tomcrypt.h --rwxr-xr-x 1 tom users 702 Jul 30 16:02 tomcrypt_argchk.h --rwxr-xr-x 1 tom users 2945 Jul 30 16:02 tomcrypt_cfg.h --rwxr-xr-x 1 tom users 22763 Jul 30 16:02 tomcrypt_cipher.h --rwxr-xr-x 1 tom users 5174 Jul 30 16:02 tomcrypt_custom.h --rwxr-xr-x 1 tom users 11314 Jul 30 16:02 tomcrypt_hash.h --rwxr-xr-x 1 tom users 11571 Jul 30 16:02 tomcrypt_mac.h --rwxr-xr-x 1 tom users 13614 Jul 30 16:02 tomcrypt_macros.h --rwxr-xr-x 1 tom users 14714 Jul 30 16:02 tomcrypt_math.h --rwxr-xr-x 1 tom users 632 Jul 30 16:02 tomcrypt_misc.h --rwxr-xr-x 1 tom users 10934 Jul 30 16:02 tomcrypt_pk.h --rwxr-xr-x 1 tom users 2634 Jul 30 16:02 tomcrypt_pkcs.h --rwxr-xr-x 1 tom users 7067 Jul 30 16:02 tomcrypt_prng.h --rwxr-xr-x 1 tom users 1467 Jul 30 16:02 tomcrypt_test.h - -/home/tom/project/lib: -total 1073 --rwxr-xr-x 1 tom users 1096284 Jul 30 16:02 libtomcrypt.a -\end{verbatim} -\end{small} - -\mysection{Extra libraries} -\index{EXTRALIBS} -\textbf{EXTRALIBS} specifies any extra libraries required to link the test programs and shared libraries. They are specified in the notation -that GCC expects for global archives. - -\begin{verbatim} -CFLAGS="-DTFM_DESC -DUSE_TFM" EXTRALIBS=-ltfm make install \ - test timing -\end{verbatim} - -This will install the library using the TomsFastMath library and link the \textit{libtfm.a} library out of the default library search path. The two -defines are explained below. You can specify multiple archives (say if you want to support two math libraries, or add on additional code) to -the \textbf{EXTRALIBS} variable by separating them by a space. - -Note that \textbf{EXTRALIBS} is not required if you are only making and installing the static library but none of the test programs. - -\mysection{Building a Static Library} - -Building a static library is fairly trivial as it only requires one invocation of the GNU make command. - -\begin{verbatim} -CFLAGS="-DTFM_DESC" make install -\end{verbatim} - -That will build LibTomCrypt (including the TomsFastMath descriptor), and install it in the default locations indicated previously. You can enable -the built--in LibTomMath descriptor as well (or in place of the TomsFastMath descriptor). Similarly, you can build the library with no built--in -math descriptors. - -\begin{verbatim} -make install -\end{verbatim} - -In this case, no math descriptors are present in the library and they will have to be made available at build or run time before you can use any of the -public key functions. - -Note that even if you include the built--in descriptors you must link against the source library as well. - -\begin{verbatim} -gcc -DTFM_DESC myprogram.c -ltomcrypt -ltfm -o myprogram -\end{verbatim} - -This will compile \textit{myprogram} and link it against the LibTomCrypt library as well as TomsFastMath (which must have been previously installed). Note that -we define \textbf{TFM\_DESC} for compilation. This is so that the TFM descriptor symbol will be defined for the client application to make use of without -giving warnings. - -\mysection{Building a Shared Library} - -LibTomCrypt can also be built as a shared library through the \textit{makefile.shared} make script. It is similar to use as the static script except -that you \textbf{must} specify the \textbf{EXTRALIBS} variable at install time. - -\begin{verbatim} -CFLAGS="-DTFM_DESC" EXTRALIBS=-ltfm make -f makefile.shared install -\end{verbatim} - -This will build and install the library and link the shared object against the TomsFastMath library (which must be installed as a shared object as well). The -shared build process requires libtool to be installed. - -\mysection{Header Configuration} -The file \textit{tomcrypt\_cfg.h} is what lets you control various high level macros which control the behaviour of the library. Build options are also -stored in \textit{tomcrypt\_custom.h} which allow the enabling and disabling of various algorithms. - -\subsubsection{ARGTYPE} -This lets you control how the LTC\_ARGCHK macro will behave. The macro is used to check pointers inside the functions against -NULL. There are four settings for ARGTYPE. When set to 0, it will have the default behaviour of printing a message to -stderr and raising a SIGABRT signal. This is provided so all platforms that use LibTomCrypt can have an error that functions -similarly. When set to 1, it will simply pass on to the assert() macro. When set to 2, the macro will display the error to -stderr then return execution to the caller. This could lead to a segmentation fault (e.g. when a pointer is \textbf{NULL}) but is useful -if you handle signals on your own. When set to 3, it will resolve to a empty macro and no error checking will be performed. Finally, when set -to 4, it will return CRYPT\_INVALID\_ARG to the caller. - -\subsubsection{Endianess} -There are five macros related to endianess issues. For little endian platforms define, \textbf{ENDIAN\_LITTLE}. For big endian -platforms define \textbf{ENDIAN\_BIG}. Similarly when the default word size of an \textit{unsigned long} is 32-bits define \textbf{ENDIAN\_32BITWORD} -or define \textbf{ENDIAN\_64BITWORD} when its 64-bits. If you do not define any of them the library will automatically use \textbf{ENDIAN\_NEUTRAL} -which will work on all platforms. - -Currently LibTomCrypt will detect x86-32, x86-64, MIPS R5900, SPARC and SPARC64 running GCC as well as x86-32 running MSVC. - -\mysection{The Configure Script} -There are also options you can specify from the \textit{tomcrypt\_custom.h} header file. - -\subsection{X memory routines} -\index{XMALLOC}\index{XCALLOC}\index{XREALLOC}\index{XFREE} -At the top of tomcrypt\_custom.h are a series of macros denoted as XMALLOC, XCALLOC, XREALLOC, XFREE, and so on. They resolve to -the name of the respective functions from the standard C library by default. This lets you substitute in your own memory routines. -If you substitute in your own functions they must behave like the standard C library functions in terms of what they expect as input and -output. - -These macros are handy for working with platforms which do not have a standard C library. For instance, the OLPC\footnote{See http://dev.laptop.org/git?p=bios-crypto;a=summary} -bios code uses these macros to redirect to very compact heap and string operations. - -\subsection{X clock routines} -The rng\_get\_bytes() function can call a function that requires the clock() function. These macros let you override -the default clock() used with a replacement. By default the standard C library clock() function is used. - -\subsection{LTC\_NO\_FILE} -During the build if LTC\_NO\_FILE is defined then any function in the library that uses file I/O will not call the file I/O -functions and instead simply return CRYPT\_NOP. This should help resolve any linker errors stemming from a lack of -file I/O on embedded platforms. - -\subsection{LTC\_CLEAN\_STACK} -When this functions is defined the functions that store key material on the stack will clean up afterwards. -Assumes that you have no memory paging with the stack. - -\subsection{LTC\_TEST} -When this has been defined the various self--test functions (for ciphers, hashes, prngs, etc) are included in the build. This is the default configuration. -If LTC\_NO\_TEST has been defined, the testing routines will be compacted and only return CRYPT\_NOP. - -\subsection{LTC\_NO\_FAST} -When this has been defined the library will not use faster word oriented operations. By default, they are only enabled for platforms -which can be auto-detected. This macro ensures that they are never enabled. - -\subsection{LTC\_FAST} -This mode (auto-detected with x86\_32,x86\_64 platforms with GCC or MSVC) configures various routines such as ctr\_encrypt() or -cbc\_encrypt() that it can safely XOR multiple octets in one step by using a larger data type. This has the benefit of -cutting down the overhead of the respective functions. - -This mode does have one downside. It can cause unaligned reads from memory if you are not careful with the functions. This is why -it has been enabled by default only for the x86 class of processors where unaligned accesses are allowed. Technically LTC\_FAST -is not \textit{portable} since unaligned accesses are not covered by the ISO C specifications. - -In practice however, you can use it on pretty much any platform (even MIPS) with care. - -By design the \textit{fast} mode functions won't get unaligned on their own. For instance, if you call ctr\_encrypt() right after calling -ctr\_start() and all the inputs you gave are aligned than ctr\_encrypt() will perform aligned memory operations only. However, if you -call ctr\_encrypt() with an odd amount of plaintext then call it again the CTR pad (the IV) will be partially used. This will -cause the ctr routine to first use up the remaining pad bytes. Then if there are enough plaintext bytes left it will use -whole word XOR operations. These operations will be unaligned. - -The simplest precaution is to make sure you process all data in power of two blocks and handle \textit{remainder} at the end. e.g. If you are -CTR'ing a long stream process it in blocks of (say) four kilobytes and handle any remaining incomplete blocks at the end of the stream. - -\index{LTC\_FAST\_TYPE} -If you do plan on using the \textit{LTC\_FAST} mode you have to also define a \textit{LTC\_FAST\_TYPE} macro which resolves to an optimal sized -data type you can perform integer operations with. Ideally it should be four or eight bytes since it must properly divide the size -of your block cipher (e.g. 16 bytes for AES). This means sadly if you're on a platform with 57--bit words (or something) you can't -use this mode. So sad. - -\subsection{LTC\_NO\_ASM} -When this has been defined the library will not use any inline assembler. Only a few platforms support assembler inlines but various versions of ICC and GCC -cannot handle all of the assembler functions. - -\subsection{Symmetric Ciphers, One-way Hashes, PRNGS and Public Key Functions} -There are a plethora of macros for the ciphers, hashes, PRNGs and public key functions which are fairly -self-explanatory. When they are defined the functionality is included otherwise it is not. There are some -dependency issues which are noted in the file. For instance, Yarrow requires CTR chaining mode, a block -cipher and a hash function. - -Also see technical note number five for more details. - -\subsection{LTC\_EASY} -When defined the library is configured to build fewer algorithms and modes. Mostly it sticks to NIST and ANSI approved algorithms. See -the header file \textit{tomcrypt\_custom.h} for more details. It is meant to provide literally an easy method of trimming the library -build to the most minimum of useful functionality. - -\subsection{TWOFISH\_SMALL and TWOFISH\_TABLES} -Twofish is a 128-bit symmetric block cipher that is provided within the library. The cipher itself is flexible enough -to allow some trade-offs in the implementation. When TWOFISH\_SMALL is defined the scheduled symmetric key for Twofish -requires only 200 bytes of memory. This is achieved by not pre-computing the substitution boxes. Having this -defined will also greatly slow down the cipher. When this macro is not defined Twofish will pre-compute the -tables at a cost of 4KB of memory. The cipher will be much faster as a result. - -When TWOFISH\_TABLES is defined the cipher will use pre-computed (and fixed in code) tables required to work. This is -useful when TWOFISH\_SMALL is defined as the table values are computed on the fly. When this is defined the code size -will increase by approximately 500 bytes. If this is defined but TWOFISH\_SMALL is not the cipher will still work but -it will not speed up the encryption or decryption functions. - -\subsection{GCM\_TABLES} -When defined GCM will use a 64KB table (per GCM state) which will greatly speed up the per--packet latency. -It also increases the initialization time and is not suitable when you are going to use a key a few times only. - -\subsection{GCM\_TABLES\_SSE2} -\index{SSE2} -When defined GCM will use the SSE2 instructions to perform the $GF(2^x)$ multiply using 16 128--bit XOR operations. It shaves a few cycles per byte -of GCM output on both the AMD64 and Intel Pentium 4 platforms. Requires GCC and an SSE2 equipped platform. - -\subsection{LTC\_SMALL\_CODE} -When this is defined some of the code such as the Rijndael and SAFER+ ciphers are replaced with smaller code variants. -These variants are slower but can save quite a bit of code space. - -\subsection{LTC\_PTHREAD} -When this is activated all of the descriptor table functions will use pthread locking to ensure thread safe updates to the tables. Note that -it doesn't prevent a thread that is passively using a table from being messed up by another thread that updates the table. - -Generally the rule of thumb is to setup the tables once at startup and then leave them be. This added build flag simply makes updating -the tables safer. - -\subsection{LTC\_ECC\_TIMING\_RESISTANT} -When this has been defined the ECC point multiplier (built--in to the library) will use a timing resistant point multiplication -algorithm which prevents leaking key bits of the private key (scalar). It is a slower algorithm but useful for situations -where timing side channels pose a significant threat. - -\subsection{Math Descriptors} -The library comes with three math descriptors that allow you to interface the public key cryptography API to freely available math -libraries. When \textbf{GMP\_DESC}, \textbf{LTM\_DESC}, or \textbf{TFM\_DESC} are defined -descriptors for the respective library are built and included in the library as \textit{gmp\_desc}, \textit{ltm\_desc}, or \textit{tfm\_desc} respectively. - -In the test demos that use the libraries the additional flags \textbf{USE\_GMP}, \textbf{USE\_LTM}, and \textbf{USE\_TFM} can be defined -to tell the program which library to use. Only one of the USE flags can be defined at once. - -\index{GMP\_DESC} \index{USE\_GMP} \index{LTM\_DESC} \index{TFM\_DESC} \index{USE\_LTM} \index{USE\_TFM} -\begin{small} -\begin{verbatim} -CFLAGS="-DGMP_DESC -DLTM_DESC -DTFM_DESC -DUSE_TFM" \ -EXTRALIBS="-lgmp -ltommath -ltfm" make -f makefile.shared install timing -\end{verbatim} -\end{small} - -That will build and install the library with all descriptors (and link against all), but only use TomsFastMath in the timing demo. - -\chapter{Optimizations} -\mysection{Introduction} -The entire API was designed with plug and play in mind at the low level. That is you can swap out any cipher, hash, PRNG or bignum library and the dependent API will not -require updating. This has the nice benefit that one can add ciphers (etc.) not have to re--write portions of the API. For the most part, LibTomCrypt has also been written -to be highly portable and easy to build out of the box on pretty much any platform. As such there are no assembler inlines throughout the code, I make no assumptions -about the platform, etc... - -That works well for most cases but there are times where performance is of the essence. This API allows optimized routines to be dropped in--place of the existing -portable routines. For instance, hand optimized assembler versions of AES could be provided. Any existing function that uses the cipher could automatically use -the optimized code without re--writing. This also paves the way for hardware drivers that can access hardware accelerated cryptographic devices. - -At the heart of this flexibility is the \textit{descriptor} system. A descriptor is essentially just a C \textit{struct} which describes the algorithm and provides pointers -to functions that do the required work. For a given class of operation (e.g. cipher, hash, prng, bignum) the functions of a descriptor have identical prototypes which makes -development simple. In most dependent routines all an end developer has to do is register\_XXX() the descriptor and they are set. - -\mysection{Ciphers} -The ciphers in LibTomCrypt are accessed through the ltc\_cipher\_descriptor structure. - -\label{sec:cipherdesc} -\begin{small} -\begin{verbatim} -struct ltc_cipher_descriptor { - /** name of cipher */ - char *name; - - /** internal ID */ - unsigned char ID; - - /** min keysize (octets) */ - int min_key_length, - - /** max keysize (octets) */ - max_key_length, - - /** block size (octets) */ - block_length, - - /** default number of rounds */ - default_rounds; - - /** Setup the cipher - @param key The input symmetric key - @param keylen The length of the input key (octets) - @param num_rounds The requested number of rounds (0==default) - @param skey [out] The destination of the scheduled key - @return CRYPT_OK if successful - */ - int (*setup)(const unsigned char *key, - int keylen, - int num_rounds, - symmetric_key *skey); - - /** Encrypt a block - @param pt The plaintext - @param ct [out] The ciphertext - @param skey The scheduled key - @return CRYPT_OK if successful - */ - int (*ecb_encrypt)(const unsigned char *pt, - unsigned char *ct, - symmetric_key *skey); - - /** Decrypt a block - @param ct The ciphertext - @param pt [out] The plaintext - @param skey The scheduled key - @return CRYPT_OK if successful - */ - int (*ecb_decrypt)(const unsigned char *ct, - unsigned char *pt, - symmetric_key *skey); - - /** Test the block cipher - @return CRYPT_OK if successful, - CRYPT_NOP if self-testing has been disabled - */ - int (*test)(void); - - /** Terminate the context - @param skey The scheduled key - */ - void (*done)(symmetric_key *skey); - - /** Determine a key size - @param keysize [in/out] The size of the key desired - The suggested size - @return CRYPT_OK if successful - */ - int (*keysize)(int *keysize); - -/** Accelerators **/ - /** Accelerated ECB encryption - @param pt Plaintext - @param ct Ciphertext - @param blocks The number of complete blocks to process - @param skey The scheduled key context - @return CRYPT_OK if successful - */ - int (*accel_ecb_encrypt)(const unsigned char *pt, - unsigned char *ct, - unsigned long blocks, - symmetric_key *skey); - - /** Accelerated ECB decryption - @param pt Plaintext - @param ct Ciphertext - @param blocks The number of complete blocks to process - @param skey The scheduled key context - @return CRYPT_OK if successful - */ - int (*accel_ecb_decrypt)(const unsigned char *ct, - unsigned char *pt, - unsigned long blocks, - symmetric_key *skey); - - /** Accelerated CBC encryption - @param pt Plaintext - @param ct Ciphertext - @param blocks The number of complete blocks to process - @param IV The initial value (input/output) - @param skey The scheduled key context - @return CRYPT_OK if successful - */ - int (*accel_cbc_encrypt)(const unsigned char *pt, - unsigned char *ct, - unsigned long blocks, - unsigned char *IV, - symmetric_key *skey); - - /** Accelerated CBC decryption - @param pt Plaintext - @param ct Ciphertext - @param blocks The number of complete blocks to process - @param IV The initial value (input/output) - @param skey The scheduled key context - @return CRYPT_OK if successful - */ - int (*accel_cbc_decrypt)(const unsigned char *ct, - unsigned char *pt, - unsigned long blocks, - unsigned char *IV, - symmetric_key *skey); - - /** Accelerated CTR encryption - @param pt Plaintext - @param ct Ciphertext - @param blocks The number of complete blocks to process - @param IV The initial value (input/output) - @param mode little or big endian counter (mode=0 or mode=1) - @param skey The scheduled key context - @return CRYPT_OK if successful - */ - int (*accel_ctr_encrypt)(const unsigned char *pt, - unsigned char *ct, - unsigned long blocks, - unsigned char *IV, - int mode, - symmetric_key *skey); - - /** Accelerated LRW - @param pt Plaintext - @param ct Ciphertext - @param blocks The number of complete blocks to process - @param IV The initial value (input/output) - @param tweak The LRW tweak - @param skey The scheduled key context - @return CRYPT_OK if successful - */ - int (*accel_lrw_encrypt)(const unsigned char *pt, - unsigned char *ct, - unsigned long blocks, - unsigned char *IV, - const unsigned char *tweak, - symmetric_key *skey); - - /** Accelerated LRW - @param ct Ciphertext - @param pt Plaintext - @param blocks The number of complete blocks to process - @param IV The initial value (input/output) - @param tweak The LRW tweak - @param skey The scheduled key context - @return CRYPT_OK if successful - */ - int (*accel_lrw_decrypt)(const unsigned char *ct, - unsigned char *pt, - unsigned long blocks, - unsigned char *IV, - const unsigned char *tweak, - symmetric_key *skey); - - /** Accelerated CCM packet (one-shot) - @param key The secret key to use - @param keylen The length of the secret key (octets) - @param uskey A previously scheduled key [can be NULL] - @param nonce The session nonce [use once] - @param noncelen The length of the nonce - @param header The header for the session - @param headerlen The length of the header (octets) - @param pt [out] The plaintext - @param ptlen The length of the plaintext (octets) - @param ct [out] The ciphertext - @param tag [out] The destination tag - @param taglen [in/out] The max size and resulting size - of the authentication tag - @param direction Encrypt or Decrypt direction (0 or 1) - @return CRYPT_OK if successful - */ - int (*accel_ccm_memory)( - const unsigned char *key, unsigned long keylen, - symmetric_key *uskey, - const unsigned char *nonce, unsigned long noncelen, - const unsigned char *header, unsigned long headerlen, - unsigned char *pt, unsigned long ptlen, - unsigned char *ct, - unsigned char *tag, unsigned long *taglen, - int direction); - - /** Accelerated GCM packet (one shot) - @param key The secret key - @param keylen The length of the secret key - @param IV The initial vector - @param IVlen The length of the initial vector - @param adata The additional authentication data (header) - @param adatalen The length of the adata - @param pt The plaintext - @param ptlen The length of the plaintext/ciphertext - @param ct The ciphertext - @param tag [out] The MAC tag - @param taglen [in/out] The MAC tag length - @param direction Encrypt or Decrypt mode (GCM_ENCRYPT or GCM_DECRYPT) - @return CRYPT_OK on success - */ - int (*accel_gcm_memory)( - const unsigned char *key, unsigned long keylen, - const unsigned char *IV, unsigned long IVlen, - const unsigned char *adata, unsigned long adatalen, - unsigned char *pt, unsigned long ptlen, - unsigned char *ct, - unsigned char *tag, unsigned long *taglen, - int direction); - - /** Accelerated one shot OMAC - @param key The secret key - @param keylen The key length (octets) - @param in The message - @param inlen Length of message (octets) - @param out [out] Destination for tag - @param outlen [in/out] Initial and final size of out - @return CRYPT_OK on success - */ - int (*omac_memory)( - const unsigned char *key, unsigned long keylen, - const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen); - - /** Accelerated one shot XCBC - @param key The secret key - @param keylen The key length (octets) - @param in The message - @param inlen Length of message (octets) - @param out [out] Destination for tag - @param outlen [in/out] Initial and final size of out - @return CRYPT_OK on success - */ - int (*xcbc_memory)( - const unsigned char *key, unsigned long keylen, - const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen); - - /** Accelerated one shot F9 - @param key The secret key - @param keylen The key length (octets) - @param in The message - @param inlen Length of message (octets) - @param out [out] Destination for tag - @param outlen [in/out] Initial and final size of out - @return CRYPT_OK on success - @remark Requires manual padding - */ - int (*f9_memory)( - const unsigned char *key, unsigned long keylen, - const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen); -}; -\end{verbatim} -\end{small} - -\subsection{Name} -\index{find\_cipher()} -The \textit{name} parameter specifies the name of the cipher. This is what a developer would pass to find\_cipher() to find the cipher in the descriptor -tables. - -\subsection{Internal ID} -This is a single byte Internal ID you can use to distinguish ciphers from each other. - -\subsection{Key Lengths} -The minimum key length is \textit{min\_key\_length} and is measured in octets. Similarly the maximum key length is \textit{max\_key\_length}. They can be equal -and both must valid key sizes for the cipher. Values in between are not assumed to be valid though they may be. - -\subsection{Block Length} -The size of the ciphers plaintext or ciphertext is \textit{block\_length} and is measured in octets. - -\subsection{Rounds} -Some ciphers allow different number of rounds to be used. Usually you just use the default. The default round count is \textit{default\_rounds}. - -\subsection{Setup} -To initialize a cipher (for ECB mode) the function setup() was provided. It accepts an array of key octets \textit{key} of length \textit{keylen} octets. The user -can specify the number of rounds they want through \textit{num\_rounds} where $num\_rounds = 0$ means use the default. The destination of a scheduled key is stored -in \textit{skey}. - -Inside the \textit{symmetric\_key} union there is a \textit{void *data} which you can use to allocate data if you need a data structure that does not fit with the existing -ones provided. Just make sure in your \textit{done()} function that you free the allocated memory. - -\subsection{Single block ECB} -To process a single block in ECB mode the ecb\_encrypt() and ecb\_decrypt() functions were provided. The plaintext and ciphertext buffers are allowed to overlap so you -must make sure you do not overwrite the output before you are finished with the input. - -\subsection{Testing} -The test() function is used to self--test the \textit{device}. It takes no arguments and returns \textbf{CRYPT\_OK} if all is working properly. You may return -\textbf{CRYPT\_NOP} to indicate that no testing was performed. - -\subsection{Key Sizing} -Occasionally, a function will want to find a suitable key size to use since the input is oddly sized. The keysize() function is for this case. It accepts a -pointer to an integer which represents the desired size. The function then has to match it to the exact or a lower key size that is valid for the cipher. For -example, if the input is $25$ and $24$ is valid then it stores $24$ back in the pointed to integer. It must not round up and must return an error if the keysize - cannot be mapped to a valid key size for the cipher. - -\subsection{Acceleration} -The next set of functions cover the accelerated functionality of the cipher descriptor. Any combination of these functions may be set to \textbf{NULL} to indicate -it is not supported. In those cases the software defaults are used (using the single ECB block routines). - -\subsubsection{Accelerated ECB} -These two functions are meant for cases where a user wants to encrypt (in ECB mode no less) an array of blocks. These functions are accessed -through the accel\_ecb\_encrypt and accel\_ecb\_decrypt pointers. The \textit{blocks} count is the number of complete blocks to process. - -\subsubsection{Accelerated CBC} -These two functions are meant for accelerated CBC encryption. These functions are accessed through the accel\_cbc\_encrypt and accel\_cbc\_decrypt pointers. -The \textit{blocks} value is the number of complete blocks to process. The \textit{IV} is the CBC initial vector. It is an input upon calling this function and must be -updated by the function before returning. - -\subsubsection{Accelerated CTR} -This function is meant for accelerated CTR encryption. It is accessible through the accel\_ctr\_encrypt pointer. -The \textit{blocks} value is the number of complete blocks to process. The \textit{IV} is the CTR counter vector. It is an input upon calling this function and must be -updated by the function before returning. The \textit{mode} value indicates whether the counter is big (mode = CTR\_COUNTER\_BIG\_ENDIAN) or -little (mode = CTR\_COUNTER\_LITTLE\_ENDIAN) endian. - -This function (and the way it's called) differs from the other two since ctr\_encrypt() allows any size input plaintext. The accelerator will only be -called if the following conditions are met. - -\begin{enumerate} - \item The accelerator is present - \item The CTR pad is empty - \item The remaining length of the input to process is greater than or equal to the block size. -\end{enumerate} - -The \textit{CTR pad} is empty when a multiple (including zero) blocks of text have been processed. That is, if you pass in seven bytes to AES--CTR mode you would have to -pass in a minimum of nine extra bytes before the accelerator could be called. The CTR accelerator must increment the counter (and store it back into the -buffer provided) before encrypting it to create the pad. - -The accelerator will only be used to encrypt whole blocks. Partial blocks are always handled in software. - -\subsubsection{Accelerated LRW} -These functions are meant for accelerated LRW. They process blocks of input in lengths of multiples of 16 octets. They must accept the \textit{IV} and \textit{tweak} -state variables and updated them prior to returning. Note that you may want to disable \textbf{LRW\_TABLES} in \textit{tomcrypt\_custom.h} if you intend -to use accelerators for LRW. - -While both encrypt and decrypt accelerators are not required it is suggested as it makes lrw\_setiv() more efficient. - -Note that calling lrw\_done() will only invoke the cipher\_descriptor[].done() function on the \textit{symmetric\_key} parameter of the LRW state. That means -if your device requires any (LRW specific) resources you should free them in your ciphers() done function. The simplest way to think of it is to write -the plugin solely to do LRW with the cipher. That way cipher\_descriptor[].setup() means to init LRW resources and cipher\_descriptor[].done() means to -free them. - -\subsubsection{Accelerated CCM} -This function is meant for accelerated CCM encryption or decryption. It processes the entire packet in one call. You can optimize the work flow somewhat -by allowing the caller to call the setup() function first to schedule the key if your accelerator cannot do the key schedule on the fly (for instance). This -function MUST support both key passing methods. - -\begin{center} -\begin{small} -\begin{tabular}{|r|r|l|} -\hline \textbf{key} & \textbf{uskey} & \textbf{Source of key} \\ -\hline NULL & NULL & Error, not supported \\ -\hline non-NULL & NULL & Use key, do a key schedule \\ -\hline NULL & non-NULL & Use uskey, key schedule not required \\ -\hline non-NULL & non-NULL & Use uskey, key schedule not required \\ -\hline -\end{tabular} -\end{small} -\end{center} - -\index{ccm\_memory()} This function is called when the user calls ccm\_memory(). - -\subsubsection{Accelerated GCM} -\index{gcm\_memory()} -This function is meant for accelerated GCM encryption or decryption. It processes the entire packet in one call. Note that the setup() function will not -be called prior to this. This function must handle scheduling the key provided on its own. It is called when the user calls gcm\_memory(). - -\subsubsection{Accelerated OMAC} -\index{omac\_memory()} -This function is meant to perform an optimized OMAC1 (CMAC) message authentication code computation when the user calls omac\_memory(). - -\subsubsection{Accelerated XCBC-MAC} -\index{xcbc\_memory()} -This function is meant to perform an optimized XCBC-MAC message authentication code computation when the user calls xcbc\_memory(). - -\subsubsection{Accelerated F9} -\index{f9\_memory()} -This function is meant to perform an optimized F9 message authentication code computation when the user calls f9\_memory(). Like f9\_memory(), it requires -the caller to perform any 3GPP related padding before calling in order to ensure proper compliance with F9. - - -\mysection{One--Way Hashes} -The hash functions are accessed through the ltc\_hash\_descriptor structure. - -\begin{small} -\begin{verbatim} -struct ltc_hash_descriptor { - /** name of hash */ - char *name; - - /** internal ID */ - unsigned char ID; - - /** Size of digest in octets */ - unsigned long hashsize; - - /** Input block size in octets */ - unsigned long blocksize; - - /** ASN.1 OID */ - unsigned long OID[16]; - - /** Length of DER encoding */ - unsigned long OIDlen; - - /** Init a hash state - @param hash The hash to initialize - @return CRYPT_OK if successful - */ - int (*init)(hash_state *hash); - - /** Process a block of data - @param hash The hash state - @param in The data to hash - @param inlen The length of the data (octets) - @return CRYPT_OK if successful - */ - int (*process)( hash_state *hash, - const unsigned char *in, - unsigned long inlen); - - /** Produce the digest and store it - @param hash The hash state - @param out [out] The destination of the digest - @return CRYPT_OK if successful - */ - int (*done)( hash_state *hash, - unsigned char *out); - - /** Self-test - @return CRYPT_OK if successful, - CRYPT_NOP if self-tests have been disabled - */ - int (*test)(void); - - /* accelerated hmac callback: if you need to-do - multiple packets just use the generic hmac_memory - and provide a hash callback - */ - int (*hmac_block)(const unsigned char *key, - unsigned long keylen, - const unsigned char *in, - unsigned long inlen, - unsigned char *out, - unsigned long *outlen); -}; -\end{verbatim} -\end{small} - -\subsection{Name} -This is the name the hash is known by and what find\_hash() will look for. - -\subsection{Internal ID} -This is the internal ID byte used to distinguish the hash from other hashes. - -\subsection{Digest Size} -The \textit{hashsize} variable indicates the length of the output in octets. - -\subsection{Block Size} -The \textit{blocksize} variable indicates the length of input (in octets) that the hash processes in a given -invocation. - -\subsection{OID Identifier} -This is the universal ASN.1 Object Identifier for the hash. - -\subsection{Initialization} -The init function initializes the hash and prepares it to process message bytes. - -\subsection{Process} -This processes message bytes. The algorithm must accept any length of input that the hash would allow. The input is not -guaranteed to be a multiple of the block size in length. - -\subsection{Done} -The done function terminates the hash and returns the message digest. - -\subsection{Acceleration} -A compatible accelerator must allow processing data in any granularity which may require internal padding on the driver side. - -\subsection{HMAC Acceleration} -The hmac\_block() callback is meant for single--shot optimized HMAC implementations. It is called directly by hmac\_memory() if present. If you need -to be able to process multiple blocks per MAC then you will have to simply provide a process() callback and use hmac\_memory() as provided in LibTomCrypt. - -\mysection{Pseudo--Random Number Generators} -The pseudo--random number generators are accessible through the ltc\_prng\_descriptor structure. - -\begin{small} -\begin{verbatim} -struct ltc_prng_descriptor { - /** Name of the PRNG */ - char *name; - - /** size in bytes of exported state */ - int export_size; - - /** Start a PRNG state - @param prng [out] The state to initialize - @return CRYPT_OK if successful - */ - int (*start)(prng_state *prng); - - /** Add entropy to the PRNG - @param in The entropy - @param inlen Length of the entropy (octets) - @param prng The PRNG state - @return CRYPT_OK if successful - */ - int (*add_entropy)(const unsigned char *in, - unsigned long inlen, - prng_state *prng); - - /** Ready a PRNG state to read from - @param prng The PRNG state to ready - @return CRYPT_OK if successful - */ - int (*ready)(prng_state *prng); - - /** Read from the PRNG - @param out [out] Where to store the data - @param outlen Length of data desired (octets) - @param prng The PRNG state to read from - @return Number of octets read - */ - unsigned long (*read)(unsigned char *out, - unsigned long outlen, - prng_state *prng); - - /** Terminate a PRNG state - @param prng The PRNG state to terminate - @return CRYPT_OK if successful - */ - int (*done)(prng_state *prng); - - /** Export a PRNG state - @param out [out] The destination for the state - @param outlen [in/out] The max size and resulting size - @param prng The PRNG to export - @return CRYPT_OK if successful - */ - int (*pexport)(unsigned char *out, - unsigned long *outlen, - prng_state *prng); - - /** Import a PRNG state - @param in The data to import - @param inlen The length of the data to import (octets) - @param prng The PRNG to initialize/import - @return CRYPT_OK if successful - */ - int (*pimport)(const unsigned char *in, - unsigned long inlen, - prng_state *prng); - - /** Self-test the PRNG - @return CRYPT_OK if successful, - CRYPT_NOP if self-testing has been disabled - */ - int (*test)(void); -}; -\end{verbatim} -\end{small} - -\subsection{Name} -The name by which find\_prng() will find the PRNG. - -\subsection{Export Size} -When an PRNG state is to be exported for future use you specify the space required in this variable. - -\subsection{Start} -Initialize the PRNG and make it ready to accept entropy. - -\subsection{Entropy Addition} -Add entropy to the PRNG state. The exact behaviour of this function depends on the particulars of the PRNG. - -\subsection{Ready} -This function makes the PRNG ready to read from by processing the entropy added. The behaviour of this function depends -on the specific PRNG used. - -\subsection{Read} -Read from the PRNG and return the number of bytes read. This function does not have to fill the buffer but it is best -if it does as many protocols do not retry reads and will fail on the first try. - -\subsection{Done} -Terminate a PRNG state. The behaviour of this function depends on the particular PRNG used. - -\subsection{Exporting and Importing} -An exported PRNG state is data that the PRNG can later import to resume activity. They're not meant to resume \textit{the same session} -but should at least maintain the same level of state entropy. - -\mysection{BigNum Math Descriptors} -The library also makes use of the math descriptors to access math functions. While bignum math libraries usually differ in implementation -it hasn't proven hard to write \textit{glue} to use math libraries so far. The basic descriptor looks like. - -\begin{small} -\begin{verbatim} -/** math descriptor */ -typedef struct { - /** Name of the math provider */ - char *name; - - /** Bits per digit, amount of bits must fit in an unsigned long */ - int bits_per_digit; - -/* ---- init/deinit functions ---- */ - - /** initialize a bignum - @param a The number to initialize - @return CRYPT_OK on success - */ - int (*init)(void **a); - - /** init copy - @param dst The number to initialize and write to - @param src The number to copy from - @return CRYPT_OK on success - */ - int (*init_copy)(void **dst, void *src); - - /** deinit - @param a The number to free - @return CRYPT_OK on success - */ - void (*deinit)(void *a); - -/* ---- data movement ---- */ - - /** copy - @param src The number to copy from - @param dst The number to write to - @return CRYPT_OK on success - */ - int (*copy)(void *src, void *dst); - -/* ---- trivial low level functions ---- */ - - /** set small constant - @param a Number to write to - @param n Source upto bits_per_digit (meant for small constants) - @return CRYPT_OK on success - */ - int (*set_int)(void *a, unsigned long n); - - /** get small constant - @param a Small number to read - @return The lower bits_per_digit of the integer (unsigned) - */ - unsigned long (*get_int)(void *a); - - /** get digit n - @param a The number to read from - @param n The number of the digit to fetch - @return The bits_per_digit sized n'th digit of a - */ - unsigned long (*get_digit)(void *a, int n); - - /** Get the number of digits that represent the number - @param a The number to count - @return The number of digits used to represent the number - */ - int (*get_digit_count)(void *a); - - /** compare two integers - @param a The left side integer - @param b The right side integer - @return LTC_MP_LT if a < b, - LTC_MP_GT if a > b and - LTC_MP_EQ otherwise. (signed comparison) - */ - int (*compare)(void *a, void *b); - - /** compare against int - @param a The left side integer - @param b The right side integer (upto bits_per_digit) - @return LTC_MP_LT if a < b, - LTC_MP_GT if a > b and - LTC_MP_EQ otherwise. (signed comparison) - */ - int (*compare_d)(void *a, unsigned long n); - - /** Count the number of bits used to represent the integer - @param a The integer to count - @return The number of bits required to represent the integer - */ - int (*count_bits)(void * a); - - /** Count the number of LSB bits which are zero - @param a The integer to count - @return The number of contiguous zero LSB bits - */ - int (*count_lsb_bits)(void *a); - - /** Compute a power of two - @param a The integer to store the power in - @param n The power of two you want to store (a = 2^n) - @return CRYPT_OK on success - */ - int (*twoexpt)(void *a , int n); - -/* ---- radix conversions ---- */ - - /** read ascii string - @param a The integer to store into - @param str The string to read - @param radix The radix the integer has been represented in (2-64) - @return CRYPT_OK on success - */ - int (*read_radix)(void *a, const char *str, int radix); - - /** write number to string - @param a The integer to store - @param str The destination for the string - @param radix The radix the integer is to be represented in (2-64) - @return CRYPT_OK on success - */ - int (*write_radix)(void *a, char *str, int radix); - - /** get size as unsigned char string - @param a The integer to get the size - @return The length of the integer in octets - */ - unsigned long (*unsigned_size)(void *a); - - /** store an integer as an array of octets - @param src The integer to store - @param dst The buffer to store the integer in - @return CRYPT_OK on success - */ - int (*unsigned_write)(void *src, unsigned char *dst); - - /** read an array of octets and store as integer - @param dst The integer to load - @param src The array of octets - @param len The number of octets - @return CRYPT_OK on success - */ - int (*unsigned_read)( void *dst, - unsigned char *src, - unsigned long len); - -/* ---- basic math ---- */ - - /** add two integers - @param a The first source integer - @param b The second source integer - @param c The destination of "a + b" - @return CRYPT_OK on success - */ - int (*add)(void *a, void *b, void *c); - - /** add two integers - @param a The first source integer - @param b The second source integer - (single digit of upto bits_per_digit in length) - @param c The destination of "a + b" - @return CRYPT_OK on success - */ - int (*addi)(void *a, unsigned long b, void *c); - - /** subtract two integers - @param a The first source integer - @param b The second source integer - @param c The destination of "a - b" - @return CRYPT_OK on success - */ - int (*sub)(void *a, void *b, void *c); - - /** subtract two integers - @param a The first source integer - @param b The second source integer - (single digit of upto bits_per_digit in length) - @param c The destination of "a - b" - @return CRYPT_OK on success - */ - int (*subi)(void *a, unsigned long b, void *c); - - /** multiply two integers - @param a The first source integer - @param b The second source integer - (single digit of upto bits_per_digit in length) - @param c The destination of "a * b" - @return CRYPT_OK on success - */ - int (*mul)(void *a, void *b, void *c); - - /** multiply two integers - @param a The first source integer - @param b The second source integer - (single digit of upto bits_per_digit in length) - @param c The destination of "a * b" - @return CRYPT_OK on success - */ - int (*muli)(void *a, unsigned long b, void *c); - - /** Square an integer - @param a The integer to square - @param b The destination - @return CRYPT_OK on success - */ - int (*sqr)(void *a, void *b); - - /** Divide an integer - @param a The dividend - @param b The divisor - @param c The quotient (can be NULL to signify don't care) - @param d The remainder (can be NULL to signify don't care) - @return CRYPT_OK on success - */ - int (*div)(void *a, void *b, void *c, void *d); - - /** divide by two - @param a The integer to divide (shift right) - @param b The destination - @return CRYPT_OK on success - */ - int (*div_2)(void *a, void *b); - - /** Get remainder (small value) - @param a The integer to reduce - @param b The modulus (upto bits_per_digit in length) - @param c The destination for the residue - @return CRYPT_OK on success - */ - int (*modi)(void *a, unsigned long b, unsigned long *c); - - /** gcd - @param a The first integer - @param b The second integer - @param c The destination for (a, b) - @return CRYPT_OK on success - */ - int (*gcd)(void *a, void *b, void *c); - - /** lcm - @param a The first integer - @param b The second integer - @param c The destination for [a, b] - @return CRYPT_OK on success - */ - int (*lcm)(void *a, void *b, void *c); - - /** Modular multiplication - @param a The first source - @param b The second source - @param c The modulus - @param d The destination (a*b mod c) - @return CRYPT_OK on success - */ - int (*mulmod)(void *a, void *b, void *c, void *d); - - /** Modular squaring - @param a The first source - @param b The modulus - @param c The destination (a*a mod b) - @return CRYPT_OK on success - */ - int (*sqrmod)(void *a, void *b, void *c); - - /** Modular inversion - @param a The value to invert - @param b The modulus - @param c The destination (1/a mod b) - @return CRYPT_OK on success - */ - int (*invmod)(void *, void *, void *); - -/* ---- reduction ---- */ - - /** setup Montgomery - @param a The modulus - @param b The destination for the reduction digit - @return CRYPT_OK on success - */ - int (*montgomery_setup)(void *a, void **b); - - /** get normalization value - @param a The destination for the normalization value - @param b The modulus - @return CRYPT_OK on success - */ - int (*montgomery_normalization)(void *a, void *b); - - /** reduce a number - @param a The number [and dest] to reduce - @param b The modulus - @param c The value "b" from montgomery_setup() - @return CRYPT_OK on success - */ - int (*montgomery_reduce)(void *a, void *b, void *c); - - /** clean up (frees memory) - @param a The value "b" from montgomery_setup() - @return CRYPT_OK on success - */ - void (*montgomery_deinit)(void *a); - -/* ---- exponentiation ---- */ - - /** Modular exponentiation - @param a The base integer - @param b The power (can be negative) integer - @param c The modulus integer - @param d The destination - @return CRYPT_OK on success - */ - int (*exptmod)(void *a, void *b, void *c, void *d); - - /** Primality testing - @param a The integer to test - @param b The destination of the result (FP_YES if prime) - @return CRYPT_OK on success - */ - int (*isprime)(void *a, int *b); - -/* ---- (optional) ecc point math ---- */ - - /** ECC GF(p) point multiplication (from the NIST curves) - @param k The integer to multiply the point by - @param G The point to multiply - @param R The destination for kG - @param modulus The modulus for the field - @param map Boolean indicated whether to map back to affine or not - (can be ignored if you work in affine only) - @return CRYPT_OK on success - */ - int (*ecc_ptmul)( void *k, - ecc_point *G, - ecc_point *R, - void *modulus, - int map); - - /** ECC GF(p) point addition - @param P The first point - @param Q The second point - @param R The destination of P + Q - @param modulus The modulus - @param mp The "b" value from montgomery_setup() - @return CRYPT_OK on success - */ - int (*ecc_ptadd)(ecc_point *P, - ecc_point *Q, - ecc_point *R, - void *modulus, - void *mp); - - /** ECC GF(p) point double - @param P The first point - @param R The destination of 2P - @param modulus The modulus - @param mp The "b" value from montgomery_setup() - @return CRYPT_OK on success - */ - int (*ecc_ptdbl)(ecc_point *P, - ecc_point *R, - void *modulus, - void *mp); - - /** ECC mapping from projective to affine, - currently uses (x,y,z) => (x/z^2, y/z^3, 1) - @param P The point to map - @param modulus The modulus - @param mp The "b" value from montgomery_setup() - @return CRYPT_OK on success - @remark The mapping can be different but keep in mind a - ecc_point only has three integers (x,y,z) so if - you use a different mapping you have to make it fit. - */ - int (*ecc_map)(ecc_point *P, void *modulus, void *mp); - - /** Computes kA*A + kB*B = C using Shamir's Trick - @param A First point to multiply - @param kA What to multiple A by - @param B Second point to multiply - @param kB What to multiple B by - @param C [out] Destination point (can overlap with A or B) - @param modulus Modulus for curve - @return CRYPT_OK on success - */ - int (*ecc_mul2add)(ecc_point *A, void *kA, - ecc_point *B, void *kB, - ecc_point *C, - void *modulus); - - -/* ---- (optional) rsa optimized math (for internal CRT) ---- */ - - /** RSA Key Generation - @param prng An active PRNG state - @param wprng The index of the PRNG desired - @param size The size of the key in octets - @param e The "e" value (public key). - e==65537 is a good choice - @param key [out] Destination of a newly created private key pair - @return CRYPT_OK if successful, upon error all allocated ram is freed - */ - int (*rsa_keygen)(prng_state *prng, - int wprng, - int size, - long e, - rsa_key *key); - - /** RSA exponentiation - @param in The octet array representing the base - @param inlen The length of the input - @param out The destination (to be stored in an octet array format) - @param outlen The length of the output buffer and the resulting size - (zero padded to the size of the modulus) - @param which PK_PUBLIC for public RSA and PK_PRIVATE for private RSA - @param key The RSA key to use - @return CRYPT_OK on success - */ - int (*rsa_me)(const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen, int which, - rsa_key *key); -} ltc_math_descriptor; -\end{verbatim} -\end{small} - -Most of the functions are fairly straightforward and do not need documentation. We'll cover the basic conventions of the API and then explain the accelerated functions. - -\subsection{Conventions} - -All \textit{bignums} are accessed through an opaque \textit{void *} data type. You must internally cast the pointer if you need to access members of your bignum structure. During -the init calls a \textit{void **} will be passed where you allocate your structure and set the pointer then initialize the number to zero. During the deinit calls you must -free the bignum as well as the structure you allocated to place it in. - -All functions except the Montgomery reductions work from left to right with the arguments. For example, mul(a, b, c) computes $c \leftarrow ab$. - -All functions (except where noted otherwise) return \textbf{CRYPT\_OK} to signify a successful operation. All error codes must be valid LibTomCrypt error codes. - -The digit routines (including functions with the \textit{i} suffix) use a \textit{unsigned long} to represent the digit. If your internal digit is larger than this you must -then partition your digits. Normally this does not matter as \textit{unsigned long} will be the same size as your register size. Note that if your digit is smaller -than an \textit{unsigned long} that is also acceptable as the \textit{bits\_per\_digit} parameter will specify this. - -\subsection{ECC Functions} -The ECC system in LibTomCrypt is based off of the NIST recommended curves over $GF(p)$ and is used to implement EC-DSA and EC-DH. The ECC functions work with -the \textbf{ecc\_point} structure and assume the points are stored in Jacobian projective format. - -\begin{verbatim} -/** A point on a ECC curve, stored in Jacobian format such - that (x,y,z) => (x/z^2, y/z^3, 1) when interpreted as affine */ -typedef struct { - /** The x co-ordinate */ - void *x; - /** The y co-ordinate */ - void *y; - /** The z co-ordinate */ - void *z; -} ecc_point; -\end{verbatim} - -All ECC functions must use this mapping system. The only exception is when you remap all ECC callbacks which will allow you to have more control -over how the ECC math will be implemented. Out of the box you only have three parameters per point to use $(x, y, z)$ however, these are just void pointers. They -could point to anything you want. The only further exception is the export functions which expects the values to be in affine format. - -\subsubsection{Point Multiply} -This will multiply the point $G$ by the scalar $k$ and store the result in the point $R$. The value should be mapped to affine only if $map$ is set to one. - -\subsubsection{Point Addition} -This will add the point $P$ to the point $Q$ and store it in the point $R$. The $mp$ parameter is the \textit{b} value from the montgomery\_setup() call. The input points -may be in either affine (with $z = 1$) or projective format and the output point is always projective. - -\subsubsection{Point Mapping} -This will map the point $P$ back from projective to affine. The output point $P$ must be of the form $(x, y, 1)$. - -\subsubsection{Shamir's Trick} -\index{Shamir's Trick} -\index{ltc\_ecc\_mul2add()} -To accelerate EC--DSA verification the library provides a built--in function called ltc\_ecc\_mul2add(). This performs two point multiplications and an addition in -roughly the time of one point multiplication. It is called from ecc\_verify\_hash() if an accelerator is not present. The acclerator function must allow the points to -overlap (e.g., $A \leftarrow k_1A + k_2B$) and must return the final point in affine format. - - -\subsection{RSA Functions} -The RSA Modular Exponentiation (ME) function is used by the RSA API to perform exponentiations for private and public key operations. In particular for -private key operations it uses the CRT approach to lower the time required. It is passed an RSA key with the following format. - -\begin{verbatim} -/** RSA PKCS style key */ -typedef struct Rsa_key { - /** Type of key, PK_PRIVATE or PK_PUBLIC */ - int type; - /** The public exponent */ - void *e; - /** The private exponent */ - void *d; - /** The modulus */ - void *N; - /** The p factor of N */ - void *p; - /** The q factor of N */ - void *q; - /** The 1/q mod p CRT param */ - void *qP; - /** The d mod (p - 1) CRT param */ - void *dP; - /** The d mod (q - 1) CRT param */ - void *dQ; -} rsa_key; -\end{verbatim} - -The call reads the \textit{in} buffer as an unsigned char array in big endian format. Then it performs the exponentiation and stores the output in big endian format -to the \textit{out} buffer. The output must be zero padded (leading bytes) so that the length of the output matches the length of the modulus (in bytes). For example, -for RSA--1024 the output is always 128 bytes regardless of how small the numerical value of the exponentiation is. - -Since the function is given the entire RSA key (for private keys only) CRT is possible as prescribed in the PKCS \#1 v2.1 specification. - -\newpage -\markboth{Index}{Index} -\input{crypt.ind} - -\end{document} - -% $Source: /cvs/libtom/libtomcrypt/crypt.tex,v $ -% $Revision: 1.128 $ -% $Date: 2007/03/10 23:59:54 $ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/demos/constants.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/demos/constants.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,86 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L +#include +#else +#define basename(x) x +#endif + +/** + @file demo_crypt_constants.c + + Demo how to get various constants to dynamic languages + like Python + + Larry Bugbee, February 2013 +*/ + +static void _print_line(const char* cmd, const char* desc) +{ + printf(" %-16s - %s\n", cmd, desc); +} + +int main(int argc, char **argv) +{ + if (argc == 1) { + /* given a specific constant name, get and print its value */ + char name[] = "CTR_COUNTER_BIG_ENDIAN"; + int value; + char *names_list; + unsigned int names_list_len; + + if (crypt_get_constant(name, &value) != 0) exit(EXIT_FAILURE); + printf("\n %s is %d \n\n", name, value); + + /* get and print the length of the names (and values) list */ + + if (crypt_list_all_constants(NULL, &names_list_len) != 0) exit(EXIT_FAILURE); + printf(" need to allocate %u bytes \n\n", names_list_len); + + /* get and print the names (and values) list */ + if ((names_list = malloc(names_list_len)) == NULL) exit(EXIT_FAILURE); + if (crypt_list_all_constants(names_list, &names_list_len) != 0) exit(EXIT_FAILURE); + printf(" supported constants:\n\n%s\n\n", names_list); + free(names_list); + } else if (argc == 2) { + if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0) { + char* base = strdup(basename(argv[0])); + printf("Usage: %s [-a] [-s name]\n\n", base); + _print_line("", "The old behavior of the demo"); + _print_line("-a", "Only lists all constants"); + _print_line("-s name", "List a single constant given as argument"); + _print_line("-h", "The help you're looking at"); + free(base); + } else if (strcmp(argv[1], "-a") == 0) { + char *names_list; + unsigned int names_list_len; + /* get and print the length of the names (and values) list */ + if (crypt_list_all_constants(NULL, &names_list_len) != 0) exit(EXIT_FAILURE); + /* get and print the names (and values) list */ + names_list = malloc(names_list_len); + if (crypt_list_all_constants(names_list, &names_list_len) != 0) exit(EXIT_FAILURE); + printf("%s\n", names_list); + } + } else if (argc == 3) { + if (strcmp(argv[1], "-s") == 0) { + int value; + if (crypt_get_constant(argv[2], &value) != 0) exit(EXIT_FAILURE); + printf("%s,%u\n", argv[2], value); + } + } + + return 0; +} + + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/demos/demo_dynamic.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/demos/demo_dynamic.py Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,309 @@ + + +""" + demo_dynamic.py v2b + + This program demonstrates Python's use of the dynamic + language support additions to LTC, namely access to LTC + constants, struct and union sizes, and the binding of a + math package to LTC. Also provided are simple code + fragments to illustrate how one might write a Python + wrapper for LTC and how an app might call the wrapper. + This or a similar model should work for Ruby and other + dynamic languages. + + This instance uses Python's ctypes and requires a single + .dylib linking together LTC and a math library. Building + a single .dylib is needed because LTC wants a fairly tight + relationship between itself and the mathlib. (ctypes can + load multiple .dylibs, but it does not support this level + of tight coupling between otherwise independent libraries.) + + My .dylib was created on OSX/macOS with the following: + sudo make -j5 -f makefile.shared \ + CFLAGS="-DUSE_TFM -DTFM_DESC -I/usr/local/include" \ + EXTRALIBS=/usr/local/lib/libtfm.a install + + For python 2.7.12 on Ubuntu Xenial the following worked for + me (without MPI support): + sudo make -f makefile.shared install PREFIX="/usr" + + Reminder: you don't need to bind in a math library unless + you are going to use LTC functions that need a + mathlib. For example, public key crypto requires + a mathlib; hashing and symmetric encryption do not. + + ------ + + This code was originally written for Python 2.7 with the + ctypes standard library. This version is modified to run + under both Python 2.7 and 3.6. + + Arguably the biggest change for Python3 has to do with + strings. Under Python2, native strings are ASCII bytes and + passing them to LTC is natural and requires no conversion. + Under Python3 all native strings are Unicode which requires + they be converted to bytes before use by LTC. + + Note the following for Python3. + - ASCII keys, IVs and other string arguments must be + 'bytes'. Define them with a 'b' prefix or convert + via the 'bytes()' function. + - "strings" returned from LTC are bytes and conversion + to Unicode might be necessary for proper printing. + If so, use .decode('utf-8'). + - The Python2 'print' statement becomes a function in + Python3 which requires parenthesis, eg. 'print()'. + + NB: Unicode is achieved under Python2 by either defining + a Unicode string with a 'u' prefix or passing ASCII + strings thru the 'unicode()' function. + + Larry Bugbee + March 2014 v1 + August 2017 v2b + +""" + + +import sys +from ctypes import * +from ctypes.util import find_library + +# switches to enable/disable selected output +SHOW_ALL_CONSTANTS = True +SHOW_ALL_SIZES = True +SHOW_SELECTED_CONSTANTS = True +SHOW_SELECTED_SIZES = True +SHOW_BUILD_OPTIONS_ALGS = True +SHOW_SHA256_EXAMPLE = True +SHOW_CHACHA_EXAMPLE = True + +print(' ') +print(' demo_dynamic.py') + +def inprint(s, indent=0): + "prints strings indented, including multline strings" + for line in s.split('\n'): + print(' '*indent + line) + +#------------------------------------------------------------------------------- +# load the .dylib + +libname = 'tomcrypt' +libpath = find_library(libname) +print(' ') +print(' path to library %s: %s' % (libname, libpath)) + +LTC = cdll.LoadLibrary(libpath) +print(' loaded: %s' % LTC) +print(' ') + + +#------------------------------------------------------------------------------- +# get list of all supported constants followed by a list of all +# supported sizes. One alternative: these lists may be parsed +# and used as needed. + +if SHOW_ALL_CONSTANTS: + print('-'*60) + print(' all supported constants and their values:') + + # get size to allocate for constants output list + str_len = c_int(0) + ret = LTC.crypt_list_all_constants(None, byref(str_len)) + print(' need to allocate %d bytes to build list \n' % str_len.value) + + # allocate that size and get (name, size) pairs, each pair + # separated by a newline char. + names_sizes = c_buffer(str_len.value) + ret = LTC.crypt_list_all_constants(names_sizes, byref(str_len)) + print(names_sizes.value.decode("utf-8")) + print(' ') + + +if SHOW_ALL_SIZES: + print('-'*60) + print(' all supported sizes:') + + # get size to allocate for sizes output list + str_len = c_int(0) + ret = LTC.crypt_list_all_sizes(None, byref(str_len)) + print(' need to allocate %d bytes to build list \n' % str_len.value) + + # allocate that size and get (name, size) pairs, each pair + # separated by a newline char. + names_sizes = c_buffer(str_len.value) + ret = LTC.crypt_list_all_sizes(names_sizes, byref(str_len)) + print(names_sizes.value.decode("utf-8")) + print(' ') + + +#------------------------------------------------------------------------------- +# get individually named constants and sizes + +if SHOW_SELECTED_CONSTANTS: + print('-'*60) + print('\n selected constants:') + + names = [ + b'ENDIAN_LITTLE', + b'ENDIAN_64BITWORD', + b'PK_PUBLIC', + b'LTC_MILLER_RABIN_REPS', + b'CTR_COUNTER_BIG_ENDIAN', + ] + for name in names: + const_value = c_int(0) + rc = LTC.crypt_get_constant(name, byref(const_value)) + value = const_value.value + print(' %-25s %d' % (name.decode("utf-8"), value)) + print(' ') + +if SHOW_SELECTED_SIZES: + print('-'*60) + print('\n selected sizes:') + + names = [ + b'rijndael_key', + b'rsa_key', + b'symmetric_CTR', + b'twofish_key', + b'ecc_point', + b'gcm_state', + b'sha512_state', + ] + for name in names: + size_value = c_int(0) + rc = LTC.crypt_get_size(name, byref(size_value)) + value = size_value.value + print(' %-25s %d' % (name.decode("utf-8"), value)) + print(' ') + + +#------------------------------------------------------------------------------- +#------------------------------------------------------------------------------- +# LibTomCrypt exposes one interesting string that can be accessed +# via Python's ctypes module, "crypt_build_settings", which +# provides a list of this build's compiler switches and supported +# algorithms. If someday LTC exposes other interesting strings, +# they can be found with: +# nm /usr/local/lib/libtomcrypt.dylib | grep " D " + +def get_named_string(lib, name): + return c_char_p.in_dll(lib, name).value.decode("utf-8") + +if SHOW_BUILD_OPTIONS_ALGS: + print('-'*60) + print('This is a string compiled into LTC showing compile') + print('options and algorithms supported by this build \n') +# print(get_named_string(LTC, 'crypt_build_settings')) + inprint(get_named_string(LTC, 'crypt_build_settings'), 4) + + +#------------------------------------------------------------------------------- +#------------------------------------------------------------------------------- +# here is an example of how Python code can be written to access +# LTC's implementation of SHA256 and ChaCha, + +# - - - - - - - - - - - - - +# definitions + +from binascii import hexlify, unhexlify + +def _err2str(err): + # define return type + errstr = LTC.error_to_string + errstr.restype = c_char_p + # get and return err string + return errstr(err) + +def _get_size(name): + size = c_int(0) + rc = LTC.crypt_get_size(bytes(name), byref(size)) + if rc != 0: + raise Exception('LTC.crypt_get_size(%s) rc = %d' % (name, rc)) + return size.value + +def _get_constant(name): + constant = c_int(0) + rc = LTC.crypt_get_constant(bytes(name), byref(constant)) + if rc != 0: + raise Exception('LTC.crypt_get_constant(%s) rc = %d' % (name, rc)) + return constant.value + +CRYPT_OK = _get_constant(b'CRYPT_OK') + +class SHA256(object): + def __init__(self): + self.state = c_buffer(_get_size(b'sha256_state')) + LTC.sha256_init(byref(self.state)) + def update(self, data): + LTC.sha256_process(byref(self.state), data, len(data)) + def digest(self): + md = c_buffer(32) + LTC.sha256_done(byref(self.state), byref(md)) + return md.raw + +class ChaCha(object): + def __init__(self, key, rounds): + self.state = c_buffer(_get_size(b'chacha_state')) + self.counter = c_int(1) + err = LTC.chacha_setup(byref(self.state), key, len(key), rounds) + if err != CRYPT_OK: + raise Exception('LTC.chacha_setup(), err = %d, "%s"' % (err, _err2str(err))) + def set_iv32(self, iv): + err = LTC.chacha_ivctr32(byref(self.state), iv, len(iv), byref(self.counter)) + if err != CRYPT_OK: + raise Exception('LTC.chacha_ivctr32(), err = %d, "%s"' % (err, _err2str(err))) + def crypt(self, datain): + dataout = c_buffer(len(datain)) + err = LTC.chacha_crypt(byref(self.state), datain, len(datain), byref(dataout)) + if err != CRYPT_OK: + raise Exception('LTC.chacha_crypt(), err = %d, "%s"' % (err, _err2str(err))) + return dataout.raw + +# - - - - - - - - - - - - - +# a SHA256 app fragment + +if SHOW_SHA256_EXAMPLE: + print('-'*60) + data = b'hello world' # we want bytes, not Unicode + + sha256 = SHA256() + sha256.update(data) + md = sha256.digest() + + template = '\n the SHA256 digest for "%s" is %s \n' + print(template % (data, hexlify(md))) + +# - - - - - - - - - - - - - +# a ChaCha app fragment + +if SHOW_CHACHA_EXAMPLE: + print('-'*60) + key = b'hownowbrowncow\x00\x00' # exactly 16 or 32 bytes + rounds = 12 # common values: 8, 12, 20 + iv = b'123456789012' # exactly 12 bytes + plain = b'Kilroy was here, there, and everywhere!' + + cha = ChaCha(key, rounds) + cha.set_iv32(iv) + cipher = cha.crypt(plain) + + template = '\n ChaCha%d ciphertext for "%s" is "%s"' + print(template % (rounds, plain, hexlify(cipher))) + + cha.set_iv32(iv) # reset to decrypt + decrypted = cha.crypt(cipher) + + template = ' ChaCha%d decoded text for "%s" is "%s" \n' + print(template % (rounds, plain, decrypted.decode("utf-8"))) + +# Footnote: Keys should be erased fm memory as soon as possible after use, +# and that includes Python. For a tip on how to do that in Python, see +# http://buggywhip.blogspot.com/2010/12/erase-keys-and-credit-card-numbers-in.html + +#------------------------------------------------------------------------------- +#------------------------------------------------------------------------------- +#------------------------------------------------------------------------------- diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/demos/hashsum.c --- a/libtomcrypt/demos/hashsum.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/demos/hashsum.c Fri Feb 09 21:44:05 2018 +0800 @@ -1,3 +1,12 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + /* * Written by Daniel Richards 6/7/2002 * hash.c: This app uses libtomcrypt to hash either stdin or a file @@ -9,111 +18,283 @@ #include -int errno; +#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L +#include +#else +#define basename(x) x +#endif + +#if !defined(PATH_MAX) && defined(_MSC_VER) +#include +#define PATH_MAX MAX_PATH +#endif + +/* thanks http://stackoverflow.com/a/8198009 */ +#define _base(x) ((x >= '0' && x <= '9') ? '0' : \ + (x >= 'a' && x <= 'f') ? 'a' - 10 : \ + (x >= 'A' && x <= 'F') ? 'A' - 10 : \ + '\255') +#define HEXOF(x) (x - _base(x)) + +static char* hashsum; + +static void cleanup(void) +{ + free(hashsum); +} + +static void die(int status) +{ + unsigned long w, x; + FILE* o = status == EXIT_SUCCESS ? stdout : stderr; + fprintf(o, "usage: %s -a algorithm [-c] [file...]\n\n", hashsum); + fprintf(o, "\t-c\tCheck the hash(es) of the file(s) written in [file].\n"); + fprintf(o, "\t\t(-a not required)\n"); + fprintf(o, "\nAlgorithms:\n\t"); + w = 0; + for (x = 0; hash_descriptor[x].name != NULL; x++) { + w += fprintf(o, "%-14s", hash_descriptor[x].name); + if (w >= 70) { + fprintf(o, "\n\t"); + w = 0; + } + } + if (w != 0) fprintf(o, "\n"); + exit(status); +} + +static void printf_hex(unsigned char* hash_buffer, unsigned long w) +{ + unsigned long x; + for (x = 0; x < w; x++) { + printf("%02x",hash_buffer[x]); + } +} -void register_algs(); +static void check_file(int argn, int argc, char **argv) +{ + int err, failed, invalid; + unsigned char is_buffer[MAXBLOCKSIZE], should_buffer[MAXBLOCKSIZE]; + char buf[PATH_MAX + (MAXBLOCKSIZE * 3)]; + /* iterate through all files */ + while(argn < argc) { + char* s; + FILE* f = fopen(argv[argn], "rb"); + if(f == NULL) { + int n = snprintf(buf, sizeof(buf), "%s: %s", hashsum, argv[argn]); + if (n > 0 && n < (int)sizeof(buf)) + perror(buf); + else + perror(argv[argn]); + exit(EXIT_FAILURE); + } + failed = 0; + invalid = 0; + /* read the file line by line */ + while((s = fgets(buf, sizeof(buf), f)) != NULL) + { + int tries, n; + unsigned long hash_len, w, x; + char* space = strstr(s, " "); + + /* skip lines with comments */ + if (buf[0] == '#') continue; + + if (space == NULL) { + fprintf(stderr, "%s: no properly formatted checksum lines found\n", hashsum); + goto ERR; + } + + hash_len = space - s; + hash_len /= 2; + + if (hash_len > sizeof(should_buffer)) { + fprintf(stderr, "%s: hash too long\n", hashsum); + goto ERR; + } + + /* convert the hex-string back to binary */ + for (x = 0; x < hash_len; ++x) { + should_buffer[x] = HEXOF(s[x*2]) << 4 | HEXOF(s[x*2 + 1]); + } + + space++; + if (*space != '*') { + fprintf(stderr, "%s: unsupported input mode '%c'\n", hashsum, *space); + goto ERR; + } + space++; + + for (n = 0; n < (buf + sizeof(buf)) - space; ++n) { + if(iscntrl((int)space[n])) { + space[n] = '\0'; + break; + } + } + + /* try all hash algorithms that have the appropriate hash size */ + tries = 0; + for (x = 0; hash_descriptor[x].name != NULL; ++x) { + if (hash_descriptor[x].hashsize == hash_len) { + tries++; + w = sizeof(is_buffer); + if ((err = hash_file(x, space, is_buffer, &w)) != CRYPT_OK) { + fprintf(stderr, "%s: File hash error: %s: %s\n", hashsum, space, error_to_string(err)); +ERR: + fclose(f); + exit(EXIT_FAILURE); + } + if(XMEMCMP(should_buffer, is_buffer, w) == 0) { + printf("%s: OK\n", space); + break; + } + } + } /* for */ + if (hash_descriptor[x].name == NULL) { + if(tries > 0) { + printf("%s: FAILED\n", space); + failed++; + } + else { + invalid++; + } + } + } /* while */ + fclose(f); + if(invalid) { + fprintf(stderr, "%s: WARNING: %d %s is improperly formatted\n", hashsum, invalid, invalid > 1?"lines":"line"); + } + if(failed) { + fprintf(stderr, "%s: WARNING: %d computed %s did NOT match\n", hashsum, failed, failed > 1?"checksums":"checksum"); + } + argn++; + } + exit(EXIT_SUCCESS); +} int main(int argc, char **argv) { - int idx, x, z; - unsigned long w; + int idxs[TAB_SIZE], idx, check, y, z, err, argn; + unsigned long w, x; unsigned char hash_buffer[MAXBLOCKSIZE]; - hash_state md; + + hashsum = strdup(basename(argv[0])); + atexit(cleanup); /* You need to register algorithms before using them */ - register_algs(); - if (argc < 2) { - printf("usage: ./hash algorithm file [file ...]\n"); - printf("Algorithms:\n"); - for (x = 0; hash_descriptor[x].name != NULL; x++) { - printf(" %s (%d)\n", hash_descriptor[x].name, hash_descriptor[x].ID); - } - exit(EXIT_SUCCESS); + register_all_ciphers(); + register_all_hashes(); + if (argc > 1 && (strcmp("-h", argv[1]) == 0 || strcmp("--help", argv[1]) == 0)) { + die(EXIT_SUCCESS); } - - idx = find_hash(argv[1]); - if (idx == -1) { - fprintf(stderr, "\nInvalid hash specified on command line.\n"); - return -1; + if (argc < 3) { + die(EXIT_FAILURE); } - if (argc == 2) { - hash_descriptor[idx].init(&md); - do { - x = fread(hash_buffer, 1, sizeof(hash_buffer), stdin); - hash_descriptor[idx].process(&md, hash_buffer, x); - } while (x == sizeof(hash_buffer)); - hash_descriptor[idx].done(&md, hash_buffer); - for (x = 0; x < (int)hash_descriptor[idx].hashsize; x++) { - printf("%02x",hash_buffer[x]); + for (x = 0; x < sizeof(idxs)/sizeof(idxs[0]); ++x) { + idxs[x] = -2; + } + argn = 1; + check = 0; + idx = 0; + + while(argn < argc){ + if(strcmp("-a", argv[argn]) == 0) { + argn++; + if(argn < argc) { + idxs[idx] = find_hash(argv[argn]); + if (idxs[idx] == -1) { + struct { + const char* is; + const char* should; + } shasum_compat[] = + { +#ifdef LTC_SHA1 + { "1", sha1_desc.name }, +#endif +#ifdef LTC_SHA224 + { "224", sha224_desc.name }, +#endif +#ifdef LTC_SHA256 + { "256", sha256_desc.name }, +#endif +#ifdef LTC_SHA384 + { "384", sha384_desc.name }, +#endif +#ifdef LTC_SHA512 + { "512", sha512_desc.name }, +#endif +#ifdef LTC_SHA512_224 + { "512224", sha512_224_desc.name }, +#endif +#ifdef LTC_SHA512_256 + { "512256", sha512_256_desc.name }, +#endif + { NULL, NULL } + }; + for (x = 0; shasum_compat[x].is != NULL; ++x) { + if(XSTRCMP(shasum_compat[x].is, argv[argn]) == 0) { + idxs[idx] = find_hash(shasum_compat[x].should); + break; + } + } + } + if (idxs[idx] == -1) { + fprintf(stderr, "%s: Unrecognized algorithm\n", hashsum); + die(EXIT_FAILURE); + } + idx++; + if ((size_t)idx >= sizeof(idxs)/sizeof(idxs[0])) { + fprintf(stderr, "%s: Too many '-a' options chosen\n", hashsum); + die(EXIT_FAILURE); + } + argn++; + continue; + } + else { + die(EXIT_FAILURE); + } } - printf(" (stdin)\n"); + if(strcmp("-c", argv[argn]) == 0) { + check = 1; + argn++; + continue; + } + break; + } + + if (check == 1) { + check_file(argn, argc, argv); + } + + if (argc == argn) { + w = sizeof(hash_buffer); + if ((err = hash_filehandle(idxs[0], stdin, hash_buffer, &w)) != CRYPT_OK) { + fprintf(stderr, "%s: File hash error: %s\n", hashsum, error_to_string(err)); + return EXIT_FAILURE; + } else { + for (x = 0; x < w; x++) { + printf("%02x",hash_buffer[x]); + } + printf(" *-\n"); + } } else { - for (z = 2; z < argc; z++) { - w = sizeof(hash_buffer); - if ((errno = hash_file(idx,argv[z],hash_buffer,&w)) != CRYPT_OK) { - printf("File hash error: %s\n", error_to_string(errno)); - } else { - for (x = 0; x < (int)hash_descriptor[idx].hashsize; x++) { - printf("%02x",hash_buffer[x]); - } - printf(" %s\n", argv[z]); + for (z = argn; z < argc; z++) { + for (y = 0; y < idx; ++y) { + w = sizeof(hash_buffer); + if ((err = hash_file(idxs[y],argv[z],hash_buffer,&w)) != CRYPT_OK) { + fprintf(stderr, "%s: File hash error: %s\n", hashsum, error_to_string(err)); + return EXIT_FAILURE; + } else { + printf_hex(hash_buffer, w); + printf(" *%s\n", argv[z]); + } } } } return EXIT_SUCCESS; } -void register_algs(void) -{ - int err; - -#ifdef LTC_TIGER - register_hash (&tiger_desc); -#endif -#ifdef LTC_MD2 - register_hash (&md2_desc); -#endif -#ifdef LTC_MD4 - register_hash (&md4_desc); -#endif -#ifdef LTC_MD5 - register_hash (&md5_desc); -#endif -#ifdef LTC_SHA1 - register_hash (&sha1_desc); -#endif -#ifdef LTC_SHA224 - register_hash (&sha224_desc); -#endif -#ifdef LTC_SHA256 - register_hash (&sha256_desc); -#endif -#ifdef LTC_SHA384 - register_hash (&sha384_desc); -#endif -#ifdef LTC_SHA512 - register_hash (&sha512_desc); -#endif -#ifdef LTC_RIPEMD128 - register_hash (&rmd128_desc); -#endif -#ifdef LTC_RIPEMD160 - register_hash (&rmd160_desc); -#endif -#ifdef LTC_WHIRLPOOL - register_hash (&whirlpool_desc); -#endif -#ifdef LTC_CHC_HASH - register_hash(&chc_desc); - if ((err = chc_register(register_cipher(&aes_enc_desc))) != CRYPT_OK) { - printf("chc_register error: %s\n", error_to_string(err)); - exit(EXIT_FAILURE); - } -#endif - -} - -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/demos/ltcrypt.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/demos/ltcrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,205 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/* encrypt V1.1 Fri Oct 18 04:28:03 NZDT 2002 */ +/* File de/encryption, using libtomcrypt */ +/* Written by Daniel Richards */ +/* Help from Tom St Denis with various bits */ +/* This code is public domain, no rights reserved. */ +/* Encrypts by default, -d flag enables decryption */ +/* ie: ./encrypt blowfish story.txt story.ct */ +/* ./encrypt -d blowfish story.ct story.pt */ + +#include + +int usage(char *name) +{ + int x; + + printf("Usage encrypt: %s cipher infile outfile\n", name); + printf("Usage decrypt: %s -d cipher infile outfile\n", name); + printf("Usage test: %s -t cipher\nCiphers:\n", name); + for (x = 0; cipher_descriptor[x].name != NULL; x++) { + printf("%s\n",cipher_descriptor[x].name); + } + exit(1); +} + +int main(int argc, char *argv[]) +{ + unsigned char plaintext[512],ciphertext[512]; + unsigned char tmpkey[512], key[MAXBLOCKSIZE], IV[MAXBLOCKSIZE]; + unsigned char inbuf[512]; /* i/o block size */ + unsigned long outlen, y, ivsize, x, decrypt; + symmetric_CTR ctr; + int cipher_idx, hash_idx, ks; + char *infile, *outfile, *cipher; + prng_state prng; + FILE *fdin, *fdout; + int err; + + /* register algs, so they can be printed */ + register_all_ciphers(); + register_all_hashes(); + register_all_prngs(); + + if (argc < 4) { + if ((argc > 2) && (!strcmp(argv[1], "-t"))) { + cipher = argv[2]; + cipher_idx = find_cipher(cipher); + if (cipher_idx == -1) { + printf("Invalid cipher %s entered on command line.\n", cipher); + exit(-1); + } /* if */ + if (cipher_descriptor[cipher_idx].test) + { + if (cipher_descriptor[cipher_idx].test() != CRYPT_OK) + { + printf("Error when testing cipher %s.\n", cipher); + exit(-1); + } + else + { + printf("Testing cipher %s succeeded.\n", cipher); + exit(0); + } /* if ... else */ + } /* if */ + } + return usage(argv[0]); + } + + if (!strcmp(argv[1], "-d")) { + decrypt = 1; + cipher = argv[2]; + infile = argv[3]; + outfile = argv[4]; + } else { + decrypt = 0; + cipher = argv[1]; + infile = argv[2]; + outfile = argv[3]; + } + + /* file handles setup */ + fdin = fopen(infile,"rb"); + if (fdin == NULL) { + perror("Can't open input for reading"); + exit(-1); + } + + fdout = fopen(outfile,"wb"); + if (fdout == NULL) { + perror("Can't open output for writing"); + exit(-1); + } + + cipher_idx = find_cipher(cipher); + if (cipher_idx == -1) { + printf("Invalid cipher entered on command line.\n"); + exit(-1); + } + + hash_idx = find_hash("sha256"); + if (hash_idx == -1) { + printf("LTC_SHA256 not found...?\n"); + exit(-1); + } + + ivsize = cipher_descriptor[cipher_idx].block_length; + ks = hash_descriptor[hash_idx].hashsize; + if (cipher_descriptor[cipher_idx].keysize(&ks) != CRYPT_OK) { + printf("Invalid keysize???\n"); + exit(-1); + } + + printf("\nEnter key: "); + if(fgets((char *)tmpkey,sizeof(tmpkey), stdin) == NULL) + exit(-1); + outlen = sizeof(key); + if ((err = hash_memory(hash_idx,tmpkey,strlen((char *)tmpkey),key,&outlen)) != CRYPT_OK) { + printf("Error hashing key: %s\n", error_to_string(err)); + exit(-1); + } + + if (decrypt) { + /* Need to read in IV */ + if (fread(IV,1,ivsize,fdin) != ivsize) { + printf("Error reading IV from input.\n"); + exit(-1); + } + + if ((err = ctr_start(cipher_idx,IV,key,ks,0,CTR_COUNTER_LITTLE_ENDIAN,&ctr)) != CRYPT_OK) { + printf("ctr_start error: %s\n",error_to_string(err)); + exit(-1); + } + + /* IV done */ + do { + y = fread(inbuf,1,sizeof(inbuf),fdin); + + if ((err = ctr_decrypt(inbuf,plaintext,y,&ctr)) != CRYPT_OK) { + printf("ctr_decrypt error: %s\n", error_to_string(err)); + exit(-1); + } + + if (fwrite(plaintext,1,y,fdout) != y) { + printf("Error writing to file.\n"); + exit(-1); + } + } while (y == sizeof(inbuf)); + fclose(fdin); + fclose(fdout); + + } else { /* encrypt */ + /* Setup yarrow for random bytes for IV */ + + if ((err = rng_make_prng(128, find_prng("yarrow"), &prng, NULL)) != CRYPT_OK) { + printf("Error setting up PRNG, %s\n", error_to_string(err)); + } + + /* You can use rng_get_bytes on platforms that support it */ + /* x = rng_get_bytes(IV,ivsize,NULL);*/ + x = yarrow_read(IV,ivsize,&prng); + if (x != ivsize) { + printf("Error reading PRNG for IV required.\n"); + exit(-1); + } + + if (fwrite(IV,1,ivsize,fdout) != ivsize) { + printf("Error writing IV to output.\n"); + exit(-1); + } + + if ((err = ctr_start(cipher_idx,IV,key,ks,0,CTR_COUNTER_LITTLE_ENDIAN,&ctr)) != CRYPT_OK) { + printf("ctr_start error: %s\n",error_to_string(err)); + exit(-1); + } + + do { + y = fread(inbuf,1,sizeof(inbuf),fdin); + + if ((err = ctr_encrypt(inbuf,ciphertext,y,&ctr)) != CRYPT_OK) { + printf("ctr_encrypt error: %s\n", error_to_string(err)); + exit(-1); + } + + if (fwrite(ciphertext,1,y,fdout) != y) { + printf("Error writing to output.\n"); + exit(-1); + } + } while (y == sizeof(inbuf)); + fclose(fdout); + fclose(fdin); + } + return 0; +} + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/demos/openssl-enc.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/demos/openssl-enc.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,397 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/* + * Demo to do the rough equivalent of: + * + * openssl enc -aes-256-cbc -pass pass:foobar -in infile -out outfile -p + * + * Compilation: + * + * $(CC) -I /path/to/headers -L .../libs \ + * -o openssl-enc \ + * openssl-enc.c -ltomcrypt + * + * Usage: + * + * ./openssl-enc infile outfile "passphrase" [salt] + * + * If provided, the salt must be EXACTLY a 16-char hex string. + * + * Demo is an example of: + * + * - (When decrypting) yanking salt out of the OpenSSL "Salted__..." header + * - OpenSSL-compatible key derivation (in OpenSSL's modified PKCS#5v1 approach) + * - Grabbing an Initialization Vector from the key generator + * - Performing simple block encryption using AES + * - PKCS#7-type padding (which hopefully can get ripped out of this demo and + * made a libtomcrypt thing someday). + * + * This program is free for all purposes without any express guarantee it + * works. If you really want to see a license here, assume the WTFPL :-) + * + * BJ Black, bblack@barracuda.com, https://wjblack.com + * + * BUGS: + * Passing a password on a command line is a HORRIBLE idea. Don't use + * this program for serious work! + */ + +#include + +#ifndef LTC_RIJNDAEL +#error Cannot compile this demo; Rijndael (AES) required +#endif +#ifndef LTC_CBC_MODE +#error Cannot compile this demo; CBC mode required +#endif +#ifndef LTC_PKCS_5 +#error Cannot compile this demo; PKCS5 required +#endif +#ifndef LTC_RNG_GET_BYTES +#error Cannot compile this demo; random generator required +#endif +#ifndef LTC_MD5 +#error Cannot compile this demo; MD5 required +#endif + +/* OpenSSL by default only runs one hash round */ +#define OPENSSL_ITERATIONS 1 +/* Use aes-256-cbc, so 256 bits of key, 128 of IV */ +#define KEY_LENGTH (256>>3) +#define IV_LENGTH (128>>3) +/* PKCS#5v1 requires exactly an 8-byte salt */ +#define SALT_LENGTH 8 +/* The header OpenSSL puts on an encrypted file */ +static char salt_header[] = { 'S', 'a', 'l', 't', 'e', 'd', '_', '_' }; + +#include +#include +#include + +/* A simple way to handle the possibility that a block may increase in size + after padding. */ +union paddable { + unsigned char unpad[1024]; + unsigned char pad[1024+MAXBLOCKSIZE]; +}; + +/* + * Print usage and exit with a bad status (and perror() if any errno). + * + * Input: argv[0] and the error string + * Output: + * Side Effects: print messages and barf (does exit(3)) + */ +void barf(const char *pname, const char *err) +{ + printf("Usage: %s infile outfile passphrase [salt]\n", pname); + printf("\n"); + printf(" # encrypts infile->outfile, random salt\n"); + printf(" %s enc infile outfile \"passphrase\"\n", pname); + printf("\n"); + printf(" # encrypts infile->outfile, salt from cmdline\n"); + printf(" %s enc infile outfile pass 0123456789abcdef\n", pname); + printf("\n"); + printf(" # decrypts infile->outfile, pulls salt from infile\n"); + printf(" %s dec infile outfile pass\n", pname); + printf("\n"); + printf(" # decrypts infile->outfile, salt specified\n"); + printf(" # (don't try to read the salt from infile)\n"); + printf(" %s dec infile outfile pass 0123456789abcdef" + "\n", pname); + printf("\n"); + printf("Application Error: %s\n", err); + if(errno) + perror(" System Error"); + exit(-1); +} + +/* + * Parse a salt value passed in on the cmdline. + * + * Input: string passed in and a buf to put it in (exactly 8 bytes!) + * Output: CRYPT_OK if parsed OK, CRYPT_ERROR if not + * Side Effects: none + */ +int parse_hex_salt(unsigned char *in, unsigned char *out) +{ + int idx; + for(idx=0; idxpad+nb, padval, padval); + return nb+padval; + } else { + /* We are UNPADDING this block (and removing bytes) + We really just need to verify that the pad bytes are correct, + so start at the end of the string and work backwards. */ + + /* Figure out what the padlength should be by looking at the + last byte */ + idx = nb-1; + padval = buf->pad[idx]; + + /* padval must be nonzero and <= block length */ + if(padval <= 0 || padval > block_length) + return 0; + + /* First byte's accounted for; do the rest */ + idx--; + + while(idx >= (off_t)(nb-padval)) + if(buf->pad[idx] != padval) + return 0; + else + idx--; + + /* If we got here, the pad checked out, so return a smaller + number of bytes than nb (basically where we left off+1) */ + return idx+1; + } +} + +/* + * Perform an encrypt/decrypt operation to/from files using AES+CBC+PKCS7 pad. + * Set encrypt to 1 to encrypt, 0 to decrypt. + * + * Input: in/out files, key, iv, and mode + * Output: CRYPT_OK if no error + * Side Effects: bytes slurped from infile, pushed to outfile, fds updated. + */ +int do_crypt(FILE *infd, FILE *outfd, unsigned char *key, unsigned char *iv, + int encrypt) +{ + union paddable inbuf, outbuf; + int cipher, ret; + symmetric_CBC cbc; + size_t nb; + + /* Register your cipher! */ + cipher = register_cipher(&aes_desc); + if(cipher == -1) + return CRYPT_INVALID_CIPHER; + + /* Start a CBC session with cipher/key/val params */ + ret = cbc_start(cipher, iv, key, KEY_LENGTH, 0, &cbc); + if( ret != CRYPT_OK ) + return -1; + + do { + /* Get bytes from the source */ + nb = fread(inbuf.unpad, 1, sizeof(inbuf.unpad), infd); + if(!nb) + return encrypt ? CRYPT_OK : CRYPT_ERROR; + + /* Barf if we got a read error */ + if(ferror(infd)) + return CRYPT_ERROR; + + if(encrypt) { + /* We're encrypting, so pad first (if at EOF) and then + crypt */ + if(feof(infd)) + nb = pkcs7_pad(&inbuf, nb, + aes_desc.block_length, 1); + + ret = cbc_encrypt(inbuf.pad, outbuf.pad, nb, &cbc); + if(ret != CRYPT_OK) + return ret; + + } else { + /* We're decrypting, so decrypt and then unpad if at + EOF */ + ret = cbc_decrypt(inbuf.unpad, outbuf.unpad, nb, &cbc); + if( ret != CRYPT_OK ) + return ret; + + if( feof(infd) ) + nb = pkcs7_pad(&outbuf, nb, + aes_desc.block_length, 0); + if(nb == 0) + /* The file didn't decrypt correctly */ + return CRYPT_ERROR; + + } + + /* Push bytes to outfile */ + if(fwrite(outbuf.unpad, 1, nb, outfd) != nb) + return CRYPT_ERROR; + + } while(!feof(infd)); + + /* Close up */ + cbc_done(&cbc); + + return CRYPT_OK; +} + +/* Convenience macro for the various barfable places below */ +#define BARF(a) { \ + if(infd) fclose(infd); \ + if(outfd) { fclose(outfd); remove(argv[3]); } \ + barf(argv[0], a); \ +} +/* + * The main routine. Mostly validate cmdline params, open files, run the KDF, + * and do the crypt. + */ +int main(int argc, char *argv[]) { + unsigned char salt[SALT_LENGTH]; + FILE *infd = NULL, *outfd = NULL; + int encrypt = -1; + int hash = -1; + int ret; + unsigned char keyiv[KEY_LENGTH + IV_LENGTH]; + unsigned long keyivlen = (KEY_LENGTH + IV_LENGTH); + unsigned char *key, *iv; + + /* Check proper number of cmdline args */ + if(argc < 5 || argc > 6) + BARF("Invalid number of arguments"); + + /* Check proper mode of operation */ + if (!strncmp(argv[1], "enc", 3)) + encrypt = 1; + else if(!strncmp(argv[1], "dec", 3)) + encrypt = 0; + else + BARF("Bad command name"); + + /* Check we can open infile/outfile */ + infd = fopen(argv[2], "rb"); + if(infd == NULL) + BARF("Could not open infile"); + outfd = fopen(argv[3], "wb"); + if(outfd == NULL) + BARF("Could not open outfile"); + + /* Get the salt from wherever */ + if(argc == 6) { + /* User-provided */ + if(parse_hex_salt((unsigned char*) argv[5], salt) != CRYPT_OK) + BARF("Bad user-specified salt"); + } else if(!strncmp(argv[1], "enc", 3)) { + /* Encrypting; get from RNG */ + if(rng_get_bytes(salt, sizeof(salt), NULL) != sizeof(salt)) + BARF("Not enough random data"); + } else { + /* Parse from infile (decrypt only) */ + if(parse_openssl_header(infd, salt) != CRYPT_OK) + BARF("Invalid OpenSSL header in infile"); + } + + /* Fetch the MD5 hasher for PKCS#5 */ + hash = register_hash(&md5_desc); + if(hash == -1) + BARF("Could not register MD5 hash"); + + /* Set things to a sane initial state */ + zeromem(keyiv, sizeof(keyiv)); + key = keyiv + 0; /* key comes first */ + iv = keyiv + KEY_LENGTH; /* iv comes next */ + + /* Run the key derivation from the provided passphrase. This gets us + the key and iv. */ + ret = pkcs_5_alg1_openssl((unsigned char*)argv[4], strlen(argv[4]), salt, + OPENSSL_ITERATIONS, hash, keyiv, &keyivlen ); + if(ret != CRYPT_OK) + BARF("Could not derive key/iv from passphrase"); + + /* Display the salt/key/iv like OpenSSL cmdline does when -p */ + printf("salt="); dump_bytes(salt, sizeof(salt)); printf("\n"); + printf("key="); dump_bytes(key, KEY_LENGTH); printf("\n"); + printf("iv ="); dump_bytes(iv, IV_LENGTH ); printf("\n"); + + /* If we're encrypting, write the salt header as OpenSSL does */ + if(!strncmp(argv[1], "enc", 3)) { + if(fwrite(salt_header, 1, sizeof(salt_header), outfd) != + sizeof(salt_header) ) + BARF("Error writing salt header to outfile"); + if(fwrite(salt, 1, sizeof(salt), outfd) != sizeof(salt)) + BARF("Error writing salt to outfile"); + } + + /* At this point, the files are open, the salt has been figured out, + and we're ready to pump data through crypt. */ + + /* Do the crypt operation */ + if(do_crypt(infd, outfd, key, iv, encrypt) != CRYPT_OK) + BARF("Error during crypt operation"); + + /* Clean up */ + fclose(infd); fclose(outfd); + return 0; +} + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/demos/sizes.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/demos/sizes.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,79 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L +#include +#else +#define basename(x) x +#endif +/** + @file demo_crypt_sizes.c + + Demo how to get various sizes to dynamic languages + like Python - Larry Bugbee, February 2013 +*/ + +static void _print_line(const char* cmd, const char* desc) +{ + printf(" %-16s - %s\n", cmd, desc); +} + +int main(int argc, char **argv) +{ + if (argc == 1) { + /* given a specific size name, get and print its size */ + char name[] = "ltc_hash_descriptor"; + unsigned int size; + char *sizes_list; + unsigned int sizes_list_len; + if (crypt_get_size(name, &size) != 0) exit(EXIT_FAILURE); + printf("\n size of '%s' is %u \n\n", name, size); + + /* get and print the length of the names (and sizes) list */ + if (crypt_list_all_sizes(NULL, &sizes_list_len) != 0) exit(EXIT_FAILURE); + printf(" need to allocate %u bytes \n\n", sizes_list_len); + + /* get and print the names (and sizes) list */ + sizes_list = malloc(sizes_list_len); + if (crypt_list_all_sizes(sizes_list, &sizes_list_len) != 0) exit(EXIT_FAILURE); + printf(" supported sizes:\n\n%s\n\n", sizes_list); + } else if (argc == 2) { + if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0) { + char* base = strdup(basename(argv[0])); + printf("Usage: %s [-a] [-s name]\n\n", base); + _print_line("", "The old behavior of the demo"); + _print_line("-a", "Only lists all sizes"); + _print_line("-s name", "List a single size given as argument"); + _print_line("-h", "The help you're looking at"); + free(base); + } else if (strcmp(argv[1], "-a") == 0) { + char *sizes_list; + unsigned int sizes_list_len; + /* get and print the length of the names (and sizes) list */ + if (crypt_list_all_sizes(NULL, &sizes_list_len) != 0) exit(EXIT_FAILURE); + /* get and print the names (and sizes) list */ + sizes_list = malloc(sizes_list_len); + if (crypt_list_all_sizes(sizes_list, &sizes_list_len) != 0) exit(EXIT_FAILURE); + printf("%s\n", sizes_list); + } + } else if (argc == 3) { + if (strcmp(argv[1], "-s") == 0) { + unsigned int size; + if (crypt_get_size(argv[2], &size) != 0) exit(EXIT_FAILURE); + printf("%s,%u\n", argv[2], size); + } + } + return 0; +} + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/demos/small.c --- a/libtomcrypt/demos/small.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/demos/small.c Fri Feb 09 21:44:05 2018 +0800 @@ -1,3 +1,11 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ /* small demo app that just includes a cipher/hash/prng */ #include @@ -9,6 +17,6 @@ return 0; } -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/demos/timing.c --- a/libtomcrypt/demos/timing.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/demos/timing.c Fri Feb 09 21:44:05 2018 +0800 @@ -1,10 +1,1435 @@ -#include +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include + +#if defined(_WIN32) + #define PRI64 "I64d" +#else + #define PRI64 "ll" +#endif + +static prng_state yarrow_prng; + +/* timing */ +#define KTIMES 25 +#define TIMES 100000 + +static struct list { + int id; + ulong64 spd1, spd2, avg; +} results[100]; +static int no_results; + +static int sorter(const void *a, const void *b) +{ + const struct list *A, *B; + A = a; + B = b; + if (A->avg < B->avg) return -1; + if (A->avg > B->avg) return 1; + return 0; +} + +static void tally_results(int type) +{ + int x; + + /* qsort the results */ + qsort(results, no_results, sizeof(struct list), &sorter); + + fprintf(stderr, "\n"); + if (type == 0) { + for (x = 0; x < no_results; x++) { + fprintf(stderr, "%-20s: Schedule at %6lu\n", cipher_descriptor[results[x].id].name, (unsigned long)results[x].spd1); + } + } else if (type == 1) { + for (x = 0; x < no_results; x++) { + printf + ("%-20s[%3d]: Encrypt at %5"PRI64"u, Decrypt at %5"PRI64"u\n", cipher_descriptor[results[x].id].name, cipher_descriptor[results[x].id].ID, results[x].spd1, results[x].spd2); + } + } else { + for (x = 0; x < no_results; x++) { + printf + ("%-20s: Process at %5"PRI64"u\n", hash_descriptor[results[x].id].name, results[x].spd1 / 1000); + } + } +} + +/* RDTSC from Scott Duplichan */ +static ulong64 rdtsc (void) + { + #if defined __GNUC__ && !defined(LTC_NO_ASM) + #if defined(__i386__) || defined(__x86_64__) + /* version from http://www.mcs.anl.gov/~kazutomo/rdtsc.html + * the old code always got a warning issued by gcc, clang did not complain... + */ + unsigned hi, lo; + __asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi)); + return ((ulong64)lo)|( ((ulong64)hi)<<32); + #elif defined(LTC_PPC32) || defined(TFM_PPC32) + unsigned long a, b; + __asm__ __volatile__ ("mftbu %1 \nmftb %0\n":"=r"(a), "=r"(b)); + return (((ulong64)b) << 32ULL) | ((ulong64)a); + #elif defined(__ia64__) /* gcc-IA64 version */ + unsigned long result; + __asm__ __volatile__("mov %0=ar.itc" : "=r"(result) :: "memory"); + while (__builtin_expect ((int) result == -1, 0)) + __asm__ __volatile__("mov %0=ar.itc" : "=r"(result) :: "memory"); + return result; + #elif defined(__sparc__) + #if defined(__arch64__) + ulong64 a; + asm volatile("rd %%tick,%0" : "=r" (a)); + return a; + #else + register unsigned long x, y; + __asm__ __volatile__ ("rd %%tick, %0; clruw %0, %1; srlx %0, 32, %0" : "=r" (x), "=r" (y) : "0" (x), "1" (y)); + return ((unsigned long long) x << 32) | y; + #endif + #else + return XCLOCK(); + #endif + + /* Microsoft and Intel Windows compilers */ + #elif defined _M_IX86 && !defined(LTC_NO_ASM) + __asm rdtsc + #elif defined _M_AMD64 && !defined(LTC_NO_ASM) + return __rdtsc (); + #elif defined _M_IA64 && !defined(LTC_NO_ASM) + #if defined __INTEL_COMPILER + #include + #endif + return __getReg (3116); + #else + return XCLOCK(); + #endif + } + +static ulong64 timer, skew = 0; + +static void t_start(void) +{ + timer = rdtsc(); +} + +static ulong64 t_read(void) +{ + return rdtsc() - timer; +} + +static void init_timer(void) +{ + ulong64 c1, c2, t1, t2; + unsigned long y1; + + c1 = c2 = (ulong64)-1; + for (y1 = 0; y1 < TIMES*100; y1++) { + t_start(); + t1 = t_read(); + t2 = (t_read() - t1)>>1; + + c1 = (t1 > c1) ? t1 : c1; + c2 = (t2 > c2) ? t2 : c2; + } + skew = c2 - c1; + fprintf(stderr, "Clock Skew: %lu\n", (unsigned long)skew); +} + +static void time_keysched(void) +{ + unsigned long x, y1; + ulong64 t1, c1; + symmetric_key skey; + int kl; + int (*func) (const unsigned char *, int , int , symmetric_key *); + unsigned char key[MAXBLOCKSIZE]; + + fprintf(stderr, "\n\nKey Schedule Time Trials for the Symmetric Ciphers:\n(Times are cycles per key)\n"); + no_results = 0; + for (x = 0; cipher_descriptor[x].name != NULL; x++) { +#define DO1(k) func(k, kl, 0, &skey); + + func = cipher_descriptor[x].setup; + kl = cipher_descriptor[x].min_key_length; + c1 = (ulong64)-1; + for (y1 = 0; y1 < KTIMES; y1++) { + yarrow_read(key, kl, &yarrow_prng); + t_start(); + DO1(key); + t1 = t_read(); + c1 = (t1 > c1) ? c1 : t1; + } + t1 = c1 - skew; + results[no_results].spd1 = results[no_results].avg = t1; + results[no_results++].id = x; + fprintf(stderr, "."); fflush(stdout); + +#undef DO1 + } + tally_results(0); +} + +#ifdef LTC_ECB_MODE +static void time_cipher_ecb(void) +{ + unsigned long x, y1; + ulong64 t1, t2, c1, c2, a1, a2; + symmetric_ECB ecb; + unsigned char key[MAXBLOCKSIZE] = { 0 }, pt[4096] = { 0 }; + int err; + + fprintf(stderr, "\n\nECB Time Trials for the Symmetric Ciphers:\n"); + no_results = 0; + for (x = 0; cipher_descriptor[x].name != NULL; x++) { + ecb_start(x, key, cipher_descriptor[x].min_key_length, 0, &ecb); + + /* sanity check on cipher */ + if ((err = cipher_descriptor[x].test()) != CRYPT_OK) { + fprintf(stderr, "\n\nERROR: Cipher %s failed self-test %s\n", cipher_descriptor[x].name, error_to_string(err)); + exit(EXIT_FAILURE); + } + +#define DO1 ecb_encrypt(pt, pt, sizeof(pt), &ecb); +#define DO2 DO1 DO1 + + c1 = c2 = (ulong64)-1; + for (y1 = 0; y1 < 100; y1++) { + t_start(); + DO1; + t1 = t_read(); + DO2; + t2 = t_read(); + t2 -= t1; + + c1 = (t1 > c1 ? c1 : t1); + c2 = (t2 > c2 ? c2 : t2); + } + a1 = c2 - c1 - skew; + +#undef DO1 +#undef DO2 +#define DO1 ecb_decrypt(pt, pt, sizeof(pt), &ecb); +#define DO2 DO1 DO1 + + c1 = c2 = (ulong64)-1; + for (y1 = 0; y1 < 100; y1++) { + t_start(); + DO1; + t1 = t_read(); + DO2; + t2 = t_read(); + t2 -= t1; + + c1 = (t1 > c1 ? c1 : t1); + c2 = (t2 > c2 ? c2 : t2); + } + a2 = c2 - c1 - skew; + ecb_done(&ecb); + + results[no_results].id = x; + results[no_results].spd1 = a1/(sizeof(pt)/cipher_descriptor[x].block_length); + results[no_results].spd2 = a2/(sizeof(pt)/cipher_descriptor[x].block_length); + results[no_results].avg = (results[no_results].spd1 + results[no_results].spd2+1)/2; + ++no_results; + fprintf(stderr, "."); fflush(stdout); + +#undef DO2 +#undef DO1 + } + tally_results(1); +} +#else +static void time_cipher_ecb(void) { fprintf(stderr, "NO ECB\n"); return 0; } +#endif + +#ifdef LTC_CBC_MODE +static void time_cipher_cbc(void) +{ + unsigned long x, y1; + ulong64 t1, t2, c1, c2, a1, a2; + symmetric_CBC cbc; + unsigned char key[MAXBLOCKSIZE] = { 0 }, pt[4096] = { 0 }; + int err; + + fprintf(stderr, "\n\nCBC Time Trials for the Symmetric Ciphers:\n"); + no_results = 0; + for (x = 0; cipher_descriptor[x].name != NULL; x++) { + cbc_start(x, pt, key, cipher_descriptor[x].min_key_length, 0, &cbc); + + /* sanity check on cipher */ + if ((err = cipher_descriptor[x].test()) != CRYPT_OK) { + fprintf(stderr, "\n\nERROR: Cipher %s failed self-test %s\n", cipher_descriptor[x].name, error_to_string(err)); + exit(EXIT_FAILURE); + } + +#define DO1 cbc_encrypt(pt, pt, sizeof(pt), &cbc); +#define DO2 DO1 DO1 + + c1 = c2 = (ulong64)-1; + for (y1 = 0; y1 < 100; y1++) { + t_start(); + DO1; + t1 = t_read(); + DO2; + t2 = t_read(); + t2 -= t1; + + c1 = (t1 > c1 ? c1 : t1); + c2 = (t2 > c2 ? c2 : t2); + } + a1 = c2 - c1 - skew; + +#undef DO1 +#undef DO2 +#define DO1 cbc_decrypt(pt, pt, sizeof(pt), &cbc); +#define DO2 DO1 DO1 + + c1 = c2 = (ulong64)-1; + for (y1 = 0; y1 < 100; y1++) { + t_start(); + DO1; + t1 = t_read(); + DO2; + t2 = t_read(); + t2 -= t1; + + c1 = (t1 > c1 ? c1 : t1); + c2 = (t2 > c2 ? c2 : t2); + } + a2 = c2 - c1 - skew; + cbc_done(&cbc); + + results[no_results].id = x; + results[no_results].spd1 = a1/(sizeof(pt)/cipher_descriptor[x].block_length); + results[no_results].spd2 = a2/(sizeof(pt)/cipher_descriptor[x].block_length); + results[no_results].avg = (results[no_results].spd1 + results[no_results].spd2+1)/2; + ++no_results; + fprintf(stderr, "."); fflush(stdout); + +#undef DO2 +#undef DO1 + } + tally_results(1); +} +#else +static void time_cipher_cbc(void) { fprintf(stderr, "NO CBC\n"); return 0; } +#endif + +#ifdef LTC_CTR_MODE +static void time_cipher_ctr(void) +{ + unsigned long x, y1; + ulong64 t1, t2, c1, c2, a1, a2; + symmetric_CTR ctr; + unsigned char key[MAXBLOCKSIZE] = { 0 }, pt[4096] = { 0 }; + int err; + + fprintf(stderr, "\n\nCTR Time Trials for the Symmetric Ciphers:\n"); + no_results = 0; + for (x = 0; cipher_descriptor[x].name != NULL; x++) { + ctr_start(x, pt, key, cipher_descriptor[x].min_key_length, 0, CTR_COUNTER_LITTLE_ENDIAN, &ctr); + + /* sanity check on cipher */ + if ((err = cipher_descriptor[x].test()) != CRYPT_OK) { + fprintf(stderr, "\n\nERROR: Cipher %s failed self-test %s\n", cipher_descriptor[x].name, error_to_string(err)); + exit(EXIT_FAILURE); + } + +#define DO1 ctr_encrypt(pt, pt, sizeof(pt), &ctr); +#define DO2 DO1 DO1 + + c1 = c2 = (ulong64)-1; + for (y1 = 0; y1 < 100; y1++) { + t_start(); + DO1; + t1 = t_read(); + DO2; + t2 = t_read(); + t2 -= t1; + + c1 = (t1 > c1 ? c1 : t1); + c2 = (t2 > c2 ? c2 : t2); + } + a1 = c2 - c1 - skew; + +#undef DO1 +#undef DO2 +#define DO1 ctr_decrypt(pt, pt, sizeof(pt), &ctr); +#define DO2 DO1 DO1 + + c1 = c2 = (ulong64)-1; + for (y1 = 0; y1 < 100; y1++) { + t_start(); + DO1; + t1 = t_read(); + DO2; + t2 = t_read(); + t2 -= t1; + + c1 = (t1 > c1 ? c1 : t1); + c2 = (t2 > c2 ? c2 : t2); + } + a2 = c2 - c1 - skew; + ctr_done(&ctr); + + results[no_results].id = x; + results[no_results].spd1 = a1/(sizeof(pt)/cipher_descriptor[x].block_length); + results[no_results].spd2 = a2/(sizeof(pt)/cipher_descriptor[x].block_length); + results[no_results].avg = (results[no_results].spd1 + results[no_results].spd2+1)/2; + ++no_results; + fprintf(stderr, "."); fflush(stdout); + +#undef DO2 +#undef DO1 + } + tally_results(1); +} +#else +static void time_cipher_ctr(void) { fprintf(stderr, "NO CTR\n"); return 0; } +#endif + +#ifdef LTC_LRW_MODE +static void time_cipher_lrw(void) +{ + unsigned long x, y1; + ulong64 t1, t2, c1, c2, a1, a2; + symmetric_LRW lrw; + unsigned char key[MAXBLOCKSIZE] = { 0 }, pt[4096] = { 0 }; + int err; + + fprintf(stderr, "\n\nLRW Time Trials for the Symmetric Ciphers:\n"); + no_results = 0; + for (x = 0; cipher_descriptor[x].name != NULL; x++) { + if (cipher_descriptor[x].block_length != 16) continue; + lrw_start(x, pt, key, cipher_descriptor[x].min_key_length, key, 0, &lrw); + + /* sanity check on cipher */ + if ((err = cipher_descriptor[x].test()) != CRYPT_OK) { + fprintf(stderr, "\n\nERROR: Cipher %s failed self-test %s\n", cipher_descriptor[x].name, error_to_string(err)); + exit(EXIT_FAILURE); + } + +#define DO1 lrw_encrypt(pt, pt, sizeof(pt), &lrw); +#define DO2 DO1 DO1 + + c1 = c2 = (ulong64)-1; + for (y1 = 0; y1 < 100; y1++) { + t_start(); + DO1; + t1 = t_read(); + DO2; + t2 = t_read(); + t2 -= t1; + + c1 = (t1 > c1 ? c1 : t1); + c2 = (t2 > c2 ? c2 : t2); + } + a1 = c2 - c1 - skew; + +#undef DO1 +#undef DO2 +#define DO1 lrw_decrypt(pt, pt, sizeof(pt), &lrw); +#define DO2 DO1 DO1 + + c1 = c2 = (ulong64)-1; + for (y1 = 0; y1 < 100; y1++) { + t_start(); + DO1; + t1 = t_read(); + DO2; + t2 = t_read(); + t2 -= t1; + + c1 = (t1 > c1 ? c1 : t1); + c2 = (t2 > c2 ? c2 : t2); + } + a2 = c2 - c1 - skew; + + lrw_done(&lrw); + + results[no_results].id = x; + results[no_results].spd1 = a1/(sizeof(pt)/cipher_descriptor[x].block_length); + results[no_results].spd2 = a2/(sizeof(pt)/cipher_descriptor[x].block_length); + results[no_results].avg = (results[no_results].spd1 + results[no_results].spd2+1)/2; + ++no_results; + fprintf(stderr, "."); fflush(stdout); + +#undef DO2 +#undef DO1 + } + tally_results(1); +} +#else +static void time_cipher_lrw(void) { fprintf(stderr, "NO LRW\n"); return 0; } +#endif + + +static void time_hash(void) +{ + unsigned long x, y1, len; + ulong64 t1, t2, c1, c2; + hash_state md; + int (*func)(hash_state *, const unsigned char *, unsigned long), err; + unsigned char pt[MAXBLOCKSIZE] = { 0 }; + + + fprintf(stderr, "\n\nHASH Time Trials for:\n"); + no_results = 0; + for (x = 0; hash_descriptor[x].name != NULL; x++) { + + /* sanity check on hash */ + if ((err = hash_descriptor[x].test()) != CRYPT_OK) { + fprintf(stderr, "\n\nERROR: Hash %s failed self-test %s\n", hash_descriptor[x].name, error_to_string(err)); + exit(EXIT_FAILURE); + } + + hash_descriptor[x].init(&md); + +#define DO1 func(&md,pt,len); +#define DO2 DO1 DO1 + + func = hash_descriptor[x].process; + len = hash_descriptor[x].blocksize; + + c1 = c2 = (ulong64)-1; + for (y1 = 0; y1 < TIMES; y1++) { + t_start(); + DO1; + t1 = t_read(); + DO2; + t2 = t_read() - t1; + c1 = (t1 > c1) ? c1 : t1; + c2 = (t2 > c2) ? c2 : t2; + } + t1 = c2 - c1 - skew; + t1 = ((t1 * CONST64(1000))) / ((ulong64)hash_descriptor[x].blocksize); + results[no_results].id = x; + results[no_results].spd1 = results[no_results].avg = t1; + ++no_results; + fprintf(stderr, "."); fflush(stdout); +#undef DO2 +#undef DO1 + } + tally_results(2); +} + +/*#warning you need an mp_rand!!!*/ +#if !defined(USE_LTM) && !defined(USE_TFM) && !defined(USE_GMP) && !defined(EXT_MATH_LIB) + #undef LTC_MPI + #undef LTC_TEST_MPI +#else + #define LTC_TEST_MPI +#endif + +#ifdef LTC_MPI +static void time_mult(void) +{ + ulong64 t1, t2; + unsigned long x, y; + void *a, *b, *c; + + fprintf(stderr, "Timing Multiplying:\n"); + mp_init_multi(&a,&b,&c,NULL); + for (x = 128/MP_DIGIT_BIT; x <= (unsigned long)1536/MP_DIGIT_BIT; x += 128/MP_DIGIT_BIT) { + mp_rand(a, x); + mp_rand(b, x); + +#define DO1 mp_mul(a, b, c); +#define DO2 DO1; DO1; + + t2 = -1; + for (y = 0; y < TIMES; y++) { + t_start(); + t1 = t_read(); + DO2; + t1 = (t_read() - t1)>>1; + if (t1 < t2) t2 = t1; + } + fprintf(stderr, "%4lu bits: %9"PRI64"u cycles\n", x*MP_DIGIT_BIT, t2); + } + mp_clear_multi(a,b,c,NULL); + +#undef DO1 +#undef DO2 +} + +static void time_sqr(void) +{ + ulong64 t1, t2; + unsigned long x, y; + void *a, *b; + + fprintf(stderr, "Timing Squaring:\n"); + mp_init_multi(&a,&b,NULL); + for (x = 128/MP_DIGIT_BIT; x <= (unsigned long)1536/MP_DIGIT_BIT; x += 128/MP_DIGIT_BIT) { + mp_rand(a, x); + +#define DO1 mp_sqr(a, b); +#define DO2 DO1; DO1; + + t2 = -1; + for (y = 0; y < TIMES; y++) { + t_start(); + t1 = t_read(); + DO2; + t1 = (t_read() - t1)>>1; + if (t1 < t2) t2 = t1; + } + fprintf(stderr, "%4lu bits: %9"PRI64"u cycles\n", x*MP_DIGIT_BIT, t2); + } + mp_clear_multi(a,b,NULL); + +#undef DO1 +#undef DO2 +} +#else +static void time_mult(void) { fprintf(stderr, "NO MULT\n"); } +static void time_sqr(void) { fprintf(stderr, "NO SQR\n"); } +#endif + +static void time_prng(void) +{ + ulong64 t1, t2; + unsigned char buf[4096]; + prng_state tprng; + unsigned long x, y; + int err; + + fprintf(stderr, "Timing PRNGs (cycles/byte output, cycles add_entropy (32 bytes) :\n"); + for (x = 0; prng_descriptor[x].name != NULL; x++) { + + /* sanity check on prng */ + if ((err = prng_descriptor[x].test()) != CRYPT_OK) { + fprintf(stderr, "\n\nERROR: PRNG %s failed self-test %s\n", prng_descriptor[x].name, error_to_string(err)); + exit(EXIT_FAILURE); + } + + prng_descriptor[x].start(&tprng); + zeromem(buf, 256); + prng_descriptor[x].add_entropy(buf, 256, &tprng); + prng_descriptor[x].ready(&tprng); + t2 = -1; + +#define DO1 if (prng_descriptor[x].read(buf, 4096, &tprng) != 4096) { fprintf(stderr, "\n\nERROR READ != 4096\n\n"); exit(EXIT_FAILURE); } +#define DO2 DO1 DO1 + for (y = 0; y < 10000; y++) { + t_start(); + t1 = t_read(); + DO2; + t1 = (t_read() - t1)>>1; + if (t1 < t2) t2 = t1; + } + fprintf(stderr, "%20s: %5"PRI64"u ", prng_descriptor[x].name, t2>>12); +#undef DO2 +#undef DO1 + +#define DO1 prng_descriptor[x].start(&tprng); prng_descriptor[x].add_entropy(buf, 32, &tprng); prng_descriptor[x].ready(&tprng); prng_descriptor[x].done(&tprng); +#define DO2 DO1 DO1 + for (y = 0; y < 10000; y++) { + t_start(); + t1 = t_read(); + DO2; + t1 = (t_read() - t1)>>1; + if (t1 < t2) t2 = t1; + } + fprintf(stderr, "%5"PRI64"u\n", t2); +#undef DO2 +#undef DO1 + + } +} + +#if defined(LTC_MDSA) && defined(LTC_TEST_MPI) +/* time various DSA operations */ +static void time_dsa(void) +{ + dsa_key key; + ulong64 t1, t2; + unsigned long x, y; + int err; +static const struct { + int group, modulus; +} groups[] = { +{ 20, 96 }, +{ 20, 128 }, +{ 24, 192 }, +{ 28, 256 }, +#ifndef TFM_DESC +{ 32, 512 }, +#endif +}; + + for (x = 0; x < (sizeof(groups)/sizeof(groups[0])); x++) { + t2 = 0; + for (y = 0; y < 4; y++) { + t_start(); + t1 = t_read(); + if ((err = dsa_generate_pqg(&yarrow_prng, find_prng("yarrow"), groups[x].group, groups[x].modulus, &key)) != CRYPT_OK) { + fprintf(stderr, "\n\ndsa_generate_pqg says %s, wait...no it should say %s...damn you!\n", error_to_string(err), error_to_string(CRYPT_OK)); + exit(EXIT_FAILURE); + } + if ((err = dsa_generate_key(&yarrow_prng, find_prng("yarrow"), &key)) != CRYPT_OK) { + fprintf(stderr, "\n\ndsa_make_key says %s, wait...no it should say %s...damn you!\n", error_to_string(err), error_to_string(CRYPT_OK)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + t2 += t1; + +#ifdef LTC_PROFILE + t2 <<= 2; + break; +#endif + if (y < 3) { + dsa_free(&key); + } + } + t2 >>= 2; + fprintf(stderr, "DSA-(%lu, %lu) make_key took %15"PRI64"u cycles\n", (unsigned long)groups[x].group*8, (unsigned long)groups[x].modulus*8, t2); + dsa_free(&key); + } + fprintf(stderr, "\n\n"); +} +#else +static void time_dsa(void) { fprintf(stderr, "NO DSA\n"); } +#endif + + +#if defined(LTC_MRSA) && defined(LTC_TEST_MPI) +/* time various RSA operations */ +static void time_rsa(void) +{ + rsa_key key; + ulong64 t1, t2; + unsigned char buf[2][2048] = { 0 }; + unsigned long x, y, z, zzz; + int err, zz, stat; -int main(void) + for (x = 1024; x <= 2048; x += 256) { + t2 = 0; + for (y = 0; y < 4; y++) { + t_start(); + t1 = t_read(); + if ((err = rsa_make_key(&yarrow_prng, find_prng("yarrow"), x/8, 65537, &key)) != CRYPT_OK) { + fprintf(stderr, "\n\nrsa_make_key says %s, wait...no it should say %s...damn you!\n", error_to_string(err), error_to_string(CRYPT_OK)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + t2 += t1; + +#ifdef LTC_PROFILE + t2 <<= 2; + break; +#endif + + if (y < 3) { + rsa_free(&key); + } + } + t2 >>= 2; + fprintf(stderr, "RSA-%lu make_key took %15"PRI64"u cycles\n", x, t2); + + t2 = 0; + for (y = 0; y < 16; y++) { + t_start(); + t1 = t_read(); + z = sizeof(buf[1]); + if ((err = rsa_encrypt_key(buf[0], 32, buf[1], &z, (const unsigned char *)"testprog", 8, &yarrow_prng, + find_prng("yarrow"), find_hash("sha1"), + &key)) != CRYPT_OK) { + fprintf(stderr, "\n\nrsa_encrypt_key says %s, wait...no it should say %s...damn you!\n", error_to_string(err), error_to_string(CRYPT_OK)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + t2 += t1; +#ifdef LTC_PROFILE + t2 <<= 4; + break; +#endif + } + t2 >>= 4; + fprintf(stderr, "RSA-%lu encrypt_key took %15"PRI64"u cycles\n", x, t2); + + t2 = 0; + for (y = 0; y < 2048; y++) { + t_start(); + t1 = t_read(); + zzz = sizeof(buf[0]); + if ((err = rsa_decrypt_key(buf[1], z, buf[0], &zzz, (const unsigned char *)"testprog", 8, find_hash("sha1"), + &zz, &key)) != CRYPT_OK) { + fprintf(stderr, "\n\nrsa_decrypt_key says %s, wait...no it should say %s...damn you!\n", error_to_string(err), error_to_string(CRYPT_OK)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + t2 += t1; +#ifdef LTC_PROFILE + t2 <<= 11; + break; +#endif + } + t2 >>= 11; + fprintf(stderr, "RSA-%lu decrypt_key took %15"PRI64"u cycles\n", x, t2); + + t2 = 0; + for (y = 0; y < 256; y++) { + t_start(); + t1 = t_read(); + z = sizeof(buf[1]); + if ((err = rsa_sign_hash(buf[0], 20, buf[1], &z, &yarrow_prng, + find_prng("yarrow"), find_hash("sha1"), 8, &key)) != CRYPT_OK) { + fprintf(stderr, "\n\nrsa_sign_hash says %s, wait...no it should say %s...damn you!\n", error_to_string(err), error_to_string(CRYPT_OK)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + t2 += t1; +#ifdef LTC_PROFILE + t2 <<= 8; + break; +#endif + } + t2 >>= 8; + fprintf(stderr, "RSA-%lu sign_hash took %15"PRI64"u cycles\n", x, t2); + + t2 = 0; + for (y = 0; y < 2048; y++) { + t_start(); + t1 = t_read(); + if ((err = rsa_verify_hash(buf[1], z, buf[0], 20, find_hash("sha1"), 8, &stat, &key)) != CRYPT_OK) { + fprintf(stderr, "\n\nrsa_verify_hash says %s, wait...no it should say %s...damn you!\n", error_to_string(err), error_to_string(CRYPT_OK)); + exit(EXIT_FAILURE); + } + if (stat == 0) { + fprintf(stderr, "\n\nrsa_verify_hash for RSA-%lu failed to verify signature(%lu)\n", x, y); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + t2 += t1; +#ifdef LTC_PROFILE + t2 <<= 11; + break; +#endif + } + t2 >>= 11; + fprintf(stderr, "RSA-%lu verify_hash took %15"PRI64"u cycles\n", x, t2); + fprintf(stderr, "\n\n"); + rsa_free(&key); + } +} +#else +static void time_rsa(void) { fprintf(stderr, "NO RSA\n"); } +#endif + +#if defined(LTC_MKAT) && defined(LTC_TEST_MPI) +/* time various KAT operations */ +static void time_katja(void) +{ + katja_key key; + ulong64 t1, t2; + unsigned char buf[2][4096]; + unsigned long x, y, z, zzz; + int err, zz; + + for (x = 1024; x <= 2048; x += 256) { + t2 = 0; + for (y = 0; y < 4; y++) { + t_start(); + t1 = t_read(); + if ((err = katja_make_key(&yarrow_prng, find_prng("yarrow"), x/8, &key)) != CRYPT_OK) { + fprintf(stderr, "\n\nkatja_make_key says %s, wait...no it should say %s...damn you!\n", error_to_string(err), error_to_string(CRYPT_OK)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + t2 += t1; + + if (y < 3) { + katja_free(&key); + } + } + t2 >>= 2; + fprintf(stderr, "Katja-%lu make_key took %15"PRI64"u cycles\n", x, t2); + + t2 = 0; + for (y = 0; y < 16; y++) { + t_start(); + t1 = t_read(); + z = sizeof(buf[1]); + if ((err = katja_encrypt_key(buf[0], 32, buf[1], &z, "testprog", 8, &yarrow_prng, + find_prng("yarrow"), find_hash("sha1"), + &key)) != CRYPT_OK) { + fprintf(stderr, "\n\nkatja_encrypt_key says %s, wait...no it should say %s...damn you!\n", error_to_string(err), error_to_string(CRYPT_OK)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + t2 += t1; + } + t2 >>= 4; + fprintf(stderr, "Katja-%lu encrypt_key took %15"PRI64"u cycles\n", x, t2); + + t2 = 0; + for (y = 0; y < 2048; y++) { + t_start(); + t1 = t_read(); + zzz = sizeof(buf[0]); + if ((err = katja_decrypt_key(buf[1], z, buf[0], &zzz, "testprog", 8, find_hash("sha1"), + &zz, &key)) != CRYPT_OK) { + fprintf(stderr, "\n\nkatja_decrypt_key says %s, wait...no it should say %s...damn you!\n", error_to_string(err), error_to_string(CRYPT_OK)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + t2 += t1; + } + t2 >>= 11; + fprintf(stderr, "Katja-%lu decrypt_key took %15"PRI64"u cycles\n", x, t2); + + + katja_free(&key); + } +} +#else +static void time_katja(void) { fprintf(stderr, "NO Katja\n"); } +#endif + +#if defined(LTC_MDH) && defined(LTC_TEST_MPI) +/* time various DH operations */ +static void time_dh(void) +{ + dh_key key; + ulong64 t1, t2; + unsigned long i, x, y; + int err; + static unsigned long sizes[] = {768/8, 1024/8, 1536/8, 2048/8, +#ifndef TFM_DESC + 3072/8, 4096/8, 6144/8, 8192/8, +#endif + 100000 + }; + + for (x = sizes[i=0]; x < 100000; x = sizes[++i]) { + t2 = 0; + for (y = 0; y < 16; y++) { + if((err = dh_set_pg_groupsize(x, &key)) != CRYPT_OK) { + fprintf(stderr, "\n\ndh_set_pg_groupsize says %s, wait...no it should say %s...damn you!\n", error_to_string(err), error_to_string(CRYPT_OK)); + exit(EXIT_FAILURE); + } + + t_start(); + t1 = t_read(); + if ((err = dh_generate_key(&yarrow_prng, find_prng("yarrow"), &key)) != CRYPT_OK) { + fprintf(stderr, "\n\ndh_make_key says %s, wait...no it should say %s...damn you!\n", error_to_string(err), error_to_string(CRYPT_OK)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + t2 += t1; + + dh_free(&key); + } + t2 >>= 4; + fprintf(stderr, "DH-%4lu make_key took %15"PRI64"u cycles\n", x*8, t2); + } +} +#else +static void time_dh(void) { fprintf(stderr, "NO DH\n"); } +#endif + +#if defined(LTC_MECC) && defined(LTC_TEST_MPI) +/* time various ECC operations */ +static void time_ecc(void) { + ecc_key key; + ulong64 t1, t2; + unsigned char buf[2][256] = { 0 }; + unsigned long i, w, x, y, z; + int err, stat; + static unsigned long sizes[] = { +#ifdef LTC_ECC112 +112/8, +#endif +#ifdef LTC_ECC128 +128/8, +#endif +#ifdef LTC_ECC160 +160/8, +#endif +#ifdef LTC_ECC192 +192/8, +#endif +#ifdef LTC_ECC224 +224/8, +#endif +#ifdef LTC_ECC256 +256/8, +#endif +#ifdef LTC_ECC384 +384/8, +#endif +#ifdef LTC_ECC521 +521/8, +#endif +100000}; + + for (x = sizes[i=0]; x < 100000; x = sizes[++i]) { + t2 = 0; + for (y = 0; y < 256; y++) { + t_start(); + t1 = t_read(); + if ((err = ecc_make_key(&yarrow_prng, find_prng("yarrow"), x, &key)) != CRYPT_OK) { + fprintf(stderr, "\n\necc_make_key says %s, wait...no it should say %s...damn you!\n", error_to_string(err), error_to_string(CRYPT_OK)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + t2 += t1; + +#ifdef LTC_PROFILE + t2 <<= 8; + break; +#endif + + if (y < 255) { + ecc_free(&key); + } + } + t2 >>= 8; + fprintf(stderr, "ECC-%lu make_key took %15"PRI64"u cycles\n", x*8, t2); + + t2 = 0; + for (y = 0; y < 256; y++) { + t_start(); + t1 = t_read(); + z = sizeof(buf[1]); + if ((err = ecc_encrypt_key(buf[0], 20, buf[1], &z, &yarrow_prng, find_prng("yarrow"), find_hash("sha1"), + &key)) != CRYPT_OK) { + fprintf(stderr, "\n\necc_encrypt_key says %s, wait...no it should say %s...damn you!\n", error_to_string(err), error_to_string(CRYPT_OK)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + t2 += t1; +#ifdef LTC_PROFILE + t2 <<= 8; + break; +#endif + } + t2 >>= 8; + fprintf(stderr, "ECC-%lu encrypt_key took %15"PRI64"u cycles\n", x*8, t2); + + t2 = 0; + for (y = 0; y < 256; y++) { + t_start(); + t1 = t_read(); + w = 20; + if ((err = ecc_decrypt_key(buf[1], z, buf[0], &w, &key)) != CRYPT_OK) { + fprintf(stderr, "\n\necc_decrypt_key says %s, wait...no it should say %s...damn you!\n", error_to_string(err), error_to_string(CRYPT_OK)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + t2 += t1; +#ifdef LTC_PROFILE + t2 <<= 8; + break; +#endif + } + t2 >>= 8; + fprintf(stderr, "ECC-%lu decrypt_key took %15"PRI64"u cycles\n", x*8, t2); + + t2 = 0; + for (y = 0; y < 256; y++) { + t_start(); + t1 = t_read(); + z = sizeof(buf[1]); + if ((err = ecc_sign_hash(buf[0], 20, buf[1], &z, &yarrow_prng, + find_prng("yarrow"), &key)) != CRYPT_OK) { + fprintf(stderr, "\n\necc_sign_hash says %s, wait...no it should say %s...damn you!\n", error_to_string(err), error_to_string(CRYPT_OK)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + t2 += t1; +#ifdef LTC_PROFILE + t2 <<= 8; + break; +#endif + } + t2 >>= 8; + fprintf(stderr, "ECC-%lu sign_hash took %15"PRI64"u cycles\n", x*8, t2); + + t2 = 0; + for (y = 0; y < 256; y++) { + t_start(); + t1 = t_read(); + if ((err = ecc_verify_hash(buf[1], z, buf[0], 20, &stat, &key)) != CRYPT_OK) { + fprintf(stderr, "\n\necc_verify_hash says %s, wait...no it should say %s...damn you!\n", error_to_string(err), error_to_string(CRYPT_OK)); + exit(EXIT_FAILURE); + } + if (stat == 0) { + fprintf(stderr, "\n\necc_verify_hash for ECC-%lu failed to verify signature(%lu)\n", x*8, y); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + t2 += t1; +#ifdef LTC_PROFILE + t2 <<= 8; + break; +#endif + } + t2 >>= 8; + fprintf(stderr, "ECC-%lu verify_hash took %15"PRI64"u cycles\n", x*8, t2); + + fprintf(stderr, "\n\n"); + ecc_free(&key); + } +} +#else +static void time_ecc(void) { fprintf(stderr, "NO ECC\n"); } +#endif + +static void time_macs_(unsigned long MAC_SIZE) +{ +#if defined(LTC_OMAC) || defined(LTC_XCBC) || defined(LTC_F9_MODE) || defined(LTC_PMAC) || defined(LTC_PELICAN) || defined(LTC_HMAC) + unsigned char *buf, key[16], tag[16]; + ulong64 t1, t2; + unsigned long x, z; + int err, cipher_idx, hash_idx; + + fprintf(stderr, "\nMAC Timings (cycles/byte on %luKB blocks):\n", MAC_SIZE); + + buf = XMALLOC(MAC_SIZE*1024); + if (buf == NULL) { + fprintf(stderr, "\n\nout of heap yo\n\n"); + exit(EXIT_FAILURE); + } + + cipher_idx = find_cipher("aes"); + hash_idx = find_hash("sha1"); + + if (cipher_idx == -1 || hash_idx == -1) { + fprintf(stderr, "Warning the MAC tests requires AES and SHA1 to operate... so sorry\n"); + exit(EXIT_FAILURE); + } + + yarrow_read(buf, MAC_SIZE*1024, &yarrow_prng); + yarrow_read(key, 16, &yarrow_prng); + +#ifdef LTC_OMAC + t2 = -1; + for (x = 0; x < 10000; x++) { + t_start(); + t1 = t_read(); + z = 16; + if ((err = omac_memory(cipher_idx, key, 16, buf, MAC_SIZE*1024, tag, &z)) != CRYPT_OK) { + fprintf(stderr, "\n\nomac-%s error... %s\n", cipher_descriptor[cipher_idx].name, error_to_string(err)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + if (t1 < t2) t2 = t1; + } + fprintf(stderr, "OMAC-%s\t\t%9"PRI64"u\n", cipher_descriptor[cipher_idx].name, t2/(ulong64)(MAC_SIZE*1024)); +#endif + +#ifdef LTC_XCBC + t2 = -1; + for (x = 0; x < 10000; x++) { + t_start(); + t1 = t_read(); + z = 16; + if ((err = xcbc_memory(cipher_idx, key, 16, buf, MAC_SIZE*1024, tag, &z)) != CRYPT_OK) { + fprintf(stderr, "\n\nxcbc-%s error... %s\n", cipher_descriptor[cipher_idx].name, error_to_string(err)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + if (t1 < t2) t2 = t1; + } + fprintf(stderr, "XCBC-%s\t\t%9"PRI64"u\n", cipher_descriptor[cipher_idx].name, t2/(ulong64)(MAC_SIZE*1024)); +#endif + +#ifdef LTC_F9_MODE + t2 = -1; + for (x = 0; x < 10000; x++) { + t_start(); + t1 = t_read(); + z = 16; + if ((err = f9_memory(cipher_idx, key, 16, buf, MAC_SIZE*1024, tag, &z)) != CRYPT_OK) { + fprintf(stderr, "\n\nF9-%s error... %s\n", cipher_descriptor[cipher_idx].name, error_to_string(err)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + if (t1 < t2) t2 = t1; + } + fprintf(stderr, "F9-%s\t\t\t%9"PRI64"u\n", cipher_descriptor[cipher_idx].name, t2/(ulong64)(MAC_SIZE*1024)); +#endif + +#ifdef LTC_PMAC + t2 = -1; + for (x = 0; x < 10000; x++) { + t_start(); + t1 = t_read(); + z = 16; + if ((err = pmac_memory(cipher_idx, key, 16, buf, MAC_SIZE*1024, tag, &z)) != CRYPT_OK) { + fprintf(stderr, "\n\npmac-%s error... %s\n", cipher_descriptor[cipher_idx].name, error_to_string(err)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + if (t1 < t2) t2 = t1; + } + fprintf(stderr, "PMAC-%s\t\t%9"PRI64"u\n", cipher_descriptor[cipher_idx].name, t2/(ulong64)(MAC_SIZE*1024)); +#endif + +#ifdef LTC_PELICAN + t2 = -1; + for (x = 0; x < 10000; x++) { + t_start(); + t1 = t_read(); + z = 16; + if ((err = pelican_memory(key, 16, buf, MAC_SIZE*1024, tag)) != CRYPT_OK) { + fprintf(stderr, "\n\npelican error... %s\n", error_to_string(err)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + if (t1 < t2) t2 = t1; + } + fprintf(stderr, "PELICAN \t\t%9"PRI64"u\n", t2/(ulong64)(MAC_SIZE*1024)); +#endif + +#ifdef LTC_HMAC + t2 = -1; + for (x = 0; x < 10000; x++) { + t_start(); + t1 = t_read(); + z = 16; + if ((err = hmac_memory(hash_idx, key, 16, buf, MAC_SIZE*1024, tag, &z)) != CRYPT_OK) { + fprintf(stderr, "\n\nhmac-%s error... %s\n", hash_descriptor[hash_idx].name, error_to_string(err)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + if (t1 < t2) t2 = t1; + } + fprintf(stderr, "HMAC-%s\t\t%9"PRI64"u\n", hash_descriptor[hash_idx].name, t2/(ulong64)(MAC_SIZE*1024)); +#endif + + XFREE(buf); +#else + LTC_UNUSED_PARAM(MAC_SIZE); + fprintf(stderr, "NO MACs\n"); +#endif +} + +static void time_macs(void) +{ + time_macs_(1); + time_macs_(4); + time_macs_(32); +} + +static void time_encmacs_(unsigned long MAC_SIZE) +{ +#if defined(LTC_EAX_MODE) || defined(LTC_OCB_MODE) || defined(LTC_OCB3_MODE) || defined(LTC_CCM_MODE) || defined(LTC_GCM_MODE) + unsigned char *buf, IV[16], key[16], tag[16]; + ulong64 t1, t2; + unsigned long x, z; + int err, cipher_idx; + symmetric_key skey; + + fprintf(stderr, "\nENC+MAC Timings (zero byte AAD, 16 byte IV, cycles/byte on %luKB blocks):\n", MAC_SIZE); + + buf = XMALLOC(MAC_SIZE*1024); + if (buf == NULL) { + fprintf(stderr, "\n\nout of heap yo\n\n"); + exit(EXIT_FAILURE); + } + + cipher_idx = find_cipher("aes"); + + yarrow_read(buf, MAC_SIZE*1024, &yarrow_prng); + yarrow_read(key, 16, &yarrow_prng); + yarrow_read(IV, 16, &yarrow_prng); + +#ifdef LTC_EAX_MODE + t2 = -1; + for (x = 0; x < 10000; x++) { + t_start(); + t1 = t_read(); + z = 16; + if ((err = eax_encrypt_authenticate_memory(cipher_idx, key, 16, IV, 16, NULL, 0, buf, MAC_SIZE*1024, buf, tag, &z)) != CRYPT_OK) { + fprintf(stderr, "\nEAX error... %s\n", error_to_string(err)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + if (t1 < t2) t2 = t1; + } + fprintf(stderr, "EAX \t\t\t%9"PRI64"u\n", t2/(ulong64)(MAC_SIZE*1024)); +#endif + +#ifdef LTC_OCB_MODE + t2 = -1; + for (x = 0; x < 10000; x++) { + t_start(); + t1 = t_read(); + z = 16; + if ((err = ocb_encrypt_authenticate_memory(cipher_idx, key, 16, IV, buf, MAC_SIZE*1024, buf, tag, &z)) != CRYPT_OK) { + fprintf(stderr, "\nOCB error... %s\n", error_to_string(err)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + if (t1 < t2) t2 = t1; + } + fprintf(stderr, "OCB \t\t\t%9"PRI64"u\n", t2/(ulong64)(MAC_SIZE*1024)); +#endif + +#ifdef LTC_OCB3_MODE + t2 = -1; + for (x = 0; x < 10000; x++) { + t_start(); + t1 = t_read(); + z = 16; + if ((err = ocb3_encrypt_authenticate_memory(cipher_idx, key, 16, IV, 15, (unsigned char*)"", 0, buf, MAC_SIZE*1024, buf, tag, &z)) != CRYPT_OK) { + fprintf(stderr, "\nOCB3 error... %s\n", error_to_string(err)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + if (t1 < t2) t2 = t1; + } + fprintf(stderr, "OCB3 \t\t\t%9"PRI64"u\n", t2/(ulong64)(MAC_SIZE*1024)); +#endif + +#ifdef LTC_CCM_MODE + t2 = -1; + for (x = 0; x < 10000; x++) { + t_start(); + t1 = t_read(); + z = 16; + if ((err = ccm_memory(cipher_idx, key, 16, NULL, IV, 16, NULL, 0, buf, MAC_SIZE*1024, buf, tag, &z, CCM_ENCRYPT)) != CRYPT_OK) { + fprintf(stderr, "\nCCM error... %s\n", error_to_string(err)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + if (t1 < t2) t2 = t1; + } + fprintf(stderr, "CCM (no-precomp) \t%9"PRI64"u\n", t2/(ulong64)(MAC_SIZE*1024)); + + cipher_descriptor[cipher_idx].setup(key, 16, 0, &skey); + t2 = -1; + for (x = 0; x < 10000; x++) { + t_start(); + t1 = t_read(); + z = 16; + if ((err = ccm_memory(cipher_idx, key, 16, &skey, IV, 16, NULL, 0, buf, MAC_SIZE*1024, buf, tag, &z, CCM_ENCRYPT)) != CRYPT_OK) { + fprintf(stderr, "\nCCM error... %s\n", error_to_string(err)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + if (t1 < t2) t2 = t1; + } + fprintf(stderr, "CCM (precomp) \t\t%9"PRI64"u\n", t2/(ulong64)(MAC_SIZE*1024)); + cipher_descriptor[cipher_idx].done(&skey); +#endif + +#ifdef LTC_GCM_MODE + t2 = -1; + for (x = 0; x < 100; x++) { + t_start(); + t1 = t_read(); + z = 16; + if ((err = gcm_memory(cipher_idx, key, 16, IV, 16, NULL, 0, buf, MAC_SIZE*1024, buf, tag, &z, GCM_ENCRYPT)) != CRYPT_OK) { + fprintf(stderr, "\nGCM error... %s\n", error_to_string(err)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + if (t1 < t2) t2 = t1; + } + fprintf(stderr, "GCM (no-precomp)\t%9"PRI64"u\n", t2/(ulong64)(MAC_SIZE*1024)); + + { + gcm_state gcm +#ifdef LTC_GCM_TABLES_SSE2 +__attribute__ ((aligned (16))) +#endif +; + + if ((err = gcm_init(&gcm, cipher_idx, key, 16)) != CRYPT_OK) { fprintf(stderr, "gcm_init: %s\n", error_to_string(err)); exit(EXIT_FAILURE); } + t2 = -1; + for (x = 0; x < 10000; x++) { + t_start(); + t1 = t_read(); + z = 16; + if ((err = gcm_reset(&gcm)) != CRYPT_OK) { + fprintf(stderr, "\nGCM error[%d]... %s\n", __LINE__, error_to_string(err)); + exit(EXIT_FAILURE); + } + if ((err = gcm_add_iv(&gcm, IV, 16)) != CRYPT_OK) { + fprintf(stderr, "\nGCM error[%d]... %s\n", __LINE__, error_to_string(err)); + exit(EXIT_FAILURE); + } + if ((err = gcm_add_aad(&gcm, NULL, 0)) != CRYPT_OK) { + fprintf(stderr, "\nGCM error[%d]... %s\n", __LINE__, error_to_string(err)); + exit(EXIT_FAILURE); + } + if ((err = gcm_process(&gcm, buf, MAC_SIZE*1024, buf, GCM_ENCRYPT)) != CRYPT_OK) { + fprintf(stderr, "\nGCM error[%d]... %s\n", __LINE__, error_to_string(err)); + exit(EXIT_FAILURE); + } + + if ((err = gcm_done(&gcm, tag, &z)) != CRYPT_OK) { + fprintf(stderr, "\nGCM error[%d]... %s\n", __LINE__, error_to_string(err)); + exit(EXIT_FAILURE); + } + t1 = t_read() - t1; + if (t1 < t2) t2 = t1; + } + fprintf(stderr, "GCM (precomp)\t\t%9"PRI64"u\n", t2/(ulong64)(MAC_SIZE*1024)); + } + +#endif + XFREE(buf); +#else + LTC_UNUSED_PARAM(MAC_SIZE); + fprintf(stderr, "NO ENCMACs\n"); +#endif + +} + +static void time_encmacs(void) +{ + time_encmacs_(1); + time_encmacs_(4); + time_encmacs_(32); +} + +#define LTC_TEST_FN(f) { f, #f } +int main(int argc, char **argv) +{ +int err; + +const struct +{ + void (*fn)(void); + const char* name; +} test_functions[] = { + LTC_TEST_FN(time_keysched), + LTC_TEST_FN(time_cipher_ecb), + LTC_TEST_FN(time_cipher_cbc), + LTC_TEST_FN(time_cipher_ctr), + LTC_TEST_FN(time_cipher_lrw), + LTC_TEST_FN(time_hash), + LTC_TEST_FN(time_macs), + LTC_TEST_FN(time_encmacs), + LTC_TEST_FN(time_prng), + LTC_TEST_FN(time_mult), + LTC_TEST_FN(time_sqr), + LTC_TEST_FN(time_rsa), + LTC_TEST_FN(time_dsa), + LTC_TEST_FN(time_ecc), + LTC_TEST_FN(time_dh), + LTC_TEST_FN(time_katja) +}; +char *single_test = NULL; +unsigned int i; init_timer(); -reg_algs(); +register_all_ciphers(); +register_all_hashes(); +register_all_prngs(); #ifdef USE_LTM ltc_mp = ltm_desc; @@ -12,31 +1437,32 @@ ltc_mp = tfm_desc; #elif defined(USE_GMP) ltc_mp = gmp_desc; -#else - extern ltc_math_descriptor EXT_MATH_LIB; - ltc_mp = EXT_MATH_LIB; +#elif defined(EXT_MATH_LIB) + { + extern ltc_math_descriptor EXT_MATH_LIB; + ltc_mp = EXT_MATH_LIB; + } #endif -time_keysched(); -time_cipher(); -time_cipher2(); -time_cipher3(); -time_cipher4(); -time_hash(); -time_macs(); -time_encmacs(); -time_prng(); -time_mult(); -time_sqr(); -time_rsa(); -time_ecc(); -#ifdef USE_LTM -time_katja(); -#endif +if ((err = rng_make_prng(128, find_prng("yarrow"), &yarrow_prng, NULL)) != CRYPT_OK) { + fprintf(stderr, "rng_make_prng failed: %s\n", error_to_string(err)); + exit(EXIT_FAILURE); +} + +/* single test name from commandline */ +if (argc > 1) single_test = argv[1]; + +for (i = 0; i < sizeof(test_functions)/sizeof(test_functions[0]); ++i) { + if (single_test && strstr(test_functions[i].name, single_test) == NULL) { + continue; + } + test_functions[i].fn(); +} + return EXIT_SUCCESS; } -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/demos/tv_gen.c --- a/libtomcrypt/demos/tv_gen.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/demos/tv_gen.c Fri Feb 09 21:44:05 2018 +0800 @@ -1,129 +1,25 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ #include -void reg_algs(void) -{ - int err; - -#ifdef LTC_RIJNDAEL - register_cipher (&aes_desc); -#endif -#ifdef LTC_BLOWFISH - register_cipher (&blowfish_desc); -#endif -#ifdef LTC_XTEA - register_cipher (&xtea_desc); -#endif -#ifdef LTC_RC5 - register_cipher (&rc5_desc); -#endif -#ifdef LTC_RC6 - register_cipher (&rc6_desc); -#endif -#ifdef LTC_SAFERP - register_cipher (&saferp_desc); -#endif -#ifdef LTC_TWOFISH - register_cipher (&twofish_desc); -#endif -#ifdef LTC_SAFER - register_cipher (&safer_k64_desc); - register_cipher (&safer_sk64_desc); - register_cipher (&safer_k128_desc); - register_cipher (&safer_sk128_desc); -#endif -#ifdef LTC_RC2 - register_cipher (&rc2_desc); -#endif -#ifdef LTC_DES - register_cipher (&des_desc); - register_cipher (&des3_desc); -#endif -#ifdef LTC_CAST5 - register_cipher (&cast5_desc); -#endif -#ifdef LTC_NOEKEON - register_cipher (&noekeon_desc); -#endif -#ifdef LTC_SKIPJACK - register_cipher (&skipjack_desc); -#endif -#ifdef LTC_ANUBIS - register_cipher (&anubis_desc); -#endif -#ifdef LTC_KHAZAD - register_cipher (&khazad_desc); -#endif - -#ifdef LTC_TIGER - register_hash (&tiger_desc); -#endif -#ifdef LTC_MD2 - register_hash (&md2_desc); -#endif -#ifdef LTC_MD4 - register_hash (&md4_desc); -#endif -#ifdef LTC_MD5 - register_hash (&md5_desc); -#endif -#ifdef LTC_SHA1 - register_hash (&sha1_desc); -#endif -#ifdef LTC_SHA224 - register_hash (&sha224_desc); -#endif -#ifdef LTC_SHA256 - register_hash (&sha256_desc); -#endif -#ifdef LTC_SHA384 - register_hash (&sha384_desc); -#endif -#ifdef LTC_SHA512 - register_hash (&sha512_desc); -#endif -#ifdef LTC_RIPEMD128 - register_hash (&rmd128_desc); -#endif -#ifdef LTC_RIPEMD160 - register_hash (&rmd160_desc); -#endif -#ifdef LTC_WHIRLPOOL - register_hash (&whirlpool_desc); -#endif -#ifdef LTC_CHC_HASH - register_hash(&chc_desc); - if ((err = chc_register(register_cipher(&aes_desc))) != CRYPT_OK) { - printf("chc_register error: %s\n", error_to_string(err)); - exit(EXIT_FAILURE); - } -#endif - -#ifdef USE_LTM - ltc_mp = ltm_desc; -#elif defined(USE_TFM) - ltc_mp = tfm_desc; -#elif defined(USE_GMP) - ltc_mp = gmp_desc; -#else - extern ltc_math_descriptor EXT_MATH_LIB; - ltc_mp = EXT_MATH_LIB; -#endif - - -} - void hash_gen(void) { unsigned char md[MAXBLOCKSIZE], *buf; unsigned long outlen, x, y, z; FILE *out; int err; - + out = fopen("hash_tv.txt", "w"); if (out == NULL) { perror("can't open hash_tv"); } - + fprintf(out, "Hash Test Vectors:\n\nThese are the hashes of nn bytes '00 01 02 03 .. (nn-1)'\n\n"); for (x = 0; hash_descriptor[x].name != NULL; x++) { buf = XMALLOC(2 * hash_descriptor[x].blocksize + 1); @@ -160,16 +56,16 @@ int err, kl, lastkl; FILE *out; symmetric_key skey; - + out = fopen("cipher_tv.txt", "w"); - - fprintf(out, + + fprintf(out, "Cipher Test Vectors\n\nThese are test encryptions with key of nn bytes '00 01 02 03 .. (nn-1)' and original PT of the same style.\n" "The output of step N is used as the key and plaintext for step N+1 (key bytes repeated as required to fill the key)\n\n"); - + for (x = 0; cipher_descriptor[x].name != NULL; x++) { fprintf(out, "Cipher: %s\n", cipher_descriptor[x].name); - + /* three modes, smallest, medium, large keys */ lastkl = 10000; for (y = 0; y < 3; y++) { @@ -199,7 +95,7 @@ printf("setup error: %s\n", error_to_string(err)); exit(EXIT_FAILURE); } - + for (z = 0; (int)z < cipher_descriptor[x].block_length; z++) { pt[z] = (unsigned char)z; } @@ -226,7 +122,7 @@ fprintf(out, "\n"); } fclose(out); -} +} void hmac_gen(void) { @@ -234,17 +130,17 @@ int x, y, z, err; FILE *out; unsigned long len; - + out = fopen("hmac_tv.txt", "w"); - fprintf(out, -"LTC_HMAC Tests. In these tests messages of N bytes long (00,01,02,...,NN-1) are LTC_HMACed. The initial key is\n" -"of the same format (the same length as the HASH output size). The LTC_HMAC key in step N+1 is the LTC_HMAC output of\n" + fprintf(out, +"HMAC Tests. In these tests messages of N bytes long (00,01,02,...,NN-1) are HMACed. The initial key is\n" +"of the same format (the same length as the HASH output size). The HMAC key in step N+1 is the HMAC output of\n" "step N.\n\n"); for (x = 0; hash_descriptor[x].name != NULL; x++) { - fprintf(out, "LTC_HMAC-%s\n", hash_descriptor[x].name); - + fprintf(out, "HMAC-%s\n", hash_descriptor[x].name); + /* initial key */ for (y = 0; y < (int)hash_descriptor[x].hashsize; y++) { key[y] = (y&255); @@ -255,7 +151,7 @@ perror("Can't malloc memory"); exit(EXIT_FAILURE); } - + for (y = 0; y <= (int)(hash_descriptor[x].blocksize * 2); y++) { for (z = 0; z < y; z++) { input[z] = (unsigned char)(z & 255); @@ -279,19 +175,20 @@ } fclose(out); } - + void omac_gen(void) { +#ifdef LTC_OMAC unsigned char key[MAXBLOCKSIZE], output[MAXBLOCKSIZE], input[MAXBLOCKSIZE*2+2]; int err, x, y, z, kl; FILE *out; unsigned long len; - + out = fopen("omac_tv.txt", "w"); - fprintf(out, -"LTC_OMAC Tests. In these tests messages of N bytes long (00,01,02,...,NN-1) are LTC_OMAC'ed. The initial key is\n" -"of the same format (length specified per cipher). The LTC_OMAC key in step N+1 is the LTC_OMAC output of\n" + fprintf(out, +"OMAC Tests. In these tests messages of N bytes long (00,01,02,...,NN-1) are OMAC'ed. The initial key is\n" +"of the same format (length specified per cipher). The OMAC key in step N+1 is the OMAC output of\n" "step N (repeated as required to fill the array).\n\n"); for (x = 0; cipher_descriptor[x].name != NULL; x++) { @@ -303,13 +200,13 @@ if (cipher_descriptor[x].keysize(&kl) != CRYPT_OK) { kl = cipher_descriptor[x].max_key_length; } - fprintf(out, "LTC_OMAC-%s (%d byte key)\n", cipher_descriptor[x].name, kl); - + fprintf(out, "OMAC-%s (%d byte key)\n", cipher_descriptor[x].name, kl); + /* initial key/block */ for (y = 0; y < kl; y++) { key[y] = (y & 255); } - + for (y = 0; y <= (int)(cipher_descriptor[x].block_length*2); y++) { for (z = 0; z < y; z++) { input[z] = (unsigned char)(z & 255); @@ -333,20 +230,22 @@ fprintf(out, "\n"); } fclose(out); +#endif } void pmac_gen(void) { +#ifdef LTC_PMAC unsigned char key[MAXBLOCKSIZE], output[MAXBLOCKSIZE], input[MAXBLOCKSIZE*2+2]; int err, x, y, z, kl; FILE *out; unsigned long len; - + out = fopen("pmac_tv.txt", "w"); - fprintf(out, -"PMAC Tests. In these tests messages of N bytes long (00,01,02,...,NN-1) are LTC_OMAC'ed. The initial key is\n" -"of the same format (length specified per cipher). The LTC_OMAC key in step N+1 is the LTC_OMAC output of\n" + fprintf(out, +"PMAC Tests. In these tests messages of N bytes long (00,01,02,...,NN-1) are PMAC'ed. The initial key is\n" +"of the same format (length specified per cipher). The PMAC key in step N+1 is the PMAC output of\n" "step N (repeated as required to fill the array).\n\n"); for (x = 0; cipher_descriptor[x].name != NULL; x++) { @@ -359,12 +258,12 @@ kl = cipher_descriptor[x].max_key_length; } fprintf(out, "PMAC-%s (%d byte key)\n", cipher_descriptor[x].name, kl); - + /* initial key/block */ for (y = 0; y < kl; y++) { key[y] = (y & 255); } - + for (y = 0; y <= (int)(cipher_descriptor[x].block_length*2); y++) { for (z = 0; z < y; z++) { input[z] = (unsigned char)(z & 255); @@ -388,13 +287,15 @@ fprintf(out, "\n"); } fclose(out); +#endif } void eax_gen(void) { +#ifdef LTC_EAX_MODE int err, kl, x, y1, z; FILE *out; - unsigned char key[MAXBLOCKSIZE], nonce[MAXBLOCKSIZE*2], header[MAXBLOCKSIZE*2], + unsigned char key[MAXBLOCKSIZE], nonce[MAXBLOCKSIZE*2], header[MAXBLOCKSIZE*2], plaintext[MAXBLOCKSIZE*2], tag[MAXBLOCKSIZE]; unsigned long len; @@ -418,7 +319,7 @@ for (z = 0; z < kl; z++) { key[z] = (z & 255); } - + for (y1 = 0; y1 <= (int)(cipher_descriptor[x].block_length*2); y1++){ for (z = 0; z < y1; z++) { plaintext[z] = (unsigned char)(z & 255); @@ -448,13 +349,15 @@ fprintf(out, "\n"); } fclose(out); +#endif } void ocb_gen(void) { +#ifdef LTC_OCB_MODE int err, kl, x, y1, z; FILE *out; - unsigned char key[MAXBLOCKSIZE], nonce[MAXBLOCKSIZE*2], + unsigned char key[MAXBLOCKSIZE], nonce[MAXBLOCKSIZE*2], plaintext[MAXBLOCKSIZE*2], tag[MAXBLOCKSIZE]; unsigned long len; @@ -483,7 +386,7 @@ for (z = 0; z < cipher_descriptor[x].block_length; z++) { nonce[z] = z; } - + for (y1 = 0; y1 <= (int)(cipher_descriptor[x].block_length*2); y1++){ for (z = 0; z < y1; z++) { plaintext[z] = (unsigned char)(z & 255); @@ -511,14 +414,81 @@ fprintf(out, "\n"); } fclose(out); +#endif } +void ocb3_gen(void) +{ +#ifdef LTC_OCB3_MODE + int err, kl, x, y1, z, noncelen; + FILE *out; + unsigned char key[MAXBLOCKSIZE], nonce[MAXBLOCKSIZE*2], + plaintext[MAXBLOCKSIZE*2], tag[MAXBLOCKSIZE]; + unsigned long len; + + out = fopen("ocb3_tv.txt", "w"); + fprintf(out, "OCB3 Test Vectors. Uses the 00010203...NN-1 pattern for nonce/plaintext/key. The outputs\n" + "are of the form ciphertext,tag for a given NN. The key for step N>1 is the tag of the previous\n" + "step repeated sufficiently. The nonce is fixed throughout. AAD is fixed to 3 bytes (ASCII) 'AAD'.\n\n"); + + for (x = 0; cipher_descriptor[x].name != NULL; x++) { + kl = cipher_descriptor[x].block_length; + + /* skip ciphers which do not have 64 or 128 bit block sizes */ + if (kl != 16) continue; + + if (cipher_descriptor[x].keysize(&kl) != CRYPT_OK) { + kl = cipher_descriptor[x].max_key_length; + } + fprintf(out, "OCB3-%s (%d byte key)\n", cipher_descriptor[x].name, kl); + + /* the key */ + for (z = 0; z < kl; z++) { + key[z] = (z & 255); + } + + /* fixed nonce */ + noncelen = MIN(15, cipher_descriptor[x].block_length); + for (z = 0; z < noncelen; z++) { + nonce[z] = z; + } + + for (y1 = 0; y1 <= (int)(cipher_descriptor[x].block_length*2); y1++){ + for (z = 0; z < y1; z++) { + plaintext[z] = (unsigned char)(z & 255); + } + len = 16; + if ((err = ocb3_encrypt_authenticate_memory(x, key, kl, nonce, noncelen, (unsigned char*)"AAD", 3, plaintext, y1, plaintext, tag, &len)) != CRYPT_OK) { + printf("Error OCB3'ing: %s\n", error_to_string(err)); + exit(EXIT_FAILURE); + } + fprintf(out, "%3d: ", y1); + for (z = 0; z < y1; z++) { + fprintf(out, "%02X", plaintext[z]); + } + fprintf(out, ", "); + for (z = 0; z <(int)len; z++) { + fprintf(out, "%02X", tag[z]); + } + fprintf(out, "\n"); + + /* forward the key */ + for (z = 0; z < kl; z++) { + key[z] = tag[z % len]; + } + } + fprintf(out, "\n"); + } + fclose(out); +#endif +} void ccm_gen(void) { +#ifdef LTC_CCM_MODE int err, kl, x, y1, z; FILE *out; - unsigned char key[MAXBLOCKSIZE], nonce[MAXBLOCKSIZE*2], + unsigned char key[MAXBLOCKSIZE], nonce[MAXBLOCKSIZE*2], plaintext[MAXBLOCKSIZE*2], tag[MAXBLOCKSIZE]; unsigned long len; @@ -547,7 +517,7 @@ for (z = 0; z < cipher_descriptor[x].block_length; z++) { nonce[z] = z; } - + for (y1 = 0; y1 <= (int)(cipher_descriptor[x].block_length*2); y1++){ for (z = 0; z < y1; z++) { plaintext[z] = (unsigned char)(z & 255); @@ -557,6 +527,10 @@ printf("Error CCM'ing: %s\n", error_to_string(err)); exit(EXIT_FAILURE); } + if (len == 0) { + printf("Error CCM'ing: zero length\n"); + exit(EXIT_FAILURE); + } fprintf(out, "%3d: ", y1); for (z = 0; z < y1; z++) { fprintf(out, "%02X", plaintext[z]); @@ -575,10 +549,12 @@ fprintf(out, "\n"); } fclose(out); +#endif } void gcm_gen(void) { +#ifdef LTC_GCM_MODE int err, kl, x, y1, z; FILE *out; unsigned char key[MAXBLOCKSIZE], plaintext[MAXBLOCKSIZE*2], tag[MAXBLOCKSIZE]; @@ -604,8 +580,8 @@ for (z = 0; z < kl; z++) { key[z] = (z & 255); } - - for (y1 = 0; y1 <= (int)(cipher_descriptor[x].block_length*2); y1++){ + + for (y1 = 1; y1 <= (int)(cipher_descriptor[x].block_length*2); y1++){ for (z = 0; z < y1; z++) { plaintext[z] = (unsigned char)(z & 255); } @@ -614,6 +590,10 @@ printf("Error GCM'ing: %s\n", error_to_string(err)); exit(EXIT_FAILURE); } + if (len == 0) { + printf("Error GCM'ing: zero length\n"); + exit(EXIT_FAILURE); + } fprintf(out, "%3d: ", y1); for (z = 0; z < y1; z++) { fprintf(out, "%02X", plaintext[z]); @@ -632,19 +612,20 @@ fprintf(out, "\n"); } fclose(out); +#endif } void base64_gen(void) { FILE *out; - unsigned char dst[256], src[32]; - unsigned long x, y, len; - + unsigned char dst[256], src[32], ch; + unsigned long x, len; + out = fopen("base64_tv.txt", "w"); fprintf(out, "Base64 vectors. These are the base64 encodings of the strings 00,01,02...NN-1\n\n"); for (x = 0; x <= 32; x++) { - for (y = 0; y < x; y++) { - src[y] = y; + for (ch = 0; ch < x; ch++) { + src[ch] = ch; } len = sizeof(dst); base64_encode(src, x, dst, &len); @@ -681,7 +662,7 @@ mp_read_radix(modulus, (char *)ltc_ecc_sets[x].prime, 16); mp_read_radix(G->x, (char *)ltc_ecc_sets[x].Gx, 16); mp_read_radix(G->y, (char *)ltc_ecc_sets[x].Gy, 16); - mp_set(G->z, 1); + mp_set(G->z, 1); while (mp_cmp(k, order) == LTC_MP_LT) { ltc_mp.ecc_ptmul(k, G, R, modulus, 1); @@ -699,11 +680,12 @@ void lrw_gen(void) { +#ifdef LTC_LRW_MODE FILE *out; unsigned char tweak[16], key[16], iv[16], buf[1024]; int x, y, err; symmetric_LRW lrw; - + /* initialize default key and tweak */ for (x = 0; x < 16; x++) { tweak[x] = key[x] = iv[x] = x; @@ -760,27 +742,61 @@ lrw_done(&lrw); } fclose(out); -} +#endif +} int main(void) { - reg_algs(); + register_all_ciphers(); + register_all_hashes(); + register_all_prngs(); +#ifdef USE_LTM + ltc_mp = ltm_desc; +#elif defined(USE_TFM) + ltc_mp = tfm_desc; +#elif defined(USE_GMP) + ltc_mp = gmp_desc; +#elif defined(EXT_MATH_LIB) + extern ltc_math_descriptor EXT_MATH_LIB; + ltc_mp = EXT_MATH_LIB; +#else + fprintf(stderr, "No MPI provider available\n"); + exit(EXIT_FAILURE); +#endif + printf("Generating hash vectors..."); fflush(stdout); hash_gen(); printf("done\n"); printf("Generating cipher vectors..."); fflush(stdout); cipher_gen(); printf("done\n"); - printf("Generating LTC_HMAC vectors..."); fflush(stdout); hmac_gen(); printf("done\n"); - printf("Generating LTC_OMAC vectors..."); fflush(stdout); omac_gen(); printf("done\n"); + printf("Generating HMAC vectors..."); fflush(stdout); hmac_gen(); printf("done\n"); +#ifdef LTC_OMAC + printf("Generating OMAC vectors..."); fflush(stdout); omac_gen(); printf("done\n"); +#endif +#ifdef LTC_PMAC printf("Generating PMAC vectors..."); fflush(stdout); pmac_gen(); printf("done\n"); +#endif +#ifdef LTC_EAX_MODE printf("Generating EAX vectors..."); fflush(stdout); eax_gen(); printf("done\n"); +#endif +#ifdef LTC_OCB_MODE printf("Generating OCB vectors..."); fflush(stdout); ocb_gen(); printf("done\n"); +#endif +#ifdef LTC_OCB3_MODE + printf("Generating OCB3 vectors..."); fflush(stdout); ocb3_gen(); printf("done\n"); +#endif +#ifdef LTC_CCM_MODE printf("Generating CCM vectors..."); fflush(stdout); ccm_gen(); printf("done\n"); +#endif +#ifdef LTC_GCM_MODE printf("Generating GCM vectors..."); fflush(stdout); gcm_gen(); printf("done\n"); - printf("Generating LTC_BASE64 vectors..."); fflush(stdout); base64_gen(); printf("done\n"); +#endif + printf("Generating BASE64 vectors..."); fflush(stdout); base64_gen(); printf("done\n"); printf("Generating MATH vectors..."); fflush(stdout); math_gen(); printf("done\n"); printf("Generating ECC vectors..."); fflush(stdout); ecc_gen(); printf("done\n"); +#ifdef LTC_LRW_MODE printf("Generating LRW vectors..."); fflush(stdout); lrw_gen(); printf("done\n"); +#endif return 0; } -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/doc/Doxyfile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/doc/Doxyfile Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,2430 @@ +# Doxyfile 1.8.11 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = LibTomCrypt + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER=1.18.1 + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = libtomsm.png + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = doxygen + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = src + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = ../src/headers + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = YES + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = YES + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO, these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = YES + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = ../src/ + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f, *.for, *.tcl, +# *.vhd, *.vhdl, *.ucf, *.qsf, *.as and *.js. + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = YES + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = NO + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# generated with the -Duse-libclang=ON option for CMake. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = YES + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 1 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /\r\n" for (1..$back); + } + my $fwd = [ @$current ]; splice(@$fwd, 0, $common); + for my $i (0..scalar(@$fwd) - 1) { + $files .= ("\t" x $depth) . "[$i]\"\r\n"; + $files .= ("\t" x $depth) . "\t>\r\n"; + $depth++; + } + $last = $current; + } + $files .= ("\t" x $depth) . "\r\n"; + if ($full =~ $exclude_re) { + for (@$targets) { + $files .= ("\t" x $depth) . "\t\r\n"; + $files .= ("\t" x $depth) . "\t\t\r\n"; + $files .= ("\t" x $depth) . "\t\r\n"; + } + } +########### aes_enc "hack" disabled - discussion: https://github.com/libtom/libtomcrypt/pull/158 +# if ($full eq 'src\ciphers\aes\aes.c') { #hack +# my %cmd = ( +# 'Debug|Win32' => [ 'Debug/aes.obj;Debug/aes_enc.obj', 'cl /nologo /MLd /W3 /Gm /GX /ZI /Od /I "src\headers" /I "..\libtommath" /D "_DEBUG" /D "LTM_DESC" /D "WIN32" /D "_MBCS" /D "_LIB" /D "LTC_SOURCE" /D "USE_LTM" /Fp"Debug/libtomcrypt.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c $(InputPath) cl /nologo /DENCRYPT_ONLY /MLd /W3 /Gm /GX /ZI /Od /I "src\headers" /I "..\libtommath" /D "_DEBUG" /D "LTM_DESC" /D "WIN32" /D "_MBCS" /D "_LIB" /D "LTC_SOURCE" /D "USE_LTM" /Fp"Debug/libtomcrypt.pch" /YX /Fo"Debug/aes_enc.obj" /Fd"Debug/" /FD /GZ /c $(InputPath) ' ], +# 'Release|Win32' => [ 'Release/aes.obj;Release/aes_enc.obj', 'cl /nologo /MLd /W3 /Gm /GX /ZI /Od /I "src\headers" /I "..\libtommath" /D "_DEBUG" /D "LTM_DESC" /D "WIN32" /D "_MBCS" /D "_LIB" /D "LTC_SOURCE" /D "USE_LTM" /Fp"Release/libtomcrypt.pch" /YX /Fo"Release/" /Fd"Release/" /FD /GZ /c $(InputPath) cl /nologo /DENCRYPT_ONLY /MLd /W3 /Gm /GX /ZI /Od /I "src\headers" /I "..\libtommath" /D "_DEBUG" /D "LTM_DESC" /D "WIN32" /D "_MBCS" /D "_LIB" /D "LTC_SOURCE" /D "USE_LTM" /Fp"Release/libtomcrypt.pch" /YX /Fo"Release/aes_enc.obj" /Fd"Release/" /FD /GZ /c $(InputPath) ' ], +# ); +# for (@$targets) { +# next unless $cmd{$_}; +# $files .= ("\t" x $depth) . "\t\r\n"; +# $files .= ("\t" x $depth) . "\t\t\r\n"; +# $files .= ("\t" x $depth) . "\t\r\n"; +# } +# } + $files .= ("\t" x $depth) . "\r\n"; + } + $files .= ("\t" x --$depth) . "\r\n" for (@$last); + $files .= "\t"; + return $files; +} + +sub patch_file { + my ($content, @variables) = @_; + for my $v (@variables) { + if ($v =~ /^([A-Z0-9_]+)\s*=.*$/si) { + my $name = $1; + $content =~ s/\n\Q$name\E\b.*?[^\\]\n/\n$v\n/s; + } + else { + die "patch_file failed: " . substr($v, 0, 30) . ".."; + } + } + return $content; +} + +sub version_from_tomcrypt_h { + my $h = read_file(shift); + if ($h =~ /\n#define\s*SCRYPT\s*"([0-9]+)\.([0-9]+)\.([0-9]+)(.*)"/s) { + return "VERSION_PC=$1.$2.$3", "VERSION_LT=1:1", "VERSION=$1.$2.$3$4", "PROJECT_NUMBER=$1.$2.$3$4"; + } + else { + die "#define SCRYPT not found in tomcrypt.h"; + } +} + +sub process_makefiles { + my $write = shift; + my $changed_count = 0; + my @c = (); + find({ no_chdir => 1, wanted => sub { push @c, $_ if -f $_ && $_ =~ /\.c$/ && $_ !~ /tab.c$/ } }, 'src'); + my @h = (); + find({ no_chdir => 1, wanted => sub { push @h, $_ if -f $_ && $_ =~ /\.h$/ && $_ !~ /dh_static.h$/ } }, 'src'); + my @all = (); + find({ no_chdir => 1, wanted => sub { push @all, $_ if -f $_ && $_ =~ /\.(c|h)$/ } }, 'src'); + my @t = qw(); + find({ no_chdir => 1, wanted => sub { push @t, $_ if $_ =~ /(common|no_prng|_tests?|test).c$/ } }, 'tests'); + + my @o = sort ('src/ciphers/aes/aes_enc.o', map { my $x = $_; $x =~ s/\.c$/.o/; $x } @c); + my $var_o = prepare_variable("OBJECTS", @o); + my $var_h = prepare_variable("HEADERS", (sort @h)); + (my $var_obj = $var_o) =~ s/\.o\b/.obj/sg; + + my $var_to = prepare_variable("TOBJECTS", sort map { my $x = $_; $x =~ s/\.c$/.o/; $x } @t); + (my $var_tobj = $var_to) =~ s/\.o\b/.obj/sg; + + my @ver_version = version_from_tomcrypt_h("src/headers/tomcrypt.h"); + + # update MSVC project files + my $msvc_files = prepare_msvc_files_xml(\@all, qr/tab\.c$/, ['Debug|Win32', 'Release|Win32', 'Debug|x64', 'Release|x64']); + for my $m (qw/libtomcrypt_VS2008.vcproj/) { + my $old = read_file($m); + my $new = $old; + $new =~ s|.*|$msvc_files|s; + if ($old ne $new) { + write_file($m, $new) if $write; + warn "changed: $m\n"; + $changed_count++; + } + } + + # update OBJECTS + HEADERS in makefile* + for my $m (qw/ makefile makefile.shared makefile.unix makefile.mingw makefile.msvc makefile_include.mk doc\/Doxyfile /) { + my $old = read_file($m); + my $new = $m eq 'makefile.msvc' ? patch_file($old, $var_obj, $var_h, $var_tobj, @ver_version) + : patch_file($old, $var_o, $var_h, $var_to, @ver_version); + if ($old ne $new) { + write_file($m, $new) if $write; + warn "changed: $m\n"; + $changed_count++; + } + } + + if ($write) { + return 0; # no failures + } + else { + warn( $changed_count > 0 ? "check-makefiles: FAIL $changed_count\n" : "check-makefiles: PASS\n" ); + return $changed_count; + } +} + +sub die_usage { + die <<"MARKER"; +usage: $0 -s OR $0 --check-source + $0 -c OR $0 --check-descriptors + $0 -d OR $0 --check-defines + $0 -o OR $0 --check-comments + $0 -m OR $0 --check-makefiles + $0 -a OR $0 --check-all + $0 -u OR $0 --update-makefiles + $0 --fixupind crypt.ind +MARKER +} + +GetOptions( "s|check-source" => \my $check_source, + "c|check-descriptors" => \my $check_descriptors, + "d|check-defines" => \my $check_defines, + "o|check-comments" => \my $check_comments, + "m|check-makefiles" => \my $check_makefiles, + "a|check-all" => \my $check_all, + "u|update-makefiles" => \my $update_makefiles, + "f|fixupind=s" => \my $fixupind, + "h|help" => \my $help + ) or die_usage; + +if ($fixupind) { + my $txt = read_file($fixupind); + $txt =~ s/^([^\n]*\n)/$1\n\\addcontentsline{toc}{chapter}{Index}\n/s; + write_file($fixupind, $txt); + exit 0; +} + +my $failure; +$failure ||= check_source() if $check_all || $check_source; +$failure ||= check_defines() if $check_all || $check_defines; +$failure ||= check_descriptors() if $check_all || $check_descriptors; +$failure ||= check_comments() if $check_all || $check_comments; +$failure ||= process_makefiles(0) if $check_all || $check_makefiles; +$failure ||= process_makefiles(1) if $update_makefiles; + +die_usage unless defined $failure; +exit $failure ? 1 : 0; diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/makefile.mingw --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/makefile.mingw Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,288 @@ +# MAKEFILE for MS Windows (mingw + gcc + gmake) +# +# BEWARE: variables OBJECTS, TOBJECTS, HEADERS, VERSION are updated via ./updatemakes.sh + +### USAGE: +# Open a command prompt with gcc + gmake in PATH and start: +# +# gmake -f makefile.mingw all +# test.exe +# gmake -f makefile.mingw PREFIX=c:\devel\libtom install +# +#Or: +# +# gmake -f makefile.mingw CFLAGS="-O3 -DUSE_LTM -DLTM_DESC -Ic:/path/to/libtommath" EXTRALIBS="-Lc:/path/to/libtommath -ltommath" all +# + +#The following can be overridden from command line e.g. make -f makefile.mingw CC=gcc ARFLAGS=rcs +PREFIX = c:\mingw +CC = gcc +AR = ar +ARFLAGS = r +RANLIB = ranlib +STRIP = strip +CFLAGS = -O2 -DUSE_LTM -DLTM_DESC -I../libtommath +EXTRALIBS = -L../libtommath -ltommath + +#Compilation flags +LTC_CFLAGS = -Isrc/headers -Itests -DLTC_SOURCE $(CFLAGS) +LTC_LDFLAGS = $(LDFLAGS) $(EXTRALIBS) +VERSION=1.18.1 + +#Libraries to be created +LIBMAIN_S =libtomcrypt.a +LIBMAIN_I =libtomcrypt.dll.a +LIBMAIN_D =libtomcrypt.dll + +#List of objects to compile (all goes to libtomcrypt.a) +OBJECTS=src/ciphers/aes/aes.o src/ciphers/aes/aes_enc.o src/ciphers/anubis.o src/ciphers/blowfish.o \ +src/ciphers/camellia.o src/ciphers/cast5.o src/ciphers/des.o src/ciphers/kasumi.o src/ciphers/khazad.o \ +src/ciphers/kseed.o src/ciphers/multi2.o src/ciphers/noekeon.o src/ciphers/rc2.o src/ciphers/rc5.o \ +src/ciphers/rc6.o src/ciphers/safer/safer.o src/ciphers/safer/saferp.o src/ciphers/skipjack.o \ +src/ciphers/twofish/twofish.o src/ciphers/xtea.o src/encauth/ccm/ccm_add_aad.o \ +src/encauth/ccm/ccm_add_nonce.o src/encauth/ccm/ccm_done.o src/encauth/ccm/ccm_init.o \ +src/encauth/ccm/ccm_memory.o src/encauth/ccm/ccm_process.o src/encauth/ccm/ccm_reset.o \ +src/encauth/ccm/ccm_test.o src/encauth/chachapoly/chacha20poly1305_add_aad.o \ +src/encauth/chachapoly/chacha20poly1305_decrypt.o src/encauth/chachapoly/chacha20poly1305_done.o \ +src/encauth/chachapoly/chacha20poly1305_encrypt.o src/encauth/chachapoly/chacha20poly1305_init.o \ +src/encauth/chachapoly/chacha20poly1305_memory.o src/encauth/chachapoly/chacha20poly1305_setiv.o \ +src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.o \ +src/encauth/chachapoly/chacha20poly1305_test.o src/encauth/eax/eax_addheader.o \ +src/encauth/eax/eax_decrypt.o src/encauth/eax/eax_decrypt_verify_memory.o src/encauth/eax/eax_done.o \ +src/encauth/eax/eax_encrypt.o src/encauth/eax/eax_encrypt_authenticate_memory.o \ +src/encauth/eax/eax_init.o src/encauth/eax/eax_test.o src/encauth/gcm/gcm_add_aad.o \ +src/encauth/gcm/gcm_add_iv.o src/encauth/gcm/gcm_done.o src/encauth/gcm/gcm_gf_mult.o \ +src/encauth/gcm/gcm_init.o src/encauth/gcm/gcm_memory.o src/encauth/gcm/gcm_mult_h.o \ +src/encauth/gcm/gcm_process.o src/encauth/gcm/gcm_reset.o src/encauth/gcm/gcm_test.o \ +src/encauth/ocb/ocb_decrypt.o src/encauth/ocb/ocb_decrypt_verify_memory.o \ +src/encauth/ocb/ocb_done_decrypt.o src/encauth/ocb/ocb_done_encrypt.o src/encauth/ocb/ocb_encrypt.o \ +src/encauth/ocb/ocb_encrypt_authenticate_memory.o src/encauth/ocb/ocb_init.o src/encauth/ocb/ocb_ntz.o \ +src/encauth/ocb/ocb_shift_xor.o src/encauth/ocb/ocb_test.o src/encauth/ocb/s_ocb_done.o \ +src/encauth/ocb3/ocb3_add_aad.o src/encauth/ocb3/ocb3_decrypt.o src/encauth/ocb3/ocb3_decrypt_last.o \ +src/encauth/ocb3/ocb3_decrypt_verify_memory.o src/encauth/ocb3/ocb3_done.o \ +src/encauth/ocb3/ocb3_encrypt.o src/encauth/ocb3/ocb3_encrypt_authenticate_memory.o \ +src/encauth/ocb3/ocb3_encrypt_last.o src/encauth/ocb3/ocb3_init.o src/encauth/ocb3/ocb3_int_ntz.o \ +src/encauth/ocb3/ocb3_int_xor_blocks.o src/encauth/ocb3/ocb3_test.o src/hashes/blake2b.o \ +src/hashes/blake2s.o src/hashes/chc/chc.o src/hashes/helper/hash_file.o \ +src/hashes/helper/hash_filehandle.o src/hashes/helper/hash_memory.o \ +src/hashes/helper/hash_memory_multi.o src/hashes/md2.o src/hashes/md4.o src/hashes/md5.o \ +src/hashes/rmd128.o src/hashes/rmd160.o src/hashes/rmd256.o src/hashes/rmd320.o src/hashes/sha1.o \ +src/hashes/sha2/sha224.o src/hashes/sha2/sha256.o src/hashes/sha2/sha384.o src/hashes/sha2/sha512.o \ +src/hashes/sha2/sha512_224.o src/hashes/sha2/sha512_256.o src/hashes/sha3.o src/hashes/sha3_test.o \ +src/hashes/tiger.o src/hashes/whirl/whirl.o src/mac/blake2/blake2bmac.o \ +src/mac/blake2/blake2bmac_file.o src/mac/blake2/blake2bmac_memory.o \ +src/mac/blake2/blake2bmac_memory_multi.o src/mac/blake2/blake2bmac_test.o src/mac/blake2/blake2smac.o \ +src/mac/blake2/blake2smac_file.o src/mac/blake2/blake2smac_memory.o \ +src/mac/blake2/blake2smac_memory_multi.o src/mac/blake2/blake2smac_test.o src/mac/f9/f9_done.o \ +src/mac/f9/f9_file.o src/mac/f9/f9_init.o src/mac/f9/f9_memory.o src/mac/f9/f9_memory_multi.o \ +src/mac/f9/f9_process.o src/mac/f9/f9_test.o src/mac/hmac/hmac_done.o src/mac/hmac/hmac_file.o \ +src/mac/hmac/hmac_init.o src/mac/hmac/hmac_memory.o src/mac/hmac/hmac_memory_multi.o \ +src/mac/hmac/hmac_process.o src/mac/hmac/hmac_test.o src/mac/omac/omac_done.o src/mac/omac/omac_file.o \ +src/mac/omac/omac_init.o src/mac/omac/omac_memory.o src/mac/omac/omac_memory_multi.o \ +src/mac/omac/omac_process.o src/mac/omac/omac_test.o src/mac/pelican/pelican.o \ +src/mac/pelican/pelican_memory.o src/mac/pelican/pelican_test.o src/mac/pmac/pmac_done.o \ +src/mac/pmac/pmac_file.o src/mac/pmac/pmac_init.o src/mac/pmac/pmac_memory.o \ +src/mac/pmac/pmac_memory_multi.o src/mac/pmac/pmac_ntz.o src/mac/pmac/pmac_process.o \ +src/mac/pmac/pmac_shift_xor.o src/mac/pmac/pmac_test.o src/mac/poly1305/poly1305.o \ +src/mac/poly1305/poly1305_file.o src/mac/poly1305/poly1305_memory.o \ +src/mac/poly1305/poly1305_memory_multi.o src/mac/poly1305/poly1305_test.o src/mac/xcbc/xcbc_done.o \ +src/mac/xcbc/xcbc_file.o src/mac/xcbc/xcbc_init.o src/mac/xcbc/xcbc_memory.o \ +src/mac/xcbc/xcbc_memory_multi.o src/mac/xcbc/xcbc_process.o src/mac/xcbc/xcbc_test.o \ +src/math/fp/ltc_ecc_fp_mulmod.o src/math/gmp_desc.o src/math/ltm_desc.o src/math/multi.o \ +src/math/radix_to_bin.o src/math/rand_bn.o src/math/rand_prime.o src/math/tfm_desc.o src/misc/adler32.o \ +src/misc/base64/base64_decode.o src/misc/base64/base64_encode.o src/misc/burn_stack.o \ +src/misc/compare_testvector.o src/misc/crc32.o src/misc/crypt/crypt.o src/misc/crypt/crypt_argchk.o \ +src/misc/crypt/crypt_cipher_descriptor.o src/misc/crypt/crypt_cipher_is_valid.o \ +src/misc/crypt/crypt_constants.o src/misc/crypt/crypt_find_cipher.o \ +src/misc/crypt/crypt_find_cipher_any.o src/misc/crypt/crypt_find_cipher_id.o \ +src/misc/crypt/crypt_find_hash.o src/misc/crypt/crypt_find_hash_any.o \ +src/misc/crypt/crypt_find_hash_id.o src/misc/crypt/crypt_find_hash_oid.o \ +src/misc/crypt/crypt_find_prng.o src/misc/crypt/crypt_fsa.o src/misc/crypt/crypt_hash_descriptor.o \ +src/misc/crypt/crypt_hash_is_valid.o src/misc/crypt/crypt_inits.o \ +src/misc/crypt/crypt_ltc_mp_descriptor.o src/misc/crypt/crypt_prng_descriptor.o \ +src/misc/crypt/crypt_prng_is_valid.o src/misc/crypt/crypt_prng_rng_descriptor.o \ +src/misc/crypt/crypt_register_all_ciphers.o src/misc/crypt/crypt_register_all_hashes.o \ +src/misc/crypt/crypt_register_all_prngs.o src/misc/crypt/crypt_register_cipher.o \ +src/misc/crypt/crypt_register_hash.o src/misc/crypt/crypt_register_prng.o src/misc/crypt/crypt_sizes.o \ +src/misc/crypt/crypt_unregister_cipher.o src/misc/crypt/crypt_unregister_hash.o \ +src/misc/crypt/crypt_unregister_prng.o src/misc/error_to_string.o src/misc/hkdf/hkdf.o \ +src/misc/hkdf/hkdf_test.o src/misc/mem_neq.o src/misc/pk_get_oid.o src/misc/pkcs5/pkcs_5_1.o \ +src/misc/pkcs5/pkcs_5_2.o src/misc/pkcs5/pkcs_5_test.o src/misc/zeromem.o src/modes/cbc/cbc_decrypt.o \ +src/modes/cbc/cbc_done.o src/modes/cbc/cbc_encrypt.o src/modes/cbc/cbc_getiv.o \ +src/modes/cbc/cbc_setiv.o src/modes/cbc/cbc_start.o src/modes/cfb/cfb_decrypt.o \ +src/modes/cfb/cfb_done.o src/modes/cfb/cfb_encrypt.o src/modes/cfb/cfb_getiv.o \ +src/modes/cfb/cfb_setiv.o src/modes/cfb/cfb_start.o src/modes/ctr/ctr_decrypt.o \ +src/modes/ctr/ctr_done.o src/modes/ctr/ctr_encrypt.o src/modes/ctr/ctr_getiv.o \ +src/modes/ctr/ctr_setiv.o src/modes/ctr/ctr_start.o src/modes/ctr/ctr_test.o \ +src/modes/ecb/ecb_decrypt.o src/modes/ecb/ecb_done.o src/modes/ecb/ecb_encrypt.o \ +src/modes/ecb/ecb_start.o src/modes/f8/f8_decrypt.o src/modes/f8/f8_done.o src/modes/f8/f8_encrypt.o \ +src/modes/f8/f8_getiv.o src/modes/f8/f8_setiv.o src/modes/f8/f8_start.o src/modes/f8/f8_test_mode.o \ +src/modes/lrw/lrw_decrypt.o src/modes/lrw/lrw_done.o src/modes/lrw/lrw_encrypt.o \ +src/modes/lrw/lrw_getiv.o src/modes/lrw/lrw_process.o src/modes/lrw/lrw_setiv.o \ +src/modes/lrw/lrw_start.o src/modes/lrw/lrw_test.o src/modes/ofb/ofb_decrypt.o src/modes/ofb/ofb_done.o \ +src/modes/ofb/ofb_encrypt.o src/modes/ofb/ofb_getiv.o src/modes/ofb/ofb_setiv.o \ +src/modes/ofb/ofb_start.o src/modes/xts/xts_decrypt.o src/modes/xts/xts_done.o \ +src/modes/xts/xts_encrypt.o src/modes/xts/xts_init.o src/modes/xts/xts_mult_x.o \ +src/modes/xts/xts_test.o src/pk/asn1/der/bit/der_decode_bit_string.o \ +src/pk/asn1/der/bit/der_decode_raw_bit_string.o src/pk/asn1/der/bit/der_encode_bit_string.o \ +src/pk/asn1/der/bit/der_encode_raw_bit_string.o src/pk/asn1/der/bit/der_length_bit_string.o \ +src/pk/asn1/der/boolean/der_decode_boolean.o src/pk/asn1/der/boolean/der_encode_boolean.o \ +src/pk/asn1/der/boolean/der_length_boolean.o src/pk/asn1/der/choice/der_decode_choice.o \ +src/pk/asn1/der/generalizedtime/der_decode_generalizedtime.o \ +src/pk/asn1/der/generalizedtime/der_encode_generalizedtime.o \ +src/pk/asn1/der/generalizedtime/der_length_generalizedtime.o \ +src/pk/asn1/der/ia5/der_decode_ia5_string.o src/pk/asn1/der/ia5/der_encode_ia5_string.o \ +src/pk/asn1/der/ia5/der_length_ia5_string.o src/pk/asn1/der/integer/der_decode_integer.o \ +src/pk/asn1/der/integer/der_encode_integer.o src/pk/asn1/der/integer/der_length_integer.o \ +src/pk/asn1/der/object_identifier/der_decode_object_identifier.o \ +src/pk/asn1/der/object_identifier/der_encode_object_identifier.o \ +src/pk/asn1/der/object_identifier/der_length_object_identifier.o \ +src/pk/asn1/der/octet/der_decode_octet_string.o src/pk/asn1/der/octet/der_encode_octet_string.o \ +src/pk/asn1/der/octet/der_length_octet_string.o \ +src/pk/asn1/der/printable_string/der_decode_printable_string.o \ +src/pk/asn1/der/printable_string/der_encode_printable_string.o \ +src/pk/asn1/der/printable_string/der_length_printable_string.o \ +src/pk/asn1/der/sequence/der_decode_sequence_ex.o \ +src/pk/asn1/der/sequence/der_decode_sequence_flexi.o \ +src/pk/asn1/der/sequence/der_decode_sequence_multi.o \ +src/pk/asn1/der/sequence/der_decode_subject_public_key_info.o \ +src/pk/asn1/der/sequence/der_encode_sequence_ex.o \ +src/pk/asn1/der/sequence/der_encode_sequence_multi.o \ +src/pk/asn1/der/sequence/der_encode_subject_public_key_info.o \ +src/pk/asn1/der/sequence/der_length_sequence.o src/pk/asn1/der/sequence/der_sequence_free.o \ +src/pk/asn1/der/sequence/der_sequence_shrink.o src/pk/asn1/der/set/der_encode_set.o \ +src/pk/asn1/der/set/der_encode_setof.o src/pk/asn1/der/short_integer/der_decode_short_integer.o \ +src/pk/asn1/der/short_integer/der_encode_short_integer.o \ +src/pk/asn1/der/short_integer/der_length_short_integer.o \ +src/pk/asn1/der/teletex_string/der_decode_teletex_string.o \ +src/pk/asn1/der/teletex_string/der_length_teletex_string.o \ +src/pk/asn1/der/utctime/der_decode_utctime.o src/pk/asn1/der/utctime/der_encode_utctime.o \ +src/pk/asn1/der/utctime/der_length_utctime.o src/pk/asn1/der/utf8/der_decode_utf8_string.o \ +src/pk/asn1/der/utf8/der_encode_utf8_string.o src/pk/asn1/der/utf8/der_length_utf8_string.o \ +src/pk/dh/dh.o src/pk/dh/dh_check_pubkey.o src/pk/dh/dh_export.o src/pk/dh/dh_export_key.o \ +src/pk/dh/dh_free.o src/pk/dh/dh_generate_key.o src/pk/dh/dh_import.o src/pk/dh/dh_set.o \ +src/pk/dh/dh_set_pg_dhparam.o src/pk/dh/dh_shared_secret.o src/pk/dsa/dsa_decrypt_key.o \ +src/pk/dsa/dsa_encrypt_key.o src/pk/dsa/dsa_export.o src/pk/dsa/dsa_free.o \ +src/pk/dsa/dsa_generate_key.o src/pk/dsa/dsa_generate_pqg.o src/pk/dsa/dsa_import.o \ +src/pk/dsa/dsa_make_key.o src/pk/dsa/dsa_set.o src/pk/dsa/dsa_set_pqg_dsaparam.o \ +src/pk/dsa/dsa_shared_secret.o src/pk/dsa/dsa_sign_hash.o src/pk/dsa/dsa_verify_hash.o \ +src/pk/dsa/dsa_verify_key.o src/pk/ecc/ecc.o src/pk/ecc/ecc_ansi_x963_export.o \ +src/pk/ecc/ecc_ansi_x963_import.o src/pk/ecc/ecc_decrypt_key.o src/pk/ecc/ecc_encrypt_key.o \ +src/pk/ecc/ecc_export.o src/pk/ecc/ecc_free.o src/pk/ecc/ecc_get_size.o src/pk/ecc/ecc_import.o \ +src/pk/ecc/ecc_make_key.o src/pk/ecc/ecc_shared_secret.o src/pk/ecc/ecc_sign_hash.o \ +src/pk/ecc/ecc_sizes.o src/pk/ecc/ecc_test.o src/pk/ecc/ecc_verify_hash.o \ +src/pk/ecc/ltc_ecc_is_valid_idx.o src/pk/ecc/ltc_ecc_map.o src/pk/ecc/ltc_ecc_mul2add.o \ +src/pk/ecc/ltc_ecc_mulmod.o src/pk/ecc/ltc_ecc_mulmod_timing.o src/pk/ecc/ltc_ecc_points.o \ +src/pk/ecc/ltc_ecc_projective_add_point.o src/pk/ecc/ltc_ecc_projective_dbl_point.o \ +src/pk/katja/katja_decrypt_key.o src/pk/katja/katja_encrypt_key.o src/pk/katja/katja_export.o \ +src/pk/katja/katja_exptmod.o src/pk/katja/katja_free.o src/pk/katja/katja_import.o \ +src/pk/katja/katja_make_key.o src/pk/pkcs1/pkcs_1_i2osp.o src/pk/pkcs1/pkcs_1_mgf1.o \ +src/pk/pkcs1/pkcs_1_oaep_decode.o src/pk/pkcs1/pkcs_1_oaep_encode.o src/pk/pkcs1/pkcs_1_os2ip.o \ +src/pk/pkcs1/pkcs_1_pss_decode.o src/pk/pkcs1/pkcs_1_pss_encode.o src/pk/pkcs1/pkcs_1_v1_5_decode.o \ +src/pk/pkcs1/pkcs_1_v1_5_encode.o src/pk/rsa/rsa_decrypt_key.o src/pk/rsa/rsa_encrypt_key.o \ +src/pk/rsa/rsa_export.o src/pk/rsa/rsa_exptmod.o src/pk/rsa/rsa_free.o src/pk/rsa/rsa_get_size.o \ +src/pk/rsa/rsa_import.o src/pk/rsa/rsa_import_pkcs8.o src/pk/rsa/rsa_import_x509.o \ +src/pk/rsa/rsa_make_key.o src/pk/rsa/rsa_set.o src/pk/rsa/rsa_sign_hash.o \ +src/pk/rsa/rsa_sign_saltlen_get.o src/pk/rsa/rsa_verify_hash.o src/prngs/chacha20.o src/prngs/fortuna.o \ +src/prngs/rc4.o src/prngs/rng_get_bytes.o src/prngs/rng_make_prng.o src/prngs/sober128.o \ +src/prngs/sprng.o src/prngs/yarrow.o src/stream/chacha/chacha_crypt.o src/stream/chacha/chacha_done.o \ +src/stream/chacha/chacha_ivctr32.o src/stream/chacha/chacha_ivctr64.o \ +src/stream/chacha/chacha_keystream.o src/stream/chacha/chacha_setup.o src/stream/chacha/chacha_test.o \ +src/stream/rc4/rc4_stream.o src/stream/rc4/rc4_test.o src/stream/sober128/sober128_stream.o \ +src/stream/sober128/sober128_test.o + +#List of test objects to compile +TOBJECTS=tests/base64_test.o tests/cipher_hash_test.o tests/common.o tests/der_test.o tests/dh_test.o \ +tests/dsa_test.o tests/ecc_test.o tests/file_test.o tests/katja_test.o tests/mac_test.o tests/misc_test.o \ +tests/modes_test.o tests/mpi_test.o tests/multi_test.o tests/no_prng.o tests/pkcs_1_eme_test.o \ +tests/pkcs_1_emsa_test.o tests/pkcs_1_oaep_test.o tests/pkcs_1_pss_test.o tests/pkcs_1_test.o \ +tests/prng_test.o tests/rotate_test.o tests/rsa_test.o tests/store_test.o tests/test.o + +#The following headers will be installed by "make install" +HEADERS=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \ +src/headers/tomcrypt_cipher.h src/headers/tomcrypt_custom.h src/headers/tomcrypt_hash.h \ +src/headers/tomcrypt_mac.h src/headers/tomcrypt_macros.h src/headers/tomcrypt_math.h \ +src/headers/tomcrypt_misc.h src/headers/tomcrypt_pk.h src/headers/tomcrypt_pkcs.h \ +src/headers/tomcrypt_prng.h + +#The default rule for make builds the libtomcrypt.a library (static) +default: $(LIBMAIN_S) + +#SPECIAL: AES comes in two flavours - enc+dec and enc-only +src/ciphers/aes/aes_enc.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c + $(CC) $(LTC_CFLAGS) -DENCRYPT_ONLY -c src/ciphers/aes/aes.c -o src/ciphers/aes/aes_enc.o + +#SPECIAL: these are the rules to make certain object files +src/ciphers/aes/aes.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c +src/ciphers/twofish/twofish.o: src/ciphers/twofish/twofish.c src/ciphers/twofish/twofish_tab.c +src/hashes/whirl/whirl.o: src/hashes/whirl/whirl.c src/hashes/whirl/whirltab.c +src/hashes/sha2/sha512.o: src/hashes/sha2/sha512.c src/hashes/sha2/sha384.c +src/hashes/sha2/sha512_224.o: src/hashes/sha2/sha512.c src/hashes/sha2/sha512_224.c +src/hashes/sha2/sha512_256.o: src/hashes/sha2/sha512.c src/hashes/sha2/sha512_256.c +src/hashes/sha2/sha256.o: src/hashes/sha2/sha256.c src/hashes/sha2/sha224.c + +#Dependencies on *.h +$(OBJECTS): $(HEADERS) +$(TOBJECTS): $(HEADERS) tests/tomcrypt_test.h + +.c.o: + $(CC) $(LTC_CFLAGS) -c $< -o $@ + +#Create libtomcrypt.a +$(LIBMAIN_S): $(OBJECTS) + $(AR) $(ARFLAGS) $@ $(OBJECTS) + $(RANLIB) $@ + +#Create DLL + import library libtomcrypt.dll.a +$(LIBMAIN_D) $(LIBMAIN_I): $(OBJECTS) + $(CC) -s -shared -o $(LIBMAIN_D) $^ -Wl,--enable-auto-import,--export-all -Wl,--out-implib=$(LIBMAIN_I) $(LTC_LDFLAGS) + $(STRIP) -S $(LIBMAIN_D) + +#Demo tools/utilities +hashsum.exe: demos/hashsum.o $(LIBMAIN_S) + $(CC) demos/hashsum.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@ +ltcrypt.exe: demos/ltcrypt.o $(LIBMAIN_S) + $(CC) demos/ltcrypt.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@ +small.exe: demos/small.o $(LIBMAIN_S) + $(CC) demos/small.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@ +tv_gen.exe: demos/tv_gen.o $(LIBMAIN_S) + $(CC) demos/tv_gen.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@ +sizes.exe: demos/sizes.o $(LIBMAIN_S) + $(CC) demos/sizes.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@ +constants.exe: demos/constants.o $(LIBMAIN_S) + $(CC) demos/constants.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@ +timing.exe: demos/timing.o $(LIBMAIN_S) + $(CC) demos/timing.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@ + +#Tests +test.exe: $(TOBJECTS) $(LIBMAIN_S) + $(CC) $(TOBJECTS) $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@ + @echo NOTICE: start the tests by launching test.exe + +all: $(LIBMAIN_S) $(LIBMAIN_I) $(LIBMAIN_D) hashsum.exe ltcrypt.exe small.exe tv_gen.exe sizes.exe constants.exe timing.exe test.exe + +test: test.exe + +clean: + @-cmd /c del /Q *_tv.txt 2>nul + @-cmd /c del /Q /S *.o *.a *.exe *.dll 2>nul + +#Install the library + headers +install: $(LIBMAIN_S) $(LIBMAIN_I) $(LIBMAIN_D) + cmd /c if not exist "$(PREFIX)\bin" mkdir "$(PREFIX)\bin" + cmd /c if not exist "$(PREFIX)\lib" mkdir "$(PREFIX)\lib" + cmd /c if not exist "$(PREFIX)\include" mkdir "$(PREFIX)\include" + copy /Y $(LIBMAIN_S) "$(PREFIX)\lib" + copy /Y $(LIBMAIN_I) "$(PREFIX)\lib" + copy /Y $(LIBMAIN_D) "$(PREFIX)\bin" + copy /Y src\headers\tomcrypt*.h "$(PREFIX)\include" + +#Install useful tools +install_bins: hashsum + cmd /c if not exist "$(PREFIX)\bin" mkdir "$(PREFIX)\bin" + copy /Y hashsum.exe "$(PREFIX)\bin" + +#Install documentation +install_docs: doc/crypt.pdf + cmd /c if not exist "$(PREFIX)\doc" mkdir "$(PREFIX)\doc" + copy /Y doc\crypt.pdf "$(PREFIX)\doc" diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/makefile.msvc --- a/libtomcrypt/makefile.msvc Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/makefile.msvc Fri Feb 09 21:44:05 2018 +0800 @@ -1,79 +1,132 @@ -#MSVC Makefile [tested with MSVC 6.00 with SP5] +# MAKEFILE for MS Windows (nmake + Windows SDK) +# +# BEWARE: variables OBJECTS, TOBJECTS, HEADERS, VERSION are updated via ./updatemakes.sh + +### USAGE: +# Open a command prompt with WinSDK variables set and start: # -#Tom St Denis -CFLAGS = /Isrc/headers/ /Itestprof/ /Ox /DWIN32 /DLTC_SOURCE /W3 /Fo$@ $(CF) +# nmake -f makefile.msvc all +# test.exe +# nmake -f makefile.msvc PREFIX=c:\devel\libtom install +# +#Or: +# +# nmake -f makefile.msvc CFLAGS="/DUSE_LTM /DLTM_DESC /Ic:\path\to\libtommath" EXTRALIBS=c:\path\to\libtommath\tommath.lib all +# + +#The following can be overridden from command line e.g. make -f makefile.msvc CC=gcc ARFLAGS=rcs +PREFIX = c:\devel +CFLAGS = /Ox /DUSE_LTM /DLTM_DESC /I../libtommath +EXTRALIBS = ../libtommath/tommath.lib -#START_INS -OBJECTS=src/ciphers/aes/aes_enc.obj src/ciphers/aes/aes.obj src/ciphers/anubis.obj src/ciphers/blowfish.obj \ -src/ciphers/cast5.obj src/ciphers/des.obj src/ciphers/kasumi.obj src/ciphers/khazad.obj src/ciphers/kseed.obj \ -src/ciphers/multi2.obj src/ciphers/noekeon.obj src/ciphers/rc2.obj src/ciphers/rc5.obj src/ciphers/rc6.obj \ -src/ciphers/safer/safer.obj src/ciphers/safer/saferp.obj src/ciphers/safer/safer_tab.obj \ -src/ciphers/skipjack.obj src/ciphers/twofish/twofish.obj src/ciphers/xtea.obj src/encauth/ccm/ccm_memory.obj \ -src/encauth/ccm/ccm_test.obj src/encauth/eax/eax_addheader.obj src/encauth/eax/eax_decrypt.obj \ -src/encauth/eax/eax_decrypt_verify_memory.obj src/encauth/eax/eax_done.obj \ -src/encauth/eax/eax_encrypt_authenticate_memory.obj src/encauth/eax/eax_encrypt.obj \ +#Compilation flags +LTC_CFLAGS = /nologo /Isrc/headers/ /Itests/ /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /DLTC_SOURCE /W3 $(CFLAGS) +LTC_LDFLAGS = advapi32.lib $(EXTRALIBS) +VERSION=1.18.1 + +#Libraries to be created (this makefile builds only static libraries) +LIBMAIN_S =tomcrypt.lib + +#List of objects to compile (all goes to tomcrypt.lib) +OBJECTS=src/ciphers/aes/aes.obj src/ciphers/aes/aes_enc.obj src/ciphers/anubis.obj src/ciphers/blowfish.obj \ +src/ciphers/camellia.obj src/ciphers/cast5.obj src/ciphers/des.obj src/ciphers/kasumi.obj src/ciphers/khazad.obj \ +src/ciphers/kseed.obj src/ciphers/multi2.obj src/ciphers/noekeon.obj src/ciphers/rc2.obj src/ciphers/rc5.obj \ +src/ciphers/rc6.obj src/ciphers/safer/safer.obj src/ciphers/safer/saferp.obj src/ciphers/skipjack.obj \ +src/ciphers/twofish/twofish.obj src/ciphers/xtea.obj src/encauth/ccm/ccm_add_aad.obj \ +src/encauth/ccm/ccm_add_nonce.obj src/encauth/ccm/ccm_done.obj src/encauth/ccm/ccm_init.obj \ +src/encauth/ccm/ccm_memory.obj src/encauth/ccm/ccm_process.obj src/encauth/ccm/ccm_reset.obj \ +src/encauth/ccm/ccm_test.obj src/encauth/chachapoly/chacha20poly1305_add_aad.obj \ +src/encauth/chachapoly/chacha20poly1305_decrypt.obj src/encauth/chachapoly/chacha20poly1305_done.obj \ +src/encauth/chachapoly/chacha20poly1305_encrypt.obj src/encauth/chachapoly/chacha20poly1305_init.obj \ +src/encauth/chachapoly/chacha20poly1305_memory.obj src/encauth/chachapoly/chacha20poly1305_setiv.obj \ +src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.obj \ +src/encauth/chachapoly/chacha20poly1305_test.obj src/encauth/eax/eax_addheader.obj \ +src/encauth/eax/eax_decrypt.obj src/encauth/eax/eax_decrypt_verify_memory.obj src/encauth/eax/eax_done.obj \ +src/encauth/eax/eax_encrypt.obj src/encauth/eax/eax_encrypt_authenticate_memory.obj \ src/encauth/eax/eax_init.obj src/encauth/eax/eax_test.obj src/encauth/gcm/gcm_add_aad.obj \ src/encauth/gcm/gcm_add_iv.obj src/encauth/gcm/gcm_done.obj src/encauth/gcm/gcm_gf_mult.obj \ src/encauth/gcm/gcm_init.obj src/encauth/gcm/gcm_memory.obj src/encauth/gcm/gcm_mult_h.obj \ src/encauth/gcm/gcm_process.obj src/encauth/gcm/gcm_reset.obj src/encauth/gcm/gcm_test.obj \ src/encauth/ocb/ocb_decrypt.obj src/encauth/ocb/ocb_decrypt_verify_memory.obj \ -src/encauth/ocb/ocb_done_decrypt.obj src/encauth/ocb/ocb_done_encrypt.obj \ -src/encauth/ocb/ocb_encrypt_authenticate_memory.obj src/encauth/ocb/ocb_encrypt.obj \ -src/encauth/ocb/ocb_init.obj src/encauth/ocb/ocb_ntz.obj src/encauth/ocb/ocb_shift_xor.obj \ -src/encauth/ocb/ocb_test.obj src/encauth/ocb/s_ocb_done.obj src/hashes/chc/chc.obj \ -src/hashes/helper/hash_file.obj src/hashes/helper/hash_filehandle.obj src/hashes/helper/hash_memory.obj \ +src/encauth/ocb/ocb_done_decrypt.obj src/encauth/ocb/ocb_done_encrypt.obj src/encauth/ocb/ocb_encrypt.obj \ +src/encauth/ocb/ocb_encrypt_authenticate_memory.obj src/encauth/ocb/ocb_init.obj src/encauth/ocb/ocb_ntz.obj \ +src/encauth/ocb/ocb_shift_xor.obj src/encauth/ocb/ocb_test.obj src/encauth/ocb/s_ocb_done.obj \ +src/encauth/ocb3/ocb3_add_aad.obj src/encauth/ocb3/ocb3_decrypt.obj src/encauth/ocb3/ocb3_decrypt_last.obj \ +src/encauth/ocb3/ocb3_decrypt_verify_memory.obj src/encauth/ocb3/ocb3_done.obj \ +src/encauth/ocb3/ocb3_encrypt.obj src/encauth/ocb3/ocb3_encrypt_authenticate_memory.obj \ +src/encauth/ocb3/ocb3_encrypt_last.obj src/encauth/ocb3/ocb3_init.obj src/encauth/ocb3/ocb3_int_ntz.obj \ +src/encauth/ocb3/ocb3_int_xor_blocks.obj src/encauth/ocb3/ocb3_test.obj src/hashes/blake2b.obj \ +src/hashes/blake2s.obj src/hashes/chc/chc.obj src/hashes/helper/hash_file.obj \ +src/hashes/helper/hash_filehandle.obj src/hashes/helper/hash_memory.obj \ src/hashes/helper/hash_memory_multi.obj src/hashes/md2.obj src/hashes/md4.obj src/hashes/md5.obj \ src/hashes/rmd128.obj src/hashes/rmd160.obj src/hashes/rmd256.obj src/hashes/rmd320.obj src/hashes/sha1.obj \ -src/hashes/sha2/sha256.obj src/hashes/sha2/sha512.obj src/hashes/tiger.obj src/hashes/whirl/whirl.obj \ -src/mac/f9/f9_done.obj src/mac/f9/f9_file.obj src/mac/f9/f9_init.obj src/mac/f9/f9_memory.obj \ -src/mac/f9/f9_memory_multi.obj src/mac/f9/f9_process.obj src/mac/f9/f9_test.obj src/mac/hmac/hmac_done.obj \ -src/mac/hmac/hmac_file.obj src/mac/hmac/hmac_init.obj src/mac/hmac/hmac_memory.obj \ -src/mac/hmac/hmac_memory_multi.obj src/mac/hmac/hmac_process.obj src/mac/hmac/hmac_test.obj \ -src/mac/omac/omac_done.obj src/mac/omac/omac_file.obj src/mac/omac/omac_init.obj src/mac/omac/omac_memory.obj \ -src/mac/omac/omac_memory_multi.obj src/mac/omac/omac_process.obj src/mac/omac/omac_test.obj \ -src/mac/pelican/pelican.obj src/mac/pelican/pelican_memory.obj src/mac/pelican/pelican_test.obj \ -src/mac/pmac/pmac_done.obj src/mac/pmac/pmac_file.obj src/mac/pmac/pmac_init.obj src/mac/pmac/pmac_memory.obj \ +src/hashes/sha2/sha224.obj src/hashes/sha2/sha256.obj src/hashes/sha2/sha384.obj src/hashes/sha2/sha512.obj \ +src/hashes/sha2/sha512_224.obj src/hashes/sha2/sha512_256.obj src/hashes/sha3.obj src/hashes/sha3_test.obj \ +src/hashes/tiger.obj src/hashes/whirl/whirl.obj src/mac/blake2/blake2bmac.obj \ +src/mac/blake2/blake2bmac_file.obj src/mac/blake2/blake2bmac_memory.obj \ +src/mac/blake2/blake2bmac_memory_multi.obj src/mac/blake2/blake2bmac_test.obj src/mac/blake2/blake2smac.obj \ +src/mac/blake2/blake2smac_file.obj src/mac/blake2/blake2smac_memory.obj \ +src/mac/blake2/blake2smac_memory_multi.obj src/mac/blake2/blake2smac_test.obj src/mac/f9/f9_done.obj \ +src/mac/f9/f9_file.obj src/mac/f9/f9_init.obj src/mac/f9/f9_memory.obj src/mac/f9/f9_memory_multi.obj \ +src/mac/f9/f9_process.obj src/mac/f9/f9_test.obj src/mac/hmac/hmac_done.obj src/mac/hmac/hmac_file.obj \ +src/mac/hmac/hmac_init.obj src/mac/hmac/hmac_memory.obj src/mac/hmac/hmac_memory_multi.obj \ +src/mac/hmac/hmac_process.obj src/mac/hmac/hmac_test.obj src/mac/omac/omac_done.obj src/mac/omac/omac_file.obj \ +src/mac/omac/omac_init.obj src/mac/omac/omac_memory.obj src/mac/omac/omac_memory_multi.obj \ +src/mac/omac/omac_process.obj src/mac/omac/omac_test.obj src/mac/pelican/pelican.obj \ +src/mac/pelican/pelican_memory.obj src/mac/pelican/pelican_test.obj src/mac/pmac/pmac_done.obj \ +src/mac/pmac/pmac_file.obj src/mac/pmac/pmac_init.obj src/mac/pmac/pmac_memory.obj \ src/mac/pmac/pmac_memory_multi.obj src/mac/pmac/pmac_ntz.obj src/mac/pmac/pmac_process.obj \ -src/mac/pmac/pmac_shift_xor.obj src/mac/pmac/pmac_test.obj src/mac/xcbc/xcbc_done.obj \ +src/mac/pmac/pmac_shift_xor.obj src/mac/pmac/pmac_test.obj src/mac/poly1305/poly1305.obj \ +src/mac/poly1305/poly1305_file.obj src/mac/poly1305/poly1305_memory.obj \ +src/mac/poly1305/poly1305_memory_multi.obj src/mac/poly1305/poly1305_test.obj src/mac/xcbc/xcbc_done.obj \ src/mac/xcbc/xcbc_file.obj src/mac/xcbc/xcbc_init.obj src/mac/xcbc/xcbc_memory.obj \ src/mac/xcbc/xcbc_memory_multi.obj src/mac/xcbc/xcbc_process.obj src/mac/xcbc/xcbc_test.obj \ src/math/fp/ltc_ecc_fp_mulmod.obj src/math/gmp_desc.obj src/math/ltm_desc.obj src/math/multi.obj \ -src/math/rand_prime.obj src/math/tfm_desc.obj src/misc/base64/base64_decode.obj \ -src/misc/base64/base64_encode.obj src/misc/burn_stack.obj src/misc/crypt/crypt_argchk.obj \ -src/misc/crypt/crypt.obj src/misc/crypt/crypt_cipher_descriptor.obj src/misc/crypt/crypt_cipher_is_valid.obj \ -src/misc/crypt/crypt_find_cipher_any.obj src/misc/crypt/crypt_find_cipher.obj \ -src/misc/crypt/crypt_find_cipher_id.obj src/misc/crypt/crypt_find_hash_any.obj \ -src/misc/crypt/crypt_find_hash.obj src/misc/crypt/crypt_find_hash_id.obj \ -src/misc/crypt/crypt_find_hash_oid.obj src/misc/crypt/crypt_find_prng.obj src/misc/crypt/crypt_fsa.obj \ -src/misc/crypt/crypt_hash_descriptor.obj src/misc/crypt/crypt_hash_is_valid.obj \ +src/math/radix_to_bin.obj src/math/rand_bn.obj src/math/rand_prime.obj src/math/tfm_desc.obj src/misc/adler32.obj \ +src/misc/base64/base64_decode.obj src/misc/base64/base64_encode.obj src/misc/burn_stack.obj \ +src/misc/compare_testvector.obj src/misc/crc32.obj src/misc/crypt/crypt.obj src/misc/crypt/crypt_argchk.obj \ +src/misc/crypt/crypt_cipher_descriptor.obj src/misc/crypt/crypt_cipher_is_valid.obj \ +src/misc/crypt/crypt_constants.obj src/misc/crypt/crypt_find_cipher.obj \ +src/misc/crypt/crypt_find_cipher_any.obj src/misc/crypt/crypt_find_cipher_id.obj \ +src/misc/crypt/crypt_find_hash.obj src/misc/crypt/crypt_find_hash_any.obj \ +src/misc/crypt/crypt_find_hash_id.obj src/misc/crypt/crypt_find_hash_oid.obj \ +src/misc/crypt/crypt_find_prng.obj src/misc/crypt/crypt_fsa.obj src/misc/crypt/crypt_hash_descriptor.obj \ +src/misc/crypt/crypt_hash_is_valid.obj src/misc/crypt/crypt_inits.obj \ src/misc/crypt/crypt_ltc_mp_descriptor.obj src/misc/crypt/crypt_prng_descriptor.obj \ -src/misc/crypt/crypt_prng_is_valid.obj src/misc/crypt/crypt_register_cipher.obj \ -src/misc/crypt/crypt_register_hash.obj src/misc/crypt/crypt_register_prng.obj \ +src/misc/crypt/crypt_prng_is_valid.obj src/misc/crypt/crypt_prng_rng_descriptor.obj \ +src/misc/crypt/crypt_register_all_ciphers.obj src/misc/crypt/crypt_register_all_hashes.obj \ +src/misc/crypt/crypt_register_all_prngs.obj src/misc/crypt/crypt_register_cipher.obj \ +src/misc/crypt/crypt_register_hash.obj src/misc/crypt/crypt_register_prng.obj src/misc/crypt/crypt_sizes.obj \ src/misc/crypt/crypt_unregister_cipher.obj src/misc/crypt/crypt_unregister_hash.obj \ -src/misc/crypt/crypt_unregister_prng.obj src/misc/error_to_string.obj src/misc/pkcs5/pkcs_5_1.obj \ -src/misc/pkcs5/pkcs_5_2.obj src/misc/zeromem.obj src/modes/cbc/cbc_decrypt.obj src/modes/cbc/cbc_done.obj \ -src/modes/cbc/cbc_encrypt.obj src/modes/cbc/cbc_getiv.obj src/modes/cbc/cbc_setiv.obj \ -src/modes/cbc/cbc_start.obj src/modes/cfb/cfb_decrypt.obj src/modes/cfb/cfb_done.obj \ -src/modes/cfb/cfb_encrypt.obj src/modes/cfb/cfb_getiv.obj src/modes/cfb/cfb_setiv.obj \ -src/modes/cfb/cfb_start.obj src/modes/ctr/ctr_decrypt.obj src/modes/ctr/ctr_done.obj \ -src/modes/ctr/ctr_encrypt.obj src/modes/ctr/ctr_getiv.obj src/modes/ctr/ctr_setiv.obj \ -src/modes/ctr/ctr_start.obj src/modes/ctr/ctr_test.obj src/modes/ecb/ecb_decrypt.obj src/modes/ecb/ecb_done.obj \ -src/modes/ecb/ecb_encrypt.obj src/modes/ecb/ecb_start.obj src/modes/f8/f8_decrypt.obj src/modes/f8/f8_done.obj \ -src/modes/f8/f8_encrypt.obj src/modes/f8/f8_getiv.obj src/modes/f8/f8_setiv.obj src/modes/f8/f8_start.obj \ -src/modes/f8/f8_test_mode.obj src/modes/lrw/lrw_decrypt.obj src/modes/lrw/lrw_done.obj \ -src/modes/lrw/lrw_encrypt.obj src/modes/lrw/lrw_getiv.obj src/modes/lrw/lrw_process.obj \ -src/modes/lrw/lrw_setiv.obj src/modes/lrw/lrw_start.obj src/modes/lrw/lrw_test.obj \ -src/modes/ofb/ofb_decrypt.obj src/modes/ofb/ofb_done.obj src/modes/ofb/ofb_encrypt.obj \ -src/modes/ofb/ofb_getiv.obj src/modes/ofb/ofb_setiv.obj src/modes/ofb/ofb_start.obj \ -src/modes/xts/xts_decrypt.obj src/modes/xts/xts_done.obj src/modes/xts/xts_encrypt.obj \ -src/modes/xts/xts_init.obj src/modes/xts/xts_mult_x.obj src/modes/xts/xts_test.obj \ -src/pk/asn1/der/bit/der_decode_bit_string.obj src/pk/asn1/der/bit/der_encode_bit_string.obj \ -src/pk/asn1/der/bit/der_length_bit_string.obj src/pk/asn1/der/boolean/der_decode_boolean.obj \ -src/pk/asn1/der/boolean/der_encode_boolean.obj src/pk/asn1/der/boolean/der_length_boolean.obj \ -src/pk/asn1/der/choice/der_decode_choice.obj src/pk/asn1/der/ia5/der_decode_ia5_string.obj \ -src/pk/asn1/der/ia5/der_encode_ia5_string.obj src/pk/asn1/der/ia5/der_length_ia5_string.obj \ -src/pk/asn1/der/integer/der_decode_integer.obj src/pk/asn1/der/integer/der_encode_integer.obj \ -src/pk/asn1/der/integer/der_length_integer.obj \ +src/misc/crypt/crypt_unregister_prng.obj src/misc/error_to_string.obj src/misc/hkdf/hkdf.obj \ +src/misc/hkdf/hkdf_test.obj src/misc/mem_neq.obj src/misc/pk_get_oid.obj src/misc/pkcs5/pkcs_5_1.obj \ +src/misc/pkcs5/pkcs_5_2.obj src/misc/pkcs5/pkcs_5_test.obj src/misc/zeromem.obj src/modes/cbc/cbc_decrypt.obj \ +src/modes/cbc/cbc_done.obj src/modes/cbc/cbc_encrypt.obj src/modes/cbc/cbc_getiv.obj \ +src/modes/cbc/cbc_setiv.obj src/modes/cbc/cbc_start.obj src/modes/cfb/cfb_decrypt.obj \ +src/modes/cfb/cfb_done.obj src/modes/cfb/cfb_encrypt.obj src/modes/cfb/cfb_getiv.obj \ +src/modes/cfb/cfb_setiv.obj src/modes/cfb/cfb_start.obj src/modes/ctr/ctr_decrypt.obj \ +src/modes/ctr/ctr_done.obj src/modes/ctr/ctr_encrypt.obj src/modes/ctr/ctr_getiv.obj \ +src/modes/ctr/ctr_setiv.obj src/modes/ctr/ctr_start.obj src/modes/ctr/ctr_test.obj \ +src/modes/ecb/ecb_decrypt.obj src/modes/ecb/ecb_done.obj src/modes/ecb/ecb_encrypt.obj \ +src/modes/ecb/ecb_start.obj src/modes/f8/f8_decrypt.obj src/modes/f8/f8_done.obj src/modes/f8/f8_encrypt.obj \ +src/modes/f8/f8_getiv.obj src/modes/f8/f8_setiv.obj src/modes/f8/f8_start.obj src/modes/f8/f8_test_mode.obj \ +src/modes/lrw/lrw_decrypt.obj src/modes/lrw/lrw_done.obj src/modes/lrw/lrw_encrypt.obj \ +src/modes/lrw/lrw_getiv.obj src/modes/lrw/lrw_process.obj src/modes/lrw/lrw_setiv.obj \ +src/modes/lrw/lrw_start.obj src/modes/lrw/lrw_test.obj src/modes/ofb/ofb_decrypt.obj src/modes/ofb/ofb_done.obj \ +src/modes/ofb/ofb_encrypt.obj src/modes/ofb/ofb_getiv.obj src/modes/ofb/ofb_setiv.obj \ +src/modes/ofb/ofb_start.obj src/modes/xts/xts_decrypt.obj src/modes/xts/xts_done.obj \ +src/modes/xts/xts_encrypt.obj src/modes/xts/xts_init.obj src/modes/xts/xts_mult_x.obj \ +src/modes/xts/xts_test.obj src/pk/asn1/der/bit/der_decode_bit_string.obj \ +src/pk/asn1/der/bit/der_decode_raw_bit_string.obj src/pk/asn1/der/bit/der_encode_bit_string.obj \ +src/pk/asn1/der/bit/der_encode_raw_bit_string.obj src/pk/asn1/der/bit/der_length_bit_string.obj \ +src/pk/asn1/der/boolean/der_decode_boolean.obj src/pk/asn1/der/boolean/der_encode_boolean.obj \ +src/pk/asn1/der/boolean/der_length_boolean.obj src/pk/asn1/der/choice/der_decode_choice.obj \ +src/pk/asn1/der/generalizedtime/der_decode_generalizedtime.obj \ +src/pk/asn1/der/generalizedtime/der_encode_generalizedtime.obj \ +src/pk/asn1/der/generalizedtime/der_length_generalizedtime.obj \ +src/pk/asn1/der/ia5/der_decode_ia5_string.obj src/pk/asn1/der/ia5/der_encode_ia5_string.obj \ +src/pk/asn1/der/ia5/der_length_ia5_string.obj src/pk/asn1/der/integer/der_decode_integer.obj \ +src/pk/asn1/der/integer/der_encode_integer.obj src/pk/asn1/der/integer/der_length_integer.obj \ src/pk/asn1/der/object_identifier/der_decode_object_identifier.obj \ src/pk/asn1/der/object_identifier/der_encode_object_identifier.obj \ src/pk/asn1/der/object_identifier/der_length_object_identifier.obj \ @@ -85,22 +138,32 @@ src/pk/asn1/der/sequence/der_decode_sequence_ex.obj \ src/pk/asn1/der/sequence/der_decode_sequence_flexi.obj \ src/pk/asn1/der/sequence/der_decode_sequence_multi.obj \ +src/pk/asn1/der/sequence/der_decode_subject_public_key_info.obj \ src/pk/asn1/der/sequence/der_encode_sequence_ex.obj \ -src/pk/asn1/der/sequence/der_encode_sequence_multi.obj src/pk/asn1/der/sequence/der_length_sequence.obj \ -src/pk/asn1/der/sequence/der_sequence_free.obj src/pk/asn1/der/set/der_encode_set.obj \ +src/pk/asn1/der/sequence/der_encode_sequence_multi.obj \ +src/pk/asn1/der/sequence/der_encode_subject_public_key_info.obj \ +src/pk/asn1/der/sequence/der_length_sequence.obj src/pk/asn1/der/sequence/der_sequence_free.obj \ +src/pk/asn1/der/sequence/der_sequence_shrink.obj src/pk/asn1/der/set/der_encode_set.obj \ src/pk/asn1/der/set/der_encode_setof.obj src/pk/asn1/der/short_integer/der_decode_short_integer.obj \ src/pk/asn1/der/short_integer/der_encode_short_integer.obj \ -src/pk/asn1/der/short_integer/der_length_short_integer.obj src/pk/asn1/der/utctime/der_decode_utctime.obj \ -src/pk/asn1/der/utctime/der_encode_utctime.obj src/pk/asn1/der/utctime/der_length_utctime.obj \ -src/pk/asn1/der/utf8/der_decode_utf8_string.obj src/pk/asn1/der/utf8/der_encode_utf8_string.obj \ -src/pk/asn1/der/utf8/der_length_utf8_string.obj src/pk/dsa/dsa_decrypt_key.obj \ -src/pk/dsa/dsa_encrypt_key.obj src/pk/dsa/dsa_export.obj src/pk/dsa/dsa_free.obj src/pk/dsa/dsa_import.obj \ -src/pk/dsa/dsa_make_key.obj src/pk/dsa/dsa_shared_secret.obj src/pk/dsa/dsa_sign_hash.obj \ -src/pk/dsa/dsa_verify_hash.obj src/pk/dsa/dsa_verify_key.obj src/pk/ecc/ecc_ansi_x963_export.obj \ -src/pk/ecc/ecc_ansi_x963_import.obj src/pk/ecc/ecc.obj src/pk/ecc/ecc_decrypt_key.obj \ -src/pk/ecc/ecc_encrypt_key.obj src/pk/ecc/ecc_export.obj src/pk/ecc/ecc_free.obj src/pk/ecc/ecc_get_size.obj \ -src/pk/ecc/ecc_import.obj src/pk/ecc/ecc_make_key.obj src/pk/ecc/ecc_shared_secret.obj \ -src/pk/ecc/ecc_sign_hash.obj src/pk/ecc/ecc_sizes.obj src/pk/ecc/ecc_test.obj src/pk/ecc/ecc_verify_hash.obj \ +src/pk/asn1/der/short_integer/der_length_short_integer.obj \ +src/pk/asn1/der/teletex_string/der_decode_teletex_string.obj \ +src/pk/asn1/der/teletex_string/der_length_teletex_string.obj \ +src/pk/asn1/der/utctime/der_decode_utctime.obj src/pk/asn1/der/utctime/der_encode_utctime.obj \ +src/pk/asn1/der/utctime/der_length_utctime.obj src/pk/asn1/der/utf8/der_decode_utf8_string.obj \ +src/pk/asn1/der/utf8/der_encode_utf8_string.obj src/pk/asn1/der/utf8/der_length_utf8_string.obj \ +src/pk/dh/dh.obj src/pk/dh/dh_check_pubkey.obj src/pk/dh/dh_export.obj src/pk/dh/dh_export_key.obj \ +src/pk/dh/dh_free.obj src/pk/dh/dh_generate_key.obj src/pk/dh/dh_import.obj src/pk/dh/dh_set.obj \ +src/pk/dh/dh_set_pg_dhparam.obj src/pk/dh/dh_shared_secret.obj src/pk/dsa/dsa_decrypt_key.obj \ +src/pk/dsa/dsa_encrypt_key.obj src/pk/dsa/dsa_export.obj src/pk/dsa/dsa_free.obj \ +src/pk/dsa/dsa_generate_key.obj src/pk/dsa/dsa_generate_pqg.obj src/pk/dsa/dsa_import.obj \ +src/pk/dsa/dsa_make_key.obj src/pk/dsa/dsa_set.obj src/pk/dsa/dsa_set_pqg_dsaparam.obj \ +src/pk/dsa/dsa_shared_secret.obj src/pk/dsa/dsa_sign_hash.obj src/pk/dsa/dsa_verify_hash.obj \ +src/pk/dsa/dsa_verify_key.obj src/pk/ecc/ecc.obj src/pk/ecc/ecc_ansi_x963_export.obj \ +src/pk/ecc/ecc_ansi_x963_import.obj src/pk/ecc/ecc_decrypt_key.obj src/pk/ecc/ecc_encrypt_key.obj \ +src/pk/ecc/ecc_export.obj src/pk/ecc/ecc_free.obj src/pk/ecc/ecc_get_size.obj src/pk/ecc/ecc_import.obj \ +src/pk/ecc/ecc_make_key.obj src/pk/ecc/ecc_shared_secret.obj src/pk/ecc/ecc_sign_hash.obj \ +src/pk/ecc/ecc_sizes.obj src/pk/ecc/ecc_test.obj src/pk/ecc/ecc_verify_hash.obj \ src/pk/ecc/ltc_ecc_is_valid_idx.obj src/pk/ecc/ltc_ecc_map.obj src/pk/ecc/ltc_ecc_mul2add.obj \ src/pk/ecc/ltc_ecc_mulmod.obj src/pk/ecc/ltc_ecc_mulmod_timing.obj src/pk/ecc/ltc_ecc_points.obj \ src/pk/ecc/ltc_ecc_projective_add_point.obj src/pk/ecc/ltc_ecc_projective_dbl_point.obj \ @@ -110,43 +173,101 @@ src/pk/pkcs1/pkcs_1_oaep_decode.obj src/pk/pkcs1/pkcs_1_oaep_encode.obj src/pk/pkcs1/pkcs_1_os2ip.obj \ src/pk/pkcs1/pkcs_1_pss_decode.obj src/pk/pkcs1/pkcs_1_pss_encode.obj src/pk/pkcs1/pkcs_1_v1_5_decode.obj \ src/pk/pkcs1/pkcs_1_v1_5_encode.obj src/pk/rsa/rsa_decrypt_key.obj src/pk/rsa/rsa_encrypt_key.obj \ -src/pk/rsa/rsa_export.obj src/pk/rsa/rsa_exptmod.obj src/pk/rsa/rsa_free.obj src/pk/rsa/rsa_import.obj \ -src/pk/rsa/rsa_make_key.obj src/pk/rsa/rsa_sign_hash.obj src/pk/rsa/rsa_verify_hash.obj src/prngs/fortuna.obj \ +src/pk/rsa/rsa_export.obj src/pk/rsa/rsa_exptmod.obj src/pk/rsa/rsa_free.obj src/pk/rsa/rsa_get_size.obj \ +src/pk/rsa/rsa_import.obj src/pk/rsa/rsa_import_pkcs8.obj src/pk/rsa/rsa_import_x509.obj \ +src/pk/rsa/rsa_make_key.obj src/pk/rsa/rsa_set.obj src/pk/rsa/rsa_sign_hash.obj \ +src/pk/rsa/rsa_sign_saltlen_get.obj src/pk/rsa/rsa_verify_hash.obj src/prngs/chacha20.obj src/prngs/fortuna.obj \ src/prngs/rc4.obj src/prngs/rng_get_bytes.obj src/prngs/rng_make_prng.obj src/prngs/sober128.obj \ -src/prngs/sprng.obj src/prngs/yarrow.obj +src/prngs/sprng.obj src/prngs/yarrow.obj src/stream/chacha/chacha_crypt.obj src/stream/chacha/chacha_done.obj \ +src/stream/chacha/chacha_ivctr32.obj src/stream/chacha/chacha_ivctr64.obj \ +src/stream/chacha/chacha_keystream.obj src/stream/chacha/chacha_setup.obj src/stream/chacha/chacha_test.obj \ +src/stream/rc4/rc4_stream.obj src/stream/rc4/rc4_test.obj src/stream/sober128/sober128_stream.obj \ +src/stream/sober128/sober128_test.obj + +#List of test objects to compile +TOBJECTS=tests/base64_test.obj tests/cipher_hash_test.obj tests/common.obj tests/der_test.obj tests/dh_test.obj \ +tests/dsa_test.obj tests/ecc_test.obj tests/file_test.obj tests/katja_test.obj tests/mac_test.obj tests/misc_test.obj \ +tests/modes_test.obj tests/mpi_test.obj tests/multi_test.obj tests/no_prng.obj tests/pkcs_1_eme_test.obj \ +tests/pkcs_1_emsa_test.obj tests/pkcs_1_oaep_test.obj tests/pkcs_1_pss_test.obj tests/pkcs_1_test.obj \ +tests/prng_test.obj tests/rotate_test.obj tests/rsa_test.obj tests/store_test.obj tests/test.obj -HEADERS=src/headers/tomcrypt_cfg.h src/headers/tomcrypt_mac.h src/headers/tomcrypt_macros.h \ -src/headers/tomcrypt_custom.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cipher.h \ -src/headers/tomcrypt_pk.h src/headers/tomcrypt_hash.h src/headers/tomcrypt_math.h \ -src/headers/tomcrypt_misc.h src/headers/tomcrypt.h src/headers/tomcrypt_pkcs.h \ -src/headers/tomcrypt_prng.h testprof/tomcrypt_test.h +#The following headers will be installed by "make install" +HEADERS=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \ +src/headers/tomcrypt_cipher.h src/headers/tomcrypt_custom.h src/headers/tomcrypt_hash.h \ +src/headers/tomcrypt_mac.h src/headers/tomcrypt_macros.h src/headers/tomcrypt_math.h \ +src/headers/tomcrypt_misc.h src/headers/tomcrypt_pk.h src/headers/tomcrypt_pkcs.h \ +src/headers/tomcrypt_prng.h + +#The default rule for make builds the tomcrypt.lib library (static) +default: $(LIBMAIN_S) + +#SPECIAL: AES comes in two flavours - enc+dec and enc-only +src/ciphers/aes/aes_enc.obj: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c + $(CC) $(LTC_CFLAGS) /DENCRYPT_ONLY /c src/ciphers/aes/aes.c /Fosrc/ciphers/aes/aes_enc.obj -#END_INS - -default: library +#SPECIAL: these are the rules to make certain object files +src/ciphers/aes/aes.obj: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c +src/ciphers/twofish/twofish.obj: src/ciphers/twofish/twofish.c src/ciphers/twofish/twofish_tab.c +src/hashes/whirl/whirl.obj: src/hashes/whirl/whirl.c src/hashes/whirl/whirltab.c +src/hashes/sha2/sha512.obj: src/hashes/sha2/sha512.c src/hashes/sha2/sha384.c +src/hashes/sha2/sha512_224.obj: src/hashes/sha2/sha512.c src/hashes/sha2/sha512_224.c +src/hashes/sha2/sha512_256.obj: src/hashes/sha2/sha512.c src/hashes/sha2/sha512_256.c +src/hashes/sha2/sha256.obj: src/hashes/sha2/sha256.c src/hashes/sha2/sha224.c -#ciphers come in two flavours... enc+dec and enc -src/ciphers/aes/aes_enc.obj: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c - $(CC) $(CFLAGS) /DENCRYPT_ONLY /c src/ciphers/aes/aes.c /Fosrc/ciphers/aes/aes_enc.obj +#Dependencies on *.h +$(OBJECTS): $(HEADERS) +$(TOBJECTS): $(HEADERS) tests/tomcrypt_test.h + +.c.obj: + $(CC) $(LTC_CFLAGS) /c $< /Fo$@ -library: $(OBJECTS) - lib /out:tomcrypt.lib $(OBJECTS) - cd testprof - nmake -f makefile.msvc - cd .. - -tv_gen: demos/tv_gen.c library - cl $(CFLAGS) demos/tv_gen.c tomcrypt.lib advapi32.lib $(EXTRALIBS) +#Create tomcrypt.lib +$(LIBMAIN_S): $(OBJECTS) + lib /out:$(LIBMAIN_S) $(OBJECTS) + +#Demo tools/utilities +hashsum.exe: demos/hashsum.c tests/common.c $(LIBMAIN_S) + cl $(LTC_CFLAGS) demos/hashsum.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@ +ltcrypt.exe: demos/ltcrypt.c $(LIBMAIN_S) + cl $(LTC_CFLAGS) demos/ltcrypt.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@ +small.exe: demos/small.c $(LIBMAIN_S) + cl $(LTC_CFLAGS) demos/small.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@ +tv_gen.exe: demos/tv_gen.c $(LIBMAIN_S) + cl $(LTC_CFLAGS) demos/tv_gen.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@ +sizes.exe: demos/sizes.c $(LIBMAIN_S) + cl $(LTC_CFLAGS) demos/sizes.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@ +constants.exe: demos/constants.c $(LIBMAIN_S) + cl $(LTC_CFLAGS) demos/constants.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@ +timing.exe: demos/timing.c $(LIBMAIN_S) + cl $(LTC_CFLAGS) demos/timing.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@ + +#Tests +test.exe: $(LIBMAIN_S) $(TOBJECTS) + cl $(LTC_CFLAGS) $(TOBJECTS) $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@ + @echo NOTICE: start the tests by launching test.exe -hashsum: demos/hashsum.c library - cl $(CFLAGS) demos/hashsum.c tomcrypt.lib advapi32.lib $(EXTRALIBS) +all: $(LIBMAIN_S) hashsum.exe ltcrypt.exe small.exe tv_gen.exe sizes.exe constants.exe timing.exe test.exe + +test: test.exe -test: demos/test.c library - cl $(CFLAGS) demos/test.c testprof/tomcrypt_prof.lib tomcrypt.lib advapi32.lib $(EXTRALIBS) +clean: + @-cmd /c del /Q *_tv.txt 2>nul + @-cmd /c del /Q /S *.OBJ *.LIB *.EXE *.DLL 2>nul -timing: demos/timing.c library - cl $(CFLAGS) demos/timing.c testprof/tomcrypt_prof.lib tomcrypt.lib advapi32.lib $(EXTRALIBS) +#Install the library + headers +install: $(LIBMAIN_S) + cmd /c if not exist "$(PREFIX)\bin" mkdir "$(PREFIX)\bin" + cmd /c if not exist "$(PREFIX)\lib" mkdir "$(PREFIX)\lib" + cmd /c if not exist "$(PREFIX)\include" mkdir "$(PREFIX)\include" + copy /Y $(LIBMAIN_S) "$(PREFIX)\lib" + copy /Y src\headers\tomcrypt*.h "$(PREFIX)\include" -# $Source: /cvs/libtom/libtomcrypt/makefile.msvc,v $ -# $Revision: 1.54 $ -# $Date: 2007/02/16 16:36:25 $ +#Install useful tools +install_bins: hashsum + cmd /c if not exist "$(PREFIX)\bin" mkdir "$(PREFIX)\bin" + copy /Y hashsum.exe "$(PREFIX)\bin" + +#Install documentation +install_docs: doc/crypt.pdf + cmd /c if not exist "$(PREFIX)\doc" mkdir "$(PREFIX)\doc" + copy /Y doc\crypt.pdf "$(PREFIX)\doc" diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/makefile.shared --- a/libtomcrypt/makefile.shared Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/makefile.shared Fri Feb 09 21:44:05 2018 +0800 @@ -2,281 +2,76 @@ # # This makefile produces a shared object and requires libtool to be installed. # -# Thanks to Zed Shaw for helping debug this on BSD/OSX. +# Thanks to Zed Shaw for helping debug this on BSD/OSX. # Tom St Denis - -# The version -VERSION=0:117 - -# Compiler and Linker Names -CC=libtool --mode=compile --tag=CC gcc +# +# (GNU make only) -# ranlib tools -ifndef RANLIB - RANLIB=ranlib -endif +### USAGE: +# +# CFLAGS="-DUSE_LTM -DLTM_DESC -I/path/to/libtommath" make -f makefile.shared all EXTRALIBS=/path/to/libtommath/libtommath.a +# ./test +# make -f makefile.shared PREFIX=/opt/libtom install +# -# Compilation flags. Note the += does not write over the user's CFLAGS! -CFLAGS += -c -I./src/headers/ -Wall -Wsign-compare -W -Wshadow -DLTC_SOURCE +PLATFORM := $(shell uname | sed -e 's/_.*//') -# additional warnings (newer GCC 3.4 and higher) -ifdef GCC_34 -CFLAGS += -Wsystem-headers -Wdeclaration-after-statement -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wmissing-prototypes \ - -Wmissing-declarations -Wpointer-arith +ifndef LT + ifeq ($(PLATFORM), Darwin) + LT:=glibtool + else + LT:=libtool + endif endif - - -ifndef IGNORE_SPEED - -# optimize for SPEED -CFLAGS += -O3 -funroll-loops - -# add -fomit-frame-pointer. hinders debugging! -CFLAGS += -fomit-frame-pointer - -# optimize for SIZE -#CFLAGS += -Os -DLTC_SMALL_CODE - +ifeq ($(PLATFORM), CYGWIN) + NO_UNDEFINED:=-no-undefined endif - -# compile for DEBUGING (required for ccmalloc checking!!!) -#CFLAGS += -g3 - -# older GCCs can't handle the "rotate with immediate" ROLc/RORc/etc macros -# define this to help -#CFLAGS += -DLTC_NO_ROLC +LTCOMPILE = $(LT) --mode=compile --tag=CC $(CC) +INSTALL_CMD = $(LT) --mode=install install +UNINSTALL_CMD = $(LT) --mode=uninstall rm #Output filenames for various targets. -ifndef LIBTEST_S - LIBTEST_S=libtomcrypt_prof.a -endif -ifndef LIBTEST - LIBTEST=libtomcrypt_prof.la -endif ifndef LIBNAME LIBNAME=libtomcrypt.la endif -ifndef LIBNAME_S - LIBNAME_S=libtomcrypt.a -endif + + +include makefile_include.mk -HASH=hashsum -CRYPT=encrypt -SMALL=small -PROF=x86_prof -TV=tv_gen -TEST=test -TIMING=timing + +#ciphers come in two flavours... enc+dec and enc +src/ciphers/aes/aes_enc.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c + $(LTCOMPILE) $(LTC_CFLAGS) $(CPPFLAGS) $(LTC_LDFLAGS) -DENCRYPT_ONLY -c src/ciphers/aes/aes.c -o src/ciphers/aes/aes_enc.o -#LIBPATH-The directory for libtomcrypt to be installed to. -#INCPATH-The directory to install the header files for libtomcrypt. -#DATAPATH-The directory to install the pdf docs. -ifndef DESTDIR - DESTDIR= -endif -ifndef LIBPATH - LIBPATH=/usr/lib -endif -ifndef INCPATH - INCPATH=/usr/include -endif -ifndef DATAPATH - DATAPATH=/usr/share/doc/libtomcrypt/pdf -endif +.c.o: + $(LTCOMPILE) $(LTC_CFLAGS) $(CPPFLAGS) $(LTC_LDFLAGS) -o $@ -c $< + +LOBJECTS = $(OBJECTS:.o=.lo) -#Who do we install as? -ifdef INSTALL_USER -USER=$(INSTALL_USER) -else -USER=root -endif +$(LIBNAME): $(OBJECTS) + $(LT) --mode=link --tag=CC $(CC) $(LTC_CFLAGS) $(CPPFLAGS) $(LTC_LDFLAGS) $(LOBJECTS) $(EXTRALIBS) -o $@ -rpath $(LIBPATH) -version-info $(VERSION_LT) $(NO_UNDEFINED) -ifdef INSTALL_GROUP -GROUP=$(INSTALL_GROUP) -else -GROUP=wheel -endif +test: $(call print-help,test,Builds the library and the 'test' application to run all self-tests) $(LIBNAME) $(TOBJECTS) + $(LT) --mode=link --tag=CC $(CC) $(LTC_CFLAGS) $(CPPFLAGS) $(LTC_LDFLAGS) -o $(TEST) $(TOBJECTS) $(LIBNAME) $(EXTRALIBS) -#List of objects to compile. -#START_INS -OBJECTS=src/ciphers/aes/aes_enc.o src/ciphers/aes/aes.o src/ciphers/anubis.o src/ciphers/blowfish.o \ -src/ciphers/cast5.o src/ciphers/des.o src/ciphers/kasumi.o src/ciphers/khazad.o src/ciphers/kseed.o \ -src/ciphers/multi2.o src/ciphers/noekeon.o src/ciphers/rc2.o src/ciphers/rc5.o src/ciphers/rc6.o \ -src/ciphers/safer/safer.o src/ciphers/safer/saferp.o src/ciphers/safer/safer_tab.o \ -src/ciphers/skipjack.o src/ciphers/twofish/twofish.o src/ciphers/xtea.o src/encauth/ccm/ccm_memory.o \ -src/encauth/ccm/ccm_test.o src/encauth/eax/eax_addheader.o src/encauth/eax/eax_decrypt.o \ -src/encauth/eax/eax_decrypt_verify_memory.o src/encauth/eax/eax_done.o \ -src/encauth/eax/eax_encrypt_authenticate_memory.o src/encauth/eax/eax_encrypt.o \ -src/encauth/eax/eax_init.o src/encauth/eax/eax_test.o src/encauth/gcm/gcm_add_aad.o \ -src/encauth/gcm/gcm_add_iv.o src/encauth/gcm/gcm_done.o src/encauth/gcm/gcm_gf_mult.o \ -src/encauth/gcm/gcm_init.o src/encauth/gcm/gcm_memory.o src/encauth/gcm/gcm_mult_h.o \ -src/encauth/gcm/gcm_process.o src/encauth/gcm/gcm_reset.o src/encauth/gcm/gcm_test.o \ -src/encauth/ocb/ocb_decrypt.o src/encauth/ocb/ocb_decrypt_verify_memory.o \ -src/encauth/ocb/ocb_done_decrypt.o src/encauth/ocb/ocb_done_encrypt.o \ -src/encauth/ocb/ocb_encrypt_authenticate_memory.o src/encauth/ocb/ocb_encrypt.o \ -src/encauth/ocb/ocb_init.o src/encauth/ocb/ocb_ntz.o src/encauth/ocb/ocb_shift_xor.o \ -src/encauth/ocb/ocb_test.o src/encauth/ocb/s_ocb_done.o src/hashes/chc/chc.o \ -src/hashes/helper/hash_file.o src/hashes/helper/hash_filehandle.o src/hashes/helper/hash_memory.o \ -src/hashes/helper/hash_memory_multi.o src/hashes/md2.o src/hashes/md4.o src/hashes/md5.o \ -src/hashes/rmd128.o src/hashes/rmd160.o src/hashes/rmd256.o src/hashes/rmd320.o src/hashes/sha1.o \ -src/hashes/sha2/sha256.o src/hashes/sha2/sha512.o src/hashes/tiger.o src/hashes/whirl/whirl.o \ -src/mac/f9/f9_done.o src/mac/f9/f9_file.o src/mac/f9/f9_init.o src/mac/f9/f9_memory.o \ -src/mac/f9/f9_memory_multi.o src/mac/f9/f9_process.o src/mac/f9/f9_test.o src/mac/hmac/hmac_done.o \ -src/mac/hmac/hmac_file.o src/mac/hmac/hmac_init.o src/mac/hmac/hmac_memory.o \ -src/mac/hmac/hmac_memory_multi.o src/mac/hmac/hmac_process.o src/mac/hmac/hmac_test.o \ -src/mac/omac/omac_done.o src/mac/omac/omac_file.o src/mac/omac/omac_init.o src/mac/omac/omac_memory.o \ -src/mac/omac/omac_memory_multi.o src/mac/omac/omac_process.o src/mac/omac/omac_test.o \ -src/mac/pelican/pelican.o src/mac/pelican/pelican_memory.o src/mac/pelican/pelican_test.o \ -src/mac/pmac/pmac_done.o src/mac/pmac/pmac_file.o src/mac/pmac/pmac_init.o src/mac/pmac/pmac_memory.o \ -src/mac/pmac/pmac_memory_multi.o src/mac/pmac/pmac_ntz.o src/mac/pmac/pmac_process.o \ -src/mac/pmac/pmac_shift_xor.o src/mac/pmac/pmac_test.o src/mac/xcbc/xcbc_done.o \ -src/mac/xcbc/xcbc_file.o src/mac/xcbc/xcbc_init.o src/mac/xcbc/xcbc_memory.o \ -src/mac/xcbc/xcbc_memory_multi.o src/mac/xcbc/xcbc_process.o src/mac/xcbc/xcbc_test.o \ -src/math/fp/ltc_ecc_fp_mulmod.o src/math/gmp_desc.o src/math/ltm_desc.o src/math/multi.o \ -src/math/rand_prime.o src/math/tfm_desc.o src/misc/base64/base64_decode.o \ -src/misc/base64/base64_encode.o src/misc/burn_stack.o src/misc/crypt/crypt_argchk.o \ -src/misc/crypt/crypt.o src/misc/crypt/crypt_cipher_descriptor.o src/misc/crypt/crypt_cipher_is_valid.o \ -src/misc/crypt/crypt_find_cipher_any.o src/misc/crypt/crypt_find_cipher.o \ -src/misc/crypt/crypt_find_cipher_id.o src/misc/crypt/crypt_find_hash_any.o \ -src/misc/crypt/crypt_find_hash.o src/misc/crypt/crypt_find_hash_id.o \ -src/misc/crypt/crypt_find_hash_oid.o src/misc/crypt/crypt_find_prng.o src/misc/crypt/crypt_fsa.o \ -src/misc/crypt/crypt_hash_descriptor.o src/misc/crypt/crypt_hash_is_valid.o \ -src/misc/crypt/crypt_ltc_mp_descriptor.o src/misc/crypt/crypt_prng_descriptor.o \ -src/misc/crypt/crypt_prng_is_valid.o src/misc/crypt/crypt_register_cipher.o \ -src/misc/crypt/crypt_register_hash.o src/misc/crypt/crypt_register_prng.o \ -src/misc/crypt/crypt_unregister_cipher.o src/misc/crypt/crypt_unregister_hash.o \ -src/misc/crypt/crypt_unregister_prng.o src/misc/error_to_string.o src/misc/pkcs5/pkcs_5_1.o \ -src/misc/pkcs5/pkcs_5_2.o src/misc/zeromem.o src/modes/cbc/cbc_decrypt.o src/modes/cbc/cbc_done.o \ -src/modes/cbc/cbc_encrypt.o src/modes/cbc/cbc_getiv.o src/modes/cbc/cbc_setiv.o \ -src/modes/cbc/cbc_start.o src/modes/cfb/cfb_decrypt.o src/modes/cfb/cfb_done.o \ -src/modes/cfb/cfb_encrypt.o src/modes/cfb/cfb_getiv.o src/modes/cfb/cfb_setiv.o \ -src/modes/cfb/cfb_start.o src/modes/ctr/ctr_decrypt.o src/modes/ctr/ctr_done.o \ -src/modes/ctr/ctr_encrypt.o src/modes/ctr/ctr_getiv.o src/modes/ctr/ctr_setiv.o \ -src/modes/ctr/ctr_start.o src/modes/ctr/ctr_test.o src/modes/ecb/ecb_decrypt.o src/modes/ecb/ecb_done.o \ -src/modes/ecb/ecb_encrypt.o src/modes/ecb/ecb_start.o src/modes/f8/f8_decrypt.o src/modes/f8/f8_done.o \ -src/modes/f8/f8_encrypt.o src/modes/f8/f8_getiv.o src/modes/f8/f8_setiv.o src/modes/f8/f8_start.o \ -src/modes/f8/f8_test_mode.o src/modes/lrw/lrw_decrypt.o src/modes/lrw/lrw_done.o \ -src/modes/lrw/lrw_encrypt.o src/modes/lrw/lrw_getiv.o src/modes/lrw/lrw_process.o \ -src/modes/lrw/lrw_setiv.o src/modes/lrw/lrw_start.o src/modes/lrw/lrw_test.o \ -src/modes/ofb/ofb_decrypt.o src/modes/ofb/ofb_done.o src/modes/ofb/ofb_encrypt.o \ -src/modes/ofb/ofb_getiv.o src/modes/ofb/ofb_setiv.o src/modes/ofb/ofb_start.o \ -src/modes/xts/xts_decrypt.o src/modes/xts/xts_done.o src/modes/xts/xts_encrypt.o \ -src/modes/xts/xts_init.o src/modes/xts/xts_mult_x.o src/modes/xts/xts_test.o \ -src/pk/asn1/der/bit/der_decode_bit_string.o src/pk/asn1/der/bit/der_encode_bit_string.o \ -src/pk/asn1/der/bit/der_length_bit_string.o src/pk/asn1/der/boolean/der_decode_boolean.o \ -src/pk/asn1/der/boolean/der_encode_boolean.o src/pk/asn1/der/boolean/der_length_boolean.o \ -src/pk/asn1/der/choice/der_decode_choice.o src/pk/asn1/der/ia5/der_decode_ia5_string.o \ -src/pk/asn1/der/ia5/der_encode_ia5_string.o src/pk/asn1/der/ia5/der_length_ia5_string.o \ -src/pk/asn1/der/integer/der_decode_integer.o src/pk/asn1/der/integer/der_encode_integer.o \ -src/pk/asn1/der/integer/der_length_integer.o \ -src/pk/asn1/der/object_identifier/der_decode_object_identifier.o \ -src/pk/asn1/der/object_identifier/der_encode_object_identifier.o \ -src/pk/asn1/der/object_identifier/der_length_object_identifier.o \ -src/pk/asn1/der/octet/der_decode_octet_string.o src/pk/asn1/der/octet/der_encode_octet_string.o \ -src/pk/asn1/der/octet/der_length_octet_string.o \ -src/pk/asn1/der/printable_string/der_decode_printable_string.o \ -src/pk/asn1/der/printable_string/der_encode_printable_string.o \ -src/pk/asn1/der/printable_string/der_length_printable_string.o \ -src/pk/asn1/der/sequence/der_decode_sequence_ex.o \ -src/pk/asn1/der/sequence/der_decode_sequence_flexi.o \ -src/pk/asn1/der/sequence/der_decode_sequence_multi.o \ -src/pk/asn1/der/sequence/der_encode_sequence_ex.o \ -src/pk/asn1/der/sequence/der_encode_sequence_multi.o src/pk/asn1/der/sequence/der_length_sequence.o \ -src/pk/asn1/der/sequence/der_sequence_free.o src/pk/asn1/der/set/der_encode_set.o \ -src/pk/asn1/der/set/der_encode_setof.o src/pk/asn1/der/short_integer/der_decode_short_integer.o \ -src/pk/asn1/der/short_integer/der_encode_short_integer.o \ -src/pk/asn1/der/short_integer/der_length_short_integer.o src/pk/asn1/der/utctime/der_decode_utctime.o \ -src/pk/asn1/der/utctime/der_encode_utctime.o src/pk/asn1/der/utctime/der_length_utctime.o \ -src/pk/asn1/der/utf8/der_decode_utf8_string.o src/pk/asn1/der/utf8/der_encode_utf8_string.o \ -src/pk/asn1/der/utf8/der_length_utf8_string.o src/pk/dsa/dsa_decrypt_key.o \ -src/pk/dsa/dsa_encrypt_key.o src/pk/dsa/dsa_export.o src/pk/dsa/dsa_free.o src/pk/dsa/dsa_import.o \ -src/pk/dsa/dsa_make_key.o src/pk/dsa/dsa_shared_secret.o src/pk/dsa/dsa_sign_hash.o \ -src/pk/dsa/dsa_verify_hash.o src/pk/dsa/dsa_verify_key.o src/pk/ecc/ecc_ansi_x963_export.o \ -src/pk/ecc/ecc_ansi_x963_import.o src/pk/ecc/ecc.o src/pk/ecc/ecc_decrypt_key.o \ -src/pk/ecc/ecc_encrypt_key.o src/pk/ecc/ecc_export.o src/pk/ecc/ecc_free.o src/pk/ecc/ecc_get_size.o \ -src/pk/ecc/ecc_import.o src/pk/ecc/ecc_make_key.o src/pk/ecc/ecc_shared_secret.o \ -src/pk/ecc/ecc_sign_hash.o src/pk/ecc/ecc_sizes.o src/pk/ecc/ecc_test.o src/pk/ecc/ecc_verify_hash.o \ -src/pk/ecc/ltc_ecc_is_valid_idx.o src/pk/ecc/ltc_ecc_map.o src/pk/ecc/ltc_ecc_mul2add.o \ -src/pk/ecc/ltc_ecc_mulmod.o src/pk/ecc/ltc_ecc_mulmod_timing.o src/pk/ecc/ltc_ecc_points.o \ -src/pk/ecc/ltc_ecc_projective_add_point.o src/pk/ecc/ltc_ecc_projective_dbl_point.o \ -src/pk/katja/katja_decrypt_key.o src/pk/katja/katja_encrypt_key.o src/pk/katja/katja_export.o \ -src/pk/katja/katja_exptmod.o src/pk/katja/katja_free.o src/pk/katja/katja_import.o \ -src/pk/katja/katja_make_key.o src/pk/pkcs1/pkcs_1_i2osp.o src/pk/pkcs1/pkcs_1_mgf1.o \ -src/pk/pkcs1/pkcs_1_oaep_decode.o src/pk/pkcs1/pkcs_1_oaep_encode.o src/pk/pkcs1/pkcs_1_os2ip.o \ -src/pk/pkcs1/pkcs_1_pss_decode.o src/pk/pkcs1/pkcs_1_pss_encode.o src/pk/pkcs1/pkcs_1_v1_5_decode.o \ -src/pk/pkcs1/pkcs_1_v1_5_encode.o src/pk/rsa/rsa_decrypt_key.o src/pk/rsa/rsa_encrypt_key.o \ -src/pk/rsa/rsa_export.o src/pk/rsa/rsa_exptmod.o src/pk/rsa/rsa_free.o src/pk/rsa/rsa_import.o \ -src/pk/rsa/rsa_make_key.o src/pk/rsa/rsa_sign_hash.o src/pk/rsa/rsa_verify_hash.o src/prngs/fortuna.o \ -src/prngs/rc4.o src/prngs/rng_get_bytes.o src/prngs/rng_make_prng.o src/prngs/sober128.o \ -src/prngs/sprng.o src/prngs/yarrow.o +# build the demos from a template +define DEMO_template +$(1): $(call print-help,$(1),Builds the library and the '$(1)' demo) demos/$(1).o $$(LIBNAME) + $$(LT) --mode=link --tag=CC $$(CC) $$(LTC_CFLAGS) $$(CPPFLAGS) $$(LTC_LDFLAGS) $$^ $$(EXTRALIBS) -o $(1) +endef + +$(foreach demo, $(strip $(DEMOS)), $(eval $(call DEMO_template,$(demo)))) -HEADERS=src/headers/tomcrypt_cfg.h src/headers/tomcrypt_mac.h src/headers/tomcrypt_macros.h \ -src/headers/tomcrypt_custom.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cipher.h \ -src/headers/tomcrypt_pk.h src/headers/tomcrypt_hash.h src/headers/tomcrypt_math.h \ -src/headers/tomcrypt_misc.h src/headers/tomcrypt.h src/headers/tomcrypt_pkcs.h \ -src/headers/tomcrypt_prng.h testprof/tomcrypt_test.h - -#END_INS - -TESTOBJECTS=demos/test.o -HASHOBJECTS=demos/hashsum.o -CRYPTOBJECTS=demos/encrypt.o -SMALLOBJECTS=demos/small.o -TVS=demos/tv_gen.o -TESTS=demos/test.o -TIMINGS=demos/timing.o +install: $(call print-help,install,Installs the library + headers + pkg-config file) .common_install + sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION_PC),' libtomcrypt.pc.in > libtomcrypt.pc + install -p -d $(DESTDIR)$(LIBPATH)/pkgconfig + install -p -m 644 libtomcrypt.pc $(DESTDIR)$(LIBPATH)/pkgconfig/ -#The default rule for make builds the libtomcrypt library. -default:library - -#ciphers come in two flavours... enc+dec and enc -src/ciphers/aes/aes_enc.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c - $(CC) $(CFLAGS) -DENCRYPT_ONLY -c src/ciphers/aes/aes.c -o src/ciphers/aes/aes_enc.o - -#These are the rules to make certain object files. -src/ciphers/aes/aes.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c -src/ciphers/twofish/twofish.o: src/ciphers/twofish/twofish.c src/ciphers/twofish/twofish_tab.c -src/hashes/whirl/whirl.o: src/hashes/whirl/whirl.c src/hashes/whirl/whirltab.c -src/hashes/sha2/sha512.o: src/hashes/sha2/sha512.c src/hashes/sha2/sha384.c -src/hashes/sha2/sha256.o: src/hashes/sha2/sha256.c src/hashes/sha2/sha224.c - -#This rule makes the libtomcrypt library. -library: $(LIBNAME) +install_bins: $(call print-help,install_bins,Installs the useful demos ($(USEFUL_DEMOS))) .common_install_bins -testprof/$(LIBTEST): - cd testprof ; CFLAGS="$(CFLAGS)" GROUP=$(GROUP) USER=$(USER) VERSION=$(VERSION) LIBPATH=$(LIBPATH) LIBTEST=$(LIBTEST) LIBTEST_S=$(LIBTEST_S) make -f makefile.shared - -objs: $(OBJECTS) - -$(LIBNAME): $(OBJECTS) testprof/$(LIBTEST) - libtool --silent --mode=link gcc $(CFLAGS) `find . -type f | grep "[.]lo" | grep "src/" | xargs` $(EXTRALIBS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION) - -install: $(LIBNAME) - install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH) - cd testprof ; CFLAGS="$(CFLAGS)" GROUP=$(GROUP) USER=$(USER) VERSION=$(VERSION) LIBPATH=$(LIBPATH) LIBTEST=$(LIBTEST) LIBTEST_S=$(LIBTEST_S) DESTDIR=$(DESTDIR) make -f makefile.shared install - libtool --silent --mode=install install -c libtomcrypt.la $(DESTDIR)$(LIBPATH)/libtomcrypt.la - install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH) - install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH) +uninstall: $(call print-help,uninstall,Uninstalls the library + headers + pkg-config file) .common_uninstall + rm $(DESTDIR)$(LIBPATH)/pkgconfig/libtomcrypt.pc -#This rule makes the hash program included with libtomcrypt -hashsum: library - gcc $(CFLAGS) demos/hashsum.c -o hashsum.o - gcc -o hashsum hashsum.o -ltomcrypt $(EXTRALIBS) - -#makes the crypt program -crypt: library - gcc $(CFLAGS) demos/encrypt.c -o encrypt.o - gcc -o crypt encrypt.o -ltomcrypt $(EXTRALIBS) - -tv_gen: library $(TVS) - gcc -o tv_gen $(TVS) -ltomcrypt $(EXTRALIBS) - -test: library testprof/$(LIBTEST) $(TESTS) - gcc -o $(TEST) $(TESTS) -ltomcrypt_prof -ltomcrypt $(EXTRALIBS) - -timing: library testprof/$(LIBTEST) $(TIMINGS) - gcc -o $(TIMING) $(TIMINGS) -ltomcrypt_prof -ltomcrypt $(EXTRALIBS) - -# $Source: /cvs/libtom/libtomcrypt/makefile.shared,v $ -# $Revision: 1.80 $ -# $Date: 2007/02/16 16:36:25 $ +# ref: $Format:%D$ +# git commit: $Format:%H$ +# commit time: $Format:%ai$ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/makefile.unix --- a/libtomcrypt/makefile.unix Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/makefile.unix Fri Feb 09 21:44:05 2018 +0800 @@ -1,115 +1,149 @@ -# MAKEFILE for bsd make +# MAKEFILE that is intended to be compatible with any kind of make (GNU make, BSD make, ...) +# works on: Linux, *BSD, Cygwin, AIX, HP-UX and hopefully other UNIX systems # -# Tom St Denis - -# Compiler and Linker Names -CC=cc -LD=ld +# Please do not use here neither any special make syntax nor any unusual tools/utilities! +# +# BEWARE: variables OBJECTS, TOBJECTS, HEADERS, VERSION are updated via ./updatemakes.sh -# Archiver [makes .a files] -AR=ar -ARFLAGS=r - -# Compilation flags. Note the += does not write over the user's CFLAGS! -CFLAGS = -c -I./testprof/ -I./src/headers/ -DLTC_SOURCE -O2 ${CFLAGS_OPTS} -o $@ - -LIBNAME=libtomcrypt.a -LIBTEST=libtomcrypt_prof.a -LIBTEST_S=$(LIBTEST) +### USAGE: +# +# make -f makefile.unix all +# ./test +# make -f makefile.unix install +# +#Or: +# +# make -f makefile.unix CFLAGS="-O3 -DUSE_LTM -DLTM_DESC -I/path/to/libtommath" EXTRALIBS=/path/to/libtommath/libtommath.a all +# ./test +# make -f makefile.unix PREFIX=/opt/libtom install +# +#Or if you are using Intel C compiler you might need something like: +# +# make -f makefile.unix CC=icc AR=xiar CFLAGS="-fast -DUSE_LTM -DLTM_DESC -I/path/to/libtommath" EXTRALIBS=/path/to/libtommath/libtommath.a all +# -HASH=hashsum -CRYPT=encrypt -SMALL=small -PROF=x86_prof -TV=tv_gen -MULTI=multi -TIMING=timing -TEST=test +#The following can be overridden from command line e.g. "make -f makefile.unix CC=gcc ARFLAGS=rcs" +DESTDIR = +PREFIX = /usr/local +LIBPATH = $(PREFIX)/lib +INCPATH = $(PREFIX)/include +DATAPATH = $(PREFIX)/share/doc/libtomcrypt/pdf +BINPATH = $(PREFIX)/bin +CC = cc +AR = ar +ARFLAGS = r +RANLIB = ranlib +CFLAGS = -O2 -DUSE_LTM -DLTM_DESC -I../libtommath +EXTRALIBS = ../libtommath/libtommath.a -#LIBPATH-The directory for libtomcrypt to be installed to. -#INCPATH-The directory to install the header files for libtomcrypt. -#DATAPATH-The directory to install the pdf docs. -LIBPATH=/usr/local/lib -INCPATH=/usr/local/include -DATAPATH=/usr/local/share/doc/libtomcrypt/pdf +#Compilation flags +LTC_CFLAGS = -Isrc/headers -Itests -DLTC_SOURCE $(CFLAGS) +LTC_LDFLAGS = $(LDFLAGS) $(EXTRALIBS) +VERSION=1.18.1 -#Who do we install as? -USER=root - -GROUP=wheel +#Libraries to be created (this makefile builds only static libraries) +LIBMAIN_S =libtomcrypt.a -#List of objects to compile. -#START_INS -OBJECTS=src/ciphers/aes/aes_enc.o src/ciphers/aes/aes.o src/ciphers/anubis.o src/ciphers/blowfish.o \ -src/ciphers/cast5.o src/ciphers/des.o src/ciphers/kasumi.o src/ciphers/khazad.o src/ciphers/kseed.o \ -src/ciphers/multi2.o src/ciphers/noekeon.o src/ciphers/rc2.o src/ciphers/rc5.o src/ciphers/rc6.o \ -src/ciphers/safer/safer.o src/ciphers/safer/saferp.o src/ciphers/safer/safer_tab.o \ -src/ciphers/skipjack.o src/ciphers/twofish/twofish.o src/ciphers/xtea.o src/encauth/ccm/ccm_memory.o \ -src/encauth/ccm/ccm_test.o src/encauth/eax/eax_addheader.o src/encauth/eax/eax_decrypt.o \ -src/encauth/eax/eax_decrypt_verify_memory.o src/encauth/eax/eax_done.o \ -src/encauth/eax/eax_encrypt_authenticate_memory.o src/encauth/eax/eax_encrypt.o \ +#List of objects to compile (all goes to libtomcrypt.a) +OBJECTS=src/ciphers/aes/aes.o src/ciphers/aes/aes_enc.o src/ciphers/anubis.o src/ciphers/blowfish.o \ +src/ciphers/camellia.o src/ciphers/cast5.o src/ciphers/des.o src/ciphers/kasumi.o src/ciphers/khazad.o \ +src/ciphers/kseed.o src/ciphers/multi2.o src/ciphers/noekeon.o src/ciphers/rc2.o src/ciphers/rc5.o \ +src/ciphers/rc6.o src/ciphers/safer/safer.o src/ciphers/safer/saferp.o src/ciphers/skipjack.o \ +src/ciphers/twofish/twofish.o src/ciphers/xtea.o src/encauth/ccm/ccm_add_aad.o \ +src/encauth/ccm/ccm_add_nonce.o src/encauth/ccm/ccm_done.o src/encauth/ccm/ccm_init.o \ +src/encauth/ccm/ccm_memory.o src/encauth/ccm/ccm_process.o src/encauth/ccm/ccm_reset.o \ +src/encauth/ccm/ccm_test.o src/encauth/chachapoly/chacha20poly1305_add_aad.o \ +src/encauth/chachapoly/chacha20poly1305_decrypt.o src/encauth/chachapoly/chacha20poly1305_done.o \ +src/encauth/chachapoly/chacha20poly1305_encrypt.o src/encauth/chachapoly/chacha20poly1305_init.o \ +src/encauth/chachapoly/chacha20poly1305_memory.o src/encauth/chachapoly/chacha20poly1305_setiv.o \ +src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.o \ +src/encauth/chachapoly/chacha20poly1305_test.o src/encauth/eax/eax_addheader.o \ +src/encauth/eax/eax_decrypt.o src/encauth/eax/eax_decrypt_verify_memory.o src/encauth/eax/eax_done.o \ +src/encauth/eax/eax_encrypt.o src/encauth/eax/eax_encrypt_authenticate_memory.o \ src/encauth/eax/eax_init.o src/encauth/eax/eax_test.o src/encauth/gcm/gcm_add_aad.o \ src/encauth/gcm/gcm_add_iv.o src/encauth/gcm/gcm_done.o src/encauth/gcm/gcm_gf_mult.o \ src/encauth/gcm/gcm_init.o src/encauth/gcm/gcm_memory.o src/encauth/gcm/gcm_mult_h.o \ src/encauth/gcm/gcm_process.o src/encauth/gcm/gcm_reset.o src/encauth/gcm/gcm_test.o \ src/encauth/ocb/ocb_decrypt.o src/encauth/ocb/ocb_decrypt_verify_memory.o \ -src/encauth/ocb/ocb_done_decrypt.o src/encauth/ocb/ocb_done_encrypt.o \ -src/encauth/ocb/ocb_encrypt_authenticate_memory.o src/encauth/ocb/ocb_encrypt.o \ -src/encauth/ocb/ocb_init.o src/encauth/ocb/ocb_ntz.o src/encauth/ocb/ocb_shift_xor.o \ -src/encauth/ocb/ocb_test.o src/encauth/ocb/s_ocb_done.o src/hashes/chc/chc.o \ -src/hashes/helper/hash_file.o src/hashes/helper/hash_filehandle.o src/hashes/helper/hash_memory.o \ +src/encauth/ocb/ocb_done_decrypt.o src/encauth/ocb/ocb_done_encrypt.o src/encauth/ocb/ocb_encrypt.o \ +src/encauth/ocb/ocb_encrypt_authenticate_memory.o src/encauth/ocb/ocb_init.o src/encauth/ocb/ocb_ntz.o \ +src/encauth/ocb/ocb_shift_xor.o src/encauth/ocb/ocb_test.o src/encauth/ocb/s_ocb_done.o \ +src/encauth/ocb3/ocb3_add_aad.o src/encauth/ocb3/ocb3_decrypt.o src/encauth/ocb3/ocb3_decrypt_last.o \ +src/encauth/ocb3/ocb3_decrypt_verify_memory.o src/encauth/ocb3/ocb3_done.o \ +src/encauth/ocb3/ocb3_encrypt.o src/encauth/ocb3/ocb3_encrypt_authenticate_memory.o \ +src/encauth/ocb3/ocb3_encrypt_last.o src/encauth/ocb3/ocb3_init.o src/encauth/ocb3/ocb3_int_ntz.o \ +src/encauth/ocb3/ocb3_int_xor_blocks.o src/encauth/ocb3/ocb3_test.o src/hashes/blake2b.o \ +src/hashes/blake2s.o src/hashes/chc/chc.o src/hashes/helper/hash_file.o \ +src/hashes/helper/hash_filehandle.o src/hashes/helper/hash_memory.o \ src/hashes/helper/hash_memory_multi.o src/hashes/md2.o src/hashes/md4.o src/hashes/md5.o \ src/hashes/rmd128.o src/hashes/rmd160.o src/hashes/rmd256.o src/hashes/rmd320.o src/hashes/sha1.o \ -src/hashes/sha2/sha256.o src/hashes/sha2/sha512.o src/hashes/tiger.o src/hashes/whirl/whirl.o \ -src/mac/f9/f9_done.o src/mac/f9/f9_file.o src/mac/f9/f9_init.o src/mac/f9/f9_memory.o \ -src/mac/f9/f9_memory_multi.o src/mac/f9/f9_process.o src/mac/f9/f9_test.o src/mac/hmac/hmac_done.o \ -src/mac/hmac/hmac_file.o src/mac/hmac/hmac_init.o src/mac/hmac/hmac_memory.o \ -src/mac/hmac/hmac_memory_multi.o src/mac/hmac/hmac_process.o src/mac/hmac/hmac_test.o \ -src/mac/omac/omac_done.o src/mac/omac/omac_file.o src/mac/omac/omac_init.o src/mac/omac/omac_memory.o \ -src/mac/omac/omac_memory_multi.o src/mac/omac/omac_process.o src/mac/omac/omac_test.o \ -src/mac/pelican/pelican.o src/mac/pelican/pelican_memory.o src/mac/pelican/pelican_test.o \ -src/mac/pmac/pmac_done.o src/mac/pmac/pmac_file.o src/mac/pmac/pmac_init.o src/mac/pmac/pmac_memory.o \ +src/hashes/sha2/sha224.o src/hashes/sha2/sha256.o src/hashes/sha2/sha384.o src/hashes/sha2/sha512.o \ +src/hashes/sha2/sha512_224.o src/hashes/sha2/sha512_256.o src/hashes/sha3.o src/hashes/sha3_test.o \ +src/hashes/tiger.o src/hashes/whirl/whirl.o src/mac/blake2/blake2bmac.o \ +src/mac/blake2/blake2bmac_file.o src/mac/blake2/blake2bmac_memory.o \ +src/mac/blake2/blake2bmac_memory_multi.o src/mac/blake2/blake2bmac_test.o src/mac/blake2/blake2smac.o \ +src/mac/blake2/blake2smac_file.o src/mac/blake2/blake2smac_memory.o \ +src/mac/blake2/blake2smac_memory_multi.o src/mac/blake2/blake2smac_test.o src/mac/f9/f9_done.o \ +src/mac/f9/f9_file.o src/mac/f9/f9_init.o src/mac/f9/f9_memory.o src/mac/f9/f9_memory_multi.o \ +src/mac/f9/f9_process.o src/mac/f9/f9_test.o src/mac/hmac/hmac_done.o src/mac/hmac/hmac_file.o \ +src/mac/hmac/hmac_init.o src/mac/hmac/hmac_memory.o src/mac/hmac/hmac_memory_multi.o \ +src/mac/hmac/hmac_process.o src/mac/hmac/hmac_test.o src/mac/omac/omac_done.o src/mac/omac/omac_file.o \ +src/mac/omac/omac_init.o src/mac/omac/omac_memory.o src/mac/omac/omac_memory_multi.o \ +src/mac/omac/omac_process.o src/mac/omac/omac_test.o src/mac/pelican/pelican.o \ +src/mac/pelican/pelican_memory.o src/mac/pelican/pelican_test.o src/mac/pmac/pmac_done.o \ +src/mac/pmac/pmac_file.o src/mac/pmac/pmac_init.o src/mac/pmac/pmac_memory.o \ src/mac/pmac/pmac_memory_multi.o src/mac/pmac/pmac_ntz.o src/mac/pmac/pmac_process.o \ -src/mac/pmac/pmac_shift_xor.o src/mac/pmac/pmac_test.o src/mac/xcbc/xcbc_done.o \ +src/mac/pmac/pmac_shift_xor.o src/mac/pmac/pmac_test.o src/mac/poly1305/poly1305.o \ +src/mac/poly1305/poly1305_file.o src/mac/poly1305/poly1305_memory.o \ +src/mac/poly1305/poly1305_memory_multi.o src/mac/poly1305/poly1305_test.o src/mac/xcbc/xcbc_done.o \ src/mac/xcbc/xcbc_file.o src/mac/xcbc/xcbc_init.o src/mac/xcbc/xcbc_memory.o \ src/mac/xcbc/xcbc_memory_multi.o src/mac/xcbc/xcbc_process.o src/mac/xcbc/xcbc_test.o \ src/math/fp/ltc_ecc_fp_mulmod.o src/math/gmp_desc.o src/math/ltm_desc.o src/math/multi.o \ -src/math/rand_prime.o src/math/tfm_desc.o src/misc/base64/base64_decode.o \ -src/misc/base64/base64_encode.o src/misc/burn_stack.o src/misc/crypt/crypt_argchk.o \ -src/misc/crypt/crypt.o src/misc/crypt/crypt_cipher_descriptor.o src/misc/crypt/crypt_cipher_is_valid.o \ -src/misc/crypt/crypt_find_cipher_any.o src/misc/crypt/crypt_find_cipher.o \ -src/misc/crypt/crypt_find_cipher_id.o src/misc/crypt/crypt_find_hash_any.o \ -src/misc/crypt/crypt_find_hash.o src/misc/crypt/crypt_find_hash_id.o \ -src/misc/crypt/crypt_find_hash_oid.o src/misc/crypt/crypt_find_prng.o src/misc/crypt/crypt_fsa.o \ -src/misc/crypt/crypt_hash_descriptor.o src/misc/crypt/crypt_hash_is_valid.o \ +src/math/radix_to_bin.o src/math/rand_bn.o src/math/rand_prime.o src/math/tfm_desc.o src/misc/adler32.o \ +src/misc/base64/base64_decode.o src/misc/base64/base64_encode.o src/misc/burn_stack.o \ +src/misc/compare_testvector.o src/misc/crc32.o src/misc/crypt/crypt.o src/misc/crypt/crypt_argchk.o \ +src/misc/crypt/crypt_cipher_descriptor.o src/misc/crypt/crypt_cipher_is_valid.o \ +src/misc/crypt/crypt_constants.o src/misc/crypt/crypt_find_cipher.o \ +src/misc/crypt/crypt_find_cipher_any.o src/misc/crypt/crypt_find_cipher_id.o \ +src/misc/crypt/crypt_find_hash.o src/misc/crypt/crypt_find_hash_any.o \ +src/misc/crypt/crypt_find_hash_id.o src/misc/crypt/crypt_find_hash_oid.o \ +src/misc/crypt/crypt_find_prng.o src/misc/crypt/crypt_fsa.o src/misc/crypt/crypt_hash_descriptor.o \ +src/misc/crypt/crypt_hash_is_valid.o src/misc/crypt/crypt_inits.o \ src/misc/crypt/crypt_ltc_mp_descriptor.o src/misc/crypt/crypt_prng_descriptor.o \ -src/misc/crypt/crypt_prng_is_valid.o src/misc/crypt/crypt_register_cipher.o \ -src/misc/crypt/crypt_register_hash.o src/misc/crypt/crypt_register_prng.o \ +src/misc/crypt/crypt_prng_is_valid.o src/misc/crypt/crypt_prng_rng_descriptor.o \ +src/misc/crypt/crypt_register_all_ciphers.o src/misc/crypt/crypt_register_all_hashes.o \ +src/misc/crypt/crypt_register_all_prngs.o src/misc/crypt/crypt_register_cipher.o \ +src/misc/crypt/crypt_register_hash.o src/misc/crypt/crypt_register_prng.o src/misc/crypt/crypt_sizes.o \ src/misc/crypt/crypt_unregister_cipher.o src/misc/crypt/crypt_unregister_hash.o \ -src/misc/crypt/crypt_unregister_prng.o src/misc/error_to_string.o src/misc/pkcs5/pkcs_5_1.o \ -src/misc/pkcs5/pkcs_5_2.o src/misc/zeromem.o src/modes/cbc/cbc_decrypt.o src/modes/cbc/cbc_done.o \ -src/modes/cbc/cbc_encrypt.o src/modes/cbc/cbc_getiv.o src/modes/cbc/cbc_setiv.o \ -src/modes/cbc/cbc_start.o src/modes/cfb/cfb_decrypt.o src/modes/cfb/cfb_done.o \ -src/modes/cfb/cfb_encrypt.o src/modes/cfb/cfb_getiv.o src/modes/cfb/cfb_setiv.o \ -src/modes/cfb/cfb_start.o src/modes/ctr/ctr_decrypt.o src/modes/ctr/ctr_done.o \ -src/modes/ctr/ctr_encrypt.o src/modes/ctr/ctr_getiv.o src/modes/ctr/ctr_setiv.o \ -src/modes/ctr/ctr_start.o src/modes/ctr/ctr_test.o src/modes/ecb/ecb_decrypt.o src/modes/ecb/ecb_done.o \ -src/modes/ecb/ecb_encrypt.o src/modes/ecb/ecb_start.o src/modes/f8/f8_decrypt.o src/modes/f8/f8_done.o \ -src/modes/f8/f8_encrypt.o src/modes/f8/f8_getiv.o src/modes/f8/f8_setiv.o src/modes/f8/f8_start.o \ -src/modes/f8/f8_test_mode.o src/modes/lrw/lrw_decrypt.o src/modes/lrw/lrw_done.o \ -src/modes/lrw/lrw_encrypt.o src/modes/lrw/lrw_getiv.o src/modes/lrw/lrw_process.o \ -src/modes/lrw/lrw_setiv.o src/modes/lrw/lrw_start.o src/modes/lrw/lrw_test.o \ -src/modes/ofb/ofb_decrypt.o src/modes/ofb/ofb_done.o src/modes/ofb/ofb_encrypt.o \ -src/modes/ofb/ofb_getiv.o src/modes/ofb/ofb_setiv.o src/modes/ofb/ofb_start.o \ -src/modes/xts/xts_decrypt.o src/modes/xts/xts_done.o src/modes/xts/xts_encrypt.o \ -src/modes/xts/xts_init.o src/modes/xts/xts_mult_x.o src/modes/xts/xts_test.o \ -src/pk/asn1/der/bit/der_decode_bit_string.o src/pk/asn1/der/bit/der_encode_bit_string.o \ -src/pk/asn1/der/bit/der_length_bit_string.o src/pk/asn1/der/boolean/der_decode_boolean.o \ -src/pk/asn1/der/boolean/der_encode_boolean.o src/pk/asn1/der/boolean/der_length_boolean.o \ -src/pk/asn1/der/choice/der_decode_choice.o src/pk/asn1/der/ia5/der_decode_ia5_string.o \ -src/pk/asn1/der/ia5/der_encode_ia5_string.o src/pk/asn1/der/ia5/der_length_ia5_string.o \ -src/pk/asn1/der/integer/der_decode_integer.o src/pk/asn1/der/integer/der_encode_integer.o \ -src/pk/asn1/der/integer/der_length_integer.o \ +src/misc/crypt/crypt_unregister_prng.o src/misc/error_to_string.o src/misc/hkdf/hkdf.o \ +src/misc/hkdf/hkdf_test.o src/misc/mem_neq.o src/misc/pk_get_oid.o src/misc/pkcs5/pkcs_5_1.o \ +src/misc/pkcs5/pkcs_5_2.o src/misc/pkcs5/pkcs_5_test.o src/misc/zeromem.o src/modes/cbc/cbc_decrypt.o \ +src/modes/cbc/cbc_done.o src/modes/cbc/cbc_encrypt.o src/modes/cbc/cbc_getiv.o \ +src/modes/cbc/cbc_setiv.o src/modes/cbc/cbc_start.o src/modes/cfb/cfb_decrypt.o \ +src/modes/cfb/cfb_done.o src/modes/cfb/cfb_encrypt.o src/modes/cfb/cfb_getiv.o \ +src/modes/cfb/cfb_setiv.o src/modes/cfb/cfb_start.o src/modes/ctr/ctr_decrypt.o \ +src/modes/ctr/ctr_done.o src/modes/ctr/ctr_encrypt.o src/modes/ctr/ctr_getiv.o \ +src/modes/ctr/ctr_setiv.o src/modes/ctr/ctr_start.o src/modes/ctr/ctr_test.o \ +src/modes/ecb/ecb_decrypt.o src/modes/ecb/ecb_done.o src/modes/ecb/ecb_encrypt.o \ +src/modes/ecb/ecb_start.o src/modes/f8/f8_decrypt.o src/modes/f8/f8_done.o src/modes/f8/f8_encrypt.o \ +src/modes/f8/f8_getiv.o src/modes/f8/f8_setiv.o src/modes/f8/f8_start.o src/modes/f8/f8_test_mode.o \ +src/modes/lrw/lrw_decrypt.o src/modes/lrw/lrw_done.o src/modes/lrw/lrw_encrypt.o \ +src/modes/lrw/lrw_getiv.o src/modes/lrw/lrw_process.o src/modes/lrw/lrw_setiv.o \ +src/modes/lrw/lrw_start.o src/modes/lrw/lrw_test.o src/modes/ofb/ofb_decrypt.o src/modes/ofb/ofb_done.o \ +src/modes/ofb/ofb_encrypt.o src/modes/ofb/ofb_getiv.o src/modes/ofb/ofb_setiv.o \ +src/modes/ofb/ofb_start.o src/modes/xts/xts_decrypt.o src/modes/xts/xts_done.o \ +src/modes/xts/xts_encrypt.o src/modes/xts/xts_init.o src/modes/xts/xts_mult_x.o \ +src/modes/xts/xts_test.o src/pk/asn1/der/bit/der_decode_bit_string.o \ +src/pk/asn1/der/bit/der_decode_raw_bit_string.o src/pk/asn1/der/bit/der_encode_bit_string.o \ +src/pk/asn1/der/bit/der_encode_raw_bit_string.o src/pk/asn1/der/bit/der_length_bit_string.o \ +src/pk/asn1/der/boolean/der_decode_boolean.o src/pk/asn1/der/boolean/der_encode_boolean.o \ +src/pk/asn1/der/boolean/der_length_boolean.o src/pk/asn1/der/choice/der_decode_choice.o \ +src/pk/asn1/der/generalizedtime/der_decode_generalizedtime.o \ +src/pk/asn1/der/generalizedtime/der_encode_generalizedtime.o \ +src/pk/asn1/der/generalizedtime/der_length_generalizedtime.o \ +src/pk/asn1/der/ia5/der_decode_ia5_string.o src/pk/asn1/der/ia5/der_encode_ia5_string.o \ +src/pk/asn1/der/ia5/der_length_ia5_string.o src/pk/asn1/der/integer/der_decode_integer.o \ +src/pk/asn1/der/integer/der_encode_integer.o src/pk/asn1/der/integer/der_length_integer.o \ src/pk/asn1/der/object_identifier/der_decode_object_identifier.o \ src/pk/asn1/der/object_identifier/der_encode_object_identifier.o \ src/pk/asn1/der/object_identifier/der_length_object_identifier.o \ @@ -121,22 +155,32 @@ src/pk/asn1/der/sequence/der_decode_sequence_ex.o \ src/pk/asn1/der/sequence/der_decode_sequence_flexi.o \ src/pk/asn1/der/sequence/der_decode_sequence_multi.o \ +src/pk/asn1/der/sequence/der_decode_subject_public_key_info.o \ src/pk/asn1/der/sequence/der_encode_sequence_ex.o \ -src/pk/asn1/der/sequence/der_encode_sequence_multi.o src/pk/asn1/der/sequence/der_length_sequence.o \ -src/pk/asn1/der/sequence/der_sequence_free.o src/pk/asn1/der/set/der_encode_set.o \ +src/pk/asn1/der/sequence/der_encode_sequence_multi.o \ +src/pk/asn1/der/sequence/der_encode_subject_public_key_info.o \ +src/pk/asn1/der/sequence/der_length_sequence.o src/pk/asn1/der/sequence/der_sequence_free.o \ +src/pk/asn1/der/sequence/der_sequence_shrink.o src/pk/asn1/der/set/der_encode_set.o \ src/pk/asn1/der/set/der_encode_setof.o src/pk/asn1/der/short_integer/der_decode_short_integer.o \ src/pk/asn1/der/short_integer/der_encode_short_integer.o \ -src/pk/asn1/der/short_integer/der_length_short_integer.o src/pk/asn1/der/utctime/der_decode_utctime.o \ -src/pk/asn1/der/utctime/der_encode_utctime.o src/pk/asn1/der/utctime/der_length_utctime.o \ -src/pk/asn1/der/utf8/der_decode_utf8_string.o src/pk/asn1/der/utf8/der_encode_utf8_string.o \ -src/pk/asn1/der/utf8/der_length_utf8_string.o src/pk/dsa/dsa_decrypt_key.o \ -src/pk/dsa/dsa_encrypt_key.o src/pk/dsa/dsa_export.o src/pk/dsa/dsa_free.o src/pk/dsa/dsa_import.o \ -src/pk/dsa/dsa_make_key.o src/pk/dsa/dsa_shared_secret.o src/pk/dsa/dsa_sign_hash.o \ -src/pk/dsa/dsa_verify_hash.o src/pk/dsa/dsa_verify_key.o src/pk/ecc/ecc_ansi_x963_export.o \ -src/pk/ecc/ecc_ansi_x963_import.o src/pk/ecc/ecc.o src/pk/ecc/ecc_decrypt_key.o \ -src/pk/ecc/ecc_encrypt_key.o src/pk/ecc/ecc_export.o src/pk/ecc/ecc_free.o src/pk/ecc/ecc_get_size.o \ -src/pk/ecc/ecc_import.o src/pk/ecc/ecc_make_key.o src/pk/ecc/ecc_shared_secret.o \ -src/pk/ecc/ecc_sign_hash.o src/pk/ecc/ecc_sizes.o src/pk/ecc/ecc_test.o src/pk/ecc/ecc_verify_hash.o \ +src/pk/asn1/der/short_integer/der_length_short_integer.o \ +src/pk/asn1/der/teletex_string/der_decode_teletex_string.o \ +src/pk/asn1/der/teletex_string/der_length_teletex_string.o \ +src/pk/asn1/der/utctime/der_decode_utctime.o src/pk/asn1/der/utctime/der_encode_utctime.o \ +src/pk/asn1/der/utctime/der_length_utctime.o src/pk/asn1/der/utf8/der_decode_utf8_string.o \ +src/pk/asn1/der/utf8/der_encode_utf8_string.o src/pk/asn1/der/utf8/der_length_utf8_string.o \ +src/pk/dh/dh.o src/pk/dh/dh_check_pubkey.o src/pk/dh/dh_export.o src/pk/dh/dh_export_key.o \ +src/pk/dh/dh_free.o src/pk/dh/dh_generate_key.o src/pk/dh/dh_import.o src/pk/dh/dh_set.o \ +src/pk/dh/dh_set_pg_dhparam.o src/pk/dh/dh_shared_secret.o src/pk/dsa/dsa_decrypt_key.o \ +src/pk/dsa/dsa_encrypt_key.o src/pk/dsa/dsa_export.o src/pk/dsa/dsa_free.o \ +src/pk/dsa/dsa_generate_key.o src/pk/dsa/dsa_generate_pqg.o src/pk/dsa/dsa_import.o \ +src/pk/dsa/dsa_make_key.o src/pk/dsa/dsa_set.o src/pk/dsa/dsa_set_pqg_dsaparam.o \ +src/pk/dsa/dsa_shared_secret.o src/pk/dsa/dsa_sign_hash.o src/pk/dsa/dsa_verify_hash.o \ +src/pk/dsa/dsa_verify_key.o src/pk/ecc/ecc.o src/pk/ecc/ecc_ansi_x963_export.o \ +src/pk/ecc/ecc_ansi_x963_import.o src/pk/ecc/ecc_decrypt_key.o src/pk/ecc/ecc_encrypt_key.o \ +src/pk/ecc/ecc_export.o src/pk/ecc/ecc_free.o src/pk/ecc/ecc_get_size.o src/pk/ecc/ecc_import.o \ +src/pk/ecc/ecc_make_key.o src/pk/ecc/ecc_shared_secret.o src/pk/ecc/ecc_sign_hash.o \ +src/pk/ecc/ecc_sizes.o src/pk/ecc/ecc_test.o src/pk/ecc/ecc_verify_hash.o \ src/pk/ecc/ltc_ecc_is_valid_idx.o src/pk/ecc/ltc_ecc_map.o src/pk/ecc/ltc_ecc_mul2add.o \ src/pk/ecc/ltc_ecc_mulmod.o src/pk/ecc/ltc_ecc_mulmod_timing.o src/pk/ecc/ltc_ecc_points.o \ src/pk/ecc/ltc_ecc_projective_add_point.o src/pk/ecc/ltc_ecc_projective_dbl_point.o \ @@ -146,97 +190,105 @@ src/pk/pkcs1/pkcs_1_oaep_decode.o src/pk/pkcs1/pkcs_1_oaep_encode.o src/pk/pkcs1/pkcs_1_os2ip.o \ src/pk/pkcs1/pkcs_1_pss_decode.o src/pk/pkcs1/pkcs_1_pss_encode.o src/pk/pkcs1/pkcs_1_v1_5_decode.o \ src/pk/pkcs1/pkcs_1_v1_5_encode.o src/pk/rsa/rsa_decrypt_key.o src/pk/rsa/rsa_encrypt_key.o \ -src/pk/rsa/rsa_export.o src/pk/rsa/rsa_exptmod.o src/pk/rsa/rsa_free.o src/pk/rsa/rsa_import.o \ -src/pk/rsa/rsa_make_key.o src/pk/rsa/rsa_sign_hash.o src/pk/rsa/rsa_verify_hash.o src/prngs/fortuna.o \ +src/pk/rsa/rsa_export.o src/pk/rsa/rsa_exptmod.o src/pk/rsa/rsa_free.o src/pk/rsa/rsa_get_size.o \ +src/pk/rsa/rsa_import.o src/pk/rsa/rsa_import_pkcs8.o src/pk/rsa/rsa_import_x509.o \ +src/pk/rsa/rsa_make_key.o src/pk/rsa/rsa_set.o src/pk/rsa/rsa_sign_hash.o \ +src/pk/rsa/rsa_sign_saltlen_get.o src/pk/rsa/rsa_verify_hash.o src/prngs/chacha20.o src/prngs/fortuna.o \ src/prngs/rc4.o src/prngs/rng_get_bytes.o src/prngs/rng_make_prng.o src/prngs/sober128.o \ -src/prngs/sprng.o src/prngs/yarrow.o - -HEADERS=src/headers/tomcrypt_cfg.h src/headers/tomcrypt_mac.h src/headers/tomcrypt_macros.h \ -src/headers/tomcrypt_custom.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cipher.h \ -src/headers/tomcrypt_pk.h src/headers/tomcrypt_hash.h src/headers/tomcrypt_math.h \ -src/headers/tomcrypt_misc.h src/headers/tomcrypt.h src/headers/tomcrypt_pkcs.h \ -src/headers/tomcrypt_prng.h testprof/tomcrypt_test.h - -#END_INS +src/prngs/sprng.o src/prngs/yarrow.o src/stream/chacha/chacha_crypt.o src/stream/chacha/chacha_done.o \ +src/stream/chacha/chacha_ivctr32.o src/stream/chacha/chacha_ivctr64.o \ +src/stream/chacha/chacha_keystream.o src/stream/chacha/chacha_setup.o src/stream/chacha/chacha_test.o \ +src/stream/rc4/rc4_stream.o src/stream/rc4/rc4_test.o src/stream/sober128/sober128_stream.o \ +src/stream/sober128/sober128_test.o -TESTOBJECTS=demos/test.o -HASHOBJECTS=demos/hashsum.o -CRYPTOBJECTS=demos/encrypt.o -SMALLOBJECTS=demos/small.o -TVS=demos/tv_gen.o -MULTIS=demos/multi.o -TIMINGS=demos/timing.o -TESTS=demos/test.o - -#Files left over from making the crypt.pdf. -LEFTOVERS=*.dvi *.log *.aux *.toc *.idx *.ilg *.ind *.out +#List of test objects to compile (all goes to libtomcrypt_prof.a) +TOBJECTS=tests/base64_test.o tests/cipher_hash_test.o tests/common.o tests/der_test.o tests/dh_test.o \ +tests/dsa_test.o tests/ecc_test.o tests/file_test.o tests/katja_test.o tests/mac_test.o tests/misc_test.o \ +tests/modes_test.o tests/mpi_test.o tests/multi_test.o tests/no_prng.o tests/pkcs_1_eme_test.o \ +tests/pkcs_1_emsa_test.o tests/pkcs_1_oaep_test.o tests/pkcs_1_pss_test.o tests/pkcs_1_test.o \ +tests/prng_test.o tests/rotate_test.o tests/rsa_test.o tests/store_test.o tests/test.o -#Compressed filenames -COMPRESSED=crypt-$(VERSION).tar.bz2 crypt-$(VERSION).zip - -#The default rule for make builds the libtomcrypt library. -default:library +#The following headers will be installed by "make install" +HEADERS=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \ +src/headers/tomcrypt_cipher.h src/headers/tomcrypt_custom.h src/headers/tomcrypt_hash.h \ +src/headers/tomcrypt_mac.h src/headers/tomcrypt_macros.h src/headers/tomcrypt_math.h \ +src/headers/tomcrypt_misc.h src/headers/tomcrypt_pk.h src/headers/tomcrypt_pkcs.h \ +src/headers/tomcrypt_prng.h -#ciphers come in two flavours... enc+dec and enc +#The default rule for make builds the libtomcrypt.a library (static) +default: $(LIBMAIN_S) + +#SPECIAL: AES comes in two flavours - enc+dec and enc-only src/ciphers/aes/aes_enc.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c - $(CC) $(CFLAGS) -DENCRYPT_ONLY -c src/ciphers/aes/aes.c -o src/ciphers/aes/aes_enc.o + $(CC) $(LTC_CFLAGS) -DENCRYPT_ONLY -c src/ciphers/aes/aes.c -o src/ciphers/aes/aes_enc.o -#These are the rules to make certain object files. +#SPECIAL: these are the rules to make certain object files src/ciphers/aes/aes.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c src/ciphers/twofish/twofish.o: src/ciphers/twofish/twofish.c src/ciphers/twofish/twofish_tab.c src/hashes/whirl/whirl.o: src/hashes/whirl/whirl.c src/hashes/whirl/whirltab.c src/hashes/sha2/sha512.o: src/hashes/sha2/sha512.c src/hashes/sha2/sha384.c +src/hashes/sha2/sha512_224.o: src/hashes/sha2/sha512.c src/hashes/sha2/sha512_224.c +src/hashes/sha2/sha512_256.o: src/hashes/sha2/sha512.c src/hashes/sha2/sha512_256.c src/hashes/sha2/sha256.o: src/hashes/sha2/sha256.c src/hashes/sha2/sha224.c -#This rule makes the libtomcrypt library. -library: $(LIBNAME) +#Dependencies on *.h +$(OBJECTS): $(HEADERS) +$(TOBJECTS): $(HEADERS) tests/tomcrypt_test.h -testprof/$(LIBTEST): - cd testprof ; CFLAGS="$(CFLAGS)" LIBTEST_S=$(LIBTEST_S) $(MAKE) +#This is necessary for compatibility with BSD make (namely on OpenBSD) +.SUFFIXES: .o .c +.c.o: + $(CC) $(LTC_CFLAGS) -c $< -o $@ -$(LIBNAME): $(OBJECTS) +#Create libtomcrypt.a +$(LIBMAIN_S): $(OBJECTS) $(AR) $(ARFLAGS) $@ $(OBJECTS) $(RANLIB) $@ -#This rule makes the hash program included with libtomcrypt -hashsum: library $(HASHOBJECTS) - $(CC) $(HASHOBJECTS) $(LIBNAME) $(EXTRALIBS) -o $(HASH) $(WARN) - -#makes the crypt program -crypt: library $(CRYPTOBJECTS) - $(CC) $(CRYPTOBJECTS) $(LIBNAME) $(EXTRALIBS) -o $(CRYPT) $(WARN) +#Demo tools/utilities +hashsum: demos/hashsum.o $(LIBMAIN_S) + $(CC) demos/hashsum.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@ +ltcrypt: demos/ltcrypt.o $(LIBMAIN_S) + $(CC) demos/ltcrypt.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@ +small: demos/small.o $(LIBMAIN_S) + $(CC) demos/small.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@ +tv_gen: demos/tv_gen.o $(LIBMAIN_S) + $(CC) demos/tv_gen.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@ +sizes: demos/sizes.o $(LIBMAIN_S) + $(CC) demos/sizes.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@ +constants: demos/constants.o $(LIBMAIN_S) + $(CC) demos/constants.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@ +timing: demos/timing.o $(LIBMAIN_S) + $(CC) demos/timing.o $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@ -#makes the small program -small: library $(SMALLOBJECTS) - $(CC) $(SMALLOBJECTS) $(LIBNAME) $(EXTRALIBS) -o $(SMALL) $(WARN) - -tv_gen: library $(TVS) - $(CC) $(LDFLAGS) $(TVS) $(LIBNAME) $(EXTRALIBS) -o $(TV) +#Tests +test: $(TOBJECTS) $(LIBMAIN_S) + $(CC) $(TOBJECTS) $(LIBMAIN_S) $(LTC_LDFLAGS) -o $@ + @echo "NOTICE: start the tests by: ./test" -multi: library $(MULTIS) - $(CC) $(MULTIS) $(LIBNAME) $(EXTRALIBS) -o $(MULTI) - -timing: library testprof/$(LIBTEST) $(TIMINGS) - $(CC) $(LDFLAGS) $(TIMINGS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TIMING) +all: $(LIBMAIN_S) hashsum ltcrypt small tv_gen sizes constants timing test -test: library testprof/$(LIBTEST) $(TESTS) - $(CC) $(LDFLAGS) $(TESTS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TEST) +#NOTE: this makefile works also on cygwin, thus we need to delete *.exe +clean: + -@rm -f $(OBJECTS) $(TOBJECTS) + -@rm -f $(LIBMAIN_S) + -@rm -f demos/*.o *_tv.txt + -@rm -f test constants sizes tv_gen hashsum ltcrypt small timing + -@rm -f test.exe constants.exe sizes.exe tv_gen.exe hashsum.exe ltcrypt.exe small.exe timing.exe -#This rule installs the library and the header files. This must be run -#as root in order to have a high enough permission to write to the correct -#directories and to set the owner and group to root. -install: library - install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH) - install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH) - install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(DATAPATH) - install -g $(GROUP) -o $(USER) $(LIBNAME) $(DESTDIR)$(LIBPATH) - install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH) +#Install the library + headers +install: $(LIBMAIN_S) $(HEADERS) + @mkdir -p $(DESTDIR)$(INCPATH) $(DESTDIR)$(LIBPATH)/pkgconfig + @cp $(LIBMAIN_S) $(DESTDIR)$(LIBPATH)/ + @cp $(HEADERS) $(DESTDIR)$(INCPATH)/ + @sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION),' libtomcrypt.pc.in > $(DESTDIR)$(LIBPATH)/pkgconfig/libtomcrypt.pc -install_test: testprof/$(LIBTEST) - install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH) - install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH) - install -g $(GROUP) -o $(USER) testprof/$(LIBTEST) $(DESTDIR)$(LIBPATH) +#Install useful tools +install_bins: hashsum + @mkdir -p $(DESTDIR)$(BINPATH) + @cp hashsum $(DESTDIR)$(BINPATH)/ -# $Source: /cvs/libtom/libtomcrypt/makefile.unix,v $ -# $Revision: 1.7 $ -# $Date: 2007/02/16 16:36:25 $ +#Install documentation +install_docs: doc/crypt.pdf + @mkdir -p $(DESTDIR)$(DATAPATH) + @cp doc/crypt.pdf $(DESTDIR)$(DATAPATH)/ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/makefile_include.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/makefile_include.mk Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,471 @@ +# +# Include makefile used by makefile + makefile.shared +# (GNU make only) + +# The version - BEWARE: VERSION, VERSION_PC and VERSION_LT are updated via ./updatemakes.sh +VERSION=1.18.1 +VERSION_PC=1.18.1 +# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html +VERSION_LT=1:1 + +# Compiler and Linker Names +ifndef CROSS_COMPILE + CROSS_COMPILE:= +endif + +ifeq ($(CC),cc) + CC := $(CROSS_COMPILE)gcc +endif +LD:=$(CROSS_COMPILE)ld +AR:=$(CROSS_COMPILE)ar + +# Archiver [makes .a files] +#AR=ar +ARFLAGS:=r + +ifndef MAKE + MAKE:=make +endif + +ifndef INSTALL_CMD +$(error your makefile must define INSTALL_CMD) +endif +ifndef UNINSTALL_CMD +$(error your makefile must define UNINSTALL_CMD) +endif + +ifndef EXTRALIBS +ifneq ($(shell echo $(CFLAGS) | grep USE_LTM),) +EXTRALIBS=$(shell PKG_CONFIG_PATH=$(LIBPATH)/pkgconfig pkg-config libtommath --libs) +else +ifneq ($(shell echo $(CFLAGS) | grep USE_TFM),) +EXTRALIBS=$(shell PKG_CONFIG_PATH=$(LIBPATH)/pkgconfig pkg-config tomsfastmath --libs) +endif +endif +endif + +need-help := $(filter help,$(MAKECMDGOALS)) +define print-help +$(if $(need-help),$(info $1 -- $2)) +endef + +# +# Compilation flags. Note the += does not write over the user's CFLAGS! +# +# Also note that we're extending the environments' CFLAGS. +# If you think that our CFLAGS are not nice you can easily override them +# by giving them as a parameter to make: +# make CFLAGS="-I./src/headers/ -DLTC_SOURCE ..." ... +# +LTC_CFLAGS += -I./src/headers/ -Wall -Wsign-compare -Wshadow -DLTC_SOURCE + +ifdef OLD_GCC +LTC_CFLAGS += -W +# older GCCs can't handle the "rotate with immediate" ROLc/RORc/etc macros +# define this to help +LTC_CFLAGS += -DLTC_NO_ROLC +else +LTC_CFLAGS += -Wextra +# additional warnings +LTC_CFLAGS += -Wsystem-headers -Wbad-function-cast -Wcast-align +LTC_CFLAGS += -Wstrict-prototypes -Wpointer-arith +LTC_CFLAGS += -Wdeclaration-after-statement +LTC_CFLAGS += -Wwrite-strings +endif + +LTC_CFLAGS += -Wno-type-limits + +ifdef LTC_DEBUG +$(info Debug build) +# compile for DEBUGGING (required for ccmalloc checking!!!) +LTC_CFLAGS += -g3 -DLTC_NO_ASM +ifneq (,$(strip $(LTC_DEBUG))) +LTC_CFLAGS += -DLTC_TEST_DBG=$(LTC_DEBUG) +else +LTC_CFLAGS += -DLTC_TEST_DBG +endif +else + +ifdef LTC_SMALL +# optimize for SIZE +LTC_CFLAGS += -Os -DLTC_SMALL_CODE +else + +ifndef IGNORE_SPEED +# optimize for SPEED +LTC_CFLAGS += -O3 -funroll-loops + +# add -fomit-frame-pointer. hinders debugging! +LTC_CFLAGS += -fomit-frame-pointer +endif + +endif # COMPILE_SMALL +endif # COMPILE_DEBUG + + +ifneq ($(findstring clang,$(CC)),) +LTC_CFLAGS += -Wno-typedef-redefinition -Wno-tautological-compare -Wno-builtin-requires-header -Wno-missing-field-initializers +endif +ifneq ($(findstring mingw,$(CC)),) +LTC_CFLAGS += -Wno-shadow -Wno-attributes +endif +ifeq ($(PLATFORM), Darwin) +LTC_CFLAGS += -Wno-nullability-completeness +endif + + +GIT_VERSION := $(shell { [ -e .git ] && which git 2>/dev/null 1>&2 ; } && { printf git- ; git describe --tags --always --dirty ; } || echo $(VERSION)) +ifneq ($(GIT_VERSION),) +LTC_CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" +endif + +LTC_CFLAGS := $(LTC_CFLAGS) $(CFLAGS) + +ifneq ($(findstring -DLTC_PTHREAD,$(LTC_CFLAGS)),) +LTC_LDFLAGS += -pthread +endif + +LTC_LDFLAGS := $(LTC_LDFLAGS) $(LDFLAGS) + +#List of demo objects +DSOURCES = $(wildcard demos/*.c) +DOBJECTS = $(DSOURCES:.c=.o) + +#List of tests headers +THEADERS = $(wildcard tests/*.h) + +TEST=test + +# Demos that are even somehow useful and could be installed as a system-tool +USEFUL_DEMOS = hashsum + +# Demos that are usable but only rarely make sense to be installed +USEABLE_DEMOS = ltcrypt sizes constants + +# Demos that are used for testing or measuring +TEST_DEMOS = small tv_gen + +# Demos that are in one config broken +# openssl-enc - can't be build with LTC_EASY +# timing - not really broken, but older gcc builds spit warnings +BROKEN_DEMOS = openssl-enc timing + +# Combine demos in groups +UNBROKEN_DEMOS = $(TEST_DEMOS) $(USEABLE_DEMOS) $(USEFUL_DEMOS) +DEMOS = $(UNBROKEN_DEMOS) $(BROKEN_DEMOS) + +#LIBPATH The directory for libtomcrypt to be installed to. +#INCPATH The directory to install the header files for libtomcrypt. +#DATAPATH The directory to install the pdf docs. +#BINPATH The directory to install the binaries provided. +DESTDIR ?= +PREFIX ?= /usr/local +LIBPATH ?= $(PREFIX)/lib +INCPATH ?= $(PREFIX)/include +DATAPATH ?= $(PREFIX)/share/doc/libtomcrypt/pdf +BINPATH ?= $(PREFIX)/bin + +#Who do we install as? +ifdef INSTALL_USER +USER=$(INSTALL_USER) +else +USER=root +endif + +ifdef INSTALL_GROUP +GROUP=$(INSTALL_GROUP) +else +GROUP=wheel +endif + + +#The first rule is also the default rule and builds the libtomcrypt library. +library: $(call print-help,library,Builds the library) $(LIBNAME) + + +# List of objects to compile (all goes to libtomcrypt.a) +OBJECTS=src/ciphers/aes/aes.o src/ciphers/aes/aes_enc.o src/ciphers/anubis.o src/ciphers/blowfish.o \ +src/ciphers/camellia.o src/ciphers/cast5.o src/ciphers/des.o src/ciphers/kasumi.o src/ciphers/khazad.o \ +src/ciphers/kseed.o src/ciphers/multi2.o src/ciphers/noekeon.o src/ciphers/rc2.o src/ciphers/rc5.o \ +src/ciphers/rc6.o src/ciphers/safer/safer.o src/ciphers/safer/saferp.o src/ciphers/skipjack.o \ +src/ciphers/twofish/twofish.o src/ciphers/xtea.o src/encauth/ccm/ccm_add_aad.o \ +src/encauth/ccm/ccm_add_nonce.o src/encauth/ccm/ccm_done.o src/encauth/ccm/ccm_init.o \ +src/encauth/ccm/ccm_memory.o src/encauth/ccm/ccm_process.o src/encauth/ccm/ccm_reset.o \ +src/encauth/ccm/ccm_test.o src/encauth/chachapoly/chacha20poly1305_add_aad.o \ +src/encauth/chachapoly/chacha20poly1305_decrypt.o src/encauth/chachapoly/chacha20poly1305_done.o \ +src/encauth/chachapoly/chacha20poly1305_encrypt.o src/encauth/chachapoly/chacha20poly1305_init.o \ +src/encauth/chachapoly/chacha20poly1305_memory.o src/encauth/chachapoly/chacha20poly1305_setiv.o \ +src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.o \ +src/encauth/chachapoly/chacha20poly1305_test.o src/encauth/eax/eax_addheader.o \ +src/encauth/eax/eax_decrypt.o src/encauth/eax/eax_decrypt_verify_memory.o src/encauth/eax/eax_done.o \ +src/encauth/eax/eax_encrypt.o src/encauth/eax/eax_encrypt_authenticate_memory.o \ +src/encauth/eax/eax_init.o src/encauth/eax/eax_test.o src/encauth/gcm/gcm_add_aad.o \ +src/encauth/gcm/gcm_add_iv.o src/encauth/gcm/gcm_done.o src/encauth/gcm/gcm_gf_mult.o \ +src/encauth/gcm/gcm_init.o src/encauth/gcm/gcm_memory.o src/encauth/gcm/gcm_mult_h.o \ +src/encauth/gcm/gcm_process.o src/encauth/gcm/gcm_reset.o src/encauth/gcm/gcm_test.o \ +src/encauth/ocb/ocb_decrypt.o src/encauth/ocb/ocb_decrypt_verify_memory.o \ +src/encauth/ocb/ocb_done_decrypt.o src/encauth/ocb/ocb_done_encrypt.o src/encauth/ocb/ocb_encrypt.o \ +src/encauth/ocb/ocb_encrypt_authenticate_memory.o src/encauth/ocb/ocb_init.o src/encauth/ocb/ocb_ntz.o \ +src/encauth/ocb/ocb_shift_xor.o src/encauth/ocb/ocb_test.o src/encauth/ocb/s_ocb_done.o \ +src/encauth/ocb3/ocb3_add_aad.o src/encauth/ocb3/ocb3_decrypt.o src/encauth/ocb3/ocb3_decrypt_last.o \ +src/encauth/ocb3/ocb3_decrypt_verify_memory.o src/encauth/ocb3/ocb3_done.o \ +src/encauth/ocb3/ocb3_encrypt.o src/encauth/ocb3/ocb3_encrypt_authenticate_memory.o \ +src/encauth/ocb3/ocb3_encrypt_last.o src/encauth/ocb3/ocb3_init.o src/encauth/ocb3/ocb3_int_ntz.o \ +src/encauth/ocb3/ocb3_int_xor_blocks.o src/encauth/ocb3/ocb3_test.o src/hashes/blake2b.o \ +src/hashes/blake2s.o src/hashes/chc/chc.o src/hashes/helper/hash_file.o \ +src/hashes/helper/hash_filehandle.o src/hashes/helper/hash_memory.o \ +src/hashes/helper/hash_memory_multi.o src/hashes/md2.o src/hashes/md4.o src/hashes/md5.o \ +src/hashes/rmd128.o src/hashes/rmd160.o src/hashes/rmd256.o src/hashes/rmd320.o src/hashes/sha1.o \ +src/hashes/sha2/sha224.o src/hashes/sha2/sha256.o src/hashes/sha2/sha384.o src/hashes/sha2/sha512.o \ +src/hashes/sha2/sha512_224.o src/hashes/sha2/sha512_256.o src/hashes/sha3.o src/hashes/sha3_test.o \ +src/hashes/tiger.o src/hashes/whirl/whirl.o src/mac/blake2/blake2bmac.o \ +src/mac/blake2/blake2bmac_file.o src/mac/blake2/blake2bmac_memory.o \ +src/mac/blake2/blake2bmac_memory_multi.o src/mac/blake2/blake2bmac_test.o src/mac/blake2/blake2smac.o \ +src/mac/blake2/blake2smac_file.o src/mac/blake2/blake2smac_memory.o \ +src/mac/blake2/blake2smac_memory_multi.o src/mac/blake2/blake2smac_test.o src/mac/f9/f9_done.o \ +src/mac/f9/f9_file.o src/mac/f9/f9_init.o src/mac/f9/f9_memory.o src/mac/f9/f9_memory_multi.o \ +src/mac/f9/f9_process.o src/mac/f9/f9_test.o src/mac/hmac/hmac_done.o src/mac/hmac/hmac_file.o \ +src/mac/hmac/hmac_init.o src/mac/hmac/hmac_memory.o src/mac/hmac/hmac_memory_multi.o \ +src/mac/hmac/hmac_process.o src/mac/hmac/hmac_test.o src/mac/omac/omac_done.o src/mac/omac/omac_file.o \ +src/mac/omac/omac_init.o src/mac/omac/omac_memory.o src/mac/omac/omac_memory_multi.o \ +src/mac/omac/omac_process.o src/mac/omac/omac_test.o src/mac/pelican/pelican.o \ +src/mac/pelican/pelican_memory.o src/mac/pelican/pelican_test.o src/mac/pmac/pmac_done.o \ +src/mac/pmac/pmac_file.o src/mac/pmac/pmac_init.o src/mac/pmac/pmac_memory.o \ +src/mac/pmac/pmac_memory_multi.o src/mac/pmac/pmac_ntz.o src/mac/pmac/pmac_process.o \ +src/mac/pmac/pmac_shift_xor.o src/mac/pmac/pmac_test.o src/mac/poly1305/poly1305.o \ +src/mac/poly1305/poly1305_file.o src/mac/poly1305/poly1305_memory.o \ +src/mac/poly1305/poly1305_memory_multi.o src/mac/poly1305/poly1305_test.o src/mac/xcbc/xcbc_done.o \ +src/mac/xcbc/xcbc_file.o src/mac/xcbc/xcbc_init.o src/mac/xcbc/xcbc_memory.o \ +src/mac/xcbc/xcbc_memory_multi.o src/mac/xcbc/xcbc_process.o src/mac/xcbc/xcbc_test.o \ +src/math/fp/ltc_ecc_fp_mulmod.o src/math/gmp_desc.o src/math/ltm_desc.o src/math/multi.o \ +src/math/radix_to_bin.o src/math/rand_bn.o src/math/rand_prime.o src/math/tfm_desc.o src/misc/adler32.o \ +src/misc/base64/base64_decode.o src/misc/base64/base64_encode.o src/misc/burn_stack.o \ +src/misc/compare_testvector.o src/misc/crc32.o src/misc/crypt/crypt.o src/misc/crypt/crypt_argchk.o \ +src/misc/crypt/crypt_cipher_descriptor.o src/misc/crypt/crypt_cipher_is_valid.o \ +src/misc/crypt/crypt_constants.o src/misc/crypt/crypt_find_cipher.o \ +src/misc/crypt/crypt_find_cipher_any.o src/misc/crypt/crypt_find_cipher_id.o \ +src/misc/crypt/crypt_find_hash.o src/misc/crypt/crypt_find_hash_any.o \ +src/misc/crypt/crypt_find_hash_id.o src/misc/crypt/crypt_find_hash_oid.o \ +src/misc/crypt/crypt_find_prng.o src/misc/crypt/crypt_fsa.o src/misc/crypt/crypt_hash_descriptor.o \ +src/misc/crypt/crypt_hash_is_valid.o src/misc/crypt/crypt_inits.o \ +src/misc/crypt/crypt_ltc_mp_descriptor.o src/misc/crypt/crypt_prng_descriptor.o \ +src/misc/crypt/crypt_prng_is_valid.o src/misc/crypt/crypt_prng_rng_descriptor.o \ +src/misc/crypt/crypt_register_all_ciphers.o src/misc/crypt/crypt_register_all_hashes.o \ +src/misc/crypt/crypt_register_all_prngs.o src/misc/crypt/crypt_register_cipher.o \ +src/misc/crypt/crypt_register_hash.o src/misc/crypt/crypt_register_prng.o src/misc/crypt/crypt_sizes.o \ +src/misc/crypt/crypt_unregister_cipher.o src/misc/crypt/crypt_unregister_hash.o \ +src/misc/crypt/crypt_unregister_prng.o src/misc/error_to_string.o src/misc/hkdf/hkdf.o \ +src/misc/hkdf/hkdf_test.o src/misc/mem_neq.o src/misc/pk_get_oid.o src/misc/pkcs5/pkcs_5_1.o \ +src/misc/pkcs5/pkcs_5_2.o src/misc/pkcs5/pkcs_5_test.o src/misc/zeromem.o src/modes/cbc/cbc_decrypt.o \ +src/modes/cbc/cbc_done.o src/modes/cbc/cbc_encrypt.o src/modes/cbc/cbc_getiv.o \ +src/modes/cbc/cbc_setiv.o src/modes/cbc/cbc_start.o src/modes/cfb/cfb_decrypt.o \ +src/modes/cfb/cfb_done.o src/modes/cfb/cfb_encrypt.o src/modes/cfb/cfb_getiv.o \ +src/modes/cfb/cfb_setiv.o src/modes/cfb/cfb_start.o src/modes/ctr/ctr_decrypt.o \ +src/modes/ctr/ctr_done.o src/modes/ctr/ctr_encrypt.o src/modes/ctr/ctr_getiv.o \ +src/modes/ctr/ctr_setiv.o src/modes/ctr/ctr_start.o src/modes/ctr/ctr_test.o \ +src/modes/ecb/ecb_decrypt.o src/modes/ecb/ecb_done.o src/modes/ecb/ecb_encrypt.o \ +src/modes/ecb/ecb_start.o src/modes/f8/f8_decrypt.o src/modes/f8/f8_done.o src/modes/f8/f8_encrypt.o \ +src/modes/f8/f8_getiv.o src/modes/f8/f8_setiv.o src/modes/f8/f8_start.o src/modes/f8/f8_test_mode.o \ +src/modes/lrw/lrw_decrypt.o src/modes/lrw/lrw_done.o src/modes/lrw/lrw_encrypt.o \ +src/modes/lrw/lrw_getiv.o src/modes/lrw/lrw_process.o src/modes/lrw/lrw_setiv.o \ +src/modes/lrw/lrw_start.o src/modes/lrw/lrw_test.o src/modes/ofb/ofb_decrypt.o src/modes/ofb/ofb_done.o \ +src/modes/ofb/ofb_encrypt.o src/modes/ofb/ofb_getiv.o src/modes/ofb/ofb_setiv.o \ +src/modes/ofb/ofb_start.o src/modes/xts/xts_decrypt.o src/modes/xts/xts_done.o \ +src/modes/xts/xts_encrypt.o src/modes/xts/xts_init.o src/modes/xts/xts_mult_x.o \ +src/modes/xts/xts_test.o src/pk/asn1/der/bit/der_decode_bit_string.o \ +src/pk/asn1/der/bit/der_decode_raw_bit_string.o src/pk/asn1/der/bit/der_encode_bit_string.o \ +src/pk/asn1/der/bit/der_encode_raw_bit_string.o src/pk/asn1/der/bit/der_length_bit_string.o \ +src/pk/asn1/der/boolean/der_decode_boolean.o src/pk/asn1/der/boolean/der_encode_boolean.o \ +src/pk/asn1/der/boolean/der_length_boolean.o src/pk/asn1/der/choice/der_decode_choice.o \ +src/pk/asn1/der/generalizedtime/der_decode_generalizedtime.o \ +src/pk/asn1/der/generalizedtime/der_encode_generalizedtime.o \ +src/pk/asn1/der/generalizedtime/der_length_generalizedtime.o \ +src/pk/asn1/der/ia5/der_decode_ia5_string.o src/pk/asn1/der/ia5/der_encode_ia5_string.o \ +src/pk/asn1/der/ia5/der_length_ia5_string.o src/pk/asn1/der/integer/der_decode_integer.o \ +src/pk/asn1/der/integer/der_encode_integer.o src/pk/asn1/der/integer/der_length_integer.o \ +src/pk/asn1/der/object_identifier/der_decode_object_identifier.o \ +src/pk/asn1/der/object_identifier/der_encode_object_identifier.o \ +src/pk/asn1/der/object_identifier/der_length_object_identifier.o \ +src/pk/asn1/der/octet/der_decode_octet_string.o src/pk/asn1/der/octet/der_encode_octet_string.o \ +src/pk/asn1/der/octet/der_length_octet_string.o \ +src/pk/asn1/der/printable_string/der_decode_printable_string.o \ +src/pk/asn1/der/printable_string/der_encode_printable_string.o \ +src/pk/asn1/der/printable_string/der_length_printable_string.o \ +src/pk/asn1/der/sequence/der_decode_sequence_ex.o \ +src/pk/asn1/der/sequence/der_decode_sequence_flexi.o \ +src/pk/asn1/der/sequence/der_decode_sequence_multi.o \ +src/pk/asn1/der/sequence/der_decode_subject_public_key_info.o \ +src/pk/asn1/der/sequence/der_encode_sequence_ex.o \ +src/pk/asn1/der/sequence/der_encode_sequence_multi.o \ +src/pk/asn1/der/sequence/der_encode_subject_public_key_info.o \ +src/pk/asn1/der/sequence/der_length_sequence.o src/pk/asn1/der/sequence/der_sequence_free.o \ +src/pk/asn1/der/sequence/der_sequence_shrink.o src/pk/asn1/der/set/der_encode_set.o \ +src/pk/asn1/der/set/der_encode_setof.o src/pk/asn1/der/short_integer/der_decode_short_integer.o \ +src/pk/asn1/der/short_integer/der_encode_short_integer.o \ +src/pk/asn1/der/short_integer/der_length_short_integer.o \ +src/pk/asn1/der/teletex_string/der_decode_teletex_string.o \ +src/pk/asn1/der/teletex_string/der_length_teletex_string.o \ +src/pk/asn1/der/utctime/der_decode_utctime.o src/pk/asn1/der/utctime/der_encode_utctime.o \ +src/pk/asn1/der/utctime/der_length_utctime.o src/pk/asn1/der/utf8/der_decode_utf8_string.o \ +src/pk/asn1/der/utf8/der_encode_utf8_string.o src/pk/asn1/der/utf8/der_length_utf8_string.o \ +src/pk/dh/dh.o src/pk/dh/dh_check_pubkey.o src/pk/dh/dh_export.o src/pk/dh/dh_export_key.o \ +src/pk/dh/dh_free.o src/pk/dh/dh_generate_key.o src/pk/dh/dh_import.o src/pk/dh/dh_set.o \ +src/pk/dh/dh_set_pg_dhparam.o src/pk/dh/dh_shared_secret.o src/pk/dsa/dsa_decrypt_key.o \ +src/pk/dsa/dsa_encrypt_key.o src/pk/dsa/dsa_export.o src/pk/dsa/dsa_free.o \ +src/pk/dsa/dsa_generate_key.o src/pk/dsa/dsa_generate_pqg.o src/pk/dsa/dsa_import.o \ +src/pk/dsa/dsa_make_key.o src/pk/dsa/dsa_set.o src/pk/dsa/dsa_set_pqg_dsaparam.o \ +src/pk/dsa/dsa_shared_secret.o src/pk/dsa/dsa_sign_hash.o src/pk/dsa/dsa_verify_hash.o \ +src/pk/dsa/dsa_verify_key.o src/pk/ecc/ecc.o src/pk/ecc/ecc_ansi_x963_export.o \ +src/pk/ecc/ecc_ansi_x963_import.o src/pk/ecc/ecc_decrypt_key.o src/pk/ecc/ecc_encrypt_key.o \ +src/pk/ecc/ecc_export.o src/pk/ecc/ecc_free.o src/pk/ecc/ecc_get_size.o src/pk/ecc/ecc_import.o \ +src/pk/ecc/ecc_make_key.o src/pk/ecc/ecc_shared_secret.o src/pk/ecc/ecc_sign_hash.o \ +src/pk/ecc/ecc_sizes.o src/pk/ecc/ecc_test.o src/pk/ecc/ecc_verify_hash.o \ +src/pk/ecc/ltc_ecc_is_valid_idx.o src/pk/ecc/ltc_ecc_map.o src/pk/ecc/ltc_ecc_mul2add.o \ +src/pk/ecc/ltc_ecc_mulmod.o src/pk/ecc/ltc_ecc_mulmod_timing.o src/pk/ecc/ltc_ecc_points.o \ +src/pk/ecc/ltc_ecc_projective_add_point.o src/pk/ecc/ltc_ecc_projective_dbl_point.o \ +src/pk/katja/katja_decrypt_key.o src/pk/katja/katja_encrypt_key.o src/pk/katja/katja_export.o \ +src/pk/katja/katja_exptmod.o src/pk/katja/katja_free.o src/pk/katja/katja_import.o \ +src/pk/katja/katja_make_key.o src/pk/pkcs1/pkcs_1_i2osp.o src/pk/pkcs1/pkcs_1_mgf1.o \ +src/pk/pkcs1/pkcs_1_oaep_decode.o src/pk/pkcs1/pkcs_1_oaep_encode.o src/pk/pkcs1/pkcs_1_os2ip.o \ +src/pk/pkcs1/pkcs_1_pss_decode.o src/pk/pkcs1/pkcs_1_pss_encode.o src/pk/pkcs1/pkcs_1_v1_5_decode.o \ +src/pk/pkcs1/pkcs_1_v1_5_encode.o src/pk/rsa/rsa_decrypt_key.o src/pk/rsa/rsa_encrypt_key.o \ +src/pk/rsa/rsa_export.o src/pk/rsa/rsa_exptmod.o src/pk/rsa/rsa_free.o src/pk/rsa/rsa_get_size.o \ +src/pk/rsa/rsa_import.o src/pk/rsa/rsa_import_pkcs8.o src/pk/rsa/rsa_import_x509.o \ +src/pk/rsa/rsa_make_key.o src/pk/rsa/rsa_set.o src/pk/rsa/rsa_sign_hash.o \ +src/pk/rsa/rsa_sign_saltlen_get.o src/pk/rsa/rsa_verify_hash.o src/prngs/chacha20.o src/prngs/fortuna.o \ +src/prngs/rc4.o src/prngs/rng_get_bytes.o src/prngs/rng_make_prng.o src/prngs/sober128.o \ +src/prngs/sprng.o src/prngs/yarrow.o src/stream/chacha/chacha_crypt.o src/stream/chacha/chacha_done.o \ +src/stream/chacha/chacha_ivctr32.o src/stream/chacha/chacha_ivctr64.o \ +src/stream/chacha/chacha_keystream.o src/stream/chacha/chacha_setup.o src/stream/chacha/chacha_test.o \ +src/stream/rc4/rc4_stream.o src/stream/rc4/rc4_test.o src/stream/sober128/sober128_stream.o \ +src/stream/sober128/sober128_test.o + +# List of test objects to compile (all goes to libtomcrypt_prof.a) +TOBJECTS=tests/base64_test.o tests/cipher_hash_test.o tests/common.o tests/der_test.o tests/dh_test.o \ +tests/dsa_test.o tests/ecc_test.o tests/file_test.o tests/katja_test.o tests/mac_test.o tests/misc_test.o \ +tests/modes_test.o tests/mpi_test.o tests/multi_test.o tests/no_prng.o tests/pkcs_1_eme_test.o \ +tests/pkcs_1_emsa_test.o tests/pkcs_1_oaep_test.o tests/pkcs_1_pss_test.o tests/pkcs_1_test.o \ +tests/prng_test.o tests/rotate_test.o tests/rsa_test.o tests/store_test.o tests/test.o + +# The following headers will be installed by "make install" +HEADERS=src/headers/tomcrypt.h src/headers/tomcrypt_argchk.h src/headers/tomcrypt_cfg.h \ +src/headers/tomcrypt_cipher.h src/headers/tomcrypt_custom.h src/headers/tomcrypt_hash.h \ +src/headers/tomcrypt_mac.h src/headers/tomcrypt_macros.h src/headers/tomcrypt_math.h \ +src/headers/tomcrypt_misc.h src/headers/tomcrypt_pk.h src/headers/tomcrypt_pkcs.h \ +src/headers/tomcrypt_prng.h + +#These are the rules to make certain object files. +src/ciphers/aes/aes.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c +src/ciphers/twofish/twofish.o: src/ciphers/twofish/twofish.c src/ciphers/twofish/twofish_tab.c +src/hashes/whirl/whirl.o: src/hashes/whirl/whirl.c src/hashes/whirl/whirltab.c +src/hashes/sha2/sha512.o: src/hashes/sha2/sha512.c src/hashes/sha2/sha384.c +src/hashes/sha2/sha512_224.o: src/hashes/sha2/sha512.c src/hashes/sha2/sha512_224.c +src/hashes/sha2/sha512_256.o: src/hashes/sha2/sha512.c src/hashes/sha2/sha512_256.c +src/hashes/sha2/sha256.o: src/hashes/sha2/sha256.c src/hashes/sha2/sha224.c + +$(DOBJECTS): LTC_CFLAGS := -Itests $(LTC_CFLAGS) +$(TOBJECTS): LTC_CFLAGS := -Itests $(LTC_CFLAGS) + +#Dependencies on *.h +$(OBJECTS): $(HEADERS) +$(DOBJECTS): $(HEADERS) $(THEADERS) +$(TOBJECTS): $(HEADERS) $(THEADERS) + +all: $(call print-help,all,Builds the library and all demos and test utils (test $(UNBROKEN_DEMOS) $(BROKEN_DEMOS))) all_test $(BROKEN_DEMOS) + +all_test: $(call print-help,all_test,Builds the library and all unbroken demos and test utils (test $(UNBROKEN_DEMOS))) test $(UNBROKEN_DEMOS) + +bins: $(call print-help,bins,Builds the library and all useful demos) $(USEFUL_DEMOS) + +#build the doxy files (requires Doxygen, tetex and patience) +doxygen: $(call print-help,doxygen,Builds the doxygen html documentation) + $(MAKE) -C doc/ $@ V=$(V) +doxy: $(call print-help,doxy,Builds the complete doxygen documentation including refman.pdf (takes long to generate)) + $(MAKE) -C doc/ $@ V=$(V) +docs: $(call print-help,docs,Builds the Developer Manual) + $(MAKE) -C doc/ $@ V=$(V) + +doc/crypt.pdf: $(call print-help,doc/crypt.pdf,Builds the Developer Manual) + $(MAKE) -C doc/ crypt.pdf V=$(V) + + +install_all: $(call print-help,install_all,Install everything - library bins docs tests) install install_bins install_docs install_test + +INSTALL_OPTS ?= -m 644 + +.common_install: $(LIBNAME) + install -p -d $(DESTDIR)$(INCPATH) + install -p -d $(DESTDIR)$(LIBPATH) + $(INSTALL_CMD) -p $(INSTALL_OPTS) $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME) + install -p -m 644 $(HEADERS) $(DESTDIR)$(INCPATH) + +$(DESTDIR)$(BINPATH): + install -p -d $(DESTDIR)$(BINPATH) + +.common_install_bins: $(USEFUL_DEMOS) $(DESTDIR)$(BINPATH) + $(INSTALL_CMD) -p -m 775 $(USEFUL_DEMOS) $(DESTDIR)$(BINPATH) + +install_docs: $(call print-help,install_docs,Installs the Developer Manual) doc/crypt.pdf + install -p -d $(DESTDIR)$(DATAPATH) + install -p -m 644 doc/crypt.pdf $(DESTDIR)$(DATAPATH) + +install_test: $(call print-help,install_test,Installs the self-test binary) test $(DESTDIR)$(BINPATH) + $(INSTALL_CMD) -p -m 775 $< $(DESTDIR)$(BINPATH) + +install_hooks: $(call print-help,install_hooks,Installs the git hooks) + for s in `ls hooks/`; do ln -s ../../hooks/$$s .git/hooks/$$s; done + +HEADER_FILES=$(notdir $(HEADERS)) +.common_uninstall: + $(UNINSTALL_CMD) $(DESTDIR)$(LIBPATH)/$(LIBNAME) + rm $(HEADER_FILES:%=$(DESTDIR)$(INCPATH)/%) + +#This rule cleans the source tree of all compiled code, not including the pdf +#documentation. +clean: $(call print-help,clean,Clean everything besides the pdf documentation) + find . -type f -name "*.o" \ + -o -name "*.lo" \ + -o -name "*.a" \ + -o -name "*.la" \ + -o -name "*.obj" \ + -o -name "*.lib" \ + -o -name "*.exe" \ + -o -name "*.dll" \ + -o -name "*.so" \ + -o -name "*.gcov"\ + -o -name "*.gcda"\ + -o -name "*.gcno"\ + -o -name "*.il" \ + -o -name "*.dyn" \ + -o -name "*.dpi" | xargs rm -f + rm -f $(TIMING) $(TEST) $(DEMOS) + rm -f *_tv.txt + rm -f *.pc + rm -rf `find . -type d -name "*.libs" | xargs` + $(MAKE) -C doc/ clean + +zipup: $(call print-help,zipup,Prepare the archives for a release) doc/crypt.pdf + @# Update the index, so diff-index won't fail in case the pdf has been created. + @# As the pdf creation modifies crypt.tex, git sometimes detects the + @# modified file, but misses that it's put back to its original version. + @git update-index --refresh + @git diff-index --quiet HEAD -- || ( echo "FAILURE: uncommited changes or not a git" && exit 1 ) + @perl helper.pl --check-all || ( echo "FAILURE: helper.pl --check-all errors" && exit 1 ) + rm -rf libtomcrypt-$(VERSION) crypt-$(VERSION).* + @# files/dirs excluded from "git archive" are defined in .gitattributes + git archive --format=tar --prefix=libtomcrypt-$(VERSION)/ HEAD | tar x + @echo 'fixme check' + -@(find libtomcrypt-$(VERSION)/ -type f | xargs grep 'FIXM[E]') && echo '############## BEWARE: the "fixme" marker was found !!! ##############' || true + mkdir -p libtomcrypt-$(VERSION)/doc + cp doc/crypt.pdf libtomcrypt-$(VERSION)/doc/crypt.pdf + tar -c libtomcrypt-$(VERSION)/ | xz -6e -c - > crypt-$(VERSION).tar.xz + zip -9rq crypt-$(VERSION).zip libtomcrypt-$(VERSION) + rm -rf libtomcrypt-$(VERSION) + gpg -b -a crypt-$(VERSION).tar.xz + gpg -b -a crypt-$(VERSION).zip + +codecheck: $(call print-help,codecheck,Check the code of the library) + perl helper.pl -a + perlcritic *.pl + +help: $(call print-help,help,That's what you're currently looking at) diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/ccm_tv.txt --- a/libtomcrypt/notes/ccm_tv.txt Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/notes/ccm_tv.txt Fri Feb 09 21:44:05 2018 +0800 @@ -143,39 +143,39 @@ 32: 839A9BFA1D3CA37924BC6648DED2291FC61736A3638906D9C5DA28A66AA684AC, CD07B83C8E0C3E6FB4115A149BDF6FDA CCM-noekeon (16 byte key) - 0: , FF73C6775C61DB36D9B5EEC812091FF7 - 1: 5F, 7D2AEA62A5202E3C4FBE05F33EBE4CC5 - 2: 0EA5, 312ED15FDDAB6EEEAC6AF9BE9CE698FA - 3: 968F95, FA1AD58B85B93B5A4B5096C881F773C3 - 4: 9A8F4069, 8911063ADDF79E27D9DCEFF3F440E6D7 - 5: A5C0376E27, 9553F44B0BA8039527F8E05CD70AD8B0 - 6: 5B097736F3DA, 405B7EC685FC94903B36AC8E700558B8 - 7: 616810AE303B2C, 64C95A2DF5263F7BE6D1F9F3CF88EADE - 8: C8D69A2E1170532C, 073A7E426266237FD73D8109F55AE5D3 - 9: 3E42CDB7DA4A72F2E0, 48675EA4302CA6BFE5992DE96CE43BB3 - 10: 88532CC1F3E321F66D64, 528B3516C6D9A4B5390DD32C2A2E6C19 - 11: 9216A8FC9A961E7F602F7D, B03047186B783844F5B6757057576B38 - 12: 89B0858D4FDE6795EDE19CCC, F4530A2DCA823307AEDE5AF34E5C4191 - 13: A676E20BB0A5E84FD0B9149BF7, 11B823B315DA93B0E15780851526D4BD - 14: 903AD5C108C43A80436FE2117EF0, EB1C79C7DF20CE2967A99783EA8D6EF8 - 15: 81774C36F46F67159B7FFC24C080D7, 2E9E4812D9A92977EC34922782B6420D - 16: 63FD1C3F692D64B2DA3982FCD474A5D4, 04171AE84857713A9BABBD4564875D33 - 17: B1BF6AD99F83C9173C6C021ACA74C5431C, 38D17D4F6AA3C24B8F3B465EAACE0A1E - 18: 0948D1ED59F07DE44A96A76E05B0B6F7C309, 1848D886FCFF35E85B0DC3CBE5BEE7FA - 19: 3458E5911222F9C555A1054C7D9748876DA39A, 584AFAE72FB6065A74BE016CF39D2E86 - 20: 641F3867185D0605E9D666AB605187E75A1299EF, 6F9332E6FB5EA0CE811E3345593CD163 - 21: 0676622D07733EF31A765AAB1E713FCE329277FB16, 88547474050FFC986930CC04BA8A03F0 - 22: 79861EC2FD2BCC5C12B69F30A1575FC66AC1405281BB, FC68EEAC8F39ED69D312AEABF8000084 - 23: CB2731835A576F7F8F2C2786D786FB6186E2F85D89DA3B, 3ED9E95BC51CF6368E6EF63667B35BD8 - 24: 3CB1C02FADB6DD5483BC5D3C03D944102CFCEDF82B913402, 1C3F60C989A6FBF41A7AF4F29115C334 - 25: E69FAEA5E3D0B76EF9E70F99C5918D934D0E9836F248DB9EEE, 7F1916B2CF7C9A5E3F5581D365ADBD31 - 26: 36779AD755A9DF2DC3C5824DC2F7DD4FFE038628A4E1A1C33AE7, 2BDED3703468D267F8AB7EC0AF8F1E65 - 27: E9D325646A41EE5AA7DABCDE98DE83440A7DC02714BA0AEE017E22, 972F4D7832F3371C60DCD04A6DEDEA15 - 28: 0FAAE3F6028A28A80BBFE71FA7AA9042E538B41A0D514D6EB4EE6029, F7B3925495E260249ACC6E1CBE956BC5 - 29: A9CC39EFFEE354C0E0579256AA85CBAA7B10E670DD3828A7A05DA0F49D, 28D9D20187AFE70AD9DD16759F0EFEB5 - 30: 032F4BBB4EBF2E65758C541FDAFF2107DDBED399739849F8EBB41AF9711F, A3436981ED637CE5EEE01B380C46ACAD - 31: 7B321ED831CE96A603668E3E74BBC7453749A03D04A1B38E95966E6CC488F0, 88D1DADF2C1EE0BA579D0A8A90C1E62A - 32: D862B0BD0E2178AE05AEFB14F34C791547C5956F1F3B5BD525926578DE383A94, BF32CFE059F27222DC55D3E7CE7C5F10 + 0: , AB924F56DFA05F4E8628C14111272E5C + 1: 08, 8A76DCADA7CE53A0F4577E67B0B958D7 + 2: B602, E0BEAC0B1E95C4570A823295E7517C25 + 3: 50E4B1, F874F8B5F2806F64AE0AED151821C638 + 4: 990F28F6, 9AE2D6D5576D1C4722E2E3C11F5D98FF + 5: 297104DD8D, 7A245E5F5E0F4C3466E16D5EF2B96D80 + 6: 7B6E9776EF05, 6B540166DE5E154D7A3A34EEA3FAD5F3 + 7: 67EB1922FAB0E1, 549F39F7C3CB17F0EA6EA9C75899BD55 + 8: 343E752F0F956C7F, 19CBB59CC4117DE6EB9924AB0CE2C9B9 + 9: 98A25FBBD87D8C1829, 6E3D4F0ED0C5B9161EB11AE9600003F6 + 10: AAA54C273F69638CFB54, 1192FCD1F9F543889F3607CD6B623AA6 + 11: 51B3F33EF8B1F38438618B, 8A704F5B003A21E4033ABFCC6C53577A + 12: C7E5167D81B23F47AE90DFC8, E218F7DD222CE31642CB06C329911CD9 + 13: B065DFE10B9C32F1B028AACE4F, 5EC4DE45C29C78D1CDDF2A6AC05BD53F + 14: B5AAF0ADCA03812F251C8A2BE745, AA353E20F65237279643D4CCC06150A8 + 15: 88AF734661B83CBA42FF983C260B63, 8F20A5190A218B8D392ABA1295CBF905 + 16: 6663AE30F79A110747D6678784330BF6, 142196DDD26668E08D196BCE0989AE01 + 17: 8153816C6E9C449B0439AD7892DF8C0492, 58B376CF240C37A08337C7794736838D + 18: 1611C22134C06CF8F43625017CCC65B6E305, C0443028C8DC5FB78F9350C4A8D1D32D + 19: FD2EEDDF2B20F7623D854FF4E987DB4196AB2E, 8B2CD7C72438F3EB071A33A7C65610B3 + 20: 641256A9C543D0860E609F1AABC36EAB515E29C1, 0E1A0FE82BB18BFBB3D13BEB84BA185D + 21: 437719619E96C3AD2080470809F7CDDEC3011EB6E9, E31934C5F0C2E4A04A4ED533A98C795C + 22: CF2B11E8660CC6E650EDDB2146B11F864E01B4C99DDD, 8647759347E7A4FD2CE8AC17AF4186C9 + 23: F339314695B539B715A7E5FB4799029CC133CEE26A2E86, 136274C51D9797986E92F9E540A80EB1 + 24: 38F843B9DA155D57166D310D85406E72FB382604C2EA4CE3, D1D7C6397599ACC2EB5CF1E06975B423 + 25: 29E497528D72C2BEBB12663F71B3981705BEF60A5451FAE4F4, 50F6C796CC00FE590E5E975206045702 + 26: F16F583E1FEBC78F5AB0FA61B5BC389D3C16B62ECA7C6A86BC98, B3643EA448ECA0511312895B63193516 + 27: 80347C7148FE1A5B078A27B3821DDFD93341F0351F4323EFEA6632, 8AF133E83EB316E615F1BC9DF241E23F + 28: 96939F79855C211B23E45771DDA2C3AB81C2672F94B87A7FFE46FC84, 4E7DEF91D1A102667BF55922B2531E6A + 29: 4789028961FDB78E8821A1FD9AF93BDB3CAC5C75566613E148B4439E90, 470DC4389C466AE79051A62F8122A1BD + 30: 7D2030ACE87827B785D3EFA3AE5CCB3DBF3A06DE4BED2D4FAB31DBE90F58, 55437514620E6B499C4FC01445FD2828 + 31: 276940205F5B869E40BBB064BB0DEF9D86D520DFCFE531A77A55AA78DE8709, F291F6A4D7EFF52E5EE47CC3ED7902B3 + 32: A75FCDC9F4E38C02E70D885353F5E3E7E13A14237D75EFA0D53B0C808EAF10AE, CABDB90052202C4EC777936B6097320F CCM-anubis (16 byte key) 0: , C85F41475E06F25682F855C3D45A6523 @@ -212,3 +212,73 @@ 31: B8176469E6A0D5797ED6421A871FEECDE48ACF011E394981C43AC917E8FFD5, E9B01383DB1A32E6126BD802A6C6F47E 32: AB6A0AA29B687D05735167D78DB697BA2478BD14ECD059AE9D1239E7F2AB48FD, A560A30FD87CF28BA66F5B2638567E4B +CCM-seed (16 byte key) + 0: , 960414F81DF9F363AE6234067B946EA6 + 1: 15, 17746EC09B06AF1DE24710D2506629CD + 2: 892C, 828705A8CF1E51688EC4F1FFAC4C151A + 3: E411A7, 1AF2DD611D05DAF48118D1E7D810C173 + 4: B9DC8276, 4D335DF8B860AF121904310F5C004212 + 5: 8182C84A25, B713177663D498218908178B3EA3C65E + 6: 5933E7872324, 52413BB22BABEC9E43F1A98B78B4496E + 7: A243E381075DEA, 8FF3D2D465748AAF2373D1D8F8EDCFC3 + 8: 57A4E46B9B5C1795, B26653992639D54D5CEBAC7473CD3285 + 9: 4D05D6669D9A0C3079, 6B26FA6D5271D74D444985466D2CF0AA + 10: 1D35BB653A9F48C3314B, 494E108B0780280DF7CB4BE24CACB5CB + 11: 9A227951B4565021D29DD4, 3E21A07540744E26424996B0670CB07A + 12: 3E893574DD3D82CCD83E87E0, 017D51F744FE95E375D0456FA8BB0EC9 + 13: 5DF04297D842B3CEFCF93F5B95, 49CCE7A12C85648BD2A07944623C81AC + 14: 27F7D25EDE3471AAE1B91BBAEAD0, A6F1DD19DF08160D982184A414247B8B + 15: 6F8583E5B88B15F89070FB7A49383F, 4C98CC3884A2BD20AC6FA5184FB72670 + 16: 5D8D511AE705860B1A55E2FDAE9581D9, 96EF02C285AFD27D2B26BCAC02EC56A0 + 17: C4508E9E03DFE7C3B89192589CFD171A16, A2A4DC81E900BC5C404389BBD0B4710D + 18: 3163AE0E74B3DE3779745A82B783D882F092, A89574F7D1C2B90241A702A2C6A2AD86 + 19: 2D9C64EF9D8C2E195AF05BAE747A7BF8EC6C30, 07EEB7667A539164862E472366FFAD68 + 20: 03D145C9133E9108BB7A61D17880B155A56A58E6, 4F8EBC9A3F3C74EEA02099BB5AE6D456 + 21: 41C20EF2D199B6C0FAD9DA02DA0296D37B23059C3A, 062AE92091F7A8CF74A8E9DAFC58BEDE + 22: 402912121F84EDB82F101195A68EF214F0A8F4DA6DC0, B35C944A4E5BA8AB60A4415B5BDF6E30 + 23: 4D3F14438904F8F4F911CE729B26415F4EF819F80D2254, 2304E0373E136010B9BC6E061660D881 + 24: A855C170C1E2D326D74996939C48A85EDEED2E06F97BE61A, E66F188735CDBD27F6354C260A4796BA + 25: F882B023A3B25B878073DF739A234256E4174238A30A5B5062, 3C8BEBFA98ABF880891AF2539D3A0FCF + 26: C66F850279CD23D5243CF15E6084A17C124DDDE840DFD9532954, 003202A7E393626BFF93D48207E7DE39 + 27: BAC89C099A8AF633EFAFA496198DC9398DB3AAB47A8D24E2FE7D62, 32583F94ADE55278F2533ABE934CD535 + 28: B9EB02F63EFB72455CFFA2799A5BFA9E0BFDE240379AA98B4D0532C8, 5D01FD2F100C003EA284A2AF55EE5934 + 29: BAD5BB6B8DF316401B12B2BF36329F1D977E1FD943F594A6F4ED696194, 3D91CE3618998F3E060038D4DCAAD084 + 30: 8964B7FAC865310E56DB3238E03803F3B79D095523D278D609AD34BA8B67, C57D3AA1FF71636CC7497DF3CB4F7B71 + 31: F83C35D61E5C48CC7C402C9C78758D0DC696D2708FBC5294879DBF700BAF75, C69997844AB43312C90E995AD8C91E58 + 32: 03CA8E42B89C0AEEF0B7A364E94E326C537AFC4392AED3E6DA71EE65032A5CDB, E8DCD9120DE61900A194E8B94AEF6B2B + +CCM-camellia (16 byte key) + 0: , 3B53D5CC8B26A5FFC78D2E974E45A661 + 1: 5B, ED7741D8C258D56A29392A7A65CF147D + 2: 9396, AEC9E6690624A94E9ED39A0507C32277 + 3: 7D7DDB, E7D4B50F856F78EAFCCD6B91CA985AFE + 4: 1DE036A3, 4F519237C8534508140174DD3F5D5E10 + 5: 9BD3C8B888, 760CADF4D2722C52BE28D89F9F1BEAAC + 6: CA4252105A3D, 675B4D6953136E0691C3FE174381C231 + 7: EFF8ABC8F5CFA0, DDECDDF8FAE2BCAE971003D05A86024C + 8: D155E0590C4DC889, 08EFED0B6FA5C0EB64B7900229EA41DC + 9: 50AC40B4A083BEBF21, 14DABECF5CDBBB8F0AF3E7DDC034DAC6 + 10: 1C5442AF9F2D491BE911, FD19818919D55FD80BCC9EBA0A108920 + 11: 85A748561995A968CC9124, 69F769B8EA2BE927DADD209300752181 + 12: 2F0838A1C593A629C1AE9032, 4C8AB614BCF4F7988EB4B93E1DC48EE2 + 13: F19EE633F8B5E323904469D5C3, F82B28464B4BF73C39B332814E1672EF + 14: D6DBE7D82D4C99830FA1A6245125, 94D9EDF12A4A4EE357B647184EACC01B + 15: E8D02CBECEAD690DDFC1E48EE16B1F, 2D1355394CD62544D8840302715862D8 + 16: 74C395F0C833ECB858F6D09C097192C4, 9079E949C4081B348259080AA0AAD85B + 17: ECB27927C303ABE439BCD9F9D4E87D5674, 726E8E755398A30E930F2159B510DD8B + 18: 86593B1148EF7D5B446AA3AD22001CB66CB5, 63B0D269B586B9C887584498FF61D8BA + 19: 0373123872929AAF354B085FCEAB74DD2D28E4, 5FE2491F2603E474D15500DB2E32481D + 20: 3EA3D8DC013F2A6E42BFCCEE51BBFCEDD194BA40, 5667BD5212E31F02C8D8B94FAB5A9DEF + 21: 5ACC89A28DB162595FD55D63ED2C5B48976E0BA0E9, A52EDC5A3AB7B070B755DBB008D99787 + 22: 381266462C783DF3B5F3F3570611D6E0A61ABDFF7BA5, C79D371D81511D85D7B54B686AADFAFD + 23: 8819DDC964172B3BE049CCBABCF5AA7EDB50BD90E871F4, 45561AD598EB2DB8F7825878786B2CED + 24: F514E9F64E90197728E2D061443ED006F2CF2236EC2E65CF, 0C47214A73F6CEAEC1C96FE859C519E1 + 25: 3B965F16101777CF84C85AD864701BCDD617681B92944386AD, ECBE6B6BA145D10FE0D5042A5F04BB68 + 26: B573EB75A48CB8F56163A55DFB870017E06940D799ECCECE7C2C, 63A7C16D33F6ECA72B2B33C6FFF4F13D + 27: 47A3A96928BC9B28E22C3AF1999A30E271806BD3E6C8FAA4D82D62, 25E319011BA2F72BF7447C8EB36BBD01 + 28: 0E873D38B34A0857FB82BF278AE07AEF9A4B378A8300CDD96C5BDE34, 6045114D75AE7681C91E5BC508E2398B + 29: FF33B9683538014DCF4F7D78CF7126FB43448BF9883D69B824019B05FB, 28AD47D363A7F9A4653C6685F90C2971 + 30: 58005BF96E194411DF808DB3A6D405CA241986486160313AD092026A0A54, 7D8A8C8E8AB6ACE7312D82146219F37B + 31: 20C3DFE512F4EC1F17973BBB164E9F1B77CC3EB37B486119614764F4C7D0E2, 57CEB0625D34AD40935B03C54A1B8779 + 32: 913F8D366D4C2AC10ACB3196CCBDB5F436CFA92377045EB3A1C066F6ED7DE0E9, F48C8BB647E719049DB38C39EF779CE2 + diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/cipher_tv.txt --- a/libtomcrypt/notes/cipher_tv.txt Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/notes/cipher_tv.txt Fri Feb 09 21:44:05 2018 +0800 @@ -321,56 +321,56 @@ Cipher: xtea Key Size: 16 bytes - 0: 256004E1F55BC0C7 - 1: 2D385C151A691C42 - 2: F93BFEA758A7DDB4 - 3: 2A905D97C0CA3E48 - 4: 12C7C2787B913AE6 - 5: FB24B1F32549EF59 - 6: 2A8BFF867FB4FF73 - 7: 5692243526C6BA77 - 8: 4CD423ADFCDD1B6C - 9: 9B99AFC35EB2FED0 -10: 416B4AA4E07DA7F4 -11: 4DBC9052ABFF9510 -12: 8AF9457F8E599216 -13: BC3CA2B1C7267395 -14: E4BE31DF42282F7A -15: B344CA8AA57E9E40 -16: 57A1F94CD2F4576D -17: 96177FCD28BFF1BB -18: 78A1F63A0EBAAC33 -19: 5F3FCBCD7442B617 -20: D6F7CD5ECA688967 -21: D92EDF70CBDE703F -22: E2E2C2EE5D18E58E -23: 4BF00478CB7833C3 -24: F9936D550815FE8F -25: 19A3B07B3E47D7D8 -26: ACA441F099A7E30C -27: F70183F199988E3F -28: 0A41FC22F369310A -29: ABFAF40853A4A38C -30: 6B5D29DB1155D96B -31: 0DD0C08A27561D66 -32: 4C56E22292F17AA3 -33: 3F925ED65613DF4A -34: 521B4C97081DC901 -35: 2B1EC3E1C8CF84EC -36: 2A412556F42A48F6 -37: 0A57B8A527DFE507 -38: EB55C9C157E3C922 -39: 6E6D6E9AB925ED92 -40: A4C5C90A0D4A8F16 -41: 7F9F9F658C427D55 -42: 9A5139994FF04C3F -43: 9054771F027E29BC -44: 90543E7BAED313BD -45: 5DEC1EBE6A617D36 -46: 19AB6A708CDB9B2D -47: BABB97BB5CF9D4E4 -48: 2C2ADC05AF255861 -49: 52266710153E3F7E + 0: FFC52D10A010010B + 1: 9CFB2B659387BC37 + 2: 7067D153B259E0D6 + 3: 0A1769C085DD67A9 + 4: A9D781A1A7B4B292 + 5: 6FEF8300DF395062 + 6: A67B66CA99B9121C + 7: 006E657E1DAD46D3 + 8: 2D63322467438A5B + 9: 4F67A826126BE01D +10: 852C6FD597EBAB00 +11: F8DD14F59FF44A20 +12: CD4DC4E92B5CD40B +13: 802B89A3EFB75810 +14: CCA7D920F69A5491 +15: 0DFF98CA4F71CA0E +16: 80118F2AE4E83DE8 +17: CD6935285D45D83C +18: 47B4613483889187 +19: 87F3F1975B8618E3 +20: 49BF15EF40C72DBA +21: F850822AD58AD1CC +22: 9701AD2EF51FD705 +23: 705AE7F6FD60420B +24: E885CC84A9866B28 +25: 93E0D712D27E4E22 +26: 8C9CE43E517D3324 +27: 31004841AF51FB0E +28: B250BEBF0E58457C +29: 78290B6D83D442E9 +30: 3EC72388709CC6E2 +31: 099FB875AB5CA6EA +32: B15E20B58F5E8DD0 +33: A41511E198E0B1E7 +34: B8B5CDD9607B6B40 +35: BEF9624E922DB8AC +36: AF198FCD314D8DD4 +37: 1A37E433C261EF9D +38: AB7895A2E9D41EE4 +39: 4C95BE8D34A7D75B +40: 0D90A8EB03F2852E +41: 9AAD1D630D835C67 +42: 6AD88003661B2C5E +43: 4FA7E2CC53EBA728 +44: 862245D794441522 +45: FAB262C13D245B3E +46: C0A29AA315A5721E +47: F98617BBEFA6AD6A +48: 6F84EAB462F10F36 +49: 30850051303CDB96 Cipher: rc5 @@ -1647,56 +1647,56 @@ Cipher: noekeon Key Size: 16 bytes - 0: 18A6ECE528AA797328B2C091A02F54C5 - 1: 2A570E89CD8B7EEEE2C0249C8B68682E - 2: 828F4F6E3F3CB82EEEF26F37B26AEA78 - 3: A3CA71833499F244BF26F487620266A4 - 4: 333ACCE84B0A9DE91A22D1407F9DA83C - 5: 224285F3DB3D0D184D53F8FFDC8008D0 - 6: DE39E2973025FE9EC1ACDE8F06985F91 - 7: 2F00F45A01B1B0AA979E164DC5CCFE10 - 8: 43775F3CBEE629EF6A9BA77CA36171D9 - 9: 1E6A67ABF1B6ACF59FB484866AC15A86 -10: 70490989E2CD2145730921CCC37F0A17 -11: 67B0DD0EA903486B1CB56591FCF42678 -12: 774AAB71FF28E49A30E1E718D98114E8 -13: DF4797990E1C65C9F6735BD967164D45 -14: DE2779DF26FC1B99F576ED4CFBAE76CB -15: A13AD17440641B3460A01175E3274AB9 -16: 1166499165F2A1196CA2DB831F264E77 -17: 35D24A385416CF2A44AB97A4AEC45E14 -18: D3D0E0DC962B1AD1AED92F57129088B2 -19: 00EF3E246B32634ABAF8BEE31D5C592A -20: 79BBF3F807675B9F264BABC67DF4C2AB -21: F391F2D58F0998F24BC9E5FA75DB9E99 -22: 066EF13C2617E97E6015B86BA1E059B2 -23: 5B0E2D7AE1E2734B9D5734C87F7BE272 -24: CDF7020212B7CF21F4817829386A6F8E -25: 24873E1A0EF4908DF85114ED9BDB0168 -26: 99904360C843472F71AB86B26DC78A00 -27: BEE70B3735A67268578FF107C328940B -28: 97DBB283536BC8AE8DBF56F3474C7740 -29: 2F4C903975EF709E004D24DC132A8A51 -30: 3EF0859A281782F905198C607FBE5C43 -31: 2D9CD48BC6A99E86468CBDD2A55C7D5F -32: 5518D3ED18D5E5A62752CDF0846D0C77 -33: F751E9CAF107BAD8A1F1F9C374277A6A -34: C5BA4DE907C41221FBABC5EC43710D0C -35: 5CA48836330870365A10E7B676695C9D -36: 937A964E0EA4D246E97293375B167EFD -37: C0A876CB6957717541A90CCCB034BFB8 -38: A57C93A09F9160A28D3D4DEDC987746C -39: 1FFA1E0B5EE0F0A18425F62717254419 -40: 8411C87262AE482CFC43C3092BEAFD90 -41: 0B9BB379FB3587A9ACEEED4771D8DC20 -42: 3B32EDBF9557E1DFBCEEC269B51FA494 -43: D1104E2888679A9EF6A13AE00ED7E1FB -44: 0EC9849BAD58A279B42B5BA629B0045B -45: CF206E8D3399918E75DE4765DD743060 -46: 55CCEB28E27D4DC7CE2546454FFD2C33 -47: 6E2339281583420B76E1750D35296C12 -48: 7800EC3D8C344BE7F2D2812F5AFF3DA4 -49: B80F4B0BDAA54A04D5A26BCA185F4EA2 + 0: 22C082F55D7F6D861B11C36911BE694F + 1: 0485388F24B147918116347E942BCF4A + 2: 47388A4B060617B21134D3B4EB1CABCA + 3: AA8866CFB9D7507CC67A7F271AEF11E0 + 4: F6A078AEF1BDF8B621A76CB732804FF3 + 5: 8301F76E39A4E8C8AC38A7751B26DD31 + 6: 5BE06821E7B23277B808143F36BABDE0 + 7: E326A3A32F4F0D8A4FA94877997DA11B + 8: 2BA7773B55F90B5399C11EA80D6CADEF + 9: E64776D92B81770E51E4E2F44688A59D +10: E987ED52D4C33B2668BB9DCF0889D5AB +11: 351F5BC075D06BC6977D31A442CCC2B6 +12: 645468E2497FA5EB913C04032457C1DF +13: 10CFDBEC689B01FB969AA2C760F76CCB +14: 0BC5B171A3B727B9594238EC522F72F0 +15: 887D105D54D8EAABABC892F04F3455C0 +16: 53CC30B5F16713AC77205B0F194FED59 +17: CD63AD99CC0D5F34D67C363F99F7CF1E +18: 59BE7B22114383FE8491304FB291D2BC +19: 4B107C8D37CD46EF1DB68ECF4588FEF3 +20: 46034C755D278E368305D1133BA6B4FA +21: E2472AC6D4048AB59E126930F6476D06 +22: 821014CDA5084A85058F1D556854D33D +23: F67C3FB5CB1271B454810FEE632F7EE8 +24: 57705CB352AF1A8B342E1E555C9DAEAA +25: 72AB36C1A8D3C2111330D0EF78726227 +26: 1931783D7E3DD6A33962BAD6962D8A33 +27: 06029A07CA801027D97BFAFF4719FB89 +28: D78B7E4E3083A60610C42BFC03810590 +29: 3CA3B14C5741A43F1FF5AF2179684DBA +30: D1BCC52AE476999E25391E7FFDC59C81 +31: 1E102DBAA4224ED5E32515A59A07EDAA +32: 81BE227D2663DBB733F9CB5018AED67C +33: 92C5A77D5D62A16C031DA0BD968FBAC0 +34: 9EC8E61B543BE73AAD711A9F58C86790 +35: B6A1FD059A7D8D73C143C17D97E4C177 +36: 0316ED78EA520EE98BB568413A390E44 +37: BEFEE68550E2FAFC4AECBE309031BEFD +38: D394CBCC38A47482B2B6900BD68D6540 +39: C58F2EE6C493BD1EB41DEB88A169D240 +40: 0A45FFA6D6E888B1F6E95E388818C6AE +41: 8A9CAD2C511F284CE1D77167E5D23456 +42: 577CB9155A69CA34213FFD15E03D54F4 +43: 2AB7DD760EB7DDDD3883A6966B9D44D2 +44: 4564DC5318B0A940CBBC3C1607804B70 +45: 0E9F42D9C2AC03694CC2E82BA3C4BBBF +46: A49089D9FD9E13DF35B0490E59A9B7C9 +47: D58B3008003D6C8D556D7D76180691FF +48: 1FBC6D5F3F1B0E599DED48FF7A63CB76 +49: 077533478FABE8AD5DC2B9E96E7CC6CB Cipher: skipjack @@ -1965,3 +1965,323 @@ 49: 0133E1745856C44C +Cipher: seed +Key Size: 16 bytes + 0: A6E8D7325BBE0998CF235C1B57E64360 + 1: 83A2EB0094D1CF95E683DE8BA93DE478 + 2: 3DF178E121DA1CDB77ACFB37F9499A3B + 3: 785A1D88210885D6D2D84C2CB4461D57 + 4: 4F177E4C76F6CA9C989E724A0EC275F4 + 5: 3AC502689139EC1AFA7EDCDB622A6061 + 6: E1B9675AEFFE45A249644E7E0863110D + 7: C8A4294FF821E88EC5D181E54BBD3919 + 8: 7598C35780522C63B531758F53B7CCCE + 9: 3E59799FC5A5F99100A3791F6AA284EA +10: A8572971F5FC281E7617BCB8D616FAD3 +11: 3C5DCA82BA53DAC088D34E6C4D069E22 +12: 0886C2F45E358409230F6FA0F4ADB7BF +13: F4BF0388027AFBADEB6AD1AD0AC9339E +14: 587F60852DA55F76C486D9A6BA884F8A +15: A6F2518AD3B9A68C3FB8847E28B15212 +16: 6B6DB6C7085FEF6FD2BF32CAA2FEC2E2 +17: 40FF5FC134BC3911614A4E021254EFDF +18: 9B1016CD948F70B8A04D2604D4FF08AD +19: FBB86D1B49204838C7D544C8BAAE61F9 +20: 02EDFBE9A9A4CA2206CF9047FF146949 +21: 6B9FF89C1E607E494204B28D4391ED35 +22: BB85B8BAA9A4B74ED66C7485415834A0 +23: A6F72520E6F0248D88AFDBDA7CBDD6FE +24: 4BC1D4E990FC80E9ABF9E0FBC745E2D4 +25: 0358D44D7A59743AAF6D25CA179FB6FE +26: 320924C80B53E406DE45D31AB0E265F3 +27: B727A4AB9E8455EF11B18F300E22ADED +28: DCB6BEF8F35FFA2F2CDADAE161E56D48 +29: 847A39F0670E930BF7899656908C2B92 +30: B5223282B9328ACC4C6BF06F15C920EB +31: C265081FC225CA4ED28FABBF0BBB0298 +32: 35F6113CEA7C15DB21223D5AB0E9E558 +33: 3437EECD2984AADC9F07286CC23FB940 +34: D0C878AC8C01BB9868B499691373988A +35: 684381B5D98E9D1290AF5D633A903F68 +36: 69652249BD52F49ED11219881059ED38 +37: 08DD215881D98B1D8234FA1806E634FF +38: BFA836EB71C35B3E3CC9BFE9168D1B5F +39: 238BDB3340961C47A13F011AAB45FC5A +40: F55C630CE6008E7F15EA1686D887DEA4 +41: B78DED6C49E3167CD7ACF2CCB4E365DC +42: 79990527F22373B043039F18E343A8B7 +43: ACD08505E2759003C016F6E820DDC562 +44: 8DB7189177EF39A7A969F28B882CFF05 +45: EC0BEA22AE28469B91AAD4654858367E +46: 19A7F32CBCB4CE89163EC6F98FACFF36 +47: 3747F9C67FA044D52C3893D170DEC4A9 +48: DE799E6986BB77CA5C24F9A956BC28E4 +49: AD4CEBB75177F1CBD6FCEBF8457F85D2 + + +Cipher: kasumi +Key Size: 16 bytes + 0: BB6B2E0C88AD7C37 + 1: 5AFA50CBEF3FD5A4 + 2: 1914DFD8DD86C361 + 3: 0976E7F6AEBFFEDF + 4: DE0EF590AEC61F17 + 5: 089FA192859E6124 + 6: 72E283C82D366B51 + 7: 61DA033662AF0B74 + 8: C4CFA2C3ECA84CEA + 9: 15757205BAAC8639 +10: 4349914688A6A850 +11: 4B1F5E0D5B7ABBDF +12: 5482444DC8815041 +13: A8C198FB1D865A93 +14: C2641B2501AB6525 +15: FE492BE02E717496 +16: 03B3034E3A26006D +17: 0CB4B7FBA4582D1B +18: A61C750E5DFF1791 +19: AD5374F2B0860365 +20: CBC588879F98A820 +21: 04CA5EABB466C1C1 +22: F4DF5CEDAE6C0E17 +23: 6133AAD21D875DBB +24: D386BCFA19FAA860 +25: 68C9ED9206F07F47 +26: 00A49444A0C176CC +27: 4BEA00D55452196A +28: A9A3FAC7A2D553A3 +29: BE61DDF4CFA8EC8E +30: B1547D01A23C2632 +31: 400604E71F3F85AC +32: 8F431BCB447A132D +33: 0ED503EBD61D4286 +34: DF7B087B7D315E2C +35: 247A7872587F0507 +36: 7814D6B13A08CA60 +37: ADE44D69362B8199 +38: 49FF8C275D50A175 +39: 5DAC0F53391421C5 +40: B1C316E682E4F314 +41: 72FFFEA2DFD85E08 +42: 0418F02B7A89FC43 +43: 12826A96C5633C97 +44: A4726DA149DBFED1 +45: 5B276374E1EFC6CF +46: A91C4E4804D9A103 +47: 7A2894030C9FE01E +48: 0C59C6FA87DF2DCD +49: A86C6D3C7EAE644D + + +Cipher: multi2 +Key Size: 40 bytes + 0: A69A64BE9EAF56FC + 1: A8AB26A19D7804C6 + 2: D5468EF0C9CDF530 + 3: 2D08D23459949175 + 4: EE66EB212BEC593C + 5: A2D088F95C855F60 + 6: C206004787FEECEE + 7: E4875B7BE2C819B2 + 8: FBC692536393F8C5 + 9: 886DB391EE3BA443 +10: F45359B08EFC56FF +11: 1113E4F4A177E1DC +12: 8A02560CAD0CCF87 +13: CF57FF05E6BB7A67 +14: 21F4EDCF8E8A3D9D +15: 26A26EEFDF51B7F6 +16: E9AF9D2EF2A9EE4A +17: 6866182BC49D09D7 +18: 657E0D732BD7B5CF +19: EFCC33778BC265AE +20: 3556CD607D59C32B +21: A7477466892D114F +22: E210A7B32E9A2E08 +23: 9EBC0B60EB1FEA70 +24: C1E8C3A38E0063B9 +25: 3C9FC4089F87B0D6 +26: 100EA58D00F38495 +27: 3BB3D47D52A81774 +28: F1FA3DE89274A681 +29: 18DF1E38CC0C5230 +30: C3FDCDD9159B0258 +31: EA6ADFAF7D8D3C87 +32: FC4C369E7835461A +33: 791D1D34EBEF801B +34: 3B5A5B64C72B2F77 +35: 55ECED8C5D0F69FC +36: A6DE960F4B81C114 +37: 3C4EDB0671BFFC57 +38: C493186F4BF52F5D +39: 01B2C607B2329E87 +40: 109035510A1AEB20 +41: 0EA4699CA4A161FC +42: 182665FBB15EBD34 +43: 04458216DCB8F55F +44: 850BD374C892FC07 +45: 4C428488381D6FD0 +46: 56FF4CE0AA4132D9 +47: 9F95F0A47D70A317 +48: E12CC913356EFF86 +49: 7E614927A295C45B + + +Cipher: camellia +Key Size: 16 bytes + 0: ED18D83F3153160C5A6D01AC3717515C + 1: 1012886CCDF3FFD25E588BA10D6CE363 + 2: D25562F6943EBE3A7E0EF28D33CF091E + 3: C26FDC4539DD1E6D0330B5836AB24420 + 4: E14A50CE727B74B8CEBEB284FEF3C810 + 5: AABFD72D334F594344C617EF8E8F5741 + 6: E8D941419ABE88060835E9BD375455BB + 7: ED863784E1590139A2CA50D77450300A + 8: 545FCF42030BD764724C3EF5C139B038 + 9: 08C194E007FAA99997D855A759D10743 +10: 3899D3731500C79D2945AFC2980B4C17 +11: 2720FA4B402AB7F1B019AF6248702369 +12: 3FF6C3C90AB4141DEE5FF30EA2047F73 +13: BB5BAF7545AA774C7AA5A58568F96832 +14: 66349C52709EDE0EE34AB6501B420C7C +15: E1E93D923504A5421BAEA5F1D61D4C9A +16: 3C07DFD64B2407BB7575A905F3F31E83 +17: 0FC569AC89ED790F69BBD1E998700C97 +18: 6B6F390AFA1052BD2E8DB0DC261E4D26 +19: CBEA83ED55DA9DED95B87F2BBBEAC37D +20: CE005DECECB98F5937D5ED26FD83154E +21: 738301D76316EC4173F124A9C9D6577A +22: D00A1E40CFB5F2B8FD2C0714580FAD50 +23: 7EBF497C78B72E646EB72A326F1D5C4B +24: 7E0023900F6000D00737242DA8F2E1B1 +25: 0F7737E715BEF0DEA503E355394540A9 +26: 15452DD70DEBF45BEF39782CDB8BB086 +27: E7464917B3AF060BC763D8959DDF90C1 +28: CBE4B90FF8C66672122D53585198773B +29: B7262E6CAA2C14B18EE374DF922CDB98 +30: 01E695E3CD87A2FD4B9C49D08D032DAD +31: AA1686BA0B5C5688D0F370C6E2BFA43C +32: 9448BA348E8E904992C3F4233C226B22 +33: A1DCD1CB810DFB46BDCE6FBE3A192560 +34: 4345D200A309FA8C5A0CE9EC60EE506C +35: 54C7F64D9B411BF90B283ED62686D28F +36: E347E882EC2635081547612B1D9589D1 +37: 36D44CC101B37BB6F6AF68C3FEA3A7B7 +38: F38C2D5B921965D2AFFDBF4EC5BCEC19 +39: F7ED6BF85782F0526301BD1CD1624E67 +40: 7959C134BFC85CA176550EA689F81054 +41: A8FC96504C437F0EFD0BDF6CCEF516D2 +42: 6B88D1A06D7C8C74379FEFE2D6A7C895 +43: 39C21AA165F4A71A161971D89CA5DC32 +44: CC123C40071BF02D282DC83D2AC18226 +45: 0780A63741AE47CD03FA99A74C320E33 +46: DFB0831BA27AA0750701439603B8A805 +47: 0C783CBA4ECD9EEE1F91838259831187 +48: 1456624438B22555B08D59CA50D6E95D +49: D5F463D983A9A6FE9A0B47C245596D40 + +Key Size: 24 bytes + 0: 1D1DAF85EA5CAE19F5F5EA1DC61E5B83 + 1: DDAC7FCF2C2F275C7041E7821AAC84A3 + 2: 591091C3755816AAEB9170D5DF77A0B3 + 3: C4BC965CDC20E6FC039F07DA2CD10BE3 + 4: CD8DA54FC48524EDCFEF985C0C39C961 + 5: 14FA12F39AC3D701A958765B4499FFAC + 6: 2BBEA5F3AA140CFFED9F1EB2BC969D56 + 7: 5F73CA8BF641770D6833A43947D9A5C3 + 8: 3E872D303B882284AB02393D43137450 + 9: 01EF55D4CE182FA03216A83A5128F761 +10: 915C2F5793692A6D118D865783317C58 +11: 4368A442B61D6F12D5447F1CB8854714 +12: 3477ECB27ECFF2D7108ED1297DE80F86 +13: 89C875CB55C1CE80FF2D430921FADB05 +14: C5AAFE7A4588D4D9039E4552B3FC9B02 +15: BF1E7509405AB219B540BDD0D3DE7528 +16: 7E5CC85B6563099B902638B7E0D09728 +17: FF04D2350647F117F81DA037A9E11946 +18: EA294A53395A20B391B11AB9F97262F3 +19: 448C801307E9405F740623BA55A45639 +20: 62032AE6EB01322233FB321B2D6A8C38 +21: 79A54FFB9CA25AE315BA0E7B6E59EA99 +22: EDE7E634C396926876A49DB3C0E261E1 +23: E9DA5106B8BD33391C28407E9B3758BD +24: D8EAF9F744E060695AD1F55F85AF3D76 +25: F1E61F0F467C0785B6053332129114EA +26: 3119CACB24B012F3B96EFAD3FB856AFB +27: 97753ACDAFD6224E5D289BF76673A73A +28: 8D5912FFFD628736C64B3DE01DF1E674 +29: 8951CEDB758DF5EA5D2A78B2A08480EE +30: 3C0FC9DFD8CF79A5F9F75CC43B1A9247 +31: 4C7047481FE0849EA0416BDC00A52321 +32: 97034388AE8553570366EDFB9F6D618F +33: F16BCC0FB2B77CCBDC5EF7AB2233599D +34: 6D94D041196F43F0224B1DAC84165E7C +35: 313C6BA0AD767259860DCF8003F2F5A2 +36: C5F835DCF63D1C40E56DBAC7ADCE7F3C +37: DAFAFF6BB46EA9280562E5DDFA793BA8 +38: 5C8C0570B06C595E296DD4A9FB864FCE +39: 72B433F78D7CA638C2ADA09D99CFB769 +40: B6D7A6C47339743E9739D35D0F08A25D +41: 6CFD73F9E9781FFCE53C69AD2EF11E03 +42: B7F0BA994EF90642B80FDD798666D752 +43: DD49766125316ED4F546B246A2CFA23A +44: 8ED53D6CEF3CFB9DB0147F02656EDA35 +45: 95690401D61C84A013EC6D25CCAC5CD1 +46: 7693648B4A6CA804B6F01AE67816746C +47: F08C5898CE7970C41A5F8C05882CAB8B +48: 91EC0EC1CF839B58009E6CAAB3FD67A0 +49: 853DFA14A029EB8FB8D693B0A65306A1 + +Key Size: 32 bytes + 0: 5F77DC44E5E6701E8755C1FA176E2434 + 1: 5C1F70FC144C66D82D8F21DD2A0BA54E + 2: A98317BC656475F83E83062A69A17EF6 + 3: D5B8C0DB1095E65D49CEC82D78FD4C7E + 4: 37A537292409ABE5B922DD97EC0F6CA4 + 5: C7FD40883DE6BBC6059327DA586AD96E + 6: F4D19C443A2195B66085DACA7EFFDADF + 7: 6F12FD74B4D25C9F2856CAA1BA32461E + 8: DFC00046F41BC27684321B980BF68F6E + 9: 4A8BECB6A8D57002FCC6FE08B6D31118 +10: 859562FB3727E535BD4A914907822545 +11: EBA65EA3BD622DC044CA5384E568C65F +12: 79C16A751FBE22340F30462600724324 +13: 8F4FB71B5B3E0C1DB870B4BC81E995D0 +14: 4B82E7E8D64D8EF9D78DA944B292CED9 +15: D873F8D7125A63EBB04473F7331B1975 +16: 2FA25AF9E8D5A4DC82CAD98505E5DA60 +17: C80C24625096E6E9852A6F9EE12735BB +18: 10D4434CB795DC06E926CFA3B43D2368 +19: 070795AEA2765A443213F9CA909DF6C4 +20: 7184D2F5644306FB6DD55F1C90C111CA +21: F4FAEDF12FB40DE7CE7B08121A340557 +22: 86CE014AA863FD3030A26E6F8C178673 +23: 5A46BF2B3F14D5FEA884C3361EA87ED3 +24: 456584515D983D17ED4F3AE944BFB2C4 +25: E1E8F394691C2A9123023A8EE3FCBBEF +26: AC73E8BD1758850DEDAA3817B01E6353 +27: 15AE5395CBC3371F81A6F5B05C52671F +28: F15AA72D34C4E0EEF8DDDDA90D9A9539 +29: 3325E709043735898EA242E94D169112 +30: 044AB447754DADD4E2709FEE08D5CEA2 +31: E02DD5E86D32B3A6CC7F0016375AEC5F +32: 790278BD19E2860618E24DC69993F92B +33: F776D24FD90A43A78D000CFC1189E56A +34: A3EE4A3D121280750F7C70E55DD40FF4 +35: 32928BBBF98DF4B9E107599DFB30364F +36: B3E9296B529118B656D27AFF0F4D1A55 +37: 4668FD77100255C3406281EC813719AE +38: 16F9FF27B26F13300DB8DEE2EDD023AA +39: 9295F8435D688D12BE631A31B2531482 +40: D86917DF41ED4342C0ABF10628DBD1B4 +41: 1F5215B987C3F079769292E65D04B823 +42: F68B98BD2F12AACEBE78666AA83CA7D0 +43: 09BB635B67279F5A6B1D5C5D880A1357 +44: AE4ABBCC1D35CD8C4C254111D5F27158 +45: 5552B3E39DE67F759799A686222EE4EC +46: 1CA439434B9FD2F24561A32A0A2A79C5 +47: 0E33BE7CE3B9A5CFF00A73BD27DFE9EF +48: 6B7056FDC97983173D6B3D5BFC9B09B8 +49: DA293A4CB96FE3608CFFD89B927C9ED6 + + diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/eax_tv.txt --- a/libtomcrypt/notes/eax_tv.txt Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/notes/eax_tv.txt Fri Feb 09 21:44:05 2018 +0800 @@ -57,23 +57,23 @@ 16: 60A315193F58144F5701D547C79FEEED, 912FDBDB05467DF5 EAX-xtea (16 byte key) - 0: , 86881D824E3BC561 - 1: EE, 4C3505F04611D9C2 - 2: 80C8, 6A3428BEEAD60738 - 3: BF88E7, 04F1E99E9F5906C2 - 4: E06574B7, 33B0153AAEF9776F - 5: 42D950AF63, 4A0F415640322FDF - 6: C30F6AD46EC9, 9646FE909D2B95CB - 7: A0049FCA856A14, A0257289C6BBF278 - 8: 2814B0C1358440E0, C4B0A2354925E887 - 9: BF4F062B52C1E489CF, B56442A3CA57A041 - 10: 63DF433956831B8780FC, ADF9ED0B46DCA19E - 11: C317FD079817F50E0E8A16, 2EA0EC993FC603AE - 12: 2BD12FDDD81EB11660346D2A, FBC6F69125BBA88D - 13: 85D356536FE2843C6BBE60EDBC, BB2FEFD04F230E79 - 14: 22493009DB01B4746F4927A8C4FB, 64CC08471D93C9AC - 15: C0F3C0DB08DC93FBA725D1E02DE084, 77B762213DDCCFFE - 16: 568B66D3112556BD98FF9339E9C002E5, C8355F508219FE0C + 0: , A04FAC8D0416F081 + 1: 5E, F95DAA99F8FE28E9 + 2: B6A7, E2A05E1F1E6D17B5 + 3: 27D698, CCC0CC54F40DA243 + 4: C2E81CCC, 283AB8F109D287ED + 5: 51B99DF694, A9637DB356B4BC0C + 6: C2ED3E79A4F2, 413D3A65FFE803BA + 7: 40E35BE6CA019C, 1B68833B90E4E026 + 8: C246C2B5ACEBEB08, 50CFEB01DEC3BB1F + 9: 35E2F7AAB57842D50F, 617804483BFFCA9D + 10: 2F855AB7A4664958300D, 6F054767FE484664 + 11: 2824A5486D1B621D0F992A, 238566B9F56ECAB1 + 12: BF5C121A6144AA0CC05A380E, 63F4DA4B898FB2A8 + 13: 2EB53E8A4698EDEBB990FC65E6, 7DFFE0E43187D10C + 14: 85F77FD150C6649F5826AD45D50D, AA660F37975768FC + 15: 8B4EB3750814EE7E8FC6B97B3ED1ED, F79545FB1F1C389B + 16: 980EB7FCEEE37558BEDA0E938325F608, 2FAA9235BFA3EA30 EAX-rc5 (8 byte key) 0: , 169C7954341EF44D @@ -352,39 +352,39 @@ 16: 70CABBA983179106AE7FCD5F1F31D5C3, BF7F9168F4F82F56 EAX-noekeon (16 byte key) - 0: , 556805EEA595CFB9A30FAD196103D7FD - 1: F5, 0A7DAEDFB656526CEF4DDBA8087A227A - 2: 7B8C, 249895D79962D5B4D18FE07366281B72 - 3: ACFF15, DCC489D24832EB106F576AE6B6EB957A - 4: 08ADE7DB, 0D3215999E9960EDAB29B78744C7F139 - 5: 66139213F6, 505E1E7141D043E903C26EE0959EEECD - 6: 078B79F880A8, 35B7EB326A55E50332866EEDB682EC20 - 7: 2809E34D9667D4, FFDEC555F68524A09A6ABACA372077D9 - 8: 93D267DE1EC635D3, 4FF3561990A56E4B374618722EF850FF - 9: F377A4D93FF32F4A51, 91D4070423A90FC54D305169C03F49ED - 10: 6244B717E082993EB7A1, 2E3A8A354AFA9473667ED7FDD46BE9FC - 11: E917559625D25E6E5F2EDA, 19295C37A70314CC9A1D11FDE8D23C92 - 12: 1E6DF2EE112A893AB14DFA92, 12C4A89D4CD65F8116A03A135AFD3701 - 13: 47B18CD762E011770E203CF605, 434909A97E118B20D3AEDC79AFE33A9E - 14: 72D9A1A7DA6F33D5E0B927F9F32C, 779C23714FCAA2B2321EC7FB5B03E222 - 15: DA8B830FFCB3DB274807F780D33240, EDC2F1C8A401F328A53392597730B007 - 16: B53DD2BB840AD933D36A7B5FFDCCFBBB, 4EC0E6D1F916BF633869239B672B37A1 - 17: 42936BB9A936C30408660855F4F47F3314, F0DAA6DDA15585E1697ABBB4790B15B5 - 18: 00372E47F5BA016F1B2A1E680B76AB02052A, CDBF3D241BF7FF96D3DFBEDDB872E901 - 19: 8AA236B0C8BEF6F67A97C2DF90628F6E5838FF, 731DCD61F7F26004C03519F9500EA824 - 20: 55338647812FC9D86CBDDCED7120268A4D43F8BA, 0E61B3C835CAD95FD49FEF002C014E72 - 21: 435820B28E52154B47A04D5E635D8FE37FA47FC985, F6A96DCE4917E8D7C610923627E80970 - 22: 0D30C15B6FEB4A48B14DD15D41A4B25D442AA677B25C, 28E15CCB74AE992C68BDDC8D87802050 - 23: D9D701F9AD6B0E13D2CDDA15A5194E7CE8BD2C02137391, 2DB9A15884E9C996C3D6B5BDA44B9598 - 24: E2390AC5CE10CCFBC72106A52C7F180CB477E3C193CBACA8, 22D3F7DCD6947EA4E78DF57A8E1A9A59 - 25: ADEFB7D9500658D34996AF6BE6336CD78891064EA1DB8E9785, F239D67D039A15C620A7CD4BE4796B3F - 26: 89964C90ABF54A6DF9F13C3681E70C702D80A17BE79F8160F30E, 6336F729ECE1ED7368669D75B7E2DCBA - 27: 576B2813CECDA4F905BD5D58349EF070FF41B7EB6BB2B01B061B0B, 125324CBF2ACF1011A44A99A11EC8AFC - 28: 430B957481748519A60494F0B5F698F34B1A8235B00AC0D1F0A4442E, 1E80A7FCEBBB8E1E12D6831906154485 - 29: E781BFE5FCDE0BFC056CC86C4A0B9DD3B815BE8CA678204CF47289B5B5, 190D5AAA9EC1CB4CC86FACE53BF1201B - 30: 78BFAC07A9B7B2AE9329BF9F9BF18A1A49DD9587001EFCA00E9AD9752764, 4FB5ECBEEB0995C150EBC66508FA19C1 - 31: 7D6C20694109DE21F7955855A8FF832347518DD496C2A114DF142C68ACDEAA, B25D4BB34056DC091A7A3950D46C32EC - 32: 3E1E4395DEC1AFEA9212B95F37E679B6E2D14DF23C5DE49018C2C8038CC4AD45, 9A6DE7BD41A21918AD504490EF4E581D + 0: , 5CB584CC68025F830B42371B9CCE99EB + 1: 65, 69D866C00E11E4311ADCD50AE2F91D03 + 2: 80D2, DA0499598F478A7FF53324908EB4DC74 + 3: 86EFB4, 7DC1556C65F9E7CF2E3A357B38E326D1 + 4: 87387A77, 7B58F421766918A179A999520A6E3781 + 5: D18B9788C6, 924A2FF178FD06BF292A605FCB27BDD9 + 6: 0075EC03ECD1, 78F553564A25A574E6A4857778A2DB43 + 7: 5BF96EC79C2E88, C49CBD1C4F631B35D5A3B764251870D2 + 8: 70DF3B35F6D9B822, 42351BF5C947AF7A0E1F852199B5840C + 9: 2E53748525AF367861, 4986BC390AA0DA1E4E78CB2148A2C513 + 10: 05DE8BAD8C975ACECF87, 1C0F1C18FB8682D76AF9E48D3547D88E + 11: 8B2B1D70F6A74059503F42, 839EE120ADC8BF08CD9A7DF6393D1E51 + 12: 9D7F92F08953B5B300A7410E, 603A43432DAB26882797BB5AA7A75D28 + 13: 4CA551DDB4BBCFA45BF71C49DA, D2743508826E3E39151F21C0AD81C8DC + 14: BAE72091E78013369AF5D0294AC6, 3F0D391BF01C3BA116A9CAF50DC28307 + 15: B037AFB65588B95BC86E1430E0746A, 2399A4C31F55310AE2C4A2FE3379C74F + 16: 842F0B29888C43999545D29CFEFA58DD, 9B6E4FED2A6BE59DC2DFAB407D2FD124 + 17: 86F7DA57E5C9DE9C88EFC1ED0CA61F76A4, E7278F365289FD0C484A166FA9EDB801 + 18: CB94AD60C1FBDC9868DDE0D4674251A644B5, D857CE47FB963DFBE7983D183695803B + 19: 5A0B24FF167EB133808A3FBF89D9895F30BE1C, 488362E61725BE723CE892F550AF028A + 20: 60D43A8C29F1714588672847FA00DE771F2C3D36, 25D7CEF55A2A33953D9B7739F9C98C12 + 21: CC47C891FAB841800F0AC0F746A257062BE9AF49F3, 220A3EE618FB735B9E801F9B3708D4FE + 22: C8E0F9AF7A7C62B6C297B16025DA55BAF5BA13F6ABA7, FA16192047892BC2472AF1DBD95E0D6F + 23: 731BDA5BEFCBA427E715839C21E4A176D0E28F042C3089, 4CBE4BB916EEE773B9299FE2FF0BBD81 + 24: 62C5CD4F7EF81EA4E58847F3F715FA9E9EFB32059D70BA88, 090E92CEED8FB5D472CCDA11363FC904 + 25: F7FD159377B130633F93B4D18BE68B0872905BDB205025E4FB, 6F335AB81AC8507D5F4018F86FB0230E + 26: DC374E5B40E8F4614C2BE685539C97825C7A972CA2BEFF338208, 719F6C042DB09A08C36D92810FCC29FD + 27: 1050C71D491237EF77F4F043D7EDCBD41DA0BC155F1CB65EAA1D5E, 44E7CD8CEB27584340270F3CADE1A083 + 28: 8AE94A4FF500DC889436866D90B8E150B63EDE74074912029FF9C3A0, 3C96328BE53423BEB32FFE0D05F9B71A + 29: A801D1571411396C0727B132AEFE114D7BD486DA74C549E7661F2D8B87, DD6A443497AFC9EB14FE6EE9069AD580 + 30: C79DFE19B0199768EFDD29026863C644A0ADBD14A3F3866DE74EE7AA2E0C, CCB313FE30CD4F04BB3548808FEBAE6E + 31: F658ECDD95F960D7C68D03F9BBADF066F8B9CE8108867C7DEA305FF4124AF2, 8AE64618E77A2806B53E239927787ACB + 32: C92EF301771E89D5BD3B901B380EBE18BD2A193B5989092006E7AC15345AFD34, B450AC584DF13D9C8BDD32DA686A1AF9 EAX-skipjack (10 byte key) 0: , 85F74B6AFFB10ACD @@ -459,3 +459,111 @@ 15: 14DA751E5AF7E01F35B3CE74EE1ACF, 3C76AB64E1724DCE 16: A13BBC7E408D2C550634CBC64690B8FE, 3D4BBC0C76536730 +EAX-seed (16 byte key) + 0: , 3D0715108CEA3BE144350082B1BC4F25 + 1: EF, E56898AEDB0F461980587FFBDB83EE59 + 2: 9552, 9647B7FCEDBB9EF4EDEBCD98831E5BDE + 3: 25DCD8, 3647D80EF3529C72F16D223D04D7ACAA + 4: 3D169011, 7A741FA2536E5905FD4ABAB104062D3B + 5: A92411F6BC, 18A306E5DBF4DBDCE21505F16DA85482 + 6: 9D4661D2859F, 7B2FC34AB3DE45DB4AE8C97BF3B32BA9 + 7: 0E8C26E24B0961, DFF098B44E7D57A71F68FD0D2D2416C7 + 8: 485EE54D5D2684DF, C8FCF501065D23F936A4A530BB028EA0 + 9: 768888B50865A635A2, 8121463B762AC12D19EE21C58A8A1B7B + 10: 647FF44F0B350385BF27, 883241565540347D491C0E397FF5D663 + 11: FD868A569E2E597EB3B5AC, 4DE96B6810A1FC5F19A085B4F4C8B687 + 12: 342D72063420F3FCFC1EF71F, 88B94C3FFD74F052CC44722B87E1A45D + 13: C768F88646D47D5201FDF47A1E, A01EB1FBB3AB135F258B87C30A8E1A13 + 14: 44BF87EC9A5F5E20E5D972ECAE4C, 6F1C44EDB3533EFF973B53EAAF84D601 + 15: FDE60E4F25C4B9388BD3D348912B7F, 863871D706A32F92DAD13803CF2008E1 + 16: 69881E58AF690C5EEBC00DABDAAFBCA9, BD3911C5E41B327A10DC7D03435FB8AC + 17: 41AC0D70E8ECB01CFFFC9352E3800F568E, CCD63A0D20D0FD385EB720B2D60D20EF + 18: 88301B40FA8B84ECEE7238F17B08EC2A2DA3, AD10D120ABCCB67FD3F12C8D8BD216F7 + 19: CCD0F8187B7455274D80A2387599617582B7C5, 3DAA6952A9AA160863E4F489AF04C6A5 + 20: CB955D3B6044F1712DEDC65451E46B8D9FBE5067, D46FEEFA0A0069115F262877050265E9 + 21: 373B8AD20672BEADE5B742C72306455549B26DB631, 16DC5FE5C7C0D5478FF67AD00463AEF1 + 22: CAB49183077EB4DF3BFBF7FE026BCA8311A6BC067EDB, 8F4497F253167AB81A70A05218734C1F + 23: C2F860DA7EC7801FE30FF8C362EFA11E9392E029E24407, 1612D514BF9F365EB0E5CA13E974670D + 24: F0084F22D7AE598FF5DFEF76CCC0728325BB5D3DF5467B2F, 1DE5CD767D2B731DE4C9B4E303A7E771 + 25: F5E907AC398B2C7BE124ACCAD1FEB001BC3EC7C77C21E94110, D8C7D50EFB0CCE2926DA9E796EA46E17 + 26: D65A41B86D24C573D21EE416F2F853E8FF7A0788120102E8BABB, 3EEDB65BCF0E32C24B797D972913F943 + 27: 3B39B9994248DD1FB3EFD68820D19E8436F66FF0E6D82F40E50AFF, 7892720F9AA0ABC34E05FD982396C13A + 28: 9B924A2F620E5160B8F6C8DD313F39D6DC22B7E0596C8D0BFCA14907, E417D1FE5569975E8698C4D80684A613 + 29: 01068AA5F6FBFFDE1A8290CB315426F8CFD2438C09FD5982BE45EB21CC, A7DB568F037E8A4DB2D73CB2DF2BABA4 + 30: D39210874C4B7BEB63966BDC89AC7279B67C118618E9C44C1C563A10F74B, FB64939029B8E5DC1318EBE3FDAFC9F6 + 31: 8338B7BCA36C104C4B7EEBFF582FEAF879894FD6F00434859AD94E644BEC60, 93DECCE7AD61E69A2BD6621FEE2953D9 + 32: 21DC38BE252ECCA74963965660C98B5D9B5C2411945D8AAF9EF93732748A6162, 2BBE555F1D3C94BC6F1665A6DEDB536C + +EAX-kasumi (16 byte key) + 0: , 9E0C41B26B960E81 + 1: 03, 26B904336B9E0BDA + 2: 9EB8, 18E90B52DB587A8B + 3: F8E4F4, 9842D0A42ACC7717 + 4: B5688382, 2134820AF25CFFF5 + 5: 582E9402B2, 9C0F60D5B2D4BEA8 + 6: 836A3CEA4965, 6EB7565E0FF7FFCA + 7: 00DD66F0AB54AE, 0CAFA81DFB52F835 + 8: F5824156469E77DA, 44AEED7DA55C7C2F + 9: FCED54C15FAE6EB601, 95D7A3592D5F3B0E + 10: 0630750CAF71D334562C, D8F7432F9AAEC624 + 11: 25E3C5FAFE86F59D30BEDE, 42E3F6C3B8F73F64 + 12: B98480D54E604E4CFB988EFB, 2BCA65A62CE3E363 + 13: F07F1F98A2411749EA11FD87F2, EC7C07D37B7CC07C + 14: 19A6D648AD698ADED0AF37001479, F88417372E600717 + 15: 17CE88FC64ED98233BBAB20AA4DA45, 4959410987AE317B + 16: 61EE83703D8CA5D652F8E1E83C86D58F, 57EC73A828C20B68 + +EAX-multi2 (40 byte key) + 0: , E3EB492A2A560816 + 1: C6, E0A176A66E269255 + 2: 1D00, 472E25EF8B4ED450 + 3: 1DFE5A, BEDB3404162C7122 + 4: 915B77D4, BABBB74A3EE61755 + 5: 3C966136E8, 603664C04EF42178 + 6: E4A4925C9F75, 41B77B32F28613DB + 7: 365BC4FEF0B1B0, BB09E42F396F3832 + 8: FFCE6DA57D7FE9D1, C11BA7A7B580032C + 9: 0413506EE42819574C, 9B5C6A8111BE7B29 + 10: 531319C06A4B68AE226C, 77BC1DF09414D212 + 11: 85C0454EB3B9CDEDD32EF9, 39576F2268A59EF6 + 12: 8FB1732015FD006D2FFA8D9C, F8F51511ECA4E0A7 + 13: 1654F11C940FCBA529D2384A0D, 871B4541612C7CCE + 14: F119DC9F998D92B4C45185CFA2D1, B50D3A61F3CE76B0 + 15: 05B051F7DA81609FAC41BF0A19C45A, DF1265F3F69625F5 + 16: A313136E4E7F1314E7ED504B48324047, A9D1C5527D6EF7D7 + +EAX-camellia (16 byte key) + 0: , 9E8CDB7237166EF9FD0605A0AD3E4070 + 1: 8A, 23F462AC7E22EB9078DAC34CB1CFFB08 + 2: EC9D, EBA9E2E3112C18CC2991FFF97EF77E6F + 3: D2A9CF, 913472F45F6D6B087D8AEB34B0FF9494 + 4: 360A7ECC, 6382103D53AB8C9263977AFB1A96AAC4 + 5: 80B52AAFE6, F855787CD6CCA56CD656A0DBC663CAD1 + 6: 0915D546F5F0, EBE17981CAB5D59E6376CFE30DE66936 + 7: 086B525B082B71, 182D76F2DE42F5D0AC252F25E7BC34CA + 8: 438DA1E9E78B9D2E, 36BA12456C3AC5ED3A0BDF851A651E82 + 9: 0F9C9890152D6AD5EC, 06F3A96F40D794552CA799006E76AE7A + 10: 7754241DCD040CC449EB, B576881B5E542A73717A6AC24E516079 + 11: BB536F70C1111BFAC4D149, DDC6043F2B5DF96418799DD13BD04726 + 12: 4B530B4F67376C4B7EC1CB29, 43A36C14092F19F168ADF0FD9F557424 + 13: 55D5D285DC88451148C7B2B143, 7C2CB43BD19808EB90F045E6D6EB70D0 + 14: B321948117659CB06E6B364D00A7, 1B30A37234E3A13A335EFE6A07B070DC + 15: BDCCAC5E956953E6D5C43D9436D453, 98F924C659F4112B1D9DAFFF711FB2F6 + 16: E0A2F28186D79A9494700E5A30351542, C604F7F47C3F18F236DDB289D287BE91 + 17: 750D6EF87E1C9E1023920D3F355B2BEED8, 96FEEAC4DA36FD36129F67C3EADA75EF + 18: E7F91687119D70793B9BB0114C7B588D32F0, A75052978F26EE6FE5D802BD4C06004D + 19: 56D7420981DC556AE0137DB0F1BD1CEC0BC945, CC024D30F19EAA3CDF66E51246FC3225 + 20: F2D61A0E214472663F5F41C9D66EDEEC2F7C824A, 9706F273AF680AE2537D02BE41A2C980 + 21: 30F76A83CF8010DF0F49F73C06435E0C5D85EDC6E3, 1F18354A73BF506D229369836855EFD5 + 22: DB9688FB58EB83AF06A579CE56FBC75D93412790924C, C9DD5350751CFF0AB1A8910AC1898E08 + 23: CBD64BAB16852F40FB00D9FEEF5365C773CA14B77EF5E2, D6A02105B1BD018A5BCF47A69803248D + 24: BDCE2AA8092D4790041750DC922F2D6AA12DB3F41A547C7E, 3DF09D758306DAE21C3AAAB3FC51623E + 25: FDFF0AFA4D94CB3019AB27234259ED225B1B3B0F2BDC32CDD0, D64E69725D638D9F0F90C44C6BF51722 + 26: A9D2CC4F7FB98D54A78293C64C2A41CA19CC1F7B9970F3437AE9, BDFC6B10DD012BA057CCCD40AE14569B + 27: 81FE813C4A6A47D34F146DD943092940ECEA77F85339A219B6134D, 5F44590AE8CDF89E13AE2BE4D32AB7DB + 28: F618779FC6E6F5B7EE3FB4E937097E6A122B979E3DF837F72A8FA3B9, 00F0A3B4C67F68590AAA0BEF2D399D1F + 29: 0A8AB66D218268C9181DB8C6EF542AA4B42E53E4623E3385723024CC3A, F28D7D86317D2F509561DD3392F3EF3C + 30: 9CD50C94ED5391BED5C8CE2A07F8955744B275B6C5E5B6F453A5E6185C03, 048E889FF70729C55582003ED6169E0C + 31: 1CFD6D8EF6F44265703544AFEB2BBA2A067BE8DAB412E071B66B70E357238A, 0A5BB055E00D42F4291CAB3813FC2946 + 32: 8E6E6433E4FF879155E0612F17EFC00AA8D5236EFAB5D9D6A912898F3124B588, EDF81BB73FF9288F315B988413432823 + diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/etc/NoekeonVects.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/notes/etc/NoekeonVects.java Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,249 @@ +/* + NoekeonVects.java - Generate Noekeon test vectors using BouncyCastle. + + Written in 2011 by Patrick Pelletier + + 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. + + This file is dedicated to the public domain with the CC0 Public Domain + Dedication: http://creativecommons.org/publicdomain/zero/1.0/legalcode.txt + + You may also consider this file to be covered by the WTFPL, as contained + in the LibTomCrypt LICENSE file, if that makes you happier for some reason. + + ---------------------------------------------------------------------- + + This program was inspired by the comment in Botan 1.10.1's + doc/examples/eax_test.cpp: + + // Noekeon: unknown cause, though LTC's lone test vector does not + // match Botan + + So, I investigated the discrepancy by comparing them with a third + implementation, BouncyCastle: http://www.bouncycastle.org/java.html + + I determined that there are two reasons why LibTomCrypt's Noekeon does + not match Botan: + + 1) Botan uses "indirect Noekeon" (with a key schedule), while + LibTomCrypt and BouncyCastle both use "direct Noekeon" (without + a key schedule). See slide 14 of + http://gro.noekeon.org/Noekeon-slides.pdf + + 2) However, LibTomCrypt's direct Noekeon still does not match + BouncyCastle's direct Noekeon. This is because of a bug in + LibTomCrypt's PI1 and PI2 functions: + https://github.com/libtom/libtomcrypt/issues/5 + + This program uses BouncyCastle to produce test vectors which are + suitable for Botan (by explicitly scheduling the key, thus + building indirect Noekeon out of BouncyCastle's direct Noekeon), + and also produces test vectors which would be suitable for + LibTomCrypt (direct Noekeon) once its PI1 and PI2 functions are + fixed to match the Noekeon specification. + + Although this program uses a PRNG from BouncyCastle to generate + data for the test vectors, it uses a fixed seed and thus will + produce the same output every time it is run. +*/ + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.Locale; +import org.bouncycastle.crypto.digests.RIPEMD128Digest; +import org.bouncycastle.crypto.engines.NoekeonEngine; +import org.bouncycastle.crypto.modes.EAXBlockCipher; +import org.bouncycastle.crypto.params.AEADParameters; +import org.bouncycastle.crypto.params.KeyParameter; +import org.bouncycastle.crypto.prng.DigestRandomGenerator; +import org.bouncycastle.util.encoders.HexEncoder; + +public class NoekeonVects +{ + private final DigestRandomGenerator r = + new DigestRandomGenerator(new RIPEMD128Digest()); + + private final HexEncoder h = new HexEncoder(); + + private final NoekeonEngine noekeon = new NoekeonEngine(); + + private final KeyParameter null_key = new KeyParameter(new byte[16]); + + private final boolean schedule_key; + + private final boolean botan_format; + + private byte[] randomBytes(int n) + { + byte[] b = new byte[n]; + r.nextBytes(b); + return b; + } + + private void hexOut(byte[] b) throws IOException + { + // HexEncoder uses lowercase, and Botan's test vectors must + // be in uppercase, so... + ByteArrayOutputStream os = new ByteArrayOutputStream(); + h.encode(b, 0, b.length, os); + String s = os.toString("US-ASCII"); + System.out.print(s.toUpperCase(Locale.US)); + } + + private void printCArray(byte[] a) throws IOException + { + byte[] b = new byte[1]; + for (int i = 0; i < a.length; i++) + { + if (i > 0) + System.out.print(", "); + System.out.print("0x"); + b[0] = a[i]; + hexOut(b); + } + } + + private void printVector(byte[] key, byte[] plaintext, byte[] ciphertext) + throws IOException + { + if (botan_format) + { + hexOut(plaintext); + System.out.print(":"); + hexOut(ciphertext); + System.out.println(":\\"); + hexOut(key); + System.out.println(); + } + else + { + System.out.println(" {"); + System.out.println(" 16,"); + System.out.print(" { "); + printCArray (key); + System.out.println(" },"); + System.out.print(" { "); + printCArray (plaintext); + System.out.println(" },"); + System.out.print(" { "); + printCArray (ciphertext); + System.out.println(" }"); + System.out.println(" },"); + } + } + + private KeyParameter maybe_schedule_key(byte[] key) + { + if (schedule_key) + { + noekeon.init(true, null_key); + byte[] scheduled = new byte[16]; + noekeon.processBlock(key, 0, scheduled, 0); + return new KeyParameter(scheduled); + } + else + return new KeyParameter(key); + } + + private byte[] encrypt(byte[] plaintext, byte[] key) + { + KeyParameter kp = maybe_schedule_key(key); + noekeon.init(true, kp); + byte[] ciphertext = new byte[16]; + noekeon.processBlock(plaintext, 0, ciphertext, 0); + return ciphertext; + } + + public NoekeonVects(long seed, boolean schedule_key, boolean botan_format) + { + this.schedule_key = schedule_key; + this.botan_format = botan_format; + r.addSeedMaterial(seed); + } + + public void ecb_vectors() throws IOException + { + for (int i = 0; i < 8; i++) + { + byte[] key = randomBytes(16); + byte[] plaintext = randomBytes(16); + byte[] ciphertext = encrypt(plaintext, key); + printVector(key, plaintext, ciphertext); + } + } + + public void eax_vectors() throws Exception + { + System.out.println("EAX-noekeon (16 byte key)"); + EAXBlockCipher eax = new EAXBlockCipher(new NoekeonEngine()); + byte[] output = new byte[48]; + byte[] tag = new byte[16]; + + for (int j = 0; j < 16; j++) + tag[j] = (byte) j; + + for (int i = 0; i <= 32; i++) + { + byte[] header_nonce_plaintext = new byte[i]; + for (int j = 0; j < i; j++) + header_nonce_plaintext[j] = (byte) j; + AEADParameters params = + new AEADParameters(maybe_schedule_key(tag), + 128, + header_nonce_plaintext, + header_nonce_plaintext); + eax.init(true, params); + int off = eax.processBytes(header_nonce_plaintext, 0, i, + output, 0); + off += eax.doFinal(output, off); + if (off != i + 16) + throw new RuntimeException("didn't expect that"); + byte[] ciphertext = new byte[i]; + for (int j = 0; j < i; j++) + ciphertext[j] = output[j]; + for (int j = 0; j < 16; j++) + tag[j] = output[i + j]; + System.out.print(i < 10 ? " " : " "); + System.out.print(i); + System.out.print(": "); + hexOut(ciphertext); + System.out.print(", "); + hexOut(tag); + System.out.println(); + } + } + + public static void main(String[] argv) throws Exception + { + NoekeonVects bot = new NoekeonVects(0xdefacedbadfacadeL, true, true); + NoekeonVects tom = new NoekeonVects(0xdefacedbadfacadeL, false, false); + System.out.println("# ECB vectors for indirect Noekeon, in Botan's"); + System.out.println("# test vector format, suitable for insertion"); + System.out.println("# into Botan's file checks/validate.dat"); + System.out.println("# Block cipher format is plaintext:ciphertext:key"); + bot.ecb_vectors(); + System.out.println(); + System.out.println("/* ECB vectors for direct Noekeon, as C arrays"); + System.out.println(" * suitable for insertion into LibTomCrypt's"); + System.out.println(" * noekeon_test() in src/ciphers/noekeon.c,"); + System.out.println(" * once LTC's PI1/PI2 bug is fixed. */"); + tom.ecb_vectors(); + System.out.println(); + System.out.println("# EAX vectors for indirect Noekeon, in the format"); + System.out.println("# generated by LTC's demos/tv_gen.c and consumed"); + System.out.println("# by Botan's doc/examples/eax_test.cpp, suitable"); + System.out.println("# for insertion in Botan's doc/examples/eax.vec"); + bot.eax_vectors(); + System.out.println(); + System.out.println("# EAX vectors for direct Noekeon, in the format"); + System.out.println("# generated by LTC's demos/tv_gen.c and consumed"); + System.out.println("# by Botan's doc/examples/eax_test.cpp, which"); + System.out.println("# should match LTC's notes/eax_tv.txt, once"); + System.out.println("# LTC's PI1/PI2 bug is fixed."); + tom.eax_vectors(); + System.out.flush(); + } +} diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/etc/saferp_optimizer.c --- a/libtomcrypt/notes/etc/saferp_optimizer.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/notes/etc/saferp_optimizer.c Fri Feb 09 21:44:05 2018 +0800 @@ -172,6 +172,6 @@ } -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/etc/whirlgen.c --- a/libtomcrypt/notes/etc/whirlgen.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/notes/etc/whirlgen.c Fri Feb 09 21:44:05 2018 +0800 @@ -90,6 +90,6 @@ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/etc/whirltest.c --- a/libtomcrypt/notes/etc/whirltest.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/notes/etc/whirltest.c Fri Feb 09 21:44:05 2018 +0800 @@ -14,6 +14,6 @@ } -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/gcm_tv.txt --- a/libtomcrypt/notes/gcm_tv.txt Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/notes/gcm_tv.txt Fri Feb 09 21:44:05 2018 +0800 @@ -3,212 +3,274 @@ step repeated sufficiently. The nonce is fixed throughout at 13 bytes 000102... GCM-aes (16 byte key) - 0: , C6A13B37878F5B826F4F8162A1C8D879 - 1: F1, 397F649A20F3F89A00F45BF230F26B61 - 2: D6B8, 1653F67C9C716D0FC59F3B14154DECBF - 3: 673456, E82EFC79B30CA5235E2DC8BE4C14265D - 4: 26DD7C26, B8D1F4DB845F7D7079DEB8920949C14D - 5: DA62AD1487, 828A42329320764E5FB74D44A6108F4B - 6: FB79F7D51742, 865415BD049E86F3DA2E0B6E25E1A50C - 7: 9D96D1034166BF, 50669247A5B338E183DE5139831CD6A4 - 8: B466050E1330B20A, CB264FA7853A1FFE86E1A07CFA7C7319 - 9: CF16F0B3D9FC6183DF, 647DD6E1F40F385E1DFE6676FB036242 - 10: 14D90928C7236050096F, 930CAAA5536406218885475CA823A973 - 11: 4F2322D66A7079BD7DF519, 3B3931D47413042FAF1313F1041509A3 - 12: F1497906F1D8F4F9E47E4BE9, 469FB0D62828427C2E9BA04041A1424F - 13: 2FAFA2A3EEA4C000702E58D1D4, C9A484FC4ED8644A06060DAE2C3D1568 - 14: 5D707F8ACF319413D220AA2FC2B2, 0EE9AAF5B1CF622ECF6C4F5E5FF4656A - 15: 2C19DBF966D24B2713F82B69934060, 8676246A2F7795ABD435B3C6B4EA6E7A - 16: B3FED6C2315CE6D98729DBE69270A11E, B8AC739AD154744A33E906C34D91BD4B - 17: B2BC44CE088BC3F654B9703D9C691F17B3, BAD8314A171BC0119942136C5876AACC - 18: C6E958E3E9AC836C9626BD66478974D26B0C, 4E6D61833E9DB839117B665A96DC686C - 19: D40FADD078B474EBCE130FB44DDB4824077988, F43E3CD978A6E328AF039CC70E291E1C - 20: E177B3DF83A117E55F255A6C2CD78AFDAFDA307F, EEF1ABAAB9CBE0EE317CC79E7E5E24B8 - 21: DBB4569B3E305E4525F1F7B3D2AFEF226F397E661D, 65ACFB70132EEE1D47319A550A506DB5 - 22: AC2CAF77718DE59131A6B745DE9F3A9897B17580EC71, D8DB9006A9597F640F2594340D69E551 - 23: 8F62022F72A0D769D2D095A55E28832950870B2B44B0BE, A7E196F869071B7BB713E8A2D15627E9 - 24: 37F5640F820384B35F13F8C8C7DC31BDE1E4F29DCFBDA321, D5765C39DBCA72AC89100CCB8864E1DB - 25: 25059BFC302D0F8DD41BB22CF2391D456630C06F1DAF4DFA86, DC2FFD153C788C28D251B78AB8B7388C - 26: 151F158CC4BA9393FDB153C4C72911C120BAB519FAF64719133D, C61915006038BF15DED603832FD179DE - 27: F5DCF4231482F72D02F8B9BE0A41113D35AEA1CD85021CEC978D9C, 9CBD02C557180FBD0868C87A0BEA25AE - 28: 5D88B5554A2ED73054226473676FAA7159CE12B5357D635DDED35B5A, 5AD11CD6B14C59E64B5B26DFBD00FB5C - 29: 5696C7066EA09A30FC8BCBAD96D48A5E5FBCC8756B770F0A89B8711911, B9EA5F3BEF0599D385A9ACEBE4064498 - 30: 1240FED47B305AC1883F8CF137D58E79052B4E686DCA1423A6A2BECBD5F5, 036A5EA5F4F2D0BF397E8896EB7AB03D - 31: AD9517BF392C1EB56D78EDE1C41F3C73B72304DA47F400C390C86B37A50C2A, EB3E026D518EED47F6C927525746AC54 - 32: 2AE1CEED83C6490A7E5752E91532406EAC6FF4B11AA770EFFF1B255FDB77C528, 74BFBC7F120B58FA2B5E988A41EAF7AC + 1: 3A, 03C32E0E9D7E07A410B9BEE40A8F0D26 + 2: 26AE, 3A635BBDC1A17CA40B58CEEA78105CDC + 3: 142FAC, 7E8922E8FA6F1E41E4339F0B52176DE4 + 4: 20C1863F, A1D12620C22EA7A0AA0E74667A20B8E1 + 5: B3B796AA54, 53F0F9F03791BBD76BC99D1B5639F3C0 + 6: FDCFF8EA82D8, B56076B42E3EEAC73DD42FC83B9220F9 + 7: 4695E719E67849, B4A1A2E29AAD713D5677CF425E65A400 + 8: EE5BA3309D417697, 146EA95CED151F8C40DF98C1CC54930B + 9: 13FF05ABB084FA608F, 55550AADC3461CC190CA22F29C6246CD + 10: 008B0102208A22D3A562, 7178534BC7145754BAE525CC06E14A6B + 11: 3536DBBB07B026E78E94C8, AB27183AEA2240B0166D702EEB2A7BFA + 12: 00739D5A27AE82AC7D6A40EC, 4354578C3D241074D3C1F6496420F239 + 13: DA41A5F458400C94B84026C052, DC6CB036FCAE9765A69F5B8C38B0B767 + 14: 4C99797C7EDCEA9D5425565522E2, 3FFEEC557F0D5FA73472D2A3F8E71389 + 15: D381E7AD2E5BE2C97FB4BD958BC2EB, 6BF713D4E7DA7C4290967A1D23F97EDD + 16: 5016C127F16A4787734AF3A3E6F6F0F7, 8CD8458531E94BC8160E2176F63F8D0B + 17: BDF3D0F24D9415AB5CF9B87BB45B4A8AE4, D81A3D56451313742ACE53D41223F6AF + 18: 68C1FCBE22FBDB296C246F2E34D871A6902E, 7AFD64D4EB0DE7E2A842B518AC6D483F + 19: 7D8D3C31E643611B0B557F29B437F635FE3FD0, 8501B61DBF4A4DD19B87E95055B95962 + 20: 4185EEB0B9B480F69B3EC7A162810073A36AD95A, B9BCA6D9CA0AC2B4B35D7BFF4DB27D25 + 21: F991F4A481E322FEEC6FE9302D010AC4C811B23B4A, 54FA4DDA92E57509F4D48D206A03624F + 22: B288424FF96596B2A30A1EB9480F5EADC2F6D8551B9A, 2C998C8DFDC7663C8DE677B2F1CBCB57 + 23: 1066FE3DCB9F8AE0DC0693F7179F111E0A7A1FFE944FF4, 65402D1F8AFBDC819D6D1ADB5375AFD0 + 24: 0A8772CCDE122EFF01D7C187C77F07BDA50997B4320CD0D8, F55823AFC3D9FE6E749E70E82C823925 + 25: E6E2FBB3E2238BC8CB396F463C2F488B4B4933087728D39815, F06DA35A9AEE65F9AD0DAD5B99AB4DF6 + 26: 569BD39CB1693CB89B88923ABE0D8CFA0B4F22A48A15E2EACD4A, 661AF51FF0E0E363406AB278BFC9176D + 27: 199EED81C2428170EB089060FF9676596EADD2270895A0C8650903, 90AA9C634469D45E7BDD9AB955B90130 + 28: B5200497A0654009B9F5B0D45FFDCF192F3042D6B05C6D6A8191A7EA, 71F6C4982AA50705D5FFC60512FC674C + 29: E39DA262C0E851B5CB5BD55A8B19D0AC0ABDC6FF3F32DF3B1896242D9E, B58AA05F594FC9779E185353CC52B8FB + 30: AF349B91BAD4BE2F2D5E4DDE28A1AA74115A9059A5EBBF9E38F341DC368B, 966B04FE43A2A9D94004E756F7DBFEFA + 31: 8C87861DFFDE72FA64E926BF741330F64E2B30837650F309A3F979AE43BA2E, A5C825AE1B844D6A8D531077C881BD36 + 32: 924E178A17FA1CA0E7486F0404123B91DBF797BB9DBDE9B1D48D5C7F53165912, 10F972B6F9E0A3C1CF9CCF56543DCA79 GCM-rc6 (16 byte key) - 0: , D595FEDAB06C62D8C5290E76ED84601D - 1: 4D, 47A6EDEF8286F9C144B7B51C9BCCCACF - 2: 0085, 9788DDF89843EC51120B132EB0D0F833 - 3: 463701, 673CB8D248E6BECD5A6A7B0B08465EF6 - 4: F5B3222C, 1C424282D7FB427E55285E20FC2ABFF9 - 5: 3A4A8361B2, BD40E631B054F280C7973E5AB3F06B42 - 6: A475866BF2C5, 2067F42FAAA6274270CF9E65D833FDED - 7: 689D0D407172C8, 3BCCFFC64E56D5B753352E1DDD5CCAA3 - 8: D9CE4B051202A1D3, 79B0CCDA3D0B9C9BCF640BC9E6D9CE0D - 9: 0317D68BE098D276B7, AF35043DB6213DC5D4F3DFB8E29EE537 - 10: 154CEF0C6F37AA0A73C4, 61E598A8C6D17B639F9E27AF55DD00F3 - 11: C3DB1B2B6CCC9170B9C05F, 966871DDD6E110711FB9DD733B6B2B3A - 12: E4F22383C75BC0FB0E59C5E8, 971536AF878F4EED68F59046C928EAC8 - 13: 2FBFB99AABC6209FB8664916DD, 68D0BF2144AD1ADECC4074DAE58540C2 - 14: 5FEEDFD09BF89719A34CDCCD2AAA, 64DEB7D5E6891103AA54C0EB366715D0 - 15: E063A076E0C770FB010D26C3AC3EB5, 0CA321B2A7448FEEF84D4E0AD5BA2DA4 - 16: AFB0DB9959F0906BD346C2D81DC5412C, 425627895E2C4C9546D3227975585459 - 17: 79179C0D4D6C5E0741DD4CA1E8CF28C75C, D0188A344A1CEE52272FE6368DB0FB75 - 18: 8A75521139B0DE3C08C9EAEB77D8018A39FE, 47FCC200D8A384320D2F1A5E803A9991 - 19: 0399381D0A975AE3980A9FB75B991C055AF367, 034915370AF94B96A8A4E50FF9B134CC - 20: 8C189094DB13FBE62EA5C4A53C29A428ED587BA2, 99C58F838423033298897841ED526347 - 21: D91F5144B525AF5D47EF4D5F0AF9915447A55927F9, F6750BF7E089515D35B47BC1C65E2E3A - 22: A4E26B554AA277057A5FE3FA08A6138CEEC6D69BB1D8, 7BBEBF52D8251108C7AA1025E213EC44 - 23: 5C1A8C3A46FCA90D73675706313CADFBB90A535A4B3D5A, E35244A2633478BBDAFCC81161F28B80 - 24: D69F7264FC594057B89181B83582D799AE54E9EE4FE8AD48, D4B29E5C25F9477D9345526DBDE9372A - 25: AFD322D0AC4AF38D5B9CBE0DFE85618C001A7A77CD8FFFCB3E, AD06BB9C59D23D258D6A2AEDD946AA20 - 26: 179CA8395CD8E75B4E5EA07D25C8036AF08B1A1C330492523D36, E3704C4341A834C087500E332B7DEAE9 - 27: B9178EF7774684F43F1FCE99A4319B5A4D167B0A848551F562CD7C, 5D5082FB02B9B494D5883DF49DB3B84B - 28: 830FCD15A09EC61245D7DA258E308E76D3B542F2345DBFC11AE983A3, F50C3332F8D91911BDACCFE228565E5C - 29: 179619B8C7EE9B3121405BBED2AC102A027E6C97EAEDB5ECFEB13792EF, 859EBA3BADCE6E5AB271A261B26DE28C - 30: 14264C7E0A154119BF24B7FCF434E81440D42D54738F0BAE55836849AB85, 0B6C9B9CADB1B6EC71CEA090C8C72834 - 31: 0D7A316F8B873F62CF26CFC569179AB11CBF09D3467936A85ADC265B2C9A8F, 866AE7C51EC2D9DEB32748A1C8B61143 - 32: F8FD1F967CD3632805AD7FA8ECB40F530927DD5C49D31FDBAE49738E2315905D, 9CB1CB84A727C9F42555EB566E0A1DEE + 1: 16, 2CA928694EA91AF92B3ADB402FBBCDEE + 2: CD9D, 4A9940BD7148F08AE75A4F238148C174 + 3: 6D1332, 5CD73043FD797D1375AA011D2E36896A + 4: ADC34199, FF5D2B40B02CB58BC63AA6D1CFBA811B + 5: 83158D52A1, CB8C45A56D7539CBACBB85DFB4C1F52E + 6: 66E32F053C17, 3EB9AC9A066DC66DB4973B5C78C6EC0B + 7: F23224FEB14897, 0ED4890D034F20A9A78ACA7492AE9341 + 8: 3FF9570F77486C86, B82C19DE2C5CA6CAAC223F337173F840 + 9: 44B4F4130619FD516C, 6689DC410118E0DC2D90ADCD6327049B + 10: 6E205B2537935E50A1E3, CE5739FDFC13D279075508786388C08D + 11: DB836471D91F2FFC6A199E, 1518E9A6CD2190D32A9EA1AC0849DF09 + 12: B9936A58667AABD9BB9B2ADA, 388894E75CEF512CD5E3986DFB2CA589 + 13: 1B5072C8FC0EA19A0486C0E04C, A804D99E2414A314440E5F4B8BDCFB45 + 14: 614903F301B1E7C092E9A32C195C, B4F7406533C58AC54869F09C4B0801CE + 15: F30ADEF328878D174B1AEAF5D7137D, 7C5BB92772540C1E2209B77C78AAB092 + 16: 776D20B980DDC7C48ACE4225F59E2736, 85DAEE9785EB1BA9C99FFAA5AE565159 + 17: 6BBA225325564369BB5F11EF5734604938, E41E0E3C31F4B1770AB93750A386286C + 18: 6EAAF9EF0C149A13BA535A2AFC398281017D, 10CBB6A874711DE179D8A4EEDC4DE085 + 19: 9D0B62274F7E5426F5AD9515DAAF4742C291D9, A35D18485F881CB0BBB00A9421C9694C + 20: E6A18F640923DBB22FCBCEB0ACD1A2BC94256212, CFCFC7E7E5C64090DF746F8C36F605D4 + 21: E37EB92C38B47C6E2621C2CC64D83CCCA9104C2095, D88C0FBF2402FBA40EB525118FC2CAC8 + 22: 0E690F9D73E7E689AF48FE5B99E58AC42F3702EA40FD, 33D698F9C44FEB68C1C442B30DD36B9E + 23: DA759D58629FA946FB635538C1AED318890C4D84EB6610, D7BC6A69DA658EE3DB842C01B9085A07 + 24: 581F86B5A844FD709B13E09A7CF64ADEA84EFC2D7AD9300A, 0296F58775CE4D4E92C4DD0CF65CF8D7 + 25: 78B346A03098BD6EBE0BF56F5C37C83B3C42288D0E031E0D4B, 2F89EDA70B8A31EE64B264C7C5165AF1 + 26: ED768B0F18A13ACF40738FD61642C0CFBCF746D60887A8C5FDD9, 56EE211AB10B37D61FD80692A76615B0 + 27: FCC298575C9F4E1DD2C8B0482F9FFF42EFFE565ED5FB178DC56947, 0EBA843B28F91798D79E2105995EF662 + 28: 4341133DA062A885DA6D7BF4387C6F28829E65EA7DB7E50B15F2D03F, DAEFA9D1230FE3084FDB91AC7ED35503 + 29: 777C13A7FC16345BF949508CBC1051540928CB5B9B36569488109FB60E, C8DEE566513233B8E74ACB1046FE87B4 + 30: 6342B6FEDC0B8868AAB5E870CE1B2E420269CB11DBA74F10C5E978F2B44D, B2B001639A2A0BA045023817947573E4 + 31: 99A123D836EF76A4250A960DF7DCFA231C3595EAB53024F53B961EF80901ED, 02E8820F6D31A23DC9F0DCE511A1F8FF + 32: BF57034D1EA94A6DB86642918EDBC9CC7D6C39025F9EC528EAA2A9EE7B22EAA1, 7801231ADBA83C137D760AA75FF2C9E6 GCM-safer+ (16 byte key) - 0: , F769B436C7FB7C0C822E24BB2B2555D3 - 1: CA, B156298625F5634FA012B23044437807 - 2: 4960, A64C73E890F3D77B2C3B3C76C2D913C6 - 3: DBBB8D, 686651A017F89A22F9FE96533C85C52C - 4: 150AD99A, 177F7DE9E897DACCAB7EACEE3CDE7601 - 5: 077055065F, 48B4309C76CAC37BDF11842311BA6CD3 - 6: B2F8CE062C06, ED04DF96C06959524956E8AC5C338457 - 7: DCE718211410D8, 3F8D8180BDEAC2F018EA81615177CC8F - 8: 0F71E2772402AC83, 2130481B2CA7B4B4C8F3EE73B3B3C28F - 9: B69030734E5ADF753C, 8CC4B62BFBC3EA56CCDBF0ED318C784D - 10: 6B8A91ABC1BF2F2D0176, 86EAAD80D148A48086987A40A5631DEF - 11: 44AD00799EC8E62E34D6A1, 016830D58F06F75E54531B45D9E785F9 - 12: 0C4B9381D78E0F0A78B3CEAA, 4A79C58DAB131A22F172F9177DC4158B - 13: 2C56D4625876524B4D8D5F079B, 7B407F704225B25F1F136C984E564147 - 14: 36424D69BACC56407D345B3D7B4D, EB126C255A2DCFD32F69DD5CB61876C7 - 15: FDD3E091C0420D1A4D4A848757FCC2, D319C5C07134D67BA42A4BF312CD874D - 16: EFAF6F117EA9A4B4B83052BBF5A07DB9, BB09D473FE82257146E7ABC2EFF6F631 - 17: 19B71383C414BAC3EF252FFF09F5ACD777, 526DC9AE6895ED33A34A9A4ADB07E1B6 - 18: 9AB6DFDB930D26E00B3D98DD5AD014E08756, D70B95B20C106A5A03F9B803D2CAC3A0 - 19: EEB3C236C3031DE4C3F94BD746677AE84B271D, 9483BBCBBFDBA1CC5F6392DABA2ACC19 - 20: 3A0EBC7536F8717E8FDAFEDAC39E8F1F43C0627A, 3DA7DC2475466CEDF01EB543870A74FA - 21: 79D28D2F149E1D97E910342DF383FCEECF5AFD4C6A, 2364F33BCF6F07E381F7E26DAF802D83 - 22: F1D7C319BAFB740332CA19AB0C9B71728D3AE69BFAC2, 3D4AEE9780A5C98CBC69606CDDDB31F8 - 23: 1A0D80381A186673FB7B52C40AB6C46A11AB0889333C20, AF5C17E3D0D9724EDC1FC438A16B4EBB - 24: 5E503440B22DD6AE6401BA4355C8791BACC598C9E0F1412E, 156D8221BD61F5C108FC18FB2F50D159 - 25: 7784EFDC6F0FC56FCADAFF17BB52DEB35B64FA19C3F391BDFD, A291E8238EF158A2379692077F70E8D0 - 26: 184B6E18032D1A70CE5027912E447C357C72EEF7B20EF0FB256C, 0FA0138FB9480E0C4C237BF5D6099777 - 27: 7AC8FCB64F35B71C5ED0CCD776B1FF76CE352EB57244085ED34FE8, D995B3C1350CC777878108640C1CADAE - 28: 86C7A01FB2262A8E37FF38CC99BF3EFAEB8B36166D24913BDD3B91DA, 25EC6D9F69168C5FA32C39631B606B55 - 29: 91F5D3E3FE0B1976E2915B8DA3E785F4D55768FD727AEF19FA1552F506, AF902DED55E386F0FC4210C97DB9446E - 30: 7ABF5BD9CB2EFF8382C6D2B28C1B0B25540E434123AC252046BDDA74DA32, 713259EDDA9B1B63EB68E0283D0259DB - 31: 5634B23ACEF2874BE0591BE3268C4538698FF2D93D59B39BC86D0137DACBAD, C4054796AFD335B43C60E7E634122BAF - 32: F26C68C36B1E56449595EA4E162391E0C6A306592949F69797B6C2327E533ADB, 7B392AF776A94983078814B6B8428BFE + 1: 0F, 62E723CCA67DFC49C1915AD3C69FDFF7 + 2: 87A7, A73B3D416AD68235C662E9684430FAA0 + 3: 40FF80, 8EC11FFA3B777664FC6D2AD37AED3765 + 4: ED5B1716, 1A4FD3FDC9D197866FA8AA1403E3219F + 5: 033CF349B9, CA1E6111A5BF539931490D2EFDA7575C + 6: 23E30716B131, 79FB546DE6C534A18BBA604E8E2BE8D0 + 7: DE67DCF5635B0D, 463989CCB9A972468B870C403AB840D8 + 8: AFB5BCFD6E36E41F, FD3A63618F1D31A8A71D94FE91F41501 + 9: DBA0EB7B664D303BE5, 2860B5516CF0CE20E35BF766A4375EAF + 10: 2826E6EDCFD7E9FB938C, 685E8B032254DFF65DAC8A44C3819E08 + 11: B70FC9EE54123F45A4E67D, 8661E54524A0F12612E000876E8E6F15 + 12: 5FC3C79807594E403B82B9DB, 9D88DACCB8654708B241A505AB12FD47 + 13: 2C7AC463E62BBC014E1A48E15C, B4FB110193F147E4A59EC38983528047 + 14: 046D692C6B2827453F7BA3EFB609, C4E46E0D5F71D2D477D7CD12B7447713 + 15: CD693A49640E00134FE33C9E324122, F43001B425E37C094BCCBAC49A6471C8 + 16: 9FC2042EF22E0F8A767DB0C52109E4F5, F60730D914AA02A3BCED7F737640B9FC + 17: F09ECC9AA4FE3596C00D0AF4E052E60755, 199B8C9CEED9B4E70526BFE603FD5E45 + 18: 0C8BD929E87A21A9F043E47CE79950EA0E75, EC9D38AB193FEC16EC470A15E27FB367 + 19: F621E43B7FB21D98544817FB229C2F308361D4, B6BDD4053C4DFBD3970A5055E4A7719A + 20: 63F1D36ACEDADC63627CD438B379C48D648126A8, B1A7217302F84CF5F6A259F2881484B6 + 21: 60BAE96D5E0F248A257CB3A7788D6107CFB525D20C, FE60C3B3E2029869EA063BA3B981AB96 + 22: 01213496633A4525B2C7CAABDCFEB84193A8AE2D8059, 738E7956DA8464FF655CE4F5B0A005C9 + 23: F6822F3C87B238F6F7E44307C416B6366C18B26B2357C1, A27A98EA0AAFD1D3010DAF4070F52E7A + 24: 32B49BE196CC3825B7B6E0DEBD90680B996C3AA161BB52ED, 8505573CC5191577BD992A004F255953 + 25: 38361B85808140127A44B364046A5E1FB0B86885D5030110D3, 17DF461782D45807A7709EB2BCFAABE1 + 26: DBEF6C2067BAFF378A285EBF685F559A896B76A517292B4301F0, B6061185764BA316CC0163925F27A1A7 + 27: 15E2A0634520C0CF4C189436D35DE01CF5C83F0684CBC261A59AC5, DCD96E1687F24676838B60E873D47087 + 28: F837ACBF63898720B0527477B59A8EA74751DABCF2CC48C768AB421E, 72DD76EADF13C65E6F322E110F9944FD + 29: FDA50738B60251E5FF1C38AF0A8E3F619D247C24A20D63B372571AD6D7, F1F1B212BD7E973BA17BDABDF27F5AC3 + 30: 0CDDC7A10CA3F3616E923A751EB638CF1E67CC2D17A03538C6A2BEB8555F, 7DB533FD15E48FFB217B18E91B7B2928 + 31: BE0C9A148FC3344025C8BD35AC883B584AC706F540BE1100A92DB67EF900B9, FD172B0942DDC1EA076D46BA46B9F7AC + 32: F8256E9A41BC6E09084274A91229DC877257C433E3E43F05FDDBC3584B6093D4, 5CD834DDE7406085CADD5BEE122AF052 GCM-twofish (16 byte key) - 0: , 6275E8CA35B36C108AD6D5F84F0CC5A3 - 1: 38, A714210792F9ED12A28F25CAE3B3BC5E - 2: 8E2F, 6357C1F125723F2244DAF344CDFCD47B - 3: 900A4C, ED4E0B318346D5B9B646441E946204E9 - 4: 087EAFF8, B871ED95C873F1EFA24EF8B6915F447D - 5: 63FC9EFBD4, 650D0ED98CBECA07040AB97B97129360 - 6: B6081E94AA19, 6A3BDA8030C5A79B6B9087555A1DA67B - 7: E10A7B9CBB20C2, 59EB55DFD0A37C55A869834E597373AF - 8: 94E947FEE05780EE, 354918527F855264E37DB6892E868050 - 9: 9A80C567AA50220862, 814EE57CC9D51D7D900AB4840C4B072F - 10: A8741BE1E42BE207C416, 2B28AFD8ABE20664D8BAD7535F82F11A - 11: 6AB7E3C68B6682023E8190, 5E48B67541FE83969952394F84D29E93 - 12: 4F66FB634EB258CEE2955D84, F2632C2135B6E1144673B0EF73499818 - 13: B29042F3877C2F5E694953C5F6, 03268A30499D57A06AA873EF00160C3C - 14: DCC7B5D9F58C88F54A9611389B8D, 5515426FF7CF2EEA91BE2B3752371CE0 - 15: B665488BCD75FC02A0DF7994B7CF98, B721531E2A317C254FA2ED306ADCF96C - 16: 9535DC8A72645E34F948B71A5159AA9B, 5CEED93DE128044F0471C65AA8F21D29 - 17: 5CBFC61A23D28562FCA929375E5B585327, 3AA842B21631968D1B58B72FEE090EE1 - 18: 2AC3F780B956A933C0B8565EE527173B8CC8, 16EC4B6D8E2CF3CD0D16E7A5F401C78E - 19: 5067FD65870A4EBF6C7FA811A15270E7F8F17D, 9A7563BEDADFA6B6E48F5C13FCEAED6E - 20: E3A65A188077E5DC171CFF30BE8B27F10F015166, BD5B3D84D0C1DD51A3909F849141B57F - 21: 88D0A65C105823E68BE3987CB205AE0C1A27588FCD, B280221AD0BD83E1D6B37F331F326AB5 - 22: 7C56D987FEF6807EEFAFD4C7EB9D72AA0E037979D91E, 686E1268A8DC9CD0192A383EA6C2D975 - 23: B23CCD0A076CB122750B634B9E6551E0585EDEA18C3245, 6DF30A7F0728E2D549AA411AE375E569 - 24: 767BC3AF206E67C9E27A4D7E814F3B3A65D27BB70BA9DD4D, AB2B16C031FB2C8E85B3B2B38A5CBA4E - 25: 9ABF34ABD43705D62F377449461C5DC239A2A86E5A98AFB159, 3DEDEDA85E6BFB53C6F18726CD561604 - 26: FE756344C05CB12AA0673F1C2069A86556E583FF4B7313A0D395, 21CB0E0BABC3C7E547F5CB207295C0EE - 27: B70F16AD19A6B0AF6D8DBF4E98D7D5ADB944D91BD889D9390C3E21, 2AE67812A22C1C785D3BFC184A1C74EA - 28: A6389032AA9D08BDBAAA5E230E5130665FB4F0CB868F3F20C4C5438B, ECA054EFA3F39400A587839C4F0605C7 - 29: A55A41315EAF3A67A0FD0E14C6E04D03A5E38D0F756719F4A0800B290A, 7A5277809D4B65E663603099B4DFFBD8 - 30: E739633579AA6201A024B9873F28412BB08B08B8616D611BC9D07979BD3A, 390038A93AFD326C5CC1525A24CA91AD - 31: ED3266F8B0DAA7C3DB7814427E8139831CFC0EDE668F0DA83FF7090154410D, DE440EC2C6080048BFF3C5455E1BB33F - 32: 4D0F751B55DA3A2E0B28DE59E9680669FCB5984E9C0DB942DBAACDDEF0879731, 62F96CFE31D3D6AAA0B9F5130ED1B21B + 1: E9, D82A22BF49B52DECE1A3DAA163956EA1 + 2: 3DE3, 837CB2018053A6FA9A51A18362C0A6E5 + 3: 1123B2, 280150FC247D06FF79ABE3C6C5ACFDBF + 4: 6BE74C72, 52FA635AA14154D3FFD7A4866AC989E7 + 5: 7610B2DE22, 3E77AF501CA8EF386E2843A2C9F30425 + 6: 31BBF5CC9F77, DA25899A5B84C4CE3CB031D24BE39EEC + 7: 49FE2D43D16BEF, 491CAFC0F9A749AF0F87CB5276FF7BD0 + 8: 28191B8F4FBE3C03, B8318CE8B7EEE3BD42A35F7EF7B4FE91 + 9: F6BCC7AD009DF4B71F, 01BDA4572E1B95D0152A8675BBA9F6B4 + 10: 89B6B6B611CBBD4AB667, 5AD5C05B2FFC3AF07ACA04EC488BC4BF + 11: 985A04A3BE0A43A3489870, 57AB64D52976293C09882943B8622A0C + 12: 15DDAC26F9C07856F5C11CCA, 183A4FD20C0D7AD1744B77992D4A16C1 + 13: FE45E506C3C26745D6B5B53A36, 67B3768535D1A50D2756AB4ED83C73F1 + 14: 8EBA337B5E13FC16BBB18B8F0B10, FA90CD334FA6565E517097C37B7281C7 + 15: C9F914A669C4C58ACA86884FFF469C, 876599BB8BC1AD6E7B1DBB00ED53276E + 16: 8416EEB95A4B3DA645035CBDC76C8532, 405B3A936CE697DCBA9385CAEAFE2B55 + 17: 312BBF82B6619E5F7EE56AE873CAC9C415, D5FB2028CF3F6C57295BA6F7E5F410A9 + 18: 1B51044539639A7093D996E3B4174D6A253C, E934D7A7EF90586A56C6C2DB53CD6C40 + 19: 178762C071950E8E0198E6573BD585EEEE4E69, DD661E463BF3BB45225F7E7A6E0DE3EA + 20: FFD6BA51FEDDB7E20593AD2BF0EEE061D3B5C014, 0DCCDAEBE6135EDF787FEEDABFF3A4F3 + 21: 04BE622B5CBE1058A4C8356F65B8158295F39E1AB1, FCA9B0BCA348B319D0B19DD28EE9DE79 + 22: 8B49016BFA45DCE019BA9E4606E987A159ED0DA07D2D, 6B93BD424871D5231EB359E40666CC5E + 23: FF8D016642B2C3190094423F5A61F7CBD358522A5E5799, 2088A4088AF6F786DFE08AED79A19B3B + 24: 07F446A2E3597041B9AFFEDF5DD474CA5FA5C872844A4F8C, 870223F7404BA37C8DB940623F0DDBE2 + 25: 32C2EF41ED54C8B63AB8151E690C1770CED90D2827EB2C302B, 5BC4EABF30986EE33FE483B8FABCE7D3 + 26: 3310D94B00007C10D4B3BC3F57DE877D0E2B822B96DA9CFEFEDD, E0E114CEC34558A180675B0438128F30 + 27: A4C95A5B316AE03A569B7862290DC6340FDEA1299C5B27591333B6, 63288F9CDEB93BF029C194B2C62B4AB6 + 28: CB63472F93E0325123558620DB9FBA058455D8AF1D23A94BEBB60A79, EC0968F60DCAFEB17411C4A2D7793FCD + 29: 74241261257C5610211A3B9D45D62AA0876B63EA289FE938FB03CC8D1C, 4A18EAA2039B29F0CEF7745EB8AA7DDD + 30: 6172080F96B60E3BA450BA195EB4D6732A25AF30A109031560915C4C0344, 3B690B088522D3EBD6B647070AECF97F + 31: AF52E18DE8608C39FA886377899C66AAF8612513C21C7B815E248D9F75D775, 39F0F712265F44A442A7581D8F314D1B + 32: 64F9AE4A9E6735D348343EA7ADD617F0687C2883637468BBFA3664F9194F1683, 947A02C9994DA490BFC9E036305B26EA GCM-noekeon (16 byte key) - 0: , EB5A8E30D5C16311864E2D8D32859ACB - 1: 88, EAB88DE1EB7BC784A706B2D7946798D7 - 2: BA1F, DC3CEC6AA324AC7D053EFF7A99AD3069 - 3: 9A1457, 4AB65831DE378DFF71C20249C7BEC05E - 4: 2F9496D6, 800745CF95EAE3A698EDF9EC949D92B7 - 5: 84153177A2, F6A05B654435ABDF5F696C0E0588CB5C - 6: F80B7865C766, 2334D0061FD488D15A6AC8E44EA1F4B9 - 7: 872EA486B4EA9D, 3A49671DE347F675AD7904DDF4255F3D - 8: A4EE5750507FC831, 956D09F7C5FE812C6FB982E1DDBE864A - 9: B5874AC964FBFC1A97, 90FBC75F45BFF58B3A1100393955D0C2 - 10: 92FF5FCF1EC675E02E71, 983C96A7BD4A0DB5D3B877911CE8A6B3 - 11: F7BCA69A9C7033D84A2BA0, D4ECE5BB9FFCBB331A646D9CE8078634 - 12: 5E1041B4554C8CDD14AAF16D, 1EF777F307CB96788B9120FFF8A8BC2F - 13: 7BB7289FCAD209D7992EB7AEDC, E8AEFB830DBAED2B4A790FFEF940A20B - 14: 12776A7C937A648F0A8628AD8C5C, F070283852AC030819EA67BF82C719AA - 15: 7293476D9E935EAE9DEB66F697F662, D6322603671153A1EC1453CDA5978E15 - 16: DC12A86C85E7358919BABB15A3BF5FD7, BBBFA467EBA8124DFEC82DB0137D56B9 - 17: 0CC1DAD00A987F9C57E3660D9417F226E5, BB8AF5A0B5BC79BD11C5D41CA80CDE2C - 18: D0049115D6EB5495FB391CDC494022AEAA48, 682FF357B2BC059765C29AE6CA668D0C - 19: 48FC54A401B4C06CE8567AD298B672191C7E84, 493A4AF4C2A8828FED8442C4EFF877F6 - 20: 90779795821CB1B7DBD97028E29DC1CE7D0CFAE0, E126F485F73B6F7B3894B4CF7E1C5DDE - 21: 8CA5C246C8B7C04BD7171CAE2D1A892D66302433F8, 5D73149A3635A86B3C34DEA5B95CCBCB - 22: DF082B665F7A952B2604C04554B81393FCC7C0B816C8, D3569ED7D431176B286EF22414E4CBA8 - 23: 761908530C9069E189649ED24B6A68A89B067C31E9868C, A258BCD83D3FBC7AE2AEF7516025AB36 - 24: 717048F5A31F3C89D3704F90069AC5D5174118770C65BDA1, 067EBF18F7E3DF4EA13F9ABAC682C2A2 - 25: 08C6FCC5D3099347C3FEBA3858A6C22C51298CB591DDB77827, B57BFBA40BE99DF5031918A1A4E2CA80 - 26: 2CC53EF7EB954234E64CD4D60FB1D7157A489ABABC10900FFCDB, 236E769611D16EB7F463B7578770F886 - 27: 2556B46F2E831223D632F2691329A874F517687AF81B8322AC55D7, E213A90DBC31DC261A45A9AE41CFEEC3 - 28: 71241792728594D69791B80AD6DBC6417D1D14D222DF5E6F834B82C8, 601F97617708B1945BCDA8A82496EFB1 - 29: 5003DC2EAAA23F9E2221CCBB9E20116692CCC99B3CFBD0DDD3A8491E7C, 3743155B792012845550205C8949B73E - 30: D0589675357E850333F854FBA160688F06D122DEC00CC2620DA0B2770765, 20E085752FC4D37791C22501ED1DB6AD - 31: 645B46D2D114EE7329F14AC1D94E6817EB385EB80C61F014F90530749079EC, 8A18DE86F9555A1070D0BFEDAC15B14F - 32: 068389206D37BF5A41C58075FC98901C3B42E6F2F13C09F4E92524021BB1C1C8, 370B86914D63CFEE8303D538A6BEA0E7 + 1: 05, E18F8A201F281A4F3F4FE6F43A001107 + 2: 55DF, BE4D95A0BC5966CC2E80FB544AD43B8B + 3: 0C5A1D, DDAE782864D5EAC894C863D4D2E3CA54 + 4: 767CCE5C, 106D7DBE5D9D56D38E6A679528C72688 + 5: 9F099BF360, D4D50BE3B13DE7B18BE415B21BD9AD4B + 6: AE4B0C056B1B, 8E0EA5A5F612835B1A498C671413CA19 + 7: A8EF51FA62B5F9, 44A65E1A85C9C102467A50297F8256B0 + 8: C58D955A860EE8E0, 45622020FC40884B61BE3C35B940A870 + 9: FC5F5562143A7F9AA9, 7FBED30D1594D1DB57BA10EEF0C4AABA + 10: C2B2D5B922504BD29C23, F14AF5025799EAF249745F1B91AB554A + 11: 62C250C8548BAF088DD01F, 6D49DB3F4D3D8D30DB0B26DCF6CF6A80 + 12: 3FD64FC5BE13ED2AA041B8C5, EDC192E68D5A7B37F395B794C3D8245F + 13: A84B4EA6C8CF088B0C6D40B5E0, 01EE07A0D3F4A1957579C1EE36C5D5A3 + 14: 39A4C10E5C542FABA9C6138E02D6, 8B31EDD92A71F53ECEF716E08CD0A3C3 + 15: E4DF855B9065B51C47454CBC3209A1, 4714B347E11804D0AB3241B1D72F4FCB + 16: FB6D42C9C44997D4C854BA321C8631CB, 7F0BD8708CC6358899B7C62A7ACEE739 + 17: 81A2C031F0D5593DBD283A9650A4160185, 3267D10C3BE6044B0D2E0BB59A919AFC + 18: 33776FB240A45E1A84B86B49FB04A350B9F8, 3743BA55B523F4BFC25E8B2474347C70 + 19: 4E19A791B6EA4B776C5449CC3AC486EE9EAAE7, 9D4FD554D57E73B6789D20E262E706FD + 20: 10B946D1B1C005516B7DE7F51CD41C8DCC581DA5, 3F41B2B8FFCFDE5298473D2E6FF76227 + 21: 184C4DD415AFE6FE74B3BE662AC04E6229F517F4A2, 158749C83A13B178F0FB7C48E7A4A19E + 22: 6DBD3F3888A2028841B61167C3EDAAE71FC23774C923, E0E87641B9C55DCC041D343960C9417C + 23: 6D995776DB3B90B038A4CE44EF2D4EFEA16DFE0A5BB054, E14F63E6C6657CB904B16EC4F2B82972 + 24: A955576527F9A240B13F9DA2FD67997D5E606D34548C1444, B8FD23A3EFA33E7F4367C61E071F8BEE + 25: F7D9EE67BD019E97A5EB7A33B7A307B2268ED7BECA95553D92, 6B31B756C9B3EE98613BB29B357FADAE + 26: ED68485EF62E89965CC8B085CAFE89BD9661ACF66939FB014E1F, C57A80259C493520E50902597EA3EFCA + 27: 53365AF657B186724902E8011368D6E49DDD2158F51EE0FFFA9658, 8EB890A78716344E79E4AD48C52D423D + 28: B49CCFC3FEAEF5C8DE4E41EF538A537552B4957E8965E454FFA3B5F7, 7CA3442BAF416B50431BBBE5CACD44DD + 29: F02E7CA72035455ED723EB802E66118D5FA642295416F12AB298567AF8, AB211AB9624F17975279690C6D95EB51 + 30: CA4C2EC503773BBF34FA411340CBAD6A9115E81B073932444ACEC5537614, D877D5B78FFB31CC54142562BED1890F + 31: 9B9BBF2D46D301F3ECDE92A13C1EEE8F9F1533AA4AADFE2E22D36D51F5F469, F03F634BCCAC070F210142F737542491 + 32: 92AD34E95350275A4CF208CC1A07776E7A6635EB8F2A7D4D9B6B6C96D6812616, 52E49767709D7CE349AAFC0C405A68ED GCM-anubis (16 byte key) - 0: , A0061C2F3B2295BFA33BC74C037EA8DA - 1: ED, 9E5648DCE40DE37B56C557D26CB18D83 - 2: 6719, A6605253C59A101FF85C5102CE92BE45 - 3: B8873D, 13F3E3ED3646BB296EE4ED5D6379A21B - 4: 5AA6E2CB, 1812E8385D15B5BAE043E4E860BEF490 - 5: 4F6F4CD8E9, 8A80BC5E08929C42A5A74C5D9ACC0C6D - 6: 2F0D8B483CE4, 316F588F78FC6A9196C97CE59B9B63B6 - 7: 82D885FDE1F948, 7160BF556614511F53738A92B5277056 - 8: E4931462AD41B6DC, 7CE24C4D6B499975FCB72B5E2275ED56 - 9: 503AA70BE698BC5B41, 10EA0C61FDBA8FF7B4E9927BCCEFD911 - 10: 6B2D213D14B5D25EBE36, DC3222AED12EE26D3D14E2E733EDB2A7 - 11: 7D8B0BC1B7443E7267371E, FCACFC73E391865BE86E041F51C45E81 - 12: 9EF3BF8609E133BEB10565AF, D84326D4CAC9D5B74FCFD8CBAFE79E77 - 13: 59AE7B1FDE1178CEE7F63C4894, E1BCFCDCA86CAB9C684F7D21962D580D - 14: 564E7B8BAC5582A3BF1178916569, 54804D8DF4D7577EF65C15487695F840 - 15: 758A6DC437C8821274B0F16F911BAA, 19DD27500915F425F34F67CC2374DC36 - 16: 0468C94A88A27AEEE2B3A973065E53CC, C743996C6F49363B2F4613F24703EF7E - 17: 3B0CABA5EEE44B7BFF0D726ECED54763FF, 14D9D09815BCD91DCCE2F5AE1A9929CF - 18: 5B945D83B98C43B0248F9BC0479E332869AB, 67A275F0313D4245B1965411CFCC8F17 - 19: 97332441CA96DE8553A3C6D898FC6D90C86DBF, 73150EC3D6327E3FC8015A6192652D3B - 20: B9A1778FAF9767160D0D87816ECE1B99AA727087, 0C173D3C4078392CE377313C48D2BAE8 - 21: 5882B73911C7D26EFDCCA3AED2EDC8A8BFFE75B1F8, 8F8C535639A0B59537E590C7FC9D2E53 - 22: 70AEBED8CCFFF6E5CF06F3E841D12387EF8D6C7B4BDE, 4B00C27FCA9BEB82331CC8EB13DCC580 - 23: 345CCB52BC20DC5F1BF5EEDF5D72A6C48F402557FFD342, 1A790A39573B853DBB8E2E73B7331014 - 24: 0637C78A817E91D63CE18CEAF8D65C6107283A90C5A97842, 52786CB81724E12C76A0D23D4680E36B - 25: 59526D1E86A473DFB720FF25E97D6571077845F73C5E8322F1, 369FBA7823FC83D727FFD25D10130987 - 26: 2933BB4E7603C313B62332827601F8189E14C1F08EA547E15AB5, 204520E365DAFF6551B01562A4CEFDFB - 27: A4098CF2A48A1DC2BCCE65CCE8DF825AF51E7E5F94B6186FF85D77, 9833EBB9A1D5CD0356E023E2C3761C2B - 28: 26557B942FD6913D806672EB01526DBD5D6F532F78AB6759DE3415C5, EDAACDD101BC40EE6530D8B5DC031F31 - 29: DB92C3D77DF0C8F4C98845AA9AD43FB800192E57A53E083862B7E3FAF0, 628DEB1E345303A40700289052080FF8 - 30: FC57BFAC2C77781723C2B721886D44ED67A52D9AD827874BC4EEC0A97281, 9A222DBC47B4AB4E520D3CC5850D4DEF - 31: 72DFB9E91A78EAFE758B4542206A4A957B4523A58428398C11BCF2AEAE1938, 307D0B876130E82804C1167E03B69B2F - 32: 7275C6EBDC2680DFCB73326A987D2FBCE83E40A9AEFE6351CFDA7251A6FE10A6, 895E6EEAA9BD88594903325A063CA45F + 1: 99, DD35EDAD537F6FCA5BCDEB053BEE36B8 + 2: 12A6, 24CB6ECAECF376400F7BFF52C4312D08 + 3: 791DDD, 7C35A987766AC11A4625C92BA4AA419E + 4: 601FF830, 69A6E3718404D3A20019D9E7F875C2FA + 5: 45A67C8B23, 92EFC3CA67CA0934E5E22A0EBA4E5613 + 6: 5F2C7A733D42, EB5BF55241D049343457F05BE8B53CB5 + 7: C356F4D8AC59BB, 12598DA524E6F01EDDB512E3B988B860 + 8: F24201E87407B8BC, 58FBE9D3E242E16BA16420C354BCF0D0 + 9: 509A017E05D0075264, 357822F3CAF350972D86F2423FE49040 + 10: 0BCBA97FD277C65D4BB2, 068F57C866AD35379F108237B39C78C0 + 11: BFE30A88F0B1FE651D0EC3, EE2F073E23DACD211B1C22074CB32A70 + 12: 11AA35923D9CCC49AF83DA5D, 9A7E9EED9774C06D1D127D1ADE221893 + 13: E3FE3E1C2CA4E1C61D530AA46F, 0D26F48272F7DAE98C797F0AE5BD5B3E + 14: 6407C7F6DD9E188DB09F584AD32E, A673DD2BB4ACC85983DCD4B5EAC2FB68 + 15: AEFBD570198C05D5B430A275AA82D5, 3A1CB79A7DDB7601C7F72A5B0DA8531D + 16: 40C1B9150E8E09C9483C1CA0CCBDF363, 241FBB631ACEDF77D51594D660BB4981 + 17: AD3F3FA6D431E12D6B41476D7B5DA77C2C, 4C22BF4240AE4235FEAA2D3ED7AAB8B4 + 18: 5EB8D86E7B26064D75E56C42B090A17544E0, 44EBE42984F206FA78D19DFC88AA1EAA + 19: 75D7E5AD5C2D19E21A1931F88229C1456EBFD4, 1F1CF1F832658DB0804D577BB2FCD2AB + 20: F73F1D3F38E8B99898E30FACECEFA40FA933F63B, EFF893CE73B6B30AD144735A5BC759A3 + 21: 452A09F297A013652273C124085FFE03D5034EC331, 9E71970BCD0EC639049F906589B7FFD1 + 22: D7BB98AD11A884CC8BF3F2F52CE9F8C17F8B188C190E, 31496C89519DE6F66113C9BEEB151275 + 23: 97B8305B1D1E02D4D1D8194BC54E4AB394FA8F5C8B2526, 1A153F52C3C67E0DA81B626C159D31A9 + 24: 1542789709D1FD889E7C5820F920126434D5969C4EC3F6AB, 685A03CA342688A70753953AB27CF0BE + 25: BB08A7F815AFA96B96C028EA48D79FF3BA7FFFFFA1902E7822, 98E4377462566EFEE39F65659DEB13CE + 26: DC8EC0B08BCADA829B3663980D66B80A2D51500AFD80EA0F18CC, 58D9C85F9561F59BF264393DA954399B + 27: 477A3B8344DBCC79577C15524F35B45A7FEA72B0561A0CDCB3CD66, 57343CF1432D30FAF8724C5AB3120539 + 28: 3CE2DD2869EDF99ABBB3DABC981B5BF294D6AA29A785F1ED6363D6A5, A939560243DC164D46028133C12B16BD + 29: 72504872BE65F3DE8F0B63BD24AFEED17B195D270AB20ACBEA7E6B0B8A, 4D5D642AEAFE6A2CE8881577FCD7F2B7 + 30: 5B71030C43F551C27183A17D08FC1B9C8AC1829D404B8DA8803FBB09343A, A602A88365B46F19DB240F2C077A0334 + 31: 89C0C85BA495D5F92D91EAC281362F374A0F41C507FD20DF6E05147C8E7208, 7F8994E46CE0548DE8F290303E8F3613 + 32: 5AC62A000B9A80B6B849F3A36E1B512097922F8475D3C6F237C3DAE23A6B8C6A, 346203E5D4775D002A1022D7F42504C1 +GCM-seed (16 byte key) + 1: 26, 87B72BF4F343FA59CFA40D1091F50FD1 + 2: E80F, BF6A3B3F649E3AD1D07D24326C44365A + 3: 16C93E, 740A57E99296F82515190712B4B56F00 + 4: C403D1FF, B210C95ED48A15A8E78DBECA2831CBC8 + 5: DAF5735AE4, D74ABA53295DAEB4A04842D0F587C0FD + 6: B80ECF00DBBA, 91DD19615D6F71F696C4AE9D388D7266 + 7: 45F170B0D2ADD6, B9FC969B51976A3CE3D8CDD227722A53 + 8: E3EC82041FE3EEDE, 3B82743C9A974E594D53DCF17204CE55 + 9: 15B8E18A9D105E2F2A, F1452F649ADEB08006092347A722497D + 10: BE3E6D03650BC96975E1, BFA2A6EDEF412FAB922E861514475C21 + 11: 0361D6CEEAFBA30C30EE5D, AC97D081314CB9CD24113CF38E9E41FB + 12: 50E4627778596D55D7A508F4, 99A3E41EC4F3B20DE8D217C06C828F23 + 13: E3362B153E59770912C7B12FB2, 9A96E56341834743DDF33156AF411B5E + 14: 3408B88EEB308F20964DAA903AC7, A4D487202ED5EEC5EA4C45792982A821 + 15: A6AAA4ACBFF8AE329618B023C1EB99, 5B67A194B6358D44FA5801B588289DF0 + 16: 4DCF2115BE730CEFA52053E9398EDCA2, 5DE56AA2FFC6FFEAF87225316C74C87B + 17: CFFA74C036CD62DCE15843160B39FD18F2, B0CA9A45CCFDD7A61B1D06E0075610B2 + 18: A68AA4DB35238DCE0D537670D76073ECE5FE, 283B33B1D7B57917B8658B3E957B52A0 + 19: F99FCDF3990405A203BC6F9F7D56DB5B8A3E5C, 0887CB21263AE7178AB02E287D47E2C2 + 20: 363664B0944200D152A48C8C27183D7AEE177A1A, 3043B2927916652091951B9E2104E91B + 21: C1D9BF607F76D69761A9BDBA7D13D9CE4C8E430F7B, D6E7509B620B7E83B3FF7F931020F56C + 22: BB2DC71C8FB4A7A201AF36C4A174AD542D3A34EB2BD6, 2158A10FFA890769882FBB6636F95D1A + 23: 6B478DD22EF941F726D89C1B5654260845DC9140317630, 359297946889A740671BBB0BD2857883 + 24: 3211DA2201F029B1ED2E11187E62D434442D5302E78A3242, 0C1D43B63A4DD329EA11ABE5404E83F4 + 25: E0398E55D8E5146A715FE9E9A74316BBBD69DE747B5F7C3C68, 74FE8E2F10A96CAB8102EE6F0847380B + 26: C404BB08D0BEE8FF032D3EFDE7A15CEE27BA29B43161F0B5E952, 0F21B0E2D83584B65BD7A2F912BF9CEB + 27: C61D97BC584FA3CB0E6CA3E966747D75BE90CE32E4E1DFA2F34CAC, 45D4D5B01D578ADE8EB7B58CDEFB7950 + 28: 2EEC4B1DEF647FAB996C7A5FA5061E5B572E8B1B0BAA0C8B7D01D122, 36E014FF6D8729B2EADF2E0406840B9E + 29: 9753865FB716D470C634974C2056D637F11EB2467274D0024A72E5FDCC, 1E2DEAEBBBA78E0E6000275B7CAEC89C + 30: E9FE40F4C8F4AF2607E41C6BDCAA28EC7241FBC6C8DEF6F36961EFE9B46B, EC5EDD19299A09A39D2F9006093E4CEB + 31: 995FEA1FA6A0B0B141375B12BC9BA18E29229E3D3BA3FF2F67438268B06EAE, 0413AF0B5AAB28C4EE92495ACEAF17B1 + 32: 746961D162BECF915397F718478F5C1DF7A3FB8BD2413A4BF7C0C43314F6E2B1, FED8ACB5288B6ED8E0556D169CAD99B0 + +GCM-camellia (16 byte key) + 1: 13, 0679D1B662AFDDF3ACFCE419B6DA94AC + 2: 26D6, 162A86F8E59F9E6EA5DF0748B890862A + 3: 58767A, EE0B79D3ED4B852EEFA323F8EF9839DE + 4: 0CA5F75E, A8063610439C0AD6631F6CFBE10C2AEE + 5: 5B821141C2, 0568AE410E4EF4C9FD4EC55926FB0300 + 6: ADCDD0B1C7AC, 84B1E359DF762B7E51084FCE1619D632 + 7: 75882A4FF78AF6, A13923C17E9006E06FC10710C3F1FAD0 + 8: C4F2E79246F1CE2C, 27FE18DF274233BF632F91F5C6004C3F + 9: B5F5462F5AFD8333EF, 56EE2A3CCF86F4F5CC6FCFF2638283B7 + 10: FF40C4163E604B0679D7, F813C36C222C5EC2DF7EF51DD12BDA97 + 11: 93FAF62FB742529F2F1034, 2A67CA1A0CD5ECD3EC62E9A303D11B27 + 12: 4C7F377995D7FA5D94E740A9, 0F8B822AA9775F742D5436029263520A + 13: 357A0DE9ED3E1070808B2AFBA4, FFB8426038E07FD7D23E92876B3CF4CA + 14: 281F9A4C95ED6C363A1F00564206, 93D5470EEA15AF8E85019C47728B217F + 15: CBBB9CCCBC78A78CF1F571BF667059, 15C7BFE9E2D25DE73BACE501D9BB5346 + 16: 8A3392119B0B01A9C38C556C6F31AE45, 87886BF5B99CB77FE3B681826286E87B + 17: EC52B385BC9CE88DABC560DA23B3684378, F6B71A19E39723BD4D9DCFF7ADE97796 + 18: DA81EDEBBAD7F6A49D3BC377E5F16272765A, A0D06F71CD2D9947562832E1A83E577C + 19: 2146F272EDB8F46958C01887D92BD3AC9B8A47, B5CC3F66E09AD98AB6BCEAFCDED10CB3 + 20: 3E281F975765DE1DB519696DDEA6F94B462B4717, 515B758DC732EC6CAEEAA4B94C943CF0 + 21: B3A735243E2D508E2EF3066705D0FA37442C8406BA, A8C1CC8EE8D5935FBEEC31B7132977FE + 22: C1272F2CFEE63BA750A7689385ABBCD4D431A99BD2E6, 46511DE41E6ABDBDA73AD854149B03F5 + 23: 3C66C359BA5DC0AB52EB152DBE89AB28767B7E4A6A05E6, DE4BB656C5B0DDE993ED461A0D9C185A + 24: D0248AC2923887E76BAB9FD48D8FB73D93B23E4FA8704C10, 7C120335F1DDBB429431F15E24F64455 + 25: ACFFD738047C794E9C88BB76C2BD8E300CC5F89C2E5505815F, 7D090676F5CD61FE8BB3E20BB1BC8235 + 26: 8B2F83612C9B5870782FDC506FD9E7CF08024C6D126AA0E715AC, 5A72E736892087A91E77FE785200ED68 + 27: DDB64F5869813B94E80975E55BB8B62A23CC8B0DD56357C51A0B2F, FE9B74933C7D6FF5272A0DD90D1F5D71 + 28: 00A21C6C047DB3551368ACA67B45222386A2DD63297CABC780493A73, BEDAED8C4799594FDB40F992CC82B4A2 + 29: 35FE5CD3F9ABC78C3B6E96EF11FB601741710FDA8572CF741EF9E5A522, FE34A91C83C93FE08F7D4EEA3F927415 + 30: 4CEE166BB1E1325C69BFAE06C9422BA735FD5B21EE2D7581E27FC027CDB2, 31D3086C3A0639D79FE08F5DEEB3E81A + 31: 6F575BCEF0FC079F8FA300040AA50AD6CF6F4C92A27E24A210AD32FB1FB0E7, 057E5239A6277E1D96BC277D4EEF5FFA + 32: 5090FF37EF4F163F5B54AEA54DAF1CDAC1125C46A8617CE3D251576BF52143E2, 182FD3ED463E1A6A615F4E25B34CA748 + diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/hash_tv.txt --- a/libtomcrypt/notes/hash_tv.txt Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/notes/hash_tv.txt Fri Feb 09 21:44:05 2018 +0800 @@ -1341,6 +1341,1448 @@ 255: 15025C9D135861FF5A549DF0BFD6C398FD126613496D4E97627651E68B7B1F80407F187D7978464F0F78BFEEA787600FAAEBBE991EDDB60671CD0CE874F0A744 256: 1E7B80BC8EDC552C8FEEB2780E111477E5BC70465FAC1A77B29B35980C3F0CE4A036A6C9462036824BD56801E62AF7E9FEBA5C22ED8A5AF877BF7DE117DCAC6D +Hash: sha512-224 + 0: 6ED0DD02806FA89E25DE060C19D3AC86CABB87D6A0DDD05C333B84F4 + 1: 283BB59AF7081ED08197227D8F65B9591FFE1155BE43E9550E57F941 + 2: 0A07690C7F1FEEE3D8C36114E0564D43CF0E710642E90BBFF1E9B7C3 + 3: 00FEC611D324972280D5B8D125BD43DD6EA2515CE38C3B888E613A07 + 4: 6E30A312ED1B6D4C7B31D269BCC7B0E6A29F0BF8AC223049732B35F4 + 5: D44BF9D6D04191EC944F8310B785991F4EF45EC090F35E847BE4621E + 6: 94EF12F2B3A28BA5E6CE4650386E4427A4BD28D2843F9D1E5B32048A + 7: CA5456E523DF159636695D94717801CDD968904348197A4FB5AC5119 + 8: 5A00A59D3FE5B7BA5B3FE011F8181487EAF7201ECE9802E424C61E88 + 9: 1666206F4D64AF32793D51D33DE4F268AA54E7D112F048356F317BD0 + 10: 069BBC329DAD3C93089EAFBB937C5A632A4319262EB1A6E2DC1E6A77 + 11: D0A05731CA8F7931F6982102E4400BA30C54F168AC16EA775E7C4421 + 12: 2613FB4EE8451FDD2CE06DCDE74D6BC07ED02EB14C1C10C0D3D363FA + 13: B667F676EC45176BF778C82B74784F49CD39190D100A09EEAF80BFA8 + 14: 1EE61F074B90106665F1D5F14ADA3EBBD85A90A1F86480A826BCACDF + 15: 0B0687B2E11D2F895E409CF2BB740A6955CF1BFD92FB6506AD842E2F + 16: 65B59A2E9935695519257ED5732C4CBA8DAEB3FFBEEBCD76ABBF780C + 17: 39933CF59CD76093DFBB32D3F22A2C625C01E27EAA08D6384AB3000D + 18: 04D4F72C5D27DF6C14A7094510B51FC1B3DD00B6B8ED4C075036E367 + 19: 559769278E6162D83151E400A271D430D679F4CF31E56318A292FFD1 + 20: EA3D6A5A59D4FB0F91EA5BE140F10EF016FF3F329C0D249B4335BB8B + 21: F47B5C68134BC28B322D79D3AC6C972BD0F399EFFDE08D63E51CE934 + 22: 4B15656266A2978EDBA018E1B2179A1AA5CE391D4C6BC519B3D00C49 + 23: 28CF753FF5C3638223730CF084FD174A241ED388733AF557CBAA7DAF + 24: D0B182ABEF413BA386AB674EF13D6645AAD072966439C05026E033C5 + 25: CDE0DAB321334986FB8D0979F91E8DA4F124A50CCF36C1E141072886 + 26: 70C12305B10FD9F7988AE80DE76C12312F5A1358CC8F501F7559A1FC + 27: 329BFD0CFDF2F12CAD586117A963E70027A4012D2E34FD48BEC23837 + 28: 0557344CB868836E365BD8D9744270FA985D68C6C26D93B800453050 + 29: D92467142FCF76D631683D3FCBE57A8B9FDD345D6B89DF1608008D74 + 30: B330CCC7206F6783B7D99DD15EED88C5ED55FA68105DE4A4B8B97361 + 31: D89725A75707E3CC1A7EABA0B6062D7EB3851BC1C49B3B237375235C + 32: CF2FC8B204143A496C4151113069636B288874D2CD9BEA3BD41B8495 + 33: 6F2B418FF1162E8EBADB34988E1FFCC412DE7613F3DC8E7C1C9523AD + 34: 0F3B76A501630F8E04214DEC93C3D019EB8F544112FDE69F77D1B342 + 35: D149A08A586593EFBAA96AE24171F962695DE0A55DB97F9AC936EC14 + 36: F3FDCC88C022ACBBC1F0BC7C738290768811A817B9A9B80B6C04B0A4 + 37: E5C962AE7DC60812C96041F20C5AD6E65B46DD55430EA0541F98E704 + 38: F22C11EC64A1BB8A883773A6CE9C435BE2B788807EEE19A19B9D940A + 39: BA5DE0946DF38400AC68EDF0A86A4DD8BF9594400FD239B8D1741044 + 40: 7802075428B0077420E37020D6932A24635C2D3AADAB7502098623DD + 41: 488268FD1A6D83CFA6EAC8685979C5F7D30933EE06A75E691871DA49 + 42: C1E30EED85DD23DE56C0897D04B8A8A4D22743ED39CF336B5338FAF7 + 43: 92813F2CD4D5AB56426D3E0B555D842E257CB0BF0C2A5393CBF35DB4 + 44: EE1FF9E3606625D954283059A3216464B5FBAA6DC64D8301B4777587 + 45: C6A59E3BF7EE5B5BF84F0F64AB196DA82686323D5213BE64F0F0808D + 46: 7A893130DFFA5DB80A087CC5CF58241A887E12D24C49F57A0CF446AA + 47: 2947CA00789EAC5FD4CB15AB516DA2BE7E728F35192F5F50A273AA69 + 48: F465139CB305691F5825A29E56F6D5E40AE1E041D3EB6E40A62FE854 + 49: 930FF6177F2A43D1A68565AFA65D85B7C335B50EC7E539F2FE44807C + 50: 3A758B9ACF4FBBEF5E4C31C181C82772AB9FAB097E3F9845F5EEF502 + 51: 570B4A6CF0CB0D96A6F285B8E0572DE4C0C9141BD78629790FBE0C13 + 52: 80AA23B431AAC8FB8DDB2291F574191BA1A66CB6F59271A6FE425ED5 + 53: 0208987B33EEDE4C081D624D50D621B6E57573A502DD3893CB89D9F5 + 54: 14433D01D241AA9EAB872098E505514E77AFD9F2FA2C64B62C9B5BC2 + 55: 4BC333B55C3237ED85AC21B6B3DFB70987C33CE04E20C2DE6142D681 + 56: DF1BB702813C49110142BC858073E618AB22AF52FAF8D5F0403D3FF0 + 57: F32287421B005CDB31B9B010A0F5A4AB12E161C2273BF69C738AB94B + 58: 26368FCAF3E938A8F144382227E1007CD58DCCA9726C74A677E2EF43 + 59: 54E346CBCB5AC8D3D5FB2D23014F485D966124F55F4866B2A3071467 + 60: 64650D072F1AEB7D3125598F96EDAFDF1EDC9F32BC09EB93E1DD687B + 61: 37240528FF0A13E4D0B1554A241BF2E658EDEB29BAAF9435C0ECA091 + 62: D233C35B97D0C77A0D925341193C664987E95CEA687EB76A473C73B6 + 63: 4544175B79234F008606D6071D74DE7483FF0BDC1DC8C99A89BCEEF0 + 64: 9E2437140847453434ACB859BC4F842E9FB4A4B55BD9DC164B74CEA4 + 65: AD09C080E71D330C7AF75C34CCFDCDC103C548EBAD3A058BF638AB01 + 66: CF9FE51BB566173AF5DCF3224C37D54801B3D8D99981D21E567A789C + 67: 58CEDB734F792A83905A7E76A014D6AFDB0C156AA08E0FEB1DC6F737 + 68: 69FE39435F7D2E63EDB3F8C43EA850DD9A89107309B72FFAF459F65F + 69: F164038057287964A01C51255DCC0BE0F2C42882598C1C2E0EF9A28B + 70: 57A8EA1F84E6653455CE70B8AFBB7CAC715B9D566250F7BD7A568E82 + 71: 424F87E867ED6A9FD34AB5B14BFF195E7BB65F70CB19D3B50510D380 + 72: A5BA006B30F2378CD1AB2E5DBB9FE130BE7F504A7A7AE51A09839229 + 73: 67386EDC9643345A4A7B060CAF230748B72CDFAD644AA1A69B846731 + 74: A48F0E00C1649D75E8D1927ED977EC333F904D97C2664B37819BF99C + 75: 1EEEAEFC4BAB0A232580116E8AB9C24BC35781E11D35562CCC97107C + 76: BE3D716B6DB628B4BB50F4472AD316FB906B5CA7DADA244D29E5FB8B + 77: A731A30796C89F3C37C99027F487979CD23B9FDCB5F03B4399A52778 + 78: D99A36476A13D2E1F4798C03E083FDF3E883401EF99C89B3D1FE7DFA + 79: 2154E08A409998272A3B7D2662BF10D30866AE0765F2AA1437983753 + 80: E0B6566F1F80ED434158B87807CBCD92BD28AC05D686C150DD67D1E7 + 81: 97DE2D154454C4693C3B09F7DED9F24D82095F0F59A49009A622CB90 + 82: 10CDECBFA161F69EDCFBAD57C10077E3DBD7356AED8CF00826554D61 + 83: 25DFC75815DD0995241F2EB0BF3899A2F70FF161C4C8913ECEFEA31C + 84: E87B6D729D9B12434CEFB32AB0F3CDDD98CAF531CE0F1C0A4EA3C594 + 85: DA64DBDD17C06E5BCA25B29FC9BD3E807FBBF85B88457C5007A29420 + 86: 2B354F454796AC6B73D4DCB61B245068857FC0AF370F7B810D998E29 + 87: D413BF567E46384C50F1C8F6D04E15EDFE49A23A9CF8FB3BA5366C0E + 88: D34D30F424F8966AEC100295D38F50BA202B7870D9F563DCAE7E53EF + 89: 4C92C6C9AC7AB81AEACD86FAB38CA0F14CBFD04F7ED2209F658C2C3E + 90: 0881AA04F7029CD296BB0956DCF148F4781F7C3FB651C6EF939C74AD + 91: D31507F6253787BB9565B114D98002010996F2930E32FAA8F5D50C57 + 92: 172205CD782DBAB95A449FAB59ACF89B3331FC060F9CF2DF94DC8D84 + 93: 0E631B1F9C604BA237CE9CC935ECC7966C35C8E847D8AF79EA7A6780 + 94: 5C632A21E6FBF71026B1BD8E89A58105A9231449F865F433121C9996 + 95: E5E6B8C1208E9F82FE16837AB87CBC3D0AEF9E424515239EA8992720 + 96: 24F4D45951C40A39A37BD5BB7FD48CB6773CA6489EBF50B396597ED4 + 97: 8807B743D38F491DA0C30FBB81C15037AD05FCE775211EB4F71677B9 + 98: D807E6C39F1F6136D03B2C64398482F8F0E34615591509EBC003EF7B + 99: 6B7514EC3320B8FD441D76AB9F7BC79257A5E6371A3F20C0A19B2233 +100: B8ABE8559D4921712A44815B8C4EACBE2B8D6E93DF96602534CEF852 +101: 3562AC37EC2EDB9D49363661B4C2A466F673D51D9081867A3D871359 +102: B35D3621C09E9C61D4B7DAC784AB12F7E08786F5F191E30A368CD68D +103: 090AA07690C305101F7943C57585F66F972B1299F5C7801971F70D23 +104: CECA8AF862A236CF08C7BEE7B938A822BE0DADDD36F52DA9832100B6 +105: B5C2B958BEAC3EF67F6352F2814F12DBB1BA548ED8C388148310852D +106: B14FAE5CC21CA79DA51DE208F74C12C1DD242E91141BBC2DF6F445FC +107: 0FC57C8D7F410CF551DA8591FD90F31F678AA10667221A4E3745130B +108: FCE9C580498A5D331A5769C7B0E28EA269DC38DC96EE653E89BA994D +109: 15628C95775984C37CDA5E240ED7469BFDA805F7837CA2B701AEB46D +110: 4F18E2DBFC15C957E51C15CBC834CFEC545C5B49BFB754A7C5C08A9C +111: F8810EE322210D0F4CBD7A4E92E7D7E72B63D2777DCB531E13DDD690 +112: 8099918892EBBD31215C9BB5E4E53C0B52927B000CED0720D2C65A22 +113: 8AA886CFB7357D802E9043498BB9CA36C80A79DCBFE06C9324F8C027 +114: 5E15C489124F3F4F1608B715B997F7965E83C025EED250E3F9590D72 +115: A0438519E0D17BAEC7D598ABF5F803F87D6B1646B1E0F7FC4D2B7FB9 +116: E09144D128BCF27B515888A761FE0C75AFC0F3C62AD49FF7EF1B7FC4 +117: 0F53884CA788693D5F51582A9A26568EE143884711E6A4502504D4D6 +118: 8255D5A16DA27ABA30904E22C13FC6D8014FBA31CEE8BC10D79ADFE5 +119: 091688FD3B855964A303EEE8F09F3A04B211B8A31B1729451A0458A6 +120: 3055CC455C76A920206971189DADE9A78A53E2455C12865C4ED36CE3 +121: A7F4D536F9028234EE7256853B95B9B984DD8CAE189C085380C70087 +122: 91CC350F8D813330D99061090A43349B57735675EEAA86C9AF9FD081 +123: 2FA22BBA6349E2F41D7AD06204547CA0D8C75DCDEA49A2BCE81F4F0F +124: 848183EA80864E016D5C5568B4A843B5E5748DE89E572169206CCF3E +125: BA1784E1FFC8B17E4E1849A54C469622482B12334A4AD620E2C5D99D +126: 35F29C25C39B50D886B398E6F654504CEE6A71B7F886D5FE9A71BFC9 +127: 29D2C4166A36E07B2DCD3A7C988DCB14776DC187040F6A733162EFB7 +128: 49A64B72A88A3C93432B6E4C59A1B4908403F70E46E13BF7494FBE88 +129: AA05964C59A40BB5140F3F1B9CA03C3EEE0A1044BBD3FE84E5936877 +130: 38E7B198B7D65953C36F24AE14A1476F4B6273D0F551B0BB46AB62AF +131: 7B95414DAB33D2063E798ACE54EBC3B59734089BD90782098B493518 +132: 3D6B803BAAB3DCB33FBF41C9A0A26AB4ABCF9B6130A1767FE8D92EA6 +133: E39B41308DE4E09EDF225ECD70773019DF360659C00788EDA15A3B09 +134: C061ECF6E38881252E65522B3244FD013700D4E0FEAB8FDBA5963C44 +135: B95387AFFDD9040046D28CC9B90CA83547C73F8AE774918FAF17112A +136: AB4D30FE79907AB6BF4153FF2E15ACFD3FA851C59918C6D1BDAFB8AA +137: ABE3E517600C412DF53B002CBCA6741DC1ECFBEA68B595EECEBDC2D3 +138: 1A5BEBAE3CF1B4C02C8B8A177801AEBBF11D194B5ED274BFFD2B0E70 +139: F87D97F5BA0D6D6C5BA279D5A803DA48E38981594517D03DDF0667AA +140: 98C4579B3C3FB17BA3A9693B6CC38184E66C6CDE8CE6B572B9DA27E0 +141: E08A209E340A496289C67BFD38EE96A84FCFA4413B3B545AE847D8E9 +142: 8AB4CFBA58F12EFF33B19D57DF495591983C39FF014DFDADEDB12837 +143: 3A85A696BC2E82456C682ADCEA5B2BEEB0A11E9FCC363D9C25124ADC +144: CF6E901A2A18C002E75E535B34812AB027E32384EA0271CA6ADFD07D +145: 1FFE5D64C7D229344ED0FFCD0FC1F87ED80F097A5F16F27E89BE2414 +146: FB238E7E0F64DAB7101050E2A594C12AF572DDA5FB5DDCF0A81EF7C8 +147: 413F330049C3A309E746A6B6D24BF40CA430D107A18227AE7BB60165 +148: CDDA7B929096FCE42B07E19C72913BF37569C75FC5183419E0FB070E +149: 07F9A28D87B98482C0053E187881D02FB15ACC321ABA51B9ED5D1F4E +150: 666CC5B7FCB82C1CA6582309CC4CFF989D4316101003CEA5897254E3 +151: CE161DD7D8AC4DD45EF0F511EA206F5D78539314C4B44A7A4F4A403E +152: 5AD4DA1DE62D6B012259C3FE1573E2F6BAB8CEC85FB6AF4CCD1B4EED +153: E9E64E30A48783FEBFDD8347837B52CE7D5287E5FA4B7A3F7F66C013 +154: DB14B1F354735C9DDF4230C844D5E184D6BDA7FB8C8E0623A4416590 +155: B394B4D91411B38C4BC98DE63940CF6393E19EC229F4767D130E1F03 +156: 904369E594C39ED6A32DBCF5D3743FD31992430BBF126CBE2E8E5788 +157: 221533E80E5B43D2F817283CB611EA92E02A1A6B31B26F1F9B5F2DC3 +158: A16564159AE18130B912A694F8311BC6F769837A5E07E46622375228 +159: C7462633CBA1DAA4C0827EDDF9632A4FABA2DC07ED45668A2D012174 +160: A002A7A6A4F75840A5A94610E7CFD2E9CE165E5F5177EC20E2211C07 +161: E12C0157BD545EBD67B907954E3A25D95A42A5626E6665BD1285AEEF +162: 0B8F3327D09BEDFFBFBAAB6D863510F7D54A81791C4DD66B7C5FACBB +163: 0BD97B63D7D8F0A4B90330A5A00444CC3941292138F2CA6BBA76CC8E +164: 5E1209A29CFF68B4DB004D0C7CDE223A0E8801C25AF560ADBBE2F27D +165: 4D458E8F2F68B901C13EE4AF463141617DC1D0D8E62F6991C6A07658 +166: 174C92CE40F01DA75C57DBEBE8114997D2B931F2B1E94BE5D99E987E +167: BB9D18ADAC9261895FCC5D1D209742EBCE546C3F68918AF614BB80D3 +168: 85A49A9C7034746587671B8DDF543CB9358C2FE4C75DDF332BC695D0 +169: 5D618C15A9044D6E5D461F8FD0896020ADE117E8DB7270E602C86B3B +170: 8B9723D842504419E29EB9F8B222D3C5C1D8D90FC02E4930FE1729AF +171: FAB6F7BC8105A9E107A5FF6CB408616197A5EC8FC8DCAD975A628CAD +172: 2D66807292855E8D11BAFD680D59BAA5B9E6D8BD360D6086CE12EA95 +173: 1F2936B3C91E9A3C17C11091DA7D4D42581CC3D9EE9192497FC3CD18 +174: 337575215CB0B37A843063867FE6AA322222F8B0F096FFAE69E385F9 +175: 002EDCA2423B16D8A84DD7B01CDF53C330A16A58A03B74D906D6EF62 +176: 37B20A60AAF4FEA526B217BE0DDDFB8CF8880ABBE5E444432B579003 +177: 975D4F979EAC80F42F7CD3789C0A18057AB0593BB78626A52B15BB8C +178: D1D7C4A4ABEC252B300560D3B95F2A8747B2B554F19542FF44B9AE9F +179: D4B36857F9DFC1F6A530767E9AE20C18123789C81CDCA6413AF990D0 +180: 853181CA65B54A26F0090111266FAB58A9F0B80DB49F89B284661A80 +181: 003337BDB25A835BD9A7141A6A35924CB47A0C404F79E9E5C1454AE1 +182: 55DE6261871747A96075A5FF81B17C65054B923FEEADACBC62DEBF99 +183: 3BB872FF69DD7B319FC39E2D6ADCAA724751339AA98EAD9B63E31C7F +184: 72BAE6681B59CC556D50204FC7A4B286E95DECF54E699C35C4C1E46B +185: F87A12A8A2C62C34126544DF55ED1C299A835AEBA148AA79D29433D3 +186: 4FE245B12D8312645AFD30E764061DF8C95E80244ADAE3853CBAC5E9 +187: ED824E6CB63CD58B9FD9C5DA0DE419AAE4AFA07D356C6D594E6C7602 +188: 5684C0B9736B43B25FEE8F75E24EF479AA28C4EDF8D3F8EC3EC1B18A +189: 516F0991FC66A910B24AC719E31EEE08972E430A08EC3E487520E6A8 +190: 02F935F3979AC59B7179F8F149B39526D9203333678E37CCBFA81AF7 +191: 487E604E36E13BCE0145C659C2018935E706AA910A4DF2F248E94AE4 +192: D3E164E063FB6FFB4F0210D91CDFCF9C1E73990D36EE98169C12C566 +193: A9ACEF6A6203186CB946133A9EE86F414937DC81B1E95EF4FFB8F6D6 +194: DCDD529CC2B0DDBAC1AA5C5581E39E129B73A3DDE04403358310544A +195: E8C8A1557D51C2B0F7E7ADFD65DB10B751E1C66400FA56C72E632EC3 +196: DDD60F8795A5C74AE07F4BDF7CF8C1EA7F617978F0D12EF2783E06AA +197: 7C13B11A3BA5A3C74BA9FDF6F10F14D1822A248E823BCE8248610433 +198: F9AC0A30F4394E8C8D07F10F03DEEFDDDDA27C1DF74B80300B1FCBCF +199: C2022C77451889454208B56284CC50CCB4126D0E44EBB3C8FE6D857A +200: 45455AC9539E497062D4D0023CB5591AF4ACED509E2465C2DA57B466 +201: 41983FDFA1EA3C3956940C1704827605AFCB16CA89EE83F4BEC0407F +202: 0B8BA25FF9E897D29F545A367453A35E86457E8C84FF4067AB3FB26A +203: 754AB63712BBE28A7BBE70E4C3071A09E13EE3D4EFF11E3EFADE3177 +204: 6026F011FB67B4C00CC20C4415AA0095E4DCED5B5BEA7EB3E3602144 +205: CBB7AAC645A32503574225E6707C28C99E35B88DE840117FFC0915EE +206: 954451525EE5B1B66B5FB3C5F087ECB9B194073804474F7CF01C4057 +207: 0357EB8AB9026850FEA61551A5487DB50245143312837BED6FE66C60 +208: 1D6CF1413CCEBC8E408888624854E7CB335EB97816E39E6BCDFEB35F +209: 6D1D954AC353DB3F79E163AC4B56776881AB10CC659A01BEFCA695CA +210: 7FDC69BDDF3C6E430EEFA3DE553BF51FD440EF85DDD34A2A49DCEC11 +211: 8703C4A16397D2E70E4E26FE49456F1EC0902AE2C02045980E8B8869 +212: 3289D50B0C47E66061711E63C249C87B364741B62DAD2320F551E13C +213: 56DB3E8CCB6000AF46A0C1219E5E56FD26A3BE542D05F2BA2901526E +214: E0B7236D6E547C20962D3E95E62006E536220CA828F96AF51D8BAE37 +215: CE3BF25BF54317D8F30D9937B14CF817A8EF6666F0C5DC88A08EEF2F +216: EB421F51CEB230081C16CD4E33DDC5472C6A0B35C623AC47734E203B +217: 7C696551EF2E84C27504678BFBF530CE978302E0B8CBF41404CAF902 +218: D96CF6D20FC6288923541976A80FAB2CBC634376A02B6A681C3E7F27 +219: A2C6217991958BB799751E34CCDBCF9E492D4623F9BFE0B791B9B0C8 +220: FC6B5B15F2AF1C3CD1B9C3C1D08DFD12E4B852217CDDE4E19DA54565 +221: 553B8F6031057F7D2B7854AC04E55D6201B15FC3540AC32B54434B11 +222: 67B0B63C5D6C16E86E19BCBDA02821B96890CBFD662B9AC796F58602 +223: CE68A9C14D4F6A0D4351FC3D1E46F323DB4EC7DCAE0E59D726246913 +224: FDB91DED054711B9DB1A93CF852650BAE3EB08B158B189D241903A5E +225: FBA7CFD46FD05633D8B5C0D9F5DA6D42A881E493054B032728FB6861 +226: A1E4C1644E91993B281A82515422B2449F364ED8E3AD3A54B37CD874 +227: CC9157FFC6FDC62AD86D826FDE2DC78BE93469B21AD7D1ECCD37B6D5 +228: 93A505763CA81F90D1D8C366D63DC9317DDE8EEE264F3700421820B8 +229: 46D41897B31707443AB817F55797FF8CB52ED791340244B3713C2D6F +230: E7928E3AFE6416915E697E356D885AA7A33D43D4766BA920405BEE75 +231: 967265670BFEEAF3B188FBD501A7AEDD79F8CE24B65538A56A6D053F +232: 7E549C75FBA3B16E0BA6C3BE6E3CAA9F5C45A78DDE6CC5E1EE90D853 +233: 9A795A0F33C4D7FCFA58249D36DF648DE3BEE61ACAA2131371B131A1 +234: 9BF0F8A0A2919F1A52B39672DFF3405FE59138051E67E0D7609C3FEE +235: 6ACAF1122C142526B46EAE5B859BE5D62CE7E54C6991EBE6EF0E0934 +236: F179211E88FB303D8A074019664F5009BFBD1DC86EE34F1582C1C72C +237: D335C48021FB0585DB327D67FB12554C65E4755B466476D3E10E10AE +238: DF08D65DD48136B07E0E7F5B6C39E1B10FE95212C3DF0CA10E00F53D +239: 5F3FD8A5A4EF847D833B2FAAA74A30FE51D22C68244298A25302B7ED +240: 181DBAE9308B111D4AE06A6229D6038C4AFFFB93A0EAFDA9CF1E83AA +241: 671D5CE9A1DBFFB15B4449CDE3DD91569F875D4BDF427E0B42DE0974 +242: 799583432083CEC377826EEA43B35F5CB5261D091F2BEC4B2EF2DA54 +243: 574DF003B08BDC906325FE2160907347104E664645BD4A9AA16FF74A +244: C8B29DDD1610D96D26F213FF883CEA12EBF19C943EB50BEB895A89F6 +245: 2C57878E2CF8C2FF0FD014392C843341D78FF741489D672285FBC5CF +246: 56B4B8AEFEA02BE5BBFD3D032C71BCFB8CE204B4CA89E22919E11B5E +247: DC5172956E9A8C86E4CC6F2B13D8BC600BCAFDC673842AEA711589D1 +248: 2B762DAD2B6591F4E60BECFC43214EF34D5D435A3DF85E091B30A47D +249: 1DF0613C3E109CD3716BE1D8D7C326FB4837AFAFCB36A6C8DCE14E70 +250: 543DA47D5E9462DEF4AF0118D4B69869E7ECB7AAA6F3E2039E1FE8E4 +251: 0872386B43F3AE3D652EA4575F7F91329413E6A67C16B419FF6E3CE0 +252: AA50752B4CD3D84C98E6883422C15D75AAA99EDE7DE3F81F754897AA +253: 367174DB2317D0E294D768BBCE69F60BBAEAEDAF755C5B2B03F76285 +254: 34ED7159891BBCEC9DF0D24C50F6209B8ED3E5380A34CE0C68C621CC +255: 9E31B671E498E8160BA558AAFACD05DEFD252B2C7D8BA8E9E618FBF1 +256: F8B6E6398B49C87678A1A3235C078D8DB93FF50271D6EA36647F7F00 + +Hash: sha512-256 + 0: C672B8D1EF56ED28AB87C3622C5114069BDD3AD7B8F9737498D0C01ECEF0967A + 1: 10BAAD1713566AC2333467BDDB0597DEC9066120DD72AC2DCB8394221DCBE43D + 2: 2E753E709156F4820A27D9CEB7908D180DD0AF1793D37130379C5FF9C9345F4C + 3: DACA0762A6678E4E26CB8A893D71D72CF3239E29CC837629590B84625DEC14AF + 4: 6DC06B8AE0CB304B1808731BD5E77B0BEFEC809F6E02379623EE0F00C10B6586 + 5: F48B764B5D6EFE72FCC9C113668A8AD8837D9245832948CDA1E77743C9C501BC + 6: A697459F59F222B055E111E791211DA13A050EE577711B4EFF2AEB7B2A6E7BA0 + 7: 39783BC9E859E0982346A792CF315BF81B492E25A12E279EE845BA6BD14435DD + 8: 20971D26D0FB904D66029DEA021A24BF8BA096493561EF86A3F75E84D3091406 + 9: A42515266DCA56240A7E09683880C0ED5AEE04221D7DFC635107A2762864706F + 10: 5F9310E9D1D72BDFD98FD0F3F442F316E5107B46FBC67E162350756B061DDBD5 + 11: C19109201CE9314D5BF1873B9B98185B0F742DEB8D6D2AFD526B8095371A752E + 12: 0A850EF082ABECF9899A6E6C5701649C7A4C41584105315C1BC0628A0F736BE6 + 13: 0EC705FB202BE5AB4CD22A5BB60142EB33A4C4F0E4DA11F3E7CD2A76BA109704 + 14: 3C33C4E6DAFB97D45F403BC662F76B5505365218FC63F23FA49772219CFDC806 + 15: 7A9A6B0575546936A59DDEBA71D76FF145478076906EFD5E0D4129901102F526 + 16: 4725E7C23DD68B8B2D722F2D370F4340D13A0AF42BF574F741AB8A89FABA6CA6 + 17: 29EBFBB5E153E98CE0FFFF83F39590685207BEEA613746496C75D984FEDE6A43 + 18: 81ED8980C1D6623A2A14C07898D0AAB69A5E89CDFE756439BF544F12CBAAB96D + 19: B08B0DE05F73D0BB40F152556ACB7413DCE4CAC59C57F95FA30F5574F5A01EDB + 20: F2C93A59085DFA0E71D7E962FAE74C8B643867F8799D16C1413225AD4CEE2F49 + 21: D35E6DC12DE337F89840A707838BE9D5CE13C839A85F8D82F92CFF2FBCF28B37 + 22: 55511CA658E7001FF7BBC193AA94006917D41996D8D0597280DAA155AB2AAD76 + 23: 925619C01E78B771F68401E5BB1ED1FFA698AC541FB88AABD7DE53973E20BF0D + 24: A2572A13D58039EAA827086B83092D235510025B3E96E214DC848B42488C46A9 + 25: F7C0B4561BE28A8BA941BCC03E7E004D6479234AFF2FB7D5CA2B48F059D1A16C + 26: 34D424317805ABFE78585C9F1C1AC0A29F1DC899D0BE57338167FF9F9B473AE5 + 27: 27BD8B29EC37CA761B9A51003F5DEE9767F7FE8155113C39796C379058624D36 + 28: 17CE5B8FDE3BE708F1AA0620998FD7CBF9173283D5432C3B4AA0213D466B544D + 29: 3A8EE8804B61227C32240859188830215D61D8179DBD4789EEBDB94781DC91BA + 30: B4A6473F90CA2E87FB330996A826916374515ADF7B7BB81334007D05DDD2B00A + 31: 82B7DF49A1D7BDB09CF1183372122339CF3FC28EF9743B98FD193609297313A8 + 32: B1915EAE84B12616CE51D7E259B7AEC3798D427A735BB13226D07119F651E981 + 33: F0DAD0EDF6A7C761E9A4EB3C8C22CBDD7F82F391B74F929DF0AD7A73D39C4491 + 34: 35CADAD79D50C2A3BB0D5D86727A3BE9E6093A2BF8CCEB0BBEDA3023F7BFA1F5 + 35: 73F5C99BA298515D9407E042C2A544907FEEC14722D22BC51A0D2D19750265BF + 36: 40FF68F9B5E4D61CA671AEF51B9972713A324E9852AA733FAFD03E0A1E7A2483 + 37: 43F79EC5D92316181F4671B464B5069F68FCCC5D87031D273A47C6E3BADB2F09 + 38: A6A8BD5CE9C76B21443C0A076ED0E059B50981A540F37586AA41BFBFA6EAF449 + 39: 161CE872D1771C378CA7208E8990776B88EE4C5B7DF327D7B68C5781A677A2FA + 40: CAB370E6ACC494A41655B487848528AFB55D884FAC6A404775FB5D4C305552C9 + 41: 6224B54ECA83BF2517E862CCEDA851D78E3BE0C9BED185B8195D0EBC85449C48 + 42: 42DA7812A177FDDABFB5EF5705542AAC732B2C9B8D7349F4150704BC5186948C + 43: 5C51E81BE0EC3817465E968AA07F049BFF7CF7A67B1D355E1E254EDFDA222F71 + 44: 9A18455A2460C62F4436E27CB08B385ECDFC3451AAC79E27A62B2A6A8EE00358 + 45: EC5A90362A75A517EB65D7120C05194E643378E6DC259B5009C6E7279C23B8E1 + 46: CA5F388E039F5E0E74158E959B0282B266AB4C8DD81223031882524297402D7F + 47: D20DCA54AE6FB42A967FF2A9AE686335A3C2262A1FA4F3E219487131D645DB0C + 48: 2D3D934745D397067D63F0B05DECB78D5392E08904D5ACC8287B0CDB697E191E + 49: AE4279312B901FB98AB0F83730EBEB0C30ECDA2E1D1AAAB62008BA5384A30BFA + 50: AC308FA5DCF85624EA186DE4081B3BF0B9EB754F8C938E992668263A87AC03BD + 51: 99EE8024BA8C355AB416B7DF162910975246F61323061EEA67ECC9C1A000FD2D + 52: 7773B4CE08E9DF85FB0B138F99A76ED421668ED19D0EF9766C5252BF9AFCE4A3 + 53: 72B6D710DECDF097D4F7FBD42DD9B9E5595D97C81D436DBA2FEC96D0D720A992 + 54: ACD22160D881277F0010D2575AE3667B0B17099E65FE34CCA75D576A721E53D7 + 55: 7DD58A7C3285D6436F4B8876A4E3CE63BAE92A11A5453C46A6032C5E469BF40C + 56: C06D2D4F6D22414491B36E215DE341782922EC36900CFCA39F4A707A5379F51A + 57: 9B0810A0330E06AF78DC08CA491BD248FE6E36A1E89FF7B9BF65AAC9E760580F + 58: E97AD0EC164712E8103CEEADFC6CD3F71F0940351617D39726EA5EF512A75E87 + 59: 79322D79A95B60F46F2EA43F94378C59B661E433B4BBD3595734586FD354E93E + 60: B5254E8E1E349B60040C76F6FE3BF9B81FC83F3B4249F5FC020D1BD182C1F818 + 61: 9B7A90CDEB29791070A3C22B14DCB04554A802A5A441EBD0A553D2C71464CB6D + 62: D0919ABDA514C7F246DDC9E6F104D61CC7B57336E3E8A658D9DE814994207B36 + 63: 53B53EC7C0D980B7980C16A40D3F7FF83C1038D0300B7313584DE5A5EAE4497A + 64: C9E483B9622515E83259E1E075746B70142CB1217863FB8C85FAE33256F4188A + 65: 9A1983429845A7FCF3191B15EDFCB8A068200DE6224FDE6791DA4C97FA6258DF + 66: 17D3846C20485DAFE0C807D0EECF5AC19A1D7DFE5EB27D569DF16CBEA52E981A + 67: 79B96A06D61A8C08B9E3A2053A3D990963E1D4CBF7CCF3160E474A3528F5CB2B + 68: 58482B747195814BE99F0ED34AF9AA171184FC2596BB147142A7863FD18D2B33 + 69: D5B79F2B49B6B50DD99AB886A3597913C561CB0ED370DCA6FDF3A3FA005709E4 + 70: F9CAB181A422478F977D5504F9BD824C30824AACE2A1D6B9F1F909841AAF9E12 + 71: DFD1598FD7C9BEB3C4653DEA2D4B480C87E33A7D0CEB1D97DEB4C5963DF53D16 + 72: 400F5322C0FF43DC5200620BC37FF4A9E24AEE56133CF7EBD145A39EC251A2FD + 73: 742E35F513B7C9728D99A11E92371D8BA6E896FEAC9D8A0D39E4495CC256D927 + 74: AAB4949E557839802A695377680D05503AC6D3CD75DB9C1F8E8A9EAB38073191 + 75: 5CB8F1894FD53479E32A37807EA634DE2E40B27D010D0EFB51A9D72056AABEEF + 76: BADBE2E21FA08388E3D8370CE52C4B238FF609467A210B55E85A294EA8A742C8 + 77: F5A95E8A2DB33C41E27C6311C38072855A449A46764CB06E83E2009F55A99690 + 78: C4F85961E3573BAA0D7A641C54FD823E1CB14AD0A80EB39EC51520C3811971B2 + 79: E5EDCEA3EF14F62971F2A7AF9844BA087FB1B788A71D45B2F742DAFEA4BB1995 + 80: EF2C5202301B45464FBBB20B620E1DA64DD3BCFC9CF70C4730034E3454FAF167 + 81: 7B634D4FC438A677BD4E870F6B032FFB560BF0B8C3DD725D9E8EDEEC215EC548 + 82: 83A722BED1883050623713ECB5579582798F2DC57E005B71260C524477EE202E + 83: 8EB021C8C8AA70F7C4AD48870014CC7C1E145584440CD43588908532C92B7BFD + 84: 6022BC8D846AF68A4657F2D6BE72DCF61B1CE43383D23444B95B2AAF145A7079 + 85: 47547F2B77898B1DB71CC4565ABFE511DDF9B965FAF8FE522B346D5B236B692F + 86: 5BA80C644AFAB98CEB9C006077DA110E52CC63C341F0941228A5992BE8D1DD65 + 87: A6B25F4E9F3AC57169CE0382D90B01F4DCC0F8C32C27ACA4A2F7907A013D33FD + 88: D851BD49FB420914B48EE013820E1C687063280292FC3DB19BA1736DD6DAF398 + 89: 5B975A34E73FF6566C891DED0CB8C7DE4AFF692BAA0927242098EBE7DB3C9D89 + 90: F2C574E2D8CBB04A7D40E5C3D135667B1C87876D0D2D6BBB60D4DD7C5685E9BC + 91: 1B337E6A77B5A12F75E971300C3D45A58B3C03C7185F2A3483B5A96CBAC4DCAB + 92: 4AF936D81988008315F97C57198E004E005C397F5AF713B4DE91C362ADEEEA27 + 93: 723108E510BB95B6B81096E9ADD1F4172746B11EE25B20EC0D7024EDA98FAFF7 + 94: 441B54654FCA74D21B181EE09949FFD08467FDB46809F5483DCB4A22155C19ED + 95: 0526880DE16DF38A3694017D726C488BA91A367987668D37A941B302127F9EBB + 96: C4242192953036ABE19D07719D2F1CBB8FF0088753D25C58632C9E2C600F5600 + 97: 1FD87DA597469DBDBD93D81DA9FB3678EE01B6B5E897BED5DEC5B17A077040BA + 98: D77403931FFF61B28384CDFC3A9857272D3452633B9ACEF703B668E564487E3C + 99: 19488ADA94F1C4CEABBE07C407BFD59A5F52E4F8EE964CBA6442636DFF12C925 +100: 1E6871799BDF2B3937F8458D124C4AE55AE5B4298EF6A83B8763070F4E2A0F3F +101: B3529A093CAE29DF5E4EECE729AE053FBF4579276DE2F90859C57D9579FAF6D5 +102: 7EA44D126CB99EEB4F985709BAF62015AA9802442D9D352D21FC75ED23450F54 +103: B52563C175057965565F8F6345282F5048846CBCB4DC920664CBEC585AED5DF4 +104: C2282AC6771F2651161B09D48DEF64CC305ABC98644C6F670D2F0E210FC9D16F +105: 54491B482182FC0C0D7B3B684AD8AB29166D007DCA103F0B2459E6834FFBDD9E +106: 1B673FB33D5A8C78E5EE95B8D7DBB22689E6644CC3AFD634A65BA79EFB47DCD5 +107: BF844D58767FA5C221422E7E12A8D33B7E529E6FC54B71813099686ADAE01938 +108: DD48C0124465C585979B4D874EBF2D62A0DDA994FDA7B7DB7A54352B3C04D9AA +109: F9B4586DB8320E1A08293C5C362C0234BA5B897D9A24303FF15309E34712B89D +110: DBF58866CDC3A0F11EB0C8AF7908C4FEFD4C1D1C2D16EECE2EC67A72E3D599F1 +111: BD209F60B0D04102A09175297FD255367E54B5A5605B928635C606306914363F +112: 2CAFEB0882CC405167E9A255B8581A66DC683212474902DD453DBCA20A94E61A +113: 3222333BE019DC995E5DD1496D5859DDAA491E03E7DF81A659D5E74957BF3B53 +114: 2CB19434BCBEDB42C79311C0F54AEDE574CD7541897075031D3A5061EAB75E84 +115: 544468938A91832E1491727D68C4D882E45E4C53CF2E94D6FA972D97B9383B66 +116: 7EC78AAB48E24164F2F4BFE5C98449A864C21E6548866A921DBB41C1E56338AD +117: 291D160ECEC8BB0A7555FDCE7BC0310066950B168CD6222F70B28F1EA2781D77 +118: 0EA887F7B2FF29215486DCFFB6336FAD698DFDE84FAAA7819C3229025760309F +119: 6FDCC1A442CC8391D7DD5A0DB6601EFAEE9A4954056C78A64038C36BF7ACB368 +120: BE74A90ABBC2EA03FF56DEDAE4EDA154BA6CF24D73A515903356283B653F5109 +121: ABECAF3391F6ED54820DEDD40221A6A2D034632B5CFD99F0E415F2D0C487C2B9 +122: 1B62C738AD0890B7EF86253EEA5BA612F65F9C106A04EF7F8F8D0DA2BDE1A436 +123: ED19094777D33AF6FBBF59170E3299CFFA2C7CEAA394B639DEE7E6691F7F23B2 +124: 715DE0E8C09E5FDE6BDA64971E9992A11A229DC1EBA3DBECA89CF1DA76757F39 +125: 3B963901747A3256269D07A476E4E3E6C74CEF45AEDCA3EF39897A3E83307C52 +126: 1DBB2537F9D1C789D59B43C188F0148C4FF00E4545F15EEF5FCFDB5B9C771A9D +127: C26BC7E9315E62AB0DC6AEB577724D07C09B0C6FDFC0A9F08D8548047C032248 +128: 2FF11194B2AEC1F943CB5F130BA647C151334068083194D7281A55D607AE255F +129: C4A3BBF841ED2A289E5109FB392229C80DB61C72FD92079B5A4F0441F095A111 +130: E9ED1482130F49D78F1FDDEEB30C8A8E255F917DAAE9553907E95B8242554C4E +131: 662F168860670C947B0954E99DFAFAABE57CEFE784D4852BD8B2F8F0118A2D6F +132: A492C90A1674016E0A2A4D47A9090C0BB496DAA57B57405E34BED2A596AC5D08 +133: 5B468AF710143DD99336EBE35CEC44D47281147F117A061279AC60A238FDF0F4 +134: C84140048F97A2B07831BC654821B316A1286A04CECEECCC172F0CA0039A886E +135: 9D4C1DAF06FC13D4E6AA4439AF56591E86302F5468ED2FD83DF5DCEC3EB5B741 +136: 744B6DED6880EA488FA1D63D52F1E5A49A8340A706C49AD81C017988AF20D2A0 +137: 89CB7DA333B0FDE45AE45950667A550E47EA40EE5E90F24CD76E0EEF8C524C4F +138: 7ED320CC648E71F703645E24DCC138CCD709B2CC301C2DB5C3AE5A12DC7D42B9 +139: 5AFAD9784B470924013641DE8B3D022C181BCD54D809F0A64FEDB2C4568997A6 +140: E503143A958D963BF71095D20C61DE3344017A745654EFD640C89FE5E07A1B70 +141: E332887A707F2A38BF12301B029A5D6472962D937C4056844E3224EC80D57B67 +142: EA6D40311804EB72D7B28C81FEDB6F926B7232AC8C66811AD1382A8BD4C4F840 +143: C83F8EA193498359183EB8A66958348E5DCBFCFADBAADD28C7020238BBC0B339 +144: 449043A396B3A48EB3467612981A8E666D60DDE6691A54CEED7ACB0E6E901CA3 +145: 978BA98ABD7DA915CB82FFD68E6C72EE336160809A9C98D0B73F6D4A5A2D539B +146: B7FE297A5A8EEF8BC273F104D7EAB6A346773BAA0C83BE78CEA1073EE6B3B611 +147: 3CD2AC21566B717D67B7CC2AC13F7883C2F05D6871F0A59FA2BE8DB5A11391EE +148: 276C34FD66A673BEB30E90B37ADD5EB27D8C07A61D7BACAB8B948B2650A97AD6 +149: ADC4756A2C775692463B9E25D3DDBE7679355F1CD7C0A63CC5B880C9EACC3763 +150: 251CFFD321CF37D9B80090EC1AE296A450B05B8DD151D60BA1C9CD63E0C5EDCA +151: 50550008EBBB5C82F774B0C6F2BA1E10CE411F44B67475515D7D515741A1FF19 +152: 7EF41372147DC56403B8EDDE2927CF7ED9C2AC755D24CFBB3A792F02A7E1E9B9 +153: 29BA190962830BE08A9D26DBD06B39F4098DFBAF63689FB732047C3EFA4227FE +154: 69943757A8848DCCF71ACEE24030DB8BF32A4C5799EA0188BDEA6F85915E530A +155: CFB235AA688E22CB7082C938A4C1FF0AC8D2F0888058A6B783EBFE538D36C439 +156: 9FA588A94CAFB1B9253AF2B2043BEE45B11C22F25939AEBA723B18C8B523155B +157: D5826F6F131A682F6E6C3EC66F00C451DE9976A74221F031E6541F9ED96E649D +158: B7586F758A8D392648F8FAEB8AC1769632F812512D07DEC1B8AC4110EF932028 +159: 7EBBE53085A0ECF3319884CE0DB4F8EC76473783E1AB2FFA953F25C6E1E76A20 +160: B301C3CC815CD2366E0B31074EBC06119400FDB8935B713CA6A44507AB88AD3F +161: E45D33110C77AB146E69D214CFC29B8521027F318A20A617D0F17D90E598F6A5 +162: 5CD02E62E506B8BD6D00BC2A7D4CE8FCE52103B7F2C3AF0A85D1FEE52D736C97 +163: C5F15519B2A71222265DA310E521CAEB50CABB221E3BCD6766D0037EBE76838C +164: 8F619377F20A94158D0ABEAA076FC591F44B1DC917524CDFA6E8A46D56D677A8 +165: C80FDE1BCB0A393E5CB79C418565E1DA15B2520CFFBDBF9D8A078F1E3DA3051B +166: 145AA28DFD7C22E2146EDDA61582E59CDFB3461C034E21A7021DFE9A87EB4F02 +167: 87CB225B33F0D1E4342CCA75D0B6838F3B5E3639605DDB6C34ADFD1F000F3628 +168: 6723FA46D8E660D58DF08ABC7B8ECCA5687BDCFCDE075DD262F351033F29B3C9 +169: 318DE82AA52B2786D92DE178B3685664D17C081937803792CD8E58D15B0436E1 +170: 1829CD424106FDBFA4CB062AA7B55BD0933EFC9DE2FD1B3CE9513A213F76051B +171: 36E31B4B7CCBF484C4A1E5D169DE9F726E3846344D9C2D7FA0D09BFDB6C26DF2 +172: A67DDC415E7AC24088C728A0C90B5718965AD380790B937584F34ACE41EC599B +173: 408517C5E891A82958F1FB2357AD46668ADBE9C9A62497E625FA99DBC9B39DD5 +174: F78CD14A1F44BCCB28D054965946DCE4EC830AEB10DB7D57453B0096354C764B +175: E7E19357A66DFAF638014FA2F68F97A61774391C0DE6D44BC8B04FD73A074194 +176: 2F43764BB6DE5F371DE70D5D321422D139E68036CCF4BEF548CEB24DD0E8F7F2 +177: 842FAD62A0B5A057DD95D8A18EBBB38DDB94E2D8BE8CBE8CB143035226F3D3DC +178: D2B5E100E50507A5CFA81D82B1675B346CD472192E781B2AF427404D6CB7DB27 +179: 05480D17248024985EBE22CBC9BC4FECF680D1C98849A45EEF652692C85E5124 +180: 44866966D06C8FCDF4E07074E1309B9DA6C498C5F624FA71DA12EA90F5659994 +181: E66A0FBA1939B25E533EFB1DA1E509111B1B2F135E2B395DC7411F1C5983958F +182: 7CFDBA5EFC5EB2C562293BC1102F9CCFF778CAB78145A3D2BDCFD4C29C5F80D9 +183: CDF05F2A14BD01139E731C82E8821AA4094971C95CC6A08C7EB4643742A3B871 +184: 52F30234CC6F24B7637DEC71243AA70C3130BC74593AC6C794EB6D5AF563B11A +185: 7A7933C4B7ABFECB8D7D1FD331A15AF98512A3AD7D9D9C3F23BF99F189A1C78B +186: 85A9BB602894578AE83F18E1ADCB63EF6F9A3C13828BF212C751A285B30EBDEC +187: 9C4D7E27B201D6B4571F897C2AFB7E95075951CC96E31C01DC224BA904A6ACC1 +188: ABB898DE6B19F043D9481E69DD97069061916E05F3415DCFB5766847A923F9AB +189: 8CF262389D731135956603DE1429E35290478239163F17BE26D92852D5B3B612 +190: BA6D869CEE76015F45212B41613A567985D9C30D363E968948A07190841F3B5A +191: 5520437CFB0246D7279CA01AFF3C8B87A7B228309A0C0C64313BA54812DE6FD2 +192: F2CEE575D139DA5D0C49A888EC3A573F3D28496699FC0F3C82C69B2FF2CC8FD9 +193: 3256ADE32D4D17F167179A11BB42888A78B0F169E0F900406E2E6527F83410FA +194: 0430205B244020D13A4E99F927EDE6363E69CEAB486F899676F092FE100C8E26 +195: 6B6B0908E9C1FEE98B95AAE59BDA5EB6F2EF14EBB49747175F0224F16A7268D0 +196: 5CC244BB87F8B09058DEC56B3F92FDA0A5C5FFD375C45D4B2C6259D9E7341494 +197: 8505317F0760F36B40A6781DBF6095BEE4A4C3C207491107C2A8F76368578250 +198: C76F387DAE210C7FD030E591F35D735258882C72C847ABE2B7BD7E0B42A8A23F +199: 2AC2E952027767245AA4EAC553E531B3EFFE92582924FCB21D9E6E7E67054209 +200: E511AA65D4E53C0BB6065C9E1D2882248307FC4987E67FCA18D7E3C77017DF65 +201: EDF8F5A95B1A6F3FF8AB66E2C6A19A8AB40743A079E936510F40148AC735BF10 +202: 053AEC7A30D83DBE469D8F2681C13147F79FD0DD9F1A1A0BE497708451905D2D +203: 21433FBA9B1939EF2C4AFA26BEAE530E2025DA29EA0F6EA68C0BE12433517BC3 +204: 52ECFE9A21C46E99B5CD93BE95C823C5833BC31CAB438609418B4D7F9F8563CF +205: 95BD806F45711A55AEE76D774CD61EB525B6C0BF30204F4D8032E3551C986F42 +206: B3B55F8CC17DEE54BB1244FBB2F8CEC30442A5B40EA1841D365ADE811B2AA782 +207: E1BDBF67EB54ACE9E283DFF0F8483CFE372362EAB502439F960ABF5D67465300 +208: D47DB397436F5F0A2A7A2E8BE41AA9422E269B9ED7885D36143ABDC43DFD6700 +209: 7BB4C3B85AF25263FFE1D275E32874F7F1A9D1EF9D1D60FB4823D6BFA7E264A9 +210: C9C929BE3E43739965C7E0674BDD1C6EA72C50297747D3BF3AAD42DB47E2FF8E +211: 12E101B96C9CBB6FF3CAF705C6CBFB89FC23AA4C9677DC5ADEA067B6F0A07F93 +212: A01A6ED04C9AC88BD6B635DC1EA960F24A1861673C6C8AEFBFCF5F395E9DBB00 +213: F32769B2C875B9FF94BDBA4967D43E9A8FD057DB6E6C30AF73D193B7043CC71B +214: 9DFBABF53ADEA41DF013F7DE81E0CB3FB45460D0EA05A4A118F94734B5C46108 +215: C64F0999F72491D5D231934F61852D4A80515D8B433919BC428A97460CAC706C +216: 727F38B67AAC9F8769C6A6DC8FB5DDEE59EB1D72F151384A3EF84B0D002A95D7 +217: 2F3752B1856A41A771463FE86D33691FCE73658B4F4D0618267850175425FA57 +218: 4A98E1098631E00F4EF84982671723616230BEDEFE262F4B85529410A1610341 +219: 531C4689A799EFD30CE2A2D7E402DC4112662E2CBD09147550BAC74F9B710E4B +220: E9AAF8A14AEA7B7095B68DF1E63BF61ECF23DE3336CD949CD7009011E26875CC +221: 5D601683D4AA736661BC2AD3DB8EBCD805782733495A973F3952BA5CFA272A85 +222: A322AFFFCCF4EBFC1235A2DF3EF4037D3F88A002D221D2658A5A813A4499850C +223: EC30D001273482A2DC2D362CB5F6A33C2156E923E2B250CA385713D4C0B01D78 +224: 2A6ED14E53950B0CC3AE36C157829AB67D8968EC2313368FED1277EC96C20197 +225: 01090CA95E440A43638AF490BDDA94E1AEA7B043DECB75797E2CAC04F7DB0640 +226: A18334813457B25623E0C90CFE5B7FB78BB8F3B02BB3EF1E60F2B5C466FBC4BF +227: 3F89302B5AFB23AC66C5C55DE02880B66EC8559D67852B66E754A819835BE501 +228: 85B211803476C33B845FA83E88FA79185C197254A72A413EDC568D1F6849CC32 +229: 08A363B5C2637D0F22E6A252C850612D66156FF2786E3D467E8076722B49B95C +230: C100CD4D709925FCCA80E4D9A173C5607638182C174458208AFEFF23B4B3C206 +231: 373EA0C75488AED51804B6E6C1C80413C234C13FF75D19BCBAB9864EBB7C2C90 +232: AC1C350458F207DD58DFB3B7EA27EB66D677E57B090FB2AACE98C85B9536E7B3 +233: A16FF8306C0F4E7C98AA5D522874AD88C465D8E1A156A3D9D951886BEEB2C5E5 +234: A4BD343B59F5AB8851FA2BA52CDC0D66FAE5C0C17C108DC8F78C2524D2F92D53 +235: 3BCE52BA2BF56215AD45CC66AAFBC61E0A32EAD8B5C0B52CAF78B7F47BE118B0 +236: C6AA797F5D490128E8ECB7828EF565605D38DAC5D2532B87B98E01B82B590159 +237: 40F2369A8409A9E373AE61F39F98754419257B8D602E89BD6646145CCFDCDF7D +238: 72CB3D5F5474F0FD2AD89B5811A13F9FCA5AC514C850A19A27984BAFB571E0A1 +239: B81472D255D80182E196481E5866AA207761A152302A0237E242EB88C577A428 +240: 6CA13C55886B74A5CA2AC9782C4B9A49FE3AEEEFDFC0CEFC34984872FB4C54FD +241: 1A488E47268942A41B5733238286FB218AE45D4BD9B59B48E1C20478410943F6 +242: 98DD6E9B848D21D02947BD75B6D220C9AAAE20AF0597C50D70896B5F494ADCC1 +243: A8DAE0682E2A7A5A7D7BAC33F409D4A2377BB7454DA5B4708F37F7435B52687D +244: 21CCDC5EFF5BDD96C32D279D5134666F5B3B3E5AF86D0A56E1496DEBCE229D82 +245: 69F37D48186A4D243267D8DD064BFC54989177834A0FEACFBDF22160D6A8C2DC +246: CACD4179F2C2AA00207A70DB4B1397C2B0F278B5F926EB6A32EA349DACCB9CDC +247: D8D16C8EA78D7F3E047016273B4B145D82ADEFA1017B07D25B36CEACF5266B7C +248: 5AE8021E842AB071A0918438CFA7D1522581994D421838B61F53331E5832137C +249: E3872214CCEA7FA48B5B32FCDFEB5389E0AFE6C1F842CD47BCEBE52FCE5F3D4A +250: 153EFE4642407F27A595C3B78AB2535F34FFD7DA8200E81E3AF8027DE8F237C3 +251: 076410D63654626C4ADA16A8911918A203FE3345628D4237CB6EADEA67A8A070 +252: 031C022F234308A9AA5C9532ACF563F299F9A63D8353F294FD8C46D1BBD67D4A +253: 718E33A2A762F99E7F1146D5A3A1E96156593ECAD1878911EFEA11AD15B5FC12 +254: D0CFB8A40E130BC70905903D1EA8EFC7A1DD0DF7E35810472DFAB302C9480C44 +255: FD932614F375BF71420530A690CB16E52C08E99CFE741AC8436FCA8C8BFD5676 +256: 0837A11D994D5AA860D06917A8A0F63E3111B95633DEEB15EED9949376F37D36 + +Hash: sha3-224 + 0: 6B4E03423667DBB73B6E15454F0EB1ABD4597F9A1B078E3F5B5A6BC7 + 1: BDD5167212D2DC69665F5A8875AB87F23D5CE7849132F56371A19096 + 2: 334CDA37A26C0669CC7A5074452F033FD57FD96AE0729582B69F865E + 3: 5FB2B598EE40EF6F46E82CB8264984AAEE891C680D89AF5C3C36ED45 + 4: 4FB067ED1266B8F487F609F12350AE92CCDA9A197D7DA4A831724D7D + 5: 365C10987F3C57DCA7B9C1FD7158C0E52A394A8FB0ABD43D738893B2 + 6: 911029D5B740DC8F65661C3A137296D9E05C3315D8F52F1FDF632462 + 7: 45C40E1C9601FFB8E7D024968E48581CE067EA33B0EFCF25F85E627A + 8: 2FF69F46EA70C729F349DBCC9A0B5D6166031321AF70833B2FACAA72 + 9: 7AC8B0AFEEFF883AF3896371FAD034386F88941E9C14371FDCEEA996 + 10: E38CF337E48CDB4B64A746B994BE20781E51F4547A4C39240599DCBA + 11: 5891AFA32A2C7435728F0627820908F20A339267E42119D5A7910573 + 12: D78D4B95DB37CAEEC81ECBA9568EB35EBD5B11E134E974267B294636 + 13: 207002605B91D5225A8F89DEE317C747A2D8688AF13CE0E3204979C5 + 14: 61FEAA9DCE58B63BAB08455026AAA94E620BC03F1DACB6A2F75121A0 + 15: 6999702B14328604DD71D59285D3E82ED3E5E7CC44169B21E975A849 + 16: 31F77B0C661546DC776A938983A2A10A2EADBC8D33D4A82863933F12 + 17: DE09A5443FF8A9F87D667C88005D06061D4DC716B29265B278A590C4 + 18: 8B53AC4F3F6ECC2707EE6B404A17996A75B2B3251B2D0078636D679B + 19: 0371C2A70002358F54FC14E5AA4B7F65D825FFEF5A0A4E3C9ABA5793 + 20: 6775D26C17A4065ED4DF905506B42E59E7F40307395BA33E5C4CED1C + 21: 7AA468C9554A9B1DF5F3E01A95678D9E7910EC9B9A6B824DDC28871C + 22: 5640D599AB3226854D178F163FA42818E59B309D56C5A827C172835B + 23: D7FBECD514F2E707020FA059E600A857635E3F7FAF5759B5800AAC96 + 24: 8FD2B6843C0C2D668607FF71C7F34F19F7FB75ADAC806B66C6C7B448 + 25: B81788863F8B00FFC7E1E7EA429616A92EC89EB559A11FB4BF5DE286 + 26: 9E987B34BABEEC98886B1002A5D42778D76BCA5330A03CF032672C10 + 27: EBA0716D82672CFE5900F7AB0BB35FEE3D8FFC95E2DF1BB61354236D + 28: 97E5E7D260B9799D5F315C3FF429EE9C86550394CE833D792C6ED1D7 + 29: 04CB508569475BE9527B16B4C43FF664175CF9F4A387A23D49391375 + 30: C82B33A8CEFCEF6AA1B38C658C066AFCBD38E6F814B0209B5053C3F8 + 31: 2457BF71C2BB07328BA31A109AE3298A6603BA56DE537542DEE8A128 + 32: BFC9C1E8939AEE953CA0D425A2F0CBDD2D18025D5D6B798F1C8150B9 + 33: 6568AE0FA4A34C7E229EFB54A763BE00B843436CF2D19C2B6BAC75E6 + 34: A40955AFC5E1756A35F7EEBFC03B769186D6C48EBB38E4DE613431C4 + 35: 3F1B508FBC4DC40BC4DA2009367ED5188611DB2337E581316BB51F32 + 36: 27DF7FC47C4DE0B861EAFE748BFF5C1C522FDB029247D7A000D19500 + 37: F6EFE4FD3D4F7C8DEEC783E891F9250BD3E86BBEDEDBE6F5CD5B86C8 + 38: 44976B957E6CC5157F46BF52C46855E49687B7FA3102F0043F251FC7 + 39: 221553ADAFE51AA810C853CEEED84EC0A2EAA0635ECCE9BE354D0BC8 + 40: 0E2FBB87B0CA6BD9FB85A32E357465CE68E0ED40A3FDAA36BED423C2 + 41: 1FCB5DB23D17C53D75D03FE26EC2EA74CDB1BF308A5D0B8A18F3A563 + 42: A24830A72AFB30EADF4EFBDB94DEF365744D0F151627EB9BC97D3003 + 43: AC2C3F390F0173B228C73C9AF69FD2D2A425FFC0883886514335EDAC + 44: CE009DCD1C90325762707024C06B19E9E98F3AE645BEC1BFB133327D + 45: E3F3F6EB37420DE23EA22C13D4B5B01D2E29594AB6E3103D0EA80CD0 + 46: 0966D9A5D07F5E2CA13699C46A77502251F802646E5D5C1A4AEEA70B + 47: B9E10F41CC2FBB430D370E20E5081C00C659D6B6A9ED2634CEB25D33 + 48: D05325556666453175764F98A08679952AEC0C9649353E592131FB9D + 49: A4F03909FE084AA3F0E5511E1DDEC77A026E5280B2D6C417BF662418 + 50: 446B0071F21FFB63BFA6054A96F44FD4996F30CB4D398190B42C6F43 + 51: 9F048B051AF10E08DAA0C9FA417CA690A65870718DE161C511C29D9F + 52: BEB65AA59119AB5F8F75D0B64859028D3BCCDC8EEF764D27B70E9F5D + 53: 3E5C923999C5D50A8C414BF627DC53834BBC2C0DB765C8087B287DE7 + 54: 9E9105787BDD3D4E585C2FF029C181F1CA04934607FBB14D1236FE33 + 55: 10681E293CCE004E088BE7C67426F50D6AACC7E31447B0F73A425C35 + 56: FC95D44E806CBBD484E379882238F555FDA923878C443ABE4CE4CDD6 + 57: 1E348592E91C1FE6AD862AD5311868830075C4189334E04EC22CA930 + 58: A7154F3DC5490F0D0751AA68536377DF56D8F2C9FB46496B79AC4B65 + 59: 93D13ACE1B752CD34122C3FF5BA26AB96A72282082AF34E40242E36B + 60: BDA4464722E003C1B8B150051E39E5106E8F05E53397C6B411ED960C + 61: BB19BEDB5FF28577B732BD0BFABAA9F18AE10BCFD193448CBCB89B82 + 62: F2E6C2BA4D6E085BD900BCC499C8ED8341C613AD721C28B3020A9978 + 63: 05E05C93D7F8B002EB5FAB6958A32D124E000143B63835DDF64E48FA + 64: FE7C26EE7D8A00D407EFC65DCD88809F25F8E37395148733E6EFC3B5 + 65: C5C12A29147A04DA59CE54CC657A26AD2B7E65E679F64684915BE492 + 66: C29AF1E7B8F818AC1815CEB1DFA5A8A177AA98B5DC2803ADA079047F + 67: 2E5265A1D7556CAA6F355C36A3E726BFEC40725FBB1088BE2DAB08D9 + 68: 07742BE70320B1D87628531D521E6744282A8F70180CD8B5EBB5AA59 + 69: BB41C858301CB57230FD85083BA5C76044282170123A990F461E3B14 + 70: C885E6C9BE4A56615ADC88657907B0449FF80A0B14459096CAA14999 + 71: 5E31D4BC8904E6E77531E6B975D3DCDD4330C03620E5204BC047CE2E + 72: 0FDD8265D5382246A4EB6580DF2452FFC3918CF04EDD9FED88F566AA + 73: B1D7EDC8A77C2457DD67597772EF2EB3360D6F2C48CE599CBD81F2CB + 74: 5798BE75376773997CE6B43A82BD323D3A5171176D349F0AA91BB18C + 75: 0F8BF99981EC3363F6FD917BDB1B3802761E6383675C249866F6C28E + 76: 7FE009BEFB156B7582BC1173871BFBF611E23D90C7B495E8FC94D7CC + 77: 449702E349D61A6391648DB4244D8B104836D856FA7B18B32F764BE5 + 78: 4F80419266A26D02B97DC83AACC2298775E061D30DAC8C6CCD9AEA7B + 79: 431C1D7A3B1DB04141C4D4C0A3C56468380E1A8810ED72DBF6851E5C + 80: D89AC3CFF48F7F73861ED16DB3FF239559BA8F04D4E9C46F7ABB20CD + 81: 7259CD78031B5012BFACFEF147D52A8FBCFDC5EC1A5E54B38014F6F3 + 82: 0E5BDF794984DE3C5082E8A9BF5F83056FE28990791707979350CCAF + 83: D49E2A8D59F3F60CA46180250742E74AF7C3E6356FE8D4B9FD145193 + 84: C4F63E763E463357642AC06CFD84DAFC4578D36AB63766726EE56320 + 85: 0C91B9E9B50B98FC31D4F70545692BF861E148DED0C6E712F710D81E + 86: A65ACC6242A0C8DEBA233A3F1FE4B9DC0B4012D45766CC22EC2EC96A + 87: A5208843BA4F129C0129323CDD22303DFD25A1F6D9063C2BF4FD08DE + 88: F6F6420C9DE252D2203641D4D68E7C6C14F8BA7B5E159F05179420D4 + 89: 82C4894ED849BF4D18672865D98A35FE504284E574C06E4310CC9354 + 90: DD61E5602720B1C1885CE5DFA61B7333259DCEF201A5FB7274FC948A + 91: B37608E84CCEFFA667E5EAAA925ECF00286C3A6DD97EB620B300C7EC + 92: 1C6005AD8414EB5FDB90FD8F8F241B781C6E78922BD5F155EB8066BA + 93: C79E89E33C99CBC50BA0D1781C45A1F2692A2FEBD162AF590E390753 + 94: 6B7CF9DCEA9126FCBD0694BF5376F4428F197E5BCA5AF957457549D3 + 95: 9E2FE74F3D509A5E0FF21517F5ED277D010AABFC8EE6DC8DE589882C + 96: 3FAC97532617C7CA76E2648958C9470A3AAF37AE74C28E5C95FE884D + 97: C855C493D7ED05F8D871AF38F66B3EF6FB6BB4E9ED45D1D23AF0FFA6 + 98: 490CB3DCD9A9CADFA1C590C9EB8695CE5F4787213CED5B7593CEC26E + 99: 8EFD1D71D36A31A799403596BD1189A25DBDD3ADC5E2425AE952B25F +100: 21649AC9D0430D74D5F5261653DA46C87AC1560540B4579101083461 +101: 03B96617EDF75C33E4949E2B462EB75828546A2EB8308BDD4C0859CF +102: C556DB7B33E53BF1736D9BC84F30AA936A8EA4AFCC590D70FBE647AB +103: 8B59FEFCAF88187D29EB7B887F5C066475168A4348DEAC4F34993D63 +104: 2027BB84E1A588623F3F5DDED0663BBFF3B93D46C65578CA892F6D91 +105: 9F2AE8EB1AD97E9B3DE8EC65BE32908225505B249F8A7A01405F2E82 +106: 3FB6E70E2AFF0D7E0FABE4A4C93B689F72D27DA6B79FB195EB790BE3 +107: A805C623242A8C03376E463285999AAFBA952369D6E87124827514A1 +108: 1A8C1E9940FD32E203065A840071FE7B4F92E51F119783A356849F12 +109: E9BE39172FC3D85C099484FC1854351A1850232F12BCC98C90ACC290 +110: 598B9E288D05E0D7F3739967C706BF888BFA4128A32543C662709D4C +111: 4FA336790D224B4A79FE2992C5A2B604988A8DBF85A76068DC5CF3F1 +112: FC8B641FE0A9268A14BC1CE81587B80F31A7BBC8D5600E310F70BC9F +113: DFC4ED11AF8646B394E816DC1EFABD6908E6ED5ADFA1CD911C905DBA +114: 2E2AECBD2EEFF11F2B904B57F514C6F26FCA9BAFA7431BF1E74158A6 +115: A7B03A76C3FAB1D2391F527FC1FD071BF2E1E98F8BB09AABCBA17727 +116: 1C9FF49680486878EFFB763A10DD1FCBEBEBB8B947086AAD5670F019 +117: 1AA1ABDB490CBC83DD173FF2F893C1E28554C5A87669171A388ACC91 +118: D708FC237FAA908E445B0E5C037558E0A30134C7171489F2EEA3B34B +119: 0509BC607ABB229F4F9328159195249390630860534528D260BE452E +120: 28EEB96CC2A73ACFCF6D7A4B8017315291AF31BDEF2DF8B09B8A107D +121: 0684AEC742C636A0A2415DD0D710B9142A4FC45E8EA5CD2226B26F6E +122: 8EA838B2DF09920001FC3D86C2DA985C5D456E2C555AFA3C2C94153A +123: 7E9584A788305A9C6CE95AE9F6E6214FB068D6421356FDEB9472C681 +124: ED232D89C157749B47A1A0CB1EDD71D7C863BC8822192921A551D15E +125: 2013B0AF19BD61CF2DDABBB7D45FAF04784103210DB6697DE37CD63E +126: 5F20F121AC27794E25A8058ED9840EF36D8668EA360F82CA64664C8B +127: E0AB99E85CC24D5AA35B2B2D5A80F15CC70FE6443FA8ED433F9DD8E2 +128: 935982770B8E39A960C38939824E4236085FCAB2EC5C00D72FBF1C78 +129: F95558A7F2A0E7A5B6F205F1D7570AE7AA08D3D50FF137CFFB5201C9 +130: 6F1D54B0F0730DA6F13E7B1ABDD301F278A979295EDA0CC9857F7DAC +131: C743E948DDE59240651706C46B8CC6D931305DCB7CEFD70BD0653368 +132: 8C26212B2F2CB047C94A2E4C312D92768A1A05936FA9D8E0DCB5175B +133: 67DD1365E9E2EC75F4D96A8460A0A9BF686827920E2B7FBBB0EF2925 +134: 6D8A43354B6C4E4E28E93AD60E16DF666EECA61B360F718009C445A1 +135: 3174E5126280625ECDFDB238D6A10D1C8B071031870ED197640CAD90 +136: 5D633F7E245E4338FA2698EF8B0CF98B129B5CC99622F770E3BA0CB6 +137: 7098DDCFF44C0AE3E0802D8D60FE7BEA8D0D3219CE28660AF1AEE40C +138: D6537CB1962DA8CE6415A92512FDC03BA319C9AF89EA795C2EA962B0 +139: 5BBE5C79373CAAF7F79F3012E96BF5AC0BAB10E324DFBAC3D29BF374 +140: 8EB136B9F46C1F40F82DD7609E65BCBFC45E641CD0262003DA81997A +141: A8DF4DBDC4C5D535EB3F590DD7E097E0B1B3ACE931447D987AC25E94 +142: 4353E7ED38EB9CC41ABBF0709C6AB707DE70D759E5D6EEDF09043FD0 +143: 64D0E8A1BE3CF30EF6727B30A6E428F7F068D44634C943D277AD8E7F +144: 5BE75E6A08F19913A1D8036C056CC4556B98DC90AECA3F2A0664DEDC +145: 90B861AC1B1598459AD8337AFA9933CE2F1A6F972C57DAF8FC2737E4 +146: BF0135795B4CFF740ECA130C323F8B44F663B0C4F9DD4A753E6D19C6 +147: 5046B58A09C9D4F0B46557C1BD29C681E1D8E6753A98E321FEF9E668 +148: A500B780B184DB8CEFA4431EDCA414D36096D69A257200BD58DA50F5 +149: 23543FCC62111C1576B4B66E27E08188AA4F428D80EDD0E296FBB93F +150: 179BF2290B46260D60D729DC9FB547A67A25BAA7B250D81B42473888 +151: 93DBC78BB8581796D80A799867EB7433A76C1112D041A43832F46AB9 +152: 86B38BEFB99A0C37BD562EAEDF416CC98D37FD76EA6841AF2BFA00CF +153: 586E75D5C595020D039B905BC0C72549F1F0F263F383071873B1A3F4 +154: 228D798D4B715B2CC5ADC9FF00FB6123A6EE5DCAB09C62CBE0F13610 +155: 4731F0557591E5F2BD5F4A82B2867217D2F187170BA434DBF3655D72 +156: AD2EB6EA86FDC83E7DE7AB85C8EE63E3F74B8C45E2F17F3DE5AAEDEA +157: 4F866857ED64EC4489465BE797D6E32DEE4866842A35EB0C3EE9DAC6 +158: 2F50B9307F67E63151C216D66DA5A14AF9AC3752B4D8C27C202D5CE9 +159: 7F034FE5B2F0109FAC7449B46DABA20944102E25A31A0C346B7DD1B2 +160: B227E462031692D03AA4784E7DBF6A5A18FFB070389D5B245957C911 +161: 1F66E24E59F472BDAF073E38CCA1FE9F0E3FD3158C0E340E1737D8BB +162: 579C94ACDD161130A3314BC21E9174A02EB8A58287450804EEAEE246 +163: 59BFEC1D1B9CD922BA82955069CFE9C69114EA87ED78057FE38ECA49 +164: 08A9164451C41B3B3D8858A9E54CDBDE2E871305FC7342C79D4291A4 +165: 2A749643D6F831532AB07A1FA9736857CB1BF699B0D88B75DBAD4D99 +166: FDD6D5D0A8014CD0E62D02703E252A32A7B3485E406A77E026AF666D +167: 3E78E02F6BCD8CF59D7F633F1A9FD522FBE6CC8914247B6171694B69 +168: 58E2D8551F4CB53E9CE8CDFBA50A81FD14E0B112A42007B03737372C +169: 44C06523FCD275B5CEFCE7D0FAD88ED27F984EF8BAA6C58E6BBFAE73 +170: 0D1EB14CE7A3923AEEEA1BB0BB547A66B7FFD35622B41A7762D44D63 +171: 29FBF6234371C81A48E85BA79527F1EDAC02B6AC990EEE8C0B2A8DD5 +172: 46F9D06D9D45A89CF79ADA602F77F39236114945E41ABBA656A122CB +173: C1754BFE1269ADA378D3805DCD05BFF68631DBF37F52A758EC447007 +174: E36A81BCED4D94D6ED0541E2E4C2754E2EB94DEEA20717A916B929FE +175: A83197194F2B4255053CBFC3F62728700A7D0A9E1DBACD047393083F +176: BB8F93DBE385D8165517FC5A3846C29C9E53BBF029E208DC99AEDE9C +177: EE83F2E05ACB846430EE4B48C00AA052117DB078B308F055814B7420 +178: 033254B2F0A9B570372D5464F9DB0248620D7D1892CF75B9E41E2A76 +179: 8EA210E4AE717107C1D01B8375E7D367F784B780F56D53D58C123690 +180: 1BE8C13BCF3907FC49D2077E50B41505E140C3DC6FB3955D098C46FD +181: CA7A249693D61CAD10F8E5F4CADC950F13ADEBCB54601D5420E5E14B +182: 724F8866C5A1920D2E44665D7A78AA651A752D02BC9540EAC624CF02 +183: FD16C06F8DCA7C4F8672315718A491E210EDCBA5046B890F36C59C33 +184: 8A43F3FA567A4A713335CF4F6827F74F4B2BE277F1A9D3DE8C38207B +185: E897112CB41BDC0CE459888212EA5F4D41123EED5FC45B80FCFED66D +186: 56C37A47857DB340CD58BCED82D7D5BD9690D6003AEDBC69960ECB2E +187: 7CEB4DF1D46918CC5066AE697DF9569EB847270F3011CBC681ABC64F +188: 3BD6FDB78946EF324512CD5A0DF1FB34DDD68F4DDA07732E9B4344DA +189: D442C6E9324A1A4DFADD0580E3AFB33C669A12777BC1A990B7848D9A +190: 0342DBC2248C6D2B283CFE82F7ECADAEF526363C88AAD70663408EB1 +191: B14CB26E7A5205BE06851D63B07270DB7815315CD5D9D53A87B9A43E +192: C8C45C35677C8B0A8E0F69A058C2B6E8684F302BC2903EE0C79430B4 +193: 11653C5C30DBA94F142056AE704EBC82CBD1F4E2A1CA120004EB7DD5 +194: 19BEC341BB47355CF06A30AB8171FF41112B5A14DCE42A6F28CED997 +195: 00DC3930079D7BCF1BFF3F76A90901F0CD528E233D0A2831FD6672D5 +196: 21D48FCED6A0C14B580C2A82F2380E70578AA22C6C50CB6BFE76BC72 +197: F5CE6EAFD6224F02CCC0AAF5DE793EBAAE2128AF4877476F8358028E +198: BF329FEE8039E89E0970053EE509EDDDE096F026A8BFCBA6D99856C7 +199: 75EFF28580619BC6992DBA34062399CACBB7F96FFE361B240E36D930 +200: 8BCD90DBC5379549B5E78A1FBE24AE120D92CAEF17750461262B1E97 +201: 0DE753D613321A4EC586FB8D4A5330A35FF2D08C32D434457C58ED38 +202: 5196805B5900643580CA19E464D276DBA36C651AD53700FCB8AAC114 +203: D2A3342D9187CA1E54457264F61E3F63B08FE6C1486C6FA27D93F372 +204: 4671BEC428BD36E0A0D9B741A8F312AB73629861731F43622397D9F4 +205: 04D3C3FB6359A09FBF9179A3E83B147A2C32274151670FDFE768B26F +206: 85F8B6BCD8364CB1F86929BE5F0C8E8CD7395508A35A28721F2005D9 +207: 05069F1D874DEDDFFDA67A3C74DEB39BA64AB26B9A288DF18EAAAAFE +208: E512D3088E41C157F4C31081D835061E78368ECB995F0F865AE7C8DD +209: 99CB5E3B68E4CEF44E7BCE89FEC5D3AD0BED68A341C4F26685A91435 +210: 257B54153499D81573E680442AEA471B48A2051AA2A87CA85B97034D +211: 027E48B8B02932BCBDBB2EE048A65AE28C348F55EC739357938C2CEF +212: 0937C69C2B9FDF13C58D5F80B627B29E2B4A00A6EA43D39303EA36F0 +213: 15F0894B40AA70EBA1BC28B7413B0FDC248DD83A7C057F1A3C857380 +214: 5C5100F771A361BDE3DA81CDD785D5EA906676D54CE6F37673D95411 +215: 4BEDD88CAB661DB3621608DAFA55424F00580E35A158EE9502878964 +216: 4B6B3E4E23805ADBD9520D65D01E6F132343DC203F97584F067761B4 +217: 4CD16EC65628AEA9E2857A339E957DD1987E0598119F58FEC84C53A4 +218: A6230282773A972AA88F8749D42E78E51089198506EF5B4D44E6B077 +219: C1CC1E77014B6CEE035C07217B2711CE0592F199B896BD9BBA8C36DE +220: 5B3D971F3BD1CD65D2D6888A044CDF4C099581690278354FB384C34C +221: C3D7CFE6AECABFED12C1D90D499910F8C98C7FF6EB1E59A4ED5F5161 +222: 01DCF63DF396168A5D79178E9C609DBF2AFA3576F5BA13E0336217A4 +223: DB2C60B5EFD3CBAEE94F9DB5069208258B2514702850ECA5B4D0CD2C +224: 6456D3B2001892E582221E5E1BA665750D0A26C977EC81086A1F2AE0 +225: BD46D6833E96998C8FF2772CA72AFEE2F6BF01B90FC4CEDB0342474C +226: B0CE5949761859192C151C57013B68ACB0E6F3280F2D01AB64D73937 +227: E4F9DA1C2B99AD60674868BD8637C183800929533663E65930593765 +228: 8A8DB3F904FB73D78C0F10412F9D5157D99BF04CEB9E2098092D3085 +229: 53F138AE00F3D4C70ECB02448F611A7AF28C8A8BF5C780C6AC418728 +230: C2B4AB66B72F8FAD6DE82CF448FB3D3364A010FD5684E782A11B9DCA +231: 36E9942DA297F65F32401003AF92650F98B9A63CF551AB4110D9F51C +232: 5B118A50CF4709C2145D0BAD449995201E813947B48DDEFC9AE91CBD +233: EFC6640A100DEBBA66807F4FA5C77EB39E961E10996B79AFD264559C +234: EF44CDCB35BE9006C8C870A459C5E9F682C133C7289FBC48D070D5B6 +235: 792F9656C76CFFF751CA61E613BC76F5B2499AF2A0D3CFBD66847C09 +236: F95E7CF33801C2DB385D9D4A2000E2E28CF90A6C6036E7D82BB0B2B2 +237: 188480C0CC9B923758036F585935647B59E172A33CA76F3CAB672105 +238: 8F15F5E14B5084D1146F050BA70363C50E0C8E5BDC49CF9215B857EF +239: D42EEAD6ECB82E4303CFB175BB4CCB02580632315B2C73DD9EE1943F +240: 14FB7CFE5D96DAC71EAA91CAFDC59A9B08FF9C064EF649BFE36D1F4D +241: 7A8D5880A965339E9F0B8E319F7EE943255949C828D7CFCC1F19709C +242: 250DDCFF230F88A6D7B5B27F489D2136598E7D99DA718EF84980C2E9 +243: 3F4259960EA3755BE7F75B42FFAFBA24238CD0A38D97C27B613A3058 +244: 40E0FCB308F152E25BC1E51C8C5FD925AE796A8CBA3C97B0AD35A19D +245: 92E16111D49BC6C2896E4C0A71585A0131B40CDAFB85D3C8E08AF23C +246: 34FB6BAFD5EC3F8911E2ADA599AF82E089106BAC823AB55B2AD9ACA7 +247: BDCEDFCB39AC3C7D206323C934B3B729AA9236AF276A1AB50D418946 +248: 981279B006F56E6E061206FD2FB31CFAC9F3096F2EA5DF2C63EF92CC +249: E9BA3E2410344DB27DA1441D36CB38A7A85FBE7A0E3C5E15EECEF990 +250: E44FDB52FCE67EA1B385A3A8572E30FA5355D07803069059B9B8BFB3 +251: 8814FD9C42084E846B56B2E648279CAFB8B68CE256BC2307AC52E229 +252: 16704FD498F3198D6A1E92CA301FEA97F303CE815B5F26EF83113786 +253: 40721B0F061E5A69413A957A876C15ED3A4892D6A471522D82516DFB +254: A525CA4BAD5D45931E9D86F95F152C7BA6685BBA7EEDDDE6A0E5E4AA +255: D95C168E8F666375A1C7D574686D36293FCFD3717D79B212D47D97B7 +256: BD34C1FAA03A01DB5E0C3A3D5E0440D6E5E361060F3DC9D149A26812 +257: 03E10A11A8BDF2EC14AFB011C5C9BB2EE3680025DEC0424DFE5DC2DF +258: 33194743142F4F5474D0C838F810B118896FE27BBC5F2DF131B0AFF2 +259: 662DC8FC31A54BE1B24EAB02A31DCED04A9F91732BC8FC1E15019FAC +260: 4DF0C8D3C0E78064FFF39A81B9425CF27143B1B8F5FEB7196F1F2D83 +261: B75B4229C34125D73A2CBB3121F52E21D0BAB18C26325D737F059E5B +262: DE5D530F306AECC6FB3E28BA257F880021DFDC1587CB6B1F4CE46EFC +263: 5A7B8217581080C5BE7D170616F2CC83515E2FBA5C65E5F34A467DA9 +264: 903BC1827EEBC44603C6B928980CB3DF28F263C4156513022A45F475 +265: 9908F48AA078D1D6597AE7C218CEE0EEB12A2C41231B51B988373353 +266: 8AB0C41518972B3C57C089A8C0EBC60A8E9C43E301C43421A37D74B7 +267: 54420E517AED65DB6EBBC277F4FAFC724B8B7C696A1C71D3AB3ADB55 +268: F5D60C41755C454A9ADEF57FDE9DA16DC5AA415BAAA78903ED9C64DE +269: AEE77DC85E4C31A8941220612457825E043F80CBA918C2E70A470788 +270: 4237D2216D0BB493CF29E7CE17172C01401E19F6D31E868532ACB470 +271: BC7C26D8C4AF880BE8506E12B4D4091949D8B8E67A1812304E6195C2 +272: FD7441603B909F3CA97425B835DE0B90F81D6245D54D835AE8601EBE +273: 6807B8CD0195E6BF20B4A9A6A549F06DC7BA4BD6E9F618949E79FC5C +274: E29F1EE90A3C617AA28137B4A4569ADC5DC70EFA6575F32168908C28 +275: 494ED666F699AE72248EA95192E97715DE29968B02782693659B73E1 +276: B2AAC103619549F1A2666EEC5A75C54EB0DF8CEDEBA0ACF8866D555A +277: BB442BC168D2DBBE1FFFA41E1C0075320998A319D8B2E52512D120D6 +278: F7A055F7B30C4AC467092B4370799F885A93C622C6EEAE4694F1A374 +279: A15A08CA715FE318CA88404B5BCB19C5D97CDF440F84FDE03ED60A70 +280: 20A02956C34845DA985D75CF6DC80C3F53BC1F1C7826126994D71F74 +281: 2E3F7DFB7B58AAA8F01B11F46B7BFD5E27063E73D3BA32666D933284 +282: 395B9F7BB41D7FB37C4C33FAEB604AB91AC82139B8DDB10B91235F58 +283: 444AFF7A34FBF38911AA5329E4A673D5A41AFBC8DC1E4C67090E4924 +284: B622574B90BF83A82B3E664E1C834EB9A8051F942300B32367FF5851 +285: 3392C851D4D61FF0F15178E7AEBF176E640271E25D1617F647CFDD5D +286: 1D6060A07BE28B210DAB552576FBA7CAFF2C25BF75C8F0BAF5B47793 +287: D0A87B49E62BC8D7A2BCC3C8104836C5E712F2A4B5FE52D67A23BAB6 +288: E0AE33F2DD63C31EF87F219C9B80C897669974B73D8A9FE64500887B + +Hash: sha3-256 + 0: A7FFC6F8BF1ED76651C14756A061D662F580FF4DE43B49FA82D80A4B80F8434A + 1: 5D53469F20FEF4F8EAB52B88044EDE69C77A6A68A60728609FC4A65FF531E7D0 + 2: 76AB70DC46775B641A8E71507B07145AED11AE5EFC0BAA94AC06876AF2B3BF5C + 3: 1186D49A4AD620618F760F29DA2C593B2EC2CC2CED69DC16817390D861E62253 + 4: 33BAD5430899ED6F8BEAF3E732B2A2CAD1D40B7C9DE0CFCDC7E0BC0756803A10 + 5: 8305D46643F04116DDC816F91544B7DCDC2A2CD34A0255498BEFCE0795E21205 + 6: ED2479F84980D846CD12447F241059AC1679AC30584443D40222FB7E1639414C + 7: 59B1ADD388B7D625D2797894A4D88C7554A796A5A3D8AE232BF5F86BD72D5756 + 8: EB4D0F2ADD0F6D0B26F0C65DBE71FE617CC6B43FB403649E82CC8BAB41195F4E + 9: 5257E34D7BB964F59AE4A46B3BA5921E04A550C2B1E04F268B297E358EAB1362 + 10: 605A0514059192E26DBF06CFAB86F3E9BBB9A69363D4BE925B2246DCD8659A95 + 11: 4585AE166873F94A8930881014FFD14EBCDAC1A0D599DC57EFB4989B44472095 + 12: 4ACBD92D310FC38697084C1BC7A79516A9BE20701DAE8EB36C643F07F45EDBD6 + 13: 154E8759089D17DDA455F74BBF702BE99F678D58AE442EBE16264A7822A8A048 + 14: 85A3D4E61229DA1490E64093E6118A733E3021B4678256335F437251F7D222C5 + 15: 89C25ECFDAEA85B2F360C15A2ECF31F0BD59A0CE821A1AAC31E2F73093DC4CD8 + 16: 39462D2A2320F8DA572A97B0B39473D4312E0228B23E2C2FE0AE9B6C67F2343C + 17: 6A37657A32560869154EAA9CA59FB648F3A96B62F5BDADD604BDFE0133783048 + 18: 636E904C72670EF3D78D9F0E121BB2B5EAE69E806FA02314688D65600424349D + 19: 6AD0DB215FBD30E7AE5E22C2841357624D5605B1FC9FDB96882BD42529E6A994 + 20: DB32380ABE23EF51F0547AC0FC4D095A2A16445A00FD8CE2E52628E189BA562D + 21: 331CC1C851DF863EB365860B2BC76E7E1E928261BAC6F1A4EC0A25ED00D0E2C9 + 22: 9F5577BA75324007CD66F9D7F16BA6E74313D853E791FC865AACFCF63C561799 + 23: F0E872C81033E67EFC37DC258435966A0D1504BD14C2750276092ABD0F9B0169 + 24: 2AADE36CEB570D6D3A92FE79DCD612CFCD3226F020F205A74FB1213244EC4857 + 25: 5BE74AA323CC1092D1A73A574496658CBB4809F4125AD275FC112E990BB8C1C8 + 26: B6FE46E0DCAB352BD9D4DCA77CDC88B733001ADCB089596330769CC6BEFC1BCE + 27: 5E080231CF3A92393C287EF7B5950D0394774700F82F2A0BAFF7EA82524223F6 + 28: 646DADA5A492B9EB649E576F976A0CC76280111F767A63921DD29C09CD4AB434 + 29: 2022202E664AE6B9E468706B45CBEA851CD7A352D6378236AC6E0DA2924E9AB2 + 30: 7909BBD61FF6C4D0552562E3A57E61F23FB82AEA99C9B2E004D94FC21A3F49CF + 31: BE29B022732A2E397FE039EC17766DA33A16D25555502775B0577BACBCA40625 + 32: 050A48733BD5C2756BA95C5828CC83EE16FABCD3C086885B7744F84A0F9E0D94 + 33: F7B83039FF915EE67C8586BA2D4B9C348733D9C75863056EFA4581E80A09B66E + 34: BD6D450C1E2072E614152D5E6344A0CF14FFB16AC8658D68176E3AF0F737C9A3 + 35: 89C2C6A69690335F7B475C47C62F930C8BC58F6AE92A99AFD4D9743CB23A832C + 36: 50B5D09F74A3FB9B07EDC08A62BF546A143A1AD234FCFEF0A386B78A4869191F + 37: 8E17112C6CB1399A06443509CCC95366C29CD72DAD72198C2395685C56FD5F1F + 38: 4910E2311E19D30748F38E265A1AAD54E0ACC89111572EA548C1B71E28C74B29 + 39: 850103B8D08D566159D0BBFC175987F991790FEC8D2905F9EE38796301CC8FF9 + 40: 02BA324D30AC854791579BEF4D356A6CA0B7729905D241058B8E5A726E74B0F3 + 41: 1BF232E67BA8ED72F1BBB4903B2589CBDFA880292AADEB416B30093439FF2477 + 42: 5D5A49DE3537A39CFC5F67716608A5012A003D5ECE5416A37DEF8E663110106D + 43: 2D3BB57730B167157EB825F3853971583F182456B91FBDD75014DC271887397F + 44: 40ED8D3D40DCED5DDE358163F73A2B4BE35C609522620830880CF6381EAEDD23 + 45: C7B82C4199A88162D5B04A4279F9A59DFCF97239D5BBBF4CDEECF3B475CC4A8B + 46: F338292A6F44F97546774EE97C578815F2A7BED5AFE036952DA0677F92F3FE1A + 47: B2E6C01E2D03B78BD71C3E246A85FB076B30F83159AA43AC18E33ED9CC232982 + 48: 8E7A856365F79E42004AA1A47A3B83E8E6D0EBDBB602F62793E574139B9F2A17 + 49: A25B6AD8226FA9A9318CB86CC7714CB0BEBFDE6C20572BAD7B89925F0D09A7E1 + 50: 57FA0A179B510246B3F8D195ACB103CDC86D8315588325EF536C47FFF2772658 + 51: 5CF520297C9B06AAD67483986D4C018A70C67173059B9EC20DE0C4F58278FFD3 + 52: 667E55FA3D3D6AFD3CA3AF6A60016598EBF2B1E98B59C702209C247B3360394B + 53: 5233028F23B5BAB4005CB86EA31B16435EC1F6C8FCF357580F6789DD795F1E29 + 54: 81EB9DBFF576E3236776D43B5CAC9DBA10685CA4FEBDB0DBA8160D5468F109DA + 55: A91A138E3374D2D8FA4791B83A93A311A06A2926EF70153428CF6E1B239C10D4 + 56: D192F5964DC70118FCAC64BF0EB838009B816D344F67B04E8E78D5BDE783E54A + 57: 6ADC19A25346D39409C264466AC7EF7EFE4A88E765A8BEAA191266791A906064 + 58: 275AA07CE6D62F62FD66E479F300C00544F697250B6D773F91BF06E206F88925 + 59: 15876B15FB6B696F89E78A040AC70BACF0EF0EC18389A5C4CA5D6D2406C22454 + 60: 3CB8D033AD71B9951AC09797B306540AF9BA7819CFED6793E9DDA6C93A0D3458 + 61: 829824766EDD820E8947845C98130D19DB0E286FB465344936326B6DA5633A44 + 62: 8FFD849312CF58640B1DF47AE8FEE5F438CCC3DE342E92A87A4F6E69EC27087A + 63: BA7AF58D214BB604BCAAD40AD55CCA7D9815E7535F1C9837BE8FB8FEE2519560 + 64: C8AD478F4E1DD9D47DFC3B985708D92DB1F8DB48FE9CDDD459E63C321F490402 + 65: 9A11F135D2231BE8EE824D1E9D3204018870DEFC2F469F34EF5969B4815CEC3C + 66: 0BBECA7B5BF86D84E697C0E52DA482B9F0B8BB90C74C59C6358DA5458527355F + 67: CD0E763F87C88CD162FE971F2F07AC888362CCC33272C2E79E4DB84C891E7123 + 68: AD93C686DBEA416E5069CAD1CA9D627B2A040E9C3D9CD148C93DF58DD01B1E03 + 69: ED379E9012F1D3A4FEF5096688A2557B3CEB68C619245BFFCF05A14A5A846FD9 + 70: 97A26B0E8066F35D400B7F12A6AE62A290BC1CA68660B4DA8BF17AFAD6B8C948 + 71: 881AD9FFBD7F090EFA51CBDFE93DA23A0401F4446F7ADF150D1C226851CBFFF2 + 72: FE58866B2893C6C40EE832CE40FB6EB4C70FF7C4794380D95C2EBEEC62DECD31 + 73: 797061B3AAD8E724740C79DC697EF3DE4C96C4DB4483DBA4E56F852222C72474 + 74: 6A3543B82C9A14D8597B2BB3916159CF54A4F3332AE55EC9706979BABC206752 + 75: D46DBEEDD389BEC862EF7431F929CEDF81BD0A20573B539E11C8BE957D6B286F + 76: 64430AFB89B5D3B944FF085D344A96F514441962E2B2808943E8159378FDE2FA + 77: 98FB8AC5EF7A58F079D41815484B19650084E4CA68D1540D90CDDF536FA470BC + 78: E939BA431C6E703F7D26FD0EB511EF41A37F6EB386E80848EABA2C3D5BE01F62 + 79: 80AAC0531BF27D1B0E3E746C34A86DB09503636E211E59C54F9952BB4E43684E + 80: 0E34AE32D043275B50E9A9E0DD024AB024213F096CA6E5B7F16B524F0B37C271 + 81: CEAA5666FC5BD015360A31EFF0499D2AA8E7FA8391A0C490E806D785A9F80C5A + 82: 6E85589621FE2ABC1214A841B22FF667E0B797C04EE736DA819ADACCF4176CB1 + 83: 0259B91E342828924911DB5071C10D890FD65C28703A000CE2EAB3485D5CAEC5 + 84: 1711B6B8E196B2BD188B71B3207AE2B03D9B2CE42D6593F816D7127567B31D3D + 85: 63F7BD481657A2C0DA9B8C5D4BC37952AA568362CD27055049C1B43BC3BDE48C + 86: 9F8D2B19AB069CAFA57FAA67D3A7796F880F35E95AC71EF4663123616F585242 + 87: D95375FF4E6BE80944AFDA92819794259C7DA31B1A952A309D7EBADA4A78EAC1 + 88: 9FD373552C93A6D904BFB67D45F7B174530C3EF7B9E71E84CBFB32DFED34831E + 89: 832BF41E6C3A51C07B9E21C17056587D07A45012CDB5FF21A9ED7F5777E2A3E6 + 90: 8F35ADF849B78A97A5F71EBF17C102521DCD86D9D20246B6EB47F78BF577809E + 91: F4C82DAF9218F14C37ECFB50FE222644FAE96F439998E990B1A8492E7BDEF13B + 92: 60B070C296CC64968EE5E4F65617D00BE43F2E77AF4994A12D6A28110C586C16 + 93: F94996D82141AF533F903BE6F0611D2DEA7584A895BE7096B2DC35097B18E2A0 + 94: 805E1F47D06244283D88F32B046CA95554AD4018076C7480DED3CE7DD393BC82 + 95: 7804AF4E51E0C1CDAF0F0A6FAC6671B260434081F7CE05070BEDA63BDAC9BACA + 96: 2BE0AF9221BFCDACB4B88321D8CCC9CEBCC53188ECDB4E97813CD1D4C775C541 + 97: E500BB02AB9FF69F068E9CCAD41F0BF7A5C176F41119FA700791DB12092AB7C4 + 98: 0F50C9F3538F0E35645720BB51D9191138A6CAC64D9F83660957D4412ABCEC83 + 99: 05186DEBA22777FE7652D51F24ADE28F18493B809236DBD60976D213575E2F86 +100: 8C46D8901AE6919EB001CD4A9907A22AAA47954630099A473D2D5336EA7689E1 +101: AF504DD36FEB666B16FE553116ADBDD604E449CA783E54A83171AEE7DDC7E7B1 +102: 986B81944604EF3A1F26032A04537777C0ECD1CB66B37E3CA6E9B108BEFAF56C +103: 120A055C592D237C0F535EEBFC05673374FE4A50E1330293EF2C1AB611E0D0BA +104: 22892EC826B20680C8462ED416E15D402E567FF4E084B08274D702FD2411F40A +105: 1D867E60B657511E28C15C100B07B62AF37CB4240C67354CA29373029B55BABD +106: 30E02DE534005D7F3064E57AC79EBAAD483ADFBDC1CB227B889F0BD66751ADBE +107: BA6B3EB9EA0CF9247B596E0BFB1129789046FA539C068B6255F21920A14672DE +108: 9581220D4D55C622420719224DA4D72ED27C5A9083FCC6C9754E0B45E89263FF +109: D2082A60F6EFE8B4DE35E6956DB4772CC74007A3C1588D6A1475DE5EC6079388 +110: 607CA9672E3C4692E094257CE00B332962EE247541D187B6135498A2F61B6D59 +111: B08646567D09C477939EA7F417FA307EC0D522A41D4F8E7AAB4D9A889EC67FEF +112: 575F18078B5874147ECD662F4260CDB3548756081EC3D2E7BED2397F67888622 +113: 9213EE952527591E3C10FE51DE916C10B72D90B234BD366BF2D3DA89C660678E +114: 80E7DD3D16B56C9038B9A7F078199CF3BA76841E9B8264AC3E103C24D3C8871C +115: FC9BF0A78CF7BC1407ADE5D07995CE2ECE2467482BC5D04F27BEE116E33B26AD +116: 0CB94A64118CA106B5D62B7B0323085551B7688ABB99FC47AD6F46AEF79AD0E7 +117: 20B54EBF368456150152F2181E5CCE7FADD18C41CD4764236C68E4FE0D49F775 +118: 398F0CBE7FBBDC6E5C88F5A6E58DA25968705D4704FE9B16BFF7BEBF39F7838F +119: A226DEFF22F92E994B1818026D923B9C93A72F8D5B4F2CC3CF622D6492373DB3 +120: DE05697A0743D511B0049E4055A7618CEF7A3F54AB2ED031EC6D2F75C5416AD9 +121: 6F2DC08E4A30CE8C74D175BB4D8F7A32F88AA145F190BA863D146D3047E01CEE +122: B722090B50928B07B1FA3D457CFFDAF70D04FDBF3EFA1D7ED4067DBE925B4F7A +123: 6C278930B0DFB48E7D9BD095C01DFD5DFF859760CB5AAFFFF939907673F44448 +124: 35C6C370972BF0F42EBD123B4FDCEAAAC4557689037249B3D64B67F034B74774 +125: 4A36E7BAEEE661BF9E8750C48ABDAADF969A83E22A91CF7D299496367CA7EBBE +126: EE257791809CA409757BC9A21F81CBD85ADA03D6EDBB5CF4171CFF2CEC87DD7B +127: C66018E60C774D770CC6539D42C023FA974C29E3FE2DB5925F226B9CC5CF8B05 +128: BEC3EBFBA06834F224543CCA2A427CB9329147BE93E19AEB0E33A7119C7F63EF +129: 0F41A20921BCBC39EE382DFB54DAF2DB373CE6B178833111E22F45266124F3CC +130: 1CEF9A7D66905E25EC17517DB9FFD91EA71F05C11BA66D9AB11E6A46753ED617 +131: 99EC5EB5856241C7AEFBFF8EF9E245D32FBA82E5A99610549C41CF27F3AC0D53 +132: C89B4AABF8E4D1C37CA932F488DDC2803334BCDCC76953900AD630AF70511761 +133: 721F0E936B3B93C0384F970C07680A8A6293E5012295E83615EA4657ED5D7E17 +134: 644E15224F5597351AEF5C4BDD22B27CA0C19DB2244431534C2A4A0BEBFDF39C +135: FDED8FD9D6551C601EEB3B7C6BC5E5CFD8AAD1D015B7E9AAA9C9B9475231D5E2 +136: CF3CCFF92480A29160C2D38317C430E14749BFEE1788106957DFE73F8C4930E5 +137: CE9D7DC90913EE5D92745019479A5352C6D6279BEF18ED07DC0A83EE8084DACA +138: 14914E322770698E090B44531062424057B3DCB0FBDFA93229D21788CAA29A6C +139: D0AF074A51AB3138DB0581170B2F4E02F464095E9AD62CBE68A48C6938F34B47 +140: 3A81A47EE2720F109E7D1CB54A36F77B64DD465803F9717264A5E5F131DF5E12 +141: 4134FA637CC87AC52320F311F4A681EF740B58DA8CE2C09C721EEDD720179C4F +142: 4996D371ABD506E72178B4CBEA8E9F5AD781A5A566543D97F89A4EFB13D5BB5F +143: 295FEF4D46110EE21FBA0D1798A1BB7C1BBC88306BC9B7661B18ACE7170F02AE +144: A32AEB728CD50069F906559158F1D0A9DF3A8C6795E5CBAFDE00C632F08BADE3 +145: 93657342BB49BC9E242C4F5573EF621D6CD90F4A2082B14FEF85BC9884D00AC9 +146: 34462E1B472269BC270A6DBF09D9075FE9CB5350CC4B74380D17AC19D580D125 +147: C1BBBC82E8512BBBDFBCB9D9A68552BD4EF3B7953541451C82F3BC92AC8C4BF9 +148: 962CF8107DF385B4E1B1B3FE3694BBC731D21FAAAFBC2B48EA1504CE07F19173 +149: 078748DDE5FE38CF8AF48260CB531BF8EF68F2700437C1DB3E210DECB757417B +150: ADAA23CA1ED892AD1CF028CD40BA8AE2BFD3D7DF1289C3F2319072106F587A98 +151: EC656CDE6ABC81A8C85C5F682D392737C495DC871303DC3D11FC651765AD99BC +152: BC744E374FD83CDF6EDD709689C4F3BCDE56BA612469F331789AC4E738F804B4 +153: 4CD9A50E3F427A64E312A1ACD8BC39D47030EE1EAC173E84C75C481D3CF13911 +154: EF5A980E76E92C94BC43C5DB34AE25B990B1B8A4CC28E834EB4CA4A27757FE6F +155: A59526AE178AAA3CD3D1849F9AEEB914FC555CA790C18EC1EA63814E45480189 +156: 92915B3078DA2EC31978123691517835AF47EEC12D9162D269900D0DDA0EC58E +157: 81B7076D3EC489393A1752F4B72C51C9CAD0BDE0F2AEC6F402739E9C20359674 +158: 3BCCD5439FC7C4BD3025675F7A9C39FF87C8CFDBEADA0B6DD29EB179629A689C +159: 764BF722DAF72E8F04AE830B10313C836667676DD9E8A072E4A1C0482EA682F4 +160: 3BDEE46E603BC40A719E84A9913468D790EE33157195217C1A723596A9708A9B +161: E55AAAF6F51D43A5336BA4D29AF2128C3DC3BC3D9D70B3E41950F445BEB1E5A9 +162: F071BE09184E4849ED48F3F71CB254A9D792C1A37BA8F61119BE4AE5F5C5E9BE +163: B9F6E53FF9892DB0A04805270E5D60B3C62F72BCCCF2052CBABA2AE2CB732C78 +164: 576E9DD4F7CE4E9432D456D02C5AB77E15A1DBF74E60F4632F80061A756BC201 +165: 67D11A37491421224C1ED64B3D2AF9C3B45C413FA0FBEDB0ED1BED26126703DD +166: 4FEE7968E68B1DC75C14E23C16C4CDDB9FBA10AE7EDAEF32345D7D9450F05CD8 +167: CAC5458D48E6163CC843D5F18E263E3CE03290CBD5A866BD3B7D02DFF2DA413E +168: 369A33BADFA618D58D16AADDEAFF98D66B30A70C2DEEE42FC809B9721DC1C524 +169: 6D9EF22B871F8518D91FE5FD48BAF514F1165ECA0A145F8975EB4B40898DAB7C +170: 92E47248A9591F77D39067359B91FBA0F011F1C753E9284C50BA10FA436CADE1 +171: 98AC409C2E9FA2DAA81A36EBD188CEBA0B1997F9C8776C73AF360A5C9D6B89D7 +172: A9317975E935A13C8E86E5C2DBD9C829936A7A222A28B52D6607E99FAA362AA4 +173: B8C8D53BCCF1F1B65DCA8F701853E6FB575A0929C9DD7C0BCDC3381EC4E8BC80 +174: 8EB9F83DBCDB9CB9FEFAA713EA6BD300389BD5F85FB63AEB60BBF39F0072A115 +175: C913434C625FB9B9969ECDD5FC622B53152B812F605C1274A7554EE18BC26BBD +176: 2A3C05080E904EACB025774D56D60C44E7716B90ED705D8640975A1C752D6EAC +177: D4C19D7ECD62C298FC6FCFB4256ED7208D4CBB01F81CA1C1F7C36C9A55667F80 +178: BB5F95132BEC7C4DA72BC38C221CB8BE458F90233CF7A5DA470A89AAFF8057BD +179: 87F6F39CC3FCA24CE71440CF4EF792C8FCA0D72291044849A256BC7BF7A59950 +180: E05AA3289774E9C934BA4B6A621A1602BC8D52D2AAA88411AADFAC36E259DEDF +181: A104B60CA8E7B09AA4B21625A6FFCD60560889736A368DED1F4BA8EAD8EE732A +182: 07F03CB0615479FA964632E84A12A7AAFDF2B0B6E76C9AA1FABCAEB0FD89FCE0 +183: 7580655A0445669030CCEC133CB73E83A628B8E1F50C3B933C889E7CB3F83AA7 +184: A0C0169EA227CBC67D8E5942118B4A3A7B4654668E86F4C332013067DD0F2014 +185: 33BD57010692128148B62E21A1A435097F01BDD21739E1231D6E79B227AE8287 +186: 4C5A425ADF6EC2CF5B50B443E014D9043659304DA510BB841FD014F04FB955BF +187: 1AFF2039CD670EF2ED07E69858CDE39BCB0890A98725D1FB2D1DFC4CD2DC545A +188: A3007F2155E2B7314B3685E848F249CF3F32F17E0CAE736F8515F1EE8468B06B +189: D4569F3356C8B426421B2F15F6DCE14C406216A1CDF2AAE78E99AE765003D53C +190: 69AA9378F0A17E0B88CF85171AF22F569C321F66CAF3193C8DE130B007AC561E +191: 8658173321B8E1A1DB6C55192851CB681B17F0B89B10D4D5766AC0EFE389DB62 +192: B86BFBEA7E3F8D0AA23A1D1F6E38DE98C0A1046274664AD1863CF2FF9A7F9565 +193: 961450E75313537FA23B0E3EA10A231CCE0DF3ED2E5FF4EF0F73C26776CFD7B4 +194: C72220672365514B8D738D9849A029BBF0B14C4D18E7A3B27AA7E90A5DA015E3 +195: 947A1BD610A6C54D7DF166EC235ECC3A686A0AB8143EC49BEA754F12C03461C8 +196: 9F40C233C2D868926FF9016820DB5E6244028B1A041A62BAE105AFFC85A643C6 +197: 30726EFCFC02ADDD0F812300BE33ADC6D64DF47AEA20C0AA09197A80DDB24DCD +198: E3CB59A416CEB3811EF17978D65B57C16705F205D21BDB7F5B958EB09D21B758 +199: F1B4BC516891C3FA44F1070ADC05E1164080FBA3F7A17840C25B1E3584C11540 +200: 5F728F63BF5EE48C77F453C0490398FA645B8D4C4E56BE9A41CFEC344D6CA899 +201: 0E24131245B6AE634ABC4C47DC9FB3E9B97966077F7311C5CE6B26E049E68D40 +202: 3F994BCC3057EF299827D6CFA47482F17B2CADC44524D5614A5BE17D61D4E751 +203: 1288DCA8F28CFBF811695EBC38D9684EA00C5F13937A527C43CAAC3C0BD29DEA +204: 22DE73FF852BE6332DD1037F00758B975B4CB6711D515248DCEB39637385D44A +205: 397CACCAF3F87F387CFED460282AFC0D24AB5A5998EAFD93E1FF984BED007840 +206: 63E8EF934181B14EA2F6C24A92BE4D65E394F512766884D37FCB9EF0B39840E1 +207: 39E999E70DF9431DA86325DB192916A2B18FBF52DCF62026310C903CACEFDD2A +208: 81DD116578D0F4E21E9296583C816C3B4E25EBCEEAB5BD1DE6E3493E409ADB50 +209: 9E29F96453F474D2811D780AB43FF74C2D768EF89DCC8E7DF05BFAC1D9C755F1 +210: 6E4E7B7E819793A3DE17FA3D49C5754E15436FAAF43E6472261B67FC49F57942 +211: A2F86FF99DAA5BCADC9217C0995FE6E06CE3E4D67E1ADD5BCE963788B9813EC0 +212: FEDE7FF8A5C4D7EDC3DB3A20B95AEF722E916D67F64BAF89A7C774FBF080474B +213: 41C05C7B1277C17C9F6E8F2C8CCBA36166770DB970DC04F84A8525B188B5FFE4 +214: 4DFCB2FAB5314BC06C2E41D837EBB4777F861BE295FCED434552E12DDAAD2BBC +215: 078FCFC3A29207AB4F251C94705EDBD0143E8FF1B9D5E69535B80971CB409826 +216: 34EEEA9B1987A580003329CC86C40BCE5D95846CDD6EE84E6A35ABA20702B7CE +217: 056D21D6F895B9BA9BF16253EB40524B66E761767C65F41B2994F7026284F273 +218: 33D0A4BD4DA19BBC49C064680E8B224C3B5A95D93CB831E6592C8F700C69DE58 +219: A3B8D55EA1BDF8C4FA4D22593836DEEC66F9637AC9B68FEF94570F2320970680 +220: 87CC4433FFC8E7CFE0757CC80DA93FA28A78395C8CE283874695F4CC7BA1F13B +221: 99D5C39A60F94C428942C050F025B6706440B1A044D852E733FF783AC38337B1 +222: CDE4A1D28164159632243BC896F29324769BAA4A303A381F01BCCD73F05654DD +223: F1B740B5C0EBB657E0B6A28AC7F669ED8397C340AA13B25DBD5C98B8113A830E +224: B735B5CE9A81446AEDFD313E492E7C11B91E71888C5A52962ADABCD9D7905C73 +225: E44FABB0A710F907C940F87987F46641A83C5693EEF1D9CE7D82E6708B3E3994 +226: 1D515AEC5C3816F3243CDD56F5ED51A70692C08F76733914F24344487E84B195 +227: F1769B5D39F07A4ABA832F5B2F845BDC8A39A4ACE27B3E9A4F843C8133B785E0 +228: E15EE3D9F169CC495ECF40DA59780B8662E773111ADCEBB9C81F06001C377AE8 +229: 13FCE1FD10B9296B31F04E9AB153C10B6C2575FBB814605D18B9C32E9CE4A306 +230: 76D4EA81772EDE0DA191154F21F0B89B8891F2347ED8C38D83B5FB82C59D73BA +231: A592228A56F858F462243D6D63C16F14E863393C9CB1F3569E7C07033129746F +232: 7C78BD9E41844375848566C240143AAB57D8E67351150462EA36707B1772B9D9 +233: D0EFF015852746AC03A445EA89D8F620578F4D8C20CD0A376C5292C8DB399E68 +234: BAFFF987F15215490FE09394EDEE3CCA219649568ACD5081E5BDADA980534136 +235: 0AF5A64DE4FBE093C163C20F22554A41350B86133E1E869239DFE28CBEE8CE42 +236: 99AF837FCFF053E2E1A406113F87C4975D6490D557CF3991A13C288BBE4E476A +237: BC11D588F1944ADCF6B73CA650CBCC0E23A82802026E3A23C217DAC1DB2300E0 +238: 8D5A9CBF73F51658AF588FC3A09D5E51C945BB01C269A360DEB506D965B74DD6 +239: 66424CD8971E43F2F47A166654ED3F601AF764151F69A1F80E75D9CF2A94C8B8 +240: 6C6F549299C69EC48681C6B9688E4AEC022E16F70DBA705D562789D045CB7163 +241: 5F37D2952EC1F9804C27123075E61BF6BC000B2E016952CED4F7DF6EE1406596 +242: 70C9E969E885D65BB4C29C9925CD8CCE4E9B4C3DEA81F8ED88AF987090130002 +243: 558A870CC4A5A17B0313804C7C6691A318BA2A6D54EF34800BF7B50C90EE3AC7 +244: D84090A202B531317C1476EA4CC824106D635B4BD41FBC081B0D942525DF733E +245: 127A74A849A390D8FF6005170ADBCC5673734CFCA276EED5468C3436D1E4E957 +246: 51368D1EBEDDFE8A9005A5D9627BC2FFF5EF100D28E246EEB6AEA6F93027E45F +247: 0ED91BE319464EA50C9405105A75367182134E7AC3D2E5E305453376BABEE919 +248: 3D4BC2BF5E8CB5B70098714EE09E16BA9BE125DF702D0E5B80D027B30989A154 +249: 2F238528F30336D00EA4933528862654549C800427C43AEBB74675EEE827B5F5 +250: C5C52F5B2EB5DDEC9C37C8922DE4EE8FFA8B674870917C20E4E862DF8CD090A9 +251: 8C94F6ECD3E33433D04E634A26C4CED1184B9BC6AF47562C4459309494A9F574 +252: D3036F099414A9187B79D3AED2F54FD068EB2FAB2322A79C0D46B8A8CB777E2E +253: 2507450731C11644F2DE23B9720BCD71A827725F8FB11A622194EBBBE16233BF +254: 6EBBC54EAC2E9506E5A6B35E09C899A6878ACBD3F7F9CEE602982F479F7BCE66 +255: CEB94E2E8BD45BBB4AF2A3AAA05CC3F7BC010A6C68E242923CE3731A108DF8E1 +256: 9B04C091DA96B997AFB8F2585D608AEBE9C4A904F7D52C8F28C7E4D2DD9FBA5F +257: 0E4ABD998FB067CF059475BFA57585C94C3786DEC4FC2B600663F59631DBE2BE +258: 4440FB3956DCD5D186F72436E23D20903C21A1A2A1BC351EDA8502509C30FEB4 +259: 08E19DBCA3C0735EE75F47131CECF6EE8922162C0E84D25C3A6BF132DB7069ED +260: 809D398F5984D455A403A77FDFE8A9E86DD18149337D891B719B4D7D7D2A1692 +261: 30FF0B8556DDB6425AC9FA62BA25F67E12DD8536EA4CB1861B02C36D54E3F9A2 +262: 90CFB8A5C3F9F243DBC96EF9703AC75E480DE00E435E80772FC57CF38E3EC7CD +263: EDE7A68F2D8F80F1C6AFEACE7F6C2F1A27F12656CCF8BD84C417CBAC9032C0CE +264: AE27F6201401C3006905D09C2B62CD74E60BFC5B23079AC41D8097A1829CFEE6 +265: 43566E4DE1A37555E272BB63D1113B6061E4A9320FB88E4B435CBA67794A1AF2 +266: 59EC88A4E06C3C0AC3739C834AF7F533BB1BB8E0FD92ECF8554F048CF0B23CD8 +267: 6F4AA17FAC4770676532195A7941EF9A34577A6493019CA0ADFAE099CAB4A443 +268: EDC9456FD6FE931C317139713DCAB3ED10CCBDE3255CD2ACBC5DA2BAF4C49626 +269: 8B6F715B06995BB2DA6A6EE96958BFDCCC873A28AC0DB5C8351DE1D67C29886B +270: D77009956124FB8FC30EE79B44B213D6C94C684BF24A02E87D8544C9C5C23D91 +271: D409BCBB54825556454A757A1F629135BA49C0467DCF6B4E0AA69E9718DD31E6 +272: 0B21EC4A8EFF6D179E09BA9FE0AB08515B24E0923FBF419F5C30A38E64577DB5 + +Hash: sha3-384 + 0: 0C63A75B845E4F7D01107D852E4C2485C51A50AAAA94FC61995E71BBEE983A2AC3713831264ADB47FB6BD1E058D5F004 + 1: 127677F8B66725BBCB7C3EAE9698351CA41E0EB6D66C784BD28DCDB3B5FB12D0C8E840342DB03AD1AE180B92E3504933 + 2: 6A4E8EE496C5FACE43BFB748253EF689F1709986EDA8ABEF8ABD5674A0A9ED2B36A31EE29ACB146DB15F36A32B3F2D63 + 3: 427EB9311DB30F28BC248174A913C1E5A7948ABF0859E522D5B99E29672B3DBBC45FB0F538EE3C98B728CC47396F6998 + 4: 0F555B913FE5BCF7A9D3E3C3DB63EBA5EF404C3CF386A9C145C4021569DAF66BD374806C1FC5915BB0C27468F47044F2 + 5: 45D4F929FBD0CD5FBA12164CA2ADCA2222D924DE218753D31FBCDD847E735811F84FF4977B6B190E53BEF9324EDF3356 + 6: D990EBFD7654E00C1E29DFE6C4250B36B9A17B71F03086FF61F7EAC792E03C10C4A759E1539C8CBAB72DA794A35D76B9 + 7: 4CA74FCA7427EE6B1761EED920CEDA439C78DAEFC6BBBA71A0689F0F4427E5C4FDCAAA52B4914CAC70BE64954A6CF684 + 8: 4E3FD32584A399E2635A17B74B3AD3DD5B827FB0D6332288BE09103DC691EEBCCF083C7C6FEBFEE10F295067B88DA1C5 + 9: 8FF05682F7E10BAC763DDD2EA1A236231254CEE6153E431A450B2D2EF36DE5E42E254C5332D5C6D58907F8473251765D + 10: 43D220837F55B8A0058C5728E0255DC0B0075A6CE69D5FCA704BCE5CDAE189634D660B736D7BC71B32CEDA6CCCEF8EDE + 11: AF48BB366B53FBB3C046532F7FBFBF8F813AACEF151028D4E1B140C3654C6E9D5A9815DC33447DD49715A124E3CF9C76 + 12: F35855F43EA37F0C41C156ED3B56C8EE337BC2FF343F571952DD26B67019261397EB840A2FFD540AEC2623E2D4AB3781 + 13: 952817A26D4534B94EBA43FB88BABD63DA1BE5C63671CB2CB475E0ECF2A8DB9668D5772B00329FB6E570B4AF9390CBA0 + 14: 31E1FCCFB404608F0F72DBD60048EFBCBE9B1D4453A8A24E14FE7B65E910BE3FAB37BECB9B9E4C98FEC79554296005A3 + 15: 580A37B961A4C6CD76C0467BCF68C281011A03A5198F28CF98F599A4D5E9AC433CE2839A071429344E716DF4E861E6A2 + 16: 788BE9032A1EA3DEA20F24AC5197342274C8AFFC9AD07CBBE37BF1CDB32DC3A70A1C447C81ABFA49210D8C1724EA2941 + 17: 07C6E7ECBEEED331245ECD219837A4031D9FC4EF02BA10273079941BD4F7709184B06DC084D24B5F09F6096DA30D2C32 + 18: 9AAAF441D0661DD007E198795F025B7E6F76743418044E90FB949310842EAF3A78BD781E2BC9758A359C28336056BC7C + 19: A7D568F94E74086B83FF05AA32D9150CFC6E477F762244FEBA12E2CFBEE67861AB63CB443AFE04B5CD2251EB56014709 + 20: 06691A7F9CA061D4BC80E4F6A84C77F7A3214AB9849A333DEDA40DCEE95336DE1C6202AE1A235B304412DCEF03506CB3 + 21: AFD3FFA73E7D3D24747915BCAA13FFFEC26B2BB7605431C302BC0EC66DE11389C892890DE043FD114F7C778AE9CD369D + 22: 68E1608FCA35CEF6FDA2E98355CA92FFE4881F9B63AB1F6744B192C09C160B2EF23AC19379BA0443263541080007B20B + 23: E7907160D99FD530D19FCA90A1AB5927D51DC02EC39015C53279F0A0855508CB3FABC74E404F2C07A9144989DE88A869 + 24: 3AE1A7E6F8E0007F53167B85C478203B8445AC2B7B092DA29046C49BF3D9DA7541965AA2C78B7A0253CDD59659AAF7CF + 25: CC78688C451D9576B021329785D34BA871FE4F4EEA517ADA3C45615F875666C0CD090DC2456800AC7F6500D4E75197B1 + 26: 15F2E7C8944B16E99C855A5272B8FC0A38CE1F2D2D12C17FF1C667F392A5811D408D82122FC21593EC836F25A02093AF + 27: B4FBE81EED8250ECDD9DD3590AA882D2C71C9B1D0A203716270A8B83BB1701A6C32F584BE1471AAB8A7FD92FAE21272D + 28: 6633732CD2666600233B24FC6CB067503632A9CA6D0CBED03855535064DE061FA2D01E28B1D9DD47663207C8E4BD77EA + 29: 6D02805A80F7EDFB1CF91D61904F6B18B3B1274F6F11447DAA68252BB4A6D9614A527B1AC69456134CEDFCE3AABC5322 + 30: 6F9F419C1A77C4F3E4DD4AABC872C415CECF23BB28704580B17482325AB0627FE5CF6C77D6F98F7168FEBC57CEA15093 + 31: 19B75DA5D63A8BD3646DDDB644C7705F2869662A1A69B2A53422B5CADCC5EEECEE452940E1C98ADD64CDAFA853BE51E6 + 32: E086A2B6A69BB6FAE37CAA70735723E7CC8AE2183788FBB4A5F1CCACD83226852CA6FAFF503E12FF95423F94F872DDA3 + 33: EB9ABC6D96A2E5BE1BC45F2EFEFEF95D06E27E29FE0817757FB404F14C18549D12BBBAF81F43613A0151FEF81F9478BC + 34: 73E74BEF021CE493DE3FCEC13E29731F31030585462A0F243105F1879EB951A6DD51CD1F3175853956726147670B2D09 + 35: D8E03406F43A864BD81CCE2E86D454F72A3C0BF581B7003A6E74F0C5EF59D2582822FC523B385FE3C82F952B3AE1506A + 36: F807C4241853A8129613C004A59ADBD404A8A925AE7DE53025ABFD9F1C21FE7C90B7F6B1456B74974D20BF00CEDA0943 + 37: 5B42CC6A0B43D9F6AF81508AFCC8C48F6030D32820DF756A8B24870ED967113D19FDFF67C54263C61C190121330FFD06 + 38: 7F0FB5D4A81102B14C899BCB53D12B8DB092021873F610E813E64B4ECF789D5728AEC725BFC88F9C584E8B2CC612A8E8 + 39: 4287487DAC605A7CA671D1B4D320023E3323AE92F868CA9779B1719ABF9ACDBF63943D125525265130DEBB36B16B99B2 + 40: 531F055E0C4CBF7B5B12C75F0E345DEB8842144DE7B567171CB4018B148EBFAF487BF516D04B25E4E9DAF7D115149A3F + 41: 5AE617D89D5FAEE633E088EE6E4B33B20CDA06D9B13D4B9D3977AC6ECDBCCF52C6287F42718C8A8D96C4CE256CBCFC54 + 42: 44E0703455BBFC23E9D679C3AB36999ED0E5D740CB610409FBB0D171A2E48E82DD0B127BEFE8DAA97E9681B4E6E1FCA4 + 43: 9A67A07470AE13E23D86A3380FC19BF16FADA592C46E1F74ED847EBE7743B9F1EE6731E5ADB9DBC7A8311C630BAE196C + 44: 2FF7CDB8D4CD5C1114F3C501EFDE8462A900003AE406F15B2F471889330F32076C5B85ED7036B5425B54333AC707CD42 + 45: BD26DB7A72ED88F8723001E57E2BA9A9FC5C4E2B5E1FABFFF50DE2B294DC4C334932996093368E3F2E2C174D1463ECFC + 46: 3B2BA4FBCF43847AF48F9E49E6AD7C58809393D342B0761B6F95845E9847B5108C07B4A164B7C5134A108165E545EC40 + 47: 2A65F9DD13E44ABF4A784CF49CB986FBA576E04545CAAD665757F3C153EF7C21EB9AB70F444D8A9D13BEEFFEDA05E849 + 48: EB865E953547BD5FC68B1553CBCE1D3F46C761116EE881EA1A62E909A73BCAB32A898EC93FD1128E8FC603419C2D2D5F + 49: 836E4E947DBCF89A7CFA651AE678B9096590FE6B12DEA601C85D11A3EC9FBA4EDD4FC5745E50EB88A0CEFE8A80A48AFD + 50: 96165224C6EFE359842F6B1243A5D7FAF1EF426F5D519A5B4F4F7640380F22C7368AE71074649E3B8C38229AE26626A4 + 51: F069917F615F432BF15BD9C7E924EAC631F997C4C5A2AC8E00EB11E72C7958C3C3F6D73EBFEA6F43F2193FC5174AAD02 + 52: 25D362142CB9610002CE07BDFCC1F5CFB3E6200C07F80C3081E875C9DAADFD571C17D98E315D3020E92E5029E12B9689 + 53: A3B2ADD23AE5432F1CA23CA42CE6EFD0B9E30076BAB13B5E208834AABB4C44F9764EA76EEE48B5BEAFEB1DECC1010038 + 54: 58F8319D720468259175A7089512D3AA405D6C761573B112E90C4D96A588CFC82F6D38CDA680F6668C2370658F5B5F32 + 55: A9FB298676F605C92C722FB6AB428A0E8739D019EB7C11728627128C7C94B66ED5D85FC95852CC4CAE72B809600D6B27 + 56: D21E03C7C28B25E16E92C070361FE0A66D7038FEFB67F1684DA7CD498325F837018C92EC8009ED6CF75B94FDC758EE2E + 57: 1ABCE3D5590BFCE73548209E667A8DE7A17B8999BE5089BCADC8B0C76F2B2A3DE8B6950FB55CC9D0505A3D1F860CA4AF + 58: EA5E4595961E82F5D01CBE7B5430541F5EDE2E70C59CCFDAAD00E6F2E69DEDA1C74259AEBF914A1A250E20E79113E514 + 59: B2BC4CA8ABEEEBDD49EA57C0B1589F5DE56128259BD7B533DB877F27B4FE700F4536D611A422DE1591874B32AB5627BC + 60: 7EDA9D065472B813052506E71214917050D854FE5E73FEB3FADCACCD2DC640EC1D627FF99DB8BA055CFE616BFC6989EF + 61: C07811A5C2114DBBC250AF41D45AFD43E75CD109D14759C14AE32DB7904A96BC1FDA849D98591C8D43EF9279708E52FA + 62: 042DD9712B07795FE9AC327B74B17C49588CAB803ABB3C775FDA744B251C5CA982F3DE574EC37760B3234FCCEB15FB91 + 63: 327F97EE34EA7DDCE677A4F7CF3531FC5D47F57394A0E62B8E86DD5FD0690286EE28E6235E8FD296070EF2813C816AED + 64: ADF2EC9D4C135C64DDD796AF90462FF4EC1D3542CC7002DD8CFC20FAC50A0FAE01A65D35B000D191398A5EC57A1954E4 + 65: 75D6EA64D59EC622BDA970ED8BF034EF19840E1797426651198982FBD8899F6907CA3A5910E2CB44AA48ADC149D07B43 + 66: ECA433A801082C9B767C6F2E7817E0CD01B807DF6C2B3A3FD26EB283E771550AB722923A9440D2A68CBA7868B19485A8 + 67: 1792DBB0259E6C4BE6C5317F3D48E1E43B6F7F5AF6D12F24A523017C7B46924B24B0BCAFD85B10A92BDEA796232129E9 + 68: C282467400D993300EFFB83B189F4DCD1D1EF2A32EF5ECBA4AD23B6F455DCAB8EA3D6F16482DBFE286EBEF594D587AD7 + 69: 71007B69C9B15FA519AF8CAB73514A8B92534513AA19153E7723E56AB54C34BCE618BAFEF9AB92D13298BD35CB6E692A + 70: F82EAB30F732330E9692860682EA083586216EE761EA08C014C8A8DD2DC08FC9901942F311F63F63BF3AB8B4DAB14975 + 71: 4BB4DB01AC1C1D1A5DE657436ACA5275E4CAE772BD6AB9B358E0ED094202BE9600724A5BDFEF0461BA7F1DC2427CF155 + 72: 240914A09175AD5BED4CC2486F1CB2160EE182E3B71E17EFE5B82DFC0C8F0A8AD30C1E1A03CE42F31E5EA64074CD6F66 + 73: 8F8EAD15C47CD6F89ED7110D454759903DF4E1FF3E2229597893776CFF5195DE326080B897A3833C20325A3A127F9064 + 74: B815CCD36BD92DB0F74CAE305B7B77182EA6741E729FEF0BED0919C42E04329C2602535784C22E35BF8622468FF0E5C2 + 75: 0FBDE2B10A882163D2B52AE4FE609FCE18DCE971241FE9AB5DA3D486BD51E1445B14B65B841A4F262B994C2ABB588FF5 + 76: 3CE139E2B58F5E0CCAB2E4D3DAF8DB4CCAE348E97B9D87F5C9EEC91508DCCA697E85F8CC6CB399FEC80BA084528B9EB3 + 77: A9469B079964D0F8CF27E36762BD3F8E9F1904B4993AE622AE01AE4AE926E2563BD36F960E3E59341F92846F253580AC + 78: AA5FB18258FBF838FEDC3898B421A9A1A742EBF0BA7E8A8947545CFF5922EB0E2F92D8959002DB97121C93861DDB9643 + 79: DCF1486489AC46EDE14EE46C0642B9456E370B45A52C8611714CFD618CCCA42E63A61384DD7615F4042F36719099C761 + 80: 849BE67D56B19F08667FC7A6CC7EC5A5813BA6EBAB51BA30B5B1EEC99A7CE364C6B3DC588F389C830B174BD946EE6913 + 81: F67D9CB19E53910982C73B72F1894ACB02F902E25CF6050E4289A695365A3CEB482AF6215CD0323B4E587FB5BAB392C2 + 82: FA36BD7CFE938653150FD74A4042BC93A8A822E9F8173571A94ADBC1DC3429D5C531F516D04228539D11E496B984DDFC + 83: 861A3A316AE078F5DBB8104A20840D578D68B3301753F08D831D077A71C7665D104766E50959D2549ECE4680F9F7274A + 84: 6D313D3151483C6DDC5CF8CD6AA184A397EAD7698BFF1E133942C4325B5341D4DB01ACEA6372D893A4F9998039B80294 + 85: 2B330544810368EC3889068A58317A0E33867F60F80CAECE9DD1C10F0BE08C3D128881048E4401ED3EEC7F4AD72CD88A + 86: 7CF48A30A434E6CADECEEB13E1012E6E96388F1E70B1398DF1C1D698DCA96A54D93BAF256D2356FF37B8E6512F35C969 + 87: 8157A2A24F2B087872084B40C14CE8EA874C5F3CF99CC7EAEA5B20F129D2D77C79C6EA42B12C2C6CC557E2CE0DBCC1E4 + 88: D4CBE9A60C7EAC9FBDB9AC13442A0F8D49141B11D3F9239E2318024A501C72D2DD9ECA5401E7F97A7569F905F414A8F0 + 89: 94145EDD14EE5941B0640ED98C6966333779D21B51E3EECC046E1833210924F2B4A113A7E6810E2B670FA28BCEA84817 + 90: DC5F8BC7D2AE1B645833C72C4DFE753ED9E742D006D20490BB52954BE27D8556099484E5C432D598496C6372059B6B2B + 91: B629CDEE3C53958792CE699FE35B2678BABA9BC6F48CB5FDB8A575F180C72301CD6ADD8690E02412E6B8CE8327358F52 + 92: F26B761B5F75F407D5AC984C3B81F14CBF198A76C7DE0692253603D422EF8C4926B018C0ED210ED8549AC78BB543C64F + 93: A88234F5311E7438E76AB5DB42EC62878DE377B74A1E951168A2D5B1D00E2C2AD7F9AD322F438C58E6E879CF045C390F + 94: B153A0BBF5BA9447B0BC53FC71AC652C279015579917BEED4BDB5225BF592D63F871034C93A88518A98D0DF5490E82CC + 95: 4024BF283702055A9460F24EFFE8963468FABC1D54EE4172231F786652BC9D45CDAC121C88F92F4B4A707670D89E4F05 + 96: D6E266970A3FDCD4A833DA861599179A060B576959E993B4698529304EE38C23C7102A7084C4D568B1D95523D14077E7 + 97: D7992EDABD2897203B1FF128271AD5464ED507900D9AD3D0701CD4896AB93E76DBA918E43155AB908E6812FA40C09DA0 + 98: 7833168F67222DAFFC2CA272904E248063BAB4F8973C69D0F85CB665323389F15D533C2F3E8B55F0C3E71D59A709F9DA + 99: 43917A5FEC80AA876D11919AB0C739681F912A998A190B051F75854388F1908BF5306231D33F4E30E50994D0FE7D949B +100: F433C88078C2BAF1A5818887F8C36D34FA62561CE3DB34EB3C9F8331A357895DD29DC98286A0ECB64601B177873FF813 +101: 1C3A5CCC5DC4030BA16305A85F59DCED8CB5023DB4479E8B3749A7004AE77BB18996931AF4C16409EFCC0C72CAA4C1A1 +102: EE8A6C983DAAEC5976CB0ED4446494D348D0D571EB4C77FD8CF7EEBDAA0733F96DE2BDD8CDD0C70F5FA4391A336107B9 +103: 1F91EE551AD18F268876D1FC262F137FE196580216C5193819A95EC5222537D2A658DD129C3D8080E65EC7460F1F4704 +104: 5B8D0D5CF8B41BE507BE8FCBFCBDBAC3A28EB368D430FED6780AAA78A93A8DA4A6C50485949CA344F228BE91A96005A3 +105: 4A2F0A8F2F1F4CC4605CC2537E0BE28CF8B465C30F0A54B494A7128EC54EE4E85706B5E47A5697344D15CBF85680CD40 +106: A29BF5A49ADCB475A13C656F4A9D529CB7CC586B1D931646DA6172D7D673EFD745EF16040099F435E96168B0F4363E62 +107: 8A6E85CC4BD8B2C161C2AD6DD96B494A33F6F5839A7236D0D9A0747B888484742B8BDB1A6CEFBB4DA774B8F5A1059CD9 +108: FDD86101B1DBCDFA8514CB2668728EEB47BAEEE250794DFA7955693A3C316B2A95532F11BECD8359D6EDA99912DC059F +109: 3410059B9C81DAF99CA10CBDB58D6EF9301682AF4B75BCDD5B50A36127E7A2EF4CD185F10AA707C57B5F0D9FD6B6D18F +110: 60D28961A90F79CC60D2085357DA8411F6BEEC0C9FE1CB3FDBC2D80D737DD83449D6A6E3D347A6E286629DAF87B66178 +111: BCB12B36F8BC6D74E23736D19008D07AD6A9CA3E29FC17F5D505BCCABD0F2309D7BA11BA421F14286ADAA5575FCB83AF +112: AD107FFFD282B3F49F01AB1C88F62E88F779671721FACFB7F969DF1D96E942FFE13E1629B8DF9BF4C4B13B218FDBDF3A +113: E65FF7BDA6A992B32D4C6F8A13481CA6CD80161D6F44780D1244B02F8B06533ED0630DADB4954CD7B88AB6FFC35399CA +114: 123ABDF1D6B601CD040090006D6F80A9831AFB48C95DF4065E1581D334F207F66360E57720354C76AA33C57AAA7CD706 +115: F04B9EE00D64D6882A32B7F1191B1B30F814C69153143ADE1DEE49A710088E938639945AA20FC9C6737415F44E3CB9DC +116: 6F7C0F4892E676B880D4207020F41E0FC4A2F307697A25E69529C0B9B5F8CC0F1425577BE5F783D3C8A02A465DE18556 +117: D821A2E3EF04C924B3FD7D953E72675933B82847A4891FE260C6B8D53B2DC5AC5AF0BDD2B37D979024E91521EF60D877 +118: A7E97286C045A4BE5063079029360D07BEA0D325A70BDCE30076E761B34D363B3E061D33BBBF1BB26D65BE918DB4E767 +119: 00AF631F808431398E9EF320E97EE5C28110AA9FC9DD9365D536E8170A7CF3F36699A0B99E15BD7DB8E2CE614268D9FA +120: A160CC9D12716DE4020C02B259FF712A7C4CE3488A8D22871CF5CC13B79F110EB35C6377046268E9237016641F51099B +121: DDF7D046DE9C741C67E4C6B65F4EE6790EDF7F76A3AF7A997EDF23BC1C7650B4311E53C921B56520B95AD52B505A357D +122: 5DAD82A9A04DAEE4E7636E42801A1FB9248F3F0FC8D7337C3838B3DD4AE5F08583A00A3295FCACC1435A9D0E670C1654 +123: C193DCFAD7E89FE66E7E3D2664C541B407DDEC921EDD35100393EE4BCDDAA9F086C2D023E161A604695A8333BCAAD4A2 +124: F4421A9C548AB2485507FB2C2ACDDFCA6E9481D10E9057B96A0BA6909E308405ADEF66D8586C1A91AF25BC4DF4F349A9 +125: C250A60DBAC9DC3AA06DC752D6ABB5BED93FAC50BEB8A2C52FF86C71331C55A1D3BE05E4136B2DE811990BA28D1CAE36 +126: 750211AD5768DC4F99A236908DC832191AE16F65C616CBA0C0F53E60B98CA65C5AB2E0D1B7086B8E1001BA85AABBC883 +127: EC728F56EAEFC03913FD2540AA1EA2D10BC4631A074A793AA8DB687E9C3FE8B6581C37445AA6C2C90BF76A489B62D2C2 +128: 77C4B75F9E92EB8DB8E3F9074C3D3ABDF06BABC9868B11F789112FF5822F6115421E0EC1627AB580B830E6C12DB692E5 +129: 5E7ACA003B911F6CB318C1182631D9252F90750F901A377F5F4FBB87BF2A55DDD11D87B1D6A51658B3A20B1BAAA296C0 +130: D33BCE776E6D67139EAB8DFF9FAE5A7F012EABA15BD35EA1D630830E6A7032A9F2E277711FB5BCAC6AFEA7F390A876D8 +131: 060858A71D11780D60E48B47C1FC6357AA0AB77974A38D1247DE8003368E5721C5A3B289F7AB2DD42EBF2C42282F5624 +132: F3CB3F6C05914501C89FE8536163EB0CCFD2D9E63A1591698DE7AC0E3CE38835A9F623A208DF37687E1956115CA2E1F0 +133: 72D7F791DD6B7E70CB118634B458BF6977A64B1A6C27A136464AE12DB9E7ECC5CB2D7D73C8FAF07D4D93D1B2E2F1C0DA +134: 0DD4000D8A25D0CFFDFE2B7151FC610CB5BF25D9249D855CE8D0D647D2151235A12092A75233EFA7820FCDFEDC59041F +135: 25D2BE1F5A681F8135992E0CC18A7B0758D1A880EB3C64D9C722F80D68B744BB3A89C223A0C38164CF4A423F91F8A533 +136: CED899B993A69F66251A7872FBB87F8BE5967857B2693E3FEB032B3440DD94B78CAB782DEBFA10956642AE536A8241E9 +137: EF446C45F31F98FE3AA92392EE4198D8C797128CB87DA84AD008AAD1E1D972D0C6D98EF74E99B4BC5B97AE92BE53EE27 +138: 1A7EB818F91840BE12AAF24D39D5C81051FAF5814BB64DFE697F23B2822BD3537C1E7623DD9EA6C06CD2693F054B3E24 +139: 0F35DF35342D118F3372E3682BD702B04C420F239106C611219DE4E0B1D7121CC9484478A7F4BC3B5C0389BB82C8046B +140: 0E10FEC501B24CFC5DF22085FC8B7D43638DBF65709304FB3A6A1BDA7815F2D0C58EC6BF257D6B16B087C415AD35C1E7 +141: CB6B185E7F5E232DB435F2D02F6E8BF16DB60F895FC92CBC7FBAD356807C5D693853FE638305C4D163D7B35D51B9041C +142: ABE7A3A2309B13851157043658589D3F011CF2B58DED164CEFC56654146F1884ED73D195C5176EA879F7821E9C332B3A +143: F25214F92D3B1CCC162C46A74AD8FAFD33E00ABDCB3048744D93D36BC77F2796F92D91CEA8946B357F14F249792DD8DE +144: 2FE2A7AB6DFD014F013C662E4D669AC595F7D80BF8056D156BBD0135DE841C17E7E544AABE568DAA2650EB58C0506413 +145: 16F18F6D08B03AD95691DEB59615BBB7330FE8F75DCD5F7B314BC022D3E27821083EA37EC2AFF3A22431305BFB315342 +146: A2294C64B7941B21124AE0B3A73D54D139D67965021201FD46F4F59BF7113001BA8C76B0E6C29143070A40966D24D9A0 +147: 6D1E58EF4EC828467268A92EEE3F622FE475DE8B1CEF0A38031C9CDBC7DB3804A683FCB9257415E904883EDA4D8B93DD +148: 8D6482ED3C1B5B1903D921D9B32B197CDEA5ADE41BE202CCDBC5709DE4D6AF80E11CC2724FEDF2C2D77BD8831A61C339 +149: F726B44377CBAABCDC3B4875D4B369769EF8F2C11D28F23ACF196A202BD3364ECFDC4B032F3E05E8088498D6F32ADCBE +150: 12560A76E0A4A4222AC89EC18ACE2843BEDBE0EEC4CA689C6A9E8C71C64DF0311BA4C14957C54CBD190CA095E386811D +151: 144E9531CB3D3379A6B1A11F335BCD21C712BE8C6B4511EAE05EA802AF5D78CA049BE38F886777A8FF9449B02C4E0E8D +152: F8E53817BFF912A42876FD20E35FD064A05F39CE42DEABEFB435DCFA2466B4ADB3C23765F13BD31E3DBB0005D695055B +153: CD728182C73A391043CA41BD05614CBA964919588017F3C7BEDCAB9DB3F618250FA3418C60F3BB0835E27B9F8964BBEF +154: 02636722F4F0E21728201ABA1C86B6BA79B57E4C3AEDAB300A7D03F973B938A74044EFE7A477684C4715E8D9335B6188 +155: C9917BB005AD6158EF50A2A2B1C3680F88796C70C9D3F87963E5D652853A4EFFDF26645811756981132C09FB855B00F8 +156: D21D724FE7C4064144A2159EEDE9331354998F631F9975317732FD5BA049095B741D9B200C027CEF5D870F1C9DB52EE2 +157: D417B70CEA7FAE4CC1CB195A5159FADCE9A8642F9B229EF1403AA8AAC3C3799C4E9474356BBD2B7860B74E55142FE048 +158: CECA34BE220603EA5BEB301A360255314AF963E0D0FDD0626E578C0B42A5F44686C7F15B5062089B7809CEA61DE6394A +159: E7C2C9E69810413212B0DF7BA4B361431D4F3D20AC8730FECEC454EBE12F18866B9A4B5227989DC61C862D29786B6595 +160: FF19F7FD7BA1617E7F31397D0D1308E035860042DB2DF5AF812895CF2C9EA36AF9234D730D2A633D87C8D836B1729BB8 +161: 672D8E8F7E7AD6BCBB602F1F7F15DE7D59AD72F441778C061E4961A40A991D26E151E7A5026C2DF69707D19BA1A4219E +162: 10381CAF7829383AADAA9569CCD84ABE6505D78817FCCD44252D71D1A6620509318C26F4F1193CB6EBCB0450C9BE9CA3 +163: DEAB3596909B7463E53801F6748DFADBCD615FF8C77AC2F78D12ED230B758CA717F157A4A551B7BE42D95EAE41424363 +164: 3E44362375F671109371AB12C4E21DF3B4F69FCD0B22B5B408D52DCA65886A335AA02C119B1D4DDE5DE316A0426762AB +165: E289F3866AACC5FA881B43A44699D69887AF10D96CEBB47D20713EB49C50B3D1F9D71DA9EA4F8D75B194A84738E7A7BD +166: C93A6A3F09E1A61FA86309398663486E96CAB9D6FBC630B3CB53F520EA77E18806597944CB780193EA79D4AEFD65E20D +167: 12442EC232A21DA5FB424E8C51416FEB6E1EDCFF3476875A80F7F2237CC873BF85EE0AFD93C3F7BE5C1B33D184FBCD4C +168: A4F7BAC5ADF27C96BFCB084091D93C51B4E6E8442A7A1D473171C2D5A73F97EA8FBC4D619FCAA642D3B3AA97C9D7CBC6 +169: 6858BABFDD40FB2890E6EFD2D32A06C5C9579C1ED70ACA8796BD1B512E61233B0A3114CF78EF02CD9B2407C9D26447FA +170: 75A5AF9FBA49DF9E0774B77B60BE134A9779DFA560AF54FC632E0275284DF5A006ED485095D8EA57A358D748B778A111 +171: C8BCFA5A29CB50F7DE56E258806F0E40BC8D4008EECF765F444506534FBA43B1560CC5B925CC825AC23FE540A5223225 +172: 3D8CC6117A23AA303ECB4596C85C070F87335EBEB1CD0C0FB78455EE271E299E5D68E43545162A12B1B31D4C89200BA9 +173: FF4033A73D1615DE86C770E25D05919C0CD18FFB50F3E8F832BCF0D65DCF91FEF57C3C336807A07708F243946091C6B1 +174: 2020043B473B8A878548E2D90844C0AF4F51FAA8BFA7C4A80573336840C8D599E328EE197688443584C57C9B0CF2B67C +175: 977197E70CC7B75161AEA543971E09280E04ACF639B031D954BE8993CC72FCCB50FF1BB8EBC7A9BED365EC65E7F0B923 +176: E954B99371301C4E29225E93BE7A8C42864ADE844857B25F14A42854D568155398AA69936DA49FD268776DAEE2EAE75B +177: B6DAC53FF0058619CECED87E7F0A8DECFDCD44EF201695EFD744970B53C2110B34A42FFD8FC3ED385D22515A5DD7FA00 +178: 338D89616AD5FE0C81FF4D64CA274F29FA2BB15BD1C03D551180EE545D7588B961EE59B6A841BC107473A5AD9D3003D4 +179: 26D29BE4726EAB64D207EBF0B0A653C5BDB49D4BE0E3D085381007182DED1F4ED1575BD3D951711D6D49830F4B736B1D +180: B4E2F98F6CF352EEF41148459B3AA81AF033EB4EAEE10517DCFB05D84EF9552241080A2CC78C60034BCE5760821249C5 +181: 659E63335B9E946685B923447F6E08950DC97736214D38DCB0A1F46CCCCF474C204A5BB3702E76504C3BBA59C238DDA9 +182: 64451295F7CE5D38916B81812E4B10E5D2663C311A43F02F927FA0105247571755C5F9931F3F521F4616B45108164AF9 +183: C8B6B136BD8E8EDDCEE3637C3872B9955C63CB62DA669ED5C664AD31B9A77D8A91F8E504C0B51DC03E30CA59F45AA967 +184: 9E0BB33CEAAEA09F3805B152A2DA475972A8886539B45B3F016728364083A11E345A2E32976277D322DE576A660696F9 +185: 86CAF7B9DFB6BA1B79ABE881DA5891EC98E61ABBD4B7F889CF5B4F01D9C3AFCD0F8AE5FE9C0D967D3F1E6106BA99C7A0 +186: 83B69D4D2F1182AD64F5DAC98AF3EB4B8817A8DE9B9D3C1159B3D1D1AC4BB763B9CFAB6E89B1BE6C289C04A7983B2958 +187: 693F93EFE5AE69C773B6BC623FADF4B8247086EBB424CD393742DCF2003242C85A843D28D98394DFB9FC45EF297E310E +188: A272286F6C14202359290D5503C385C7A09318541F27122CFC1E008EFA1AA5F8E86A7B89A799D9171FA91FB1B4FB79D0 +189: 4B0AF4F1AA4F03B1A12034328D2588635E3CE69C92A4A23B99F9E9EAF53CB80FE24964AE5CDC80F82D2C4F6B1204EC69 +190: 79BEC27CDF535873FC2094929ABEAD60945390DE5D1B0B6F978B9856F1EDA2230E7D44458810CDB6EBF9E1FD1D769903 +191: D2D19D934FF6AC59743FD35E538155CFE3402DB68116E8F0C5AC883302D2D916A8E704F4860F4BB8439A4D8A2DD188AC +192: F47FEEAF14CBDFD7A1A41CF15A1D819095AA673142EBAE96F43E27C04990B1A8E88D85E3DE952C01F931A32964F74B71 +193: 5899BAF4ADE7284EFD3E985E20145FB8E1B8D37B26A0D8A286C342D27BF65BDC96078E81802AAA0E9817AC38B6CBE259 +194: 45210363539CAF8ECE76FCDEF07053C23DB49A4298089BC06B001F2D03712AA565A4E3DF20828D251CAD574E1BD4CF09 +195: 68C4994FFD5DAED4071AD382A1F5D3692AE12BC12974A13E4EC458916000F4699DE8C41DD53492860AFC6FC32EF3394C +196: FB1922DF64C07983F8B288602BA7FBF81285B0A4367BB18047ED2D520B90776819CC900169D38367D3E3056D3AF15916 +197: E26F2631DA328E3475A4ECBC2CEE90FF6C07E60DF1C630164193FEA932109B8493EE6CF95C3E4EAD01CD159FBE2D6338 +198: AC80E42D1F3CECC2C55CAA648E6E28C4676F4FFABDAF1F91C652AA44265CF1E261842308B19378F14A035D80ABBAE5FB +199: D66C1CA84D69B546D2E54313DE3DAC651B0AC696C2AA9909A6EBA20736716D9262E0163573F6F1C3F179E9F1559F0EFD +200: B13FEBB1B3C54A7C6B69367F693A1D1F3145709B6DDEF23FF15874133EA1FB9CFA48EE7FF4EC9AA987DEA641E33CCDF7 +201: E1ADC09F58F561140C959A1F1B8945E1098DC62272073CC2209B65A089CD714E0A472A1325BD2F6B40E4343F933D62D7 +202: 499C8B1AB4D590B225F5E7C6B85691C4FDED5BEAED16968FF3AB9B25FF1412AE970C153584B731CB763AC7DD6BA3D785 +203: 0C9EB9EB4F3C025488CA6526A6B503EC466B62719557F00055064708A819E76FFD24F90A1F9D6851A6FCADD52E0499E9 +204: D359A919FFAC6B0041AB766E9F2D0B02ABB5E7CC491AEA8A0EEF81AAA58ECA52E1262C58925D9FA4C59E73E948E5AA54 +205: CFFFC9AFAF1FECD47E4554C3C94FA6F4D08887F1DCE53D9E78A4F224AE38AF650812334E1845CF60BBFC9F8A72F0B949 +206: 2DA46ECD91373DEB9675C75901D3BE59ADA8580BC8F71DF2A3FF1AE02310F23681B6C6FC840B492E59E017686EBAC7DD +207: 05C54EBCCE483360359D63BF0AAFD97E2B15B00EA40C6152B3BBAC80285711CD0B00FC234CDC214251E0AA13E38A0008 +208: 13A929EB9E4AC18A07DE84B17E79BB420A86924B9DC4CD80038DD61F17770FC42460F2A0A717DD26FB6B6B4DE357AE02 + +Hash: sha3-512 + 0: A69F73CCA23A9AC5C8B567DC185A756E97C982164FE25859E0D1DCC1475C80A615B2123AF1F5F94C11E3E9402C3AC558F500199D95B6D3E301758586281DCD26 + 1: 7127AAB211F82A18D06CF7578FF49D5089017944139AA60D8BEE057811A15FB55A53887600A3ECEBA004DE51105139F32506FE5B53E1913BFA6B32E716FE97DA + 2: 23A5743EA4136810A2DD503252708D35151259C859BCB7AC46F5F120429983D14736FFBEC6BF8F174977B44B0C5B73378EA88A4EC1F7AA295C04B5DB9017CA48 + 3: 123119AD1D6E168E0F20A3AF1FB2E29C76BC3F83711CF3EE3122AE37EF6A1C2E094BD4BC53B7F9A45C9DB1F900F87A3759327A659DE341EF1A7B1787AFBE9EBC + 4: 8A012A2D7FFA17EAB1B63C2E6CCEAB1597623362E7CFF2F1D81BB1D1813D27AB344EED9987E55FCB4315C4F8004D4C541A0CFF1AD050E5B1D39EC91BF68CF5E7 + 5: D18F88E32C65381463856DF34FB0ACB1AEEC7FC21941B628534CBBC44CF23BDA195B46A8B4CEDA76175FF1875B194E453479D66C7E51C8ECA9E79A1E5E35020E + 6: FA6BBD204ACB2A0E44E3330BEF3AB905CCD5D86B2FE7E07DCE2A8C484B676C8317B5EDEB3896D9B7AAA3250059B91AEFED0CA628E8548AEA63106E4758D56BD9 + 7: 598D98ADD2FC26B551E9E7385551F760898230A51F0E507C567FD502317A521E8FFDCC062302286C975811478B89046CDE9D148814BB4EFC21B5C901EFF0E151 + 8: 44D125F785E8EDF22739FE0ECAF0902969131B0A66B93091119B8F3BA16BAD118FF2DF4CD47D2639FFD180D5E6491CF957E6D346D6C7D914B810E4560C7E662C + 9: 3A1B39B1F0FAB64D4AB06F1082C9BCB72B6DB81CF391363B56F2EDA562B55E50406ED946A4D18777A46E6A6984A561A35A0179C6091BBCEB890570017E3F3C4B + 10: 3C5249D4D814A0ECCB3269F5024F3BCF102784E043A06A6A6A9BCBFD20F753BBFC5DA0808E34F8836DF428AB9F2541DFECB36DF288112CE0268902DBE510598E + 11: 6206D8EC11289EF46456F35E483DE20FE0AABF6261FD634473108375A63D5BABC27143ED51EAE3C4D8B7649638DC794AE63810903ABD4BB303700804ACCBED32 + 12: 06E9C5BDE5128B27926B475874B371F7D8352FEDD18BF29F9C7C1F7BC1AD267E93FB5562D3E0FEB47CE10089ADA5B67D6BBB225A5181BE3789D539D2368DDCB2 + 13: 628012B90C121454C02CC2937A47A87C7F96D1B91AA42589022941720D6F6A8B6905C489364250D21308A13D7B00529DD4F303E95918EDCA0682E64F1C3832A5 + 14: B99F8D912D10ED113884391C27032E4A92475F6363F5A7D8B08ECE569EC628A0F1DCD51E0AF640972D56C7BB570A97E67E9DB59811BE6A8FC6EB66611026F98F + 15: AE8359EDE5BF78C10A72A484FEFA47164AED963E458AC880DE4FB65604355655FD8211B11E549E925B3A28D7E288FAF5FFF8CE15CF992586434D10CC5A8927CE + 16: B1241C96B35EE185E39A58E5B481925BE53B3EC31B5D082366021B5D7DF5B832E0951A239CD0A337DBBA6DE2D3A0948105C3120A074A450799AA2547E700EB1C + 17: 38B94B9A3FFA22F622AE3508152AB5F576A20A3B55FD7521849A6C8ECDD06C132F41583258E572DCD003087EA92EF835CFF2FA5EF3634D0D55C2E66B1ADE8F20 + 18: 1E77FB17AD950D28E4C498C5697E46F70F1649131E6B61CA90F32AF38F342C108CC33BC63825EF8EDD539B4C25E21AC5B3DEFFCECC53C0A570831031A4F225AE + 19: B8AF5686985A34CDDF4B850F3A92B55C34C6F1B418C4225F4BA8CBD8A6BCD53338F635B376F37F9E434E716B7D4CBB4B240A2AB8AF1C9B8E33FADCC84B79F0AA + 20: 1F0529210804655F91186C04E0A94F4AFF12681B13728DA70725F9FA3680DF14539F37601C47CF0C6CC0B42EDD810EF6E5913C3FB199AF7EC8E38D62CB6BB2C0 + 21: CDEDA0FB94EC6D9155EB049DF7F379E537F500BC42048D46B4A0959B4F2F148F7F39D6C8A46101E64023EF37ABB101FB3E1567D55C1E872442E4175415D1B8F6 + 22: 97E5AF6C72FF3AB6941A11D321310C4BC6C510C57AE480BD74B13B4CA0D2CA08067FA4D101D3998AB637680271F61748365777B7C9075366217433C8ED14BF3B + 23: 171C2B53C78491921D7CED8EC5FCD6C420FBF509A9C46B13743F3921356FE439194767B24A7002AE1C5D20B16AF2FF16113AE64353EFDC198C085C0A83EB8A6B + 24: BDA138CC4264EA65BC361CACDDFC24F7F2932490569E1BBBBC6DBAABB2A439FA4C59D9E848462C99F4A3E904AE4D77359220DFC0C4109005220FBF5EE68E501D + 25: 89483F3ED6CE89576702D1AC3D3441E51CD1E4989B8D3D01B92BBC22CE7E4EFEC53F3FB7EA9EA392366E30B50EE72A71700C9F2F36A0374D07DC724EF5A7071C + 26: 22D09DBA077F3CA703A5C3118981B4E6E0BF9ECF644E8A50CCD9F9A8BBD201B5AEB8F44876B54FAE4814E2CA8DD8B65CEA0390822CD00FB804F6535005CD939B + 27: 4FEF39AAA693F0B425E261E448D1D4BD9C09CC213F249AEF6BF57EC20E83BDA5DFA0D5073276DD6F55E03D537AC6E41B7DA24E39C446B98A1205CF0E172E779C + 28: C2919E494C333E510EDF5EAB888F5872399D6F6F9B2669708CCFA6F3622202F514C4F65166B93CFDF13D5ED4057FBEBC3DADB50E9F88BE4270077968042144C8 + 29: 41DD097AC338442C76407A100FE4CA941BFF3CBD645ADAE50505B8B0D6B41901940EB8C2E3142C2C765488C9283D8247A9AF011BA9E4BCE11B9BB3CBB6750159 + 30: 455304D0B290FE4160D66D78F5DA2492E538D15089C74031DBB2CA3E8C820C723A89BB85F90FD0CD22AD6AB005AF0CD87C4DB3EB463BB5E35A06650C6C39DC17 + 31: 2F09F6DD601CBC8A0F8B324099C13089DAC3009BF9B0063817438C1055E7593D27822B1854A2560E664FE23362921072BA2EC4A6B28FC234B017C55A077AFAA5 + 32: CBD3F6EEBA676B21E0F2C47522292482FD830F330C1D84A794BB94728B2D93FEBE4C18EAE5A7E017E35FA090DE24262E70951AD1D7DFB3A8C96D1134FB1879F2 + 33: F55D3AA4A656D91B04900111A8EDFF4C7AA7EBEF8717F9679BE4C2852FA098ED8050E70477869E8AD13F62F70436E429E83DD9C268CC1F4D6E410004317A10AA + 34: D448BDB045C8E0AA4DF423222A8ACEC37DA81BF020CEACC49C93AE374F2051981406B736388DE716F126D77385A051783833AD6EC3EC293137DA493198C46C7A + 35: 75A0C701E69724627AFCCB915B63235E1E20B6A63E7B54B1ACF7EB82A37D437DB5FCA2CC9FBFD55C60018F22153582F846B2AF1761A369613FEFC7DF645E714F + 36: 3497BF2EABAEE843AFED140E204B88C48E3D1CDF99F1EE5B3F281A39EEC554AA169C5940EEB44B732667C3F9BFF4BC12A7B8431216653CB06A88D9D91E207245 + 37: F0657DCA8FEC2873E4788FAAB46CBB528A850D2E5C36A301D3C5E0AB2FBA04A28298F8E3455143687C86AF48B7090F18574A39ABB47CA6C2010F79A9AEA16528 + 38: 8A0DCBBA20DD46CCD073DBBBD38362A7C7806D9D3EEECB7BB75F9344C607AA3401AF20A1176BE3786ACB804A74CD2FEFCE00325CE9D9826B1F18E9D37872DA6F + 39: 3A91610D901532F12DE112D6690720B91F8004E31A4319B66BB9A9B2D345E1FBC214D3D9A3C2640AEAB1CEB876ADD27B90DCFCE3002227847AE5DE747BCFF162 + 40: 413A59AFE0BCDAB6478BE0CED2351BC7AD833EA07B08C7A58F5050030969080EB96C1ED37FD480FA57AA09B152E74193E247EBDFD8F3DA5F19AF5EED19761CE8 + 41: CB368E0D768F9DAD380B9F1FAE3CEC41739DA61FF9DA3DE813A76D65A7694D05AE89C280456954CA0472AF3BDC01326066F30EA643A4E0FEC67DC530681912F5 + 42: A0E331A70EF82DF3E913EE97B210B4E0AE47C3B950F1C9B1ADF66FD1602831BB584F661863F4592EB152119A63B1517068B339911BEE5557CF17E6FC937D921E + 43: CC9EBF97C234A6CF2B08100343C2845CBDEEB27F5968BF39F6519072E22CD07E4C81D11F43552AD78AA4E38808DCDE7A9C917B6567DCF3FCA60CC1153F9596B2 + 44: 6536411A996F5692A4F4DB792D6DE5F73E0B68F919AA551644F07CD5FBAC1331F27D902B8EC9F33D882E5B6638F013E4F08642EF91EEF7AB868998960836633C + 45: 76F62D8BC869E64476AF4C87D720EEDDE7D8B79A0E78D4688BD27F329A0065B6C3F8FD87D8CD2AEC493BCB5F88CFFEA341EC88486D2671E99ABCC4A61C271EB1 + 46: 11EA3F12DC7483B0A9D133951165E696E992AE88AE1C98FB77A66238570E59F9ACA5079FF3F3A226CF8DC93AE3589E4EEAFB7F48C38640AE18DD05FB9AAD5CFB + 47: 74BC2C69D958135E73EDC4703FEED12E89B8B5889927B87A9E35CFEEC1CF1B1B6F4913F3F5D97976DFC859E64A98D48BA0CA4F89069B84383C66F2B2870CB313 + 48: F1CFED99556434ECC9AA170228C2BA5709EDD8EA68AB9ADC118036AE5F49677EA9E2F7EB003FCE763FA35E58687BA6CC9BED2ABEE386D91D975FB9AC8D1A2E3B + 49: E5B20D257A021E4835C06DCCB770EF003657E8BD5BA79B64B55A0A8542CFC3657705DBE5AAB0D5FEC34999938CE5F66D497445F8E522BEAAEAC7CB0A679CCC7C + 50: 20E0DD49444601FF9C6237D5F94F4EC8196F9C917C37E1EAD04E814802EDE40F8A8AA9C55015602A6D53D87A0D4119B6996813F90BF984B6FE571B79DC5BCF73 + 51: C8319ED403C57E18A7D2668A9B6621DF11A34FBC54BFBCCCA63701A2F50D3BBDDEFD603F0262AA2DFBCB5D82056E9034CC51FF1D69996BB985E6C782C82F3BAE + 52: 867926EB86AF82183123664835D7D4B941D6BA4C8988F3A2A17DB8A4439C6180ED8DD14910738920E1A3FC8F6214FE05BA218345B9079CCA662AAE480519D2C0 + 53: E9FC3C407E282BD9A6BCAF1E50E3A738F843830C6F9CB1D4F1C34CD8ECDC7397C5D4D3C482896BEC7383EDC4350CE40AD700BA5400B956F2CC1585DDD7129420 + 54: E1CF4D1704A9D37DE70F3F56A0D521A41293095A1F99BA928B3A3DE90DB1E2BF2F74EBDA9A90CA9D79BBEFCBF9BA6D140E1418AC46965DD4F59017E1ACFCD459 + 55: 355541FA3EECD27B1DCA8D596B3C41F0C60D85034F8811E2D15FA8977E25433F297C5C14775A0E5C26429062B952BE7DC2DAB84A69A56FFAB826CDCB49AAB4AB + 56: 2CB606CD80F35FCB14183916DD04C4508EB0AC03CC24CF0DA485248758BF0910084CE6C503ACFC76962564C13D9EEEC408C3CEA22EEFF9C7D41B206ED8F74F10 + 57: 0BC7A701FE7AE86E7186D27F85435D088385269FC333D124C17AC32C10A38E494291007532B06114199245CEBE8B4B83AE85C435CD2983A2C342AF893A161169 + 58: 69B557C3824DF67B6CDA58E107D82A3295C3C888EED24432E002E312D4BEDA1FEA72DD4419FCAF751C11BE33BE6499FFC3A3C239327B7D781859358855216148 + 59: CC0F4C0BFA00891BDE18E07B766FC52BF19A26186F56D7DDFB5C9683BBF814BB15104DD999CD70FB310D8757B938EBCEEE59E42A62E4D654CB106BF50F1283EB + 60: 2F3E29791BF2FC175F6E3ABDCE41FEBA2B77C5F016BF076692C51ECDE344D0E1F21187F6EC0D958D6A1373639D1CFB64BE4E9C36D3E5EA1B9F0BE3ACBBF6063E + 61: 3615F2BBDC87E8AC38B03C3A73D671A855FBA02D81C204C2EF8EAF24F7F4D4DD0B6DDA1631D884F4B6F05C1D1E324DF2E4ED63430B43AAA42F87DEC2D4C7E6E3 + 62: 97B59ECB6C17B829147729D80391E09A399F7E49F781038F3DC1FF195D90677CD3CC9F723AAF309B4B8911D25720E4E399070353BE01A218FBDAC460C3AF22EC + 63: 6A930B07A37E9F0C62E2A220FFCE9DEA8D8E34BA52C0A7311C5F4090A253F16C9281BC0DE528E5EF86F187C3185F2ED244352A5DDF5FC09E99B4008FEAFC584C + 64: CB29601EFBEE71F4DFBB7F1C2BDAEAFDB212DF6AE35F8BB1EE6C0A245B99F3F35A82957567A30CFB01AE28B94C7223A62C5C786E8624B8FADDCB913E3AB2CE71 + 65: C4D102C41B4F588324E3C9E880ADDF370874B30FB6C814ECE42B599EB8C1563D88E89225E7BB5CF4DC8CAEC9E7B729664D421E5AD72B94552D57FD04B254D551 + 66: 4E91B0F1107CE978BDFFE2AB3A6A67A2C4233A0AAB518DB2D4BF243A88FAB5AFF06058CC13DAF54A7E41281AB1D411E618D73FF1115517D49ABBC1A1821F2A0C + 67: DFA65C9356EBE3265151D84993C9246A8FCB9FEB9844D8B4DC7C04689035FD2966611CA81DA600559C9533E6370861C00D23C9DB16F1E715CF4838538307E403 + 68: 9B0E7F19F3E03C425F7A29C95A8417F23A3A64C18E423F7F8717558A5D8FA1AD4ABCAEC7FBA83D216D8B66BCFCFE50FC6FBE6BEE2EB054ECD3EEB71828B44293 + 69: 65E34948011BF0715855139BD03AFCD01C10A0CBA4A6C237CF38A79977080EACE8F47E1E9EE14E7D60DCC2A9FE2E9DAB47DA5BD0EA1CD3932FA788F07E04D7A0 + 70: 351164E46DA292FD3D75132545401498D8983BE9D143732DE2DF21FBF975A5E2C81584D90A773D34D7895D4CECE328637AD2FFA973E21D4B6D03F39141CF44C8 + 71: 3CCC850D53A1287AF7B4560B2EF0D43EB5D9A80D62A0E9CF1DBC040135921104D4395168E90BFC871773EBB34BCA1BD67056E1CC7DC7A48FF7C3167D389F117C + 72: 5D63F2BBE971A983AC6847480106E4E1264EE3A0BEFD79954914E1D86E795B2E18238F12FC5E46CB9CC78EFDEC610A93647CC04E1C23D8CAAA6A58C21DD26C07 + 73: 921D9B7B2B0F3066A1646DBB058C979CB3925DEC0F8C269FAAA7F9648E73465AE55EC527257D5D5E1CFDBF5D6799BEA1004B6186F5108C74E3B92FE924166558 + 74: 88725980B5A5BC5CE6E69E9CFE128BE2FAEBCD8A5B9FC2E17C614F81367788EE6DEAD64EF02AB4141E369879E38D4E1ADDB5E678347D4CB86F8DD698631B6643 + 75: 469F61487EB859EC7E80F3B6992A9C335B4CA864CA1BC7081155A882CF2E64EE787779EA251EA3EF781F4FF42ADA9CB93DDB96E9A07EB06A793F737F2C6C12F6 + 76: 8014AE3EA99C4551E214BE2A075FD7FC2A048152FF874DEFC66E22437B8410427DA8FB5BB594E09562C403D14595C921908DDC45E270B3208B2125AAAA53C191 + 77: 74E6B15025353113071735919571F765F098622730A59779D021AE39D7B0E62A887388E3064B16D3C7A1564BA5F823870A7C318D00FE484CFA919046939E7023 + 78: 2709C7DFAF46D985813EC7B14CF8357B6C9D0F0BD206A716E5DA419F1B54C0A4F6CB1CCEEB9A1CC22A6D398B641D7AB10489084365931F961BE24EF31544B425 + 79: 02384A7707E913992BA30267BB1A07081A82C97F0C8127974B16E783E4F788B2E207B91F9385A3417D339AE468E935EB31FCFE7CE78EC03569710564525C6A34 + 80: 5B4FA98001A5B76CD19A8B11C5F47BE9615A1124FDEDCCEF6E247797371A5950810283D4C2695524749F96F6E5F11B2B17810AF4B527634C56EBEDFDC956F9F1 + 81: 245DEE786EE305DDD0F6C592830B463049A702916BCED916A29F20553ADB5F160021D2A0CE50B5CB5F9EC7B342E10E63C9C643499542786B0F13C75FE662F181 + 82: C500CEF078A00D242D6A8DBD36BFC8BBF4D16FE63AFBB2DCFF0E745737AFB65728557FF624FA1C70ECA3F7318E82B3454C22D929CC2E03427A3EB92832E2B826 + 83: 86CF47EDCA1807430CFBDC87E9CCF646299285E7A89A22C44D948959F678E3956EEE32F7724C82B832A6211FB17057418DD307EFC877EBF47B05869AE4FEC59E + 84: A22EDD54BD66968FBB5B0CBD690216BA9372DFC73C652F1A059585BA4A4172E484710741E7DAE28EF32A3188D4FE227B864724DFDD6661058B62ACB29A5B6DEF + 85: 529D168D19A280DDCD507EC1C9AAB9D622C168ED4847CAC2146CEB4A8EC3E32FBEEC137A8B975ECF60FB297702D4EFC987A2862EBCAFE4FBFC8A040BE5BAB2E3 + 86: 96C78098873B4D7842CC9D3CC7C36C872CDC0EE4DDCDF8290060A64FEB04FC55EB453337E7E77B6BE081CC5D8F2821782F82F98BE8CF290F1CB8BC6CC1314D2E + 87: A6CDBFE071376FFD6B1C3C90C9D8DEB49D46CEFE9177AA84E5D8DA9B3ED5449F507F5A972C97E1CCD258381B54A3FA8C087590D7EE85B6533795DF91DB8A58B3 + 88: 2B472A62AE504DB117D77E244C36C2B6793D26E89108F34ADCF5AE51D6F5EC08CD021BFAE4C80A4C1090FA2CA83182ACDF1957FC2C21F360852C2C8C14C2A39D + 89: 6882290FDF4829B5E8BDEBDAA9BC11826CE1B751758C9DCFE5DB84A0403948EB1BA23A5A899109C91925ABC44BAAEB57BC88DEE3383C456CAA030B4EE2072118 + 90: FD0243F8D7BF9B02002664100B0B6B228C9A11D7BE648DDDF279D147C8C4B57321F348DFACDF7E40010D1F4F960355479B7CE81EC481492952B864815648B890 + 91: 348978B95213EA28BC3B01A457173D2784D1A301886891B40E7825C627D449785B1596D1FFE81EDA8F487314F56B96265230E465CEB6B49D6D58D07C195C1F7D + 92: 85D3B3427C0F58CC5D9A1CAD73F9D66F2CA0AFAF37089519CB1E3B082C96EA1E08E67A0F692B79752BC7914D636EAFCE4281F2C4E1F1A7C80EC56584C6BF023A + 93: CE2C2B9A13F55A2700199BEA8210591DB80AD51DD5227A2E34D0722661376702B0A46AF3A3AF00C9B1B0A254299D77E568448B3BC8865BE13F8EAE6B0E714A36 + 94: 552A8EE6F26E9E1CE87ACCF9674FC96A4722F30035869194DC56843A12A986F368A760EE740E6D22DDD08461B33947A6D4C5197F5877E4FA9BDDA08F9B904C53 + 95: 5DF5B514C10744318B104C4F2790EC18070A8401B5427D06CC44CF9320F110B5FEB176CD5CEFCA31AC57567C677418D065C6AF2C6E8BEFD4688DFD8F7B3C93B5 + 96: ED4BE3D733CABFDE4659B2F6D6ED16B9C69AB46D0949BF1290F360A6AC358EB9F9FB3560582C52AEBBEAAE73B04D8D040621723521FC95A143E322258056742B + 97: A070428BF846D27696D9CE6A24CB58DA841015D0CAC74BF481270AEB2980A1F92A20733CCE4BE4D9226428E9B691B8D2E41385B836C612ED969832D14E43061A + 98: 8B0CAA5B47BD3A6881DD9FE3A9C617BA4229153F7825467E16E05A19E9277466DD002040B1897569F26F0C30D8C21E554DAD7A0042E9737EF217131AF8D72BE3 + 99: 2282F0F5B13224B66AAA946889F6DA0721515CC41988754B5075FBA46EAD1A54E6B641FF536CD061923505075EE872742E748C45E01E375F8278E5F9DB3499E9 +100: 6286A3E2A02236F45739BE74F1D1D83CC55C7DCA0018F852AC52B5F5ED9B3D1728FA4EB2087E87F16FBBDD64ABEF783F1953F20D06CF271B8F2FCE2A3BEB76FF +101: C8560C1F73D8F309676B71C239C06FCF16A7A8FC710C593B0F83B32606D6D7C85B66F9AD987A4C24BAD2F4A03A20DA89D5F1F0987F60FC97F40F306E221EDBEF +102: 9D6DF09DB9028FB57B45E346886FC0A6BA37D81607BF21B4C7E5EF811197E01EEFD4BE9C22E68A1B7C714F8F7924F2EA699B0E83A3C95379F7E8DD0CE20CA8B6 +103: C2204BC64DEEF9249AB2E29187E31DB863002B0AB130C1189D76D8E41F40AAB95606B1CC3955788FD6E377D438C2C88C4AECF8F2096A5C8D214863CFBAA3EF5E +104: D29281937684621D1473A7E7EDB80B7C9D80B0842E9D801B718A13B847B9EC4F17D1082E90EF5244D2DF629786D1F0F3F4ABF9C457B348D899A66D389D91D6F7 +105: 0A320F94BA79AEDE56D0574064050A247D8F2DFFFB8E00980C7A2523B879CA2E6A077B66DB538BB707372F81DA453072EA7C1972BDAA968974945058B768FF14 +106: 95A45FA111B186AEA2B9F4C20D8E50CBF008435DDEFB07CD11A87FA84D918CDDB35CEE7A9F4EC44D072369531712D0BB82996E16F81353DBA7AB5229D16FCB85 +107: E29FE5FD5CCA695A65944360C09BA2A361613C231A79A3995BFE552F3F1A6B77E34257F58EA53CEB86FE3F90FE078DCC66374886A1239DEF364D13F26A9782F8 +108: BC433FBC25C91C23829A411CE6A15BB068E7415BFBB8A6FA9C28D786DF721FE9BFBE68B04FB0EC74378F2156D1DD77C35376528FFBC2092DA00397B5BD74065F +109: 127612CE5CA9DF6918EA8BC7E9F4A2F2650E7471C9C0422E90891382F93E89F247D36348AD57CBAE703B898B846BD610E796C81BE5ACC0FD72636D46371BDA6A +110: 0381B5E3463509BFB578EF20C4ABD824EB6D7AC97A0447CE917910475AC58D2568B0EF6C1FD91EC1692F6ADE94E9D8BA82F6DCA14CF3447587F4EF627FD92DAE +111: 265CC0491A1AE6071EDB97771EE58406C0670DEC9C531DD0B44E8B7111FE51FDC6D44C3547D350E134116F9FA75D9836E6C38BC78C099A98E476A3A7CB955C8B +112: B44E1E6A3B4C597CC576754772B57904BEA0CC132520A265CFEBF27079F494073ED2520DA03B5370404AC5CD342C1253D261A60A8ECBB04F453F0C9972863004 +113: 287AC1401EF422FB02AA9CBD63D6D9B1F4CE54E468385822AEB353517A1322F04489C632891A261E9E24D4EDDFD9B603EF9E3854B8E41AC96A6B9BD7F995D04D +114: 158676AA01E5254B4F26D3C0A5D6517608EA8C237627C536268DEB7239531527BE936DD3D79140713FFFEB6131EF731281F5C76507FB09B110AE5F2E567FBF34 +115: 2A5FC3C6FBF1F885C21728A6095E7057D35750546EB26A04E3736D251177765EB40D21B7D36EC3AC2A8A4093A860D6BCA57667D8E86D0A1DB0ABE76A997826BC +116: 932C41E642771EECCB6AA135C5E14069EE073A21352AEC401688B630140E8AEF14734B748E28229B0B55B62349FB4247A910B155A0D5FFBDDCC9573A6DEA68AB +117: 3B89D3C164A814F8FB65B773E5775BD326AB6D2AE331499E8DF49EA15F8849442B916C9146B5078E8C736414DBB67062F18AE37B33320C4AE9514B294326E1B0 +118: 66997E8892D06568F993EC906F6D6F7C7186D954FD9646C9660F04358E08DA2CE47008900B38B83E8AAC014BA33C0AE6A541D26222055A8E9ADD10D41CEEDFB3 +119: DFB1AE03E491E5C637DEF10AEE4A668A35C5D3EA13E02C626F5527399FAFB1625FB93BA389813CC2D728FD6BEE207DA07847CCD13AA1A7B7DCE7FDDA30FA9AFE +120: 7A1D68CD4CC8DFDA9D181D639A2A96F15E7B8545AAF0E7EDE62865AC5352145ABD0429D54F3FB58B54D227AE70959D99F972425F606429B0BCC9F7299348BB3B +121: ACE2480F467F60566E3383091C0609A80D673BE13855C451B857E0E4C496C13074928A725C2EA59206965B5C7F834446683E17FDD1505FA3A49BC13C753CDA16 +122: E9E9986D2428A2CFA74A72836AFA3B2FECC1608E0AC9445E66E3AF8538D3385D7348B04AC1D446EB624F890018EDB59CD70FD97B245010B3DA87C1A8AF3D5DFB +123: D1D57CF31AD59B2D6EDCDF8C1B68AF68E3AAEC415C4F2FA00174D56394D71F70A276492C800B2A2D899EEAD95B849123C934188444FBB959C72C3002F2276BED +124: 1FDB3B4AD20BF1AE27DAFE88FB86FC52BE5EE12DEF74120674443672042A2B662D7560655700206737165AA866685B2633FAA5FD63DADC559AF412525527B132 +125: 4E773E49D0A95C02CBE48AA80D12C54EED596931D3E230DEECD012D623ADD3AC42F2771D14F4B4511A69EDA3A719B06B0A23C9CF15A4EDD72AD0EE3DFB453CAE +126: 9606F242AD1EA9046807BE0F95F3B3FEA36FE68A1DCADE5EB181003494F4A16D125F7A2372A45EFA4751DC676E3E67B1703FDBA3DDC457C362A7AA80D900F381 +127: 73BB20BA4987E427DB00B5D42E431B3A37232F41CA4D29591758F26E73788A3B3468EACC9415F4BCE5BA6AECDA14750080EDE3F0D1017727359D215A770F76D0 +128: 989C1995DA9D2D341F993C2E2CA695F3477075061BFBD2CDF0BE75CF7BA99FBE33D8D2C4DCC31FA89917786B883E6C9D5B02ED81B7483A4CB3EA98671588F745 +129: 4D8F28EA5211C66A28B6A0F98B34B45E9C51CA6759193FF52D10EE579D64441D9B240A40C3660F39AF600A9FD15F137C635ED13494FC26A5E27A23F04242BD3F +130: ADAB2304D128965FC499DA1D5955EEAD869A9E6B33D9CF03C02AE7A22AE277F35F45C45D9BC6297DD7EA49664EB213780C97688C3241443CD7FEA04BADD5726A +131: F4A3DB8BFEE2F2D0E5F9287137BEF902D1B78C474445CA56DFD0E8C5769AC90BD427408353BF9440901931F65FBB727A91966CEBF229233236E1203641FF06D7 +132: AA9B9D3091580D39BC893BFC28358CBEE8C9B6DD2BCE64856633E5BBB08CB9BE457DEE04F7735969B2E991555824F12AE3CD3E1553786FCF0D0A8368F4FC322D +133: DF7F2A48B2D154DE7D3ADF710CDD3D1528EBCB06371A72AE607E6E6836163B179800E1EF1BA08649ED405637C6617D6600B0AFCDFD7FD9E39A1240F45C21FF96 +134: 76DC7B65F9C314C810C75A7C7A520CA9BC750D14FB4984F982E86E4BB1E46F3DF3CE529BFA7B52366884EC66A1FB6DCDB9EC04A72D9405E0AF9FA1BDE9054A32 +135: D942DF0DF09AC042CD3B641144C98D8FDA0980BB037FC5C0E7F2E9A073B073DC4BB8A8C1F4CB5B45F5805C6523741ED0571D6779B15829B2FAA280FC60B50645 +136: AD8EDFF4F1B7AA1C63BBE49728AB9B165F7245B3D7102E6F99C261FC15D2D0BF6AFEF6A491720454A1349FBF5D848854875AC83A1156FD7F6E2A37AF26C07FB2 +137: 3F827E5D7DDBD54EA1DBA28CAE0154EB5FF8D8D973770865861B7CDF5F091040889D55C0E74B672CEAD274FAC1D4A559FD9185BE898AB8969B5E78681527660D +138: CB36F942BEB4E689E03249E1339A4C038970DA2EBEFEEC52522EAFC0673C1DC8919121D8D9D5D2C71E437FF4A6640784DC4D2CB84F8AAEFD32B9B9F2BD3D31BA +139: 9D6BBD48EE6103734BCD763BB2C2A586975DF08F1A49C59645651A6FC641A2D93A3D8E0A09A596F585DE9F700AF2BA4B0C6A7383EBAB422745E129472330481E +140: 6CC31CEAEF178C8526794C1FA47154264258731148AEB3694D443B11A59FE756E540CC662BA862D0D6745F75C542DD2614D8E27B25E0C56D0AF5CE6475BC13A6 +141: 3E92887FF9919469C7927CFC56523492ABDCFDA14D7FAD2BF1DE875FA05E2416674AE1793799B7A0703D4DA88CF67D09AC64004DC4E332ADB6B199BA6EE52479 +142: 64E5A4E32097CF9EEB8170B582503AF020076F2856D7E67C0ACB4C53C5F7FCB6BED9E330BCAAC7C9229D7875EFBE233877D5D3A43A25376EAF7804320599676E +143: EB9748309C6B70FFE82820052AD26EA99F43968D2AF359ADC804B2A76741A62EA8D710F018EA113C2259D0BD6687E3838602AE6C1DFF727AE985F059141C7217 +144: E1951B8BCB58CA75A34AF80A7A2B765CAD4257FE383A79B55BF21F180B75F6E5B08F09598851EEEA7D13486387618D6C6BF88CF23C0088A3F783F59A06D60493 + Hash: rmd128 0: CDF26213A150DC3ECB610F18F6B38B46 1: F069A435C14A8D4B02A7BBAEE02D0BC3 @@ -1603,6 +3045,268 @@ 127: 2BE8E565E24A87171F0700ECAFA3C2942C97023E 128: 7C4D36070C1E1176B2960A1B0DD2319D547CF8EB +Hash: rmd256 + 0: 02BA4C4E5F8ECD1877FC52D64D30E37A2D9774FB1E5D026380AE0168E3C5522D + 1: 1D8ACF74B1E573CD18F674A656CBB42D2775F552C1DB4E53AAD13CA11BD6C7B2 + 2: F3F828573917AC450BADC76346959631AA2F95BBD81A11385E6F5ADA37CDBA72 + 3: 5F7E44B9139D312DF5D1BB993D18C81A4F0D4F3C838CEC281FB2705BB794BCE7 + 4: 85C61A4E83F6729898C7B314D5BAFDFF52A74E56D250F93CD5897D9784BAD6B9 + 5: A991B5F7AEA42AE89AEDE9388B36ADA18197FB01191BB6FD0CC60430CC28D14B + 6: 77A1FF436C780DBAEA30FCD6AD8CC5E885F906BA6C47E063306A4F55318E08F0 + 7: 444B048799BEC6B27F4610F84B39068C07887D08D2BEB86658D697FA6BDCA072 + 8: 590094FA91A424568DA2A36A59AD6278FAB52B1D3A6DB54F15101C6561521C47 + 9: 081CB429EEE586A5343067B92717F6B5A9848C418C9B401639C46C548335A9A9 + 10: 027E1BD9B94E8574EC015D61B89DC1CA4DE0C1F5FA2766FE3AF785106F41487C + 11: 8D04CF38DD51CBACEA243750F8D070354994F7CE7BEA0453B7FF5A775882C6D0 + 12: D216F5F19DF91D8F429F3E37B24870137CA103719ACDC0C8DEC38C84E7E632F5 + 13: 9F9DD490AE25CB5DE2AA5154BAFB77BA2275769ABEA7A67DCEF35D24FE9CCD33 + 14: 9457BD492CF1818BD1ED0E19A21B01C37610F7F8EC64580B5A9957E53ADB1040 + 15: BB66CEC86F7424A681EC72BCEDEC52A2094CEA413ED3EBFCC0B294BDC698668E + 16: C7A379F7F6C0A7E6CDB840659061DF3C16323979FC562D82455B56AEEB6EA300 + 17: 4E602340A2910B6CEE248D90574182184BE342097CF009C9D628197A8EA140C1 + 18: 0D1398C0B19C77C052E867F6E7CF807097466FF2510CDF113DF512DBED51D062 + 19: FD6D66506EAF6FCF8E2099B2933AB66E44508E7801BBCCEFE56FF5AF981AACA1 + 20: 97D651CDF20DB8AEC9C1521FECFC05E4B0F889FA9EB66EF1A871A5AE808C19C9 + 21: 6408DC8B2ADD72618AA428F75263E71B154544F67E760CF60AC55E4DD0D6F2D6 + 22: 911189A4A9AE158CE040BB42D943AE34446146ED6193110E7B1142D164BEAD80 + 23: D3C083CA2E210C4C2724597F32FA7B3DA19CA65C9871D683C4901C671EE1C642 + 24: 9A615D37A2D1371F556381FA0485DF637C22EEA2837F25477BB177D9DE869118 + 25: D910ECFF8056B3E394CBCF0B645B3008AAE92CCD547FA44A519CBF920D403B7F + 26: 1A87170F5A18669EB41E69CAB585FA327B1CAA37300C5CA78F5E39C51627C402 + 27: 4D12DDC6142978448CD7B5381BFD8FDC847AD1E80510C3115BF13BBC6603CAB1 + 28: 22ADE8ECB7F3CB38A902FEAEF0BEC86842D87AB8239A366C992D3A528518B48B + 29: 9F44A733B43134FB6414E974B5CFA51F030AE7E3D88FA87811FCBA68963DE6DD + 30: 220E600CE4D7B7B6E55942503A92A5BB5A465089FF714FC2396844D8F82D9DEE + 31: 66452A4168710FDB3324159BCD216621D68C8226A2C72EF532D99AA32F3510BB + 32: 0961108443DB15095E5B77B907A71152171A1A38DE987F48FB692B63E6F8366A + 33: F03CE07C4A208AEB939C525756898ECF0112931B941DFB9D10DB9CF1677016DD + 34: 4F5237018B528C16E7E3557B5DAB9C0B2CF9ECF2AB5D4AFC7364034096EA1EAD + 35: 31DE8243507EE06F570517D356BBA08144519FF02BC192ED6C5B72BEE636D242 + 36: DFBF28278232BF83ECF5655B3A98A295606B36D50623D87309A9E41F38F07DC8 + 37: A672BF18447A7B38A8070D81E20137D17D1B6F12EF7807EC2B502F26B2FDFD88 + 38: 08BA1B06319AF152118617949424DD56D8A5B25B3CD548762C885BF3F0B5B804 + 39: 4414D6FD839FA2F59B7191CEC9D64C638C4FFA68B5ACE58397BF9F5E03452D1E + 40: DC4689B0403652290006DC4616A2CD910C9D0CCBC9C3FDED752EDDD5E8B30CAC + 41: 65E220527C2E30668BE29950094D32958526FE61282719E755B77A9D0964F62D + 42: 1D9C633609BD66C9D79BD6D15F92A855389F2AC86746521E867D4CEC477FD8D4 + 43: BB1580974F0DFC2C43DD5AC6574476247AFC77C7659619D3ACCBF82F7B02DA67 + 44: 20EA480E09BF0DB5005719FAC0D6418704E94F8A36DC5D035FD0B0F33B1EC31A + 45: 430FE91156DD28552E37F2608CFF0EB966C6320EB402FE4BDE0EC10F280FC9FD + 46: A83A95DAFE6FE47DBD1AE9A730D62D791853A66EDECE3CD3A5D79D5EA2E852CC + 47: 94EC24274FA110FBE2FBF01EE05B6A41F7FDABB284D422DF0AD97B8878544DE8 + 48: 5A311B318E82E776228D5A31306647AE14658499B6B1F678AC68D6AC7A794C79 + 49: EECD9C706520AF15E960CCD22513F985861A7243A7DC93106E968652ACE5E577 + 50: B1841ACE57E67FEEE2E0B6EF269074B367FD65944C9A05F4637C7D44503EF88D + 51: 2D6B88A5FF09116C87CDE17BE3AEAF6A587474089EF1034298DC6BE800320FAF + 52: ADCE72E8A1066B4C73CF42431EE141B611682528A7730ACEDE6503D3FF3AE0A8 + 53: 8A8C37E1747D1BC9EFF92EF59FAA6B734C62EB78C2B3DB43F93CD97F8BE41887 + 54: 816617922335B1E5C12B92954B0463ACE6F5537B2033C9A51F0359A137849689 + 55: A7E0D9BFB62FB1E4A88F127F0664CE655B363DF17910783643A5F790EBA43F1B + 56: F961DBA8C62FA522B19FB6A376D2E2D3071E8C71E899708E4763879A369A1186 + 57: A8E7CD5B63463A2E58382B76D0D3E0188EA0D3D1AAC5965ECA6B2C746D751B59 + 58: 98FAE21943227464F26767A74F725FB35DD81E599D8B34625770A140497F9B27 + 59: 550DADC0C1FAB6C6F1F304BAAF9A43AC3C3E7A713FA5AC413556278DD91196D5 + 60: 1092B070AC7D87C2E373B34C93EC3FC58DAC222A19CE62F5F2EAC8E0F374915F + 61: DA8D53A8D17E1D4EA20EAC427E1F0BC3E3D71ADE1E15D1FE8862F2EB41CE499A + 62: 029247B7BF14EA7816155149753FB10DE170A22A050B91A03C1321827BDA1629 + 63: 0162A083B666069A0FAD1C3336B994D72026E8AB433045523366BCA9CE07325C + 64: F4FFF1BBD2086BBE13A46A8F281CBCC725D882BB783A8B2FBADE2EC969D4343D + 65: 0A8E1887EE60CD0DE01C34BE1B0C3ACB93C2A4BEC05CCF2F8117CA58C5E087C5 + 66: 90739857F831403806F7330808859E0DF94EDB2741ECD0F0171A35C6AD94F4CD + 67: 91C2AAFCAE4A8B23BAE0CE181286441BD1CEC4472DF6A53EC2BD7DDC6FA1B2C0 + 68: BB0BAA63AE67E84CB1F055D412AFFA0E8211046F0D759EAB05A706BD1CC5E604 + 69: FCC28D2003B96A3C07A70FF6B2C0C4D4390E0DB493F6D832069E73844C8FB750 + 70: 9A37D338881200153A65CB5308FB12D3A576C465A37A68173E7624121CFE4D9F + 71: F56AF9784668814B6B4326B013F7BC69A68C63A3998134B227D88EA0434C7D0B + 72: D741060526894DBFD6B79B705CAE79A2A219C934393D0499CCD3FF53B5C11FD2 + 73: 2EA96E5A9F0EB649325922072BE2555DEA2B0044D425777347D0ED1E146CF332 + 74: 7864EE22092803D666BF2458E0E2A1CDA24B60E57341B0816FD66374F2AD16D9 + 75: 50A0D061EAE67B68CA787319D60F7239728331D8644D9365B883B29DEE474E13 + 76: D73F80BBE9587C1E345BB11CF92374753B36471A39F5EFD64AABCDD0DB8222B6 + 77: 1091B151A973BA2C8D34CC05F826721ECE522EAD452569EB65EF9B7BEA530959 + 78: 635E1E849CA811275F2800E224A7702424BF219EFA77A3CCE720136E485C8B81 + 79: 51EE28464F294096221B0E3F4B7B9712A5354C4922737BCF1223DFB596D09549 + 80: 41CD03FB9EEB650CE9FC69DA04577DA1DCB81EBBA33F60A665A49FD1C2C0FD89 + 81: 7FB09C813FC022E082D9A83B4E998DA4934C64F50F0BDCD94A877DA6D4BD0655 + 82: 4CDE469AAC8792070C5C487AB3179C4C15304EF467CE24EDF5AA38DA592A9328 + 83: CA603B9165734CA8447E62D7EB813E0F1B15BCA80EB9F377BC945C20CC80197F + 84: AAE4396316AFAA2AD67468DB5471A6C20082A6162E0B91D28C5A3EFF80C15C78 + 85: 215BF71CF7FC1CC55D625727F8988576692840536D0394DF5636BD5268213919 + 86: D3F6447DC4C7E7873C017BF395327278B91C4A0F2087842921CB91C40B949C42 + 87: 59FEEDF8C57A70CD074EC8CED25059AE7E540C89F777F761A427BE4A34F99664 + 88: A789680F986CB3DAB6ABB403B9697F202AF4346EE70F0C12A7BA5A74EB42DE5D + 89: FD3335E382AA232FE743E0922A2C0A9B3203C2F5A9B2FE1B9AE54F99D9602EE9 + 90: C37B4817A90A2F72F3CFB2B76007304D954C56ABB95A8C8D8446AFD330E5CEC8 + 91: 8CC0EA382E5EBE80CB390C49DA953B8334684D2BA84D80DAF20E33A0C6A566F8 + 92: 25B5D534BA632BBD1B30416163DC1BBB3F2E3B67B823D0E98F1C975A3DAF01BB + 93: 0978AD3D43E754145B69EF750F6F7E824181A3E6383F975D3496EF66FA75F416 + 94: 263BB5B3084B1091A0E645E18AC1308AF7F62BB2B6E653A862598BC6948BDDC3 + 95: 3A930BB5919F12303BF381B59D104E928CAA96B99F8A78803B465A53EC3A3389 + 96: 2723841C4FCCAF40C397D1833FACB5927B96C8AE6C09A699913A29604725E9D6 + 97: 09679C9CDBCB196456D8FE1792CB65F5544E6575EC2B8E073C89C0D8D744B498 + 98: CEC63D082A50A7C81AFB946E87770ABF0E4C38D184F78E1003641ED0815DAA55 + 99: 671A3D948B0BE9BED110B2565E57DC126572AC82AE7DCFB65BF1B51349822E59 +100: C9DB0D4CCE88093A0809F61C6013EE42429461CCFD713CD0C66053F07294B26A +101: 54FD082DE3F67D3C04565644F169615999A2D69CF8DDF1BCBE6D8EC8A41DBD04 +102: A60C2EB5A44D7F0CBBB1120EC9299D130EBD6D635EC7A2C5B37AB15C058BFEB0 +103: 28050EB0E18F339F1B4E9F1F8A5284B4A0B2844D7518AE193CCE4B87A7000B7D +104: BE27C28206567C3ABE4D6F7D852BA0709707F5CA4BA0A3B01D11A051CF5B3615 +105: 120B73D6BC62FC2572269BA7325FD136EE5249CF073195413CE34F2A512A2AB9 +106: 7C5F4EDF9358098AFA928CB67FCB32C01ACB87B59DD522F6418A1E2181C5C97D +107: 90CAB395134B7B03A1202B3547D1D478F3FBE503D844E16566729AE29F11FD1B +108: 50D2C02A061A1A192E3EEB3B0BC24BB6EA7AA9580B2AE060C32989E81BC16FA9 +109: 61A147DBADD4FCDDFA52935E703EF0C6ECA883CC9D1E328CC72C30D375920927 +110: 498FE79B7F5DAA6C8C53A84E502E6B685A20AFF7F455B1D5D0090FBE28C830F9 +111: E625994E6ABECACE3D83E27E2979BCF696C3BDD761A7EAF33754EB9023A7113A +112: 7AB2DB3A9F6448FE0E4F2CF9BB5CE8CDEEF9EE52CB6A471286B6F89EB155C3BB +113: 62C2C2C5F240211DB4841A7500FE05B6DDA262E0DE2C75CDAFC7E95EA29DAF44 +114: 743A3B50D63DA1440A172DF952C23FA0FEC9A9AE208581B1AA6478B8F5D90C11 +115: 471617F452E5FEFEDBB2C86E60772D5BB68725E7317E416F312D9ADB1D5EE842 +116: 7B834E0663064F049AFF80C221221D400FA42C30DBBC2E3044DA31E86B9AE032 +117: 40DD593D41BB4B546D51DF3DDE0FC6CD2B2BD233C88562A05D1912519D7F0E78 +118: 08063E168FDA50E7F4AC535C9637CCAFA048518D41D10887EB0FB0C8AA8F0ED7 +119: 7D0B85895BB085F9E1C28B0BFE63683E57CBE1EE98F6A9F439542940AE91EF82 +120: 1842A9925914E3C2D799DEADF6BAA3A8BF3ED139954FAAE0E399F54F3429E6D4 +121: 254AF4A1815E6FB33D52554988A0E3F534B029155DA84A8E6F58D14B3CD56FEC +122: D4A7E0BE95FB6D084A552217E50812CC0318478CD70F7CB45A48C00A5C9EEEFC +123: D481D7F2543050CEEE34CD048938503463993719586792434F5D12E8EDD92456 +124: EE1D0F8F574EF0131DEA4AA39416FBFF031F461E7FAB8250D5DF8E4091375063 +125: 44232B4083D59327E587BA035F690FE6A8C76AC098E747E2463D0DB446C1E11F +126: FD3A67059C103328CBA0AEDA33FBBBF717AD5B3A328AAA1A76AA1120FC7B85DC +127: 9A2F5D8C138EBB3B420EF4F98A2DF1E8C65488C6AB842023C9B53A7A13D6ABF7 +128: CDBB22E28AE05A82CA0E4AEA774DF5932443CE9A4C76D05B5171FF9FE4092FB1 + +Hash: rmd320 + 0: 22D65D5661536CDC75C1FDF5C6DE7B41B9F27325EBC61E8557177D705A0EC880151C3A32A00899B8 + 1: D15DF650542C206F970C18117BC74E041E89697493726DA37A6F3F0FB3DAD8728D00FB27F0A84D52 + 2: 9571FD2B984A5BC36B4000DC8114AB76C8EEAAB8A091F2AC14A0201AD02D8FD0DA714EF47AB5DD94 + 3: EE9966717FB23EE89758E0B4038840161C7AB7A88D876058712231F4F810B945BBF5B5B9D3B3A1E2 + 4: 849C84A4355CF2F9D64D28B57ED754068A16F9573B3012D982143E916D1607E2EEA28939AB77E37C + 5: 5A94801E82D72AED7E836D10EA1B65448347E9591D4FA217797972F337DDD3067D55A60D56136A18 + 6: 28F83FBF908DE50967A51A4E074C5D80ADD2AFD54DF75653CB6A11FE77E885FF871EE4C854DA201D + 7: CF5842C46723387FC1DCE1A77AD1F7D8A875A3D1BA453820BDDE30930E3151D341E50556D8756853 + 8: 7087CCEA4A4CED84B48E5477C5048833767D55264BF859D8883E1ACCDD60750BD07A21DC8ECCD246 + 9: 7C2ECCDC632D902330B78467008F19C2F16D0FA60B27713A5CBC2688838107874EA68465453B1F16 + 10: 12AD7F5DAA2099A980DD9DBC5970235C25C3D1381EF0A85D79FC0358C5AE9942BB8BE4B0D03C2A90 + 11: DC3477B69D2797AF620A21C8436F42EBC1D79008E2C7DD581588AA9E3D5FAFDAA3384702DA10EE67 + 12: 5FC1E422DD5D5A86883F3402EF706F4195D25861C3133E6F242C765F0DA67FD9ABB423FDAD60AF45 + 13: 3C26026E3E873CF80F3E2962656CA15F7E4E269D7FCDDE6FBF01A447E68D87DF0B22CEBB55F924BF + 14: 5BC3C7E2B201783DEF03CB4063464A299569B0EF84A8FF99A23F305E659856FBFA96078D1B083A3A + 15: 21CBE4305CB6C2EC8F952BF4A46D1C403D21F3CD43C97CC60C799EE4B7A85586AEEFF906A9B0370A + 16: 006B6C4529FBDE25A4F4A3AF5FB78825BA02C6C2E56558A5685F48BDBED9365AE7CCAD528BF8DE31 + 17: 473B8F7641056D324C2C73698E2176B5D8E65E8C58D2F30E2A9F84E8896AC5A65B6292197FF3A938 + 18: 7F058B60F44F9A7F5360557EBE887CC8C3BD1A7395BA08736A8DB6FDA66D4EE84D14466861245AD0 + 19: C2F30D08093FC48571BD09DC6B1A2201760E11A30CC680DB49A34AE081DC036D4E56D364F85ED0FA + 20: 41713664A255F0B7156E679EE476665DE0DC05D52A6E2A14A66FA3DEEE5B36BC6CF4D6D6BE688F1F + 21: 953069C5FA9C7A4E0F7554FA33AFB943774144562EF3E9533E6122BD4FAC02188020F5B2C3049F06 + 22: BD069BA97BF14702CCD6175AFD685D0D5D811EBAE7FBF2D6B0840916E1DE278489165825D784FA29 + 23: D656C4AFF568971D09313C2EE38365986649093CB2F97523BE008677098933880A4C082F365EFC86 + 24: DE1B0B3A42710EAB3FD6111D24D5C425F47E38737D647BB7A6DD01E4D0909FD9D65876DF7B476DF0 + 25: 843F522FB630B5C69295746907E6F62105EF1897F1E833909CFAB1443BC2453D42E332DD0A792EB9 + 26: 22D6C4B5DA1EAE94258FFAA4FF919EDE1B1C78156F79009241A8D4072ECC193A299B228F0EF65CC0 + 27: DCE0CD9F9F86CA9D1768B6D82C46F5CF5A9CA3DD06B9CF423443D6A5B65DD76A20C3565F4D90688E + 28: D63452D7A5D2F4C997C71BC1C3DDD7CF1EA1C2942A67939A14B6012E77D6A44C4754FD104737C32A + 29: 5F7F890560B601ECED41AF54CD070B6BFEFA48483CCFFBA224D467D8420422FB1B732A5A4C30D902 + 30: 520B822D935CA48E80307D17C5C1B63F3074A9732251B8A52158F8BEE8CE8804EA611D3385ECE604 + 31: 746AB0B6625CCCD9F9F2770A7F5AA79DF5C0B00222122C5CE341D51E0341F9F10633A6BA3192CCD5 + 32: 164422906D6B607E562C23DD26A51DC2359A8AC9A97E2B90554417971E0B512659423A6239C72958 + 33: 9E7CDB5A2F9622AA49B04F6246AB486F324D175DF993CA048FDB05AB5EDF02F9F185F110BE2A90EC + 34: ABC057543ACCE8B001B06729D6149B1A74C635FAE0935ECA260DF910570BA94853517DC7E824BF6B + 35: 9A95F9664803DB3A898BC783376C03E96B5178E649CF467A0119CA8B89093566924E58CF3AD8BBC2 + 36: 772B1827AD20991D649688FF4F44FB551B2985F0E3B24DB243856A6389B56741C9C1FF2DDC4A7AC8 + 37: AFF7C444FB955F20EB094DD44AF2E1E0E85D903ADB872CCEA43D975108C3816BF528B7F4E069F5FC + 38: FFB8124321A8296B9CE714DE88AB623D61A284B6053926209FDE0EBB015F6995036A6A2B5D0BEB05 + 39: 2FF330120122CCEBA3D520DE3DCFDB60E514F6361C7C768B6FBE49FFD0D836D2E2793E9EA268FCE5 + 40: 72794B555A99BA139DA8034F6D159A3B3FCCFD65D70335778853AB803432EB28711B3EF8FF6F7978 + 41: 7B7956BC244501F15C1AA6CE66FAB61CFB2A0CE674C5534B964209889ADD73B637DC5D4934F06547 + 42: 595FF7EB667277D6CAE46F87D9903A978EBEC466E03A4A42215A46100964ADAF95546FF9D7A7A6B7 + 43: 653C057A495EFA2895FC74A79C6726132BDB8A5D3842F6768CC9918108CE5A5FB2C5982C90346141 + 44: DD880C0F514B3C5EBEB7DA070804D31C52F5EF47558FDEDE9B416828D5990C12FFC436F0407F52E5 + 45: 8E802DFC8821965F611B2BD3995EBB6D88D758804E785F933082BAB5A217EE21ECF7D0BF25D080A5 + 46: 11E49D104BF0A76A912FE1EB92CE5A87BEEBA1DDB606207C9C11F6749CDA1E378CE4D2B87EA90A6D + 47: 7189DFC591B0F89C5C947F752FF91C4C0BA40E8E1A12EA58E82DCF1C3222DF34D4617D281496C0FE + 48: 96083047284B452EE0C3E68FA169CABFCE4CD6B29D5773FD8ABEF6D3CA8F9B47032AD11F08384EB3 + 49: 27646497C0E50D41474FFE6871B3C5391420B7B753FA97BC606A770343BFB758B927329B1B950136 + 50: 9C74209F16B73DE0F9EFC3E0D29B58E3B97871807AF3FCE5F9954BCF083BE09FAB615368ED48C888 + 51: 0D44E094F2A99854C86BB1008BDFD2BF66B7A608C2FD62AFC2078B638D83F8AEEE4216C05A587B10 + 52: 979725BBC062B011B6751B68F21AB22BB0F8BF1DF10FD6D1E239B55FFA8B1D29EF5C33F193DD846E + 53: 1661FD3D05468A4A2270DF667AFF347EF8F98C38A61B2DFC482563C09FB5E789697E4A5834444971 + 54: 7B67035C8D55CFC6F0A82CE2000EA51AEC95EBC94149AF23B86BE465A0D9256CAE24FC983F60B315 + 55: D5383387F99FEF6732967302F2AFF4B8F694B43235768E151BFDA508D6170133EE44C4D1BF19D1FF + 56: A092A11FB22676778C6720BA1539B3EF72F7E25B1E75AAD307CE3D1A1FBC9962D95D1B6E8BD19148 + 57: D36B21E8609F2EE9067EE719FDE8CEBE8C23C026C133AA1831DF87F3974B6C79CC1318794B5D8360 + 58: A020799E188BE3E788AC671D338F124CBCF1A9E3FC855EB69DC0769E114C6F38DD5602A3AE0E6751 + 59: 7C0A6943329F210EF9DD005D36AC330261B6D5D01ECD0950D195219DE2137B6E67BCDD8EFFF8EF2B + 60: AC849447899C070133FD84BD9FD0755464A0CA543B20C0A8CA6E5B1EBCA0EB2F155F5CEB9B0D37D2 + 61: D692FD2DAA2A162C3EB09AAFF9A1BDBC2A9A37F39D3BD1E53927948EFF0CCF945B89EE6BB40A82E8 + 62: 35C531330A8889051467B9D9892B7A964350EF59B14301905E6C645971253BE3173845CD770559BA + 63: C8E2F8B3B8CD1127152218237982F72F4C930CE663A232231CF7A83D1F833843BE5966AEB40252C4 + 64: 8DA29DE9049DF2855CF8F26594C03275B9A216CCA012A8245818BB63B0EE6E4AB2DC069B393270CF + 65: 389AFAF1F9B4616A4FD9269A9500AB82C3B65D26546A2D6D10DE741351F96761A4337012BC2844C7 + 66: A9589DB6937A5F1F8F5BE81299F57019D06F7754079C8E7DC3E2A45AD265AF5349930282DFDA5DDE + 67: 989CF19EFFA226DC8EEC1E3EDB1A9F0436414D77CA5F4508B98378A9EEAFDFB562B54D24D55796CD + 68: 2F48B7C774572D9E2FD21AA1DF9C575F6BBF68FAB12505FC38D2B5C47289FEAC9F6D595A10024349 + 69: 48C7A6904D11F412517131C718B0D32A6DFCF05308C17802D44847C8B81778FBF67946FF4F551E64 + 70: 4E9962FBBA06B56FE8CA0CAACAA144CE1BBE30B7ABE0917A268C9D86E59042A2A343DFA8624D6757 + 71: 5B573A2AAC688FCFDE4408F647DD4965C402FCC82784C822262D15F69599D94F86DCCF42054A2886 + 72: F0A0F0D04052B3429592823CFFC713137E0833B9E776D9143213200209C214FA4E5F700B2C77889C + 73: 52F471056DD15F895C07186055791D6E688644BE41E8470DEC1F4D1BBE741D08C12BC7DFF0766E7D + 74: D1EFD8F68D3F2954C8935CE0C04F6F428DDD79A39D5B7A86C7900D21D139F20FD9AFA1B2943ABA9D + 75: 76E2F2A2BBE58D7B26E358214C8B244843F7DFC1A2C413F8F06B0ADA18D7F54E3A59F577C742EE18 + 76: 197E2B2BDC7F9DA53AC2256A8A74CD132847A3631084F4D6E95991E83B6091C0384F0AC9345DBB97 + 77: C788B723815260FE8040EADDC011B9458835942D9A9F92FC0C3BC936AE60C8EC77D9B6471DB6184F + 78: 70741225CE46A008A59CC695D9A4835689A446F378AC72611CC0344468C788752E03EEAD7D467337 + 79: 354D7204D60332E3CEBE5EAABD63E850054847F579E6175FA54EA4FC97839266034A161DB9CB0DC9 + 80: D1860BBED9848936E7AF61512FD38FE2DE3BEF4D827E18B1338C0F7EFF526C0004C5C5387C851F8F + 81: C1C866DE0D4AFC09CBBA4045089BB6D3CB914800A7F123089D9DBF29B891DDE99F170A86D2D6CB29 + 82: 751DF91EA356622D934A7E577EEBC076F97B3C82B517C20F5FEADE2679CE41C8F3BC23C659CC3D16 + 83: 2B1BB63A71808AA22C935BF7259DC253AD475239CFD072D9484CDB46541E38C7468E223E465A974C + 84: 0F05A15A2928F2E5C179C0BDC48501ECA8409440D78979A06BF6F5AF345D3D2364A4212CCFF7FA44 + 85: F1B9FB2C7E1597A57E80F7E072BE3ABA785D44EA19E5AA687B8C953C1BF62945454E15138F7E6371 + 86: 4DDDFCAA087E7747462CFE5633DDCBBEA6762F8E5755DD8384C2028070FA73960097B106CF21B12A + 87: 8E2E498EB086D591A8A1F0ED7A8192BDE00F3DF59B1DF842F3D122454F081B02A6673D937EDB5D59 + 88: 9911573F54CF6D10996AC34E5ABFC0E4B198D7B20ECCD07261665B70BD1F26B1142DB089584BFD95 + 89: CA46D0B9EEC92CBB97FFB9C358284CD79CD7C5BB1323804CDA6FE1053724DE0A1E260C9BC2201957 + 90: BB58BCEE9C19A05239237D482A9441C5D3B4F20C73F8C052AC0C86506F17534938E1F5A98E4174EA + 91: 3089F3A1C0CC73E2B31FF5F0168F78275386F9BA794D17F90DAD9055E328EBB1E2CD711F2519FA69 + 92: 6669BD24D20CFD12E8B26CDF567024513F02E6EDD5CC1FBFED6CA2C4C16A364F47B820917A39F8FE + 93: F94A8DBE7246CEEB1495764D4F029D018A1F59370A5107791A729E4C6E0D0EEEC66B96CA8CDF1EEA + 94: 857E4DAFBF430CB3183F9735700C1B7F44CCB76196E269C749AA1F39634A0EFD626F465CB4F8CB24 + 95: 250FB59132DC632527BE41D334FDC6E25C90254405FE46E3FB80C9DACFDCED35AF28FE0E62630B79 + 96: 8001B80CB6C9E446830FAABEA5F8A7CA47554FFC921DE56E7D0C3315CD14BEEF5CF1770F06A5F95F + 97: CAD6EDA223A5779FCE361EFE0666305326327BC3246AE2A7068475D67D4950B39D379F5B6B9251F2 + 98: 07BFC31731F8F076AE65894115F88204CB51C3D79C67F2699B439E2FBF133F2D0977DBEDC10363F0 + 99: 69C2279628C29A7930573D58C3C6E81714F04231316616B58104E1ACD57C038A992039111392108C +100: 558684FE7E011378CE133B7C17231B73F54CDB33D77B93668BB9994BDFEBB92D96AC84CB4CB6EB3E +101: 77FF6744C4FFBE4D4144E732850FE27BE7BB0BCCBE72B970BF38B7AF5D7FE40E0B12C1CB8E5DE42A +102: AB7ADC40BA0F9E02BBC83D933AEAA964FACF93D7AE29AA4923BC7221A8A7613CD3CC688BED4393B0 +103: EB7BE1B8110E23CD725886A7D9B8995158B166600E4440DCECFDE15A0EE426947AFCCF6CB029F1A7 +104: B45A685ABB285D8E29B471E07CFA7674420175843F4D0142D8B9A0E7664AA8B3E3D63896F8270D16 +105: E931F6602A3957C3033D243D7DAE2871F1B92698426836F4D3D06EB246B880F50CA25EE2328A6810 +106: 86DC16B09A768560DD2D985286BCE2AA9D8721397064F5521DA60746E46231AEE50C4FD7B2E6F04B +107: 9B30C031660007BCBDC3ABB3C10D063D90307DDCAE853972DDE47FBB6A4F320F5F1EDD040713C73B +108: 488F5EFC7B0A09965D1689E3456475A0B90B647FDFE38D609384BFF01D46B6C169B75F4DCF74B316 +109: E2FF3FD214B03BE527DA2CDA8F0B67D14D47F6A08FE309690A7F3E705EC26D497EC23BEDE64CA76C +110: 30606CA65C5484567BD569230183A77679B085B438BABA9A59C00888D43249161D836B870486A143 +111: 90278C79CF7129EC87620C6A1E1CEFF81361B9FF7234F1202C3CF9903E3842A09A511E27639BF037 +112: A67689A579055F4BAEC45289F5F7C2A8236196F241A84EF721A2B8FE3F7AABED17A50754A3791813 +113: B1A74D37FC23A5B0CDD60E153D988227AEFD32F2CBDE72BAA40FDB1492BA01947D607D11AADC16B1 +114: 4DF43237C8D10DC4CF90E7987059F4D77637286F8F26FE16B95A004F842FCFBD03BB667F88BE10E0 +115: BD5F268BDE9707B085E73975576BA07A71722B5EDB2CC4F7BC16C75E94CA239497161512E52E6FEA +116: 777B474F4DC1E7E7181363299506DAD103EB625F758AF9602DC5761DE3E5A4CD93D8E245BC59655F +117: E4BE803DE4CBC3CCCB32761C0BF51B4048E8326C6F2610F347AC7D6CEA89273FAF613396341A662C +118: C0F07D8589EB941D78D3B07F270905CCD19A62040C2DD5B5172187D0F6E4B919089667CAC24AD57E +119: 99DA1F25A48709E3051C52CCB417FCEADACB3B2742583E95B0BEC05E651D4F59D8169206B45A0F15 +120: A368B02B9D6ED249290CF6BCB225F6636D4E226B472F07C80B39416AD30FCB84EBD45178B95A2DEC +121: 53BF8DDAECD3022222369ED66C20B1A1C6739556DC4874A0DCE63C2818817E09D9F611031ECC4769 +122: 9EBE33A767738B7DE55A0193FEA6C76C718EA9B3D4FCBADEA37DDE743D052D1C1B2991DD7DB8B57A +123: 38FFAE3C7C07F168887997BA0AC8AAE8FE9F5CB14A87A8FEABC4642FAA5323DF94CF73A962C8AAC5 +124: 13DEBFCAE09B0FF90DA06B49D6330813AA487C606D00D3161C8283CB62A661DADABF2CA5CA4E7230 +125: ABCD79732983370AD0E130D3BE29BF19548F57CB744A4B8D3F2BBE295930DBBC484EA45FA7DC99A0 +126: D2CF766816B1592D91D66FEED7FA9D5FEDD93EC85ECAC455EE0CC1413DCB53B2A6F5D6A7BFBBF26A +127: 78E78895B7E5AFD95D4FCAEB84F89F04FBF83B51FEE8C1F7B342BE0096DC010A1748F60B57839AC6 +128: 05E40364D0466B7C46755EB198F02BFF8F4F1D584AFC27B900654A528454CF692E2792CBAB60CF8D + Hash: whirlpool 0: 19FA61D75522A4669B44E39C1D2E1726C530232130D407F89AFEE0964997F7A73E83BE698B288FEBCF88E3E03C4F0757EA8964E59B63D93708B138CC42A66EB3 1: 4D9444C212955963D425A410176FCCFB74161E6839692B4C11FDE2ED6EB559EFE0560C39A7B61D5A8BCABD6817A3135AF80F342A4942CCAAE745ABDDFB6AFED0 @@ -1734,6 +3438,1566 @@ 127: 3C9A7F387B7104DF19CF264B0B5821B2E46E44ADC79262546E98FFA113EB3D45799EAC78CCA4643C937FCC3C1D249A212FACB34C63D45EEC81069095D7CDCE7B 128: 803A3B37C89E84FBBEC75BEE3D00DD728FFC4246B5A5E989DC8DC2CD0F7937966AB78C79E1D4648EE6EB40F3D70491CB46B8AB42E155672E2AB8374FCF70DD79 +Hash: blake2s-128 + 0: 64550D6FFE2C0A01A14ABA1EADE0200C + 1: 9F31F3EC588C6064A8E1F9051AEAB90A + 2: F52B4FC6BE5AC0FE16B72622653EB56F + 3: C41561EDB251DF8F3C9523524D60A707 + 4: 51725A57BE12698E2E0D7E98910780A0 + 5: CC08C41EAFF7842C4D0FA1C64E45F1FB + 6: 2C00C87B2FF353A0C365D857F6D4F3C5 + 7: 46F26ED5863A347052CCDDCB71266D6D + 8: 873AD9CE57FB6D239970A38E0D92CD8E + 9: B044DBE06680312DB797F66F8F27165B + 10: 33B42203E0347DDA0524EEF98C549520 + 11: 1A717B76A9D588DF20A139FEB8700A7C + 12: 24375C055F615A9C0DC0EFF1311A5793 + 13: 59C26B0674069026C8FC5E40430AA282 + 14: 823CF141A111D66024B4C82AC33215D7 + 15: 7CFFAEFB9840EAC8962A67CF944D1F72 + 16: DC6772000E3E9567BCFBC92971D67816 + 17: 4398E7D6EF08141A842C26156A9A8A48 + 18: 43819E64E9B7F6CC8472C1B6B68EA581 + 19: 447BB325970AF8FD500ACA7C176ADEBC + 20: F7E75644ACEFDDC9D0547C3CE3FE3F6B + 21: F5D21AAE342B3505373AD3EC5780B447 + 22: 4100572CECDC30AEE55FD5F53BF62A21 + 23: A25F936F82C608D74A4ABC84EF708BFF + 24: 2CCB218B584B721C60607A1B9C4E9F33 + 25: 0072DEF78710F1590F26620AE20DE4C7 + 26: AB0E6C1DCBDB90C92156AA02B36F9A51 + 27: 132362DCA6248CF3D6FB6FCBFDCB4B86 + 28: 193A98A19AFC803105AB43F206F8CAFC + 29: A6C088A5D8142C015770224B3A072DE2 + 30: 25B136277F00BB182E4BB0BCC4200181 + 31: 5B7D0CCBF06C4CA454BE26866C513CEC + 32: 68B96E07FA73966CCEFD87CCAD489984 + 33: 45149912910D47C800FF4E81B0950222 + 34: 651C7F67076CB90849DB32EAE2F79D3A + 35: 9C593BA0329E86C74AE579A6DB7293F9 + 36: 61B1EC51D5066BEBB9D998B9958B363F + 37: 84E835F9A85374098C79FF250F66A7E5 + 38: 6E638958112E8D6214F8DCB9C8282D64 + 39: 02F4BF9AEC321B31762C78D925BCED17 + 40: FC80DE93148DE2CA60A05A8F37C477FC + 41: E38ACF89451884610D983EC19FD57087 + 42: DABACBE6DC653B782B05E5CBBB937413 + 43: FD86FB2467D49C061DFEB1D8E9EAC01B + 44: 07A6516B3A9776542D2309E8497D92C0 + 45: 50BF654DA910A62D1DE7D5D99ED62292 + 46: C66BB047226FE0A8CFD0E66248E950DA + 47: C7C4DBFDF0C3F654396C51688246D95F + 48: 8D9BCFB54B78C2B087C363C2C56225B2 + 49: 425BCD6D6BF3266FDCEC5D98AA85E09A + 50: 5D8355BD197259C37FE9DC2CDD182E85 + 51: BC0EA42B5670AE36052A12A26B109729 + 52: E410D3852089501841E25C84EA73200D + 53: C03EFEEA95B308DB60676C352788819E + 54: 3EE75BA9D3B2D38F2A8DFBA57E28C228 + 55: CE44DC306DFF56ED00A657FB7B25D20C + 56: 081B0E61DBE0EA09128BF93BA7ED8EDC + 57: 3E1338B231B4539CED2D544EA4E36EF8 + 58: 9ACD12EE98341CD766DC19DB927B42C0 + 59: F9DEB66F1A5099D99FFA93D1F3B36990 + 60: 9C9B2E4E368FED54222FBCF50E9DCCE7 + 61: 4349C4260FB9E6E0902EA098502F293D + 62: FCFBE4782A28AF1AFB5DAEFA9599438D + 63: 4006430A2D313751A9ECE24FCCB52DE5 + 64: DC66CA8F03865801B0FFE06ED8A1A90E + 65: 399D3E92CCFCEDCDDE9BF4C2BE14CF8C + 66: 38C73D61E72531B3AC0CDCF871C7DC8A + 67: 8A085A96DE26DE17BA55CC7476F16660 + 68: 12C7C53778F67388EB23191C74283EA8 + 69: 5D441FC807AE9884C83F49C525FED6F0 + 70: 31690A560023F81B096FF943A9838AE9 + 71: 55AF48053A29C3EC6D5B8633F42F0500 + 72: 7181837F0225C7ACB3ACBBAAB1CC6FAF + 73: B1492F0BA13EED356AE769E193B5C967 + 74: 48425DED4E98B96B4A21F8DF8ACF7CE6 + 75: 56C366C91B0994E7DCE0CFCAF1AD2E35 + 76: D85FA654A309770440100767AEB1B225 + 77: 9F21184BF396A5F3ACA9B26DD1433941 + 78: 1ECE3C33C566EA55C5E0D570A48D4722 + 79: 8389E086D81C1A08B81E2A4CE752D58D + 80: F2065C23188121333D580AB95027A834 + 81: 7FFC1056F79C0226E568DDFDEDB68D10 + 82: 91D77F2607100D2EFD10364AA221A512 + 83: BCE2E5CC780AF0CB8487C676B6C57958 + 84: CE7A9493264224636EEE4BD4228D3501 + 85: B79A73B6BAAA83BA4200C13600FB4A29 + 86: 5E175C8D9402168B081021AC4AAE5E98 + 87: 1684969736689A062365D08B2EBA4448 + 88: 3740022A6174BDE156C7880003364907 + 89: B5A1D9C73759DD4965F3A2CEDFE6AD89 + 90: 8C2EAC9298148FD6C259EE2530BD8326 + 91: DC57AD06873459EF69D3530B4F9EE73F + 92: 649619FCBF2D303DD458EBD66969FB6B + 93: 6D6A17605BD1AF230EE9898E0D8B704C + 94: 763F0C908954913C34BDAB019C143582 + 95: B65DA22F1F0F82AECEBE91E1D3CF8C80 + 96: FF04AA06DA3E342AB335E9C1F2201C1F + 97: EBC7F4AC87CFC9CDC9DC13BE494E16D8 + 98: 68C0C171AF8C661AF6AE2E958102247A + 99: F0C587EB6C6AC5E1C34DB3BB3920B56B +100: 666A861D60A4C86BF684FE089CFBA8CC +101: 9CE84B0F08E03DC38BBC89F889D53AA1 +102: C767CC2F8F867551F210DC2616A7978A +103: 8970A7DCB77D9264596EAC8CDB86AE16 +104: 6CE407E9F51D6949B0AC6931EE6BE7D9 +105: C96EE2F5911549E44A1DBBBDFADE9B9F +106: 4ED2790B30C24F0E4D25494313667CB6 +107: 76E535A3B57CD085E8F75925C458083B +108: FDFFA482F90B1A788ACC57169508ADC5 +109: DA54C33D148DAB92D70C8BED79F352BC +110: 2030C26D92D0732A5E45716052147AAD +111: 0760E13DB7921CDBA669C67E88C3A7D1 +112: 73D5A76FB7D704856C0DAA9EC40E75CE +113: 76C45083E3405EEA53EA2884496C80B4 +114: 1EB92DD78744D9C383DCB52BBB418835 +115: 342C06AAC7B367193619B247DD04B0D0 +116: CABDB99087F2227BA327A19DC8052028 +117: 1A693513B7838CD492B7A4708F2CE04A +118: D1FBF911AF9246FC36BDF7D26F85E549 +119: 9D20CA08AD292E41F4F4C0D496E43903 +120: 6DDC8ABD8A94C66B62E6BE297B38CE20 +121: E36B24346B30DEB928D52C20AE068839 +122: D422522FF476B3C8E5D8DC92CFFE49BC +123: 8CF8C2D76AEEEB6C7A72A05448FA14AE +124: 28EF0EA3F71B1F1C024CB77531E6DB95 +125: C8A7768B284F5568F8926518F09C787C +126: 52A7C5E8CC60E4AA0935BF2303A8DD30 +127: 5D3541BE0CE9B6D8F9315862AC0198C5 +128: 7A3B3FA888B60095E7B305EFCF3C3DBC + +Hash: blake2s-160 + 0: 354C9C33F735962418BDACB9479873429C34916F + 1: 63A5F3DBA42C1EE9CE4147C1B22E0B61F4C7A17A + 2: D7E7E6E5A94FB0B0319212F4376E60C0BE1E7604 + 3: 5F70714603428963ABE2EA507C1D0A7C3D67A8E4 + 4: D2EB068A022B036AD8F46AD5DB018DF76331BAB1 + 5: 9B76C33F4F273950A4CF51FF337D00E7FC61DD23 + 6: 4309F8371A6AC414FF37D1D52EF1776C95A20789 + 7: B4F2034937EDB13E5B2ACA648274F662E3F284FF + 8: 55AF018D4764BFB68D6A1157F1CEEC211E1885EA + 9: 28356DD720151A6F60845D7F0E2364A720AA6E8D + 10: 92BAE8F308BFAD697E5AEB54A465DA37F9D24425 + 11: 9BFD39BE442702851DD618737A05830E3AA40894 + 12: E2ACC08A5D25D268595EFFCFE34EE1BF3AE884F1 + 13: D899B80BD2B851D721760B03DDD6E6A37F1F074D + 14: 440DD02BBF5B49139D5A4885F0C923131AD3D3C5 + 15: CA6F08E03BD4580C89A1E341CC248A2847C52F9B + 16: 7FA3AA4D8C97FF99A6BC5D16613D859E52F026C1 + 17: AF0BECB1E358C5CA393586DF9180EE065A837A22 + 18: 6E7DC6203623F33A98CFC0C05B96A9B3F368FD54 + 19: 9E65CB46384717BF5F6A16D4C8357DC232C9FC3F + 20: 985ED9932A7529791CC7535AD0FBABC3BE4EF1F3 + 21: 98171FF82492AAFB7FEF5D1C3D2DFC9D2B67AA2F + 22: 8904388C800814EFEB7ADE5EEC2D19A3908B0779 + 23: 717B89BFE07E2D64391B315603B2AFA849595F8C + 24: 027EC32547E076CB8AA0645C7F6C3A916339FA29 + 25: 47A86EAAFF8E2C9E72E8352E13907C4625B88C18 + 26: C1688EBF848D91A22499FB6C4126869F2B45C715 + 27: 3B38DA6BC7706A551A2C554653BCE5F88BDFA3DE + 28: 45F888CFFDDDDE987FAE61A5FA1CA6C0461AB265 + 29: DFEA3AB50EE3D5878F165ECAA9CC497DB82927E4 + 30: 1AB376D7E1A479032F26BC158F698CDD905871CC + 31: 6E0C39AC0442DC1A6C05ED1602806E64A6EF82E1 + 32: F73E3143C51B27F4E4605613948AA1DD3DB1AD77 + 33: 758D383DFCF4E44D440879E14A16D1303CD4F014 + 34: 439CE5842CADDAC3DEC67A2C47CE3566D8982DF8 + 35: 0483C39E9616A1AE7083CCCD5700C4F8FAD23307 + 36: 8EE9EF037310BA9174217C4921EF32620179D04B + 37: 1C0BD65FE618575F0750D2E3B08E2E718C8B7970 + 38: F0256B86A8E9EB359F950FF0A5E16596F253BEE4 + 39: 8D7BFFBC634762D0FB5222E4BB0A8719E9B7D081 + 40: 27E1D09CEFD270ADB81599B71A47ABA8E17CE4F9 + 41: C5A52EC4DF672DED31983299F56FE7B389975988 + 42: C9813921DB8760016DA939BF7EC2E34E30A8BB3A + 43: 7B1D1B8933557B22DE1A9A5FCAE805F52CD30CA4 + 44: F192A8F9A94BD34DF766692A2CDAA63DD0BDDBFD + 45: 39E6ED136B56D8319DE6D51B3211A035042FFED1 + 46: 5E9930F1EC9066C20296AF7122CBBA72B25A2A93 + 47: 793030A738EB909568471EE20340D32BEA78403A + 48: 2E8DC80084C5A2E64245E974AFC408C2EBF89D19 + 49: 006869129561FDC6549A03C0B5214B9A76238F92 + 50: 11170463304E748E8DB1449F55191E9D153ED1BD + 51: 1A0B05555FB77D2F9C074FA3E83BB283F95BE537 + 52: 5F5F8FF3CE86AF33C1415C60F76CB2C25BDE6728 + 53: EC7675D6B24FE54113EE502F4B9C434AE2D510B8 + 54: F6D1E8931D28A492C487FE2B62684B4DEE9606AD + 55: 2C0AE504B7674099048042CE546844DD06E32EFB + 56: 81DED6F4245B0BC4C055D5B7940D4A82DFEA329A + 57: 0285CCF80282440FB7E66B16DCF53D6C530EC3BC + 58: C617F39AB2446324C5E42D8B24C773AAA55CF624 + 59: C2378D825E5E8D9C98AE33DAED09DB42D8BE0A40 + 60: 62B4DCAAB72D70A77806A9B96C099AC76D04D72C + 61: 1D9CAAA74E54F3CA2D685C74211C6A4310E66D9D + 62: 6B190C2ABC4C181FF207099CB51C3DF5C944CE15 + 63: 3D0034E3E070CED4C8555CC592D019AF6155B086 + 64: 68C18B80DD398444AA9FD4272ECFA8E71B31EE8A + 65: 20EB8EEE0C703A44779298F35F92DA38F2B4F0BF + 66: EF4CD91D8F64838A042C07FB47F2736E68B66809 + 67: E2F5974DF791223616B42D5DA419DF26F2E128C0 + 68: 06C2DBF070561DC936212A3ADC877C94D6C4A5D0 + 69: 14B0EBC0735758C60EC1EF0DB2DE0E2763801370 + 70: 3D389052DC609E219CCF557B6667F8976B82B782 + 71: ED2B645B593417C11431E55E646D26E92DE1CFB3 + 72: 7150F391010A2F175621D5FFBCF7A6EDFFC8FE1F + 73: F4B6B92EBE81533243053EF7C44C993F50983B3E + 74: 36E34AE33E41722AF099E6A57CFD466A5631057A + 75: 1FBE85FFF071FD6C98F6F1A519E2D64F475ED76A + 76: 1C6C18D0FC578FB74B92EC0AF23CB61C8E6CF595 + 77: 240240245C8BDB34F0A52656644593BAAE08A5EB + 78: 2F3320A1E36B4E3CBFF7085B2599752FC830C78D + 79: 10FCC5E7FE1927674730A94CEC96BF2F0BD9DFCC + 80: 2E33E68B08D61675372CF6DA84AB69F2EC707B00 + 81: 9729F628CE9C027774A643F3CEF26DA829F36592 + 82: 1EF72D087EF5E79D104396D63579BD6F98CF4C1E + 83: 69B9DFD3ECC5560FACCFAF2A402F949F76EEAF84 + 84: 12EE430ED6E37CD3B9FE0318F134390F11BB99FB + 85: 0D491088429004B2ECB84788FB045EAD3F7B6E54 + 86: 0A755ACE4673E9A2A083E9B7E412E0F21C4E8D18 + 87: 38FE0BEA8C3B5D105A6D6BB7D241E4345893FE36 + 88: F94971CFF90543B01DD32C5589032B0C05AC179F + 89: 720F5741BDC10B4599E67F86C1A14C0116B1C69A + 90: CB82A141D54DE5386D032C87E417240C2FEAEA5A + 91: DBDC7A6B1A2EA4CA3275871FECAB399BB2C91065 + 92: 2DF5156607D295E207A31FF08F0CFE7B5659ABD9 + 93: 338F3C5DF3EC240F5310F826EB17E86BA05C4E49 + 94: 60CFC1A154C1D98B44F0DE61090D49E71979D992 + 95: FC9B059E0B22B699387F2DAE43949A56EA395514 + 96: 18BF054303412DA7FEB896C7940D2AE0EA4DD8B8 + 97: C1942585DDFBD73AFBC7F1F8A2FE54EC9DB1DBE9 + 98: A0A46EFE86E0438226977955E5BB92454AC0EDC1 + 99: 5EB5F8576B9D35EABDC5377802F02FF9E121B435 +100: 680D1A3BDA75F684618CBDC2863A76719155EE53 +101: A2923C7BD0EE1A2BE98BA750571B4A95DCD53F67 +102: CA57C775ABB2082BC165CC102BDC54F8F3F2896F +103: AED1F4A1172389137FFDDB36CED33E70E0AF111B +104: FE6297DB2444ED4C50860BD0266978C314724920 +105: B522FE23A986B6A911AA575590675DC80A0608F7 +106: 49380F56DFD3E20B1517374304814A8F351B71B9 +107: 9053188745A526DF0431EC4BF836F329B2AD54F3 +108: EBA715AED607617D90340C144D4E9059A80FD465 +109: CB1ABE32A735C49164A068EF87120B49C7EAAB2B +110: 7081B36DEF56C5FBB541C8C0AD8BB324C29ABE88 +111: AACABE58BF3FCD680DEB8FE8C7D8D74798E9081D +112: E660714F551A3EAEBF8BF334AF6415152B86E485 +113: 2C425922F0E11972DBD91E4394282E1570BB25A2 +114: 45C24A1C263432568573075A2162CC8098CCA18E +115: 7847103CF22ABC8C2FC0AD911FEBB7B14943C9B5 +116: C5147A4590DD4C1426E212156E01F608DBD66D69 +117: 965FE7D1837B971EDAB15F7E67EBA9A2E6914F40 +118: 741E306EAD4D955C33052B0ED20F5C5AB20F2101 +119: DB5207DF29623C33809DAC6E43F475D30A72A911 +120: 71EDF00F043A71BA57F6B5E1B68A6789DD546F1D +121: 8662782A37C5750197139141A9727141552F3ED9 +122: FEE742A0F8B086265397D6F1BBCBBDC0A06BAA02 +123: 79AB45D0C1993E96A5513CB71E90B6CE6534255D +124: 81941D21C28A57C91B9912A0530393C5EC4B847E +125: D751DCCD29D33981DF4014FE866B04029BF79370 +126: 247DC8D47CA83F3B852BFBD5C1100E5EA7DB9A8F +127: B326E5F0E03512E436F31111DF9C378DCA2B3171 +128: FB7B50DB11A7A2ACECF57AA08636DF85EEAAC736 + +Hash: blake2s-224 + 0: 1FA1291E65248B37B3433475B2A0DD63D54A11ECC4E3E034E7BC1EF4 + 1: 61B94EC94622A391D2AE42E6456C9012D5800797B8865AFC482197BB + 2: B354A3A86CCB9D779E2CCA139D231DBE9ABF798F167FEA6E3F577867 + 3: F366ACA9739FDDA59DC11280B6E6D10DB6286B503E1D0A922326307A + 4: 42ABB6E970408779166B9EB742FE0621B03F77794A8881FC398F97B3 + 5: 01F21AA3E522547A29784118863AA2A1954E295F42529C3DE0600835 + 6: 4DED466648D01276EAD4A77882C05602F7E92B198E84810A52FF11A8 + 7: D2FC4A9F2B1CC35D2ED8A7C24A91A68C86FBD326574B079C66E41196 + 8: 9903423028C41511FABD3366A07AAF7E480D2B6FC0457EEF7C11A824 + 9: D664024F8A94368DCCE909495E2CD6BBF1BB02390F8066545D010701 + 10: 976C9034E79937B253F7D9CEBF6F7E81B57CF27C97551E88FB95168A + 11: 314B02060FA7ED987F3C566783A6B325D30F17A6D5F3724E23C46633 + 12: 0C7F28E829AA9484F2AFF0605535404B8E845EC763439FAD1BF86024 + 13: 3C12AE2CB1489D1E962A1D171173628B3D6BE0590C3ADE492C3987B7 + 14: 55B6D6D04513E811CC41F656DA633E7DC9555BDFF733F735ADB531EC + 15: 90C14B6F15AB39F0623A092C25171DB744DCEC78BCAC1C5F722C4B56 + 16: 9384BC14A81DA3BBCA13D0CF2A876711545EE8C3A87C191A4169F727 + 17: 49B6BDF2ED04E5D76A19CAC2BAEF08AAD16A3B4A31B2765781593AF8 + 18: 5AA9C3AABE961DE67A16AFF35B0AABB7E734C26E2EE42C76A46299CD + 19: FEB584CF41462363372F82999262AB93F154EBEEB644F58B4713202C + 20: E17CA71ADA6B48CBBB8399D9CAEA26D0F2B7F5B1C9BD4924E6A6A494 + 21: F5BE4A4A44421D403F7A154366311D61E415F6169516E72DB426A4C6 + 22: 2C347252DD3B7B99FEF9038B72E7961799C7DCD7CD9D22BEE98E5720 + 23: D5A11E41B9FF2562A8A93D62B1CC9DE2A734C2C14D7AC5C818B1D225 + 24: BB2F2A95B9A695091D79CBB7DDB60E6344EE6A1A0A00506F8D4E81A6 + 25: 4C676307A506243B96B8765274D9696C41332EBCACDDCFEF51ED98B2 + 26: EBF674014A0EC1513A522B13CCE542E7E8E4A5C4915A8545DB9A28E9 + 27: 03308AC3021B1F36500A53A14D472C669D03135DA7477E636D381412 + 28: 9F7194D71D515EBC1E15DDB382D218FB35D91485F7967D9961CCEDCC + 29: 8F6809F5F9ADD0562C0D7F70583AC71A24C6C1885EE1D5F572D3D973 + 30: 00AFC8B9B4F0C30625E53D4F2064F6BFF05EDF46FEEFAC6EA6CB7334 + 31: 4D42ABA3D1D12AF74A8524114B17D6D1957FB24753DDE2E28E9DA390 + 32: A19C4CA01CE34CD61408E9EC9946E3DAA98AD1B7D77C087782E6827F + 33: 800559FD51E93E4BC2FDDFB26964343AF7C0DD343AA3D36D40857F97 + 34: 3656E7DB967CDFC7F3D7BA099827449E9AC38AE992A02D446706CF5C + 35: DC690F1B322291B741D0CE2D9639F8DB85FDF5FDE1E41701BFD8A406 + 36: C0EBB37BB3E12CBD7888255E8C3A8F1EB6AE5A9582455D7A0772BBE5 + 37: 32B16E5D5EDD71424DD8C8E1E23A651322CA06AF13E3FB7E56EA9733 + 38: 20D5B7C0B52320AB1A1FBF7D47626BD758138E07B74B4FB2B846E186 + 39: C4A7603DFA81B43D36E9F5B0D1423DE4686327F7A4415D6277751428 + 40: 1ECBF4EA964E9B3855A9E9293F3D2D2BE1E251D9204B54B6837800A9 + 41: 9C9440E097BEAD44FA7B968818FF557D41D2AB29EF48212C975378E3 + 42: 97D936C85DA801F053AD2C7EE6D7B4ABFB43D2563FA5CFA76A366055 + 43: DEF0FA3658530B7BBC0E6D5A30AF8B48ED780C73D947BD267DB36E2F + 44: 6C26BA6D96EF33EA6977943D2BDE04AE3BAB13CD7329D7CF304A091E + 45: D5E49A864104B862020251F91E917E33F77208797F4FA7FEC2618C18 + 46: 59F3C5D276DD45FD1B1A512094E6F7CB8946D26B6DE0B16659E86505 + 47: C5F52A98EDBA4700EB18E7855EE8DD1A427FC7184FF4259B3DF09B91 + 48: 69A7C96A17478FB971E907399C125E39E7DA329D231C4A1ACFEEE1F5 + 49: F97C42B005A40AC713CD1201544058C332FE83D6A5DFFCB3F7A26DF7 + 50: 080519CB017B2953003725848DD739C9B39AE9D9E6E7E9006103A852 + 51: 267AEF7F39ED64DCA288F25B01F9AD5478599E1B91B496840A1DF1D6 + 52: 52240CD9B35403B8832680EE72FDDCF37E51897E9E4E46B55D3ACBED + 53: 63DA0BF0FBDBA65430F5BBC099A4B7F868672BC3FAD71ED31F5F77B2 + 54: 5EE73E709A1661971150CF31099124CD42A9F9D6FFF6F9078BE63154 + 55: 5CD64A9845375020F2331C72CB955821CFE11D06A3B63D8A1D1187E2 + 56: 8522AB2D20CDF3CA0F85EA5A18E5C385F1BB3E9B0A4FDC07324C98B0 + 57: FE16ABA3459844E3299FB7E0B47A8DC6337C8209CD6220407BF29682 + 58: 86B4C6EF1783701C6F6DC237A8FF45035B61FD7F3FBDA61EF37B79D8 + 59: 2A4A292DC2ACE8BD3729332332AA8757A7DEF68A181DF8CC51266910 + 60: 36410AE1CDAA027F85A4ED1C8892B70E0B4FD541C2A14CC1411D67F0 + 61: 21E5E7CCADB0A287A37C10E4CE258B2658DF29A0E7356C88A3E92C20 + 62: 027B16F4E0F5A5C17A46EA3B51DC50B368EA094F5EF196E615FE8B3D + 63: 8D88168937A3B44E45C1408C03DF60835DF2794E8B55ECA1FD1E266A + 64: 0F3CD451360AAD6BD7C9CBC1497771315BC0E0F34C82D1F4E1052B1E + 65: C4ED166EC8CCB80A236767111FA75498A0666901226B549DE011D576 + 66: 8CDD99B9C3E2F417C7DD334AD50AF32F220CAC25731C667BA6CFB4FF + 67: 19415845A2F27872B881191381DAEA10E24A6DC1214B994DCE330F1E + 68: 9973F64635A408C840C1DC2667BA0E9C2BDAFA8E86E584BF2642076B + 69: 5041DA88DB2F7478EB5AC630FFB77BE46328891A5BA940141E2344BF + 70: 7FD3930B4100F6A6E97B64EFC6BF77E23DA925E1C488FD89C618E03E + 71: 4BFA0D8F207926ACAAA0E04A4EA269D822875A5FBB462C72936BFDF4 + 72: FCA9E83CF144083FE82C39CA58341DEC32CEBBEAA87E728689C8C6E8 + 73: 1F152AEAED0107E3F1D7317BCF61FBBBE9756D9C1D3A998ACCE73B19 + 74: 5ECC27D88DC605A4C30CE046CD93C252E646CC5D1303C3A1F8019371 + 75: B44C388E1CFF293242A783EC000E9CF1D977812255009CB35917FD5F + 76: E3C4B860A91C6DEDBD796EA5EF957453A41BBD477E5C5327A23C4D87 + 77: B61901A9BA1AB20128DE4832923742E01BA41A648EF09FE5D0FC64E0 + 78: 562B90D86AF640C3835F76B24FB1DB7F509DE8091E15D52FD6283747 + 79: 5704A0A9B316400692431460D45F64C52FF939CD33AC93EE23927352 + 80: 222395B8C1DAD60F29E1B02E9E944CADDA56A61027F46025F893239D + 81: FFD94C26439196ACBD2E9C225E522F2825588BDC67053BBF3F0D3A58 + 82: 0F2C8AA114D3A687F143EB35EEBE32FD1CA325AC5B8818024AFB3554 + 83: 00402EC26EFEAAC7E376EB294CC3F1A5ACF55B8B2D06B581194473DA + 84: A504DF8BA4C46C6D0923C67DF94169F057A63192A17623FC7B20B189 + 85: 654954B063729D09A562598A9537EACCC0D98B9BB1FBB34172960F19 + 86: EE5773C670FE153A969B1F3A54F155A28AF9E25BDFEE02285940FF26 + 87: A5FCA2FCE745A8FED0338C747797539CE96998F0678758679BDC7A84 + 88: F2761BB7E85BB2953FB99AFF5F2EC50C6799B140359165035333C8F9 + 89: BD5FE527CD74ADAF6A646C6C35E0B891744CA78098224EC8E4CD5CB8 + 90: 886E3D5B274CF83C5CE6D16E4C3A8D3382A3486A3F447EC70526EE17 + 91: 23E6611E54C8D767D3C0B007F05815E5FACA2DC11A27D5EE5D3F8EAD + 92: A09DA0A8EE1DEB0B41C6F50BCE7446A7F6CE60886B5E289EE86F7008 + 93: 60382D65E2FC987AF43757FC7AAA777F82F885C98EA07F650C52A3A1 + 94: D2033BF9C929E13F39A0033669F7B270983CAE1491588D6765BFFCFF + 95: 278F3962EB35495F08C04DAC7C2DC972550B5E8125DE7B2DEF30D67A + 96: 54501DD2B4B14AE335F0DAA6DE33C862532A9C7D895A33582001BF88 + 97: D14803662A73E03B0EC08DB76877E8EBF614A7B2E48800536032A329 + 98: 4669600EFB4AB6D1653AA0470F6E35005F961A9A0896F2F3D6A2A5CD + 99: 20EE59D9CC85FF096A6C209EE25A9D9D7B01BF6A0FCF3FE512573BB2 +100: D578424CA09A3900792DC6F4D3DD0282B80C39415C0DB9283806A07B +101: 047BF849300AF65A5E5A0037A2F03236D78F18AE96C760D084683EE3 +102: 66E2C5DC229AD1318A39E5E38276181E4BEF8467A3EF99CAAD842EF9 +103: FBBA003032683675DFA34448CB70F50F9D52B3FAD23BAAF4E9D810AA +104: 87147164C725A5C17F0C108315AB67266D2F748C4F97F3A4A5450C53 +105: 808E48C1FF44EAE1289F2B460E8F5694E65F1F71F08C7F09281B2024 +106: 4D8A491E0F4E265C71A7FD993E94B187B69053D4DC4A45EEFCA66763 +107: 4B93C4B9DF00FB64A1E5D00A7130253B438DD30CF132C1FFA8B49458 +108: FA77DD5A05385B4F08787EC821A4D9643E66570F5ADDCC95C558E916 +109: BA2E4C01D2C80EEAB1C1D76C3348C37D88EDBE52D2322B38AA4B2553 +110: 50232F65130808FF427EE791C0D7F4B0D80A5428E6D153970462138E +111: 6E3DF733DCB232D9742DEAB44A6CC9CE75B52D677599DE018BE80A02 +112: 589286CE5D448B9B6A727AE3E24DEB9E8141FEDB1E8E853556A63A03 +113: E48768C63384D8C29736969B1F2934D57EABE67D80EC1B05C74607CF +114: D243C7B0EA86D4286FC46217A4DBACAB02D47B553E500F41225A6F9E +115: 5048ADFB6091292878E21F2D40682F385B130294BC61216133B7F28D +116: 2400C769610FB06F9BE1810F202E325F5984289533595D5252DB52B8 +117: B64166E2678CB7BED689CD28F0C06969559FFF3F8C31564BF68C0741 +118: D8160C3E3AAC9FE0368FACB3190AB11ECF545DF83F6A60D058A06908 +119: AC993AF05709DE0C7516C09F505562D8F10C643690ADF3DC1EB12803 +120: 8D3221FFC272D7FD44D4EA0AF6AE4AF7D5E0BE1E48F305B7EFB1BC6D +121: F14EAFFA4F73354329CD49634836E3A69DE1A89C80262BF40668F2CC +122: F4DE293C01AF09BFA4E7417488EA8D599FA854C6305E8D638AC83146 +123: BFC807EFE5CF0C5C7F71E337E68BA974F137DF299D01DC7E57F053D0 +124: B943A8B8EC482F68977BD6FEFD3FDEB1FCADFB84B3B5A8442CBF4F0B +125: 01D45AD3FF542DB030F7EE00F80342EE397DB480737A3A17098C0804 +126: 11FAE1A284C26D0475026225741EE11E10E96453B92FAA72FF4DBD47 +127: A5CE0FF6222E2669FC425EF4D5CDAED1870BF1C384A560E4DD86F5B3 +128: 784E4D4A1465F11253D1812C9C865C99581656086F4F2B7EE7FFDBB6 + +Hash: blake2s-256 + 0: 69217A3079908094E11121D042354A7C1F55B6482CA1A51E1B250DFD1ED0EEF9 + 1: E34D74DBAF4FF4C6ABD871CC220451D2EA2648846C7757FBAAC82FE51AD64BEA + 2: DDAD9AB15DAC4549BA42F49D262496BEF6C0BAE1DD342A8808F8EA267C6E210C + 3: E8F91C6EF232A041452AB0E149070CDD7DD1769E75B3A5921BE37876C45C9900 + 4: 0CC70E00348B86BA2944D0C32038B25C55584F90DF2304F55FA332AF5FB01E20 + 5: EC1964191087A4FE9DF1C795342A02FFC191A5B251764856AE5B8B5769F0C6CD + 6: E1FA51618D7DF4EB70CF0D5A9E906F806E9D19F7F4F01E3B621288E4120405D6 + 7: 598001FAFBE8F94EC66DC827D012CFCBBA2228569F448E89EA2208C8BF769293 + 8: C7E887B546623635E93E0495598F1726821996C2377705B93A1F636F872BFA2D + 9: C315A437DD28062A770D481967136B1B5EB88B21EE53D0329C5897126E9DB02C + 10: BB473DEDDC055FEA6228F207DA575347BB00404CD349D38C18026307A224CBFF + 11: 687E1873A8277591BB33D9ADF9A13912EFEFE557CAFC39A7952623E47255F16D + 12: 1AC7BA754D6E2F94E0E86C46BFB262ABBB74F450EF456D6B4D97AA80CE6DA767 + 13: 012C97809614816B5D9494477D4B687D15B96EB69C0E8074A8516F31224B5C98 + 14: 91FFD26CFA4DA5134C7EA262F7889C329F61F6A657225CC212F40056D986B3F4 + 15: D97C828D8182A72180A06A78268330673F7C4E0635947C04C02323FD45C0A52D + 16: EFC04CDC391C7E9119BD38668A534E65FE31036D6A62112E44EBEB11F9C57080 + 17: 992CF5C053442A5FBC4FAF583E04E50BB70D2F39FBB6A503F89E56A63E18578A + 18: 38640E9F21983E67B539CACCAE5ECF615AE2764F75A09C9C59B76483C1FBC735 + 19: 213DD34C7EFE4FB27A6B35F6B4000D1FE03281AF3C723E5C9F94747A5F31CD3B + 20: EC246EEEB9CED3F7AD33ED28660DD9BB0732513DB4E2FA278B60CDE3682A4CCD + 21: AC9B61D446648C3005D7892BF3A8719F4C8181CFDCBC2B79FEF10A279B911095 + 22: 7BF8B22959E34E3A43F7079223E83A9754617D391E213DFD808E41B9BEAD4CE7 + 23: 68D4B5D4FA0E302B64CCC5AF792913AC4C88EC95C07DDF40694256EB88CE9F3D + 24: B2C2420F05F9ABE36315919336B37E4E0FA33FF7E76A492767006FDB5D935462 + 25: 134F61BBD0BBB69AED5343904551A3E6C1AA7DCDD77E903E7023EB7C60320AA7 + 26: 4693F9BFF7D4F3986A7D176E6E06F72AD1490D805C99E25347B8DE77B4DB6D9B + 27: 853E26F741953B0FD5BDB424E8AB9E8B3750EAA8EF61E47902C91E554E9C73B9 + 28: F7DE536361ABAA0E158156CF0EA4F63A99B5E4054F8FA4C9D45F6285CAD55694 + 29: 4C230608860A99AE8D7BD5C2CC17FA52096B9A61BEDB17CB7617864AD29CA7A6 + 30: AEB920EA87952DADB1FB759291E3388139A872865001886ED84752E93C250C2A + 31: ABA4AD9B480B9DF3D08CA5E87B0C2440D4E4EA21224C2EB42CBAE469D089B931 + 32: 05825607D7FDF2D82EF4C3C8C2AEA961AD98D60EDFF7D018983E21204C0D93D1 + 33: A742F8B6AF82D8A6CA2357C5F1CF91DEFBD066267D75C048B352366585025962 + 34: 2BCAC89599000B42C95AE23835A713704ED79789C84FEF149A874FF733F017A2 + 35: AC1ED07D048F105A9E5B7AB85B09A492D5BAFF14B8BFB0E9FD789486EEA2B974 + 36: E48D0ECFAF497D5B27C25D99E156CB0579D440D6E31FB62473696DBF95E010E4 + 37: 12A91FADF8B21644FD0F934F3C4A8F62BA862FFD20E8E961154C15C13884ED3D + 38: 7CBEE96E139897DC98FBEF3BE81AD4D964D235CB12141FB66727E6E5DF73A878 + 39: EBF66ABB597AE572A7297CB0871E355ACCAFAD8377B8E78BF164CE2A18DE4BAF + 40: 71B933B07E4FF7818CE059D008829E453C6FF02EC0A7DB393FC2D870F37A7286 + 41: 7CF7C51331220B8D3EBAED9C29398A16D98156E2613CB088F2B0E08A1BE4CF4F + 42: 3E41A108E0F64AD276B979E1CE068279E16F7BC7E4AA1D211E17B81161DF1602 + 43: 886502A82AB47BA8D86710AA9DE3D46EA65C47AF6EE8DE450CCEB8B11B045F50 + 44: C021BC5F0954FEE94F46EA09487E10A84840D02F64810BC08D9E551F7D416814 + 45: 2030516E8A5FE19AE79C336FCE26382A749D3FD0EC91E537D4BD2358C12DFB22 + 46: 556698DAC8317FD36DFBDF25A79CB112D5425860605CBAF507F23BF7E9F42AFE + 47: 2F867BA67773FDC3E92FCED99A6409AD39D0B880FDE8F109A81730C4451D0178 + 48: 172EC218F119DFAE98896DFF29DD9876C94AF87417F9AE4C7014BB4E4B96AFC7 + 49: 3F85814A18195F879AA962F95D26BD82A278F2B82320218F6B3BD6F7F667A6D9 + 50: 1B618FBAA566B3D498C12E982C9EC52E4DA85A8C54F38F34C090394F23C184C1 + 51: 0C758FB5692FFD41A3575D0AF00CC7FBF2CBE5905A58323A88AE4244F6E4C993 + 52: A931360CAD628C7F12A6C1C4B753B0F4062AEF3CE65A1AE3F19369DADF3AE23D + 53: CBAC7D773B1E3B3C6691D7ABB7E9DF045C8BA19268DED153207F5E804352EC5D + 54: 23A196D3802ED3C1B384019A82325840D32F71950C4580B03445E0898E14053C + 55: F4495470F226C8C214BE08FDFAD4BC4A2A9DBEA9136A210DF0D4B64929E6FC14 + 56: E290DD270B467F34AB1C002D340FA016257FF19E5833FDBBF2CB401C3B2817DE + 57: 9FC7B5DED3C15042B2A6582DC39BE016D24A682D5E61AD1EFF9C63309848F706 + 58: 8CCA67A36D17D5E6341CB592FD7BEF9926C9E3AA1027EA11A7D8BD260B576E04 + 59: 409392F560F86831DA4373EE5E0074260595D7BC24183B60ED700D4583D3F6F0 + 60: 2802165DE090915546F3398CD849164A19F92ADBC361ADC99B0F20C8EA071054 + 61: AD839168D9F8A4BE95BA9EF9A692F07256AE43FE6F9864E290691B0256CE50A9 + 62: 75FDAA5038C284B86D6E8AFFE8B2807E467B86600E79AF3689FBC06328CBF894 + 63: E57CB79487DD57902432B250733813BD96A84EFCE59F650FAC26E6696AEFAFC3 + 64: 56F34E8B96557E90C1F24B52D0C89D51086ACF1B00F634CF1DDE9233B8EAAA3E + 65: 1B53EE94AAF34E4B159D48DE352C7F0661D0A40EDFF95A0B1639B4090E974472 + 66: 05705E2A81757C14BD383EA98DDA544EB10E6BC07BAE435E2518DBE133525375 + 67: D8B2866E8A309DB53E529EC32911D82F5CA16CFF76216891A9676AA31AAA6C42 + 68: F5041C241270EB04C71EC2C95D4C38D803B1237B0F29FD4DB3EB397669E88699 + 69: 9A4CE077C349322F595E0EE79ED0DA5FAB66752CBFEF8F87D0E9D0723C7530DD + 70: 657B09F3D0F52B5B8F2F97163A0EDF0C04F075408A07BBEB3A4101A891990D62 + 71: 1E3F7BD5A58FA533344AA8ED3AC122BB9E70D4EF50D004530821948F5FE6315A + 72: 80DCCF3FD83DFD0D35AA28585922AB89D5313997673EAF905CEA9C0B225C7B5F + 73: 8A0D0FBF6377D83BB08B514B4B1C43ACC95D751714F8925645CB6BC856CA150A + 74: 9FA5B487738AD2844CC6348A901918F659A3B89E9C0DFEEAD30DD94BCF42EF8E + 75: 80832C4A1677F5EA2560F668E9354DD36997F03728CFA55E1B38337C0C9EF818 + 76: AB37DDB683137E74080D026B590B96AE9BB447722F305A5AC570EC1DF9B1743C + 77: 3EE735A694C2559B693AA68629361E15D12265AD6A3DEDF488B0B00FAC9754BA + 78: D6FCD23219B647E4CBD5EB2D0AD01EC8838A4B2901FC325CC3701981CA6C888B + 79: 0520EC2F5BF7A755DACB50C6BF233E3515434763DB0139CCD9FAEFBB8207612D + 80: AFF3B75F3F581264D7661662B92F5AD37C1D32BD45FF81A4ED8ADC9EF30DD989 + 81: D0DD650BEFD3BA63DC25102C627C921B9CBEB0B130686935B5C927CB7CCD5E3B + 82: E1149816B10A8514FB3E2CAB2C08BEE9F73CE76221701246A589BBB67302D8A9 + 83: 7DA3F441DE9054317E72B5DBF979DA01E6BCEEBB8478EAE6A22849D90292635C + 84: 1230B1FC8A7D9215EDC2D4A2DECBDD0A6E216C924278C91FC5D10E7D60192D94 + 85: 5750D716B4808F751FEBC38806BA170BF6D5199A7816BE514E3F932FBE0CB871 + 86: 6FC59B2F10FEBA954AA6820B3CA987EE81D5CC1DA3C63CE827301C569DFB39CE + 87: C7C3FE1EEBDC7B5A939326E8DDB83E8BF2B780B65678CB62F208B040ABDD35E2 + 88: 0C75C1A15CF34A314EE478F4A5CE0B8A6B36528EF7A820696C3E4246C5A15864 + 89: 216DC12A108569A3C7CDDE4AED43A6C330139DDA3CCC4A108905DB3861899050 + 90: A57BE6AE6756F28B02F59DADF7E0D7D8807F10FA15CED1AD3585521A1D995A89 + 91: 816AEF875953716CD7A581F732F53DD435DAB66D09C361D2D6592DE17755D8A8 + 92: 9A76893226693B6EA97E6A738F9D10FB3D0B43AE0E8B7D8123EA76CE97989C7E + 93: 8DAEDB9A271529DBB7DC3B607FE5EB2D3211770758DD3B0A3593D2D7954E2D5B + 94: 16DBC0AA5DD2C774F505100F733786D8A175FCBBB59C43E1FBFF3E1EAF31CB4A + 95: 8606CB899C6AEAF51B9DB0FE4924A9FD5DABC19F8826F2BC1C1D7DA14D2C2C99 + 96: 8479731AEDA57BD37EADB51A507E307F3BD95E69DBCA94F3BC21726066AD6DFD + 97: 58473A9EA82EFA3F3B3D8FC83ED8863127B33AE8DEAE6307201EDB6DDE61DE29 + 98: 9A9255D53AF116DE8BA27CE35B4C7E15640657A0FCB888C70D95431DACD8F830 + 99: 9EB05FFBA39FD8596A45493E18D2510BF3EF065C51D6E13ABE66AA57E05CFDB7 +100: 81DCC3A505EACE3F879D8F702776770F9DF50E521D1428A85DAF04F9AD2150E0 +101: E3E3C4AA3ACBBC85332AF9D564BC24165E1687F6B1ADCBFAE77A8F03C72AC28C +102: 6746C80B4EB56AEA45E64E7289BBA3EDBF45ECF8206481FF6302122984CD526A +103: 2B628E52764D7D62C0868B212357CDD12D9149822F4E9845D918A08D1AE990C0 +104: E4BFE80D58C91994613909DC4B1A12496896C004AF7B5701483DE45D2823D78E +105: EBB4BA150CEF2734345B5D641BBED03A21EAFAE933C99E009212EF04574A8530 +106: 3966EC73B154ACC697AC5CF5B24B40BDB0DB9E398836D76D4B880E3B2AF1AA27 +107: EF7E4831B3A84636518D6E4BFCE64A43DB2A5DDA9CCA2B44F39033BDC40D6243 +108: 7ABF6ACF5C8E549DDBB15AE8D8B388C1C197E698737C9785501ED1F94930B7D9 +109: 88018DED66813F0CA95DEF474C630692019967B9E36888DADD94124719B682F6 +110: 3930876B9FC7529036B008B1B8BB997522A441635A0C25EC02FB6D9026E55A97 +111: 0A4049D57E833B5695FAC93DD1FBEF3166B44B12AD11248662383AE051E15827 +112: 81DCC0678BB6A765E48C3209654FE90089CE44FF5618477E39AB286476DF052B +113: E69B3A36A4461912DC08346B11DDCB9DB796F885FD01936E662FE29297B099A4 +114: 5AC6503B0D8DA6917646E6DCC87EDC58E94245324CC204F4DD4AF01563ACD427 +115: DF6DDA21359A30BC271780971C1ABD56A6EF167E480887888E73A86D3BF605E9 +116: E8E6E47071E7B7DF2580F225CFBBEDF84CE67746626628D33097E4B7DC571107 +117: 53E40EAD62051E19CB9BA8133E3E5C1CE00DDCAD8ACF342A224360B0ACC14777 +118: 9CCD53FE80BE786AA984638462FB28AFDF122B34D78F4687EC632BB19DE2371A +119: CBD48052C48D788466A3E8118C56C97FE146E5546FAAF93E2BC3C47E45939753 +120: 256883B14E2AF44DADB28E1B34B2AC0F0F4C91C34EC9169E29036158ACAA95B9 +121: 4471B91AB42DB7C4DD8490AB95A2EE8D04E3EF5C3D6FC71AC74B2B26914D1641 +122: A5EB08038F8F1155ED86E631906FC13095F6BBA41DE5D4E795758EC8C8DF8AF1 +123: DC1DB64ED8B48A910E060A6B866374C578784E9AC49AB2774092AC71501934AC +124: 285413B2F2EE873D34319EE0BBFBB90F32DA434CC87E3DB5ED121BB398ED964B +125: 0216E0F81F750F26F1998BC3934E3E124C9945E685A60B25E8FBD9625AB6B599 +126: 38C410F5B9D4072050755B31DCA89FD5395C6785EEB3D790F320FF941C5A93BF +127: F18417B39D617AB1C18FDF91EBD0FC6D5516BB34CF39364037BCE81FA04CECB1 +128: 1FA877DE67259D19863A2A34BCC6962A2B25FCBF5CBECD7EDE8F1FA36688A796 + +Hash: blake2b-160 + 0: 3345524ABF6BBE1809449224B5972C41790B6CF2 + 1: 082AD992FB76871C33A1B9993A082952FEACA5E6 + 2: D9BA03C1E5CCF9083FCB21F7AE01D20BC0A61116 + 3: 147420788D27F83264EB55BAD410D304540A21D9 + 4: 72D1B592354DFFD34B9A33A1D9696BE6B2A76162 + 5: 6BE786CBE2439FEBEE399618309831D8CCF8E68D + 6: 508A9AF9195DB76523F32DFE0DEE2615C4EAB892 + 7: 83A00152738C9C2D0CE6980BC093C73ADDA0A707 + 8: F422108C43BAD02773C989E90A027729B0FD3B8C + 9: DCFFC21F7D90B79C7E4D72CE1CB68E9393707A0B + 10: B673B12C3BF35B84553157DDE2D64F01D53170F7 + 11: 24A88757AE5A6AFB6F09E4D4BC0C0D1F7784E693 + 12: 444C019756D384677D54F4DE70E3708EEC20BCA3 + 13: D6A974E117A3B5397082A2638586CFEE6F94DAA1 + 14: 9F2FFE2B4CE9318159CD214811E856A2EB1996C1 + 15: 9729578C9F0012170273AD01920D69F5CADECB59 + 16: 2DED4F07D5B7E830711976338C12D66087F41E34 + 17: CC6A494DBAE2D0C782B9647F5E268D20C89DA8E0 + 18: D913843A8FE13C412FE21736DA128C4F6E5149E9 + 19: 6AFF7DBB8AC24568ABD268442FD2A3210B5A6FBF + 20: 52498636C61D58BD46D8BAD4C06B572BD08FF983 + 21: B91DF3153932F20DAC48D405689DDF5A3C379559 + 22: 3F6DCE460E8AE23C222EEA45BFEC0FA65E3D118F + 23: 75B340DE05638C190C1345F1823A12DC019F439A + 24: 8CEADFCD30B82A4686621E570F3A97025246C411 + 25: 362412D1AED48F91084715F30787107902601FD2 + 26: A09C9A7A20AE73A689FEBAB171C585AB0549F807 + 27: 9D33DDDEB1A31DF8C33C4F4BE8A3DD7EB99611EF + 28: 30F738CABC5598A35655D7E727AB009BB546B84A + 29: 318919F5F5CC9DB7E15C67D1BAA1FA660BFF2AE6 + 30: 0F2A40B3D3C8E9C6825218FDECEE51B65FE1F261 + 31: C9F4187E8EDBB4CD82ABE892BB0353C4DCA32390 + 32: B1B133B99F516E6C82CEDA892EF5AF50FA4B4E71 + 33: FEFF72EB10133687CC4BA345A409491346E4DDB4 + 34: AB2EBD942C73370C568A092CDD52441FD7427065 + 35: AF56FEBC670729FC0B945B30EC5FD4054D433B1E + 36: E0608B977EAA078A4ABD485A802AF1C52F44754A + 37: 6100835CA6FC89D1890A65CC01C322D195B23CF2 + 38: 25824CA722292042AA1182186BFA9863EAE3D1F4 + 39: 63445DA5519800A2CFBA55FF6C365BE2A9899618 + 40: 6BC0EEA6FD440873D7AC2A6A6D3F3651BDFBEADF + 41: EEE860BF14DF86BA903E1F62146F891820FF2CB4 + 42: F443B28F036AF2B79A2187912156129DBE28B943 + 43: C6A3BB461788D74D06EC8C58BFE9D3DDC5178BE3 + 44: EFC5B57327FCEFB5AE21FF75F65101D1ABAC09D9 + 45: 623AA14E42E6F3B8C4CEA1E5E1A49BD668F27BB6 + 46: 42098F0935B568DECD5E172321504A06820BA543 + 47: 96EA35D6AD0C91C65752562CC523E0F66E6E6DA9 + 48: 9B3BF9CDFF4CC55957AC4FB77F5BBA5CC94E4BBA + 49: 500F61E1F6BD816ECFE76B0A499FAB1A945BFDC7 + 50: 2338D3A37BAB81B165FB9B0D96774366AC1A5518 + 51: EACF1749527B99280B7A3108A8B9B79E58421F68 + 52: E80BBA9842ADAEAABB298CAA14435EBAE9F5B0A1 + 53: B1F5257EFDEE106309CE66B6F59F4C138C7B73B5 + 54: E61F350020AA8E4A83D2AC0635ABA5666B75BFFE + 55: 716A0F2CF96F308233E6C68150A1AB2A661C3DA7 + 56: E640F12A22189A12AC432BC56B24B1E4EDB0FF80 + 57: 32FC87D32E3CFC5CFF05144634DC78F8F02687A1 + 58: 137421D9E5BD9B351ABC465D61A22B2815D9F259 + 59: 045A2FD55DF2CCCA08CACDC0003FE1A026AECDAA + 60: 36DBCF4C47E0257A5A7DE43422CD55644EC22F39 + 61: EAF8D4A6B16B0DD1AC6279FEDC2B49FE742974A5 + 62: 4BA44618105A50075E3ECCF9535A1A7E758626F9 + 63: 1CB62C8F6CC806DCD161F08C81E704AE32AD5B3A + 64: 11CC6661E922B0E407E0A57249C38D4FF76D8EC8 + 65: 7E8D79A50A0FBD8BFA2C605E5AB883DB8B4EA2C6 + 66: 556938179EC873CB5F36B2F415C05EE14E3AF19C + 67: 214F921517DDE6F4E7613C99BABA4F2A7B7E086D + 68: 46685E91EB0402558744A0C9EB9F1E9B2C09E835 + 69: 976CF4208EF2432FD746EA12CC6CDFA2AD8C400E + 70: B414D0C48CE5A10DCFFEA9E625E0B4D890350145 + 71: C863CCDB88168D400BD01FAEE59BDEB3B1100ECD + 72: BCBBBB50F8D8495C0A76974C593611EF11118B76 + 73: 5D55F85EA7290C9AFEC642BBD8CDB087D96235E8 + 74: 7CE4700EABB3554168F3442D53DFAA87273A75BF + 75: 9F2CAA037876C0714A3C4F0EE93638266215B74F + 76: 326D352FD19B1E1D6EDFFC370BCCAA5B65265583 + 77: 17784225DEA6523A218939BB2C7FD800E8F901FA + 78: 64202454E538279B21CEA0F5A7688BE656F8F484 + 79: F434B89C355F32288849E69C831C43A1D1A973BC + 80: 892EF8517F0623D92778F0B85B7656F42EBDC8EB + 81: B4C72E5BCB122487DE719986D2A64D165FA2ED5A + 82: 625F82C023CF34C8E387322F254592A79A6ECCDA + 83: DF802769136C3A61B5F52602D6C9B73752716C97 + 84: 910FB3FBB922399F9C62E56ECA482D99E5795454 + 85: 0FBF8429F92927FEE97DC2BA4EAB76BEB862CFE8 + 86: D5E38C9B12ED4A35DCA2990B8D47180AD449BBB0 + 87: 2D9606C1F5981F54F1D6C2ADB5A809052805F550 + 88: C5B9110BFB2DA0CE0A55BA3F2BE0AAAB233C5A14 + 89: EAF391F4C3BF6F37F67CFA86CB3284196778F18D + 90: 3EA61BBE4F6BBD04DA75F18F5BFAB2C9CAF41611 + 91: C65BE6423EB531EAFF051098FF974168DEFFB39A + 92: 6E01FD16DDA5A7A2379FCD63778F55A8629B42CB + 93: 51A8BA40AB41BA72EE4B29B47BBCFB36868C9813 + 94: C495CE12562AAC6B126A8A131705C272D4969864 + 95: 08C93C1D82DE592963BABF7E3B8BF68CAD21C286 + 96: 732B3B39A2D7D9C69FCDCF4A9DA9D1CB4277EC3B + 97: EB7BF339D86B6F1E1ECB0D2CC3F1075DD1FEFB80 + 98: 36974AA1E83255AC9171AEA642351742005D7654 + 99: 60D55DCD8E9DC4159D840E57601D1AB937EE04BC +100: 54709EB6472DE7CAF362B93FBAB834A7A609F2A2 +101: A1BDE91C5A50CE658D9B812CCC7550BDECE3CD63 +102: 6001F23118F26AD0A177546BF788B917C81996B5 +103: 5B9147BDDF6072345DF9C1A2C1BA138F28C079C4 +104: 816C7C3ECEA245AD5FF19F59F27FBE346A54B469 +105: FA44AA7F1670D3B4158BA23C4CCF0651512406BF +106: F4337F09A0ECC6F79B837EC512AFCC2A9DF79B49 +107: 41D0368270C0346A974784BE3DF07DF66EC11D85 +108: 6E59AB52A972C60FE6CFD20615D9CB9517503C00 +109: 721D857AC832372BC36D6B38929538E2661D51B2 +110: 84DC2CD71FD10A4FC5FCAFD521E5496A157BF870 +111: 139105BC993171DE9FFF828B5E8A3FFD15297DF6 +112: 866CF68F16E920CCCC4770602C4F4952AFA6A238 +113: CB740B92FD7A86874A2E31DEA72210A41143C1D0 +114: 0F21249127C64FB12E327C57CE6C36B337298AEF +115: C4C939B4C886EB83DCBCB2EA59100143A094888B +116: 8D8B95E3506414341DC90BC7F24678373B4489B5 +117: 2B8EBA1D0B9400A865378AF46E9D9E088C21CB6F +118: 35E0E3246C15E153C12F7F0F2CC7EB54B836B193 +119: 9DE8DE7278578E387580FBF2547FC7EA34096A36 +120: C1D62B446D90A6F6AB19862E37B9BA2BB36545E8 +121: 98DE812D22A091F511537A32765F6413D4D9AD7E +122: E324F1547791E8B833E68C8C54F0407B54978275 +123: 63F4926B58D517D676813076F8ACB722CD7A01E3 +124: 872CFA83AA4A9A8E6868CD68897DB04970F8E215 +125: D5A0E33125F65896D1E02F94F6E7B2249AFBD7D5 +126: A5EE27706E706856298547F5DDC5C84FB4B998FF +127: 535975C8D8C5DD9ED14A9204757B06783DD7B1FB +128: E6992372AB022447B34F6D6032FBAB707A11ADEF +129: A7BF25F1599102AB631E3052E8303A2C097D1A7E +130: 44C843A35F07FBACB9F7819CD11CAD0359A7A6B4 +131: 86859704A90DBD20F8C6365353292BE6AEF4675A +132: 7E42D899823F55C07620599AE2EA9F61D200DAFC +133: 16F26BBC5A68AA21F97E1E847A7D8500122FDEFF +134: 982C6A68E68D5A692A4EC82B4C318887FE85FF6E +135: F036FC6B3A9D6DA82B52ECF4DE3D82BC8E38D075 +136: BE941DE2A77DAE6763E6143DD3689DBF18831E9E +137: FAEE2E5227EF4A6EA64446F1C2B5220B815981C2 +138: C667456AE916041AEEA1A358516A8C781AA6D17F +139: 43103A30BF5B2AAD39AA6864B4DC255CD4716418 +140: 9EDF855E4E411589D5C6BA1FC5D1C6AEC709E664 +141: 11E94407FBB164313ADF4DC5DA6CCF382A72C6D5 +142: 9B0ECAAF97D7724A49A70958F52EF78EFB07F1AB +143: 0D72CF6D0351BAE24D684238CF2F35EB78891828 +144: DAEB6FC65CC55220F2856E859B18E34B1AEECF8C +145: 8FCB3B9085D5FE4C3311D7B8251DE553C58F25BA +146: 37F740BC58504E705B9BA7D817963000EAE6786C +147: C69222050BA9A1DD7BA144A4B2A4385D0DCF0E8E +148: C9A7364BF1F15951585EA8E18A7DC7F34E7CF807 +149: FC6D567415981FC5D4198D899794313065A92551 +150: 6CAE5BCA89D61886E992C41E8BD2F8FF7E20BFEA +151: 806A1FDB3213323C1BB6F71EF59EB24A8E5C51BF +152: E672AFA75F19AF93124EEFEEBDD1BA7C6F3C4145 +153: 32AF925E77B58DD3BD0B5EB7F1A01584ABA6C5F7 +154: 8F2454474E0168717AC71327A5D478C4A629D7BA +155: 690C8FE73AF60FA9EFB53EA7DF43BE8FE07459E6 +156: F6D81BE22841D8CA69662342AE1D4A9A7F6F2277 +157: BC37FF42B2636850455A360F54E8658FFC6CAF1B +158: 7E6652237F861B6163B488D7FBFD0BC62A103582 +159: 94E6827AF3EE1E51C1F0B9F1A5235FB8FB70E96A +160: 52305B52403FD43054EA48937FFFA73BD2645E85 +161: 6E76DD51661F45C77A23C1C779D461AAB7A7C22F +162: 61849C549D3D38DBA2BF7E98C412F9C9ACD513B1 +163: 39813928E21F4DAF72E3285544A318ECF98D813C +164: 9C94A2F324147F03ADA5EACBFB802644D7EDFA65 +165: 8A2C08E547BF37BAA4AF6B6A30922979DDBB9766 +166: A8A876D38284AB64396DE23F1237FD34C2FD4A63 +167: 078C9EF520D26927309642117136DE00CB00992A +168: C44F0EF88C20FDB32AAFA6B0294A2CCCEAF8612B +169: 064DE4C0318AA79BC00F9CB22BD6A2E7DA535B9C +170: 8931F72588D1E6614832236EADC2997A5691EFAF +171: E9902550836A48950BDF5A63E37F117FD45B3C32 +172: 96D97FC0F694249A747FE88C9439FF26BC0CB83F +173: 2E204242469BF511FEE24C5B8A5B052C9857ABD2 +174: 96F4755AE3CC7D6387368E9367B1E174475F5ED9 +175: 26DCE87C191AFD557869175DDDF850B4035016E7 +176: A0D9CE9E4D5B55C45AFDFFC703A031BE9BB29ACF +177: 09BDF1C2FFE11FFE1D4E03FE5D808FE874743279 +178: ABBAEF9016CCC804A4FCD0DFFE1025793185F864 +179: E6B721A78CB4B9E25D100738D8202C317C73CC15 +180: 5B0E055B51EEB39B67B45E1A3E2B1475DBD22729 +181: F5CF64788C5FFDC9AEB83AFE55E1C470DFA601C6 +182: CB06E8743280ACAF9E55AD5541AACDFE3EB1BFA3 +183: CCCAFB4941602D4790A0A6ECCE6D0069F02030A8 +184: E36A5D027AB9E9DB157EFCFBCC8F17712245CFDA +185: E416E2CE9DD29D2188F03E4B2073E9DADE25D215 +186: F6235F265CC28B1BED62469D316A6109C133FE5E +187: FC70536DE716C655ED333451B9C5416F4EED07C7 +188: 69AFF1A75E074106762CAFA28EBD52B6B5D90A49 +189: 9C48186EAC0FADDE94185045875702B7C9478AC8 +190: 12644FFE3C39EC3C9CCA3A661A13A1D7CBD34F9D +191: 6CE8BBCACC200E7A78843D479ED931D4BE1622E9 +192: 3807D7BA0B12F14510C36CD3DC867BEA4A24C5F3 +193: CC621CB0A8A4573C5330EC70C455270265E3CFD4 +194: 464AB86E899FCB9FB7101BF97448AFDA4C9919AE +195: 11E7B2A04E3C271068D6F15C7FE87D06D990D3D7 +196: 5EE7F04DF2B361C5328D191CFC037C1259DD2B1A +197: E3CBFFA5DACC1BCE117ADC4CCE95D15D9E0329E2 +198: 9D3D4521501FDB4B6007EFD7885164EE8872A579 +199: 3CBC27AFC4872BF7BC98CD354E7AD8996F947168 +200: B83A5733CE63F2DD8266EA8EC93333D7935142CF +201: 7E7E2058A18ABEDC54DC4EF8B9CD797FF95E6DCC +202: E6E0046460CFB3B1DA4CB9A19B6BB5F31F978E28 +203: 8EE11462985FE95EB711F7D941C816DDED7C95C6 +204: 5132D140BF66D8BCBC58B1DC34A972575DDB51AE +205: 3EB18CF69D5435CAA7BA4C7FD7EC3555E9B3E725 +206: B42B17372AC5B3036D8E067E693F73E935BD9D45 +207: 5DEE6C27BE536C94B2A9E9228F6AAA4C781C5588 +208: CEB13F3FA99D2D9892B0F704422318B77BBC5F85 +209: CD5053DFA04346625229D8CCC398E032D0D0628A +210: 2D824961BBA32C43FD507787BB0CF0FB55CE4D19 +211: BC2A382DE0B9C4A315428954F09B77ECA75DAA48 +212: 173FC391D4955EA415E52B3D0399CCE2D719F764 +213: 8B528FF527889A99E4B0A591324E62A2F3118214 +214: 5B715BAE5A69DA3FB9A83163BFB947606936F73A +215: 89D83102EBDCAAEF3543EA3834851DB22029C09D +216: EC8802D14CFA38FE98FE63E6B3F1BDB3E7D21553 +217: 936644C0577DC88B2859B6171A0FF1C0CAA69F09 +218: 52E58F4975ADF680F4EA8FF6035EFCD8B5872D22 +219: AE824F652DB88351BCE104D0F3B8078897D82D5D +220: EE6001EFC8EBEE26639414C4D89D50DCEFDC8D94 +221: D0AC69294328955D4A656E8A1948519225ECA936 +222: 5CA8C4943132208E1A4917C14916A9C7DB14146C +223: D5DA697B560D31914A52E540D46AB971B7AEB81C +224: 7965F11D207997CF686AB4C480AA510BC53F1CB7 +225: DEBCB67C707B013472844E54B19F0FE2599CE0C2 +226: D4D2813A7A8361D0FF6984C1A2D2714B5DC13C7D +227: A5F5DB114ACBDA81E269B5BCCA6FA1CDAF60A636 +228: 75E5F2A2E56586AD611D86D619FF01CC1DBEA46E +229: 5AA68D13040B18872E8E96DF8DC779C9C88BC8D8 +230: B0A2F03F4DE93A00C520658B58BC41233109DF52 +231: 6F386F4D127D2FA1F2F4A8ED3E8A41509DF84CA1 +232: 8A9B7BA28D741469F2AC8B4AA8580991BBC5BBE3 +233: 608B8724F4A5024DC2CFF7A9A52F455B45CA5679 +234: 664C7DCAB4DC789844F04DB2CACAA1868E59B8B1 +235: FA506330D1337AA6FF8FF0BA22FCE87CD6389253 +236: 03DF08E3C2DA86552577A64FBC8E8497B77D9784 +237: 27C35B1CEB3F40EA76230702E78A52E7C7F34EA1 +238: 9DD6A68BEDB58B9E88B89638E98543FF118836A5 +239: 86347CD4FE48B0E6059E8A6A0EC8DED0A9AF85B4 +240: 1EA41C7B2FA4D908F5337D1FA5E1E8CB3B21C8BA +241: D57129319BD0C4F30221A64305512FFB239A7AB2 +242: A9343153196BA3E98E639EECF62D5795613E50B9 +243: 11F7D62D79F0C06A6D016F36B15173D6A1C25F19 +244: 98774533C0C6CDFE0CA3147BB624D65F2A61107D +245: 873D52BEA652DDC833F271295511BFB164912BFF +246: E6039C14618A04E095F517A38BAF1C205F7ED2E5 +247: 3642188C11E50C54AF7F975322631EE43AFAE0B2 +248: 9C8B66B38DB900EFF221D1848E3104D134D85476 +249: 2DA1BFF1134CC8B6A690B1070F7B159940550470 +250: 4513CC83DC564FC1174B83DEB513BF5DF045560D +251: 65AFDA952D796653E1674F877D44AC22C3A0E10A +252: C49BE08EB9F989F69F05152EDD2AFC2CDDF3DEA3 +253: B1A310B7CE162B481B9A275CBA17A7B57E8B6672 +254: 4B8F017B6C1AAB7BA3466B2C6EE28DEE9DC3978F +255: DB5A3CE0593548C3931B518DA2F02C0550694841 +256: 2433AF65183F411941345962733A8860DF650139 + +Hash: blake2b-256 + 0: 0E5751C026E543B2E8AB2EB06099DAA1D1E5DF47778F7787FAAB45CDF12FE3A8 + 1: 03170A2E7597B7B7E3D84C05391D139A62B157E78786D8C082F29DCF4C111314 + 2: 01CF79DA4945C370C68B265EF70641AAA65EAA8F5953E3900D97724C2C5AA095 + 3: 3D8C3D594928271F44AAD7A04B177154806867BCF918E1549C0BC16F9DA2B09B + 4: E1EAE5A8ADAE652EC9AF9677346A9D60ECED61E3A0A69BFACF518DB31F86E36B + 5: 663694AC6520BDCE7CAAB1CF3929FFE78CB2FEA67A3DFC8559753A9F512A0C85 + 6: 274327D0E2A207844988FAC0B39E071422E3F621913D69A5CFEF23B38601A56F + 7: 9DF14B7248764A869197C35E392D2A6D6FDC5B79D597297920FD3F1491B442D2 + 8: 77065D25B622A8251094D869EDF6B4E9BA0708A8DB1F239CB68E4EEB45851621 + 9: 8660231B62CE1D61FC8BE93BD6ACDB43FF61A7AB4CC9494F0CC803362360B07B + 10: 8B57A796A5D07CB04CC1614DFC2ACB3F73EDC712D7F433619CA3BBE66BB15F49 + 11: CC932BEE351BE391849C87925F2E00A83051419DC310B288D4304D4ADEA3D0E0 + 12: 99BD72C73BEA193F7040AC279BD656CDEC7FD35E097A657B6C03B4FA967223ED + 13: 695E93B723E0A08E8DD8DD4656389363519564DAF4CDE5FE95A6A0CA71D3705E + 14: 4CCE7128E4F659BA41EE163C45280D468163ADC8C76C4937A0BBFA0CF3BDEAE7 + 15: 929CEC40E9E746E771C6AD05CFCF37641254EF5E802FA71A02F8982F525F2B00 + 16: C7CB5D1A1A214F1D833A21FE6C7B2420E417C2F220784CBE90072975131BC367 + 17: CED0CD609F3C8FF85B9CEC93BBA556DBE3CAA996AC5BEB629D4512473D6B31AE + 18: 584C9CB4DA3BE635D86E803C9EEBCCFD27FBED4AAE27B0207CE3C934A0043AA4 + 19: 9B508680D1F75D5F1E5306FBFAF7E88621CEBF39F7F5CBF9E2DBB7EBB88504D4 + 20: 5D597F201EAD11DAA0687185C579EFD702E288D5BD72B6B21238A4ECB52D288A + 21: 85B8AFD95165D04681AB948F2F0545C47A8D11D9D1866CB7ECC88BC31A634891 + 22: 93C541C87FB52D506B1B262E49ED71689A15B745E8F3E003893C8C59CFC669FE + 23: 395D6A5E3B41B6151411B9B22F07FCBAE6C7C30DF59C10CA2DFCFE333AC8E3FB + 24: 8D71AEB3137041D31ED42466EA5FDCA2EC7A35C7701D142CCB813F8C614CECA2 + 25: 3B0B9B4027203DAEB62F4FF868AC6CDD78A5CBBF7664725421A613794702F4F4 + 26: 7384C8812F6803D8649BED21A3ACBBF36239BBD17274D249369DD65E6329FD84 + 27: 3890962F7D604FE0FCADE7D8FC03C7E6285DA2035BAC5A9362C1D68A353D5350 + 28: 9DC0B41D6A6A6C194D04336EB383AC7F4EA537700D5926346DFB1379E9453460 + 29: BD78E1C368D70B968E194DCA2C6FBDA605A67D5E52824289E058C93EEE073EF5 + 30: 4CC3E428D63DC132471D3135D406F8D6E30D2480D571BFFBD64957BBB090F582 + 31: 9ADF65B53153B1CAEC84CD717E00E01C2000D0569704CE38D065180ADEE5D964 + 32: CB2F5160FC1F7E05A55EF49D340B48DA2E5A78099D53393351CD579DD42503D6 + 33: B7634FE13C7ACA3914EE896E22CFABC9DA5B4F13E72A2CCBECB6D44BBDA95BCC + 34: 9BADDDEBF24552CB1F66D32990476594E5249A729254F7B5C840728A42749A45 + 35: 13891B823D3A2CFE0D1A5E60FE89D8C091524F994CDC3241C4DA19C4BB3C2C6B + 36: C1B7EB8D130D705C5FA9EE8061076A3151F2E36E42D9C9289D85065B9AB343DD + 37: EE6A288C4FCAE34572FC6DBA3E0B7D698BEF65DCC63BF28EBD74207A2065718A + 38: 1B5AD5F31E4061F423EE11E3DE88FEF05DFED9393C268FD360D05FE4465FE40A + 39: 87C40636D0EE94687FDF020E3D165F4E45F21D62FA04AA2B9103A8187DA6E64A + 40: 70A3082DFC7582B9D252939A474338DB1F94A6DCC7724709377797D17FF51AC5 + 41: 109036D1DECE657AC6471F7F7ED33846986FDCB9DAE8A73EA0881607E5E45F13 + 42: DEDA4F3E98E58392ADAEE3C2E7B91D172551C50945A8AE9E9E1AD10C2AE510A8 + 43: 2A82CABBBB09956D212D182CFAF7CDE2F55FA33F96E3A1AB19FCCFDB668CE2F2 + 44: 4A21B38C69F755C016EBB4A66EB76B4F9D4087A02FC8C3C257C1183EFEBDA824 + 45: D3ECAA4853A092755C3692CAC3FEA5D9CCFACA2D32B59CCAE151705333359E79 + 46: 0AB5250248686AFE6ECA3F3ED89E061C0B3AE2A13454B907BBDB643A72B25A66 + 47: 2FB57AB5FC0927E8301B6933325530E90FA7A94EAEA95BAD7C3F2F1052032900 + 48: 48DE881E6C1DC35253D9C8D56E773743640F097BB7274B80EC090F1B33D1DC2E + 49: 71745158A70425E25A8446122DDA82FCFEB6BFCB593B25D79C539C6B989C526D + 50: 45D3D95F04F304BE5A61EF38357BD01E61F9BB7F8C9979458D846D9899436167 + 51: D5AFEBAD633B7D595E6C8482D8C9A429091F58ACBD84725ADBAC12E8BE80ADA9 + 52: 06BBB3B17EA95E7E00AC21B8632F84615F11456FABCDA9D99CBF079E3134CFE5 + 53: 02B8E881B5F78B451995F07116AF3549066CBCE498497F546A9772981779D908 + 54: 370C5EFE99822C30460A123467E8F151F012065BA3639BC0407ED3B3609E5D56 + 55: ACE7DB9E8F298E823B7B265BBCD004577E0029256C48684B2D7A7CDFCBFF5E47 + 56: A6C1D35F74218E57B4DBD4ED467B41981208666738FFA0D9DC53D3DE96BE702A + 57: 25E44457F063AE4EA799502C38D66EEEFB46F520B4FC9A298DF9826C9D62EEA9 + 58: 1B35B64CF659D6D7D0CA933C9A52FB0E67FBA76A304FADB7C47DD8FF6B6FF0FA + 59: A72DE68FF63BBE9CCFACCFA6859AF660BB413F9E5D0200106100919C10301EF8 + 60: CFE37AB9C02BF84AFA7A734A10317150479B791A27EFC374DD669F4EF67A801D + 61: A55A2C06F3DB74C95B33D1E962DA18772C3601EB13FE0B86A78667B2B9F9DF86 + 62: 1B8A9195724AC01AD7DA4A76C2545D2F3DC223A0242537050D7395F588748079 + 63: 29E41A64FBDD2FD27612228623C0702222BF367451E7324287F181CB3DCF7237 + 64: 10D8E6D534B00939843FE9DCC4DAE48CDF008F6B8B2B82B156F5404D874887F5 + 65: 84C04AB082C8AE24206561F77397704B627892089A05887A2A1996472BCFE15D + 66: 2B684BABA4A7245E38C3263D85B5524A51BAA8CA18444AF1B5958596BC30D424 + 67: 1D59FA9501213440975A0B27E4B52EEA7274F8794EC35B8EE4824F7B00897ED7 + 68: 60669608711B9DF3715B631B474D5206179A81D054EF5494612899728B55E103 + 69: 46060CB9DC6BE177BAFE5425C4F84F9143B71CFC75DD958E15FF7A26CC92859B + 70: E7F909C8E018BC36B59A8E7848D16C05D6BDB0EBB91FB9BAF54CC328192CC362 + 71: 7A9F75439C68869A6595EB63C61DB2BC213D3EF067EC0CB3F25E02E554FCE2A9 + 72: ADB39B3E53A791DFD32ECA83191EB82FDEF4321AC504539B257C3376DA240ACA + 73: 240CA19B3671DCC5EF174331FB0DD24B845DFCD01B0FBE52FA72A29BCAEF1373 + 74: EBAE0805FD52D3E9F5F29AEB33B6BE8CAB0F28E668990D3CB95444D9EF90B932 + 75: EA7C3C052928F0FA3B8D86B19C87DEE905E8A4B26A0A23B3C8E8DC7255EA82D6 + 76: 4AD32C1F2D18C8B7DC29D1526D7C751B89B86882FB12AA3CC9C6EDDB7991D266 + 77: C61F81C3E6B899D0501B05DF1DE32099A7B0E878689DC2A3FD5583DE90A74164 + 78: 068A8A0B96076A2773A8E00E00E57EEF4FB26886B521285A6C747130850792D7 + 79: EFAB0151162523B18147CBA89679BDAB2D9B670F5AE222A34C360C094AF1D441 + 80: 066DE1009DACA2B8390A9DC734BCE547AC4E3CC4531645BB8B9CBC0070941D88 + 81: 9FBB33B95E79C5C1683AB09A6ABFF6612FFFB4458543DC8BBC7723A6DC2BF2ED + 82: 88FEA89237618CFC0270CBCD08E7FFDAA8933607C0DBCCB8DD075B84FBA83B11 + 83: B1960BEAA4FED01453679C7D6CF78D25442BDF92AE51BE479DAB18E1B2B922D3 + 84: A7D6821A97BC57CF6B5E25953C689439BEDA79364C903A3E64B6671DC9ECEB2F + 85: 90CA93ECD3E0E7C839E4FC0F2E4748954A89B2C7338E55FC18A53CCD08ABED2E + 86: 58FE5F45B9915A5B177F4256B51CE5781662352A2DD620A946B8755213FBD61F + 87: D109C8EC77E2253B5E7C761F59B184815E46B06CC5132A92511A93DEAD6315C2 + 88: FD9664ECB814785C8474188706E6AB0952925F9B9D8E351665CED12E84D92FAD + 89: 81342700C48F41EC5B54180D560E73E5AD6782717B2D3320B42280BE11F0873E + 90: 523CF9A356076FE8C3538BDD752BC43712C7D28F29499AAAE7812F1E4167840E + 91: 9706D70E28A9E99DB15974B1C01635868A62C6567EB40903ADAE58D417B882F2 + 92: 2216F01255FF24422E18D906C64506924940451E09D4EC17E4DBC8EA6D14EF59 + 93: 64AD22E77FC9F8A03AD6E06A067ADD9F0E0360D4533014FA286CCDF40DCEB231 + 94: 9908418A2BB564AB9607D2F863B841DD4FE47EE370DDE05A9368E400F7F9904B + 95: 981A7989084E74F6D5FD8870321E860991729EED88E60D85AB5FDAA769BE6FD2 + 96: 6528EA458EFD23391E968E0DD3A40202AC94E3854D1A4642CBBE0D13A15CB849 + 97: 767FDCD43CF16CBF980FD560DFC55F67BE20510F9A0C8FCD5C749DA8EF23FD7B + 98: 90AFC4E366BCEE748591D93BA9F7C2E05A1FDA261B58D094F8F0450C8A31FFB8 + 99: 660F9F5D430BF89F5946FD4649AD41F806937641C808A80DA70660F53179A941 +100: 5AC86383DEC1DB602FDBC2C978C3FE1BF4328FEA1E1B495B68BE2C3B67BA033B +101: 7C15CDF3705457EB6B8EDD79FB75BF568692CCB778F85FA2E1D462F48EE55C4F +102: A8DF989766FC245EDBB4B7268AFB7380E4EA3F7123802B72AE2ADB938211C9F9 +103: 707AA875C6162027AC2829894C0BE750F5EE8FE8A64465080025F708DC200F0E +104: 6EFD41538FEC50459B6C2583ADE5754C86617580EEF3071D38723AAF743F93C7 +105: 5C22D6A56A4FBDB85AA70994B4E118224BB6DB2AFD017A98C2B992CE26EA8925 +106: A4A9739A1C83135BAB3334990B470164ED81F633D7FE79722B3AC6E65DADD38E +107: F1AC1AD3348EA6C949FDE09CBEE706EA0AECF3A93FC51A8A7E2BDB8CD7400B01 +108: 492D9EAE92F27ECCE118D3FD8DF63158CF709ED5069502263B8BE1C105196EA3 +109: 8691C32810F3220C0DF76816AF0A73B3FADE2594CBCC711B855E2CD81DBDEC95 +110: CAB341F7059D974CBC620BC423B02F58B5E1A899F416B0858AE1A736D4681162 +111: E08B3D16F0A3B663F319DA999DB897488D1677048A38FA7B4F1F783E4F1974E6 +112: D5587E0B33166A320DD69417ADB01CB1129AFF5506A2F655574CF2E264636BDB +113: 5A69194C22AF2B7040A8488738F96C901AE215965D611A572932464261539FC8 +114: D8E7D58CD37ACAD505940843A8BB046971C43E4D0593C6BB946B07926644F78F +115: 46B07CC026B633E6245661813D5ACA2BCC295D0B8AB01F27F517B4F2823D0B3E +116: FC169B3E5480E72057D828702F9DA4F08D141A178EB8ADEF03CA0708C1A10DF7 +117: AE3E241C1C394190FBAC7FCCB3DF0D0BC317C6E1A15993330E9B648C80264066 +118: F430AEEF864823D8C8B448F2D25452EA3ED7ABE2966ADC8C42636B69D0A1BAD9 +119: B0D6518AFA4E3590746AA5FD1E58F7EC06A347981177737AD6631B22C53B6617 +120: 16684DDD272DFC18DD40C16A7F57CECCA70DF0A96C4A066B97646953E7C7691A +121: E8208DE0982F3D8E9AC258EB26EB3F130CED7331797B625D6B65BA4BA2064C9C +122: 8ECD4BDC226FB29DD486CD77B566723E44C77194BA7A000734736DBB76F61C7C +123: 153D5C1D5EDB08F51F6353B6B7BDD48A9BBA14068923B8991BE59346A4F932F7 +124: 60E555A694396B48273D2D778709C208C0757CD15697A43CF0C2115599C80E68 +125: 7A4A15B47029005972A6B814D5E7F2C86C616BD98E6A06BD95CBED2F47400C67 +126: 3DE5ADB8E3BF8DFABB41AFE53C58FAD23427A148755148011B5C12B88ABA3DC0 +127: F2FE67FF342E21B8F45E8F2E0BCD1D9243245D50EE6C78042E9C491388791C72 +128: C3582F71EBB2BE66FA5DD750F80BAAE97554F3B015663C8BE377CFCB2488C1D1 +129: F7F3C46BA2564FF4C4C162DA1F5B605F9F1C4AA6A20652A9F9A337C1A2F5B9C9 +130: D3B11B4CBE513EC7B6F4BB5FF0C411DE405A8641CF221493447A35927CA3AEA7 +131: 62323574C7CDAACA448FCBC7091AE4AF3E04DECB0D3C7C55636BAA0A99C88699 +132: 89B7D0203387E0332622CA84A879BDDBCFF155A213997560FC05428E79E06891 +133: BE5CCE3E365FBBB139F68A3DA3367E42AA8BD79B15F5252F7C08C3C8F0DCAB27 +134: 7AE7702BC025692F2EA5AB0C2EB6552C7975A57C5ACB93FF115D303F341A579C +135: F7C4EFACC0A4CB5836F170EA0BF5DC5CE36FE2D88E76A9F259EAAB71AEF0FF13 +136: 6A35D3DADC62DFE7819519F92181B2F8D38F5E0ED3D51A22CF8A133AB628D6F4 +137: BACECC2948C41BEB73C815CA7CEE6C7DBF2E4219190936EDAC5E4680500DD4D2 +138: 2DCE89F76F4F37472AE6374B0825A9CD61619A995C7F49733F62B606A7CE905A +139: 7B65E63A0D17D68C798B5D5631F17C35FAFF70DBE90006589CA89277DBEEAFC0 +140: 9477E374453099D2F8679E1D9B167B5F1C4E3CC66F32BDD9A3748A10876A27B3 +141: 448437ADAD41878E6529FCC2FAD9BBDB13697B6CBB2669FC8150D3AA7E0418B8 +142: CE4936743020825F508CA72C8355C88224A52C348A21567E65526FF8F82632FD +143: 556A195BF23CBA5C3193FBBE472F1CD5478EA4CAD2DC6D6A193102A2ABD0FAC4 +144: E15DC6238E2E58E9EA212B0D7ABFD700DA3AE5120D4D601341CE9E424A7C5828 +145: A22022450276C5018D51CD321E0E195A0ADD003E33ECAA97028D6974B5712187 +146: 044CABB79E57DA22B772249C332BFB43C5D1C9B683D1B2D2B75F4C5E6773A216 +147: 766E1167593896BDC8793FB7CCDB1D35DC430AAEAFE1E7A96ABA870416587E7E +148: E19D72CA8438477DB71E1BFA48924C4E75EE4F84C7AA9B0911521C60A2BA6440 +149: 512EE7AA89497A761F0798C29A1DD37D1D86F1C0870519A0AAB69D265DF118C0 +150: 80C199310A2AB7AF6A808F6D68843136C30E9228A766618632D4E1210EDF365C +151: 43FDFFD19C692B6EF87C103CAD9B80FB86919E6ECDCB73364D260DA29A5F28D3 +152: 1D1DC1909A6A8E552A0F8964601102D0EDC89F5A02D3ACCED71826BBC5CA37AF +153: FA77DAC317E8C531246E14265ED42A87ADE6FC3CE351652E6AD9290F8A157617 +154: 5BBC0F8B1A52732ED548E600865AE53360F0642A5674ECC7C6185F2CDEEB6601 +155: 89C5FCBAF3A61D6FA4FA33C3ECA8761EBAB3C3467ABA7D255394A0E70811EF3F +156: 9B3ECEC85FA5BA5E0F1542085FFF46BB2262163979879C9565294B2C56842A28 +157: 4E301B852D473B5D12271209BDC350B4EC615C99CB07BDC2B379F86679B465BB +158: B306FBBB65EEDBD07AEA67A6490DB9158A768D8223772D9414B124FE184098BA +159: DE9FC91112BA62A5B732D4B708D6CC27A4B77D88E8F9C50DB361C6F27295B46C +160: F3AAC26DC5197EA8DC068D6BFC9E3EE2217D908DF5115FD236BA31828637AB7A +161: 3A0126EC4DB7BD8C0C44E5197A84465C9C97C45F9D1FB8AB256EB5681DC25000 +162: 7B6B55E2623A8EB6D70FA0913012E3DB03CEA4A6DDC0F5B875673A225F95D86E +163: BE3ED738F221B53726D8A54AB7171189D77700BCA86A2C614F5FEFBCA37EB5B0 +164: C90BCB90AEA0AB6A2331ECC17F4E68507B544910F3561D20A41916D8ABB421DB +165: 72F18A50776C9EFBBB1D360342235BF28AB259648DBC08480390333314E02672 +166: 2F1C635728444B5189540CF99D92A77057AED5A8C6FD7DEADBBF9D86815CF5F9 +167: C372E87D3540FB30E7316AF85B65378384DE4664A04E51B30ADA778E3A226D85 +168: D244F4CE129EF1C84EB40D30DA099A2D65682E025E132B94F630FA3FDBDA05AF +169: 930A3E1F69EF7BCF3B9A81C1FEB9758F60F9086B331FC170E6FA20B2A5738540 +170: 84C3E0415A9D4DA972A4FD9EE82D63B00099A2620889BC274ECB8606912CF92F +171: 6D0D4CDE9886218E9240A0C956836EA3939B558B8DA0B309CA686F3C631F4942 +172: 86E476F2F8BACABC996360A0D6D57F0E045C9D3085FFE06D2305601C30D2340C +173: 6CA5FCF07D2D4B1449924C8C84AD2C2E432A1F923DD365D81D9FDE3C4985724F +174: 9A7E1A3B1E01F24FCE4D115EB98E2BB9EEF349CF0D40493B8AB33727C9A1CCC8 +175: 165509739C09EC3486143B0C7C009D5B588736AFF2813A2DBBFD733D5840EF98 +176: AD191A623337F01563824B493BD735BEE26833E9224D971A67B453D6E113D96A +177: F99E6D680BCBC6BB384290A5F966B18D4DB38951ABE695C6444C319058BB8904 +178: 20E7E81E12C9AD28B7D65D3917051C327031F334A2F82B1F746CBCD7DC41F87D +179: 14675C8FE5CBE514491F7093AAD58E9DCF8DD33AB22F3A8BCA1CA5130D5E5BEA +180: E105BE1CAF056CF599B91423DF3CC1FB2808E0C6A50DA68FC9DB5693D1E0A9DC +181: 8FCADE674361487F88D58330ACB439A4B3E717341615BA691370BECF4905E057 +182: 70251DCDF7C899BDDD4BC745597B998506C34BEBC5DE115D4FE85AF2AA420171 +183: D987826931A47B9FF871A0F2A8F10BBB659598DA57D8ABF81714B48A475A1356 +184: FEA31B338415F503DCB3708D68F377C4267E96345158E7B88D24EC8C232EF2B7 +185: 3F2084DEBFEAFA75D0C078BED7EDA160459A3792A440C3718FB5C14C118E3263 +186: E55583BD588FB053F040C541DB36603E4959A7421D6281FCA88454720DA34C17 +187: 0F433DE1BBCA62440BE5D1CEAEC8138A2154B374921D17E2D6493F85529A5EE2 +188: 39CC27D72466D2D63F70F28C59950A0665005B4BC8CFAAA662AEEAF34A19601F +189: E7A556EFDAC11394B6058496B06DAD0EB7315CAE4CBD509E77E496C85F202AA4 +190: B90CF1FD5DBEE8A9C18764962BFF431DC560E113073828D839E11929D7D602FF +191: 62B227EFFE8222299E757A065F1B64AB73FE6D2AAC5D762303DB956BC82B78CE +192: 7B8F54247422C43A6D36977260E195D06E1DBBA44C392B3FE76DCF4A96C433D5 +193: D1400C9E8C7758B19E29C38E356EBC7ABE8C0887741B845426821C7F74EBD35E +194: 9C557316EBD1E9CDE622271E48F654553067C08D58986190BD3108D8BF54F130 +195: F005478FB35B7A389377B35FB6193AAB0E9F3C4138127D0905E488A3E5ED1BD6 +196: F62114D69C3BFA8493061F44DF01566E3A932E83B050B94ECA7A1F7F189D6471 +197: FD915AE6A50C06BA3917BB6D001A4B84C2FF8A906813BA78E80B043A91E7D1D6 +198: 2176A39525E6A57CEED2F28EDA5179172EC4F5A15BE41B6CECE8AB140FF1194C +199: BB831D2653AF40B4E8A1048309C1F058D21334AA20C78DC63B8EB74A56FBDE3C +200: 63C3D97A9F8894D5E043A707B0FEE7F7EC4C049A23BBF1079DF20B4165F9E22D +201: 3E53214E700694863284E7DC8DEC3B98C1EAF97ADD0C1431E3BD321D6742A586 +202: CB4E69B8ADACDCB20DD2D79655117DE489030ECC86C210A268B9985126CA9DF3 +203: 33EB4A42F46198EB7B52F8FD556FEE08430872D3AD16FC3FCA466A2D63CC4932 +204: 4FB1C07CD6E6ED8DBFAC72210F3FF9707293DAD1F8A4AA19F0AC8FF6C80F3CE9 +205: 22349AA35ACBCFFA6C84AB0E0231199D8353ADDE248CA1FF91010234886C94DE +206: 4DDF8CB3D4E80C9971A9AB171F9BC29FA4FD23ECEED01E3BC297892DE389D6F7 +207: 69BE23136E4AF5F52BB333DEB3F32F76610B9FD9DAC9EDE75B2EF0491BF218AB +208: 0B5CE2869EBBBC91BCC4D2E9560BCC21F4DA20FFFC96CD4EEC422B795641C808 +209: 82C17CE6066F792DF2DCE06EACD03AB4D202185A0A531E4AF9A1A2D7B2D43DEF +210: 97B1B2E7E7AA6A9D1821EE2AD6C8062AF397072EB9A8547C75817D0F0AD1659E +211: 5AA4D29AF9903050D5D329D4D7F3A657CCD038543DA764ED931560F799690A50 +212: C78B17FF5EA603A809668BC06DBD99B78561B37FF615F6F5E5B86165A442EC2C +213: 2D1F5FB13901A205B158C5DC01BF54A5BFA9914C6B19AB66F501DA64975E3A4D +214: EF7D3F61C537CAC2A217CC214CD9D3E80F4ADAAC8431768F9DB88A6571D3A57D +215: B23A6EB1184E297B5E9EC2E3AEEAEC3C8DE411DC614F2979DE285CE4D3802E18 +216: 6598F5924005CD92E779A5525636FB061A1CFE4E7AFE97D468EB3106817D6C7A +217: F0AEC1C2872DFF14F3592C5F7E83C0DC4D299F94A7CFB247D0A4B95B9B0FC077 +218: 709DA24C1CA042C055A3CFF57280D72F2B50094BBF029D9AED1DCCA3288022C8 +219: AFB0ABB463999CC9AB124C95993D62E839BF7409D91D1C377912A895523C3125 +220: 049EB53D4BC939E817C9572A5F0DEF95E4E38B4614969D866E738E3AE6E24936 +221: 1F9DF26FB5219482437297326737C0558EB557DA4EB6374805DD9A30F842AAE4 +222: 11151481E2199BE550F9AE696CBD9DDC9BE9686DBC77B619C005D0FB5AEF9B89 +223: 0767C2DE1353F58B416E3FA492173C9C39792DE46A34C6153D5878BA01E5F07D +224: 46D743927EC8AD5E403C9E20405200481961E7335E90C4EA9C5AD35B77F3681C +225: D5FFD30325257614674DE0B40F7B2DED3A287F48AE229B02C91DD2BE28404171 +226: C36F10F2463B839F4BBE7130C8F3ABF29A56608BDF767199FACCADECC8245631 +227: 4265605E9D5B02FC438C15823BDD01CBCEC073D57AD7A699D0126312FDBE4322 +228: 829F989B205831D3C5C002EBF8CEA1B5FBA3DAF966539E3B421B6C2C768F7554 +229: 406A227D2D1767E0CF417D6BF7CA58A262C79460F421B9C155513714187D10D2 +230: ADF7D0028E41121E47AEF77DCA9DE82FEF7FE4F4C82F2D6DF253ADB4E756F2EC +231: B9A11305F92002DE551314DE53739B1C7E31C257149AEE21F3A5BA4AF068215D +232: 49F9ABBE9007E85091827B49256730F552E4A2170A7B6F9CC461483BD8AE0D52 +233: 98EBCE2D0B548D9FB99FBD63D842C119F2CE671317CD080EE036FA69457FCCDA +234: 779042D9184C626289868DC73662E71F413C1DF4FECD2F08B0EDF40BD8D520F4 +235: F8AD01320E4BBAB09282A97511598384089A447F9A6A8FA298B65A82F1731806 +236: 1D799E024FD1627CC0395C68BEC456631153BFFAEB625CDA58411B9CBE137B34 +237: A9BA7072400DAC24052EF744CA60C8273D743AF357C851A7016CAFD599225672 +238: B02147BF83730CC51219F660FE93C63A7463C765395B6721BB842E3EF230E6F5 +239: B642374D57AFA89053DCB7F6E1E72680FB96E3F28ADAAF5AED89AB4CFC78214A +240: 546B4BE370BA614A1761FE8CEF8C023D6A7F968981E23A1E8E1168B25CCE2EFA +241: 72DAB9724F6E174D48E6B8CAF489747995D649828A1B1D7A6E8527D9A01523A4 +242: 30B611734127B847BED5C68A867BCDED79B2B9DA0A358DBE15C4DD578F81E6C0 +243: 986317B1D1AFD4692DD533A712718196D412F46A6F3166F417EF01306AB695DD +244: DB6329F783ADF7CF5A10E47369FE03C95BCF523558F3AEDF18B51A355A252517 +245: 54BB60A43C1E045644420916BAC42CC72F86649FE8EFEEC866CD8E8128A88DEF +246: 802875948F79EEFB707094E323A0FAA2D6D88949A08C044ED3757174492BD2EB +247: FFC9E261842E1AFDAED9F364F125301F20AC8FB0EEA556DB975211C7DB281DAA +248: EDFE0AA71067C62E894A516A72DD4BEF8C3917E46EB22D39626EA826B90804E9 +249: 98832102B93BAB4F82EE872D1DC96D2651CCC9E908C3CF25A56B59CCE20319DF +250: 1248D2D1736F1C125C6928BF893F581EA25BE6E6E3D3C46081C557DE591D6C6C +251: 7A01651D8FFA44F6695270C73066CA9D61733AE3C181E3477D11E7C9563594A3 +252: CED595397CFD128AADBF451002457FF5B0FC2AC3993CABD47F0FC3DDBC6D0F32 +253: 8797DB8DD8DDD1ECBEE1F1D71AED5D41ADCA8345277A7BC0B12DF75BB4536722 +254: 369B09E04BE27275DF75C180D7283C083162F35456152F0B16AE680DDA5195BC +255: 1D0850EE9BCA0ABC9601E9DEABE1418FEDEC2FB6AC4150BD5302D2430F9BE943 +256: 39A7EB9FEDC19AABC83425C6755DD90E6F9D0C804964A1F4AAEEA3B9FB599835 + +Hash: blake2b-384 + 0: B32811423377F52D7862286EE1A72EE540524380FDA1724A6F25D7978C6FD3244A6CAF0498812673C5E05EF583825100 + 1: CC01088536F784F0BB769E41C4957B6D0CDE1FCC8CF1D91FC477D4DD6E3FBFCD43D1698D146F348B2C36A339682BEC3F + 2: 7AA1310D573ABED36C22FF582DD50F1DCBECE6617A402BACCBAA2B71D6FE1379C317FF80C15216D6DA64186ACDF89EB3 + 3: DACC5FDE6F28330BE86BCB13BE11032485C6FD2EB8DBE9EB9FA217F4583FF9A564BB354DD768A672BDF46A2E1465D515 + 4: AD4955474387FBD0FBD0384A8569FDC80DC55FD99B5AB37718C38D471DE31798DF9D287473CF2BF7965E025C97743EC3 + 5: 3B1DB9196F040256579DAB7044E829FF12D49C0062F65A99307286A03A43E08962CC65B431EDEAFDECE0FAC3F637081D + 6: 5446F0F8400A98B847C7C99D303A948220E62272C33F25A2C55DFB50C8FF04586F9834E1F2E7CBFC928473711088E725 + 7: 7917C2E9694CA3A8527B3848FAB9D93F54FE77EC5246398F49FB970ECD2FA3E7639B9D0DC1E93CF9A2A31752F26F734B + 8: 8EDA71FCD7AFA16D333D5897026E2628E6C272E78ACAF021A3FAB244AEE81F8A6DBE68ADF9B649C90536D621067A01BC + 9: 68D136924ADEA6DE85BD5C010277B0B62EFB7D1351EE20273946156ED9D5EDCAAA284C1FD25CE1B0BAC547F126454336 + 10: 57EBE1BEA284B150F9E15F8D58CB2606FA37AEA4BF96668304B896A7CC9CB3F5EB02DAB3058E1A26E94E59799C227984 + 11: 516BBE48CF3F244CE0A2EAFF66D09A7162A5E338AD3151A527940E27E66A159838A99962AB85A9164C2A035794B57D1D + 12: C301D5B04393D60AE2DFA5E5985EC36C37B1E58AED5753246DD8E7FC36212E0183558CCB66D3CB97DC6E6FEB9BC5CFB7 + 13: 1521E9AE85DD32E9A903A72DCF1C969173648DEB84C991E3C4914649801286BDCE85CF59E7BF15D53D84E832B0E9A1FD + 14: D52238289F07E2864591953DD6AA4657C60335BE4AFDD3D9D65A3C5BED85165EAF59EF577196770B27533B3569BD2BB4 + 15: 0558EE75B48030065F6F53D1770521BAB938CEDF8EDEA3DA43D8670836E674DF97B0F01A65EB2151D1BF7341CE1E1018 + 16: 7DBFE0CF53262764CA067721002A7A16A10D6CB22F6DC554591EE8E008E1BD26CFCD125DE7BE3EF5A80FE5E5A7C9EA34 + 17: 971E429E3E7EC82B2DFAB160EE2607CC57F6839412DDE8E23DBB744A126B1EAE250021E800B9F40812B7EF44D82A8FC5 + 18: A11C06EFB06D8A01153B06E9827A7F209A6202864AE18AB984E89E98E77FF32C3CCF5F5D40FA1CC09336E40303D05EFF + 19: BF3BF737BDDB8FA7D4055177D8F06AD9228C6BD7AA2C8D0C2B3DA435F3C9D485486712EAC07CD456C16B0A03785A2610 + 20: 094B7F217646F1637A26076C749C40BD1DD57106501342C8DF8ECB30EFC44A6F8A6155FB77CEE476DC126E88BF1BA0EA + 21: 195AED3C477C98901175BFABAAB4834D559C3E93B6849B6C7006F2E44C73B30985C56BAB7415B4AB7F872913605C4993 + 22: 2029007DB07004086EC1DE9A61EB9597B8AD2A5273D28AB7B46A0E2337CFF1C66672F76E7330E3FBEF1A26C2A4541E65 + 23: E01514C4D1B44F784FF6FB4051F38197C2223AC510A80E01D13F701F6A0486780C72430FBD7C8DD4F8FC19C0D04D94AC + 24: E991FBFC45C40FFAA3AAB7C9884BAF823C03EA63A4A4CCC4FD5D6A6805BFEEF007E0460D221B65D28314010A75D0D930 + 25: 8B331E2E7EDA24D8DEA1CB4C1AB41FF75FD0C6506413DBA04E300EDA8324D56B8ABDAAF5F3D1E05515FB51145FE7F6F3 + 26: B7AECB3B1DD4E1EADADC97510A604FBF64C60C4068C44D7B33E74D065145DA6929EFDAD333A92EB98CB7DA20FCD39D38 + 27: ECA0856AA7F204653BE5EA42AAFC91306B3019C42E8581F52E76EFCF4D023BDCF57F73A8E5DC15A497B65FE1B139D5C0 + 28: 215C2D6D58DB2FA8FDFB1C2EA3692E9ACD68C6929F15DD751B1FE056E0F3792D46D0427BCD3AF72779E8EF304254C778 + 29: C22E73ADE37B480AB20F7EC31F1844E36E5C3064F4B60B4FF5715D8D84292348B5BF482CBBA3D09032B83A1377962374 + 30: 9E661F0789728B4A7118715C19FBD272C2C5C0BBB8F4543E81133888CC38B17554687753D193131B35319F1743CCEB9B + 31: E440945BCE0807DC2FE07018E086ED53751B9BC3C0052CD039CB48EE1A80A0FD72F38C90D9A7280C9082B9F52C8A039B + 32: 7DF0B7BE6C29A965D6C3A8056CC72BF36DD8849EB73FC1F23A3AA1902B869E0C8EE99663887EA76893E239C9E45988F7 + 33: 8116547B404D20AA0459B97AF4E75D44703EE8E41084F10080F68FC6FA76C38C1047B5E17CA388DED34B5A83C87043C0 + 34: F7D5B22F0A2409ABC271202B06CE4FCC70FA9C1D725A24CEABAFE241E9F6789668AAA797F414D560F479B9AF3156A265 + 35: D2C5E302EB59E8B2F532B37435557C6BAB3E87B3B768C22EC6EE867235D3AED81335C6A8DEAF009DCE362718EB4905B3 + 36: C07401041428648F80F11E0F5BC7572A0E25198A2AFA1F9F97B575E58ECB4CB6022A643665EF5E1820801D8C1B54A7C8 + 37: 5CA967220BCD51FE2243E456725856B1F3112EC7CDFDA93DA7CB1B1F6C672CAFEE4E17AF5B57790261D1385AE9783B6E + 38: 82378F12C4AC4EE4CF23F13E6DFFE15817183D4AA354C9A14FA352CAF7DDC114663E8185A25B76E21C8FE6B9E3486E3F + 39: AFFEE2FFE4287228EED3D9332FFDBD3CD807FB1BFAC1DDE4999E0A249D7D063B492D48ADD72CF4B906510BEA724458E9 + 40: 2C455A23E456EF7209A73DB89902BAF67DAC313147C337409FF5085423A571DBBC79AAD3C09BDDCF30CEBD4E2E975EE7 + 41: CAA00F63A96D68CA39B213ECAE9204861256CC0CF19ECB1048DA9213F3ACC56202C5D0C95544E8B70B655F610EE45721 + 42: C2B4602F2BBB0F9A35DA3C4510E430B9385B8198239E45F5E2FC3BD39C7B6D9AB8AEF8E7F30615C93CB811D3E0FAE6C6 + 43: 86C274D20B1D5E2CD36100711FDCAA8835185A899FB0A34CFF37279466329299A57EBB346A55009844B88B1CF788FEF6 + 44: 0C5F57B0D24D37F3CEB925156B11C6784BAAABE196774033010033D7E2495B157F9F238F774DF3FEC6F86117E2F3712F + 45: 49048770429D040EC90B9DBC11CCB2EDE463A5B263C12C3DC529B1E28B01398992051DE4AD9FE598CF8EC5F1589FA2E5 + 46: 2BBA965E13AD32B3832A2AD0DC5DADE3EB21DCB6A919E0CF18E08E6EC7CB5BDF1B87A0347AB8D4930FCA5E612003D439 + 47: A01DE48A297DA53FB1BBC9C43EFACB7F4FA47D95265A8211451F6D18B97D56CC19962ABED9D275034C0DA48ADDA002C7 + 48: AA8339E709CE63EC6597401E71F130D615B830D3ACD50A8F61ED68DF50CEAC4621DDAA12DD68267878CD4AB7A2BA6975 + 49: 5544A73DCDB9E814896E78793D6E149C407BD334CD802193FA8DC3459A4A776713F45C8DF3AD59B8F5005930AAACCB7B + 50: DB71BCF0B95791F47A586BE936FC88B538124904E39FA99E04BBD0E7A1456B614975ACFC05EFD5684D43ABC464390F5C + 51: 87AF4B918713FC85E73C10AB6304D5A4AC64CC96FA1B62A404A4AFDC56694038631794083117FCEF571175DBA4DDA404 + 52: B0B4DFE92CB69C0CB1264907B0843D588803B1CD9F024FEF2BA61AAA8AF0E60F584C754143FDE0E551B739DAD526BD2C + 53: 3F0E22A4790A955DBBE8C557B2299BFDD9D1A472DC9FA0E16AE573AE27C14D6BEDF6C3B368D8A3E99E394FBF1E0B09DE + 54: 3B08FF3536EC029B03D7664479F33B01DE1831623834A925433F002BDB071129B89109790E1E0DA2FE6D2F5D8C5FB749 + 55: 1A27A6C9A0C6F493D66E567061980FB0EB5819461C4976D5D30CC91B3C5DE1118E89CD2E00176322C42BFEBAC3508CA3 + 56: 40FE3F1E4F60AE955D7EBCE290DC3C867557650620F512EC42689D999F7FE6CF51459A361D688225D43903BF67197483 + 57: D7C98F147ACA01767A630CAE9F73A03C0E12870E79A715229E23EA6E98B8ED666D0B79B318E5F63E7869F07F52329242 + 58: 5D48009FA2A03966BC9AB3604B68E86F097F6E7B54B33446A52C11A9ABC447AB60781E8EB2F7706FBC1F9D75C18FF50F + 59: 2F6BD98F71F935EEB12216F11964171DE85A9BA01EF4770BBB1B9C1C27C51A50354FECB5F1C37C7E207D940355A1F099 + 60: 99DE86DE7A2973FE64726E216891F5EBBC64F2F6931F0E15082BF3EAC044C9BCEB2FABD3DC1CCCEDBC7F80313BE5B5F6 + 61: C148F35C0FB796AC801F5FBD4ACE22C52E86013E123A65F2946EBCB0BE7B020019AE4E3EDE83AF60628E076CBA4BC4FF + 62: EB059F7B0CE4C6A2BABDF8C8B0CD9E1E17AF300AA403CD35A6A98A5A73CCEEC80DFC80B6F76BECA4D634A4E0B996E1A8 + 63: 16BB371B2BCCA20F406442146AB47467ED37A24D1E51115C2ED5C10B31435BB9FB5CD4025156E428B5A57701EC5DBF3C + 64: 11C8E1A6AD99F75BD0B8DF1530549C6BF2E72D64E6703535AD06512417B0F335DFE07E63CCB8C5CF99D76EE1F653F609 + 65: 31466A2F0FF943F08D69924B1049181670949CECC738075F410A6EF41A8E25BD2A8DF14829701637ABA4C97199EFF213 + 66: A1390F24E088B0EFDCFB6B4E92F5086EDC10B6C217D629FE81A1C0A52481BF018341B183A48E1ABFD710FA1F61887E57 + 67: D00AFAECF9006508F47E6AD3D9E575EF5DFC358B0D2576AFA98C965943376910DC8BDC23CEB47D485B933BEF350AD788 + 68: D2AD61644DD08EBB11133FD86F973DD55DE4E67EA347B53E5A8A9091D7095F5F63C332673F291FA2CC0F9A924B60CB58 + 69: 6CEA68549CAD3A2729AF0F3D2E468FD95BAEFFBDB1BEDFFE5116A97938E49A6F1224B6F5090CC8288EDC176A8D925ABD + 70: 7A261025C8CD21B6FF423139C14DA4F880B56991F11C39BB9B21FDDE2072C4D572534ED9AE3F1E3FE4959E977E78BCB4 + 71: B3C46D3661B30BD2B66494B2DF909BD10D0E9FE4147DF4287EACDF3C2D88074E15E4284C9F9DEB326CA22E6AB35458E6 + 72: 09DCA1ADAE2FCF98AB4BCA7AFD2ABC68300E23FFA14345FE4057EE75E362E602EDB5A3F08055410ED5E93AD8B944DE38 + 73: 1FAEF87632ECCBA883117E6C1480B5042324071F509755CF6DA179987DB08E47F41C37B1097627750970EC6C72F7A02D + 74: D3135CCCE3CD1B90288DAB286F143E05BD02703DBDC4AF12335F23258B6399B80A8E12650A933D4262B419F973F4B72E + 75: 6B9709CF76D2C68D0EC2F8DD34CDC700356143A61A3BD0646F9BE30EFF9102F59A5D0ABC5B5306ED6701115C39FDB96E + 76: BA648F2BCD568F5D498D9505D2A0CD86B9A073C99AB85D9976E4844BDFE801FAD3AA22515A9FF08EB72FE16FAF4DC81D + 77: 433B7557735704CC1E47AAAF1C7C53141E5E2FF6420E3570181524724A09CE73BFE11EA2A7B059C7E18BEE7E5D928125 + 78: A3DE980310B14F269FEC07D5AD8D0F9CEAB17EDE99F97849F976877027FAA37DD0B492198467C0DE17649167FC80C9CC + 79: 363900E86CF859C978F1A7E860AB872BD9AFDBA445EDF044364313BC29BCCFF9C912D065E55288976B5804D0861D1708 + 80: 5DF4164BE6F6706D8A3A2FC157725565CABBD520B0B198CC25D3CFBCF2C5FC14D98EC46A226A61C72AA213284FE880FF + 81: DAF3B3602A2B6A0E918C78D72885FCD9B24377879A2E8CBA72DCE8BE3C36FF5DE39D01ADEB4D7DCA8773A3438EA415B3 + 82: 8F9751EA2DA27AA11FBCCB55960A5A5D648D34C81A36EDFC9123255A4529A018AB9230FD07551236422E1B53B06A8BE6 + 83: DA5E38532DB4AFBE5C38BDC272889FD8B18B249C9658C6806F8BE25743E89AFA06860C117E1DF6067CDE4E2AA5A359D2 + 84: E1B0A43B0F121293EBB439C828ABDCADBDAFED717796CD0A8107237158D1F55E77422212B7450CF230CDC49B78F55A09 + 85: E0415562EE8DBF78FA3A543D0BCF8823BF3240419ADB0339DBA53AEB565D861448879740051D2831DFB0791D5F537CB6 + 86: 2061E08844332CBEE5C5C81C8DB9FCFCBAA9D1B4FDC14FEA69BCB2D4B7CBA02D4D179EF0BAF4D12530584F9AA83EDBC6 + 87: 8EB1C337D49DB5ABF181CA2D1EB0D5A3B530BEA1720504C7ECBCF46FE1B0DFE5365EFD119C0BDAE6D92A1F3BFE62F4D8 + 88: 5389909A11359D68263875199B2D53BC2C473D44BD5ECCC562634DDAED80C6075A35BDA179AA3129EAEC1A11B87AF6A8 + 89: E4991FF9FEA81EA2C32583CB642941BDD7677B1680B63825F2873515C632BAAF313447BC291F03F5F493FDD66DBBC462 + 90: 8CAC77097F7412CE765BC20B900A8DA83BDD561E6F0BCAD987C677A428A42D1D289E0D8B2861135F33FD6AB3F593F4BF + 91: 38C9510779D5AE1F114D0C3C3015C9869923FFC39E38660048735E7ADC4BFC073FD90505754692C3FCCACF40BD5E61E2 + 92: 4B1D3D0763BB619F0E898E0DD6F06020BE5D1828A798277553D607F273C74498CE505F160F2961B995A1D4959C3D0A69 + 93: 8820CA3444593CA1896328D90A836B768A271410BAA29D1588D22EF68F2D0F647BD2637279F2C4469FE7DF2625EE1DA3 + 94: F5BE62D7CF77289C4D3D656BC1328ED6D32A43B2DC2A9F2615D7C8F97FF3EE28ABED0CA6EE02E9966AE16BD0337E25E6 + 95: CCD1AE814F18CE64E176D8895364C8B600CE901573079DBC7EEBAD25CA1FCC23B48E7E352BDDB625DF03B2168F097F20 + 96: 447502E039A85D13DAC5EC5D009B3D9607D6F0E37BB15A0AF7D1513D63D2DDDDDF4386F642D6D7B2B47DAFC8ACBB4297 + 97: EF3C7F9D484601A79908B61B8A58049F63A0FE6B33AF31706332C5C4D5003A93D2C4DE7BDEC5EDE6E9A9CF4362BD1CA8 + 98: BB7E3FD37861E3210AAAE39E2F2F3985B6143BB872BAD077D71E2545D2E9F95A898930BF6EA2C48F2411437D08AF93B1 + 99: ED83072604C544B7B8BA03E61D6F9EDE575FB35DB4261B7783773F3DB5B1944D6D9AD484582FC78A0F7505988B5F1A07 +100: 313B0350C45772FF6787F1E2831CAFC6C8D77162BE100819E5142F1F398BB0FB3A3123FBFF2C94927F7196386952067C +101: C746055CCDC870C9FD92D249E19641C35C4908EAF0158284562897B21255A84D9051D71E9F3C0C6B5B107D7F080A765B +102: 39D7DEF4679233C60A2F2AD6C5AB9EFB8741E330A533D15F912BAC27C61C6B26936D6B70FB8723B916FAA61CD0949306 +103: 32DA7CC15BE7214D99C928E817C13B87C23837D0F4A0949E8CCCDCF66AD9D66E7329ADEBF4F8322E4737A765E4E5B69A +104: D847BBB38306F215A96B2D991AE3ED8165BD9E25561DDC000582D968D54318D82F0FE0E331E933CF2BEB9D31DD3EA4A9 +105: CB186B1873DF28A7341697806DD13B3A79032BDC9DE6CFD5F8DABB380AA7C7CAE453BC6CC53FE0ADBB2A13861F9915AD +106: 03C82565471F18CE9EA9BC5C945179D1B05AC9D1B7D42213E4C6D331E98019F5429CD4C68449E20E17112628E35B449C +107: BEDBBB184452D605455FF4C247C349B589CE3BD2D9548CF7D70C33347BC3EC90656E3A4D8C9AFEFC42356240A4B396EF +108: B9227B25C189C98256B061A0EB3A9B95CB65A1EADA1CF7F99EFFEA0A3D13153CDD0FA6C5187C6EA3BC6358BEE389DA76 +109: F66BEA2EDF972A29C888BB2E213E30C3583F07D2FC4231A4FF39CA1B8AFE14C4F7702D6F24CB69CC119A5709AA32DCBD +110: F1D96469C28B5B74EB4451F775813DF3512C212B9B9B07A3215FCD3C98A392EDF752FF95D0FA8D991E82B5EB3C62219E +111: D443F41B6461562048765AE37FEB6C63683800C4C7AD7DC4C8D7D6B67A689F8435FBB2940506D6722A09C0F3E46D6C64 +112: 40790C95C391EB482BB315E6153838AB6622BB651EBFE979B09B7456EF021C811FB216027D063732C5B83F0AD639EBC3 +113: 55985DE48CFD269E07E5D2610D64FE61F14E874098E60B681C95393B7F2576A0842F086DA49CB392195CC1333166EB2A +114: AFBD441595F4AF79546D0F56B17CA57A3991ECDAC87A029E3A51FF4150856F19DC7D97DF9AF3E92A3E75ED5993D1F259 +115: B3D06CC9DFF506E46701E6E66B69CF0B47167E46407AA348522CD913CABC0DBF1E0CDE6AA1FD0FD986C65393272CCBCD +116: 0FFD81EAC822E16262F242DEFEAF1FBC864F7BAEB4C75DF2A6D6B88F72C8CF7314F8C57463D27B85D123C1F5E0ECBDB0 +117: 4F2717491FF76CEBD2F5F2387B16DAE119F584C8EF4C503CC4CA980B0C780F7EE8D74200EA147F0E2443D194293CD0B6 +118: 926BE35284BB3E56620FAB3224B5213E06FBAEC1D3C8642E8ED86066AE531E6B0547320CD8266CCB14E8595AC2AAE69B +119: EDDE7C594252AC8FF98A48E682D6290B0381C53835373F4F9F2BB5923DC020878D83F2FDF3B9412424D5C70EA1BF183F +120: 2460963A3BA372E93A397D0BAB1CF3E4141785818AAA7BF92AC3658E45B6B55D1C9D1705D46ABC69E0F2EBCEA48A0464 +121: F699225B801D19D3A7BB057B657A8BFD2D7E5AA8CB858EF05551319D4BE76D25865928CDC4C53464AA6D12785B870EA0 +122: E4CA222F516E44719D874BEF8622C600DDBC475F8C80D664329D79372AA070900D84912C885F1EAC370D13C28D12FB04 +123: BD05EF18A7914C1C7747568B9E5FD61F7B0384E0B43FE3DFDE6C01E38A503AC98F9F4D8150B2EB2DA889A3F4B10B256D +124: 6C701A9BE9FEA1EEA3B702A3183C35BCE6B890BC623E8FAF3CD086DFE563AA7879B4ABF639FED909307F03AE4E7D65A8 +125: E87693FE710A95FBE1B6DFF46B54AFC430D290B2C7FDBC0BF551C1E8F4F40B44B68CEED6A18B0D7C4A48648ED97FCA99 +126: B371595A7AF71BF1E8FD22BD950DDAB0FD642F5D3FED006A6E66D1E71E47867CC74A7018BE3FCA6829053454A52DF1F6 +127: 0C046DCE7C3ED50A4BE7ECA79FDEB9D821EBE28F5D82ACADAC3D7449E6892789313679018034A2CE6B42F006C02F19EE +128: A2C2ACF7CE4079C02B7F38E2EF33BFF531A31A7C7EFFE712C5348B4D616C0CBA9B152679317984EC632D0C70EB11EECE +129: A95DB6E5CCD191793AD20179BFD63E8C7AEDF0CC1084549F73127E3FCCC738B405AC2A93D692E76214320089121073E5 +130: 6ED4BDD216425D5E91458C254152ACBFE8F4751BE0045401C1CBE1E2979ACFAB8384E66816D1CDE56418A9FECBE76B3F +131: 18391E55459C665CC076D3152EE0CFAA5C498595298C4D82E2E160C7ACEA15D7FD749E1D5566A104E7F24344E0BC142E +132: 0C841025777221D8F7E1271E03687A380250B269236CF5535D5CBD77A480FCE6872E4885F62DDA17136C9AE05F07FAA4 +133: 0E6A87DDCA034B11F6D221F17F53052D85B22968ED7A2E2DFCD13DC1DE64C27639A1DDF29ABEBFDF02DFAAF687E3108F +134: 8CAB0302A4402B1E9CE08E4D87F6B9D82F17424C5DDA59A2670FC29DD8F504CC7B15474BA179DB20DCF3D3580EBAAFCB +135: 17BFC685EE89A404752DDCCD0BED6B9B0696C0F968A2D96749A2BEDE10BBF8E57F4B1AEDC9E8DE723FFCC22E3F309C81 +136: ADF0CC27BB9D359090D277C3A47A3C96E1F0C6598E9ABF460ED128BD39565AE464B39CD6A75DBCA75298181AF1356C94 +137: 02AF7C886E86140E74F6635431732ED6CF9FA4EA8D27174FDBAE9A4D92EB03383F0419B26508C556D6A0A1E0777EF38F +138: 806150B2F09CAAC8311C4E1BDBE6A1FDE29693AFE7DD49C9929A85E593F2184CC27C895633FAB658C7D20C6EE545B827 +139: D0A7B0CA39327EE0BD4AE02B870903A1400B7A8D28016834B4F0F4C49A5F62581D4D4A8FE658111B80E6A6C1F2C9B691 +140: DC19DAEC1D86ECD2D9FAE6A1BD4BFE3A7C4EDD941DEFD83A92AB50C2C48DF2B9911ABF2B91CFFA11BB839692BD80B2DA +141: ABB814006D0908D4BA2CFE11B589BDADD4A17CE1E799B55E44600A7B2A0225E6BF6AFAC61D8C7958060D1F28579BF129 +142: 63F83790ED5882A85BEA456CA446A2401644E3C9BFE3D4F8A54210DBD6BB807F60F9641AEEB994D4CC8A6090F8D58871 +143: 185FE5D0E6764C660BFDF8D581CDCE8F118232BA58CDC4BEE4C021FBA072C6D04250C8CE3DA4DE58FE43C8D0172B612C +144: 57D66CB0A11F02127FD13D435B6CB6195E30EA2562E92C88B9F5DAAC5EC3E86F738F05C9C949D66F04D4665F942EC991 +145: EAF6A0121B3B4BECB5EC1163FFCC4ACCE76330D4236427646767487E0B5F1DD938204B3F3848082313C2170B3FD7F06C +146: E6793995C6B7F03BDFEDB7C41BF75FA223030E33E47AE9FB75CDAAB46AB9E5A580E864301E94A10C87EFA08AF4CE0ACE +147: 616846974DD72FD90BC27DA07485D4E55BADFAAFDDF09E0CB48B7494280DC0CC20A524BD3BC60E28723F939F915B838B +148: ACEFB24F02371015638A8D2D1F8D0CEE4CC71959F328D7B443F61BE497E1AE5D934BC47B7C3611418862820F6F2CA27B +149: 2F3F1757EAFA15BCA9E5A463D68AA56EAF59BAD93542B89FE7C733F3991640595298CF0447A35A207388F0160BE3FE21 +150: 2604AEC3CC0CC8A5F3C51D4B7977341751D35EBC4157A4CC3A5915B65370DAC58E0F7C8A5E3517A12EAFF69FAE323CD0 +151: CCD7214BE7EEBF6B1B203675A6C2A77646469794DB7841511B88A6BB95570773B1F30D494CA56320A6591F55FE011F7E +152: FEAB9CBB082877BFA8D1215C098BD9131E9C22B8F4ED666D1571F467771EC03FE0BDE78D7E24EDC5C9F14B9488D24966 +153: 90948F9AE3B1C195005D81BCAC2F3F32629B1D512F922E4376456782BCB5D916AAC5BAC7AFBF6DF03974AEF73C48CA5B +154: 2FDE1A345A9874CDDD1C966413F518D3DB91AFCBF253EC5F6F90228C904977F65B24C1039055E6AC94A7111CE00C0EF3 +155: 285F4FE6AAE37FB6DE5318AC8F07E1CFD678C8EB42D408323989589CE4D50AB96684BF399FD5EE775B4EA583C6DC4BCF +156: AC29B1F850E3FBF0CBF88EB04A23DF73E966C2D9F10259AC87240B740B94814F42C1D9EC460C5353D4518ABF4FF72A3C +157: E56BDFE4DE330B91B58DD9AAD2CD203A74FA71CC2B7973F5A055390D99A498A7C71844EE711D2989C29A481A526482E0 +158: EF6A9215377AEC65A6382C6775F7A703E0C56665B3E71F877DF5B00BAAE6E0C5E963B2C29D7E57241A6EDDB338683CA8 +159: 2AADD60F700F29CF5F1739ACF5888CC137AC0D57FC113549D1153881287C0E598728D88E19CC37C4BE1BD9E1AA2B510F +160: 1407E4D4E7E572DB091E06E73D4F0D59D67A97B861716318CEBF80AED598F26CF1BBE0EC52918D3A78A434094939E2E7 +161: EA5733A41647AB8A1A717550B41FC53AB1CA49CC28DF772B229D94727E5CA98FB18663EB0EDA37F81FBA387A8A4F4BCB +162: 9915D517A86107E27B1F78AF6E7B0896E3D2E90C7A917CF16C9F68AD4F17DCC736F0F2D8CE5C7B634BF297B197D235C9 +163: 5D9E3D02EC4088C2F3D514FDFBE27A9DB53B0037CC3FFF615B4AFB3EEF279DD7A0B8882F0DF5E125F06302BE9A30C1C7 +164: 0627AA95EB148A7682118D502CAD7ABB8BD83E13008364F5E8B8732EC3E648C0D0B78B7B3B0E2E5A58103DBB7F56E4AF +165: 51BAFAFA927821102EE620D2DABFD4F9B18C365707569E161C9A7A33B3C433E16783C87DC2A949732683E951E538C3E4 +166: 08D9894DCD5C8FF0B4A8339A75FA95E9E88C68427CD8DBAD9297ABF02598BB6ED3FAF8F7B51470514B3BB9A6C74A0137 +167: 594B4CF5BE4B482A8F23F610F7E57493C708B269207B246E628516CA66D91C7965F9D830E1A245BA191113BB2E2D19BF +168: 02FDDB82B56E4550B8DE39C7013BA1B3B8E1EF0186A1EE899FEFEABB5B83BEF41C76CD276657E69FFBF131D78FEAD875 +169: E1420C71511116DE6BD3225DFDCF54D6242DE8E84DB032E698A5548F5311D306B6B3AE57417193EDFBBB9BAF516AD804 +170: 9616D9830ADC19D61EFAF62B3B0BDDCA2182A3F9A340BAD5E347A780716A73D2195C00C5BA4783C41006D2B43FAE98A3 +171: 1A5816F33CEB8F566AD383C47850387535E020A8D0B24DE45135ABF217599664E6E78A492ABD367A7B04A44CD1B8912C +172: 5547E5190F50DCAAFC3CED495AD238852EDAB167F092FDA5648EBE8A602F073849F925B3F76D4E5506FD671885B236FA +173: 5D6A6082AF10CDB8323202F11A79FAC522AD32BE9620F77C24C809970F1F80D7E5468BB11FDD63788C8FA46F553F9B23 +174: F9AF7AD6AA566D2E80478B50B043DFCDA40256A2724351BEF6CE819039F541D8BD88DEF486CA1E2256B18417BA0F5472 +175: C3106AAB2E9F2A4C772274FE1A36BA98F3A9AA94BAD93B54ADDCFA72CFB084640BC3A6881BE9A2783AE191BE13A7E85C +176: 713B25A0A73DE00F72FB93E440DE6828D6FC1B4FE631F27538A4B37A1DD6E1F4C7928A96912590F750B04BBAE0132B96 +177: EF3AD97AFF769E1450656A161B0BD0D6B251ABE681F0EB0EC856D125E2DCB5B0D04D787232FC9D941271AA62E7CC28A7 +178: 6B3052F9304DDBD0EAE8ABE5FAF982641A5FE98D89F531373C74CC6E068C1D9A7E57994C2856EC490F607A1C421DEE9F +179: D28F0C437E0F812CFD4068F7FED2068E2C16FA89D3FED5E43FF06CB6A9EABDE3C81F585EF0CCB9CB4EB1D3BFDE7AADA8 +180: 4A7EDFD099BAE536F39D27E28EEE09683B4381A237ED49B152490108FBCB5B008B452509184F24E2C15BFF448C4222AE +181: 389B32D6503D04B43A0F608D171F79DDED2CC8F82919FED673084DAC52315A72177FEE73A489B0344EA3FA4DA2F7B82C +182: 335F0D7D2EBEA7236E1A15D892923FC92F184E112FCF749E173C3109FA4C33FE9E4B0353DBEDC0C9974A51EBF3A9620E +183: 7A2F48F490C5649A4875ADCC8B37A06A3D76D08ADD0613119E7D752D3E39E3C4D9F28E55230B1D0F0FD411685671C9E5 +184: 064EFC6A149C8BD56B889BB0D0C427C47349F72A57655B97897BFF17B3C997C3217E03F63F90E6FCDD94847FF243B6F4 +185: 1AC5D8B018C1981AF1CF0FF849C5819C42B0015B83A0111C313F3425F9B6389D7309DB7E5A7B17BB50DE72F4B4F7CE03 +186: A8D496F68517A880B7C27BB2A7DF5EECD65A79355F15645385EAF830F95B14F72C57C60E030610B6263E7A9430602222 +187: 551345C9934FD4ECFE647A7EFB9E6F094FEB70F3935A6C81A33325CB8B15A4816D3FD1AD3FFC88DD0F47CB143E8B5EAB +188: 11EE22A28D7F0B7BF6E8110A12E3413B58FB6A0BEF872744F579CBC44990AD83BDFB13FF5C1177839590312DAC646AD0 +189: A9BE399F1C9D3DD12EB61E69E0BA0AD878FF86C9A81DB6F36DA6F29B53B6FEBD998889E3DA5D1E65B35276056D019307 +190: CA0299A194825AC60197E2017618A656D8CE4973C6B2FF434DCCC202A3692373BC05BE34CC5F4E7BBC133D32D3A7D17C +191: FA0B8D238239F40622207F0CB6B08ED33DBA359ACB9FE7FF26EA0E1893F909D695AE7BFB87ED74199DC23C9E68CBBDA4 +192: FD7ACCB685C639F49D4D21AE57E2D3971A902D1892737220BFEDDA0FD89B33A97D8B96B18773910220D268A61CCDD070 +193: C62FE53E61FED07C1718A5BBB3FC65141F4F294BFF1CAB291EF62DB856953EFFD0FAB5F3BD20F8E4AAF48DDC71F3EFDB +194: D0882A9FB46B0C8D2C70DE5EFC5569027B516450835E3AD9C5FFB7A86962B55436B692B4E930B66D0CDCE2FE3BCE25C5 +195: 8DF5F9265406DEB1DCA57AB46E423AE7E9D5EAA1E650EF9B399DE74C175C694324BAEC0386AEA2AF0C75F2AAA1F4D421 +196: 3887E609D8841E57CE7415CCF815C34D7A9A31C2A1A29B9007E4D826BDA8EFF5EB8D8DBB6F9496FD2565B83ADD400DD7 +197: 0694FF8371961712D8A35970009BE8E3953E09E54F119EDFE4B947B11CFAF078ED961AE1F335BB17FC389A9EA35F7EE1 +198: 99A8EC7449A5E51B5FB4F6E086714960ED74ADF8FEFE89C1F49054CD34C3A86E673CE92154BC7DBB1DD4F780969EEC3D +199: B138AAC5B451C7558D02C518636FC80BF49FAAA6AA972D68981A684F500C43E9DDA171AE6168BA8EC2B52D0428FAB4F5 +200: C3FB89D604F306FC6EE2AAFEBEFBF69D26B21DBBDC055166858D527A4501FF479894B533398334379C182AD6747BD1AF +201: 5AF5504C1F18EDF72C918A40EBCDC51B898FA45C42CBB23A64B2BCE44F74716E7BA9465EE8E347E33C3A6DD6C1ED78D1 +202: BAABBDC830ECD27BE8B089AF00D4CC0C9225533721AEF1D24070CAFA20789407FB3CDF27D2AF1FE0058D0BFC85183E09 +203: 917496B4E3D0D4780A6480FCB04B998A035047BEE524ECB437FB2558A093DB8E1A62E62B0C2B82E73463F7E630DCB197 +204: 24CE0EB4A3ED509348442C252E7B173108A20AE8C5042DAB97431CBBB07C5A473B14E44CC5BCFD2101C8EA4DD88E336C +205: 82E9F843BEB8669C9E9A05B4F8F51B59EC6454659E5753CB6327749E8D3940DDD8593ECDBD608A6564B1D638F581D2A0 +206: 9ACDFCF2BCE50A32B083A69418B2814B10571AE455FD5179480AA02A488962B28CED5D7F54DF3569DB34E11B6276E984 +207: E83BF11E8469A7F17EE92CA39BBCC34BE04316C71DC698C008B85B5D578BCE3E3528A4001C4A39DBE0BB24B97973AEC7 +208: 8A1A5287F1875B39342B60DEA85ACB93BBB3A4DA75C13D15A88253BA0591C7308646264150B19A2B698C288419813759 +209: BFB72AF495427F4DA2663D7A71F2CFB08AAA195E9F27064B4360256AC4CF243ED69BBB5DE791F058BB2BC80149B71295 +210: 47BE392C89A6A1E9FE451B5E869BFBDA0A9A23453C66D81FF3E716DA65F6E4CCDCB6CFC1315D627B7A4D0938E04FBB89 +211: FF110E7ABE253D27C0109FD1A4AF2A89290828BBF06F3233C1E0CD979C1372F1235216B66D0BAF3F9FE1E503C6983746 +212: BAD05016EC91AB339F8F5790A86938AAB9F9A96C317F61344BE0E49FC17F49B47F11E35DFDE96D1AFC74D73F42E73712 +213: 5DC02FB03284E604C66F38F61936A1557AB265423C36AC4C66CC5AF4BD282BFFC2EE33EC924FCD47C8B771695494B487 +214: BE13DF098FA3CE6C0BC1EE8551D28FAB56989C41BC273F1E5289204A172266C294F12E631841AE8ABF90DDF15C9C9993 +215: 3EE39B0127853E2B42ABEAA2C3CAAB17A8474945CC140EE09146F2B2A9844D8490AEA003FDB7329525F4E3E49D222F8B +216: 313B503A0480DDD1387A8CB1DA3FBA0773C465964AA49DB3893B973FE2345402BFA062532B3D90FC5A679C95FE97C1FD +217: 3A59FA6049CF57C5F0459B4DE0AA3EA727A223E63B9098177D9ECB6BBDB59DDEDE8E0DFD798DCFFE9B641BEA32629745 +218: F5F5695B468E89E150B8D0769D5866FAE28D2F4B74EB01DF91744F06D88088681EED0CDBAAEEAFCEF069680FDAD53CC6 +219: 9F3217D32F0399547A5F5476FDCDC45D60ADB4EC3ACA0C9AFB12E3B914F5A3E6A42E673A3156F842C482C9AED6F452F7 +220: DC10EB95F4A95C62A62361277E3B7B4EBD26A0CFB4D40BD9B60124A718E64138F634797C4AF404E38CDCA2AF1F891E8A +221: 58B9D8007536A0ADE76CD798928830E8B2454565BFBB9B9CB4F212C423CC01B2707F23FC1B98B153E453AFF75228BFF6 +222: 96588A4D0EAFA475F6C5EF4A541057F2B42CB39A80D9304CC42FF36E52F4ED01E59477468D1C4A4E76689EE63CF3F2F6 +223: 75F4E8ABE2665CAC88D4AF0B5965E553667D44F735BB6FBF50C200EF72F842BEEF8247561898258CE1B91B03FA181BEB +224: 01F15A3254772AF6633FF9071244E79F2A5A5245B01DE8EA96BB83D4EEA7358BF2A5D605D9444E8FBB603A93E3FA3533 +225: 23CB6BF2EDE9199F57324CB43E9DB7A1E8FADF8997295DAB095297108DE429A6594DD9B80EB8BEA86E5D5D3C16A3E8FA +226: BAAA44617DEB6EC6F686D609337BFA50278CFD4E7DDC18F674A604151EB26D1D2904BEF0F928CB45E263321B0EAD96B6 +227: 2869DE18E00085B176BCBD60DB172EC57B6DF786F0E6AD675773F5923516B35F87868579DFCB7C640CB350ACF4BA661E +228: C71EC380475733D52C6D05F37A5356DD4B695C83B7893EE1F46DCE48AFB039112C5A23A11A8898AC5C7F9149C2681608 +229: 4BA5FCBB593DF2612912E0910DD1B42CA8566F643B7F80BB92B79079C42F787936E0CD4CBD12C2315B1D4264B4D40C20 +230: 3252104DB29CC76745BA21B7F77F994E68780C7A0C3679C291C7F02BD8A9719A0F7ADEC42930B6EC3DBEA0F1723016A5 +231: DA9B50C254272DE5EF502DB79D01D7685097C469B523910842213034458E9051A74C3E040778AFCD75D8598E636EA184 +232: 5D075E4C4B7A0CFDC184A2EAFD1B3E9223E21020DD04DF20F5964A8233C5A7FFC5C623AAC2AB5A1F02EA8D1A5031F593 +233: 16129C669BD55B939C1FB73215E79D43D47052A1EF756D439814B4DCC6C7FEE6E8A8925758CC9EFA3AEEE49989590554 +234: 06173DEE9A8BE76CDE992894F06D26A70A5284F120AB05BD887F6024B518A6137DE60D0158D7C34F4E1F85A6DDC20AB7 +235: 2E5468C9269C522E7A246039CE96F0491F97643776F41A2A70C8958E139D2FD106B952E8A5D766783FDC7A740F0958FA +236: 893C17BE1F39231F4C98321B0473B04E2CB421E5F6A0D9A22FF1D6E0B46884A52CB8721014280B39C5DA17E5F6CC5EB6 +237: FE61D7BAC3A3159E2F76D090871529ED846584D5710048912D75BB99674E595FD3D483B665287A86AAC5A58D6B1138D5 +238: 2ABC3C3D615EDCCC0235D36815DB403378E957BFF9AB44E4D2C94B9D5890BEB3F6C58C4BC6161D302E70AFE6B8736482 +239: 4C592636F932BCCEE6B161ABF1A565543A89CA6C7CABD2E3A3547267D1AA0732C76FE1677AE9888DD919B00A14C3F5FC +240: 1B06997AA47379409CA92F969366FF92AE888201B22ECADFB644EF6B3F8417AC220FA338F4CD6C9B08996F0CBFDEE947 +241: 8917996EFCA60051306B4D1992911CDFF4926746BFB41768A5EB407A2F2A492869F1C404EFF07B3FFBA03C928195EA3A +242: 5FC13C39D40A4528EEBEC469AE57F32F1BC8C4E36555CE49618CFD3E74ADE57CB8D023A07B8B599076ADAB673073390A +243: F66A41D3FDC709E33E6511E329799164BB18FAA44930F47BD6DF4472C5BABB1A41A514BA76F89825265C43DE407EAD03 +244: 7B23F639B5704B57AB3459FFBAE5434D6E1D913494C64081A51613B147C94E6585C8DD0C2E887835BD147DD59BBF72DB +245: 10E3C81532095BD18D7252708CD19FA796A43EE417721CFFD047FF54598C38A69389B357E14AFE69703A5863336660D7 +246: 6C015B143565592127A5D9E9C90766946CBF83388817B0C26E605C03A4637BCA7F3975BD34712177B4B7A5313BE4ED5A +247: C8F8F0A269FACC4D325F1388CA71998FF730415D6E34B76E3ED046B6CA3066B26F0C355417CD261BEF4898E0567C05D2 +248: DF7F3CD66B7DCDCC6089E2D51C27561AC5FDD261B61ECE80ED067C35B146610998BCF693FE3466DAD5C92BCE663D18EC +249: 30EBA9B4F06B52C4A2C4791972588AA2F2DA6D606D6445FBFFC00477BD69D5106070F5049A0B5CEDAA93506AD7E0B84D +250: 82A241F49733D9909BC3B7881E7337AD00CE85FD8BF7D8B8F531767E48EEA606A04FA75E038692E98B89BD8D673CFA82 +251: E9B1E02B6F1E2EF5902BFDE2A3327F960AA97B5D585CCF621F1A509FA02C280EC6BFCC13B293975AE9727A818A7658F9 +252: D931609260468BF52988D10632B2844FCADBB1410536FE332301107E0512DBDF48159C6928A7E05D4018D2B474EBF927 +253: E401AF666582970D7EEFEF6CDC74101859CF6A14371F4E650D1CA5C0E50E5D960B6D5835F170DA9274C3E55BA6BDF6A4 +254: 98154F1CF4569B9C64DBDC42C629637185CFA820502B4262B1EA6C0F782F9A1187D23D300F7B9DA8AEA07FE985490F81 +255: CBC5A8273028CE5CF0EBE5651C5910ECF16B6F18E4DD28749A72C0DCF2110DCA0A7BEA48512A9EE96277AB0F8A12A3CB +256: 9BD2B1BF7A89613FDCC76A3E02DABE81772A97BD5E6274FD9FE72E219BFFE88C5E6F681A31481485DCB85DFA34BDC657 + +Hash: blake2b-512 + 0: 786A02F742015903C6C6FD852552D272912F4740E15847618A86E217F71F5419D25E1031AFEE585313896444934EB04B903A685B1448B755D56F701AFE9BE2CE + 1: 2FA3F686DF876995167E7C2E5D74C4C7B6E48F8068FE0E44208344D480F7904C36963E44115FE3EB2A3AC8694C28BCB4F5A0F3276F2E79487D8219057A506E4B + 2: 1C08798DC641ABA9DEE435E22519A4729A09B2BFE0FF00EF2DCD8ED6F8A07D15EAF4AEE52BBF18AB5608A6190F70B90486C8A7D4873710B1115D3DEBBB4327B5 + 3: 40A374727302D9A4769C17B5F409FF32F58AA24FF122D7603E4FDA1509E919D4107A52C57570A6D94E50967AEA573B11F86F473F537565C66F7039830A85D186 + 4: 77DDF4B14425EB3D053C1E84E3469D92C4CD910ED20F92035E0C99D8A7A86CECAF69F9663C20A7AA230BC82F60D22FB4A00B09D3EB8FC65EF547FE63C8D3DDCE + 5: CBAA0BA7D482B1F301109AE41051991A3289BC1198005AF226C5E4F103B66579F461361044C8BA3439FF12C515FB29C52161B7EB9C2837B76A5DC33F7CB2E2E8 + 6: F95D45CF69AF5C2023BDB505821E62E85D7CAEDF7BEDA12C0248775B0C88205EEB35AF3A90816F6608CE7DD44EC28DB1140614E1DDEBF3AA9CD1843E0FAD2C36 + 7: 8F945BA700F2530E5C2A7DF7D5DCE0F83F9EFC78C073FE71AE1F88204A4FD1CF70A073F5D1F942ED623AA16E90A871246C90C45B621B3401A5DDBD9DF6264165 + 8: E998E0DC03EC30EB99BB6BFAAF6618ACC620320D7220B3AF2B23D112D8E9CB1262F3C0D60D183B1EE7F096D12DAE42C958418600214D04F5ED6F5E718BE35566 + 9: 6A9A090C61B3410AEDE7EC9138146CEB2C69662F460C3DA53C6515C1EB31F41CA3D280E567882F95CF664A94147D78F42CFC714A40D22EF19470E053493508A2 + 10: 29102511D749DB3CC9B4E335FA1F5E8FACA8421D558F6A3F3321D50D044A248BA595CFC3EFD3D2ADC97334DA732413F5CBF4751C362BA1D53862AC1E8DABEEE8 + 11: C97A4779D47E6F77729B5917D0138ABB35980AB641BD73A8859EB1AC98C05362ED7D608F2E9587D6BA9E271D343125D40D933A8ED04EC1FE75EC407C7A53C34E + 12: 10F0DC91B9F845FB95FAD6860E6CE1ADFA002C7FC327116D44D047CD7D5870D772BB12B5FAC00E02B08AC2A0174D0446C36AB35F14CA31894CD61C78C849B48A + 13: DEA9101CAC62B8F6A3C650F90EEA5BFAE2653A4EAFD63A6D1F0F132DB9E4F2B1B662432EC85B17BCAC41E775637881F6AAB38DD66DCBD080F0990A7A6E9854FE + 14: 441FFAA08CD79DFF4AFC9B9E5B5620EEC086730C25F661B1D6FBFBD1CEC3148DD72258C65641F2FCA5EB155FADBCABB13C6E21DC11FAF72C2A281B7D56145F19 + 15: 444B240FE3ED86D0E2EF4CE7D851EDDE22155582AA0914797B726CD058B6F45932E0E129516876527B1DD88FC66D7119F4AB3BED93A61A0E2D2D2AEAC336D958 + 16: BFBABBEF45554CCFA0DC83752A19CC35D5920956B301D558D772282BC867009168E9E98606BB5BA73A385DE5749228C925A85019B71F72FE29B3CD37CA52EFE6 + 17: 9C4D0C3E1CDBBF485BEC86F41CEC7C98373F0E09F392849AAA229EBFBF397B22085529CB7EF39F9C7C2222A514182B1EFFAA178CC3687B1B2B6CBCB6FDEB96F8 + 18: 477176B3BFCBADD7657C23C24625E4D0D674D1868F006006398AF97AA41877C8E70D3D14C3BBC9BBCDCEA801BD0E1599AF1F3EEC67405170F4E26C964A57A8B7 + 19: A78C490EDA3173BB3F10DEE52F110FB1C08E0302230B85DDD7C11257D92DE148785EF00C039C0BB8EB9808A35B2D8C080F572859714C9D4069C5BCAF090E898E + 20: 58D023397BEB5B4145CB2255B07D74290B36D9FD1E594AFBD8EEA47C205B2EFBFE6F46190FAF95AF504AB072E36F6C85D767A321BFD7F22687A4ABBF494A689C + 21: 4001EC74D5A46FD29C2C3CDBE5D1B9F20E51A941BE98D2A4E1E2FBF866A672121DB6F81A514CFD10E7358D571BDBA48E4CE708B9D124894BC0B5ED554935F73A + 22: CCD1B22DAB6511225D2401EA2D8625D206A12473CC732B615E5640CEFFF0A4ADF971B0E827A619E0A80F5DB9CCD0962329010D07E34A2064E731C520817B2183 + 23: B4A0A9E3574EDB9E1E72AA31E39CC5F30DBF943F8CABC408449654A39131E66D718A18819143E3EA96B4A1895988A1C0056CF2B6E04F9AC19D657383C2910C44 + 24: 447BECAB16630608D39F4F058B16F7AF95B85A76AA0FA7CEA2B80755FB76E9C804F2CA78F02643C915FBF2FCE5E19DE86000DE03B18861815A83126071F8A37B + 25: 54E6DAB9977380A5665822DB93374EDA528D9BEB626F9B94027071CB26675E112B4A7FEC941EE60A81E4D2EA3FF7BC52CFC45DFBFE735A1C646B2CF6D6A49B62 + 26: 3EA62625949E3646704D7E3C906F82F6C028F540F5F72A794B0C57BF97B7649BFEB90B01D3CA3E829DE21B3826E6F87014D3C77350CB5A15FF5D468A81BEC160 + 27: 213CFE145C54A33691569980E5938C8883A46D84D149C8FF1A67CD287B4D49C6DA69D3A035443DB085983D0EFE63706BD5B6F15A7DA459E8D50A19093DB55E80 + 28: 5716C4A38F38DB104E494A0A27CBE89A26A6BB6F499EC01C8C01AA7CB88497E75148CD6EEE12A7168B6F78AB74E4BE749251A1A74C38C86D6129177E2889E0B6 + 29: 030460A98BDF9FF17CD96404F28FC304F2B7C04EAADE53677FD28F788CA22186B8BC80DD21D17F8549C711AFF0E514E19D4E15F5990252A03E082F28DC2052F6 + 30: 19E7F1CCEE88A10672333E390CF22013A8C734C6CB9EAB41F17C3C8032A2E4ACA0569EA36F0860C7A1AF28FA476840D66011168859334A9E4EF9CC2E61A0E29E + 31: 29F8B8C78C80F2FCB4BDF7825ED90A70D625FF785D262677E250C04F3720C888D03F8045E4EDF3F5285BD39D928A10A7D0A5DF00B8484AC2868142A1E8BEA351 + 32: 5C52920A7263E39D57920CA0CB752AC6D79A04FEF8A7A216A1ECB7115CE06D89FD7D735BD6F4272555DBA22C2D1C96E6352322C62C5630FDE0F4777A76C3DE2C + 33: 83B098F262251BF660064A9D3511CE7687A09E6DFBB878299C30E93DFB43A9314DB9A600337DB26EBEEDAF2256A96DABE9B29E7573AD11C3523D874DDE5BE7ED + 34: 9447D98AA5C9331352F43D3E56D0A9A9F9581865998E2885CC56DD0A0BD5A7B50595BD10F7529BCD31F37DC16A1465D594079667DA2A3FCB70401498837CEDEB + 35: 867732F2FEEB23893097561AC710A4BFF453BE9CFBEDBA8BA324F9D312A82D732E1B83B829FDCD177B882CA0C1BF544B223BE529924A246A63CF059BFDC50A1B + 36: F15AB26D4CDFCF56E196BB6BA170A8FCCC414DE9285AFD98A3D3CF2FB88FCBC0F19832AC433A5B2CC2392A4CE34332987D8D2C2BEF6C3466138DB0C6E42FA47B + 37: 2813516D68ED4A08B39D648AA6AACD81E9D655ECD5F0C13556C60FDF0D333EA38464B36C02BACCD746E9575E96C63014F074AE34A0A25B320F0FBEDD6ACF7665 + 38: D3259AFCA8A48962FA892E145ACF547F26923AE8D4924C8A531581526B04B44C7AF83C643EF5A0BC282D36F3FB04C84E28B351F40C74B69DC7840BC717B6F15F + 39: F14B061AE359FA31B989E30332BFE8DE8CC8CDB568E14BE214A2223B84CAAB7419549ECFCC96CE2ACEC119485D87D157D3A8734FC426597D64F36570CEAF224D + 40: 55E70B01D1FBF8B23B57FB62E26C2CE54F13F8FA2464E6EB98D16A6117026D8B90819012496D4071EBE2E59557ECE3519A7AA45802F9615374877332B73490B3 + 41: 25261EB296971D6E4A71B2928E64839C67D422872BF9F3C31993615222DE9F8F0B2C4BE8548559B4B354E736416E3218D4E8A1E219A4A6D43E1A9A521D0E75FC + 42: 08307F347C41294E34BB54CB42B1522D22F824F7B6E5DB50FDA096798E181A8F026FA27B4AE45D52A62CAF9D5198E24A4913C6671775B2D723C1239BFBF016D7 + 43: 1E5C62E7E9BFA1B118747A2DE08B3CA10112AF96A46E4B22C3FC06F9BFEE4EB5C49E057A4A4886234324572576BB9B5ECFDE0D99B0DE4F98EC16E4D1B85FA947 + 44: C74A77395FB8BC126447454838E561E962853DC7EB49A1E3CB67C3D0851F3E39517BE8C350AC910903D49CD2BFDF545C99316D0346170B739F0ADD5D533C2CFC + 45: 0DD57B423CC01EB2861391EB886A0D17079B933FC76EB3FC08A19F8A74952CB68F6BCDC644F77370966E4D13E80560BCF082EF0479D48FBBAB4DF03B53A4E178 + 46: 4D8DC3923EDCCDFCE70072398B8A3DA5C31FCB3EE3B645C85F717CBAEB4B673A19394425A585BFB464D92F1597D0B754D163F97CED343B25DB5A70EF48EBB34F + 47: F0A50553E4DFB0C4E3E3D3BA82034857E3B1E50918F5B8A7D698E10D242B0FB544AF6C92D0C3AAF9932220416117B4E78ECB8A8F430E13B82A5915290A5819C5 + 48: B15543F3F736086627CC5365E7E8988C2EF155C0FD4F428961B00D1526F04D6D6A658B4B8ED32C5D8621E7F4F8E8A933D9ECC9DD1B8333CBE28CFC37D9719E1C + 49: 7B4FA158E415FEF023247264CBBE15D16D91A44424A8DB707EB1E2033C30E9E1E7C8C0864595D2CB8C580EB47E9D16ABBD7E44E824F7CEDB7DEF57130E52CFE9 + 50: 60424FF23234C34DC9687AD502869372CC31A59380186BC2361C835D972F49666EB1AC69629DE646F03F9B4DB9E2ACE093FBFDF8F20AB5F98541978BE8EF549F + 51: 7406018CE704D84F5EB9C79FEA97DA345699468A350EE0B2D0F3A4BF2070304EA862D72A51C57D3064947286F531E0EAF7563702262E6C724ABF5ED8C8398D17 + 52: 14EF5C6D647B3BD1E6E32006C231199810DE5C4DC88E70240273B0EA18E651A3EB4F5CA3114B8A56716969C7CDA27E0C8DB832AD5E89A2DC6CB0ADBE7D93ABD1 + 53: 38CF6C24E3E08BCF1F6CF3D1B1F65B905239A3118033249E448113EC632EA6DC346FEEB2571C38BD9A7398B2221280328002B23E1A45ADAFFE66D93F6564EAA2 + 54: 6CD7208A4BC7E7E56201BBBA02A0F489CD384ABE40AFD4222F158B3D986EE72A54C50FB64FD4ED2530EDA2C8AF2928A0DA6D4F830AE1C9DB469DFD970F12A56F + 55: 659858F0B5C9EDAB5B94FD732F6E6B17C51CC096104F09BEB3AFC3AA467C2ECF885C4C6541EFFA9023D3B5738AE5A14D867E15DB06FE1F9D1127B77E1AABB516 + 56: 26CCA0126F5D1A813C62E5C71001C046F9C92095704550BE5873A495A999AD010A4F79491F24F286500ADCE1A137BC2084E4949F5B7294CEFE51ECAFF8E95CBA + 57: 4147C1F55172788C5567C561FEEF876F621FFF1CE87786B8467637E70DFBCD0DBDB6415CB600954AB9C04C0E457E625B407222C0FE1AE21B2143688ADA94DC58 + 58: 5B1BF154C62A8AF6E93D35F18F7F90ABB16A6EF0E8D1AECD118BF70167BAB2AF08935C6FDC0663CE74482D17A8E54B546D1C296631C65F3B522A515839D43D71 + 59: 9F600419A4E8F4FB834C24B0F7FC13BF4E279D98E8A3C765EE934917403E3A66097182EA21453CB63EBBE8B73A9C2167596446438C57627F330BADD4F569F7D6 + 60: 457EF6466A8924FD8011A34471A5A1AC8CCD9BD0D07A97414AC943021CE4B9E4B9C8DB0A28F016ED43B1542481990022147B313E194671131E708DD43A3ED7DC + 61: 9997B2194D9AF6DFCB9143F41C0ED83D3A3F4388361103D38C2A49B280A581212715FD908D41C651F5C715CA38C0CE2830A37E00E508CED1BCDC320E5E4D1E2E + 62: 5C6BBF16BAA180F986BD40A1287ED4C549770E7284858FC47BC21AB95EBBF3374B4EE3FD9F2AF60F3395221B2ACC76F2D34C132954049F8A3A996F1E32EC84E5 + 63: D10BF9A15B1C9FC8D41F89BB140BF0BE08D2F3666176D13BAAC4D381358AD074C9D4748C300520EB026DAEAEA7C5B158892FDE4E8EC17DC998DCD507DF26EB63 + 64: 2FC6E69FA26A89A5ED269092CB9B2A449A4409A7A44011EECAD13D7C4B0456602D402FA5844F1A7A758136CE3D5D8D0E8B86921FFFF4F692DD95BDC8E5FF0052 + 65: FCBE8BE7DCB49A32DBDF239459E26308B84DFF1EA480DF8D104EEFF34B46FAE98627B450C2267D48C0946A697C5B59531452AC0484F1C84E3A33D0C339BB2E28 + 66: A19093A6E3BCF5952F850F2030F69B9606F147F90B8BAEE3362DA71D9F35B44EF9D8F0A7712BA1877FDDCD2D8EA8F1E5A773D0B745D4725605983A2DE901F803 + 67: 3C2006423F73E268FA59D2920377EB29A4F9A8B462BE15983EE3B85AE8A78E992633581A9099893B63DB30241C34F643027DC878279AF5850D7E2D4A2653073A + 68: D0F2F2E3787653F77CCE2FA24835785BBD0C433FC779465A115149905A9DD1CB827A628506D457FCF124A0C2AEF9CE2D2A0A0F63545570D8667FF9E2EBA07334 + 69: 78A9FC048E25C6DCB5DE45667DE8FFDD3A93711141D594E9FA62A959475DA6075EA8F0916E84E45AD911B75467077EE52D2C9AEBF4D58F20CE4A3A00458B05D4 + 70: 45813F441769AB6ED37D349FF6E72267D76AE6BB3E3C612EC05C6E02A12AF5A37C918B52BF74267C3F6A3F183A8064FF84C07B193D08066789A01ACCDB6F9340 + 71: 956DA1C68D83A7B881E01B9A966C3C0BF27F68606A8B71D457BD016D4C41DD8A380C709A296CB4C6544792920FD788835771A07D4A16FB52ED48050331DC4C8B + 72: DF186C2DC09CAA48E14E942F75DE5AC1B7A21E4F9F072A5B371E09E07345B0740C76177B01278808FEC025EDED9822C122AFD1C63E6F0CE2E32631041063145C + 73: 87475640966A9FDCD6D3A3B5A2CCA5C08F0D882B10243C0EC1BF3C6B1C37F2CD3212F19A057864477D5EAF8FAED73F2937C768A0AF415E84BBCE6BD7DE23B660 + 74: C3B573BBE10949A0FBD4FF884C446F2229B76902F9DFDBB8A0353DA5C83CA14E8151BBAAC82FD1576A009ADC6F1935CF26EDD4F1FB8DA483E6C5CD9D8923ADC3 + 75: B09D8D0BBA8A7286E43568F7907550E42036D674E3C8FC34D8CA46F771D6466B70FB605875F6A863C877D12F07063FDC2E90CCD459B1910DCD52D8F10B2B0A15 + 76: AF3A22BF75B21ABFB0ACD54422BA1B7300A952EFF02EBEB65B5C234471A98DF32F4F9643CE1904108A168767924280BD76C83F8C82D9A79D9259B195362A2A04 + 77: BF4FF2221B7E6957A724CD964AA3D5D0D9941F540413752F4699D8101B3E537508BF09F8508B317736FFD265F2847AA7D84BD2D97569C49D632AED9945E5FA5E + 78: 9C6B6B78199B1BDACB4300E31479FA622A6B5BC80D4678A6078F88A8268CD7206A2799E8D4621A464EF6B43DD8ADFFE97CAF221B22B6B8778B149A822AEFBB09 + 79: 890656F09C99D280B5ECB381F56427B813751BC652C7828078B23A4AF83B4E3A61FDBAC61F89BEE84EA6BEE760C047F25C6B0A201C69A38FD6FD971AF18588BB + 80: 31A046F7882FFE6F83CE472E9A0701832EC7B3F76FBCFD1DF60FE3EA48FDE1651254247C3FD95E100F9172731E17FD5297C11F4BB328363CA361624A81AF797C + 81: 27A60B2D00E7A671D47D0AEC2A686A0AC04B52F40AB6629028EB7D13F4BAA99AC0FE46EE6C814944F2F4B4D20E9378E4847EA44C13178091E277B87EA7A55711 + 82: 8B5CCEF194162C1F19D68F91E0B0928F289EC5283720840C2F73D253111238DCFE94AF2B59C2C1CA2591901A7BC060E7459B6C47DF0F71701A35CC0AA831B5B6 + 83: 57AB6C4B2229AEB3B70476D803CD63812F107CE6DA17FED9B17875E8F86C724F49E024CBF3A1B8B119C50357652B81879D2ADE2D588B9E4F7CEDBA0E4644C9EE + 84: 0190A8DAC320A739F322E15731AA140DDAF5BED294D5C82E54FEF29F214E18AAFAA84F8BE99AF62950266B8F901F15DD4C5D35516FC35B4CAB2E96E4695BBE1C + 85: D14D7C4C415EEB0E10B159224BEA127EBD84F9591C702A330F5BB7BB7AA44EA39DE6ED01F18DA7ADF40CFB97C5D152C27528824B21E239526AF8F36B214E0CFB + 86: BE28C4BE706970488FAC7D29C3BD5C4E986085C4C3332F1F3FD30973DB614164BA2F31A78875FFDC150325C88327A9443ED04FDFE5BE93876D1628560C764A80 + 87: 031DA1069E3A2E9C3382E436FFD79DF74B1CA6A8ADB2DEABE676AB45994CBC054F037D2F0EACE858D32C14E2D1C8B46077308E3BDC2C1B53172ECF7A8C14E349 + 88: 4665CEF8BA4DB4D0ACB118F2987F0BB09F8F86AA445AA3D5FC9A8B346864787489E8FCECC125D17E9B56E12988EAC5ECC7286883DB0661B8FF05DA2AFFF30FE4 + 89: 63B7032E5F930CC9939517F9E986816CFBEC2BE59B9568B13F2EAD05BAE7777CAB620C6659404F7409E4199A3BE5F7865AA7CBDF8C4253F7E8219B1BD5F46FEA + 90: 9F09BF093A2B0FF8C2634B49E37F1B2135B447AA9144C9787DBFD92129316C99E88AAB8A21FDEF2372D1189AEC500F95775F1F92BFB45545E4259FB9B7B02D14 + 91: F9F8493C68088807DF7F6A2693D64EA59F03E9E05A223E68524CA32195A4734B654FCEA4D2734C866CF95C889FB10C49159BE2F5043DC98BB55E02EF7BDCB082 + 92: 3C9A7359AB4FEBCE07B20AC447B06A240B7FE1DAE5439C49B60B5819F7812E4C172406C1AAC316713CF0DDED1038077258E2EFF5B33913D9D95CAEB4E6C6B970 + 93: AD6AAB8084510E822CFCE8625D62CF4DE655F4763884C71E80BAB9AC9D5318DBA4A6033ED29084E65216C031606CA17615DCFE3BA11D26851AE0999CA6E232CF + 94: 156E9E6261374C9DC884F36E70F0FE1AB9297997B836FA7D170A9C9EBF575B881E7BCEA44D6C0248D35597907154828955BE19135852F9228815ECA024A8ADFB + 95: 4215407633F4CCA9B6788BE93E6AA3D963C7D6CE4B147247099F46A3ACB500A30038CB3E788C3D29F132AD844E80E9E99251F6DB96ACD8A091CFC770AF53847B + 96: 1C077E279DE6548523502B6DF800FFDAB5E2C3E9442EB838F58C295F3B147CEF9D701C41C321283F00C71AFFA0619310399126295B78DD4D1A74572EF9ED5135 + 97: F07A555F49FE481CF4CD0A87B71B82E4A95064D06677FDD90A0EB598877BA1C83D4677B393C3A3B6661C421F5B12CB99D20376BA7275C2F3A8F5A9B7821720DA + 98: B5911B380D20C7B04323E4026B38E200F534259233B581E02C1E3E2D8438D6C66D5A4EB201D5A8B75072C4EC29106334DA70BC79521B0CED2CFD533F5FF84F95 + 99: 01F070A09BAE911296361F91AA0E8E0D09A7725478536D9D48C5FE1E5E7C3C5B9B9D6EB07796F6DA57AE562A7D70E882E37ADFDE83F0C433C2CD363536BB22C8 +100: 6F793EB4374A48B0775ACAF9ADCF8E45E54270C9475F004AD8D5973E2ACA52747FF4ED04AE967275B9F9EB0E1FF75FB4F794FA8BE9ADD7A41304868D103FAB10 +101: 965F20F139765FCC4CE4BA3794675863CAC24DB472CD2B799D035BCE3DBEA502DA7B524865F6B811D8C5828D3A889646FE64A380DA1AA7C7044E9F245DCED128 +102: EC295B5783601244C30E4641E3B45BE222C4DCE77A58700F53BC8EC52A941690B4D0B087FB6FCB3F39832B9DE8F75EC20BD43079811749CDC907EDB94157D180 +103: 61C72F8CCC91DBB54CA6750BC489672DE09FAEDB8FDD4F94FF2320909A303F5D5A98481C0BC1A625419FB4DEBFBF7F8A53BB07EC3D985E8EA11E72D559940780 +104: AFD8145B259EEFC8D12620C3C5B03E1ED8FD2CCEFE0365078C80FD42C1770E28B44948F27E65A1886690110DB814397B68E43D80D1BA16DFA358E739C898CFA3 +105: 552FC7893CF1CE933ADA35C0DA98844E41545E244C3157A1428D7B4C21F9CD7E4071AED77B7CA9F1C38FBA32237412EF21A342742EC8324378F21E507FAFDD88 +106: 467A33FBADF5EBC52596EF86AAAEFC6FABA8EE651B1CE04DE368A03A5A9040EF2835E00ADB09ABB3FBD2BCE818A2413D0B0253B5BDA4FC5B2F6F85F3FD5B55F2 +107: 22EFF8E6DD5236F5F57D94EDE874D6C9428E8F5D566F17CD6D1848CD752FE13C655CB10FBAAFF76872F2BF2DA99E15DC624075E1EC2F58A3F64072121838569E +108: 9CEC6BBF62C4BCE4138ABAE1CBEC8DAD31950444E90321B1347196834C114B864AF3F3CC3508F83751FFB4EDA7C84D140734BB4263C3625C00F04F4C8068981B +109: A8B60FA4FC2442F6F1514AD7402626920CC7C2C9F72124B8CBA8EE2CB7C4586F658A4410CFFCC0AB88343955E094C6AF0D20D0C714FB0A988F543F300F58D389 +110: 8271CC45DFA5E4170E847E8630B952CF9C2AA777D06F26A7585B8381F188DACC7337391CFCC94B053DC4EC29CC17F077870428F1AC23FDDDA165EF5A3F155F39 +111: BF23C0C25C8060E4F6995F1623A3BEBECAA96E308680000A8AA3CD56BB1A6DA099E10D9231B37F4519B2EFD2C24DE72F31A5F19535241B4A59FA3C03CEB790E7 +112: 877FD652C05281009C0A5250E7A3A671F8B18C108817FE4A874DE22DA8E45DB11958A600C5F62E67D36CBF84474CF244A9C2B03A9FB9DC711CD1A2CAB6F3FAE0 +113: 29DF4D87EA444BAF5BCDF5F4E41579E28A67DE84149F06C03F110EA84F572A9F676ADDD04C4878F49C5C00ACCDA441B1A387CACEB2E993BB7A10CD8C2D6717E1 +114: 710DACB166844639CD7B637C274209424E2449DC35D790BBFA4F76177054A36B3B76FAC0CA6E61DF1E687000678AC0746DF75D0A3954897681FD393A155A1BB4 +115: C1D5F93B8DEA1F2571BABCCBC01764541A0CDA87E444D673C50966CA559C33354B3ACB26E5D5781FFB28847A4B4754D77008C62A835835F500DEA7C3B58BDAE2 +116: A41E41271CDAB8AF4D72B104BFB2AD041AC4DF14677DA671D85640C4B187F50C2B66513C4619FBD5D5DC4FE65DD37B9042E9848DDA556A504CAA2B1C6AFE4730 +117: E7BCBACDC379C43D81EBADCB37781552FC1D753E8CF310D968392D06C91F1D64CC9E90CE1D22C32D277FC6CDA433A4D442C762E9EACF2C259F32D64CF9DA3A22 +118: 51755B4AC5456B13218A19C5B9242F57C4A981E4D4ECDCE09A3193362B808A579345D4881C2607A56534DD7F21956AFF72C2F4173A6E7B6CC2212BA0E3DAEE1F +119: DCC2C4BEB9C1F2607B786C20C631972347034C1CC02FCC7D02FF01099CFE1C6989840AC213923629113AA8BAD713CCF0FE4CE13264FB32B8B0FE372DA382544A +120: 3D55176ACEA4A7E3A65FFA9FB10A7A1767199CF077CEE9F71532D67CD7C73C9F93CFC37CCDCC1FDEF50AAD46A504A650D298D597A3A9FA95C6C40CB71FA5E725 +121: D07713C005DE96DD21D2EB8BBECA66746EA51A31AE922A3E74864889540A48DB27D7E4C90311638B224BF0201B501891754848113C266108D0ADB13DB71909C7 +122: 58983C21433D950CAA23E4BC18543B8E601C204318532152DAF5E159A0CD1480183D29285C05F129CB0CC3164687928086FFE380158DF1D394C6AC0D4288BCA8 +123: 8100A8DC528D2B682AB4250801BA33F02A3E94C54DAC0AE1482AA21F51EF3A82F3807E6FACB0AEB05947BF7AA2ADCB034356F90FA4560EDE02201A37E411EC1A +124: 07025F1BB6C784F3FE49DE5C14B936A5ACACACAAB33F6AC4D0E00AB6A12483D6BEC00B4FE67C7CA5CC508C2A53EFB5BFA5398769D843FF0D9E8B14D36A01A77F +125: BA6AEFD972B6186E027A76273A4A723321A3F580CFA894DA5A9CE8E721C828552C64DACEE3A7FD2D743B5C35AD0C8EFA71F8CE99BF96334710E2C2346E8F3C52 +126: E0721E02517AEDFA4E7E9BA503E025FD46E714566DC889A84CBFE56A55DFBE2FC4938AC4120588335DEAC8EF3FA229ADC9647F54AD2E3472234F9B34EFC46543 +127: B6292669CCD38D5F01CAAE96BA272C76A879A45743AFA0725D83B9EBB26665B731F1848C52F11972B6644F554C064FA90780DBBBF3A89D4FC31F67DF3E5857EF +128: 2319E3789C47E2DAA5FE807F61BEC2A1A6537FA03F19FF32E87EECBFD64B7E0E8CCFF439AC333B040F19B0C4DDD11A61E24AC1FE0F10A039806C5DCC0DA3D115 +129: F59711D44A031D5F97A9413C065D1E614C417EDE998590325F49BAD2FD444D3E4418BE19AEC4E11449AC1A57207898BC57D76A1BCF3566292C20C683A5C4648F +130: DF0A9D0C212843A6A934E3902B2DD30D17FBA5F969D2030B12A546D8A6A45E80CF5635F071F0452E9C919275DA99BED51EB1173C1AF0518726B75B0EC3BAE2B5 +131: A3EB6E6C7BF2FB8B28BFE8B15E15BB500F781ECC86F778C3A4E655FC5869BF2846A245D4E33B7B14436A17E63BE79B36655C226A50FFBC7124207B0202342DB5 +132: 56D4CBCD070563426A017069425C2CD2AE540668287A5FB9DAC432EB8AB1A353A30F2FE1F40D83333AFE696A267795408A92FE7DA07A0C1814CF77F36E105EE8 +133: E59B9987D428B3EDA37D80ABDB16CD2B0AEF674C2B1DDA4432EA91EE6C935C684B48B4428A8CC740E579A30DEFF35A803013820DD23F14AE1D8413B5C8672AEC +134: CD9FCC99F99D4CC16D031900B2A736E1508DB4B586814E6345857F354A70CCECB1DF3B50A19ADAF43C278EFA423FF4BB6C523EC7FD7859B97B168A7EBFF8467C +135: 0602185D8C3A78738B99164B8BC6FFB21C7DEBEBBF806372E0DA44D121545597B9C662A255DC31542CF995ECBE6A50FB5E6E0EE4EF240FE557EDED1188087E86 +136: C08AFA5B927BF08097AFC5FFF9CA4E7800125C1F52F2AF3553FA2B89E1E3015C4F87D5E0A48956AD31450B083DAD147FFB5EC03434A26830CF37D103AB50C5DA +137: 36F1E1C11D6EF6BC3B536D505D544A871522C5C2A253067EC9933B6EC25464DAF985525F5B9560A16D890259AC1BB5CC67C0C469CDE133DEF000EA1D686F4F5D +138: BF2AB2E2470F5438C3B689E66E7686FFFA0CB1E1798AD3A86FF99075BF6138E33D9C0CE59AFB24AC67A02AF34428191A9A0A6041C07471B7C3B1A752D6FC0B8B +139: D400601F9728CCC4C92342D9787D8D28AB323AF375CA5624B4BB91D17271FBAE862E413BE73F1F68E615B8C5C391BE0DBD9144746EB339AD541547BA9C468A17 +140: 79FE2FE157EB85A038ABB8EBBC647731D2C83F51B0AC6EE14AA284CB6A3549A4DCCEB300740A825F52F5FB30B03B8C4D8B0F4AA67A63F4A94E3303C4EDA4C02B +141: 75351313B52A8529298D8C186B1768666DCCA8595317D7A4816EB88C062020C0C8EFC554BB341B64688DB5CCAFC35F3C3CD09D6564B36D7B04A248E146980D4B +142: E3128B1D311D02179D7F25F97A5A8BEE2CC8C86303644FCD664E157D1FEF00F23E46F9A5E8E5C890CE565BB6ABD4302CE06469D52A5BD53E1C5A54D04649DC03 +143: C2382A72D2D3ACE9D5933D00B60827ED380CDA08D0BA5F6DD41E29EE6DBE8ECB9235F06BE95D83B6816A2FB7A5AD47035E8A4B69A4884B99E4BECE58CAB25D44 +144: 6B1C69460BBD50AC2ED6F32E6E887CFED407D47DCF0AAA60387FE320D780BD03EAB6D7BAEB2A07D10CD552A300341354EA9A5F03183A623F92A2D4D9F00926AF +145: 6CDA206C80CDC9C44BA990E0328C314F819B142D00630404C48C05DC76D1B00CE4D72FC6A48E1469DDEF609412C364820854214B4869AF090F00D3C1BA443E1B +146: 7FFC8C26FBD6A0F7A609E6E1939F6A9EDF1B0B066641FB76C4F9602ED748D11602496B35355B1AA255850A509D2F8EE18C8F3E1D7DCBC37A136598F56A59ED17 +147: 70DE1F08DD4E09D5FC151F17FC991A23ABFC05104290D50468882EFAF582B6EC2F14F577C0D68C3AD06626916E3C86E6DAAB6C53E5163E82B6BD0CE49FC0D8DF +148: 4F81935756ED35EE2058EE0C6A6110D6FAC5CB6A4F46AA9411603F99965823B6DA4838276C5C06BC7880E376D92758369EE7305BCEC8D3CFD28CCABB7B4F0579 +149: ABCB61CB3683D18F27AD527908ED2D32A0426CB7BB4BF18061903A7DC42E7E76F982382304D18AF8C80D91DD58DD47AF76F8E2C36E28AF2476B4BCCF82E89FDF +150: 02D261AD56A526331B643DD2186DE9A82E72A58223CD1E723686C53D869B83B94632B7B647AB2AFC0D522E29DA3A5615B741D82852E0DF41B66007DBCBA90543 +151: C5832741FA30C5436823015383D297FF4C4A5D7276C3F902122066E04BE5431B1A85FAF73B918434F9300963D1DEA9E8AC3924EF490226EDEEA5F743E410669F +152: CFAEAB268CD075A5A6AED515023A032D54F2F2FF733CE0CBC78DB51DB4504D675923F82746D6594606AD5D67734B11A67CC6A468C2032E43CA1A94C6273A985E +153: 860850F92EB268272B67D133609BD64E34F61BF03F4C1738645C17FEC818465D7ECD2BE2907641130025FDA79470AB731646E7F69440E8367EA76AC4CEE8A1DF +154: 84B154ED29BBEDEFA648286839046F4B5AA34430E2D67F7496E4C39F2C7EA78995F69E1292200016F16AC3B37700E6C7E7861AFC396B64A59A1DBF47A55C4BBC +155: AEEEC260A5D8EFF5CCAB8B95DA435A63ED7A21EA7FC7559413FD617E33609F8C290E64BBACC528F6C080262288B0F0A3219BE223C991BEE92E72349593E67638 +156: 8AD78A9F26601D127E8D2F2F976E63D19A054A17DCF59E0F013AB54A6887BBDFFDE7AAAE117E0FBF3271016595B9D9C712C01B2C53E9655A382BC4522E616645 +157: 8934159DADE1AC74147DFA282C75954FCEF443EF25F80DFE9FB6EA633B8545111D08B34EF43FFF17026C7964F5DEAC6D2B3C29DACF2747F022DF5967DFDC1A0A +158: CD36DD0B240614CF2FA2B9E959679DCDD72EC0CD58A43DA3790A92F6CDEB9E1E795E478A0A47D371100D340C5CEDCDBBC9E68B3F460818E5BDFF7B4CDA4C2744 +159: 00DF4E099B807137A85990F49D3A94315E5A5F7F7A6076B303E96B056FB93800111F479628E2F8DB59AEB6AC70C3B61F51F9B46E80FFDEAE25EBDDB4AF6CB4EE +160: 2B9C955E6CAED4B7C9E246B86F9A1726E810C59D126CEE66ED71BF015B83558A4B6D84D18DC3FF4620C2FFB722359FDEF85BA0D4E2D22ECBE0ED784F99AFE587 +161: 181DF0A261A2F7D29EA5A15772715105D450A4B6C236F699F462D60CA76487FEEDFC9F5EB92DF838E8FB5DC3694E84C5E0F4A10B761F506762BE052C745A6EE8 +162: 21FB203458BF3A7E9A80439F9A902899CD5DE0139DFD56F7110C9DEC8437B26BDA63DE2F565926D85EDB1D6C6825669743DD9992653D13979544D5DC8228BFAA +163: EF021F29C5FFB830E64B9AA9058DD660FD2FCB81C497A7E698BCFBF59DE5AD4A86FF93C10A4B9D1AE5774725F9072DCDE9E1F199BAB91F8BFF921864AA502EEE +164: B3CFDA40526B7F1D37569BDFCDF911E5A6EFE6B2EC90A0454C47B2C046BF130FC3B352B34DF4813D48D33AB8E269B69B075676CB6D00A8DCF9E1F967EC191B2C +165: B4C6C3B267071EEFB9C8C72E0E2B941293641F8673CB70C1CC26AD1E73CF141755860AD19B34C2F34ED35BB52EC4507CC1FE59047743A5F0C6FEBDE625E26091 +166: 57A34F2BCCA60D4B85103B830C9D7952A416BE5263AE429C9E5E53FE8590A8F78EC65A51109EA85DCDF7B6223F9F2B340539FAD81923DBF8EDABF95129E4DFF6 +167: 9CF46662FCD61A232277B685663B8B5DA832DFD9A3B8CCFEEC993EC6AC415AD07E048ADFE414DF272770DBA867DA5C1224C6FD0AA0C2187D426AC647E9887361 +168: 5CE1042AB4D542C2F9EE9D17262AF8164098935BEF173D0E18489B04841746CD2F2DF866BD7DA6E5EF9024C648023EC723AB9C62FD80285739D84F15D2AB515A +169: 8488396BD4A8729B7A473178F232DADF3F0F8E22678BA5A43E041E72DA1E2CF82194C307207A54CB8156293339EAEC693FF66BFCD5EFC65E95E4ECAF54530ABD +170: F598DA901C3835BCA560779037DFDE9F0C51DC61C0B760FC1522D7B470EE63F5BDC6498476E86049AD86E4E21AF2854A984CC905427D2F17F66B1F41C3DA6F61 +171: 5F93269798CF02132107337660A8D7A177354C0212EB93E555E7C37A08AEF3D8DCE01217011CD965C04DD2C105F2E2B6CAE5E4E6BCAF09DFBEE3E0A6A6357C37 +172: 0ECF581D47BAC9230986FAABD70C2F5B80E91066F0EC55A842937882286D2CA007BB4E973B0B091D52167FF7C4009C7AB4AD38FFF1DCEACDB7BE81EF4A452952 +173: 5AECA8ABE1528582B2A307B4009585498A3D467CA6101CB0C5126F9976056E9FFC123CC20C302B2A737F492C75D21F01512C90CA0541DFA56E950A321DCB28D8 +174: 732FBF8F1CB2B8329263EDE27858FE46F8D3354D376BCDA0548E7CE1FA9DD11F85EB661FE950B543AA635CA4D3F04EDE5B32D6B656E5CE1C44D35C4A6C56CFF8 +175: D5E938735D63788C80100AEFD18648D18CF272F69F20FF24CFE2895C088AD08B0104DA1672A4EB26FC52545CC7D7A01B266CF546C403C45BD129EB41BDD9200B +176: 65A245B49352EE297D91AF8C8BE00528AC6E046DD83AC7BD465A98816DD68F3E00E1AE8F895327A7E9A8C9326598379A29C9FC91EC0C6EEF08F3E2B216C11008 +177: C95654B63019130AB45DD0FB4941B98AEB3AF2A123913ECA2CE99B3E97410A7BF8661CC7FBAA2BC1CF2B13113B1ED40A0118B88E5FFFC3542759EA007ED4C58D +178: 1EB262F38FA494431F017DAD44C0DFB69324AC032F04B657FC91A88647BB74760F24E7C956514F0CF002990B182C1642B9B2426E96A61187E4E012F00E217D84 +179: 3B955AEEBFA5151AC1AB8E3F5CC1E3767084C842A575D36269836E97353D41622B731DDDCD5F269550A3A5B87BE1E90326340B6E0E62555815D9600597AC6EF9 +180: 68289F6605473BA0E4F241BAF7477A9885426A858F19EF2A18B0D40EF8E41282ED5526B519799E270F13881327918278755711071D8511FE963E3B5606AA3716 +181: 80A33787542612C38F6BCD7CD86CAB460227509B1CBAD5EC408A91413D51155A0476DADBF3A2518E4A6E77CC346622E347A469BF8BAA5F04EB2D98705355D063 +182: 34629BC6D831391C4CDF8AF1B4B7B6B8E8EE17CF98C70E5DD586CD99F14B11DF945166236A9571E6D591BB83EE4D164D46F6B9D8EF86FF865A81BFB91B00424B +183: 8B7CC339163863BB4383E542B0EF0E7CF36B84AD932CDF5A80419EC9AD692E7A7E784D2C7CB3796A18B8F800035F3AA06C824100611120A7BDEB35618CCB81B7 +184: 4F084E4939DD5A7F5A658FAD58A18A15C25C32EC1C7FD5C5C6C3E892B3971AEAAC308304EF17B1C47239EA4BB398B3FD6D4528D8DE8E768AE0F1A5A5C6B5C297 +185: 48F407A1AF5B8009B2051742E8CF5CD5656669E7D722EE8E7BD202060849442168D8FACC117C012BFB7BF449D99BEFFF6A34AEA203F1D8D352722BE5014EC818 +186: A6AA82CD1E426F9A73BFA39A29037876114655B8C22D6D3FF8B638AE7DEA6B17843E09E52EB66FA1E475E4A8A3DE429B7D0F4A776FCB8BDC9B9FEDE7D52E815F +187: 5817027D6BDD00C5DD10AC593CD560372270775A18526D7E6F13872A2E20EAB664625BE7168AC4BD7C9E0CE7FC4099E0F48442E2C767191C6E1284E9B2CCEA8C +188: 08E41028340A45C74E4052B3A8D6389E22E043A1ADAB5E28D97619450D723469B620CAA519B81C14523854F619FD3027E3847BD03276E60604A80DDB4DE876D6 +189: 130B8420537EB07D72ABDA07C85ACBD8B9A44F16321DD0422145F809673D30F2B5321326E2BFF317EF3FEF983C51C4F8AB24A325D298E34AFCE569A82555774C +190: AC49B844AFAA012E31C474CA263648844FD2F6307992C2F752ACA02C3828965175794DEEE2D2EE95C61CD284F6B5A2D75E2EF2B29EE8149E77FB81447B2FD04B +191: B9D7CA81CC60BB9578E44024E5A0A0BE80F27336A6A9F4E53DF3999CB191280B090E2AC2D29C5BAAD9D71415BDC129E69AA2667AF6A7FD5E189FCCDCEE817340 +192: A755E113386572C75CED61D719706070B9146048E42A9F8CD35667A088B42F08808ABDF77E618ABD959AFC757379CA2C00BCC1A48390FA2BFF618B1E0078A613 +193: A73C7DEBED326F1C0DB0795EE7D6E3946894B826B1F8101C56C823BA17168312E7F53FC7DBE52C3E11E69852C40485E2EF182477862EA6A34EC136E2DFEEA6F4 +194: 6CB8F9D52C56D82CAC28F39EA1593E8BB2506293AC0D68376A1709B62A46DF14A4AE64B2D8FAB76733A1CED2D548E3F3C6FCB49D40C3D5808E449CD83D1C2AA2 +195: 683FA2B2369A10162C1C1C7B24BC970EE67DA220564F32203F625696C0352A0B9AD96624362D952D84463C1106A2DBA7A092599884B35A0B89C8F1B6A9B5A61E +196: AAD9AD44610118B77D508AEB1BBCD1C1B7D0171397FB510A401BBC0EC34623670D86A2DC3C8F3AB5A2044DF730256727545F0860CE21A1EAC717DFC48F5D228E +197: C42578DE23B4C987D5E1AC4D689ED5DE4B0417F9704BC6BCE969FA13471585D62C2CB1212A944F397FC9CA2C3747C3BEB694EC4C5BE68828DDA53EF43FAEC6C0 +198: 470F00841EE8244E63ED2C7EA30E2E419897C197462ECCCECF713B42A5065FFF5914BC9B79AFFE8F6B657875E789AE213BD914CD35BD174D46E9D18BD843773D +199: 34FC4213730F47A5E9A3580F643E12945CFCB31BF206F6AD450CE528DA3FA432E005D6B0ECCE10DCA7C5995F6AACC5150E1B009E19751E8309F8859531844374 +200: FB3C1F0F56A56F8E316FDF5D853C8C872C39635D083634C3904FC3AC07D1B578E85FF0E480E92D44ADE33B62E893EE32343E79DDF6EF292E89B582D312502314 +201: C7C97FC65DD2B9E3D3D607D31598D3F84261E9919251E9C8E57BB5F829377D5F73EABBED55C6C381180F29AD02E5BE797FFEC7E57BDECBC50AD3D062F0993AB0 +202: A57A49CDBE67AE7D9F797BB5CC7EFC2DF07F4E1B15955F85DAE74B76E2ECB85AFB6CD9EEED8888D5CA3EC5AB65D27A7B19E578475760A045AC3C92E13A938E77 +203: C7143FCE9614A17FD653AEB140726DC9C3DBB1DE6CC581B2726897EC24B7A50359AD492243BE66D9EDD8C933B5B80E0B91BB61EA98056006516976FAE8D99A35 +204: 65BB58D07F937E2D3C7E65385F9C54730B704105CCDB691F6E146D4EE8F6C086F49511035110A9AD6031FDCEB943E0F9613BCB276DD40F0624EF0F924F809783 +205: E540277F683B1186DD3B5B3F61433396581A35FEB12002BE8C6A6231FC40FFA70F08081BC58B2D94F7649543614A435FAA2D62110E13DABC7B86629B63AF9C24 +206: 418500878C5FBCB584C432F4285E05E49F2E3E075399A0DBFCF874EBF8C03D02BF16BC6989D161C77CA0786B05053C6C709433712319192128835CF0B660595B +207: 889090DBB1944BDC9433EE5EF1010C7A4A24A8E71ECEA8E12A31318CE49DCAB0ACA5C3802334AAB2CC84B14C6B9321FE586BF3F876F19CD406EB1127FB944801 +208: 53B6A28910AA92E27E536FB549CF9B9918791060898E0B9FE183577FF43B5E9C7689C745B32E412269837C31B89E6CC12BF76E13CAD366B74ECE48BB85FD09E9 +209: 7C092080C6A80D672409D081D3D177106BCD63567785140719490950AE07AE8FCAABBAAAB330CFBCF7374482C220AF2EADEEB73DCBB35ED823344E144E7D4899 +210: 9CCDE566D2400509181111F32DDE4CD63209FE59A30C114546AD2776D889A41BAD8FA1BB468CB2F9D42CA9928A7770FEF8E8BA4D0C812D9A1E75C3D8D2CCD75A +211: 6E293BF5D03FE43977CFE3F57CCDB3AE282A85455DCA33F37F4B74F8398CC612433D755CBEC412F8F82A3BD3BC4A278F7ECD0DFA9BBDC40BE7A787C8F159B2DF +212: C56546FB2178456F336164C18B90DEFFC83AE2B5A3ACA77B6884D36D2C1DB39501B3E65E36C758C66E3188451FDB3515EE162C001F06C3E8CB573ADF30F7A101 +213: 6F82F89F299EBCA2FE014B59BFFE1AA84E88B1915FE256AFB646FD8448AF2B8891A7FAB37A4EA6F9A50E6C317039D8CF878F4C8E1A0DD464F0B4D6FF1C7EA853 +214: 2B8599FF9C3D6198637AD51E57D1998B0D75313FE2DD61A533C964A6DD9607C6F723E9452CE46E014B1C1D6DE77BA5B88C914D1C597BF1EAE13474B4290E89B2 +215: 08BF346D38E1DF06C8260EDB1DA75579275948D5C0A0AA9ED2886F8856DE5417A156998758F5B17E52F101CA957A71137473DFD18D7D209C4C10D9233C93691D +216: 6DF2156D773114D310B63DB9EE5350D77E6BCF25B05FCD910F9B31BC42BB13FE8225EBCB2A23A62280777B6BF74E2CD0917C7640B43DEFE468CD1E18C943C66A +217: 7C7038BC13A91151828A5BA82B4A96040F258A4DFB1B1373F0D359168AFB0517A20B28A12D3644046BE66B8D08D8AE7F6A923EA1C00187C6D11DC502BAC71305 +218: BCD1B30D808FB739B987CBF154BEA00DA9D40380B861D4C1D6377122DADD61C0E59018B71941CFB62E00DCD70AEB9ABF0473E80F0A7ECA6B6DEA246AB229DD2B +219: 7ED4468D968530FE7AB2C33540B26D8C3BD3ED44B34FBE8C2A9D7F805B5ADA0EA252EEADE4FCE97F89728AD85BC8BB2430B1BEF2CDDD32C8446E59B8E8BA3C67 +220: 6D30B7C6CE8A3236C0CA2F8D728B1088CA06983A8043E621D5DCF0C537D13B08791EDEB01A3CF0943EC1C890AB6E29B146A236CD46BCB9D93BF516FB67C63FE5 +221: 97FE03CEF31438508911BDED975980A66029305DC5E3FA8AD1B4FB22FCDF5A19A733320327D8F71CCF496CB3A44A77AF56E3DDE73D3A5F176896CC57C9A5AD99 +222: 785A9D0FBD21136DBCE8FA7EAFD63C9DAD220052978416B31D9753EAA149097847ED9B30A65C70507EFF01879149ED5CF0471D37798EDC05ABD56AD4A2CCCB1D +223: AD408D2ABDDFD37B3BF34794C1A3371D928ED7FC8D966225333584C5665817832A37C07F0DC7CB5AA874CD7D20FE8FAB8EABCB9B33D2E0841F6E200960899D95 +224: 97668F745B6032FC815D9579322769DCCD9501A5080029B8AE826BEFB6742331BD9F76EFEB3E2B8E81A9786B282F5068A3A2424697A77C41876B7E753F4C7767 +225: 26BB985F47E7FEE0CFD252D4EF96BED42B9C370C1C6A3E8C9EB04EF7F7818B833A0D1F043EBAFB911DC779E02740A02A44D3A1EA45ED4AD55E686C927CAFE97E +226: 5BFE2B1DCF7FE9B95088ACEDB575C19016C743B2E763BF5851AC407C9EDA43715EDFA48B4825492C5179593FFF21351B76E8B7E034E4C53C79F61F29C479BD08 +227: C76509EF72F4A6F9C9C40618ED52B2084F83502232E0AC8BDAF3264368E4D0180F6854C4ABF4F6509C79CAAFC44CF3194AFC57BD077BD7B3C9BDA3D4B8775816 +228: D66F2BEAB990E354CCB910E4E9C7AC618C7B63EF292A96B552341DE78DC46D3EC8CFABC699B50AF41FDA39CF1B0173660923510AD67FAEDEF5207CFFE8641D20 +229: 7D8F0672992B79BE3A364D8E5904F4AB713BBC8AB01B4F309AD8CCF223CE1034A860DCB0B00550612CC2FA17F2969E18F22E1427D254B4A82B3A03A3EB394ADF +230: A56D6725BFB3DE47C1414ADF25FC8F0FC9846F6987722BC06366D5CA4E89722925EBBC881418844075397A0CA89842C7B9E9E07E1D9D183EBEB39E120B483BF7 +231: AF5E03D7FE60C67E10313344434E79485A03A758D6DCE985574745763C1C5C77D4FB3E6FB12230368370993BF90FEED0C5D1607524562D7C09C0C210ED393D7C +232: 7A20540CC07BF72B582421FC342E82F52134B69841EC28ED189E2EA6A29DD2F82A640352D222B52F2911DC72A7DAB31CAADD80C6118F13C56B2A1E4373BE0EA3 +233: 486F02C63E5467EA1FDDE7E82BFACC2C1BA5D636D9F3D08B210DA3F372F706EC218CC17FF60AEF703BBE0C15C38AE55D286A684F864C78211CCAB4178C92ADBA +234: 1C7A5C1DEDCD04A921788F7EB23361CA1953B04B9C7AEC35D65EA3E4996DB26F281278EA4AE666AD81027D98AF57262CDBFA4C085F4210568C7E15EEC7805114 +235: 9CE3FA9A860BDBD5378FD6D7B8B671C6CB7692910CE8F9B6CB4122CBCBE6AC06CA0422CEF1225935053B7D193A81B9E972EB85A1D3074F14CBB5EC9F0573892D +236: A91187BE5C371C4265C174FD4653B8AB708551F83D1FEE1CC1479581BC006D6FB78FCC9A5DEE1DB3666F508F9780A37593EBCCCF5FBED39667DC6361E921F779 +237: 4625767D7B1D3D3ED2FBC674AF14E0244152F2A4021FCF3311505D89BD81E2F9F9A500C3B199914DB49500B3C98D03EA93286751A686A3B875DAAB0CCD63B44F +238: 43DFDFE1B014FED3A2ACABB7F3E9A182F2AA18019D27E3E6CDCF31A15B428E91E7B08CF5E5C376FCE2D8A28FF85AB0A0A1656EDB4A0A91532620096D9A5A652D +239: 279E3202BE3989BA3112772585177487E4FE3EE3EAB49C2F7FA7FE87CFE7B80D3E0355EDFF6D031E6C96C795DB1C6F041880EC3824DEFACF9263820A8E7327DE +240: EA2D066AC229D4D4B616A8BEDEC734325224E4B4E58F1AE6DAD7E40C2DA29196C3B1EA9571DACC81E87328CAA0211E09027B0524AA3F4A849917B3586747EBBB +241: 49F014F5C61822C899AB5CAE51BE4044A4495E777DEB7DA9B6D8490EFBB87530ADF293DAF079F94C33B7044EF62E2E5BB3EB11E17304F8453EE6CE24F033DDB0 +242: 9233490344E5B0DC5912671B7AE54CEE7730DBE1F4C7D92A4D3E3AAB50571708DB51DCF9C2944591DB651DB32D22935B86944969BE77D5B5FEAE6C3840A8DB26 +243: B6E75E6F4C7F453B7465D25B5AC8C7196902EAA953875228C8634E16E2AE1F38BC3275304335F5989ECCC1E34167D4E68D7719968FBA8E2FE67947C35C48E806 +244: CC14CA665AF1483EFBC3AF80080E650D5046A3932F4F51F3FE90A0705EC25104ADF07839265DC51D43401411246E474F0D5E5637AF94767283D53E0617E981F4 +245: 230A1C857CB2E7852E41B647E90E4585D2D881E1734DC38955356E8DD7BFF39053092C6B38E236E1899525647073DDDF6895D64206325E7647F275567B255909 +246: CBB65321AC436E2FFDAB2936359CE49023F7DEE7614EF28D173C3D27C5D1BFFA51553D433F8EE3C9E49C05A2B883CCE954C9A8093B80612A0CDD4732E041F995 +247: 3E7E570074337275EFB51315588034C3CF0DDDCA20B4612E0BD5B881E7E5476D319CE4FE9F19186E4C0826F44F131EB048E65BE242B1172C63BADB123AB0CBE8 +248: D32E9EC02D38D4E1B8249DF8DCB00C5B9C68EB8922672E3505393B6A210BA56F9496E5EE0490EF387C3CDEC061F06BC0382D9304CAFBB8E0CD33D57029E62DF2 +249: 8C1512466089F05B3775C262B62D22B83854A83218130B4EC91B3CCBD293D2A54302CECAAB9B100C68D1E6DDC8F07CDDBDFE6FDAAAF099CC09D6B725879C6369 +250: 91A7F61C97C2911E4C812EF71D780AD8FA788794561D08303FD1C1CB608A46A12563086EC5B39D471AED94FB0F6C678A43B8792932F9028D772A22768EA23A9B +251: 4F6BB222A395E8B18F6BA155477AED3F0729AC9E83E16D31A2A8BC655422B837C891C6199E6F0D75799E3B691525C581953517F252C4B9E3A27A28FBAF49644C +252: 5D06C07E7A646C413A501C3F4BB2FC38127DE7509B7077C4D9B5613201C1AA02FD5F79D2745915DD57FBCB4CE08695F6EFC0CB3D2D330E19B4B0E6004EA6471E +253: B96756E57909968F14B796A5D30F4C9D671472CF82C8CFB2CACA7AC7A44CA0A14C9842D00C82E337502C94D5960ACA4C492EA7B0DF919DDF1AADA2A275BB10D4 +254: FF0A015E98DB9C99F03977710AAC3E658C0D896F6D71D618BA79DC6CF72AC75B7C038EB6862DEDE4543E145413A6368D69F5722C827BA3EF25B6AE6440D39276 +255: 5B21C5FD8868367612474FA2E70E9CFA2201FFEEE8FAFAB5797AD58FEFA17C9B5B107DA4A3DB6320BAAF2C8617D5A51DF914AE88DA3867C2D41F0CC14FA67928 +256: 1ECC896F34D3F9CAC484C73F75F6A5FB58EE6784BE41B35F46067B9C65C63A6794D3D744112C653F73DD7DEB6666204C5A9BFA5B46081FC10FDBE7884FA5CBF8 + Hash: chc_hash 0: 4047929F1F572643B55F829EB3291D11 1: 8898FD04F810507740E7A8DBF44C18E8 diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/hmac_tv.txt --- a/libtomcrypt/notes/hmac_tv.txt Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/notes/hmac_tv.txt Fri Feb 09 21:44:05 2018 +0800 @@ -1341,6 +1341,1448 @@ 255: E8702ADD4B9034BCA0590FF897C10022C56D08FC4EEE0A43BA85E9E9C2086616B1BE7B6F928A3C53755506ED2D9D62DF5BA4A1862FBCDBA20683931A2244AFBE 256: 6E6A3CDE12F2CB3A42EC8A5D21B435C4DA4DF6CA7E41537D361D8169158287BF1D2241581DE07F88FE92F5AE4E96EB9C489FC3B258EA3842EA2D511CE883883E +HMAC-sha512-224 + 0: 48EFBD72991A1B6C1A276D5F37B62E55DEADDBE0BD107E4BFA366C66 + 1: 839952295D1158120AC85ECE73C3983626390813FD983578BFB34101 + 2: DDE748FF9F9784F23BE861CC2C7FA01DF6AE97AB5E40BE7DB4941DCC + 3: CBC29E8C2E20F04D9AA8758F19D960287A5A31EBB6056DD31F69AF43 + 4: 23D379745B258F1CFB81E084AC79473E9DC5733E63DAB944FB929F2B + 5: 3A3A791D93D0C8817090E28192D3449BE494EEF54337BED209936746 + 6: 1B33D31AB9FD79D0A93EB9A50E8E7A4E78B448A05DD3CF93D9A36B75 + 7: 3C89FF579EC0521AADE48B00C7DD2ABFA936A4C5455688870B4121E5 + 8: 2F8520FEA211192EA7B5A1BEE7F27832AE7CC411F8FAAFF8FC573016 + 9: EB45FE092721B4190C63BE24D696F81FC84AFD6CF6E1412A90B8CE9D + 10: B25214D1058F6ABADB544B638AFD69DA778447D1EC58277215DAE60A + 11: 96B714CC79B11CF9B0B8B903AA195BDE97B84AF8EBB3C20A6CC1F163 + 12: 3ADCA3DC4F0BF937F0C01D277D448A46DE7E3AFF807926D2F608BC37 + 13: 0EF449E66BFAA6E5000271077D0B9FEC85203C63EF3A555DE2518B06 + 14: 022B7F16DBC27E933AAB75E36220BBDDE629422DE52FE52F7CB5AADC + 15: 2B8BDB3ED8FF84D18E69933E83C545FAB236A7506F025BCBBFC304E7 + 16: B338B15B48E49B4E8597E477EB64C9AEA29F1AC96E33AFDFE528CC60 + 17: 9DA6C657C280547E17BB72E307F8751077124E7CE31937F19D783CD8 + 18: 683FEA80E1AACC175488E0547F98AC771A255E92CFB22C1D95393451 + 19: 5FC8148383C08015F483C1073AC5CA9746886B88669428A3FD3FFFBA + 20: C0CF0B758B58F0E2DE2340C57192BB158E72D2FC126DC34F8AACE2EE + 21: 65469E3C95382569C40CCDE30BD09C822EE017F4A8D9306E8469DFBA + 22: 08AC0A7EC2DCE74AC22243DEA716D0279D7E3F8D4ACEF1679A37CB50 + 23: 6576D56228261D1F42BBD95C096D134E15747F4EF505AFB1D292DCFE + 24: 1E35DD06C89A8DB1536A95584B4319D56D5E58567F49F30B9532319B + 25: 6923F40994B9773B31CFFAB037F50F934E65F376A250D884B1135E4B + 26: DFA27EF85E5EE8DED1D20E090200E8917F6E7854766AE3C6E587DD6B + 27: 600F788C7B71CB72E10F5C4A8E92B77EA6DC8CA5A973647FCBE7BB5A + 28: 3ECC120D2BD6AB1A12517D85C7BEBB5C5A84DD946101C444D2B0C966 + 29: C2E8D1FAEF0F22A3DA726142FA32EE59F21C32628D6F3A19A97C3D3E + 30: 66A1CE87C65EB602284EF6DDF3F4C21F45A7929E99BED1969A63C5A2 + 31: 7F19B1FDBFDF53F80D96F5E6C9F332BB6288CCBAA4332CA48D828F92 + 32: 6C0FE6A2C4684AFBE80A8115B9D2DA15E6B4252A7CB3743261D5366C + 33: 37E4D09EFEBA5F9B93DE66EF903995CED65DD257DBE75AD83B33496A + 34: 8DA8F60B56EC0E251BD622DD811E1E872043F6CF08ECB3624E15BED2 + 35: 8FE24873322EE8118DD2A7E5F86B0D97B9F0C4CAFE90D0B0EA297DE8 + 36: 8CFA8029966C1CFA41B298072E673F8762C205D31F62952F45B31BB2 + 37: 53276A17E8351255D48E6CE6BAB2AE7F4D538F58A7F107C2CAC6EF56 + 38: FAE09DD82A2038B168D4BC23F2A52FE4D2E532BFCCF3109849624CA5 + 39: B37B81213E623D6744914F859C08C020C36A0B266651691ABDD9FB4D + 40: E0E584B70EFCD22727489D86C13BFD5B11218BECFFD12224AFE8BBDB + 41: BC9C6FED305BD9882D74533E3082782F58BBB9CE71F3507A4F928F0F + 42: 12411F98581BE2230EB7A0865149779D259A4CC5D9C2F4E792180B10 + 43: 56133ECEA7994F5216DA535BCB81CA193FF523C0FCB10E5E6593EA31 + 44: 97FD2C66D1D594B943BDE7E3F157B65B0CF8D6EAA08BAD0A218D96EF + 45: 2734BDAB39E9D243043B81FF4C6618AF7794F7D566487598A44110F9 + 46: 6D9E305E16377873B49FC8408BE1AC42BF1AA4609E7BBD83464903AA + 47: EBB237E61FD7E8D0003A4F4DB1AEB887073282311729BB56F4958E12 + 48: 9A85D05C61B90B5C18E8E4B3FA1197A1895B794BD40AA01624415DEA + 49: 05D7C140A6A20BD82D97812B48DDA409871EC57FB0847F0DAF26A9B8 + 50: 71D65BC13FF4AA3F679617C83D90689BA33C428209B59F279DF8C672 + 51: 0F2045E03869ABD13798D62D34F4F6059157C9533999F32244933458 + 52: C4E9037696D5E82E949DCA2715990A8460E0FE63928E4AC1EDF38F02 + 53: F41678F54F797944E043594234B92A7A918D32411C5E200C02C15F81 + 54: 244FA5F5A7981357358EB2825A8E48FD7F2691891D9D6A0D1E2CEC38 + 55: 605EE444B396FBD3A53EEEBF790A3B77F11FA06AAD253F2D12314C19 + 56: E7020C2C0F0950D713A006C1C577374D791F09B76F7E35A0606BAAEC + 57: AF1D23B0BC656709B57BCF069AB307E479C69F175238A190E2AAC393 + 58: 9A6260BE8242701E865CD781298586BC2C224723BF4E0A8F1DC50E9B + 59: 206C7CB8CBBFE79E1FA25A33E49DF7AD9673C8ACC1AA730EA2BA2A68 + 60: 7AE765E266FAA21812AAC4338000AFA44E0F80C2ABB325DA010548BD + 61: 9D17B8886D68652CAC09151912BB5969F399FC698A83BF0BF3C74FA8 + 62: F4EC709C89274BE6D36800FDDACCC6638F83FD058FD356E86A320123 + 63: 82892F3D1F6EED960E4814A04545115CC7BCD918606F4A150C60327D + 64: 2B97508B1FCF1C00A1D7646C93E196048A9216C80A7DBE128B087A42 + 65: 0CB2102EB19C395C3DFA52671E18DFB818246C97FE5A0C18544AC98E + 66: 040E1B2E46E2DAE8AF799386F341766384817826CE7664C726B248B7 + 67: 07225AF0EA6AC19945A07FC8BD67FC825A37ECF41C5A86060FC5B5FE + 68: 0A476E60506A019458032F6392CAE63D69B1DD8BCC67C3F867A04BDE + 69: 6FC8CAC1A00E57EC0E59D73104A5C3517CAD3F0CA1A2832C08EB66F9 + 70: 34C8FF46550C16BD8A0DF97C6AE857791F327597A1AF412D4B260536 + 71: D518FD80AA92B3FB7A48C74E136C98D63070DA11B8558FD1506EBA35 + 72: 7744B4CA11C338EB81BCF4202CAFD3B1B997AD63089E9612E10E1C7B + 73: 0D2CE3B5C63F05424B7534E5541C821B21216EA38140975D01D798F4 + 74: 7FEF76C6AA4975C98F1B0F491A4E7F2760E4742F697D3B2BB36B3355 + 75: 48974ADBA6926A3AC726872C0A2E86B6B92FDB86721E16F33AF898D6 + 76: 6AD0D4DFCB43BFB8EB86D71E46185C13871A64C53D74C0C22A7B6C31 + 77: 57720B3205D3062D7E07079CC74A41D4396FF6B6A64B0B09333F0404 + 78: B8154B62DEAEBD4D8DD0B9141629CDB565F37DE9F97FCA1B4A25EDF8 + 79: 3EC327CD667208DFF7991BF9E4F6CF5056F7AD587C7C284E70076978 + 80: 83C505DCD265C6D694D8713404BF2AD7D5650E5DAC5213601B598C4E + 81: D1162BD2E8E32CB7084C6DB435A3E579DD48A09A6C5FB9462594FAF6 + 82: 2A4B3B272D6DF409C785784442067548A3EA21DA8D87432CCA8D4FBA + 83: E4F2F49F66551F2D3502E369B3D30E82DA681E1675BE6E467855716A + 84: D0DF577E51FA006C54BC10087DD8EC1F2C5BCA01D18C76ACF8497901 + 85: 5C750D859A10B9860D051ED996B5715BF1435EE3F79AAD28702BCF2A + 86: C81980EB158DD340B404B4E8EF86B9DF685EAA3DA7C836DE9BE3A6CC + 87: 189CE82411AF0612CCF224DE13BBB34167E24253BB5D0A2271861ECA + 88: DC6FF0AEEFBCA6F550ECFDBC2D53A8A6EFF92DB62BEBEF3A490A5512 + 89: 55644C0BED38F73039F8F367E3D17E5D009F14AFDDC89245AA20E2EB + 90: 7F137F0AE9566665B86F466FF000C36A3ECF2158E448C44FDE9B685F + 91: F455FA8E060CEA12A3DF67D66E73D766B4AB82D7647362F103D95950 + 92: 687D5B52A2179DE3768F47A676CB4973FB1AA806002E2A2B3949A62E + 93: F9EA2922CAA3FF38FEBBDC41C49A25A2D11E65E9BEDCFDECB74716D2 + 94: DEC3626E3022A697CBBFD35DCF2AA593311B839B62B618C395F8FABC + 95: 799B4021680661DFC94A87EF06E8EC2CC9C5CA9CA6582016C40DFBF0 + 96: A7C44F66C5D7A1B5FE63E5C9032037F1D7E5BCE4E782E8733502892C + 97: 7824BAF4BAAB467C66206D60072752913D4C4664DBA9197289528ECB + 98: E5A0166B21D133CDDD7ADD2F000F0C97DB9E02C15E6C0D7E3761D08C + 99: 26B94C44E3B082C083C507976DC5271D64FEB19DBFBF7C38967E424D +100: 4502E140EF20B35E73DF874AFD5C83993DBC395B19197EB321C1A1FD +101: 4B098D373B6ED0E643F4D7AD71465154386457A62F409E6BE5523687 +102: 7E2F229DEBB0C08F1E7C1623F68854F9BAE2142E44EAD46CC560AAC6 +103: 685919BA2AC4826513E2A80AA3A68625E1E04B7B82510FCE0A0F80F8 +104: D77057551DDE8539059F810E1E5D1EA0F9BD3C5057D3720D25D6496D +105: 7CA61B2940A9E015C4BEACD10A2A5B5B6A1480A1BB79FBD0AA40E0E2 +106: E8B27E9AEEF6DFABFCE02989003FF965E24B888B912EA0C98C44114A +107: BE7CE40509391771AF7D8C652620520D19792BA902565910CF19ED06 +108: 2FEAE129B5A74B9EC26359553E051C09A02812F81958E8BE90326DE7 +109: 4BCE3E62A8939372CA71E83661D2D1B297B5F9EA76474BA1E5D15BEA +110: 9519D5CA28959768E59BB4C698F77EA1752B9C9F5BC6DAA684980FEE +111: 44B228490D8AE1FA0867F59C950F6B28DAF012A11D83A81A295AF2E4 +112: 595447B547F45C74D1014AFCBDB5922B10D2554E134D335597BFD351 +113: 829C4F36A1B49D658AF8366AE2B4500586625C849A3F8B03498C0271 +114: 32DF56524AB646F3DA2CB8F16FD5B4B5B12BEDFC8C525BE30B892125 +115: FE03ED2B0E48E730DF1C929E0D85FADA7E063285AC70832BEDC7B110 +116: E37C4E201A5B500915F63DC7C4A2C8D1585A893636E22C349C379A0F +117: 6994EAABD9981D8D47E4C0141FFA90E715E91CD0E784169427468DE0 +118: F00CDFB559A1E5DAC4CE58F160A59AABF1C52ECFC033FD2A249CAFF7 +119: 898B07C76126051871DC47558B53B50C626947F4F33A28C5337E1255 +120: BD063BE62F249B9A2FB1A0436616FBFCB5B2AD8A5DF1E7ABFE7A329F +121: 2D146FBDE27D9B602B77D407120CEB2CAE9D28B11D1EC346D5B1D3C6 +122: 8DFAE64D860BDF213F2A4270002C148BE8E84D0311BEB38DC5F2249C +123: 06052EC65A786D16765D2AB54389C7E85339C36A5545A853E055AE6D +124: 14CF06FCB039E3710EC182B1F5E18312B5E11EC93E0AE84D7A5BCA5D +125: 67C4256494E9291E1460AD0536102E41091F04A1AA44C78D47D6D1A0 +126: D9803698CCC34B0D46590CF24C5FCF2F36BC51FD2686A96D88D2BCE1 +127: 6914FAA3532F1AC05CC4EDD495D6912C3F5965987D9D1D4AA4B21E00 +128: 00A9DC95039BF57918AC31B1E373D77D285A84D44DBDFF9ABFBE7466 +129: 1C6B4EDEC9F9CCB58DCFF50C802BE10E79501B8792FBA8DCE52B2CA9 +130: FEDFBFE3C8172E1834E44A6752A01AFB6C8246C2353787FCF1A6BC62 +131: 27D852515A2B6B1C02D0E4D736D2DE326D5C904EEEDCCD64FDA6FBD6 +132: E3E80979EFBD933792258193F413F3E55315BB46F74A538474DE3565 +133: D151F247C1316BA8ECABB0FBADF9D4CEFBAA93EFE2C89C6C8EFFFA6A +134: 96E250A71B2521197C570EE60509BEAA3D0FB1B2338DACE0094ABC46 +135: EAB4CFCAB47A7C813A99577745A96D806B8EFDD5BC6F8EE9767267C4 +136: BAAC26619C1C10A9F9F3777D199E5FDB737DE32EE00B866FFF7F16A3 +137: D07F3979AF9EAEE82F6157E41348C259AA2D36889EAE8D002C4790C4 +138: 8EAABFC87D6C6AD10B783B54AAAA03A5F3BDE35A04F4DA9ACFF38772 +139: 7706344CC31F387CD703FD3348D2207879BF467E61A3E1CD9F567056 +140: 1412F87D074B582A81193D0F70F5C22229C51E2DE00045CBB05DDAD9 +141: 6193E659A599F54CB0B349B0E869010F257D9ADBC25514C6084F3273 +142: 4382099F2F015954D7C9E586C539A0786E58A723F95ACC9239CC68A2 +143: 3A520462C8DAEACBB88F1D68AC2DC49E337835F9E453C3004306F78D +144: DFBA194E4FC14F2B9605DBEA44F5C06D4FBA6FCA32051788FC009B37 +145: 30E504ECD4F40AD31886EE5E4571FBC5C54F6BAC96008171FE2B5275 +146: 68331004646EE0FC06565E191A5852BA6E45236B516DA9B87A442DE0 +147: FA9B8009638947DB8F7AC40D67743AA26302415FD66A73DFC983CB3D +148: B6A32174525E96186EDB85E3BB2F0B45B25D6977B7096E5DDECDD934 +149: AC09A3F072A7BAA0EC985DDFF5CE34BA31FD87981A41ED35F4E38FCF +150: C9946B4FF4245FEA0D40EC5F9439638B9AF0E886E1D5C8A9F04C874E +151: 3310303B0138A108453729DE4F075B61E8CD6FB59997CDEFF4736E38 +152: 53BA121A4A0D61468F22850DD658D31ADA31E0AF737E5E2B6F2F04E9 +153: F7213DBE2423D88FDC42890FB1CBB5E59B11641E67FCC093DDACADE2 +154: 4961A8695490DD6FE0748FDE2042D55B49176D3C450E323672BB2277 +155: 6BF7C3FCB97ED327987B17356B6D3041239392D5645664BE3DF56248 +156: D70C01960B95A2448F1F2EF31266DCFFEF4B71AE1A3C1FEB10B37324 +157: 2EBC7AB719A8DDDF75E4F1B3DC89C44B79C6AEA1D14F718462CAEB93 +158: E05E69B2B3254EE44406588B57754E295F783252C0813EFFD7B5C3AC +159: AE95B902D1D103DF530DDB7F23B5042B00DC3547C3F984D5EF622237 +160: 8EB2792098081D060698CAAFE89A17E619152856757AA70693615F65 +161: 41E0519DC9ED139EE6643D74553D44BA64E2970269C8F156C2D41CA4 +162: BE04EBF4F3BCDF671435F2D0058E2E2B924C7E8D5645DBE5F6B1BC1B +163: 927C73F4F7A760FD54383D7FD65556DB111E26D36107D4C58314E17F +164: 1A38B77BD45EF0661411CC1F5E8C2468188FEE7D8768AD4BF55F7412 +165: 7E5DCCBBAE6D0F628E409C1BCC266ACD824A6FDF01D39EA0E006887B +166: AB5A3611FBD94A61F6822F428462B69E20F660763FC116F10DF90ECB +167: 6428DFAD5C80BAE31173B0169B87DB88B9B55FD722A6BA8216C8B01B +168: 2836EEEEB3A8739F1098E8F0C14B070E40942F721EF3CF2DF29DBEE2 +169: E616758FEF5F6BD6E3A73C6A4BEB058956D3BEE8FAE489D8D548C881 +170: 2F7F4B3E1F57D94581054F05DBDA5848AA05F459C32C1ED0983C48C5 +171: 491E9FE109C7E0232DE1FD44F29AE728889CBF63F28AACFFD87E94DB +172: AE228F17075D696C6721F424A5D86ABC9F030A716FEC12353885AE1E +173: ECFBE1037F707D02849C032653FBC1B9D25BD353D10E9CEA44EF9513 +174: D6AB30DFCE87BA4F2C476FFD309B8869E393AB2FF4CD2132B64A74D9 +175: CB2FA4084BE1A1FC46B0A69091C9DD87D632CBC7684125DDB9AC6A64 +176: B1C2761E7652D38A04B819CB16EC6215B5D2479E86F7BE0085CA8B0D +177: B1BF4F1C96B3BD7D255052014E6F4D73A684BCA6F0A461310F47D8D5 +178: 8F294514DAA7CB978B8B0C5D76DC2006EA2008BDFDCEF0EDEB446B9F +179: 816A65E12EFD71A1113C4B819B88D67112401C9EFD4D855EF1092DEF +180: 6767EEAB8829B5F5BFE1BE604726C6C20FA0E54EAB0CE234FF5952E2 +181: C3C4C35690B0F28D329DFD061AAEDE2106BE2250FF537742E40EC41F +182: ECDEE6D9F4E121FC76B7F0C9B102960C69B6A1049191A11C2C7B8C90 +183: D8EF5B01A28D78949F0C58F8BE3D3BD3A74ED5DE0028BA42ED2B1140 +184: B43C43A6B6C73CD2D9D595BA20F2EC247B4D19B16A561EB26DBA59BE +185: EB7D7A248124057B9F74FC12916E559ACA75F20ECA1EB4E30FD2527A +186: FC707C7C06CE750695075E848E973EEDC9F85EB5BAF214FAC3C5AD4C +187: 678A5893561582CDEFE346CA10C16369DEFA9A17507B99ACF216E59F +188: 40765BAD0CB7932AE3B7A192E0B388D63C54EA63CAFE26AEE429033F +189: 3CAC08B9CB39953D3E3954EBBFA7A5811BCC99D9577DBAEE374771ED +190: DEDEBB105FC7B21F135DF6B69DE66D2664682946D1CABEEA1CAFAB72 +191: 79CDCB8D656F38CB7B4D8DA5EB65E6FFDF832060E9A823CAFB3C1B58 +192: 101385B6E5CB65126A27A7DB748A9290E77E0F9BEE449C1AB290D246 +193: 97BB59A5DB5AFC83E0A0D6DFE9587A960D0C8AF59308841F766D5A9D +194: ED222485EA7671E80A4109150E338D6BD2FABA6A700B4F7333C42AE8 +195: 06B50BFA5AB26627BAE25B98E382A1ACDCB21A7873B739E12F77522D +196: A815DE10C82C38D34B39BB405BDFD3B16D6C0261FF02325E81659A98 +197: 9538A95A5EDC58B478EBB83AA16983DEBA545A92159982BB1DD218E6 +198: 2E3AF5AF5E3ECD587CC91358E9C3DE5F361F124D72346728297D7D16 +199: F2B67A6B7465AD65E6F6AAEC246A37F5C430C9CC52BFB7D7B68F69E5 +200: 1A03820B8A7022C591C534613B23EB02641D95612A182FE49097715E +201: CFBCF8E23B47BB32FEC6EFE26F678A6616E6DED024F3C83ABDC32492 +202: 4922FD1B573E4A3F12067A9E516C3551F83661AB36AF1D317B3507BE +203: 21CA53A40B827CB28615D47E54AFA773A238D6370C528D6E51DCFB5E +204: 6594B5C299912FC4369F4756E55028CF82BB2BECD85814F91C0B036C +205: FE5B06D55E84F9EFB694A61C3460E55AEE34A6B4650649BADA886EBF +206: C7D15364B9CAABC921FD901A55070E6D305D1D1E8C903A142FDA20B7 +207: 92652A66541BBE1821B9CEEE55D2A4831BBFB4E9D5A35601F3482F5E +208: 1142C3CAC5A6F4F59D8A0B95BA49F7DD81FF647D6A46C8C80040925C +209: 9DF44B3DB1C6B138B346A101E6E25C308D2093E895837E7A8F4273EA +210: 036E6B3C4FE95959D73E5652B5AF98E8EFAD9A8ED6BFC8FF159B68F2 +211: 0E3CBED5EBB9230149847388DB06FD4A749902F391DC627C47E4C6DB +212: 938092819682B577C13904D3686027EA542E25B7C88ED3664D59E557 +213: B570AD6CD024E1E01FADFD2DDD9F8BA9B9F8A72B4CBAEA44C59EA8B7 +214: 7C8F6185886F1CF378D8DEDED86576C6AE8F8ADA692D82EF1E14713C +215: 5B2D3BF41C123656B34AFE19D446832EF3C7CC4EBA94AB1D0050830A +216: 8B4D91A13761BD006E792BD955BFE63F08BA94B0CA51773239B64853 +217: 041F9FA170274090D0D0C95C4604A7D3CB48E97773459169057E8F7B +218: CAE6C451053AA714E4BC801CCB87DD3E2C1E3553423995167C1BFAE7 +219: 16F92E470EB0DE652A96122647E22947645D65AE1F92D039A2B8CDC7 +220: DD1DBD6E91A1D240C8218033BEAC675A8E3EF0A7CDE00DEDB783F465 +221: BFA2D188941AE6AC2490359A0343802970D67A15DA7345EDC78181EF +222: DAB74C5A79E18B36A31E526538D0C9FFF9EEA0E45D0D7A93982D4841 +223: A7C6AAD2CFA553900C878B45FD0D7E7DA905746F9FF86B006998ECBF +224: 269B6DBD5748A95F9EA533E4348C7DC75148C41C89DC5F9C371D40B2 +225: 4FE2D39FC6F0E04EBC4A75308E59C9201F35162C264F373C17227092 +226: DC1C083866A3E5EB22A640B44F85ADF93FE649E6C76DC03906DC3A81 +227: 2B59775AD1C37F5679569987BA7920FCACF100FD3FFEB94A8995F431 +228: D8EB02B089C120E6ABA2E2642358AD4BF9EE19D263A8BBEF7B5721C1 +229: 0723AAE2214B61F78A977E1953D83C5B08127F6B9A2723163FE11318 +230: B0776EAC2CC0CB1875D42525608BAF1D64CE4B23D6E134C56727B979 +231: FC5AE9AB94A0153920EC376C1DF064782F377BB2648C0F49D5848CC6 +232: 7DC27D88145EF5E81AB5D2774408BE4E0C815BAC81ADD394E0BF6CBA +233: BF9665A989BE534A1C185AACC5E476F96E3104E1F7478F9E413D0485 +234: 8BF6BAEFD10C0DED1E3F3D4FCBCAF0591F17B986C41D45A32B18FFFB +235: 7A6F1DA4E356B3AD16B8BD2D96229A87E722B34CCFA2E425D3ADB4C4 +236: 13DA7382CA771F747E6FFF0999B5787B8FAEA91875A0871E05753141 +237: 329B5833BD5DBB13847A863E882EC388B014BB32EA31FAC004A0F0D7 +238: A1FD939A3214721E46CAE26974477C940D9AF79C2AD1DDDA270F663D +239: D4FA32047199341AB1D4B0D84C071B4E8B301F6F71A2E4D02E430589 +240: AAE0BA62DD736A105469FE5311C7F9BD5CA913FECD094D80D7E85E14 +241: 202AF230416873B89307D67CA8E8114FB9404A72F83F5F1043050C27 +242: B8D66FAD9C34E46609EF24DCFB92EA40B32C4769B02B1FCD2A424FF3 +243: 6B27A103D5DB1632650AF52160A2307CAF6B58713FDE11A0FE2F093D +244: 656DE776B94BC467B688D0B5F5C628EFB42C77897EE266E1A2D5079A +245: A4A3CA586E387F73A5275752D5FD0CEFDCE0A38E8B34C52E7FA93451 +246: 040C523CD7CC33FE5E6F8D0CCEA9046C31B4A3077B801F45811FA81C +247: D69E643B91B93592A43EAF560186B7469978CF51268092A0D1E64693 +248: 905B9304B5942D9283DEBEED6258E81DFD035AE77E6096E3F721B02E +249: E4558D0B406D536B5776C15CB0DB97A5BAF44D1C9902DA8C4B67D37A +250: 5C057CFD6953175A25A39A4291FB2E792C3B237D08F1BF4C7E0E8D9E +251: 1CC817A93A8F4926C95B33F6140C2B6DCC844A5942E5CB1B449197F3 +252: 7BABF3D47D61366A5EB605649E20EC498733189C8C51AD1853AE8FFE +253: 13D09996FC0A93BB28F340BD0CF30D8908F68B3758FC17190C625BCA +254: 8FB08B94C1B0EAE82852713641CC2FE0696727013877E4041A48C4A6 +255: 413EC6FB4311E11A44C6C031785A759F5BC9BBB65BBFD3266B7B3B3E +256: 80E0A2C5EEF95C7CFA8AB1FBD6F0E8D7C892D5B3BFE1390F2D4B7999 + +HMAC-sha512-256 + 0: 62D06962DD2C4114A07D0B1EF16DF27CC5F2D9C80FC246E8A9EF7B9B7C59AACC + 1: D5CFF98822CDDD2E92B6D0F71C612502A3DF7E3FF8790CE9C8BBFCCE717C4C9D + 2: CFAF93B7AB7525F116A0D130C9B19CE0032F8BFAC2FE49CF093C911AA5961A59 + 3: C95F7A592F833DF1E12A7A418AAE9740A55EE7991AB3D684B3F12732CA95D045 + 4: 4B0B3D921555F7DC2768F6AE7BB9EDC0E0C7F96926E282245BC46955DE8DBBF1 + 5: EE50DCC0EFE8B7D6E56747A7D38BF3F17FCF13C43995B003FFFD3B44AC6B5A7A + 6: 724F97FF36BC550BAF236C85F5E955ADAD4DA34EC7BCF5A2218D4BAE6DB970C7 + 7: DD6C61DEC4A5D57F67BF8A3937605E2B495D5AB730B461BC2CA9923EA98192EE + 8: F4344FC58C223BDFB4D7ABBBB22184B3838A00AA9F32B73034EB6D0B92B36DBC + 9: 2ACDC752DD983717AB43916E08DE084AC7C76FAA12F492955829267B5B364B8D + 10: D1941B1C3C82DAA71372B920C130C567F71EA2C7B74FFD147D9D47A6AA0DFE05 + 11: 7EAC8D2402006AC547DF468CACE2A0958BC1C6AF4FACCAB833E6ECEE4D9F7D42 + 12: 155CA430670C06DBA5D435030E0AEE85A334837CC1C283E00407CCB58C175C45 + 13: A1319AC88783DEAA14A49A4FEB9AE8A67141B1009E2CE03CFD4E74B6D05353FE + 14: 5166B9CA51BEB6D6F34C8149426538B1A4F67467C9BF48033E0CF0227767DCB0 + 15: 9B135D0A184BD1FAE7432F5DC5622FE8AE4C2346B5B7CCE49BF6A1040F39623C + 16: 4FDEE5ED2D03A4CBFE861D22036301E93C0418C56D40CA3B965E55B73B8E18DA + 17: 2B3AC5E1ED76494EFF814680BBEB4D9A9F4EC5D0CA7456F2D5FAD0585AD90ABA + 18: 4D37D3509A392000235D550A8419D0A6EFAEFD0EA63957FBF4FE40A2EFB5A763 + 19: BE6E4FEC5AC49092A42E868DCF26324BE91E3986C184BCBED4DA7CE7EDC97F22 + 20: 01E8CE2DE5E2FA9466F61673023A4C975914A10587BB81219F8D7FB304E9BACE + 21: F5964929973A3F8A160939D18387191D06CB63C077342CA3B1AF4DD28D956B7A + 22: 833BB2EC2996850A1A31BEBE5299F4C3B1F6D02A2A3A211F9FB24C1D41ADE3F8 + 23: D3730A1546F9B49995DC70CE5D855A1AF7DCF18CAC51765C3BEB8839D72A66DF + 24: 8D45D51CEFABF7617592B008F37A37BE2448446418721EE175044D965043C730 + 25: E67DA5D21A665C76232EA4EFC75DBCF3F50101B1244141DD56D739114B4BB6C5 + 26: C47D610C3CE0FDF34CB0DFF91FFAC8ABCD865B4E9606DA4B3E4568B615889975 + 27: 698CD86CCC14863A46EC599C070160C18F7368A9EF6430DE39597C554885D961 + 28: 942187A9236DFB636ECFFE0F9FF766962C81209CC3F3379ADA75D1C2357AF368 + 29: 5F3258F6E99F02322BF9C2E3AA04334F282A57F02D73E86E372D6C3EDD954E51 + 30: 19F4AF814C178BD81A515F0277E06DC028F791E7F6D0427EED563DD7FC35041D + 31: 60AAFF144C8DC8E9768A35EC713DC4F3146F322F66E29C5090AFD8441BD68476 + 32: E3A9AF6573D66861012B6DCB257F5DF8FD4ABBA279AB07ED2E021FE066F09F47 + 33: 711AA63ACBC51025CBE3ADEA8E3D68B95DD73D74E292CC57F62FE9FEF4D8C4F4 + 34: F3EB05A23BF0FA9D13913C033610BE9C7C7769FEFF271B5FA2850986FF75A40A + 35: FD9E5DD2C9E0102EB8A51E1306B3470CB67B6832C711A63156A63D82888B32BD + 36: EA7213FEACA19B5EEE7BBFBA7EEBA25E130222328CC21EF270F80D7DB942BCA2 + 37: 30D371E80BAEC1402B932E3856C15EB2E9F31C8A1D6B5A6E90EBB83AD57B7825 + 38: E8EDB9CD99D83B841C4DB9D0030BA4A4D9B5EEF2783F476316F0E641C4FFB04F + 39: 74D250A28418972D22B70DD6AA2B76DB45E29FEA64FE0B8A7129D54975ECB755 + 40: 51E3A878516AB35205E0D07E4D3932A1EDA5DFC4BC7570CE2060E72DB26AF119 + 41: C34B6F11F7BA6EC028833FDF934ABE864D1C8BD159C0D30C9E6FE12DF73522BB + 42: E59CFBABB73AC08DF99A7A2D79817B85BB0F2AA0E27527BBA4B63FB3A4F1343E + 43: EF7DAA4BDB64EDA5A5281658DFE834253F045C9594F9B488D982C031E68B9BA8 + 44: 1CE7C3AF27EB4453B4DAD5DE87520F0FB83EDFBD07EB82F2C923F22CA94E2D7B + 45: 905E951CC4D99611B6B9EB871FEC52E67B75BB37B3EAB72D0ED313D2298BBFE7 + 46: 762E0642564E2AADED03C6F9D11C375BBA7F483E88031242C1B9C9D05A4070FA + 47: A6EB16F4CC40698FCBA75C296A4B065728B156128B87DBE1AF318148FA6DF659 + 48: 0541B930547BD029B1134F95C7EC45FE3203495D0F4F4DD079D505F3FF1144E5 + 49: 84CC81D678843782D9AC7B1E04012502F9E40BFC42F4CAAB26FE078BAAEF323F + 50: 6319DB86D3DBAC66015D9446BAFA42F212EE88BEC3C4569FC871B16DD92ADE8E + 51: D7130A64E78D8FD210FD26AEE52D1E45F81440A2D7D264CF94E8136F349EA535 + 52: 9927214BB0CC3E83203395F3130AE2249F0EFED925AEA84BC38D67E768B4CEF9 + 53: 261E626722A5F3C64BB8761FA0EFC445FE718A58F4939C459D234021EB18F90A + 54: F5507EF69EC2DE971E14B2B730BAEE32FE34B96B526B9A20829C04B693CD35DD + 55: AAD06972EB603D7767EB9820BED94D13B88CA4E42DB448B410C84FF7FC94C3B5 + 56: D905F27415F62D83C9F6F260C60498A7C43610EC85503AF4667B8C21BC0C97ED + 57: 570281833310E1759DC98388BDF344F1CD71E7DC943580BCEC1EB788F126685F + 58: C279A6821C57EE9E9422CEEEF8940E1DA455D6AAE3ED8FD1AB634F517B2EF480 + 59: E91F2D38B1DA92A76E067DBFCE038EE74CD0E81C0F31E2C3CB473784305A9381 + 60: 50650CFBEE6D4D0F6657B8D064434FE6A629D64AB2D763BA4D4DA19CB65220B2 + 61: 8416B58785C68C7422935EFC970EC08091A8351A33EFF6F59EBAD35FAAD81122 + 62: D4740FEE1536246927B7FDC146AE453C20BBED8B08FDE899F1FDAAF02F5A1270 + 63: 375ACD1D1B00C50EAF0CA05DF92C111DABA5853450441C57D6F639A31D8F99F0 + 64: C143C3F81C9824880C2F0291B15F6A58103B391328D53F88DFC8A0E73F55A820 + 65: 8F418A5DCC1D51D2B5451E11D187060E65FA71455AD967ADCCEA266CC0D94C9F + 66: 09BAD687ED53A5642B29E580B8487AF0C976AFD2567056961A76A3199D05CE0B + 67: 2B0066FE122FF187FF7AC64299EE457CE53BBB52B9D0C572564F989220CFE904 + 68: EA5D252BD1BCD007440D51052C0BA8092ABF6046AF8C96ABA25C21B9F9C32FF0 + 69: 1D7FD07AA53F2E3C6907026CECF5A9574978C3968DD7E926826D8C899556E85C + 70: 2EA43F94BB6924C3931B2CEF0090C8FB3053E1B29302CD16AD9AD766354798FA + 71: D0917C2E81945607C65E049EA71D36A9B42FFDD7CC93ABDCC826EB454847B8C7 + 72: 3575BA4282ECD011D18979AE1FA0AEEA5F72008428CCACF69855402BFFB95639 + 73: 631ECE31A53741DE4A227583888A1970631E100E9BDAEC7A7A1C804225AACA16 + 74: 6265F73189AA56468FE4DBA9BDFE4DC099720F2264CF1B5CB2FD364F433F782C + 75: 19DD20D128FB5018E5C7F31C73FBF11DC64892ABF872EA0D9CFCD7A9712DF9BD + 76: 4CEC1A3D891422F40B76748AC3D5790ABD3CEC9FC51152F2E26C4BEE4A139300 + 77: C16832D1D80B9397613B54B422A1487E9771A98D99FEBB4D475026C4D4242BF4 + 78: 837072B871964FF66990EF5C933D233EA35CDB5E9C09893DE179BECC96FA2805 + 79: C0366D34EE34FBBC6B026661F60786C9146EC538CC91CB2A49DC334E467C0095 + 80: 95115429B0A8DB0C48072D4322FC02AB8251CA18F19C5AB6605E53FFBF35749F + 81: 1D64BF116FA874D17090FF12AD1C1B1FC3AB084A285602AD29962B4AC85EE0F7 + 82: 87D2628E605BF73210CEEC796EAA7333B0B24A41F014B70111B5FBD1991DCFD6 + 83: B8B7B0B1A8EE5B516F851A9B43FCE17BB830811D063D6752BB291D367F7428B2 + 84: 1DA0BD60DFA12621C8447B7B19552C6B87BF22C3B748CCC2354C29E5B2D265BA + 85: C297A0F40E8A4AF8DB006CD7E862017322CD39C1A2B0EF10F99F1B5660AEEC30 + 86: F50D782C19A217720EE223D3DADBB6843BEAB1ED5468D2A958C38713ABAB9A42 + 87: DFC5D6B5138917A3AA5B088E348D0420AACD1CEE9A43850F23766106006827E4 + 88: 5F45DCA7854D4EBD2FC11A82BB8C47FDD920E0F20842027CB8F145800275B60F + 89: 86CA61CA3FD5334623FC01D8DFDC94E41D6FEBE1A06EA6D08783AE9BC7C7F821 + 90: 30664B052BC7367F4ADBDAAB52341B71CC906DF45A61CFEC79D763C739E899D4 + 91: F789B39DFFFB627D25FF42A04AF26EA96D9288026F7950171ED75160D764744D + 92: 619E52054C59FCE2B032D61FFB8F70958A438E89EB59F568E259371D69C4F854 + 93: 5BEA7D888A08712C314E584A3C3B20165D67512A47E2FED3240208ADB11FBFA7 + 94: DC4678EB90EB26C435D1989D1D38619266DA3B8E8D4B1EB7EFFECBE3AB96D0C8 + 95: 050A9C3D445E040BAF5E0EDEFD4DF5F4113201E98F38C87AE922B910BBB67A5A + 96: 595B24A9A01E2D9EC587B3947366AA6E86191735A96B3B888310D74C06B07B6D + 97: 9FA11A915581FCC02394E1467B98D587891E2472431ECBB849158DAF7D15B85E + 98: B53026FB6233B0C18B8BD3AA2F7A6DFCE0E2648A7B883E25EC3725D6AE39C9F3 + 99: F747B648165C851B200962FD189CDCDBB9192CB897826B28C67292A39D7DED1F +100: 01192493F79FD2C509E21F8BB1572CCD9B12CA0868CE8DD5C2E6E6BF1A380D35 +101: FC152F8A4273AF47AC10906C4C89A7C1272241BDC0F5135BE8BE3C84CA050D2D +102: 5827B96117C981BCDC8E25AE0434B9924E5DA32B1953A5379D08686DE5B1435C +103: 80A8B745779BB0E9760E524D7184ED2007C849CAF124F7502779F81C473066FC +104: 75B6DAA37B64913714AA35769D7680CA70BD0553B329626A28102E78C4FFB44E +105: A56908C0AF0567D7BF2CB7F8C9F0F4E404F978B073BFC053D76A588ED45F60D3 +106: 27CC97CC666301E50887FC3ABA3695FE13C7EFE865753194301AFC42EB19B4BC +107: B41FF0483DADF4D5E08D46A3556C9A49F961AF83EB28A90A9D5B0F1C9C8EBEB5 +108: D90489ED5C6EE39911739EA5D996002F8B0DD032C8055B0C2138266253947991 +109: D0BA2D613005FA04A6D6644A16401A4899C7A294807FF1A0CBD9656694D4D20A +110: 16F6FC4FA936ACD8A229E402F026D2D09A3FB9F1F27691E600922324209FA122 +111: CC13CBC8627968D28C96A963252F4829E1D907CC2DDD6333D669AAE391EC6139 +112: D3534E8A1FC18B0CA58B46096D1C131FCD2996EFAA2E5747C1B0FE9A5930D888 +113: 753D70B35D6C7BC01A3DD3B0BCF982583BFEA16027BA4A253B1B50657EFBF641 +114: 925CAA043690E3940F04A3519C15D85C411DBA3E44CB1EEDC39E3ED1404608BD +115: 46557CD8F58B89363413583BEE5C0A4F4F31B441AB29EFF3DD626BF89AEFFD64 +116: A6609BDEDDD1C85887935332428F0C5946614DE71C045D728766779A3E1112F6 +117: 80D0F9D2C252750AAF9DF0F52BEAF3B0D19B14019DB0AEDEABB5FAAB1B663F42 +118: 9BF5C904C30831F6817B07AFFFEC8DA539A332692E0FC66E3E9452EAA926C63D +119: 889EA18D6681B77F7DD7242983CE546B3AC7DDD05C416D28AAAF3418DB5818A7 +120: EAC6ED423CB979D5D98FD9DB50552DF09AB1EF269D9ABF5B02A2769143148A43 +121: F25134457768D42CB631BE8965ACC3EB1AC21AFF354BD35C2B814D060B1A220F +122: 9E22D3BE6959123CE7DA07B66075F81ECF67D551143C1ED3101E1F12870B8855 +123: 00DF80AB54D23502D1BB02819D08C83DDAEB13BC13E9601BE5D012AA9BC4D657 +124: 3FE7390736A6B78870C581DA3C14ADFC27C73CE4E8CA06935B0BCD9D8E6659BD +125: D3E3877AE4D5866DAAA09AEC36CFA21B5314E7032D38D5FC94D84AD90C0D223B +126: 24E2A8BFEBF80BF94073537F686DF034F8A10566847A5B0086F8B76E414F9086 +127: 8DC9FC9060E27D4EF5456A08F86AB81D3BB98136A0AC4105991E2B1F71D889FE +128: B875753B5076ED9DEB7525581AC282F7348B5A63411E880518138567F506DE43 +129: 981AAF85A335E206350D1A4D15DAA926DE7D0AEE9F1F5BA79015D511644B0F0C +130: 6598102C7DA37CF6B7334B00CD906A222C7563580ED3D3B39F9F11D0B0AF0301 +131: 3479EF6A54DE9370A0A1BA3F8BAA1454FC9FA862CE9FFB4F79F8187F2125BE27 +132: 878217BFBC9338C6502FBDA1C923DF806D052DFB9DA271790A9A1B85B39F5EAD +133: 60733D591BF2A04D669068D04461759EA90A0FA68A0EC82265D64744508DA56E +134: C11ACD60E124C3BD50243ABE6D4768D742D29F9415C3AD90A3AD9DD903E86F0D +135: 67F415C2F36F67E99D0EDDAD87496672699EEBC7EBEBAFE89E9D47EEBBC80574 +136: D95CBD9586DBF532A636E4FCFC0DEC46CB670F199198AAF4BE6788D5F7FB9D12 +137: 19C034F7B948C723D1DDD04A5A77E1F9D6F85CD4DADC2D07D7BFD48BB39405F9 +138: 45020399009DE79A761BCBECB0F7347C5EE794DF231D63C132969F90AE9AB8E1 +139: 0EE2789FBE5A12E370F1393624252E8C0FB51C65C5067B8A8844D51837FA39DF +140: 7E0290CF18B4BDE787EA81CCD101D483F3CB1F2A6380FFCB32E062853467DC81 +141: 09B1A981FF43B2D4B5FDB193CB222D8C4E8C5C66AD1E5D3C21D436BE50C8D9C0 +142: FD24C2C0B6278DA18D09DB33B4ABEFC118761998394DFCB8C4D0E006B0ABAA1B +143: A441E7AC72C25365366C324B457E1D6AB791B4CE8880D25790A22A6B6C2969EB +144: 53DCF635B001F853E4830C0B6D6B7AA925BD5F14F838637DDA3A4EE718C059EB +145: D1038CE5E372A6D0D95E486C80364DC8EC540717C59E2140590E4B502D17EA15 +146: 7F4DD9F3EC6AE4DEC08681377D3AC840B0099D25C2626719D7223698BAA262D9 +147: B495BE63F7FA74F93C34CF159F5A6623876299FA622BDA58439D78F7DC972C46 +148: B218ABCB244F2FA345D394C0D3BA9EAF2F83FCE79B461C6A30C308341D5AED60 +149: 2899CAEEBADACDABEB171C3D9B9A070BC42B1D17C7F941BDA9E846F90C3C0BD0 +150: 3E64F541FC5A7EBFA2EFBDD96C6EF665983821444BBB2EB79FA0BB5B76C51A02 +151: ABE8E109AA5F1E401273D85A355B8168442FF8629C3E41E706FFE430CCB87275 +152: 2DD4680471AFFFF9B78807DDB04E055A1F7EB48948C269DE7D81B2BA9CA07C27 +153: 8BB77361122763D51C586DAC6106F2989E74B7F85AD70DB463BB10EE910E6522 +154: 11B701F336BBF2B08F9A7BE583FBDAADA074EF0CE3A547BC2E87970C9FB0D59E +155: 6054881D240814B10B89DACF686B25F6785B1A235209B2D3FFFAE1D4752746F2 +156: B4ADC9DB316A5B4E35D856DA551D1AA6B25E6FE40D77E636975E51005E460998 +157: 5432D73961F4A5AD1899267EB5DE9F2D032970AADA38968210AA8905B5A95E37 +158: 5368C8DAC0C3E84D3109E0B0E5CF5C53C17015310FF59282925487493399536B +159: E632C4E53E53222091D88E2DEC84B2C0EE356A5947AB2508258AEAE4B4FA4206 +160: 656171B95B0DB501E91A175C51BC974F1470AA1042F4576FF58545A50E91AA16 +161: C432FCB7B414B23B569496EFEB7C6FB995F15D9119FBEFD705C91D1D8D08002B +162: 022B5C7DEF3834AB569EF6F8C1DA7E58F49F2F30D045FFF569E4ECD52330FC63 +163: D028B5CBE31CE3D25D12806584E350B73D6D81B823D7D3472A7E7F3FA54FF0E8 +164: F4AC80D5B3DE0EAC631E596E03F7C20A56A23524A5FD85E0F70DD3D6CCB9B0F8 +165: 10747FD771470FA9FD57B9CB43B3EDB8D12C3CBA06F85305939953A7E2715D15 +166: D08EA8C5743A86287A3DD2C81340D38028F0CF2A51E3F1A0458BEC6AABBE291D +167: 7465B5B805CFAA8C948D5812E00F6486C0D186E131250B00834688150FE3107A +168: 92D7513E2A74050A33E46FDCB7D070ABC87D3A586B7A4621DAA71F5BF7E4E11E +169: 6431A79635A219DF89E6C3B5A6012FDCDAAF87E7A3590DB10CB8031FE2C6A005 +170: 0BE055F4704ACC45F2F215930A107187D1DC9C1562B0FFF5139E2B7E321AE97E +171: B2AE10C38C34C3FC2C89B599CD528EEB12B237E3AD2DC577A4BFE6033C8F9528 +172: A32466E6273476A64B0734E439D3FAA4D8F38D3CFC6252E44551DBC5B3B810D8 +173: 9B7E21B4021C97D05FBB65E5FA90A181D4B6EAFA49704855360C02F6C09C5A78 +174: D829ECE0A8F238D772CE5BF5871A2197843F315B16ED2D1EB37DCA96EA013703 +175: 023167EB4223BC883E7D8C7C38ADE42AF3821FB7E371A25455F497C7E127622C +176: 753F711CF07F275DC3E1A23E9630B81FDC068532085C5838A10C46CB34926FBF +177: D0AED3F462D1CAA85CC02F8A6B3A2EA636609BFC628420725C7441614F7EDAC6 +178: 3F4417BFB429566969030D1AA978CCC330E5023655902002D6C4AFADA4099348 +179: A98928F7845882D43142E88E87240D9EE137DAE61B98C5D39B789AD8590E114D +180: 6306DA7B223D3898AD01DCE8E637B1F2DD13AF50241471A216D1BB0BEA5A54FC +181: B2DAE5E3A185150A2B80CD23B8FFFE9AFF074F17E6192E1C24DEBB4518508C4C +182: 1223D7B034597FD7EBE35AB15157762CA92415281094DA7E145C2DA04B08427F +183: D663AC54B4330826E172AA7081271388071B5FBEB252D7506EB4678D54854A54 +184: 3E0802B55C89390B80CB8BD49F35507234F3223D7B21BC31C7A2A9CB699038BF +185: DD4A8FBAC932E409A61F3970B425CABA4A08B4901B1FF8AF78AB63473B12A4F8 +186: CAF1FD8E9C4ECEF6D12D3133C4CB99AA939547217808119BD5471C7E30336618 +187: 40050745910EFE4809D40652FF752EAAE800A271D6C4CAFB375C7F060E9107E9 +188: FE6A5F4AFEE97491B231AF7BDA8EE79FB9FD6F42154613700EBF58F1BFB7DBE8 +189: BBFCF14DA0B02C4BBCF087BA314A69A5CCB01EB6A926816191067532BC003593 +190: 1EA4A74EE88FB70537AA17ECCCC968FFE276FA48D3D852A8063B1D75369EBFC8 +191: 9BD73C3279E7047B8D392527C393F53A75D5F037D3E2D725471735215DF39621 +192: 89B90929270CD6D9AC58779CA9D955EECE0D251E02FECA2067652D31098E92DC +193: B9C571C728CDD03D17119788E1B7073B1148237839E5E8756FDB85E3A1D85E53 +194: E6583FE8ED9C4A6063FC7BB08836736F1294BBA9696FE18770C5A01CDF9E24EB +195: BE93441336B80550495326F81CBF037860ADD5D9C28EA4E05F46030EC10082AA +196: F9459FFB122EA907D7F39253B3B7E06A37045C32F33F751D60DF5842730100BB +197: 63277D26B37209609627198B131BE3382C8DCEAFBC65C2697FDA17C1F3A18D9E +198: DAB9A0AD0B85A48DD50883E5B23C01F1EAE1768D2D1ACE9F2D8020C79E716E96 +199: EA9BD268257F630C1A31ACE736279066B0D1D680EE5C7D4CC6DCF91D9210E501 +200: 17B7A3E7CCC6478DAAE7837C4E18685AACC5702FCFC7F926D0685EF52A083E46 +201: 19126EAF099A9C27B5683CC0C4939B469AAD0706D14E23FCB613E0CC8AF923B0 +202: 3FE1B40BF38C37810110A5AF99A719479825CC08B672AE3146CE61D1985AE248 +203: E08DE3A1463963E314BD7A1772FAFDF45A36062CF14B20A31F1F36DDB5A78CA8 +204: 78647D2B2E362F1200407AF2E5831BF41F09929E4ED66A17BCDB5D7A862CAE9B +205: 7DAB1FA44671926588657945796FA9CB990C691874D5179A9D5CBCFAFDAED21C +206: 7954B56A5C9D3BC80C4B17E79475749F0126CDEF9E9336443E9B1764C5651689 +207: 44D8383683C2B65AD284A99412E29AED2CEE73F0EF34E13B3745BC9D0731A6C7 +208: 71D4B6ABBB26296DE2E9F6E303ADD0F93C3638B1BB83B3B2677D02F48286DABA +209: 985A55982E58B96820DC94A848B479AD5AE1AF95FFE0188C6645134C31CCC07F +210: 269EE8535D5E1676BD7EFB324F5A54ED36D70CFE85F38931A04DCF66616E70F7 +211: 1460A0EFF458E46A8A9523670B93A6E9579E587C183AA9BEED0980F7DF368B62 +212: 81591F9C463F7C22792DD42D250E81C9010DB82C98680DE31D951AB1829E2E4B +213: A23042543083EDD57A4EC79D2C5A43C34C9B6433BC3C199A38C0DF86C92A7238 +214: 8C536BEAD517911541360CCAFE2E8BC2249B43B67BF8B1A2D09836E73238B225 +215: B2308B84E852F8BA58044C901BCD745579F83EFD178CD23FD85650CE53FF632A +216: 8742852257FD8188F9F04BF096ACC7F50FF3437F03D4882800CE64E1A2137C36 +217: C0DBAB7B7203575790E33BD58AA2D1E25A406F1D4088B3FE9EC850EA147E8C96 +218: D9B08D97D4E1B55AA52EF2E99FAA6E63D86DA3CC78A8CA8E45EF58EF49563F65 +219: F5C8CFAB1450530E2F645AE99A8BAA5D7F0143476AD41B4D5BE624F50CE0AD07 +220: 0526969FEA08C93BEE59510A9C4B1E70A26501426174A5C06D042AED823AEE4D +221: 3ABC7667B6063F836C6525C065D5143039F28E0B1731853AEF74ECFB6E01C03D +222: CAACFDA0DD1665CDAE0E1398094E269C46F1E976E05F5F775583DBA2F71197E2 +223: 70E9049F0B0E6FFFDC3521B5FE8361C355FB7E67A801926CB176980ABAB663CE +224: 8A410AB325AA49506162BC8B8116CCBC311A49A73B0916A466949BC72B85821A +225: 862413698EABACEF0C2C70C19AA49943C02DEF683DD6B78E7EAD43794FCC3441 +226: 1B95CB4BBB837A882868C5C6A08FB66218521A544AEB02154BA6081CA40CAE17 +227: 5C931BC92FF7DC3896B4081E41893603A06998481BD60BB82FCFE2E6887466F4 +228: 689C32BD98B033997F1D2A9AF746E63A0A5B79DE6D4D6E858CE8EF6755EC2FC8 +229: A7D22F18F09F2EC693CE318BCBF2E681E78F8907D3533544B38DED54E3D2D932 +230: EA289C980A1491D824A44C8AE9D73C5FBEC8C43AA48766E19843C1A00C762239 +231: 21B1986825371A5FA3E5EA257B3C7E39E5AA0649504251DD2163479220B84835 +232: DD5357464DBB7279BBC7A7A327AABF146ED11845A9DFC623BD39E70C650BB7DA +233: FE9E957CF1DB65A9C0768D090D46CA915F0170D1EBB0EC342F20F968EBA7C2A9 +234: CA0D3C522B886721763CFE4D5459901895624E09AF3F7E7F9566FB645DABEEC7 +235: 77879963E67A88D3354130D647E0FCFC9F57484460143F045FB1AC61957FA110 +236: 4EA2D24F2823A68EE835CCFDBC8FFCF2B417ABFD2E779EF443CE8069C90E5511 +237: 0B530EF2C4B2620BF122E645711E8A47596660E8464E7B2C1C8F420C903941FB +238: 19F115D6D9251413FE31D26A0AEE9CFF59BF52B8CA97B69D2FE764CF6DFB1AB2 +239: A59EB6FAFECD4601471BC24F3E1EA7C1BA5FD9EDF7D84A4C8034F08DAB436370 +240: CAA3A67FD134ABCAFDDACF5023BE2C032708FD211FECDF507486C8B58CE24D61 +241: C02805AA8BAA274D3A66FA440C0C426D1D78E53E6CCA833BAF98B8A4EAB1E5D1 +242: 58F27145A4E702C8E95F9A9517B98CE298DDDA3C0D5A61F3081941284E0F94D1 +243: 86838562B139DD0F2CCAF07C4125D45E7D59FA203B18E0F574F2AF9F31E9C3CA +244: 34E1EDB16414E3AA2131C6B3FC938C08EE426FDA8987A1E19A90EE9C311F31A0 +245: 5CC30D04370BAB8066F0640F1CF723909EA9E1C3A6A04103BFA39B11C3BBA77C +246: 8341D11F1491E460809591D5607563EE03C1BF09169E4F1E64A8013B14CE99AB +247: 39510EE3A27837C0611FC1D5A8C14D7D9759071E6944B0428AC9A7563032EBEA +248: FA4C5F21DB0F426DEC292A9DC7F752BF3C665CAF99AA776F658FC74868418C8F +249: C14DE83F707BE65DC6F9400ACC62AE57BA277BA82E00EC01DE3F34354F6EC89A +250: D7D91BAF0DE69A7548EE02EEE2638A357586F79DB52080ED4C36D7BE5158846A +251: 20005E8B31506A9C45EB81BFDB01E48328F5C679E8F8957786F610977806B806 +252: 8A2512FFA079FDCF44DEB445718DC45DE45B1EF23885CF7764F25505E42B0D8E +253: 4DCC6BC7AF9F767E7B955474682FA2E9E1F70691D146E1A6806CEC84F6EC2D08 +254: DA53E85ACBC931DD0084D0076FFA7F4410C1F34702E5CF12D45763E46C9D8BCD +255: 2BE7933119BE1B6E7D90983F9475EC3EAD2BEDCFB0C688F92749D05954F93566 +256: 4C1E9FE65A4635CF336D6F15BB33142C7940AD8352ED45869BD2D34C1E70AE60 + +HMAC-sha3-224 + 0: 43B8F94FE31D2662600C97097AA0D45422DE6C5BEB14DC05F76BA6DA + 1: 74E16D1585E0E9FEE9214860F892DA8D53B3B3165DCD200CE8F78119 + 2: 4B0B7F09748054B19B97D7ED6005B271AD257B849D8930D40F31892D + 3: 1F465A203DA3B301AAE9BAEEAFA6532D822BD02739CB91E5F6EA9F4E + 4: FF53166CCCE62D20670D885EC8D962CA07606BBADC5C40B5EF9DB387 + 5: C31516050FA58099AC22978436B3C1EAC7F3DD4652B87CBF76E5C0BB + 6: 57E4B09416E2BD5BAC27A0C6AF920CBD769B5CCCAF1D9BC19DF24288 + 7: 8819C0198E1BD9EB20A13FC88D50F2C6C58A27F39165C368362C3692 + 8: 64B0108F3CF4A545B309F0597E869107079B3C9E07540E9F6AE0B0DC + 9: 5D05CD8C5BF31C964825C71D8E60829F8D9D619F320E0B6724346413 + 10: 09CED0D7384BFE2ABE6857BA256193DC0ACD0E5746CB7BFD402E3424 + 11: 5331D8CE79B49468257C5B04E8C9BF131682CDDDCA3F1417C80BB07F + 12: E10EA9C3AEF6ECD8B57AA50C8F272D44D1D893A0C2D95F64AE3B5695 + 13: 8E86249D0EA82F47F0859F526589243C86AEC76BE37760D2A0C85267 + 14: 2EEC6462B7B724B3F0D37FA507E174972D99C081BD0CDFB419E75063 + 15: 67BCC714CDD11B2B64914D7901ED9124CE0FD3C357CA328EC53F64FB + 16: 529772508E3FE013510198560435823177D4D011A746D71E1D2CFDE0 + 17: D0B54A5E43342C08241D019C55167EF0952DB1B0B7A9A059B054BC68 + 18: CFCB4ED33215A0BE9BC93DF3966941B6D1A33549767D6A5080C70DC1 + 19: C4829B1CBF75B80D21C9C36DC462258A99AE029EF10FBA0F93E07C17 + 20: 9FBB8B2FF876AA11F3FDBFC8DA717A16BA4CFC5D4748D56289046076 + 21: 931E82E4B9AF0C2385ECE8AA633C6B539D75CDCB7041813F5A900299 + 22: 87B9E01EEE46F2CE6CEDE71E405B99AD13EB03D0DBEACB79CC521825 + 23: 1DA934B0541DD0192F286556F121DA9631A3109B649B2241C9CF8179 + 24: 05A64F935B719F82CD7F7DB5D2C988BC0554B7F2A56655C6A332A7BE + 25: 64EAE4204C75E10774D722E534AC173BCF4C2D48943637BCFC480272 + 26: DBF93C0AA0C9900FEB298BE229F62954373E3E4E1B18500BBFBE82A9 + 27: C3F92F2080FC6908F2277A7A9716480959DFEA1930D5299198749A57 + 28: 29D96B0F0880D4F496E3D31AC8371AFE60D3E5FD0F69A1A15B9DE869 + 29: 3D8814E0B0862D797BD06C135EA5AB02B2C801FCE9D12D03E9DEE414 + 30: 5E672AA014D249E41C13BEE22D0C7595D73568ECF9B78DC88C313CE0 + 31: 349A5B7E79F4E68430CAF41C85D3A583E624AF712C02179B729A1DE4 + 32: 8D2835E3A02C646BBA76B5AAB2CDFB2B72F5073B98041603F75C24E0 + 33: C8848B90A1A2426CB357519C00CA3880FD9B6398190BA96C1DF63733 + 34: 419EAF48EFA6C366FD27DD703B0DDBFE9151C439F610EC996988005B + 35: 248F9D1C8362BC394E31B5E8A35CF0533EBD7D5FB5969B8B63918494 + 36: 30DF5316CF8D686304A4E42FC9DBEB1C172AF98F46AE3F05BB434A69 + 37: 5D73E52C265C1DC1B039443A2A881DB2B9D4B100000F0C34A9312940 + 38: F7E6EAB3DF1F28029244BEB746D78B489A14AC2406E07759F123AE2D + 39: BD0BA55766B5A14D308E1D29FE916CC7B97C2E4F6A21FCDDE5CCC0D1 + 40: C7DFDB9A975C074E8B20347246A884185D3D81C27330B3778207CA9A + 41: 7E1652EBF0BBC6E628ECBC9D1AB2275FE56D50BF9931765115266DFC + 42: 1E92406DE8D32D0B1796AECEFA9C9C97E98C443F2AA06798BE293158 + 43: F9688DE507E0D1982B99B8066DDA0B89EF6ABF360B541DBA9E258C81 + 44: BD4076674B7049C20B5B7D46D89C78806F9FA4C506299CD7B22CD04D + 45: A1CC7A6AF0DE7008DB0FC3511A9C9F12B5B69D8A361FF036753C4045 + 46: 678B22E55DBD50FED5F0DC5F26488B1D9F7151D457BD3D85E30F0689 + 47: 593889A97724343826A7E45B85D831215624D5C720CECCA5829CFDAE + 48: 8BBA168A3C4F2996EEC2890895FECC62D463AAE1F395F0596275B632 + 49: 99F65EF06A16E1DAB96533233C745440AB839BBEAAFEAD481F6DD722 + 50: 2E49DD264AD674C41E1406C95BFB986A239712E2745440405F88D064 + 51: 5B431D21E66FA2D5E01ED91D6DE5871ACD59E3203F4AA328F6EFC706 + 52: 311812E900E4EADEA4233E2D355BA54F2B8E66F670D160213E567AB9 + 53: 07F366E371F692B3A84B3880A70A76F59B08C5E2BDAEB1B8F6D5CCDF + 54: F6EEB41C1398732F31E032873FEDFC75E9FFA51E982D65F9FE2715B4 + 55: 767163048EE79F8FB7F002F11CD972C8DFCB1F490CFE67459FF3BAD1 + 56: 5842767868717EBD11D36C5037E3ACC6201DE1F7883006A1DF6A2CFA + 57: F651451CF372D75FB777782187247D2E23C6D20001389F9431B46285 + 58: CBC19EA5B586456CD01D20C47DB87DD740F37E6D950354E3D63849F0 + 59: D9E98B355971ABC110854680EA2E7C77D0A7812F0999B9A05460442E + 60: 0555429C850F5E105946B061B00100F0CD50038129BB65D3AF6C12CC + 61: 4FF03D8F11D2F6211E355DD5B50E0C56498BAEA56D9923CE359930A6 + 62: 28E86D605D1ED5BC842F6D54E4D9B6C54CC734B3FBB88EA608944F0E + 63: B8A8C9F3A0A2B80727F3480893229E72341AD44A24710FCC515646EB + 64: C5F486DEB68F10B6CA78626BF50A94194AA952CEB0C227475D273823 + 65: 947BB25A487F6C696472D1CA63494534239FC9B50DD20F05051A00D6 + 66: 513823550969D3FDCB4FF9F7BC666C5B873DA13384DB1FB5DA4088E2 + 67: AC71951188D6A0165D241C0FCBEA005B023139CCBF478DDCEE9F0B04 + 68: 482FA768632296E555EF58F6F134DB8E6DA134D3B5F8D3547C29655A + 69: 66F9DCCD1FA2ED16BA69497D370F153B373D73E6D99AD7578E9FE89F + 70: ED5964F4C3CB6AC80D975CFE2E9945B6B2F2D0E250241D2A1D2755E3 + 71: 52C0862C24A059CE78905A4EBF3A04A2330D840A467E176BF6803ED0 + 72: A56596776D0479D6538A91F3B4F1FCF330196B73043929C82075E6ED + 73: 142EC4CD690F8F28E2455FF417BA14AFD8D483D7129633E449547E54 + 74: F72B073545706FEEBF50FFB282174003E1771E3EF78ECBF00F828483 + 75: 98937D5C20D924E154ADE9EBABBC2F3578B2449BCD995A06F2FFE821 + 76: AD65CE057F3A84DFCAA45E1C6665E625505EC230A5AB94DC55FB5034 + 77: 03EF7A85A9318AF284F57A0048FE735484946A233C64CFD3A28E5010 + 78: 7FEAE68E61C1E18A4BFB30CB29ADBE5E16EF7B28044E47D88A4FB0E2 + 79: 9FED5CE97FC500BBD6BE931F8D607B4F220DD975E9881443AA106FDB + 80: BCDDDEE6B0E0C1151121547C260FCF02083C97DB9B99D66EDB8FF0C5 + 81: 314467D82C5C64D4734BE3729FE43AF9899F247C6B0BDE7472F7DA67 + 82: 5A9F2215152F9845E12A18966DA50FF7502C5FD616528D5DFD192086 + 83: 38B513350AFEAADC9ACC27F155147B01981A7DF061E3B25BCD6F4992 + 84: EC86009DE61B85AE5D98E94514E883921CDA0707DF1EE5FE27E35C32 + 85: 099875805914ED0D2659103B23362260E9D008AECB6353A9AB6308A9 + 86: A8B2ABEE400EFED2514C005490DB46D7DDC7A26BE4C0FAAF3EAF44E4 + 87: 31715A03A2EE97ADFE4579A3B38B0932B5200FE4E9B43812CCFAF7D6 + 88: 9814B6F387B5A7C86F25A1E987FEA6EEDFABE1D06255E7DF55AD672E + 89: 376948F8F117FF814369911E64C3C58E70D651039CD70DD02E233217 + 90: 8D78980F2E00F3B1F82CB5F66550DD98FFD31BB845418919DE08C5DC + 91: 9E4941171F66217FCA2B7B15C704F7AD3BCA3B73D193328EBA84F6E9 + 92: 220A754DCEA4EC1235C6DF7B021ED865DCDD4903B49D33A0CAEE1146 + 93: 9D70DD51CEB3F271EB835BE2FA5779426812B84086B2F6B0839878A0 + 94: 67FFCCCB6C7B6C40378E10338C6F7D8597878746875C0E56B9A55DE0 + 95: 3499392774E0982BC49BF2157C1B1E3D7A6EDC971F804894613A342C + 96: 1A92B5C55D8FEBDB2C6CF1F4E3E4290836E7EE38A496802C9173D62B + 97: FE1B6D1BCC0D7F05E9751C63A517AD69F421420AFCE0BAFE2EE4C223 + 98: 4EDBE4A9E188A16BB349794635B633C94BE6294AF795FA95F2D3256A + 99: EE8D33F9EE4E563F8832F4B8B9A2613B8DAF3B8376C5D059B585F178 +100: AF2FF671BCA04CB77D43E70D100AA23721A6838B9DF7C167C2B0F52C +101: FD147899A566735F53BCFD64A4930F3400416B53072B788F2E419D3E +102: 35956E507CBDE896C13DC6CEDD754C3A9C535739381F94F59BB981B9 +103: E7B9899C45F40EDB1B9D56943A5D0FC162CE1B99BF3FF307946C66C0 +104: 61AB923F62FB6503C965049C83273D0CD8840626BF1F8F2C5B94D784 +105: 1CE5C367EEC6A7022EF512FA7C229065EB3B7C229D1BEC56D532742C +106: 2A9919A2B7AA578E08F54848670D71276530EA2454FA73A0CAC6DB7B +107: 065F78D7A478710F7A02AEAD16FB4F388E6A46100BEF69309995892A +108: 856AE3FEA77E94AAF41458893CD1453E97322703D7E50B801A92FC86 +109: 3A7121C84B5F580E6B85E895D880A5F8FAAA212BE68EE93044EE425C +110: 7E663B819CD1D6D1013366BD65D6DA61A29D1CEDB7026BF5C9704561 +111: 217C20189DDA2DCF4DFB487448504584954C53C07635C803E8AA7F7D +112: BE6DD8115DB39CA01F7F4C03B8F6297EAEF4A06CBC618D5432A56071 +113: 6BD6A60B7AAD03165743113A477A44DD42412DBEBCBBEE93B1E21A85 +114: E749DDA363599048E095E5E702CA99EAE5C94CBC0E6D65B706571A7A +115: 3EBE88686A65B51760CEAD220BF5844A8523A303630B892B0B2F4664 +116: FCD16A99ACECC901D6EF9C4EF6E47DFE363C5C0CA09607F167859A76 +117: 3195DF6179C9F423CE93C18943A9BAEAECE9466EFF19BDC2A3B50230 +118: 8F994FB8F8808862C23CE0D54D74638D5E791F223BD5B0C932807327 +119: 0076555721EB1E5109D739AD02F754F65B60925BA337E77D6A823800 +120: CA335FCB3983DA669D23CF4121D0759FA5ED4B81ABC73D3099A67F69 +121: 43E78CED42618BCFF73D12BE0FB19ACBD4B6E35D6CFD56971ED0259B +122: 7C9927AA1107EE6FC8DC2EBA1726BA11C5BF58AA4D94544FAAD9F686 +123: B6CC58E1995C7A907966856AE345BE9CDD6AF5FAD9216409E601DD84 +124: C737869555A82EC9AFA80F0F6B02E4A4B006B5F817C318A9730C40A7 +125: DD6199493CBF768529A4124A24FA610BA0F3F065FE917175767FF143 +126: 07995E8EE6590930D3121050A1EA9E02122F1402133121EB99B24953 +127: 14DAC0B2BBAE3DD9F48425B372790BB70C58BBEF3EF7F1BCD0331E7C +128: F1AB62CAC4586020538CC065E01BE62896D620074CFA83FAD004FB66 +129: EF8C3EBFCAA59914477A43765C7735EF98B9BFB4C487825176D80FFD +130: 0160860271BA8A018457C9D02FEDCDFA875AD47F688355F60984FAE0 +131: B1259FA2F49C36BA861619968B3AEE8BF0BE31F36A43085CB178B6C0 +132: A6276B9416884552F3F629C556319F75AFEE0B86213A73D65FC4C946 +133: A19E52D9B53AF45A370AEC6227599B9D748DB8227E54635FB327D734 +134: 700EF4C63D08F0467902C469570EC994FA156E5C23B11C8B23C4ACC8 +135: 155E1EB13E0CB1C7C22C229AD4C1834613DDEE84FE4868E87839565D +136: DBE339E6E3C6378E1C7E8EAE5AAB4440B6F5553E8256A10E299545FC +137: 2FC9DE54F18E6CC5FCB1DC195AF45755A6C0121D5D6F3410CAA4DFF0 +138: 9EB09A504DF98D08072B2B537A4A77CE552D73E01DBFAD29A83F2DED +139: EBCC82D245205409E258DF60BF029BA4B40838A21047B591015AD0E6 +140: 1265A4FD513273BEEAE8158C89DCDF445CBEC44144BD7845B2DA1BB7 +141: 84DAED52AB24CC81DF2E022844593DAE2B649020354D9358A3396EF6 +142: 6633AB5DB4EBB14DD8013E05FA4CAD410140483D77B1C03A84C5CD2D +143: A0DA99FB42B20F7096AD1CB88CDF20BCE959744D780A888F41952EFF +144: 74FBA63BAF4AD94E06E5B5492D91F85CB340367E82922EF2241CCF14 +145: 23049C858EF172982F10792A3AB7B4EE048C1BA2FB5E2258F701ECC6 +146: F8020E7379A0DE1C4024163956E84BA57834086FA73CCA05B28699C4 +147: EF6F3F80DB70F7F952A5A455FFCE79C41EFB4B2F379241A8ED0EEC84 +148: 81ED7F0FC910B49438DA5B6A521C6C32EEE6E37D69DDB1B60402E0BC +149: B0E14468D8B00AECBF9C75AB4A4EEB81EB5EDBBD5CD8559503202131 +150: BC87DBC579F6C1DB9C80699B37DE4928DBDC3BF3A210E7933F267C64 +151: 8EBA191F6B274F2078DA6A0E4DF9412F1B43688A0678F4CB6B21F08C +152: B5F23951F70DE4520D8569EC21BF3A6ADAF9EF75A795031793D3C914 +153: 62BB7E72FC5E18CE99835DBDF39AC8F9EADF714889732781A89ED625 +154: 1DB4DC696E5A8B260D662BDB7EC6E003F544B6D11D27028AC50EE442 +155: 48562F639C5B9A1A0AF798802B35DF2F17F8A14B252F8CEBEBDDE7F2 +156: A26A27F4CCA53145368E1B1A59E75193AF054FA4C8198986EC20422C +157: 7EC9476ACA252E535E15C03986BEDD695078B41E30C0C979D2B970AE +158: FFE44CB9C129FBED78BDC710C740ED7DC4C3083388C70EC8AD84CA56 +159: 6C129BD10A6C1F354020505ED33733DBA7386DF19F9C7E9E0874E3AE +160: 3C61A1248DF4FB6A02C68FF413A2787E69D777F838FBEFB8729A6622 +161: 9704142B751D3C508A6123D2B807909670BC9A25CEB603C79BB212BA +162: D5163C0891D82BAFB5445D495EF53AEB458759E79FBB519B409BB446 +163: A1F6A6E1A921A9C30B58C76ADF86DC93154D81ED43F429BD7F961F73 +164: 19F1D5ED5219EF7F45EEAC30F335E1B018CE38DE1C4910C13FC70791 +165: 058E0834C5135BC9BC726BA9B72E73B07AB108EC46162AC51221A119 +166: 25FCE8353D4DA996E16F52C5EF310FE9FFE541D634C29712CA0A50F8 +167: DF9540F297E29A2230497D2F1407700C34937037CE9755055F8284C0 +168: 54BEBDFFA7B42B659935FE5DB06C47FB4492EE898CD9FF96FB60C93E +169: 56C58611A9612582DBF3444950F9AD2A15F4833BFC1B8CD51EB0F02D +170: 44CF684A3726979A97B88D2C1BA4B352D483ED6BFF75D33FED9B192E +171: 79C7A8099BFF3D9D35555E7187FE4335B7000DB9399C19CB3AAEC3E1 +172: 45AB6DBA6612691C9F25BAA40CC28E934E03D045D8E60FB51FB2DCFD +173: 6C44C28DBE5E69FC6F1D7D76B313274437EFC330EAF6A924964D529E +174: 1B4620B6DF146B921957213D048071030F9A7D4922E05E0622363E85 +175: 535BC93C1CEDF95D152DC94BE264BBF03456081BD3B7EC90FF3EEF2C +176: EFEB2A0EFC5DA1B229956115216820D573C9657EDB473B37CE545189 +177: AD943B52EFD3CDFD08568F124C0DAA22309BE6C801A84C06B184A532 +178: A4ED7D40AC60D3FC6006148EE93C25EE4A8310969DEE99304ECC6239 +179: 846A1783B36EED83B26F3542156B3046387858DA302F1289880343D8 +180: 946ACA7987084DD0681058FE48A88DF58329517CAE2F111262A416D2 +181: 1366566B209824AEF5FA190F4FD3E264F96C1F98EA6807D297BD2C22 +182: 0B7221823FE41585E4CE1900F4DC36CD67D3AD4A492664F08721EAA8 +183: C5432C9C4E8EC5AD630B24DF215F4704356A6D6C9DB63DE912FACC5B +184: 5D39A43FEEA695FBD7600102363515B1D896AF2CD97BE04A79C44F3B +185: DCCDD00A15CEA8D47A3C5FB0988E871C1071276BF862B06FA4F9AE83 +186: B95E8473EBEC712E3BF028F4EA364193DD57503327AF6D079E9D7D12 +187: 40B8D3FF918F590E790886B0AAC1DEE2684C10D93005E0813507DB28 +188: 65FDD6379950C218BEC640DF00A7FA8404F867224CC67E443585B881 +189: BE8682A311FBD69C97383864493D2333510D64F8DA13835F7E629518 +190: 562FD9460B40647ECE452BE962A4BCF63D6172C9E204C5AE8A468BD2 +191: F8DE76593980E12E8E41F498C4BFC53E68E9D0EEB0FC1D2079708610 +192: 8EB58A30AFF251893FD67211CDBDDBE44F2072AB8D8E2213E132B250 +193: 9798DDDBB93B5FC196AB1E117E412DA9A746058A85C666BEC974CD97 +194: 0C8B33B90951D312557ACB0ED50B6C77AE8C9FE5D2CDB252415914FD +195: 03F8253CFFF0842172D653E49AA7701BF1D419A0F5B362BDA6BA2DE1 +196: 9189FC7CF3CA3D948F04E5AB77AF80DAFF01C816D204D5B858BD7101 +197: E3488A5BCB04D617975FB294B8C3446D847807D2E91F20D057ABBEBC +198: 15763DED44BF8D45DF9137DE8745C77AFF2CC50BBEBEA8792EF29658 +199: FCF482E3529A1D8FFCFA1573C6192586971774BA6EB359C6517EE206 +200: 00A3A32CF3438637A3C5BB1F57ADCCBBD8DB41A699008BFADCD84292 +201: D4773FF714CFD494EF23F7FA0961E0E34F28EDD2E06F102440E977DF +202: 2D8E5F0039CAC2F7246EEBF007A47A37B5FAA85CD7491133A68794C7 +203: A3DE783C44B931209216826CC20DCC1C77D64EDAECE1ADD25104CF6E +204: ACD33E1987F8D26234CECBFC3D26E56C53D1E41ABD7EC737404B6A27 +205: CE1FE075E62DFF7A0B47FE694891A59FD0ECEBC7B1DBE33AA6E44419 +206: 7CD08D628EFD7A9C2B2DC6C82006F8A1C1A1F9223A59C3F80174DA8C +207: 6610524B38D5B2E26C1E5AF3DDBE037319B157919E2CDF12A1607DE1 +208: B31D3F7EF6B10195B648485984628CB40CFBB0F93513F98E9861EB45 +209: C0A3A78EB08C2717296C0A71C5DCAEC47E4DF1BE31A5EEDFA79A2650 +210: BC6D960DFA108A61F8FAE8A1BF10C2BD91C0B3BA1959092C735CD65D +211: EB71B5087850F2B7F42D22DD4B6AB37A133E42A5D37EE217DD0D1227 +212: 155142DE31A86CA36EECEC246D5FCFA1694EB382B10A1FCF219565BD +213: 5A640F3EEC8794D87D3E40A6FB87CBE40889FB0494FE4663A03BFA48 +214: A950FF4909FBAE5AF36AC39DE179D3A2D434AA76DDBFC9EB100A9230 +215: 635AB32F412AA4F346F36FDF9EB41D29649706415B6A861D6A41D8DD +216: F7EACBADA4D6BC548AE74D3F567FD3452023B3AC4E12301E06E8EEC2 +217: 00F3FBDF9E42C60113B12CA67897C4CB139D97E2B9B3B378CDCF8E94 +218: 2D9161ED3361ADBDFA19A56FA9A8FE058947182E41616BCF9AEEDD0A +219: 62E9764F2ADDECEE21DB8ED084B4CFD61200F17CADE030860E5119FF +220: 5401387738A9F11DE23E1260E132CC6417CD4D0BF8FA1FEA99E1658A +221: DEA79477D7249DCF4EF8C3C857CCA6B1767242F0DEF1F6AAB49FBA09 +222: FEA604EC2719135F7AF1655C751768E503096FC8508BA4E76645F46D +223: 1FCFF3A561D2B3C38A9B9BC00B6DCE45004E8B486D410229606EACAF +224: 982DFA333D2EF9EBF4AAAD995D22C884A61DB282246AAA13787813A6 +225: FBBAE03A33E887A3C3A5EB7572D84AFF5649AB9A1D1780343415FA0A +226: 75FEE5E8A10779C2673E307BB46388A31AAA0348FBF647B6127F0EBB +227: 50A0A5C89CFBBBEE48AA70A9E280D4EA9785C49F54EE1C251CE11AD9 +228: E720EA2034F35A2E37CDE57AC4C250FA8C82B04B5D2643E44A7CE35E +229: 5F1941F93C4B219F88D9571595EAB3E551E580439FE7231098A94ABC +230: 9010C146B393E44C64B83B3F8DE1C2208C6EABD4E56AC6D3174C0D40 +231: 1BB76E2E713580B12A9AF0AA25BE9CE3E1CD0D414C266789DB820EBC +232: 1FA8AE4B83E577DF574BA8896C9CC145B319D6A2CAEBAF5EA765BA35 +233: D57DF5D7F1A5E42981C841F9316BDD78B492BD10CD91A6D6D3CADD9D +234: CE697F3228A27A4EE63F1B91001450ADC5D49415BE3156CD427752F1 +235: 1A10B2C52B0EB905DE30811B3804A43AA44D10162823BC19776D7F12 +236: 933C3EB00BBD11AAB39DA7B501EC4426E0364202B2D2FDCA15F2C707 +237: 78D47CBF418EE7A1629DB50C9FD335D158C61910CC4A9F1DE2DBCCBE +238: 0237E7FC73E700F15F0C8DA9CDC0B7120B45D25D88E11F9FD0A9A843 +239: 47D3D25E73BCB435C92E8A0ED5A90AEC6F30CB7D184DFD65C6E22622 +240: E364E93D1828E225C940EB9C75A8BD5D4D74330442AE76BD669E8FEA +241: C508351A61A066AC8667D01EE8F2B82E9B016DE16997CE5099959AC1 +242: E4DA6E8F7CD1587749A751523F8BBBF8057FA5167343E7646995038C +243: 45366E7F33DCA4B4720CCE7B3DCDAF674A6B4D344CCC0B87019CC2A7 +244: 7C3317597F17BE069DC00CA6FD630C954F24FA4CEA14121023390D55 +245: E67F80AC4997C7DBAEA218EBE3F6A12A1C49DC60ECF7074426C60157 +246: D2D706913B09CFCAE969BD8E55375E55826A0BCC76D2616B87421A4C +247: B7DD02446A780CA46750E57A813F8240359CB9BE040E50217394DEF1 +248: EF98DB17FA7D5670F8E5632274BA2F1DFC7845F9F03E5349AF911B5B +249: C87A383E9C0CF5890ADA3B70674F492BC024E3CD5FE686C2D30E8575 +250: AEAAC036E59D32828AB8F14D627F9DF8F96EFCF657FF06F93F464A9E +251: 5B14A767E4D592E22605FE9E88AD07CBFE29F0EB8C4C981A591DBA82 +252: 3DA791F77867AFC68F89B896ADDCE45273C189C723FC2BB37C685952 +253: AE4E91C21DA6601A7805D998D6530A7B8F1ED098985DA05E9E34CF8C +254: 6B5B4254826EFBB1BB3A840F709BFA977D44489BF63A461867E71131 +255: F52E5501F8352D8DC439D414B563A21A1791B23622130D0AA1BE06A7 +256: 17E1FED5DF79835C5579296F12C863FF2A851F2BFA890640D89C45C2 +257: D669842D60DA5ED1AB497535D923C13FA9F1971F4114DF358E4EF191 +258: D550AF20D4CC8982BEC1BFBB3D9CD48C202E6ED3BFE53C3D17533AA1 +259: 8E680422C724D3F390BDC1D619759F7706D95BEF81733AEF4FDD9E4C +260: 2102A7AFAB6BBC5B5EDCCD8B927EFAABC1BF7447255F588C13CBA658 +261: 1F86A514C7E97D5613B10C05B0B49D8AA2DA96B60A123836876D40A4 +262: 6C36C0DF541B2FC55F488E7FDEEE582EC6FB907266D05912BA5B1A5E +263: 85157706FDC77EEEF108AA709696B081357028C93FFECB8B19DD5B32 +264: 7DB694923013B743990EE3F05118B066C99D824764CB8A90BB5C7B1B +265: FCD3C0C5701F442BCB129221EB964266E051EC76F4B99001D4362E18 +266: C30E41B0B49EC36E8D6847856EED83485CF6487EF27E0D4AF81E65DB +267: EFDF7F1FA75B2AF41A8B585E780693B757F583AA55A5EC14D6AA4D40 +268: A56F33CDD6D09510CE0F3341A932EFE1E9BEF638AD230A2B3CFCA681 +269: 58EED50C50F79A48C8DBCD58D6A632080E82B555858E78146D9E4333 +270: D26DBB8335DA2322825A7A0A37A2FE89E1FF7A7FED7D22FA21E57119 +271: F97AB13EE6713D218526E1F0798DAD03972644B43E830EAD03A91672 +272: 1AA85126E0B614AC5604C0257F9C60E6A99FFAC190E71E2B3C7F08A2 +273: F4BDFD31FDD995F83D63FC2D1982AF5C62055D4CE37004C1C0253007 +274: 8A6B0524FE27D0E7EDB02C6BF0B289E933ABAFEED0E64FA8A3445990 +275: B35D6CA52AF7005DE922703C7CAA1BA625B941D17205919AC473F30F +276: 90BF6A33C4067407C484322454E3AB98EA3985D86F954AF59CE2737F +277: 24C37D603C1895C92467960B370C6CDBAC57FA76A953FD7CB3D65923 +278: 3DDEB086BFDF17EF5D3EE6929B0105E8243FA9C440974929BB6D1317 +279: C1640921825552CE15CFD29A37E6F11BD4E02702258D0A11674F0DF0 +280: 93FF2218C378730A0BFC4F0C002A9B8C0C5229A845DAC5452625DAA9 +281: 215D3F0226153D66B89EABD0E60A17080C1ECD8B47644959728345C5 +282: F43A6CCAF79F6DFC5AD2A06AB990019CED9A0F03033460CE9724CD8F +283: C89FC99E50757B20FA6690384D3D90C52E5565690EF0FFB8C19C9377 +284: E27768874E84816A45732B2FB77CD87AC1D101BABCB4A2FE793BC7F9 +285: 1FE52DD8051BFAF26E77CC14F07E1CC72D1090A57A453444B2647EE2 +286: 37F5DB200FA65595B74854735F5752C05AFF17F2539718801F860C4F +287: 3F6304F546529D4F7CC4742D0688B1211647A185FF474DA0B8D9B508 +288: 347B1E96D9A00F084C4FB3FF354E77A924BF3B90BEA14AF41BF989B6 + +HMAC-sha3-256 + 0: 50AB1606034383FE4B3B4BC0A341A82E40AC85E455CDFEED4CAC902A7B8CCFC1 + 1: 2A4A74B8A29CB3A2CF8F68BACA39CE678A516DCFED48F0028F6F6B21CDEE5CE3 + 2: F6F61821815051B11CACE0C3B1E15F794754A0ED9B285EB049C496D902D76DAB + 3: 122DA3592DBF80CF413B6CF1502B65769BAE7EF0E6A172A12A517F789049897E + 4: D7CA62324DD6A8569ECB7E03382E51D0BBD889F6B5809C42ED484922CEC50C1D + 5: 302C41DCF6B0D51FF46BB17F7F7F47DD466DCF4FA0692BC80B7142D92C94B398 + 6: 00988C6E9C8B75134E1ED42C6827E05B733F347A6DD6A4818F935A88E38AF0B7 + 7: 2288F2C4EA56CADE449DE10310D84DC7C8834855D3B6ACECC7B61AB4EEE169C9 + 8: 4B1C51C1B733CBD9D580AA144370B7844ED8737AF1181FC330F56F9716CEC264 + 9: DF656A0BDC3EA93AEBD2ACE4F55C879F8478FC4B7F550205189CCD285822A087 + 10: 7B074CCFB872E60AE73E90728B4D737327AB3ADEE35F0DBCA4935943548FE0EE + 11: 725E3E314C8F2B8EDB137810560E9F963088377101EAE97F1102FB3F51743F0A + 12: A64D8B525AF849FF14E88DF144166040F9470EEEE8AAD01E8398C842088179A7 + 13: 59E974E7B284E1C3F57AA84D5156EF1A66974A34D9F858C022DA642C24F89946 + 14: 2B33807E49DBB32F23A8A2002334D087D43752ED54254DB1B4167CC99F07CCA6 + 15: 0BA1EC1F3BAE7D4D204BF699A5552A92A30F67CED38E2B10C76B6C74DC140081 + 16: 58224E061A36912A8549EA6D607B3B88CAF93FA6801385CA04142A13DD44AE30 + 17: 242069CB97DBC5E3CD67290A72285CC3F1B9A3EEC4A83E896FAAE065E342BE74 + 18: CB5077AEEC2B61423B8F8CC227DE3CE9852509EABAE7C863A183F8EB039F5F7B + 19: 4C37A0EE90AB318AE30E577986E782F28897EAE380D2DEB28D4B142F4E2419A9 + 20: EEB7C21D476EFE2117FEFFDD7250BD29B57139BF20C951256E3556DA7B22B0EC + 21: D97566F8D85FA503926DA4A4F67412AD5AC427986777529A6B624C3CD6E65CF7 + 22: 518A2BBBF93B27A0BCD280105789839CA571EB01A99D06E8767ED99410A19E6F + 23: 2A4A957A16CC7BC7C9393BC5D4E3B12A4252A4DF03BEC301AD880DE08E9FCC46 + 24: 4F5E365BFEE6D1C3EF93FFDCD8AB271D6352F29A3A87A6B5F86E104EF389EF3F + 25: 4A19FFA1FA0AD3E85CA230BD1C48C2AA103A21050442794529B9B3F8F029019C + 26: 24677DC7A18FC2227D2137EC649C9B95C6F447561BA54CB081B6B9219F14CBE1 + 27: C8AD78F00E660E54CA173D0D9F9261CEC673150B17F03C30DC25599E574326E8 + 28: 6D402B040C9A9DF4B59D7AC5648E586DA82AFDB123237CE87964D8CB2ACBEE16 + 29: BD415D79E5C662E6251C3EDE20D47720C9CC415C413AFEEC1A64A2E293E12504 + 30: 0E6E974A876C244CE8C1862F9BB37286B6F4786084131A50844DE64F90201789 + 31: 887EF591EFF9BF94AFC48824B0E6E521242842170611EE3BF4E43075A37FB5D9 + 32: 65B9E787A34DCB7F8FF6914BF4E32F13108A8124CFFBA41F778EC5E46E19E219 + 33: 053238A9703A446E7DCF0DC70BB99AC3E40A4A1E2A0FB5B8605439C08E2DDEC2 + 34: 0F75F3CF5DB76A495AACE8048F890B7A8F19A190DE33EA47F145B35481FB7BC7 + 35: 45DA38BE1889EB202321D4A3C47162978A9CBDA8B0151C666FA99E2BF6F76798 + 36: 646135DE28865EF17A8596DDEC2CFD55F11F2C8B040E78835AE6E4962C051B03 + 37: F4B0A9FF537B0A376D22A409D9B9F28C5CA839F0F7EBE49A37B8263AD4CFB2BD + 38: 499F6A8A55C6D47A4C34D3EE81A75207A24CF900D99F4A3DDBCE78EED1A7C26A + 39: 945532B77FFC4CCB3EF7F20E09CA61E0F410F94BDEC9914207F950EF234B71F8 + 40: F8BC5F01A338090989B5507F81459C7CE8D0892E449ACD06F73F9DF79057F494 + 41: 107B28EC5C3C08CC0ACF86B679CC25D11DA16C42E625B8EE3BBB19EDE93B8F94 + 42: 40210216F27C92463DFB562826DDC5F01BAE75CC70AE97631CABF42C8D047B1D + 43: F678D0E03FBE7EF49CE023D36867ABF50866C775CCB46F2C1E5DCC77ABF1A73F + 44: 64075E1D786A9CC8C4AAC9D0F563A1D5FFFBCD0268830700DBC8E4D8BB30C344 + 45: 4781DAE774404C229D90BCECD4183D1B3F3CFA9C194003759F5DB2CF7C7AF95D + 46: 8AF09DF7EA4517C7B0D9C4C805C21397BFEBEEB57D554F47FEB4D80094AA647D + 47: 80EF33B0605B22A8D39B0F12DA83D975E69F06DD4906B9E6EC96B08FE88B8C83 + 48: E3C38B985F5CF51AD52310DF2405F78E032DC4AD0997B04069A5C16A35CDE985 + 49: A206A67631F595342D57FA131A306B7B41ED5D84F4ED4EF6746EA791B4F85A11 + 50: AF2ECD57179217DE57865DAAF9B13420597FF28FDF5FF01F1E2D9C4551ED57E7 + 51: 755796523A028BB7CA985776C339872F832353002C42FB8572D8C49E38E6C9DF + 52: A016105DF6BDF70BC6922759F3A5B14B58718273BCA5BAF98161DFBE607F1967 + 53: 4ADAC11EDF3F782ACB8877232055595CB7021C5960A310F2947CCB9B5B3BF14E + 54: 380F57D0D7F92F865F3A43BB4F52291F547F12240A6677B7AAC27F29312223E0 + 55: 03510CC4C0810C80F5981E52A044DDE9DB96BE58BF5D130BAB3E269B6F25C062 + 56: D21516F9C19A56F94F0724974B82909B86AF7291A94CC1F38E8D69EA1FAE149F + 57: 0BA82501F3CC71933134E096FFF943D24BD44A6F3C848C1794108AF2180D5CFD + 58: 277FC716ED0D63C72BFA846543675CD5173B85F04D9299ACBA9CAA54EB58B76A + 59: 058C2544BF65F46D7DBF5FC035AD4CE1D882A4C15861075BC6AF2DF5D60FBAE4 + 60: BA67ACA8A335198CD39C94E335A79FD9CECAEAE2A949B4DB6667176F4626AE8D + 61: 2486D1B356DE82F58EA2C6217FE287034C822805796F7CDC855006BDCF339F66 + 62: C274BA0F6171B13CA7AC891E2F94468D2E63679DC807C8EB062CF5872B017AB6 + 63: B58BB3648B9EBF3E973BE866D97AF8AF8C1401209174AF231A82821464D2ED6B + 64: 399166BF4F0A1557A287EA34ADD02E31E101368B70186420612B5CD686188112 + 65: 18A32B258CCD3D1B2CED8DB4AF840047625A6327ED9157138BDCC55ACDA029C8 + 66: 2ADC58FB648C5AAC3E5ADE50D808BFE983257A397EB25C305554B4D10CC0C415 + 67: 46524FF96E26F6EC52D6F7365438422FB4A8E4B41839C3BE8F0DE4AF4665DAB6 + 68: 3E7E2B6EF00FDE432DF84D58BB62BE72A4F879C30BC4B9EE3CBD7E671BDE91C5 + 69: C76882FE783BC6DF51ABE866F20AD3959C79152AF17AB373D8103273363E297B + 70: 8273D27F5810FC5F618310007078726F76835A07AD939DF874981ED3933EE8E2 + 71: A59987A2FF53697FD7F5477AD93C5D3347CA3A4D9CF2F7B1DEBC5EF0337B6BE5 + 72: F3EE99BEAB752D7F967D802B986E0C5E440FF55E6715AE62476C175DEFE49880 + 73: B8BE881E07549C7B512BCEC147BEB0999F60B37A9E3539C064BAA9087F695EA4 + 74: 526C78709F5D0FB59339C74AA110D85A538CA5F285D4C10072D0360EBB6D792A + 75: 78A52E87F895E3785A03BF0CC07B0BB3E4B13E39ADF3AE10345F55BBE4A1FE51 + 76: 8753C9A1AA4BBC04B70E1E53D2F332FAFBB37B22E04F73475C231220C078E9D1 + 77: E138BE525A0FC25896363D702DF7A51A76C7D0BB6B934E9F8367077C0B114348 + 78: C1BF13C457702E3F55B07973AB822246EDBDDA27E6E9BFB3EE8C8386C5864DB1 + 79: 0214524AC7B77CBFBDE5EA45F3591E7F3F14646D47C6E780DDEBD694A67C8C47 + 80: D03733E560950CAD1C08AC05EE4A56BBD2B6B66C2943908AE7C55B44BAA444CF + 81: 142E70361E8188C4A03168C5A9E09CA9D63746D3889DA9DF25272F2AD4715919 + 82: 58784A0DA7F53F9E8F61EC2DEBDE47D58484917FA1147C6AC2EA166C27F3D55F + 83: 7C10F5BDD0DDE3981AED24929545CFE5F7DD8E7C0463EFF8DA8CE2DC4B9ED4CE + 84: D68688FE3542987A21666ABED558EF894071940DF039C0F62E7370C00414ECD7 + 85: 69D749759F6719D5D7FCAA8E3FC880AEAAE02ED3F19B2CA3AF6603CB2EF686ED + 86: B9495E9BE90BDD2898C4BA79053E0E3BBA0CAB96156A19B6474F3D8082062DC1 + 87: 932A031D47705146C3FB5437B2BB5BB222A24F3471206615D0EB48E9616D2F2A + 88: 3378B7ECF28B590AD3A5B63DF280A2EDB4828BFB23A72A53DBE29FD5B7CA1E0A + 89: 9231275B81F2F318CF4CFC54216FD0CD66B252954AC325FE43B52207FC042FE6 + 90: 4C20DC51B49C1EF9CA34DB2BB885B3085218672347137F0FECD6342FA0A44E0E + 91: 17786F16279F1303131C4C06147451D9BD9527FBD7B3059233B2E5E5EDC76019 + 92: C9DFE55E3E9EFA758E5E678CA185C23AFFB16F4870D4C5DFBA2F235D7234808E + 93: 8BD27FBCB0727CBDFB29FBB32CE54761B659B6DDCC3F22FD92F81D711FAADBF4 + 94: AC72CFAF9859B6AFCA17D6CCBC31E14309035F179F70CC6C50B1E983742B61B7 + 95: 3820FEB4C43B2282B2ACD90E0D27CA0FB3DC4BF70C87D5C00D10284DAF9F722F + 96: 223AFBC2AB5E469ADCBB53CE8AF8A6AA1A4F84F9D9487002FD1FD17645BAA39C + 97: 269B0B7EF788E539FD881678EB1AE50EF3D41B8F230F4A76A1C6C77545549D75 + 98: A2020C92921389FF94689A1060622CE51F28AE5F8334D297AA64E51A09DEE73B + 99: 5EB2A6402D59F950BF0ED5907BDE3D3AFFFD031F2836C484C1C8F684CD0F870B +100: EB99D8D3CAB05F478E42079EBAF4565525DCAF9C64F62D7B4A71CABB6759B6C2 +101: CA4C2B65B20E3E442E8E4B49795E99A7EB93A513FDE592AD5BF6027FC0899B76 +102: 8E4B9C5D0883229F6CD2FB574EEE3C36B5346C70BDBE0CA0E273D674478FF034 +103: E01A183FE7A893DC91B1A90E84505E2390BFEE27705483EB99B5EF1A5382BCA3 +104: 2D5164AE808F846DEA107F8A919F4B8A876CCA0C5FECAB9369C3F64EDD9F6F5E +105: C2771B6830E50B5A03CA3523FFE89B31BC056E837BFAD3968937091F69115748 +106: EC666174054E0A7E07F1E4B689515BBA0C70AE109DAC104916671FAC934F972A +107: FC5E78FFB1BE74069F233DECECDE65FBEDE8BFCDB921DC53AF7024F7E45C0683 +108: 9BE4DAD0B9FE3F7160D0DC744882A4454CFCD08298A3859B8AE2231FA5F53B2F +109: 8C27F7A101ACE3A4D73607391EB3AA1893FADFE919DAD7838BD3998840BEDCA6 +110: 18512E220FED71B504B78677D81614D33427B2C753AC50B63EECB6C7E1858064 +111: 45D95E338C0681FF16F0B76FC3A613D0BC74F72EABCC3D548CB2264DED924E33 +112: 2BAC2857BF866B536ACE7270A5CF71D0532939EF6CD937D23E20BFBAAEAF3D0C +113: D289400575B939E0147D751110035CC8624A6AFF5C8E5D92B0048DC01FFDF1E5 +114: 27013272AB9340B15DD0EC5FB102A14438434D2857E580A1E4DD655393E9E8CB +115: 7E80D7EB1F1EF312AB38077F82187C5BA138A339A6E3E5DBBAE8ED530FC815DC +116: 5AC6D7E7E40CC968495778BBFF6D4518D402238F9525FD105C83105691E04C9B +117: 6BB712FE2F629B780FDF8C02B063CF28F577C97E96DC5D0C5CFAE5EE952DC60A +118: D11AD92D2392E66020B76B22D16ED503B01470FDB6473E579F9A6D676C39A936 +119: 07C552D7624B8E22152D3F3D7EB450AE400946BBBED376E2E74296F3966739E5 +120: 37B7848A2BC57DF301F90BD95B7070BE8731971B64D6A91B2246910C4BC28444 +121: D3C525A0F26AF107CFB82862543A3D44060309B5A8D8349476D8FCA68BB54186 +122: 77A0E371F935F8176285E726271C0418628D0452C65C0106F052BF457BB6BCCA +123: B01A31AAC6A8E2B64679473304C2BE2362055C81C04E15FBE6A112850A831440 +124: 99A047D24C5A77E5A10A29B0E361F040AAF886C93F733967238BFF0D0C3C0EA2 +125: B699EFD9B6FDB0F6D37C32317A7DBFD0086A86D859783C779878F4A3331BC323 +126: 8589EE4F7200F9BC7A5E2FCA66BFDA5E9E5E3AA6A3652F5C6FD419E9F247F7C9 +127: AEDFF2E6D7CD7D083F8D3D7C3ADC701D64F62044C1AF95787F30590C8E94FD53 +128: 1E641D63B739FFE9FD1388E3F1C36F59D6ABCE83BD1448B782B2ED0EA24DF0DD +129: 99137657DE6BAFCC8CC5FAB6206BC91CD8869F59CCF125A76D2B90DEC9D9F99A +130: 9BAA62AC62BD25FC74DD090DB5BAE3E2FEE4A4BC3EE4DFDDCEC35CDBFB458D03 +131: 661343E6069EB01BC90AAB94FC91900255DD5AFA973128AE4AD7A816E0003C1A +132: 45DDC37443CAFC45172D2E276E49CC82163C2937C14C2F332D6A3D21E9A525BD +133: EE83394466C27CC56F73F3D45D425A6E18BD7F847AD5302447B7C6908A2CF4C9 +134: 337D7F763C292F9C8DA49E62D47D6332E5D64F73A9FDF8C693385F2A045140DB +135: 6414B64B863E98021DB3618D54FFCE52EAF6F9E103E5AB15EFB0A58493704A0B +136: 46A8CF7BB8022FA6EB8C0060FB8CD938E2FB51FB30C9160A707E0D1396C382B1 +137: 4F5693EF4CF1F92E90A45621F80B4BEEEA0208BB34C0DA856099BB1A430D6305 +138: 834645A17330F8A307A506E9F7EC5FA2239784B90C590528B12B5CEE37F693BF +139: DD89D1A5B288F32601EE8CD02CB2FC1C46B946AECF7A8371E5B95FFF95B72935 +140: 0D9458F49EBC787249E1FCE27B5C2E62E455693959899514A1E6458FC970F2D2 +141: B8052FD0F2563CDE49FD5F0D9E23CD6E4470FFEA2D864C1353619434AB71FFB6 +142: B01087ACD73274E39EEAF42840A2BA3F510348E03A337A515418272B728A59AC +143: 93BD1DA6562815233B7557F0C422EA73DF2E1B014B4D8D0D0BD9F912869CF28E +144: 81C3B358D1FEE4E2C01DFFB8974B3558416D0D8FA24CD39C86A8CAA395DFC6B5 +145: 1CF9E97B10B8942A9D31D0B9AC1160878D5503E21E6899C9A60D958E5780696D +146: EC9C7AFB37B734FF8E7FA6DAB7FDFBB9BF27031B820AE9208EC15E46BC956523 +147: C9C2CB7542AB4004B225886AE36CEB3414EB75675D28E9968EE9ED447FACA53C +148: 1558C16700576BC28BF5851D6121748135359D2B0DAB5894B723069CC2EB0727 +149: 23A98CFC310E98FF5C275D26BEF42FA4FA69B4D355B0E46F931F35827D061371 +150: DC1BB529596F6D36401980038A1B75863800A715860FCBFB2BDBDF0AE4DB5967 +151: F434E237F8C2956D55E4AA85F559C7034DB945B350077636D99D3E34D321753C +152: 52E7FCBC18D02D8EFBBADAA3E7FF09CB2E8C8A30534612C3084515DBFE91B252 +153: C728EA292FD96DD66A3D6D56CEF4A20B8BA9B28EF5DB6B26CD813F481D4C4ECF +154: 097EBBC0F11EB0F1A8DDDCCF737A341ABAB4277B69AB6571D264368A52B42CE1 +155: D36E8951ECECE489A9710E18A1A3B090F929B77EB4342B024DD933B88D569EB1 +156: 8B27A24B6309F3A9AD58FF5C1DE97439F8A306B22DAB359F0F505437BD47BADF +157: 600AD22E3680EAA76DC3CC800C0E15A56B85ED9B0C201D12C5B565632BECCE08 +158: D5E54E53ED68592BD379F607A71C66D9D24B7533B996B952F2E9175D0DB4B53A +159: A94DBB464743F4EEB9169134A12EFB20424E4892C61849AF20DD2C5C9CC0C34E +160: F506C8FFB058467CE2FDA45308A00413FC4AC63A1F7D05AF3514F3FE07720DF9 +161: 8CC63294B21CB17DDF6214B296F19ABB36AC1F808D8A2481537FE2A9BA86846F +162: A5E796A0A6F211CE76987C2B7E965C3A6A60BC0AA46EE0B8C0A1752E857A40B5 +163: 401C0E87F3374AF4688EB111B153585B6AC59D15002279A67EBFD7A44CA37AC3 +164: 9F273752D15EF9232B67FE4544CDD77ECB05054FECB7BB777353E33106D981B3 +165: 10C1828084676F9527C5EC8A86B85E476343573E2DC01F76AF020DB0A051E7E2 +166: 57DF379A9A4F2CC81B51B7E902174BD754E615A41924B89AAAF1D82D0A1B247F +167: F968E527F2BE68B71651B39822902B920B1321A3C1D279227C9674454BF929DD +168: C8307C8DE70251DFB7B6F4176FCF3E1E2B084BD7BABCEDAE051660D112CED766 +169: 92FAD2A894E486C8F7B95D8328C07BB0019F87B412E7A0828E620D306FCF4BFA +170: 17CC3FE3A2DA637E90546C9ABF1ED9B3AC8CEFF9A1B2F3D30C818B0C55111AA8 +171: DBE1622DB683472A2A42C98B837768053AA9D3B3FB71255CEEA61A4EC89936B5 +172: 8B46A4EEF26428FEF253FE633E86450713BEECC6CFDFD6046E7B32666667EE0A +173: B0D01C04255AD566E24774585D1A4FF9FEDFD61A361E3E28F2CA8D1CBE4A438C +174: A5AB98E1CDF0C57328D373A4B33EFB85C8AA52178BE521B41065BD1C03F52A95 +175: FF470AC4BF1D2586B9BD9BD7730CD4F48B60357D4DF99A65ED26630DF3A1C989 +176: E8548CE2F42C1B6C4820E8D1FBA066EE426E69058FD7B31A18B9AA875C29502C +177: 5DF20D1EDEFAD55F8EB7E4604D8B4C2B4DC6F03753FEF0A95EF1AD75690EB4F9 +178: 632E58E4AE4DD26DC10FA6718225130901190D97614E151C72AE866263878BE9 +179: DF37B47ED64970D737B80540402FD25C74A4ED0CC5F4855067B202642584531F +180: DA715F8847774B39E7D6C70BC3D80AC4EBD65757D60A4AE99FABDD62DBEBC0AF +181: F84A5417AF999AFF15F38EC55BC1BB6DA00D40F81B6EC3D911DCF01CC6BA0936 +182: 662177D61F8C69E7080284B139A541D3AC2A499F62B4E80797BD98FBF42C179B +183: 5D481DA0458113106E36539047AD96E9EA68662B59E7EB0C04AE4F3DEDB62B48 +184: 58EC20C1B4B205E00F513F78284A0CF702D011BEB37FF4BBF65DBD7C9340957C +185: 23D9EB2F0763C3810B3492E3B401FF7A79368EAA62E447C984EA274A9BF025AD +186: 49A121A0F40CEBAFE99A77EC81BC035FAA3614E0C75A1B4E4AB75E36948E7768 +187: 36132A7DA9A65D27C5288B641BD7716F5A8F92D801E62C56838A3375C7AC788F +188: BF07B9182FA62A50A543E82B95C87845F24EC9131729F0376940016453577AF1 +189: 76F16FAEC4AA73A97E6AC9F3D8381B57198C7D8D4431FF40E8F1D73BC9ED1C2C +190: DCFA909E04204949A866CF1A8D2CB230AAC22462E474A908DC42625919E9794A +191: A9F12AFC050A6064FC371636D50CAECC5B1EB8DCBE094179FCA51ADFEBE3CC84 +192: FF715336D5EC6BD4AF1E68A92EB398E686D9F3FBC84D9AEE4FABF513FF9B6F10 +193: 93649AD7A74F92CA9C6AC6456AD9F33F77F11823429DC5E87E5456B088C10961 +194: 000BFEE1B37A94721AD664D8EB639FF572881483AA47668407CF3E7CC08E3E68 +195: D60708054606B40FB53C87B68C41168CA99AFB30F3B72B41D83A7F36A5E31778 +196: 4BBE606CDC9F6F5EFF5294EB472093D8D13D927444DC2C4B0F25938862DD1869 +197: A81A403B78559DC6B7E1E577F76A5343429C613A7F6B4B17573C6743DCD1B8E9 +198: A4452A113BE56D8737263F965E367416BBA95F825AE4EDEA7FCE93B801D23623 +199: 0BF6BFB442054369663D4204E2786048C8732A0604942656BDB7CF1AA8973925 +200: DD072D6FC4A203F430F4D44B061A15E525FDE572159CCC5DDBFF584FB8DB23EF +201: FB4B75E89C01A7CB7B82DE3A6A2D6EE4EC62C09CAF34DADE24EEBA6F0F72DD54 +202: 0558E94472154611665A926C2760FD9BAA034C5CC89A79BB3E4007F64DD4E16D +203: E3757AD0AF9DBC26B09334778333F27CE3F88189D834AF807A1F1C1310CD7527 +204: C1823F5C31D59A02D4387BD1D01B7358F2490858678AE999C5C0289A7A1C71EA +205: C2169C717BF782D7B19D2F6C23575FB053AF8969FD1EF14FB4374C3ED0290609 +206: 136C5F7C2F097AF920D2CAB5E3A6F004AF75E48F79ACAC9804957AA0830C6F0D +207: 2D6BB9AD9E809EBFC6828CC92E9937F8F8D5E8FC7B619521A5E73AFE1CE0D91A +208: 0AD746155EFCE203C44CB8367D11D2B98BA25CC41FE19FE8B24CC8A4A4925C3C +209: 293FE64479379FC50C80F598F567F0D8F83E5DE1A64B65CD0D8E24DA5301C739 +210: 071193E6DAF311F73E020279E74B1E723C3755F469D6426BB7789F409DD082F5 +211: 1509EFF810D1CC408684ED0F1C3503DFBAAAD9E8A5AE518A0DF2782AF44B33A6 +212: 5991927B26178C7C0BA7EDD5D74024CC837FC9FBD70E58B8418574EFD3A5F484 +213: 1CB1C2FB4496CAE5014718031BFAD64C7CC518EDC7659E4A786925C1F8D04F62 +214: 595BFCDD70F1F32C5631F270F1D8D4818D57F120516E2B5C4D64F85FEC0A6ED7 +215: CCE1D922A8AF198048C7FABCF1D42E15FFCD44C6E276B9A00B2F97FB5693788F +216: 85C3F375A51C733809F854FBD1E38CF5BA5E22A3FD9BF187B1AD66DA373C00A2 +217: 18B9B92F696ABABBEE8E7FE09734AA742A953E68810DDF1C5AADACB298673078 +218: F63A28A74339FB739E751A76F9C888C79930AFC73F1B43584595E5A15DF695C1 +219: CDD08C2839D569D4138C2629CFF9182A3F3B00C9E4F02E2A19316058882529CD +220: A40EA17095A5F42B8FC22610D734CFBF6FA73D1B2C758C325450B38DAD966AAC +221: 02CFDF1A9972569AC2CC02B5BA030564B4766895F8130CBF40175FA936F02032 +222: 439FDC2133ABB08E1332A14DE0D89E7096D8ABB981D7C04473AC1C087FBC3C3F +223: 6B813D645ADE1FB3B38EA39115C82391F227466FD13865570B806A30885C9E79 +224: 7BD097E6665E3FE0D3838F264E6FFC5BC8B084002A6CA0BBCE3E784FEA24694A +225: B705257D8A2EFB36696F736DCF837D6CC0DDEFE60D536C77E2CD686666B42E93 +226: 1F14516210A43C4C3C6EDD491EA8DE95C23433A0DCF3D8FCCB1B2105322AE450 +227: D3FED5040397F0CAFDFFAE80F743BE8DA753A34145045020FAB72BE3BF9D02E2 +228: 7B6FD6D61E6F5FDF59015DCC3B713CD74C889214DE584CAF4794B59DBAD87E70 +229: D56D25AE12D7A29F05B088B7562394AD9D5C94A6DD771DCE028AD3EF21348341 +230: 4237236529661A99E776617DB6D6AB36442A581B0CC97D9D3CFADC40A40EF252 +231: DBD6B4A76F0DB0E1983F8AA2208DA61558C8B366F470B2AC82F45B3C07A85CAB +232: E339723895A9F394F9BE7165276DB31F8CD47E54AA0EA8E96F80A1F136499088 +233: E5A30A8DB4BB8F7F5C3C94BF2CFD0BF366CF099C3E5FEA81477464C076E84776 +234: DA0C79BE315A665D242399FE1DEA4F23C8F332351C111668A3426197CE1D209B +235: 9FAB51892F28FA9196B05FDC0B4714C957B00030A96F98E8C84C966CBCC0714C +236: 3B571B2DFAA7233C9CE8EE8A62D3299F255A8C8D05FDF9502F5875F5E49DB20F +237: 575CD67F22C60256443AA2749D00D76C440C0FA1D44B6034EB03D4E9CB7AF86C +238: 8473742B401B29C5FC6D2384DE972E8005B60AB05BFDEFB952848662FBC49D3E +239: 61FEF2413F455758D37C0F7624B417D145222C7F1BEF37923AB3403A9B788BCB +240: 848A9A96C894AFACC6569014C5AA344242AFA3DF482AEE070A6028DA8DFEE536 +241: 5CD2CB40D998592C90AB4B3FCE978FDBBDAC8810EC77228B1F8B7CD399FF113A +242: 4B0E5A2C4071D77C7DE8FE77EDE2845085170A290C69B7253F6148EE53C3C0FF +243: 68077310C146FBD01F5B38BBB4222E8D21FEA31E0959A0463360952E0CF3AFFA +244: 022ACD451B6BB3304E7D3547EFCFE2613FA7764632BFB5845675716B3BAA6EF4 +245: 28C3749126FB7FD2846375B01A84F77B9D76257EB0EC0EDEE333128244F54042 +246: 8B77B36CF61AF6468C3C205CF46989EB832FB38D34A5FC711BC15FF1AAC4B42C +247: 4C5B01C22BDCD239E9AA8D78DAE76AE558969A9929B589CF2124AE8CDA922452 +248: 061D00E8181D9E6DD5A19CE14FD002CA17DA471028AE4EFE45B36B15792ED671 +249: 6693FED54BF0FE3EC58CDB72CFBA4CAECF6AB5C894974FB6DE7B0748419660C5 +250: B39000AFE76181C104777375284B3649461CD36AB48FD63D03B07F45C8B7AF39 +251: 025AE98309E87195E70E6D66CEE69E8CB1BF0DDCAF83F9FB4D7B6E67975CE832 +252: 00AFCD23E40B673330FE1AEF7E1A0FD15C3E606494294C626DE6F8C43ADFE138 +253: 0FA5EC169687DE9622B4EF94CD094187613FA229F33D31E03110EDB5C593B555 +254: 61F3C895552B790AA9E38F3257E909C79D3561B572F746BCE4762208227C4595 +255: 0A271E998A3C5DB822588BA02A137129E11C5ACD059570F7E2DC9BDB1791144D +256: 2B91CF89FBB3353429262AC896A57FF6CBD5BCE560AB3C1106FF91285747D80A +257: 3D84BC671A7082B45867308A1911B39D3B204E924D37E069FD12C0DBF7F9D6CB +258: 799A1E3B40FA9741FCD08232C2F37589A2A8A3F42FD31F5A56C69EEC199E646A +259: D194CECB713A996DE9BC51F4F2D5A6B95C79E746BF67282F075D1CBF79B76138 +260: AA3CAF601125B94D9B3AE037BBD513F877A16C0C326357E89B5B4806D1B5CA04 +261: D13229BCBA5A7413DF53F983695F5E7E8A158942110D5F80811FC7F2A26FDD0D +262: 5BB5D3B4320976E40364CAA40E39E41AECD835CE892F05F333D34259FFE83D69 +263: 05184BDDC02D0B51C1F17B8F9B36044DF65AD77915FB5287276DB906AB18C6C9 +264: A2F64FB5F1A853D18E47C479CC3E33B18DC98C2027E74643AE348EC9B2975798 +265: 9BE3D79EB5997C872041E5EFDCFFBF431696C4264385E5EF9DCED5206B9C37E6 +266: 8BDEC3EB418A6E4582BF7F7442DBFBF84A3793E541FBF314CBBDC6DFCACCCF38 +267: DCD72D14144DA61ACE65F6187F3F70C1D7E996542D6057447DFBD83DD9C607E8 +268: 93BAFD57513BE654B3C531ABB9BDD377946EC0368EB0D7F27A6F459C8E0341F3 +269: B821AB8CABBE27663168172CE01ADF59BA3055F25CBF344DB540F3218504E866 +270: CB8021976EC64A700DEB83081E1E556DDAA9B92B1A9197704DFC05D0A00B9CD4 +271: AFA9DE95379ECAE67D8887BCF2EB434ADCA23D7573A35A8350A0EC321696976D +272: D4CA369A89DA417922E55530703D6C3A8C7D3CB67AD7241184D7FEB27A7A0314 + +HMAC-sha3-384 + 0: D00CE89D5235B22AAF49DAE078C0C8C29FC3AB699D89837E1D1A9B443A70C9A86CFDE0A690CD4377BE0D91ACF03FC86E + 1: 405FB92DB5ED34B36DDE5ADA810D73102BCC7C4EDC56EC67C03CD5173EF67DAD4E9A911986DEF61636D6DF98603B82F4 + 2: B8A5C7859CB74C8642CF622E35A8624B906791A36CBC31DB83CE524E21F21969401768C8FFBAB66412A01CCA9C81CB83 + 3: 217B36937A51E70B3C70BB8C72A130EC09FCDC9F0044915864EBA7815A6A8F2379D982299C1F1A156DC377BB8EC1CFA9 + 4: 2D596E20A8690BAD631C9419157540F59E6B83BC1AD66D6FE5DBF43C582B0143A5740870FEA4BBB40D6367407DE8A5CA + 5: 1CD891E9ECDB3904FAEA9A45B7E2090331C926A0E703B365A11D4E7DA283DC7C766F3C1BAD0CFDDDA8932F2EF9390D7C + 6: FD75F6C3054F1B8594F382F0D8579116CE03FEDFE64E18190A07253D54E2ABD15DDC2420AE4FD82A861C97CC6FDD6492 + 7: 5221D7775F57FBA4CA33999216EFC52CA0864A86EB405B66C2113BD01054ECF0BA5ED685A6B96814269E12CD8FA92BE5 + 8: 30FF52F3A2F22105FFE8EB5B29597D4B00066C0AA94A3B08C4F03248DC140AE04F3AFA16B271A4D8587F748E3F766D1D + 9: 46C1EB8E229F47658289464D08CEC40BBA69FA914FBBAC2EBD74687891F86C6A62AA08831E0950DBCAB8D1D999E91F10 + 10: CC91CE0202A6990E188E72886C188DB46CDF5676702CD52B94479C2794184F6F6B8E2A298DDAEB0906259CD1DF6FD41B + 11: 5BCF38009AEE78EC63CBFF5CAB45C21FEFD60F3677B49335815C0C934C7F7BA79B0677F9B4E25F6953C4D15CBC340B68 + 12: 514EADF2B0C4DD12E4AF24FE28C72E6155FBD32D054B628EA64048EDFD70E761F569C1E97353F69BBD62E3BBB74C83EE + 13: 2FE23C76A46451BFB3B7247DFB417290D376B1A9508F7F1405889BC08330CC9C044643BC1C1B28E30BDAE7A9CD54EE87 + 14: 58E94B564EFFB88E622BBEAE5F5BA893D5446A5376E418FAF65A04C364AB1403C5883D49D655CF0C5305B17742779DB1 + 15: 33801F1B333CC7CC592ADB87415ACAA6D887964498151B94BB0F2347975ECB119B88045EBD1670B6B00A3705BFAA4438 + 16: 28835D49E401B7B0EC2C84B5B76CEA6D12BECFAA8D432E2FB0919CB98E95C6447F7C757B026C168B1DE4EA6F478B20DB + 17: 91203529A6044D17B4C782B4AA2674813F2BA11050B3A3BD9D6677FF84863F6D74E62129BC59E1D0888913B36139168B + 18: B0790890D7E952D8951D08C4183587206E530194842009D4C868EE902B3606416786F336FD964704E9CF0DF7EE4EF569 + 19: 4515BFC56710B63452E82A7E5D1838E18B7719FA2CCAABF0E9D43204095817AA5643622931EC4B9B5378B7FB9CB79191 + 20: 8F01650F37C4254EFC1BA9D30EC6E84F7824FBC34CFBB94BF60E758E52F344B29366D16529D4C204C675D272AC2D3962 + 21: 5E9CA7D3EBA0E5A9FC70523C9122BAED96E7864460DE13060A22635975DC007C7533B0387779BA2D2EA6084827B17052 + 22: 61EBC5C22E5CE2B706B5019E23DE9987EAF5EFDC8D003B4AEB7FDD29F6E770ADDA4A17283262C25871556C261C79F605 + 23: 59558286E872AD2227F02FBCC3E3D86E86355C2DBFAB909F2B2CFF493024C1BBCE01D048E6F3A6E666C86EC06294D91F + 24: 159B05EB57BCC17A4E43385F3BC46A5FD5124734568C85C5A52959B86765C0A4D1B7FCF987BCE48F407BA112969DBAFD + 25: EE9167312425A2E7D13E820DF3AC29F21E8089993154015107BCDD84DCEFE1A8DD9484C9D6B4950A8A7B00BF28B6064B + 26: 297DC21EB30242C6C845FEC6F8DE331E71CF09BEC82DD2AA10E069B828D7381D47664848C4DAB391BCF1DAF98AFA8170 + 27: 4AA8315602DE4899199941F9B14ED21CEA2573C3EBCCA81927DE6EFADF3E69E8862848D22ACB37793E644007FDB605B8 + 28: F56E13425CE8D01B5327922B15B81A68A25E8EB92B303042A586FD3133F99AD8B2D2DA0D5601D95D924D36D53C392EA0 + 29: 6787656DA62D2A547784DD67C01B22A8085BBD6FB93612C66AD9F11E0C13D8396ED6DB6F9EB85EDEA1B512D8AE90F1F7 + 30: CB6BB9F2B97844357595C9875DB306EC578ABC568F5DEC3A293D634CB0D1F04B1B7D33DED313898ACB70AEE94A0D7340 + 31: 91F1D8F995C3B78A8659E27368B2ED1D81C9E8FAEEE7C9D4530028AD19453937DE9C5C8D6B0DB4B1A1386A2E14C2DA61 + 32: 27A4E5B5E0D313113C019F4A235EABF3AD4C964624DFA8031740B82E858513858382D19378994AA6CC2AD0041C5CE87C + 33: 842C5F49D372F069D795DADF9357B450BCBC8F8DC2BD1637E3774FD38FBEC4AC31D08C3DB032E219A75A4B21D9F7B8E6 + 34: 3BE616F08B1B3C73747B0D7791E4870879B80EE2E42BA730C65BB6EC581CD90E25E5730FA115CFBE5C76C9AEE71587F9 + 35: E29B04FEB3258D932F873A78C84F151A6C76B64DDC91C1E410B0736BBC5770AEE800391EB81904C858DCDC1D9604249C + 36: E73C5661C4B94C067218C16539D70C65B48FF3563C61043776998D6CDA25AE869C790B4134A3128F117863F5D402DDC9 + 37: 8CAE539D4374573D76B5507F8C928E8874AFACE190B5FDD2A3DF515159A8928FB930E2E6C41B76EE855318E0E5244D3B + 38: C565AD8DDD159D90BC650E18A5214B42FB794B2E45242834D51B1D6F381EB20E4DF795A7BEB544F932EDB1565AE05A96 + 39: F078B06244FC71F84480D595039AAFC27BDAB0FA251AEC796B1DF42D5D12BA329F2769F2CBEB45144D688C2E64D55FD4 + 40: BDF8810F4E862A128DB95041C50546774489670BA94A1F3BA4BD24B540FF0CC2383C54C4DE75B66FD1F10E7920A697A7 + 41: A44D19FA05D1F71DBBD4B10ED60BEEEEC3EC6672EB7D7B7B18500AEA1689779CFE1E068CAC5302AD008C7274294518C9 + 42: FF7904A2133EC8CF6A462518C27883269BAE8248A8C50F6F7F905DDABFB5F5736D7DACDCD69603072BD23095E85B72D1 + 43: D73C738D076E9F16E37DC6193B98BD88548EA6B713BCA945C2FAC5B956F945B767ACEAB2E8BE30B59CE1D15274FFDF3E + 44: 51D2386FE4CFE73D68CFBBEF1C1C31C7DDEAC11329AABB4EE48A38B69F96073D829E489628D969A102DD0AA741B37534 + 45: EBDF109A7A48F8EE453303A19981B6A22BCBC1F0E108F196CD8FB613BCF5D9367BDEC76DE7B96BD5B6B61672A56B9427 + 46: A41072DD8639B99835C8BE32AB442AAE81ADC52A44AE4477FF2C0DA7D37F7C332CBD20A94E83FD6E5106EC1238B25D7D + 47: E6E3CBEE54A29BB62384BFAC735C287037D3CC3F32FC325DD3F88944CC730461621E74153B907A03C5A22AE854493A7B + 48: 0FE96FD8DA7AEEAAC4E3ACD688F34FAD84D06905E2F78CC3DED25547534A3EA255F9514BFE7899067531A172F9676724 + 49: BAC00AA18E64F93053F84CC69E32CC29D6E9D5F0C3E5765B631738A545650F7C5C4106D42A420D8F7F9A3E5B882446FA + 50: 5E598C707D6901E2C69E69562E597C533951F1504F5E69C11CD1FB2CCE2E099776D10F85D467520379C133CF2ECE1BDB + 51: 08B7AC513F0C78CA28C478B74C14D49A62F291CB78BCE87BF4F2F95FE094A3E24C6C5176B8A09920242E424EDCE32826 + 52: A37E733B02D4A6E01532938BE18719D80DC74C9671A24CECCD869359D960084F0B97E8FEAE52391C9805B91CEF0B2D7E + 53: 801C4E19E62A9DE32FF6E8BDE2153FF3ED55873140E81011DAD1C615121007399B6EED6102FC6664462766E699895D63 + 54: D680D7E7BB8DB2C1376765B0A21AE97A0F6A7B15F39BCCEF7EBD5F1552C8A6B9A06256002CE592356EF3A6ADDB36032C + 55: DB2D71A6B4EB44D1A09E04F3A139537FA790A69CB07F483C79D26D8B65B209F4564CE3A73AFEBC4D7B5AB937365ABD25 + 56: FDDC92175AE7AA88E86E5F579267479CB88F5B3FD65B33290E5AE2F1AF8E7C4F417230D46E83499AB3AF0FF8B93BB10C + 57: 19D9F298112DFD74D5D9B867561EB5B38052F6D5D07B9C6E6F3143773BF7005B3F0CF5F252ABDB6CF8580C85379EEFE1 + 58: 870D46C9387395A54E86407DC76D692555CC9BC35731DAE243E1EE914F60F9AA61A9129E8427144BEDB4BF97CC45C29C + 59: 36B766B9F923F7483E363FDC382547E3F0214B4DDA2D69070EC0B0C5AD2646D7B1FF5872E62245919D65F573E869C953 + 60: 2BA77E0254A38BE6B0ED52B3498DCC45C4EBE830208437916225B496A78BA38EDB7A1A11AEFC3F9DC4DD12D3C3E9FD56 + 61: 17CA8FE1AC268187121C6FABFED518BC377CC47218EB685CD94EBB9BCF030A840C0A319CC9A8E09F863D409B026237B5 + 62: A7A2608BF45D47EE66682B7E165EE77F1F2ED2BF7FDAD26D8E250C2CBDB6706C49B7792C95C61F18458EAAC4FC287C11 + 63: 7B59408DAC644072EB3B6806B514D939B0F4C2CD634EE996820468E252D1D0132CAB9B1EBC2B5CC1F0779D4CB266F655 + 64: 69D24A303ACAC6AA37A537B50EBF8B1489565DD09964110104341DC7199E628E94A51CFD135F62BC6A1E572C60758D4B + 65: 208C0C61706AECFCC650BF864F8BED282992AD6951D07217F6BC6276E81CCC52171308114B920A9C06B4FF7D3704BBDC + 66: 5B3312273491108BAAA9E52E9CC71F5EACD2EF421118711EF2BFB6DB64A0D2D9D701DACB9718E366E153FA6E728A7FDE + 67: E9E1B82A0BD09FB24113818A86219CCBC110CEA2B7216602834418AD0B77D86605E2D56099ED23863A54FC3645148DB5 + 68: 9865998832B5E99F4137C347E62E43866DE7D9D779BD7C4EBE4828FEBA9047B6D76AA1BD19781E0A1585697A62571946 + 69: 3F36314DA0CF03BBFEA256FC789FD237FDE047D3D3C40C833B889DBE7E09B593DA0DADE4EFF76795CDF4F4D7B31FA19E + 70: AB3B29673A5614167881C861B9FAF374A72F50ABE286E2389EF27ED9FAD1FBF70D2C2F0A66E4AAE384958D695F849A75 + 71: 3DA043DC6E1D59D3B4C44472CF83122BADB13D5BE5188D9F1142E91608EA917E6A313211B1FEA4CCD83DBF54F8A00B5F + 72: 4028AC4C3131F1316D214E30DD87C58103F410958600D55B32C0CDF050BB8C899685A3D2209A2928FE70772A5208B7CC + 73: 5538D91DC6EF1B34E6783EBA7A5A02229D98E71B6409F85AE377F961030EDEDE648ADD17CBB53F9A6233739A2096A381 + 74: 7F1BE0925A10996760F348A593C71D32F1D5A0C0EFC66E6567928E8B4DF906D2DD501A7BACA16582F73B94981EF4E98C + 75: 09CCEB3E7A56CC81163BDF8D23BF75725318F039F1CD13B21CDD9B2773545818F4CDA4A3C5C35392ED79460CCEF73902 + 76: 9CB5B47EE21249863C996A9332FA247C3B62D9295C0A62F6F4BA74B05152AED6D34B626F1E1F99B21167555C750D03E3 + 77: 8B01F68B62698569DB267DD28636F7F61D358ED9F44E6909B347A3BF4ED262CF653A2378937E92F2E8A2B5CAFA8561F4 + 78: B5888E0432D96E9AE49C93F4A803D1F56D1D6447AF8FFD7A4720625C085FF02CA2608706ACDA23CD21687C51DDC46FE8 + 79: F445366C4AB6692D965413E4485F7B75B9EDEEAC405657A8F818B650F0CF4ABA373D7752901B7A2A48651B5FD541C347 + 80: 3FFB363ADBAA57C8DBFA86A3E004B0D7638A51B3CDA32D830DCA800BC14761C0DD77B29A2C50DB6BC4C53C7CE4775032 + 81: 95C52CB42F07E45E9FA9399A53B556101509FB0D4C3C52CA74D4EADBD7D5DC16276C8D0EDEB2FABDFAE9D22B9EB1F5BE + 82: 8C4813B4D22071113C4A2E933B6B26CCB2D51FB0382D5872B49E17BCCD60D1596B582DE272D9F4195F21AE5237D2D231 + 83: D3142DF6206FE465616E7B803E40FF6A2548B9E10D0C216491992E862ACCA4E83C29075F77513141A1A287EE535C267D + 84: 737C2E0601033B89EF157A8C1A030C4574F9F2A427A121BC0C4DA4AAD94EC97F2E5DC4DA4E73542550F9F991D334886F + 85: FF6A7200EC5F1BD5125F671CDE9CEE485E8EF6EAA70EF7A679F5F7FD9ADE0FF6AAF68D2AC070E4B37C857A62C38CE848 + 86: 0EFE23704DFA29370503A1D22A26B5126102707F1F761FC4206DF6E4E444D7C4E6D7BFC9233304FADAA0CE1A7000FAC4 + 87: E7819E9D2EE94AE4C6F496991138EC03BD94AFDFC0867A186487F9F017A5066370F3C22317821B8EFD892D404490BDF8 + 88: DF4E6F26BA61FB47BDDDB65B7A47A7DBCF5D42E8191A231EC44847587BC9CFC581F0104DAADE840A123713849FE90630 + 89: 86DD336CFCE62C96D1D88E1E981C8E23E5CF65E1BE068581D7ECDA571D230B7E147389DDA6790F8A94FE379B10AB21DC + 90: 99BBCABBBCA80FADFA8A982F735305D686EA0EB8A241AAC4236B03DD70266A2358031FEA4D24A489EBCB9099EF5E8906 + 91: 239C8F1048675E78F2EF17D4EA0EF26619E71D904C6D23C37BD60F4D10DF8F228DA97E6527284B571A6E993709981468 + 92: E6D7E1D6E10DD40BFF662E3B8962FB89A95E635EBB7735DFF56A1EF07158402B2D007444DA3B433AD313D5B772FF88F5 + 93: 550E96D2C9882CA386CFE07A2F9CE2C9E81DAB0722F4A1F407C792B0039895B8CDE1E1CD460B20A58957C38B872357D9 + 94: FCF3F86603D252857D173053BD8D7E1590D975DB1639BA6AE077D644EF9ACFF820D0869A3B7452D2E23D9512E7B48A2F + 95: A77AE656E09EE6F848CDA9DBB2FD38EC0C6CA14E2540935C75C0EABC8CA14FC00104F0E41A2E87C6BF017CBC3A90868D + 96: 8FC876DEFB536DF7524A6DEC8B19EDC36F85A55AF01A23E8D271C790E3D6FC7C171A9744822C632B92B279C7A7A10867 + 97: 78BB1A3BB1BD13D319256E6BD58C7B03298E46B5EEF63085677C0023F3379B5659C8E972EDE222499952DB7A19544EE0 + 98: 5991F33DA48C7069F6FAC12F5B99B4F23FFB157D43BBC3BB43F9BCBC0BEE2991EB23B9B756F960BF635352F430D7DF0E + 99: 63172BE6A03A9D0F1F5D51CDD356CCCEFACBAB9F6E409F70AB74146E502F932CDBDC5F44373AE8E853307507F3DAEC2E +100: CB8C97ACB9BC21FF41085FD7494D963808766497CDE31BFCD9133E7C43BF6240CCE2C5DDE174FB2E1992ECB38C6E43A0 +101: 1F68CE6F662FFB75370CDB6ADCD3095FFC7B381BA7B4729004EED6D742EAA0B807CA23E155816E646F68347EFE7337E3 +102: 1F9111B7FE153B1C890F3F8B6B9E7ACE952C427D05F5FE1D8177B86A3DCD88C9830FC344F3BF1CD33B5B8813CAB0EB78 +103: B089207692FA237DA5B8134993F2EB6B302A77B8A13BD53392005443A43F687F52A32B470A8863660405767502907478 +104: 3659E60A05D94F46E489ECF9E0C916B984662951FEC8D0E3F7F5ABC05CA115DA7F2F9534A2880DA46264DFAC1D3F6104 +105: D028EB286C33E9400C0B3C6242C4F63F062CDF92A3C5C889CAE2A90C651DB85FD0AABC71F3685D3968C9D1A22330B0C0 +106: 51F3DA297F0E56E66FB301A840BC92BB504D7C4BE80F7DD358B128B64852E06B40720A6A2895467B92346C00CDEC6CA2 +107: EBD5BAA316F80C25A982FD9DEC059943956B3F72B1DCE0B3EC5C2186E049B76AD1A731E1A345B2ED980D04832875160B +108: A101C6E0AB891551D0243ABD2D1E15E201280AAD2555BE16E19A64F91A6CE5AD2D710BF163219741582DD3DFC9EB1CDE +109: 191F36096A116F4161FD362D1119301B23EA55ABD1B0550BAFB4E2995CD23EDC18A8E5950DC8BFA175B9FB160C5AD059 +110: 5296048FC3B99A98934971F82CA0E229136AF8E9F73FAA9DCC96173EF0F637FC265FC4398887CAFB595F0AE7E2D96700 +111: 91A833E586EAC25A4ED3E10FD1FB5727A79A85AFA70E2B3F0484EAFE847467E5E235B95C6AD8363FAD833CEAD226C27A +112: CD61E2E65301FB751DF317EA7778137644DB8D91A1EC22B1CF4AB11BD3F6F8657A6CAAE78E472DB42A1B56035B7F3CE7 +113: AF42BFED0ACA6A82B1C17E8C32DD4E9E329511BC8230FBE4CA7B1559A6695C8AFEA016A9BDA69CE0AA8A2268939AD34E +114: C05D9A6BA6FD2419EF8862F0E04FC9D3BF88C13C078F06ACB4907B95795B87F6BC2F4F11FE54D5E2C5D80EE1BCE0ECD4 +115: 7B2739239EBE27540425E6CF0F86F5A4B378F28D022F82246D45F3702597D71E002BF1057DE77E6BF11DE3EA82D0BBF7 +116: 03C894C39CF2E7BC1BC0842EC6C1F1BA1C68B56F5AD497F44EB75CB6A853629EB406FD87EB11396DB54A6F77EC43F814 +117: 4A0862ACBF7C2AB2B0791424E028C557B819EFE12BCC4BDBEBAA68519A4491B57F5C721270B51A270FDBFCBD26459BE2 +118: 12C0CEC2065DFBD52AAFD685F41F7487C3240E31CEB5F1D361626940AC537669C44C3CDF5B7106032E37FF11996392E8 +119: 9D54F93400A6322DA80297CBAAEE69EA1AB96B5A6C617C49DEDFD095BFC5BAAA85D6425A208FF26977974E6F94909A02 +120: 694CB2ED1B1F90C2E95FB0524300930F9F106CE398F119058432C3846945D5D29BFA2CB71CCB4AC5D12D7C2099361D67 +121: BF16039CC1EAD633AEDEFE62DF92ADD9EF190B0165EC68EF821BBE83C59F9D5ADAE39794032AA9487EA0C8D7A7B4BE20 +122: CACE6CB16361ED94FCD449E0E60E1D4CF0EC754595E6E6F2F8BF72926823D0A74105E8C4CBDEF6D24FAF37734E0EC9B2 +123: E47D98969CC8A80006A31DBF9FB973653EF6D97EEEC13229D6D6A187A595957EC6AA00E451979EF0F92E10CCCC204575 +124: 0CA28E8E31C61ECB4C30F83068ED5A339B2CB8A33CD73FBFF0E6670FAF11755C9D901F938505D4924BB69E5755B337F4 +125: 59FC8F1F1435E8652A377C6806A14607041BF3265D8B500401CBCDD32351973A43D5C57866FF1634059A308B9B2D7CD7 +126: E6295D9C4532121628AA1AA2A600BB1F6C65B6F09BCFA3FA5747EEAACFA81282484E6B2E813E2573BD737F187FC90C79 +127: FF25C2A6FEAFD824D887AA52FBEFEA1FEED316DC5FC28617369071CE35513978F2562CD04344C76505A824FFF2E1D4C0 +128: A89FDDDB0B571C2C7D8FAECDC193F6BB97442F6557088673223D0D53CA6E99854CA1076CDAF2A54A9CCF96A94C19E46E +129: 33B984329FE9BEFFB3709F64FA523CE1912620FCD083C514CDC701E05DDBAF2946C9E27E21B306EB264C65229FC98897 +130: E50B511DC092289CADF662768E39CCF8E08ED101368B6F9D5C30371C81B2671D3420A5143F9B20A3F8318C569FBE2EF6 +131: C568C70FEF2C81770892B919CD5C7A55D61A3CE9104EE9677471FDFDC8A90FC53453574B86F1974894D1563447C5DAE6 +132: F7F55541667F3A20C2D6F3C2098D881581B5A35F93E68F10FEB84FB8ECEA8F8B9A5D85879AE06B0B50E8601A33980E0B +133: 197D0658728C65838A42453216EC7429ADB02ECB1AEC2313C79EFE9F2FEFF66A6195B86B95B7CDA3761F826A3C27C767 +134: 1EF0101877543F08EA789FCE62114E6A33229ADE314594A8EADC0CE8D1E64F56B03032E654CB6467672FF539B03B589E +135: 2DE522B574AA46E0EB7160FA3B9AC358213044E58057BB57B3368D9213F8B88776100C8105059B0187DAEF3656EBAF83 +136: B975ABFE51E485314D4577F7EBF941D9C8A111CC919DB00309216F3E20ECB07C06E926E146B0ACEAD9FD963A58F3304E +137: 3D7852DC1A1746B59967320F436C8AD67A204582406EA8E6127D09FF0A8545F3DC298508CD4BC10274D69A1B18629F82 +138: 73669086A40A26AA20B63437FF5E21C4695A9055FC9C0E0A33A252EE75A7BFA2D550049E09B86C10594BC4FD39F001C6 +139: 8D53B12101145837F94A9623DA67013FE7EB37D4A40C7771611AF1CAB505A7C5F7DA92CF969873BFE6E7DDB354AC61FD +140: B580DB6F46C69F1D783C7EC331083085D35F5CA196A8BB8814C280F998D99E459AD944C7B0B9F4F381D0C59802C12503 +141: ECC17164BFBB5C0DEF31C384B3EB4EA6DAB146031E317C8B0BEE5905E751D412267947590422001423DDAB2FA1DF711E +142: 57412B38D69AA64710F6CB9461C61D7C813D20FE95C6FE96FD9821CBC83B48E04ACC34BCBC6F0E37AFD4916F479381EF +143: D9F1340643055927CBEE42E024024F3BA34E752D410C1574CC07B93F3D27246E3F33A70893F030D38E416526EFD8F58D +144: 3058654B27C4C374E0CF19EC648B15A58AC95BED6D9059AA90016454D3A81E740534AB1FE3B9D255F843E68CB8697912 +145: 87E84270AA2B11131D9EA7999F7DCB13CEDBAE1B181C099633B1A2FBBB9F41D6C33117613BFBFA376A8FF78071F8A73E +146: FC629F184B0FBCDDBC314C78CFF3AA0C4E83A0120A8667690BB854FAFD685722179C3170ACE7578079C4C29D426BB1F7 +147: 924FA77295C625756A05AD887E401DD2FCF99492C985980876F5EE4A3635B347569468CB960F568986312B70BD58967F +148: 67E246939BDE9A77F1CD5D76F2AA83C285285A548F41B471A6B6298767CE76F3200BA92E734C89BCE9322AF67CA80A46 +149: 7B990DCB4B1BC48FD76A011632382F21E44D8D5E0BAB87EE32F06A2E6F0E917DB8AEC4E86EA7D2BB4B90799D3560B80C +150: 6DDB0A9ED2B347969FFC0430DEFF05B9864677F4E00E6C22787A6A7A26FB3BFAFFE0EB942A3C27AA0C05A0C94E09AEC6 +151: AEB5C76CE373A45D9E6A870C95BC9034BA82773E9DFC8E530A88F5668D6C375A9BCA44CE7661D5CBAE90FD42DF6B8128 +152: 09071AB16B5746C2E5C020B49B8367E8C7A1DAEBD90460BAF5A2F7212ACA7631D6EB73A4C5103D204DFC7A94CBBC39BB +153: B538DC93F36CA59D59A38D3418C936E7CC0603CB9ECFA7453F84EB6D20D610C63C86B5DDF0E74124A2039BD46E2E1691 +154: 82C1E23F02A3466273E960D68D605A17B2391B87EA1CB48CB64DC0EA726469D7E0B2EED818C0CD57C7169676C3FA83A4 +155: 7A1CB5ECF5993C4F383DCF9CD9F1A6B4BC29E061E229F7A723DEDE301F3229223656733F41562BB5DA4CC996EE972165 +156: 5DB4921885637A9465604A6F3F3A4461F9D6D2027A64E30C90AB9AE72FBD9F809A7788CDE1063081F91C9097E1332E19 +157: 428A24F58324D45265C1F09C84B0F2E669AB54087105E8133268C7A70C5C00D4E7961A36212F2588E6DC8C496CD53CF6 +158: 5BDB40ABF30E19F8382378FCC4A1178EF3653687A753B3D4E03F5D7B190675EF5EA49219FA9A14BD9F2798B3DBFA116C +159: AD7EE03FBD15375502095A5E1B7E87BB17DC56D9F65A275DC8FC2A02508426AD011FE860AC1EBD215E1D3420CB8760CA +160: 40544F2F1DAF8BE54C01E71997270D7905384877EA48A27DEA7D7FA9720042EAF63D1CE91B511EF5F50A88752FB74CFA +161: D53D537C6391A323618CA0A5CD5120B58D3644315CAC34467A347B23F06AC61B0B670D73CE01E7B5BB63373EDC2F2121 +162: 9B2039972A8F0570A144EFD7382F2D6DBF9C2589E46A417700E3212FEC2F89030482034D2D0F1A1749908BE022315FF1 +163: 510D4ED3CE4A8908FC5216E727F4B66FD052C4BC9ED7D39C453A83B9CE6B33C6D7A509DF94C835E7E1FB34752FF0831C +164: B7259587B389C863EF3CA2E412CF206CB3D4E0D393DE042198DFF81AF9B32881411B75E8B63A03EC6106783FA2ABB634 +165: 028DC9C66F01D09133106318093D31272F15E103C9B298822338BE88385CCC5CB443C66971D099C4782E1B8E5BE3D205 +166: 4884C073430C3A45968ADDD2BF09AE87CA27586AB8646E8372FCD8C8A681DE2558286ECACFC3542CD35472AB8B44DA46 +167: 13863F78EFC686192E71B5190A8A6C94D8314C48917ECBD6D11555DB900BD0B022A2A95E96AE42CB050C9A79A9D20A3E +168: EE014F3121B1200DB52B7B4537C21709152FF3C3D37065D86007691B861A2462942A4B26A3C79CF2CE8B13BC6B8EC985 +169: E2E09C38CDC48132FF2089D4E014E0F9998A2F637605E38DE6846EBFDC90DF258CD1E3A0EB4A01A25CA92D21FA296DC0 +170: BAF914750ABFCEA813F14D902CE983E9C6B953137D393ABBBFB17E47658A8FAABAED57D9B5E8304B11BCDD3C83A6F0A8 +171: 1219B7B05D0BB6F4803BD2E0A89F8429842C234085D9BDB81ABAD29CA1C5096D0397AC2B1621F5CF9C217406B6B6EB75 +172: CC6267E631520B0C225832CBD2AB1A1FB79F97F6B7045514F331C2DE2A283A5FB5DC5802E6A9A94B670BB815C78C7C22 +173: 6484600876693F2077772149F99E696125887FAFDE0994A69FE37CC346D0F84B33E79C295959CDA12ED94285BD7B23C8 +174: 7C652527259D05BE20884C3E88A20695AD0F4F01CCE6BBEC63BB7B5A9175E73CA11B5E633DAF63C6D86DB86AB0643847 +175: F059A739D5018B1B7D9C315FBC43970A9D4DFA9DBCAFAA16FD3760B1D817AFB03C83B349C0A39A69474E98177E47CAA9 +176: 252EC8396CE2496889594D21CA2D93CE10E4AE98C228C099DC9655B7CEF6C2658C2AB90F6F3038CB367AAB0D4B0E087D +177: F5353252F128488025CD20F5E76FCB370C69581200B067E32B520E5ACA3080114933D0F34A15026F212A5B4DC0D4FA9A +178: 20DFF2494B1101D056CF9D1CC18E387634C416960B014B523F993EE08DF25FD44E98CD064A9E59A964AE57FDB89E0CA5 +179: 10865C0FE2C06044D06AD9E9715C695D5B8C67E94555AB4EB3CA103076288726F93EE7D09CD1468B0A64DDEA658CD48C +180: E0C4F439B3756F7B30B26C7BA0072297065F084963317AD70695639ABBDD3E8353709C6B656F63B6F48036BB4189F74E +181: 2FFC1C68989E2D6A0EF78C68F92950B8FBA12D1B67604BDA0B8CE227252579537512D911D61092A3F17B16118C1DDEE3 +182: 1B950679D834DB9DAE390ECD2EAA7A700EA2782F91276455FC0362804FD75FA212C7929A0169F8EAA80EDD108E4005B5 +183: 2D6492B81C21DB1A8DDB36794D869702E82DAB21BF773CC5E195DEA0AAD3C97179FCCBA21C4FC8C754DD3CEB3E426E66 +184: 79E81238BC7360E9324EA6452012CF14A949DA83E8616D7236C6872D835AEEA86165BA363311FE9BFEB05B4176CCFD97 +185: D7FD84A6267C50398C2D9F71DD923CC337D763AAEC3FD6004E77B3AC1E607838D0AFB617E7C82AF606C99CE5A8B2DA17 +186: 87AFCD90D1F35801EFAB2FF6AC07E279D9B0C97B62A51B854239B4E06A0F543E7F6E2FC0E5454BCB296241791A63AA1C +187: C01C823CAC285B54114E4CB7D04EAB93A1A7154E2AF7EB7617592512815D9D19553F7981A54121828DD001BED78CCF25 +188: 4C3285D910A0B6E3A5872CB36495F4BB1F1BA32946DA591FDEFF297CEFCF117937841877D1289DA308BBF7C3EB76DA28 +189: 6659314C927D903D1B009ECF0767E620C18F83B5F874AAF30FD8C2BED836DA56B93044FA5B727B9FC08C54B16F58AF7A +190: 7E159B967CCA37E61AA5EB0BADF93D068483CB44A8952805C517B934B7FF355214C27090032CCADDAEB6B164A58F2187 +191: 578CB4E0F032C45B04232E8C03B60FF5E02F22D81BE734CDE0AC9651F2694FD11BB2AE04824AB2205F4CF7ED548F6EDB +192: A3999E5672A9692036898D2539743542A8507F8C046DDBA553A8D68FED14498330910631A4018BF4F3173A846FABA62A +193: 0FDD9D3A3C64F995EB95E57A681DB55F66D4690052C994E855D8AC406EAF87E354934FB806C7E6525FABD2B79D2F36E2 +194: B0FE744FDD61663691A75C806038394636014BB35C1DEF9CF859FBB5466C78B3C3C67AD6E79C76DAED5BE125F8FA32F7 +195: 7F99B051EE0E0B89590A85D3689340A06769CA0FA6A5E5B094B899C05F2FF68FE7945279B29B216D5752AFFBAE93FEB4 +196: 8BE13C8CEA70655088B3E31A0EE9336F134F6B6EBDB4453ADD10108C0A59CF762DFE3595E48A945ABD0396320384E079 +197: 73D2D9DED1378CF9D626F84E90D91943EE61A1D184F07847EA2AE622F79E3738FDD7642CB7829B17FD2AC54A9A2CD903 +198: 0B878A27CE393CB05BB6323C531F358F22301D53161E611F67B9DE4BDD4926B531C168E15D78EF3FC6E76656B892670D +199: 1FB5F831279660B1E77B6DAA1948EB4931DA9A9D2FFA3225FB5B89E1BA64AF54F3F2CCCD22293226A362A010090AD4D7 +200: 6D8C6DF187063C47E297BA220EBE168161D795B130D364D9409CCCC53240A94B24E2D53C1CF8E4DD6055B332A6FCD1BC +201: A845B33749A6DC99886DBB49B3A9BF030188D518624D5819C38AF04EE4DA348487CB6D953C20A90CB7E8D3C8E9335DA0 +202: 1B30ACC8AEEE974F8551E1C545A2B3C55867AF9285D90BD55F5C844BA4C716270D62FE4CBAF0D0B1E64F059233F4722D +203: 20A80BCA843FAD7CD25CCA2298785A99CAC0C390AF744E64C2FBAC3FBE0F1984E5351D2DE74B712ABFCEFEC8CBFE164B +204: 5BEDAF458354FEF1B070F994A2F0A00A015754FD0CF905D082B4B7034C0DBA0004025BBBACDA06CAEED9C93B1F1FED03 +205: 2DE6E7673C65F52B8511BA04FAC2ECFDD163553553FAF00E2F921C6F69987AF383302172EF5A590128368702F666534C +206: 1DCC4B2EF1614802ECFB58E01E01F6E5C44308AE26C1E1115D936E3A0B7442085AC4AFC0A6D800FE8C37C834900FF824 +207: 3448D4A17ACA2646C77C4BC6303EB2F98DA1D5CF2F1E99B0F825804DCE39A47681FF41B06EC55420542A96A64BA95DE6 +208: 1D249F8DB91211F50F81E216C74D27EB3F02746D1F98AD24DF4271ECD65AEB6AD2A507A2FE2F1A3B7E0B8B789090BA95 + +HMAC-sha3-512 + 0: 607063701A568559228544D63A27D3EEFEECAB50933A989E8A2F5A6D0741A463E504D4C03A1BE0E8FCE99A20368DC5AC0F60D90CA0C48443F81A51D4C8AC4A74 + 1: 518958867D49C5BB04C52BCFC355D0B18A92B7214976839E0EA15E0BE83FD215D6DE2C1676A00D92DBB670B752F16BBDBDF37509AF380E14B566F5D46FE1E91A + 2: D74E78A3C4A6A71F8D2D16A41BE30399DA21718FE668D66598B49CBFD4D24EA980EBBAEDE671F12D01F48B6C6CB70CD6467AACA5E7338195137F899FE7B7F03B + 3: 23634DFBE24D8CE8C5A5407632E9F14DAC79995695D39E0B39F817F01A45BE19339A5BA5812683CF81DAEF4A73D76FF3E386D9CFA78C4204DF10474A8175BEF1 + 4: 9A0F5434BAF8C7BF60CDCD7E115BC1DF46E081690A85E706C844B00BA5C314AAB1B2053A795169595FE95064AF11C819B6F7699C7BB1787967CBD5B8BC8B765B + 5: 52CC5A5E5B44E77437FDDD218726B524FE2671D6F183851D4952C37AF9EEE91809237C88804791F0470084721C3A576A17B4F035593371813CE11129CD703823 + 6: 2C2563F93E4CE7BEBA6656A4BF93BA6D235FF6CB0D988A73512D3926911499BCA0E1F98EBE58E4615268BE8AAE19F75DAAD0EDBBE829259612165786474523A4 + 7: 2222101A59FD264FF005B0B18FB59723509E95737299567E32AD2F04A4E5722BBFCE67BDBA2B9608EEB14980793F49C342EE82BA667E68A08282C915CD5454EF + 8: 60E480A794F5C5E6785CA377D789FCD1C22EC85BE9853BB8C24804DEC9C179BBB4F6A9D2D0E89894561C8BECA8563042B96C815BCDD02DA1CD05AE7256396C61 + 9: 06D1CD3879AA2E196DD81E9F5740C7F60EA0D140B424A0183FF536FE6197B065033B31F755C62FD7FA853896C1433536D7AA3F486DAC868822B7F6E5D8B115AA + 10: 3DEB62CDEA3D8A58535CFDF2716A6512FFEFE90AB1A30CA9DED0D5D86407F0FE5541B35A1CA033BA7D3850CBE804241B8B78980FB4424FE6AD7DF029722979F2 + 11: 48757ABD9FCBAAAA71E91BB6B6B85323EE8423B93404CFCB6581CDA1B68B843F25B18EF7C9699B38FF8A2F114F53FB87BBA8714BD8205F4CC18932B6B0038729 + 12: C1D5946322D900C51BFB28B8519FC88C84F3B190A073F6C0DB8C6D5460817D185D9C19D939CBBC2C6634F544F59120782940443432E4B43D47B0F7B936441452 + 13: 8989CA4C20856CBFCDD62C7BD1C0EABE77C832010B5B2A493B805EBF0CA313B30BB1F3F3833588D67517CF524B1A46D2E825C584E2E681FBB80AE6C827CFA604 + 14: 023DC361B007F52873873B28CE6BB94A9262E5F7BD2252B2F75CB10EEE2B34982BF8167BF08A9BAB42B899591E903A4017DFD0E7B2C3754FB23D767F0BB09DBE + 15: D6E2962C2AD2CE76ACA3D9D14A32ED485A04D37BE939D240626C058E2F208B19640911948901530A32C78D19A50D0DC6A5035D9B12859686DF8E6FA7CCA7685B + 16: 019281117A868EACB7ED5B7E251FD36A5FC0405FCA5C484D86AEE22B20B675BDA26CFE622CBE85E3F7C547AD229A2A913728E410E0AB344D10E89EDE65D1E6BF + 17: 0851CCD83120791AD06E52DCE7993FF980157ED918F2EA262A349354BE376780DBFAE7BD04E4734AA333C1C2879DBC4FB7273F88C114B036EF8882E4BEEB01D5 + 18: 7D24626AF0DECF1DFEC5862FA2BAF83525E5AA62A3A1951C1118529F3F5DC12F1B918D02AD55C2C9A4502B5D1521EEBBC7BAF4E2EA229442F64D3015D202D209 + 19: 107A9DE066CF944A939024FDB1588501B83D9121C3B01E63D72491D5715067F4477EF88C2BDD335B498E3EA23068B83D0E641C5AC34FB8B11ACCE93CA5CF4193 + 20: A224DE3438312A8D905D018F2D4C4EE57264D91C84A367AB4BE410CDD23D43E039BC2CDEDCB70C60E807935FE1F6A8F9B913572E5A3DE6DB9027C1B752117786 + 21: F534E03700DB4466AA29FA903D1B87204D3EB5EE214DCA9B25DEB3F1FD0FAABCF9F113C03A49C022BC45F74304E616B61C1AB5130101A9DA99491E467B87763C + 22: 052CBE4C2B0E9D7FD911B80D0E9549D9016D896A35675D7A44ACF2A8222F24A2AB31CBE9D46698F8EF267814A9955541F50B2FEFD8D1A3243C1726B2E57722F1 + 23: A8A686437589EABBC9019DAF5B603393356DE6F251F274D290B210496D5B4626D4E81918DC5F4D261B71C5278D7A61A2DE5B3C5D024DD93399FE833E199A81B2 + 24: 9C22F9F56A255A15D9F7CB0F246B1D939CF22F742FA3F9DA218D69281D0BE850B1117455C13DBA690AED08A9A512BE0CC28A160CF80002A8FA868F8A299445FA + 25: 407780D19554DA490CCBFB98DC2D09693EA792409F1ECD4ADD32FFD9B586A6BDB14E1576BEED920F6CC65FD0A66144D2AF69210A8EC2D6C0EF3EAA032E972B30 + 26: 9D7B8DF3A65E5577A5E298B28F2FAF62FC535376C59C8956D3DF408CCB9C5AEEAB7E70E6B2709E91BB2FCEBAA4639DD0CE122E74F4741045E209EC68B7F27F71 + 27: AE8412C84CF6248D0B54A33B250D44D2F3451D1AEE5C04907BE12CBCCCBA0BA9D0A107F0746B6684064F3C01E300EC04AFF4EB5461FE3C0E92AFE83446AF2A2A + 28: 349F1D06656328D19B0CCFD438C7D49DA81755D504D01A8C5724080DFFB5564CD4E9A71715828138123678B4F237A49DC0494A40EC55450DC9879733C95BDBDE + 29: A47879EB68AC09C02362F5A4473ECDD87ECD87B78E916669F15157F752C2C6CCD902B2FFE9A15C7C9FED7B2C81D6DAB8F1FD8A135C8D952221EFD3E776D435DF + 30: DC20BFDE7180FCFFCFEF3B4B7842504C95D4C0F7DDE990A6489F961968D518C94404500F489B1B3CFA404973D5845DD956C18BEF2DE701F26C0CE8EB11AA408A + 31: ACD92AE66B7A42D4589CC33543C2FCB960D5804E37E456157A3C1BF99ABD2E077118B016529F1E68AD71B6A1A241E2FAA7D44BC9DB245B91E088B5FB1F824D5A + 32: ABC093135FAFEAAD1AF51E3C6BF2E5DE22BC81E7D4AC65712F0B09FD9771860816673E4738E280E6DF00F2F2B3490CDAE23036D3801FC2BA6B8CDF7FA59E3EC4 + 33: 969D35418093A58E650E19E9917A3DA6A427B8A91EB1826201A94EEB2F59A9C41E8798FE82633E32FAA2E700FA31647EC14EAEA42306255F6ABC8CDCF50F48C6 + 34: 434725B4FA11B833E5B0FBC922160E8B0459DC9F5DFD83523EA0D0B36DBBAC4D41D13C4875CAE177E4610E005582C6B18248B9F728BC3DB0B77847F7800CB451 + 35: 706186D7D5792137A90A0BFD3F550A7EA153FED6F925342738B01CC61067D43AE1F641E8979D08B0597FF54E98C01A46335723F17999E5A830CD3AA15E6126CE + 36: 3BD4387B31D794D1B66F1D47544B9F708C326DD6FC5C5D0067FD95193BF10F1E39E42EDAD18E5DAD57FCA8F074F2BEE681F6C42A98737D90C8651336D8AFF9B9 + 37: 071C211B122DB8CB871A56C9F02A7649A26FD13D007BD3FEB1F63AC2BB78AD39405E0C4A846C33863F4C28F0DEF5536AF15F0D411D1C6FC6A02468BB46CC25DA + 38: A9DCACFC97BE053FE0758CBCA3014A4476E75F223075C3A8E2DD594A5060344789962FA186F28508E6082CCE461AB1EF479DA6D5F45C38874AB9479AC86A04A9 + 39: FA5701F55087B657B470D02968DDF35229680B0B5A7B7D7873446F69C05F5BF0228163318E93A52F2245D1A5A523329C2BFB1D7D7B517DAD14995DB3F5F2C049 + 40: EAEA5865B5E17476734E0CB5B2DD9BEAAC3DF09C651D53524956D4655487D96D00A63AB7886DDBC9DBD9983D57BDBE640D5A7E71B8AB76683DB0D7072D1DDADC + 41: 83D543715F749A84C858F56644089C338BCDFEABC7A69AE810341352B9FBE2D5801AD2A28A1E12889FD8B999511B4C87BC0484C6A63E992AA83017ED72A88302 + 42: A58DF4A14438C048C31BAA80F2320F165BF4EA00D415B08387732F3C15E03C87F91E412A73973D2B9E9A49A4269C36315DF7F7C4E890957B75273B501B56F8D8 + 43: C063D19169D7606B2B48352E37EE591E79FCF010D4D3BE6018D2B1EA979166738625D0FEF7C5CF06DA11D1120C0F3B301BA91B514333BE3A28CB784358423800 + 44: ADDC3820BE7A1605E39092B7578D515AF482937C1C99117CCE7C733D622D9E22A37AF8E8BDD31AB9D23E00C4692FD2D3C7353CD162537E93A6EF37E4F70FB3F3 + 45: 72EDC8787B0C405D02F8C9DAE4ADB5DD624BA1FBF1D16F52B1F29602C0C4BCE5A5559BC8C35E98FB08FD73B595B0DBCD47F6C96B8E6EA397139E216D4BCA4545 + 46: 31FF422F0D8916CE0CB785647C4CE1129449F5E45F50D8982FF8FACC9B6801F6E058C9A143236B25E7038A2955CDD7E952C9EF68A14CCBE4DA2A9844C187F7C4 + 47: 1A06F699193CDDD7D196D8385FEC20EB4EAF2D75A78EDFE4ACEE7EF201058DBF1362670F9FF954E2548C9082D302C08EF3BBFA0FBA5F0F5003D9450F2028C380 + 48: 521010AE36C67DABFD13D932092814CBCC6FD33D7AF4685BC50904E298B9DBFA52C361E2ACB652B11DFED8A41FB78C526CAF691A37C73165FBDEE5231601E59D + 49: A98E15D413BD770699193D33DDDAB31F2B04C903FF856B6340F0E787F8302CD95D3A752A83E1E5F787CEC3E96118299CA539B3F146759872FD5BAF408A105317 + 50: 73A7DB7E1A345B59F94EADA1B291A1CE4AB02D11AFCF5405E9A59BD7247B45D44C587AEFD49E18179FDAF286F96ED392FAA20D099F5F25CFEFEAD4FD66129C7A + 51: 20E13570C79EE803735B030591DFA13CA41C4B20122327C60BDD9234B66FBB0243D99B1E752DE90F67845E22E677F11EDD15C01802A3EF493A613B951189395D + 52: EED9B5BF830F6B0CA03899009511FC52F6D254AC4374BADB1CF1D1164FFCECBD2AE3EC216B623E56ECE34FDAE922F4FFCA0E2AC64E6E85F3B99BA37FC0A93935 + 53: C20D60FBB86982D29019D36832E5804399E1A005467BAF13B40EA135C557DD51F4D9A065B1B4EE985578DE6498E5FF1C7E482253E66706781FCB4FE57F9FD79F + 54: 908D720BC0F0DC7F881CEDC67BC6D056E5578A5999048D734D9E9E0357B1011B83B6728BA3068206EEB19E8357DC356239813C15E70A25261FE18E185A2D40C4 + 55: 11DA786BF18C8357D2F9EE47AB193FB0DC39DD0B260F1A8FBA4FCA903A653AF6B4FC4AC143457B6BE5AFD7DF316AF22AF16C54483B9EA08DE45A7B122ECEA284 + 56: AD035577451C5B9EA43ED4AE6B52F09D3C84D3F639480462DEB3A9C89B4B313B10858BF02A6A00D5343D2CCF5270B936C471ECF391F1DEE3E9F64B706872E331 + 57: 6487F7F7DD92E17BB9932CB151FB7F048293287FFF0613A0481E6B6C46F5FA488C336CFF852B67D2C0DDA4DDA6CAC21D20C1B47D7DE87E9A51DE059939F939D3 + 58: D3473E01ECD565ACD20C2653E74436F791BE692CE8E15E14CA3E32F1795A5B22F074020175AF28B5DB8791E9A0EC4E2C3124EC5AADB248D4BE2E409A19AC1A65 + 59: 0153A44A6D62977FC08C3DC243EAAA4A81902A1EC58155D0FC7A6A918D9C8D8F349754FED4D0E2F963672740AEAF013C030F6B1FA4BDAFC6ADAF2BC27BA03E7C + 60: 460EDF7AD01EED909917D674FF7DBEFD065101A1A5691E94545BA08135F101DB2B0CAC6082363511D04A40776C4F9779195612E9D5A6A1C68C319D15CE35221A + 61: 077A82F24FC3647F3FC9566122B8CE4DBF0A358F903CC7B8167DA9D0C197339228E0FE566E999983548F47FFE8F51E9AC4D436FBFBDF16B6A02502A317EB5C0F + 62: 5060763DC1E321D3DF08E1E12063CE362D9A82BE4D81FC7F77E7AAAA00DD2133063F0D6F610F5BBA4220A721E5B6D86B159F9E7C8278EA3F4759CC41B71CB15B + 63: A30EC44AFD5A217FF44642F4380CB8BBED1C8B6C063D5C4040269F957511E41A6CCDF697A4EDF986A75EAEE04D09BA2CC725A842A3FD568C9F56FF63D488ED49 + 64: 76DF0FD1EE3F8783087D1FCB42DAF99A259047D2D5DEFD155289E81CAFFCB039FF7D6ADC105194EED7570668F2980AECB7AC2509EDC76BC837D529F782198213 + 65: 5E45B1D0E2C4E578E091A1DFCDCFD22D63351BF3BC5D1D221FAE54197F9C26517BC963650EE57A57721A7B9C429D4CEAE9CA6BA9FF3B700ECF34815313227E87 + 66: FA1EAA3FD0AE71E839BA8F88B79FFCF623AF786EFB1664F063632DDCC6C022510B33F0DA9380A4E99B25D32AD55C094CD019CFDDC333BF38528172B2CAD42872 + 67: 17E781B3DB6481DE63C1BABF42DE994F3080E9BE3D5B106EACCCEE9E777DD111F5140995BFB42EBB2DC9825BD8762604B2F44CF0D0A2B1CD523613718E785533 + 68: B9B0CEB5FBBF8700BC942EC9955E2A03D1936A263F0E5A34DA9C1343F8DA6C091E21CBA8F2B2C31F8D1E2B1113BDD4D9320D502C893B8FB207F4402FE4080AD8 + 69: 308DF238B129A559414D0C204B52F999CD3BF21630367B1B5FB0F555C1B4AE4202BD08B4B56BB5B003BFECEF98206DC4AF5BCDF968731E0C7649BDB3A8EE5172 + 70: 41CD3EA09D81E56FFF257379347FB3FB9C76FB73155C20786D7DB013FF52166387C50A46C9113A7EE639C6B3F0D89CB2EBC17414E84D62309DA2ABF2EEB85B45 + 71: B38598D56852345D06B9317CDFFFC0EB64D04C7AE38F50C6F772F6FE19171F8EF2201E0DD7B977F738FA92FD35D8DE210393A63052FE547C0BF1A2B9FB3A642E + 72: 4D94CAF6581C2CB75D0569975DA9D453DEB8FD8BB3A2B6113BE2B2678262153D138D9DDF4FC7B34C539DB8E6A205DA6749D43307C19258C7197908558A56C05C + 73: 651D19D053570235C7E5BC5D7C21C3565490D87025A22DF7A4FF24F4213E5E8A2490628670328D6C1E207687DFC8B38C05907D7270F0F6FB8103D61369812C6F + 74: E290455679285C240FD4572F0EF3034CBBE1BDB86C4C0FF97523FF2998F6CF67FBD0866752F12A8DF04CF14532B49556437056BD80C7670383C3E2741C5C0952 + 75: 8E70604A73AEFAE09D79D861F6DEDEBB55DF6DA62654CFA7275DA075A946B55DCB65122734DF8683DA5190AF2F68223B8C5C552259A53C128FBEADF51E91F069 + 76: BE89C425AABDF6A595E617947B26F5397734538B5C02D4CE4A674A7E42852E125FD805177DE636C347EE837F94724B03177B7275D4FE4EB5D42BE2566A3280F3 + 77: EBC825C4337A805A58CC1B666D0FE82DBB9E8C0D3FA28C57F931777DB649DBA1509B21A5537629AE063BEFA5EBBD26FEE0C3DABEFDFCD4BA1D391AF08C64417F + 78: 9397823EC26C6D72A606887CAF2A53F1EDC1EFE2BFF128B9A7004C4468EE95F3F2AD0FEDAD9ACEF8743560469E83BAF4FD5E00F891E30993C5F48D2C6969E313 + 79: A61871CDED4DEB4C74ED2781538458FF13F51F27D7E476BD9B66442BF592BBCBBB74DDEA121392B010CF35F247BD3218AED10F1A2E7EAF5B574BD6E5A8918B7F + 80: 799991C408F4F80E849D879DD89855BF1BD45263B58A5D94EB899F0AE3C8293B9EB2316B5C681BA85DB6A322354741EF3001904E23351C31E8AD0FDAC4C5778F + 81: CF7803A56DBA2A1FC0C031EB761B73DEE7B88EC885FE5DCF9B3EFCEE15D87D049D738AE5A1A8A064B4382E09B376570768BC93473AC5695737FE645694111D8F + 82: 7885B5D757583E32622F5AEAA8AF71B4BF45CA48764EE3DFF1389A69F5376814C0EEA34C58BDF221DE78A2579EAAF9E1067014EC6B0B54E32977F5EE003CE412 + 83: 7BF9F15306D499239FB665BB916DABA83BF123F497495D5D3E52B561CD4883700B59F0C7628579183C655E1794A148849754EFE2E41C34040B828D1BD2B38CB0 + 84: E912EB1A389F40F10BDA61345810EF3EDFBF563FD0F2C242F69F01D99DEBB5E65CAD858D83CE14D8B6FAC0219905A3D2923DCBEDA72FA64310BACC212BF05090 + 85: CED56C84245438276DAC269055623360DC642385D86CDBEF4C30C774FE176DF4F3E4B69C3A565E9D4A96ABE6CA17FFD015216F586C2E26F82FCC5FFE94A7EC9D + 86: 3447E02B9815968A5D1758F12269978A46CE0646639085C06F96C31E199D0266A0F145B30B490D43B2DD0B4149F07982C50265F7743BC24F03AF76B7A5983EF8 + 87: 96837746AD9C1A6F83F582DB6D8D2F6C23BA4C24EE4DBA36A07B00CFFEB1384C26D508D6B0DAC036BC66775F898ECD1DEE83759B733A6AAB9674B1D710BAB0BF + 88: 4E82BE79528840658E3A5372FE5D79D4E03AD9EBA12D9D38EBDA5005CF7AD04A0CB5D3C8E0FCE9EBE5EA15C758E7303107E116FE7B5144ADACD7691DF90A7EBC + 89: 6FBDF01B54D350B9DA4DEEE82E99006D59327CB7D6402DBFE9ED6CBB3AA937FD2A0B62BE9AFB2A1AA90C75D8B6DE3FD44CBD63A074BD75786C92F31AA56589C1 + 90: AB53D2FD8CC51A8EFE5D2AB8F201B0C1698157F86CC0A1C68D8CE48ABF9BF86DC1D9DC4EFB96FEC95830096B687DF86DE71C2E96E6D9683692AD5066194D5A48 + 91: 9CCA67CB98D216077B03D3EDEDD30F930EE03814D77AFAB4B6AF4F81C32779F01471C06DB24A21195CDAB34C34A68DEACBD887684CF4741709F08BDF3A66AA7C + 92: 59FD4F4C0086043358739E394F208D33E582CC5FA5B55340C8AA43FEE5EFA23629ADBD891E0385319492F9A7CEBFD11C1E3F9BEC44B6918F5CACF613235730A1 + 93: 7215240E23507E346D1D187F6ABF494A14E45396670DE22FD42E921CFF65B9669A9F4F3B3D55DEC694683A32F6204C2F1365348EEF7018796E808D5802FD268E + 94: A7DBEA28FAAF61BC0EC40483B38FF7C7342817AFF2F2D1B7C8ADEDA1E18FA8FCB1800BA6130C9A1D7365ACB0E9C3CE72FE93D92887D7BBBADAFA3C7F4CCAF6C6 + 95: E56A3A60F528AC752C7D32CDEC1A1F5DF2D5EBE1179CAF8B7C79676E43E7236145C9B9CEC126F5141F522C79BB4E749D33A57BC55520506BBD527800A50A5EDB + 96: 77F1262505D3AE47AC2E9C11884194744FE2A855F532BFD507A9B064C602E29ACFC0F943760E370B166E5E1291F02D20343559F3D7E6C1A8C7936F927DEF8A52 + 97: ED60B7711A77310121498DA56D76932EA6414ED0352F6DFD87648C0A5C98EA43C836F34C4154BC49A727A518D055745C2241FDDF4421E9607530C2C1D6CBE0DF + 98: 0DF724CED01A4A8F9C096D8ED0CD616BE03CAF7517C2B9434E414F257A0CC816F1853B3A9568468DB610224905E136825FDE83FF0F7BF475F1D60FF95032AFAC + 99: 281CC53B70A1D7CEF29E202C1E8A381ED4DFD1711EB0180DD2AF647809B77A9D8C48FD539D1E75617AF375FF9734D9030B0779931840BD053F50278F881EFAC6 +100: B92C99FFFEA9ADD8BFD019919B4FBFEA7460A99BABB6E41B48DD378DADF0473B7F0FDD3A8A5972935E5EB29992FD620E09BE090E104DA7A2FE0C3015E0828392 +101: E845187E29CC4D772443DEE9C0F3C79348325EB5F75857CA6356A261F4FB2C1BA49005C6E7AAC9CC1F4DB1A9BF629F4419FCA2252CFE23727BA57BBB31873864 +102: A1A3CCA0FE40FB5D9D057D2ED51C324AE138BF78A111480F3008D6FC62A9FD9C728BD050AF383D476F66F443C132303AEA589FCD6157203756E35C58694AF866 +103: 9EBA0C6229290209E18C97271FBC6C7BC3089E5C01B549BC2643395040A13A2045C2C0C3E08839DD8FEB20C3678DA10BCCA1410647401944F46EDE6AA40D1010 +104: 3A6E5344F8392145F25BFA6D0282F584AE80DDFCE76A5F5DF7E4EA743C64D74F35895D476282CF32E35AD3A40B431F09F38D3A80B45C8C33100CA98BC28962CB +105: 61211EAD2143949C4D667C5B2B6EEBCF0D4FC4F45F373D36E58CD307258A593975CF953BC268C64103824553F0B5539209B995E21C0BC17E776B28862C766F1D +106: 743631807E2629AACE87CC7E4AA1B340E97DF291EE47F5538FF968FFAF031E90B4066E1EBEDBECDBA101515C4514EB2A4638D6E393ADB740479E371E7234B3A1 +107: E13DAECB91144E05010B31216CA7A4D5775BCFE36079871F99E4E7DA641BE6496FC9DE05DAA459035298F76E931A5C3E380C02328ACAF1E3B4A637344643A20B +108: A24E27BB79F437C5652E6E063680E1E5A3257FA87DB6E8E778B9FB01C7667420043255DA5E8F7E96B3B14E55434F8F4CF918305512C1C6E3A3DDED2E69542D46 +109: 81F77DB64AC43580C9230A961CB1345B309A95ED5B424740F14D3407E3B553CF507520BF474062F5035E433BA40A22700F9F6C4C5BE1F101F5A45CB6AABF8EA6 +110: E9630884EF50E2DA61AF946307586F8E1F9738616EB01E54AC9392E440FE17E8D3E94633BBAE0870AC7908DD8D63637DA19B772960336277A7A0651C9130002B +111: EE1EA8A5904F484B788DECEEB8E13E525ABD21574279AB80AB196B1A419BE9A6134071E02AC515A09E80D9AACC0050A2254147E8A9D66FF9CF8A465902BADD33 +112: EC74AE25260DD8A3C9EDC3BCBF234E042FC694576838C40A7F12D650A6C519974B76E5B2E5F64E3CE51629C4AEF0EEB38EE0C634BF3DE12FDA8810B4E6F941E7 +113: 931B6F44FD03182E692F2A4FA4A3E1FC2E354E002FACE4C012DE2552508B5612F1480D29A36F4CAB2806B5E0C9C4DE7160BC6E257189DE795BDDDED964E21690 +114: FA1F621E61D8FBBAC7A821D1E345047CF58F54D06B0983CE3FB01418C50E5326257F5FC563EB50236EA5CE046359F751A9F002CF09AF8736D571610BAE0EC4F1 +115: 82EA8C6EDA51ECB1EDEF20828D61E5B26479DBE6EE9414BA97763058096352853E9E2312935EACA691088D36F234DFCF383DDC75C6C58025CDCCD3A3D1AD009C +116: 5DE671C1BFA41FACD8BFBF896D120DF259792BF4895EB963CFA30DC7109762655B0CD1843BEDC649C4F72A0E8149B21547FDE93E55860DF8E0C8F21D4F0B7EC5 +117: 581E8C5B8CC2A3BA81A14B20909830EDD24C7F48B3621931C201F4D080C58EC855BDDC6FA8355DE22938B536C78E77D434E03CE00B71C1C8FDD99903052D83DF +118: 7A815C74EA89BC9A49D18FF81C4ECC9A54813DB52906BF2AD103647C2F20D8F31FF28AE4A861DF56207FB2F3ED4E3148C27D617B09798175496C9E6968A239B1 +119: 8ADD3C5C93F6EA7B077B9831791461BA7CAD720E79E31E50723D47158761D013B185B89553579A7E7BBF38DDA482F9DEAFE67CC9F001BE90EA8466BD4A49E9CB +120: B9C76635525DDB96BC98F9B3BE26E37D3050ACF7E1ABA6F0CD46E72847B1946A8CDFC107A8A558962F7DE52B5ADDE261CC2DC3B410AF14A8A76DBB5436784CDE +121: 14A505A0AA73DB2255292C2C2EFDE974B134CACB3A5BBF7F37968FFDA6EF663182220DECB06980035A834C7F91D6A1E3DEB9BA60FEF04A131FFED11EF780F935 +122: BD2E42452ECC149FF1D7046CDA8EADF6ECF4C439A37B648B23FD533834FB3A763E3537ED8057A5B31EA5223FA3F3D60681527AF2CB1F80AB38C2F541E564AA32 +123: 570490B81BB43A320485B2E0D4394BDD58C0905F38CA8971E05FD0E414E63A300DA6A76EFB88A450C298BD626994368E20E90AE3F326A2CEA765BAC696EF02E1 +124: CA8FCE1DE2BEC3FA3954B81B52C90D0309BFF1D1C1BEEB3EB9DA72B30B7879EE3F2650038AB6F92080A56000B2D4413163878F5991B17D018DF01BEC206F5A5A +125: 32600E7F6B798E61530C18A8F680331E1AE0AFFF5E038EB31D0F9613DE3DCA5760553B3C839BD3A569816A13A6BCD87638954ABB8EC14263691FDAFBF96FEE17 +126: 8F0472A84F22A63A1C800AF6FBF4E85FCFCFF82CFF86703AE0EA0AB6B698C215A9B8D8077C78622BB66A2B308F26D9774C67BA5B22DF209322D901911713CF14 +127: CA743B61164E0011812AE0F06BD1182B1180DC49946D6778C40BD2923CF5185D22417891AB9375B87AE58AE5043BE60A4A26B0765393CB67380AE78B9BE48EE3 +128: B6A0E07F242E1645818515B0EED349400D01CC55744618A3ECD039F0AAACEE1EB952B60BBC4E5E652DA2069B2111823B719D4E99CF227BF9C792E38626D115CC +129: 43A7EEE316DA7919A83931C818C11EC083E361416AFA7E01D59729F6E9436408416AACEECC8AB703687F91794ABECEC86C7DFDE61A27B6BA64F72F5FF264CCFA +130: 4F98FC1891941C50961951CBB2569E3D9B3671CEF5AE4BC637C77A788376CB6D5801D42BF1BCC319170ACB5570927362B214157FE1CA9F20FB38DF2B9DB4730D +131: D11D5C742084336982563D6255E5F3D314D530EDAB9252D47B160F141E02843A973DC919DFBBE2EA4C28B72BB1DF9720CB4A8FBFD5B6F40F43E5EE91D7DB7275 +132: 3A28C283AF2BB4DDEA75E456769222253CCCEC64365AE0DC37033029198647306E598ABF2BBFD7E7C96338590681508062C439545D9E34CBF89291DEE8617268 +133: 7F2984DB3289C5EA0839FD394AEA241F15CF6ABAA1DF9A46F27A979F519CA5214A73FDF8ED5B3B3B4DD847EA99C5BD6593D42990F641365A209AC4E483989757 +134: 65FEBAF4BE31967634B3DF6C7F0577EE88299175B1A06727C6259DDA8F0DD8AE5372F12E73F429878AEAE55C4052A17909FF88B0814983F0444CDEB8FF2E17F0 +135: EE044EB2C8B74F3E5A0E45282B5001377163764A4939EB4A2D0B981A348202DFC4BADBFBC302C18022FDADBC095CB5D63AFBC630FCEF02C6E79AB045AE202AFE +136: AFFED6BA5C6CF9364C667163785C58DB1F6D3CA753FF3ADB109E769BDBC5CF207C6B0252FAFD08391B9E45513E2697EEA834FE784907D32A8250D2C555BC584F +137: A029E5EC734D594288D8A29BECE7BE5588C8E5F042BADA19A689AF3F4BE3BAF00FAB7C44FBDE00B7556A81458ED841E748996FC6D7254A5B711AC642BB94F346 +138: 5AAAF48A2C5036659F760955FAFCEDEC18C63217F3EAF65DA3089D84445B8876E8C1D13DB6B84516D519352649359CCBEAAC3DFD904B6E98A0A43E0BDD144451 +139: 564F2DA71E753F3C8A96AF4AB1CBE8A94FE4F0E0F929ED2A92B9C82C41F5953F7A00898A08D7605F1A12A5A315B1FEEC3BA20D817EE9DCA92AA06DEFA4592D34 +140: 2C6776D0136C670EA76F67C6AEC33A3FFCAC63AB0EC041CF4267E5EEE0F5B998432D6FBF4C88A2578B8F31BFBB4AB9CAB7384EB00F300D76984C66AC1A562F36 +141: D96D1796E76DD7A30B34BD93FD093A0F1093DA9A2B9F93C5039B3F53B30EFCA87600E94E9910EB4C925E90B77D647039FCA61EB97643A1DC1C15E19795093C8A +142: 61C012F71E8837B780B91E9E2D5358063D1C93658A6C1895DF5DE8CEC451C95E4E6ACA438677F22EB6BC9B03D1B0D566A852C1382C48F470F0897C5DB119962F +143: 6D420F1046965A2AD82C3F65754B7D688D4FBF14F1506276C3F0D5A6D0798E1C9B1579C7940E81D12C484B66CC7ACA8AA74D708796B3DD72262B54B44B271F8A +144: E201BA62FAFD13C7C1B38BE2F583DED1CDFD8DC53FA390402A9869E876F1E75A4A143AF67FF0521F0E559E0B38B798B76AD2AC6B2863CA3A5C2AA85CD392ED97 + HMAC-rmd128 0: E9BF401EB338AE9ECE9F2DE9CC104A5C 1: 9536B19B029E60F979B3A6B3052685BE @@ -1603,6 +3045,268 @@ 127: B107A8B0C7B68581969A0F6DB95DB2F790098F1D 128: AD090CC9A6B381C0B3D87035274FBC056012A4E6 +HMAC-rmd256 + 0: 59D94522E81F74D4C37E3C514CE2477617E7ED8CC7133305D285327765C89A0E + 1: 75980FB31DA5B955AB7EF6FAB481CED360AA322D71CDAA64179251A17CB0358E + 2: BFF0C3DA5DFBB29CC1313FAE9EE58C0E8FDD3E3A2EE3FB374CFFA9E498787CB5 + 3: E98081F243E53171F2C9562ADF1E53D1F322C8D76CC7086F90F9CE0AF9E319DA + 4: A60C1EF331862AAA1F47D6A6377696AAEF2828465D18019FC582B6110073FB0C + 5: 491B655A0FD121CD87F950AFCA83C3DED05DF39E747372E4B9C5271552D4DCA7 + 6: 7FA04715742FFE61A4ED085A21A1BA9A63E17D3E33E2D8006E6C4BF4D9BB9EC2 + 7: 6398A004C0F89F0A52D4180C49DD394B6BD37FBF3CB259DB5C450192DA639DBE + 8: 93BEBF56DAD2FF3ABF415541A809FF7DAC28040E4F656AC2B14298DC66ED04DF + 9: 676A915B47F3DB14B35F405940A11AC1CADE15CAE594A40F0F9A29E7C92AE9B5 + 10: 51C880C47FDE7D78D5523F950C2EE332C0CBE566C95A407222A3A01A982D13F5 + 11: 5593F9026A907782C798DFE13F7E573A2DB5DE41522A0475396CFC07DFC8EBD6 + 12: 38332F721A408B59D5B9A85637281A96FC0C7AE266393C09BAF5541955F47AAB + 13: 22BFC946B9671CEAD2C66C1C478067623119E300AAFD0E142D7DF0A259A617FE + 14: 24035649A8956EBA507AB486C1BBB1F1398D1D876EA2686ABA27BA547F7A4435 + 15: 5DDE881A48F95FB52D1FD5EE45ABF2B25B80891C4D036342DEF2122FC0746775 + 16: 6DD359B22FD77402923F8E92B1D2E9B119D8A894834CDC13DC966F45A906A0EF + 17: E2F50D31A720D286DEAA3E598051B205CFD623A80EBB4CB6042B8A610E9CCB5A + 18: C4E50900A180457BF1C6E75F414688480B634B52646527FAE04088883D7FFDD4 + 19: F1EFD15C461DBA0C4B417C7C09E4D56612917611684094BF5F61A945ECE5E0C0 + 20: 3CB5B196F02A9537BA5808FA7EB151596F0992741F637AFC28AA4B4AD2E52B7A + 21: 6BA6B2F421EA4192ABEB66C8A38354014431EA15D0BDD20F83DBC491E13539AC + 22: 922B2DF01EA6C2ACE9BA72E7FBE2AD77760F0DC33ACE013585D1FD5372BD0142 + 23: 04C6EA875E83A76BDE1A324C593CC17548B142051A8E266E55F6FFCB5D7B2ED9 + 24: 34CA6F4642FE68DEB9A3EB9A301F8CB401A486AAA5A0A1099664B60168DC805D + 25: 6176A9B45D37B3A4F919D4393CFAA20D289A011261D6B43A171D739248E6E4B8 + 26: 8A6DB176856A5F056CC519BCE162E0B64530BA97948FF91F364DF1F761372545 + 27: 8E3844CF5864EF0B8C417597EB761D5D9DEF6F1784AC88E6A52C4FFCC7A06DCB + 28: FBE4E41F7C1746FEADD678FD8C456116CC2FE7F41B24D8005E6699C99B8C95C6 + 29: 0FF3C4A9932270DC01A218B4D5EBE0EAC1189830CE0AAAC7FC1EF67C7E3725C1 + 30: 11B971796B7DCDD1F9E3D4641223B44F411C63288C1F85416D36632D0C25E792 + 31: 483736D5568DA459557B8384CC21C59FDAF4489F51E7A816F6E4ADC3D7331EA4 + 32: AA78DB7F399A3326F62A7AF0EC199A4CF1B6CE52B608FBBFC2584CABF8E46701 + 33: 15F3DCBDF7C97406C479D71FD2798C14C6892A1BA7B7C5EDD83D7CA52D14A4A3 + 34: 34E93739BCA8932A7CCB757C023ABE537F537449D278C8106746A737563CC4CA + 35: A9388CB84641DA774B18429786542D4DF82335832F942500260A51C2BB90D4EE + 36: 5E569935BAF5DB6C44092A5D4870DD9C69484510443683A5B590F7AD02D26F77 + 37: 3C55225603F73D1A135D2143286A239C38F94659D0E28A53DFB097E131298855 + 38: 4B7A827E471A17844360BD522CFD4455F47AF5CD63FE575DC1559E6E0C814D66 + 39: 00DA43B21187235560EE862252E2C7497E93192A51B430D2ED9F604D2905FE6D + 40: 509E9AA816CCB27C4754F90321A9E09F967BB93E8E4205616E7F972F7950FCBC + 41: 643DA409BAB43312B22B6A56D529B0C665DE4688565A3F01FE4157E060315645 + 42: 25FAA6FA3896C1BADEC9FDCA8FCCB33AFD9B9A8653CAC3C3F5135D5B5043FCC0 + 43: C6E25EE5372792571917815AA36D7FDE94DB57DBA3AB6876E1F887E33D298AFA + 44: AB3DDFD7E4EA3F200633AEE0B187AB99E8795B50077B589FE531D0CBCEBB33C6 + 45: 4B495DE93E9531F6EAD6BD4AE86BE1DCB0BE281297EC093D470FE0BE5EB26BF7 + 46: 3CF453F7D39D4AAF5B492117CCBAFE34226B377923A6E7634BCBE4DF9C0AEC38 + 47: 7C3DEF494B0BE7E4C5ACBC50AC970BD39757C0D4207767E89528BBA7F3CB69C4 + 48: A5976310EC943895C4A87C6EC1250F370470271A67980A9B604DD1FF6A7C4087 + 49: 21447E7DCF689F222AB2BC32D10791CFCA3A2F56FAD95270E68062F68DDB2864 + 50: 150B6DFF8E507BCF77057F8691AB415EABE640C3E3FDD1DD1E6C1E8C83ABC766 + 51: 1D39B1B97F6B39D084B0F0A6F6596D981BE9B6CAED9E0D49C288C99895953AAA + 52: 33343026C17653A14110FC9327CEE22BA1851D8DEDFEBA4DDECF776ABB275BB0 + 53: D1C7141769B2B1F5B822DA545AC3690E309E496C8DDAEB9263FC703F43A8CEC2 + 54: 296903ED4C460C34EF5AF4DC27BAFC3CE27E0B737DF3654ED1E2F55205AD54A5 + 55: DDEC62CCCAEC19389F4B06813E8079CBE26BDC17548D61EE6A3B066A929D3227 + 56: 2311552BEBC2A60BB449326AF743EEE659F4208459880E4070BBD9DB52C2DA27 + 57: 2CA872DC8158C404FB906F14082AD79F00B4C9344ABDDF214AE8819D3D66138A + 58: 9A722F58F6F78A51DACD98FD80E339CB31F80A2A52821F3BBE3EC99CD3DCB8D3 + 59: C37F6C6838DB764C27679C1A6F9CD95CB3A8527AEE7D7A92E7B5CEFF7F6AB0DD + 60: 553C9F658CBE292BDEC762F92E931F7B0E29EFEF2089A598B251BA9CACAA9DF0 + 61: EFC42E9A5DF177057708A364A996EA959211228B1E10C814960C5BAE25AC79CA + 62: 64B282D748E22535180011D1E18817073BF2735ABE2DB39DAE23DB1DF40F1900 + 63: 993222620F8ABE4B5285EE4B75F5F6970B9D1B5DCFE758A57650CAA413299D62 + 64: BA9A74F29B76CEA63D4535E5AF807B1D8A8FBD105B9A6D6ADD424193B0B033C2 + 65: 621EF37F2FCFE2AC7363224B28871D2F28431D1621353AB07E18DDE5EF482ED6 + 66: B2CF89D5896A1A754E2BFA2A313D2F2FEF4FA871D5424090108F5E2C92DCC489 + 67: F591B64DCE89C0E785EF9BC286D6D7C9D34EC413110DD6B7A7A55D6C9F11ABEE + 68: 5A5037CEE64C29FFCBE51C0F9A4F1A9B8F5BF3B96844F66FFC6E91EAC6ED4196 + 69: A5CD484B9FEB758550A2AD0606439A5497845A65D409EA6EB013581B7399B83C + 70: A467C992FE57B26E79B2797BBF1B8AF1B823967C78D34C4B87DC5B73635CFDB4 + 71: ACAFC2F7508FA9480740B82A1559EA9920C620E1F13885D7B20F4E0A07D24DA0 + 72: 542150A182052AD17AE6750A7F65A1CB30CC1CA0E2828B5AF578FC7D94176808 + 73: 2DBAEC413AD340511269F2E5D875AD94E416FE4F8E207E8CA9A9AF3A9B7CE37D + 74: A0A8C9BD72C37C79DDE4158812ECBE8C967A95DC24E90492C2F69311E93C224A + 75: 0A8A77A972DD2E6D4456478877E6B79C39EAB34D353C0CC61C28B2802B81767B + 76: B602FA82C2B8D5CD187CDB4F35979D2E5D62BA25F34ADEC877A647259C870DAF + 77: BD9C07ACEF9235F011E6A73B3A15778B3B94CCAC18D2656239588C666ACF9D49 + 78: 53BBC0CE653A0C9A1D0CC9050B04C7D9988E009BDE2A68DC7A4B463F09BBF7F6 + 79: 0AA89E39EE1F29F5AA38BED023DE510DDA2F647A166ABD42E4B457BB7C850A59 + 80: 66D14665A97D848892318A7353A931464731AABAF79BFABA31C7A376A377C259 + 81: BD5F75E35938B891C9E049DC8A24C8E20920AE8703C2D65541C67C469DB9CE31 + 82: DCD90C771CD1586F58A9C3B0CAE4031B1827CDBBF8F8BA1E6BF4428F60A8439B + 83: 3DA4EC80ED0DC078AA082332F9258638D80D806453ADE1E5065FFCCD929B5C0C + 84: B6601F93B52F406FEC2ABA78D67DBD464499D255DB3FAC26923E80916B633D33 + 85: E83A6830308DBB72FCBE0936409C6BF556937A3A19D45BDF1EA61F8E4FD88A28 + 86: C06C09A0C727566B81D8858A489F23386DB036E67383DAEDB4F07973779B8BF6 + 87: 973271C0A71C38D1059A2E67D8F01D88C3DA8857A130E8F8537CBA7FB123540E + 88: A394A56C69C8B02F18F62FE7B6D7771B14CDF962B871BBA164811519E11850DB + 89: 3EC44F2894C6170D0995AEBFC43D182F7C4F45A39EC9CE28FC8032DC3AAAA7C7 + 90: 186EAC056FABC2F88F2AD2152A30994DC3CAB6C90545CA662B7FF59F57E73EA8 + 91: 03B9DAA373AA3C9BEF969C64DD0A54A512AAE317385E956F8C14A078201F9C69 + 92: 46EEA803CD185BBFF9A621176EA362A89D9BA277B5845703FCA216A3D09F7CDA + 93: EA58A619E011F8FB240F7949B3BD72A4D74DDDDD39848A1F8721C7D7F72F77FE + 94: 3D21A5B4EE13A362D4191D7126D62290F516DDF8D5A0F10BD130BE19A0808F25 + 95: 4C7444891287880768F84925F262EA12A01C659B635ECFCA3FD91C6EE36E0838 + 96: 27EA80057F0101DEF3355C97864AC92449DECFCC49EB4082174106B91CFC027F + 97: 9268A7E69417810E40B589A92899FD38818C0A1C95C45FA211A3AF03F155C09A + 98: 1E48B801D8107593C2BF886EBDDD19EF03DA463C2C0BB3F517530B025115A710 + 99: DE025B408B848ABE14FEF508D2F9DA921B8E9168BADB3B09B104B2426BA2DD36 +100: 42854A2F179C5A23B8347210C027E87E2943438220A6EC50AED23848D5AB8B21 +101: 265527373FD4F600EA78CE9D7B4D11E5168B7A10D091D827495F0D58572D36D5 +102: 64DE6A36BBCB296C7D216F8D003E206B5A612AC919B4255DD2D63AE65EB7F024 +103: B3FBB1442BBE6178079BC275F7FA9805C52734B90901834EF98536F22F80926F +104: 92A8C765207FE0DCA22D251A7570642A28F0BD5502311352F6E9A9CA75BD2AC6 +105: EBB7E317B38BA41012B872342610FBC1EA6DB09409A46C64C61F3677A5B78F25 +106: B43AA7CDBD939977AB7C8FED49E40D9AAC21CEB98049F316CCC7DC04893B6199 +107: C07639CF7817F04B7728AF815E04BA0C331E79CDD7B292DE7C4AF1ADF90DC636 +108: 134AE721E2094F9E4FA953B53A680D61603CB9963C20930DA027D0AF0E4FAD9F +109: 128A649C96B60203F0EC2C3A996628702F776763CDB22877E7B0B907729AC848 +110: BBCE42FDCF9A8D8D04D1EF37CBE4F9042A5691F429FC6C39C2755D060009E2BE +111: 3AF2C22079E6E52FA0BDE3B80F57FB0D1550DEEB2AB369F5D02D8C432D8CCFFB +112: A84361A8796B82E8E2B30A2D933A45011090180C07D42BBCC9E72395EF7EB140 +113: 89C12CE213A67AD8661A720749A61550CB059B885D22CB4177663420624E4D71 +114: 2F22F53A1D44F6B867A7C6417525A914E05C50996F64542FFBF37D8AE4807E19 +115: DE5A4C424E20D3C318EDE55409E1C85464F8D7D003F9E35E5B7B5A768C79AE3D +116: 9E87ECD7C672F00B59FF568B8AA9FD56539E46EEDDE94436083AB6DEB83AA199 +117: E12433F1D81F60189C50FDCE7FD53D0C819DB533A5EADD0F1E1FD521E4BB3B42 +118: 4C7CDB3FB90E745D83FA08D726AA2F7E2E31B2A501C9E7BB47CA8163DA5FF74B +119: DAAE1C5FE8CAAC347D7B054D3D9F9EC7C4D454D5E119E014EB0298978385ABE8 +120: E4BCE53EB683B770AB162A3AD630E3A7A689DB1DD27AD3877C7994DE337FDD83 +121: 410EAEC6033749B341FDB60305174E7F462315AAC28FBE05EBEA2A2A03A34EA7 +122: 3AFF9691776D8C1CE721E03EB46A3DCDED894F3624CD992778DBB91F148E6E97 +123: E10A1376446F2906B28922CA87427246B6F04CF15F4700A13CF6C487E14875D7 +124: 72ED1CE89A1BC850EDB6CCFA7551B09CCD5707CB3C0DA787FEEC08DACF35EBF8 +125: 2F2BA57B7232266F6E673866EEDC6CA1D07BC00F20D0145D59D121508233ED90 +126: 051374EBC0F6BE3AC550E7B7EC8903972EA87762479A5C112D80BF0E3843AB9E +127: 75BEC020ABA76ECAB07C5B4A8BE94DA2A42958AAE79D3E2799CF1D748724AF3D +128: 774E9572A3D3C3F96BB90D2FB91941B34AEAEB5548AE9F6CE41A63EE8F0553B5 + +HMAC-rmd320 + 0: 6BB314BEC5001997F31DE90C60F79399239D990B45372225929B434D5B696EC48F6EC2C4735F372A + 1: 798E82821DBBFD7B34F53B8407C1330E7CA0CBB66C99CCD513E0DD5A08AA0D380D16A78ADB0271BF + 2: E4D7BC694B251914E631112D6CEA4B29271B83109D7E8DA8E03A92A49A9F055A017FD30EEE186FF4 + 3: 2D947F3147ED5A68480D0A565CCBFB1DA181B04B7FB3BFC8A74275D235BDD9A1BCB465CC54460D64 + 4: B79D315D272E933DB98666C192F860A20B8471D449A4745489EED72617163A1E8F727F56F876889A + 5: A417489F3F98D5D8A408B7789D2F8457110E0AB95358C27CD9C81D7774F31952F1B4BACB26F5374F + 6: 7BB776ED9A6022839A3037FB70741D9406B3C50ED0BA73F9E762561E398C67C6B45975B0DE85B5EC + 7: 7E375E18F2F29FE221B262D1E8A0726748CD1E199257186A896E0A7B1E0FFD75AE5357104A179088 + 8: 60BD273642B504D1F31E7C5C3A6D6ACA22C7ABAC992E51595588F116B87DB81331185195F34C99BB + 9: 4EDDD02A8CF75B93C07A1FA732AF3DE3027FEE6BDD8564A03222269AD2C2FA327FDF7D59D8AD5856 + 10: 1AE3C26098F28EC4D5A3440B35CA1A45A104606DF34B98D15E8BBF95A6BAEC4C9723292DE1EA5834 + 11: 589D63167C20AD3DEB5766F7EE04B164F23DDC49F7B4A2F1C9892CB50AABD7998F22A0002012B719 + 12: 8A465B4BA95E864304D58D9693156FCE2452FF5F51D13862FF73D021E42D49B86AAE2AAE4D767468 + 13: 93FDF311E9A19571F56C729C9927EB26426B2A5451F6992918A9D2089AD1F77E08140DAFB20A88BC + 14: 761DB9147A2B72C9EA422164DC50945CFBC32BF1A04901CA19FB5E2A5FA564CC3FAD559FC0E3FD03 + 15: F1DDE31A584036312AF2EDCC7D0D03D25884C4A2BF681D2CBEF82CE669F826DCA47DEBA37558B83C + 16: 39E5ECBA876455DAA4A3D40488F0AAF07AF70B17600E79070FF95E208CB4F951D33550461EB613F6 + 17: CA1A452109245FB116C6266FF690AC37DA25CD57CD0E2E75F1A8B5547781860FA7E73FFEF75DF136 + 18: 94A5EF723D68468030C880B61BDBC7255F69B507D0CDB6B2FB21BDEE95D6B7C0A957922875FBE848 + 19: E041DDB6B8AF59697C14AF917CDF6B58C22F056D09F975408714E279ED203533D027B3562FF038F5 + 20: DC76B8F8C10BC843BB72E2A81A13EC96B40AC4922B3E18EC6DA326D8B3B88D5363F14B8181296023 + 21: 81E86006B92EB73887118394828F35923E5BB8A56D78A90BA69A157B6C1CEFFDDB5D0AA37477520D + 22: 67F975C805364CC898C90A4B080D2A99CDBAB174E572900A1B16AE3B0D6371247C81A216F295803D + 23: 4B60A0A089776065C394553B0A656577E28C7C8A3B91CFBD8A77382FD6ED9878C1ACB44E8407DB1F + 24: D042070EEC507747301CC94F3946C20B06E2393E9E390B22A219618A916435F441010FA41DD928D7 + 25: 085C7DF0D8EF339C86362BA78D9E57BE4FDE0391075E4279271355E14E3001953D3A3514D551F269 + 26: FCC923DACCB76AEFB583A4DE84C494AF5116A39CC14ADC7355EC42AA4349928C906CD205F56DF3CB + 27: F544AA58C8216300BEFD81DD33B583082C10EB4E7C50DE319330359835BC0F25646CDB413D64A668 + 28: B90B4C339ED9C060BFDA64C34435E47B7C35F8DCB2F1B3330C40D7DFD10A01FF23E37DA2B995C7FE + 29: 085C91FE6DA876348A67857D87A28759262015BF4F5ABD44CF24FA1392F12D34DF61110317945D6A + 30: AB770E7FB347BAA164C66A2CE4D884554E23DDA0B51C75C7E1EB277AC0771757C7EA27EDC0D769F3 + 31: 2D0DA3F543CF787F01F52BCF02A534032E536444253F50B5553EC959D73E111B592E48628F9C255E + 32: 7FADB0E3D3053BDD762EDA1876471BC98E0E7CD50BB72F05FDFB5BE7D9703CE2909060159B4E48C2 + 33: 8BAAD87A1D5E786B57BC03B50F93ADD6C470BF113A4D6019E59AE9EC8CE0616F0D9C5145A3A2550E + 34: 885B843E252E320D55CCE929CA160DB74E5FE3221385CE6DAD3138648BBB2B593153468570675C2F + 35: 0D0592EADC5E67CCF74CC21C7277C1212DB2ACF02FB3A508C77E1A2DD58B77F195BDA70DC5E29DAB + 36: 4798AB6C9B0840B17B12E20F3212DC92655F365905A563B1027C6699A745D6E063491CB9D7F4A571 + 37: 20318E2FED8E7885005DAC59811AEECF1E1BDB2DBA9C14599903AA484C033C9E54EAFFE042E9C0FE + 38: B01B287BA0808277512D8FB2461AC19A9093C497543B58757946B0873C0C5FD2D144A3E70D9DA1D6 + 39: 267A806596127FD0175E96BF26704F07C220014AB64D430BB379B315B953CB46D5136D2E6D1F52E3 + 40: AB4230A4D10BDA68F3B66FD95B151367DD5D3CB2179FAD56B857BB16AFCAAE72FCAF0D5032A4656E + 41: 029490B3A1D5B12A9C500B30DFF6BE09A85F232681E9F90FAE22341FED751141D15427C428FF8B27 + 42: 1EED80F1774A580A4D5E3BED52FB8C0C8E5AD1E3EF242F0C4050AA10A269B010A4E48DD9CFE49099 + 43: F85C413166FAF8F0093DB7D3933A2292DE0F33BCFCD3A98EC32BD8E9DB53B0FC524603AAD42F0D64 + 44: 4A38A4345E6308ECB0151B09B53EC23E0759353AE0ACE5D64074F3C8230E712CDD2EE5DDCEC2BF6A + 45: 269621A01A6529C8907A8087D404A93511F41EA3B9FCC29B2009F2225F19A56345B54B2D75D534EB + 46: F1A6B2F6C73293AD7B96A34A9A05D0BB2A2B0CD00F35318AFA0CFCC0DEFEAA7991B250C153A8FA31 + 47: 7C70C8A59BE27854F6A10423DB923AEFB1ECAF1EC79C7A27DBE7D21D7A799B16E8518B457968F727 + 48: 78432BA93CE7919435DF8BBF67D38CA0B593958A78F9CC9D62251C21D7C887AF610D4F6C6CE184C0 + 49: 30879619A02379E089099887B60C62919A8466669B18669CA4C15DE6B2FCD86C26AC9AE81B46DD8F + 50: 79E029F4F43548FE2812B40EC820B8976BB4B8E28847B2BB6B4E7A8D2B1C88E3A8068071526C551B + 51: 171D1DB475617F58229CE6F1C47E3DA6089712EA53FCF083EC3FCBA5082CA4127FE5459311C791B4 + 52: 0BDE5B4882677F6A9FA7649FE011EBED390BBC3E97234A5584161D529388E624E7640F7CF58C9DC1 + 53: 06229FBC2766AF708181DE0EA6AFAED25FDFDC72569CB7B40A83FA7A762E24A4CC9A37CAD39A4BF3 + 54: 1D1ACA8D58D2AFA6AD8A255E8207318B72EDEF9A90CFB6AA6E26EB0265D3F26B6446DECA46BAFE1B + 55: 6D11997DBBBC11DE6911FAA890223D0E7A8C715405F39295A0E07E2E34327AF22950E20232DE1FC1 + 56: F8867E791006CEE84BDF1B8D2C2B697AA7065209D38B3F60011EA83A2F9C770F21EA57698059DF88 + 57: B06A67F93CB85A2D65FD549EECA5E13299B209E077CA5DBDA6E7D3027A4AC1DB58CE2EA131849C2C + 58: AB600BD8835C2F98C1AE73D52F2C188AA2F2BB33DAB1114843D414C202516287E7C3E023B7CC5CD9 + 59: E3117F1AF08AB8690D112D8C53A683CF8117D9ED594AEE69E54447D5DE852EFF0EF0D71C5BD22900 + 60: 424D992BAFDA125B094064336CE620F8F9C8154185580019A1B581E5187C1058B6A61A65F2FFDE92 + 61: 58BB0D6634024C18BFA08A45C5382E6151A26EECFC8D8B16A4440E32055E9249F5B2829D972A2C35 + 62: 219085E65E688663849B415B335BB7628B1EA4EB04AECEB41A9F09C59A5D1BB737BF1D899A9F7A7B + 63: 98D900253BB8EF2D886B5C71F5B2AE5229FB68818BF58FDFAF75191DD9942D15738EDDC975B4034A + 64: 7032D6661227095A6A7E6B5F1AC45675FB2F0347A8597A58B715C99CD2441E2857A32E1017C1C7D8 + 65: C6DE00BD52E2FE7DAEFAB1E3410556AAD23D5FB43C86105BD928C2FC68405EDC5AB2A74A17C9C32A + 66: C50B407AE3D9FABF9E185881B89F94638B067EFAECDDE349A5024217BF6A00B48AFFC85736CAC75C + 67: 9A4D2FEDC6F9BC6C322E2CDE21605CD9D8CCF1B87FE27B1361E1916EC443077B6DC751F2CF677682 + 68: 224A1604745BE2D9E451CF3A90831EBFC3167E8D581CBA8FFA37A3A65363FA8399D72974730EF213 + 69: 19E7D976BE38FE1A3A9842C0A453BCB79242A5E0CB7514BF23942606278993EA31C31D6EE422AD98 + 70: 8514F6461280FE7EBBE1ECCDF08CCC1238CF0A2F0D248987D52C9565FAB8DC359217DC27AAF33038 + 71: 73CAD4AC2B14B27F35F65876DEDDC68837743DE3D7DA16EE546D166EDFCAAF0CFAD4313A4ED3BE20 + 72: 4B394CA698A8BBA23C9058BE76E41B9EBBDC199B1F586A0C0D2823E954C1C0AD393B8175D1043987 + 73: A104492FAD9FEC60F46EC4CDB8A76548254F60EF8F527D642DF4C8FCD0657D593A2EA0D68B491929 + 74: 95DBD131492620169B931F3380CE81CA21B8B7A24FFDE14BEB138EF37E3E82682F7C43C28CE69FA8 + 75: 2118E9456D6FFB475BAB84A45A77E1146DCC29EAE15BE88D282A9FB6D8C0D276FB46145367F578C5 + 76: EF61D525B9F715071307E135259E5BA8E19ABF8BF7E7025BD2180B263E1BC9C805FDE5013BD04278 + 77: 98B374C8CB3EF9FAB79E5C1442B210AD11B294C7904E2A48CFC3B71065CE6124D8FAD2C6A59167B1 + 78: C4238927DFF50B42A232D5FCD5B6C3937F2DFB2172A5C8830CAED90F0F3F7A3E9AEC16BDF6250ABB + 79: 85116B15837AFF5C066124B962FDEE740271D5B78C13D7B26070920BBD6C6F86F8068F5751C376B5 + 80: 9C10D8274E4C24E39F755BD9A8932DA00FC07855ECA01A1443D915221C1ACCF669EF5B59030C32E0 + 81: 8DA2CC33EA181D2DC917AB2A83C91EF35748A8DFE4CC49813B79A57A1C3DB777E9FB544EE9A97F12 + 82: 3D97C075746C74D2EE5DFBDBBEFED73D5C0F45D533D41EA71014604D066F11543F3ADBBB0F5914BC + 83: 9CDDB4D0A43995EEEB7E3BE7C8F6B00F89CEBB82FD29684AC53588FF463DB62BB7B3364D43BC55A0 + 84: 8AD4FE46CFD443AC7CF50EE17B59EEB31356CC286E6FA58943884942B8C72A21F47DEF8DC6570B21 + 85: 7BF233C1100766FA2C2E4DFA60634720E48DF93D0A309CB91E2827EB375E2DE6714BBE6D5400B100 + 86: 6FC30072CE402DA07F48CBFB6666E4332CDE4E91A9D2703BEC137337E1BA573E3FD11C662F022A70 + 87: BBFB1B50F80FD8FF1F0AC361FC7D18F798D162B09538E8954EC5F976C2021757FC377534E83A96F3 + 88: 0CBA5096A62AFA90AABB8C96CE685E38A556BD3BA605E128B3A38CE4573F182B9C3687362EB9B624 + 89: E8899744EA6EBC9D4E7219CB44AFD8338773848129058DE95F0845C9A8A80B8B2FDC281B2415F492 + 90: 97CF03B2F452319AF31F703EAA3D35EC25C4AF324526ADCAAD9C2994B8EE53C710FF2526B34FA1E2 + 91: 3F471E6848B2D18A6BC714F18C28A306CB0AF5BD4CFE60CD02F59D9587F9127DB68170A11E1119D0 + 92: CB39FF820CBAE0A0B633FA81CC0D57E88AF717AC7C86D3908052E8BE9EDAA546661A88ED8DEB2EE7 + 93: B675B7B8E056F246FE9B8258CCB96C0BAFF1E6F4EEF43003EB6463FD027B9EBDB4875B56022ADB3A + 94: B94A823E0C2A1C4317F81239A5D8BD59BC995EF5D69AA1BF402BED31A7FDCA92F54C2F7BF43429E6 + 95: F066FFC74CFF306E79226BFE333B518745D93F770620BCFE0CDF901317810EDC70E112C7E88BD815 + 96: A9E94157D8D4761A70C5F6FD1D0455785A4A9A110F935765B8ACD2831177305B04556B17D12D01F3 + 97: EB5E300BE6D90DF92E0BC094202485AF4EB26CE0B8DB98D3044F76D47ED312454F20AE14FB68C12B + 98: F9C8B99A97F9987B64816CA6CC00203D186CAD4AC2C3661C114242BCDE403BB3F3E7A706515DFAB6 + 99: C9970011DFF67A72D5FF5E0F60218D2E98F35030DBE72D435FF1F9159C78C7544E07EFE655593854 +100: 17C3BA5BA65214182BBC95BB8D4E07D02EB7A37DF36DAE715EC6FB8D3D4690EC8BD02A7A57E8AB19 +101: A7227681F0D673E7126CD8253A7378002FA25E5392A9E24579F3767AB35D4C8831B9209142E6E776 +102: 8D28CF4BDF88665DD6BC35D7E9535341822298C1CC62E9733668B471CE5FF2ACFA19DB59D089AC43 +103: F8E1AAF0F8D39E35C8C84D89751D79296DBCCB7B3FCBA5CB56DB2392E9F10ABA6218BEE5A9F174FD +104: 4111B0C5067C81391C32E3E8BD91408A88C3C6C793B60688180ECAD3D7141C477BEE20D1E3D2EC90 +105: DBC4B2C5E17CA81888B674C7420955827A415C840FB23EE559A49667081555429C16FB5CCD86552F +106: EE4FC2FBC4F9C83E2C7E953B4A886EB5F8DEEBE999A9C2BACF2BDB06C667B9DD85AEBA24A6C8F0C4 +107: FE6E3C557695182C187DD32E72DCD9026E234C9DC4AD5839D586633B207F9D4B2C8547A48D93B929 +108: 51354C2EDB9BE21E6CC36740846D68E46E7E7C4F760A8F9AA05D5C4A949A87EF23D710E2BF3FA87A +109: 134A2795887A51348B9506790B97DC5670AAA2AD8F9A41AB6AB03CBE4C5BAEFFA4B643EDFD2E0181 +110: 6A31F6F9BEAEFEF32C5BDF790423699FCB7B2D819A24BE4FE3F54AD95F7A41F1FCB0B79AF0A5EBCA +111: 234236F8CD036E05CA2B6852350B819447E3F983F20879E94FFEF7AE6D28EFB984B67F6E0A4ED39E +112: F152513EA12A563C4076A2458F661A19945664852936C68FDC3385DD11141405581FF0C097C58023 +113: 7A81F710EA1DCAB08636B33CE8C8B960902F32CB278A142385D4BCAE50F636AEB24A83FE9DB13361 +114: DFC9843B0614466312DC05C5834A1A8EBA0C95A2525E780ABADFF7232BF283FB0B71DB29F6061E59 +115: 6C11CEA5DCD9CA78955B65F3382115922D0A43D4DE81BA38C3A57D652A7F94CD521E65585B19C147 +116: 58D2C0B7F570BB389C196895FB966B74CDBD52DA42F11D11003C2D37B44E188003A4EC5A43E53C1C +117: 46149B68DCC3BC2CCDF7793022EFDFA7AF4FDDC23EFC067201D04841E2A7B9B682B60C4E5884C706 +118: D41A6E7699735ECC2FC0024CE6B3A61B06451A8998238C7F9797BEA77D80C3A435D5F6F940DF08DB +119: 23E219B422EFF356426CD7B4D175F8FD3E52310C09949157F404FB62EB37A139CA1E074BE140ECBD +120: 490D9B7A0D2CA906A329559958538B1DBE8DA8BEF33F943F79C8F2ED79126918664268A7AD48B6E6 +121: 6AD73A16893954259ECA9913AC83B80DB1815B7037438C6D885321531B97C40AB6DACC25155FE05E +122: 2760B5EECD5D7E53366CF55E7F4A19BA06FE50BD2DD03B78D0160162C24916960615AC25918DC030 +123: C751EB15AFA4119BFE84FF425BD38108257DDCC50AAC93DBA73C4051D6243A50D02BE0F3B930422C +124: F6C5CDA89B7111614B439578B9650EA676DBC9C67AB5197998F195320AA6EAEA80C97DA35ACB79E4 +125: 9B63CC8479312BC44FBEF8B39A7B73B30E19303EC352488DB3ECED0EAE7A0E64D0E013DDEAB7D97F +126: 3C2FA4A747A64F5DE9461C04A30BF2C56145A90964C65B1F3B25AA6A360734291ACC10A4B20EC283 +127: 74519D4C3430C954CF68C916BE147CEF18B8AEB730BF6F9E01EC3E3254D20F37C01E8AA30A2242E1 +128: ED76E76F98E7BE04796DE0797E60C6E0659A274C7A9804358FE40804E2BC68D88E60ADC29D40592F + HMAC-whirlpool 0: 5C36BE24B458FD3713761955F28353E433B1B818C8EF90F5B7582E249ED0F8C7C518ECF713410885E3FA2B1987B5DEE0FBAC210A007DA0FE995717F8FEA98995 1: 30C66EA7CE95764F4CFCFBBE4C166E80A1F23E8C88D2DB7FAC118BCA9EE28299778610D94CD545C18C114A2A144F9E933CD80238E9F1AC737F7149BA232FB846 @@ -1734,6 +3438,1566 @@ 127: 1D8B2525E519A3FF8BDAAF31E80EE695F5914B78E7DAB801729B5D84C3A7A2B36A33803F5E0723981CF8A9586EC1BEABC58154EFD919AFF08935FBD756327AAB 128: 4AABF1C3F24C20FFAA61D6106E32EF1BB7CDEB607354BD4B6251893941730054244E198EECD4943C77082CC9B406A2E12271BCA455DF15D3613336615C36B22E +HMAC-blake2s-128 + 0: D9A6509D3D2811A6EA00396B532E2B04 + 1: F79B6C460ADB138E9A3078D30CF1CF41 + 2: D03AF0A5D31238C70BF2FF9932178EC2 + 3: FF4505DB5B00CE433974EBFBFA9C61F3 + 4: 0D746A6E87F39DB33368405D4C725C01 + 5: 4E9971E0DD79E62594064E7B8555288C + 6: ECFE8163755587A22EE56B5282358D79 + 7: 530A343749AF55CE7C6E21AE417B0B0A + 8: 6692708FCBC74B441F9ADBE2724438AD + 9: F9938A73391B5BE81FAB9D08917D536E + 10: 2F9C62131AA9FCA8EE9E6958A07E9AE6 + 11: 0B995D0EEA8E157BE7282CE0CF4B1A7A + 12: EADA065A4846CD66DC33A43035F3E125 + 13: DEBD58E85794350D2D29E28A548E6796 + 14: 1CD3F6862568B0B734871C2E161020FB + 15: 93AD9B9E2E48D9D58DE3588479CF20C1 + 16: 54FCE32A581D99F8AFEB9F87078F3037 + 17: 45D33CE2809663503A2C064F34FCD6C5 + 18: 642129A619B3E550394E5A95B5711158 + 19: 866ED5891E4C7FFF22D3FB3E55CBAB5F + 20: 91DDB23B639D178D58DB3DF6E995CC3D + 21: B503D9288A68CECB4166CE7BAEC03CB9 + 22: A936BC69C1A57B4FBB1CF832824DF2B9 + 23: 9C5CB33108D044572C40BD0F1F4063FB + 24: 7842BAD82BA10245E8CE9DB4BA05AF2D + 25: F5E149656E3FAF650452B2F61DBDC4F1 + 26: FE874FFC33088BB88DB4C6672B86C0FE + 27: 2CD8160DCF17084BA9C4F25A6908CE61 + 28: 4BA2EA1C10D004AAAD91324C6D088ACB + 29: 5474FE93522CC4A91037E1EC2A79CB9E + 30: A32A423D018B336AD461D45A4E25E403 + 31: 8C15330F714B2FAC8326CAB9BCF5E8B2 + 32: 52C43169125A66E41A673741D8CA9890 + 33: F74AA0F375061D11DF081DE41523753F + 34: 155F2BCF9D479F09C1B60A0CAE587B54 + 35: DB082767BC6DA25719D60B1DA4D8C82B + 36: 7DBC0D6181091DAC48E055638B766502 + 37: ABBF20F9E6A9D6A834AF1636C043393B + 38: 987B018335999FDC01C4545E1894B89C + 39: 5C2DCEEA6A6EF1F382C2436CDA5DB39A + 40: 300FE9F65DC929990F54492F00F8DA6A + 41: CC93C2599F152E82422A272EEC7B5363 + 42: 08710B279972CEA381D34994983620DA + 43: 72CFDEC6CFD987A9B6F3E350344CE619 + 44: 67B8FF6BD7C7B216E5C69FE5D2B4A955 + 45: B97D8DB2B5FE62306D78C2ECBCAB5FFD + 46: 97D29FBBBC0480DD21E6DCD8F76E729A + 47: 5448B03820B7B8C6B8B8558D3905FE4E + 48: 2F9C61A414B7AB3BFBB59D5C98062404 + 49: ADFAAA1CED2D0AAF10663A9C92168FF8 + 50: F04A37FD9663CFC7AA3AD27E641B1C7F + 51: BE05676DD21A5B29C1898D7D8E30B508 + 52: 0EC95105B257D094E83630F4D51ED8F7 + 53: D64ADE612C45364F4125E7FAE80A1E8F + 54: 893155E369AB94CA09732ECC2349603C + 55: F96FF508E46787820E7035E13A55876D + 56: 3387E19C2F26DB6159431F3390FAC491 + 57: 09FCFD1E0F9A282B6BA3A32EFCBB838B + 58: 95849C47F985C3B23637654EE42A3B15 + 59: B137865CFCF7505E21926C5AF8886AD6 + 60: 776F6F212B550961E8581F761E9AAB95 + 61: 1A2B49AC03F4FACD72BEA5D042EFB0AF + 62: FDE5B32633BF9F8F46BCA20377FDCEC2 + 63: 7D889B6E843B5FC92168F8C0571E0F28 + 64: 4C9BFB112352331A367D43E47D1584CC + 65: 95057CE969E8FE681BC1CBCF3F785870 + 66: 098339C9520F932DDA9FE62879637041 + 67: 876F5E05C1DDBB7BE6FEC34B41B07206 + 68: D4B502B77B416602F8C272DCA6F41F5D + 69: 3C15591D5644C185C7AFEE486583ACB6 + 70: EFC75F9FEE23778758483FA86E72B9B3 + 71: 6A4A75DCB183D833492ED7030F6BF99D + 72: 3E48F7484C176C406E78D29C5D48CE7E + 73: 04E67CB957B943BC0C20FEFB7E931201 + 74: 20AD75B9967D16771F6F6758BD48AF67 + 75: 90441BB7795A9D2E35ECACD53DBE7AFF + 76: 4A9417219786E65BD1A486C80B8A71CB + 77: 347DBA5AC5EA0D6F47C8BF91F3B878E7 + 78: 1B82F56FBC1C864F32C81A8D8A5C0BD6 + 79: 133321AFFB4F5B842A9BF8934F63FF4F + 80: 61DEBABD5788061B94FC2462A952F8F4 + 81: 555B2DF9BEEEF2EE96B90F46CEEA662C + 82: 02C1172F35B9E0F2914AC0336069A109 + 83: EE51CE9BC05E37F0F60159DF809C33F9 + 84: F3FCA58EFAC56340BB44A9679E4BE8EC + 85: DF97300079E2E0BD4D4A2508B202B55E + 86: 070E813FD6E2B36A23F21C4394C5D875 + 87: A16CB8D0EEB5C505B629565FBB32FE9A + 88: 06AAAABA7537BD2C85E31D65610F100B + 89: 283DDB4E8911B66C62F68989FBEC6802 + 90: D7416094ADB17FC6C33D3CEBD898C352 + 91: EBDB4E928266BF1C61DCE73370076FEA + 92: FFE60DCE45DE101B5251C912BC1B39CC + 93: 2C969B49F0CEEA3E63DCC917A1D649ED + 94: 0450FA648005EB1BB0B2AA361346A154 + 95: BE1BEFCE99A2C1F550F2308BAC66D932 + 96: 341A60C4D0A71B673B01F3BF87C7960B + 97: 17E2AFDA05A94BDFF080488B1C2B9F9B + 98: 23A6551851E4D71EC261A7CA132CEF06 + 99: 8B10BBDDC7B02DB662FE5493C4546E43 +100: 361CEAD587523282C13AE8C39DA1FDD7 +101: 68F5509C807278A39397F1A5F18FC97B +102: 36F9D2AC6FA67FDF0628BB6BF89C8028 +103: 28C042DB70B923CF5B2CBEADED4DB367 +104: 60CA4E8EE11CD597ECC8C07C223D384D +105: D9BB79B4907142546BD52AEBE3E1049E +106: 29E0BFF2E1883595EE198D5DCBF525D1 +107: 149ABA37AE99875E152E1BF4FF412E2F +108: 02390B64373CF88D274E939C355E8B20 +109: 34DF13EADA0F3B2C71CAA3FCAF086AA3 +110: 34B6FF7256A3B56B839A77672D8BB8A5 +111: 9F0EB9BA6E35208F4BCC2A3343ACB884 +112: E2367A2625BA78A6398315D1FCB56FE9 +113: AEBCE64E2B7D9647A1247EFE8C824496 +114: DBEB7E590480AE646D874D1D1F8F7F43 +115: 23C64273CBDB4CFB849A37DC8F975E53 +116: FC5BA814D687219021C32A850F1C0324 +117: 54475DF428B168985B858BBA5A322BB1 +118: 8C1AC0F39B9333BD5A5E3B4E966E0F58 +119: A2038AB9D9E3AFFE495FC944ECEEA4A6 +120: 1B7E712D61E86B625F82A5E770B01FD7 +121: C012695ACFD62E23F28BB6558FDFAC95 +122: 5AB61590EE427A2AA7A2361E44710BCE +123: 0DF020970F09FE19C86CD889FCC7BE88 +124: AFFFADC4A74B8CB6B4316C8222C07BB9 +125: 9FD53F054EF4B5AF3CAC470A510CB267 +126: FD217F750FA45E0B7D5C9C73454CE1A2 +127: 6DF8FB94D774E2A294FC9D6D3EFB4C8B +128: 1F73E062BD976C36CEACD5BD777B4E62 + +HMAC-blake2s-160 + 0: 13F3871F0D9CB982359D9C6E977871688BC2B15E + 1: 45BD7321877A211224FFDF26FE226E4C6B4F04E1 + 2: 2D9D50A09858649136D611F612EC1554FE52EC75 + 3: 431A1116DD8B4E788E13B1D2D5431ED054537FFA + 4: 472C89AF44BB957CB4B6C66AFA43BDD35B7DA029 + 5: 5C5E9B4C1506CA3394023D745F187B1857C8B96E + 6: 0FD11DE5FD818743D86F3B2663A3DAC2204FAF82 + 7: 4313DA2BE7D104331786FDEF496ED257BA0C18D8 + 8: 1B759614B1C5018FD6515797503E73CCC0AFDBF6 + 9: D8A3FC6BCD0D2D92CBB60A8493EAE480EBB54D75 + 10: 17884E85D98766DA6F70A3274B5D3F91AF424716 + 11: B38DDB510E744D029715B14FBC50F90BBCF9163C + 12: 15CDF174E9278E8FBDB1281FE25A653E6E8DF9FB + 13: DE5D5E0589683457EC47D4D8EC0A7C70F255C53C + 14: 220432AAFC2A9CE96E79E248D2134C8F7ABA268A + 15: 7CDC604CC967D9A7D3146C2ECFC3038710A614C6 + 16: BA34F85698412D54A544285C4E1487BFEC35644B + 17: 6DBCE7E42E0B721A33C46CE1E5ED20A9CCB8496C + 18: F8BE2E683773F2DFDFB6B0DCDCD00A304854A13E + 19: 6DF711C49955C45E89FFD62FF0007854936B602F + 20: 03E8EED5288F7EBF15E016C2190EBE8893544798 + 21: 0299CA8ED87A763F94819898AD719366DBE71477 + 22: 3154F3E94D5DA8E8503DAFE32F117D0D202F9917 + 23: A184481D1081DF8B79F3474BCFD45D47300FC06B + 24: 610BDF5276E71C5D6B50DF19236E33D93BBD2D1C + 25: 8B541603B954683BD30421969E04FAD9F70F8334 + 26: 225FF6D4C37F8F8B2D006D764972B11D850DE20B + 27: 2A0341A49812AEBC18E22E8BC67053E90C0BFC92 + 28: 3E1A346BCFDEEB2B406D8952B43B19E42D693F5B + 29: 69A55CBF75DD84C628327A44B029E920BF73F5E4 + 30: 0E802994CA8E45C9FDC89EE21F78B89C3E6D2123 + 31: 6AA819DE26733AA35EC8C0F697ED8870A47C777B + 32: 2FCF9BDD9E9C46F3B4C34A315C22C7E4189CFE0F + 33: 353DDAFBD05691C0BCBF99260ED8604FE84DC6D7 + 34: 44DF49D9B9727BDBD4573FE184D8A5216B359D21 + 35: FCF21A74F868919F8AA7B0C72F17D5C159071C56 + 36: 12479686B6F46C277C6705070BD1D32F8DAB67BC + 37: AD8B56B9547CC7AE42770D37A349306FF8594D2A + 38: 8D3107FC59D43C818DEFFFBCA70AB1E17565BC30 + 39: 2458744B470CB3BB73EB0A966288462A87A75BD2 + 40: 6D94FFC6446FC1D2862A1AC089B010AB16AA9884 + 41: 198D66A09D7B4794FCE770CC622EE104FE237B3D + 42: B26EB75B76AAB6BD3C95ACE957EA77BB18A64DD9 + 43: 0E0761261FBA216C90F23425BB0297D577E1FEF8 + 44: 7CDF4EA63F6995EE7767BC4A643BEB80B21F3F81 + 45: F6C45B24451512BAD9B3A950A068BEA2F4085D09 + 46: 5793A84D61C180D4C4A8BB1505786EA7547379DF + 47: 10FD9FD1B2A2FA69B0BC48D22E80061BEB939392 + 48: A5EED67A0FB6645CD4F9E60E47EC4F32006FF294 + 49: BDB6F95279A63916B1D2F265544AA46E2582E87C + 50: F9ED46687EA2A5F314378835950865204AB97B83 + 51: 8309367D55BBDF584688B296AC823175B2DE00D3 + 52: D624E2F09BF9E49548BDCA56B6CD5AA36B4FD82D + 53: CAF70D309CDC3849BED6D2E1D0BE85D6F075CF9F + 54: C444C9241B3EC18464C9C120995B557FCE322CA3 + 55: 181A25606A0FEE681E5F8173F0BC11449CE2DD00 + 56: 55B5D5F5565D1CB029FB5E2071A523E106523D7E + 57: E67FFF4F7976FCC844AA52CFA8802F6DCFC8818C + 58: CB4E986F509B3BC5D771F0AE6CB2ABD3B9073FB1 + 59: 1D3419C2DF81BC6EF958E03786BE4C08A8945C09 + 60: CA787B50AE2CF4F7E1386D718B0F79E10C1455CE + 61: 5E1639DBF4EE1453D92C62339891AE53D54BFE70 + 62: A6BE68706BAEB0496C1D8F5455064DF3832EF7EC + 63: CF31170D3A3E21013FD2ECEBA82B95B8D6C68BF3 + 64: 32C0B83FD0ECC9F9DA771E03D18C36804943862D + 65: 2C5F427C54D2112430ABA277BB204FA74BF410A5 + 66: 32122F82FEA075A354DFD69A692053F4DCC53A3E + 67: 9F2D35F1A4CF26A9FD54EDF6E623DF9A2B01A276 + 68: 9D0DCCA8B4E85C6FCC5F70BFBB3F900B6A5145E8 + 69: B2F33A492AB22CFB7BA8B2A903569C432C1C3211 + 70: 96417071EE4AF48C70C8F8BFF466F573B0152A83 + 71: 24E31AD9DEBDE1F615A625C029F74A65B441B8F0 + 72: 66B01AC99DE64EF441048FF3F8FE6798EFC09420 + 73: 890E31D986B987495D535C186FC8AF5D9BAE5356 + 74: 1989FA5828C28150294C057F51DDF6C20985F6DF + 75: 95E1227E21BC69CE3EE9BBBD0CDD4C0BC5DCF853 + 76: 9050C21DCCFAB8E6107C2710A43E19B0243F14A6 + 77: 42ED194DFA1F029169FEDB5F6A39D297881F308D + 78: BDD8E2C229A618BACBB7EB00AB0B864382F9D013 + 79: 8D28748367A93D8B70F3CDF43605095114D0A6D1 + 80: 47404E643AC3A58615017B93A415FC888BC386E1 + 81: F547D5C21279FD77C477445A8C3BBF9111B124C4 + 82: 38E5AC1244F786D9A0537C0CA15C5D24F1162DA4 + 83: 27CB8F3CB3203D5494D97ACE99C3F9BEF1DB1461 + 84: 74E3ED28A84FA9832CC21E1C91C5D55F4FEB4763 + 85: 4CC6263C2374DD2A169A52A087C9465F32C93F42 + 86: EA7CFCC877A793D7298A0A37BBCC7EBD16830D48 + 87: D9283B0A1125042728347496AECF3AC57D5457F5 + 88: 00CFEB2968E55D43F9929D7BEF8F4B376351481A + 89: 8BF5DF0E161B65E7C820D6895245CF9777A0874E + 90: 617E10AEC765B114D315005EA0701A9EFFAC1D4E + 91: D2D3857C808897D2571C0DF9B49F533EE01A1F7A + 92: D98B3217C162160ADFAAD4C804EEA894C6C07A71 + 93: E01D6CF694DA97F9900738001949A5CA7009F74C + 94: 1926C8288F6EA0D5BA42E9D1BA35AED6EE53C1EA + 95: 66FD124F7BE58F3F423795EEC14BA840E4ADA226 + 96: DDD3BB5C542D29983AEFC9EB50EEA092E7F81D82 + 97: CDA58BBB569BC8D0DCC78DA3A94C23AED30925C1 + 98: FFE43B5314FAF5049A9316271F25CD4D559341F5 + 99: D752D4BA2CC1E5509D1A778D5C8B695A24F15242 +100: 3BD42DBB774E91983B59892CF9F1D8DB9CA49017 +101: 63040AFF4F6258E5B37A567DE56E0E900F9C1BA4 +102: E4E6A8CFB1FFBA2CC875C316FF31427108A22E53 +103: 6254A2D74CD029F6E0E5AA5420D979F979A0CBF0 +104: 326287DC568844E00CAF2E2443CA01C5A466B725 +105: 67D4982DE0B34D9E507E9BC3A89DEEFDDC06B676 +106: 5FD61FBB0AFF30DBD6DF1CAD3913DDDA7D040AED +107: 795CAFB0CCD44A0BAB188226CFCC9EF6FEC2BE4D +108: BE677F528276571CA00E82ED116ADD504BEB3CE0 +109: CBF1FBC02ED8FECA99D0D86F245F23B3F5A3AB45 +110: 2C5E356A47417DBECA2BEF23B17B05918711989C +111: 0D2D96A78A64740C4CFFEC632A018A270FCA88B2 +112: 77261CFDEA5AF0451F08C5096385FD425312B294 +113: 0C9D743B956F5711B156DE7936BC39460BE60F24 +114: 45B1444EF8899FF57C57874F0886E2D065144DE6 +115: 2E807E3D0F571F4A0D16E44DCBB3F916B78104E2 +116: EC9E3D0929AE03F116D3B328F1987E60A2A33487 +117: 924BF678E1586A719153E534821F91D301D4DCC0 +118: 5408020E4D0269543144B383C66EAF9AE542FB03 +119: 2C54AF352A4CDABD85E1317D2715D2DF1620D51F +120: 6DF7964DD06CC04AC27B92ED0C0359BBAAEDC203 +121: DF3D341855D2A06FF878A77F65D021FE425E3382 +122: A5022518C6145D5F749C09D869C46999302F6DBD +123: 0D94E7B2C49CE48C0E7DD92F3BCD98885D70E386 +124: 7E2CBB2929F1863B67C4EFCD92BD7772DF674812 +125: EA87DB318C7B965C6B5AF8D554A9138EBB06BE24 +126: 668530500F952A0FC14D6B01E174ECA3D1E02C23 +127: 83ACDD54FA0CEE4F748DF552F8B23D0ADE1C5A82 +128: BC6F09510B16CBD54F5BBE43368244806E1DBC7C + +HMAC-blake2s-224 + 0: E159B76803B9082D1EE0EA6076E364CAAB41416AE670CE4BD5DC2FD5 + 1: 20E48E9BE3B788B443CD264409A004216DAC3F993748798079A71801 + 2: D9517495324F2DDF138573659E1E90C72051D5F7D1F566D057F58B0E + 3: 2A74016D8C02B9D1A8832A28F33162379680642F976B1D4AFE21CC6A + 4: 3F97704DCE5C28B91532AD38E4E5D31C865B8DFF2593163784F32841 + 5: D89FDB81CF226C37347E934FF55F8D659DF5479E74504EAF70506C34 + 6: A033764DAEE71BDE3E1B0D8AB3CB02EB5B5F367F025B73A56CDDAFEE + 7: E33B119FD8A73153EB4F9307C77685BE4045EF648D7820A8AE5685FC + 8: 4A493F11945339BE6358C78C2D991824BD1236BA7B2F22E97DB42D09 + 9: 5868C49313029648169041FA48C3163CCB9CE1BE6F52A64982BB553C + 10: BA1935A2582D3872106A5CC405C9DACFED33B1491F99ED3CFA19ABC6 + 11: 7B63271FC7071598349967C0DB69F270A4C5432997BFA5D0E7FC0E5D + 12: C05D09455FBBCFDF863653624CCBDF0DCE8DCC778C0F8D1555493EA2 + 13: 037D0A46B07AE8B8432AB0FD1285D6D2F97C218C8FDF5E604362C351 + 14: 22C72A472AF33D2C085F6EC9C1D7298A51B58562F348ABBB3EC09002 + 15: F728FD2C29A3B6535BA745E8215342298413E182B513EF76FFFB1902 + 16: 6718028861CA19236FCD4527B23EE27E7F6F4DADCD310F054CD09E87 + 17: A7999E45B997697005521E2ED6F3FC0B99E4204077A3931BC3D65301 + 18: D73FEA06275E1C2FC5E51434CB26EB0482CDFF08707C2A845A1F800D + 19: 79ED0DED96891FF6392AACBD9AC93A7673825B34364DD4F554144EB5 + 20: 4B676CDA46340E50F289DE37DE0E7D52722FCD08262B20B825E1C04F + 21: 0703C8269084531A722F71F807BC0EA810B8E03E9A642934A0F789F8 + 22: D2F1F83BAFAA05D0CB82E5E7F09A0F048FF9718F90256E20B058E1FC + 23: 45E4DCCE998C78934ABF36B18E26F90072781AEF5B6DF4AECE64FFCC + 24: B6477AFE98E6894CC3724FCFDD1E63FF586F6E1C063086EA7C2D698D + 25: 383A90915A864B37FDC8F64EAC4707926E202910E00345C3DB842A00 + 26: 5D428CBC8BF57A747917A365D7A3B5A3D4BC338870B3D654DF53A30F + 27: 3CEDF4101DA588D887CCAA4FE82122A650DA8CD82CD1678864620E47 + 28: 7B89C1F194AF6C8454D9B25143116014330606ADE3A3FECE960339E8 + 29: A7F40B968707F814F5329BAD52245A833AE1A72AE941B84C814F982C + 30: 0EEBC427F65A41852A42A632EBA73CA53DFE8EA95371A190E75D25B1 + 31: C78B7F0EA77A00D174C7181036748EFF7361250D671FDBF77C9EA761 + 32: E80067ED5A5925884E5DC7D2B47AA38847530537761E953623A1F997 + 33: C8E7BE0F691DB2CD44189A20005A160CFA744825A54E6A528110E2D4 + 34: 9DDCE1AC38B64D911C0FCBFD4715BB77AF5225617A8CFFE9101E7B7B + 35: E984EAE61CFC72946D2F38B894C87B5AECF939387C64022EB06CFFB9 + 36: 9BDFCD633185BC5F58AAB28E200C5B3F58A9E5D3357113A61E5F0F38 + 37: 980D355164A35C4C7D863D9A81EA053DF327C83375FCF21B9B5E1108 + 38: 5F0E7CBEB83A12F0493491A444A29F0B7C74500D8E17E2000B852298 + 39: 2CF803E0BBDD31A55B1BB1C449C507A2B43F56E3950B0F72F909B666 + 40: 1531DD3C6B0320A16291EE79DD6DB42ACAEFA1D54AA1B0B5E011BE71 + 41: AEB0016B0C2A8DCCE0C74B8794C2FF578966139920700EB921A75315 + 42: 8F93BF8DBF1411D4EFD4C2489DB975D4604F1801A5AACCFD55FC26ED + 43: 085B7720050058BB86FBD6A301C3654993791AC8ADA2EA773DCF7A7E + 44: 8712014F67738E3B9D8E2417B793076BDBD418CF34C674244A84FA6D + 45: 357F78A327A2D207AF16A868A84C595B11B51D02FE604F9F32407362 + 46: 8EE37BDBD1703D8A5EF22562E0384A204B89CD81E80946DD483F276E + 47: B1DDF7E03D60D2DA4DC5BDA1607C6A112C88779DB84128B80DA34ACC + 48: D318FB0A0196A20B99B012CE1D5E5554D426178DF81087531A8CBC68 + 49: 6263D8968CB45E33D327929A29ED404C7ABBCD11D860AE9B57E44E24 + 50: 69D9C85B4F8BFD68D9823E0B0E862D09668B0F99204944A98BC2C8BF + 51: D43E655C0DACF1C8FF7A00C7C5FA26234BEF45F2BA2378757BB9FFD3 + 52: AC39886893C7433953682793127364FA8D0C65C6531C343B91915DFD + 53: 94E7B5DCC1EB3DB23776D20C894803A51E5DA837C29BBAFC2DB7F127 + 54: B98E665D9703C394E46725B3D557A59C7FFEA4098C8BEC9B9D98C0CB + 55: 414FAAF92795DCBE7B4537296FB891422952E3E1B14CE6E1A6D3C2E4 + 56: 8FE87554FEFEA050E6E49D50D13CBD18B37B1729326962BDCDBA2EE8 + 57: E9D2BB16779A81D445C97F38B64CA363DEE0858D285015E4282B5F8C + 58: 538283E0B06AE7EBAC01541BABF4AD1C8409647893C73312D5BB4133 + 59: 5727EA1EFEA020A7E9AAF26D0EA8B16FA71EA58732E16AE592E5B204 + 60: C62949534E0272DCDEAFE82001AF1D88CE8FDF8F85A6C47FC65F3B74 + 61: 8F6F09CD73B1791829413D6493749B7C83920DA0B58FD6D4043DB4D5 + 62: 4C7AF80CC670F8419C609FFFA8CF483E1245F248BC032CF63EF24DDB + 63: 66CC1E00C4E08B9E451EB5E2953C668746D5803604D7D3A7D8F33D4E + 64: D0DB0A43354F5690B543393347E5ED07CB92AD674E81A41F9D4986CF + 65: 15268F39426D908D8CBC137E635D9FA8520DB3B8C2198D81DC12248F + 66: 3F9451F5B86B5A92014579538A8C5D6FCD141D9E9D7E164816D86132 + 67: 9F5C754F844532FB8EBB7B2B42B18F8A8D42A2FC202539C8C0B07BC9 + 68: ED84024F1431C0638BF483A88E18018676F2A3026FF1B04532E0DF81 + 69: 0CBA1F3EEB60BCE64F68425914D95C596F53F98BFD0AC9922B486C79 + 70: 52E1226DE12E3CCF06A3DBFA4E4A73483425FE58D8A8FF0C219C670F + 71: F81CA60FA66A5141718FBE0655BEB8B6BAE82519462A700B8E89D313 + 72: 2363D70502A9AD10CA559E69616F36DCA94E3699681471DFD43937CB + 73: 066E85EE1FC687364B5CC8B06E1FCB1DFA081F15C832483C4E173195 + 74: 9F6A853D85ECF3798A7D7AB7CC7AA2C67DDCA2281041B58E2E19DB57 + 75: 00FB321AC5A37AB44010B11FC26008C4189D1DD628FEF47B4B91A059 + 76: 3E10854699C685F6CEADEB3FA00B811C72D9A354930487FCFBBCAD92 + 77: E9A1EA97563B106093C5E1FDF52535A0FEAFB5CC641D7F1820A7F07B + 78: EC08202707E6B2538FA9AD7A29CD473B90F3BA039E96957B5AFB5824 + 79: 34DEDB11038A874291CA6F5C5304BA957B3435DAC69641CFB7CC941C + 80: D5C33BD6B1E40891B50C6D68BFA531FA02AF781AC2E32B39C36804AB + 81: 107B1DD009BF49268C93EE41E755A4CC5F0D6C5154C806CF0FC7D2E2 + 82: 47C80D97FBF6980D189A19F2A2F5EA69BC3A83C35C625894E8A7256D + 83: 0A2278622C518159F0AEFF8EE396C7501CD7BD475FC2F5A36BFD8A30 + 84: 7783B6A5BE2F808D2B5305880F82B63E22F5A7D44D30ABF93AC5B69D + 85: 5E98037E7CA8E0734899B42FBE757BB678F5734F174DCDC89DF4C074 + 86: B50F43E0378667370FFC7B7399692FA3EDBE63B5857883D7605A6C58 + 87: 09F24F3343A161DC5CBFB97DFE6041437A96E0C6232BF6559019B4B7 + 88: 814DE5F235CB237F92DA4362FE5828A44CF5C6F6496432BD47D73C12 + 89: 7A67C5000C65582EDB7DB43C201EA60125FA4FE26A9C5B32DB180FA2 + 90: 9E4618777DAC670BE99DBFECC5FA2C8772935BC5AC85BC048D1E1157 + 91: 8136C3E222E66017ECC63F3A4CD02CC59BEF5D090BD7C15F9DD0A0DF + 92: 99E3D6F7F5F7A8A464B18B8C150CC0676BAAD90671C8385BDF565CB9 + 93: 88D1D864A9742D5EAB92941711412A846154B63A9F39398BE3579117 + 94: 1AC73C137447509A568F38418649CC4FDBE17DAB3C8EC211EE2EA66D + 95: 7C4732A0233A824C14C8824344C4D48BBE25DF760276E4297419E246 + 96: 3AD94BA3AE1687AC841994D7F256C5323F8472F866C73E3BA7996439 + 97: E2D1ED6A5CA2417953B93B4382053C8565CEE9587E225F981EA578B8 + 98: CFCFE1AF2BD7F04F71D8A3E693D99CD6A8AA6672E7219C43937571CD + 99: 0ED5F3CF3C8BB43A1092B88ED5DF2D6E6F205900C7A58D1DB12255E3 +100: 6874E421B75321F9557AD33321C953FB347752FAB4248948F6968FF5 +101: 89F6846EBFFF7ED93331EEF430CA76B8BA07B2C45A8800BC4FCE0CD8 +102: 26EDB14A61CF9CC8CB47B52132E8EBB9F6F74659B837D1CA2CDC69EF +103: AEF05C596B9DC0D5B4DE5EB1C5B4E0D1CA7F2AA7263A15ECBEB8F21B +104: 8F9C483F86B936DCC362F7D2355D1B9D7FC871A94D0AA600E1C0E7A0 +105: A6F87051E521EF4508A257D4F8A1234067C2793B81ED6B12C9A78E6C +106: 2F14EC6CE17DEF3303E4AF12402CB993DB6F744C98496C8DFD314739 +107: 47534461C68F5845ED81B321D01C3AF799B90685AF1CBEEE94FE21FB +108: 47E9F55B20DF65269B8518F2FF3E86A64F6218EB6D4B5D4E31286BE6 +109: 710A584F1F5C90F87476EACC55E5B3A69D98CFD99411DDDE9A920D93 +110: 04232108D28C257C3B7CBEBD89D0217A5B9493C6C55D98389B1B25E5 +111: 52C8204FE1858787F42C06A88366310DA1581E4EA8B37C6072C4453A +112: 9DBD83A2D053C9AA450C71BC1F6F14D5D19A43665269FE074FED27F8 +113: 31E2DFECB3A2898DF67AB5BCDA7882C6FEE1007B433139D2C8BFAFD5 +114: 72CE843B10640D421D75B68FC142BAF968B016BAA63469AE07358FD1 +115: AD5F0911A6B64C5474264A448F3F8FA38D368859A1BC130AF1E1FE69 +116: B0A85CF422723A819C7C79EA504AA9FC5EC181833CAB5F28CBFC1934 +117: C6B7143FC9463E927D2DFDC84EA04FEABCCBB687A9773C71C3D05BD4 +118: 1D2348211ACEF40B47418D01B56E4C2628D0C37A2ED12D449606E901 +119: 39595A28C162B245FCD5C67B4680FCFFF2A94328E226D1D94F338EF1 +120: 7D7F67564EC1E1C7CA7A700868B5E6924C7E0B2602616D98661D831A +121: 6BFD3795DDBEC718FB494F82EBDBDFABA96D03F95A6BD314D8BD6B83 +122: 2EB81E4366A2AB7D8A45B40F18B0379E9F88C40A921A26982D3EB005 +123: 33C2EB7848A12A83AA6E481B304B87C481A7C67C783A46E727DDFE51 +124: 0E2A18CE135A59AAEBC4A0005C297ED95AF8CB4D5A45CB24DC4E306A +125: 5538F4C2AB53987351F6B1368CE067E0DF71680D127C46EE5932B78F +126: E2072202C04D503488F8409C74BBE058766104CA8489C75555AE6B1C +127: 8E6149B225A64643FDCBD6E6D23836B422E7DED4998D38FC1FD199A3 +128: 1413ED73BEBF067429D7DA342B26E249BE9298E2A401FE18384C93D6 + +HMAC-blake2s-256 + 0: E2641D24DFA8DD89E8CB77F1CDC77D8C006E5BEBDFC4D6A3A3A6F8D5B7586FB0 + 1: 6FB4EF46D33615E0186611FE54E26F1AC9165C0BDD779CC9B607D5851B3436BC + 2: ADD5D8CA3B6722D6141B268F36E823D10B3528DEAF34037E59257D8375BA8D36 + 3: 0AFB3DD812202A50D5CAA79B11F4FABF00DF15A8804B1937D581CFE4B6B075DC + 4: C170A746498F559F9420328A9CDABE0BD3B642056763C221EA8B0F8DAA94E045 + 5: 27153E6F8BBF2F2993E0DDAB90A8E0C489718C7DD36478846BC91BCF7948B04A + 6: 72E6B7E7AC538D5B2300B6F4155E129F3B292CA6DAE759A31ED235D4B51F17DD + 7: 4893848EBA7D64F98FB7C0A3250B08EDB57F51CCC07BF535510CDC6C448C2545 + 8: 90D1E212F3441600D5D64CA71884C48638B0FF5320FF4222E47003CF672AB09A + 9: 7E6BCFFA924CA6E8EB2168A496EB34E9FC5657318730C0D0A401F25D8F583D97 + 10: C403DC0963B7756F4B654C5F1EAACF4847FE32CC08F5BA4AB9B2EF3AC81F703C + 11: E9EB6574BA8D9FAE0BE95982E08DCFB674D24B887F2BB431F13547C8F99B71E0 + 12: 8BB7CCF6920D1F2BAE01E36C3EE740C2FA7D2FB3AACD1C67C01F5047CC75A605 + 13: A2549706D003F66A03796CCDB0704D343C63F779DA4F1A96ACCC8E0FF5BF1AC6 + 14: C95281FA6BFAF36C5E93F4853F8C08E13A0CF6EA8CB046937907EAAACE5F7103 + 15: 6AF95F7C442BB215F8C9CC56A5854B26711D480AD1F5877452BE426FF288F057 + 16: 49B3E7D802276CC9CDD5336B83AFD6131759C320D2D37854ED18D186EE8DA474 + 17: C125D1A259314E1F3316BF743F80CE01ACF8F3A57898070BAC2A79518002B957 + 18: 877D8B722417933FF97402A1617F724681FAEF960FD412499CFF5968E5311B8E + 19: DD3290905622873CD48E0295CD9E0DF494D4FBC0ED16E7CFB518854B290F3410 + 20: FC08D9B1E2EBE42A97CDD89321980D1980BCD75026BD5856391E1CA5BA6068E6 + 21: B526A243275DF3351E0834A62FF7629612627537FF3873A5A955B61F74E87340 + 22: F0FC1B236E7995C28A411F3DC7E9482F68B18EBA5F45612113F1E8E5A0EB9590 + 23: 29BD2B1501B3AED43D54804DC04D8A4B6AAB5CFC49D0C8F8BFEACD9986525649 + 24: 0927998739FAEB8FFBB317D03B0D7C9EE9DB56AE1131FA087F45EE86288B9293 + 25: 244EC26D5D6E886B06533940F7DBB40FDB18BE3A615E1DDFEF499E4A45FBFCFF + 26: 725F88DD0D86103E3043A47047224A5C07DD793DBE7EFC9BBC42BC9D9E73D6E1 + 27: 4D4C4F0600D4496CCB896108B5142035E9F0278E969996625265F56A13D9F2A7 + 28: 384D9C0D90753BB78A6609A69EA6368ECB789B77AB752484640DFECC9517E179 + 29: 49BB5A53DC021574C8A30C9ABED461609AC27876E8214ECF2DE7BE51D46A8DE8 + 30: 11D4AF98A21E5BF150353E1DAE2FD86156D335A8287A658512B6458BAD4749DD + 31: A4524D264137A4969F966064914251D8CC3835FC777F60DB86AAA08BF27B88D5 + 32: 63A1CE651B924BF6D00E220970816A9F40329D91B66BC141F683C147FC39FB48 + 33: 79891957F958050595300C02ACD64C653683D4F93B68A329ABA0E2F943503767 + 34: CA3D41EB14C5DEA17011F5063C9E6088900BEA37774C180D85C364E323ABAF7B + 35: F98F40AE387C389542F162155A315D4BA964AEC0D4E3E6ECEE14E5298DF63CFF + 36: BAED2BB0CFA7704E960D4C682DBD64E0E4411C4818E0DB04BF3959B706B09449 + 37: A89B07949F8E2726EFCFE8784FE9D8C41B1F9EE0A586F01CD9214866082F5F1B + 38: 4C0AB34AB27CC7BA096E9B2EDF576C3097814A9348A5B9AE0B86CFD479635574 + 39: 7EF645A6E6353231580F84EF977B8574E2DA8D8306311FE84F0822CA722D0BA3 + 40: B2D5F87DEC52BD5AAB1134441CCFF3F4FDADD02EF13281E637713970B3790C5E + 41: FBBAB146A1AC28AC41BFA01409A44771E206FFE435B8884E5C358BC1A28CB92B + 42: 77F762764D910FEC8C41930D2194DF3C27A414F688E4DFC5D936FC5030BCBDE8 + 43: 55ADC8A400FF3BF1D40FCDB83A5D26FC4352450C91D208DE3FBB4B03480971C1 + 44: AFD9D6AC75C8AE98D16A15D61C7AFDC22EFE2728FE01EB1D5B9D6C8168047782 + 45: BED58BB8F8581B92E34E4B770A2824BDA96E2E623DDFA0C2556DB49E54FB1888 + 46: 865B7876492C12AC7996C79D913B541F29F986E1CAD8CB2FE40FF838FC20C3FF + 47: D539F39F77BF62F7ABF2E6765BD285ABA9256CCAC70F86661F997CA5FAD4270B + 48: 5C4839FE704DB64128920CAE3CA4016E4A7D31B1BBB508F06A72D4DD570B1914 + 49: 801F1994C3074B6A468206579B3B78A94F431EF2A48EEC405A03BF496BC0DE06 + 50: 551D30E7AEDED675AF8BD47B26A025698C3AE0C7D32855EE5FA83F41F303150A + 51: A70E7A90060B0E965114F336C28BF9153FF2AEE6563A5C45AB913927082CA371 + 52: 82F12D40A669DB72DACCF7DF9C2AB2AF10FE952D8CE3EEAB4B89AAE130F28143 + 53: 78CF324171569F7DEF4400ADAE179E985315F8CABFCBD84F1062694566B85BA2 + 54: 70BAF36BEE54DD98B3BB75806D2BD159DFA597B9673C9CEFAB5BA985046EECE2 + 55: 0242878D7169446373B64D121C1195593FE22DBB8872DBF85FB6227662C41C87 + 56: BC3BAA6ED2E3D2A0E6E053960D2F58A4DBDCCFB93BBD14BB39CB65B4288820A5 + 57: 2BA48F57028C00D3EB2A432815CE1F8194437BF82DB761BE4432613457C2013B + 58: D752B097DD421BF28C8AD861CD55D67F15C20B36071FDE187189D04804CD44FD + 59: 1722F41EA907AA96C0D7117CA66B479F1A38E6D3B55C3F58D9671761A5C3F46E + 60: DFFC2E28B130B95969CD2D13840DEDB7C2B7BBC4A1323BE5669661F62F25447C + 61: 5883F44E26496E9AC3821CF991832F9A6E9217CA2F095A63DE0DFA95AD42A054 + 62: 12973B879E2F1810ADD0FA069FA8DE24359003008CF6F0AE86CAC5DBC261378E + 63: 39CE700048B22E5861FD32D9802F585F5DB4140C6DB25E0E96E3B2D9063F116B + 64: EFB921010B511146BA22454CFFE9FE6A95B11458FDFEAB11B8DF90357E0C2338 + 65: 9E768E700187B04C9F04F2FD39EC4C31CE5D5D4510EB284C34021AD68303AFE2 + 66: 27C89697649C72BC616B9BCCA390DAC87BDA1724CA8905D981EB38861DAE2EEF + 67: 0F393204FE1943E4074CC20030AE4D1778DF745DCA0C85C16AE190929A223473 + 68: 8D2C439A7F8AC1503469D5B0A5615FA1EF76DABF46F4199E55BDD7CAF4299B8B + 69: F078B8EB782766E8910763A8B21794B788F9E76BE8DF491AA9E7D3CF4F5776BF + 70: FC593EA587568051450BB1E951D5481EFF200478798D9EC50B6B02E83252F9D2 + 71: 247E82E689C55077F0C1BF7E652E72C0B373C189C5867189B8B9E3DE3664B897 + 72: 119CB9A78C023F674AAED82BFE1E9028A6D550A39AC22CBA0F6FF6DB05D05F43 + 73: 5237847916449649C2B6CF12771755093359850BFC7FBA157ADE79E5E2822B40 + 74: BB80C4B2485C7DBA5E73035AAEEDFB973FFAF67FA2E691E300412A7712FA55C8 + 75: 34B23D5707123EE7513D08E03BC5121E45986DDF508E8616ECD1349D40B2D8E1 + 76: 3D91F3216ECD7D45714ADE20457AE23F6C92AC7BA301A54ACED35F8416868572 + 77: FFE85878BA61569DE803F1361FD7CCEED5939140CF71CFA371E11D6F4CE4F708 + 78: D8403D5015C025EF2F1273558AEC3927835FF2B4B2F52427C2FED2AA15AEB3EB + 79: 0161395718F3A2171699FAB377A82F9AB16B1C3BE9CED6D3EAD22C19F2EFC537 + 80: 27E55DE15A0AFE7018F6F09F3601F2957801DE3F2BEA807206B4E7CED2DB8199 + 81: C19756D0FD605D62322080E22C100A0B7101A3818A39568602E052855F4304FC + 82: E3F162CA1D5E431FB8CDEA00A8BB0ECAA555ADF4113EE837337434B2C43E7408 + 83: E4AE78BB9B42109273D433E5BC67D918CC8348B81D22F639C16FDFF6A0A9D748 + 84: 9D599C8AA519D1EBD121D8F826794D79B359C37D59215B4187A4A716126C0F07 + 85: 793081487DCF188411C0513FBE7C9F350147B3E09B285258ACC163C703232913 + 86: E68F8985FD2E56173E7A1CF65955738536C80858B30751F62B91B773DF0C1EE0 + 87: 01B7FEBF76A44BFAB141DBA09308E5D0BAF9510834D21C3C76D0ED30592877FC + 88: 0D17E976859100842621144A76DF72BB29F95A836A72B23C47BD1CAAE60A85F5 + 89: 340650F975C051A499E2C5DA305516129126F8AA3C73E8BE04BE4958CAE42F63 + 90: 1BCD66C88670AECFBF705F49ED86D2090A89ABA5FC0F078CA4C029FCDBC13DFE + 91: 9B3F9D66E901759F0798B8E6C99FE952DA0C9A18DBC02D3B811BC1A309FA0F6A + 92: EC2396E05B1151102C5825F6442D8B8E911C5E303FF783D5FFB26004C996892F + 93: C084E091A7ABF6927B63385CAEC91032B8594DC1AC394A512475E27F9099AA89 + 94: 786CCF4D13341FFDC5E17CD6A8A4A449BCD78FD884E4413F8B25BA2042AB5F9D + 95: CD7BDAA224DDF56470CA9B7D8ED3EE2EBD431522107397322B34A4326652B462 + 96: AA736484E1C2955D67FA1D320EDFBAAEAFB4D6C68743D1B4594735545E51F123 + 97: C0AD0BA65438149769DF2D1DCAAA50C05A5C40CFD4B60A7CD689825804A0D8AA + 98: 903717621993168AF13BE2B16F0008DA37885D8A36B748E263A9CA779767E2F9 + 99: 031C7059879885D6EDFC2E17475172469F560C90B1D9EF555446662B291DD394 +100: 65DEC0535DBBCBEE8D5F6343A42D00108E6F3F68BD46EC13AA0A6E0A42475A30 +101: F6530D19FC8CA5D78D60AF7B2B8C19CBF59DA0B71E7457A80DC031AA77ACE615 +102: 2D00D07CFC276203D8DEFF66D954AB1EE422B1689E7E23838213A26023F82EDB +103: 6796A084FF352743D41A750426E7AAFBE5412702D087C2CD9E560FBD5E8C33F1 +104: A9E8884926115E815C51CDD480D636DAA75C2D400DA2D659F2813E6161C13672 +105: 6E631CFE75CFC9C6939EAC7232B0B2862FFD471C53A40388A5CD7808DB78F1DC +106: 9DD2F27BCACFF12C3447D0CF5208B597FBEE4A967E910080AF2175CF5E2FE9F2 +107: 08B2333D3F833D7CB9F599400D194BD807460E6E8AB9783767BDEAA108AF7D38 +108: 6CCA37F73B7AA93D948A467E6866FA5C150484C32726E7B6D2F23685379692E3 +109: 5BB12131D1C2F7F668034817BC7EDC8D3F08A932BCE993B7E270983C98533063 +110: C4214BA35FCB5F77EDC916B5954772FD90A8746BBA61797E3CC196C73CE817CD +111: A286E879ADC84DE575A6B59645825E4D4F55246A7ECF169D8554A65F62BF2D87 +112: 4C0890D5BCFDE5F01909056FE49666D4ECFA7DD56DEBA11A84516DFF5B5F1E37 +113: 23D88A6441492B08F932430FFE8E92B39F2598B46BBF974C96761390388C0F1A +114: F03BD6F980D353F6A4BEE16EA6F95EADF814D82E64D47D5FF28F7CA3B11C61A6 +115: 12DD7EE2672C3A876694C05BD350D466647F0ED32A039F1917FD1109F007A473 +116: 582DD21F7CDF4DCB58BC8882D181C87B78A3AB0691C7ECE77C239137C0A5D85D +117: 8C8BB083C161A1EF9F161C6143159FFB1E993B568042D1DBC440ED363EE0843C +118: DA72596544E494A795420712FCDD1B5B184D80860285D449921E25E2AAC87F0F +119: B14227DFE83491CBF4096B66CD30F6D582FDF508658B5DB0DBA566E04459E443 +120: 5E2AC117C01471B83179F09D6569E733FB6012FE82EEBE6E0A284378EA98DC4A +121: 7964D042B2E63053D39983B25B91FC40D0A79F2C0A7AE9B17DAF958A746C2BF2 +122: 2F3B1982F6F036B3113A5EDB83C330DA70DCB7029C897C0F4C5957A38D3F47A9 +123: BB9531D4EDDBE2D9A1ECD3AB11AE50CBA7C9952E159F2985173CC0C5065B972F +124: 5366BAD10FEAFBFA174EAE88B6452D23EF2EDD40D581B7A3A650DD50E224F5B9 +125: 4E22C02BB28FA26FCB45018ADF49A89DEBE1845A97BE92466C0744FD3D7B08EB +126: 997E86FC2E5A561EA8BAFDD9BCE086D3E8E206B5C27AA497845AB62E0139CDCB +127: 46925B5311894DE6CC0A42F439B958EEE32537BF73A96D4B6886A83B1A373D5D +128: D04D93977FA94A57D95E476034103827AC21B65132AD34658844D06CA923FA3B + +HMAC-blake2b-160 + 0: 91B41F36F10A5F9A3BD170E02E517BFFE5331384 + 1: 5D5CFB715ED31E9137447075BD5B549C07B3FDDA + 2: 3CE156D7DEEA2048BF356E8F6C8B59F5AF04AFA6 + 3: 92F836EF5726EDD58DB9E4B4FDEBC597BEDBA589 + 4: 218C4DD898B801320678F6FFDDF87FE56FC786C0 + 5: D96E3A018BCF20C9FDDEF1930C06951AF345C818 + 6: 91FA0CCBEF27B754E2C64ECFE6844814F6BE8620 + 7: DDCFDC2D726A97FBA4CD317CD3F551FAD3331045 + 8: 45ED295E5338B2AE02FB952DA9BB61BFA6071CAA + 9: 61A9AD603F3695B8D29A2FD2A4C363CADC0A7BEF + 10: 1A773798A5925F28F93BD56FC7BBF50E1EF2D721 + 11: 0426696949AB75F41C73EFF0F30ED3E286F677A5 + 12: 5B83AA227BBCF05C6C4484FE244B16CAD49B839D + 13: 1777DEC2CA55AD6BE3E492135EAC2C4D56906707 + 14: 4870BF4800CCB03AB2421FA1FB391E7D60C2D97F + 15: 0C469D4F28620CF7F90B20078356989470243D49 + 16: 2287F572BFBB2ECD49A50F3EADB2A3B9E4B4876A + 17: 83432F240A8987F3FE97D81384A417977E5B01D7 + 18: D2D705511C9301F107C133898380F07EE64F4B46 + 19: B517EFF65145A0EA914F4D8A9A0C3BA99837C622 + 20: 07A27E7D51B28D64E9F4E86EC4BAC2B4CFEE4F71 + 21: E3001AFB1FB326FB56E9BC266995FCA21E585D1F + 22: 3F01F2A087489B17E266C046F96D770DAA75B32A + 23: A47CAAB757105BE824943485CD4E5A894DA4B2EE + 24: C79F3C3E44A2CA66E68D15490E708FC888C656DD + 25: 3811AD9174A05E89FA6985D1AA67CE719ECE86D2 + 26: 0EF02F1D60910E439A169D5CF2CF88ED49F977D9 + 27: D783EB1CACD38317F6DE37AC4B4BEDE6145EE0E5 + 28: 1416396D5439FE809A924B0048C37F7C49C581CA + 29: 810C7E4204C9C2D0F2C54C0532DC6CBEFAB89044 + 30: A436140726FCEC72AF39434914FE4D534329CC73 + 31: 8B86710154FA4CE04C0C748750B2FC86CA8CD5E1 + 32: 5367509112CA9EF7263E2C50FFB2605E7C870E48 + 33: 47D269F4DDC5DEDD79A055406065D28FFAEDBD8F + 34: E9C48F8AA577628AF49C4E21BC370C25EE632E94 + 35: 8409505C22BA85040F3FFF39A7B1CC7FA9D0602B + 36: 77B6482AF6217DFFCCD25A9934C9FD878AF5CD0A + 37: E9E6AC21B91805468E121293949689F7FC4C0294 + 38: 1B9C111D6604A97C246DD502A30C44E667AE20C5 + 39: 4EAC3E4BED6EBA2E7ADC66DFD32D06449E7D575B + 40: 951800DA1CCF5431D017DB2D6B4D8ACCE8D97841 + 41: DA506076CB4737E3EEB985DC7AA8CF3DCCD45EF1 + 42: E427D5314F4C672AF8C4DD932D1554FA66F9AF0A + 43: 95BB99ADA3CC66D2249FA70EC21A1DEBA8F33AA8 + 44: 791EED39EE89CAB25C590BC940C085374AC07E14 + 45: EC9BBDD1468C2E7BA180FFA1744FA55AC83CAADC + 46: D61BDBBE513ED4E97207109BCB457C2C4C6C1B1F + 47: 08829726D269A4DF0455746FDA30900EA89BF85F + 48: A5A730B7BC19A473271EF8103CBD702E2C690EB7 + 49: F889A18589FF7BD39C9240613CCEBFB8506C1888 + 50: 6A11150B2411A7EF49B6323150D57893713C4DE3 + 51: 3D21C0233D6A7BCA5D3840DBD3DE630BD11CFF0F + 52: 2B389884899C1CE9E38232F668B89AC19E11B371 + 53: 2476925F06549A759CB450DD30312A216EADA4C3 + 54: 15DAD84EED1986A004107068C9A0D4AF6C86EE5D + 55: D8B2B9A72EF637651249DC810E094BC398FB7E69 + 56: CD0E577D787A997EE2D45261182237C950027707 + 57: 517510E731D667B2565BAE6F53B8A5ECA13990D6 + 58: C2EB5066908336DAE8CC85F9264677F00B01C5E5 + 59: 697E197A467585A9235AE463BE3ED974DAA6B7AC + 60: F60DDCC3D5BFA9C09DFEB824D910F7798BBB9709 + 61: 381F8CDBF7B84B0D90B6AFA5A542058CD712FB23 + 62: 5FCBE74DD172AEF23454731AA292549159FD1C2D + 63: 1022AF30F8AE25F92257571AA901F641A1A0C161 + 64: C8E9A2E2804B45F4A1133CC35EEB686714FB06E1 + 65: 7827A6CB25970BA6E957D6B870C30548C08E1D13 + 66: 8CD063D29160B06519D94F269A7E63D10C9D083E + 67: 391032B2A264C4516C349DEBBB92FF457B0EBDE3 + 68: 47237083EF729524980E750D8DBA10940A31C87F + 69: EF3823E526FE0BFA96A59AA01202A1D9ADF5F6FE + 70: 39C00C41CC48A0C12FAA771910C140C979889DA3 + 71: 3CA776F737A36BF88ADD6F0873AA4CD79B7AC08B + 72: B5505CB70728B304E562F830D1B541330EC09641 + 73: 164B95A64F6AC4AB7778AE3271758E57D68BC0F0 + 74: F737117005CC32C9CF75149866FF62C666712302 + 75: 3325BA34AC267A2C070DBB6DE0AA14140D43B98C + 76: F7BE840F96EC0E7C1A563858E08DC4A8C05739FD + 77: 779DEB8903688378E81E7596C841EBA80C020D75 + 78: 24A55B6FF3A5982771ACCB01FDAC787C127DB872 + 79: C97B5306FA9B6D6F0F1F86B9BC82D80AEE710C06 + 80: 8D4C0AC8828FCBC9FEA4B8D389906F5447BD7841 + 81: A1DD2E5E8E9108D29E875346D7F5DC0A8BB88E21 + 82: FA80CDB34733FDA40CFF883185905E818FE99906 + 83: 53622AFDB64A6B314250D449533332CE50E54D44 + 84: 0B678F2320733983ABC2740A816FC3AF6320F6BA + 85: D8BE658D14F67C6ACC8C69328605C35B9D63ACA1 + 86: 0C0D0F9C1E1D83C652BDD74007E34636AB33669A + 87: E619A83C29304ACDD171CDA3AAE6F9DC872FF53C + 88: DE9725D99551CFF1377578BAD64A815F1070017B + 89: FF21E0F39C91DEE778A4F06FB02B92FC657C177D + 90: 5B1021479562EEC8B6D3BBFF04497029C97237E9 + 91: 0020D098252AA355C0F0F4CD8EB34DBC0B73DCBA + 92: F8F35EC61D590D228645336C1F815300289CD898 + 93: 60F638CD649A5EC518EEEA5A4B2D638DE2DDC7B1 + 94: 6C78A0C129AFEF245F7D66A6FE57FAFC3E28E10F + 95: 9013B5174394CE01ABC175F8F688E234A4FD16DD + 96: 34783C4C0F4F9321014CA6DF7DF766E54F5C96C3 + 97: 3636D4F6E5C61EEE4A86E14ECE023F5CDB15D46C + 98: 4E1F4AC9F841B95B2E594BF6AF760180DA1D03AF + 99: D6EB0C8996370720C5F9C220E9E68FDE34380E30 +100: 5F7A0112511E35F4273C4BF2F1F7E724D4522DD5 +101: E5FA55649943517931FCC903A4CE4CD4F491289A +102: 9F53F1332F91029DBD32BEBF5DAA6C0DEA537DC5 +103: 4B8715D7E8ADC51077A29D787E48B11557408204 +104: EBDDB13C99F58B6E5EF9DD448B1895CCEC019E69 +105: 027651A8CDA7E31B876B9D3F0510CE0E4AC7A63F +106: 8D38DBFB024629BD83D7E37CD81B4E194B18977E +107: 4D1ED53492885F6E071A66374A01C765A10A8630 +108: 3AF73ED62231B543A258BA74CC9E892434527D0C +109: 1F30A0AE1401CDD15E6D0D1464B14B0B25F9E8E2 +110: 57D86CA815F8CF4C0506ECA8453C4015FE252C74 +111: EAC5D0315CC5E63DAFD7E6AC42BFB6731FD5B90F +112: EC7F3E81D1C76792A984A590A447427D55B9BBFB +113: 46965A3E137CC0DA820228F24D2FE48A51EBA32E +114: C952D772005A7C5A51F421D97C4E8E13CA49F294 +115: 4F294AC35EC97A70D9F26A26451FE8777A15924C +116: 64763832C0EED10678DB46465E0542CF3D561CCC +117: F3D2E5FAC9EB7FB5F2A6D4815621F9CF4421C450 +118: 66BD63901F59268CC04A184919DB0002CFC86741 +119: 15A0694D1D2192BB38253058EA2087D5F18EA4D6 +120: 92F0CA14F48B5831C797BB11CEB01AB09DDDED30 +121: D2B881D1AAFCFD3EA7C345D98644EF9028988FB3 +122: 89CF09EB477226E70A192C6261252EE50FD2F262 +123: 23766C1705A6C84F9C09936BE5D89DFAD33C70B2 +124: E5AB4272EFC7E534987DF0D1DB00AFCE0B610BB5 +125: BA1533A83360E295A5B02916415F19A74BCCFDE4 +126: BCA0F491597C809528F51509295F86BD0E1AE5B1 +127: 96EDC04327A391951BB3B3B9912C40E11C7E20D7 +128: 9E34D0C76C1C208007C79FC2E9F537F717B6BBFE +129: 24F6D1D900DCD8F836828DFCDC40C861AB73B552 +130: 8CB4AED9E93F93FC018C854BF3AF63684FE2BAC2 +131: FFFD7638161CFAFE2CB4041D04DE867D9974F0D7 +132: 56B919EEC4B494D665D3DC49C10F30FF58A78626 +133: F85ECE077F8C8EBD4FF96A6E42093880EBA0B832 +134: 6D94794B606FD67A2760A6A9F7768B778DCC9F5A +135: 7025DC803EA0CE00F533D265753C0EC443393501 +136: BEC1349BD4E8B0D456B2E808D7E19FB38A938637 +137: 10D6EC94DCD27FB67DFB07595EEB8791C1C98DEA +138: D1D3BF08EBE9BC2C9543CADFFD6B31C235EAC392 +139: 4CF6B180C42BC7D00A56044A94594F22296C1FDA +140: 504427586B8AC7BB3B511CD0E7620281D88B9947 +141: 385A73AC9A075E3989234C60EF77C1B2600ACCA1 +142: 0D1696063C5BE42C71AD36F478B4CE0BF4F54D68 +143: B524145D384980E983B98D31DF80CE097B5BC235 +144: 500C8200FCD89A14A3D2AD625F57AD0B93007D4C +145: 860B11F1A6CB6B8598CC8428EAF7B1633FD8BF0B +146: 6C0FC9148016A8B1E6513B8338BD81FAC9B5F6FD +147: 7793209C2613B32D2B410507E0FA115A660BF47D +148: 849E1B1FDB5C6AA9E7CDFFBF7434DEA043C94B60 +149: 99784ACE6D1CC66E3EDD4460D223529B7C41C6AF +150: 2E7973AD078A82630CDA2D30B4C4B0F220CF04E2 +151: B6B46BE8A7ABC4F33D0EA4BA705C9AAFB3120DAB +152: 94F8DA30825AC75342B21C3AA461C2FA09124C68 +153: 8A9D1A8F07A517740E966687FFCFF37BE79032E2 +154: 6BDD89F93E8EB17A0C4C25C312D656F4EA73697A +155: 695D4B4361A4726EEE929064218CE25EA2993189 +156: 160F8EB2FE3C12D993DE2E0C8122157E42B64467 +157: 22D444366FED25B20132D00F531495E1250DF2FA +158: B73BF87C324BF91F55E6E82DE291385958505094 +159: 70555E62D15441B430845D2439287A46E44E65AD +160: 902CBC04D89F2CA95FFCDB28B3CF612D5AC60FD1 +161: 4DDBEC1B9CDFCDC316BB109C14B981FE3AA79005 +162: 35527A466446126080A7D5BC4EDBBF7263208FBC +163: EF9A850245574AC3BC03BC523D0BF11A946BB43C +164: 81A62BA66250C0E4FB6F3413608F953282028F71 +165: C77D5612686519CCFA2E9626D0E3B729858B128B +166: 02472059AF034DCE8F2DB835BF861E5B03E11F1C +167: BFF3366670E2A9B4CCEB3EFB73AAB6C6A9CF31EC +168: 6E124CC3C5E8E7048A1AE272B1A98756053F35F4 +169: 38F00373D0E0BB5C3B51FE9E83674E9E3DCBAA63 +170: D7ADFDB44F0B48F6DDE1BADD51E71CEC4A54F746 +171: 8369F354D0C03BDD25002FBAEB4097C82FC6FFF3 +172: 1CFBEB3357B96141ABE3174D3747531FA7CEEDDC +173: 2892004E23D054F5F201F5163E160E2B3F5F434F +174: FE5ACEF4E51944EF26556D31432536B583FF3718 +175: 430E9A5C642E858C83BED9845BCCB3BF597B4ACF +176: 026A695AEC601C04A68FC249775B3F658DB56522 +177: 73A8AE5A09963B90256F7000D745E4B405657BF8 +178: 39D7BC6FBE317218A3067520A93770348B7D06C2 +179: 9F6725C5C9824C2551BA41B7A1BE8E7CD3877C61 +180: 4FCF1A8A95223AC44316D1CE8D1CFF05A9094C4B +181: 55EC2376C84494232706401A5EE935506AB3593C +182: 53067496DF6FE64135343EC9CE7652F0AE17AA4C +183: 1E7E857E68CDECEEEE2F1D9F53E2A25DA86396FC +184: C1600FAB2CF3231E8A4820314F8BD1FE182B2F9D +185: 02CFD49DBC6492781E28C0E43D9ACE3B3EDD8D87 +186: DDCC26D3E8458B3269D4A39AB485207139A514D0 +187: DF1515CA3E20978147CF4E62224C88F9A78E6C05 +188: D05EBA45E23870CBD4C32556A5CFF731469B96C0 +189: 4DEB7F6DD512E7C3761C3B274C4DECFC0E4551C3 +190: 239D8D8F1B7B012ACF916F168A449721EBEA86D8 +191: 7ED39DF9F3C7EB62B3E70CEE8AD80D28EC52CF09 +192: CE70BD3603CFC7E1C55A7B775CB94D992E941AFB +193: FAB476B601B3C1E3A47A1FE1DA96A0AF71880A71 +194: 29DEFED7BDAF54DA7EBB500FA159CA55042B2A67 +195: 12E0903B289CEBCE694695A50A3BAF4ED3230FE2 +196: F41294C939F0ACC186401EC0E1C1B6B9324B9D4A +197: 0B3E7BA883D7909F78E5585D377C6140F31BDDD9 +198: 70495AF1F81FC652718FAD74EAE3D8842F8BB55D +199: 735B1966FFD58D5741EF34E52CCD960E548FE0E2 +200: D2A39D17077D2D973585B7118A60BED4418F9D2F +201: 4065C3B1AE063E44942F21F74456D31389CB375E +202: C3CACF4093FF3A77762EDCE18789631D5E9114BB +203: 87977AAF6F78987EE4A729F6B1069352C03B8259 +204: 17BCEB4E0C773A0EAD196D259AC15C81530A44DE +205: D50896BCCA9B69A14C8F96F3B7D514875FAE91AD +206: DD947612B02A2B3E9E1A2AABD4A7F4B630B18021 +207: 78797676313EDB42996D08982F1ECD3E1A9DDB85 +208: D3CF1E2A8166CFA5B2EF1A6935633956C46997D8 +209: 1DDE50AD80DCF35167B1ECC7A3A0AE07B7BCDA2F +210: D2E7085ABA3FF996D46D61407B9A1FCEC77E3591 +211: DA2FB91F8F2C30BF0BF419A297D230C7C2974A6A +212: 56E79F5620F97221F40770398AD56F3DB7326370 +213: 639FBE4B78BB4BAE556E4B5E39F7A09CED54ACC7 +214: E7A4E2EC2A58779FD15B7371FF2B8C9464DBC60C +215: FA0226413C1E39C40CA6924F88FDA62B3659929D +216: F3FBA413EFF99AD1AAA832A7E4E91A5DB92F0A60 +217: 3D1BC9D1E3936C5C8A56ABAC688A7931E74A5447 +218: 12332C438A1032D1E0310238AD8616CE90AE1076 +219: 0094AE3A0140D6F41183A3D71F513B7D37D7523E +220: E0501598D086F7A749489A1E94E58B39B20B0E41 +221: 0414FE449C5BBC58915C8134565E14145A9C6B22 +222: 27F2323EB75D2BF455AF1A4B8844809E4F6C7561 +223: 69124FC993FF512968D1DD2C66DE6995661C6A76 +224: 2E908ED58CB6F6715E43EC988826F811D74AF159 +225: 19F815F7E9ABEA2C4C8C781C13D4511E6C9B9C99 +226: B63DE59953555718DE5DAF2D35F096B7C6E9AB69 +227: D002F14EA3C14233C1AA1F990F14F377F2E50705 +228: 234D683CEF16842ADF236077E7BFAF59F1805852 +229: D8BDA8BCCF7850293F9F7F82C9866AAD9BA27BA6 +230: 57BB61352B23FA9B3CD11587CC83E9B7547065C9 +231: 81F3664801DEB387B8391D13A45D4E0576A5B8D9 +232: 89CF0B3DED84D683F6A8176F48A830491F83BB77 +233: ED66834EAA82BDAF54B13E00D1EE46D716A3C806 +234: FB52313807A161C4BF1FCB6201366A44E5BCC655 +235: 6D8B84A35B48E2F3DC16D4B7E73F74BAA16EEECA +236: A3319BD60DCDF72BF076CEFA347D2D4C5BB60CC0 +237: 17DB152295D410B56B70934C6279DBF897BE3CAB +238: 73F5C199C45D70A15DEDF9E5116BF5FDB29B5A5F +239: 26734C86594D1549A4E5C93F0567194F03159A08 +240: AB7B14F5D55B55B68C981B3FCFF47ED615709CA8 +241: DADC35B7D37732C14665089103AF7D83F55CC896 +242: 9C0E3FEA3FB98BF4BF56207F6205F6440BDD2559 +243: C1473E91A846DF6E6F5132E01DA171A3622AFAD6 +244: 9C83212F49441F0E7FFFBE594341CD1E7EC9D75B +245: 93EF7E3D20709433612485F96EA910F71097D329 +246: 7078DC3CA059352719F5592E3B5E89BF2F632296 +247: BBEDD4C77DE663C50757B3D5FC490D2B8B9DBCDE +248: 0461A77102B4EAAD2F5794F596DC71A564A8FA16 +249: 3E27194189DC0C843D41E325BD4BB4984EA7A09D +250: EB144A3DED47B5DF4CE7160918AF579AF44A6819 +251: B495B9C4225D1F2CCFDBD13439F9899E537C7DEF +252: 39C768C21766380111A8B44052AEC0CBFC5F0499 +253: 424F9A6A2A68FEF9FF958BD6F88FCD71563572E1 +254: B31B3AD109D63B575A3E4EA61CA899CCCCD1D520 +255: 85B745185F67197DB09114B5AF11261FC1BAD1B8 +256: A9E4967F95AB2566784755FE625366E7CE4AAA57 + +HMAC-blake2b-256 + 0: 652C4818A846DD289D18D38C934FF0A06B2A78C3A1A4548D8CCA2F2B38C35683 + 1: 965C0BD4B4C5B060859C6943860F11BC438FD1A7133876851B33C470225247CF + 2: 81B04471DA1B28D80043C6299986FDE0F227BBCF873EE065AD2B850C8D6FA7B3 + 3: 4363D8674B928239DF975199E42F65F249872183352BCB7B16B1D25CFE9227F1 + 4: 03BC4B9048EBBE83D915106D2A25E80FB50E24E2163C6BF50FC5D160FF680FC7 + 5: 6F3B2A87E4170B4366D591D29A6C4148C41D600294FBCEEE176325CB0BCB9048 + 6: E97E6318DCAD9B53B8FDF2D697D874488C3D8717DE35352AFDBC7B845783D091 + 7: 8522A943DAB9883F729094178EE0A70E8141EDD2831DC6098642CC55559D0F45 + 8: CCCF2B73708CE2C824A5C46A6450486FF56181883C7F1EC3B61320CE890EA8C7 + 9: E241F9C373DDE0A81E5A8EE770BB249646BE00DE0A0C387A173FDCC3518F8254 + 10: 7AD7D93BBA15644E3E6E0FCB3052C61A3B2CA4DCF522FBC38FAC897B9A2152E3 + 11: 91F4B49D5E9975D809A834EC74BCF60BF1728C33F331FE2EF7E1D36A4F957FEE + 12: CEDB595778F1A2305351FF5F844804D1D6A28CBC5E72459DB1361AEAEF0A7EFB + 13: DFB2B31F9C964BA9123D6D1226D76EC00BE21F3939838A8C404070CA8C0DDFB5 + 14: 4EECF16EB573FF2F6A86A0F982E6572A0FBF8FB81253BD33990190CFA90C9107 + 15: D4D71A7D58806AEBB87F5B04CFC8339B2AA9E2A850EE7A996EB99785482DA370 + 16: 6172B2551C40957D3D602323D73159E2A90212E9703E7CE2065C234ED4F1F319 + 17: 6B099A1383B3FCC7F4B81E98AF3398AA988A7EE729E7005A5DC56BD3F907263F + 18: 9A2C6C3C285BEB4576C6281D3B17D308CA97CAC24EF55760308E3C4A0A25433E + 19: C6F865EB1164450115BEFE90F73D03F2AF950D606E86F81396D0E23B2ABAD49F + 20: C99EBAAD53DC254027637332BB816E246A6CA2BD8719C77A36DF9AFE610E9603 + 21: 1B6027BF1495A715EE232A26B6856D398F38899FA7F81696D87046C1706A1D10 + 22: C5F87692C84132ED72D8C3F666B583496A17B427AA5A55C3727E706C0C74BE39 + 23: 1601E725B874792CB56AEFF94650F40398AAC1FE02F67B30C86CF247162B6749 + 24: A79ED034F708504C7C14916A918E214E9D2665C40FAC7E5A407953C4B73871FD + 25: 3F7E96EB8A8AF85A1D88E286948697B85070F60FF651A51673790E580810F984 + 26: 21A6A1BB4F45A11FFFF69300B23B00FA6B97E728BBF1EEC99F7ED49BAF1F9F16 + 27: DF2E45C35B53323DDD4C6990BE090658AB6148E84C91A1EFA41498F8A8863CA3 + 28: 1A276A6BF0917FFB7D731269C384AC1AD33C3F6B468A2DF5B2B09F89A3D30EFA + 29: 3A3415215764F985B347DF8195BA50B495CAE26D73D497968FDA48C8F6C20891 + 30: D3F0E1CB156DA0339BE0C438E440A01C36AE1C3D979006CCDD9B4C04DF45276C + 31: 29F96F3085637A80AE4DE432B4DA434A2C721E3ED1D88A14B16AEC9856CA7E80 + 32: 81B0EA26A21E8640549739AF8F8906CD31B51B69630386D63922C8F90CA67AFB + 33: CD8B95E8F45A448467A2A510D1189AE5004F92021F2D019411694BFC1A286B2A + 34: A514AF45CBE2947F23E9CC96AA4D65C227C56BF3A05B37A9B77F35BD6658BB77 + 35: A40A55D992DA46508EF9ABD209E14D290C640B36315EA99E82B7FFD3AA216805 + 36: 890D418DF1DB48670A9C911518D166B02A78478D8950BC238BC73BF55B9C6A99 + 37: 888E57FCCAAF5CE6D44B0DB22DF86022CCD297274CA327C050335B7E68A58E69 + 38: 9D309D8F7ED42B570E66C33C647CE19B99BA34930B5C19E53DB1984262FEB3A0 + 39: F63409B60932B087C4D8BF3B7ECD3594A78E6B16A4A51D9D304883D340DAD98C + 40: 770B12D90238C8FEB8940947BC9448BCC9D19DB4D4D3B62CC277354C1FD9C6A7 + 41: A3661CC87A5A2E959A426CC3C2EE15DE0DB7A5177F2BE4A340E79CD3CAFA3057 + 42: EC2F7AEA80A24DE936105B15DB6B0FCF63FA1802D00313540DBB4296781BF80E + 43: F506A21EE73C5289EDECF0C3916AA0D0A2803C64613129484C22A8877D2F766E + 44: 00327A62D4FF46E6BF985BE450673900B1F2C58EB1BBCB08D6FAE06A42B32A79 + 45: 680780C2B502E7347772F7B7156706221E081A20F04A8B4D59113D12BFF3C12A + 46: F1CDA40ABB756C358B9F8E08F38494AD7CE16D9E1DB10EB6F61A54B2742E1FC1 + 47: F4A5DDA9C79FFC2754C14AE60082BFC7736B70BD4C3A1A2A0780365F17708EDD + 48: 6DB26F90FD7459F3D50F6B53A420124FB679C200C28559CD9F73BEA9D1F3F6E7 + 49: 4CF34A6CDFF48275804B90C9D29842C741215150330FAC49A33BECF4FCB5694C + 50: 3E7A195C034BE44BF7645009EAA1F4A4549BE3E6AF239CAEC3083B88EA15E7A7 + 51: B83A639653CFEFE2960545BD00201B68FBFDBC230029816DEDACB2A339A65A4C + 52: E5B93DE67B8AF0E7B7877EF60725363F02353ECB7AA1B15719CF72618DB5722D + 53: 9259AE1B51CF93D13BDD0E66DABF52C353CB560FB78F4121A06F37E34BA60572 + 54: 7682B67AC15ACB47A74B6B252E0A07DB3267A5F30B25C76345024020641455A0 + 55: 873C71811DB064C74C952AE0210D035A10CE45066390C6E28880A4F3D113789B + 56: 8B3BFA589ACEB6EFB39D987E0B6C9E51B889B16B04C83CAFAED3473DBD028B8A + 57: 270334E92C8CB85A995F05B2B712F8CF76113CB609BB967400BF69A199BAA29A + 58: E310245DDCAEF03C50B6EEAE895A4D5CC3911B55C41684F8E3599C10A9AC5094 + 59: 23CB6BF0F634DE484960738B1E5C16B758C4DB6850D4ABA906E1B146F591065D + 60: E8ED01354FEF6718FFCDB083DA60547800735E2FC2EFE4B902C030C0B8FCFF1C + 61: B1F135BF0FA659A289A5910FDC993D727AFB90DC2D06B3CEC2A4E68F5606603D + 62: B363B808582E1ECD288BFE85D91EBB2E258509A2F4A0B8AECDDD5E6CE454CA5D + 63: 51093E531663A8C26967F6665177F5781BF62B292282966B56E0C3CF81885D58 + 64: 9538A7FBFC83E631773CBE148CFB43B064BA117D4F1686A1F1402DF7D806DC4B + 65: C7E03CFF242283FBAA23F20DB7E60CD70564967C2319A183EAD34E51DC8E3D6A + 66: A4C7A4560BAACB777F48D651C5FFEF55F44048313CEAE44A1869674C1873F9BC + 67: 9CAF35E553DADCB73A42FC606C66AE4A7C68EA4C8D6D0D5D70E03B514A9D89BD + 68: E9B66A6260F9EB9526AE6335A9D6AABD1C1C63980202338B3282CD9AAAC9A7A6 + 69: B684F469236F7421FC7211B57F6FFA6EBC29D1535FBBEBDF6964EB086E9513F8 + 70: E44168C8E6511E675CA471CC753418C2A04DAAEC60061EB4F687627CA3C1C460 + 71: F857E2E3E27E1B9481A3A4E261DFB06EC1A5A2FD39AA8D884A35B7DB84CBC25D + 72: 48EDBC181098C90101D479E9F577ADCEA5A26F0C4D202F2B84B91642439803E0 + 73: AFD5652C7E77CCE446B8FF5CA27DC18B41E35FAE1AE3865F55F1B7E2B4F26A36 + 74: 325B27B3F9EA7C643A46DE798E7189462EB82BBB4888CA4A78E9F21B9869D7E6 + 75: 15E6CFAF067D81AEA560D19D470C985C4DBB89F04C1FA801732BD0B3D9FEA70E + 76: 9EF6C16174701CA971DE17D8BD23231279CA95F70C3E3016A90F281FAF204564 + 77: 149F55663BDEEFBA13C6F3F48F578B6BF2EB8D1AF19E8C2B351ED46173A19C4E + 78: 474ABA1288EEDFA0138F8233AAE5F7ECD82BFA11A19C15B022B346BAC1217F50 + 79: 8FEE8749037FB69499BCB71B0B2EC679D739173B572C8F15A336D6C06602A69B + 80: 2FF471E60F81EB1D917E8056D338CF1EBC622B9EBD7B35C95F43182068F9D274 + 81: 23A766EDB11B74B7B9E879C298B025512798161279DF6ABF55443C6F099A30E8 + 82: F4B2E6671B1D071374C9A7E8C0AE53AF8058B238C0025CF465B8761138A37712 + 83: B280A33C87A019503BBB1846570105394EDFD76F6F8799AFAE95C345CDB12B5A + 84: 0F7F6389A99AE5BAB88B8D51E61DB4C8E77FEDFEE37803D603A3E9D35A060F9E + 85: 931FA282297E4F58BE0DF321F63BEADC7AD6AE0E982761AAF0286C6953660E8C + 86: A48F1FD5E913903FBF7FBB358882F038C192AEA188C310AF9D1ECFD5B4FB6CA6 + 87: CCA246F0CBE873C03EDA960459B8B6AF9F3BD10876D3331C0700FFA2C4CE6288 + 88: 0C568638D74B33CC25731A957CB731D30D1049C95392C8EDA7935109DF6AC3AB + 89: 0798E48F92A7FEF84D8CABDC310EDC38BF44D0081E384DF8E2DBA637ED274E04 + 90: 7338FA2AA1D8735969B5D8C778CBA17DC6234ED6F1D3EDCC797741E28EDAF411 + 91: AA02110433C8783CA4B6DB389835891D2AE48E82398EB61CEE785FFD342C28C6 + 92: 4C275EFF43C9B3018192AB748072E428D031DAA0AFB71C95157869D4CA6517E0 + 93: 4412EFFFEB9E5BE84A3708B33FF8FD3FC86C6B09F612D810E22DACABDFDB40EE + 94: C151D878B550D714EBC8146901A35AD9FA6928254125EE5857DE9454FF687A2F + 95: A8422D9D607364547B01965CF4603433F50D3F5CCD2C0AD73C19D9491C19B7DB + 96: E0585BAC140FF99A8C5FE7875959B4D9A27973BA1DF7770F3719FEF753DDC25D + 97: 4D3F23D5E360476F80FA716A11201C7E38E4F47FFB34B744D8C2E5FA82B39AA7 + 98: 8A485EBE048F00B75F71E8838DB18E885420D34B90040D3DA3E99DDE9F7DD31F + 99: F00EAE59CA91F43107640051BA7AABEA8D218290A5EEE59D541F4ED0C6F6F23F +100: 1D0872D72C7C958794A0A306139E5333F101AD9425B3A444AD599302CA1D38EB +101: B9F85AA3FEF079601570849E21BF0A008DFCF50C5F8C3D475C9A4FED80D6EA41 +102: C7675E7B2DAA88D6F56587CEA4ECCFBF0F73E6E2F485049D6F634139108F18A6 +103: 961D2FAF25AAE2C828C693013795942E649FB60A3F4AB99A4C726176DD9E6800 +104: 0D72573A496CBE9FCF413E5A94D66AC6283F58BE1B2A00DEEA84928369C7538F +105: 547500C06C4225C9D21C5EFCA39A4FFAF2BCA5B90981901D468F5D357BDBD439 +106: 3A06651F91CECC35704958C77C428223815DB5A646DD2B5C23EFA80B55C98A59 +107: 681859EBBA0ADF350D3264A0034D7ED9B1A4C7AB76490DC58A774523489C9913 +108: E718F2E0345000CEA3645C15F02870B6E665622E6E7D3E7850813878953ED58C +109: 6892D4FC7F2EA6E20F45C8C1595038D1CC6F07DD0211839A5FAE2941B241F258 +110: BAC5688E05FD132E95A16CF72FCCA6D72EB9D184ABA08B657A48670B54B99D28 +111: 7E6DB1B204A2B7957D8B19F1D730734CECC7D235F1F88F949CD58652F5474DC5 +112: 88360E8D857C28E27865BAEC5EB248119A82E5D1BFA76A48E4CEF9F35E0EAEFF +113: 686A6987DF516693A84ACE8B9BC45D8D6DAA07A6395136CB8BA8EA2E9C1988E2 +114: 9050DFAE4F11A9CCD86EB77A51284D5110BDD75A234D9A8D0A9D096D50BAB6BC +115: 535925FC039F5126DCDF8BA3D0763C8F6819DB907AD2F5699A678153D144C559 +116: 4D25BCBA0A075EF30A38164CDD958965C1F0D915DB18C9DA0307A27FE7BBAD52 +117: CE930CF1D4125932CF246E58E5F1D452BBF8ACF3FEF65380B1B06F78838E9AB2 +118: C61E02A0380806339FFB8F3626CB60F0EDB4686479920D701BF827A572E06943 +119: 93B85986C608575566151530611633159888D84FBD545F9438045F22FC76B28B +120: EF4E34C9ADD7233AA57BC0BC3E3D5AD9F3B62ECBBBEB55C683F137CA35188F31 +121: C2A2091063D6DBD7D84EFE71A0302D6FD8B7F705E3FA313B2B4A7CB9DB96FF43 +122: F473842DF6449B5CA01ECEF2141B2371825D0B36F8F2C5103D0C03324F1B5ED5 +123: A21664BD6737E38EA567960E8080388DC7125580E12E1FFC7566195A85B59F41 +124: A095FCF6E3CC2024BAF5E3FAA22264F6E3BBF020F64C7DD3702E5A441E28FD1F +125: 8526919DC55187817F283A25D35D259E7690BD7897C5A54602749CECA53A4B2E +126: 18049FA72D1ED3A5DA6FDBC611F7AB6EA448C62D27E6EA11786799E9284AD393 +127: 0C03D92F1C2D3A13E202E4CDE765E8E7144157D2791801CA5B4E3DE52AF86686 +128: 058B4C17D5D9CFF1B6B654C25986312A39FBFAF6FB3099CE616E1D46385EF20E +129: 6D55D957FA582356FCFCA8E88E8841C9AD6210625CCB59AEFC092730D11E3E31 +130: 95A4F42399987CA35F9D09B89C769DAAA65AC76041D468FC83E177A14A36210C +131: B8640187180F1EDFFC017A1D9F0ADCAC9833C4271E68AFE37D2D0428B7300C9D +132: 83052B99D772BF42E02E6BA292116EF9B8614F742A26D4890F4FE47258A7A53F +133: 5412A8E71968A250B28A110ADEF902222F2112DC481FB1F47E8AA523533AF3F1 +134: BA8B9104AF732E5A1C864D40C7637AA9CE4D690F63A80C2163504D3F8434EE01 +135: 4F0238902BBB09F15E51DE6C49638E8265AAD173A814ACC00F329536D483A57F +136: A3560CCBB7E20C5DB74AF7CF9D48D7A6334E3DDAA18BA3B90E666AC8D66F8BC0 +137: 032EBC519F073776FEF325B7076F210DC84B704769F067FB1BD1CBD7B2EE3892 +138: E2FF8A40F4C200ACC4D7FD2B3D1FC29BF6C9E4E196BFC86E2E7DB74D85334623 +139: F66A5B3538F21010BE15C44BE69E705043528E13B81F139A4C9B0262B25EA87B +140: 22F707EAEAA4400B321327CFAA6DEC5964CE05FEB0612207DA32315D5DA0DF8F +141: 9DD31599464A2670E87ED158D582125855D71C3E1F9E6B051E3E3C5FFF638636 +142: B4320C714FDA01F8AB0E5D223E54DBD666208E7DB4A34DE4C6B5CC45974FABE4 +143: FDBEAC0713D8D592F1B22DFCAA8D1BD7985827191BE54F1A854E69E0B0BAEBA7 +144: AFA02143102B6AD8CE430C51F206A2C554B0E82F23121C98D70CDFC6DAE882AC +145: A0559B660C738B0093517DA09B7D25A8025050E380A060B57A14FE64F1B534F4 +146: D0CE6A96815C6C929DAE41F04981AA424AD18709008D852E6A3E207306E52E94 +147: 9E10B97312AF7829D553890065C066F6845A13E1F6B9E2EC079BB25EC6E68CE6 +148: 9D78F59940A631AFDE274E928E79550F2123335B67DE99BCD8ACF8898EE5F4CC +149: 47726D6D2460187ABBC09A6819E36BA156B673A5F07921FBFA8AE589CD6A95B4 +150: 5F02C7A0B8B845A1C98FDD443F19A501AF4520A78B559F542CE61B19F8391A12 +151: 7F7941C5702C58B5340444434BEC2D2A1B5A3BB7D40DCE192E700FB88C836B0B +152: BC9AD4682A38F65B08F8A37488799EC2F8224C069C8694E42F2353C7B50AD0D1 +153: 785A82F878A742F02714DD2DC9DC32F4CEDBB873A0887552BFDC023261BB992D +154: D1E291366B74BB0CDD2E258CA27ED44028648536668A2B043C0A56DC1B88C707 +155: 15924860AABBAEAB0094A497A621B76377F809D58C550872443B573BB3A401B3 +156: FBCA0E151017C6F6E2151B754E97AE4A8B9BC347BDB30CA10A2228A6F1FA00E3 +157: F6E32E251EE0D95C0D08DD36E56D3637E4E4505770EBCDC30246A714D3945378 +158: CA659B2FD6F8EE865DF19619AE25CAD7945F6BDAB220926CCB89C945E1470632 +159: BAEEBE9BFC97BDD6D6834D8F1B392A64DAA8660311734E38B3D3A7AE51E45C51 +160: 3FDF504C0AC62302DFC8BAEA4FFA97820B57A77DB8FCFF05ED00B8AA7347A8F9 +161: 3C1DD10F7DCAE111DA82BC7306E230B632DD0F9E01DADF93CAE02DFE77A5279C +162: 3E0CB421A440B65404E647444BC5F953C17B625CD7A8697649B56DDD41039FE9 +163: D6BDA19BB5226B9CB27624E1A85B09282F254318DD3B53E385A0C5C1045708F5 +164: AF7C85956E56D7C835002A80F4C63E5D57E724A852DA3B8ECCD60B201FB8283C +165: CBF8BA797D8759F4F1027971325D7578E5B7C5372DB230892E5E99D931B7497A +166: 52614D2D03741BD372BE7595893166EEAC8D13B7507C821B6D5AFB9A1B233509 +167: A9369AFDF31C080D94F35E73FCB7B6835BAAD7888224E170FC3EAEF3B4026458 +168: 7C248161FF7B1A21EEE44D5A60A4237B4A9F3247FC0A519EBF4DFC165C67AEE0 +169: 9AD8BA1036DC3ED58658BCBA3C18061A7F027E26A8CD4C838E9084A045989CA2 +170: F48906B1852A988D6070A1B5CDFC2E1CBE295217B4FE1D94B1E9A65C4F2FAF19 +171: 0DD50FA788B20A9788E76D10342E398E7095AAEA11C759307CECB9BD846E91FE +172: F9F0ADD2CEDCD4D376741A07C530B6030A4A3610F2DD7ECDAB898118248E1F75 +173: 24DD0F41BD9636D959065DC0315E64DDCE95738CB4EB90CAA74BE03290CD3A40 +174: DC9ADC7C7D69617151F76AB75BF851CD54797DE4D90CCA0F67340425E1603E9E +175: 1401A7D314153215C2DBF25B41CA224A3A27CBC39A76374761319D1A7CAFB463 +176: E6A57EAD08E98D535761CDBB160EA13656F23B9760FD93F6095FED19E3648011 +177: FDFA142853F6E104E26872F40EE1AB57D5DA5DE9CE08F7326FD5C15AED5AD6B1 +178: E90A354AD2DB7D682F62ACD9A5B75917386F200EDAFD7C9F0DF6837C23144BE8 +179: CB25CC7B01D042A730794C0EE610059F469E999B9BC641FE8293555B89F3B015 +180: 5562C634F2E1C294069BBD12D44338DABB0518B21E62C8685994298B41E44D07 +181: AEBCBE009C5D6D639D7857DA88AD5F20A9B8CCFFF405D6C0F29BAF50BF00A206 +182: 503CBC282FF75F2A7DE92EAAE48396C8EC5DDBF48A21770F04A0A60B66C7CF09 +183: B87D972905E0604A5BA0DF448870F66015A30DF7C6DDE7682D6F79E8D313B83D +184: CF6B864A2E53E537BF87CC32061198272036723098F0891EF4E8AEE561E89069 +185: B9198B4C8025B49D8BDA72671B89392A8A4D8845CE79025EA3015CD539F2BFCF +186: AC27C2EE2D6C7C2D45B670050B33964149F14F9108D139E615D90B9261AFA8C9 +187: F4DB7AF3909D161DC6213140246D57590F23C86657E726CAD85C21B6FFF7AD09 +188: 38AA92E98FB4C6F98542496138A076320988932574FAEE2BF040FBCFDD60B693 +189: 070A3F8627A515FC1BEC92186D660D8CDB6F5778CECBF33506ECFBC1E5400A0E +190: D3780DD5C62EA78363037964AD68EDA5362E8AA3B7679D6C6C26C1F0ED4D5884 +191: E8AF6E7FEEAF5F1DE4B904F2D4C4499EF5249F704BE4CA9B540B3549BA007F5E +192: 5F34F18A4AAF3B9F4F646549CD96C154358A403865D497C85571A0A7077E03EB +193: 7E443D2AC1B19FE376BDA10C3D31FEB9039442B6872931F5073DC2981484CFA4 +194: 59A92EE3CEFC188B013412DA75A59951E0E945F3ACADFB4C6FD22F0933793F1C +195: 3876E1CC66B21B9250416D8A7CBE554B6FA61E02AC70A7392938D18FFF09E6EF +196: 44D7ADD7CA5152AF8D9CEBB58253DEF1C39951D1189C9947D02167DDFC922DF1 +197: C11EB21A420DCE67B467245B95AEC47B4C40EA2B5BFC35B5BEF07E8C80668B9F +198: B2A180A0F912A7923551DF1C4CE7B9C90CF87A4CCDB0AE4C210742B1A7ED3D7A +199: A11B004FE0A23CB1F54BA33996B3EED22DA616451F461F44C09EB01BA2BFEEE7 +200: 7EFA86E792DDAA6D10AF6C2C3A27FB4EDCDC605DB11F76D9779F42D485B94211 +201: 46EE4AF99A12FC546A85D9E58A6092E8F6E78FC7014FE20F2F39521E0D2D0AF4 +202: E0D145FD4AFACAE2ADD87D9522A3AB77FF37F0E66A888C3DADDE74DBCB412684 +203: 623DD2D7B396FAF9C283E6DED3B9AFFCC79D13DBAAACD82A71C19DA9B4537215 +204: 67BB86B0689AA3095811EF9EBA3671B3CEE163EE528FCA81EE1247A752F5B11A +205: 9424163ADC8543A5C6403F158AC85873480956DCA34858F40149C939396EE6A3 +206: 5282724162B1661F158DB6587E328DD04FF453538604FA5DE3A80B5C29CF6545 +207: B103FD9C2F5343634F5805BD42561A6133408D7A922852627F3306A2EC6D9106 +208: 32706E4DDF5A2B907F1480B9678542891969DD3B7B7936AAC47A240BC1A51B66 +209: B6653AA2B3B78F3BDC9E06EC471E39248F5D3B8BA9F52C1DFE6024C41AC71B95 +210: 5342C7BF84541ED96233EBB89C53E27AC14C29D89C6E5782D2161162EA50F9D6 +211: D388F59DD69ABA52BCD11007381C00F713917984D9A144612E13CC2C8CF115B2 +212: C0C16BB30E0D3D31DC0446915A76857D1C27D25D17D03AE9927AF918D07690B4 +213: 27E8AE37383AA1D694DA48A8DEFB40E2E42F7D31913019EAF789F7E6F9663C5B +214: A4E87F8DC999BFA61A0465C709A26424A7EB818E5FBB410906FC0C83D1FCC84F +215: 379CD9ACA503B76BDDBA948CAF3FB82C1592EE5D3C802217939C76199BEF3904 +216: F19DABCD220AA5E5E98AF1131F9EC102DDE4789DB4A38042928585321AD40C5C +217: 28B21329EC4B3CB8E0EA6746A5CEEA12791296CCAA3F97F53D9F6DE3E7BAC66D +218: 388CEC5E252477AE29B23EF8C4D5CFF1BB843F2C192E04C5014E92AB1D5017C5 +219: 5056F18069B17BFED7B61FD337086FB375A097256DF36C37D60E8A8F0E01C9AA +220: 54B9DEC9696893B55C43F470BE594B9AF87E141C859460F7DA90FF112C429D4B +221: F85C7DBCA458D5A3AA22E5E44027DECE7D75A70DF4AC39D86AA6320212045A07 +222: FC450EF487E482BCDA6B79B6F88D77A3066694DCFA89DA79A1F26076D73462A9 +223: A76C7C989685AA3E508EA2DEEC1235907F6821A358366522EDD003BD20C9C199 +224: 1E340C35C5C6EB2D6A62164DE4FD99842E92566F5CE4EF1F0384DE876FBB05DC +225: 0B1FCB640D1CBF4D9586E35F734F6259DF1EA2D372CDC3BEF62CCA5A52A8DD22 +226: 0F84DC8527810DAEB94D3BD1965FC6F77DD55675431432301C84FD80A61F9DF3 +227: 1F3DA5BBB4493E7790663A708CDBA1520166649C2F7CC96592EA32717B056994 +228: EEDCC857926971C6753D1D6285E05B528C93DF22BF2C34667E0758B2A280A023 +229: 7CEAF3F9A496F48C59B36CE8227BAF6D77F06D0221FDC1824508A6E22C420A09 +230: 1999B52C1BBE44FF1880482F5C1388B97C054446293D2CCEC1A7DBFB41A9D5A1 +231: D854312B1C7D31FA1B05361D9A6F1732EAAAF2D6489869AA5F1F007123D3064C +232: 205821682182D86398E9ED127B1566FBD15EC53DA9B0848C44BCA4D1A7E0C2D6 +233: 8A187B6F5296DF4474F76501BB153706EAD16437C07B93F8B402C9064A9F2C56 +234: 295F177719C762667615E2F0BD877AC8D335B972C73122C268BE3781EC73F877 +235: B755C081544DFFB214E159CA9EACF5B0F8D832D66600C8FCEDA81E7BF73BB3E9 +236: AAD1EB3F56EB324BD148D11C0D30E73E469E5795AC6E5CF316963FB6D9D56268 +237: 7F85ABC4476718C75AF6ACE5E23D81801F3BF1C5C1106EBF166F93929DF1F5FA +238: 4375AE509D1850EBA1816CE1B0F23D5A1C88FA91824265E7471C30C51C8387C7 +239: 0C42D27AA14279BF6144CF3017B436E5926C857CF692F12F0A163F7F1C1423D6 +240: F48221F68C29DB5A0FBEFDA5A1DC1449B7C7E8A31CB667225779541C5D0D0819 +241: C73BE1389C322116F57610ECF2EEEF4398FEC3691EF89828AAE53FF48F9B1880 +242: 53F24E53C474E330ACF2AD97CADD0008BEB454DFBE95D014ED02E56ADA24D354 +243: DF2DD00644AEE3AB992A8A035A6CA1E06104CBD8A25F9091400C7B3F6BB56051 +244: C9D71CCB24A1CBB0AA78C0EE036DEF475CCA27DB5556D46CE48A9F1B7AA23707 +245: 2FE92B5B626A9CF044B8F6B05A8D4863F4C330CF2D617A1DA393CA4DFC6EFA54 +246: 2F77323013D451A104E704D5FEE77ACE42264CC12B1211C51B56EEA583F251CF +247: 95CA18CDC55CB5D71D9B115225DA6EA45ECD52C40063A4021216394917D59486 +248: D701032302AC49213B359D36942AE08FC0A8214AFF5436E637F6FF2400F9A693 +249: DCF14089BF74ADCDFC21F9E7A077673442AC402B6BEEC534DA9D33BCB88F4240 +250: 29F98AB76037295069E290227B73D6AC616511D9E184B6DFD8011B19FB804B7E +251: BF68C07AC316F6995BB27EBCC5BAE4F3223F9E19B286C467CEF3A5C7AF82013C +252: 831507A1E5747CA5F7CF8FB3760A0934B8FE1A2697844BCDDC2D6BD5659A9D18 +253: 266353552C65FB658782EA5FAC93F3D849E8D9C08320A339F7ADBCDFE865D5FA +254: 1F5A45E4B8B2AA9D2F17686BFAF092ABA5A5611E02DB2D9322F04F6BB4D6D5BA +255: 37ABE39ACA0BCAB14D8F5D2CFC80B467260D2EBD8DA8F1496B4288F3ED807642 +256: 3A217E5A5BC1C3F7AD21B4441A9D1EADBA6E7907835C152A86319A96CB197160 + +HMAC-blake2b-384 + 0: E2EFD6339FB7959727D9394D3BFE5B2B8043C2517755C8ED4E8CE1C4AD4D9B6F594755BE8ED6332CD2D417CD60820EB9 + 1: FD62DC26DCFD3869F9845B7BC4977C831FF6F3E20CC9791BCAC252C6CDE33F6D993A24015AD1DEEA622D8F088987CB35 + 2: 0C2EC4D9B0CFCC5BB5E2137ADFCD2F4429E8945383BAB333F826302E129C446B8CF26FE463BF743B4311E439B0A8BED7 + 3: 951F25322784C0E17CC3A62CFD3E6B99007B054B388C652BB27A81FEFDC4630F38A4C32A06FDB5867F995D4B9B0150C6 + 4: 8F3DBEE1E20D7A77311B80EA60AD0D15D42CC54DD20843C796D924830D5E9962A017430A7C376DA09D9D83CC9C6621C1 + 5: CD1C60CD6578E8DD546E4D483784047D17579685EEE611C32117CC66549B8FB43840BBA4ACFA29F6DE67994DD27F2891 + 6: 14CB6315C646EA25FC3A8BF9D4691A556EDDA84550A25A1A816911247F324C36A5670F2BA6E59AD8CC4A1C30F80ED48D + 7: D0250AD3CDA040D2911A6838A0F35BD6C2D4D19BF39F2323CFB3FF59CC6FCC90218FE5EC06EE52D2C91DAA4C4810D479 + 8: D8B4DD44DA0D235B67834A9EF3AD533F0E38E7EFF4B1366D23217379430D84F6115EB5999E1EACCAB9822039078F6CDD + 9: 656F582FC042F2D574F26CBDBD813F0D8E775B6617A704310BB217195FE11CC8339447FEF682B5576EE09AA39F452114 + 10: F3A8E62D047926615BEA73DFABA6036AC1F5AACA8EDA40F7A30AC8E23429D32CCD6EC3B5E7AD488CB9AD75AA95C3DF86 + 11: 8E356BB747AC4AF327B979889B7FBF3D70EEAFA6FB4100F353CE42894DC97DD2A295D8128339B7742FDEEFED545532B4 + 12: D711E147489BF1418BE3637806E2421564F56DA8E8205F3E3707EDC79FB4EFC4B552A3DBCD498D556251D913E359783E + 13: 55183AFE384C4ADEC219E10448977E93A720F06A26583107AC624021A2C3BA3F0CE6C694D8D69FB4C357420666F299CB + 14: D5629C962AAD7BA82A2076A977B736462A4CAC3D5BCEBEE944DE43586A0CA688BBD3C6A7CBD8743A7E1CA06BAD45F2AE + 15: 60B6E1F3D563E2AC844F4F01807DD6B37BCE8E89920C34B3B24D3D30559C25ABC5C68E2A60B0A3CA6F4CB51C0DC0FDA6 + 16: 2E21AF74537A5CD07C9CB69E02CAB0EA59D600151F3E3F8CE8447FC0A8EBEB8A5CCE2E8383CE4DCA5CAF7F56971BCF8D + 17: FCE5B5B9391E25F7C71804426ADA428779EF3E67425B73981D04EE9B12AA2502BD0E70CCB126F7DD1AD762BBDC5D66BA + 18: 8295A41CFF43C778C0830AEC1518047B51421EB215669D0579EB49786C2421BC2E30ABE56F1207F2309064B21FEB106E + 19: 8774D065D3E5C1FDD7B9763F64D0976AF704A45AD75C9E647B85515997DA5DEB802598FC6A2B04E3F7EE1124107B64E4 + 20: 7358E8FBF71BC83F52544FA1B41F22BDD7D675C00FAA02C473B2CFF4DF582EF58C1E11D04DB173F821C429AA55DE7A67 + 21: 54ABD134B7DE8B9741C505C6E71FA0B10E9940D4A62E4D66F61FFB92A781DF0A3E63DFA99C8CC7EB151C006D25A128BD + 22: EC04EFFEF79926F1520B7D70002CF4ECCB5E8939CBD9F63D0085012D064AA4FEB5D9C67D9C188998B1125D85EB8CE6D9 + 23: 71DFB1FF9D2D3B675C36346CA16A65E0BD00A4F029FF717BEB993D08B1ADCB540E3D41ADF0DAECD16D978DD2E7CDC886 + 24: BD7F33F6E1E572DEE240B05987B3E6D5545B75E05A3E8281339A50B176AF9E89559FBF899F84C45C5F786312E25F0379 + 25: 3A68CCE9E521FD57507084FB92F35D077A56157FAA231822A355CA576EDCAEBC0F7A3410B06BDDE917077698AD38EEAB + 26: C53B66A6C2A6A951537DCB2220748C965C2A11A9AB2A99E15F2994BD0DAE3F31816FC66900D27C00D1FA643E565A8E7A + 27: EDF535F33B45509BBD1302681765E4EB60DFC2561C6372A407A30DAFFAF49636710AD6CC3962EC7AAB239A91B1B1FE5D + 28: 9501840F8943F6B671956D1FA8F1F0355AF41E5ADF88355925820A19A82CFD94D0C09A56F559E769A1249A3C26757258 + 29: F923B9B2F79FFC3006FD4772E22319EECAE52E5969160E8FCE672D4463BD7AC5CD6CDE6FB055A57E024B1DB1CB7A839D + 30: DC03F6713B343E5B3886A224214783085FF487471744C2077BB9D2C19512AFF81615D88DFAE47610B8F9E5C2E953F856 + 31: CBA5DD27F5ADB6896E182B8BA92EED8E8B52CD2809F2694E20EFEA37C09396B879AA0865F08FFFE79161381B8260C0F5 + 32: 631FA80DB857E519ADF0D1F71C120A577A861F8492220A33A884B3FCF56984A124ADA91EE45CC882AE6DBEA323116012 + 33: 8378A6764A26E8A12B9949C106900F02DCE3E492E3EEE8E5B04C82A2DF481C7EA56D7866965814CBCF26A9F793F84EA0 + 34: 4DE1AB2139C4718278990A935A27799E0E4EA9C8EA887D3697F7CB557B84A3B2EF546E96BA0827C103BD1476438F0EF3 + 35: 38EC7AF1950EC2AA8DD21239B1A47E3D6A12ADBD9A6EF4185ECB08BB91832B3DC8B1B8047E2806F312FF67C478FF8201 + 36: F319814A42B9EFDDFBD646820BA4D5839993B749A4C46D3DB4F3D7E60BEB7E865FF86E2F67698F507DF6586643F234FF + 37: 0EC1F4BC8E7CE1CFEC574C42F2321B86C99D0400B6EBB1C450AB6580DAB94FF55433C96874CBD42479127DFD901FB0B1 + 38: 79E1E5EE2E7C7AF254F5909D782424ABAB27C2950F88A9E4C43F9B6A9921B52836F9C8C81968E1C4777B34EF377B8F3F + 39: 441462C5CC0C88BB195C16FFB9EA98C0C11407CB4E8E6DF54417B6EC0348489B2C65CA9EF1A915DD8BE90EBCDE868286 + 40: FA3D1D50BAAF3D9D76C5A7A5E04DB89D87CFF66520B08FA494BECE2B9719E42512C2C486248679F29F1011DDB966EC7A + 41: B8BE44C7FEB0B1FB157C53EC1312EA39E946A4E18E8CC36B844CB56EA33414996B9B6EC75A32347A922A2C42DB97759F + 42: ECDD3FC94B8E383C630E10F898F5168EC45535296486898AC1DB918B216F21964EB8AAA22F7213E5DA541DD814EF5DD9 + 43: 3C8829344F9291A7820FB6028CE6902C1882B02F5E9CD953795CD475AF99424F26A46F191FEE305C91B3D19F9D0E5893 + 44: 1FB699939257BFE62AF561050E015C8A25F1517BE45FC7D09D8AB6F9E7BBBD731B6F8E3A37A7D0E9FC53F102E6B5AD8E + 45: 2924B05C3BD1D90F5EB35CC80294689BC24438C953133F0A2952E633A75C66A03032C5F7E58687A88F6DBBE28F8231CF + 46: A504DC744A59DAD43D39C4BAC7D82242A859DF9810A2E4332FD5B92E251990CD2A7211872A3F8251C225B6EF29810114 + 47: 6517D9EFC8D9913A9DE719B19956C233636502B227D40CC392CCF701B04AE380FAE6267F7FDE2DE9ECF52BC9FED82C92 + 48: 7BCC833628CBC705490F8F78D181F44922B87397262D5F733A8734BB2CAC417505B1298E66F91AC7EC528A51B171CC40 + 49: CFD45DD9FA9F81998DBCB5D4E8AD4919E72F5B45449772F4337B1196DB3B1EBD88F5F386771E130B442EB76E8102E59D + 50: EDF591D79A4B8FEEB4279A7BCBA1AB707807BE65F1C079E220889E02EFCBE50B875532DF7F2632F59DD84C67E67590FF + 51: DA6D781D7EAA9EF0AA2EE8B37CB3053720F1854CD3C52042241D2111DBCA50403897741F2758340033A4D5D9829F3873 + 52: CE9ED86F39D72B58572887E90AE9820536C19C83FDD6331E87E9D7F4EA8C30E3AA73634B37784A9105757A1DBDE3071A + 53: CFBE3DC40F9DFC95C182EAE98CE49112EE1B53039C8ED5CFA4CEA89EAD3C4704E1A0BF10DB265616D3AECCBC7E882376 + 54: 75641A027A75259077AA0C2A88CC3E2D3F080FE85A4BA57BA6E1380CF706AB7483A186E0C5D37A0DF1001DC019FB23C5 + 55: 0361A72AB610005DBF2A462CED61C373F2F974A198AA48E0201A10866263A37A2E7BC1F73F9CB9A01AAEECB87A5F2063 + 56: 79F4CB0E66F83D5E263402745A659D01CBAB5FA3445837DCA117DF8BFE5404BE3DD13991791C3D95282F74878DF48D79 + 57: 588E0535C5AD19DB03A6B372C961DFD92780AFCCC4EF735F171551403F5DF39B3864705AAC7EA328C0D64142AD74691C + 58: 37225AD3FE0A9D2D1990AB1D3BECE6C8F2C7A33340CE9ADBD07808118023FF0F586136D44F5ACC2866D5E4FC9B8AE697 + 59: 414514AE03092F33676BCB4AB8D28CDF2922550BBA91C817D84FC09A172EDEC6F0ED39917D0625C039CE6214F2DBE41F + 60: EA0B5F0ACD91D5B69E6BF1F63C68196F83098CBEFBBDAC5658058235C792D23AD36167B8F55DF80670B96EF12ACB29E5 + 61: 362E8BB7017240FAE5A2F99A5EF1331A725A9DC6BF56394328712018946EEC09283E883E784E9809F8A78F635D7EB6DD + 62: B4354FEB9077B24A3EF0B3B81E61E3E566638BF565E512975D5FEDF5E4799CB9B81FF63E50ADBBAFFAD2748C8F2639F9 + 63: 9AB65961D0469D4589FD4F9A48963380A8B17FF59DD43212F1A00D77FA2DEE2380357CF565E0529B97486EC3A2053DF7 + 64: 527C5B164C63EFDE3A2E939770E090FBE854ACE750CAF785FBEDB0372800A2D46A3F0350B9FF16F41C9FAA92531F01FA + 65: 035FC236D413F377297023DA1D546EDD411206DF534B84A92E6B9BD69F2E1F274A16B0DF4748415538922FCB7F79389C + 66: 8088A71692CAB6CD37E2A42F45FF42A3544BD46A6D15F7F5387F330BF319BB471C0D35F3B0A8D6432D3A8502E425C125 + 67: 7AF755B9F4A083A3CAA0FBEC99EEA92605A1068D7558A7F0FD9D6DE307373DA5914A2F9A0447477B53A5394C058192EC + 68: E6147AF3B75BC28BEA40801A1AA392727C2E5316B689497A1F4A1762A1C4B5FBCE6965447B8DAB64CCEA58E09FC0952F + 69: 9B6E4D670B58892239F008A36B5149AFDCC30BFE06DE660ED5A753601B24DCF454E9AAE4916FA01256F30DC6E3877640 + 70: 7C5F4C73736DB27312F808C82A2198B43B2383DC45C7CD2157A007347A71AC720B670DF8125DB55B483179207B2EFE14 + 71: DB313F2FA18EA1043352BC51BFDB34979EE7CCB2CC044FEE81AC6728CCE3F70A1BBF09B5266CDC3B7FFFDA5E4DE03639 + 72: 55B092DEA6591D4F86589EC88B141171D5FC0CC84CC228A97B7A6304A0883B12917FB8760AB9F60B94E62AC1A3DC103D + 73: AEBB75AF53EEE9308955252437EC885AEBBE0478438FF547872E467381D0BAC5F4BBE4137FA639DC50B24BAD50DAB32B + 74: E340E236ABBDDCFD0C0A1228142598FBE100C99A0589D0CEE53B5D40DE3517F9B906AAEBAC2937911F226691E211F751 + 75: 736F6C28068FFC1D44AFE915EF2B2E7080AE5D7AD12E14F6E1EBE9561898CF3B2539B5975B59D9BE7DC5838D9B914710 + 76: B05D067F50C57324684DB5496D4C562C4F924C183366E7AD758C860A96674231A85A2C5677DE42166EEB1FDD46B761F1 + 77: 5D452939CA0ACC60CFDEAD461341E5156B0AF6C60246A57ED74B58DD7F56FEADB3ACCBAF5E3F1CCED95117E6E863B4E1 + 78: DBD083E3803651EB26A8B3BA59CC305514C431C9B2E6A3E5A856AC1885743F4989B8ECA528050881F78318F8D0A729B2 + 79: 9161AE833EC63E004C746C22424BF948DAEBEAA4707AE86E280B8F862B0C24CE44E234238AC0908A249A2D1BFB5EC0EF + 80: 471482F5D21D9A9221A48B1DBEC3839886A6F5068A34B71703DD17B3C3D2DEF2B75EE6C4B4504111CFD5FB3DA053A0B0 + 81: 44A184362D8C177EA74FE67EB320739A0B925FF2801A18311AD66CFA278958AFAA33730332FF77EBE365ED25746C5321 + 82: 7927B2779A8D6ACACBE4358424CB3C64F2EA07A80E4DD285357CD419323A5881772478C2F02FEFD75ACAB12D08AE2DA9 + 83: F765DF552FB090EC0F8B09213956F33A06B431069D21482154697BB8B12610C33D49977EA17197B329605042CDAD0939 + 84: CEE62CE137FD4BEE1D2AEFD6960570381215A80F26F64B9CE8E5B14A856E709A73E4FE49992305D85D049990833E6DF1 + 85: D971969FC958394FF1EB2EAB642F150215B299771545F8D284A0EEDE5D682786342583E10D9915F1DD52392D856E3A68 + 86: 8299EB80F7BBDE6BEF9DF9C672BCC5D337159BDA98D31ED12E05D817FA13E845FC6DD35474C5160F6750FD588157E6D6 + 87: F0AE246C4B3F76F5521F436E520F643549172A6EAFBBC4936C9BC65C9BCB08811F49E4A846948E487222AA50BFCCF226 + 88: FC3F42840F420C1600A626B62EC755AA0D9132CDCA6DC813AE33760BFEE7F7A94AAE90A0D341E192BF76E3F9D0EC88D8 + 89: A180318386F38442BA5CB295DEE7B141E14AE9B1F92A4F9FF06ED05A7E79845B4A3150666E1503354E4EFD3C9570F3E4 + 90: E8D9F18BDB8E8352629B37EF7739A8BCFBBF6AB3A45F0C6CCE01DAC73C2E4C8D509496910765EA597D2EB30317B665F7 + 91: 6BBF88EA3C5F2FEF60C3EBE7FFF3785B408ECA7DB302DFD901FCFA2FA62A79BEC17CFE5D5C77AC8F38BEC89C93CA5CC0 + 92: 8C67839CDAFE394B0FCA9F451816897BD2DA79D6239AC6BA3EE2814200D397149139EB0AC9B40B463300F4DB17D60EE8 + 93: 8C1D27302D2E863724F2A43CA315E116875BD0EF5763BAAB6BEDFD4076A79BFFAAC92C58BD0113DF2A06305050A39D6F + 94: 680A61EE50A7EE05C3ED32978700EAF343681D1D5C4DB809D7A57F2CAE74DD2053C95BDC4B0ACFF8237F523C23B19F38 + 95: D529A04670F78BB2534AF1DB96DC30089E008C4288C5DA568E86DCF03691D3C3598CA8D120D62429B44FBC70BAE524F2 + 96: DD92A0E9F336F5DB5FA020AAE917DFF397DCC2202207FC740A9524FFBD8F526D5C263327935CE661631FB94D4501E2F9 + 97: 5913C2E17C0A96E6DF7A7E96FC9BF322BB9F7AF52A854561851DE0F1B3AD1BD34C00FC64CF1588084B06FAB7A7050892 + 98: B451025F6B29E5BD2706DB48C8650BA52C09FDDED4DD10354AA7B216DB0CE892ADDACE734369D06A70B5292F60E5BBCB + 99: C734F13F7F8A7CD01FF83C227AB3B7610D1A0C2E9916E1581FC742CD48DDA5939D054ED3D8A9246C2DCC50E65188FFEC +100: 9D5FFCB1CE848F3625A19CE0DB23CC503D4883080A01D7B66AA259FD5C35C72DE514E6606827C0C9533031E2C43EED1A +101: 8A573FFEA77CF501014B3B9221D6F99F8053CD21AC1AE88BA8B14F021AB746B3B8EC29B390A8118D3DA399F9EA03BFCE +102: 41EAAC7D7256DEEA1086BD42FB9F5A56B7DF5A72B421B6864C24E4D8A0FF3B4F0474B3F0D9DB8B9C6B4B6D214676C297 +103: BBB30E99F1AF1FFD99F379794F1E648A0BF31B0F0BF54BADA75AE5805F56A62D8DEEB540D836822D958803EEB7221BB1 +104: 701454FE6BB3D850425A69EE6F704066D8B2B0C46BFB751F8326BE50B79976DF6BE26D531CF0E2AC972AF7CD38A90075 +105: 3B740773341FD606188A15645D651BAA30B099D118CB3AE776A90DAF104AE909D2A600C2E3913E40151D7C181C94390B +106: F8745B6F95C5C1C6FB38A5200BD2A3764FE204D95042D450BE2D7FF736DB233277091873EA3C6D81E6DC0474C6E62D41 +107: 8CD48174E2AF8284AA1F9A9CB6A292D34B6033C131C7B515A76B031BCF6FD31D61E1A741565F249DD02BB8B261501364 +108: B36763DAD5203A088DA3D7FF5A0EB55395B2DF84F9EE9F80D026712509DCEC082658DA4F1EB56F73420445BFD7247360 +109: 24974EE4EF4FFEE37AF1468F0344510F06B3C70D144EB104C65F6114068CF0B0511AABB683F272831CF07E843FAA2675 +110: A4ED01EC7592E6D0098B94C6127DE2FCE4966A3F5DFE1B8BCAE3753AB2F35CDC5A5E106708ADFE841FBD05088634297B +111: DFEAA792C52A87331AE508DFBDB4F22BD78A4C8EA7E47432CFCBFB5D863C73967CA55BC08EB8A29B1740301D4C8C020B +112: 634C76310A58733639B2FE35B9415B44B48B7B9EAE420CF7A726D7F2A9F709B1656F8F2299462006DDCAF9310B642313 +113: C1A3D84BB1EA2E84D6F5E7D9F496175B03F4836ECEC2FC6E3FB3BD6AFF10869BD2DB83340CC0583D76DC6C39F8F2266D +114: 84866B02820563FD6FC8F0F7A207D0A0C1F2C9730B8EAD40538857BDFA430AF4F38CBCBA18820CCB9EF10CF280691EAE +115: 9027038D0229A8492D1860E324D355E0BB0213065267974E535E8B1C717B43A390849010A08F4E3BC17470E1F4B8DF2B +116: A11B02D14B6245A7078D014B3C1414D1AE525197562AC231BB65E657AA4C55D8B7E3207F05235625EC978F9E0F66AAC2 +117: DDC3FCE5EC879B40F357383EE8AF8C03E7D5D52D973AC5001C100F203EEBB50CC9079413F35527D7BEE94ABF9A84E111 +118: 1D82DA0FD448E244CB1D0613A427708A7112BE6439106D82C55BF43A9A042037A003BBFDC8FE3F0C441CBB86AA15BACC +119: A3FBD7034E0ECA79C7A700F8172C5EDF4B7744575EFF569D0BF30F3BCEE4FF7E840983314503134F0EB3195D84A77576 +120: C098DB022B3ACFAF41B8F7F80CB2B9342B92D5F29F0E7D4C94B3766DBE9199959EA26C918C9880624AE5BC397A517368 +121: 314BCA818DEA9348AA65C7763C2AAD9AE264EAB16D703558C02FC2AF51698264C931D7043EB3887607134939013512BE +122: 089ED8BB4FB29435D5335F69EFD141EDA4AEDE8915CFE9E977CA07BF4013522D033783BCDCA2383A78AD6A845454F39A +123: AE35563CAD3B5D3C89460738CC67CC5084C1156F4EDAAAA392528EAB775767BE3D170E9BC46727DCFA92D3C01020B8DA +124: 7C9DCB28F423EC18C5C20A5382C8A9156C66418D5561EFE536A075783CFB575451B3C8CFF49CA0227CE10B89D5E11832 +125: 727C87FBF18D07759FC2345521EDF2F2E6C2B6D6172384AA29AFF14B35DDE8C7FFD317C98067686F0E9D2E7E92DDD8E2 +126: 91834D962C8B21D76488C34C723D54A9BBD8B8221146F47B31E4258540728F13C562A7854AE441D815F9F65FBC3368D9 +127: 1EB88488E2E551B7982129358B58EAE0337CC576FBEAFF70CDB61B6D6AB3803EFD6BC54493625CBAD64C282DEE0E7858 +128: 19ED96EC83E9E28E9404EAA475970BAB64DBE0896EF0DB8D95EA616BE31A45CAC84DAFCC8BAA70755B04F6DC0D945021 +129: 2054B86EDB891F52780CD84FFA0EAC642260BD8CA09C918D1F71FE3C27956813DE031AB48366501D5D9E0CB65598A4AC +130: 4257868D9F21A3E2BAABCE4DBADB6DC3468300816EB50D6C58837B1FA4A304488AAA0F5D349B258F7078D11616B41789 +131: A755057935E507328C1BE2C725EB3EE67A4FB717FE606FDCC0DA64BE7C8838377980D86AA5E97E201C2F01215BF094BA +132: 42711D9C6AD4B94ECCC7C533EDDB55946535A448924CDFFAC10C0BCBAC306035BA1110128A189C03E50DA32979A97ABD +133: A821B802D1AEAFA0F18A357667D9A1DA42B4E6B2D282113948853EC920A00B0A72EA4C03565D2EC8DB1512B414A830FE +134: E2AED5057A1575F4585931DC8CCA533FB6968874677AE582341B36FFE048E827B6E56446172930A54C1E80BA7944B921 +135: 7E9DB44CF172ECB6098D18BF4B6C7AF30860CB188E007121772C025698869B44F4601EB19F4ACD729CC53020AE638F4A +136: F2070221325B3A7EF6C293D72A424434E7CA170D692698EB9B579709639AAAA6A7A7154336BB10A476E97FB4ED6C345F +137: 31F32411B9503FD8CD62EEC12B918983C54362B37C7D6F5ADF83A567EAA07063831AF2CADCBE9A111BFF5161AD51146B +138: A85AC180EBAC3E1A9618D1E0EEA6B0DA5B27C68D2D88E295E73AF0697CF2D3B885C1DD06AC5BFA70DC6B9E0F965BBDC3 +139: C42214804ED73A5F1FD4A338551407B6D8360434B361689BB52109A599786E9421E90DA2815117E541D472FDAB15C42A +140: E539B20117D2CF436BEA76DFC2188DB326F934199A80920E20AD586CB509590DFC9959CFFC19DBB37908810E4F2E9512 +141: B74FC4881EF4CE3E23B82DEC18234EBE8800F42346A817D981F89B8DF36BB9F0E1B487746D9167574B8540E6948CBD01 +142: A71ECF63F4070A97088CE45B133178B1F016AB4EB1E1492E9550ED1F70A9B6F93B7B465F06BBF56459D45B92C08D7DAC +143: CA3B2259775466D0D61600405AAC2016DE7F429DD0CC38A53033038EB3C0E5439D94CA05086E0788F1178130642D61C1 +144: 8FA70E0E92CD8ACA06E90A1ED458F855B6E34854864B00CDB3C8A4B5C0580F233DC0E3A0A937B3BCF73CEFF9F4CC0FB8 +145: CAC112F9253C329E563F39234C60D0884C7134151FCD223408FCB170F2EEFCA99DD44DBBB52EAC3EE0A6462607D715C7 +146: A24082FA7E582205C3D5FA5C7EBC59B4BCB8B186967A6D452CDF8054DB66E3F3886EC2201E481AEF11D52D5D3904F51A +147: 36FB3AB6EA1D963E78505810BA6DD59E6620C252E36C6F67923DBA86FFEA645B6F66E01D8DAED25E4770EFDED3A56D58 +148: DBDADEDAE3CCAFDA613FB76E3A226B6051DA4EF8E3573F8A58812263EEA08C5AC2A0EE9B0E688417AEB2E46932382E15 +149: 4E464DAEFAE2FE0BF15713A05BB2F1B029A30CB02FF310D38AF90061CEBD9B58990265AD11515D6E6582480CBDBB6BE0 +150: CA8FF99C97F003EE17D0186A0354E63021B6D27C93A30F1C4C7F3ABD3DCED4F909648B16D3D5635D80D6985A4631575D +151: 61477F9D04A7D6A3CFCCEFFD2460E62B5C60E938CBB67FE615578C0F0E4D410961AC4A9541C32F30BDAA431CFD85C53E +152: 6F7257CA336EB5E1E6BE568AE1536D1A289518242B8DCEEDC4F9A25F461608AEF58263F8233C7D3CEACF7B354D6BC75B +153: 9BCD41E8645B7C76100F06F9AC3069EB27F403D2B6F1E69FAB86806EC2B822C3D1673CC4E05FBF3FEE93903D6B3C0424 +154: 69664A375C8B9CBE6ECBEB7E74B3139E9A3A3A097BBBF3CAC1E13A4C4E48DE877363FCDF907A99C69A4F52FFEAF53547 +155: CBA3D3ECB94A89CAF7591086355C79BF4DD67AD3E472BDBB7C59C51760C195283EF45A1F9A8A4615C9514A46921358B4 +156: 4D9697E846D03F1AAF7A08A2C0A9B4A9F4CC546F3433CC0773568803E050A977FA14DC2BFDC3D2C04FF29629939D02CF +157: 1C67DD9FAACE24FB125657CAFA6AC6A77D20BB6B90E5EA6037D3909283F6C53EB23E8BB55C2E67B05C8FBB9ABFF27458 +158: 0366F13C0469677D6B2B26830D47B56F2BB01F4CF46650B68C378174AF0BB130F848EB8F5960C43F76A8793C4AF1FF28 +159: CD76F0332A14D4504DAFD5A61FD33FAE07F5EFB6EFDD2625922CD34C1E9544DF8B5E5DDD9642450484729BD56D6A2746 +160: 2DAC6B918E8DD8B0D132E13A6877EA03B3966CE8DE035F36E63EBD97B8A00939B8672225394405BD3D8B36FD33013AA1 +161: 97E443DBF8E9E7FCFD85BCFB168F8BAD57E54514671EC1558815AC2DFDF9E0D4DBAD3DBBEF59DC04151B1FCDE5C7F13C +162: E56C2FE55C0D1577D6B36A6F60A32EDA3E57D42A8252CCF96E974E0AB5CBC27F235E6746B53919228BB8F682D6D5EE7F +163: 2D6AD4813885ACF91F86C480A2DD8BBE880AAC61E7158296BDA71927A2E3998E999B71707156DA2B8230EB81DFB631B8 +164: 9FEA4C7D949C7F5F29EF07DED769A6C2572E9C66199D1E7F12FD00FF08D21EF0AAEE8A1BCADCD954D704EF18D030390E +165: 2CB43085FDA800D08F45795FE6C637A5F5FC7794C37FC5C3C04403C7D4B4070F7202A7573D5CA59E6771F38CCEE33036 +166: E320A25015B14E2E8D617F79BFB84A7196F3DB1499D55072878267E5ACC39D34AFC08C18613F5EF8DAF4090CF27FFCFE +167: 29D4FFC8F46DF51A64E3F791AD25C83B0B0D371DD1866B869B8D56C67EB13518D6A4AB3AC35E6A1C2852298B46D37E61 +168: A1D665304B97463D8F8A112268C1497492279DC444BCDAF027898849C1C18620DC153A97DDD414975034FCE74E3E4218 +169: D885891B5B53C7F5BDAF932AC9D7C1C1FB3A6B70C62D4F87DDDA96E275441076BC78BD973E62710C9DEB0DA086BB6D89 +170: 655D51B2657DA6BE1DC25480DE76891D272D46DA414C42CE71DFFC7B286E338E65139E408696B6CB85B1900329D9DBE0 +171: E51462E37921130A0F606FDCEE5BB3A249B585EC58A6682E5FED0F9923B3C9A32F22662A9598D98D385C5E102A75A5B7 +172: 2C5AF48686B5E76874216A75E476932320F9CB51E9531C8A2AC6E8CE9BDA572277BA622582AF47DFFC15BBCB38AB8E4D +173: FEE7759324DEBFA2396958EFDC3160BB13C64EBE55E508734C52088CF3232AC947F33BC008C0BD243F22950C047AEC4E +174: BEDFA50FAAC1F34D293A8D98E3A4405D72CD1872374730380FA3B698E3442920AD79EAAC275CD677019F0D1DDABC1294 +175: F56A79F5B5E92A2A5FC65A346998F295902A8A053A746F8510C4E69F2A35C3FAEFD5E3C67FDFB4707EBEA31F89317906 +176: EA5053634CE6D8DD0F7B79D8ED76D5F74E2A431F030D8D1316BFAB2C951CE16BECD0F64EB658F88BD79D516D0467AC65 +177: C8E5C1CADB69B1EE867FE5B04B45E9FA902DC1925A43485D85AD4A277443C00A8F944193D82B3C7CD58D7FEE76025E40 +178: BCDC2C7F802C5BD9EB938EBC2019523C4371F880FC7AF0554A4721EF239E5E2281152F778E83CAB0A8CD53ED7FC00A75 +179: CFA7A667D2698673845AB3A9C9DD75499F9EF73390B217E705915D020B162F8C27DBB9AB86373067E7C07A3936C237F9 +180: 63137A5EB0EF084FF9E5C9D0C74BA377CD451475C7AF9957505E740EB0A92FC9AA98E9D9C6A03DFD12B28EB7D33CD200 +181: C7CE724583E363C93849FE094E92396CC84DE4E4BD044C5F30B218B8ED94507F6150F288F0AAB05E1A30819CB246C72D +182: D5A720A6565CE2AEF83F526E3F170BED3FEBAD5F8B61FC7FE49EE530E00A4FC6F5ACE0A515543EC7CCCD3596F3451203 +183: F5734A0233687B2033247BE55A785ABC456F3F6A5A98A473CA2879CD7A6C4C662AA3B2C3C274102DC86534A4523E95D5 +184: 2131B69D8CB775BE7D6A2290088673736516690CFA274133134A75CE921BF44E3AA37DDFD1A25D9ED479349F29F31DC0 +185: 6BBB74C46FCECE23643A6B84E604697F6959975F7FC2B27D11143627C97429F0D25AA89975867E17F4F66B8F14856F9A +186: F15F4198C827AD8E11F960E7BF0A4FAD2A8E9B307DF2B0C2F25E2DA96A2659C19B89E41FF6BBFC5F5BB1518E5B3F829E +187: 3DADBAFC2AB64BBD16CF0AE08F4BAE514FB74DF35873F7E49A96FE2A84B43D926A485EBFD5581B061729700A6398F87F +188: CDDE4E482B559A0881F04D6DD84DA1E66FF1E81CDEAC1337C3FD413EA870F87A50A4345C85D624709116ED13DCEB0C63 +189: BBFF34A1A43ED451B4E9C68E4399E99C6620D2686541076BA3DE9279B12D973E6056C467F8A4C3446AE23A5C261A4B63 +190: 6D0A63CC63C5B4E5B517ED860BBE4723F4FFAE2934EEB7F59B2C943C9373FDE8DBCBD325218AB377CA19EBEB3D932BDC +191: CD2CACD736EAD27492B8C3D2BDFC78AD9C61A090FB78B6C4B9116336352B238BFD1DA6C0A5093ED726B4FAF8E974E034 +192: A0D37AB9D467FC6219B7FB93D9171D0AF03767535608FFBE0A575245B63E088D3C0DF387B0421B4FB7CE28BEC98D2761 +193: FCA0DDFAB1CE1E7C30EF3B7C6F9F248C0F19E926B4E5769EBCABCBEDA8A4D3A66F344E52024F51BBFB2C275492AA6DB2 +194: 74E588693CC883FD65993D6938DC75BD257D8E7CB4E6958B4FD9A0214F24D43F08CE55AE4BF4C819142DE23C617ADD3F +195: B6945DD17122105CB807F571900C1416C3AEF9CACB76142E99A8C689CC58065E80693E0314D327D1DE144608B913497D +196: 0C58F4426E2C98FF2770DFD52DDF155F842CAAAE70FC759F7D9304C7477400EB263F6A208F1DD9462516BC27C18A1AE9 +197: F47D69B24FC88DEBF4B4060F7C5702D57AA2C84F25CA128E0E99D7DB0ED45629EE90C5B998E64076EF7BA288CD69D815 +198: 82671175BFDD5105D1C71EFF4411C0C8FF39199004D23B0287F0044902398284D6CE8AEE33BCFF12376F54FB38FC64B5 +199: 10A389495C6C70DF373C08959C8561705AB0EDBB8F0277B43E7D0EC3B6039EDC6E64BC94E5967CA05A24FCEAF312C898 +200: 6D5EE1DA84548AE17ED5B8AE43D2CA3EB1FBEDFAD17867B32A4DC33B60C937C76D27209B4D17C940C512776537951A60 +201: EB4128D7F8D3558BA72C46D2DDBF9B1569DC86ACC44AB2BF7158D9F36C85434C3C7AEBFF63F0EB5A7EC46067903AF21B +202: 068852BDB5B1739D3AC05D827A1D04B8532C00AAF960850E38B86C80CF52B78D6AEAFAAC087CDC8F95E2953B917BC042 +203: ADB26C7180B8DDD5A18A1785B17AE145EA9490262472E59B7210E456C838B02B3FF85C37396C9DD4491999DF5714EB53 +204: 1F8BFFCFC5BC86711F30E890A28EE15D628805533EF977B0B7ECDB6458CF5AB670254571244D245F20A115AA72678850 +205: AF9E79C1B7C82583172AEBFBCF70CDBBBC5A34145287E48ADB0B0CDD1494E9223B2EAE0DC5E3544DA2907924A52C57D1 +206: 320E6240B59F41A42F2E402388137E70BDA609B7FED4805FC8DF568389C7F14A014ADF4B736E07DCE3A81F62A5936ECD +207: A01B5AD0EB7AEAEC76AA74ED3FC833D02CEFBAFBD9A684A743A05EF066B5169610FF25014CF4E3C9C09830872AF16061 +208: E3AD4F0E10B9C30E2AA3A092E4F7A30A89F3BA81E1B19E9FAE6C6A5A0177AC757D6698AD7FFC783A82D73236A73A056E +209: DC0FBEF72A7825E19F0860E60F0A930DAE3110D10FDB4CFE54C272F0C21D5EE1B1141318C689525E9850AFDE95FDFD7A +210: E40DEF10CBD64A69BD099D78599260636E8B4D5CF9CF03E44B878BD6FBC40AAF723E5D2C7030F05C44BDB513A294F008 +211: 56921133E67F37BA68B8E29199CF4A106FD7433572EDC0CB6440E9EF383C4D0963EF5739C3388B7ADD10D226786AC559 +212: 05111EE07C8CA9012300DC99E2225D4C5F392A04D4577C6238B2572B0F97BE66FA51D364234BA6DC39A8720B04C0BABC +213: 779B5A94AFFBA7EAF658EABF146CAFCB0F2C3F5C9213C11FF8C776A622C098C92B97655BE378042D2336084135832246 +214: A411430E3130F45F2860037C0E2B8D1983E90E766C75978886FAA3EF890383E382FDDC9B0D597BCD428048B3CF38ADBE +215: 9F0FA131949F9F24EE83F648F582F0ED55F684E23C9D71E726B53CFC74F83D6E5A7026D0728BE1139771B4FA04C7183A +216: 54BFE6A248940016B6596A18BDA3A5992AE03786AEECCE79B1B0D4B4E08985BD1D0C23DCCBFD1B2C89D5CB32849E93E9 +217: A7CAD24AEFB8133CC76199EEE5B8C789F7B37F3B43EF0B275C777735634A698305E4E975D0348564269CEDB846EA69B8 +218: 350D613190376D013DA493FCC24C51CA33285C7189E9AEFA9961B3F44F738ADCDF8B2586E9D89775FC920C2ADC4A89A5 +219: AD0A4640DE8ECFD31F506A6275094A677EC0CB6D9541079044B43B447573461B58EAE5CDF02D2F3AAC15D2D931EE9139 +220: BFF1485E7ED73F9F69BF067B11A7CC4DB314F4DE84E938A13DD38D8F67378D0419EC3C8BC8710851CA65841F3D938907 +221: F9FB1B3A553E5C5E8A00821765EC588A241AACF5CBC1CCFC53FB67E3F7E7B906CEDE21AEAAE6746B9D5CD12BD87B4198 +222: BEFE21A4D11E36CB1ED0261EA4509BBD6D28154B1379E20FECE905398EA671E8A3B856CCEEDED52818041D33D6505DD8 +223: 3DFC0D4F04F06E6EFBFAB1A5B4F9A363920E05B7CD6634DC9B8CFBA0B7AFE3A5C1CCC259C14B3E678A047FFFB1C42B56 +224: 5E64363560488187AA20814DB407E1A9A0E725DACBDB54FEB4E1102723961D01D3E9CB4A1023D1DF8FF131BF1E13E305 +225: BB35B77698B4819B0805AAD6363F65D597733DF0BC963B682082598E8D62BEA4BEE6952600B3A2E5B03993A5074777A7 +226: 4A8A2D66731901AAC2F900F9F94E21A661A63797AE5B51F8DA52C455EE498AC85C02CB5525F1266F43FDC67C6DA6163E +227: 707398E730674378D3242D5FD94DB93EFB0D93985F28159095AACB46503C3282AE93915379F9FA9DBC366AA8B4FA62CE +228: A59EB986281305BECD1703D1B4B00EB973B568106F04D6BED0A50CEFE312244EF5B3DACCFAC22B5890C3D6BB4D920848 +229: 7AE5FB1CDA1A4D7EC9A3A377A65F3A5F2F5BC800CDE0914CF18351952F197F130BD07AD53E16F613D9AB49B03B56DB8F +230: 8BF00DEB53F777780F77FCF14A524D53E2C3696F9C92EF54A5EC2777BCDAFAE1325EF562000250BA030ADFB27ABC0592 +231: E893ECF629A4C56CB45348FBF5FA126E95E3A60A0E590E75AC5FF7DF22BA609E72B7612996A84E8699F479DF8BB19442 +232: 88133645942997BBDC2CEF36E1742959869DE7494BD334CD7FEA8C7FC736FBB61E1DD952B43E4749381F440526201B70 +233: 8D6ED566DAB6634E1CE4F84C36A0112818218F4807FB7DC5ECE8F3C0055EBD5B325D496A52142519CCC3C769C3B65340 +234: BA2E0551EFC0A796AFEDCA3DC46010BF00D57CBF6B47ACDEC02DF67ADD7FF48EF4CC9B448C2E1014BED0133DF36237E5 +235: 3198B778718E3993EDDCEA855914FFF73DAC1BA04AB4B88461478D367EC4298BEE008F124B8AA142D314AE6188B0CCD6 +236: 532CF7749CA59217C79A83552A3DFDFB0A49C568D109BE4DD84462CE6508E7D64C0C2455D583A8FDE0D3A62289BCE552 +237: BBBD757D7887BBBABD88C247E748417C99F9AF1150E863F214264573C3905E3F85D1B715EC10899288BDAAF03060C329 +238: 7016FA50616A7EFB191520C1E1C4D2ADB5C5EFB295CE5CA387D5C786EE26E04BD71F5A3E0A3DBEEF6443E788DE35C5B0 +239: 9D41893CF2B96B4F488E4F693EFFB7F8DFADF78046EDD8595A457798ADFCB93F54525D5BEF065C66DB04084D855E2886 +240: B1770A7CEF9AF476931A16FF8C75F202CD9DD93C8A0BC7253B3DC72C7B44A9A9084BF393566526672F5AB383418C16B3 +241: 0A7285626ADF287631579108B09C4A8824D26882718FAD2EFC16C52DA6572760609DC05C683C31BDD88B63986750868A +242: 3CD0CFA89227FCCABE4069EBBC1F9124589CF5746BF5E2C34B7A0117D66E03CEE6F2874DDE05F02E3C33244567BAB346 +243: 9770ADFB0521D8E48134B11130B0A3F7729A24E44969AADF8A420737227E89E5EBD3DD4173F44781E2E0AA8DBAC2E7D4 +244: E15EDA14B3D4C927A427B0965BC1F3902D30E432457F74A303AA1B93DC81577800AA553EB5A94C474E62EAB1CE511055 +245: F2CC8075B56A3E5D4EDB69BD5F4091277A8470A2212A8E38053EE2F138B18BA815BFA57FA46943F47825E0E45F2EAFEB +246: B12C0FC3E3F3E03398979D0346022860091F94F15E452B58F3FB4748A84A5569ED15A66A0F0A553F60859E8F02A74C4A +247: 9968DBBF29BC7B469CFB8F7E3558AB75DE232876807E81F350D50A7B617D823E6A3E853AED696C1B2622892277080227 +248: 7DDAAAF3991EA439E6454FF0652F37F81722C4806C643B7AE8EB4E5EDA5B026BC0B7703D065A9DC12E2AE86B65873F7B +249: 093A0374C170E26EF7743289AC8915FBC5E5B07C0D5FF56D954DD256C78B4A926DAA64C110603391B545AF1AEDCAF707 +250: EEABCF9609F48CE7E2949C681EB97657C0879DBCEC1EADDCC8DD60DE1892BC7CEE2B49F53A7875D30E6A7036D5D7B3F4 +251: 4B1890B53340E5CF63CF9BF573E61A920DBB727FE7C6218BDE80E8941F47F0A107C24B84EB74762CF56CEDE7F047CC3D +252: 2F6F38086C248DA50D5D68209A45C1E1282ADFF048474AA3E6A7B85CD204645C93014A4AF2B7AE7BC8DFC9BCE7A8CCB3 +253: DAE7D19125E0D9B2FE039BDAE417AB942B0A66C98AF0A42070AED682BC8F173689EA99A1538729937B62F4E92D63134D +254: F5C90E2C857EEB7FEDDCC8C99885FF26AC095EB18FAAAE1602824FF7A83EEFECAA577018E104EEA421660CA1FCCF2C97 +255: 0C402634FCEE1DA322C680FE914FE9AE7A38C6E371B7B42B06DDB65424062BD6BD9497104C10BC5997C78775768F5DFE +256: D8B3B2F4C0679825244A53DDC8A39EC9A6AA800EC77086A834E040FC6A6AD42693B42E6D2BBAA78F0C0FCD24090EE430 + +HMAC-blake2b-512 + 0: EA1896AB7C8319A824482F757C038B70089765501B1F8BDB78153D195915BD330BDE7A8C0FB6DBF3DE09277662BA661FDE80017DC277309EEDFE05BDF5B27E18 + 1: 7682E08FF9DFA80E3C9883FEB9065452832084DD32C72FC4815D73906701C8DB39883BE4A3B7AFBBFF33597CA3A9D7EBD34916D2D3FAAD999EC2656A210EB76A + 2: 87E79C4A27B2094AFBFA6EE60FA1D083BAF46521E03EF7B2A487BDC5060BD3D0D86E28B5762AEB0A99B79733214137AB83C5FA7812E337051044B974C67D7E5C + 3: 649BEEB90C41F477487DB04BC6EF791065BFBBE78C916E0668C32A0D8A4805DDD1E415B33FA63F11D1463811757CCFA5317CBFCE2D4A0008D886EAB615A822B1 + 4: 23C6F2FD46B257655DD220650D4E04681BFA1B30AE76F38E15FA2B5E0D338ADE7D420A303CD8DFAD35BBB317079A55A90B958956960F8ABC43D5D20D9CF0B6FE + 5: D79F7E43E4C2C9654A1992354BBF0FE4800377FA600D6E065568B4E27DABC521A210EDB1ACE4EE5EE298F03BDAB769C2235D07C2A02191E1A7DA36D22863DBFF + 6: 71FEABE49DBA07EE415CFE4E490DF7234D5DFE275830F36ABD224AABC32D2AC3059BF23F784A38A3C9145441417D3042E0F95B74E9F831AF11CCC3AABBA977DB + 7: 0EA5FD2CB481CFD4A7B27AF1F89D139F881367A32CC76E7EA5DE5AD683A926BF3B5A5BC57C2D48F729DEE2AB9353228AC2FDB04DC31B0E4671B1503ACFED6315 + 8: 476969CF5B495F6278B815098A58C4E2BA4B50F6D7FE1DBDD67184713B37016E2DB6FE95D394215EA2C8363ACD4A98806FE788204BEC951FF8C4EFC0625508A6 + 9: 21169FCAC853B78E5FA01416A8E545C0C4EF610818A033889C3795B290D12E6FD024594860339459A730DCE43205E41B76C6A0CCF24CF331C77E9EEB657C4932 + 10: 6CDFD03A2D929FA3E174A576C2B26A89CA8EF57A9E40203E39AD660B16C3B70748B1D06FC40447F77E9D14F4A036E0204958AD0838D8359C724BF0DE536FDF96 + 11: E136FCD211EDC9C4A8E5D5088848101899328F2F7090888F78EE33CB10332E0D79658F6EA6A8080A858940F0E3335BEC44A5BD7B4AE0926F855CFEEE38AFDCF9 + 12: 591BAF602D92E369397BCF6AF04EB6E6CA5B36C16D93895614DF1F5EB3F784D1747DFE286A268280DA87D27C11CCFC67ACBC828DAFAB97ABAA16B748C0A87463 + 13: 472E91515238A4D76C71844A3C78A455BB3F6E017738E4EDBCF105AADEC7A636649F92AECFD2E36038DEBB9EA4298AF61A6EF8A9CD95BB2C0FC98C94D7DE4C60 + 14: 16C2FBB590F613F1D6C54548A86C242AA3AD5CBB842286EF3C5421647DD1CEE2D35FADEBF74BE8489A98403AD3BC74F1362262E355D9B63AA1B6CC5D8DE48B86 + 15: 6EDAB004AD8122442550F5827FFF5E37441F5389A19D8E2060B630B3B52F3514190C586FDD1F2B3BAAC228F479CCAD4A96E18D5FC2EB7AAA0BE642671DFA618D + 16: E7A23AD0444BCA20B5F660B83982F53AB231BF9EF7F0C8B7CDFEF389301CC9C9F16EFC95AB505592EA5CFB0F62873C7996443B70CA0B128EB99D830DA7D12BFB + 17: 0956D4C7D398CB4CE1A1513B676B4EDC958B4736E96275F0B26399EAA74069B8D907177F27DFFD0F3A103F12DEAF336DAE351203AD4E2F65FEC8B932EC804149 + 18: 5D8A510635022D7F4BE55D07023E279411FE3EBA43132BF4D0521BD23EE056BA04F3F01B5E1C395AFAFF32AC92F5AB507EE08CD7B122E03C98C75D295BA48F0A + 19: 1365357BC665858FBCCBE9C08722F870A010B501697927D07A57B6BCA6261CA4180CBDD77FF95B16390526DB966E23650A8F89968BA4CD768BCDDD27B206AA69 + 20: FA19E8206FB8FB96BE76D9996470CB9EB16E5E9B86F2A798F332FC82C540BCBB9C1FA09DAFA06B7CCD6FA50448A20BEE92FA7C74A06517A140942451D706FB27 + 21: 9366C4B12223645C6F39F63278CF87CC8455040ACFFEDA3ABA223BA76F350F0099991CC9703DB6D35FC5D91C88C0292A7483DB44FC3BD46CFA6F0E4E47F31279 + 22: 7B1E389354327EC217901DD0475267B709220FCC354EC2546A3B3EA3BAE0C3F3BAD55F032A18467EEDC7D798E107F4949C5DE6AB77A3825604FF2F8E36809C2F + 23: F07670D48E17914017DB563AD7216E682F6D5BCD1CE2FD9263F989F498B4E13178E2D6CACD6ACAF824D3001A89E0423AF0356832A855DA7D8EDA8043BA59BD00 + 24: 47EC9E45471621B338C0D508AC94A63656E24FD215DDD77E9E0B4E1510C5C1E8FB93F5090F2E0D86565A614E491CB5076C49E909254965D65774B6526A0E8323 + 25: E58B90B65E06FFAC887FEF9AE0F2C1357E020485A311C3E00F039A430D6151DEA79A25AF63827B0D055081335E350C6E41D2B66470B41712565C3877D185CA04 + 26: E9761CEFE922E0221700FB347AEDB4448FC65ED5A7C2502F290991EA22D18A0F4D788DF5D95B4ED2E00CDA37BBB6C28CA037B9D2A57C03851435B0E034156A78 + 27: 6368F5B7ED851155FD112A41A75E2E25E538F1775854B5AD73B9A7A27A754B044186EBEDA486AAB3487106E36FCBB07BA8EB2DE3B76D499609A89A7B8689BA78 + 28: 0DE1C2BFA7FDDFA1A463B0BBD79DD7342D3DD174CED3C707D8825F9DBABC336BA7CAED3F0C0C0FD39A4706FA03CF8991B44F0CE18FB8F797D12C7BEC44E91EE6 + 29: F1B7DD52C4EFF89AF0429DD389CA7B5FBB15B74564D92CF8BC8B531F9E9451B90745FA524BBC4AF716BE9E53390D290EF15408843768495CADD670D059FC669C + 30: E040E6CDF252A6A89F50758CF82B9B7A62A156EBFCA178A32A72E39F1285F5534860B9F8DF07D2A64DF110EFD11246CF9728FA76D0C9362ADAB3D95289832BA9 + 31: 58D724946DED80DCC21871147E9213FA4B16A4D3B0ACD90D827716D534A2B38DF9FEC3BE944637A60769203986F99E2967B80FDE5886A3139FC1697EFCDF051D + 32: 297F1658C7924E4D5B3F0D0F56E0C86116AF25068EAABF05D7F3F32CC4E388A59A34D4C3C42A661A062EF17C83F9731D42D75638FBF5F501566D3D2696585179 + 33: AFE015CD1034EF25D3ED02859A4AF0D1B0189996BCAFAA669D8AFBC5F49DF268090C43367A888C52398F6DE3E09C9C090F54228D791F6185B74EA081B8F0509F + 34: A52E1C2150929A7372A00C6319D2B4A990CCE3E9A2DABC6E04C137C49FE8554B0FA36E093803E9C0CCCCC86851FCCFA32C4012F3D39CD2D814FC266273A5BCA6 + 35: FEDF9EDABF14820FE5B9635C957AA059A48B65CAD0C54D6D3B67EEF3F1F3309D67F9976013F0337C7E454709B627EF8B7BA93DA5901C165BA82614A499A69845 + 36: 69AD3CC53F0831AD0DCB19EE1E35FFFCE4AA4F2ADFAA9FBD53F3B7EE8ABAB637B3BE7DAAE15D2FE9A710DEE69CC19D4508ECF82CF482337BDEC0A16190A0D9F2 + 37: 3A987894E507233D2C164C091AE4D111046C76226E618695C32A3A0879193B374F7216AB2B16DB0B495C9DED7EFAD242E06BCC4DB97344859BA1282898145AFC + 38: 1BF4443856163CD7A183FC55F365E2AED194B67C5FDAF12F3A0D088F5C0CE187509E6F384100982B7390CEA04D95E64B3BF6FE5A2FEBD462F381277333C06561 + 39: 9281DB83E58419D13ADDF1162A853C8C151518314904874E221B90CE60FEDFB407114889D5880CA912835D6B189CB0D01233EE3637992EB56A482C3061AD1967 + 40: 2A435825FE4D75D8AE4F8B79FD77CF54449005964DEBC4068BE8B837887AA985209FD2345E8379581013078AAAB3C02F4D462B4426D8C242FF6EF206CD128C81 + 41: E9A130DB46ACEF338D57FC079735BA36FA6BCA5068199BD26E915914548942245D0C77F4A62EF84F94FF60AF2404EB184DACA4A5A710C77311A52EDAF3E3A81E + 42: F4940C62561D58CF7433590476685E7561D9FD6C412EACF4E016C71E4717A62F4F4EC571099ABA6C61959044D49C73CC89617817B90D39610AEA94711760BBF9 + 43: A6BE0CC944D188AB2C90C998B19B9984BAC2BD1BBD6ECDAC02CB92911E3155BB8318A2651C353E1F711A2F41E8A920FCDC6A424CED5499FDA3BF97DAC1F394C0 + 44: 3B45666CA25E284F85562605F7D4061BF33C8E7A22EA7EB5646A720FFAD6D4B6517BF6A843C73A483892F943500624EF9A986E2DD3979866E50681E875CE3F55 + 45: C888CC593668B67B1CCA7F372A1C456711DE06EF694316FE4F890D67D3D8CE1064E4E5665EF49CF506FE1913A6498F5786014633A63AB547346DFA411050BB21 + 46: 46C223EB818C5E2E0B08C13C11FBC9E050910C266DFB1EB265BEDCC530B53157B8D1A17F889D69A29AEBFD41770471612213F8D218595EBBAE61A26301A38109 + 47: 58844F9F72070295F5D2E75B72089777551FD5C2AB782B552605DE096F30FD21A5D5D51EAD24E41084D6C52389F0E6D70370AA51225642A80D355E47DEA7A909 + 48: 6D507E4980327BDD63EA1148EACB9CAE281833F6849B681258FF26836197309729833D153AE18FB9A4DE8590E1D4673ABB7A3ECDD2AB88AD6ED3D7948412D3A7 + 49: 1DEE62031BF73CC3D028E1D5C0BD0484DB066EA7E1137767E7AE5E4BACEB52F43A516D1B4AA5D032900A27E447113E5823C99089D492D1B80C6F1787A296EFD9 + 50: 4D3A53873D325C506A5755D5A0AB9A1C1311C0930EC9CA627B612337407358D6568FD5D16B13954382FDAF42CD6506CA74E33D8F6C59D77D5CE108633D276502 + 51: 8C97A0BB3E2E34D4970F619C9902836A4BF36A2929093E605397B6FA4644CC48507E1B6DAC36D26046600C2A8535E7957C25B5B601AF9C7401A5E749D7CF83FB + 52: 4634F95A268F0D0BCD6DEC3A5E4908942E8C46C89227721BDB39763A7096695D1C0D9528801D6AA325FB2DE721C797B082E86BCC414FC7030C35CB332220F56A + 53: 35959C0AFF4C14AAEF9688E283C7E86215EA7D360C123843C4E644212642A669B82834B492BE2182A8699B4CE6D87618E07A2ADD6E356E2E1C6EDD5F2EBC51DD + 54: 8121AAD5122F9A3640FC0C902AEBC0F2C7F12FC4491518874D634D8157ADE473F91346E936C72A7CA512965417E850FC5E7DEC98CD29F2AE28556E3401AC910D + 55: 2C1885E35DB27B5C81E75B3605F2E488C431419B65305238E90046F963E0339B57EA10383F61B7167978B3CF25F8E51A419D464D11D5114AF37E1342630F1C9A + 56: 02632A6BECCF2E11456ACF45D7A8B63CDD5E8BEE24E6251D3B50E8112BA65AFDE80A10EF405AD311F999F6756BD12EAA8444FEF4D4B5C3981FDF1178308A6A65 + 57: 7DC7297BA07D74EA280C53A5F30C98366DD07F426B505D30A5F8C57A89B4729D3A5CAC997554EA6A06B5502F407786D3BB2E1BECA98C16FE1A7D67CB3F08E7DC + 58: A774D76D68FE1B3490E952750BD1F80824848FDDE6690FD797919FE1F5A7064B31CCEDFECB45F93592FC2AA0BCDF463674020CF667D754D7B3F730AE04BB7F73 + 59: 7A1A9BD45F66FC19828658070B1354132A192A492BC65023C9C4F32EEB14C2E6E81634C860D8A90188AD195F067E7A64DF8C4782647FDDEE50AF1349415428FC + 60: 07C0D5BE89A951224BC9957EF39BD383D584C8BD3A9D59913B52B92E3A889DC69957BC6B22E2F0C62D9841DB1D4938DE96A9434BD227CF3F5D550645E6066513 + 61: 9B319B6F1CE1A0A3905ECBC7034CFAA45EC0BF7615DBEA2396A435685C69C03C4BBC4A347D7CB153D7368C893DE3656C9E05BEA29656E61008AEC91DD3D748E8 + 62: DEE7DB214040C7DD6905943C7B9FAB2230B0EDA4955C22AC11ED0E3AD737348683498A835873CFD5F1623ABCD7354612F86B52D1C676D87B73BC4BA58A33B353 + 63: 0624D89083E73B452C33F62D48BF4EAF360E91CD9576EA7513230E2B3569B7A98AF9027C96FC5A4C7E2E3A0746593D126339355F368346217D0B92CF62B1B702 + 64: 12EF9F4F6B7A1D9B10193AF01C0B28E4408A64A54FEBFC449BEF4FD5D492D22ECF135EE37EF82BBE7F8F02B18776904FC1EECA6B8D2BEF3AA0C2F9EC542E607A + 65: AE31C0D73FE69FD9BD35CBC43EA97B75BB46A3E9ED6FD2D753E2C4D5B861733897FC9DF7B06BA818C9045AF7F88D39549116980E874D736F256514889A9648A6 + 66: C30F0ACFD60B1703ECF123AE381B9E18AE50B7AF7FC239F07B40852693AB70C09613B9092CF93789A94C7BF1E4184F9EAC9761D609B9138ECAC78301C08E7638 + 67: 3DE94D2F0A782A9793A077CBF8B4E597D9266DFB1BCB022E107EA00D9E975823F74981D506546D18D8EC3DC617D58F86E55599B5EC057070A0C7703355E9491F + 68: 1838A42C24B0D92DA5DFEDE6396794D5CE31B4AAED261CA2F54F8DB980AB71EBB7ED1F49C3D13A598028632C8E9B4FE4660B981779FA67CD40B8152860A2BEAB + 69: A032E7ECD1E85AA177E495E5364365F4402A302B24B0A38AEF3585653180CEE6D4AC442E5A9B3A8D84E95FA267689B4CD698F3865AA5787FEF95B765FBB975F2 + 70: BCC3B2AA991198658D7B12F9047A8E1D5FEB4AABAA3D16D1B1AE6CA3495AE8894658B531689F68CE8DB6F8E6F86532D0623B39CE904BBF8B1CF63B68773DA0E5 + 71: BC90C3EFD52CE813B53F3D11EA819C83519461D849E4DF91B0A0252429593964611D8235F720F5AE56329C3BF5DED84F3DF47DF673E4BE9181E2744B81C8C07B + 72: 0A7EFF404D4B50805C91562E78B87106C58D32CB5A21BAA42DAC5D74A86AC32EEB0F974BD7FE6537A184FD87067E3A40BD3A123B5E20BB564CF7AD00AA70AF0F + 73: 516C165F28DB4123CED152A365A39787AA38E970DB9E288AAF3714CDC43C5CD11F962CD55B6CA9D7170CA0F4386BC0C3984EB523F6EAF20AF194490732D4ECAD + 74: 02D68726E79914803D2EF3CC38E15257EFA876F2F5F66F2673DE7DFD43B06CBB646B7258E2C6EB048823D7B4B68E5C473128CAADD356D0B66FA557F22A856589 + 75: 6322C5416A2A4D7AB31FB298ABE6D080427339A78D99F61B3D417FCB8F45EEB21A4032C3E48F760C5CAEAACBE5324445A99E56E26E4970F8CDFA4264C5EB074C + 76: CDE1C7BB34341FD7D275607A64CCC4EC66BF9B1335012E2F496EA325C0CFCCEE91EF7A953C643A6C76FA2DE5F6E227B99E248147C03DE567BB72803ECDF076AC + 77: 6F1523C339675F50EDFEDABBA7A0EE24F921A6AA093E9400C03C48512B33B51619ED5471490F83A09195624E457C9AAFD4756ABD80D80D9E4BE1F4717356DDFF + 78: 409EDA0D7ED32186054C732CF126D66B09C5D393C0FA060936AC93CE08049BA6D95E5865B7CEE777482C24F0FBA9B3FFA993457BA007FD98526A91842A9B1909 + 79: C4A0A183DD67D4907C663556E40E4F77E44DFFDF3849F1A39EFC2847399FAE6BA9D7E39E529136C7B2898408AB96FC4BF985B8E172040A22F8D94AD8386AE2AD + 80: 307509EAC26FB8CC68EA06DC7F8EC70AB15A1EA764D23DE26D471524F1535D3A0F74BA977DC0C3C821C7763E81ECDFCEF23808B87116FB03C15A9C0091B76967 + 81: 8A4197EA831F582FE31EC5C5C7491BE844132F0F6939742E8D0022C8A989ACA28F34770D2AC60751E680ADC951865A5486497E3E15104F58B0003B9730E45431 + 82: 99303E9ABE4962EBB2688B533985C3F40F552B1394F20FC87443B4B0329BAB4C83548AEDBD430CDDB296F7AFB4F1DF7952CC6F8266D4CFC9A5D35DAD4DBA4EB4 + 83: B253B044D70E45480D3B985F0C3BAAF3E39546C5D349AC5863E154C90B2632A2F7D7A5C884DB438AF0C96EE5E316BC82C1E198FD367CE79BF51A5EC0BB87609D + 84: FD7664FB39C69DE4507D1FA4568B148357CB8694B33C92960058F68B2EE04CE8BDA2ADAF4DA3CC12C3AAE2C0A33917ACD5E61DFFF11B898C4FE81264D4EE84A0 + 85: 66157A9B96104FC2F77BF8DA20821C01FAEA348919FF9CAA1821FD953F1D5728B737713FC838C65F9D623743CDA79EC4CE0F32D8C9EF4CA4CA1A1D7ED6C3C34A + 86: B4B1D500113852ABB0768423620723D3076E740773E03ECDD60E205742B0E441ACB03D88E15D0B008BEF3D3FF5C737C7EB5889223F1DCA7095FDBAC534A1BD4D + 87: C3EFFDF2C3D14C674DD619B3025B8539BE53445BFE6276D0C6A67E903BD73D76E9A7C68C6033FB76970783802585160D0643A7C49A15A114CBA578D2CA3CB1E2 + 88: AAA4842E9A21214360F774AA1FA92E7E4A100D9711F0CCAB8A2A25FD62F6CE5733D840B16B90E6ECAC19853BEC9C4FF6F7C762790907EA9E4857344AF54AE664 + 89: D3F27867BE6334A88980473459A4F7345D3723D7B60D0B29B0CC254280437E7CF4BB0E8CB4905FA773B33954CBADBF37D6C92EB252D8A54DF1B240AECE2D7028 + 90: 43EA5969F02CC21F4460D1C48B44E18777A48DB1E43C4FD2315830DCDB90AFE45540405B2141A4C7724173869595AB50A3369B953CE758F6C54DAF8579DB1092 + 91: 839E018A7B3C2EEF20E23966A4E5896A5A76720BA5B96A7BF58594F792BF79F8D847EF0B6604313D4C2E3AA16CD529F48D5043E2A17E9C665707B9100C29D71D + 92: 70F131D422CB59B0E8AB2F2153FE84D2A78CF757B50073BB2DCC42850A10F495357E9D8304CB870F946E97C9DF2D9314F333847120ECFA8E2D39FA96A2F6E1F4 + 93: 947CC741E6BDB17121F3F8AE0E5C29D4C0D1655A5CB5690FCB0F162D123031CB170EABDD2CBD7299F682162D1CC30B51B7B168597EFEA695FF50813D1C5EB2F9 + 94: 757D4C28D2A4D195CD4D0D6763BBDE5F47B8E4B618A3B6288EB928CF848F881894EB277B8134CF049CB231658FCE8AB2CFE5D01A8D4E9AE1E25995AE98CCB901 + 95: 7A905DABBAD8A3686853F36B89A1F1CDED0C1D182D18C18FBCF07B96887DA95876E910EF1C2534A5E002756C22798B0E56BA187C114BBC57E780C1C9C6400482 + 96: D5EB414C1E39592C02E464607335720C3E5C2D1D657B636CC14DA3CEA517149FEA6B7E3CB77245860746702C347A0A1565EF4162670D1CFE054EC426B1B1EE1F + 97: BBA74C30CDF61CDB3B8EC5A0EEFA4D6488DF5014DEAC77792FFFBDA5B611976276D5EFE3472076DDCE1EC982869F6B56E283B5C3F3F07465CAA4C2240DEEC3B1 + 98: FF08B16224CBD0C07489063EA843B864667CAF3460B5FAC806577A0DE2BE45D451410C21457FDFB084B84796C9D1AEF0E8221DF0DBDE77E62CC36761C5A64C37 + 99: 4FEAF081BEC94D5064F3E2D5ACE753827DFF8A61648798587FA379C44BEE4F60F9103CC62282EA2D5C54CCC40BA70B5C9D109796915BFDC04603746541C164D5 +100: 207D9ED6ABBDBD1480A647CF1ED5EE377714B6B15064D243BBD88C8EF5453F1B13541480031258099D76445D9F0BE03E16D1F6B50160F07B37381F57C267DCDB +101: 4DB8B7C7A483C206EE70A5A2BD8CFE8C4EC02336BBEDED4EE1131BE5DBA426E04B26F965E675DA8F590F9066BC09FB0BF4DDF842F98F4C3F1FAB76B4A5E4BF32 +102: 80079A4F4BC288147E3871AF1BF4F284EA40E67E0FD8154E1E246A62520192F20F7DA3A27E6E691724F5BE4AFAFF0E0CEAB8D509EDA8CE96103493099B44DB7E +103: 901D93B51E0FBB6E56FDBE7EEE09C79AF5EC2EAEDA634D196D1DCD42DB54628EFF7D6F61554253667DD0F1FFD3B58834B831138243F3B494CC337881D41BD56A +104: 3CCCF5A353C25AE6035632DF94DED5577B75350883B20A682E74C800965F508DB3885BA3DF13022A5410593380430825ADB3AD2AAF85063A49DCD555AB001333 +105: A18FB80876F663B3896131769D062C9CD210EB6623F818DCEB026D5F9723ECD4804D7DC3284D0D877C655AFC95E9B29BF38787D84D72C22C1B8651BB8E2598BD +106: 7AAC6A8BBE683187AFB0B84E8B4DC454EE296656C42F04F6132DC1965909E4F728A2267D320E9D1815365773B5A44273A2B51B70FC1447E40162FB8D82530031 +107: 345B6D3EFE8E80496E56DAEBF4FB3993CA8793EE93EB62BFE3CC008A0D22FF7CA1CBEDF8041AB4AC09FC217965BB73C20517498B7B8DA880CF0AFFF9025F761E +108: 59BA98D091D97A1F8B3D5C307F433B90D46DC8BC14A00959171FBCA8A31C15E38461FF9AE9A0DB36B9E1E0E491F42B53632BE731F10650E5A150E6BC414C0F53 +109: DA8E2676F88A764BDCC8297AFAE841993BF432054D24F6B62C79112AE79E1D6A0689F14759BEDB338E58428DDA56AA161C9C568F93479EC9C0554DD97CAF824C +110: 9119108F59A0C428103E86A35460B81102F3513AB143FC3BD4B9854C86CDCB19A06D1841C52C1C0C1DC775A1BC65E9C8C7E3C3D1F18F7056AD2D001F4E5683F2 +111: 5D5344389FF8B760019D4DD8C850051E6899E97B3E1A0496FDC23B6172B4D944E628E6F4689EA75CCD72230DC44AFF3CF5BD780D83F91EDE28185E49A17376D4 +112: C3F6E19EB5B02555B59B089C2DC57892B325EFB3334A0567769CD09228609813E7E62137693507084AE4479297023B52BD5C303D06F8705543E86575BD814C4F +113: 5380EC375AD10AFC684153BA5368968B8680252C4C20DA44948C83D6EA7BFD4C3C06F421D041B2ADEC9B9C59D00A8BBB63B55721A5E33FB3A58D503AC6E4C435 +114: 8E71FE96B7435EA16B4964C00035F280B1A3E8CC3CE5D3B5A4786DC4070C83E5264426D54232DDA57C141F14DFE7439A30315341461226F1A5359576FE43F2EA +115: E313EA73FA31952BB64995BE1E3D4F820A5FDDD775FC86CC817AC168BC5D79B4C594E1802A56963D1D3DB3190B50B8E049CB4DC89FD1F81B7F32B10931A8C96E +116: E89C70262573BEF710E6CB9CA20A600DCE52752F5A9B50C440CE94F9B498C8B8D029DD768E98F0CC0D5A05C84FAF8043A4659A3F37229791D5518651CD062EA8 +117: D0C6B3FC6B59118E9122574115299D47698A42D73897F0638E3566BB498AC2461A7635AB4C1670B64406732197110C7FBE2E383548801BBB0152ABB1153F495A +118: 295F030512CE6D3361657401DBD1BE01FCEE58DBD83B1419D22795FC5AC0551509398A55B2373BA606144CE433C3045741096222DE1ACEDFCE027A4BF5BAB60C +119: 57419208636AB909E3C86BCB79CC971398F41310B25B7E7E07F502EC4DC2C328BC050B0BDDCFE1D8101A4D34EA0B4EC794B82BD2379AF2350AEE6611D272DE55 +120: 4092620F2AA9B337D09DA7D437F75210B9E8DD7B86916BD7E2F4F53AB14B01ACFBBD574B22D0F75DEBD7C2E24D9EB230FC7801D03B58B656218AE72E9A3D6074 +121: B8310583B8699BBAED86F734263A24F294CEBA0A4607CE6D2FB1DA125E5C29BB6D82C0D46AD13F4659EB9596BFFF85050BF318A912CFD0C7B0727363CD3BF945 +122: 43ECD72003EA43024B62420CA77B5D867FA3308321F26F3A67409542E7C14F7CD3062D6D0901BEC5E3A6FD2A2226D9CC8D321999F3824347720A28E681DD570E +123: A94F03F37206896D82135E491823EB24660E0AB97167D5760023176BF41961DB4B61BD7D3125066502A5BC16B8822D3CCE174D401FD154BA69A39C55A1DC2828 +124: 0A3602BD0205F614CE1ADFA35CE854DE914A46BD6186B14FC43F19FB00E34D81ADFA50CA512DA062DD98626DC05EFDFC3939082563F48678CA6694F0EF3F0BBB +125: FE6CF04D96D04778A27918451067083026D8EC299EB3AF1EC358C4471CD031656304F1C699A50AD3603454D9C840FE94A1CDB2A4E1E0AB7FA63997646CE12592 +126: CD5AA685BD788389284F7A66A7ECBEA1E91869C1F91CB2530AADF1C459C26B8C8C0138B122CEB0FFD6D20C1DDC4D6D83075B490C2BA36BE7409F3584A7A8AA04 +127: 65486D5C1BE12DEC14B560590A989065F635EE6F00497D892922FDB2A0D0BCAFDDC2650430CF0E06948A52FABAFE6BBB77C2B263FEB7A51D06D6BC6C4751D9BD +128: A44655F4B4680AB484AE8B0E4ACB42715D52A7DB30F1873BB17DAC82578B95E5A9408DD7F9B71B8C623DCBDCC39B3BC09E0F9392E5B00719494E28263B4956EB +129: 228E98C35B738C92E3B3702CE22CD54B0E5E906C7E0D973763BEEEFA1CF3F965743302C6A1CE1F64D89ACC61FCB18C61316B9F939969FF02512697ABA801767C +130: BEEC3A4379AA56B3DEE94B85DF95695AF84C30031C7F9DA21D55387C1450461FBA0B53B39AFDE37333631607F6A28D50DC181AF5A77A2007EE9BD7F14F3B00C6 +131: 6FABF195097F95D3B699B7095F0237E4528955BBD649841BEA404CDBDD86C72BCCC537DF5442DC6B6583980380B3D30F4296322B8C76DCCA1AED12261A4A2527 +132: 8989AA87A728EC695D684E330F14854C64EA9698087F56EC574B1ADA2857D5275F9B7C6FC44E3A26BB132011F434C8A440D2BB44995CC2A86BFB6B6E0C8A6747 +133: 207882DF2DA14E1C9603D4E18CE948C5E5476605FBBF035F44629DC2D19E249CB24D6C0027D9BDBCA761C3A8B281BF7850A628FC2C10DDA6983C53A6CFB0A7E4 +134: 287E99C768F3B717AD10843AC1F73804AF90A008ECFC877E44CFAC6D02D59A5A777A58209D88928DDBE4383666F0878914C79F08EC55C05D9F30B0CDDAE0B4F1 +135: F660DF06604C41189E61A26F1E7F8FD0DA6A41F59753100435CA46001673BF280400E6B7A7A3ED1CA0DC1E65D0365787BAFFC170C4836719DF1713B028C10D24 +136: 16BBBC5713F35D9DCC789F0FBE572C12DEE482B1A05FE49074F75A2C650A6394682F7DF2B4DC8EE4CA7E6FC62B42A1ED906C50CF0E6904DE68AFD678785FBF7B +137: D86ABA8BE95A657F33402E2ED70BE9FD707DCA2D9562A386FD0A783524D912B010883510C80708E8427BEE01D013AD935534316B331210E303376A9E16831E08 +138: 7813B00974EACFDBB8D768E2A9C178B0F5C4EA9233A9C442E30EFEE86CFBB0E2F6C36129492909457920FE9E6D6D540CC4B7FC2158167A56687E52C42B5DB35B +139: F075A524D625DDC0181569D34B4FF4FE290CBCF88134FF0325E11A843AEDD59DBA24E27A89615096610F153D9506E03B1BC680EBE00294E6051051D0B5C32B3C +140: 26FA214DCDF29754047B2FFFB587B64E8987FBE76DC600065F47A411868F9AE47585111460E39810D5E841AC47274EAFB305874411E086C1FF43EDD7B2A6A385 +141: 0022A06E328D2A2082DE5FC5EC69E52BE33242E2A47B6E6C405A82118CBA955F6B0E71305DF8D06F98F209529D0143638161663407E28794FCF9A78ECD8B359B +142: D29F32657442D25AE034A4DB00BB957A74725618E2609EC0DE9B6E6D49BE61AA2EDB5699E482C4ABEF7F173453C6AF96AE86B30AF271B2032926028234CEE8AD +143: 37D8BCF9AC9B658F38D6A64C47AC07EF5FA5B033B1CCD40CA0782E9676C4AFD58EB757B758333E5BC516D4706EAAAD8CE915E92B4B317541BECF5E1BB6EC8577 +144: 04ACBA5562C9038131AFE06CEF8CBD0D4DAC374ED4DF9DA6A47E5532A527CF8CA4A4EA4062E9F5CACA63594E0030253DDC2347954DC8517972C433D1A16EDE29 +145: 6117AF6A6F1F0C4D1790EADAA532DD4453337CA61B5E2D996188B3B4C1F6C9376C6066846360B1A6D3CDDDEFDE592AE251A81403EF54882FFDA0F0C380E7F55D +146: A5AE946658C6898922EE5C92268AC994CD2417E2F631A0396C8EF6CC67E4F2812F6B794D969C306994E01C759F1AA0EFF81F196C4C2488A0A3A638D88E2EFCD4 +147: 0422AF0A73064F54D423DFC8D2C93849B029B25C296101C894DEC4B702660C70D9ED585EBC81DF8CF64A689BB586E75943D57984FCCBB1D9761E64B22D22A912 +148: FA4ABD456CCEB8130E9D6B451DDAB71D6D683F22D97CEE91848B8A0D9A6C17BA721FD944B179ADD6A77939D624F2354821CC1BAE4879D2367A58C1F41A8EC4D7 +149: F1BDEDE21D8A9FEFB115AB33911D733C53320843D16E0090315EB31E1CDAFCFC896DE46EE638171B59E0552D0795E64863FA74C02CBA70FC76F0DA6EB836621A +150: D08D5BE3B9D15B365FA7031B8AA29041521619FD6993E9E2F828BAD1A29048A0251837216EFF5004C4C11D332098F0ACCC15E0E6F3B52931D3EC0B79D2BDC48D +151: 77161D3C18445679EF0F208E307275D979FCBA8B55FDCB06B60CF99A9BEA2E1D9A397C612F9CF24D90AAA1BBE821DB5FAB2E039611764547D3CEBE3B4D2571A1 +152: C6017E7F5EA1239BE480A5A730AF6E464045CEC024DB8A2D0B5B5D569F4C0F043F22FE56BF03CF3D0EB743A14236B4DFA4B3232FC2B841947ED166A526789924 +153: EDB10C3A3695FE4E4B791F953739FB16E4444F202AAD171B800D96CF85AFC69E728EF6D8A391C769F1ABDB8546AD8050D13D15A0883262DC947D8E842F1372D5 +154: 9E1BE52AACFE0D2D2B4C4C506ED23AD54C0525D07627F0C222C6AE49FA2D4476C4611D94753EA6C134F4ECDEC3C6F614D5FCA283D43BA65AB89388C1D20DBB73 +155: C0572A42CBF5636C35B1214F22D60268A1692C3DA29FC85FC48C454FE1685DFBAAACD693CEB7FF0F2DB4DCE66DA7FE14A404C30BEFAA03CF3638E1344DCA4220 +156: 1023B73A74252B510E1ABD3FBC1D317BC4F17109635FC8866A378EF02FC7999D2088E7DD1F994F41AD3D4D01B86FBFED6663AE5343BE28459BE9884A30199E38 +157: 79308924CFB5C1BB96B5B75FF0120BFE5AE9402FF4C983674885403152C47E0835E2A152D0F3C612A651A87B3F0AFBD5875695CF2CFAAA72DAA9B95432B37902 +158: B8F6EF849EE2F312FAF44876DDF2EEF4A37FAB8A7495E27C43EC3FB0B008E14D5DAFBBABF6CEFD09BAC89EE3980E8B761DBE35947D95F985B5E0A0B4FC42C872 +159: 91B5CDB070E4C6527305E0F73DF0177EC0DB352D0F5F39F7D46DD7B5BC59B64D7C830163FF344ECDB1F46E22B27A7C7AB3CEF9204D90B8751F4A347DF32EB262 +160: A95B6038C9F4D8AD16CF9726352030A0EFB957BA58162F8F21A63DD9BD3608B8BDA02F4F23EB05D16D51353AA84242C9A20296C2B72D3982CEFFCDF5E82F2EAA +161: 65DE94F2089A3F9D3CF6DD8388BB10640D8BD05B807D5BA08C9DF8B5D552448CAFD991867AB025D1E27F2E562624596D12D049B5BF2E5F897C465E42F04978F8 +162: 9BA6F31C3CCDA57A5470E2591E6E43C5D3C6E6E5D0822CADE1CBBB91D3A45E1F61576C427B80D77A57188ECDA04EBDD78162F574AAB92EB65E65C09E48FB5B5F +163: F123D3068AB2FFADABF06D98AF6B756B6ECF03AC85A98684E0964092BBFA53E56A2811E1A7802C17F838870D91EC0FBACE6AE5ED882D2B532AE5922A6849C9FE +164: C25AE90AE52FE770F4EAAE7DFCB798B7CC77FD9EDE79C12831239A966C012B1FA8DE50D4814AD415E5B94DEEDFAAC8DD86F28A40DBAB7535B941484534FCBF55 +165: D642150F3F76A9357F2DB6FE19055D522777FFFE137FE2277E5C7BD974E21FED05B76BA1DB0EC9CA0D438DAAA029E9F1DE1BFFAF17FC96B12099E94F31ECF304 +166: C90A604694CD5B694F271212E0356EA291961492AB836DF257646239131485C4606565BA17F73F1C36E23B35A31A35B34A6B9EE32E2403D061011967586BC771 +167: 05603DE1E9BA4B580437D9CDFA3E55691B46AD17EB7570A8D0C6B93A15FD3F18BBDA9E9157CE48D2531D20CB4BF429C41C201F4ADDAA5A5C9FEA23189C5529D7 +168: 772696481C283004B659C32927EBDCE11264DA372FA5C17CA59053310083D9DFA55A8F6E40DAD12FBFA27B9B6A0A0495CA86C61FEBBC5F0EC2009088717941B2 +169: C0AD90C7F6D748BC371C1EA022B76C0FAA83D81C3A2B29E951A00D4E92CD9D0AFD3B7A5F8DEB7541A7876774CC29F6EC8FA5C954A3069778FF1CA384CAE2F2E2 +170: 350277196BA7D1A3D60492A03323276CA437107BAE847A3A48032FA9E8399249C34D13B5A0356DDBBB91A6901B39F222F7C4389291E7B02C7FE49DF24B7CA44C +171: A600B600956764A530E609CDF5C9F863049B642C8467BFF33CD6DBE92F3413323FB0DA55CAAF9CA5F7FF8D437C985B292C3B17AED4FBB1312559C953F6E26F70 +172: 27E5B647D5DBF77FE8E56B7ADC2FD4A8CC724571012C5A1BE8F29DDF09CC37747852B18BEE585F2B2D640E9C2DDBBE33F00130E5C5C5C150F14306F41DF9AD60 +173: 438D1976A4217A18E0741EDF05B2B58FC67D2CCAF7DFDDED9310A5697960EC5BB8CBCCB649075454AD4AC11088E56118EF5E6ECAB4657A8152E886C901F95FED +174: BD10B1E5F03A2582BB83BD560B2F9245DC9CDBF709A03A4619E02ECBFA2D0EAC5AC9C1C08B7EC72F098A21AAA7BA9385866C4943561AD94E23EBDCF802D3CC87 +175: FAEA995E3E4C662F779D526062FCB3281B7EFC1F5564189D26196EB327EE99AE747479348616EAC982ADA9608DD7063B6F38327560B466694A4E6BF65A863193 +176: 40B841A26B90843175D4013784C2F1D3D3F9D1BFF4626431D2E7A54D2F07BBFE8E6558AE0AFD6502D75D2B0F24FB7F61D778DCAA9CB6A5BADB358564BBC3CCAB +177: A2143CAD931E75B65FFADC158E0D7C2D805472BF82ACF3E091C0E5322B50E156F3CEE474A8DDBD693135A08204AC4DBD3999EAD8A97B3EF2EBCE35CA5C158378 +178: AFBA7D6AA8DF58681666E911307A6870698D6F8C5B6A5D186CEF35867A65584AA0501E1478C3CD66D0FAE8137A994DF62425E2981F1C733E853F157CF304E46D +179: 9231A406995AE03B62C1CEF89853A3EC315725DCB40D927EC1413399F425402FD5628555A6F0351AF9E0B3C47F7F8450792001C876D1086767A89D180D1721BC +180: C56AD16C7BFEFDCA88CAC3BA609A43126953B2C450EBCA87CBF92397F7CAE12A20870FB3C81386C7E2A1F967559E5EB7A3E494704870308A5F5CE756BAB9CC6D +181: 10F5BBC7588661BA9D4B1350830863F3CF63A596026DBE72542DE7EB8C56CC79140E0DD99C3D3DC7093589BAC74F5E6572C58535ABF64C81FC6CD8859AED7CC0 +182: E487FCB67519A06F109D0C27235599B5BA09ED02B2518C923DEBF5F9CDFA5C9EB59A3D059AD5C4A7B42F36473217B370A3D71951CF38B36178ABF00CD39D2FC6 +183: 5DA067697E72B521373DE0BF8A6AEF324BC21347812986237988A092F75BB9813AEF6C7992E0CC325CF30EAF0D586231FC8FC2350FBC7644BB9A7FAC9DC3FACD +184: 0C1E455BC16F7A32211E463969646329B0EAA3B08E1136A63A7D0A91F8238FA0BF7D2AAA7DC19356DF8FB3B0EC2AE7F199A62856AE58D3913B5B53E66D2533E7 +185: 586086132A2BEAD42C017BF2AA833DF668B2A55338AC19F2A3BB0634A9EA95C64B7E751D74E07E7BCCF2BC959F1AC1947CD67B684A2090A456469D251864749D +186: 92F031794AB95444A7129125B18FE70DEC5A76215473E9FC155679E2B7CC7A31E3202F69478CF07AB8D206AC1B5EA905D12F2987175EBCB3DC7761EC3E7F32E2 +187: E03B50D3250913B4F1AD62662A9B83D557B2314A9373EA2F28F58940B2C91D96745F6A4A371B9929F023AE92857FFE814A2057F44E58724B57056FD33224842D +188: 55FF8EA6E624AE5E8A3AF14E389915AB792541D32D5797369E5A76699FC4C7CA188F44882579A9A436C4C0784A5A3A0FA99E5FD988A79EEB423D96CE194D411B +189: C1FCD5551181C3FCFB3CB866F9EC64340175047EDD2766440A0CC34E3EC6B90524DF1890E216A2A72849D39A94ECA1CB3B38A0DFC847798535A07BA7786B9B9A +190: 5A54D9F2A83C3D2883D3CC3BC7259387A6359F787F6CDDCC2D2209292FDCFBF2D97423B47A070A48616ABFBF12E2DA489C84BE0B82ADED5F55AFD19CB6601273 +191: 332C9B6DD8D96738302633674A4742BAE44C7BF814AB4901D24A2BFD9532668360FFEE81C3C419BF90215FD1C600B6FCA87B44C4ACA0591965C2F2E636945A83 +192: 7F58B35E7FC62D1B6DE9ED0073D65E80DD663F8E84C2456D36FE4F0F894C5C07464EDFBB0B9E9900333AE97864ECA28BA289E577928D12197F6C9E753F03A714 +193: 8D2DCC233B5CF142C3C1B9D18E0ED6D0FEBBB3AE85727C36D4E646C901394A60931D412FD0D501F7513AF14DA68B2EF89692E2265011A085C9D71BE48CF0B800 +194: A8599ACFD7915F199139764521DBC6E1298C4E1AE835A96C7A3DD3651FB47B469D24DA4FDF0089089612D14E0B4D5D874A26D560CE293F4F4C0F197E0F49DC18 +195: 95FB01F0837E2EAD37BED14FC8891962B462D2EE28792C32E11AF99EB423B37EB087EEA60D0121612BF0265ACA0B7D38AFCDD1B2AA1C0B32E1E6EBE85849C131 +196: 9957A95CC23B0B60A9C4D7BF3D18E435538A64E86F9550FE4003B987B103B4D81947D2FC312B228BE4D5400E4F7F4253F6D2729B64675B9F42F08B5ECE486690 +197: F4E171384ED49755AA2281D45C1D4969E9C16AD9667E12365AF248C32C4F5F81161C428EC566DE21F1765D46CF1527C42479DDB3BAC74478FCCF8ECFF0CB8F89 +198: 3148E6C8106E1B4D0AC1A60071BBC61D3E219AD2C385B4C584B00EEC4715DC6F470E0C385EACAA5DE172DEB86D03FE8521335417F993244162DF5477AB3673C6 +199: 834B39B087C0AD092F5D17034CF8C3907BDAE858E48637F43BD302CD64B764012408B86424795B4B60A1EB8B8AA41E1F6E280AE4CB550BC6B5E2B8FC969B420D +200: 7F6BC2F4FBD6508ABB9BC1BD358A660A174393C1C07C62FE76F50EA82A08902D38EFBB3975A9B4F29EC500F8AF40A2CB0A224235D6C56B9EA48A0568FEADA32B +201: E3A368B056D9D409D447C85A6F3050283DB26C916D8BC2BAD5BEC5B60FB91B93B9186CB165ECB0A63F49F8FB8E227C82250EE4D969C85780CC28FE1D255E2832 +202: 0161BE50DDF3E016FA68FBB642894E9F7B4782045022A2203FED43F3262DA985E4DCE2A4422777EDF22AD873209C8DAC0532D264E9874D50E33B54F9BA8CEF6C +203: FD9920E438B41AB3D1FD62CF89652FFBEA82E291038C0A16A18190E9AB27283894753CD42BCDDC60B554FA19881463DB049BF924631D85F7065E2ED40387178C +204: 3A97B803CFCDAC445DD9A8AF654B9A98B664E84FCEE56D9B097B6448625894BBCC7007061BE4D2DF8B874D60F977A0B9A36B782DFD4740109E858DDB13BB761D +205: 520AA1AA599358C3524CC24F86FCE8142E19C4FC4E6BA3C00BE80AF4AC9D0F84743FA30D9DB9410A5DDBB6C4A66D30335DD5CFC8FF09C128773F9412EC9A7D02 +206: DF64EB972A7E1C0C74414D0D71C327A6275977E2D5E0878A657B7D64FC82FDE26AC5D0FBABA412ECA47ED35F03218B009C816B85B4547978102F7CD2987088E6 +207: 46A3AB0D690B6F15F905C3E58D0C317B5437F115AB7EB81E88BECD1ED5715122B7A32250898528490E66B0D9B411DB00979FD2DEB44A06AB32E4DC91A1DC454A +208: CE9DEC64B3568EAFBEFD8CFC223289A5F6D783A54BAC6D6CBC52E276D3FA15437E0BDE4D872BF1C1E2378C97CBFD6B9523B46E8A66353C25AABF43336DA834D8 +209: 525FA87377436BA644C9E6ED794AB64C2B617869F87E1522D046693003AC67ABA395951273B0361AE6FB0BCE53B7A074F21430627D69C47DEA17E35980D053A3 +210: C312700BB7F49C6618D757B23BD0B0EC07AA21E7BCF2093E5CEC062CF4416F8C54C76DE9F50D4E436290669CD33223A74357AEAB6D9CE05233419556E5EC4E7D +211: 92DE52D6EC34E35E66FCFFA0EFAF0F683C7907CDCE69CF001266FA15E3B62D9037175F055E460F4A1A788F0D088531D914392CD1BE5FF11D8261E2C4C9865723 +212: 314EAFF5A5AB71A6825F8659B7020C24E891281E376D0F0FB7A5DFAA8C97E1D2AEB4293602B074B568F4F93EFD507C035EADF7E88479A02FD449B397D1B15718 +213: 0C3E9AD8E481E64CB0B55F30B817340BCC99A480BFEB6F870A94DDBE8971A0299A3915C3B68E05AA13907EF57D1F307E9FB1B8A8717C824B308F98828DD261DA +214: BF9EDD790DE164C4006B25A65835C69C9F92B7106D451FA251798DCA4362796E4C7AA2C1D8451A04D5BE2118E81F778663AE6F132D1178BC22A825FFA929F15A +215: C137755FD583558D753EA58F7036C6B7AC80A79935288B2E4317777FA129487B38A0A26D95E63B5372BDCB97775902A0238B75FC28BD19959CC7A43C87FFB438 +216: E57F8DC55B423E037948BE4F84D48D3F5822572638960FA751EAC23AA33783059341C6B52FC065E3C1889809432CA0BE2FC071BC817DCEBBD318B116AC057A24 +217: 95172BDACD164CCC6B584291EAA1E553269CD88DB3A5C588D149B67662AB709169EA6FB9C4432498223DF844A0FF94C9E21CDDE47247442498FCEDE16B5DBEEE +218: 225AAEE28945824A84E7D9DC34D96B4B364B5591E0027727D16475BC95D864E154B8144D6F24D646F45A0547FAB18D556B4F452E71FF68D1783CABE48EE5D454 +219: 4F60A23917E9C6D893EF478477CF915C96DB18FFD1026832F35AFC4BFDF88519A964907CA540BCA7C63B22D364F43FF2F2412ECDF8C902B1722A0EEF317986B4 +220: E06B2F54AA30F3DF6EAD09846B3306EC363D6C64F208B4B3E58FF9EFA8C20E712AF5794BDE5246173773555B0AD521D9BA2B11B5107C069D26ECF3E70FE0A5D8 +221: F6B508AEFC60906F372B0431DFB031921E3E375073173EACC520E5713CD321FE07160B3EACDD08BF0730CEEC700EEF0F0FCFAE2A75994015E4C88B9D68C34867 +222: 8FE24769308A276C5C4CC58FA0D685EC094D500E40D6A5EBE5F937A0957F78A08E252DD5D45419EFDBA4E8CCFDA17D2BC6A9F26001E28599AB38A93BD7872D22 +223: C4E02FE649BEBFE96E502375F750BA7A1CDB6E006CBD2656A79BD170E4AF4E36B7B0AD80D143AB19B779E9A244774007FCB6AA8C06A24AF16C9D570F9FF918A0 +224: 45F51AF830CA71C313056B03B393EF641AF65CA504C0DA4F6E427FC1786CF78E9ECC782E21CD3B4B3BD28D4E0A753A66D7A9264467030BA9980B7DD540B799F2 +225: AE255B5B24BC9B489F1023D39321B0BF9D84C1F441EDA7CB77CA0D53FDDD80D6F80D6120AF297FDD9175E6B338774815F7CF997BF994F1E87D4A79245080232C +226: 3ECF82334C27C67B668B97AC47520F93C481F4499A308862FD0D8191463C020E4E17BC7A67262D60C35468B03287A38511C54CBC9AF6B502A6EA7D29E3068A0B +227: DE7FF24EE533C3F936C919A909DDB9748F3ABE91FBE97F1968EBB703CBC7A016F606DDDCCEABAB8FDC0534016F5293452D49F21E1873EF5B8D0A639AC953DEA8 +228: E6F6DBB1DCA85478722B125454B7A93D61E3E5FF1ABA4093FBD051950B2F51E6F7A914F50504441350A636480AE8D78469C9B4F3F03DD205B7EB6327A35A1A9B +229: 0816F780830F24BDC1BDCE3E1437F26B92C945D7A5B5155E056901931D750C98FFE263075B35AAEB2EA570CCBC457C706853BCF8D5C8955AE6860CDCBF3D6604 +230: 82DABF1BE59AD176355DFF33E8BA2943A4D68FA4E8A9DCD9FD49AC11E9A10134F8D253729CF3D8D744A0C8780313B45D937BBBD8C5D71DD8BB3906EE1C2BFC62 +231: CFCC30863449DB6F79F2B72F14862AD9642CE246925DA581ED102BDE19ACE44BB037BCE6B64806C75028B3F6C0703AA8483B11B413BA24EE58837A0E5911AD8D +232: BB7D666E3CA3B2DE9BBAF96BB8AB462C3EF948284086FAE23C3EED6EFD1B8A94DB002221BB869642B6394199A9219AA993D193E7FFEDC2AEA46B70264F52BD33 +233: 5E8F1A1E011B0ECD7C3828F63EBF166B883BBFB4CBA4251CE5E8A50BFD83128A412E1DF68319BC57B6836ACDC0E87E6C9704E393650D2496C42CF01301E72528 +234: 014D86AE49429F6983350EC1D460DDE2ADDDD2A8A8CA9144205C7264A0C899A05DAA33A2960700CB85E13AADA0A2D04E6A04B7AA9A7BB8EC2E44728579781A16 +235: DB2C4EC897D0A8E5700FAC5BB4681DCB608E14DAB0DE8DCD62A390BE8C48D87B83F23CC2B2FC2F60763CD8951733623FA8D9C9074FD6B535E324CF489E993FC3 +236: F8A6627C3DE6B36D81F955FAC80648A83F05BEB9D00471BAE703D626D432D86064FEC8A926701202F4A86C33A6ECC7C5F283A956E5B7DABA71FB5E9DAB22FA00 +237: 5E93BB2C80B0612F6C5C5416272142CB0BFCD27766D8A9DFBB78CDD9131A752BA4BD1193EED1EDFF1344DB272B0CADAD051C2D641F0569B05BD9FBC22C48B06B +238: 3B53B57A749E41D62E5CE9FAACDD5F69A21F279D413C1EAAEF2A083B85BDCDE563D0442695DF09D40EE5CABE8B7C830FD01A2BEFFFAD4A7BF76B94E6B910B6BD +239: 1D8749F262A4B1FC9EEEB4F7F495BD8A7DAD04B96FD090C8841526AA8CEB2B7FDAAD4F179A9D3BBADDADAC7EFB54175AFCCA04B1FB4EA3DD740FBE0099ECA53E +240: 14D325D202F3EADCC84DBBAC419E5080E13A58FEAC139F664558EF9372145F18C2171605516DFE95446A2534F329C1665846909E3B94DB88BBD19AC364BB520D +241: B86D647CD938D94AC573F15D5B08FEB37FF87BF12E5BE2DDD2B817D1FAD8D4128D075FBE0FB6A51E308F414ABBD793BB6BBFB8242DDF8EBA7EA029CCEAD7FBF3 +242: 9B7016D41D186E2402F63A6B2FD42F60771FE635DB5F6158A2256A757C8F99780B73D8216DBDED6D1F3957505C7786A5885BE37C601AA8E5E9BA36885FE88B90 +243: 5A2CBBC693244B2BB4762765BFBDA28CBE960AA3B53FC1878CF06E490E452FB1674EF1E12E2C3C97B5103A7073C48D0AA3895085E6A0D74E47CA89BFB03EC9AA +244: 87C2A89F195633DF49AC8834D9B0013A3F83120C68F77A21D5AA37916762A6736D4CC4038B9C9FD3E99189236A684D2E574248499184BAF0A016607BCE7D01BF +245: A45B32D86A108F8DFACE9FDA5CE5EDCAC8A64AE5CB21D9F5E5648DD45385A8429E733D160B67BB3625D5B115AACDF2A56BA5584B12A2896A47C48D8181309C0B +246: 38425A1BACAEDEBB152D8F8D6C85DF75FFA0CCBCFCCABD8C1FE0985E25FD87C73DB913635B412BCBD4C5765A4C1E6F128F3471F31A382A62C14B8CE7B666004C +247: 02EA28A9BC3BE646B63272D9012FACC7C4A8CD4C97EDC3D9AF7BC06729860E3B97B1C9AC343C440C53CB0F2DA2B0413F058F7D6B77EA967C0113F6D2D91C4D34 +248: 5DDA7766393EBED0EBD886A3E0CEDC649C6462BF0D3FC3D80F4FC5F0E2DA8E501368A74008D3AF8A18764B3A610BFA73F8911F633E7DA9D6E389C11E8FCB273C +249: 4AE1B047CEE7896CED4280CC1C8A158C44A8261D17AF3025B27E4264ED412926E9639907851CB7380CDA60478049A153E2E8DE7EB8248944574B4C8CF5863BD0 +250: 3314E24E918A04DECD180AF7EEE35CBA18461CB618C183892B63284CEB569432F047CA4397EC3B31C435ED35A61276D0981A74A49FD7DBD7BB5D70016282EB21 +251: 848F85FBFBA1BF084CB7854B93600EFE343913ECE967B57D3FC46E02787F108A5D7966B0F16B3CF698523C3F6B38586E37AB92DF15987C5FAEFA759BD9B64288 +252: 94730C832C9B4B88BA9565C58DC451D1C93861342310ADCBCA66CF4C0AF2BB7D5A28EC6DD51399728190D6BF10EDA505D0A8EF7A3DA726106DAEB9377773094F +253: EFE6917B94F6C55127A1974D39148EF6F9B331F081659999E0EEFC15EBC198EC9568C328393216A7E5F30342A20DB76504D1A90FF0121840A7FD8C96C20E306C +254: 483F3DA2F6BF5794BC5A3BF856004E35D311EF70F392EE59BA5857A2FA1A777281CA22119668CB2F49F0253B6F661E5F099B15EE6704DD4BB44B9535B9D4612B +255: 2B72B3BAAA241F977917BDF8BB019DEBE7444559A1CD329274377154B00E0BEB78CCD9B13F8733388EA7B23245BF3233414754CF0AFB1932E0879DF415133A4A +256: C21D6454682743DAA662B443FF48FD57A493950E7D2F8CAD749E5FB398DAC7AB7D0D9EFC3E6ADC3B66DC45D59A95551AA0A928C676D0FF2E09FAB8C77954FD1E + HMAC-chc_hash 0: 0607F24D43AA98A86FCC45B53DA04F9D 1: BE4FB5E0BC4BD8132DB14BCBD7E4CD10 diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/ocb_tv.txt --- a/libtomcrypt/notes/ocb_tv.txt Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/notes/ocb_tv.txt Fri Feb 09 21:44:05 2018 +0800 @@ -57,23 +57,23 @@ 16: 3EDC4A0FA95BD8F944BCE4F252B6470C, 87B54BBEA86A5B5C OCB-xtea (16 byte key) - 0: , 56722ECFE6ED1300 - 1: CA, DF53479333DB86AA - 2: 9529, D0B5A859106FCC9B - 3: DDBAB2, 3B31FFDA57CF51C8 - 4: 22EB7DD4, 2BB34D04FFF810CB - 5: 108693761A, 7AFF6F52574A019A - 6: 391FB7C61E76, 616C5E66297F2CCE - 7: 3E22E4A4A0BD13, E84C385ABE25C8D8 - 8: 94FA11D5243EE34F, 8F017DE96049D0F9 - 9: DADB6B5D27049240A7, CA69E14047C6BBA7 - 10: F79C8EA83C69DE914DAC, 1EF042DA68106C64 - 11: C5B6E04AB8B9491E6A99F8, 143515779A55C972 - 12: 33F493AB7AE62DADA38C5B24, 531BF7799A778620 - 13: 6DAA66BF02E66DF8C0B6C1CC24, 6CDF72786C5EC761 - 14: 4940E22F083A0F3EC01B3D468928, 185EE9CD2D7521AB - 15: 5D100BF55708147A9537C7DB6E42A6, 78984C682124E904 - 16: 744033532DDB372BA4AFADEA1959251E, 438EB9F6B939844C + 0: , F996E5CC593FD6E9 + 1: 88, 64636E3C48940F8D + 2: 223D, 230D7718A8BCB965 + 3: 32531B, 37FEA4728FAE474D + 4: BDCF3E96, A9F30B4187CD174C + 5: 7B0CCDE546, E7328648817987FE + 6: 824BD771B724, 0BDF80C14EDB758B + 7: 8F0E73B1280717, 2DEDBF2C87180CC4 + 8: 6F7EFA44AF774B1F, 1A9C5509D54A7185 + 9: 9749BCF684F68755AC, E46941DBE948BDD5 + 10: DCD32D91FE2D5590355D, E17DFA54A5B60E07 + 11: 3CBBF6464D438AB95B3ACF, C207876D030362EC + 12: 1C804A611F6CE4CFD2657366, B957F48EA00C428C + 13: 5A2F6927951D8F60C754893790, EB3A27A9E5B8928F + 14: C710D28CD02726002596D9196021, C6C9EBF090A20C07 + 15: 298FFCE0CD42BC329697AEB5F53A56, BB2F0C415317928C + 16: 59F6395260ECEAB2E3511991EEEF9656, 278A218A720F8E05 OCB-rc5 (8 byte key) 0: , E7462C3C0C95A73E @@ -352,39 +352,39 @@ 16: 6A9424B6A873BB7155C01DC87E23EC52, 82C5047655952B01 OCB-noekeon (16 byte key) - 0: , 72751E743D0B7A07EFB23444F1492DDC - 1: 61, 41BDE9478A47B2B612A23752B5A42915 - 2: F4EB, 90EF542D89F867CDFB1A0807F8AA3CC6 - 3: F5A59B, 1BED873B613096546D4C201347CC3858 - 4: F454610B, FB4035F28AA75221F599668ABBE21782 - 5: 382FC932F1, B40270E2084E8DCEB14C6603D080D7C2 - 6: 18F921441119, 47F1F889B307298150750E81E94AB360 - 7: EF01C70C9D1810, AE0439DBB3825F27CF846B43E4C3AA80 - 8: 89863EDCAD471C3A, F4E8AF73BFC4CB79AECBBB3774DAF8C2 - 9: A6F494092E066A70F6, F73D3B04752B7D913420C17E656C7F86 - 10: 342459682E0A8D53AF4F, 61E7CF14E9878E0726C64B1E8CA08BFF - 11: 65E520D5A99825DE2441D1, 7A2AA740D786EB7015C61B31959E55D9 - 12: 2F96D0BB72E37DA202410302, 1A313242527FB522289094B9AFDB5F7B - 13: 3E8F8A1FCEE3F866EC29128BA0, B8065DA2DABF04129E5AE28ECC11A15B - 14: C2C15976D3C2499ACB9454878131, 372CAD486E104098EB1AA78A2922A1BE - 15: 1F12CADABAEE80E448B7EDCB42F8FE, 86A38DE5363787F55B16462C684E08DC - 16: 3B9ABB3304E75BF5B63E7F5B5A3F3980, 1FBD6B93E457B9779E2D12D78301EFA9 - 17: DC0CD805E43675A4317452E378AD48AC4C, 40AE4AFA4B3E580EFDB4AD0AF5BC4E4A - 18: E9DD52EA7264C6C7BBA39B761B6E87B65687, 4061DD65D5E7FFFE8D3D4261494D4F8C - 19: 80A9735CA1175072823828123413CCE772D521, D3378A12E79C49A37378DF527A460AB2 - 20: 09AD495AFFBF7CB8841262E7E5E8952878D4391A, C25D7A98C6F260B5FBCA3B8B5F7F33C1 - 21: 3925615707CC40C351D4A49794778545BC1F683175, 97622437A7208383A4A8D276D5551876 - 22: 5BB0D41ECD7BD2CF0B12A933255D95A3FE35E4C896BB, 4B8AD84EEA3156765A46AC19C68B6F88 - 23: 1EE71FE23CBFD5683AB1B391FC12B4E5952E4E6AA3D189, B0FD75996F28E071EB6C86BD7102BAA5 - 24: 0AA3D8C98AADEEE1867B13B017DD263BD16E960DA64FD071, 5204780963A62C2F4F7B3555BFF73836 - 25: 3A88B6F2AE321B226DA90B98E04A6A1589411BEDBE994632D5, 5638AF04EACF1EB986AC0702B4373A22 - 26: C2731661AC634A4DC0345F040DA7AEE507A3B9D019B5958543BA, 4C67D3FE37ABEE928B3BB812E7346823 - 27: D3E7651AA6DA035D05D599EFB806E8FD45177224593B5974758419, 5814E84258E1B9BD56A188AAE6F25138 - 28: 17818E7102B8C123230C5D64F18BE94C3159B85C8F7B64A7D4712CDA, FAA905B587A93DCF600BA8589A985432 - 29: BCA4335C6C29D978032C216114D39C01C6F161BF69D5A1CE55FBA8C575, BE24424A162E43A19755E2EFD274DBED - 30: 24C33CEE022F8A633DE9DFD009F535B52BCF64F390D2375E5BED65B70D08, 138F21D54B6B7E34628397DCDE0D33BF - 31: 838FE950C8165ADBBD6B61E9732F9A727CA7AE74376981382F0C531C331915, 0742E769CCBA2D1CAC7CAD4E0F012810 - 32: 57CD778DAD477271794FBF763662D97F8A10B17D70A69FDCB974FFE67E558519, 942C7D1C200C3845748F8131DF71AE26 + 0: , C810FFEC70BB008FD7C314A732B226E6 + 1: D0, 3C48A2C7E0CE9B9099221EF2CEC56767 + 2: 5542, 518EDB8174B067CBF2568C6911378137 + 3: 65E8A4, 3E4EFF5F6FBC99EF3B71B11F566A20FB + 4: 3D0EF863, A366D5CE05F564B5E676EC78938CCC85 + 5: 89B17BA512, 0E83095D771F654CBD630AC114501A0F + 6: E9AF5FCFEFED, 3A283F7FF02274DD4B48C2CD7E36182D + 7: F7A001CEC51C30, 8392CC274521BB452134713153F36268 + 8: D796E3F23E31D4F2, 351C7B0304E127287A9A1DE38BB3167A + 9: C4E2BBF6B4827E1A84, 275907279D0764CF80D7E6626D81F994 + 10: 6C61226E61F70408A61A, 941AD1718D272BFCB8C5ACE08F90B2D1 + 11: 3C195850E7FD63EFC11F7C, 348A975B60908445230D4D56A0CAB008 + 12: EE5FF5362DA3744C9EAD274B, 875C2167BFAEB65F5601F2DB9035444C + 13: 7DB5392ED1933ED858EC0C52F5, BE6507D8AC743805A872658C680A4D06 + 14: FEDEAE2EC2059D22B960813B5E7D, A559933509C47854176CEEDEC12EB8B4 + 15: 64C81F2169F7CEFBF51E68D4186A36, FFE84A9B49F0E77A9799EDEC7D76B987 + 16: 66532B678D23130714E088FE874C4743, AF95ADA553A68319DBEBDA4172E18A22 + 17: 53E56845C091A1E2372F3FC772017C9804, 9A6AB7CEB632429F2B31FB91C141B6F0 + 18: DAF6832520591B886E2E962ACF5B9D0A38E9, 73FFEBA8997E0C55CB0B4ABE59C86BF6 + 19: 108F04FEFCB5EE68033E57346012CDEB348D14, E08E90976E0F7868994B017D7A007AB8 + 20: 101682160DEB9667FB073F96ED1D9C063ABCE668, FB79A4BEBCA9A7832C72116AD9B98D41 + 21: E10AB0D22A6C4C253D818AB6AF1A3FF5811C6CEF24, 174CD350B069A239F9EB80A7BCADE8B7 + 22: 9F62A79B25D4F5532D78228A50516F97ACB7A2C5DF13, DD25DD14174B5667B0AD70732323C8C4 + 23: 2A0AA96147E74A3B881D62BA692EE27927A9EAB351C6DB, 9CE03AACF9318770BF7E095F90B470DB + 24: 29E38605973D0218AA8BAF2FBAB7722DB242C4775E453372, 72D6038E8927EDDE469F98B84C74A8A3 + 25: 8DBF8C2B5477DBA6E07B269293713D60D60BE29E677CA35C33, 83100BBC1401C890B36890A3FD0CD4EE + 26: 13DE9776093827F254DBF500EEBE0C65DC602A5FDF6AEFFC34D9, D142F6CE9E43633CBE94A2BDCC9AC5A8 + 27: 4A25370043862CF7A12A00A5A278623F9BF8DE33212D35661591EC, 62064DD74F9F6D77682B43D9B44E26B8 + 28: 37C6C6C40DA0581BF041770E330A40185E90426A1A4AC9BCDBC5CA7D, E77EE99F62EB1A38CCD1E90CED6EB5C7 + 29: 6B9047158068957CBF77F35988E5C926C7B262A8EBA9D33638A15B1505, 913DC491D3B2AFF172053CC4D1271F46 + 30: 949E5F05396F60722877EDBAA5D7437DDB24B3E25651458C266992D0854E, 87D4396BBC24646659F10179823066B2 + 31: D48489C360F6EB2BF4155FFD7CCAFA4793B8870BFA4A95C9BEDD372F51C04E, 173EEB238E6186D5A93AC6072A22B772 + 32: ACB6F91E8BDB4CFFE1F2A5F6C712D16177EE06842E4CF27F61C8F68D44C842FF, A1E5F2560183B0AFE466243EF3921E4D OCB-skipjack (10 byte key) 0: , 90EAAB5131AEB43B @@ -459,3 +459,111 @@ 15: D870479780CC5B3B13A7A39029A56F, 003D3FCD31D497B5 16: A47BF1218AC86A60F6002CE004AF5E50, B4EC27091D5DCD58 +OCB-seed (16 byte key) + 0: , D80D16D2D0FB2BD9EBA4912468B893D7 + 1: 12, 8776140CB818C1CBFD2CFCD8BDFC9FFA + 2: F8A1, 597381977898AC43194C302216113CEB + 3: B35B5E, BC327275E7A552C4E0AC0FCB8403A6C4 + 4: 19F57542, 4E49DE569547B619E4187239D9B755C2 + 5: EAD2D99E86, 53DCC5FAB4DE25541A22AF0309C9FE78 + 6: 4902A8FF9AF9, 950D9A28DFBDAECE5F14D47E6B7A8B8B + 7: 45FE502602EA4E, 69CD243A3CF17FE51ABBFA2CDE510BCC + 8: D54F2EDE48207CFB, 775EE6140AACF9D56787071F08F36F67 + 9: FEDBBFD9FAABC80186, B37B2C643D62A205BD009BB55D50B918 + 10: 3541A86C889AFEB783B7, FE41A36AC076F417B6A3870DB712CC1F + 11: 62EB71A2EAFDDE1A050AFC, A953ECF1F0B53438E869F0CFB84CB142 + 12: 77AFE377460D6A51208194DB, 5CC2A9D8499F1B25D78937DAFB1DED10 + 13: A34FCDD7CA45DFAA2178CDC7E8, A14A119115143EE2B4719282C9E2356C + 14: A61FA4E9550280C8AAC87EF7A204, A87DDD9631C87ED0792C067E8D7F1D9B + 15: EE82AF5C51896AED298B0C12E00ECF, 9051873090B013508F93677D3A080E96 + 16: 5D532646FAD510E984959C4E14F853D7, 275D8DF932818030F1269804DE06A73B + 17: 1D77F8916DF479DDCE3F49A1D9DEFA40FB, 99611A067F45F140AFDB6FB7E9C23DF2 + 18: 5857267B77E7B8D7732509AEAC0AA80BDB2C, 3159BF09910493977A33268C7F7DBC01 + 19: 1CF64E54D48811F02DAAE472846E65235DC8B7, 78F88A35E2D93A0746058D1B37762A27 + 20: 8CC20A5FEFE9AAE81742DE70453F62A961188DB7, EDA9E9208EC38152E53AFD62ABC77F0B + 21: 1D6CCEEEC72CC7369C33F5CD83ED0DCD6F5613D562, 9FEFD274F3F906B11DD87CC2C0F9D0A2 + 22: 20A9C1EAD88F005DB8F69C8BE005D8A010B261FF2EAD, A341F754932DCBC6DAFE4231918A9CF1 + 23: DCEC1BB28E8D77D69B5148FB02E02C281B68BA6E9768B0, 6AAB2EEB1D25D2DF7CEEFA6054E295DA + 24: 7C4F7165943DB1EFA5731F5C75931F4391F0C40D5731BC54, 3FBFF88733ACE5289D9FB9CD24C44C3F + 25: F5E2C8A9B3A02E0BB86F9E969B0EDA5F554B0C8902BB6F4643, DFB22569019686B2EE92ABA9EE6610B0 + 26: 42B7D0E9613AFAD6E8093E4F638BC96E22413F15A84202188C31, 002F0F602F596236A8F239E81CE47FC0 + 27: 88B89B7756BD3BE09467998FABD12BCE87E5FE994ADE9B30844AE6, 05E0E8AFA55C3B571A849CE4C9F1F477 + 28: 10452565D15D1D829FC54F61960C6A749AFB91086E388269CF6B588A, DD88B0C63E040DF8878B3C919AA95218 + 29: E68619409B86082C744496FC3F645CE1134E84192D2CBCE1CFEEB12612, 83258C337EF21302724CE051A03195D6 + 30: 840277319319EF1DDF6A57682B6695550157F5B76756BF81BFFB3394AFC0, 183FA85F8E91F8972DA23108FA066F20 + 31: C74A4B01328B809397C07F4FC16131FBEE6396293181C327ADB50EF39CC936, D6C5CF79D47995D7CDB5745F601D859F + 32: FF3FEE866339B01DD2C1EC0C0E569A458A77DD014AF0CC9C0A8DC52A52133940, BF1AF01F2CB34CBAF1EAB96FBCCB5404 + +OCB-kasumi (16 byte key) + 0: , 7B4CE3A5B7284F8B + 1: F8, 80584D787B7AE753 + 2: D37A, 7BD7B52BE65B995C + 3: 2D07BF, 6E6E16FDFE808D21 + 4: 9F1A8E7F, 810CDE98B80F2CF2 + 5: C6A7842512, CB6E9709AD7E8545 + 6: 056553F25EE5, 24A74A113D68E373 + 7: C3E0215DEABD43, 80B9F0ABDC207E04 + 8: 38DA7B24B04DDF91, AEEB273DCAE4F743 + 9: 34169FBF64966E0EB8, 1D10D18FC0DF5372 + 10: 5B3A510F1AE97BFCE1EA, 5B1342A77724DBF7 + 11: 39D1B5067E584E59BB6603, 38EDA20D46B2563D + 12: AC2DD02E2406D7D8175EB308, AE7DCB1AE6188975 + 13: B0623EDBC20FEBEDF9B4AB70E6, E218732D221A04A4 + 14: 82F57A435A92E28B56F4EF5E7EA8, CC5842752D089C26 + 15: F2D54E3B9022AB32F668AD5A20D050, D811DF3DE76089FF + 16: 1CAC13A538AFC64D9747226AC23F072C, 2DF49C64213B35B9 + +OCB-multi2 (40 byte key) + 0: , 70A2AD75028C8B3E + 1: 3E, 76BE76B249142049 + 2: 5C21, E31CDBD0ED6B864D + 3: 62BC9F, F1124FC4C9C82617 + 4: BB5AC85A, 97035E20D4FFEC81 + 5: 500D9D05E3, 86D5EC5AD1D55434 + 6: 5179B8442E46, 432EAB80B938A00E + 7: 361000D13C364B, 5ADB3F9FD65EC776 + 8: 5C5BD790B927CBE4, F6ED8E9D330FD37E + 9: 2020DD735C5D7B4739, F98DEFD6A8368E1F + 10: 008A8548790A3582C2AC, 041C4E2FA196390C + 11: E6409403D3E2E4385EE54E, 25AE9113A0E7A3EF + 12: E23E598908C755FCF9D51E39, 21BF8C9F319FB44F + 13: C1F13F46FF04717C7E54FFBDC7, E7D8CDF40A1D78A5 + 14: 27721EB66D4F6362308B96DD9895, A374C96FCA94C809 + 15: 1A393F94CB9ACD3BB93D8766C63569, 45A090303B71D35D + 16: BCC0498FB13CEE8A615FF6409EDF1707, 9589A4CBC481A455 + +OCB-camellia (16 byte key) + 0: , 6972CC27A9711EAE6654851AB8E0C53F + 1: A2, 208D783961FD532E14376B4EE904FE52 + 2: 1177, C7CC74015F7EDD9A72F7435494D8A050 + 3: 0F8502, F1A708AA0F485A554E2E76592CD9D7F4 + 4: 9986180B, D47186A8B539F890824DEBA223861ACD + 5: C0FF4519C3, 4430A9453016E4974CFB5380A1F3E95F + 6: 2AC54E3E6A0B, 6E320BE8DAF4BA0462A57BECC574740F + 7: 846053E1A37A6A, 5B91B680B92517781DC362C2F3E144E4 + 8: CCB09ECFF76EEE2C, F91E7E245F4C8A404F3ECC7DE49261C3 + 9: E049E2AA271388106E, 8C6981A160D831F4DC57FACE5ACCF006 + 10: 761782341D52BA8AD12F, 672DC4B06DBBCED80381CE4845757F0B + 11: 92AD781DEC4549940265C6, DB04CAABC54E71FE1A9C41DF1ED5C52E + 12: D507B77EEE9BE07EAD700143, B3EFCC0B27DC85166E04E7BC39E45C58 + 13: 5AA1AD6B9CAE3001D4C1CC4048, 424D8A22F7B9ADA30AAC0C1D3D4E77F9 + 14: C69E96F7A4B9A6F0F2C7EFA72C26, 678144F802AE9DD83D11877779B48972 + 15: E2596B3FE48EF6EC50D857C8B4E3F4, DDB3BD2B8AB2FA71C7F56C8E57AFF2C2 + 16: D81664A002E03A75E08CF16EE7670E97, B56A0B0955E15E62C557C6E66782AF4C + 17: A8F2696A972A87C784FDC775439470D822, 36E3AD03CB18002A17D49E466CE64814 + 18: C2B537D807BD1ACA734AA072D9C2B836F588, 449B05D145666D1E5A92E204FC3507D7 + 19: D5418F1288BFA7D39D23B3C6ECF797397D3D44, B0CFBA612544B8AB159E9D4AD1FFB3D4 + 20: 2F9522460182291C6F264308E0363B9FE312E517, 1EE4CB38075B67463FB9DE26DF9D581C + 21: DF2881568BECA504A66E4B15BEA58AE6E99D0270E6, 3283D46803FC33098BB262FC1D2B2157 + 22: 4B0083A4CF7E166C8466A5B991AD0CDF71F9DF010EE7, 7C91D9A5DF6C76CB02D83D8C7F3D8D07 + 23: AC0457474B4193647D62906BD08D8C8EB32BE151555B68, 0A448FF3C468D7CDC945724172CEB66F + 24: E6E7786EBECDC296F072CD66C89141C700DE2A8B5DBF6549, 68ACCB5FEC04717FB21FF3B46A34BC74 + 25: 860865770047A9798D90C9365E9C9F8210CB804D785D65E2C0, A58F22FFC4CBFE3BBA451BE4B3B95723 + 26: F157588B4F98D798E6850D8F04ABF9905C1BBB2D055ADE1EA424, D6960C1EA6DAF225366374333D38EBDB + 27: DE3431977821BC861CD88E4236BCAAAFFE3C894607498FB8D68746, A3D23729464BD38338F4AC5B4D9F5C81 + 28: 3F2F0AB546E118B76B937D539806DC02D02A5D42D64926A9E1101D66, 3C0D2D23F5DAF7D36DDC0F87B4163F42 + 29: 3F9FFAE1D7BC62BB80A2FA2728FC33FF02E26CB9F52EA8D03FFE95A49A, 96B45B3F946E629ED974EFA7B66F5DDF + 30: A398B66C8425CE9E8A6BF5AB900CEA1EAE811E06AC7BC0D69A53FB2015BB, F83411C72B7DB201B254565D1DD8D1BF + 31: 9C760ED6C10A80C52F092ED20AB1D03A52427B6235F3C7FE7541033AACDD74, 8AB98FCA89D1245B177E0AC06E083024 + 32: C38F260587B3BA9919601BD0A56909FB36ABCEB8968D08DD6B74F1EF5ED7065C, E357D0D56124276790DACA38D95792BB + diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/omac_tv.txt --- a/libtomcrypt/notes/omac_tv.txt Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/notes/omac_tv.txt Fri Feb 09 21:44:05 2018 +0800 @@ -57,23 +57,23 @@ 16: 8E6831D5370678EF OMAC-xtea (16 byte key) - 0: 4A0B6160602E6C69 - 1: 1B797D5E14237F21 - 2: 938300C83B99D0AC - 3: F989B99B3DE563C6 - 4: F65DEA2A6AD45D1E - 5: 1DB329F0239E162E - 6: C0C148C4EE8B4E1F - 7: D82B387D5DFFE1FB - 8: 1D027A4493898DF2 - 9: 196369F6B0AF971A - 10: 2A37A2655191D10A - 11: BD514BE32718EB4A - 12: B4DBC978F8EE74ED - 13: 8ACCAD35C3D436AE - 14: 73ABDC1956630C9B - 15: 73410D3D169373CE - 16: 23D797B3C7919374 + 0: A821403929958A1A + 1: 68C4A02D47C2E7C0 + 2: 7D37358141506DC1 + 3: 9BEA3AAE55B75F52 + 4: 884D053D05CC8DE4 + 5: E953747483FF4E0D + 6: B6E77E72C9738E4F + 7: 8AB67D2B24E3D512 + 8: 329C0B9D504A0D41 + 9: 50323DA8ACEF4164 + 10: FA3239C668C34DA3 + 11: B5A12FC81FC24084 + 12: 71A01A3ED3936934 + 13: F29B630CEB6AEDDB + 14: F8802F0D4504D55E + 15: F844B92162038F99 + 16: 99AECD7CA69F0465 OMAC-rc5 (8 byte key) 0: E374E40562C3CB23 @@ -352,39 +352,39 @@ 16: E8B0B219D4CB699B OMAC-noekeon (16 byte key) - 0: EC61647B281C47C1B43F9815064BF953 - 1: B100B1B6CD96DCED8F47A77E70670A92 - 2: A96CDE3C48831A6B0A5ADFECA6399BDB - 3: 14E75E7CAD840208834918B29A5D4430 - 4: 9577083713AE6E44EEC987C77C93C072 - 5: 2A738C02841E461238C02F5CFC8E66A6 - 6: A901327E451BE0D2D9DEC83DEEA9A022 - 7: 5ED7EE1BE04A64A689D15F6970A821A6 - 8: BA053E24FCFD02C731A8CFCA19EE66A0 - 9: 57139CA8C91072555B29F85A19E2C84D - 10: 4585EAC7EFB84869FD96EE7A5FDD350B - 11: 62AF6C415CA73E54E82EA306254C1BDE - 12: 75304F9724BD364F84371EE154F5210E - 13: 7FE5DBCEE826760434745D417453182B - 14: EC98DA2A580E9131218D1CDE835423D4 - 15: 631BD9EAFD1AE445F2C1C35E2B4416ED - 16: CA2D902A1D83388FE35BAB7C29F359BA - 17: 0DBF0AF7FCBEEE21FB6159C0A2FFCD4C - 18: BD7CD2C49241032DA33B1975EE2EE982 - 19: B30B090EE8626D77D310EDB957552D46 - 20: 64F608AC5707C381AC6878AA38345144 - 21: 28513CA7795B23A02B37DC3732413D23 - 22: 9F440700094517847E9E013C8915C433 - 23: 8CA483F313D20BFE7E0C089DAA4145BD - 24: FA44872743E20E5E0A069B3C4578DB50 - 25: F6DE8FFBECD52CC1F213CD9E406DF3BC - 26: B9702B7E846735A3DCC0724255F88FEC - 27: A1DDAFED2B1732C7BA89C2F194AF039E - 28: 2549C5F0E30F8F4002431D2C098805B8 - 29: 52E3836181BF5C9B09A507D5330CD14F - 30: 01C55DCBCCFD9D7A4D27BDE2A89AA8EF - 31: 3CF721A0CF006702CDA91F2FF3E4D5E3 - 32: 6D264B9065BE98C170E68E9D2A4DE86E + 0: A9F50A6567FAD338AB5727B3B94DEB82 + 1: C9EC17EF3656C9056E64E692A449AD24 + 2: 7D1F6A3373BF20D4E65804B745D40855 + 3: FE3484F11C338721F3FCB4DCC608BD6E + 4: C45670D31D48CE9AD70BADE9F7A6A5B3 + 5: 6AF86480F1AE638DCAC40939B864D4DE + 6: CBBAFED3A5891A7BD8692055E4C59444 + 7: B23439FC6D1CF0E3B04BE5201CAF9283 + 8: 385D2C64F55B3FE976E660155FAC4C90 + 9: 239D4B8F663248076E64CF743AC14EC0 + 10: B942C5E06C6E68866440EB10747643B6 + 11: 9B591FA2FD9A20C367FB03366150D1E7 + 12: F90183F872D062AB4642DCDCED399970 + 13: 86003C2F260EAFC81BC45A0614F88381 + 14: C80F88A148FF906D42E6D75A50049468 + 15: 0A81478238ED815D7CB04C0DC5A4A4D5 + 16: DFE74730DB9CF4F994084C88923A8931 + 17: 91194DAAAB458B5B34E991EF534D4BD8 + 18: DAA1CCA0B644AB9F8B4D889D7F1268FB + 19: A93AE4F41DFB6CA311FAAA148A9D53D9 + 20: 6FFD47B80A991A6C09775060E4A4B13E + 21: 4BE3101511BCA3251559ED6D3BFCC304 + 22: 3C1AA3485241175A9A17F440A1F2FF5F + 23: 11D2C5E4FC75639CC61C8FE66C2F5135 + 24: 3EDBF9F32259650ABC2C835301FA6556 + 25: 56FA9AA43C01CA5BA798780D3BF40FA1 + 26: 40AE1F352003026C6D4C5F44430DD5ED + 27: 264E11C88266029588A1B8369F0C5B73 + 28: 60CE0E6D2C2C74D122DBDE57B3EA44AB + 29: 5E4078E7CEFA94886E9CF0D083C4B468 + 30: CEC169560600ECEED6E5C8F06C76E702 + 31: B4209736F08EAAE6D5B4923D83EB3EE2 + 32: 5DC8D45C9954B82864F1C2388858D97B OMAC-skipjack (10 byte key) 0: 84EDFA769040603C @@ -459,3 +459,111 @@ 15: BCAB623CAB7AAA23 16: 9BCEAB857596E478 +OMAC-seed (16 byte key) + 0: F184C3569AE39C95609E878E8E69D276 + 1: 6B94C6CEB7347C7E478D33FD1892032B + 2: 9FA405B299D5887181C5F09A27AF9F76 + 3: 7457B824FA672F0D939B3CD161A3D229 + 4: EF164E3F30058EA7BA10B1D7ABD945F8 + 5: 22FAD3E42EB96A6E6A66FA73FC96A9E4 + 6: 9BE414C3CD92860A67AFB7C45D0E0EEE + 7: 40DA2A768F6593E45214CB7F054A9BAA + 8: 9AFBBEEC8EFAFA7A22752F3BEE055811 + 9: 45EBA2A3EE9276A90FE7FC705086F59B + 10: 9FE7E1DE176065440B45B1F8F012B8E7 + 11: 5D45CE9EFB14AE973C6567E804492D4A + 12: BB37B25C98998B0CBDF7AA2BF86FBF3B + 13: D68EA4AD5B7C3E243872F5BCF7F24EE2 + 14: E880AEA09E328C58ED99928C7BB97DEE + 15: 4A9EBD30EAB684544D79A066545B100A + 16: CEFD858C3179B39BADA7EA0F6D3AB150 + 17: BD3336CB8C5AC6D327B310C2093FD087 + 18: ACB4B352003B45FE5E872647ACD2C945 + 19: 74FF04F0ED7ACBDFC2B8EDB0193312BF + 20: 950B9587B448A73F0566B6E5D30BD85E + 21: A1CEB1E515BEE6C0C2253415CEDB7F54 + 22: 5E3B9B8F983B882D48853403152BBD09 + 23: E7BB12680BFDC81851D08870862F5F70 + 24: C89D50E7BC1692A3EE29585F4C2861DB + 25: 1ACBB14354F3A1E002BBD065930F56B8 + 26: AECF4E3972E26A862DC9A0D0F78F4A75 + 27: 4E8663B1FD460CC7B6CA7D6D880209C8 + 28: 0350DFE2A107BB68BAD09A9461EE5E64 + 29: 89B70BBAF6E7F4E7E37F40D122588B0A + 30: EB0B22BCD7D61272372502B7EADA68A7 + 31: CC4FB973D094008F4B90D687CD91B4C9 + 32: C7162431A53216C22D47FA511B0A619E + +OMAC-kasumi (16 byte key) + 0: AF4289889D9AD5A1 + 1: C58E7863B4E8CE54 + 2: 2927047C455329BD + 3: 62905068423B826C + 4: 0BC0C92B5162FA20 + 5: 03E6D71DE770BB3A + 6: 6D48AB1CE5EC49FB + 7: 338597E9545657E8 + 8: 418BAF4EFB83DD50 + 9: A47BA8181D187753 + 10: 76FAA6B0FF3B9D4D + 11: C540C8A06345FAAE + 12: 67E454776D871265 + 13: D4E0ABD317993766 + 14: BD328F89D3C1FEA5 + 15: 580E74CB054A9F7D + 16: 121002BF94F18D90 + +OMAC-multi2 (40 byte key) + 0: 3A06523F10C9F2C5 + 1: 310F665F3A12E82A + 2: 459FB6A9AC69FE27 + 3: DEB259E248440826 + 4: 6598F16BC1BFB8C8 + 5: B37DFDF8DD61D479 + 6: 0CE3BD7843FC83C4 + 7: 3BB7880A7E8D6C9E + 8: 74BAA5B4EEFCFDB5 + 9: B71CC55A72D4BB4F + 10: BEF0C7D0781B368B + 11: 0CA0D02961398164 + 12: CF3848FA94C45657 + 13: 57EA86B185A210D3 + 14: 05887EB7679F4B62 + 15: F6A007FF4A175F82 + 16: 57E61B59AC9F3240 + +OMAC-camellia (16 byte key) + 0: B5664C5148FFB45297703BCC46C19E4E + 1: 126EC31A554E8B3B635DE4617092ECE8 + 2: FD57148685F4AA85AF48017AFD72B410 + 3: 1427607464A408C1775B4036509E9659 + 4: D8F5A7112CC8A9DF28B331FE7184BF08 + 5: 0E29B0F09409DABECF645F05C4A5717C + 6: C4155442FDC29685028AF4AADEDCC266 + 7: 92356ACB98AE2EDAABE0D3ED0C90772B + 8: AA3C828618F72258D91BC391876776C3 + 9: 189458BA4D98E85802E7028E5C57A25F + 10: EE652D70328DA00D63B42A5E85D70E63 + 11: F9D1E5F8E1539F2D657A047755CD232E + 12: 56FF5979FD3DEAD90EAAAF79A9AF1DCD + 13: 7E8B39D459D5AB449A8C5917B0CD0C4E + 14: 822D9B9C434C6FF7F0E5A25281740A91 + 15: 654909D2836CCB06501CB359C717C1B9 + 16: E8996FC89D47C91543B7BA3DC1C34B73 + 17: DC29D51B2372DD7564CF56AF8702924F + 18: AD74D081197644DFE2723CABC991B1AC + 19: 26145C6DF074CA53125F6F386FBEA373 + 20: 72C6C760A70FE410FAD113D8BE711D75 + 21: 099D3B5802D7FB699B6B8F031BE10B3F + 22: A9D5DD3988A18AA7BC6F9C050BDBE8D2 + 23: F7E99E4C3C7D127FF04FF325F7B06997 + 24: E99A2F7547B5C6EDF3BC2EC2B8F05198 + 25: 46C42FF49FCCFC49FBC99FEB08FEF10A + 26: DC349D600A754F73ACE6A7D2D00D3551 + 27: FC2E5434ABBA44ABD9D724A9BB6CA2A6 + 28: BA923927BF0074AD73BA8A6914194297 + 29: 7DAB39F8D7E5CB93265568E6713C7CCD + 30: 9F60259B759B68E1C8F89CC36C7E170E + 31: 7D611F8BFEF0491CED8815C0E3D4CAFF + 32: 31E04DE5F9D1403C660E39891DE0D8DE + diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/pmac_tv.txt --- a/libtomcrypt/notes/pmac_tv.txt Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/notes/pmac_tv.txt Fri Feb 09 21:44:05 2018 +0800 @@ -1,5 +1,5 @@ -PMAC Tests. In these tests messages of N bytes long (00,01,02,...,NN-1) are OMAC'ed. The initial key is -of the same format (length specified per cipher). The OMAC key in step N+1 is the OMAC output of +PMAC Tests. In these tests messages of N bytes long (00,01,02,...,NN-1) are PMAC'ed. The initial key is +of the same format (length specified per cipher). The PMAC key in step N+1 is the PMAC output of step N (repeated as required to fill the array). PMAC-aes (16 byte key) @@ -57,23 +57,23 @@ 16: BDFE0C7F0254BAD5 PMAC-xtea (16 byte key) - 0: A7EF6BB667216DDA - 1: B039E53812C4ABDC - 2: 87D2F8EA5FB6864D - 3: F85E3F4C1D9F5EFC - 4: 4EB749D982FB5FE2 - 5: 0BFA0F172027441A - 6: FF82D01F36A6EC91 - 7: 3BC2AA2028EBBD7A - 8: 15AA03A97A971E2A - 9: C974691F5D66B835 - 10: 4FC7AA8F399A79ED - 11: 2633DA9E94673BAE - 12: 82A9FD48C5B60902 - 13: 31BF6DA9EE0CE7E4 - 14: 26B2538601B7620E - 15: D103F3C0B4579BE5 - 16: 031346BA20CD87BC + 0: F5E28630DFDE34E0 + 1: FFCC52D905DA5198 + 2: 25198AB18B2B290D + 3: 18914E50791161E9 + 4: 200F832212AD6747 + 5: A9D09C41D734DDF7 + 6: 32D7CCA3F4BD8215 + 7: 91A1AA9389CD5D02 + 8: 35CB1F77D7C25E2F + 9: D91EEE6D0A3874F3 + 10: A42872686A8FF6F2 + 11: 7568908634A79CBD + 12: 5B91A633D919BC34 + 13: 32DCD17176896F1D + 14: 2BBBA64F30E672B6 + 15: AFEB07DBC636AEED + 16: 7A417347CA03C598 PMAC-rc5 (8 byte key) 0: C6B48F8DEC631F7C @@ -352,39 +352,39 @@ 16: 87D907CACA80A138 PMAC-noekeon (16 byte key) - 0: A1E4C84B5958726557DF0855B37AA551 - 1: 5DE20299CA919D3365B493D3D4895F92 - 2: AF7E70C336571A857F62A18649EDB197 - 3: C5F55CFE1AA119C352B64252AD246CBD - 4: FEF68A0CE08E8BA315B73B62F861824F - 5: 8321C2958DE4903DC12C42A8845ECC20 - 6: 370466D1324AECF1F5B42E0E01381613 - 7: 5CB900190F5CACBACFE5EAB0CC289D87 - 8: A13C043E6CAAA1E34601A93C497446A4 - 9: 865E11622A4CC8A9E1408E00F56C4543 - 10: 9DC42C26868374649BD17D69D025CA1B - 11: 37D33C11B433C91DA09925CA9E86757A - 12: 1373D769C270E7137C953AC0F8F37941 - 13: 7E81DEC583348B1E2F6267ECF82CB994 - 14: 505B6329338556518FF364CAA730F5E8 - 15: 0C085AEEB315968B0BDE904E8BBC6FD0 - 16: 5FED63259364BE7E5133FF0507DD2D4C - 17: F7EE5C80A99AAEADB49E7CC69BFFF679 - 18: 4388FA5E763A641130940EB705BEFD08 - 19: 1BC31CA79EBE1674CEBE01BC9988267B - 20: BE88961637EFFE2D6905D104FEDD51A4 - 21: 9C341004FB22AFCC496094E3207CA761 - 22: B9DAA3620E38FFC7C5D5E7D2D8FE3DE4 - 23: A38D2E571F037061B4400F1131FDBDEA - 24: 61DB71AE77A6EB47F2E9E14E8CBF2F4B - 25: 9903A072274CC048EF2C51493266D9ED - 26: 1EBEA421DD08859C17DDF39B20A82102 - 27: F425858618E1A86F4912E4714EFB9E75 - 28: 3B3D4EA07F7FE6DDFDD02D624ACDFC9F - 29: CEEE256591D701514EB17DF73B08A970 - 30: 5CC56D5D46120C530A23B6C511C685FC - 31: 68E484CE18BE28EADD0BBF23291B8237 - 32: ABD58A9CDF8AA68168A1A402074CF520 + 0: 276019CC8E43A1B3F300C47B55B7AA22 + 1: B93E353A2CC21CEAD81C91EC2FCD348E + 2: E8B9737CAD705C499F246744DCFE9641 + 3: EF36B0FFB5439FF8668F35FD1822D0EA + 4: B7F5AD89538FC3F03923E98ADF95D0CC + 5: 558FCA30F602B4BC6697F44053875204 + 6: 6B2D6D5A1CF670BE80E4BBB945CD3871 + 7: 9CFA28FCA22EA12A13AC1093EF5D5EB9 + 8: 04EDA6C71B9F1177F4A5368684FBBAFB + 9: 43C56B31D440EBECE4C74B90750A4653 + 10: 23D5FA9AFFB2DC3DD372F22690487BAC + 11: FD61731F27CF8E791535AAB579A018B4 + 12: 502D3A64FDED3CA2A2C8A5E986B27E03 + 13: 1EABBC65B0A08F6CB15218E7153A6003 + 14: B05DBC66CF92B045FC99395E9D405C4F + 15: EE841A0BF2C91C1E2078F06D022F2E6C + 16: EA749FBAC6BA9F672796C9D58A8C3294 + 17: BBEF3CDFB93E5F462773579986F08374 + 18: B17F7645F80BF5A2817C228987B43C03 + 19: C995A102DFBB38FA397A4E508B85093D + 20: 9011CA395AC3FCD8594C13E67C22E95B + 21: 364BF53974D68B8BCF53CAADC5469DEC + 22: 5BAD7041372F28DE28BAAAC1A89C10A8 + 23: 77874E908BFCE6F5E36888A484A754C0 + 24: 9BDA525416A3129C55886134B79BAEDE + 25: 84E3201FA7958223B302D1BC2AC57D55 + 26: 2B8FA1A95DADB4DC2F7A308D8E3D8C81 + 27: F74EBF0ACCC187569BDE549F5FC96C36 + 28: 7023D209F1965EC32253D11835CDFFA5 + 29: C3C6397D9B0A1D741335882ACDFAC20D + 30: 7BC92905F2AF6754256BE087CC4F54DB + 31: 0BBA0A507767530F26C3A465DAB11359 + 32: D2891C8EA1F574A6B2AB091057E0FB2C PMAC-skipjack (10 byte key) 0: 9CD94B75BC43B647 @@ -459,3 +459,111 @@ 15: 93098DA8A180AA35 16: BACE2F4DA8A89E32 +PMAC-seed (16 byte key) + 0: 58844BC0C53AACF808587A7C35C37DE2 + 1: 481E3E0831DF5AED135C71BBBD075F4A + 2: 11355F9D42E7BAD967DF90E9088D45A7 + 3: 5E3F82EF0B3CA70DCB614C1016DDB052 + 4: 35E283B0E6C538ED5F2DF4E004324865 + 5: 56467B8BA87BDE89DF4A64DC9B9409CF + 6: 9315AAAE6CA0868FDCBC397B7DC2DF84 + 7: A265D861DCE6C9B80CCFF92463DB27D3 + 8: 196A0813E4EB49F47A1C3713950B194E + 9: 261372868D259E609BE5080F282B361A + 10: DFDC55CDF60A0CB6A33BC6F4B5E5A481 + 11: 0BD99E075BC93386CDB40C2AAF8E8918 + 12: CA1B80D0088D7267C9AFB037DCD8FA56 + 13: 8EDBC9F77D4DAB3DFABEAB0891622F1C + 14: D1A8F869C961739ABFE7F401FA41D6F6 + 15: 653041670E0BAD5D1FE77A19D9439CEE + 16: 440EF361908A528B2A3ED7C50C1A47AB + 17: DCE2613438A5DC42AC8F5CE753DDF01D + 18: F9E313156CA5345CECB1A5F963E9B201 + 19: 34D72FB89BA3C41E1D0597531849C6C9 + 20: 7ED20B28067BA27E37606387D641B75F + 21: 933A2E06DA91C208297305FFF4F7795B + 22: CC455E1FB196CF5B233921AA6A048B81 + 23: 613AC1EE5B8D0C3123A18BED9A352980 + 24: 00A2BBEEB98DB190A694B67EF85A65A4 + 25: 1A7D50E6051D85CA81D9DD7DE81BF02E + 26: A7F948B36D7AF08FB405A1B8C8C6AC6D + 27: 967DC3981E7C718B562A93E5292B872F + 28: 2674544D8D3E3F750590992C0AFB36AF + 29: 193A2CC794CB285B4CB87197EE3550ED + 30: 312AAC97C92279428FB1AA0882DB7088 + 31: 3B9CBA2FF7FF4113BB2DC0DF6BCADDD0 + 32: 45C5C71122C70F4337F5EC74BA6B446D + +PMAC-kasumi (16 byte key) + 0: 52DF2D9A9EB4816A + 1: 201C1024E6D2AF23 + 2: 04E7B341BFC96D1A + 3: CC11D07594C50F31 + 4: EE27EAEED00E2F97 + 5: 51DB73EC42ADB789 + 6: 097A5F01A90BFE7F + 7: 7FD121FD6B504A9D + 8: 8A09BC5C1E7FA48C + 9: B7A88328D7D84C9E + 10: 1D34173FA9F1DFCD + 11: 129AC84C0429E80E + 12: 81D236AC427123E4 + 13: 72D4EFEDD56F6253 + 14: ACFC8D6AF30F8B64 + 15: C7F75094394C1765 + 16: D95208BCB48FAA38 + +PMAC-multi2 (40 byte key) + 0: 4799ECD07D95FF68 + 1: 5B94DBFD53C531D7 + 2: DF09EDE792536619 + 3: 01FB72E4EE79DFEF + 4: 4159642D6ED0D4D8 + 5: B6909A449A0A85BB + 6: 20B167D3AA349DEA + 7: E550AAB246D99D92 + 8: 5E1042397C86B08C + 9: 3789D96B64C85AC0 + 10: 72C0921EF5B5DEDE + 11: 5923493300FA910E + 12: B589609B09B4D12F + 13: 5EA42FE501CD696D + 14: 4413763D2689108B + 15: 07207040BAFC8E6D + 16: 4E80F408AA6F1DD9 + +PMAC-camellia (16 byte key) + 0: 33C03F6AA205F3816A17DA92BEE0BAD2 + 1: AD1EC293DD032511579235B2F29CC909 + 2: E71363EAF5A311DCFB035C69BBCE5DC0 + 3: 22661D6CD3496FB5C9B3D89FC62E3981 + 4: B142A96AF9C481B61E55B7B5896847C4 + 5: A286C0769989120F8A31A8DAD7574F22 + 6: 09E711382FDB6B938C802D11A66EF657 + 7: DF9ABA4F5CF5B0647F045C3AA631BB62 + 8: 499A8F68DAEC7FE56E64DB59B0993741 + 9: AFFDA4F40A1BDF673EE9123CAE321F16 + 10: B6F2E39D0126AA85D9152C4457365235 + 11: 2922AAC2FF4F0B77DEE4B3E28EF5094F + 12: 369D18F985D18B5ADDFFFC1151DE6BBA + 13: 1B7641D1A38C4114EE829B7D25BF0EFF + 14: DEF9092BA185FD5238A25C6FCF410C52 + 15: D59FEE8047D64032329318DC7A2277B8 + 16: B4561A4A092E031F8FE998FAC87F9BFB + 17: F27EF7D0823B056F692BA369D1B2E7B4 + 18: F62C4F7B749CF31A6F5485BFDED7EEBD + 19: 22BD3AB334BE6E04C84D6197FF69CAE3 + 20: E617D108BED8E9ACBA55FAF60863F8C3 + 21: 0DB60AE0725D37855F3AF1DDF78E98EB + 22: C76DD5A075AB30AB66FC448BD19B6588 + 23: 60231366598BEB2D16D33A1A8019B9A1 + 24: 247E925C96064801490A1D062A0C1F18 + 25: 1C1081E20DE3BE26FF24BEC3DFBA9BF2 + 26: 3B16562B3CD862C00A03B7ADC99E46C5 + 27: C1E8BA560851254640D523A0CEE846AF + 28: C36E8CF324A0A4EBC6C76EA01CDFD158 + 29: EAED84E721777F5E30184E496DA2C0FA + 30: 6655CA0D8741440212AA0DB218E5C7FE + 31: D5C0143E1BA233BA5F862EE6E11A8F58 + 32: C8DAF08BD68F4AE401C6663393C257CB + diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/rsa-testvectors/makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/notes/rsa-testvectors/makefile Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,11 @@ +default: regen + +clean: + rm -f *.c + +regen: + python rt.py pss-vect.txt pss > pss-vect.c + python rt.py oaep-vect.txt oaep > oaep-vect.c + python rt.py pkcs1v15sign-vectors.txt emsa > pkcs1v15sign-vectors.c + python rt.py pkcs1v15crypt-vectors.txt eme > pkcs1v15crypt-vectors.c + diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/rsa-testvectors/oaep-int.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/notes/rsa-testvectors/oaep-int.txt Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,369 @@ +# ================================= +# WORKED-OUT EXAMPLE FOR RSAES-OAEP +# ================================= +# +# This file gives an example of the process of +# encrypting and decrypting a message with +# RSAES-OAEP as specified in PKCS #1 v2.1. +# +# The message is a bit string of length 128, +# while the size of the modulus in the public +# key is 1024 bits. The second representation +# of the private key is used, which means that +# CRT is applied in the decryption process. +# +# The underlying hash function is SHA-1; the +# mask generation function is MGF1 with SHA-1 +# as specified in PKCS #1 v2.1. +# +# This file also contains a demonstration of +# the RSADP decryption primitive with CRT. +# Finally, DER encodings of the RSA keys are +# given at the end of the file. +# +# +# Integers are represented by strings of octets +# with the leftmost octet being the most +# significant octet. For example, +# +# 9,202,000 = (0x)8c 69 50. +# +# ============================================= + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +bb f8 2f 09 06 82 ce 9c 23 38 ac 2b 9d a8 71 f7 +36 8d 07 ee d4 10 43 a4 40 d6 b6 f0 74 54 f5 1f +b8 df ba af 03 5c 02 ab 61 ea 48 ce eb 6f cd 48 +76 ed 52 0d 60 e1 ec 46 19 71 9d 8a 5b 8b 80 7f +af b8 e0 a3 df c7 37 72 3e e6 b4 b7 d9 3a 25 84 +ee 6a 64 9d 06 09 53 74 88 34 b2 45 45 98 39 4e +e0 aa b1 2d 7b 61 a5 1f 52 7a 9a 41 f6 c1 68 7f +e2 53 72 98 ca 2a 8f 59 46 f8 e5 fd 09 1d bd cb + +# RSA public exponent e: +(0x)11 + +# Prime p: +ee cf ae 81 b1 b9 b3 c9 08 81 0b 10 a1 b5 60 01 +99 eb 9f 44 ae f4 fd a4 93 b8 1a 9e 3d 84 f6 32 +12 4e f0 23 6e 5d 1e 3b 7e 28 fa e7 aa 04 0a 2d +5b 25 21 76 45 9d 1f 39 75 41 ba 2a 58 fb 65 99 + +# Prime q: +c9 7f b1 f0 27 f4 53 f6 34 12 33 ea aa d1 d9 35 +3f 6c 42 d0 88 66 b1 d0 5a 0f 20 35 02 8b 9d 86 +98 40 b4 16 66 b4 2e 92 ea 0d a3 b4 32 04 b5 cf +ce 33 52 52 4d 04 16 a5 a4 41 e7 00 af 46 15 03 + +# p's CRT exponent dP: +54 49 4c a6 3e ba 03 37 e4 e2 40 23 fc d6 9a 5a +eb 07 dd dc 01 83 a4 d0 ac 9b 54 b0 51 f2 b1 3e +d9 49 09 75 ea b7 74 14 ff 59 c1 f7 69 2e 9a 2e +20 2b 38 fc 91 0a 47 41 74 ad c9 3c 1f 67 c9 81 + +# q's CRT exponent dQ: +47 1e 02 90 ff 0a f0 75 03 51 b7 f8 78 86 4c a9 +61 ad bd 3a 8a 7e 99 1c 5c 05 56 a9 4c 31 46 a7 +f9 80 3f 8f 6f 8a e3 42 e9 31 fd 8a e4 7a 22 0d +1b 99 a4 95 84 98 07 fe 39 f9 24 5a 98 36 da 3d + +# CRT coefficient qInv: +b0 6c 4f da bb 63 01 19 8d 26 5b db ae 94 23 b3 +80 f2 71 f7 34 53 88 50 93 07 7f cd 39 e2 11 9f +c9 86 32 15 4f 58 83 b1 67 a9 67 bf 40 2b 4e 9e +2e 0f 96 56 e6 98 ea 36 66 ed fb 25 79 80 39 f7 + +# ---------------------------------- +# Step-by-step RSAES-OAEP Encryption +# ---------------------------------- + +# Message M to be encrypted: +d4 36 e9 95 69 fd 32 a7 c8 a0 5b bc 90 d3 2c 49 + +# Label L: +(the empty string) + +# lHash = Hash(L) +# DB = lHash || Padding || M +# seed = random string of octets +# dbMask = MGF(seed, length(DB)) +# maskedDB = DB xor dbMask +# seedMask = MGF(maskedDB, length(seed)) +# maskedSeed = seed xor seedMask +# EM = 0x00 || maskedSeed || maskedDB + +# lHash: +da 39 a3 ee 5e 6b 4b 0d 32 55 bf ef 95 60 18 90 +af d8 07 09 + +# DB: +da 39 a3 ee 5e 6b 4b 0d 32 55 bf ef 95 60 18 90 +af d8 07 09 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 01 d4 36 e9 95 69 +fd 32 a7 c8 a0 5b bc 90 d3 2c 49 + +# seed: +aa fd 12 f6 59 ca e6 34 89 b4 79 e5 07 6d de c2 +f0 6c b5 8f + +# dbMask: +06 e1 de b2 36 9a a5 a5 c7 07 d8 2c 8e 4e 93 24 +8a c7 83 de e0 b2 c0 46 26 f5 af f9 3e dc fb 25 +c9 c2 b3 ff 8a e1 0e 83 9a 2d db 4c dc fe 4f f4 +77 28 b4 a1 b7 c1 36 2b aa d2 9a b4 8d 28 69 d5 +02 41 21 43 58 11 59 1b e3 92 f9 82 fb 3e 87 d0 +95 ae b4 04 48 db 97 2f 3a c1 4e af f4 9c 8c 3b +7c fc 95 1a 51 ec d1 dd e6 12 64 + +# maskedDB: +dc d8 7d 5c 68 f1 ee a8 f5 52 67 c3 1b 2e 8b b4 +25 1f 84 d7 e0 b2 c0 46 26 f5 af f9 3e dc fb 25 +c9 c2 b3 ff 8a e1 0e 83 9a 2d db 4c dc fe 4f f4 +77 28 b4 a1 b7 c1 36 2b aa d2 9a b4 8d 28 69 d5 +02 41 21 43 58 11 59 1b e3 92 f9 82 fb 3e 87 d0 +95 ae b4 04 48 db 97 2f 3a c1 4f 7b c2 75 19 52 +81 ce 32 d2 f1 b7 6d 4d 35 3e 2d + +# seedMask: +41 87 0b 5a b0 29 e6 57 d9 57 50 b5 4c 28 3c 08 +72 5d be a9 + +# maskedSeed: +eb 7a 19 ac e9 e3 00 63 50 e3 29 50 4b 45 e2 ca +82 31 0b 26 + +# EM = 00 || maskedSeed || maskedDB: +00 eb 7a 19 ac e9 e3 00 63 50 e3 29 50 4b 45 e2 +ca 82 31 0b 26 dc d8 7d 5c 68 f1 ee a8 f5 52 67 +c3 1b 2e 8b b4 25 1f 84 d7 e0 b2 c0 46 26 f5 af +f9 3e dc fb 25 c9 c2 b3 ff 8a e1 0e 83 9a 2d db +4c dc fe 4f f4 77 28 b4 a1 b7 c1 36 2b aa d2 9a +b4 8d 28 69 d5 02 41 21 43 58 11 59 1b e3 92 f9 +82 fb 3e 87 d0 95 ae b4 04 48 db 97 2f 3a c1 4f +7b c2 75 19 52 81 ce 32 d2 f1 b7 6d 4d 35 3e 2d + +# Ciphertext, the RSA encryption of EM: +12 53 e0 4d c0 a5 39 7b b4 4a 7a b8 7e 9b f2 a0 +39 a3 3d 1e 99 6f c8 2a 94 cc d3 00 74 c9 5d f7 +63 72 20 17 06 9e 52 68 da 5d 1c 0b 4f 87 2c f6 +53 c1 1d f8 23 14 a6 79 68 df ea e2 8d ef 04 bb +6d 84 b1 c3 1d 65 4a 19 70 e5 78 3b d6 eb 96 a0 +24 c2 ca 2f 4a 90 fe 9f 2e f5 c9 c1 40 e5 bb 48 +da 95 36 ad 87 00 c8 4f c9 13 0a de a7 4e 55 8d +51 a7 4d df 85 d8 b5 0d e9 68 38 d6 06 3e 09 55 + +# -------------------------------------------- +# Step-by-step RSAES-OAEP Decryption Using CRT +# -------------------------------------------- + +# c = the integer value of C above +# m1 = c^dP mod p = (c mod p)^dP mod p +# m2 = c^dQ mod q = (c mod q)^dQ mod q +# h = (m1-m2)*qInv mod p +# m = m2 + q*h = the integer value of EM above + +# c mod p: +de 63 d4 72 35 66 fa a7 59 bf e4 08 82 1d d5 25 +72 ec 92 85 4d df 87 a2 b6 64 d4 4d aa 37 ca 34 +6a 05 20 3d 82 ff 2d e8 e3 6c ec 1d 34 f9 8e b6 +05 e2 a7 d2 6d e7 af 36 9c e4 ec ae 14 e3 56 33 + +# c mod q: +a2 d9 24 de d9 c3 6d 62 3e d9 a6 5b 5d 86 2c fb +ec 8b 19 9c 64 27 9c 54 14 e6 41 19 6e f1 c9 3c +50 7a 9b 52 13 88 1a ad 05 b4 cc fa 02 8a c1 ec +61 42 09 74 bf 16 25 83 6b 0b 7d 05 fb b7 53 36 + +# m1: +89 6c a2 6c d7 e4 87 1c 7f c9 68 a8 ed ea 11 e2 +71 82 4f 0e 03 65 52 17 94 f1 e9 e9 43 b4 a4 4b +57 c9 e3 95 a1 46 74 78 f5 26 49 6b 4b b9 1f 1c +ba ea 90 0f fc 60 2c f0 c6 63 6e ba 84 fc 9f f7 + +# m2: +4e bb 22 75 85 f0 c1 31 2d ca 19 e0 b5 41 db 14 +99 fb f1 4e 27 0e 69 8e 23 9a 8c 27 a9 6c da 9a +74 09 74 de 93 7b 5c 9c 93 ea d9 46 2c 65 75 02 +1a 23 d4 64 99 dc 9f 6b 35 89 75 59 60 8f 19 be + +# h: +01 2b 2b 24 15 0e 76 e1 59 bd 8d db 42 76 e0 7b +fa c1 88 e0 8d 60 47 cf 0e fb 8a e2 ae bd f2 51 +c4 0e bc 23 dc fd 4a 34 42 43 94 ad a9 2c fc be +1b 2e ff bb 60 fd fb 03 35 9a 95 36 8d 98 09 25 + +# m: +00 eb 7a 19 ac e9 e3 00 63 50 e3 29 50 4b 45 e2 +ca 82 31 0b 26 dc d8 7d 5c 68 f1 ee a8 f5 52 67 +c3 1b 2e 8b b4 25 1f 84 d7 e0 b2 c0 46 26 f5 af +f9 3e dc fb 25 c9 c2 b3 ff 8a e1 0e 83 9a 2d db +4c dc fe 4f f4 77 28 b4 a1 b7 c1 36 2b aa d2 9a +b4 8d 28 69 d5 02 41 21 43 58 11 59 1b e3 92 f9 +82 fb 3e 87 d0 95 ae b4 04 48 db 97 2f 3a c1 4f +7b c2 75 19 52 81 ce 32 d2 f1 b7 6d 4d 35 3e 2d + +# The intermediate values in the remaining +# decryption process are the same as during +# RSAES-OAEP encryption of M. + +# ============================================= + +# ======================== +# DER Encoding of RSA Keys +# ======================== + +# ------------ +# RSAPublicKey +# ------------ +30 81 87 +# modulus + 02 81 81 + 00 bb f8 2f 09 06 82 ce + 9c 23 38 ac 2b 9d a8 71 + f7 36 8d 07 ee d4 10 43 + a4 40 d6 b6 f0 74 54 f5 + 1f b8 df ba af 03 5c 02 + ab 61 ea 48 ce eb 6f cd + 48 76 ed 52 0d 60 e1 ec + 46 19 71 9d 8a 5b 8b 80 + 7f af b8 e0 a3 df c7 37 + 72 3e e6 b4 b7 d9 3a 25 + 84 ee 6a 64 9d 06 09 53 + 74 88 34 b2 45 45 98 39 + 4e e0 aa b1 2d 7b 61 a5 + 1f 52 7a 9a 41 f6 c1 68 + 7f e2 53 72 98 ca 2a 8f + 59 46 f8 e5 fd 09 1d bd + cb +# publicExponent + 02 01 + 11 + +# ------------- +# RSAPrivateKey +# ------------- +30 82 02 5b +# version + 02 01 + 00 +# modulus + 02 81 81 + 00 bb f8 2f 09 06 82 ce + 9c 23 38 ac 2b 9d a8 71 + f7 36 8d 07 ee d4 10 43 + a4 40 d6 b6 f0 74 54 f5 + 1f b8 df ba af 03 5c 02 + ab 61 ea 48 ce eb 6f cd + 48 76 ed 52 0d 60 e1 ec + 46 19 71 9d 8a 5b 8b 80 + 7f af b8 e0 a3 df c7 37 + 72 3e e6 b4 b7 d9 3a 25 + 84 ee 6a 64 9d 06 09 53 + 74 88 34 b2 45 45 98 39 + 4e e0 aa b1 2d 7b 61 a5 + 1f 52 7a 9a 41 f6 c1 68 + 7f e2 53 72 98 ca 2a 8f + 59 46 f8 e5 fd 09 1d bd + cb +# publicExponent + 02 01 + 11 +# privateExponent + 02 81 81 + 00 a5 da fc 53 41 fa f2 + 89 c4 b9 88 db 30 c1 cd + f8 3f 31 25 1e 06 68 b4 + 27 84 81 38 01 57 96 41 + b2 94 10 b3 c7 99 8d 6b + c4 65 74 5e 5c 39 26 69 + d6 87 0d a2 c0 82 a9 39 + e3 7f dc b8 2e c9 3e da + c9 7f f3 ad 59 50 ac cf + bc 11 1c 76 f1 a9 52 94 + 44 e5 6a af 68 c5 6c 09 + 2c d3 8d c3 be f5 d2 0a + 93 99 26 ed 4f 74 a1 3e + dd fb e1 a1 ce cc 48 94 + af 94 28 c2 b7 b8 88 3f + e4 46 3a 4b c8 5b 1c b3 + c1 +# prime1 + 02 41 + 00 ee cf ae 81 b1 b9 b3 + c9 08 81 0b 10 a1 b5 60 + 01 99 eb 9f 44 ae f4 fd + a4 93 b8 1a 9e 3d 84 f6 + 32 12 4e f0 23 6e 5d 1e + 3b 7e 28 fa e7 aa 04 0a + 2d 5b 25 21 76 45 9d 1f + 39 75 41 ba 2a 58 fb 65 + 99 +# prime2 + 02 41 + 00 c9 7f b1 f0 27 f4 53 + f6 34 12 33 ea aa d1 d9 + 35 3f 6c 42 d0 88 66 b1 + d0 5a 0f 20 35 02 8b 9d + 86 98 40 b4 16 66 b4 2e + 92 ea 0d a3 b4 32 04 b5 + cf ce 33 52 52 4d 04 16 + a5 a4 41 e7 00 af 46 15 + 03 +# exponent1 + 02 40 + 54 49 4c a6 3e ba 03 37 + e4 e2 40 23 fc d6 9a 5a + eb 07 dd dc 01 83 a4 d0 + ac 9b 54 b0 51 f2 b1 3e + d9 49 09 75 ea b7 74 14 + ff 59 c1 f7 69 2e 9a 2e + 20 2b 38 fc 91 0a 47 41 + 74 ad c9 3c 1f 67 c9 81 +# exponent2 + 02 40 + 47 1e 02 90 ff 0a f0 75 + 03 51 b7 f8 78 86 4c a9 + 61 ad bd 3a 8a 7e 99 1c + 5c 05 56 a9 4c 31 46 a7 + f9 80 3f 8f 6f 8a e3 42 + e9 31 fd 8a e4 7a 22 0d + 1b 99 a4 95 84 98 07 fe + 39 f9 24 5a 98 36 da 3d +# coefficient + 02 41 + 00 b0 6c 4f da bb 63 01 + 19 8d 26 5b db ae 94 23 + b3 80 f2 71 f7 34 53 88 + 50 93 07 7f cd 39 e2 11 + 9f c9 86 32 15 4f 58 83 + b1 67 a9 67 bf 40 2b 4e + 9e 2e 0f 96 56 e6 98 ea + 36 66 ed fb 25 79 80 39 + f7 + +# ------------------------ +# PrivateKeyInfo (PKCS #8) +# ------------------------ +30 82 02 75 +# version + 02 01 + 00 +# privateKeyAlgorithmIdentifier + 30 0d + 06 09 + 2a 86 48 86 f7 0d 01 01 01 +# parameters + 05 00 +# privateKey = RSAPrivateKey encoding + 04 82 02 5f +# DER encoding of RSAPrivateKey structure + 30 82 02 5b ... 79 80 39 f7 + +# ============================================= diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/rsa-testvectors/oaep-vect.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/notes/rsa-testvectors/oaep-vect.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,1418 @@ +/* Generated from file: oaep-vect.txt + * with md5 hash: 9c79a5465c35222512ed3e7ac1ad3190 + */ + + +typedef struct rsaKey { + int n_l; + unsigned char n[256]; + int e_l; + unsigned char e[256]; + int d_l; + unsigned char d[256]; + int p_l; + unsigned char p[256]; + int q_l; + unsigned char q[256]; + int dP_l; + unsigned char dP[256]; + int dQ_l; + unsigned char dQ[256]; + int qInv_l; + unsigned char qInv[256]; +} rsaKey_t; + +typedef struct rsaData { + const char* name; + int o1_l; + unsigned char o1[256]; + int o2_l; + unsigned char o2[256]; + int o3_l; + unsigned char o3[256]; +} rsaData_t; + +typedef struct testcase { + const char* name; + rsaKey_t rsa; +#ifdef LTC_TEST_EXT + rsaData_t data[6]; +#else + rsaData_t data[1]; +#endif /* LTC_TEST_EXT */ +} testcase_t; + +testcase_t testcases_oaep[] = + { +{ + "Example 1: A 1024-bit RSA Key Pair", +{ + /* RSA modulus n */ + 128, + { 0xa8, 0xb3, 0xb2, 0x84, 0xaf, 0x8e, 0xb5, 0x0b, 0x38, 0x70, 0x34, 0xa8, 0x60, 0xf1, 0x46, 0xc4, 0x91, 0x9f, 0x31, 0x87, 0x63, 0xcd, 0x6c, 0x55, 0x98, 0xc8, 0xae, 0x48, 0x11, 0xa1, 0xe0, 0xab, 0xc4, 0xc7, 0xe0, 0xb0, 0x82, 0xd6, 0x93, 0xa5, 0xe7, 0xfc, 0xed, 0x67, 0x5c, 0xf4, 0x66, 0x85, 0x12, 0x77, 0x2c, 0x0c, 0xbc, 0x64, 0xa7, 0x42, 0xc6, 0xc6, 0x30, 0xf5, 0x33, 0xc8, 0xcc, 0x72, 0xf6, 0x2a, 0xe8, 0x33, 0xc4, 0x0b, 0xf2, 0x58, 0x42, 0xe9, 0x84, 0xbb, 0x78, 0xbd, 0xbf, 0x97, 0xc0, 0x10, 0x7d, 0x55, 0xbd, 0xb6, 0x62, 0xf5, 0xc4, 0xe0, 0xfa, 0xb9, 0x84, 0x5c, 0xb5, 0x14, 0x8e, 0xf7, 0x39, 0x2d, 0xd3, 0xaa, 0xff, 0x93, 0xae, 0x1e, 0x6b, 0x66, 0x7b, 0xb3, 0xd4, 0x24, 0x76, 0x16, 0xd4, 0xf5, 0xba, 0x10, 0xd4, 0xcf, 0xd2, 0x26, 0xde, 0x88, 0xd3, 0x9f, 0x16, 0xfb } +, + /* RSA public exponent e */ + 3, + { 0x01, 0x00, 0x01 } +, + /* RSA private exponent d */ + 128, + { 0x53, 0x33, 0x9c, 0xfd, 0xb7, 0x9f, 0xc8, 0x46, 0x6a, 0x65, 0x5c, 0x73, 0x16, 0xac, 0xa8, 0x5c, 0x55, 0xfd, 0x8f, 0x6d, 0xd8, 0x98, 0xfd, 0xaf, 0x11, 0x95, 0x17, 0xef, 0x4f, 0x52, 0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0x81, 0xc7, 0xb8, 0x98, 0x2d, 0x82, 0x24, 0xa4, 0x90, 0xed, 0xbe, 0xb3, 0x3d, 0x3e, 0x3d, 0x5c, 0xc9, 0x3c, 0x47, 0x65, 0x70, 0x3d, 0x1d, 0xd7, 0x91, 0x64, 0x2f, 0x1f, 0x11, 0x6a, 0x0d, 0xd8, 0x52, 0xbe, 0x24, 0x19, 0xb2, 0xaf, 0x72, 0xbf, 0xe9, 0xa0, 0x30, 0xe8, 0x60, 0xb0, 0x28, 0x8b, 0x5d, 0x77 } +, + /* p's CRT exponent dP */ + 64, + { 0x0e, 0x12, 0xbf, 0x17, 0x18, 0xe9, 0xce, 0xf5, 0x59, 0x9b, 0xa1, 0xc3, 0x88, 0x2f, 0xe8, 0x04, 0x6a, 0x90, 0x87, 0x4e, 0xef, 0xce, 0x8f, 0x2c, 0xcc, 0x20, 0xe4, 0xf2, 0x74, 0x1f, 0xb0, 0xa3, 0x3a, 0x38, 0x48, 0xae, 0xc9, 0xc9, 0x30, 0x5f, 0xbe, 0xcb, 0xd2, 0xd7, 0x68, 0x19, 0x96, 0x7d, 0x46, 0x71, 0xac, 0xc6, 0x43, 0x1e, 0x40, 0x37, 0x96, 0x8d, 0xb3, 0x78, 0x78, 0xe6, 0x95, 0xc1 } +, + /* q's CRT exponent dQ */ + 64, + { 0x95, 0x29, 0x7b, 0x0f, 0x95, 0xa2, 0xfa, 0x67, 0xd0, 0x07, 0x07, 0xd6, 0x09, 0xdf, 0xd4, 0xfc, 0x05, 0xc8, 0x9d, 0xaf, 0xc2, 0xef, 0x6d, 0x6e, 0xa5, 0x5b, 0xec, 0x77, 0x1e, 0xa3, 0x33, 0x73, 0x4d, 0x92, 0x51, 0xe7, 0x90, 0x82, 0xec, 0xda, 0x86, 0x6e, 0xfe, 0xf1, 0x3c, 0x45, 0x9e, 0x1a, 0x63, 0x13, 0x86, 0xb7, 0xe3, 0x54, 0xc8, 0x99, 0xf5, 0xf1, 0x12, 0xca, 0x85, 0xd7, 0x15, 0x83 } +, + /* CRT coefficient qInv */ + 64, + { 0x4f, 0x45, 0x6c, 0x50, 0x24, 0x93, 0xbd, 0xc0, 0xed, 0x2a, 0xb7, 0x56, 0xa3, 0xa6, 0xed, 0x4d, 0x67, 0x35, 0x2a, 0x69, 0x7d, 0x42, 0x16, 0xe9, 0x32, 0x12, 0xb1, 0x27, 0xa6, 0x3d, 0x54, 0x11, 0xce, 0x6f, 0xa9, 0x8d, 0x5d, 0xbe, 0xfd, 0x73, 0x26, 0x3e, 0x37, 0x28, 0x14, 0x27, 0x43, 0x81, 0x81, 0x66, 0xed, 0x7d, 0xd6, 0x36, 0x87, 0xdd, 0x2a, 0x8c, 0xa1, 0xd2, 0xf4, 0xfb, 0xd8, 0xe1 } + +} +, +{{ + "RSAES-OAEP Encryption Example 1.1", + /* Message to be encrypted */ + 28, + { 0x66, 0x28, 0x19, 0x4e, 0x12, 0x07, 0x3d, 0xb0, 0x3b, 0xa9, 0x4c, 0xda, 0x9e, 0xf9, 0x53, 0x23, 0x97, 0xd5, 0x0d, 0xba, 0x79, 0xb9, 0x87, 0x00, 0x4a, 0xfe, 0xfe, 0x34 } +, + /* Seed */ + 20, + { 0x18, 0xb7, 0x76, 0xea, 0x21, 0x06, 0x9d, 0x69, 0x77, 0x6a, 0x33, 0xe9, 0x6b, 0xad, 0x48, 0xe1, 0xdd, 0xa0, 0xa5, 0xef } +, + /* Encryption */ + 128, + { 0x35, 0x4f, 0xe6, 0x7b, 0x4a, 0x12, 0x6d, 0x5d, 0x35, 0xfe, 0x36, 0xc7, 0x77, 0x79, 0x1a, 0x3f, 0x7b, 0xa1, 0x3d, 0xef, 0x48, 0x4e, 0x2d, 0x39, 0x08, 0xaf, 0xf7, 0x22, 0xfa, 0xd4, 0x68, 0xfb, 0x21, 0x69, 0x6d, 0xe9, 0x5d, 0x0b, 0xe9, 0x11, 0xc2, 0xd3, 0x17, 0x4f, 0x8a, 0xfc, 0xc2, 0x01, 0x03, 0x5f, 0x7b, 0x6d, 0x8e, 0x69, 0x40, 0x2d, 0xe5, 0x45, 0x16, 0x18, 0xc2, 0x1a, 0x53, 0x5f, 0xa9, 0xd7, 0xbf, 0xc5, 0xb8, 0xdd, 0x9f, 0xc2, 0x43, 0xf8, 0xcf, 0x92, 0x7d, 0xb3, 0x13, 0x22, 0xd6, 0xe8, 0x81, 0xea, 0xa9, 0x1a, 0x99, 0x61, 0x70, 0xe6, 0x57, 0xa0, 0x5a, 0x26, 0x64, 0x26, 0xd9, 0x8c, 0x88, 0x00, 0x3f, 0x84, 0x77, 0xc1, 0x22, 0x70, 0x94, 0xa0, 0xd9, 0xfa, 0x1e, 0x8c, 0x40, 0x24, 0x30, 0x9c, 0xe1, 0xec, 0xcc, 0xb5, 0x21, 0x00, 0x35, 0xd4, 0x7a, 0xc7, 0x2e, 0x8a } + +} +, +#ifdef LTC_TEST_EXT +{ + "RSAES-OAEP Encryption Example 1.2", + /* Message to be encrypted */ + 28, + { 0x75, 0x0c, 0x40, 0x47, 0xf5, 0x47, 0xe8, 0xe4, 0x14, 0x11, 0x85, 0x65, 0x23, 0x29, 0x8a, 0xc9, 0xba, 0xe2, 0x45, 0xef, 0xaf, 0x13, 0x97, 0xfb, 0xe5, 0x6f, 0x9d, 0xd5 } +, + /* Seed */ + 20, + { 0x0c, 0xc7, 0x42, 0xce, 0x4a, 0x9b, 0x7f, 0x32, 0xf9, 0x51, 0xbc, 0xb2, 0x51, 0xef, 0xd9, 0x25, 0xfe, 0x4f, 0xe3, 0x5f } +, + /* Encryption */ + 128, + { 0x64, 0x0d, 0xb1, 0xac, 0xc5, 0x8e, 0x05, 0x68, 0xfe, 0x54, 0x07, 0xe5, 0xf9, 0xb7, 0x01, 0xdf, 0xf8, 0xc3, 0xc9, 0x1e, 0x71, 0x6c, 0x53, 0x6f, 0xc7, 0xfc, 0xec, 0x6c, 0xb5, 0xb7, 0x1c, 0x11, 0x65, 0x98, 0x8d, 0x4a, 0x27, 0x9e, 0x15, 0x77, 0xd7, 0x30, 0xfc, 0x7a, 0x29, 0x93, 0x2e, 0x3f, 0x00, 0xc8, 0x15, 0x15, 0x23, 0x6d, 0x8d, 0x8e, 0x31, 0x01, 0x7a, 0x7a, 0x09, 0xdf, 0x43, 0x52, 0xd9, 0x04, 0xcd, 0xeb, 0x79, 0xaa, 0x58, 0x3a, 0xdc, 0xc3, 0x1e, 0xa6, 0x98, 0xa4, 0xc0, 0x52, 0x83, 0xda, 0xba, 0x90, 0x89, 0xbe, 0x54, 0x91, 0xf6, 0x7c, 0x1a, 0x4e, 0xe4, 0x8d, 0xc7, 0x4b, 0xbb, 0xe6, 0x64, 0x3a, 0xef, 0x84, 0x66, 0x79, 0xb4, 0xcb, 0x39, 0x5a, 0x35, 0x2d, 0x5e, 0xd1, 0x15, 0x91, 0x2d, 0xf6, 0x96, 0xff, 0xe0, 0x70, 0x29, 0x32, 0x94, 0x6d, 0x71, 0x49, 0x2b, 0x44 } + +} +, +{ + "RSAES-OAEP Encryption Example 1.3", + /* Message to be encrypted */ + 55, + { 0xd9, 0x4a, 0xe0, 0x83, 0x2e, 0x64, 0x45, 0xce, 0x42, 0x33, 0x1c, 0xb0, 0x6d, 0x53, 0x1a, 0x82, 0xb1, 0xdb, 0x4b, 0xaa, 0xd3, 0x0f, 0x74, 0x6d, 0xc9, 0x16, 0xdf, 0x24, 0xd4, 0xe3, 0xc2, 0x45, 0x1f, 0xff, 0x59, 0xa6, 0x42, 0x3e, 0xb0, 0xe1, 0xd0, 0x2d, 0x4f, 0xe6, 0x46, 0xcf, 0x69, 0x9d, 0xfd, 0x81, 0x8c, 0x6e, 0x97, 0xb0, 0x51 } +, + /* Seed */ + 20, + { 0x25, 0x14, 0xdf, 0x46, 0x95, 0x75, 0x5a, 0x67, 0xb2, 0x88, 0xea, 0xf4, 0x90, 0x5c, 0x36, 0xee, 0xc6, 0x6f, 0xd2, 0xfd } +, + /* Encryption */ + 128, + { 0x42, 0x37, 0x36, 0xed, 0x03, 0x5f, 0x60, 0x26, 0xaf, 0x27, 0x6c, 0x35, 0xc0, 0xb3, 0x74, 0x1b, 0x36, 0x5e, 0x5f, 0x76, 0xca, 0x09, 0x1b, 0x4e, 0x8c, 0x29, 0xe2, 0xf0, 0xbe, 0xfe, 0xe6, 0x03, 0x59, 0x5a, 0xa8, 0x32, 0x2d, 0x60, 0x2d, 0x2e, 0x62, 0x5e, 0x95, 0xeb, 0x81, 0xb2, 0xf1, 0xc9, 0x72, 0x4e, 0x82, 0x2e, 0xca, 0x76, 0xdb, 0x86, 0x18, 0xcf, 0x09, 0xc5, 0x34, 0x35, 0x03, 0xa4, 0x36, 0x08, 0x35, 0xb5, 0x90, 0x3b, 0xc6, 0x37, 0xe3, 0x87, 0x9f, 0xb0, 0x5e, 0x0e, 0xf3, 0x26, 0x85, 0xd5, 0xae, 0xc5, 0x06, 0x7c, 0xd7, 0xcc, 0x96, 0xfe, 0x4b, 0x26, 0x70, 0xb6, 0xea, 0xc3, 0x06, 0x6b, 0x1f, 0xcf, 0x56, 0x86, 0xb6, 0x85, 0x89, 0xaa, 0xfb, 0x7d, 0x62, 0x9b, 0x02, 0xd8, 0xf8, 0x62, 0x5c, 0xa3, 0x83, 0x36, 0x24, 0xd4, 0x80, 0x0f, 0xb0, 0x81, 0xb1, 0xcf, 0x94, 0xeb } + +} +, +{ + "RSAES-OAEP Encryption Example 1.4", + /* Message to be encrypted */ + 26, + { 0x52, 0xe6, 0x50, 0xd9, 0x8e, 0x7f, 0x2a, 0x04, 0x8b, 0x4f, 0x86, 0x85, 0x21, 0x53, 0xb9, 0x7e, 0x01, 0xdd, 0x31, 0x6f, 0x34, 0x6a, 0x19, 0xf6, 0x7a, 0x85 } +, + /* Seed */ + 20, + { 0xc4, 0x43, 0x5a, 0x3e, 0x1a, 0x18, 0xa6, 0x8b, 0x68, 0x20, 0x43, 0x62, 0x90, 0xa3, 0x7c, 0xef, 0xb8, 0x5d, 0xb3, 0xfb } +, + /* Encryption */ + 128, + { 0x45, 0xea, 0xd4, 0xca, 0x55, 0x1e, 0x66, 0x2c, 0x98, 0x00, 0xf1, 0xac, 0xa8, 0x28, 0x3b, 0x05, 0x25, 0xe6, 0xab, 0xae, 0x30, 0xbe, 0x4b, 0x4a, 0xba, 0x76, 0x2f, 0xa4, 0x0f, 0xd3, 0xd3, 0x8e, 0x22, 0xab, 0xef, 0xc6, 0x97, 0x94, 0xf6, 0xeb, 0xbb, 0xc0, 0x5d, 0xdb, 0xb1, 0x12, 0x16, 0x24, 0x7d, 0x2f, 0x41, 0x2f, 0xd0, 0xfb, 0xa8, 0x7c, 0x6e, 0x3a, 0xcd, 0x88, 0x88, 0x13, 0x64, 0x6f, 0xd0, 0xe4, 0x8e, 0x78, 0x52, 0x04, 0xf9, 0xc3, 0xf7, 0x3d, 0x6d, 0x82, 0x39, 0x56, 0x27, 0x22, 0xdd, 0xdd, 0x87, 0x71, 0xfe, 0xc4, 0x8b, 0x83, 0xa3, 0x1e, 0xe6, 0xf5, 0x92, 0xc4, 0xcf, 0xd4, 0xbc, 0x88, 0x17, 0x4f, 0x3b, 0x13, 0xa1, 0x12, 0xaa, 0xe3, 0xb9, 0xf7, 0xb8, 0x0e, 0x0f, 0xc6, 0xf7, 0x25, 0x5b, 0xa8, 0x80, 0xdc, 0x7d, 0x80, 0x21, 0xe2, 0x2a, 0xd6, 0xa8, 0x5f, 0x07, 0x55 } + +} +, +{ + "RSAES-OAEP Encryption Example 1.5", + /* Message to be encrypted */ + 20, + { 0x8d, 0xa8, 0x9f, 0xd9, 0xe5, 0xf9, 0x74, 0xa2, 0x9f, 0xef, 0xfb, 0x46, 0x2b, 0x49, 0x18, 0x0f, 0x6c, 0xf9, 0xe8, 0x02 } +, + /* Seed */ + 20, + { 0xb3, 0x18, 0xc4, 0x2d, 0xf3, 0xbe, 0x0f, 0x83, 0xfe, 0xa8, 0x23, 0xf5, 0xa7, 0xb4, 0x7e, 0xd5, 0xe4, 0x25, 0xa3, 0xb5 } +, + /* Encryption */ + 128, + { 0x36, 0xf6, 0xe3, 0x4d, 0x94, 0xa8, 0xd3, 0x4d, 0xaa, 0xcb, 0xa3, 0x3a, 0x21, 0x39, 0xd0, 0x0a, 0xd8, 0x5a, 0x93, 0x45, 0xa8, 0x60, 0x51, 0xe7, 0x30, 0x71, 0x62, 0x00, 0x56, 0xb9, 0x20, 0xe2, 0x19, 0x00, 0x58, 0x55, 0xa2, 0x13, 0xa0, 0xf2, 0x38, 0x97, 0xcd, 0xcd, 0x73, 0x1b, 0x45, 0x25, 0x7c, 0x77, 0x7f, 0xe9, 0x08, 0x20, 0x2b, 0xef, 0xdd, 0x0b, 0x58, 0x38, 0x6b, 0x12, 0x44, 0xea, 0x0c, 0xf5, 0x39, 0xa0, 0x5d, 0x5d, 0x10, 0x32, 0x9d, 0xa4, 0x4e, 0x13, 0x03, 0x0f, 0xd7, 0x60, 0xdc, 0xd6, 0x44, 0xcf, 0xef, 0x20, 0x94, 0xd1, 0x91, 0x0d, 0x3f, 0x43, 0x3e, 0x1c, 0x7c, 0x6d, 0xd1, 0x8b, 0xc1, 0xf2, 0xdf, 0x7f, 0x64, 0x3d, 0x66, 0x2f, 0xb9, 0xdd, 0x37, 0xea, 0xd9, 0x05, 0x91, 0x90, 0xf4, 0xfa, 0x66, 0xca, 0x39, 0xe8, 0x69, 0xc4, 0xeb, 0x44, 0x9c, 0xbd, 0xc4, 0x39 } + +} +, +{ + "RSAES-OAEP Encryption Example 1.6", + /* Message to be encrypted */ + 7, + { 0x26, 0x52, 0x10, 0x50, 0x84, 0x42, 0x71 } +, + /* Seed */ + 20, + { 0xe4, 0xec, 0x09, 0x82, 0xc2, 0x33, 0x6f, 0x3a, 0x67, 0x7f, 0x6a, 0x35, 0x61, 0x74, 0xeb, 0x0c, 0xe8, 0x87, 0xab, 0xc2 } +, + /* Encryption */ + 128, + { 0x42, 0xce, 0xe2, 0x61, 0x7b, 0x1e, 0xce, 0xa4, 0xdb, 0x3f, 0x48, 0x29, 0x38, 0x6f, 0xbd, 0x61, 0xda, 0xfb, 0xf0, 0x38, 0xe1, 0x80, 0xd8, 0x37, 0xc9, 0x63, 0x66, 0xdf, 0x24, 0xc0, 0x97, 0xb4, 0xab, 0x0f, 0xac, 0x6b, 0xdf, 0x59, 0x0d, 0x82, 0x1c, 0x9f, 0x10, 0x64, 0x2e, 0x68, 0x1a, 0xd0, 0x5b, 0x8d, 0x78, 0xb3, 0x78, 0xc0, 0xf4, 0x6c, 0xe2, 0xfa, 0xd6, 0x3f, 0x74, 0xe0, 0xad, 0x3d, 0xf0, 0x6b, 0x07, 0x5d, 0x7e, 0xb5, 0xf5, 0x63, 0x6f, 0x8d, 0x40, 0x3b, 0x90, 0x59, 0xca, 0x76, 0x1b, 0x5c, 0x62, 0xbb, 0x52, 0xaa, 0x45, 0x00, 0x2e, 0xa7, 0x0b, 0xaa, 0xce, 0x08, 0xde, 0xd2, 0x43, 0xb9, 0xd8, 0xcb, 0xd6, 0x2a, 0x68, 0xad, 0xe2, 0x65, 0x83, 0x2b, 0x56, 0x56, 0x4e, 0x43, 0xa6, 0xfa, 0x42, 0xed, 0x19, 0x9a, 0x09, 0x97, 0x69, 0x74, 0x2d, 0xf1, 0x53, 0x9e, 0x82, 0x55 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 2: A 1025-bit RSA Key Pair", +{ + /* RSA modulus n */ + 129, + { 0x01, 0x94, 0x7c, 0x7f, 0xce, 0x90, 0x42, 0x5f, 0x47, 0x27, 0x9e, 0x70, 0x85, 0x1f, 0x25, 0xd5, 0xe6, 0x23, 0x16, 0xfe, 0x8a, 0x1d, 0xf1, 0x93, 0x71, 0xe3, 0xe6, 0x28, 0xe2, 0x60, 0x54, 0x3e, 0x49, 0x01, 0xef, 0x60, 0x81, 0xf6, 0x8c, 0x0b, 0x81, 0x41, 0x19, 0x0d, 0x2a, 0xe8, 0xda, 0xba, 0x7d, 0x12, 0x50, 0xec, 0x6d, 0xb6, 0x36, 0xe9, 0x44, 0xec, 0x37, 0x22, 0x87, 0x7c, 0x7c, 0x1d, 0x0a, 0x67, 0xf1, 0x4b, 0x16, 0x94, 0xc5, 0xf0, 0x37, 0x94, 0x51, 0xa4, 0x3e, 0x49, 0xa3, 0x2d, 0xde, 0x83, 0x67, 0x0b, 0x73, 0xda, 0x91, 0xa1, 0xc9, 0x9b, 0xc2, 0x3b, 0x43, 0x6a, 0x60, 0x05, 0x5c, 0x61, 0x0f, 0x0b, 0xaf, 0x99, 0xc1, 0xa0, 0x79, 0x56, 0x5b, 0x95, 0xa3, 0xf1, 0x52, 0x66, 0x32, 0xd1, 0xd4, 0xda, 0x60, 0xf2, 0x0e, 0xda, 0x25, 0xe6, 0x53, 0xc4, 0xf0, 0x02, 0x76, 0x6f, 0x45 } +, + /* RSA public exponent e */ + 3, + { 0x01, 0x00, 0x01 } +, + /* RSA private exponent d */ + 128, + { 0x08, 0x23, 0xf2, 0x0f, 0xad, 0xb5, 0xda, 0x89, 0x08, 0x8a, 0x9d, 0x00, 0x89, 0x3e, 0x21, 0xfa, 0x4a, 0x1b, 0x11, 0xfb, 0xc9, 0x3c, 0x64, 0xa3, 0xbe, 0x0b, 0xaa, 0xea, 0x97, 0xfb, 0x3b, 0x93, 0xc3, 0xff, 0x71, 0x37, 0x04, 0xc1, 0x9c, 0x96, 0x3c, 0x1d, 0x10, 0x7a, 0xae, 0x99, 0x05, 0x47, 0x39, 0xf7, 0x9e, 0x02, 0xe1, 0x86, 0xde, 0x86, 0xf8, 0x7a, 0x6d, 0xde, 0xfe, 0xa6, 0xd8, 0xcc, 0xd1, 0xd3, 0xc8, 0x1a, 0x47, 0xbf, 0xa7, 0x25, 0x5b, 0xe2, 0x06, 0x01, 0xa4, 0xa4, 0xb2, 0xf0, 0x8a, 0x16, 0x7b, 0x5e, 0x27, 0x9d, 0x71, 0x5b, 0x1b, 0x45, 0x5b, 0xdd, 0x7e, 0xab, 0x24, 0x59, 0x41, 0xd9, 0x76, 0x8b, 0x9a, 0xce, 0xfb, 0x3c, 0xcd, 0xa5, 0x95, 0x2d, 0xa3, 0xce, 0xe7, 0x25, 0x25, 0xb4, 0x50, 0x16, 0x63, 0xa8, 0xee, 0x15, 0xc9, 0xe9, 0x92, 0xd9, 0x24, 0x62, 0xfe, 0x39 } +, + /* Prime p */ + 65, + { 0x01, 0x59, 0xdb, 0xde, 0x04, 0xa3, 0x3e, 0xf0, 0x6f, 0xb6, 0x08, 0xb8, 0x0b, 0x19, 0x0f, 0x4d, 0x3e, 0x22, 0xbc, 0xc1, 0x3a, 0xc8, 0xe4, 0xa0, 0x81, 0x03, 0x3a, 0xbf, 0xa4, 0x16, 0xed, 0xb0, 0xb3, 0x38, 0xaa, 0x08, 0xb5, 0x73, 0x09, 0xea, 0x5a, 0x52, 0x40, 0xe7, 0xdc, 0x6e, 0x54, 0x37, 0x8c, 0x69, 0x41, 0x4c, 0x31, 0xd9, 0x7d, 0xdb, 0x1f, 0x40, 0x6d, 0xb3, 0x76, 0x9c, 0xc4, 0x1a, 0x43 } +, + /* Prime q */ + 65, + { 0x01, 0x2b, 0x65, 0x2f, 0x30, 0x40, 0x3b, 0x38, 0xb4, 0x09, 0x95, 0xfd, 0x6f, 0xf4, 0x1a, 0x1a, 0xcc, 0x8a, 0xda, 0x70, 0x37, 0x32, 0x36, 0xb7, 0x20, 0x2d, 0x39, 0xb2, 0xee, 0x30, 0xcf, 0xb4, 0x6d, 0xb0, 0x95, 0x11, 0xf6, 0xf3, 0x07, 0xcc, 0x61, 0xcc, 0x21, 0x60, 0x6c, 0x18, 0xa7, 0x5b, 0x8a, 0x62, 0xf8, 0x22, 0xdf, 0x03, 0x1b, 0xa0, 0xdf, 0x0d, 0xaf, 0xd5, 0x50, 0x6f, 0x56, 0x8b, 0xd7 } +, + /* p's CRT exponent dP */ + 64, + { 0x43, 0x6e, 0xf5, 0x08, 0xde, 0x73, 0x65, 0x19, 0xc2, 0xda, 0x4c, 0x58, 0x0d, 0x98, 0xc8, 0x2c, 0xb7, 0x45, 0x2a, 0x3f, 0xb5, 0xef, 0xad, 0xc3, 0xb9, 0xc7, 0x78, 0x9a, 0x1b, 0xc6, 0x58, 0x4f, 0x79, 0x5a, 0xdd, 0xbb, 0xd3, 0x24, 0x39, 0xc7, 0x46, 0x86, 0x55, 0x2e, 0xcb, 0x6c, 0x2c, 0x30, 0x7a, 0x4d, 0x3a, 0xf7, 0xf5, 0x39, 0xee, 0xc1, 0x57, 0x24, 0x8c, 0x7b, 0x31, 0xf1, 0xa2, 0x55 } +, + /* q's CRT exponent dQ */ + 65, + { 0x01, 0x2b, 0x15, 0xa8, 0x9f, 0x3d, 0xfb, 0x2b, 0x39, 0x07, 0x3e, 0x73, 0xf0, 0x2b, 0xdd, 0x0c, 0x1a, 0x7b, 0x37, 0x9d, 0xd4, 0x35, 0xf0, 0x5c, 0xdd, 0xe2, 0xef, 0xf9, 0xe4, 0x62, 0x94, 0x8b, 0x7c, 0xec, 0x62, 0xee, 0x90, 0x50, 0xd5, 0xe0, 0x81, 0x6e, 0x07, 0x85, 0xa8, 0x56, 0xb4, 0x91, 0x08, 0xdc, 0xb7, 0x5f, 0x36, 0x83, 0x87, 0x4d, 0x1c, 0xa6, 0x32, 0x9a, 0x19, 0x01, 0x30, 0x66, 0xff } +, + /* CRT coefficient qInv */ + 64, + { 0x02, 0x70, 0xdb, 0x17, 0xd5, 0x91, 0x4b, 0x01, 0x8d, 0x76, 0x11, 0x8b, 0x24, 0x38, 0x9a, 0x73, 0x50, 0xec, 0x83, 0x6b, 0x00, 0x63, 0xa2, 0x17, 0x21, 0x23, 0x6f, 0xd8, 0xed, 0xb6, 0xd8, 0x9b, 0x51, 0xe7, 0xee, 0xb8, 0x7b, 0x61, 0x1b, 0x71, 0x32, 0xcb, 0x7e, 0xa7, 0x35, 0x6c, 0x23, 0x15, 0x1c, 0x1e, 0x77, 0x51, 0x50, 0x7c, 0x78, 0x6d, 0x9e, 0xe1, 0x79, 0x41, 0x70, 0xa8, 0xc8, 0xe8 } + +} +, +{{ + "RSAES-OAEP Encryption Example 2.1", + /* Message to be encrypted */ + 27, + { 0x8f, 0xf0, 0x0c, 0xaa, 0x60, 0x5c, 0x70, 0x28, 0x30, 0x63, 0x4d, 0x9a, 0x6c, 0x3d, 0x42, 0xc6, 0x52, 0xb5, 0x8c, 0xf1, 0xd9, 0x2f, 0xec, 0x57, 0x0b, 0xee, 0xe7 } +, + /* Seed */ + 20, + { 0x8c, 0x40, 0x7b, 0x5e, 0xc2, 0x89, 0x9e, 0x50, 0x99, 0xc5, 0x3e, 0x8c, 0xe7, 0x93, 0xbf, 0x94, 0xe7, 0x1b, 0x17, 0x82 } +, + /* Encryption */ + 129, + { 0x01, 0x81, 0xaf, 0x89, 0x22, 0xb9, 0xfc, 0xb4, 0xd7, 0x9d, 0x92, 0xeb, 0xe1, 0x98, 0x15, 0x99, 0x2f, 0xc0, 0xc1, 0x43, 0x9d, 0x8b, 0xcd, 0x49, 0x13, 0x98, 0xa0, 0xf4, 0xad, 0x3a, 0x32, 0x9a, 0x5b, 0xd9, 0x38, 0x55, 0x60, 0xdb, 0x53, 0x26, 0x83, 0xc8, 0xb7, 0xda, 0x04, 0xe4, 0xb1, 0x2a, 0xed, 0x6a, 0xac, 0xdf, 0x47, 0x1c, 0x34, 0xc9, 0xcd, 0xa8, 0x91, 0xad, 0xdc, 0xc2, 0xdf, 0x34, 0x56, 0x65, 0x3a, 0xa6, 0x38, 0x2e, 0x9a, 0xe5, 0x9b, 0x54, 0x45, 0x52, 0x57, 0xeb, 0x09, 0x9d, 0x56, 0x2b, 0xbe, 0x10, 0x45, 0x3f, 0x2b, 0x6d, 0x13, 0xc5, 0x9c, 0x02, 0xe1, 0x0f, 0x1f, 0x8a, 0xbb, 0x5d, 0xa0, 0xd0, 0x57, 0x09, 0x32, 0xda, 0xcf, 0x2d, 0x09, 0x01, 0xdb, 0x72, 0x9d, 0x0f, 0xef, 0xcc, 0x05, 0x4e, 0x70, 0x96, 0x8e, 0xa5, 0x40, 0xc8, 0x1b, 0x04, 0xbc, 0xae, 0xfe, 0x72, 0x0e } + +} +, +#ifdef LTC_TEST_EXT +{ + "RSAES-OAEP Encryption Example 2.2", + /* Message to be encrypted */ + 1, + { 0x2d } +, + /* Seed */ + 20, + { 0xb6, 0x00, 0xcf, 0x3c, 0x2e, 0x50, 0x6d, 0x7f, 0x16, 0x77, 0x8c, 0x91, 0x0d, 0x3a, 0x8b, 0x00, 0x3e, 0xee, 0x61, 0xd5 } +, + /* Encryption */ + 129, + { 0x01, 0x87, 0x59, 0xff, 0x1d, 0xf6, 0x3b, 0x27, 0x92, 0x41, 0x05, 0x62, 0x31, 0x44, 0x16, 0xa8, 0xae, 0xaf, 0x2a, 0xc6, 0x34, 0xb4, 0x6f, 0x94, 0x0a, 0xb8, 0x2d, 0x64, 0xdb, 0xf1, 0x65, 0xee, 0xe3, 0x30, 0x11, 0xda, 0x74, 0x9d, 0x4b, 0xab, 0x6e, 0x2f, 0xcd, 0x18, 0x12, 0x9c, 0x9e, 0x49, 0x27, 0x7d, 0x84, 0x53, 0x11, 0x2b, 0x42, 0x9a, 0x22, 0x2a, 0x84, 0x71, 0xb0, 0x70, 0x99, 0x39, 0x98, 0xe7, 0x58, 0x86, 0x1c, 0x4d, 0x3f, 0x6d, 0x74, 0x9d, 0x91, 0xc4, 0x29, 0x0d, 0x33, 0x2c, 0x7a, 0x4a, 0xb3, 0xf7, 0xea, 0x35, 0xff, 0x3a, 0x07, 0xd4, 0x97, 0xc9, 0x55, 0xff, 0x0f, 0xfc, 0x95, 0x00, 0x6b, 0x62, 0xc6, 0xd2, 0x96, 0x81, 0x0d, 0x9b, 0xfa, 0xb0, 0x24, 0x19, 0x6c, 0x79, 0x34, 0x01, 0x2c, 0x2d, 0xf9, 0x78, 0xef, 0x29, 0x9a, 0xba, 0x23, 0x99, 0x40, 0xcb, 0xa1, 0x02, 0x45 } + +} +, +{ + "RSAES-OAEP Encryption Example 2.3", + /* Message to be encrypted */ + 26, + { 0x74, 0xfc, 0x88, 0xc5, 0x1b, 0xc9, 0x0f, 0x77, 0xaf, 0x9d, 0x5e, 0x9a, 0x4a, 0x70, 0x13, 0x3d, 0x4b, 0x4e, 0x0b, 0x34, 0xda, 0x3c, 0x37, 0xc7, 0xef, 0x8e } +, + /* Seed */ + 20, + { 0xa7, 0x37, 0x68, 0xae, 0xea, 0xa9, 0x1f, 0x9d, 0x8c, 0x1e, 0xd6, 0xf9, 0xd2, 0xb6, 0x34, 0x67, 0xf0, 0x7c, 0xca, 0xe3 } +, + /* Encryption */ + 129, + { 0x01, 0x88, 0x02, 0xba, 0xb0, 0x4c, 0x60, 0x32, 0x5e, 0x81, 0xc4, 0x96, 0x23, 0x11, 0xf2, 0xbe, 0x7c, 0x2a, 0xdc, 0xe9, 0x30, 0x41, 0xa0, 0x07, 0x19, 0xc8, 0x8f, 0x95, 0x75, 0x75, 0xf2, 0xc7, 0x9f, 0x1b, 0x7b, 0xc8, 0xce, 0xd1, 0x15, 0xc7, 0x06, 0xb3, 0x11, 0xc0, 0x8a, 0x2d, 0x98, 0x6c, 0xa3, 0xb6, 0xa9, 0x33, 0x6b, 0x14, 0x7c, 0x29, 0xc6, 0xf2, 0x29, 0x40, 0x9d, 0xde, 0xc6, 0x51, 0xbd, 0x1f, 0xdd, 0x5a, 0x0b, 0x7f, 0x61, 0x0c, 0x99, 0x37, 0xfd, 0xb4, 0xa3, 0xa7, 0x62, 0x36, 0x4b, 0x8b, 0x32, 0x06, 0xb4, 0xea, 0x48, 0x5f, 0xd0, 0x98, 0xd0, 0x8f, 0x63, 0xd4, 0xaa, 0x8b, 0xb2, 0x69, 0x7d, 0x02, 0x7b, 0x75, 0x0c, 0x32, 0xd7, 0xf7, 0x4e, 0xaf, 0x51, 0x80, 0xd2, 0xe9, 0xb6, 0x6b, 0x17, 0xcb, 0x2f, 0xa5, 0x55, 0x23, 0xbc, 0x28, 0x0d, 0xa1, 0x0d, 0x14, 0xbe, 0x20, 0x53 } + +} +, +{ + "RSAES-OAEP Encryption Example 2.4", + /* Message to be encrypted */ + 53, + { 0xa7, 0xeb, 0x2a, 0x50, 0x36, 0x93, 0x1d, 0x27, 0xd4, 0xe8, 0x91, 0x32, 0x6d, 0x99, 0x69, 0x2f, 0xfa, 0xdd, 0xa9, 0xbf, 0x7e, 0xfd, 0x3e, 0x34, 0xe6, 0x22, 0xc4, 0xad, 0xc0, 0x85, 0xf7, 0x21, 0xdf, 0xe8, 0x85, 0x07, 0x2c, 0x78, 0xa2, 0x03, 0xb1, 0x51, 0x73, 0x9b, 0xe5, 0x40, 0xfa, 0x8c, 0x15, 0x3a, 0x10, 0xf0, 0x0a } +, + /* Seed */ + 20, + { 0x9a, 0x7b, 0x3b, 0x0e, 0x70, 0x8b, 0xd9, 0x6f, 0x81, 0x90, 0xec, 0xab, 0x4f, 0xb9, 0xb2, 0xb3, 0x80, 0x5a, 0x81, 0x56 } +, + /* Encryption */ + 129, + { 0x00, 0xa4, 0x57, 0x8c, 0xbc, 0x17, 0x63, 0x18, 0xa6, 0x38, 0xfb, 0xa7, 0xd0, 0x1d, 0xf1, 0x57, 0x46, 0xaf, 0x44, 0xd4, 0xf6, 0xcd, 0x96, 0xd7, 0xe7, 0xc4, 0x95, 0xcb, 0xf4, 0x25, 0xb0, 0x9c, 0x64, 0x9d, 0x32, 0xbf, 0x88, 0x6d, 0xa4, 0x8f, 0xba, 0xf9, 0x89, 0xa2, 0x11, 0x71, 0x87, 0xca, 0xfb, 0x1f, 0xb5, 0x80, 0x31, 0x76, 0x90, 0xe3, 0xcc, 0xd4, 0x46, 0x92, 0x0b, 0x7a, 0xf8, 0x2b, 0x31, 0xdb, 0x58, 0x04, 0xd8, 0x7d, 0x01, 0x51, 0x4a, 0xcb, 0xfa, 0x91, 0x56, 0xe7, 0x82, 0xf8, 0x67, 0xf6, 0xbe, 0xd9, 0x44, 0x9e, 0x0e, 0x9a, 0x2c, 0x09, 0xbc, 0xec, 0xc6, 0xaa, 0x08, 0x76, 0x36, 0x96, 0x5e, 0x34, 0xb3, 0xec, 0x76, 0x6f, 0x2f, 0xe2, 0xe4, 0x30, 0x18, 0xa2, 0xfd, 0xde, 0xb1, 0x40, 0x61, 0x6a, 0x0e, 0x9d, 0x82, 0xe5, 0x33, 0x10, 0x24, 0xee, 0x06, 0x52, 0xfc, 0x76, 0x41 } + +} +, +{ + "RSAES-OAEP Encryption Example 2.5", + /* Message to be encrypted */ + 19, + { 0x2e, 0xf2, 0xb0, 0x66, 0xf8, 0x54, 0xc3, 0x3f, 0x3b, 0xdc, 0xbb, 0x59, 0x94, 0xa4, 0x35, 0xe7, 0x3d, 0x6c, 0x6c } +, + /* Seed */ + 20, + { 0xeb, 0x3c, 0xeb, 0xbc, 0x4a, 0xdc, 0x16, 0xbb, 0x48, 0xe8, 0x8c, 0x8a, 0xec, 0x0e, 0x34, 0xaf, 0x7f, 0x42, 0x7f, 0xd3 } +, + /* Encryption */ + 129, + { 0x00, 0xeb, 0xc5, 0xf5, 0xfd, 0xa7, 0x7c, 0xfd, 0xad, 0x3c, 0x83, 0x64, 0x1a, 0x90, 0x25, 0xe7, 0x7d, 0x72, 0xd8, 0xa6, 0xfb, 0x33, 0xa8, 0x10, 0xf5, 0x95, 0x0f, 0x8d, 0x74, 0xc7, 0x3e, 0x8d, 0x93, 0x1e, 0x86, 0x34, 0xd8, 0x6a, 0xb1, 0x24, 0x62, 0x56, 0xae, 0x07, 0xb6, 0x00, 0x5b, 0x71, 0xb7, 0xf2, 0xfb, 0x98, 0x35, 0x12, 0x18, 0x33, 0x1c, 0xe6, 0x9b, 0x8f, 0xfb, 0xdc, 0x9d, 0xa0, 0x8b, 0xbc, 0x9c, 0x70, 0x4f, 0x87, 0x6d, 0xeb, 0x9d, 0xf9, 0xfc, 0x2e, 0xc0, 0x65, 0xca, 0xd8, 0x7f, 0x90, 0x90, 0xb0, 0x7a, 0xcc, 0x17, 0xaa, 0x7f, 0x99, 0x7b, 0x27, 0xac, 0xa4, 0x88, 0x06, 0xe8, 0x97, 0xf7, 0x71, 0xd9, 0x51, 0x41, 0xfe, 0x45, 0x26, 0xd8, 0xa5, 0x30, 0x1b, 0x67, 0x86, 0x27, 0xef, 0xab, 0x70, 0x7f, 0xd4, 0x0f, 0xbe, 0xbd, 0x6e, 0x79, 0x2a, 0x25, 0x61, 0x3e, 0x7a, 0xec } + +} +, +{ + "RSAES-OAEP Encryption Example 2.6", + /* Message to be encrypted */ + 22, + { 0x8a, 0x7f, 0xb3, 0x44, 0xc8, 0xb6, 0xcb, 0x2c, 0xf2, 0xef, 0x1f, 0x64, 0x3f, 0x9a, 0x32, 0x18, 0xf6, 0xe1, 0x9b, 0xba, 0x89, 0xc0 } +, + /* Seed */ + 20, + { 0x4c, 0x45, 0xcf, 0x4d, 0x57, 0xc9, 0x8e, 0x3d, 0x6d, 0x20, 0x95, 0xad, 0xc5, 0x1c, 0x48, 0x9e, 0xb5, 0x0d, 0xff, 0x84 } +, + /* Encryption */ + 129, + { 0x01, 0x08, 0x39, 0xec, 0x20, 0xc2, 0x7b, 0x90, 0x52, 0xe5, 0x5b, 0xef, 0xb9, 0xb7, 0x7e, 0x6f, 0xc2, 0x6e, 0x90, 0x75, 0xd7, 0xa5, 0x43, 0x78, 0xc6, 0x46, 0xab, 0xdf, 0x51, 0xe4, 0x45, 0xbd, 0x57, 0x15, 0xde, 0x81, 0x78, 0x9f, 0x56, 0xf1, 0x80, 0x3d, 0x91, 0x70, 0x76, 0x4a, 0x9e, 0x93, 0xcb, 0x78, 0x79, 0x86, 0x94, 0x02, 0x3e, 0xe7, 0x39, 0x3c, 0xe0, 0x4b, 0xc5, 0xd8, 0xf8, 0xc5, 0xa5, 0x2c, 0x17, 0x1d, 0x43, 0x83, 0x7e, 0x3a, 0xca, 0x62, 0xf6, 0x09, 0xeb, 0x0a, 0xa5, 0xff, 0xb0, 0x96, 0x0e, 0xf0, 0x41, 0x98, 0xdd, 0x75, 0x4f, 0x57, 0xf7, 0xfb, 0xe6, 0xab, 0xf7, 0x65, 0xcf, 0x11, 0x8b, 0x4c, 0xa4, 0x43, 0xb2, 0x3b, 0x5a, 0xab, 0x26, 0x6f, 0x95, 0x23, 0x26, 0xac, 0x45, 0x81, 0x10, 0x06, 0x44, 0x32, 0x5f, 0x8b, 0x72, 0x1a, 0xcd, 0x5d, 0x04, 0xff, 0x14, 0xef, 0x3a } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 3: A 1026-bit RSA Key Pair", +{ + /* RSA modulus n */ + 129, + { 0x02, 0xb5, 0x8f, 0xec, 0x03, 0x9a, 0x86, 0x07, 0x00, 0xa4, 0xd7, 0xb6, 0x46, 0x2f, 0x93, 0xe6, 0xcd, 0xd4, 0x91, 0x16, 0x1d, 0xdd, 0x74, 0xf4, 0xe8, 0x10, 0xb4, 0x0e, 0x3c, 0x16, 0x52, 0x00, 0x6a, 0x5c, 0x27, 0x7b, 0x27, 0x74, 0xc1, 0x13, 0x05, 0xa4, 0xcb, 0xab, 0x5a, 0x78, 0xef, 0xa5, 0x7e, 0x17, 0xa8, 0x6d, 0xf7, 0xa3, 0xfa, 0x36, 0xfc, 0x4b, 0x1d, 0x22, 0x49, 0xf2, 0x2e, 0xc7, 0xc2, 0xdd, 0x6a, 0x46, 0x32, 0x32, 0xac, 0xce, 0xa9, 0x06, 0xd6, 0x6e, 0xbe, 0x80, 0xb5, 0x70, 0x4b, 0x10, 0x72, 0x9d, 0xa6, 0xf8, 0x33, 0x23, 0x4a, 0xbb, 0x5e, 0xfd, 0xd4, 0xa2, 0x92, 0xcb, 0xfa, 0xd3, 0x3b, 0x4d, 0x33, 0xfa, 0x7a, 0x14, 0xb8, 0xc3, 0x97, 0xb5, 0x6e, 0x3a, 0xcd, 0x21, 0x20, 0x34, 0x28, 0xb7, 0x7c, 0xdf, 0xa3, 0x3a, 0x6d, 0xa7, 0x06, 0xb3, 0xd8, 0xb0, 0xfc, 0x43, 0xe9 } +, + /* RSA public exponent e */ + 3, + { 0x01, 0x00, 0x01 } +, + /* RSA private exponent d */ + 128, + { 0x15, 0xb4, 0x8a, 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 0x8b, 0x44, 0x54, 0x12, 0x7e, 0x0e, 0x7e, 0xaf } +, + /* Prime q */ + 65, + { 0x01, 0x8d, 0x33, 0x99, 0x65, 0x81, 0x66, 0xdb, 0x38, 0x29, 0x81, 0x6d, 0x7b, 0x29, 0x54, 0x16, 0x75, 0x9e, 0x9c, 0x91, 0x98, 0x7f, 0x5b, 0x2d, 0x8a, 0xec, 0xd6, 0x3b, 0x04, 0xb4, 0x8b, 0xd7, 0xb2, 0xfc, 0xf2, 0x29, 0xbb, 0x7f, 0x8a, 0x6d, 0xc8, 0x8b, 0xa1, 0x3d, 0xd2, 0xe3, 0x9a, 0xd5, 0x5b, 0x6d, 0x1a, 0x06, 0x16, 0x07, 0x08, 0xf9, 0x70, 0x0b, 0xe8, 0x0b, 0x8f, 0xd3, 0x74, 0x4c, 0xe7 } +, + /* p's CRT exponent dP */ + 64, + { 0x06, 0xc0, 0xa2, 0x49, 0xd2, 0x0a, 0x6f, 0x2e, 0xe7, 0x5c, 0x88, 0xb4, 0x94, 0xd5, 0x3f, 0x6a, 0xae, 0x99, 0xaa, 0x42, 0x7c, 0x88, 0xc2, 0x8b, 0x16, 0x3a, 0x76, 0x94, 0x45, 0xe5, 0xf3, 0x90, 0xcf, 0x40, 0xc2, 0x74, 0xfd, 0x6e, 0xa6, 0x32, 0x9a, 0x5c, 0xe7, 0xc7, 0xce, 0x03, 0xa2, 0x15, 0x83, 0x96, 0xee, 0x2a, 0x78, 0x45, 0x78, 0x6e, 0x09, 0xe2, 0x88, 0x5a, 0x97, 0x28, 0xe4, 0xe5 } +, + /* q's CRT exponent dQ */ + 64, + { 0xd1, 0xd2, 0x7c, 0x29, 0xfe, 0xdd, 0x92, 0xd8, 0x6c, 0x34, 0x8e, 0xdd, 0x0c, 0xcb, 0xfa, 0xc1, 0x4f, 0x74, 0x6e, 0x05, 0x1c, 0xe1, 0xd1, 0x81, 0x1d, 0xf3, 0x5d, 0x61, 0xf2, 0xee, 0x1c, 0x97, 0xd4, 0xbf, 0x28, 0x04, 0x80, 0x2f, 0x64, 0x27, 0x18, 0x7b, 0xa8, 0xe9, 0x0a, 0x8a, 0xf4, 0x42, 0x43, 0xb4, 0x07, 0x9b, 0x03, 0x44, 0x5e, 0x60, 0x2e, 0x29, 0xfa, 0x51, 0x93, 0xe6, 0x4f, 0xe9 } +, + /* CRT coefficient qInv */ + 64, + { 0x8c, 0xb2, 0xf7, 0x56, 0xbd, 0x89, 0x41, 0xb1, 0xd3, 0xb7, 0x70, 0xe5, 0xad, 0x31, 0xee, 0x37, 0x3b, 0x28, 0xac, 0xda, 0x69, 0xff, 0x9b, 0x6f, 0x40, 0xfe, 0x57, 0x8b, 0x9f, 0x1a, 0xfb, 0x85, 0x83, 0x6f, 0x96, 0x27, 0xd3, 0x7a, 0xcf, 0xf7, 0x3c, 0x27, 0x79, 0xe6, 0x34, 0xbb, 0x26, 0x01, 0x1c, 0x2c, 0x8f, 0x7f, 0x33, 0x61, 0xae, 0x2a, 0x9e, 0xa6, 0x5e, 0xd6, 0x89, 0xe3, 0x63, 0x9a } + +} +, +{{ + "RSAES-OAEP Encryption Example 3.1", + /* Message to be encrypted */ + 8, + { 0x08, 0x78, 0x20, 0xb5, 0x69, 0xe8, 0xfa, 0x8d } +, + /* Seed */ + 20, + { 0x8c, 0xed, 0x6b, 0x19, 0x62, 0x90, 0x80, 0x57, 0x90, 0xe9, 0x09, 0x07, 0x40, 0x15, 0xe6, 0xa2, 0x0b, 0x0c, 0x48, 0x94 } +, + /* Encryption */ + 129, + { 0x02, 0x6a, 0x04, 0x85, 0xd9, 0x6a, 0xeb, 0xd9, 0x6b, 0x43, 0x82, 0x08, 0x50, 0x99, 0xb9, 0x62, 0xe6, 0xa2, 0xbd, 0xec, 0x3d, 0x90, 0xc8, 0xdb, 0x62, 0x5e, 0x14, 0x37, 0x2d, 0xe8, 0x5e, 0x2d, 0x5b, 0x7b, 0xaa, 0xb6, 0x5c, 0x8f, 0xaf, 0x91, 0xbb, 0x55, 0x04, 0xfb, 0x49, 0x5a, 0xfc, 0xe5, 0xc9, 0x88, 0xb3, 0xf6, 0xa5, 0x2e, 0x20, 0xe1, 0xd6, 0xcb, 0xd3, 0x56, 0x6c, 0x5c, 0xd1, 0xf2, 0xb8, 0x31, 0x8b, 0xb5, 0x42, 0xcc, 0x0e, 0xa2, 0x5c, 0x4a, 0xab, 0x99, 0x32, 0xaf, 0xa2, 0x07, 0x60, 0xea, 0xdd, 0xec, 0x78, 0x43, 0x96, 0xa0, 0x7e, 0xa0, 0xef, 0x24, 0xd4, 0xe6, 0xf4, 0xd3, 0x7e, 0x50, 0x52, 0xa7, 0xa3, 0x1e, 0x14, 0x6a, 0xa4, 0x80, 0xa1, 0x11, 0xbb, 0xe9, 0x26, 0x40, 0x13, 0x07, 0xe0, 0x0f, 0x41, 0x00, 0x33, 0x84, 0x2b, 0x6d, 0x82, 0xfe, 0x5c, 0xe4, 0xdf, 0xae, 0x80 } + +} +, +#ifdef LTC_TEST_EXT +{ + "RSAES-OAEP Encryption Example 3.2", + /* Message to be encrypted */ + 28, + { 0x46, 0x53, 0xac, 0xaf, 0x17, 0x19, 0x60, 0xb0, 0x1f, 0x52, 0xa7, 0xbe, 0x63, 0xa3, 0xab, 0x21, 0xdc, 0x36, 0x8e, 0xc4, 0x3b, 0x50, 0xd8, 0x2e, 0xc3, 0x78, 0x1e, 0x04 } +, + /* Seed */ + 20, + { 0xb4, 0x29, 0x1d, 0x65, 0x67, 0x55, 0x08, 0x48, 0xcc, 0x15, 0x69, 0x67, 0xc8, 0x09, 0xba, 0xab, 0x6c, 0xa5, 0x07, 0xf0 } +, + /* Encryption */ + 129, + { 0x02, 0x4d, 0xb8, 0x9c, 0x78, 0x02, 0x98, 0x9b, 0xe0, 0x78, 0x38, 0x47, 0x86, 0x30, 0x84, 0x94, 0x1b, 0xf2, 0x09, 0xd7, 0x61, 0x98, 0x7e, 0x38, 0xf9, 0x7c, 0xb5, 0xf6, 0xf1, 0xbc, 0x88, 0xda, 0x72, 0xa5, 0x0b, 0x73, 0xeb, 0xaf, 0x11, 0xc8, 0x79, 0xc4, 0xf9, 0x5d, 0xf3, 0x7b, 0x85, 0x0b, 0x8f, 0x65, 0xd7, 0x62, 0x2e, 0x25, 0xb1, 0xb8, 0x89, 0xe8, 0x0f, 0xe8, 0x0b, 0xac, 0xa2, 0x06, 0x9d, 0x6e, 0x0e, 0x1d, 0x82, 0x99, 0x53, 0xfc, 0x45, 0x90, 0x69, 0xde, 0x98, 0xea, 0x97, 0x98, 0xb4, 0x51, 0xe5, 0x57, 0xe9, 0x9a, 0xbf, 0x8f, 0xe3, 0xd9, 0xcc, 0xf9, 0x09, 0x6e, 0xbb, 0xf3, 0xe5, 0x25, 0x5d, 0x3b, 0x4e, 0x1c, 0x6d, 0x2e, 0xca, 0xdf, 0x06, 0x7a, 0x35, 0x9e, 0xea, 0x86, 0x40, 0x5a, 0xcd, 0x47, 0xd5, 0xe1, 0x65, 0x51, 0x7c, 0xca, 0xfd, 0x47, 0xd6, 0xdb, 0xee, 0x4b, 0xf5 } + +} +, +{ + "RSAES-OAEP Encryption Example 3.3", + /* Message to be encrypted */ + 9, + { 0xd9, 0x4c, 0xd0, 0xe0, 0x8f, 0xa4, 0x04, 0xed, 0x89 } +, + /* Seed */ + 20, + { 0xce, 0x89, 0x28, 0xf6, 0x05, 0x95, 0x58, 0x25, 0x40, 0x08, 0xba, 0xdd, 0x97, 0x94, 0xfa, 0xdc, 0xd2, 0xfd, 0x1f, 0x65 } +, + /* Encryption */ + 129, + { 0x02, 0x39, 0xbc, 0xe6, 0x81, 0x03, 0x24, 0x41, 0x52, 0x88, 0x77, 0xd6, 0xd1, 0xc8, 0xbb, 0x28, 0xaa, 0x3b, 0xc9, 0x7f, 0x1d, 0xf5, 0x84, 0x56, 0x36, 0x18, 0x99, 0x57, 0x97, 0x68, 0x38, 0x44, 0xca, 0x86, 0x66, 0x47, 0x32, 0xf4, 0xbe, 0xd7, 0xa0, 0xaa, 0xb0, 0x83, 0xaa, 0xab, 0xfb, 0x72, 0x38, 0xf5, 0x82, 0xe3, 0x09, 0x58, 0xc2, 0x02, 0x4e, 0x44, 0xe5, 0x70, 0x43, 0xb9, 0x79, 0x50, 0xfd, 0x54, 0x3d, 0xa9, 0x77, 0xc9, 0x0c, 0xdd, 0xe5, 0x33, 0x7d, 0x61, 0x84, 0x42, 0xf9, 0x9e, 0x60, 0xd7, 0x78, 0x3a, 0xb5, 0x9c, 0xe6, 0xdd, 0x9d, 0x69, 0xc4, 0x7a, 0xd1, 0xe9, 0x62, 0xbe, 0xc2, 0x2d, 0x05, 0x89, 0x5c, 0xff, 0x8d, 0x3f, 0x64, 0xed, 0x52, 0x61, 0xd9, 0x2b, 0x26, 0x78, 0x51, 0x03, 0x93, 0x48, 0x49, 0x90, 0xba, 0x3f, 0x7f, 0x06, 0x81, 0x8a, 0xe6, 0xff, 0xce, 0x8a, 0x3a } + +} +, +{ + "RSAES-OAEP Encryption Example 3.4", + /* Message to be encrypted */ + 18, + { 0x6c, 0xc6, 0x41, 0xb6, 0xb6, 0x1e, 0x6f, 0x96, 0x39, 0x74, 0xda, 0xd2, 0x3a, 0x90, 0x13, 0x28, 0x4e, 0xf1 } +, + /* Seed */ + 20, + { 0x6e, 0x29, 0x79, 0xf5, 0x2d, 0x68, 0x14, 0xa5, 0x7d, 0x83, 0xb0, 0x90, 0x05, 0x48, 0x88, 0xf1, 0x19, 0xa5, 0xb9, 0xa3 } +, + /* Encryption */ + 129, + { 0x02, 0x99, 0x4c, 0x62, 0xaf, 0xd7, 0x6f, 0x49, 0x8b, 0xa1, 0xfd, 0x2c, 0xf6, 0x42, 0x85, 0x7f, 0xca, 0x81, 0xf4, 0x37, 0x3c, 0xb0, 0x8f, 0x1c, 0xba, 0xee, 0x6f, 0x02, 0x5c, 0x3b, 0x51, 0x2b, 0x42, 0xc3, 0xe8, 0x77, 0x91, 0x13, 0x47, 0x66, 0x48, 0x03, 0x9d, 0xbe, 0x04, 0x93, 0xf9, 0x24, 0x62, 0x92, 0xfa, 0xc2, 0x89, 0x50, 0x60, 0x0e, 0x7c, 0x0f, 0x32, 0xed, 0xf9, 0xc8, 0x1b, 0x9d, 0xec, 0x45, 0xc3, 0xbd, 0xe0, 0xcc, 0x8d, 0x88, 0x47, 0x59, 0x01, 0x69, 0x90, 0x7b, 0x7d, 0xc5, 0x99, 0x1c, 0xeb, 0x29, 0xbb, 0x07, 0x14, 0xd6, 0x13, 0xd9, 0x6d, 0xf0, 0xf1, 0x2e, 0xc5, 0xd8, 0xd3, 0x50, 0x7c, 0x8e, 0xe7, 0xae, 0x78, 0xdd, 0x83, 0xf2, 0x16, 0xfa, 0x61, 0xde, 0x10, 0x03, 0x63, 0xac, 0xa4, 0x8a, 0x7e, 0x91, 0x4a, 0xe9, 0xf4, 0x2d, 0xdf, 0xbe, 0x94, 0x3b, 0x09, 0xd9, 0xa0 } + +} +, +{ + "RSAES-OAEP Encryption Example 3.5", + /* Message to be encrypted */ + 46, + { 0xdf, 0x51, 0x51, 0x83, 0x2b, 0x61, 0xf4, 0xf2, 0x58, 0x91, 0xfb, 0x41, 0x72, 0xf3, 0x28, 0xd2, 0xed, 0xdf, 0x83, 0x71, 0xff, 0xcf, 0xdb, 0xe9, 0x97, 0x93, 0x92, 0x95, 0xf3, 0x0e, 0xca, 0x69, 0x18, 0x01, 0x7c, 0xfd, 0xa1, 0x15, 0x3b, 0xf7, 0xa6, 0xaf, 0x87, 0x59, 0x32, 0x23 } +, + /* Seed */ + 20, + { 0x2d, 0x76, 0x0b, 0xfe, 0x38, 0xc5, 0x9d, 0xe3, 0x4c, 0xdc, 0x8b, 0x8c, 0x78, 0xa3, 0x8e, 0x66, 0x28, 0x4a, 0x2d, 0x27 } +, + /* Encryption */ + 129, + { 0x01, 0x62, 0x04, 0x2f, 0xf6, 0x96, 0x95, 0x92, 0xa6, 0x16, 0x70, 0x31, 0x81, 0x1a, 0x23, 0x98, 0x34, 0xce, 0x63, 0x8a, 0xbf, 0x54, 0xfe, 0xc8, 0xb9, 0x94, 0x78, 0x12, 0x2a, 0xfe, 0x2e, 0xe6, 0x7f, 0x8c, 0x5b, 0x18, 0xb0, 0x33, 0x98, 0x05, 0xbf, 0xdb, 0xc5, 0xa4, 0xe6, 0x72, 0x0b, 0x37, 0xc5, 0x9c, 0xfb, 0xa9, 0x42, 0x46, 0x4c, 0x59, 0x7f, 0xf5, 0x32, 0xa1, 0x19, 0x82, 0x15, 0x45, 0xfd, 0x2e, 0x59, 0xb1, 0x14, 0xe6, 0x1d, 0xaf, 0x71, 0x82, 0x05, 0x29, 0xf5, 0x02, 0x9c, 0xf5, 0x24, 0x95, 0x43, 0x27, 0xc3, 0x4e, 0xc5, 0xe6, 0xf5, 0xba, 0x7e, 0xfc, 0xc4, 0xde, 0x94, 0x3a, 0xb8, 0xad, 0x4e, 0xd7, 0x87, 0xb1, 0x45, 0x43, 0x29, 0xf7, 0x0d, 0xb7, 0x98, 0xa3, 0xa8, 0xf4, 0xd9, 0x2f, 0x82, 0x74, 0xe2, 0xb2, 0x94, 0x8a, 0xde, 0x62, 0x7c, 0xe8, 0xee, 0x33, 0xe4, 0x3c, 0x60 } + +} +, +{ + "RSAES-OAEP Encryption Example 3.6", + /* Message to be encrypted */ + 56, + { 0x3c, 0x3b, 0xad, 0x89, 0x3c, 0x54, 0x4a, 0x6d, 0x52, 0x0a, 0xb0, 0x22, 0x31, 0x91, 0x88, 0xc8, 0xd5, 0x04, 0xb7, 0xa7, 0x88, 0xb8, 0x50, 0x90, 0x3b, 0x85, 0x97, 0x2e, 0xaa, 0x18, 0x55, 0x2e, 0x11, 0x34, 0xa7, 0xad, 0x60, 0x98, 0x82, 0x62, 0x54, 0xff, 0x7a, 0xb6, 0x72, 0xb3, 0xd8, 0xeb, 0x31, 0x58, 0xfa, 0xc6, 0xd4, 0xcb, 0xae, 0xf1 } +, + /* Seed */ + 20, + { 0xf1, 0x74, 0x77, 0x9c, 0x5f, 0xd3, 0xcf, 0xe0, 0x07, 0xba, 0xdc, 0xb7, 0xa3, 0x6c, 0x9b, 0x55, 0xbf, 0xcf, 0xbf, 0x0e } +, + /* Encryption */ + 129, + { 0x00, 0x11, 0x20, 0x51, 0xe7, 0x5d, 0x06, 0x49, 0x43, 0xbc, 0x44, 0x78, 0x07, 0x5e, 0x43, 0x48, 0x2f, 0xd5, 0x9c, 0xee, 0x06, 0x79, 0xde, 0x68, 0x93, 0xee, 0xc3, 0xa9, 0x43, 0xda, 0xa4, 0x90, 0xb9, 0x69, 0x1c, 0x93, 0xdf, 0xc0, 0x46, 0x4b, 0x66, 0x23, 0xb9, 0xf3, 0xdb, 0xd3, 0xe7, 0x00, 0x83, 0x26, 0x4f, 0x03, 0x4b, 0x37, 0x4f, 0x74, 0x16, 0x4e, 0x1a, 0x00, 0x76, 0x37, 0x25, 0xe5, 0x74, 0x74, 0x4b, 0xa0, 0xb9, 0xdb, 0x83, 0x43, 0x4f, 0x31, 0xdf, 0x96, 0xf6, 0xe2, 0xa2, 0x6f, 0x6d, 0x8e, 0xba, 0x34, 0x8b, 0xd4, 0x68, 0x6c, 0x22, 0x38, 0xac, 0x07, 0xc3, 0x7a, 0xac, 0x37, 0x85, 0xd1, 0xc7, 0xee, 0xa2, 0xf8, 0x19, 0xfd, 0x91, 0x49, 0x17, 0x98, 0xed, 0x8e, 0x9c, 0xef, 0x5e, 0x43, 0xb7, 0x81, 0xb0, 0xe0, 0x27, 0x6e, 0x37, 0xc4, 0x3f, 0xf9, 0x49, 0x2d, 0x00, 0x57, 0x30 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 4: A 1027-bit RSA Key Pair", +{ + /* RSA modulus n */ + 129, + { 0x05, 0x12, 0x40, 0xb6, 0xcc, 0x00, 0x04, 0xfa, 0x48, 0xd0, 0x13, 0x46, 0x71, 0xc0, 0x78, 0xc7, 0xc8, 0xde, 0xc3, 0xb3, 0xe2, 0xf2, 0x5b, 0xc2, 0x56, 0x44, 0x67, 0x33, 0x9d, 0xb3, 0x88, 0x53, 0xd0, 0x6b, 0x85, 0xee, 0xa5, 0xb2, 0xde, 0x35, 0x3b, 0xff, 0x42, 0xac, 0x2e, 0x46, 0xbc, 0x97, 0xfa, 0xe6, 0xac, 0x96, 0x18, 0xda, 0x95, 0x37, 0xa5, 0xc8, 0xf5, 0x53, 0xc1, 0xe3, 0x57, 0x62, 0x59, 0x91, 0xd6, 0x10, 0x8d, 0xcd, 0x78, 0x85, 0xfb, 0x3a, 0x25, 0x41, 0x3f, 0x53, 0xef, 0xca, 0xd9, 0x48, 0xcb, 0x35, 0xcd, 0x9b, 0x9a, 0xe9, 0xc1, 0xc6, 0x76, 0x26, 0xd1, 0x13, 0xd5, 0x7d, 0xde, 0x4c, 0x5b, 0xea, 0x76, 0xbb, 0x5b, 0xb7, 0xde, 0x96, 0xc0, 0x0d, 0x07, 0x37, 0x2e, 0x96, 0x85, 0xa6, 0xd7, 0x5c, 0xf9, 0xd2, 0x39, 0xfa, 0x14, 0x8d, 0x70, 0x93, 0x1b, 0x5f, 0x3f, 0xb0, 0x39 } +, + /* RSA public exponent e */ + 3, + { 0x01, 0x00, 0x01 } +, + /* RSA private exponent d */ + 128, + { 0x04, 0x11, 0xff, 0xca, 0x3b, 0x7c, 0xa5, 0xe9, 0xe9, 0xbe, 0x7f, 0xe3, 0x8a, 0x85, 0x10, 0x5e, 0x35, 0x38, 0x96, 0xdb, 0x05, 0xc5, 0x79, 0x6a, 0xec, 0xd2, 0xa7, 0x25, 0x16, 0x1e, 0xb3, 0x65, 0x1c, 0x86, 0x29, 0xa9, 0xb8, 0x62, 0xb9, 0x04, 0xd7, 0xb0, 0xc7, 0xb3, 0x7f, 0x8c, 0xb5, 0xa1, 0xc2, 0xb5, 0x40, 0x01, 0x01, 0x8a, 0x00, 0xa1, 0xeb, 0x2c, 0xaf, 0xe4, 0xee, 0x4e, 0x94, 0x92, 0xc3, 0x48, 0xbc, 0x2b, 0xed, 0xab, 0x4b, 0x9e, 0xbb, 0xf0, 0x64, 0xe8, 0xef, 0xf3, 0x22, 0xb9, 0x00, 0x9f, 0x8e, 0xec, 0x65, 0x39, 0x05, 0xf4, 0x0d, 0xf8, 0x8a, 0x3c, 0xdc, 0x49, 0xd4, 0x56, 0x7f, 0x75, 0x62, 0x7d, 0x41, 0xac, 0xa6, 0x24, 0x12, 0x9b, 0x46, 0xa0, 0xb7, 0xc6, 0x98, 0xe5, 0xe6, 0x5f, 0x2b, 0x7b, 0xa1, 0x02, 0xc7, 0x49, 0xa1, 0x01, 0x35, 0xb6, 0x54, 0x0d, 0x04, 0x01 } +, + /* Prime p */ + 65, + { 0x02, 0x74, 0x58, 0xc1, 0x9e, 0xc1, 0x63, 0x69, 0x19, 0xe7, 0x36, 0xc9, 0xaf, 0x25, 0xd6, 0x09, 0xa5, 0x1b, 0x8f, 0x56, 0x1d, 0x19, 0xc6, 0xbf, 0x69, 0x43, 0xdd, 0x1e, 0xe1, 0xab, 0x8a, 0x4a, 0x3f, 0x23, 0x21, 0x00, 0xbd, 0x40, 0xb8, 0x8d, 0xec, 0xc6, 0xba, 0x23, 0x55, 0x48, 0xb6, 0xef, 0x79, 0x2a, 0x11, 0xc9, 0xde, 0x82, 0x3d, 0x0a, 0x79, 0x22, 0xc7, 0x09, 0x5b, 0x6e, 0xba, 0x57, 0x01 } +, + /* Prime q */ + 65, + { 0x02, 0x10, 0xee, 0x9b, 0x33, 0xab, 0x61, 0x71, 0x6e, 0x27, 0xd2, 0x51, 0xbd, 0x46, 0x5f, 0x4b, 0x35, 0xa1, 0xa2, 0x32, 0xe2, 0xda, 0x00, 0x90, 0x1c, 0x29, 0x4b, 0xf2, 0x23, 0x50, 0xce, 0x49, 0x0d, 0x09, 0x9f, 0x64, 0x2b, 0x53, 0x75, 0x61, 0x2d, 0xb6, 0x3b, 0xa1, 0xf2, 0x03, 0x86, 0x49, 0x2b, 0xf0, 0x4d, 0x34, 0xb3, 0xc2, 0x2b, 0xce, 0xb9, 0x09, 0xd1, 0x34, 0x41, 0xb5, 0x3b, 0x51, 0x39 } +, + /* p's CRT exponent dP */ + 64, + { 0x39, 0xfa, 0x02, 0x8b, 0x82, 0x6e, 0x88, 0xc1, 0x12, 0x1b, 0x75, 0x0a, 0x8b, 0x24, 0x2f, 0xa9, 0xa3, 0x5c, 0x5b, 0x66, 0xbd, 0xfd, 0x1f, 0xa6, 0x37, 0xd3, 0xcc, 0x48, 0xa8, 0x4a, 0x4f, 0x45, 0x7a, 0x19, 0x4e, 0x77, 0x27, 0xe4, 0x9f, 0x7b, 0xcc, 0x6e, 0x5a, 0x5a, 0x41, 0x26, 0x57, 0xfc, 0x47, 0x0c, 0x73, 0x22, 0xeb, 0xc3, 0x74, 0x16, 0xef, 0x45, 0x8c, 0x30, 0x7a, 0x8c, 0x09, 0x01 } +, + /* q's CRT exponent dQ */ + 65, + { 0x01, 0x5d, 0x99, 0xa8, 0x41, 0x95, 0x94, 0x39, 0x79, 0xfa, 0x9e, 0x1b, 0xe2, 0xc3, 0xc1, 0xb6, 0x9f, 0x43, 0x2f, 0x46, 0xfd, 0x03, 0xe4, 0x7d, 0x5b, 0xef, 0xbb, 0xbf, 0xd6, 0xb1, 0xd1, 0x37, 0x1d, 0x83, 0xef, 0xb3, 0x30, 0xa3, 0xe0, 0x20, 0x94, 0x2b, 0x2f, 0xed, 0x11, 0x5e, 0x5d, 0x02, 0xbe, 0x24, 0xfd, 0x92, 0xc9, 0x01, 0x9d, 0x1c, 0xec, 0xd6, 0xdd, 0x4c, 0xf1, 0xe5, 0x4c, 0xc8, 0x99 } +, + /* CRT coefficient qInv */ + 65, + { 0x01, 0xf0, 0xb7, 0x01, 0x51, 0x70, 0xb3, 0xf5, 0xe4, 0x22, 0x23, 0xba, 0x30, 0x30, 0x1c, 0x41, 0xa6, 0xd8, 0x7c, 0xbb, 0x70, 0xe3, 0x0c, 0xb7, 0xd3, 0xc6, 0x7d, 0x25, 0x47, 0x3d, 0xb1, 0xf6, 0xcb, 0xf0, 0x3e, 0x3f, 0x91, 0x26, 0xe3, 0xe9, 0x79, 0x68, 0x27, 0x9a, 0x86, 0x5b, 0x2c, 0x2b, 0x42, 0x65, 0x24, 0xcf, 0xc5, 0x2a, 0x68, 0x3d, 0x31, 0xed, 0x30, 0xeb, 0x98, 0x4b, 0xe4, 0x12, 0xba } + +} +, +{{ + "RSAES-OAEP Encryption Example 4.1", + /* Message to be encrypted */ + 56, + { 0x4a, 0x86, 0x60, 0x95, 0x34, 0xee, 0x43, 0x4a, 0x6c, 0xbc, 0xa3, 0xf7, 0xe9, 0x62, 0xe7, 0x6d, 0x45, 0x5e, 0x32, 0x64, 0xc1, 0x9f, 0x60, 0x5f, 0x6e, 0x5f, 0xf6, 0x13, 0x7c, 0x65, 0xc5, 0x6d, 0x7f, 0xb3, 0x44, 0xcd, 0x52, 0xbc, 0x93, 0x37, 0x4f, 0x3d, 0x16, 0x6c, 0x9f, 0x0c, 0x6f, 0x9c, 0x50, 0x6b, 0xad, 0x19, 0x33, 0x09, 0x72, 0xd2 } +, + /* Seed */ + 20, + { 0x1c, 0xac, 0x19, 0xce, 0x99, 0x3d, 0xef, 0x55, 0xf9, 0x82, 0x03, 0xf6, 0x85, 0x28, 0x96, 0xc9, 0x5c, 0xcc, 0xa1, 0xf3 } +, + /* Encryption */ + 129, + { 0x04, 0xcc, 0xe1, 0x96, 0x14, 0x84, 0x5e, 0x09, 0x41, 0x52, 0xa3, 0xfe, 0x18, 0xe5, 0x4e, 0x33, 0x30, 0xc4, 0x4e, 0x5e, 0xfb, 0xc6, 0x4a, 0xe1, 0x68, 0x86, 0xcb, 0x18, 0x69, 0x01, 0x4c, 0xc5, 0x78, 0x1b, 0x1f, 0x8f, 0x9e, 0x04, 0x53, 0x84, 0xd0, 0x11, 0x2a, 0x13, 0x5c, 0xa0, 0xd1, 0x2e, 0x9c, 0x88, 0xa8, 0xe4, 0x06, 0x34, 0x16, 0xde, 0xaa, 0xe3, 0x84, 0x4f, 0x60, 0xd6, 0xe9, 0x6f, 0xe1, 0x55, 0x14, 0x5f, 0x45, 0x25, 0xb9, 0xa3, 0x44, 0x31, 0xca, 0x37, 0x66, 0x18, 0x0f, 0x70, 0xe1, 0x5a, 0x5e, 0x5d, 0x8e, 0x8b, 0x1a, 0x51, 0x6f, 0xf8, 0x70, 0x60, 0x9f, 0x13, 0xf8, 0x96, 0x93, 0x5c, 0xed, 0x18, 0x82, 0x79, 0xa5, 0x8e, 0xd1, 0x3d, 0x07, 0x11, 0x42, 0x77, 0xd7, 0x5c, 0x65, 0x68, 0x60, 0x7e, 0x0a, 0xb0, 0x92, 0xfd, 0x80, 0x3a, 0x22, 0x3e, 0x4a, 0x8e, 0xe0, 0xb1, 0xa8 } + +} +, +#ifdef LTC_TEST_EXT +{ + "RSAES-OAEP Encryption Example 4.2", + /* Message to be encrypted */ + 64, + { 0xb0, 0xad, 0xc4, 0xf3, 0xfe, 0x11, 0xda, 0x59, 0xce, 0x99, 0x27, 0x73, 0xd9, 0x05, 0x99, 0x43, 0xc0, 0x30, 0x46, 0x49, 0x7e, 0xe9, 0xd9, 0xf9, 0xa0, 0x6d, 0xf1, 0x16, 0x6d, 0xb4, 0x6d, 0x98, 0xf5, 0x8d, 0x27, 0xec, 0x07, 0x4c, 0x02, 0xee, 0xe6, 0xcb, 0xe2, 0x44, 0x9c, 0x8b, 0x9f, 0xc5, 0x08, 0x0c, 0x5c, 0x3f, 0x44, 0x33, 0x09, 0x25, 0x12, 0xec, 0x46, 0xaa, 0x79, 0x37, 0x43, 0xc8 } +, + /* Seed */ + 20, + { 0xf5, 0x45, 0xd5, 0x89, 0x75, 0x85, 0xe3, 0xdb, 0x71, 0xaa, 0x0c, 0xb8, 0xda, 0x76, 0xc5, 0x1d, 0x03, 0x2a, 0xe9, 0x63 } +, + /* Encryption */ + 129, + { 0x00, 0x97, 0xb6, 0x98, 0xc6, 0x16, 0x56, 0x45, 0xb3, 0x03, 0x48, 0x6f, 0xbf, 0x5a, 0x2a, 0x44, 0x79, 0xc0, 0xee, 0x85, 0x88, 0x9b, 0x54, 0x1a, 0x6f, 0x0b, 0x85, 0x8d, 0x6b, 0x65, 0x97, 0xb1, 0x3b, 0x85, 0x4e, 0xb4, 0xf8, 0x39, 0xaf, 0x03, 0x39, 0x9a, 0x80, 0xd7, 0x9b, 0xda, 0x65, 0x78, 0xc8, 0x41, 0xf9, 0x0d, 0x64, 0x57, 0x15, 0xb2, 0x80, 0xd3, 0x71, 0x43, 0x99, 0x2d, 0xd1, 0x86, 0xc8, 0x0b, 0x94, 0x9b, 0x77, 0x5c, 0xae, 0x97, 0x37, 0x0e, 0x4e, 0xc9, 0x74, 0x43, 0x13, 0x6c, 0x6d, 0xa4, 0x84, 0xe9, 0x70, 0xff, 0xdb, 0x13, 0x23, 0xa2, 0x08, 0x47, 0x82, 0x1d, 0x3b, 0x18, 0x38, 0x1d, 0xe1, 0x3b, 0xb4, 0x9a, 0xae, 0xa6, 0x65, 0x30, 0xc4, 0xa4, 0xb8, 0x27, 0x1f, 0x3e, 0xae, 0x17, 0x2c, 0xd3, 0x66, 0xe0, 0x7e, 0x66, 0x36, 0xf1, 0x01, 0x9d, 0x2a, 0x28, 0xae, 0xd1, 0x5e } + +} +, +{ + "RSAES-OAEP Encryption Example 4.3", + /* Message to be encrypted */ + 62, + { 0xbf, 0x6d, 0x42, 0xe7, 0x01, 0x70, 0x7b, 0x1d, 0x02, 0x06, 0xb0, 0xc8, 0xb4, 0x5a, 0x1c, 0x72, 0x64, 0x1f, 0xf1, 0x28, 0x89, 0x21, 0x9a, 0x82, 0xbd, 0xea, 0x96, 0x5b, 0x5e, 0x79, 0xa9, 0x6b, 0x0d, 0x01, 0x63, 0xed, 0x9d, 0x57, 0x8e, 0xc9, 0xad, 0xa2, 0x0f, 0x2f, 0xbc, 0xf1, 0xea, 0x3c, 0x40, 0x89, 0xd8, 0x34, 0x19, 0xba, 0x81, 0xb0, 0xc6, 0x0f, 0x36, 0x06, 0xda, 0x99 } +, + /* Seed */ + 20, + { 0xad, 0x99, 0x7f, 0xee, 0xf7, 0x30, 0xd6, 0xea, 0x7b, 0xe6, 0x0d, 0x0d, 0xc5, 0x2e, 0x72, 0xea, 0xcb, 0xfd, 0xd2, 0x75 } +, + /* Encryption */ + 129, + { 0x03, 0x01, 0xf9, 0x35, 0xe9, 0xc4, 0x7a, 0xbc, 0xb4, 0x8a, 0xcb, 0xbe, 0x09, 0x89, 0x5d, 0x9f, 0x59, 0x71, 0xaf, 0x14, 0x83, 0x9d, 0xa4, 0xff, 0x95, 0x41, 0x7e, 0xe4, 0x53, 0xd1, 0xfd, 0x77, 0x31, 0x90, 0x72, 0xbb, 0x72, 0x97, 0xe1, 0xb5, 0x5d, 0x75, 0x61, 0xcd, 0x9d, 0x1b, 0xb2, 0x4c, 0x1a, 0x9a, 0x37, 0xc6, 0x19, 0x86, 0x43, 0x08, 0x24, 0x28, 0x04, 0x87, 0x9d, 0x86, 0xeb, 0xd0, 0x01, 0xdc, 0xe5, 0x18, 0x39, 0x75, 0xe1, 0x50, 0x69, 0x89, 0xb7, 0x0e, 0x5a, 0x83, 0x43, 0x41, 0x54, 0xd5, 0xcb, 0xfd, 0x6a, 0x24, 0x78, 0x7e, 0x60, 0xeb, 0x0c, 0x65, 0x8d, 0x2a, 0xc1, 0x93, 0x30, 0x2d, 0x11, 0x92, 0xc6, 0xe6, 0x22, 0xd4, 0xa1, 0x2a, 0xd4, 0xb5, 0x39, 0x23, 0xbc, 0xa2, 0x46, 0xdf, 0x31, 0xc6, 0x39, 0x5e, 0x37, 0x70, 0x2c, 0x6a, 0x78, 0xae, 0x08, 0x1f, 0xb9, 0xd0, 0x65 } + +} +, +{ + "RSAES-OAEP Encryption Example 4.4", + /* Message to be encrypted */ + 22, + { 0xfb, 0x2e, 0xf1, 0x12, 0xf5, 0xe7, 0x66, 0xeb, 0x94, 0x01, 0x92, 0x97, 0x93, 0x47, 0x94, 0xf7, 0xbe, 0x2f, 0x6f, 0xc1, 0xc5, 0x8e } +, + /* Seed */ + 20, + { 0x13, 0x64, 0x54, 0xdf, 0x57, 0x30, 0xf7, 0x3c, 0x80, 0x7a, 0x7e, 0x40, 0xd8, 0xc1, 0xa3, 0x12, 0xac, 0x5b, 0x9d, 0xd3 } +, + /* Encryption */ + 129, + { 0x02, 0xd1, 0x10, 0xad, 0x30, 0xaf, 0xb7, 0x27, 0xbe, 0xb6, 0x91, 0xdd, 0x0c, 0xf1, 0x7d, 0x0a, 0xf1, 0xa1, 0xe7, 0xfa, 0x0c, 0xc0, 0x40, 0xec, 0x1a, 0x4b, 0xa2, 0x6a, 0x42, 0xc5, 0x9d, 0x0a, 0x79, 0x6a, 0x2e, 0x22, 0xc8, 0xf3, 0x57, 0xcc, 0xc9, 0x8b, 0x65, 0x19, 0xac, 0xeb, 0x68, 0x2e, 0x94, 0x5e, 0x62, 0xcb, 0x73, 0x46, 0x14, 0xa5, 0x29, 0x40, 0x7c, 0xd4, 0x52, 0xbe, 0xe3, 0xe4, 0x4f, 0xec, 0xe8, 0x42, 0x3c, 0xc1, 0x9e, 0x55, 0x54, 0x8b, 0x8b, 0x99, 0x4b, 0x84, 0x9c, 0x7e, 0xcd, 0xe4, 0x93, 0x3e, 0x76, 0x03, 0x7e, 0x1d, 0x0c, 0xe4, 0x42, 0x75, 0xb0, 0x87, 0x10, 0xc6, 0x8e, 0x43, 0x01, 0x30, 0xb9, 0x29, 0x73, 0x0e, 0xd7, 0x7e, 0x09, 0xb0, 0x15, 0x64, 0x2c, 0x55, 0x93, 0xf0, 0x4e, 0x4f, 0xfb, 0x94, 0x10, 0x79, 0x81, 0x02, 0xa8, 0xe9, 0x6f, 0xfd, 0xfe, 0x11, 0xe4 } + +} +, +{ + "RSAES-OAEP Encryption Example 4.5", + /* Message to be encrypted */ + 34, + { 0x28, 0xcc, 0xd4, 0x47, 0xbb, 0x9e, 0x85, 0x16, 0x6d, 0xab, 0xb9, 0xe5, 0xb7, 0xd1, 0xad, 0xad, 0xc4, 0xb9, 0xd3, 0x9f, 0x20, 0x4e, 0x96, 0xd5, 0xe4, 0x40, 0xce, 0x9a, 0xd9, 0x28, 0xbc, 0x1c, 0x22, 0x84 } +, + /* Seed */ + 20, + { 0xbc, 0xa8, 0x05, 0x7f, 0x82, 0x4b, 0x2e, 0xa2, 0x57, 0xf2, 0x86, 0x14, 0x07, 0xee, 0xf6, 0x3d, 0x33, 0x20, 0x86, 0x81 } +, + /* Encryption */ + 129, + { 0x00, 0xdb, 0xb8, 0xa7, 0x43, 0x9d, 0x90, 0xef, 0xd9, 0x19, 0xa3, 0x77, 0xc5, 0x4f, 0xae, 0x8f, 0xe1, 0x1e, 0xc5, 0x8c, 0x3b, 0x85, 0x83, 0x62, 0xe2, 0x3a, 0xd1, 0xb8, 0xa4, 0x43, 0x10, 0x79, 0x90, 0x66, 0xb9, 0x93, 0x47, 0xaa, 0x52, 0x56, 0x91, 0xd2, 0xad, 0xc5, 0x8d, 0x9b, 0x06, 0xe3, 0x4f, 0x28, 0x8c, 0x17, 0x03, 0x90, 0xc5, 0xf0, 0xe1, 0x1c, 0x0a, 0xa3, 0x64, 0x59, 0x59, 0xf1, 0x8e, 0xe7, 0x9e, 0x8f, 0x2b, 0xe8, 0xd7, 0xac, 0x5c, 0x23, 0xd0, 0x61, 0xf1, 0x8d, 0xd7, 0x4b, 0x8c, 0x5f, 0x2a, 0x58, 0xfc, 0xb5, 0xeb, 0x0c, 0x54, 0xf9, 0x9f, 0x01, 0xa8, 0x32, 0x47, 0x56, 0x82, 0x92, 0x53, 0x65, 0x83, 0x34, 0x09, 0x48, 0xd7, 0xa8, 0xc9, 0x7c, 0x4a, 0xcd, 0x1e, 0x98, 0xd1, 0xe2, 0x9d, 0xc3, 0x20, 0xe9, 0x7a, 0x26, 0x05, 0x32, 0xa8, 0xaa, 0x7a, 0x75, 0x8a, 0x1e, 0xc2 } + +} +, +{ + "RSAES-OAEP Encryption Example 4.6", + /* Message to be encrypted */ + 7, + { 0xf2, 0x22, 0x42, 0x75, 0x1e, 0xc6, 0xb1 } +, + /* Seed */ + 20, + { 0x2e, 0x7e, 0x1e, 0x17, 0xf6, 0x47, 0xb5, 0xdd, 0xd0, 0x33, 0xe1, 0x54, 0x72, 0xf9, 0x0f, 0x68, 0x12, 0xf3, 0xac, 0x4e } +, + /* Encryption */ + 129, + { 0x00, 0xa5, 0xff, 0xa4, 0x76, 0x8c, 0x8b, 0xbe, 0xca, 0xee, 0x2d, 0xb7, 0x7e, 0x8f, 0x2e, 0xec, 0x99, 0x59, 0x59, 0x33, 0x54, 0x55, 0x20, 0x83, 0x5e, 0x5b, 0xa7, 0xdb, 0x94, 0x93, 0xd3, 0xe1, 0x7c, 0xdd, 0xef, 0xe6, 0xa5, 0xf5, 0x67, 0x62, 0x44, 0x71, 0x90, 0x8d, 0xb4, 0xe2, 0xd8, 0x3a, 0x0f, 0xbe, 0xe6, 0x06, 0x08, 0xfc, 0x84, 0x04, 0x95, 0x03, 0xb2, 0x23, 0x4a, 0x07, 0xdc, 0x83, 0xb2, 0x7b, 0x22, 0x84, 0x7a, 0xd8, 0x92, 0x0f, 0xf4, 0x2f, 0x67, 0x4e, 0xf7, 0x9b, 0x76, 0x28, 0x0b, 0x00, 0x23, 0x3d, 0x2b, 0x51, 0xb8, 0xcb, 0x27, 0x03, 0xa9, 0xd4, 0x2b, 0xfb, 0xc8, 0x25, 0x0c, 0x96, 0xec, 0x32, 0xc0, 0x51, 0xe5, 0x7f, 0x1b, 0x4b, 0xa5, 0x28, 0xdb, 0x89, 0xc3, 0x7e, 0x4c, 0x54, 0xe2, 0x7e, 0x6e, 0x64, 0xac, 0x69, 0x63, 0x5a, 0xe8, 0x87, 0xd9, 0x54, 0x16, 0x19, 0xa9 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 5: A 1028-bit RSA Key Pair", +{ + /* RSA modulus n */ + 129, + { 0x0a, 0xad, 0xf3, 0xf9, 0xc1, 0x25, 0xe5, 0xd8, 0x91, 0xf3, 0x1a, 0xc4, 0x48, 0xe9, 0x93, 0xde, 0xfe, 0x58, 0x0f, 0x80, 0x2b, 0x45, 0xf9, 0xd7, 0xf2, 0x2b, 0xa5, 0x02, 0x1e, 0x9c, 0x47, 0x57, 0x6b, 0x5a, 0x1e, 0x68, 0x03, 0x1b, 0xa9, 0xdb, 0x4e, 0x6d, 0xab, 0xe4, 0xd9, 0x6a, 0x1d, 0x6f, 0x3d, 0x26, 0x72, 0x68, 0xcf, 0xf4, 0x08, 0x00, 0x5f, 0x11, 0x8e, 0xfc, 0xad, 0xb9, 0x98, 0x88, 0xd1, 0xc2, 0x34, 0x46, 0x71, 0x66, 0xb2, 0xa2, 0xb8, 0x49, 0xa0, 0x5a, 0x88, 0x9c, 0x06, 0x0a, 0xc0, 0xda, 0x0c, 0x5f, 0xae, 0x8b, 0x55, 0xf3, 0x09, 0xba, 0x62, 0xe7, 0x03, 0x74, 0x2f, 0xa0, 0x32, 0x6f, 0x2d, 0x10, 0xb0, 0x11, 0x02, 0x14, 0x89, 0xff, 0x49, 0x77, 0x70, 0x19, 0x0d, 0x89, 0x5f, 0xd3, 0x9f, 0x52, 0x29, 0x3c, 0x39, 0xef, 0xd7, 0x3a, 0x69, 0x8b, 0xda, 0xb9, 0xf1, 0x0e, 0xd9 } +, + /* RSA public exponent e */ + 3, + { 0x01, 0x00, 0x01 } +, + /* RSA private exponent d */ + 129, + { 0x02, 0x56, 0xeb, 0x4c, 0xba, 0x70, 0x67, 0xf2, 0xd2, 0xbe, 0x54, 0x0d, 0xcd, 0xff, 0x45, 0x82, 0xa3, 0x6b, 0x7d, 0x31, 0xd1, 0xc9, 0x09, 0x9b, 0xb2, 0x14, 0xb7, 0x98, 0x48, 0x46, 0x6a, 0x26, 0x8f, 0x80, 0xf5, 0x8a, 0x49, 0xac, 0x04, 0xc0, 0xe3, 0x64, 0x89, 0x34, 0xa0, 0x20, 0x6c, 0x04, 0x53, 0x7c, 0x19, 0xb2, 0x36, 0x64, 0x3a, 0x60, 0x82, 0x73, 0x21, 0x44, 0xdf, 0x75, 0xfa, 0x21, 0x75, 0x88, 0xf7, 0x94, 0x68, 0x2b, 0xe8, 0x91, 0x68, 0x27, 0x6d, 0xc7, 0x26, 0xc5, 0xc0, 0xcb, 0xdb, 0x84, 0xd3, 0x1b, 0xbf, 0x26, 0xd0, 0xa4, 0x3a, 0xf4, 0x95, 0x71, 0x7f, 0x7d, 0x52, 0x8a, 0xcf, 0xee, 0x34, 0x15, 0x61, 0xf6, 0xff, 0x3c, 0xae, 0x05, 0xc5, 0x78, 0xf8, 0x47, 0x0d, 0x96, 0x82, 0xf9, 0xc0, 0xd0, 0x72, 0xf9, 0xf6, 0x06, 0x8b, 0x56, 0xd5, 0x88, 0x0f, 0x68, 0x2b, 0xe2, 0xc5 } +, + /* Prime p */ + 65, + { 0x03, 0xb0, 0xd3, 0x96, 0x2f, 0x6d, 0x17, 0x54, 0x9c, 0xbf, 0xca, 0x11, 0x29, 0x43, 0x48, 0xdc, 0xf0, 0xe7, 0xe3, 0x9f, 0x8c, 0x2b, 0xc6, 0x82, 0x4f, 0x21, 0x64, 0xb6, 0x06, 0xd6, 0x87, 0x86, 0x0d, 0xae, 0x1e, 0x63, 0x23, 0x93, 0xcf, 0xed, 0xf5, 0x13, 0x22, 0x82, 0x29, 0x06, 0x9e, 0x2f, 0x60, 0xe4, 0xac, 0xd7, 0xe6, 0x33, 0xa4, 0x36, 0x06, 0x3f, 0x82, 0x38, 0x5f, 0x48, 0x99, 0x37, 0x07 } +, + /* Prime q */ + 65, + { 0x02, 0xe4, 0xc3, 0x2e, 0x2f, 0x51, 0x72, 0x69, 0xb7, 0x07, 0x23, 0x09, 0xf0, 0x0c, 0x0e, 0x31, 0x36, 0x5f, 0x7c, 0xe2, 0x8b, 0x23, 0x6b, 0x82, 0x91, 0x2d, 0xf2, 0x39, 0xab, 0xf3, 0x95, 0x72, 0xcf, 0x0e, 0xd6, 0x04, 0xb0, 0x29, 0x82, 0xe5, 0x35, 0x64, 0xc5, 0x2d, 0x6a, 0x05, 0x39, 0x7d, 0xe5, 0xc0, 0x52, 0xa2, 0xfd, 0xdc, 0x14, 0x1e, 0xf7, 0x18, 0x98, 0x36, 0x34, 0x6a, 0xeb, 0x33, 0x1f } +, + /* p's CRT exponent dP */ + 65, + { 0x01, 0xe8, 0x4b, 0x11, 0x9d, 0x25, 0x16, 0x1f, 0xa6, 0x7b, 0x00, 0x25, 0x6a, 0x5b, 0xd9, 0xb6, 0x45, 0xd2, 0xb2, 0x32, 0xec, 0xb0, 0x5b, 0x01, 0x51, 0x80, 0x02, 0x9a, 0x88, 0x62, 0x2a, 0xdc, 0x3f, 0x09, 0xb3, 0xae, 0xac, 0xde, 0x61, 0x61, 0xab, 0x7c, 0xde, 0x22, 0xc2, 0xad, 0x26, 0xe7, 0x79, 0x7d, 0xf5, 0x4e, 0x07, 0x2c, 0xbd, 0x3b, 0x26, 0x73, 0x80, 0x0b, 0x3e, 0x43, 0x38, 0xdb, 0xd5 } +, + /* q's CRT exponent dQ */ + 64, + { 0xeb, 0x90, 0xaa, 0x1a, 0x40, 0x13, 0x5b, 0x4c, 0xea, 0x07, 0x19, 0x7c, 0xed, 0xc8, 0x81, 0x9b, 0xe1, 0xe7, 0xcb, 0xff, 0x25, 0x47, 0x66, 0x21, 0x16, 0xf4, 0x65, 0xa4, 0xa9, 0xf4, 0x87, 0xab, 0x12, 0xf3, 0xba, 0x4f, 0xef, 0x13, 0x82, 0x22, 0x65, 0xa6, 0x52, 0x97, 0xd9, 0x8b, 0x7b, 0xde, 0xd9, 0x37, 0x2e, 0x3f, 0xfe, 0x81, 0xa3, 0x8b, 0x3e, 0x96, 0x00, 0xfe, 0xd0, 0x55, 0x75, 0x4f } +, + /* CRT coefficient qInv */ + 65, + { 0x01, 0x2f, 0x7f, 0x81, 0x38, 0xf9, 0x40, 0x40, 0x62, 0xeb, 0x85, 0xa4, 0x29, 0x24, 0x52, 0x0b, 0x38, 0xf5, 0xbb, 0x88, 0x6a, 0x01, 0x96, 0xf4, 0x8b, 0xb8, 0xdc, 0xea, 0x60, 0xfd, 0x92, 0xcc, 0x02, 0x7f, 0x18, 0xe7, 0x81, 0x58, 0xa3, 0x4a, 0x5c, 0x5d, 0x5f, 0x86, 0x0a, 0x0f, 0x6c, 0x04, 0x07, 0x1a, 0x7d, 0x01, 0x31, 0x2c, 0x06, 0x50, 0x62, 0xf1, 0xeb, 0x48, 0xb7, 0x9d, 0x1c, 0x83, 0xcb } + +} +, +{{ + "RSAES-OAEP Encryption Example 5.1", + /* Message to be encrypted */ + 31, + { 0xaf, 0x71, 0xa9, 0x01, 0xe3, 0xa6, 0x1d, 0x31, 0x32, 0xf0, 0xfc, 0x1f, 0xdb, 0x47, 0x4f, 0x9e, 0xa6, 0x57, 0x92, 0x57, 0xff, 0xc2, 0x4d, 0x16, 0x41, 0x70, 0x14, 0x5b, 0x3d, 0xbd, 0xe8 } +, + /* Seed */ + 20, + { 0x44, 0xc9, 0x2e, 0x28, 0x3f, 0x77, 0xb9, 0x49, 0x9c, 0x60, 0x3d, 0x96, 0x36, 0x60, 0xc8, 0x7d, 0x2f, 0x93, 0x94, 0x61 } +, + /* Encryption */ + 129, + { 0x03, 0x60, 0x46, 0xa4, 0xa4, 0x7d, 0x9e, 0xd3, 0xba, 0x9a, 0x89, 0x13, 0x9c, 0x10, 0x50, 0x38, 0xeb, 0x74, 0x92, 0xb0, 0x5a, 0x5d, 0x68, 0xbf, 0xd5, 0x3a, 0xcc, 0xff, 0x45, 0x97, 0xf7, 0xa6, 0x86, 0x51, 0xb4, 0x7b, 0x4a, 0x46, 0x27, 0xd9, 0x27, 0xe4, 0x85, 0xee, 0xd7, 0xb4, 0x56, 0x64, 0x20, 0xe8, 0xb4, 0x09, 0x87, 0x9e, 0x5d, 0x60, 0x6e, 0xae, 0x25, 0x1d, 0x22, 0xa5, 0xdf, 0x79, 0x9f, 0x79, 0x20, 0xbf, 0xc1, 0x17, 0xb9, 0x92, 0x57, 0x2a, 0x53, 0xb1, 0x26, 0x31, 0x46, 0xbc, 0xea, 0x03, 0x38, 0x5c, 0xc5, 0xe8, 0x53, 0xc9, 0xa1, 0x01, 0xc8, 0xc3, 0xe1, 0xbd, 0xa3, 0x1a, 0x51, 0x98, 0x07, 0x49, 0x6c, 0x6c, 0xb5, 0xe5, 0xef, 0xb4, 0x08, 0x82, 0x3a, 0x35, 0x2b, 0x8f, 0xa0, 0x66, 0x1f, 0xb6, 0x64, 0xef, 0xad, 0xd5, 0x93, 0xde, 0xb9, 0x9f, 0xff, 0x5e, 0xd0, 0x00, 0xe5 } + +} +, +#ifdef LTC_TEST_EXT +{ + "RSAES-OAEP Encryption Example 5.2", + /* Message to be encrypted */ + 44, + { 0xa3, 0xb8, 0x44, 0xa0, 0x82, 0x39, 0xa8, 0xac, 0x41, 0x60, 0x5a, 0xf1, 0x7a, 0x6c, 0xfd, 0xa4, 0xd3, 0x50, 0x13, 0x65, 0x85, 0x90, 0x3a, 0x41, 0x7a, 0x79, 0x26, 0x87, 0x60, 0x51, 0x9a, 0x4b, 0x4a, 0xc3, 0x30, 0x3e, 0xc7, 0x3f, 0x0f, 0x87, 0xcf, 0xb3, 0x23, 0x99 } +, + /* Seed */ + 20, + { 0xcb, 0x28, 0xf5, 0x86, 0x06, 0x59, 0xfc, 0xee, 0xe4, 0x9c, 0x3e, 0xea, 0xfc, 0xe6, 0x25, 0xa7, 0x08, 0x03, 0xbd, 0x32 } +, + /* Encryption */ + 129, + { 0x03, 0xd6, 0xeb, 0x65, 0x4e, 0xdc, 0xe6, 0x15, 0xbc, 0x59, 0xf4, 0x55, 0x26, 0x5e, 0xd4, 0xe5, 0xa1, 0x82, 0x23, 0xcb, 0xb9, 0xbe, 0x4e, 0x40, 0x69, 0xb4, 0x73, 0x80, 0x4d, 0x5d, 0xe9, 0x6f, 0x54, 0xdc, 0xaa, 0xa6, 0x03, 0xd0, 0x49, 0xc5, 0xd9, 0x4a, 0xa1, 0x47, 0x0d, 0xfc, 0xd2, 0x25, 0x40, 0x66, 0xb7, 0xc7, 0xb6, 0x1f, 0xf1, 0xf6, 0xf6, 0x77, 0x0e, 0x32, 0x15, 0xc5, 0x13, 0x99, 0xfd, 0x4e, 0x34, 0xec, 0x50, 0x82, 0xbc, 0x48, 0xf0, 0x89, 0x84, 0x0a, 0xd0, 0x43, 0x54, 0xae, 0x66, 0xdc, 0x0f, 0x1b, 0xd1, 0x8e, 0x46, 0x1a, 0x33, 0xcc, 0x12, 0x58, 0xb4, 0x43, 0xa2, 0x83, 0x7a, 0x6d, 0xf2, 0x67, 0x59, 0xaa, 0x23, 0x02, 0x33, 0x49, 0x86, 0xf8, 0x73, 0x80, 0xc9, 0xcc, 0x9d, 0x53, 0xbe, 0x9f, 0x99, 0x60, 0x5d, 0x2c, 0x9a, 0x97, 0xda, 0x7b, 0x09, 0x15, 0xa4, 0xa7, 0xad } + +} +, +{ + "RSAES-OAEP Encryption Example 5.3", + /* Message to be encrypted */ + 63, + { 0x30, 0x8b, 0x0e, 0xcb, 0xd2, 0xc7, 0x6c, 0xb7, 0x7f, 0xc6, 0xf7, 0x0c, 0x5e, 0xdd, 0x23, 0x3f, 0xd2, 0xf2, 0x09, 0x29, 0xd6, 0x29, 0xf0, 0x26, 0x95, 0x3b, 0xb6, 0x2a, 0x8f, 0x4a, 0x3a, 0x31, 0x4b, 0xde, 0x19, 0x5d, 0xe8, 0x5b, 0x5f, 0x81, 0x6d, 0xa2, 0xaa, 0xb0, 0x74, 0xd2, 0x6c, 0xb6, 0xac, 0xdd, 0xf3, 0x23, 0xae, 0x3b, 0x9c, 0x67, 0x8a, 0xc3, 0xcf, 0x12, 0xfb, 0xdd, 0xe7 } +, + /* Seed */ + 20, + { 0x22, 0x85, 0xf4, 0x0d, 0x77, 0x04, 0x82, 0xf9, 0xa9, 0xef, 0xa2, 0xc7, 0x2c, 0xb3, 0xac, 0x55, 0x71, 0x6d, 0xc0, 0xca } +, + /* Encryption */ + 129, + { 0x07, 0x70, 0x95, 0x21, 0x81, 0x64, 0x9f, 0x9f, 0x9f, 0x07, 0xff, 0x62, 0x6f, 0xf3, 0xa2, 0x2c, 0x35, 0xc4, 0x62, 0x44, 0x3d, 0x90, 0x5d, 0x45, 0x6a, 0x9f, 0xd0, 0xbf, 0xf4, 0x3c, 0xac, 0x2c, 0xa7, 0xa9, 0xf5, 0x54, 0xe9, 0x47, 0x8b, 0x9a, 0xcc, 0x3a, 0xc8, 0x38, 0xb0, 0x20, 0x40, 0xff, 0xd3, 0xe1, 0x84, 0x7d, 0xe2, 0xe4, 0x25, 0x39, 0x29, 0xf9, 0xdd, 0x9e, 0xe4, 0x04, 0x43, 0x25, 0xa9, 0xb0, 0x5c, 0xab, 0xb8, 0x08, 0xb2, 0xee, 0x84, 0x0d, 0x34, 0xe1, 0x5d, 0x10, 0x5a, 0x3f, 0x1f, 0x7b, 0x27, 0x69, 0x5a, 0x1a, 0x07, 0xa2, 0xd7, 0x3f, 0xe0, 0x8e, 0xca, 0xaa, 0x3c, 0x9c, 0x9d, 0x4d, 0x5a, 0x89, 0xff, 0x89, 0x0d, 0x54, 0x72, 0x7d, 0x7a, 0xe4, 0x0c, 0x0e, 0xc1, 0xa8, 0xdd, 0x86, 0x16, 0x5d, 0x8e, 0xe2, 0xc6, 0x36, 0x81, 0x41, 0x01, 0x6a, 0x48, 0xb5, 0x5b, 0x69, 0x67 } + +} +, +{ + "RSAES-OAEP Encryption Example 5.4", + /* Message to be encrypted */ + 6, + { 0x15, 0xc5, 0xb9, 0xee, 0x11, 0x85 } +, + /* Seed */ + 20, + { 0x49, 0xfa, 0x45, 0xd3, 0xa7, 0x8d, 0xd1, 0x0d, 0xfd, 0x57, 0x73, 0x99, 0xd1, 0xeb, 0x00, 0xaf, 0x7e, 0xed, 0x55, 0x13 } +, + /* Encryption */ + 129, + { 0x08, 0x12, 0xb7, 0x67, 0x68, 0xeb, 0xcb, 0x64, 0x2d, 0x04, 0x02, 0x58, 0xe5, 0xf4, 0x44, 0x1a, 0x01, 0x85, 0x21, 0xbd, 0x96, 0x68, 0x7e, 0x6c, 0x5e, 0x89, 0x9f, 0xcd, 0x6c, 0x17, 0x58, 0x8f, 0xf5, 0x9a, 0x82, 0xcc, 0x8a, 0xe0, 0x3a, 0x4b, 0x45, 0xb3, 0x12, 0x99, 0xaf, 0x17, 0x88, 0xc3, 0x29, 0xf7, 0xdc, 0xd2, 0x85, 0xf8, 0xcf, 0x4c, 0xed, 0x82, 0x60, 0x6b, 0x97, 0x61, 0x26, 0x71, 0xa4, 0x5b, 0xed, 0xca, 0x13, 0x34, 0x42, 0x14, 0x4d, 0x16, 0x17, 0xd1, 0x14, 0xf8, 0x02, 0x85, 0x7f, 0x0f, 0x9d, 0x73, 0x97, 0x51, 0xc5, 0x7a, 0x3f, 0x9e, 0xe4, 0x00, 0x91, 0x2c, 0x61, 0xe2, 0xe6, 0x99, 0x2b, 0xe0, 0x31, 0xa4, 0x3d, 0xd4, 0x8f, 0xa6, 0xba, 0x14, 0xee, 0xf7, 0xc4, 0x22, 0xb5, 0xed, 0xc4, 0xe7, 0xaf, 0xa0, 0x4f, 0xdd, 0x38, 0xf4, 0x02, 0xd1, 0xc8, 0xbb, 0x71, 0x9a, 0xbf } + +} +, +{ + "RSAES-OAEP Encryption Example 5.5", + /* Message to be encrypted */ + 45, + { 0x21, 0x02, 0x6e, 0x68, 0x00, 0xc7, 0xfa, 0x72, 0x8f, 0xca, 0xab, 0xa0, 0xd1, 0x96, 0xae, 0x28, 0xd7, 0xa2, 0xac, 0x4f, 0xfd, 0x8a, 0xbc, 0xe7, 0x94, 0xf0, 0x98, 0x5f, 0x60, 0xc8, 0xa6, 0x73, 0x72, 0x77, 0x36, 0x5d, 0x3f, 0xea, 0x11, 0xdb, 0x89, 0x23, 0xa2, 0x02, 0x9a } +, + /* Seed */ + 20, + { 0xf0, 0x28, 0x74, 0x13, 0x23, 0x4c, 0xc5, 0x03, 0x47, 0x24, 0xa0, 0x94, 0xc4, 0x58, 0x6b, 0x87, 0xaf, 0xf1, 0x33, 0xfc } +, + /* Encryption */ + 129, + { 0x07, 0xb6, 0x0e, 0x14, 0xec, 0x95, 0x4b, 0xfd, 0x29, 0xe6, 0x0d, 0x00, 0x47, 0xe7, 0x89, 0xf5, 0x1d, 0x57, 0x18, 0x6c, 0x63, 0x58, 0x99, 0x03, 0x30, 0x67, 0x93, 0xce, 0xd3, 0xf6, 0x82, 0x41, 0xc7, 0x43, 0x52, 0x9a, 0xba, 0x6a, 0x63, 0x74, 0xf9, 0x2e, 0x19, 0xe0, 0x16, 0x3e, 0xfa, 0x33, 0x69, 0x7e, 0x19, 0x6f, 0x76, 0x61, 0xdf, 0xaa, 0xa4, 0x7a, 0xac, 0x6b, 0xde, 0x5e, 0x51, 0xde, 0xb5, 0x07, 0xc7, 0x2c, 0x58, 0x9a, 0x2c, 0xa1, 0x69, 0x3d, 0x96, 0xb1, 0x46, 0x03, 0x81, 0x24, 0x9b, 0x2c, 0xdb, 0x9e, 0xac, 0x44, 0x76, 0x9f, 0x24, 0x89, 0xc5, 0xd3, 0xd2, 0xf9, 0x9f, 0x0e, 0xe3, 0xc7, 0xee, 0x5b, 0xf6, 0x4a, 0x5a, 0xc7, 0x9c, 0x42, 0xbd, 0x43, 0x3f, 0x14, 0x9b, 0xe8, 0xcb, 0x59, 0x54, 0x83, 0x61, 0x64, 0x05, 0x95, 0x51, 0x3c, 0x97, 0xaf, 0x7b, 0xc2, 0x50, 0x97, 0x23 } + +} +, +{ + "RSAES-OAEP Encryption Example 5.6", + /* Message to be encrypted */ + 11, + { 0x54, 0x1e, 0x37, 0xb6, 0x8b, 0x6c, 0x88, 0x72, 0xb8, 0x4c, 0x02 } +, + /* Seed */ + 20, + { 0xd9, 0xfb, 0xa4, 0x5c, 0x96, 0xf2, 0x1e, 0x6e, 0x26, 0xd2, 0x9e, 0xb2, 0xcd, 0xcb, 0x65, 0x85, 0xbe, 0x9c, 0xb3, 0x41 } +, + /* Encryption */ + 129, + { 0x08, 0xc3, 0x6d, 0x4d, 0xda, 0x33, 0x42, 0x3b, 0x2e, 0xd6, 0x83, 0x0d, 0x85, 0xf6, 0x41, 0x1b, 0xa1, 0xdc, 0xf4, 0x70, 0xa1, 0xfa, 0xe0, 0xeb, 0xef, 0xee, 0x7c, 0x08, 0x9f, 0x25, 0x6c, 0xef, 0x74, 0xcb, 0x96, 0xea, 0x69, 0xc3, 0x8f, 0x60, 0xf3, 0x9a, 0xbe, 0xe4, 0x41, 0x29, 0xbc, 0xb4, 0xc9, 0x2d, 0xe7, 0xf7, 0x97, 0x62, 0x3b, 0x20, 0x07, 0x4e, 0x3d, 0x9c, 0x28, 0x99, 0x70, 0x1e, 0xd9, 0x07, 0x1e, 0x1e, 0xfa, 0x0b, 0xdd, 0x84, 0xd4, 0xc3, 0xe5, 0x13, 0x03, 0x02, 0xd8, 0xf0, 0x24, 0x0b, 0xab, 0xa4, 0xb8, 0x4a, 0x71, 0xcc, 0x03, 0x2f, 0x22, 0x35, 0xa5, 0xff, 0x0f, 0xae, 0x27, 0x7c, 0x3e, 0x8f, 0x91, 0x12, 0xbe, 0xf4, 0x4c, 0x9a, 0xe2, 0x0d, 0x17, 0x5f, 0xc9, 0xa4, 0x05, 0x8b, 0xfc, 0x93, 0x0b, 0xa3, 0x1b, 0x02, 0xe2, 0xe4, 0xf4, 0x44, 0x48, 0x37, 0x10, 0xf2, 0x4a } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 6: A 1029-bit RSA Key Pair", +{ + /* RSA modulus n */ + 129, + { 0x12, 0xb1, 0x7f, 0x6d, 0xad, 0x2e, 0xcd, 0x19, 0xff, 0x46, 0xdc, 0x13, 0xf7, 0x86, 0x0f, 0x09, 0xe0, 0xe0, 0xcf, 0xb6, 0x77, 0xb3, 0x8a, 0x52, 0x59, 0x23, 0x05, 0xce, 0xaf, 0x02, 0x2c, 0x16, 0x6d, 0xb9, 0x0d, 0x04, 0xac, 0x29, 0xe3, 0x3f, 0x7d, 0xd1, 0x2d, 0x9f, 0xaf, 0x66, 0xe0, 0x81, 0x6b, 0xb6, 0x3e, 0xad, 0x26, 0x7c, 0xc7, 0xd4, 0x6c, 0x17, 0xc3, 0x7b, 0xe2, 0x14, 0xbc, 0xa2, 0xa2, 0x2d, 0x72, 0x3a, 0x64, 0xe4, 0x44, 0x07, 0x43, 0x6b, 0x6f, 0xc9, 0x65, 0x72, 0x9a, 0xef, 0xc2, 0x55, 0x4f, 0x37, 0x6c, 0xd5, 0xdc, 0xea, 0x68, 0x29, 0x37, 0x80, 0xa6, 0x2b, 0xf3, 0x9d, 0x00, 0x29, 0x48, 0x5a, 0x16, 0x0b, 0xbb, 0x9e, 0x5d, 0xc0, 0x97, 0x2d, 0x21, 0xa5, 0x04, 0xf5, 0x2e, 0x5e, 0xe0, 0x28, 0xaa, 0x41, 0x63, 0x32, 0xf5, 0x10, 0xb2, 0xe9, 0xcf, 0xf5, 0xf7, 0x22, 0xaf } +, + /* RSA public exponent e */ + 3, + { 0x01, 0x00, 0x01 } +, + /* RSA private exponent d */ + 129, + { 0x02, 0x95, 0xec, 0xa3, 0x56, 0x06, 0x18, 0x36, 0x95, 0x59, 0xce, 0xcd, 0x30, 0x3a, 0xa9, 0xcf, 0xda, 0xfc, 0x1d, 0x9f, 0x06, 0x95, 0x9d, 0xf7, 0x5f, 0xfe, 0xf9, 0x29, 0xaa, 0x89, 0x69, 0x61, 0xbc, 0xd1, 0x90, 0xdc, 0x69, 0x97, 0xed, 0xa7, 0xf5, 0x96, 0x3e, 0x72, 0x4d, 0x07, 0xb4, 0xdc, 0x11, 0xf3, 0x06, 0x5e, 0x5a, 0xe9, 0x7d, 0x96, 0x83, 0x51, 0x12, 0x28, 0x0b, 0x90, 0x84, 0xbb, 0x14, 0xf2, 0xa2, 0x1e, 0xbd, 0x4e, 0x88, 0x9d, 0x41, 0xb9, 0xc4, 0x13, 0x2e, 0xc1, 0x95, 0x6f, 0xca, 0xb8, 0xbb, 0x2f, 0xed, 0x05, 0x75, 0x88, 0x49, 0x36, 0x52, 0x2c, 0x5f, 0xf7, 0xd3, 0x32, 0x61, 0x90, 0x48, 0x24, 0xe7, 0xca, 0xde, 0xe4, 0xe0, 0xbb, 0x37, 0x2d, 0x24, 0x57, 0xcf, 0x78, 0xe2, 0xbd, 0x12, 0x86, 0x22, 0x8f, 0xf8, 0x3f, 0x10, 0x73, 0x1c, 0xe6, 0x3c, 0x90, 0xcf, 0xf3, 0xf9 } +, + /* Prime p */ + 65, + { 0x04, 0xa6, 0xce, 0x8b, 0x73, 0x58, 0xdf, 0xa6, 0x9b, 0xdc, 0xf7, 0x42, 0x61, 0x70, 0x05, 0xaf, 0xb5, 0x38, 0x5f, 0x5f, 0x3a, 0x58, 0xa2, 0x4e, 0xf7, 0x4a, 0x22, 0xa8, 0xc0, 0x5c, 0xb7, 0xcc, 0x38, 0xeb, 0xd4, 0xcc, 0x9d, 0x9a, 0x9d, 0x78, 0x9a, 0x62, 0xcd, 0x0f, 0x60, 0xf0, 0xcb, 0x94, 0x1d, 0x34, 0x23, 0xc9, 0x69, 0x2e, 0xfa, 0x4f, 0xe3, 0xad, 0xff, 0x29, 0x0c, 0x47, 0x49, 0xa3, 0x8b } +, + /* Prime q */ + 65, + { 0x04, 0x04, 0xc9, 0xa8, 0x03, 0x37, 0x1f, 0xed, 0xb4, 0xc5, 0xbe, 0x39, 0xf3, 0xc0, 0x0b, 0x00, 0x9e, 0x5e, 0x08, 0xa6, 0x3b, 0xe1, 0xe4, 0x00, 0x35, 0xcd, 0xac, 0xa5, 0x01, 0x1c, 0xc7, 0x01, 0xcf, 0x7e, 0xeb, 0xcb, 0x99, 0xf0, 0xff, 0xe1, 0x7c, 0xfd, 0x0a, 0x4b, 0xf7, 0xbe, 0xfd, 0x2d, 0xd5, 0x36, 0xac, 0x94, 0x6d, 0xb7, 0x97, 0xfd, 0xbc, 0x4a, 0xbe, 0x8f, 0x29, 0x34, 0x9b, 0x91, 0xed } +, + /* p's CRT exponent dP */ + 65, + { 0x03, 0x96, 0x1c, 0x8f, 0x76, 0x0a, 0xa2, 0xbd, 0x51, 0x54, 0xc7, 0xaa, 0xfd, 0x77, 0x22, 0x5b, 0x3b, 0xac, 0xd0, 0x13, 0x9a, 0xe7, 0xb5, 0x94, 0x8e, 0xa3, 0x31, 0x1f, 0xcc, 0xd8, 0x6f, 0xb9, 0x5c, 0x75, 0xaf, 0xa7, 0x67, 0x28, 0x4b, 0x9b, 0x2d, 0xe5, 0x59, 0x57, 0x2f, 0x15, 0xd8, 0xd0, 0x44, 0xc7, 0xeb, 0x83, 0xa1, 0xbe, 0x5f, 0xad, 0xf2, 0xcc, 0x37, 0x7c, 0x0d, 0x84, 0x75, 0x29, 0x4b } +, + /* q's CRT exponent dQ */ + 65, + { 0x02, 0x21, 0x97, 0xe0, 0x66, 0x74, 0x21, 0x96, 0xaa, 0xbc, 0x03, 0xfa, 0x2f, 0xee, 0xb4, 0xe7, 0x0b, 0x15, 0xcb, 0x78, 0x7d, 0x61, 0x7a, 0xcd, 0x31, 0xbb, 0x75, 0xc7, 0xbc, 0x23, 0x4a, 0xd7, 0x06, 0xf7, 0xc4, 0x8d, 0x21, 0x82, 0xd1, 0xf0, 0xff, 0x9c, 0x22, 0x8d, 0xcf, 0x41, 0x96, 0x7b, 0x6c, 0x0b, 0xa6, 0xd2, 0xc0, 0xad, 0x11, 0x0a, 0x1b, 0x85, 0x78, 0x31, 0xec, 0x24, 0x5e, 0x2c, 0xb1 } +, + /* CRT coefficient qInv */ + 65, + { 0x04, 0x01, 0xc4, 0xc0, 0xc5, 0x3d, 0x45, 0xdb, 0xdb, 0x5e, 0x9d, 0x96, 0xd0, 0xfe, 0xcf, 0x42, 0x75, 0xdf, 0x09, 0x74, 0xbc, 0x4a, 0x07, 0x36, 0xb4, 0xa7, 0x4c, 0x32, 0x69, 0x05, 0x3e, 0xfb, 0x68, 0x6a, 0xce, 0x24, 0x06, 0xe2, 0x2c, 0x9e, 0x05, 0x8d, 0xdb, 0x4a, 0xe5, 0x40, 0x62, 0x7a, 0xe2, 0xfd, 0xb0, 0x82, 0x61, 0xe8, 0xe7, 0xe4, 0xbc, 0xbc, 0x99, 0x4d, 0xaa, 0xfa, 0x30, 0x5c, 0x45 } + +} +, +{{ + "RSAES-OAEP Encryption Example 6.1", + /* Message to be encrypted */ + 22, + { 0x40, 0x46, 0xca, 0x8b, 0xaa, 0x33, 0x47, 0xca, 0x27, 0xf4, 0x9e, 0x0d, 0x81, 0xf9, 0xcc, 0x1d, 0x71, 0xbe, 0x9b, 0xa5, 0x17, 0xd4 } +, + /* Seed */ + 20, + { 0xdd, 0x0f, 0x6c, 0xfe, 0x41, 0x5e, 0x88, 0xe5, 0xa4, 0x69, 0xa5, 0x1f, 0xbb, 0xa6, 0xdf, 0xd4, 0x0a, 0xdb, 0x43, 0x84 } +, + /* Encryption */ + 129, + { 0x06, 0x30, 0xee, 0xbc, 0xd2, 0x85, 0x6c, 0x24, 0xf7, 0x98, 0x80, 0x6e, 0x41, 0xf9, 0xe6, 0x73, 0x45, 0xed, 0xa9, 0xce, 0xda, 0x38, 0x6a, 0xcc, 0x9f, 0xac, 0xae, 0xa1, 0xee, 0xed, 0x06, 0xac, 0xe5, 0x83, 0x70, 0x97, 0x18, 0xd9, 0xd1, 0x69, 0xfa, 0xdf, 0x41, 0x4d, 0x5c, 0x76, 0xf9, 0x29, 0x96, 0x83, 0x3e, 0xf3, 0x05, 0xb7, 0x5b, 0x1e, 0x4b, 0x95, 0xf6, 0x62, 0xa2, 0x0f, 0xae, 0xdc, 0x3b, 0xae, 0x0c, 0x48, 0x27, 0xa8, 0xbf, 0x8a, 0x88, 0xed, 0xbd, 0x57, 0xec, 0x20, 0x3a, 0x27, 0xa8, 0x41, 0xf0, 0x2e, 0x43, 0xa6, 0x15, 0xba, 0xb1, 0xa8, 0xca, 0xc0, 0x70, 0x1d, 0xe3, 0x4d, 0xeb, 0xde, 0xf6, 0x2a, 0x08, 0x80, 0x89, 0xb5, 0x5e, 0xc3, 0x6e, 0xa7, 0x52, 0x2f, 0xd3, 0xec, 0x8d, 0x06, 0xb6, 0xa0, 0x73, 0xe6, 0xdf, 0x83, 0x31, 0x53, 0xbc, 0x0a, 0xef, 0xd9, 0x3b, 0xd1, 0xa3 } + +} +, +#ifdef LTC_TEST_EXT +{ + "RSAES-OAEP Encryption Example 6.2", + /* Message to be encrypted */ + 50, + { 0x5c, 0xc7, 0x2c, 0x60, 0x23, 0x1d, 0xf0, 0x3b, 0x3d, 0x40, 0xf9, 0xb5, 0x79, 0x31, 0xbc, 0x31, 0x10, 0x9f, 0x97, 0x25, 0x27, 0xf2, 0x8b, 0x19, 0xe7, 0x48, 0x0c, 0x72, 0x88, 0xcb, 0x3c, 0x92, 0xb2, 0x25, 0x12, 0x21, 0x4e, 0x4b, 0xe6, 0xc9, 0x14, 0x79, 0x2d, 0xda, 0xbd, 0xf5, 0x7f, 0xaa, 0x8a, 0xa7 } +, + /* Seed */ + 20, + { 0x8d, 0x14, 0xbd, 0x94, 0x6a, 0x13, 0x51, 0x14, 0x8f, 0x5c, 0xae, 0x2e, 0xd9, 0xa0, 0xc6, 0x53, 0xe8, 0x5e, 0xbd, 0x85 } +, + /* Encryption */ + 129, + { 0x0e, 0xbc, 0x37, 0x37, 0x61, 0x73, 0xa4, 0xfd, 0x2f, 0x89, 0xcc, 0x55, 0xc2, 0xca, 0x62, 0xb2, 0x6b, 0x11, 0xd5, 0x1c, 0x3c, 0x7c, 0xe4, 0x9e, 0x88, 0x45, 0xf7, 0x4e, 0x76, 0x07, 0x31, 0x7c, 0x43, 0x6b, 0xc8, 0xd2, 0x3b, 0x96, 0x67, 0xdf, 0xeb, 0x9d, 0x08, 0x72, 0x34, 0xb4, 0x7b, 0xc6, 0x83, 0x71, 0x75, 0xae, 0x5c, 0x05, 0x59, 0xf6, 0xb8, 0x1d, 0x7d, 0x22, 0x41, 0x6d, 0x3e, 0x50, 0xf4, 0xac, 0x53, 0x3d, 0x8f, 0x08, 0x12, 0xf2, 0xdb, 0x9e, 0x79, 0x1f, 0xe9, 0xc7, 0x75, 0xac, 0x8b, 0x6a, 0xd0, 0xf5, 0x35, 0xad, 0x9c, 0xeb, 0x23, 0xa4, 0xa0, 0x20, 0x14, 0xc5, 0x8a, 0xb3, 0xf8, 0xd3, 0x16, 0x14, 0x99, 0xa2, 0x60, 0xf3, 0x93, 0x48, 0xe7, 0x14, 0xae, 0x2a, 0x1d, 0x34, 0x43, 0x20, 0x8f, 0xd8, 0xb7, 0x22, 0xcc, 0xfd, 0xfb, 0x39, 0x3e, 0x98, 0x01, 0x1f, 0x99, 0xe6, 0x3f } + +} +, +{ + "RSAES-OAEP Encryption Example 6.3", + /* Message to be encrypted */ + 54, + { 0xb2, 0x0e, 0x65, 0x13, 0x03, 0x09, 0x2f, 0x4b, 0xcc, 0xb4, 0x30, 0x70, 0xc0, 0xf8, 0x6d, 0x23, 0x04, 0x93, 0x62, 0xed, 0x96, 0x64, 0x2f, 0xc5, 0x63, 0x2c, 0x27, 0xdb, 0x4a, 0x52, 0xe3, 0xd8, 0x31, 0xf2, 0xab, 0x06, 0x8b, 0x23, 0xb1, 0x49, 0x87, 0x9c, 0x00, 0x2f, 0x6b, 0xf3, 0xfe, 0xee, 0x97, 0x59, 0x11, 0x12, 0x56, 0x2c } +, + /* Seed */ + 20, + { 0x6c, 0x07, 0x5b, 0xc4, 0x55, 0x20, 0xf1, 0x65, 0xc0, 0xbf, 0x5e, 0xa4, 0xc5, 0xdf, 0x19, 0x1b, 0xc9, 0xef, 0x0e, 0x44 } +, + /* Encryption */ + 129, + { 0x0a, 0x98, 0xbf, 0x10, 0x93, 0x61, 0x93, 0x94, 0x43, 0x6c, 0xf6, 0x8d, 0x8f, 0x38, 0xe2, 0xf1, 0x58, 0xfd, 0xe8, 0xea, 0x54, 0xf3, 0x43, 0x5f, 0x23, 0x9b, 0x8d, 0x06, 0xb8, 0x32, 0x18, 0x44, 0x20, 0x24, 0x76, 0xae, 0xed, 0x96, 0x00, 0x94, 0x92, 0x48, 0x0c, 0xe3, 0xa8, 0xd7, 0x05, 0x49, 0x8c, 0x4c, 0x8c, 0x68, 0xf0, 0x15, 0x01, 0xdc, 0x81, 0xdb, 0x60, 0x8f, 0x60, 0x08, 0x73, 0x50, 0xc8, 0xc3, 0xb0, 0xbd, 0x2e, 0x9e, 0xf6, 0xa8, 0x14, 0x58, 0xb7, 0xc8, 0x01, 0xb8, 0x9f, 0x2e, 0x4f, 0xe9, 0x9d, 0x49, 0x00, 0xba, 0x6a, 0x4b, 0x5e, 0x5a, 0x96, 0xd8, 0x65, 0xdc, 0x67, 0x6c, 0x77, 0x55, 0x92, 0x87, 0x94, 0x13, 0x0d, 0x62, 0x80, 0xa8, 0x16, 0x0a, 0x19, 0x0f, 0x2d, 0xf3, 0xea, 0x7c, 0xf9, 0xaa, 0x02, 0x71, 0xd8, 0x8e, 0x9e, 0x69, 0x05, 0xec, 0xf1, 0xc5, 0x15, 0x2d, 0x65 } + +} +, +{ + "RSAES-OAEP Encryption Example 6.4", + /* Message to be encrypted */ + 8, + { 0x68, 0x4e, 0x30, 0x38, 0xc5, 0xc0, 0x41, 0xf7 } +, + /* Seed */ + 20, + { 0x3b, 0xbc, 0x3b, 0xd6, 0x63, 0x7d, 0xfe, 0x12, 0x84, 0x69, 0x01, 0x02, 0x9b, 0xf5, 0xb0, 0xc0, 0x71, 0x03, 0x43, 0x9c } +, + /* Encryption */ + 129, + { 0x00, 0x8e, 0x7a, 0x67, 0xca, 0xcf, 0xb5, 0xc4, 0xe2, 0x4b, 0xec, 0x7d, 0xee, 0x14, 0x91, 0x17, 0xf1, 0x95, 0x98, 0xce, 0x8c, 0x45, 0x80, 0x8f, 0xef, 0x88, 0xc6, 0x08, 0xff, 0x9c, 0xd6, 0xe6, 0x95, 0x26, 0x3b, 0x9a, 0x3c, 0x0a, 0xd4, 0xb8, 0xba, 0x4c, 0x95, 0x23, 0x8e, 0x96, 0xa8, 0x42, 0x2b, 0x85, 0x35, 0x62, 0x9c, 0x8d, 0x53, 0x82, 0x37, 0x44, 0x79, 0xad, 0x13, 0xfa, 0x39, 0x97, 0x4b, 0x24, 0x2f, 0x9a, 0x75, 0x9e, 0xea, 0xf9, 0xc8, 0x3a, 0xd5, 0xa8, 0xca, 0x18, 0x94, 0x0a, 0x01, 0x62, 0xba, 0x75, 0x58, 0x76, 0xdf, 0x26, 0x3f, 0x4b, 0xd5, 0x0c, 0x65, 0x25, 0xc5, 0x60, 0x90, 0x26, 0x7c, 0x1f, 0x0e, 0x09, 0xce, 0x08, 0x99, 0xa0, 0xcf, 0x35, 0x9e, 0x88, 0x12, 0x0a, 0xbd, 0x9b, 0xf8, 0x93, 0x44, 0x5b, 0x3c, 0xae, 0x77, 0xd3, 0x60, 0x73, 0x59, 0xae, 0x9a, 0x52, 0xf8 } + +} +, +{ + "RSAES-OAEP Encryption Example 6.5", + /* Message to be encrypted */ + 25, + { 0x32, 0x48, 0x8c, 0xb2, 0x62, 0xd0, 0x41, 0xd6, 0xe4, 0xdd, 0x35, 0xf9, 0x87, 0xbf, 0x3c, 0xa6, 0x96, 0xdb, 0x1f, 0x06, 0xac, 0x29, 0xa4, 0x46, 0x93 } +, + /* Seed */ + 20, + { 0xb4, 0x6b, 0x41, 0x89, 0x3e, 0x8b, 0xef, 0x32, 0x6f, 0x67, 0x59, 0x38, 0x3a, 0x83, 0x07, 0x1d, 0xae, 0x7f, 0xca, 0xbc } +, + /* Encryption */ + 129, + { 0x00, 0x00, 0x34, 0x74, 0x41, 0x6c, 0x7b, 0x68, 0xbd, 0xf9, 0x61, 0xc3, 0x85, 0x73, 0x79, 0x44, 0xd7, 0xf1, 0xf4, 0x0c, 0xb3, 0x95, 0x34, 0x3c, 0x69, 0x3c, 0xc0, 0xb4, 0xfe, 0x63, 0xb3, 0x1f, 0xed, 0xf1, 0xea, 0xee, 0xac, 0x9c, 0xcc, 0x06, 0x78, 0xb3, 0x1d, 0xc3, 0x2e, 0x09, 0x77, 0x48, 0x95, 0x14, 0xc4, 0xf0, 0x90, 0x85, 0xf6, 0x29, 0x8a, 0x96, 0x53, 0xf0, 0x1a, 0xea, 0x40, 0x45, 0xff, 0x58, 0x2e, 0xe8, 0x87, 0xbe, 0x26, 0xae, 0x57, 0x5b, 0x73, 0xee, 0xf7, 0xf3, 0x77, 0x49, 0x21, 0xe3, 0x75, 0xa3, 0xd1, 0x9a, 0xdd, 0xa0, 0xca, 0x31, 0xaa, 0x18, 0x49, 0x88, 0x7c, 0x1f, 0x42, 0xca, 0xc9, 0x67, 0x7f, 0x7a, 0x2f, 0x4e, 0x92, 0x3f, 0x6e, 0x5a, 0x86, 0x8b, 0x38, 0xc0, 0x84, 0xef, 0x18, 0x75, 0x94, 0xdc, 0x9f, 0x7f, 0x04, 0x8f, 0xea, 0x2e, 0x02, 0x95, 0x53, 0x84, 0xab } + +} +, +{ + "RSAES-OAEP Encryption Example 6.6", + /* Message to be encrypted */ + 12, + { 0x50, 0xba, 0x14, 0xbe, 0x84, 0x62, 0x72, 0x02, 0x79, 0xc3, 0x06, 0xba } +, + /* Seed */ + 20, + { 0x0a, 0x24, 0x03, 0x31, 0x2a, 0x41, 0xe3, 0xd5, 0x2f, 0x06, 0x0f, 0xbc, 0x13, 0xa6, 0x7d, 0xe5, 0xcf, 0x76, 0x09, 0xa7 } +, + /* Encryption */ + 129, + { 0x0a, 0x02, 0x6d, 0xda, 0x5f, 0xc8, 0x78, 0x5f, 0x7b, 0xd9, 0xbf, 0x75, 0x32, 0x7b, 0x63, 0xe8, 0x5e, 0x2c, 0x0f, 0xde, 0xe5, 0xda, 0xdb, 0x65, 0xeb, 0xdc, 0xac, 0x9a, 0xe1, 0xde, 0x95, 0xc9, 0x2c, 0x67, 0x2a, 0xb4, 0x33, 0xaa, 0x7a, 0x8e, 0x69, 0xce, 0x6a, 0x6d, 0x88, 0x97, 0xfa, 0xc4, 0xac, 0x4a, 0x54, 0xde, 0x84, 0x1a, 0xe5, 0xe5, 0xbb, 0xce, 0x76, 0x87, 0x87, 0x9d, 0x79, 0x63, 0x4c, 0xea, 0x7a, 0x30, 0x68, 0x40, 0x65, 0xc7, 0x14, 0xd5, 0x24, 0x09, 0xb9, 0x28, 0x25, 0x6b, 0xbf, 0x53, 0xea, 0xbc, 0xd5, 0x23, 0x1e, 0xb7, 0x25, 0x95, 0x04, 0x53, 0x73, 0x99, 0xbd, 0x29, 0x16, 0x4b, 0x72, 0x6d, 0x33, 0xa4, 0x6d, 0xa7, 0x01, 0x36, 0x0a, 0x41, 0x68, 0xa0, 0x91, 0xcc, 0xab, 0x72, 0xd4, 0x4a, 0x62, 0xfe, 0xd2, 0x46, 0xc0, 0xff, 0xea, 0x5b, 0x13, 0x48, 0xab, 0x54, 0x70 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 7: A 1030-bit RSA Key Pair", +{ + /* RSA modulus n */ + 129, + { 0x31, 0x11, 0x79, 0xf0, 0xbc, 0xfc, 0x9b, 0x9d, 0x3c, 0xa3, 0x15, 0xd0, 0x0e, 0xf3, 0x0d, 0x7b, 0xdd, 0x3a, 0x2c, 0xfa, 0xe9, 0x91, 0x1b, 0xfe, 0xdc, 0xb9, 0x48, 0xb3, 0xa4, 0x78, 0x2d, 0x07, 0x32, 0xb6, 0xab, 0x44, 0xaa, 0x4b, 0xf0, 0x37, 0x41, 0xa6, 0x44, 0xdc, 0x01, 0xbe, 0xc3, 0xe6, 0x9b, 0x01, 0xa0, 0x33, 0xe6, 0x75, 0xd8, 0xac, 0xd7, 0xc4, 0x92, 0x5c, 0x6b, 0x1a, 0xec, 0x31, 0x19, 0x05, 0x1d, 0xfd, 0x89, 0x76, 0x2d, 0x21, 0x5d, 0x45, 0x47, 0x5f, 0xfc, 0xb5, 0x9f, 0x90, 0x81, 0x48, 0x62, 0x3f, 0x37, 0x17, 0x71, 0x56, 0xf6, 0xae, 0x86, 0xdd, 0x7a, 0x7c, 0x5f, 0x43, 0xdc, 0x1e, 0x1f, 0x90, 0x82, 0x54, 0x05, 0x8a, 0x28, 0x4a, 0x5f, 0x06, 0xc0, 0x02, 0x17, 0x93, 0xa8, 0x7f, 0x1a, 0xc5, 0xfe, 0xff, 0x7d, 0xca, 0xee, 0x69, 0xc5, 0xe5, 0x1a, 0x37, 0x89, 0xe3, 0x73 } +, + /* RSA public exponent e */ + 3, + { 0x01, 0x00, 0x01 } +, + /* RSA private exponent d */ + 129, + { 0x07, 0x0c, 0xfc, 0xff, 0x2f, 0xeb, 0x82, 0x76, 0xe2, 0x74, 0x32, 0xc4, 0x5d, 0xfe, 0xe4, 0x8f, 0x49, 0xb7, 0x91, 0x7d, 0x65, 0x30, 0xe1, 0xf0, 0xca, 0x34, 0x60, 0xf3, 0x2e, 0x02, 0x76, 0x17, 0x44, 0x87, 0xc5, 0x6e, 0x22, 0xa4, 0x5d, 0x25, 0x00, 0xd7, 0x77, 0x54, 0x95, 0x21, 0x9d, 0x7d, 0x16, 0x5a, 0x9c, 0xf3, 0xbd, 0x92, 0xc3, 0x2a, 0xf9, 0xa9, 0x8d, 0x8d, 0xc9, 0xcc, 0x29, 0x68, 0x00, 0xad, 0xc9, 0x4a, 0x0a, 0x54, 0xfb, 0x40, 0xf3, 0x42, 0x91, 0xbf, 0x84, 0xee, 0x8e, 0xa1, 0x2b, 0x6f, 0x10, 0x93, 0x59, 0xc6, 0xd3, 0x54, 0x2a, 0x50, 0xf9, 0xc7, 0x67, 0xf5, 0xcf, 0xff, 0x05, 0xa6, 0x81, 0xc2, 0xe6, 0x56, 0xfb, 0x77, 0xca, 0xaa, 0xdb, 0x4b, 0xe9, 0x46, 0x8d, 0x8a, 0xbc, 0xd4, 0xdf, 0x98, 0xf5, 0x8e, 0x86, 0xd2, 0x05, 0x3f, 0xa1, 0x34, 0x9f, 0x74, 0x8e, 0x21, 0xb1 } +, + /* Prime p */ + 65, + { 0x07, 0x49, 0x26, 0x2c, 0x11, 0x1c, 0xd4, 0x70, 0xec, 0x25, 0x66, 0xe6, 0xb3, 0x73, 0x2f, 0xc0, 0x93, 0x29, 0x46, 0x9a, 0xa1, 0x90, 0x71, 0xd3, 0xb9, 0xc0, 0x19, 0x06, 0x51, 0x4c, 0x6f, 0x1d, 0x26, 0xba, 0xa1, 0x4b, 0xea, 0xb0, 0x97, 0x1c, 0x8b, 0x7e, 0x61, 0x1a, 0x4f, 0x79, 0x00, 0x9d, 0x6f, 0xea, 0x77, 0x69, 0x28, 0xca, 0x25, 0x28, 0x5b, 0x0d, 0xe3, 0x64, 0x3d, 0x1a, 0x3f, 0x8c, 0x71 } +, + /* Prime q */ + 65, + { 0x06, 0xbc, 0x1e, 0x50, 0xe9, 0x6c, 0x02, 0xbf, 0x63, 0x6e, 0x9e, 0xea, 0x8b, 0x89, 0x9b, 0xbe, 0xbf, 0x76, 0x51, 0xde, 0x77, 0xdd, 0x47, 0x4c, 0x3e, 0x9b, 0xc2, 0x3b, 0xad, 0x81, 0x82, 0xb6, 0x19, 0x04, 0xc7, 0xd9, 0x7d, 0xfb, 0xeb, 0xfb, 0x1e, 0x00, 0x10, 0x88, 0x78, 0xb6, 0xe6, 0x7e, 0x41, 0x53, 0x91, 0xd6, 0x79, 0x42, 0xc2, 0xb2, 0xbf, 0x9b, 0x44, 0x35, 0xf8, 0x8b, 0x0c, 0xb0, 0x23 } +, + /* p's CRT exponent dP */ + 65, + { 0x03, 0xbc, 0x7e, 0xa7, 0xf0, 0xaa, 0xb1, 0x43, 0xab, 0xc6, 0xce, 0x8b, 0x97, 0x11, 0x86, 0x36, 0xa3, 0x01, 0x72, 0xe4, 0xcf, 0xe0, 0x2c, 0x8f, 0xa0, 0xdd, 0xa3, 0xb7, 0xba, 0xaf, 0x90, 0xf8, 0x09, 0x29, 0x82, 0x98, 0x55, 0x25, 0xf4, 0x88, 0xbd, 0xfc, 0xb4, 0xbd, 0x72, 0x6e, 0x22, 0x63, 0x9a, 0xc6, 0x4a, 0x30, 0x92, 0xab, 0x7f, 0xfc, 0xbf, 0x1d, 0x53, 0x34, 0xcf, 0xa5, 0x0b, 0x5b, 0xf1 } +, + /* q's CRT exponent dQ */ + 65, + { 0x02, 0x62, 0xa6, 0xaa, 0x29, 0xc2, 0xa3, 0xc6, 0x7d, 0xc5, 0x34, 0x6c, 0x06, 0x38, 0x1a, 0xfd, 0x98, 0x7a, 0xa3, 0xcc, 0x93, 0xcf, 0xbf, 0xec, 0xf5, 0x4f, 0xdd, 0x9f, 0x9d, 0x78, 0x7d, 0x7f, 0x59, 0xa5, 0x23, 0xd3, 0x98, 0x97, 0x9d, 0xa1, 0x37, 0xa2, 0xf6, 0x38, 0x1f, 0xe9, 0x48, 0x01, 0xf7, 0xc9, 0x4d, 0xa2, 0x15, 0x18, 0xdc, 0x34, 0xcb, 0x40, 0x87, 0x0c, 0x46, 0x97, 0x99, 0x4a, 0xd9 } +, + /* CRT coefficient qInv */ + 64, + { 0x64, 0x9d, 0x4c, 0x17, 0xb6, 0xee, 0x17, 0x21, 0xe7, 0x72, 0xd0, 0x38, 0x9a, 0x55, 0x9c, 0x3d, 0x3c, 0xdf, 0x95, 0x50, 0xd4, 0x57, 0xc4, 0x6b, 0x03, 0x7b, 0x74, 0x64, 0x1b, 0x1d, 0x52, 0x16, 0x6a, 0xf8, 0xa2, 0x13, 0xc8, 0x39, 0x62, 0x06, 0xcd, 0xfb, 0xa4, 0x42, 0x2f, 0x18, 0xd6, 0xf6, 0x1d, 0xbc, 0xb5, 0xd2, 0x14, 0xc9, 0x71, 0xbf, 0x48, 0x2a, 0xeb, 0x97, 0x6a, 0x73, 0x70, 0xc2 } + +} +, +{{ + "RSAES-OAEP Encryption Example 7.1", + /* Message to be encrypted */ + 4, + { 0x47, 0xaa, 0xe9, 0x09 } +, + /* Seed */ + 20, + { 0x43, 0xdd, 0x09, 0xa0, 0x7f, 0xf4, 0xca, 0xc7, 0x1c, 0xaa, 0x46, 0x32, 0xee, 0x5e, 0x1c, 0x1d, 0xae, 0xe4, 0xcd, 0x8f } +, + /* Encryption */ + 129, + { 0x16, 0x88, 0xe4, 0xce, 0x77, 0x94, 0xbb, 0xa6, 0xcb, 0x70, 0x14, 0x16, 0x9e, 0xcd, 0x55, 0x9c, 0xed, 0xe2, 0xa3, 0x0b, 0x56, 0xa5, 0x2b, 0x68, 0xd9, 0xfe, 0x18, 0xcf, 0x19, 0x73, 0xef, 0x97, 0xb2, 0xa0, 0x31, 0x53, 0x95, 0x1c, 0x75, 0x5f, 0x62, 0x94, 0xaa, 0x49, 0xad, 0xbd, 0xb5, 0x58, 0x45, 0xab, 0x68, 0x75, 0xfb, 0x39, 0x86, 0xc9, 0x3e, 0xcf, 0x92, 0x79, 0x62, 0x84, 0x0d, 0x28, 0x2f, 0x9e, 0x54, 0xce, 0x8b, 0x69, 0x0f, 0x7c, 0x0c, 0xb8, 0xbb, 0xd7, 0x34, 0x40, 0xd9, 0x57, 0x1d, 0x1b, 0x16, 0xcd, 0x92, 0x60, 0xf9, 0xea, 0xb4, 0x78, 0x3c, 0xc4, 0x82, 0xe5, 0x22, 0x3d, 0xc6, 0x09, 0x73, 0x87, 0x17, 0x83, 0xec, 0x27, 0xb0, 0xae, 0x0f, 0xd4, 0x77, 0x32, 0xcb, 0xc2, 0x86, 0xa1, 0x73, 0xfc, 0x92, 0xb0, 0x0f, 0xb4, 0xba, 0x68, 0x24, 0x64, 0x7c, 0xd9, 0x3c, 0x85, 0xc1 } + +} +, +#ifdef LTC_TEST_EXT +{ + "RSAES-OAEP Encryption Example 7.2", + /* Message to be encrypted */ + 31, + { 0x1d, 0x9b, 0x2e, 0x22, 0x23, 0xd9, 0xbc, 0x13, 0xbf, 0xb9, 0xf1, 0x62, 0xce, 0x73, 0x5d, 0xb4, 0x8b, 0xa7, 0xc6, 0x8f, 0x68, 0x22, 0xa0, 0xa1, 0xa7, 0xb6, 0xae, 0x16, 0x58, 0x34, 0xe7 } +, + /* Seed */ + 20, + { 0x3a, 0x9c, 0x3c, 0xec, 0x7b, 0x84, 0xf9, 0xbd, 0x3a, 0xde, 0xcb, 0xc6, 0x73, 0xec, 0x99, 0xd5, 0x4b, 0x22, 0xbc, 0x9b } +, + /* Encryption */ + 129, + { 0x10, 0x52, 0xed, 0x39, 0x7b, 0x2e, 0x01, 0xe1, 0xd0, 0xee, 0x1c, 0x50, 0xbf, 0x24, 0x36, 0x3f, 0x95, 0xe5, 0x04, 0xf4, 0xa0, 0x34, 0x34, 0xa0, 0x8f, 0xd8, 0x22, 0x57, 0x4e, 0xd6, 0xb9, 0x73, 0x6e, 0xdb, 0xb5, 0xf3, 0x90, 0xdb, 0x10, 0x32, 0x14, 0x79, 0xa8, 0xa1, 0x39, 0x35, 0x0e, 0x2b, 0xd4, 0x97, 0x7c, 0x37, 0x78, 0xef, 0x33, 0x1f, 0x3e, 0x78, 0xae, 0x11, 0x8b, 0x26, 0x84, 0x51, 0xf2, 0x0a, 0x2f, 0x01, 0xd4, 0x71, 0xf5, 0xd5, 0x3c, 0x56, 0x69, 0x37, 0x17, 0x1b, 0x2d, 0xbc, 0x2d, 0x4b, 0xde, 0x45, 0x9a, 0x57, 0x99, 0xf0, 0x37, 0x2d, 0x65, 0x74, 0x23, 0x9b, 0x23, 0x23, 0xd2, 0x45, 0xd0, 0xbb, 0x81, 0xc2, 0x86, 0xb6, 0x3c, 0x89, 0xa3, 0x61, 0x01, 0x73, 0x37, 0xe4, 0x90, 0x2f, 0x88, 0xa4, 0x67, 0xf4, 0xc7, 0xf2, 0x44, 0xbf, 0xd5, 0xab, 0x46, 0x43, 0x7f, 0xf3, 0xb6 } + +} +, +{ + "RSAES-OAEP Encryption Example 7.3", + /* Message to be encrypted */ + 3, + { 0xd9, 0x76, 0xfc } +, + /* Seed */ + 20, + { 0x76, 0xa7, 0x5e, 0x5b, 0x61, 0x57, 0xa5, 0x56, 0xcf, 0x88, 0x84, 0xbb, 0x2e, 0x45, 0xc2, 0x93, 0xdd, 0x54, 0x5c, 0xf5 } +, + /* Encryption */ + 129, + { 0x21, 0x55, 0xcd, 0x84, 0x3f, 0xf2, 0x4a, 0x4e, 0xe8, 0xba, 0xdb, 0x76, 0x94, 0x26, 0x00, 0x28, 0xa4, 0x90, 0x81, 0x3b, 0xa8, 0xb3, 0x69, 0xa4, 0xcb, 0xf1, 0x06, 0xec, 0x14, 0x8e, 0x52, 0x98, 0x70, 0x7f, 0x59, 0x65, 0xbe, 0x7d, 0x10, 0x1c, 0x10, 0x49, 0xea, 0x85, 0x84, 0xc2, 0x4c, 0xd6, 0x34, 0x55, 0xad, 0x9c, 0x10, 0x4d, 0x68, 0x62, 0x82, 0xd3, 0xfb, 0x80, 0x3a, 0x4c, 0x11, 0xc1, 0xc2, 0xe9, 0xb9, 0x1c, 0x71, 0x78, 0x80, 0x1d, 0x1b, 0x66, 0x40, 0xf0, 0x03, 0xf5, 0x72, 0x8d, 0xf0, 0x07, 0xb8, 0xa4, 0xcc, 0xc9, 0x2b, 0xce, 0x05, 0xe4, 0x1a, 0x27, 0x27, 0x8d, 0x7c, 0x85, 0x01, 0x8c, 0x52, 0x41, 0x43, 0x13, 0xa5, 0x07, 0x77, 0x89, 0x00, 0x1d, 0x4f, 0x01, 0x91, 0x0b, 0x72, 0xaa, 0xd0, 0x5d, 0x22, 0x0a, 0xa1, 0x4a, 0x58, 0x73, 0x3a, 0x74, 0x89, 0xbc, 0x54, 0x55, 0x6b } + +} +, +{ + "RSAES-OAEP Encryption Example 7.4", + /* Message to be encrypted */ + 62, + { 0xd4, 0x73, 0x86, 0x23, 0xdf, 0x22, 0x3a, 0xa4, 0x38, 0x43, 0xdf, 0x84, 0x67, 0x53, 0x4c, 0x41, 0xd0, 0x13, 0xe0, 0xc8, 0x03, 0xc6, 0x24, 0xe2, 0x63, 0x66, 0x6b, 0x23, 0x9b, 0xde, 0x40, 0xa5, 0xf2, 0x9a, 0xeb, 0x8d, 0xe7, 0x9e, 0x3d, 0xaa, 0x61, 0xdd, 0x03, 0x70, 0xf4, 0x9b, 0xd4, 0xb0, 0x13, 0x83, 0x4b, 0x98, 0x21, 0x2a, 0xef, 0x6b, 0x1c, 0x5e, 0xe3, 0x73, 0xb3, 0xcb } +, + /* Seed */ + 20, + { 0x78, 0x66, 0x31, 0x4a, 0x6a, 0xd6, 0xf2, 0xb2, 0x50, 0xa3, 0x59, 0x41, 0xdb, 0x28, 0xf5, 0x86, 0x4b, 0x58, 0x58, 0x59 } +, + /* Encryption */ + 129, + { 0x0a, 0xb1, 0x4c, 0x37, 0x3a, 0xeb, 0x7d, 0x43, 0x28, 0xd0, 0xaa, 0xad, 0x8c, 0x09, 0x4d, 0x88, 0xb9, 0xeb, 0x09, 0x8b, 0x95, 0xf2, 0x10, 0x54, 0xa2, 0x90, 0x82, 0x52, 0x2b, 0xe7, 0xc2, 0x7a, 0x31, 0x28, 0x78, 0xb6, 0x37, 0x91, 0x7e, 0x3d, 0x81, 0x9e, 0x6c, 0x3c, 0x56, 0x8d, 0xb5, 0xd8, 0x43, 0x80, 0x2b, 0x06, 0xd5, 0x1d, 0x9e, 0x98, 0xa2, 0xbe, 0x0b, 0xf4, 0x0c, 0x03, 0x14, 0x23, 0xb0, 0x0e, 0xdf, 0xbf, 0xf8, 0x32, 0x0e, 0xfb, 0x91, 0x71, 0xbd, 0x20, 0x44, 0x65, 0x3a, 0x4c, 0xb9, 0xc5, 0x12, 0x2f, 0x6c, 0x65, 0xe8, 0x3c, 0xda, 0x2e, 0xc3, 0xc1, 0x26, 0x02, 0x7a, 0x9c, 0x1a, 0x56, 0xba, 0x87, 0x4d, 0x0f, 0xea, 0x23, 0xf3, 0x80, 0xb8, 0x2c, 0xf2, 0x40, 0xb8, 0xcf, 0x54, 0x00, 0x04, 0x75, 0x8c, 0x4c, 0x77, 0xd9, 0x34, 0x15, 0x7a, 0x74, 0xf3, 0xfc, 0x12, 0xbf, 0xac } + +} +, +{ + "RSAES-OAEP Encryption Example 7.5", + /* Message to be encrypted */ + 16, + { 0xbb, 0x47, 0x23, 0x1c, 0xa5, 0xea, 0x1d, 0x3a, 0xd4, 0x6c, 0x99, 0x34, 0x5d, 0x9a, 0x8a, 0x61 } +, + /* Seed */ + 20, + { 0xb2, 0x16, 0x6e, 0xd4, 0x72, 0xd5, 0x8d, 0xb1, 0x0c, 0xab, 0x2c, 0x6b, 0x00, 0x0c, 0xcc, 0xf1, 0x0a, 0x7d, 0xc5, 0x09 } +, + /* Encryption */ + 129, + { 0x02, 0x83, 0x87, 0xa3, 0x18, 0x27, 0x74, 0x34, 0x79, 0x8b, 0x4d, 0x97, 0xf4, 0x60, 0x06, 0x8d, 0xf5, 0x29, 0x8f, 0xab, 0xa5, 0x04, 0x1b, 0xa1, 0x17, 0x61, 0xa1, 0xcb, 0x73, 0x16, 0xb2, 0x41, 0x84, 0x11, 0x4e, 0xc5, 0x00, 0x25, 0x7e, 0x25, 0x89, 0xed, 0x3b, 0x60, 0x7a, 0x1e, 0xbb, 0xe9, 0x7a, 0x6c, 0xc2, 0xe0, 0x2b, 0xf1, 0xb6, 0x81, 0xf4, 0x23, 0x12, 0xa3, 0x3b, 0x7a, 0x77, 0xd8, 0xe7, 0x85, 0x5c, 0x4a, 0x6d, 0xe0, 0x3e, 0x3c, 0x04, 0x64, 0x3f, 0x78, 0x6b, 0x91, 0xa2, 0x64, 0xa0, 0xd6, 0x80, 0x5e, 0x2c, 0xea, 0x91, 0xe6, 0x81, 0x77, 0xeb, 0x7a, 0x64, 0xd9, 0x25, 0x5e, 0x4f, 0x27, 0xe7, 0x13, 0xb7, 0xcc, 0xec, 0x00, 0xdc, 0x20, 0x0e, 0xbd, 0x21, 0xc2, 0xea, 0x2b, 0xb8, 0x90, 0xfe, 0xae, 0x49, 0x42, 0xdf, 0x94, 0x1d, 0xc3, 0xf9, 0x78, 0x90, 0xed, 0x34, 0x74, 0x78 } + +} +, +{ + "RSAES-OAEP Encryption Example 7.6", + /* Message to be encrypted */ + 18, + { 0x21, 0x84, 0x82, 0x70, 0x95, 0xd3, 0x5c, 0x3f, 0x86, 0xf6, 0x00, 0xe8, 0xe5, 0x97, 0x54, 0x01, 0x32, 0x96 } +, + /* Seed */ + 20, + { 0x52, 0x67, 0x3b, 0xde, 0x2c, 0xa1, 0x66, 0xc2, 0xaa, 0x46, 0x13, 0x1a, 0xc1, 0xdc, 0x80, 0x8d, 0x67, 0xd7, 0xd3, 0xb1 } +, + /* Encryption */ + 129, + { 0x14, 0xc6, 0x78, 0xa9, 0x4a, 0xd6, 0x05, 0x25, 0xef, 0x39, 0xe9, 0x59, 0xb2, 0xf3, 0xba, 0x5c, 0x09, 0x7a, 0x94, 0xff, 0x91, 0x2b, 0x67, 0xdb, 0xac, 0xe8, 0x05, 0x35, 0xc1, 0x87, 0xab, 0xd4, 0x7d, 0x07, 0x54, 0x20, 0xb1, 0x87, 0x21, 0x52, 0xbb, 0xa0, 0x8f, 0x7f, 0xc3, 0x1f, 0x31, 0x3b, 0xbf, 0x92, 0x73, 0xc9, 0x12, 0xfc, 0x4c, 0x01, 0x49, 0xa9, 0xb0, 0xcf, 0xb7, 0x98, 0x07, 0xe3, 0x46, 0xeb, 0x33, 0x20, 0x69, 0x61, 0x1b, 0xec, 0x0f, 0xf9, 0xbc, 0xd1, 0x68, 0xf1, 0xf7, 0xc3, 0x3e, 0x77, 0x31, 0x3c, 0xea, 0x45, 0x4b, 0x94, 0xe2, 0x54, 0x9e, 0xec, 0xf0, 0x02, 0xe2, 0xac, 0xf7, 0xf6, 0xf2, 0xd2, 0x84, 0x5d, 0x4f, 0xe0, 0xaa, 0xb2, 0xe5, 0xa9, 0x2d, 0xdf, 0x68, 0xc4, 0x80, 0xae, 0x11, 0x24, 0x79, 0x35, 0xd1, 0xf6, 0x25, 0x74, 0x84, 0x22, 0x16, 0xae, 0x67, 0x41, 0x15 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 8: A 1031-bit RSA Key Pair", +{ + /* RSA modulus n */ + 129, + { 0x5b, 0xdf, 0x0e, 0x30, 0xd3, 0x21, 0xdd, 0xa5, 0x14, 0x7f, 0x88, 0x24, 0x08, 0xfa, 0x69, 0x19, 0x54, 0x80, 0xdf, 0x8f, 0x80, 0xd3, 0xf6, 0xe8, 0xbf, 0x58, 0x18, 0x50, 0x4f, 0x36, 0x42, 0x7c, 0xa9, 0xb1, 0xf5, 0x54, 0x0b, 0x9c, 0x65, 0xa8, 0xf6, 0x97, 0x4c, 0xf8, 0x44, 0x7a, 0x24, 0x4d, 0x92, 0x80, 0x20, 0x1b, 0xb4, 0x9f, 0xcb, 0xbe, 0x63, 0x78, 0xd1, 0x94, 0x4c, 0xd2, 0x27, 0xe2, 0x30, 0xf9, 0x6e, 0x3d, 0x10, 0xf8, 0x19, 0xdc, 0xef, 0x27, 0x6c, 0x64, 0xa0, 0x0b, 0x2a, 0x4b, 0x67, 0x01, 0xe7, 0xd0, 0x1d, 0xe5, 0xfa, 0xbd, 0xe3, 0xb1, 0xe9, 0xa0, 0xdf, 0x82, 0xf4, 0x63, 0x13, 0x59, 0xcd, 0x22, 0x66, 0x96, 0x47, 0xfb, 0xb1, 0x71, 0x72, 0x46, 0x13, 0x4e, 0xd7, 0xb4, 0x97, 0xcf, 0xff, 0xbd, 0xc4, 0x2b, 0x59, 0xc7, 0x3a, 0x96, 0xed, 0x90, 0x16, 0x62, 0x12, 0xdf, 0xf7 } +, + /* RSA public exponent e */ + 3, + { 0x01, 0x00, 0x01 } +, + /* RSA private exponent d */ + 129, + { 0x0f, 0x7d, 0x1e, 0x9e, 0x5a, 0xaa, 0x25, 0xfd, 0x13, 0xe4, 0xa0, 0x66, 0x3a, 0xe1, 0x44, 0xe0, 0xd1, 0x5f, 0x5c, 0xd1, 0x8b, 0xcd, 0xb0, 0x9d, 0xf2, 0xcc, 0x7e, 0x64, 0xe3, 0xc5, 0xe9, 0x15, 0xad, 0x62, 0x64, 0x53, 0x04, 0x16, 0x1d, 0x09, 0x8c, 0x71, 0x5b, 0xb7, 0xab, 0x8b, 0xd0, 0x1d, 0x07, 0xea, 0xf3, 0xfe, 0xd7, 0xc7, 0xed, 0x08, 0xaf, 0x2a, 0x8a, 0x62, 0xef, 0x44, 0xab, 0x16, 0xb3, 0x20, 0xe1, 0x4a, 0xf7, 0x2a, 0x48, 0xf9, 0x6a, 0xfe, 0x26, 0x2a, 0x0a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xf5, 0xd7, 0x2d, 0xfb, 0xb0, 0xa9 } +, + /* p's CRT exponent dP */ + 65, + { 0x07, 0xc7, 0x14, 0x10, 0xaf, 0x10, 0x39, 0x62, 0xdb, 0x36, 0x74, 0x04, 0xe3, 0x7a, 0xe8, 0x50, 0xba, 0xa4, 0xe9, 0xc2, 0x9d, 0xd9, 0x21, 0x45, 0x81, 0x52, 0x94, 0xa6, 0x7c, 0x7d, 0x1c, 0x6d, 0xed, 0x26, 0x3a, 0xa0, 0x30, 0xa9, 0xb6, 0x33, 0xae, 0x50, 0x30, 0x3e, 0x14, 0x03, 0x5d, 0x1a, 0xf0, 0x14, 0x12, 0x3e, 0xba, 0x68, 0x78, 0x20, 0x30, 0x8d, 0x8e, 0xbc, 0x85, 0xb6, 0x95, 0x7d, 0x7d } +, + /* q's CRT exponent dQ */ + 64, + { 0xae, 0x2c, 0x75, 0x38, 0x0c, 0x02, 0xc0, 0x16, 0xad, 0x05, 0x89, 0x1b, 0x33, 0x01, 0xde, 0x88, 0x1f, 0x28, 0xae, 0x11, 0x71, 0x18, 0x2b, 0x6b, 0x2c, 0x83, 0xbe, 0xa7, 0xc5, 0x15, 0xec, 0xa9, 0xca, 0x29, 0x8c, 0x7b, 0x1c, 0xab, 0x58, 0x17, 0xa5, 0x97, 0x06, 0x8f, 0xc8, 0x50, 0x60, 0xde, 0x4d, 0xa8, 0xa0, 0x16, 0x37, 0x8a, 0xae, 0x43, 0xc7, 0xf9, 0x67, 0xbc, 0xc3, 0x79, 0x04, 0xb9 } +, + /* CRT coefficient qInv */ + 65, + { 0x05, 0x98, 0xd1, 0x05, 0x9e, 0x3a, 0xda, 0x4f, 0x63, 0x20, 0x75, 0x2c, 0x09, 0xd8, 0x05, 0xff, 0x7d, 0x1f, 0x1a, 0xe0, 0xd0, 0x17, 0xae, 0xee, 0xe9, 0xce, 0xfa, 0x0d, 0x7d, 0xd7, 0xff, 0x77, 0x5e, 0x44, 0xb5, 0x78, 0x32, 0x2f, 0x64, 0x05, 0xd6, 0x21, 0x1d, 0xa1, 0x95, 0x19, 0x66, 0x6a, 0xa8, 0x7f, 0xdc, 0x4c, 0xd8, 0xc8, 0x8f, 0x6b, 0x6e, 0x3d, 0x67, 0xe9, 0x61, 0xdc, 0xbb, 0xa3, 0xd0 } + +} +, +{{ + "RSAES-OAEP Encryption Example 8.1", + /* Message to be encrypted */ + 54, + { 0x05, 0x0b, 0x75, 0x5e, 0x5e, 0x68, 0x80, 0xf7, 0xb9, 0xe9, 0xd6, 0x92, 0xa7, 0x4c, 0x37, 0xaa, 0xe4, 0x49, 0xb3, 0x1b, 0xfe, 0xa6, 0xde, 0xff, 0x83, 0x74, 0x7a, 0x89, 0x7f, 0x6c, 0x2c, 0x82, 0x5b, 0xb1, 0xad, 0xbf, 0x85, 0x0a, 0x3c, 0x96, 0x99, 0x4b, 0x5d, 0xe5, 0xb3, 0x3c, 0xbc, 0x7d, 0x4a, 0x17, 0x91, 0x3a, 0x79, 0x67 } +, + /* Seed */ + 20, + { 0x77, 0x06, 0xff, 0xca, 0x1e, 0xcf, 0xb1, 0xeb, 0xee, 0x2a, 0x55, 0xe5, 0xc6, 0xe2, 0x4c, 0xd2, 0x79, 0x7a, 0x41, 0x25 } +, + /* Encryption */ + 129, + { 0x09, 0xb3, 0x68, 0x3d, 0x8a, 0x2e, 0xb0, 0xfb, 0x29, 0x5b, 0x62, 0xed, 0x1f, 0xb9, 0x29, 0x0b, 0x71, 0x44, 0x57, 0xb7, 0x82, 0x53, 0x19, 0xf4, 0x64, 0x78, 0x72, 0xaf, 0x88, 0x9b, 0x30, 0x40, 0x94, 0x72, 0x02, 0x0a, 0xd1, 0x29, 0x12, 0xbf, 0x19, 0xb1, 0x1d, 0x48, 0x19, 0xf4, 0x96, 0x14, 0x82, 0x4f, 0xfd, 0x84, 0xd0, 0x9c, 0x0a, 0x17, 0xe7, 0xd1, 0x73, 0x09, 0xd1, 0x29, 0x19, 0x79, 0x04, 0x10, 0xaa, 0x29, 0x95, 0x69, 0x9f, 0x6a, 0x86, 0xdb, 0xe3, 0x24, 0x2b, 0x5a, 0xcc, 0x23, 0xaf, 0x45, 0x69, 0x10, 0x80, 0xd6, 0xb1, 0xae, 0x81, 0x0f, 0xb3, 0xe3, 0x05, 0x70, 0x87, 0xf0, 0x97, 0x00, 0x92, 0xce, 0x00, 0xbe, 0x95, 0x62, 0xff, 0x40, 0x53, 0xb6, 0x26, 0x2c, 0xe0, 0xca, 0xa9, 0x3e, 0x13, 0x72, 0x3d, 0x2e, 0x3a, 0x5b, 0xa0, 0x75, 0xd4, 0x5f, 0x0d, 0x61, 0xb5, 0x4b, 0x61 } + +} +, +#ifdef LTC_TEST_EXT +{ + "RSAES-OAEP Encryption Example 8.2", + /* Message to be encrypted */ + 63, + { 0x4e, 0xb6, 0x8d, 0xcd, 0x93, 0xca, 0x9b, 0x19, 0xdf, 0x11, 0x1b, 0xd4, 0x36, 0x08, 0xf5, 0x57, 0x02, 0x6f, 0xe4, 0xaa, 0x1d, 0x5c, 0xfa, 0xc2, 0x27, 0xa3, 0xeb, 0x5a, 0xb9, 0x54, 0x8c, 0x18, 0xa0, 0x6d, 0xde, 0xd2, 0x3f, 0x81, 0x82, 0x59, 0x86, 0xb2, 0xfc, 0xd7, 0x11, 0x09, 0xec, 0xef, 0x7e, 0xff, 0x88, 0x87, 0x3f, 0x07, 0x5c, 0x2a, 0xa0, 0xc4, 0x69, 0xf6, 0x9c, 0x92, 0xbc } +, + /* Seed */ + 20, + { 0xa3, 0x71, 0x7d, 0xa1, 0x43, 0xb4, 0xdc, 0xff, 0xbc, 0x74, 0x26, 0x65, 0xa8, 0xfa, 0x95, 0x05, 0x85, 0x54, 0x83, 0x43 } +, + /* Encryption */ + 129, + { 0x2e, 0xcf, 0x15, 0xc9, 0x7c, 0x5a, 0x15, 0xb1, 0x47, 0x6a, 0xe9, 0x86, 0xb3, 0x71, 0xb5, 0x7a, 0x24, 0x28, 0x4f, 0x4a, 0x16, 0x2a, 0x8d, 0x0c, 0x81, 0x82, 0xe7, 0x90, 0x5e, 0x79, 0x22, 0x56, 0xf1, 0x81, 0x2b, 0xa5, 0xf8, 0x3f, 0x1f, 0x7a, 0x13, 0x0e, 0x42, 0xdc, 0xc0, 0x22, 0x32, 0x84, 0x4e, 0xdc, 0x14, 0xa3, 0x1a, 0x68, 0xee, 0x97, 0xae, 0x56, 0x4a, 0x38, 0x3a, 0x34, 0x11, 0x65, 0x64, 0x24, 0xc5, 0xf6, 0x2d, 0xdb, 0x64, 0x60, 0x93, 0xc3, 0x67, 0xbe, 0x1f, 0xcd, 0xa4, 0x26, 0xcf, 0x00, 0xa0, 0x6d, 0x8a, 0xcb, 0x7e, 0x57, 0x77, 0x6f, 0xbb, 0xd8, 0x55, 0xac, 0x3d, 0xf5, 0x06, 0xfc, 0x16, 0xb1, 0xd7, 0xc3, 0xf2, 0x11, 0x0f, 0x3d, 0x80, 0x68, 0xe9, 0x1e, 0x18, 0x63, 0x63, 0x83, 0x1c, 0x84, 0x09, 0x68, 0x0d, 0x8d, 0xa9, 0xec, 0xd8, 0xcf, 0x1f, 0xa2, 0x0e, 0xe3, 0x9d } + +} +, +{ + "RSAES-OAEP Encryption Example 8.3", + /* Message to be encrypted */ + 12, + { 0x86, 0x04, 0xac, 0x56, 0x32, 0x8c, 0x1a, 0xb5, 0xad, 0x91, 0x78, 0x61 } +, + /* Seed */ + 20, + { 0xee, 0x06, 0x20, 0x90, 0x73, 0xcc, 0xa0, 0x26, 0xbb, 0x26, 0x4e, 0x51, 0x85, 0xbf, 0x8c, 0x68, 0xb7, 0x73, 0x9f, 0x86 } +, + /* Encryption */ + 129, + { 0x4b, 0xc8, 0x91, 0x30, 0xa5, 0xb2, 0xda, 0xbb, 0x7c, 0x2f, 0xcf, 0x90, 0xeb, 0x5d, 0x0e, 0xaf, 0x9e, 0x68, 0x1b, 0x71, 0x46, 0xa3, 0x8f, 0x31, 0x73, 0xa3, 0xd9, 0xcf, 0xec, 0x52, 0xea, 0x9e, 0x0a, 0x41, 0x93, 0x2e, 0x64, 0x8a, 0x9d, 0x69, 0x34, 0x4c, 0x50, 0xda, 0x76, 0x3f, 0x51, 0xa0, 0x3c, 0x95, 0x76, 0x21, 0x31, 0xe8, 0x05, 0x22, 0x54, 0xdc, 0xd2, 0x24, 0x8c, 0xba, 0x40, 0xfd, 0x31, 0x66, 0x77, 0x86, 0xce, 0x05, 0xa2, 0xb7, 0xb5, 0x31, 0xac, 0x9d, 0xac, 0x9e, 0xd5, 0x84, 0xa5, 0x9b, 0x67, 0x7c, 0x1a, 0x8a, 0xed, 0x8c, 0x5d, 0x15, 0xd6, 0x8c, 0x05, 0x56, 0x9e, 0x2b, 0xe7, 0x80, 0xbf, 0x7d, 0xb6, 0x38, 0xfd, 0x2b, 0xfd, 0x2a, 0x85, 0xab, 0x27, 0x68, 0x60, 0xf3, 0x77, 0x73, 0x38, 0xfc, 0xa9, 0x89, 0xff, 0xd7, 0x43, 0xd1, 0x3e, 0xe0, 0x8e, 0x0c, 0xa9, 0x89, 0x3f } + +} +, +{ + "RSAES-OAEP Encryption Example 8.4", + /* Message to be encrypted */ + 34, + { 0xfd, 0xda, 0x5f, 0xbf, 0x6e, 0xc3, 0x61, 0xa9, 0xd9, 0xa4, 0xac, 0x68, 0xaf, 0x21, 0x6a, 0x06, 0x86, 0xf4, 0x38, 0xb1, 0xe0, 0xe5, 0xc3, 0x6b, 0x95, 0x5f, 0x74, 0xe1, 0x07, 0xf3, 0x9c, 0x0d, 0xdd, 0xcc } +, + /* Seed */ + 20, + { 0x99, 0x0a, 0xd5, 0x73, 0xdc, 0x48, 0xa9, 0x73, 0x23, 0x5b, 0x6d, 0x82, 0x54, 0x36, 0x18, 0xf2, 0xe9, 0x55, 0x10, 0x5d } +, + /* Encryption */ + 129, + { 0x2e, 0x45, 0x68, 0x47, 0xd8, 0xfc, 0x36, 0xff, 0x01, 0x47, 0xd6, 0x99, 0x35, 0x94, 0xb9, 0x39, 0x72, 0x27, 0xd5, 0x77, 0x75, 0x2c, 0x79, 0xd0, 0xf9, 0x04, 0xfc, 0xb0, 0x39, 0xd4, 0xd8, 0x12, 0xfe, 0xa6, 0x05, 0xa7, 0xb5, 0x74, 0xdd, 0x82, 0xca, 0x78, 0x6f, 0x93, 0x75, 0x23, 0x48, 0x43, 0x8e, 0xe9, 0xf5, 0xb5, 0x45, 0x49, 0x85, 0xd5, 0xf0, 0xe1, 0x69, 0x9e, 0x3e, 0x7a, 0xd1, 0x75, 0xa3, 0x2e, 0x15, 0xf0, 0x3d, 0xeb, 0x04, 0x2a, 0xb9, 0xfe, 0x1d, 0xd9, 0xdb, 0x1b, 0xb8, 0x6f, 0x8c, 0x08, 0x9c, 0xcb, 0x45, 0xe7, 0xef, 0x0c, 0x5e, 0xe7, 0xca, 0x9b, 0x72, 0x90, 0xca, 0x6b, 0x15, 0xbe, 0xd4, 0x70, 0x39, 0x78, 0x8a, 0x8a, 0x93, 0xff, 0x83, 0xe0, 0xe8, 0xd6, 0x24, 0x4c, 0x71, 0x00, 0x63, 0x62, 0xde, 0xef, 0x69, 0xb6, 0xf4, 0x16, 0xfb, 0x3c, 0x68, 0x43, 0x83, 0xfb, 0xd0 } + +} +, +{ + "RSAES-OAEP Encryption Example 8.5", + /* Message to be encrypted */ + 13, + { 0x4a, 0x5f, 0x49, 0x14, 0xbe, 0xe2, 0x5d, 0xe3, 0xc6, 0x93, 0x41, 0xde, 0x07 } +, + /* Seed */ + 20, + { 0xec, 0xc6, 0x3b, 0x28, 0xf0, 0x75, 0x6f, 0x22, 0xf5, 0x2a, 0xc8, 0xe6, 0xec, 0x12, 0x51, 0xa6, 0xec, 0x30, 0x47, 0x18 } +, + /* Encryption */ + 129, + { 0x1f, 0xb9, 0x35, 0x6f, 0xd5, 0xc4, 0xb1, 0x79, 0x6d, 0xb2, 0xeb, 0xf7, 0xd0, 0xd3, 0x93, 0xcc, 0x81, 0x0a, 0xdf, 0x61, 0x45, 0xde, 0xfc, 0x2f, 0xce, 0x71, 0x4f, 0x79, 0xd9, 0x38, 0x00, 0xd5, 0xe2, 0xac, 0x21, 0x1e, 0xa8, 0xbb, 0xec, 0xca, 0x4b, 0x65, 0x4b, 0x94, 0xc3, 0xb1, 0x8b, 0x30, 0xdd, 0x57, 0x6c, 0xe3, 0x4d, 0xc9, 0x54, 0x36, 0xef, 0x57, 0xa0, 0x94, 0x15, 0x64, 0x59, 0x23, 0x35, 0x9a, 0x5d, 0x7b, 0x41, 0x71, 0xef, 0x22, 0xc2, 0x46, 0x70, 0xf1, 0xb2, 0x29, 0xd3, 0x60, 0x3e, 0x91, 0xf7, 0x66, 0x71, 0xb7, 0xdf, 0x97, 0xe7, 0x31, 0x7c, 0x97, 0x73, 0x44, 0x76, 0xd5, 0xf3, 0xd1, 0x7d, 0x21, 0xcf, 0x82, 0xb5, 0xba, 0x9f, 0x83, 0xdf, 0x2e, 0x58, 0x8d, 0x36, 0x98, 0x4f, 0xd1, 0xb5, 0x84, 0x46, 0x8b, 0xd2, 0x3b, 0x2e, 0x87, 0x5f, 0x32, 0xf6, 0x89, 0x53, 0xf7, 0xb2 } + +} +, +{ + "RSAES-OAEP Encryption Example 8.6", + /* Message to be encrypted */ + 25, + { 0x8e, 0x07, 0xd6, 0x6f, 0x7b, 0x88, 0x0a, 0x72, 0x56, 0x3a, 0xbc, 0xd3, 0xf3, 0x50, 0x92, 0xbc, 0x33, 0x40, 0x9f, 0xb7, 0xf8, 0x8f, 0x24, 0x72, 0xbe } +, + /* Seed */ + 20, + { 0x39, 0x25, 0xc7, 0x1b, 0x36, 0x2d, 0x40, 0xa0, 0xa6, 0xde, 0x42, 0x14, 0x55, 0x79, 0xba, 0x1e, 0x7d, 0xd4, 0x59, 0xfc } +, + /* Encryption */ + 129, + { 0x3a, 0xfd, 0x9c, 0x66, 0x00, 0x14, 0x7b, 0x21, 0x79, 0x8d, 0x81, 0x8c, 0x65, 0x5a, 0x0f, 0x4c, 0x92, 0x12, 0xdb, 0x26, 0xd0, 0xb0, 0xdf, 0xdc, 0x2a, 0x75, 0x94, 0xcc, 0xb3, 0xd2, 0x2f, 0x5b, 0xf1, 0xd7, 0xc3, 0xe1, 0x12, 0xcd, 0x73, 0xfc, 0x7d, 0x50, 0x9c, 0x7a, 0x8b, 0xaf, 0xdd, 0x3c, 0x27, 0x4d, 0x13, 0x99, 0x00, 0x9f, 0x96, 0x09, 0xec, 0x4b, 0xe6, 0x47, 0x7e, 0x45, 0x3f, 0x07, 0x5a, 0xa3, 0x3d, 0xb3, 0x82, 0x87, 0x0c, 0x1c, 0x34, 0x09, 0xae, 0xf3, 0x92, 0xd7, 0x38, 0x6a, 0xe3, 0xa6, 0x96, 0xb9, 0x9a, 0x94, 0xb4, 0xda, 0x05, 0x89, 0x44, 0x7e, 0x95, 0x5d, 0x16, 0xc9, 0x8b, 0x17, 0x60, 0x2a, 0x59, 0xbd, 0x73, 0x62, 0x79, 0xfc, 0xd8, 0xfb, 0x28, 0x0c, 0x44, 0x62, 0xd5, 0x90, 0xbf, 0xa9, 0xbf, 0x13, 0xfe, 0xd5, 0x70, 0xea, 0xfd, 0xe9, 0x73, 0x30, 0xa2, 0xc2, 0x10 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 9: A 1536-bit RSA Key Pair", +{ + /* RSA modulus n */ + 192, + { 0xcf, 0x2c, 0xd4, 0x1e, 0x34, 0xca, 0x3a, 0x72, 0x8e, 0xa5, 0xcb, 0x8a, 0xff, 0x64, 0xc3, 0x6d, 0x27, 0xbd, 0xef, 0x53, 0x64, 0xe3, 0x36, 0xfd, 0x68, 0xd3, 0x12, 0x3c, 0x5a, 0x19, 0x6a, 0x8c, 0x28, 0x70, 0x13, 0xe8, 0x53, 0xd5, 0x15, 0x6d, 0x58, 0xd1, 0x51, 0x95, 0x45, 0x20, 0xfb, 0x4f, 0x6d, 0x7b, 0x17, 0xab, 0xb6, 0x81, 0x77, 0x65, 0x90, 0x9c, 0x57, 0x61, 0x19, 0x65, 0x9d, 0x90, 0x2b, 0x19, 0x06, 0xed, 0x8a, 0x2b, 0x10, 0xc1, 0x55, 0xc2, 0x4d, 0x12, 0x45, 0x28, 0xda, 0xb9, 0xee, 0xae, 0x37, 0x9b, 0xea, 0xc6, 0x6e, 0x4a, 0x41, 0x17, 0x86, 0xdc, 0xb8, 0xfd, 0x00, 0x62, 0xeb, 0xc0, 0x30, 0xde, 0x12, 0x19, 0xa0, 0x4c, 0x2a, 0x8c, 0x1b, 0x7d, 0xd3, 0x13, 0x1e, 0x4d, 0x6b, 0x6c, 0xae, 0xe2, 0xe3, 0x1a, 0x5e, 0xd4, 0x1a, 0xc1, 0x50, 0x9b, 0x2e, 0xf1, 0xee, 0x2a, 0xb1, 0x83, 0x64, 0xbe, 0x56, 0x8c, 0xa9, 0x41, 0xc2, 0x5e, 0xcc, 0x84, 0xff, 0x9d, 0x64, 0x3b, 0x5e, 0xc1, 0xaa, 0xae, 0x10, 0x2a, 0x20, 0xd7, 0x3f, 0x47, 0x9b, 0x78, 0x0f, 0xd6, 0xda, 0x91, 0x07, 0x52, 0x12, 0xd9, 0xea, 0xc0, 0x3a, 0x06, 0x74, 0xd8, 0x99, 0xeb, 0xa2, 0xe4, 0x31, 0xf4, 0xc4, 0x4b, 0x61, 0x5b, 0x6b, 0xa2, 0x23, 0x2b, 0xd4, 0xb3, 0x3b, 0xae, 0xd7, 0x3d, 0x62, 0x5d } +, + /* RSA public exponent e */ + 3, + { 0x01, 0x00, 0x01 } +, + /* RSA private exponent d */ + 192, + { 0x19, 0x8c, 0x14, 0x1e, 0x23, 0x71, 0x5a, 0x92, 0xbc, 0xcf, 0x6a, 0x11, 0x9a, 0x5b, 0xc1, 0x13, 0x89, 0x46, 0x8d, 0x28, 0x11, 0xf5, 0x48, 0xd7, 0x27, 0xe1, 0x7b, 0x4a, 0xb0, 0xeb, 0x98, 0x6d, 0x6f, 0x21, 0x1e, 0xfb, 0x53, 0xb7, 0x1f, 0x7c, 0xcb, 0xea, 0x87, 0xee, 0x69, 0xc7, 0x5e, 0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0x0f, 0xc7, 0x2b, 0x88, 0x65, 0xa7, 0x18, 0xaf, 0x89, 0x5f, 0x1b, 0xcd, 0x91, 0x45, 0x29, 0x80, 0x27, 0x42, 0x3b, 0x60, 0x5e, 0x70, 0xa4, 0x7c, 0xf5, 0x83, 0x90, 0xa8, 0xc3, 0xe8, 0x8f, 0xc8, 0xc4, 0x8e, 0x8b, 0x32, 0xe3, 0xda, 0x21, 0x0d, 0xfb, 0xe3, 0xe8, 0x81, 0xea, 0x56, 0x74, 0xb6, 0xa3, 0x48, 0xc2, 0x1e, 0x93, 0xf9, 0xe5, 0x5e, 0xa6, 0x5e, 0xfd } +, + /* Prime q */ + 96, + { 0xd2, 0x00, 0xd4, 0x5e, 0x78, 0x8a, 0xac, 0xea, 0x60, 0x6a, 0x40, 0x1d, 0x04, 0x60, 0xf8, 0x7d, 0xd5, 0xc1, 0x02, 0x7e, 0x12, 0xdc, 0x1a, 0x0d, 0x75, 0x86, 0xe8, 0x93, 0x9d, 0x9c, 0xf7, 0x89, 0xb4, 0x0f, 0x51, 0xac, 0x04, 0x42, 0x96, 0x1d, 0xe7, 0xd2, 0x1c, 0xc2, 0x1e, 0x05, 0xc8, 0x31, 0x55, 0xc1, 0xf2, 0xaa, 0x91, 0x93, 0x38, 0x7c, 0xfd, 0xf9, 0x56, 0xcb, 0x48, 0xd1, 0x53, 0xba, 0x27, 0x04, 0x06, 0xf9, 0xbb, 0xba, 0x53, 0x7d, 0x49, 0x87, 0xd9, 0xe2, 0xf9, 0x94, 0x2d, 0x7a, 0x14, 0xcb, 0xff, 0xfe, 0xa7, 0x4f, 0xec, 0xdd, 0xa9, 0x28, 0xd2, 0x3e, 0x25, 0x9f, 0x5e, 0xe1 } +, + /* p's CRT exponent dP */ + 96, + { 0xdb, 0x16, 0x80, 0x2f, 0x79, 0xa2, 0xf0, 0xd4, 0x5f, 0x35, 0x8d, 0x69, 0xfd, 0x33, 0xe4, 0x4b, 0x81, 0xfa, 0xe8, 0x28, 0x62, 0x2e, 0x93, 0xa5, 0x42, 0x53, 0xe9, 0x97, 0xd0, 0x1b, 0x07, 0x43, 0x75, 0x9d, 0xa0, 0xe8, 0x12, 0xb4, 0xaa, 0x4e, 0x6c, 0x8b, 0xea, 0xb2, 0x32, 0x8d, 0x54, 0x31, 0x95, 0x5a, 0x41, 0x8a, 0x67, 0xff, 0x26, 0xa8, 0xc5, 0xc8, 0x07, 0xa5, 0xda, 0x35, 0x4e, 0x05, 0xef, 0x31, 0xcc, 0x8c, 0xf7, 0x58, 0xf4, 0x63, 0x73, 0x29, 0x50, 0xb0, 0x3e, 0x26, 0x57, 0x26, 0xfb, 0x94, 0xe3, 0x9d, 0x6a, 0x57, 0x2a, 0x26, 0x24, 0x4a, 0xb0, 0x8d, 0xb7, 0x57, 0x52, 0xad } +, + /* q's CRT exponent dQ */ + 96, + { 0xa0, 0xa3, 0x17, 0xcf, 0xe7, 0xdf, 0x14, 0x23, 0xf8, 0x7a, 0x6d, 0xee, 0x84, 0x51, 0xf4, 0xe2, 0xb4, 0xa6, 0x7e, 0x54, 0x97, 0xf2, 0x9b, 0x4f, 0x1e, 0x4e, 0x83, 0x0b, 0x9f, 0xad, 0xd9, 0x40, 0x11, 0x67, 0x02, 0x6f, 0x55, 0x96, 0xe5, 0xa3, 0x9c, 0x97, 0x81, 0x7e, 0x0f, 0x5f, 0x16, 0xe2, 0x7e, 0x19, 0xec, 0x99, 0x02, 0xe0, 0x1d, 0x7e, 0xa6, 0xfb, 0x9a, 0xa3, 0xc7, 0x60, 0xaf, 0xee, 0x1e, 0x38, 0x1b, 0x69, 0xde, 0x6a, 0xc9, 0xc0, 0x75, 0x85, 0xa0, 0x6a, 0xd9, 0xc4, 0xba, 0x00, 0xbf, 0x75, 0xc8, 0xad, 0x2f, 0xa8, 0x98, 0xa4, 0x79, 0xe8, 0x0a, 0xe2, 0x94, 0xfe, 0xd2, 0xa1 } +, + /* CRT coefficient qInv */ + 96, + { 0x0b, 0x21, 0xf3, 0x35, 0xc3, 0x53, 0x34, 0x2e, 0xb4, 0x4c, 0x3a, 0xa2, 0x44, 0x45, 0x78, 0x0c, 0x2d, 0x65, 0x5b, 0x94, 0x01, 0x74, 0xca, 0xe3, 0x8c, 0x7c, 0x8a, 0x4e, 0x64, 0x93, 0xc0, 0xba, 0x9f, 0xd3, 0x03, 0x74, 0x82, 0x67, 0xb0, 0x83, 0xb9, 0xa7, 0xa6, 0xcb, 0x61, 0xe4, 0x2d, 0xb3, 0x62, 0xb8, 0xc9, 0x89, 0x6d, 0xb7, 0x06, 0x4e, 0x02, 0xad, 0x5a, 0xe6, 0x15, 0x87, 0xda, 0x15, 0xb4, 0x64, 0x9c, 0x90, 0x59, 0x49, 0x09, 0xfe, 0xb3, 0x7d, 0xbc, 0xb6, 0x54, 0xbe, 0xb7, 0x26, 0x8e, 0xc8, 0x01, 0xe5, 0xa8, 0xb4, 0xaa, 0x39, 0x11, 0xbe, 0xbd, 0x88, 0x54, 0x2f, 0x05, 0xbe } + +} +, +{{ + "RSAES-OAEP Encryption Example 9.1", + /* Message to be encrypted */ + 61, + { 0xf7, 0x35, 0xfd, 0x55, 0xba, 0x92, 0x59, 0x2c, 0x3b, 0x52, 0xb8, 0xf9, 0xc4, 0xf6, 0x9a, 0xaa, 0x1c, 0xbe, 0xf8, 0xfe, 0x88, 0xad, 0xd0, 0x95, 0x59, 0x54, 0x12, 0x46, 0x7f, 0x9c, 0xf4, 0xec, 0x0b, 0x89, 0x6c, 0x59, 0xed, 0xa1, 0x62, 0x10, 0xe7, 0x54, 0x9c, 0x8a, 0xbb, 0x10, 0xcd, 0xbc, 0x21, 0xa1, 0x2e, 0xc9, 0xb6, 0xb5, 0xb8, 0xfd, 0x2f, 0x10, 0x39, 0x9e, 0xb6 } +, + /* Seed */ + 20, + { 0x8e, 0xc9, 0x65, 0xf1, 0x34, 0xa3, 0xec, 0x99, 0x31, 0xe9, 0x2a, 0x1c, 0xa0, 0xdc, 0x81, 0x69, 0xd5, 0xea, 0x70, 0x5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9f, 0x6e, 0x68, 0x2e, 0x3d, 0x17, 0xc8, 0xcd, 0x12, 0x61, 0xfa, 0x72 } + +} +, +#ifdef LTC_TEST_EXT +{ + "RSAES-OAEP Encryption Example 9.2", + /* Message to be encrypted */ + 39, + { 0x81, 0xb9, 0x06, 0x60, 0x50, 0x15, 0xa6, 0x3a, 0xab, 0xe4, 0x2d, 0xdf, 0x11, 0xe1, 0x97, 0x89, 0x12, 0xf5, 0x40, 0x4c, 0x74, 0x74, 0xb2, 0x6d, 0xce, 0x3e, 0xd4, 0x82, 0xbf, 0x96, 0x1e, 0xcc, 0x81, 0x8b, 0xf4, 0x20, 0xc5, 0x46, 0x59 } +, + /* Seed */ + 20, + { 0xec, 0xb1, 0xb8, 0xb2, 0x5f, 0xa5, 0x0c, 0xda, 0xb0, 0x8e, 0x56, 0x04, 0x28, 0x67, 0xf4, 0xaf, 0x58, 0x26, 0xd1, 0x6c } +, + /* Encryption */ + 192, + { 0x93, 0xac, 0x9f, 0x06, 0x71, 0xec, 0x29, 0xac, 0xbb, 0x44, 0x4e, 0xff, 0xc1, 0xa5, 0x74, 0x13, 0x51, 0xd6, 0x0f, 0xdb, 0x0e, 0x39, 0x3f, 0xbf, 0x75, 0x4a, 0xcf, 0x0d, 0xe4, 0x97, 0x61, 0xa1, 0x48, 0x41, 0xdf, 0x77, 0x72, 0xe9, 0xbc, 0x82, 0x77, 0x39, 0x66, 0xa1, 0x58, 0x4c, 0x4d, 0x72, 0xba, 0xea, 0x00, 0x11, 0x8f, 0x83, 0xf3, 0x5c, 0xca, 0x6e, 0x53, 0x7c, 0xbd, 0x4d, 0x81, 0x1f, 0x55, 0x83, 0xb2, 0x97, 0x83, 0xd8, 0xa6, 0xd9, 0x4c, 0xd3, 0x1b, 0xe7, 0x0d, 0x6f, 0x52, 0x6c, 0x10, 0xff, 0x09, 0xc6, 0xfa, 0x7c, 0xe0, 0x69, 0x79, 0x5a, 0x3f, 0xcd, 0x05, 0x11, 0xfd, 0x5f, 0xcb, 0x56, 0x4b, 0xcc, 0x80, 0xea, 0x9c, 0x78, 0xf3, 0x8b, 0x80, 0x01, 0x25, 0x39, 0xd8, 0xa4, 0xdd, 0xf6, 0xfe, 0x81, 0xe9, 0xcd, 0xdb, 0x7f, 0x50, 0xdb, 0xbb, 0xbc, 0xc7, 0xe5, 0xd8, 0x60, 0x97, 0xcc, 0xf4, 0xec, 0x49, 0x18, 0x9f, 0xb8, 0xbf, 0x31, 0x8b, 0xe6, 0xd5, 0xa0, 0x71, 0x5d, 0x51, 0x6b, 0x49, 0xaf, 0x19, 0x12, 0x58, 0xcd, 0x32, 0xdc, 0x83, 0x3c, 0xe6, 0xeb, 0x46, 0x73, 0xc0, 0x3a, 0x19, 0xbb, 0xac, 0xe8, 0x8c, 0xc5, 0x48, 0x95, 0xf6, 0x36, 0xcc, 0x0c, 0x1e, 0xc8, 0x90, 0x96, 0xd1, 0x1c, 0xe2, 0x35, 0xa2, 0x65, 0xca, 0x17, 0x64, 0x23, 0x2a, 0x68, 0x9a, 0xe8 } + +} +, +{ + "RSAES-OAEP Encryption Example 9.3", + /* Message to be encrypted */ + 17, + { 0xfd, 0x32, 0x64, 0x29, 0xdf, 0x9b, 0x89, 0x0e, 0x09, 0xb5, 0x4b, 0x18, 0xb8, 0xf3, 0x4f, 0x1e, 0x24 } +, + /* Seed */ + 20, + { 0xe8, 0x9b, 0xb0, 0x32, 0xc6, 0xce, 0x62, 0x2c, 0xbd, 0xb5, 0x3b, 0xc9, 0x46, 0x60, 0x14, 0xea, 0x77, 0xf7, 0x77, 0xc0 } +, + /* Encryption */ + 192, + { 0x81, 0xeb, 0xdd, 0x95, 0x05, 0x4b, 0x0c, 0x82, 0x2e, 0xf9, 0xad, 0x76, 0x93, 0xf5, 0xa8, 0x7a, 0xdf, 0xb4, 0xb4, 0xc4, 0xce, 0x70, 0xdf, 0x2d, 0xf8, 0x4e, 0xd4, 0x9c, 0x04, 0xda, 0x58, 0xba, 0x5f, 0xc2, 0x0a, 0x19, 0xe1, 0xa6, 0xe8, 0xb7, 0xa3, 0x90, 0x0b, 0x22, 0x79, 0x6d, 0xc4, 0xe8, 0x69, 0xee, 0x6b, 0x42, 0x79, 0x2d, 0x15, 0xa8, 0xec, 0xeb, 0x56, 0xc0, 0x9c, 0x69, 0x91, 0x4e, 0x81, 0x3c, 0xea, 0x8f, 0x69, 0x31, 0xe4, 0xb8, 0xed, 0x6f, 0x42, 0x1a, 0xf2, 0x98, 0xd5, 0x95, 0xc9, 0x7f, 0x47, 0x89, 0xc7, 0xca, 0xa6, 0x12, 0xc7, 0xef, 0x36, 0x09, 0x84, 0xc2, 0x1b, 0x93, 0xed, 0xc5, 0x40, 0x10, 0x68, 0xb5, 0xaf, 0x4c, 0x78, 0xa8, 0x77, 0x1b, 0x98, 0x4d, 0x53, 0xb8, 0xea, 0x8a, 0xdf, 0x2f, 0x6a, 0x7d, 0x4a, 0x0b, 0xa7, 0x6c, 0x75, 0xe1, 0xdd, 0x9f, 0x65, 0x8f, 0x20, 0xde, 0xd4, 0xa4, 0x60, 0x71, 0xd4, 0x6d, 0x77, 0x91, 0xb5, 0x68, 0x03, 0xd8, 0xfe, 0xa7, 0xf0, 0xb0, 0xf8, 0xe4, 0x1a, 0xe3, 0xf0, 0x93, 0x83, 0xa6, 0xf9, 0x58, 0x5f, 0xe7, 0x75, 0x3e, 0xaa, 0xff, 0xd2, 0xbf, 0x94, 0x56, 0x31, 0x08, 0xbe, 0xec, 0xc2, 0x07, 0xbb, 0xb5, 0x35, 0xf5, 0xfc, 0xc7, 0x05, 0xf0, 0xdd, 0xe9, 0xf7, 0x08, 0xc6, 0x2f, 0x49, 0xa9, 0xc9, 0x03, 0x71, 0xd3 } + +} +, +{ + "RSAES-OAEP Encryption Example 9.4", + /* Message to be encrypted */ + 62, + { 0xf1, 0x45, 0x9b, 0x5f, 0x0c, 0x92, 0xf0, 0x1a, 0x0f, 0x72, 0x3a, 0x2e, 0x56, 0x62, 0x48, 0x4d, 0x8f, 0x8c, 0x0a, 0x20, 0xfc, 0x29, 0xda, 0xd6, 0xac, 0xd4, 0x3b, 0xb5, 0xf3, 0xef, 0xfd, 0xf4, 0xe1, 0xb6, 0x3e, 0x07, 0xfd, 0xfe, 0x66, 0x28, 0xd0, 0xd7, 0x4c, 0xa1, 0x9b, 0xf2, 0xd6, 0x9e, 0x4a, 0x0a, 0xbf, 0x86, 0xd2, 0x93, 0x92, 0x5a, 0x79, 0x67, 0x72, 0xf8, 0x08, 0x8e } +, + /* Seed */ + 20, + { 0x60, 0x6f, 0x3b, 0x99, 0xc0, 0xb9, 0xcc, 0xd7, 0x71, 0xea, 0xa2, 0x9e, 0xa0, 0xe4, 0xc8, 0x84, 0xf3, 0x18, 0x9c, 0xcc } +, + /* Encryption */ + 192, + { 0xbc, 0xc3, 0x5f, 0x94, 0xcd, 0xe6, 0x6c, 0xb1, 0x13, 0x66, 0x25, 0xd6, 0x25, 0xb9, 0x44, 0x32, 0xa3, 0x5b, 0x22, 0xf3, 0xd2, 0xfa, 0x11, 0xa6, 0x13, 0xff, 0x0f, 0xca, 0x5b, 0xd5, 0x7f, 0x87, 0xb9, 0x02, 0xcc, 0xdc, 0x1c, 0xd0, 0xae, 0xbc, 0xb0, 0x71, 0x5e, 0xe8, 0x69, 0xd1, 0xd1, 0xfe, 0x39, 0x5f, 0x67, 0x93, 0x00, 0x3f, 0x5e, 0xca, 0x46, 0x50, 0x59, 0xc8, 0x86, 0x60, 0xd4, 0x46, 0xff, 0x5f, 0x08, 0x18, 0x55, 0x20, 0x22, 0x55, 0x7e, 0x38, 0xc0, 0x8a, 0x67, 0xea, 0xd9, 0x91, 0x26, 0x22, 0x54, 0xf1, 0x06, 0x82, 0x97, 0x5e, 0xc5, 0x63, 0x97, 0x76, 0x85, 0x37, 0xf4, 0x97, 0x7a, 0xf6, 0xd5, 0xf6, 0xaa, 0xce, 0xb7, 0xfb, 0x25, 0xde, 0xc5, 0x93, 0x72, 0x30, 0x23, 0x1f, 0xd8, 0x97, 0x8a, 0xf4, 0x91, 0x19, 0xa2, 0x9f, 0x29, 0xe4, 0x24, 0xab, 0x82, 0x72, 0xb4, 0x75, 0x62, 0x79, 0x2d, 0x5c, 0x94, 0xf7, 0x74, 0xb8, 0x82, 0x9d, 0x0b, 0x0d, 0x9f, 0x1a, 0x8c, 0x9e, 0xdd, 0xf3, 0x75, 0x74, 0xd5, 0xfa, 0x24, 0x8e, 0xef, 0xa9, 0xc5, 0x27, 0x1f, 0xc5, 0xec, 0x25, 0x79, 0xc8, 0x1b, 0xdd, 0x61, 0xb4, 0x10, 0xfa, 0x61, 0xfe, 0x36, 0xe4, 0x24, 0x22, 0x1c, 0x11, 0x3a, 0xdd, 0xb2, 0x75, 0x66, 0x4c, 0x80, 0x1d, 0x34, 0xca, 0x8c, 0x63, 0x51, 0xe4, 0xa8, 0x58 } + +} +, +{ + "RSAES-OAEP Encryption Example 9.5", + /* Message to be encrypted */ + 53, + { 0x53, 0xe6, 0xe8, 0xc7, 0x29, 0xd6, 0xf9, 0xc3, 0x19, 0xdd, 0x31, 0x7e, 0x74, 0xb0, 0xdb, 0x8e, 0x4c, 0xcc, 0xa2, 0x5f, 0x3c, 0x83, 0x05, 0x74, 0x6e, 0x13, 0x7a, 0xc6, 0x3a, 0x63, 0xef, 0x37, 0x39, 0xe7, 0xb5, 0x95, 0xab, 0xb9, 0x6e, 0x8d, 0x55, 0xe5, 0x4f, 0x7b, 0xd4, 0x1a, 0xb4, 0x33, 0x37, 0x8f, 0xfb, 0x91, 0x1d } +, + /* Seed */ + 20, + { 0xfc, 0xbc, 0x42, 0x14, 0x02, 0xe9, 0xec, 0xab, 0xc6, 0x08, 0x2a, 0xfa, 0x40, 0xba, 0x5f, 0x26, 0x52, 0x2c, 0x84, 0x0e } +, + /* Encryption */ + 192, + { 0x23, 0x2a, 0xfb, 0xc9, 0x27, 0xfa, 0x08, 0xc2, 0xf6, 0xa2, 0x7b, 0x87, 0xd4, 0xa5, 0xcb, 0x09, 0xc0, 0x7d, 0xc2, 0x6f, 0xae, 0x73, 0xd7, 0x3a, 0x90, 0x55, 0x88, 0x39, 0xf4, 0xfd, 0x66, 0xd2, 0x81, 0xb8, 0x7e, 0xc7, 0x34, 0xbc, 0xe2, 0x37, 0xba, 0x16, 0x66, 0x98, 0xed, 0x82, 0x91, 0x06, 0xa7, 0xde, 0x69, 0x42, 0xcd, 0x6c, 0xdc, 0xe7, 0x8f, 0xed, 0x8d, 0x2e, 0x4d, 0x81, 0x42, 0x8e, 0x66, 0x49, 0x0d, 0x03, 0x62, 0x64, 0xce, 0xf9, 0x2a, 0xf9, 0x41, 0xd3, 0xe3, 0x50, 0x55, 0xfe, 0x39, 0x81, 0xe1, 0x4d, 0x29, 0xcb, 0xb9, 0xa4, 0xf6, 0x74, 0x73, 0x06, 0x3b, 0xae, 0xc7, 0x9a, 0x11, 0x79, 0xf5, 0xa1, 0x7c, 0x9c, 0x18, 0x32, 0xf2, 0x83, 0x8f, 0xd7, 0xd5, 0xe5, 0x9b, 0xb9, 0x65, 0x9d, 0x56, 0xdc, 0xe8, 0xa0, 0x19, 0xed, 0xef, 0x1b, 0xb3, 0xac, 0xcc, 0x69, 0x7c, 0xc6, 0xcc, 0x7a, 0x77, 0x8f, 0x60, 0xa0, 0x64, 0xc7, 0xf6, 0xf5, 0xd5, 0x29, 0xc6, 0x21, 0x02, 0x62, 0xe0, 0x03, 0xde, 0x58, 0x3e, 0x81, 0xe3, 0x16, 0x7b, 0x89, 0x97, 0x1f, 0xb8, 0xc0, 0xe1, 0x5d, 0x44, 0xff, 0xfe, 0xf8, 0x9b, 0x53, 0xd8, 0xd6, 0x4d, 0xd7, 0x97, 0xd1, 0x59, 0xb5, 0x6d, 0x2b, 0x08, 0xea, 0x53, 0x07, 0xea, 0x12, 0xc2, 0x41, 0xbd, 0x58, 0xd4, 0xee, 0x27, 0x8a, 0x1f, 0x2e } + +} +, +{ + "RSAES-OAEP Encryption Example 9.6", + /* Message to be encrypted */ + 11, + { 0xb6, 0xb2, 0x8e, 0xa2, 0x19, 0x8d, 0x0c, 0x10, 0x08, 0xbc, 0x64 } +, + /* Seed */ + 20, + { 0x23, 0xaa, 0xde, 0x0e, 0x1e, 0x08, 0xbb, 0x9b, 0x9a, 0x78, 0xd2, 0x30, 0x2a, 0x52, 0xf9, 0xc2, 0x1b, 0x2e, 0x1b, 0xa2 } +, + /* Encryption */ + 192, + { 0x43, 0x8c, 0xc7, 0xdc, 0x08, 0xa6, 0x8d, 0xa2, 0x49, 0xe4, 0x25, 0x05, 0xf8, 0x57, 0x3b, 0xa6, 0x0e, 0x2c, 0x27, 0x73, 0xd5, 0xb2, 0x90, 0xf4, 0xcf, 0x9d, 0xff, 0x71, 0x8e, 0x84, 0x20, 0x81, 0xc3, 0x83, 0xe6, 0x70, 0x24, 0xa0, 0xf2, 0x95, 0x94, 0xea, 0x98, 0x7b, 0x9d, 0x25, 0xe4, 0xb7, 0x38, 0xf2, 0x85, 0x97, 0x0d, 0x19, 0x5a, 0xbb, 0x3a, 0x8c, 0x80, 0x54, 0xe3, 0xd7, 0x9d, 0x6b, 0x9c, 0x9a, 0x83, 0x27, 0xba, 0x59, 0x6f, 0x12, 0x59, 0xe2, 0x71, 0x26, 0x67, 0x47, 0x66, 0x90, 0x7d, 0x8d, 0x58, 0x2f, 0xf3, 0xa8, 0x47, 0x61, 0x54, 0x92, 0x9a, 0xdb, 0x1e, 0x6d, 0x12, 0x35, 0xb2, 0xcc, 0xb4, 0xec, 0x8f, 0x66, 0x3b, 0xa9, 0xcc, 0x67, 0x0a, 0x92, 0xbe, 0xbd, 0x85, 0x3c, 0x8d, 0xbf, 0x69, 0xc6, 0x43, 0x6d, 0x01, 0x6f, 0x61, 0xad, 0xd8, 0x36, 0xe9, 0x47, 0x32, 0x45, 0x04, 0x34, 0x20, 0x7f, 0x9f, 0xd4, 0xc4, 0x3d, 0xec, 0x2a, 0x12, 0xa9, 0x58, 0xef, 0xa0, 0x1e, 0xfe, 0x26, 0x69, 0x89, 0x9b, 0x5e, 0x60, 0x4c, 0x25, 0x5c, 0x55, 0xfb, 0x71, 0x66, 0xde, 0x55, 0x89, 0xe3, 0x69, 0x59, 0x7b, 0xb0, 0x91, 0x68, 0xc0, 0x6d, 0xd5, 0xdb, 0x17, 0x7e, 0x06, 0xa1, 0x74, 0x0e, 0xb2, 0xd5, 0xc8, 0x2f, 0xae, 0xca, 0x6d, 0x92, 0xfc, 0xee, 0x99, 0x31, 0xba, 0x9f } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 10: A 2048-bit RSA Key Pair", +{ + /* RSA modulus n */ + 256, + { 0xae, 0x45, 0xed, 0x56, 0x01, 0xce, 0xc6, 0xb8, 0xcc, 0x05, 0xf8, 0x03, 0x93, 0x5c, 0x67, 0x4d, 0xdb, 0xe0, 0xd7, 0x5c, 0x4c, 0x09, 0xfd, 0x79, 0x51, 0xfc, 0x6b, 0x0c, 0xae, 0xc3, 0x13, 0xa8, 0xdf, 0x39, 0x97, 0x0c, 0x51, 0x8b, 0xff, 0xba, 0x5e, 0xd6, 0x8f, 0x3f, 0x0d, 0x7f, 0x22, 0xa4, 0x02, 0x9d, 0x41, 0x3f, 0x1a, 0xe0, 0x7e, 0x4e, 0xbe, 0x9e, 0x41, 0x77, 0xce, 0x23, 0xe7, 0xf5, 0x40, 0x4b, 0x56, 0x9e, 0x4e, 0xe1, 0xbd, 0xcf, 0x3c, 0x1f, 0xb0, 0x3e, 0xf1, 0x13, 0x80, 0x2d, 0x4f, 0x85, 0x5e, 0xb9, 0xb5, 0x13, 0x4b, 0x5a, 0x7c, 0x80, 0x85, 0xad, 0xca, 0xe6, 0xfa, 0x2f, 0xa1, 0x41, 0x7e, 0xc3, 0x76, 0x3b, 0xe1, 0x71, 0xb0, 0xc6, 0x2b, 0x76, 0x0e, 0xde, 0x23, 0xc1, 0x2a, 0xd9, 0x2b, 0x98, 0x08, 0x84, 0xc6, 0x41, 0xf5, 0xa8, 0xfa, 0xc2, 0x6b, 0xda, 0xd4, 0xa0, 0x33, 0x81, 0xa2, 0x2f, 0xe1, 0xb7, 0x54, 0x88, 0x50, 0x94, 0xc8, 0x25, 0x06, 0xd4, 0x01, 0x9a, 0x53, 0x5a, 0x28, 0x6a, 0xfe, 0xb2, 0x71, 0xbb, 0x9b, 0xa5, 0x92, 0xde, 0x18, 0xdc, 0xf6, 0x00, 0xc2, 0xae, 0xea, 0xe5, 0x6e, 0x02, 0xf7, 0xcf, 0x79, 0xfc, 0x14, 0xcf, 0x3b, 0xdc, 0x7c, 0xd8, 0x4f, 0xeb, 0xbb, 0xf9, 0x50, 0xca, 0x90, 0x30, 0x4b, 0x22, 0x19, 0xa7, 0xaa, 0x06, 0x3a, 0xef, 0xa2, 0xc3, 0xc1, 0x98, 0x0e, 0x56, 0x0c, 0xd6, 0x4a, 0xfe, 0x77, 0x95, 0x85, 0xb6, 0x10, 0x76, 0x57, 0xb9, 0x57, 0x85, 0x7e, 0xfd, 0xe6, 0x01, 0x09, 0x88, 0xab, 0x7d, 0xe4, 0x17, 0xfc, 0x88, 0xd8, 0xf3, 0x84, 0xc4, 0xe6, 0xe7, 0x2c, 0x3f, 0x94, 0x3e, 0x0c, 0x31, 0xc0, 0xc4, 0xa5, 0xcc, 0x36, 0xf8, 0x79, 0xd8, 0xa3, 0xac, 0x9d, 0x7d, 0x59, 0x86, 0x0e, 0xaa, 0xda, 0x6b, 0x83, 0xbb } +, + /* RSA public exponent e */ + 3, + { 0x01, 0x00, 0x01 } +, + /* RSA private exponent d */ + 256, + { 0x05, 0x6b, 0x04, 0x21, 0x6f, 0xe5, 0xf3, 0x54, 0xac, 0x77, 0x25, 0x0a, 0x4b, 0x6b, 0x0c, 0x85, 0x25, 0xa8, 0x5c, 0x59, 0xb0, 0xbd, 0x80, 0xc5, 0x64, 0x50, 0xa2, 0x2d, 0x5f, 0x43, 0x8e, 0x59, 0x6a, 0x33, 0x3a, 0xa8, 0x75, 0xe2, 0x91, 0xdd, 0x43, 0xf4, 0x8c, 0xb8, 0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0x9c, 0x1c, 0x3b, 0xf3, 0xa4, 0x83, 0xe7, 0x27, 0x40, 0x54, 0xe1, 0x5e, 0x97, 0x07, 0x50, 0x36, 0xe9, 0x89, 0xf6, 0x09, 0x32, 0x80, 0x7b, 0x52, 0x57, 0x75, 0x1e, 0x79 } +, + /* Prime p */ + 128, + { 0xec, 0xf5, 0xae, 0xcd, 0x1e, 0x55, 0x15, 0xff, 0xfa, 0xcb, 0xd7, 0x5a, 0x28, 0x16, 0xc6, 0xeb, 0xf4, 0x90, 0x18, 0xcd, 0xfb, 0x46, 0x38, 0xe1, 0x85, 0xd6, 0x6a, 0x73, 0x96, 0xb6, 0xf8, 0x09, 0x0f, 0x80, 0x18, 0xc7, 0xfd, 0x95, 0xcc, 0x34, 0xb8, 0x57, 0xdc, 0x17, 0xf0, 0xcc, 0x65, 0x16, 0xbb, 0x13, 0x46, 0xab, 0x4d, 0x58, 0x2c, 0xad, 0xad, 0x7b, 0x41, 0x03, 0x35, 0x23, 0x87, 0xb7, 0x03, 0x38, 0xd0, 0x84, 0x04, 0x7c, 0x9d, 0x95, 0x39, 0xb6, 0x49, 0x62, 0x04, 0xb3, 0xdd, 0x6e, 0xa4, 0x42, 0x49, 0x92, 0x07, 0xbe, 0xc0, 0x1f, 0x96, 0x42, 0x87, 0xff, 0x63, 0x36, 0xc3, 0x98, 0x46, 0x58, 0x33, 0x68, 0x46, 0xf5, 0x6e, 0x46, 0x86, 0x18, 0x81, 0xc1, 0x02, 0x33, 0xd2, 0x17, 0x6b, 0xf1, 0x5a, 0x5e, 0x96, 0xdd, 0xc7, 0x80, 0xbc, 0x86, 0x8a, 0xa7, 0x7d, 0x3c, 0xe7, 0x69 } +, + /* Prime q */ + 128, + { 0xbc, 0x46, 0xc4, 0x64, 0xfc, 0x6a, 0xc4, 0xca, 0x78, 0x3b, 0x0e, 0xb0, 0x8a, 0x3c, 0x84, 0x1b, 0x77, 0x2f, 0x7e, 0x9b, 0x2f, 0x28, 0xba, 0xbd, 0x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, 0x49 } +, + /* CRT coefficient qInv */ + 128, + { 0x6f, 0x38, 0x52, 0x6b, 0x39, 0x25, 0x08, 0x55, 0x34, 0xef, 0x3e, 0x41, 0x5a, 0x83, 0x6e, 0xde, 0x8b, 0x86, 0x15, 0x8a, 0x2c, 0x7c, 0xbf, 0xec, 0xcb, 0x0b, 0xd8, 0x34, 0x30, 0x4f, 0xec, 0x68, 0x3b, 0xa8, 0xd4, 0xf4, 0x79, 0xc4, 0x33, 0xd4, 0x34, 0x16, 0xe6, 0x32, 0x69, 0x62, 0x3c, 0xea, 0x10, 0x07, 0x76, 0xd8, 0x5a, 0xff, 0x40, 0x1d, 0x3f, 0xff, 0x61, 0x0e, 0xe6, 0x54, 0x11, 0xce, 0x3b, 0x13, 0x63, 0xd6, 0x3a, 0x97, 0x09, 0xee, 0xde, 0x42, 0x64, 0x7c, 0xea, 0x56, 0x14, 0x93, 0xd5, 0x45, 0x70, 0xa8, 0x79, 0xc1, 0x86, 0x82, 0xcd, 0x97, 0x71, 0x0b, 0x96, 0x20, 0x5e, 0xc3, 0x11, 0x17, 0xd7, 0x3b, 0x5f, 0x36, 0x22, 0x3f, 0xad, 0xd6, 0xe8, 0xba, 0x90, 0xdd, 0x7c, 0x0e, 0xe6, 0x1d, 0x44, 0xe1, 0x63, 0x25, 0x1e, 0x20, 0xc7, 0xf6, 0x6e, 0xb3, 0x05, 0x11, 0x7c, 0xb8 } + +} +, +{{ + "RSAES-OAEP Encryption Example 10.1", + /* Message to be encrypted */ + 28, + { 0x8b, 0xba, 0x6b, 0xf8, 0x2a, 0x6c, 0x0f, 0x86, 0xd5, 0xf1, 0x75, 0x6e, 0x97, 0x95, 0x68, 0x70, 0xb0, 0x89, 0x53, 0xb0, 0x6b, 0x4e, 0xb2, 0x05, 0xbc, 0x16, 0x94, 0xee } +, + /* Seed */ + 20, + { 0x47, 0xe1, 0xab, 0x71, 0x19, 0xfe, 0xe5, 0x6c, 0x95, 0xee, 0x5e, 0xaa, 0xd8, 0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 0x62, 0x93, 0xc6, 0xb3, 0x4d, 0x3f, 0x75, 0xd3, 0x2f, 0x21, 0x3d, 0xd4, 0x5c, 0x62, 0x73, 0xd5, 0x05, 0xad, 0xf4, 0xcc, 0xed, 0x10, 0x57, 0xcb, 0x75, 0x8f, 0xc2, 0x6a, 0xee, 0xfa, 0x44, 0x12, 0x55, 0xed, 0x4e, 0x64, 0xc1, 0x99, 0xee, 0x07, 0x5e, 0x7f, 0x16, 0x64, 0x61, 0x82, 0xfd, 0xb4, 0x64, 0x73, 0x9b, 0x68, 0xab, 0x5d, 0xaf, 0xf0, 0xe6, 0x3e, 0x95, 0x52, 0x01, 0x68, 0x24, 0xf0, 0x54, 0xbf, 0x4d, 0x3c, 0x8c, 0x90, 0xa9, 0x7b, 0xb6, 0xb6, 0x55, 0x32, 0x84, 0xeb, 0x42, 0x9f, 0xcc } + +} +, +#ifdef LTC_TEST_EXT +{ + "RSAES-OAEP Encryption Example 10.2", + /* Message to be encrypted */ + 16, + { 0xe6, 0xad, 0x18, 0x1f, 0x05, 0x3b, 0x58, 0xa9, 0x04, 0xf2, 0x45, 0x75, 0x10, 0x37, 0x3e, 0x57 } +, + /* Seed */ + 20, + { 0x6d, 0x17, 0xf5, 0xb4, 0xc1, 0xff, 0xac, 0x35, 0x1d, 0x19, 0x5b, 0xf7, 0xb0, 0x9d, 0x09, 0xf0, 0x9a, 0x40, 0x79, 0xcf } +, + /* Encryption */ + 256, + { 0xa2, 0xb1, 0xa4, 0x30, 0xa9, 0xd6, 0x57, 0xe2, 0xfa, 0x1c, 0x2b, 0xb5, 0xed, 0x43, 0xff, 0xb2, 0x5c, 0x05, 0xa3, 0x08, 0xfe, 0x90, 0x93, 0xc0, 0x10, 0x31, 0x79, 0x5f, 0x58, 0x74, 0x40, 0x01, 0x10, 0x82, 0x8a, 0xe5, 0x8f, 0xb9, 0xb5, 0x81, 0xce, 0x9d, 0xdd, 0xd3, 0xe5, 0x49, 0xae, 0x04, 0xa0, 0x98, 0x54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x01, 0x45, 0x03, 0x05, 0x77, 0x87, 0x58, 0xb0, 0x53, 0x8b, 0xf8, 0xb5, 0xbb, 0x14, 0x4a, 0x82, 0x8e, 0x62, 0x97, 0x95 } + +} +, +{ + "RSAES-OAEP Encryption Example 10.3", + /* Message to be encrypted */ + 26, + { 0x51, 0x0a, 0x2c, 0xf6, 0x0e, 0x86, 0x6f, 0xa2, 0x34, 0x05, 0x53, 0xc9, 0x4e, 0xa3, 0x9f, 0xbc, 0x25, 0x63, 0x11, 0xe8, 0x3e, 0x94, 0x45, 0x4b, 0x41, 0x24 } +, + /* Seed */ + 20, + { 0x38, 0x53, 0x87, 0x51, 0x4d, 0xec, 0xcc, 0x7c, 0x74, 0x0d, 0xd8, 0xcd, 0xf9, 0xda, 0xee, 0x49, 0xa1, 0xcb, 0xfd, 0x54 } +, + /* Encryption */ + 256, + { 0x98, 0x86, 0xc3, 0xe6, 0x76, 0x4a, 0x8b, 0x9a, 0x84, 0xe8, 0x41, 0x48, 0xeb, 0xd8, 0xc3, 0xb1, 0xaa, 0x80, 0x50, 0x38, 0x1a, 0x78, 0xf6, 0x68, 0x71, 0x4c, 0x16, 0xd9, 0xcf, 0xd2, 0xa6, 0xed, 0xc5, 0x69, 0x79, 0xc5, 0x35, 0xd9, 0xde, 0xe3, 0xb4, 0x4b, 0x85, 0xc1, 0x8b, 0xe8, 0x92, 0x89, 0x92, 0x37, 0x17, 0x11, 0x47, 0x22, 0x16, 0xd9, 0x5d, 0xda, 0x98, 0xd2, 0xee, 0x83, 0x47, 0xc9, 0xb1, 0x4d, 0xff, 0xdf, 0xf8, 0x4a, 0xa4, 0x8d, 0x25, 0xac, 0x06, 0xf7, 0xd7, 0xe6, 0x53, 0x98, 0xac, 0x96, 0x7b, 0x1c, 0xe9, 0x09, 0x25, 0xf6, 0x7d, 0xce, 0x04, 0x9b, 0x7f, 0x81, 0x2d, 0xb0, 0x74, 0x29, 0x97, 0xa7, 0x4d, 0x44, 0xfe, 0x81, 0xdb, 0xe0, 0xe7, 0xa3, 0xfe, 0xaf, 0x2e, 0x5c, 0x40, 0xaf, 0x88, 0x8d, 0x55, 0x0d, 0xdb, 0xbe, 0x3b, 0xc2, 0x06, 0x57, 0xa2, 0x95, 0x43, 0xf8, 0xfc, 0x29, 0x13, 0xb9, 0xbd, 0x1a, 0x61, 0xb2, 0xab, 0x22, 0x56, 0xec, 0x40, 0x9b, 0xbd, 0x7d, 0xc0, 0xd1, 0x77, 0x17, 0xea, 0x25, 0xc4, 0x3f, 0x42, 0xed, 0x27, 0xdf, 0x87, 0x38, 0xbf, 0x4a, 0xfc, 0x67, 0x66, 0xff, 0x7a, 0xff, 0x08, 0x59, 0x55, 0x5e, 0xe2, 0x83, 0x92, 0x0f, 0x4c, 0x8a, 0x63, 0xc4, 0xa7, 0x34, 0x0c, 0xba, 0xfd, 0xdc, 0x33, 0x9e, 0xcd, 0xb4, 0xb0, 0x51, 0x50, 0x02, 0xf9, 0x6c, 0x93, 0x2b, 0x5b, 0x79, 0x16, 0x7a, 0xf6, 0x99, 0xc0, 0xad, 0x3f, 0xcc, 0xfd, 0xf0, 0xf4, 0x4e, 0x85, 0xa7, 0x02, 0x62, 0xbf, 0x2e, 0x18, 0xfe, 0x34, 0xb8, 0x50, 0x58, 0x99, 0x75, 0xe8, 0x67, 0xff, 0x96, 0x9d, 0x48, 0xea, 0xbf, 0x21, 0x22, 0x71, 0x54, 0x6c, 0xdc, 0x05, 0xa6, 0x9e, 0xcb, 0x52, 0x6e, 0x52, 0x87, 0x0c, 0x83, 0x6f, 0x30, 0x7b, 0xd7, 0x98, 0x78, 0x0e, 0xde } + +} +, +{ + "RSAES-OAEP Encryption Example 10.4", + /* Message to be encrypted */ + 36, + { 0xbc, 0xdd, 0x19, 0x0d, 0xa3, 0xb7, 0xd3, 0x00, 0xdf, 0x9a, 0x06, 0xe2, 0x2c, 0xaa, 0xe2, 0xa7, 0x5f, 0x10, 0xc9, 0x1f, 0xf6, 0x67, 0xb7, 0xc1, 0x6b, 0xde, 0x8b, 0x53, 0x06, 0x4a, 0x26, 0x49, 0xa9, 0x40, 0x45, 0xc9 } +, + /* Seed */ + 20, + { 0x5c, 0xac, 0xa6, 0xa0, 0xf7, 0x64, 0x16, 0x1a, 0x96, 0x84, 0xf8, 0x5d, 0x92, 0xb6, 0xe0, 0xef, 0x37, 0xca, 0x8b, 0x65 } +, + /* Encryption */ + 256, + { 0x63, 0x18, 0xe9, 0xfb, 0x5c, 0x0d, 0x05, 0xe5, 0x30, 0x7e, 0x16, 0x83, 0x43, 0x6e, 0x90, 0x32, 0x93, 0xac, 0x46, 0x42, 0x35, 0x8a, 0xaa, 0x22, 0x3d, 0x71, 0x63, 0x01, 0x3a, 0xba, 0x87, 0xe2, 0xdf, 0xda, 0x8e, 0x60, 0xc6, 0x86, 0x0e, 0x29, 0xa1, 0xe9, 0x26, 0x86, 0x16, 0x3e, 0xa0, 0xb9, 0x17, 0x5f, 0x32, 0x9c, 0xa3, 0xb1, 0x31, 0xa1, 0xed, 0xd3, 0xa7, 0x77, 0x59, 0xa8, 0xb9, 0x7b, 0xad, 0x6a, 0x4f, 0x8f, 0x43, 0x96, 0xf2, 0x8c, 0xf6, 0xf3, 0x9c, 0xa5, 0x81, 0x12, 0xe4, 0x81, 0x60, 0xd6, 0xe2, 0x03, 0xda, 0xa5, 0x85, 0x6f, 0x3a, 0xca, 0x5f, 0xfe, 0xd5, 0x77, 0xaf, 0x49, 0x94, 0x08, 0xe3, 0xdf, 0xd2, 0x33, 0xe3, 0xe6, 0x04, 0xdb, 0xe3, 0x4a, 0x9c, 0x4c, 0x90, 0x82, 0xde, 0x65, 0x52, 0x7c, 0xac, 0x63, 0x31, 0xd2, 0x9d, 0xc8, 0x0e, 0x05, 0x08, 0xa0, 0xfa, 0x71, 0x22, 0xe7, 0xf3, 0x29, 0xf6, 0xcc, 0xa5, 0xcf, 0xa3, 0x4d, 0x4d, 0x1d, 0xa4, 0x17, 0x80, 0x54, 0x57, 0xe0, 0x08, 0xbe, 0xc5, 0x49, 0xe4, 0x78, 0xff, 0x9e, 0x12, 0xa7, 0x63, 0xc4, 0x77, 0xd1, 0x5b, 0xbb, 0x78, 0xf5, 0xb6, 0x9b, 0xd5, 0x78, 0x30, 0xfc, 0x2c, 0x4e, 0xd6, 0x86, 0xd7, 0x9b, 0xc7, 0x2a, 0x95, 0xd8, 0x5f, 0x88, 0x13, 0x4c, 0x6b, 0x0a, 0xfe, 0x56, 0xa8, 0xcc, 0xfb, 0xc8, 0x55, 0x82, 0x8b, 0xb3, 0x39, 0xbd, 0x17, 0x90, 0x9c, 0xf1, 0xd7, 0x0d, 0xe3, 0x33, 0x5a, 0xe0, 0x70, 0x39, 0x09, 0x3e, 0x60, 0x6d, 0x65, 0x53, 0x65, 0xde, 0x65, 0x50, 0xb8, 0x72, 0xcd, 0x6d, 0xe1, 0xd4, 0x40, 0xee, 0x03, 0x1b, 0x61, 0x94, 0x5f, 0x62, 0x9a, 0xd8, 0xa3, 0x53, 0xb0, 0xd4, 0x09, 0x39, 0xe9, 0x6a, 0x3c, 0x45, 0x0d, 0x2a, 0x8d, 0x5e, 0xee, 0x9f, 0x67, 0x80, 0x93, 0xc8 } + +} +, +{ + "RSAES-OAEP Encryption Example 10.5", + /* Message to be encrypted */ + 23, + { 0xa7, 0xdd, 0x6c, 0x7d, 0xc2, 0x4b, 0x46, 0xf9, 0xdd, 0x5f, 0x1e, 0x91, 0xad, 0xa4, 0xc3, 0xb3, 0xdf, 0x94, 0x7e, 0x87, 0x72, 0x32, 0xa9 } +, + /* Seed */ + 20, + { 0x95, 0xbc, 0xa9, 0xe3, 0x85, 0x98, 0x94, 0xb3, 0xdd, 0x86, 0x9f, 0xa7, 0xec, 0xd5, 0xbb, 0xc6, 0x40, 0x1b, 0xf3, 0xe4 } +, + /* Encryption */ + 256, + { 0x75, 0x29, 0x08, 0x72, 0xcc, 0xfd, 0x4a, 0x45, 0x05, 0x66, 0x0d, 0x65, 0x1f, 0x56, 0xda, 0x6d, 0x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 0xd9, 0xea, 0xf3, 0x59, 0x57, 0x75, 0x4d, 0xbf, 0x4b, 0xfe, 0xa5, 0x21, 0x6a, 0xa1, 0x84, 0x4d, 0xc5, 0x07, 0xcb, 0x2d, 0x08, 0x0e, 0x72, 0x2e, 0xba, 0x15, 0x03, 0x08, 0xc2, 0xb5, 0xff, 0x11, 0x93, 0x62, 0x0f, 0x17, 0x66, 0xec, 0xf4, 0x48, 0x1b, 0xaf, 0xb9, 0x43, 0xbd, 0x29, 0x28, 0x77, 0xf2, 0x13, 0x6c, 0xa4, 0x94, 0xab, 0xa0 } + +} +, +{ + "RSAES-OAEP Encryption Example 10.6", + /* Message to be encrypted */ + 45, + { 0xea, 0xf1, 0xa7, 0x3a, 0x1b, 0x0c, 0x46, 0x09, 0x53, 0x7d, 0xe6, 0x9c, 0xd9, 0x22, 0x8b, 0xbc, 0xfb, 0x9a, 0x8c, 0xa8, 0xc6, 0xc3, 0xef, 0xaf, 0x05, 0x6f, 0xe4, 0xa7, 0xf4, 0x63, 0x4e, 0xd0, 0x0b, 0x7c, 0x39, 0xec, 0x69, 0x22, 0xd7, 0xb8, 0xea, 0x2c, 0x04, 0xeb, 0xac } +, + /* Seed */ + 20, + { 0x9f, 0x47, 0xdd, 0xf4, 0x2e, 0x97, 0xee, 0xa8, 0x56, 0xa9, 0xbd, 0xbc, 0x71, 0x4e, 0xb3, 0xac, 0x22, 0xf6, 0xeb, 0x32 } +, + /* Encryption */ + 256, + { 0x2d, 0x20, 0x7a, 0x73, 0x43, 0x2a, 0x8f, 0xb4, 0xc0, 0x30, 0x51, 0xb3, 0xf7, 0x3b, 0x28, 0xa6, 0x17, 0x64, 0x09, 0x8d, 0xfa, 0x34, 0xc4, 0x7a, 0x20, 0x99, 0x5f, 0x81, 0x15, 0xaa, 0x68, 0x16, 0x67, 0x9b, 0x55, 0x7e, 0x82, 0xdb, 0xee, 0x58, 0x49, 0x08, 0xc6, 0xe6, 0x97, 0x82, 0xd7, 0xde, 0xb3, 0x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0xc8, 0x27, 0x2c, 0x82, 0xd1, 0xb6, 0x2a, 0xb9, 0x14, 0xe1, 0xc6, 0x9f, 0x6a, 0xf6, 0xef, 0x30, 0xca, 0x52, 0x60, 0xdb, 0x4a, 0x46 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +}; + diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/rsa-testvectors/oaep-vect.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/notes/rsa-testvectors/oaep-vect.txt Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,2212 @@ +========================= +TEST VECTORS FOR RSA-OAEP +========================= + +# This file contains test vectors for the +# RSAES-OAEP encryption scheme as defined in +# PKCS #1 v2.1. 10 RSA keys of different sizes +# have been generated. For each key, 6 random +# messages of length between 1 and 64 octets +# have been RSAES-OAEP encrypted via a random +# seed of length 20 octets. +# +# The underlying hash function is SHA-1; the +# mask generation function is MGF1 with SHA-1 +# as specified in PKCS #1 v2.1. +# +# Integers are represented by strings of octets +# with the leftmost octet being the most +# significant octet. For example, +# +# 9,202,000 = (0x)8c 69 50. +# +# Key lengths: +# +# Key 1: 1024 bits +# Key 2: 1025 bits +# Key 3: 1026 bits +# Key 4: 1027 bits +# Key 5: 1028 bits +# Key 6: 1029 bits +# Key 7: 1030 bits +# Key 8: 1031 bits +# Key 9: 1536 bits +# Key 10: 2048 bits +# ============================================= + +# ================================== +# Example 1: A 1024-bit RSA Key Pair +# ================================== + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +a8 b3 b2 84 af 8e b5 0b 38 70 34 a8 60 f1 46 c4 +91 9f 31 87 63 cd 6c 55 98 c8 ae 48 11 a1 e0 ab +c4 c7 e0 b0 82 d6 93 a5 e7 fc ed 67 5c f4 66 85 +12 77 2c 0c bc 64 a7 42 c6 c6 30 f5 33 c8 cc 72 +f6 2a e8 33 c4 0b f2 58 42 e9 84 bb 78 bd bf 97 +c0 10 7d 55 bd b6 62 f5 c4 e0 fa b9 84 5c b5 14 +8e f7 39 2d d3 aa ff 93 ae 1e 6b 66 7b b3 d4 24 +76 16 d4 f5 ba 10 d4 cf d2 26 de 88 d3 9f 16 fb + +# RSA public exponent e: +01 00 01 + +# RSA private exponent d: +53 33 9c fd b7 9f c8 46 6a 65 5c 73 16 ac a8 5c +55 fd 8f 6d d8 98 fd af 11 95 17 ef 4f 52 e8 fd +8e 25 8d f9 3f ee 18 0f a0 e4 ab 29 69 3c d8 3b +15 2a 55 3d 4a c4 d1 81 2b 8b 9f a5 af 0e 7f 55 +fe 73 04 df 41 57 09 26 f3 31 1f 15 c4 d6 5a 73 +2c 48 31 16 ee 3d 3d 2d 0a f3 54 9a d9 bf 7c bf +b7 8a d8 84 f8 4d 5b eb 04 72 4d c7 36 9b 31 de +f3 7d 0c f5 39 e9 cf cd d3 de 65 37 29 ea d5 d1 + +# Prime p: +d3 27 37 e7 26 7f fe 13 41 b2 d5 c0 d1 50 a8 1b +58 6f b3 13 2b ed 2f 8d 52 62 86 4a 9c b9 f3 0a +f3 8b e4 48 59 8d 41 3a 17 2e fb 80 2c 21 ac f1 +c1 1c 52 0c 2f 26 a4 71 dc ad 21 2e ac 7c a3 9d + +# Prime q: +cc 88 53 d1 d5 4d a6 30 fa c0 04 f4 71 f2 81 c7 +b8 98 2d 82 24 a4 90 ed be b3 3d 3e 3d 5c c9 3c +47 65 70 3d 1d d7 91 64 2f 1f 11 6a 0d d8 52 be +24 19 b2 af 72 bf e9 a0 30 e8 60 b0 28 8b 5d 77 + +# p's CRT exponent dP: +0e 12 bf 17 18 e9 ce f5 59 9b a1 c3 88 2f e8 04 +6a 90 87 4e ef ce 8f 2c cc 20 e4 f2 74 1f b0 a3 +3a 38 48 ae c9 c9 30 5f be cb d2 d7 68 19 96 7d +46 71 ac c6 43 1e 40 37 96 8d b3 78 78 e6 95 c1 + +# q's CRT exponent dQ: +95 29 7b 0f 95 a2 fa 67 d0 07 07 d6 09 df d4 fc +05 c8 9d af c2 ef 6d 6e a5 5b ec 77 1e a3 33 73 +4d 92 51 e7 90 82 ec da 86 6e fe f1 3c 45 9e 1a +63 13 86 b7 e3 54 c8 99 f5 f1 12 ca 85 d7 15 83 + +# CRT coefficient qInv: +4f 45 6c 50 24 93 bd c0 ed 2a b7 56 a3 a6 ed 4d +67 35 2a 69 7d 42 16 e9 32 12 b1 27 a6 3d 54 11 +ce 6f a9 8d 5d be fd 73 26 3e 37 28 14 27 43 81 +81 66 ed 7d d6 36 87 dd 2a 8c a1 d2 f4 fb d8 e1 + +# --------------------------------- +# RSAES-OAEP Encryption Example 1.1 +# --------------------------------- + +# Message to be encrypted: +66 28 19 4e 12 07 3d b0 3b a9 4c da 9e f9 53 23 +97 d5 0d ba 79 b9 87 00 4a fe fe 34 + +# Seed: +18 b7 76 ea 21 06 9d 69 77 6a 33 e9 6b ad 48 e1 +dd a0 a5 ef + +# Encryption: +35 4f e6 7b 4a 12 6d 5d 35 fe 36 c7 77 79 1a 3f +7b a1 3d ef 48 4e 2d 39 08 af f7 22 fa d4 68 fb +21 69 6d e9 5d 0b e9 11 c2 d3 17 4f 8a fc c2 01 +03 5f 7b 6d 8e 69 40 2d e5 45 16 18 c2 1a 53 5f +a9 d7 bf c5 b8 dd 9f c2 43 f8 cf 92 7d b3 13 22 +d6 e8 81 ea a9 1a 99 61 70 e6 57 a0 5a 26 64 26 +d9 8c 88 00 3f 84 77 c1 22 70 94 a0 d9 fa 1e 8c +40 24 30 9c e1 ec cc b5 21 00 35 d4 7a c7 2e 8a + +# --------------------------------- +# RSAES-OAEP Encryption Example 1.2 +# --------------------------------- + +# Message to be encrypted: +75 0c 40 47 f5 47 e8 e4 14 11 85 65 23 29 8a c9 +ba e2 45 ef af 13 97 fb e5 6f 9d d5 + +# Seed: +0c c7 42 ce 4a 9b 7f 32 f9 51 bc b2 51 ef d9 25 +fe 4f e3 5f + +# Encryption: +64 0d b1 ac c5 8e 05 68 fe 54 07 e5 f9 b7 01 df +f8 c3 c9 1e 71 6c 53 6f c7 fc ec 6c b5 b7 1c 11 +65 98 8d 4a 27 9e 15 77 d7 30 fc 7a 29 93 2e 3f +00 c8 15 15 23 6d 8d 8e 31 01 7a 7a 09 df 43 52 +d9 04 cd eb 79 aa 58 3a dc c3 1e a6 98 a4 c0 52 +83 da ba 90 89 be 54 91 f6 7c 1a 4e e4 8d c7 4b +bb e6 64 3a ef 84 66 79 b4 cb 39 5a 35 2d 5e d1 +15 91 2d f6 96 ff e0 70 29 32 94 6d 71 49 2b 44 + +# --------------------------------- +# RSAES-OAEP Encryption Example 1.3 +# --------------------------------- + +# Message to be encrypted: +d9 4a e0 83 2e 64 45 ce 42 33 1c b0 6d 53 1a 82 +b1 db 4b aa d3 0f 74 6d c9 16 df 24 d4 e3 c2 45 +1f ff 59 a6 42 3e b0 e1 d0 2d 4f e6 46 cf 69 9d +fd 81 8c 6e 97 b0 51 + +# Seed: +25 14 df 46 95 75 5a 67 b2 88 ea f4 90 5c 36 ee +c6 6f d2 fd + +# Encryption: +42 37 36 ed 03 5f 60 26 af 27 6c 35 c0 b3 74 1b +36 5e 5f 76 ca 09 1b 4e 8c 29 e2 f0 be fe e6 03 +59 5a a8 32 2d 60 2d 2e 62 5e 95 eb 81 b2 f1 c9 +72 4e 82 2e ca 76 db 86 18 cf 09 c5 34 35 03 a4 +36 08 35 b5 90 3b c6 37 e3 87 9f b0 5e 0e f3 26 +85 d5 ae c5 06 7c d7 cc 96 fe 4b 26 70 b6 ea c3 +06 6b 1f cf 56 86 b6 85 89 aa fb 7d 62 9b 02 d8 +f8 62 5c a3 83 36 24 d4 80 0f b0 81 b1 cf 94 eb + +# --------------------------------- +# RSAES-OAEP Encryption Example 1.4 +# --------------------------------- + +# Message to be encrypted: +52 e6 50 d9 8e 7f 2a 04 8b 4f 86 85 21 53 b9 7e +01 dd 31 6f 34 6a 19 f6 7a 85 + +# Seed: +c4 43 5a 3e 1a 18 a6 8b 68 20 43 62 90 a3 7c ef +b8 5d b3 fb + +# Encryption: +45 ea d4 ca 55 1e 66 2c 98 00 f1 ac a8 28 3b 05 +25 e6 ab ae 30 be 4b 4a ba 76 2f a4 0f d3 d3 8e +22 ab ef c6 97 94 f6 eb bb c0 5d db b1 12 16 24 +7d 2f 41 2f d0 fb a8 7c 6e 3a cd 88 88 13 64 6f +d0 e4 8e 78 52 04 f9 c3 f7 3d 6d 82 39 56 27 22 +dd dd 87 71 fe c4 8b 83 a3 1e e6 f5 92 c4 cf d4 +bc 88 17 4f 3b 13 a1 12 aa e3 b9 f7 b8 0e 0f c6 +f7 25 5b a8 80 dc 7d 80 21 e2 2a d6 a8 5f 07 55 + +# --------------------------------- +# RSAES-OAEP Encryption Example 1.5 +# --------------------------------- + +# Message to be encrypted: +8d a8 9f d9 e5 f9 74 a2 9f ef fb 46 2b 49 18 0f +6c f9 e8 02 + +# Seed: +b3 18 c4 2d f3 be 0f 83 fe a8 23 f5 a7 b4 7e d5 +e4 25 a3 b5 + +# Encryption: +36 f6 e3 4d 94 a8 d3 4d aa cb a3 3a 21 39 d0 0a +d8 5a 93 45 a8 60 51 e7 30 71 62 00 56 b9 20 e2 +19 00 58 55 a2 13 a0 f2 38 97 cd cd 73 1b 45 25 +7c 77 7f e9 08 20 2b ef dd 0b 58 38 6b 12 44 ea +0c f5 39 a0 5d 5d 10 32 9d a4 4e 13 03 0f d7 60 +dc d6 44 cf ef 20 94 d1 91 0d 3f 43 3e 1c 7c 6d +d1 8b c1 f2 df 7f 64 3d 66 2f b9 dd 37 ea d9 05 +91 90 f4 fa 66 ca 39 e8 69 c4 eb 44 9c bd c4 39 + +# --------------------------------- +# RSAES-OAEP Encryption Example 1.6 +# --------------------------------- + +# Message to be encrypted: +26 52 10 50 84 42 71 + +# Seed: +e4 ec 09 82 c2 33 6f 3a 67 7f 6a 35 61 74 eb 0c +e8 87 ab c2 + +# Encryption: +42 ce e2 61 7b 1e ce a4 db 3f 48 29 38 6f bd 61 +da fb f0 38 e1 80 d8 37 c9 63 66 df 24 c0 97 b4 +ab 0f ac 6b df 59 0d 82 1c 9f 10 64 2e 68 1a d0 +5b 8d 78 b3 78 c0 f4 6c e2 fa d6 3f 74 e0 ad 3d +f0 6b 07 5d 7e b5 f5 63 6f 8d 40 3b 90 59 ca 76 +1b 5c 62 bb 52 aa 45 00 2e a7 0b aa ce 08 de d2 +43 b9 d8 cb d6 2a 68 ad e2 65 83 2b 56 56 4e 43 +a6 fa 42 ed 19 9a 09 97 69 74 2d f1 53 9e 82 55 + +# ============================================= + +# ================================== +# Example 2: A 1025-bit RSA Key Pair +# ================================== + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +01 94 7c 7f ce 90 42 5f 47 27 9e 70 85 1f 25 d5 +e6 23 16 fe 8a 1d f1 93 71 e3 e6 28 e2 60 54 3e +49 01 ef 60 81 f6 8c 0b 81 41 19 0d 2a e8 da ba +7d 12 50 ec 6d b6 36 e9 44 ec 37 22 87 7c 7c 1d +0a 67 f1 4b 16 94 c5 f0 37 94 51 a4 3e 49 a3 2d +de 83 67 0b 73 da 91 a1 c9 9b c2 3b 43 6a 60 05 +5c 61 0f 0b af 99 c1 a0 79 56 5b 95 a3 f1 52 66 +32 d1 d4 da 60 f2 0e da 25 e6 53 c4 f0 02 76 6f +45 + +# RSA public exponent e: +01 00 01 + +# RSA private exponent d: +08 23 f2 0f ad b5 da 89 08 8a 9d 00 89 3e 21 fa +4a 1b 11 fb c9 3c 64 a3 be 0b aa ea 97 fb 3b 93 +c3 ff 71 37 04 c1 9c 96 3c 1d 10 7a ae 99 05 47 +39 f7 9e 02 e1 86 de 86 f8 7a 6d de fe a6 d8 cc +d1 d3 c8 1a 47 bf a7 25 5b e2 06 01 a4 a4 b2 f0 +8a 16 7b 5e 27 9d 71 5b 1b 45 5b dd 7e ab 24 59 +41 d9 76 8b 9a ce fb 3c cd a5 95 2d a3 ce e7 25 +25 b4 50 16 63 a8 ee 15 c9 e9 92 d9 24 62 fe 39 + +# Prime p: +01 59 db de 04 a3 3e f0 6f b6 08 b8 0b 19 0f 4d +3e 22 bc c1 3a c8 e4 a0 81 03 3a bf a4 16 ed b0 +b3 38 aa 08 b5 73 09 ea 5a 52 40 e7 dc 6e 54 37 +8c 69 41 4c 31 d9 7d db 1f 40 6d b3 76 9c c4 1a +43 + +# Prime q: +01 2b 65 2f 30 40 3b 38 b4 09 95 fd 6f f4 1a 1a +cc 8a da 70 37 32 36 b7 20 2d 39 b2 ee 30 cf b4 +6d b0 95 11 f6 f3 07 cc 61 cc 21 60 6c 18 a7 5b +8a 62 f8 22 df 03 1b a0 df 0d af d5 50 6f 56 8b +d7 + +# p's CRT exponent dP: +43 6e f5 08 de 73 65 19 c2 da 4c 58 0d 98 c8 2c +b7 45 2a 3f b5 ef ad c3 b9 c7 78 9a 1b c6 58 4f +79 5a dd bb d3 24 39 c7 46 86 55 2e cb 6c 2c 30 +7a 4d 3a f7 f5 39 ee c1 57 24 8c 7b 31 f1 a2 55 + +# q's CRT exponent dQ: +01 2b 15 a8 9f 3d fb 2b 39 07 3e 73 f0 2b dd 0c +1a 7b 37 9d d4 35 f0 5c dd e2 ef f9 e4 62 94 8b +7c ec 62 ee 90 50 d5 e0 81 6e 07 85 a8 56 b4 91 +08 dc b7 5f 36 83 87 4d 1c a6 32 9a 19 01 30 66 +ff + +# CRT coefficient qInv: +02 70 db 17 d5 91 4b 01 8d 76 11 8b 24 38 9a 73 +50 ec 83 6b 00 63 a2 17 21 23 6f d8 ed b6 d8 9b +51 e7 ee b8 7b 61 1b 71 32 cb 7e a7 35 6c 23 15 +1c 1e 77 51 50 7c 78 6d 9e e1 79 41 70 a8 c8 e8 + +# --------------------------------- +# RSAES-OAEP Encryption Example 2.1 +# --------------------------------- + +# Message to be encrypted: +8f f0 0c aa 60 5c 70 28 30 63 4d 9a 6c 3d 42 c6 +52 b5 8c f1 d9 2f ec 57 0b ee e7 + +# Seed: +8c 40 7b 5e c2 89 9e 50 99 c5 3e 8c e7 93 bf 94 +e7 1b 17 82 + +# Encryption: +01 81 af 89 22 b9 fc b4 d7 9d 92 eb e1 98 15 99 +2f c0 c1 43 9d 8b cd 49 13 98 a0 f4 ad 3a 32 9a +5b d9 38 55 60 db 53 26 83 c8 b7 da 04 e4 b1 2a +ed 6a ac df 47 1c 34 c9 cd a8 91 ad dc c2 df 34 +56 65 3a a6 38 2e 9a e5 9b 54 45 52 57 eb 09 9d +56 2b be 10 45 3f 2b 6d 13 c5 9c 02 e1 0f 1f 8a +bb 5d a0 d0 57 09 32 da cf 2d 09 01 db 72 9d 0f +ef cc 05 4e 70 96 8e a5 40 c8 1b 04 bc ae fe 72 +0e + +# --------------------------------- +# RSAES-OAEP Encryption Example 2.2 +# --------------------------------- + +# Message to be encrypted: +2d + +# Seed: +b6 00 cf 3c 2e 50 6d 7f 16 77 8c 91 0d 3a 8b 00 +3e ee 61 d5 + +# Encryption: +01 87 59 ff 1d f6 3b 27 92 41 05 62 31 44 16 a8 +ae af 2a c6 34 b4 6f 94 0a b8 2d 64 db f1 65 ee +e3 30 11 da 74 9d 4b ab 6e 2f cd 18 12 9c 9e 49 +27 7d 84 53 11 2b 42 9a 22 2a 84 71 b0 70 99 39 +98 e7 58 86 1c 4d 3f 6d 74 9d 91 c4 29 0d 33 2c +7a 4a b3 f7 ea 35 ff 3a 07 d4 97 c9 55 ff 0f fc +95 00 6b 62 c6 d2 96 81 0d 9b fa b0 24 19 6c 79 +34 01 2c 2d f9 78 ef 29 9a ba 23 99 40 cb a1 02 +45 + +# --------------------------------- +# RSAES-OAEP Encryption Example 2.3 +# --------------------------------- + +# Message to be encrypted: +74 fc 88 c5 1b c9 0f 77 af 9d 5e 9a 4a 70 13 3d +4b 4e 0b 34 da 3c 37 c7 ef 8e + +# Seed: +a7 37 68 ae ea a9 1f 9d 8c 1e d6 f9 d2 b6 34 67 +f0 7c ca e3 + +# Encryption: +01 88 02 ba b0 4c 60 32 5e 81 c4 96 23 11 f2 be +7c 2a dc e9 30 41 a0 07 19 c8 8f 95 75 75 f2 c7 +9f 1b 7b c8 ce d1 15 c7 06 b3 11 c0 8a 2d 98 6c +a3 b6 a9 33 6b 14 7c 29 c6 f2 29 40 9d de c6 51 +bd 1f dd 5a 0b 7f 61 0c 99 37 fd b4 a3 a7 62 36 +4b 8b 32 06 b4 ea 48 5f d0 98 d0 8f 63 d4 aa 8b +b2 69 7d 02 7b 75 0c 32 d7 f7 4e af 51 80 d2 e9 +b6 6b 17 cb 2f a5 55 23 bc 28 0d a1 0d 14 be 20 +53 + +# --------------------------------- +# RSAES-OAEP Encryption Example 2.4 +# --------------------------------- + +# Message to be encrypted: +a7 eb 2a 50 36 93 1d 27 d4 e8 91 32 6d 99 69 2f +fa dd a9 bf 7e fd 3e 34 e6 22 c4 ad c0 85 f7 21 +df e8 85 07 2c 78 a2 03 b1 51 73 9b e5 40 fa 8c +15 3a 10 f0 0a + +# Seed: +9a 7b 3b 0e 70 8b d9 6f 81 90 ec ab 4f b9 b2 b3 +80 5a 81 56 + +# Encryption: +00 a4 57 8c bc 17 63 18 a6 38 fb a7 d0 1d f1 57 +46 af 44 d4 f6 cd 96 d7 e7 c4 95 cb f4 25 b0 9c +64 9d 32 bf 88 6d a4 8f ba f9 89 a2 11 71 87 ca +fb 1f b5 80 31 76 90 e3 cc d4 46 92 0b 7a f8 2b +31 db 58 04 d8 7d 01 51 4a cb fa 91 56 e7 82 f8 +67 f6 be d9 44 9e 0e 9a 2c 09 bc ec c6 aa 08 76 +36 96 5e 34 b3 ec 76 6f 2f e2 e4 30 18 a2 fd de +b1 40 61 6a 0e 9d 82 e5 33 10 24 ee 06 52 fc 76 +41 + +# --------------------------------- +# RSAES-OAEP Encryption Example 2.5 +# --------------------------------- + +# Message to be encrypted: +2e f2 b0 66 f8 54 c3 3f 3b dc bb 59 94 a4 35 e7 +3d 6c 6c + +# Seed: +eb 3c eb bc 4a dc 16 bb 48 e8 8c 8a ec 0e 34 af +7f 42 7f d3 + +# Encryption: +00 eb c5 f5 fd a7 7c fd ad 3c 83 64 1a 90 25 e7 +7d 72 d8 a6 fb 33 a8 10 f5 95 0f 8d 74 c7 3e 8d +93 1e 86 34 d8 6a b1 24 62 56 ae 07 b6 00 5b 71 +b7 f2 fb 98 35 12 18 33 1c e6 9b 8f fb dc 9d a0 +8b bc 9c 70 4f 87 6d eb 9d f9 fc 2e c0 65 ca d8 +7f 90 90 b0 7a cc 17 aa 7f 99 7b 27 ac a4 88 06 +e8 97 f7 71 d9 51 41 fe 45 26 d8 a5 30 1b 67 86 +27 ef ab 70 7f d4 0f be bd 6e 79 2a 25 61 3e 7a +ec + +# --------------------------------- +# RSAES-OAEP Encryption Example 2.6 +# --------------------------------- + +# Message to be encrypted: +8a 7f b3 44 c8 b6 cb 2c f2 ef 1f 64 3f 9a 32 18 +f6 e1 9b ba 89 c0 + +# Seed: +4c 45 cf 4d 57 c9 8e 3d 6d 20 95 ad c5 1c 48 9e +b5 0d ff 84 + +# Encryption: +01 08 39 ec 20 c2 7b 90 52 e5 5b ef b9 b7 7e 6f +c2 6e 90 75 d7 a5 43 78 c6 46 ab df 51 e4 45 bd +57 15 de 81 78 9f 56 f1 80 3d 91 70 76 4a 9e 93 +cb 78 79 86 94 02 3e e7 39 3c e0 4b c5 d8 f8 c5 +a5 2c 17 1d 43 83 7e 3a ca 62 f6 09 eb 0a a5 ff +b0 96 0e f0 41 98 dd 75 4f 57 f7 fb e6 ab f7 65 +cf 11 8b 4c a4 43 b2 3b 5a ab 26 6f 95 23 26 ac +45 81 10 06 44 32 5f 8b 72 1a cd 5d 04 ff 14 ef +3a + +# ============================================= + +# ================================== +# Example 3: A 1026-bit RSA Key Pair +# ================================== + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +02 b5 8f ec 03 9a 86 07 00 a4 d7 b6 46 2f 93 e6 +cd d4 91 16 1d dd 74 f4 e8 10 b4 0e 3c 16 52 00 +6a 5c 27 7b 27 74 c1 13 05 a4 cb ab 5a 78 ef a5 +7e 17 a8 6d f7 a3 fa 36 fc 4b 1d 22 49 f2 2e c7 +c2 dd 6a 46 32 32 ac ce a9 06 d6 6e be 80 b5 70 +4b 10 72 9d a6 f8 33 23 4a bb 5e fd d4 a2 92 cb +fa d3 3b 4d 33 fa 7a 14 b8 c3 97 b5 6e 3a cd 21 +20 34 28 b7 7c df a3 3a 6d a7 06 b3 d8 b0 fc 43 +e9 + +# RSA public exponent e: +01 00 01 + +# RSA private exponent d: +15 b4 8a 5b 56 83 a9 46 70 e2 3b 57 18 f8 14 fa +0e 13 f8 50 38 f5 07 11 18 2c ba 61 51 05 81 f3 +d2 2c 7e 23 2e f9 37 e2 2e 55 1d 68 b8 6e 2f 8c +b1 aa d8 be 2e 48 8f 5d f7 ef d2 79 e3 f5 68 d4 +ea f3 6f 80 cf 71 41 ac e6 0f cc 91 13 fb 6c 4a +84 1f d5 0b bc 7c 51 2f fc be ff 21 48 7a a8 11 +eb 3c a8 c6 20 05 34 6a 86 de 86 bf a1 d8 a9 48 +fd 3f 34 8c 22 ea ad f3 33 c3 ce 6c e1 32 08 fd + +# Prime p: +01 bf 01 d2 16 d7 35 95 cf 02 70 c2 be b7 8d 40 +a0 d8 44 7d 31 da 91 9a 98 3f 7e ea 78 1b 77 d8 +5f e3 71 b3 e9 37 3e 7b 69 21 7d 31 50 a0 2d 89 +58 de 7f ad 9d 55 51 60 95 8b 44 54 12 7e 0e 7e +af + +# Prime q: +01 8d 33 99 65 81 66 db 38 29 81 6d 7b 29 54 16 +75 9e 9c 91 98 7f 5b 2d 8a ec d6 3b 04 b4 8b d7 +b2 fc f2 29 bb 7f 8a 6d c8 8b a1 3d d2 e3 9a d5 +5b 6d 1a 06 16 07 08 f9 70 0b e8 0b 8f d3 74 4c +e7 + +# p's CRT exponent dP: +06 c0 a2 49 d2 0a 6f 2e e7 5c 88 b4 94 d5 3f 6a +ae 99 aa 42 7c 88 c2 8b 16 3a 76 94 45 e5 f3 90 +cf 40 c2 74 fd 6e a6 32 9a 5c e7 c7 ce 03 a2 15 +83 96 ee 2a 78 45 78 6e 09 e2 88 5a 97 28 e4 e5 + +# q's CRT exponent dQ: +d1 d2 7c 29 fe dd 92 d8 6c 34 8e dd 0c cb fa c1 +4f 74 6e 05 1c e1 d1 81 1d f3 5d 61 f2 ee 1c 97 +d4 bf 28 04 80 2f 64 27 18 7b a8 e9 0a 8a f4 42 +43 b4 07 9b 03 44 5e 60 2e 29 fa 51 93 e6 4f e9 + +# CRT coefficient qInv: +8c b2 f7 56 bd 89 41 b1 d3 b7 70 e5 ad 31 ee 37 +3b 28 ac da 69 ff 9b 6f 40 fe 57 8b 9f 1a fb 85 +83 6f 96 27 d3 7a cf f7 3c 27 79 e6 34 bb 26 01 +1c 2c 8f 7f 33 61 ae 2a 9e a6 5e d6 89 e3 63 9a + +# --------------------------------- +# RSAES-OAEP Encryption Example 3.1 +# --------------------------------- + +# Message to be encrypted: +08 78 20 b5 69 e8 fa 8d + +# Seed: +8c ed 6b 19 62 90 80 57 90 e9 09 07 40 15 e6 a2 +0b 0c 48 94 + +# Encryption: +02 6a 04 85 d9 6a eb d9 6b 43 82 08 50 99 b9 62 +e6 a2 bd ec 3d 90 c8 db 62 5e 14 37 2d e8 5e 2d +5b 7b aa b6 5c 8f af 91 bb 55 04 fb 49 5a fc e5 +c9 88 b3 f6 a5 2e 20 e1 d6 cb d3 56 6c 5c d1 f2 +b8 31 8b b5 42 cc 0e a2 5c 4a ab 99 32 af a2 07 +60 ea dd ec 78 43 96 a0 7e a0 ef 24 d4 e6 f4 d3 +7e 50 52 a7 a3 1e 14 6a a4 80 a1 11 bb e9 26 40 +13 07 e0 0f 41 00 33 84 2b 6d 82 fe 5c e4 df ae +80 + +# --------------------------------- +# RSAES-OAEP Encryption Example 3.2 +# --------------------------------- + +# Message to be encrypted: +46 53 ac af 17 19 60 b0 1f 52 a7 be 63 a3 ab 21 +dc 36 8e c4 3b 50 d8 2e c3 78 1e 04 + +# Seed: +b4 29 1d 65 67 55 08 48 cc 15 69 67 c8 09 ba ab +6c a5 07 f0 + +# Encryption: +02 4d b8 9c 78 02 98 9b e0 78 38 47 86 30 84 94 +1b f2 09 d7 61 98 7e 38 f9 7c b5 f6 f1 bc 88 da +72 a5 0b 73 eb af 11 c8 79 c4 f9 5d f3 7b 85 0b +8f 65 d7 62 2e 25 b1 b8 89 e8 0f e8 0b ac a2 06 +9d 6e 0e 1d 82 99 53 fc 45 90 69 de 98 ea 97 98 +b4 51 e5 57 e9 9a bf 8f e3 d9 cc f9 09 6e bb f3 +e5 25 5d 3b 4e 1c 6d 2e ca df 06 7a 35 9e ea 86 +40 5a cd 47 d5 e1 65 51 7c ca fd 47 d6 db ee 4b +f5 + +# --------------------------------- +# RSAES-OAEP Encryption Example 3.3 +# --------------------------------- + +# Message to be encrypted: +d9 4c d0 e0 8f a4 04 ed 89 + +# Seed: +ce 89 28 f6 05 95 58 25 40 08 ba dd 97 94 fa dc +d2 fd 1f 65 + +# Encryption: +02 39 bc e6 81 03 24 41 52 88 77 d6 d1 c8 bb 28 +aa 3b c9 7f 1d f5 84 56 36 18 99 57 97 68 38 44 +ca 86 66 47 32 f4 be d7 a0 aa b0 83 aa ab fb 72 +38 f5 82 e3 09 58 c2 02 4e 44 e5 70 43 b9 79 50 +fd 54 3d a9 77 c9 0c dd e5 33 7d 61 84 42 f9 9e +60 d7 78 3a b5 9c e6 dd 9d 69 c4 7a d1 e9 62 be +c2 2d 05 89 5c ff 8d 3f 64 ed 52 61 d9 2b 26 78 +51 03 93 48 49 90 ba 3f 7f 06 81 8a e6 ff ce 8a +3a + +# --------------------------------- +# RSAES-OAEP Encryption Example 3.4 +# --------------------------------- + +# Message to be encrypted: +6c c6 41 b6 b6 1e 6f 96 39 74 da d2 3a 90 13 28 +4e f1 + +# Seed: +6e 29 79 f5 2d 68 14 a5 7d 83 b0 90 05 48 88 f1 +19 a5 b9 a3 + +# Encryption: +02 99 4c 62 af d7 6f 49 8b a1 fd 2c f6 42 85 7f +ca 81 f4 37 3c b0 8f 1c ba ee 6f 02 5c 3b 51 2b +42 c3 e8 77 91 13 47 66 48 03 9d be 04 93 f9 24 +62 92 fa c2 89 50 60 0e 7c 0f 32 ed f9 c8 1b 9d +ec 45 c3 bd e0 cc 8d 88 47 59 01 69 90 7b 7d c5 +99 1c eb 29 bb 07 14 d6 13 d9 6d f0 f1 2e c5 d8 +d3 50 7c 8e e7 ae 78 dd 83 f2 16 fa 61 de 10 03 +63 ac a4 8a 7e 91 4a e9 f4 2d df be 94 3b 09 d9 +a0 + +# --------------------------------- +# RSAES-OAEP Encryption Example 3.5 +# --------------------------------- + +# Message to be encrypted: +df 51 51 83 2b 61 f4 f2 58 91 fb 41 72 f3 28 d2 +ed df 83 71 ff cf db e9 97 93 92 95 f3 0e ca 69 +18 01 7c fd a1 15 3b f7 a6 af 87 59 32 23 + +# Seed: +2d 76 0b fe 38 c5 9d e3 4c dc 8b 8c 78 a3 8e 66 +28 4a 2d 27 + +# Encryption: +01 62 04 2f f6 96 95 92 a6 16 70 31 81 1a 23 98 +34 ce 63 8a bf 54 fe c8 b9 94 78 12 2a fe 2e e6 +7f 8c 5b 18 b0 33 98 05 bf db c5 a4 e6 72 0b 37 +c5 9c fb a9 42 46 4c 59 7f f5 32 a1 19 82 15 45 +fd 2e 59 b1 14 e6 1d af 71 82 05 29 f5 02 9c f5 +24 95 43 27 c3 4e c5 e6 f5 ba 7e fc c4 de 94 3a +b8 ad 4e d7 87 b1 45 43 29 f7 0d b7 98 a3 a8 f4 +d9 2f 82 74 e2 b2 94 8a de 62 7c e8 ee 33 e4 3c +60 + +# --------------------------------- +# RSAES-OAEP Encryption Example 3.6 +# --------------------------------- + +# Message to be encrypted: +3c 3b ad 89 3c 54 4a 6d 52 0a b0 22 31 91 88 c8 +d5 04 b7 a7 88 b8 50 90 3b 85 97 2e aa 18 55 2e +11 34 a7 ad 60 98 82 62 54 ff 7a b6 72 b3 d8 eb +31 58 fa c6 d4 cb ae f1 + +# Seed: +f1 74 77 9c 5f d3 cf e0 07 ba dc b7 a3 6c 9b 55 +bf cf bf 0e + +# Encryption: +00 11 20 51 e7 5d 06 49 43 bc 44 78 07 5e 43 48 +2f d5 9c ee 06 79 de 68 93 ee c3 a9 43 da a4 90 +b9 69 1c 93 df c0 46 4b 66 23 b9 f3 db d3 e7 00 +83 26 4f 03 4b 37 4f 74 16 4e 1a 00 76 37 25 e5 +74 74 4b a0 b9 db 83 43 4f 31 df 96 f6 e2 a2 6f +6d 8e ba 34 8b d4 68 6c 22 38 ac 07 c3 7a ac 37 +85 d1 c7 ee a2 f8 19 fd 91 49 17 98 ed 8e 9c ef +5e 43 b7 81 b0 e0 27 6e 37 c4 3f f9 49 2d 00 57 +30 + +# ============================================= + +# ================================== +# Example 4: A 1027-bit RSA Key Pair +# ================================== + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +05 12 40 b6 cc 00 04 fa 48 d0 13 46 71 c0 78 c7 +c8 de c3 b3 e2 f2 5b c2 56 44 67 33 9d b3 88 53 +d0 6b 85 ee a5 b2 de 35 3b ff 42 ac 2e 46 bc 97 +fa e6 ac 96 18 da 95 37 a5 c8 f5 53 c1 e3 57 62 +59 91 d6 10 8d cd 78 85 fb 3a 25 41 3f 53 ef ca +d9 48 cb 35 cd 9b 9a e9 c1 c6 76 26 d1 13 d5 7d +de 4c 5b ea 76 bb 5b b7 de 96 c0 0d 07 37 2e 96 +85 a6 d7 5c f9 d2 39 fa 14 8d 70 93 1b 5f 3f b0 +39 + +# RSA public exponent e: +01 00 01 + +# RSA private exponent d: +04 11 ff ca 3b 7c a5 e9 e9 be 7f e3 8a 85 10 5e +35 38 96 db 05 c5 79 6a ec d2 a7 25 16 1e b3 65 +1c 86 29 a9 b8 62 b9 04 d7 b0 c7 b3 7f 8c b5 a1 +c2 b5 40 01 01 8a 00 a1 eb 2c af e4 ee 4e 94 92 +c3 48 bc 2b ed ab 4b 9e bb f0 64 e8 ef f3 22 b9 +00 9f 8e ec 65 39 05 f4 0d f8 8a 3c dc 49 d4 56 +7f 75 62 7d 41 ac a6 24 12 9b 46 a0 b7 c6 98 e5 +e6 5f 2b 7b a1 02 c7 49 a1 01 35 b6 54 0d 04 01 + +# Prime p: +02 74 58 c1 9e c1 63 69 19 e7 36 c9 af 25 d6 09 +a5 1b 8f 56 1d 19 c6 bf 69 43 dd 1e e1 ab 8a 4a +3f 23 21 00 bd 40 b8 8d ec c6 ba 23 55 48 b6 ef +79 2a 11 c9 de 82 3d 0a 79 22 c7 09 5b 6e ba 57 +01 + +# Prime q: +02 10 ee 9b 33 ab 61 71 6e 27 d2 51 bd 46 5f 4b +35 a1 a2 32 e2 da 00 90 1c 29 4b f2 23 50 ce 49 +0d 09 9f 64 2b 53 75 61 2d b6 3b a1 f2 03 86 49 +2b f0 4d 34 b3 c2 2b ce b9 09 d1 34 41 b5 3b 51 +39 + +# p's CRT exponent dP: +39 fa 02 8b 82 6e 88 c1 12 1b 75 0a 8b 24 2f a9 +a3 5c 5b 66 bd fd 1f a6 37 d3 cc 48 a8 4a 4f 45 +7a 19 4e 77 27 e4 9f 7b cc 6e 5a 5a 41 26 57 fc +47 0c 73 22 eb c3 74 16 ef 45 8c 30 7a 8c 09 01 + +# q's CRT exponent dQ: +01 5d 99 a8 41 95 94 39 79 fa 9e 1b e2 c3 c1 b6 +9f 43 2f 46 fd 03 e4 7d 5b ef bb bf d6 b1 d1 37 +1d 83 ef b3 30 a3 e0 20 94 2b 2f ed 11 5e 5d 02 +be 24 fd 92 c9 01 9d 1c ec d6 dd 4c f1 e5 4c c8 +99 + +# CRT coefficient qInv: +01 f0 b7 01 51 70 b3 f5 e4 22 23 ba 30 30 1c 41 +a6 d8 7c bb 70 e3 0c b7 d3 c6 7d 25 47 3d b1 f6 +cb f0 3e 3f 91 26 e3 e9 79 68 27 9a 86 5b 2c 2b +42 65 24 cf c5 2a 68 3d 31 ed 30 eb 98 4b e4 12 +ba + +# --------------------------------- +# RSAES-OAEP Encryption Example 4.1 +# --------------------------------- + +# Message to be encrypted: +4a 86 60 95 34 ee 43 4a 6c bc a3 f7 e9 62 e7 6d +45 5e 32 64 c1 9f 60 5f 6e 5f f6 13 7c 65 c5 6d +7f b3 44 cd 52 bc 93 37 4f 3d 16 6c 9f 0c 6f 9c +50 6b ad 19 33 09 72 d2 + +# Seed: +1c ac 19 ce 99 3d ef 55 f9 82 03 f6 85 28 96 c9 +5c cc a1 f3 + +# Encryption: +04 cc e1 96 14 84 5e 09 41 52 a3 fe 18 e5 4e 33 +30 c4 4e 5e fb c6 4a e1 68 86 cb 18 69 01 4c c5 +78 1b 1f 8f 9e 04 53 84 d0 11 2a 13 5c a0 d1 2e +9c 88 a8 e4 06 34 16 de aa e3 84 4f 60 d6 e9 6f +e1 55 14 5f 45 25 b9 a3 44 31 ca 37 66 18 0f 70 +e1 5a 5e 5d 8e 8b 1a 51 6f f8 70 60 9f 13 f8 96 +93 5c ed 18 82 79 a5 8e d1 3d 07 11 42 77 d7 5c +65 68 60 7e 0a b0 92 fd 80 3a 22 3e 4a 8e e0 b1 +a8 + +# --------------------------------- +# RSAES-OAEP Encryption Example 4.2 +# --------------------------------- + +# Message to be encrypted: +b0 ad c4 f3 fe 11 da 59 ce 99 27 73 d9 05 99 43 +c0 30 46 49 7e e9 d9 f9 a0 6d f1 16 6d b4 6d 98 +f5 8d 27 ec 07 4c 02 ee e6 cb e2 44 9c 8b 9f c5 +08 0c 5c 3f 44 33 09 25 12 ec 46 aa 79 37 43 c8 + +# Seed: +f5 45 d5 89 75 85 e3 db 71 aa 0c b8 da 76 c5 1d +03 2a e9 63 + +# Encryption: +00 97 b6 98 c6 16 56 45 b3 03 48 6f bf 5a 2a 44 +79 c0 ee 85 88 9b 54 1a 6f 0b 85 8d 6b 65 97 b1 +3b 85 4e b4 f8 39 af 03 39 9a 80 d7 9b da 65 78 +c8 41 f9 0d 64 57 15 b2 80 d3 71 43 99 2d d1 86 +c8 0b 94 9b 77 5c ae 97 37 0e 4e c9 74 43 13 6c +6d a4 84 e9 70 ff db 13 23 a2 08 47 82 1d 3b 18 +38 1d e1 3b b4 9a ae a6 65 30 c4 a4 b8 27 1f 3e +ae 17 2c d3 66 e0 7e 66 36 f1 01 9d 2a 28 ae d1 +5e + +# --------------------------------- +# RSAES-OAEP Encryption Example 4.3 +# --------------------------------- + +# Message to be encrypted: +bf 6d 42 e7 01 70 7b 1d 02 06 b0 c8 b4 5a 1c 72 +64 1f f1 28 89 21 9a 82 bd ea 96 5b 5e 79 a9 6b +0d 01 63 ed 9d 57 8e c9 ad a2 0f 2f bc f1 ea 3c +40 89 d8 34 19 ba 81 b0 c6 0f 36 06 da 99 + +# Seed: +ad 99 7f ee f7 30 d6 ea 7b e6 0d 0d c5 2e 72 ea +cb fd d2 75 + +# Encryption: +03 01 f9 35 e9 c4 7a bc b4 8a cb be 09 89 5d 9f +59 71 af 14 83 9d a4 ff 95 41 7e e4 53 d1 fd 77 +31 90 72 bb 72 97 e1 b5 5d 75 61 cd 9d 1b b2 4c +1a 9a 37 c6 19 86 43 08 24 28 04 87 9d 86 eb d0 +01 dc e5 18 39 75 e1 50 69 89 b7 0e 5a 83 43 41 +54 d5 cb fd 6a 24 78 7e 60 eb 0c 65 8d 2a c1 93 +30 2d 11 92 c6 e6 22 d4 a1 2a d4 b5 39 23 bc a2 +46 df 31 c6 39 5e 37 70 2c 6a 78 ae 08 1f b9 d0 +65 + +# --------------------------------- +# RSAES-OAEP Encryption Example 4.4 +# --------------------------------- + +# Message to be encrypted: +fb 2e f1 12 f5 e7 66 eb 94 01 92 97 93 47 94 f7 +be 2f 6f c1 c5 8e + +# Seed: +13 64 54 df 57 30 f7 3c 80 7a 7e 40 d8 c1 a3 12 +ac 5b 9d d3 + +# Encryption: +02 d1 10 ad 30 af b7 27 be b6 91 dd 0c f1 7d 0a +f1 a1 e7 fa 0c c0 40 ec 1a 4b a2 6a 42 c5 9d 0a +79 6a 2e 22 c8 f3 57 cc c9 8b 65 19 ac eb 68 2e +94 5e 62 cb 73 46 14 a5 29 40 7c d4 52 be e3 e4 +4f ec e8 42 3c c1 9e 55 54 8b 8b 99 4b 84 9c 7e +cd e4 93 3e 76 03 7e 1d 0c e4 42 75 b0 87 10 c6 +8e 43 01 30 b9 29 73 0e d7 7e 09 b0 15 64 2c 55 +93 f0 4e 4f fb 94 10 79 81 02 a8 e9 6f fd fe 11 +e4 + +# --------------------------------- +# RSAES-OAEP Encryption Example 4.5 +# --------------------------------- + +# Message to be encrypted: +28 cc d4 47 bb 9e 85 16 6d ab b9 e5 b7 d1 ad ad +c4 b9 d3 9f 20 4e 96 d5 e4 40 ce 9a d9 28 bc 1c +22 84 + +# Seed: +bc a8 05 7f 82 4b 2e a2 57 f2 86 14 07 ee f6 3d +33 20 86 81 + +# Encryption: +00 db b8 a7 43 9d 90 ef d9 19 a3 77 c5 4f ae 8f +e1 1e c5 8c 3b 85 83 62 e2 3a d1 b8 a4 43 10 79 +90 66 b9 93 47 aa 52 56 91 d2 ad c5 8d 9b 06 e3 +4f 28 8c 17 03 90 c5 f0 e1 1c 0a a3 64 59 59 f1 +8e e7 9e 8f 2b e8 d7 ac 5c 23 d0 61 f1 8d d7 4b +8c 5f 2a 58 fc b5 eb 0c 54 f9 9f 01 a8 32 47 56 +82 92 53 65 83 34 09 48 d7 a8 c9 7c 4a cd 1e 98 +d1 e2 9d c3 20 e9 7a 26 05 32 a8 aa 7a 75 8a 1e +c2 + +# --------------------------------- +# RSAES-OAEP Encryption Example 4.6 +# --------------------------------- + +# Message to be encrypted: +f2 22 42 75 1e c6 b1 + +# Seed: +2e 7e 1e 17 f6 47 b5 dd d0 33 e1 54 72 f9 0f 68 +12 f3 ac 4e + +# Encryption: +00 a5 ff a4 76 8c 8b be ca ee 2d b7 7e 8f 2e ec +99 59 59 33 54 55 20 83 5e 5b a7 db 94 93 d3 e1 +7c dd ef e6 a5 f5 67 62 44 71 90 8d b4 e2 d8 3a +0f be e6 06 08 fc 84 04 95 03 b2 23 4a 07 dc 83 +b2 7b 22 84 7a d8 92 0f f4 2f 67 4e f7 9b 76 28 +0b 00 23 3d 2b 51 b8 cb 27 03 a9 d4 2b fb c8 25 +0c 96 ec 32 c0 51 e5 7f 1b 4b a5 28 db 89 c3 7e +4c 54 e2 7e 6e 64 ac 69 63 5a e8 87 d9 54 16 19 +a9 + +# ============================================= + +# ================================== +# Example 5: A 1028-bit RSA Key Pair +# ================================== + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +0a ad f3 f9 c1 25 e5 d8 91 f3 1a c4 48 e9 93 de +fe 58 0f 80 2b 45 f9 d7 f2 2b a5 02 1e 9c 47 57 +6b 5a 1e 68 03 1b a9 db 4e 6d ab e4 d9 6a 1d 6f +3d 26 72 68 cf f4 08 00 5f 11 8e fc ad b9 98 88 +d1 c2 34 46 71 66 b2 a2 b8 49 a0 5a 88 9c 06 0a +c0 da 0c 5f ae 8b 55 f3 09 ba 62 e7 03 74 2f a0 +32 6f 2d 10 b0 11 02 14 89 ff 49 77 70 19 0d 89 +5f d3 9f 52 29 3c 39 ef d7 3a 69 8b da b9 f1 0e +d9 + +# RSA public exponent e: +01 00 01 + +# RSA private exponent d: +02 56 eb 4c ba 70 67 f2 d2 be 54 0d cd ff 45 82 +a3 6b 7d 31 d1 c9 09 9b b2 14 b7 98 48 46 6a 26 +8f 80 f5 8a 49 ac 04 c0 e3 64 89 34 a0 20 6c 04 +53 7c 19 b2 36 64 3a 60 82 73 21 44 df 75 fa 21 +75 88 f7 94 68 2b e8 91 68 27 6d c7 26 c5 c0 cb +db 84 d3 1b bf 26 d0 a4 3a f4 95 71 7f 7d 52 8a +cf ee 34 15 61 f6 ff 3c ae 05 c5 78 f8 47 0d 96 +82 f9 c0 d0 72 f9 f6 06 8b 56 d5 88 0f 68 2b e2 +c5 + +# Prime p: +03 b0 d3 96 2f 6d 17 54 9c bf ca 11 29 43 48 dc +f0 e7 e3 9f 8c 2b c6 82 4f 21 64 b6 06 d6 87 86 +0d ae 1e 63 23 93 cf ed f5 13 22 82 29 06 9e 2f +60 e4 ac d7 e6 33 a4 36 06 3f 82 38 5f 48 99 37 +07 + +# Prime q: +02 e4 c3 2e 2f 51 72 69 b7 07 23 09 f0 0c 0e 31 +36 5f 7c e2 8b 23 6b 82 91 2d f2 39 ab f3 95 72 +cf 0e d6 04 b0 29 82 e5 35 64 c5 2d 6a 05 39 7d +e5 c0 52 a2 fd dc 14 1e f7 18 98 36 34 6a eb 33 +1f + +# p's CRT exponent dP: +01 e8 4b 11 9d 25 16 1f a6 7b 00 25 6a 5b d9 b6 +45 d2 b2 32 ec b0 5b 01 51 80 02 9a 88 62 2a dc +3f 09 b3 ae ac de 61 61 ab 7c de 22 c2 ad 26 e7 +79 7d f5 4e 07 2c bd 3b 26 73 80 0b 3e 43 38 db +d5 + +# q's CRT exponent dQ: +eb 90 aa 1a 40 13 5b 4c ea 07 19 7c ed c8 81 9b +e1 e7 cb ff 25 47 66 21 16 f4 65 a4 a9 f4 87 ab +12 f3 ba 4f ef 13 82 22 65 a6 52 97 d9 8b 7b de +d9 37 2e 3f fe 81 a3 8b 3e 96 00 fe d0 55 75 4f + +# CRT coefficient qInv: +01 2f 7f 81 38 f9 40 40 62 eb 85 a4 29 24 52 0b +38 f5 bb 88 6a 01 96 f4 8b b8 dc ea 60 fd 92 cc +02 7f 18 e7 81 58 a3 4a 5c 5d 5f 86 0a 0f 6c 04 +07 1a 7d 01 31 2c 06 50 62 f1 eb 48 b7 9d 1c 83 +cb + +# --------------------------------- +# RSAES-OAEP Encryption Example 5.1 +# --------------------------------- + +# Message to be encrypted: +af 71 a9 01 e3 a6 1d 31 32 f0 fc 1f db 47 4f 9e +a6 57 92 57 ff c2 4d 16 41 70 14 5b 3d bd e8 + +# Seed: +44 c9 2e 28 3f 77 b9 49 9c 60 3d 96 36 60 c8 7d +2f 93 94 61 + +# Encryption: +03 60 46 a4 a4 7d 9e d3 ba 9a 89 13 9c 10 50 38 +eb 74 92 b0 5a 5d 68 bf d5 3a cc ff 45 97 f7 a6 +86 51 b4 7b 4a 46 27 d9 27 e4 85 ee d7 b4 56 64 +20 e8 b4 09 87 9e 5d 60 6e ae 25 1d 22 a5 df 79 +9f 79 20 bf c1 17 b9 92 57 2a 53 b1 26 31 46 bc +ea 03 38 5c c5 e8 53 c9 a1 01 c8 c3 e1 bd a3 1a +51 98 07 49 6c 6c b5 e5 ef b4 08 82 3a 35 2b 8f +a0 66 1f b6 64 ef ad d5 93 de b9 9f ff 5e d0 00 +e5 + +# --------------------------------- +# RSAES-OAEP Encryption Example 5.2 +# --------------------------------- + +# Message to be encrypted: +a3 b8 44 a0 82 39 a8 ac 41 60 5a f1 7a 6c fd a4 +d3 50 13 65 85 90 3a 41 7a 79 26 87 60 51 9a 4b +4a c3 30 3e c7 3f 0f 87 cf b3 23 99 + +# Seed: +cb 28 f5 86 06 59 fc ee e4 9c 3e ea fc e6 25 a7 +08 03 bd 32 + +# Encryption: +03 d6 eb 65 4e dc e6 15 bc 59 f4 55 26 5e d4 e5 +a1 82 23 cb b9 be 4e 40 69 b4 73 80 4d 5d e9 6f +54 dc aa a6 03 d0 49 c5 d9 4a a1 47 0d fc d2 25 +40 66 b7 c7 b6 1f f1 f6 f6 77 0e 32 15 c5 13 99 +fd 4e 34 ec 50 82 bc 48 f0 89 84 0a d0 43 54 ae +66 dc 0f 1b d1 8e 46 1a 33 cc 12 58 b4 43 a2 83 +7a 6d f2 67 59 aa 23 02 33 49 86 f8 73 80 c9 cc +9d 53 be 9f 99 60 5d 2c 9a 97 da 7b 09 15 a4 a7 +ad + +# --------------------------------- +# RSAES-OAEP Encryption Example 5.3 +# --------------------------------- + +# Message to be encrypted: +30 8b 0e cb d2 c7 6c b7 7f c6 f7 0c 5e dd 23 3f +d2 f2 09 29 d6 29 f0 26 95 3b b6 2a 8f 4a 3a 31 +4b de 19 5d e8 5b 5f 81 6d a2 aa b0 74 d2 6c b6 +ac dd f3 23 ae 3b 9c 67 8a c3 cf 12 fb dd e7 + +# Seed: +22 85 f4 0d 77 04 82 f9 a9 ef a2 c7 2c b3 ac 55 +71 6d c0 ca + +# Encryption: +07 70 95 21 81 64 9f 9f 9f 07 ff 62 6f f3 a2 2c +35 c4 62 44 3d 90 5d 45 6a 9f d0 bf f4 3c ac 2c +a7 a9 f5 54 e9 47 8b 9a cc 3a c8 38 b0 20 40 ff +d3 e1 84 7d e2 e4 25 39 29 f9 dd 9e e4 04 43 25 +a9 b0 5c ab b8 08 b2 ee 84 0d 34 e1 5d 10 5a 3f +1f 7b 27 69 5a 1a 07 a2 d7 3f e0 8e ca aa 3c 9c +9d 4d 5a 89 ff 89 0d 54 72 7d 7a e4 0c 0e c1 a8 +dd 86 16 5d 8e e2 c6 36 81 41 01 6a 48 b5 5b 69 +67 + +# --------------------------------- +# RSAES-OAEP Encryption Example 5.4 +# --------------------------------- + +# Message to be encrypted: +15 c5 b9 ee 11 85 + +# Seed: +49 fa 45 d3 a7 8d d1 0d fd 57 73 99 d1 eb 00 af +7e ed 55 13 + +# Encryption: +08 12 b7 67 68 eb cb 64 2d 04 02 58 e5 f4 44 1a +01 85 21 bd 96 68 7e 6c 5e 89 9f cd 6c 17 58 8f +f5 9a 82 cc 8a e0 3a 4b 45 b3 12 99 af 17 88 c3 +29 f7 dc d2 85 f8 cf 4c ed 82 60 6b 97 61 26 71 +a4 5b ed ca 13 34 42 14 4d 16 17 d1 14 f8 02 85 +7f 0f 9d 73 97 51 c5 7a 3f 9e e4 00 91 2c 61 e2 +e6 99 2b e0 31 a4 3d d4 8f a6 ba 14 ee f7 c4 22 +b5 ed c4 e7 af a0 4f dd 38 f4 02 d1 c8 bb 71 9a +bf + +# --------------------------------- +# RSAES-OAEP Encryption Example 5.5 +# --------------------------------- + +# Message to be encrypted: +21 02 6e 68 00 c7 fa 72 8f ca ab a0 d1 96 ae 28 +d7 a2 ac 4f fd 8a bc e7 94 f0 98 5f 60 c8 a6 73 +72 77 36 5d 3f ea 11 db 89 23 a2 02 9a + +# Seed: +f0 28 74 13 23 4c c5 03 47 24 a0 94 c4 58 6b 87 +af f1 33 fc + +# Encryption: +07 b6 0e 14 ec 95 4b fd 29 e6 0d 00 47 e7 89 f5 +1d 57 18 6c 63 58 99 03 30 67 93 ce d3 f6 82 41 +c7 43 52 9a ba 6a 63 74 f9 2e 19 e0 16 3e fa 33 +69 7e 19 6f 76 61 df aa a4 7a ac 6b de 5e 51 de +b5 07 c7 2c 58 9a 2c a1 69 3d 96 b1 46 03 81 24 +9b 2c db 9e ac 44 76 9f 24 89 c5 d3 d2 f9 9f 0e +e3 c7 ee 5b f6 4a 5a c7 9c 42 bd 43 3f 14 9b e8 +cb 59 54 83 61 64 05 95 51 3c 97 af 7b c2 50 97 +23 + +# --------------------------------- +# RSAES-OAEP Encryption Example 5.6 +# --------------------------------- + +# Message to be encrypted: +54 1e 37 b6 8b 6c 88 72 b8 4c 02 + +# Seed: +d9 fb a4 5c 96 f2 1e 6e 26 d2 9e b2 cd cb 65 85 +be 9c b3 41 + +# Encryption: +08 c3 6d 4d da 33 42 3b 2e d6 83 0d 85 f6 41 1b +a1 dc f4 70 a1 fa e0 eb ef ee 7c 08 9f 25 6c ef +74 cb 96 ea 69 c3 8f 60 f3 9a be e4 41 29 bc b4 +c9 2d e7 f7 97 62 3b 20 07 4e 3d 9c 28 99 70 1e +d9 07 1e 1e fa 0b dd 84 d4 c3 e5 13 03 02 d8 f0 +24 0b ab a4 b8 4a 71 cc 03 2f 22 35 a5 ff 0f ae +27 7c 3e 8f 91 12 be f4 4c 9a e2 0d 17 5f c9 a4 +05 8b fc 93 0b a3 1b 02 e2 e4 f4 44 48 37 10 f2 +4a + +# ============================================= + +# ================================== +# Example 6: A 1029-bit RSA Key Pair +# ================================== + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +12 b1 7f 6d ad 2e cd 19 ff 46 dc 13 f7 86 0f 09 +e0 e0 cf b6 77 b3 8a 52 59 23 05 ce af 02 2c 16 +6d b9 0d 04 ac 29 e3 3f 7d d1 2d 9f af 66 e0 81 +6b b6 3e ad 26 7c c7 d4 6c 17 c3 7b e2 14 bc a2 +a2 2d 72 3a 64 e4 44 07 43 6b 6f c9 65 72 9a ef +c2 55 4f 37 6c d5 dc ea 68 29 37 80 a6 2b f3 9d +00 29 48 5a 16 0b bb 9e 5d c0 97 2d 21 a5 04 f5 +2e 5e e0 28 aa 41 63 32 f5 10 b2 e9 cf f5 f7 22 +af + +# RSA public exponent e: +01 00 01 + +# RSA private exponent d: +02 95 ec a3 56 06 18 36 95 59 ce cd 30 3a a9 cf +da fc 1d 9f 06 95 9d f7 5f fe f9 29 aa 89 69 61 +bc d1 90 dc 69 97 ed a7 f5 96 3e 72 4d 07 b4 dc +11 f3 06 5e 5a e9 7d 96 83 51 12 28 0b 90 84 bb +14 f2 a2 1e bd 4e 88 9d 41 b9 c4 13 2e c1 95 6f +ca b8 bb 2f ed 05 75 88 49 36 52 2c 5f f7 d3 32 +61 90 48 24 e7 ca de e4 e0 bb 37 2d 24 57 cf 78 +e2 bd 12 86 22 8f f8 3f 10 73 1c e6 3c 90 cf f3 +f9 + +# Prime p: +04 a6 ce 8b 73 58 df a6 9b dc f7 42 61 70 05 af +b5 38 5f 5f 3a 58 a2 4e f7 4a 22 a8 c0 5c b7 cc +38 eb d4 cc 9d 9a 9d 78 9a 62 cd 0f 60 f0 cb 94 +1d 34 23 c9 69 2e fa 4f e3 ad ff 29 0c 47 49 a3 +8b + +# Prime q: +04 04 c9 a8 03 37 1f ed b4 c5 be 39 f3 c0 0b 00 +9e 5e 08 a6 3b e1 e4 00 35 cd ac a5 01 1c c7 01 +cf 7e eb cb 99 f0 ff e1 7c fd 0a 4b f7 be fd 2d +d5 36 ac 94 6d b7 97 fd bc 4a be 8f 29 34 9b 91 +ed + +# p's CRT exponent dP: +03 96 1c 8f 76 0a a2 bd 51 54 c7 aa fd 77 22 5b +3b ac d0 13 9a e7 b5 94 8e a3 31 1f cc d8 6f b9 +5c 75 af a7 67 28 4b 9b 2d e5 59 57 2f 15 d8 d0 +44 c7 eb 83 a1 be 5f ad f2 cc 37 7c 0d 84 75 29 +4b + +# q's CRT exponent dQ: +02 21 97 e0 66 74 21 96 aa bc 03 fa 2f ee b4 e7 +0b 15 cb 78 7d 61 7a cd 31 bb 75 c7 bc 23 4a d7 +06 f7 c4 8d 21 82 d1 f0 ff 9c 22 8d cf 41 96 7b +6c 0b a6 d2 c0 ad 11 0a 1b 85 78 31 ec 24 5e 2c +b1 + +# CRT coefficient qInv: +04 01 c4 c0 c5 3d 45 db db 5e 9d 96 d0 fe cf 42 +75 df 09 74 bc 4a 07 36 b4 a7 4c 32 69 05 3e fb +68 6a ce 24 06 e2 2c 9e 05 8d db 4a e5 40 62 7a +e2 fd b0 82 61 e8 e7 e4 bc bc 99 4d aa fa 30 5c +45 + +# --------------------------------- +# RSAES-OAEP Encryption Example 6.1 +# --------------------------------- + +# Message to be encrypted: +40 46 ca 8b aa 33 47 ca 27 f4 9e 0d 81 f9 cc 1d +71 be 9b a5 17 d4 + +# Seed: +dd 0f 6c fe 41 5e 88 e5 a4 69 a5 1f bb a6 df d4 +0a db 43 84 + +# Encryption: +06 30 ee bc d2 85 6c 24 f7 98 80 6e 41 f9 e6 73 +45 ed a9 ce da 38 6a cc 9f ac ae a1 ee ed 06 ac +e5 83 70 97 18 d9 d1 69 fa df 41 4d 5c 76 f9 29 +96 83 3e f3 05 b7 5b 1e 4b 95 f6 62 a2 0f ae dc +3b ae 0c 48 27 a8 bf 8a 88 ed bd 57 ec 20 3a 27 +a8 41 f0 2e 43 a6 15 ba b1 a8 ca c0 70 1d e3 4d +eb de f6 2a 08 80 89 b5 5e c3 6e a7 52 2f d3 ec +8d 06 b6 a0 73 e6 df 83 31 53 bc 0a ef d9 3b d1 +a3 + +# --------------------------------- +# RSAES-OAEP Encryption Example 6.2 +# --------------------------------- + +# Message to be encrypted: +5c c7 2c 60 23 1d f0 3b 3d 40 f9 b5 79 31 bc 31 +10 9f 97 25 27 f2 8b 19 e7 48 0c 72 88 cb 3c 92 +b2 25 12 21 4e 4b e6 c9 14 79 2d da bd f5 7f aa +8a a7 + +# Seed: +8d 14 bd 94 6a 13 51 14 8f 5c ae 2e d9 a0 c6 53 +e8 5e bd 85 + +# Encryption: +0e bc 37 37 61 73 a4 fd 2f 89 cc 55 c2 ca 62 b2 +6b 11 d5 1c 3c 7c e4 9e 88 45 f7 4e 76 07 31 7c +43 6b c8 d2 3b 96 67 df eb 9d 08 72 34 b4 7b c6 +83 71 75 ae 5c 05 59 f6 b8 1d 7d 22 41 6d 3e 50 +f4 ac 53 3d 8f 08 12 f2 db 9e 79 1f e9 c7 75 ac +8b 6a d0 f5 35 ad 9c eb 23 a4 a0 20 14 c5 8a b3 +f8 d3 16 14 99 a2 60 f3 93 48 e7 14 ae 2a 1d 34 +43 20 8f d8 b7 22 cc fd fb 39 3e 98 01 1f 99 e6 +3f + +# --------------------------------- +# RSAES-OAEP Encryption Example 6.3 +# --------------------------------- + +# Message to be encrypted: +b2 0e 65 13 03 09 2f 4b cc b4 30 70 c0 f8 6d 23 +04 93 62 ed 96 64 2f c5 63 2c 27 db 4a 52 e3 d8 +31 f2 ab 06 8b 23 b1 49 87 9c 00 2f 6b f3 fe ee +97 59 11 12 56 2c + +# Seed: +6c 07 5b c4 55 20 f1 65 c0 bf 5e a4 c5 df 19 1b +c9 ef 0e 44 + +# Encryption: +0a 98 bf 10 93 61 93 94 43 6c f6 8d 8f 38 e2 f1 +58 fd e8 ea 54 f3 43 5f 23 9b 8d 06 b8 32 18 44 +20 24 76 ae ed 96 00 94 92 48 0c e3 a8 d7 05 49 +8c 4c 8c 68 f0 15 01 dc 81 db 60 8f 60 08 73 50 +c8 c3 b0 bd 2e 9e f6 a8 14 58 b7 c8 01 b8 9f 2e +4f e9 9d 49 00 ba 6a 4b 5e 5a 96 d8 65 dc 67 6c +77 55 92 87 94 13 0d 62 80 a8 16 0a 19 0f 2d f3 +ea 7c f9 aa 02 71 d8 8e 9e 69 05 ec f1 c5 15 2d +65 + +# --------------------------------- +# RSAES-OAEP Encryption Example 6.4 +# --------------------------------- + +# Message to be encrypted: +68 4e 30 38 c5 c0 41 f7 + +# Seed: +3b bc 3b d6 63 7d fe 12 84 69 01 02 9b f5 b0 c0 +71 03 43 9c + +# Encryption: +00 8e 7a 67 ca cf b5 c4 e2 4b ec 7d ee 14 91 17 +f1 95 98 ce 8c 45 80 8f ef 88 c6 08 ff 9c d6 e6 +95 26 3b 9a 3c 0a d4 b8 ba 4c 95 23 8e 96 a8 42 +2b 85 35 62 9c 8d 53 82 37 44 79 ad 13 fa 39 97 +4b 24 2f 9a 75 9e ea f9 c8 3a d5 a8 ca 18 94 0a +01 62 ba 75 58 76 df 26 3f 4b d5 0c 65 25 c5 60 +90 26 7c 1f 0e 09 ce 08 99 a0 cf 35 9e 88 12 0a +bd 9b f8 93 44 5b 3c ae 77 d3 60 73 59 ae 9a 52 +f8 + +# --------------------------------- +# RSAES-OAEP Encryption Example 6.5 +# --------------------------------- + +# Message to be encrypted: +32 48 8c b2 62 d0 41 d6 e4 dd 35 f9 87 bf 3c a6 +96 db 1f 06 ac 29 a4 46 93 + +# Seed: +b4 6b 41 89 3e 8b ef 32 6f 67 59 38 3a 83 07 1d +ae 7f ca bc + +# Encryption: +00 00 34 74 41 6c 7b 68 bd f9 61 c3 85 73 79 44 +d7 f1 f4 0c b3 95 34 3c 69 3c c0 b4 fe 63 b3 1f +ed f1 ea ee ac 9c cc 06 78 b3 1d c3 2e 09 77 48 +95 14 c4 f0 90 85 f6 29 8a 96 53 f0 1a ea 40 45 +ff 58 2e e8 87 be 26 ae 57 5b 73 ee f7 f3 77 49 +21 e3 75 a3 d1 9a dd a0 ca 31 aa 18 49 88 7c 1f +42 ca c9 67 7f 7a 2f 4e 92 3f 6e 5a 86 8b 38 c0 +84 ef 18 75 94 dc 9f 7f 04 8f ea 2e 02 95 53 84 +ab + +# --------------------------------- +# RSAES-OAEP Encryption Example 6.6 +# --------------------------------- + +# Message to be encrypted: +50 ba 14 be 84 62 72 02 79 c3 06 ba + +# Seed: +0a 24 03 31 2a 41 e3 d5 2f 06 0f bc 13 a6 7d e5 +cf 76 09 a7 + +# Encryption: +0a 02 6d da 5f c8 78 5f 7b d9 bf 75 32 7b 63 e8 +5e 2c 0f de e5 da db 65 eb dc ac 9a e1 de 95 c9 +2c 67 2a b4 33 aa 7a 8e 69 ce 6a 6d 88 97 fa c4 +ac 4a 54 de 84 1a e5 e5 bb ce 76 87 87 9d 79 63 +4c ea 7a 30 68 40 65 c7 14 d5 24 09 b9 28 25 6b +bf 53 ea bc d5 23 1e b7 25 95 04 53 73 99 bd 29 +16 4b 72 6d 33 a4 6d a7 01 36 0a 41 68 a0 91 cc +ab 72 d4 4a 62 fe d2 46 c0 ff ea 5b 13 48 ab 54 +70 + +# ============================================= + +# ================================== +# Example 7: A 1030-bit RSA Key Pair +# ================================== + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +31 11 79 f0 bc fc 9b 9d 3c a3 15 d0 0e f3 0d 7b +dd 3a 2c fa e9 91 1b fe dc b9 48 b3 a4 78 2d 07 +32 b6 ab 44 aa 4b f0 37 41 a6 44 dc 01 be c3 e6 +9b 01 a0 33 e6 75 d8 ac d7 c4 92 5c 6b 1a ec 31 +19 05 1d fd 89 76 2d 21 5d 45 47 5f fc b5 9f 90 +81 48 62 3f 37 17 71 56 f6 ae 86 dd 7a 7c 5f 43 +dc 1e 1f 90 82 54 05 8a 28 4a 5f 06 c0 02 17 93 +a8 7f 1a c5 fe ff 7d ca ee 69 c5 e5 1a 37 89 e3 +73 + +# RSA public exponent e: +01 00 01 + +# RSA private exponent d: +07 0c fc ff 2f eb 82 76 e2 74 32 c4 5d fe e4 8f +49 b7 91 7d 65 30 e1 f0 ca 34 60 f3 2e 02 76 17 +44 87 c5 6e 22 a4 5d 25 00 d7 77 54 95 21 9d 7d +16 5a 9c f3 bd 92 c3 2a f9 a9 8d 8d c9 cc 29 68 +00 ad c9 4a 0a 54 fb 40 f3 42 91 bf 84 ee 8e a1 +2b 6f 10 93 59 c6 d3 54 2a 50 f9 c7 67 f5 cf ff +05 a6 81 c2 e6 56 fb 77 ca aa db 4b e9 46 8d 8a +bc d4 df 98 f5 8e 86 d2 05 3f a1 34 9f 74 8e 21 +b1 + +# Prime p: +07 49 26 2c 11 1c d4 70 ec 25 66 e6 b3 73 2f c0 +93 29 46 9a a1 90 71 d3 b9 c0 19 06 51 4c 6f 1d +26 ba a1 4b ea b0 97 1c 8b 7e 61 1a 4f 79 00 9d +6f ea 77 69 28 ca 25 28 5b 0d e3 64 3d 1a 3f 8c +71 + +# Prime q: +06 bc 1e 50 e9 6c 02 bf 63 6e 9e ea 8b 89 9b be +bf 76 51 de 77 dd 47 4c 3e 9b c2 3b ad 81 82 b6 +19 04 c7 d9 7d fb eb fb 1e 00 10 88 78 b6 e6 7e +41 53 91 d6 79 42 c2 b2 bf 9b 44 35 f8 8b 0c b0 +23 + +# p's CRT exponent dP: +03 bc 7e a7 f0 aa b1 43 ab c6 ce 8b 97 11 86 36 +a3 01 72 e4 cf e0 2c 8f a0 dd a3 b7 ba af 90 f8 +09 29 82 98 55 25 f4 88 bd fc b4 bd 72 6e 22 63 +9a c6 4a 30 92 ab 7f fc bf 1d 53 34 cf a5 0b 5b +f1 + +# q's CRT exponent dQ: +02 62 a6 aa 29 c2 a3 c6 7d c5 34 6c 06 38 1a fd +98 7a a3 cc 93 cf bf ec f5 4f dd 9f 9d 78 7d 7f +59 a5 23 d3 98 97 9d a1 37 a2 f6 38 1f e9 48 01 +f7 c9 4d a2 15 18 dc 34 cb 40 87 0c 46 97 99 4a +d9 + +# CRT coefficient qInv: +64 9d 4c 17 b6 ee 17 21 e7 72 d0 38 9a 55 9c 3d +3c df 95 50 d4 57 c4 6b 03 7b 74 64 1b 1d 52 16 +6a f8 a2 13 c8 39 62 06 cd fb a4 42 2f 18 d6 f6 +1d bc b5 d2 14 c9 71 bf 48 2a eb 97 6a 73 70 c2 + +# --------------------------------- +# RSAES-OAEP Encryption Example 7.1 +# --------------------------------- + +# Message to be encrypted: +47 aa e9 09 + +# Seed: +43 dd 09 a0 7f f4 ca c7 1c aa 46 32 ee 5e 1c 1d +ae e4 cd 8f + +# Encryption: +16 88 e4 ce 77 94 bb a6 cb 70 14 16 9e cd 55 9c +ed e2 a3 0b 56 a5 2b 68 d9 fe 18 cf 19 73 ef 97 +b2 a0 31 53 95 1c 75 5f 62 94 aa 49 ad bd b5 58 +45 ab 68 75 fb 39 86 c9 3e cf 92 79 62 84 0d 28 +2f 9e 54 ce 8b 69 0f 7c 0c b8 bb d7 34 40 d9 57 +1d 1b 16 cd 92 60 f9 ea b4 78 3c c4 82 e5 22 3d +c6 09 73 87 17 83 ec 27 b0 ae 0f d4 77 32 cb c2 +86 a1 73 fc 92 b0 0f b4 ba 68 24 64 7c d9 3c 85 +c1 + +# --------------------------------- +# RSAES-OAEP Encryption Example 7.2 +# --------------------------------- + +# Message to be encrypted: +1d 9b 2e 22 23 d9 bc 13 bf b9 f1 62 ce 73 5d b4 +8b a7 c6 8f 68 22 a0 a1 a7 b6 ae 16 58 34 e7 + +# Seed: +3a 9c 3c ec 7b 84 f9 bd 3a de cb c6 73 ec 99 d5 +4b 22 bc 9b + +# Encryption: +10 52 ed 39 7b 2e 01 e1 d0 ee 1c 50 bf 24 36 3f +95 e5 04 f4 a0 34 34 a0 8f d8 22 57 4e d6 b9 73 +6e db b5 f3 90 db 10 32 14 79 a8 a1 39 35 0e 2b +d4 97 7c 37 78 ef 33 1f 3e 78 ae 11 8b 26 84 51 +f2 0a 2f 01 d4 71 f5 d5 3c 56 69 37 17 1b 2d bc +2d 4b de 45 9a 57 99 f0 37 2d 65 74 23 9b 23 23 +d2 45 d0 bb 81 c2 86 b6 3c 89 a3 61 01 73 37 e4 +90 2f 88 a4 67 f4 c7 f2 44 bf d5 ab 46 43 7f f3 +b6 + +# --------------------------------- +# RSAES-OAEP Encryption Example 7.3 +# --------------------------------- + +# Message to be encrypted: +d9 76 fc + +# Seed: +76 a7 5e 5b 61 57 a5 56 cf 88 84 bb 2e 45 c2 93 +dd 54 5c f5 + +# Encryption: +21 55 cd 84 3f f2 4a 4e e8 ba db 76 94 26 00 28 +a4 90 81 3b a8 b3 69 a4 cb f1 06 ec 14 8e 52 98 +70 7f 59 65 be 7d 10 1c 10 49 ea 85 84 c2 4c d6 +34 55 ad 9c 10 4d 68 62 82 d3 fb 80 3a 4c 11 c1 +c2 e9 b9 1c 71 78 80 1d 1b 66 40 f0 03 f5 72 8d +f0 07 b8 a4 cc c9 2b ce 05 e4 1a 27 27 8d 7c 85 +01 8c 52 41 43 13 a5 07 77 89 00 1d 4f 01 91 0b +72 aa d0 5d 22 0a a1 4a 58 73 3a 74 89 bc 54 55 +6b + +# --------------------------------- +# RSAES-OAEP Encryption Example 7.4 +# --------------------------------- + +# Message to be encrypted: +d4 73 86 23 df 22 3a a4 38 43 df 84 67 53 4c 41 +d0 13 e0 c8 03 c6 24 e2 63 66 6b 23 9b de 40 a5 +f2 9a eb 8d e7 9e 3d aa 61 dd 03 70 f4 9b d4 b0 +13 83 4b 98 21 2a ef 6b 1c 5e e3 73 b3 cb + +# Seed: +78 66 31 4a 6a d6 f2 b2 50 a3 59 41 db 28 f5 86 +4b 58 58 59 + +# Encryption: +0a b1 4c 37 3a eb 7d 43 28 d0 aa ad 8c 09 4d 88 +b9 eb 09 8b 95 f2 10 54 a2 90 82 52 2b e7 c2 7a +31 28 78 b6 37 91 7e 3d 81 9e 6c 3c 56 8d b5 d8 +43 80 2b 06 d5 1d 9e 98 a2 be 0b f4 0c 03 14 23 +b0 0e df bf f8 32 0e fb 91 71 bd 20 44 65 3a 4c +b9 c5 12 2f 6c 65 e8 3c da 2e c3 c1 26 02 7a 9c +1a 56 ba 87 4d 0f ea 23 f3 80 b8 2c f2 40 b8 cf +54 00 04 75 8c 4c 77 d9 34 15 7a 74 f3 fc 12 bf +ac + +# --------------------------------- +# RSAES-OAEP Encryption Example 7.5 +# --------------------------------- + +# Message to be encrypted: +bb 47 23 1c a5 ea 1d 3a d4 6c 99 34 5d 9a 8a 61 + +# Seed: +b2 16 6e d4 72 d5 8d b1 0c ab 2c 6b 00 0c cc f1 +0a 7d c5 09 + +# Encryption: +02 83 87 a3 18 27 74 34 79 8b 4d 97 f4 60 06 8d +f5 29 8f ab a5 04 1b a1 17 61 a1 cb 73 16 b2 41 +84 11 4e c5 00 25 7e 25 89 ed 3b 60 7a 1e bb e9 +7a 6c c2 e0 2b f1 b6 81 f4 23 12 a3 3b 7a 77 d8 +e7 85 5c 4a 6d e0 3e 3c 04 64 3f 78 6b 91 a2 64 +a0 d6 80 5e 2c ea 91 e6 81 77 eb 7a 64 d9 25 5e +4f 27 e7 13 b7 cc ec 00 dc 20 0e bd 21 c2 ea 2b +b8 90 fe ae 49 42 df 94 1d c3 f9 78 90 ed 34 74 +78 + +# --------------------------------- +# RSAES-OAEP Encryption Example 7.6 +# --------------------------------- + +# Message to be encrypted: +21 84 82 70 95 d3 5c 3f 86 f6 00 e8 e5 97 54 01 +32 96 + +# Seed: +52 67 3b de 2c a1 66 c2 aa 46 13 1a c1 dc 80 8d +67 d7 d3 b1 + +# Encryption: +14 c6 78 a9 4a d6 05 25 ef 39 e9 59 b2 f3 ba 5c +09 7a 94 ff 91 2b 67 db ac e8 05 35 c1 87 ab d4 +7d 07 54 20 b1 87 21 52 bb a0 8f 7f c3 1f 31 3b +bf 92 73 c9 12 fc 4c 01 49 a9 b0 cf b7 98 07 e3 +46 eb 33 20 69 61 1b ec 0f f9 bc d1 68 f1 f7 c3 +3e 77 31 3c ea 45 4b 94 e2 54 9e ec f0 02 e2 ac +f7 f6 f2 d2 84 5d 4f e0 aa b2 e5 a9 2d df 68 c4 +80 ae 11 24 79 35 d1 f6 25 74 84 22 16 ae 67 41 +15 + +# ============================================= + +# ================================== +# Example 8: A 1031-bit RSA Key Pair +# ================================== + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +5b df 0e 30 d3 21 dd a5 14 7f 88 24 08 fa 69 19 +54 80 df 8f 80 d3 f6 e8 bf 58 18 50 4f 36 42 7c +a9 b1 f5 54 0b 9c 65 a8 f6 97 4c f8 44 7a 24 4d +92 80 20 1b b4 9f cb be 63 78 d1 94 4c d2 27 e2 +30 f9 6e 3d 10 f8 19 dc ef 27 6c 64 a0 0b 2a 4b +67 01 e7 d0 1d e5 fa bd e3 b1 e9 a0 df 82 f4 63 +13 59 cd 22 66 96 47 fb b1 71 72 46 13 4e d7 b4 +97 cf ff bd c4 2b 59 c7 3a 96 ed 90 16 62 12 df +f7 + +# RSA public exponent e: +01 00 01 + +# RSA private exponent d: +0f 7d 1e 9e 5a aa 25 fd 13 e4 a0 66 3a e1 44 e0 +d1 5f 5c d1 8b cd b0 9d f2 cc 7e 64 e3 c5 e9 15 +ad 62 64 53 04 16 1d 09 8c 71 5b b7 ab 8b d0 1d +07 ea f3 fe d7 c7 ed 08 af 2a 8a 62 ef 44 ab 16 +b3 20 e1 4a f7 2a 48 f9 6a fe 26 2a 0a e4 cf 65 +e6 35 e9 10 79 0c d4 ee 5c ea 76 8a 4b 26 39 f7 +e6 f6 77 b3 f0 bb 6b e3 2b 75 74 7d 89 09 03 6f +02 64 f5 8d 40 1c db a1 31 71 61 57 a7 5e cf 63 +31 + +# Prime p: +0a 02 ef 84 48 d9 fa d8 bb d0 d0 04 c8 c2 aa 97 +51 ef 97 21 c1 b0 d0 32 36 a5 4b 0d f9 47 cb ae +d5 a2 55 ee 9e 8e 20 d4 91 ea 17 23 fe 09 47 04 +a9 76 2e 88 af d1 6e bb 59 94 41 2c a9 66 dc 4f +9f + +# Prime q: +09 2d 36 2e 7e d3 a0 bf d9 e9 fd 0e 6c 03 01 b6 +df 29 15 9c f5 0c c8 3b 9b 0c f4 d6 ee a7 1a 61 +e0 02 b4 6e 0a e9 f2 de 62 d2 5b 5d 74 52 d4 98 +b8 1c 9a c6 fc 58 59 3d 4c 3f b4 f5 d7 2d fb b0 +a9 + +# p's CRT exponent dP: +07 c7 14 10 af 10 39 62 db 36 74 04 e3 7a e8 50 +ba a4 e9 c2 9d d9 21 45 81 52 94 a6 7c 7d 1c 6d +ed 26 3a a0 30 a9 b6 33 ae 50 30 3e 14 03 5d 1a +f0 14 12 3e ba 68 78 20 30 8d 8e bc 85 b6 95 7d +7d + +# q's CRT exponent dQ: +ae 2c 75 38 0c 02 c0 16 ad 05 89 1b 33 01 de 88 +1f 28 ae 11 71 18 2b 6b 2c 83 be a7 c5 15 ec a9 +ca 29 8c 7b 1c ab 58 17 a5 97 06 8f c8 50 60 de +4d a8 a0 16 37 8a ae 43 c7 f9 67 bc c3 79 04 b9 + +# CRT coefficient qInv: +05 98 d1 05 9e 3a da 4f 63 20 75 2c 09 d8 05 ff +7d 1f 1a e0 d0 17 ae ee e9 ce fa 0d 7d d7 ff 77 +5e 44 b5 78 32 2f 64 05 d6 21 1d a1 95 19 66 6a +a8 7f dc 4c d8 c8 8f 6b 6e 3d 67 e9 61 dc bb a3 +d0 + +# --------------------------------- +# RSAES-OAEP Encryption Example 8.1 +# --------------------------------- + +# Message to be encrypted: +05 0b 75 5e 5e 68 80 f7 b9 e9 d6 92 a7 4c 37 aa +e4 49 b3 1b fe a6 de ff 83 74 7a 89 7f 6c 2c 82 +5b b1 ad bf 85 0a 3c 96 99 4b 5d e5 b3 3c bc 7d +4a 17 91 3a 79 67 + +# Seed: +77 06 ff ca 1e cf b1 eb ee 2a 55 e5 c6 e2 4c d2 +79 7a 41 25 + +# Encryption: +09 b3 68 3d 8a 2e b0 fb 29 5b 62 ed 1f b9 29 0b +71 44 57 b7 82 53 19 f4 64 78 72 af 88 9b 30 40 +94 72 02 0a d1 29 12 bf 19 b1 1d 48 19 f4 96 14 +82 4f fd 84 d0 9c 0a 17 e7 d1 73 09 d1 29 19 79 +04 10 aa 29 95 69 9f 6a 86 db e3 24 2b 5a cc 23 +af 45 69 10 80 d6 b1 ae 81 0f b3 e3 05 70 87 f0 +97 00 92 ce 00 be 95 62 ff 40 53 b6 26 2c e0 ca +a9 3e 13 72 3d 2e 3a 5b a0 75 d4 5f 0d 61 b5 4b +61 + +# --------------------------------- +# RSAES-OAEP Encryption Example 8.2 +# --------------------------------- + +# Message to be encrypted: +4e b6 8d cd 93 ca 9b 19 df 11 1b d4 36 08 f5 57 +02 6f e4 aa 1d 5c fa c2 27 a3 eb 5a b9 54 8c 18 +a0 6d de d2 3f 81 82 59 86 b2 fc d7 11 09 ec ef +7e ff 88 87 3f 07 5c 2a a0 c4 69 f6 9c 92 bc + +# Seed: +a3 71 7d a1 43 b4 dc ff bc 74 26 65 a8 fa 95 05 +85 54 83 43 + +# Encryption: +2e cf 15 c9 7c 5a 15 b1 47 6a e9 86 b3 71 b5 7a +24 28 4f 4a 16 2a 8d 0c 81 82 e7 90 5e 79 22 56 +f1 81 2b a5 f8 3f 1f 7a 13 0e 42 dc c0 22 32 84 +4e dc 14 a3 1a 68 ee 97 ae 56 4a 38 3a 34 11 65 +64 24 c5 f6 2d db 64 60 93 c3 67 be 1f cd a4 26 +cf 00 a0 6d 8a cb 7e 57 77 6f bb d8 55 ac 3d f5 +06 fc 16 b1 d7 c3 f2 11 0f 3d 80 68 e9 1e 18 63 +63 83 1c 84 09 68 0d 8d a9 ec d8 cf 1f a2 0e e3 +9d + +# --------------------------------- +# RSAES-OAEP Encryption Example 8.3 +# --------------------------------- + +# Message to be encrypted: +86 04 ac 56 32 8c 1a b5 ad 91 78 61 + +# Seed: +ee 06 20 90 73 cc a0 26 bb 26 4e 51 85 bf 8c 68 +b7 73 9f 86 + +# Encryption: +4b c8 91 30 a5 b2 da bb 7c 2f cf 90 eb 5d 0e af +9e 68 1b 71 46 a3 8f 31 73 a3 d9 cf ec 52 ea 9e +0a 41 93 2e 64 8a 9d 69 34 4c 50 da 76 3f 51 a0 +3c 95 76 21 31 e8 05 22 54 dc d2 24 8c ba 40 fd +31 66 77 86 ce 05 a2 b7 b5 31 ac 9d ac 9e d5 84 +a5 9b 67 7c 1a 8a ed 8c 5d 15 d6 8c 05 56 9e 2b +e7 80 bf 7d b6 38 fd 2b fd 2a 85 ab 27 68 60 f3 +77 73 38 fc a9 89 ff d7 43 d1 3e e0 8e 0c a9 89 +3f + +# --------------------------------- +# RSAES-OAEP Encryption Example 8.4 +# --------------------------------- + +# Message to be encrypted: +fd da 5f bf 6e c3 61 a9 d9 a4 ac 68 af 21 6a 06 +86 f4 38 b1 e0 e5 c3 6b 95 5f 74 e1 07 f3 9c 0d +dd cc + +# Seed: +99 0a d5 73 dc 48 a9 73 23 5b 6d 82 54 36 18 f2 +e9 55 10 5d + +# Encryption: +2e 45 68 47 d8 fc 36 ff 01 47 d6 99 35 94 b9 39 +72 27 d5 77 75 2c 79 d0 f9 04 fc b0 39 d4 d8 12 +fe a6 05 a7 b5 74 dd 82 ca 78 6f 93 75 23 48 43 +8e e9 f5 b5 45 49 85 d5 f0 e1 69 9e 3e 7a d1 75 +a3 2e 15 f0 3d eb 04 2a b9 fe 1d d9 db 1b b8 6f +8c 08 9c cb 45 e7 ef 0c 5e e7 ca 9b 72 90 ca 6b +15 be d4 70 39 78 8a 8a 93 ff 83 e0 e8 d6 24 4c +71 00 63 62 de ef 69 b6 f4 16 fb 3c 68 43 83 fb +d0 + +# --------------------------------- +# RSAES-OAEP Encryption Example 8.5 +# --------------------------------- + +# Message to be encrypted: +4a 5f 49 14 be e2 5d e3 c6 93 41 de 07 + +# Seed: +ec c6 3b 28 f0 75 6f 22 f5 2a c8 e6 ec 12 51 a6 +ec 30 47 18 + +# Encryption: +1f b9 35 6f d5 c4 b1 79 6d b2 eb f7 d0 d3 93 cc +81 0a df 61 45 de fc 2f ce 71 4f 79 d9 38 00 d5 +e2 ac 21 1e a8 bb ec ca 4b 65 4b 94 c3 b1 8b 30 +dd 57 6c e3 4d c9 54 36 ef 57 a0 94 15 64 59 23 +35 9a 5d 7b 41 71 ef 22 c2 46 70 f1 b2 29 d3 60 +3e 91 f7 66 71 b7 df 97 e7 31 7c 97 73 44 76 d5 +f3 d1 7d 21 cf 82 b5 ba 9f 83 df 2e 58 8d 36 98 +4f d1 b5 84 46 8b d2 3b 2e 87 5f 32 f6 89 53 f7 +b2 + +# --------------------------------- +# RSAES-OAEP Encryption Example 8.6 +# --------------------------------- + +# Message to be encrypted: +8e 07 d6 6f 7b 88 0a 72 56 3a bc d3 f3 50 92 bc +33 40 9f b7 f8 8f 24 72 be + +# Seed: +39 25 c7 1b 36 2d 40 a0 a6 de 42 14 55 79 ba 1e +7d d4 59 fc + +# Encryption: +3a fd 9c 66 00 14 7b 21 79 8d 81 8c 65 5a 0f 4c +92 12 db 26 d0 b0 df dc 2a 75 94 cc b3 d2 2f 5b +f1 d7 c3 e1 12 cd 73 fc 7d 50 9c 7a 8b af dd 3c +27 4d 13 99 00 9f 96 09 ec 4b e6 47 7e 45 3f 07 +5a a3 3d b3 82 87 0c 1c 34 09 ae f3 92 d7 38 6a +e3 a6 96 b9 9a 94 b4 da 05 89 44 7e 95 5d 16 c9 +8b 17 60 2a 59 bd 73 62 79 fc d8 fb 28 0c 44 62 +d5 90 bf a9 bf 13 fe d5 70 ea fd e9 73 30 a2 c2 +10 + +# ============================================= + +# ================================== +# Example 9: A 1536-bit RSA Key Pair +# ================================== + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +cf 2c d4 1e 34 ca 3a 72 8e a5 cb 8a ff 64 c3 6d +27 bd ef 53 64 e3 36 fd 68 d3 12 3c 5a 19 6a 8c +28 70 13 e8 53 d5 15 6d 58 d1 51 95 45 20 fb 4f +6d 7b 17 ab b6 81 77 65 90 9c 57 61 19 65 9d 90 +2b 19 06 ed 8a 2b 10 c1 55 c2 4d 12 45 28 da b9 +ee ae 37 9b ea c6 6e 4a 41 17 86 dc b8 fd 00 62 +eb c0 30 de 12 19 a0 4c 2a 8c 1b 7d d3 13 1e 4d +6b 6c ae e2 e3 1a 5e d4 1a c1 50 9b 2e f1 ee 2a +b1 83 64 be 56 8c a9 41 c2 5e cc 84 ff 9d 64 3b +5e c1 aa ae 10 2a 20 d7 3f 47 9b 78 0f d6 da 91 +07 52 12 d9 ea c0 3a 06 74 d8 99 eb a2 e4 31 f4 +c4 4b 61 5b 6b a2 23 2b d4 b3 3b ae d7 3d 62 5d + +# RSA public exponent e: +01 00 01 + +# RSA private exponent d: +19 8c 14 1e 23 71 5a 92 bc cf 6a 11 9a 5b c1 13 +89 46 8d 28 11 f5 48 d7 27 e1 7b 4a b0 eb 98 6d +6f 21 1e fb 53 b7 1f 7c cb ea 87 ee 69 c7 5e e6 +15 00 8c 53 32 de b5 2b f3 90 ab df bf e3 7d 72 +05 36 81 59 b2 63 8c 1d e3 26 e2 1d 22 25 1f 0f +b5 84 8b 3b f1 50 05 d2 a7 43 30 f0 af e9 16 ee +62 cc c1 34 4d 1d 83 a7 09 e6 06 76 27 38 40 f7 +f3 77 42 4a 5e 0a 4d a7 5f 01 b3 1f f7 68 19 cf +9c bf dd 21 52 43 c3 91 7c 03 ef 38 19 93 12 e5 +67 b3 bf 7a ed 3a b4 57 f3 71 ef 8a 14 23 f4 5b +68 c6 e2 82 ec 11 1b ba 28 33 b9 87 fd 69 fa d8 +3b c1 b8 c6 13 c5 e1 ea 16 c1 1e d1 25 ea 7e c1 + +# Prime p: +fc 8d 6c 04 be c4 eb 9a 81 92 ca 79 00 cb e5 36 +e2 e8 b5 19 de cf 33 b2 45 97 98 c6 90 9d f4 f1 +76 db 7d 23 19 0f c7 2b 88 65 a7 18 af 89 5f 1b +cd 91 45 29 80 27 42 3b 60 5e 70 a4 7c f5 83 90 +a8 c3 e8 8f c8 c4 8e 8b 32 e3 da 21 0d fb e3 e8 +81 ea 56 74 b6 a3 48 c2 1e 93 f9 e5 5e a6 5e fd + +# Prime q: +d2 00 d4 5e 78 8a ac ea 60 6a 40 1d 04 60 f8 7d +d5 c1 02 7e 12 dc 1a 0d 75 86 e8 93 9d 9c f7 89 +b4 0f 51 ac 04 42 96 1d e7 d2 1c c2 1e 05 c8 31 +55 c1 f2 aa 91 93 38 7c fd f9 56 cb 48 d1 53 ba +27 04 06 f9 bb ba 53 7d 49 87 d9 e2 f9 94 2d 7a +14 cb ff fe a7 4f ec dd a9 28 d2 3e 25 9f 5e e1 + +# p's CRT exponent dP: +db 16 80 2f 79 a2 f0 d4 5f 35 8d 69 fd 33 e4 4b +81 fa e8 28 62 2e 93 a5 42 53 e9 97 d0 1b 07 43 +75 9d a0 e8 12 b4 aa 4e 6c 8b ea b2 32 8d 54 31 +95 5a 41 8a 67 ff 26 a8 c5 c8 07 a5 da 35 4e 05 +ef 31 cc 8c f7 58 f4 63 73 29 50 b0 3e 26 57 26 +fb 94 e3 9d 6a 57 2a 26 24 4a b0 8d b7 57 52 ad + +# q's CRT exponent dQ: +a0 a3 17 cf e7 df 14 23 f8 7a 6d ee 84 51 f4 e2 +b4 a6 7e 54 97 f2 9b 4f 1e 4e 83 0b 9f ad d9 40 +11 67 02 6f 55 96 e5 a3 9c 97 81 7e 0f 5f 16 e2 +7e 19 ec 99 02 e0 1d 7e a6 fb 9a a3 c7 60 af ee +1e 38 1b 69 de 6a c9 c0 75 85 a0 6a d9 c4 ba 00 +bf 75 c8 ad 2f a8 98 a4 79 e8 0a e2 94 fe d2 a1 + +# CRT coefficient qInv: +0b 21 f3 35 c3 53 34 2e b4 4c 3a a2 44 45 78 0c +2d 65 5b 94 01 74 ca e3 8c 7c 8a 4e 64 93 c0 ba +9f d3 03 74 82 67 b0 83 b9 a7 a6 cb 61 e4 2d b3 +62 b8 c9 89 6d b7 06 4e 02 ad 5a e6 15 87 da 15 +b4 64 9c 90 59 49 09 fe b3 7d bc b6 54 be b7 26 +8e c8 01 e5 a8 b4 aa 39 11 be bd 88 54 2f 05 be + +# --------------------------------- +# RSAES-OAEP Encryption Example 9.1 +# --------------------------------- + +# Message to be encrypted: +f7 35 fd 55 ba 92 59 2c 3b 52 b8 f9 c4 f6 9a aa +1c be f8 fe 88 ad d0 95 59 54 12 46 7f 9c f4 ec +0b 89 6c 59 ed a1 62 10 e7 54 9c 8a bb 10 cd bc +21 a1 2e c9 b6 b5 b8 fd 2f 10 39 9e b6 + +# Seed: +8e c9 65 f1 34 a3 ec 99 31 e9 2a 1c a0 dc 81 69 +d5 ea 70 5c + +# Encryption: +26 7b cd 11 8a ca b1 fc 8b a8 1c 85 d7 30 03 cb +86 10 fa 55 c1 d9 7d a8 d4 8a 7c 7f 06 89 6a 4d +b7 51 aa 28 42 55 b9 d3 6a d6 5f 37 65 3d 82 9f +1b 37 f9 7b 80 01 94 25 45 b2 fc 2c 55 a7 37 6c +a7 a1 be 4b 17 60 c8 e0 5a 33 e5 aa 25 26 b8 d9 +8e 31 70 88 e7 83 4c 75 5b 2a 59 b1 26 31 a1 82 +c0 5d 5d 43 ab 17 79 26 4f 84 56 f5 15 ce 57 df +df 51 2d 54 93 da b7 b7 33 8d c4 b7 d7 8d b9 c0 +91 ac 3b af 53 7a 69 fc 7f 54 9d 97 9f 0e ff 9a +94 fd a4 16 9b d4 d1 d1 9a 69 c9 9e 33 c3 b5 54 +90 d5 01 b3 9b 1e da e1 18 ff 67 93 a1 53 26 15 +84 d3 a5 f3 9f 6e 68 2e 3d 17 c8 cd 12 61 fa 72 + +# --------------------------------- +# RSAES-OAEP Encryption Example 9.2 +# --------------------------------- + +# Message to be encrypted: +81 b9 06 60 50 15 a6 3a ab e4 2d df 11 e1 97 89 +12 f5 40 4c 74 74 b2 6d ce 3e d4 82 bf 96 1e cc +81 8b f4 20 c5 46 59 + +# Seed: +ec b1 b8 b2 5f a5 0c da b0 8e 56 04 28 67 f4 af +58 26 d1 6c + +# Encryption: +93 ac 9f 06 71 ec 29 ac bb 44 4e ff c1 a5 74 13 +51 d6 0f db 0e 39 3f bf 75 4a cf 0d e4 97 61 a1 +48 41 df 77 72 e9 bc 82 77 39 66 a1 58 4c 4d 72 +ba ea 00 11 8f 83 f3 5c ca 6e 53 7c bd 4d 81 1f +55 83 b2 97 83 d8 a6 d9 4c d3 1b e7 0d 6f 52 6c +10 ff 09 c6 fa 7c e0 69 79 5a 3f cd 05 11 fd 5f +cb 56 4b cc 80 ea 9c 78 f3 8b 80 01 25 39 d8 a4 +dd f6 fe 81 e9 cd db 7f 50 db bb bc c7 e5 d8 60 +97 cc f4 ec 49 18 9f b8 bf 31 8b e6 d5 a0 71 5d +51 6b 49 af 19 12 58 cd 32 dc 83 3c e6 eb 46 73 +c0 3a 19 bb ac e8 8c c5 48 95 f6 36 cc 0c 1e c8 +90 96 d1 1c e2 35 a2 65 ca 17 64 23 2a 68 9a e8 + +# --------------------------------- +# RSAES-OAEP Encryption Example 9.3 +# --------------------------------- + +# Message to be encrypted: +fd 32 64 29 df 9b 89 0e 09 b5 4b 18 b8 f3 4f 1e +24 + +# Seed: +e8 9b b0 32 c6 ce 62 2c bd b5 3b c9 46 60 14 ea +77 f7 77 c0 + +# Encryption: +81 eb dd 95 05 4b 0c 82 2e f9 ad 76 93 f5 a8 7a +df b4 b4 c4 ce 70 df 2d f8 4e d4 9c 04 da 58 ba +5f c2 0a 19 e1 a6 e8 b7 a3 90 0b 22 79 6d c4 e8 +69 ee 6b 42 79 2d 15 a8 ec eb 56 c0 9c 69 91 4e +81 3c ea 8f 69 31 e4 b8 ed 6f 42 1a f2 98 d5 95 +c9 7f 47 89 c7 ca a6 12 c7 ef 36 09 84 c2 1b 93 +ed c5 40 10 68 b5 af 4c 78 a8 77 1b 98 4d 53 b8 +ea 8a df 2f 6a 7d 4a 0b a7 6c 75 e1 dd 9f 65 8f +20 de d4 a4 60 71 d4 6d 77 91 b5 68 03 d8 fe a7 +f0 b0 f8 e4 1a e3 f0 93 83 a6 f9 58 5f e7 75 3e +aa ff d2 bf 94 56 31 08 be ec c2 07 bb b5 35 f5 +fc c7 05 f0 dd e9 f7 08 c6 2f 49 a9 c9 03 71 d3 + +# --------------------------------- +# RSAES-OAEP Encryption Example 9.4 +# --------------------------------- + +# Message to be encrypted: +f1 45 9b 5f 0c 92 f0 1a 0f 72 3a 2e 56 62 48 4d +8f 8c 0a 20 fc 29 da d6 ac d4 3b b5 f3 ef fd f4 +e1 b6 3e 07 fd fe 66 28 d0 d7 4c a1 9b f2 d6 9e +4a 0a bf 86 d2 93 92 5a 79 67 72 f8 08 8e + +# Seed: +60 6f 3b 99 c0 b9 cc d7 71 ea a2 9e a0 e4 c8 84 +f3 18 9c cc + +# Encryption: +bc c3 5f 94 cd e6 6c b1 13 66 25 d6 25 b9 44 32 +a3 5b 22 f3 d2 fa 11 a6 13 ff 0f ca 5b d5 7f 87 +b9 02 cc dc 1c d0 ae bc b0 71 5e e8 69 d1 d1 fe +39 5f 67 93 00 3f 5e ca 46 50 59 c8 86 60 d4 46 +ff 5f 08 18 55 20 22 55 7e 38 c0 8a 67 ea d9 91 +26 22 54 f1 06 82 97 5e c5 63 97 76 85 37 f4 97 +7a f6 d5 f6 aa ce b7 fb 25 de c5 93 72 30 23 1f +d8 97 8a f4 91 19 a2 9f 29 e4 24 ab 82 72 b4 75 +62 79 2d 5c 94 f7 74 b8 82 9d 0b 0d 9f 1a 8c 9e +dd f3 75 74 d5 fa 24 8e ef a9 c5 27 1f c5 ec 25 +79 c8 1b dd 61 b4 10 fa 61 fe 36 e4 24 22 1c 11 +3a dd b2 75 66 4c 80 1d 34 ca 8c 63 51 e4 a8 58 + +# --------------------------------- +# RSAES-OAEP Encryption Example 9.5 +# --------------------------------- + +# Message to be encrypted: +53 e6 e8 c7 29 d6 f9 c3 19 dd 31 7e 74 b0 db 8e +4c cc a2 5f 3c 83 05 74 6e 13 7a c6 3a 63 ef 37 +39 e7 b5 95 ab b9 6e 8d 55 e5 4f 7b d4 1a b4 33 +37 8f fb 91 1d + +# Seed: +fc bc 42 14 02 e9 ec ab c6 08 2a fa 40 ba 5f 26 +52 2c 84 0e + +# Encryption: +23 2a fb c9 27 fa 08 c2 f6 a2 7b 87 d4 a5 cb 09 +c0 7d c2 6f ae 73 d7 3a 90 55 88 39 f4 fd 66 d2 +81 b8 7e c7 34 bc e2 37 ba 16 66 98 ed 82 91 06 +a7 de 69 42 cd 6c dc e7 8f ed 8d 2e 4d 81 42 8e +66 49 0d 03 62 64 ce f9 2a f9 41 d3 e3 50 55 fe +39 81 e1 4d 29 cb b9 a4 f6 74 73 06 3b ae c7 9a +11 79 f5 a1 7c 9c 18 32 f2 83 8f d7 d5 e5 9b b9 +65 9d 56 dc e8 a0 19 ed ef 1b b3 ac cc 69 7c c6 +cc 7a 77 8f 60 a0 64 c7 f6 f5 d5 29 c6 21 02 62 +e0 03 de 58 3e 81 e3 16 7b 89 97 1f b8 c0 e1 5d +44 ff fe f8 9b 53 d8 d6 4d d7 97 d1 59 b5 6d 2b +08 ea 53 07 ea 12 c2 41 bd 58 d4 ee 27 8a 1f 2e + +# --------------------------------- +# RSAES-OAEP Encryption Example 9.6 +# --------------------------------- + +# Message to be encrypted: +b6 b2 8e a2 19 8d 0c 10 08 bc 64 + +# Seed: +23 aa de 0e 1e 08 bb 9b 9a 78 d2 30 2a 52 f9 c2 +1b 2e 1b a2 + +# Encryption: +43 8c c7 dc 08 a6 8d a2 49 e4 25 05 f8 57 3b a6 +0e 2c 27 73 d5 b2 90 f4 cf 9d ff 71 8e 84 20 81 +c3 83 e6 70 24 a0 f2 95 94 ea 98 7b 9d 25 e4 b7 +38 f2 85 97 0d 19 5a bb 3a 8c 80 54 e3 d7 9d 6b +9c 9a 83 27 ba 59 6f 12 59 e2 71 26 67 47 66 90 +7d 8d 58 2f f3 a8 47 61 54 92 9a db 1e 6d 12 35 +b2 cc b4 ec 8f 66 3b a9 cc 67 0a 92 be bd 85 3c +8d bf 69 c6 43 6d 01 6f 61 ad d8 36 e9 47 32 45 +04 34 20 7f 9f d4 c4 3d ec 2a 12 a9 58 ef a0 1e +fe 26 69 89 9b 5e 60 4c 25 5c 55 fb 71 66 de 55 +89 e3 69 59 7b b0 91 68 c0 6d d5 db 17 7e 06 a1 +74 0e b2 d5 c8 2f ae ca 6d 92 fc ee 99 31 ba 9f + +# ============================================= + +# =================================== +# Example 10: A 2048-bit RSA Key Pair +# =================================== + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +ae 45 ed 56 01 ce c6 b8 cc 05 f8 03 93 5c 67 4d +db e0 d7 5c 4c 09 fd 79 51 fc 6b 0c ae c3 13 a8 +df 39 97 0c 51 8b ff ba 5e d6 8f 3f 0d 7f 22 a4 +02 9d 41 3f 1a e0 7e 4e be 9e 41 77 ce 23 e7 f5 +40 4b 56 9e 4e e1 bd cf 3c 1f b0 3e f1 13 80 2d +4f 85 5e b9 b5 13 4b 5a 7c 80 85 ad ca e6 fa 2f +a1 41 7e c3 76 3b e1 71 b0 c6 2b 76 0e de 23 c1 +2a d9 2b 98 08 84 c6 41 f5 a8 fa c2 6b da d4 a0 +33 81 a2 2f e1 b7 54 88 50 94 c8 25 06 d4 01 9a +53 5a 28 6a fe b2 71 bb 9b a5 92 de 18 dc f6 00 +c2 ae ea e5 6e 02 f7 cf 79 fc 14 cf 3b dc 7c d8 +4f eb bb f9 50 ca 90 30 4b 22 19 a7 aa 06 3a ef +a2 c3 c1 98 0e 56 0c d6 4a fe 77 95 85 b6 10 76 +57 b9 57 85 7e fd e6 01 09 88 ab 7d e4 17 fc 88 +d8 f3 84 c4 e6 e7 2c 3f 94 3e 0c 31 c0 c4 a5 cc +36 f8 79 d8 a3 ac 9d 7d 59 86 0e aa da 6b 83 bb + +# RSA public exponent e: +01 00 01 + +# RSA private exponent d: +05 6b 04 21 6f e5 f3 54 ac 77 25 0a 4b 6b 0c 85 +25 a8 5c 59 b0 bd 80 c5 64 50 a2 2d 5f 43 8e 59 +6a 33 3a a8 75 e2 91 dd 43 f4 8c b8 8b 9d 5f c0 +d4 99 f9 fc d1 c3 97 f9 af c0 70 cd 9e 39 8c 8d +19 e6 1d b7 c7 41 0a 6b 26 75 df bf 5d 34 5b 80 +4d 20 1a dd 50 2d 5c e2 df cb 09 1c e9 99 7b be +be 57 30 6f 38 3e 4d 58 81 03 f0 36 f7 e8 5d 19 +34 d1 52 a3 23 e4 a8 db 45 1d 6f 4a 5b 1b 0f 10 +2c c1 50 e0 2f ee e2 b8 8d ea 4a d4 c1 ba cc b2 +4d 84 07 2d 14 e1 d2 4a 67 71 f7 40 8e e3 05 64 +fb 86 d4 39 3a 34 bc f0 b7 88 50 1d 19 33 03 f1 +3a 22 84 b0 01 f0 f6 49 ea f7 93 28 d4 ac 5c 43 +0a b4 41 49 20 a9 46 0e d1 b7 bc 40 ec 65 3e 87 +6d 09 ab c5 09 ae 45 b5 25 19 01 16 a0 c2 61 01 +84 82 98 50 9c 1c 3b f3 a4 83 e7 27 40 54 e1 5e +97 07 50 36 e9 89 f6 09 32 80 7b 52 57 75 1e 79 + +# Prime p: +ec f5 ae cd 1e 55 15 ff fa cb d7 5a 28 16 c6 eb +f4 90 18 cd fb 46 38 e1 85 d6 6a 73 96 b6 f8 09 +0f 80 18 c7 fd 95 cc 34 b8 57 dc 17 f0 cc 65 16 +bb 13 46 ab 4d 58 2c ad ad 7b 41 03 35 23 87 b7 +03 38 d0 84 04 7c 9d 95 39 b6 49 62 04 b3 dd 6e +a4 42 49 92 07 be c0 1f 96 42 87 ff 63 36 c3 98 +46 58 33 68 46 f5 6e 46 86 18 81 c1 02 33 d2 17 +6b f1 5a 5e 96 dd c7 80 bc 86 8a a7 7d 3c e7 69 + +# Prime q: +bc 46 c4 64 fc 6a c4 ca 78 3b 0e b0 8a 3c 84 1b +77 2f 7e 9b 2f 28 ba bd 58 8a e8 85 e1 a0 c6 1e +48 58 a0 fb 25 ac 29 99 90 f3 5b e8 51 64 c2 59 +ba 11 75 cd d7 19 27 07 13 51 84 99 2b 6c 29 b7 +46 dd 0d 2c ab e1 42 83 5f 7d 14 8c c1 61 52 4b +4a 09 94 6d 48 b8 28 47 3f 1c e7 6b 6c b6 88 6c +34 5c 03 e0 5f 41 d5 1b 5c 3a 90 a3 f2 40 73 c7 +d7 4a 4f e2 5d 9c f2 1c 75 96 0f 3f c3 86 31 83 + +# p's CRT exponent dP: +c7 35 64 57 1d 00 fb 15 d0 8a 3d e9 95 7a 50 91 +5d 71 26 e9 44 2d ac f4 2b c8 2e 86 2e 56 73 ff +6a 00 8e d4 d2 e3 74 61 7d f8 9f 17 a1 60 b4 3b +7f da 9c b6 b6 b7 42 18 60 98 15 f7 d4 5c a2 63 +c1 59 aa 32 d2 72 d1 27 fa f4 bc 8c a2 d7 73 78 +e8 ae b1 9b 0a d7 da 3c b3 de 0a e7 31 49 80 f6 +2b 6d 4b 0a 87 5d 1d f0 3c 1b ae 39 cc d8 33 ef +6c d7 e2 d9 52 8b f0 84 d1 f9 69 e7 94 e9 f6 c1 + +# q's CRT exponent dQ: +26 58 b3 7f 6d f9 c1 03 0b e1 db 68 11 7f a9 d8 +7e 39 ea 2b 69 3b 7e 6d 3a 2f 70 94 74 13 ee c6 +14 2e 18 fb 8d fc b6 ac 54 5d 7c 86 a0 ad 48 f8 +45 71 70 f0 ef b2 6b c4 81 26 c5 3e fd 1d 16 92 +01 98 dc 2a 11 07 dc 28 2d b6 a8 0c d3 06 23 60 +ba 3f a1 3f 70 e4 31 2f f1 a6 cd 6b 8f c4 cd 9c +5c 3d b1 7c 6d 6a 57 21 2f 73 ae 29 f6 19 32 7b +ad 59 b1 53 85 85 85 ba 4e 28 b6 0a 62 a4 5e 49 + +# CRT coefficient qInv: +6f 38 52 6b 39 25 08 55 34 ef 3e 41 5a 83 6e de +8b 86 15 8a 2c 7c bf ec cb 0b d8 34 30 4f ec 68 +3b a8 d4 f4 79 c4 33 d4 34 16 e6 32 69 62 3c ea +10 07 76 d8 5a ff 40 1d 3f ff 61 0e e6 54 11 ce +3b 13 63 d6 3a 97 09 ee de 42 64 7c ea 56 14 93 +d5 45 70 a8 79 c1 86 82 cd 97 71 0b 96 20 5e c3 +11 17 d7 3b 5f 36 22 3f ad d6 e8 ba 90 dd 7c 0e +e6 1d 44 e1 63 25 1e 20 c7 f6 6e b3 05 11 7c b8 + +# ---------------------------------- +# RSAES-OAEP Encryption Example 10.1 +# ---------------------------------- + +# Message to be encrypted: +8b ba 6b f8 2a 6c 0f 86 d5 f1 75 6e 97 95 68 70 +b0 89 53 b0 6b 4e b2 05 bc 16 94 ee + +# Seed: +47 e1 ab 71 19 fe e5 6c 95 ee 5e aa d8 6f 40 d0 +aa 63 bd 33 + +# Encryption: +53 ea 5d c0 8c d2 60 fb 3b 85 85 67 28 7f a9 15 +52 c3 0b 2f eb fb a2 13 f0 ae 87 70 2d 06 8d 19 +ba b0 7f e5 74 52 3d fb 42 13 9d 68 c3 c5 af ee +e0 bf e4 cb 79 69 cb f3 82 b8 04 d6 e6 13 96 14 +4e 2d 0e 60 74 1f 89 93 c3 01 4b 58 b9 b1 95 7a +8b ab cd 23 af 85 4f 4c 35 6f b1 66 2a a7 2b fc +c7 e5 86 55 9d c4 28 0d 16 0c 12 67 85 a7 23 eb +ee be ff 71 f1 15 94 44 0a ae f8 7d 10 79 3a 87 +74 a2 39 d4 a0 4c 87 fe 14 67 b9 da f8 52 08 ec +6c 72 55 79 4a 96 cc 29 14 2f 9a 8b d4 18 e3 c1 +fd 67 34 4b 0c d0 82 9d f3 b2 be c6 02 53 19 62 +93 c6 b3 4d 3f 75 d3 2f 21 3d d4 5c 62 73 d5 05 +ad f4 cc ed 10 57 cb 75 8f c2 6a ee fa 44 12 55 +ed 4e 64 c1 99 ee 07 5e 7f 16 64 61 82 fd b4 64 +73 9b 68 ab 5d af f0 e6 3e 95 52 01 68 24 f0 54 +bf 4d 3c 8c 90 a9 7b b6 b6 55 32 84 eb 42 9f cc + +# ---------------------------------- +# RSAES-OAEP Encryption Example 10.2 +# ---------------------------------- + +# Message to be encrypted: +e6 ad 18 1f 05 3b 58 a9 04 f2 45 75 10 37 3e 57 + +# Seed: +6d 17 f5 b4 c1 ff ac 35 1d 19 5b f7 b0 9d 09 f0 +9a 40 79 cf + +# Encryption: +a2 b1 a4 30 a9 d6 57 e2 fa 1c 2b b5 ed 43 ff b2 +5c 05 a3 08 fe 90 93 c0 10 31 79 5f 58 74 40 01 +10 82 8a e5 8f b9 b5 81 ce 9d dd d3 e5 49 ae 04 +a0 98 54 59 bd e6 c6 26 59 4e 7b 05 dc 42 78 b2 +a1 46 5c 13 68 40 88 23 c8 5e 96 dc 66 c3 a3 09 +83 c6 39 66 4f c4 56 9a 37 fe 21 e5 a1 95 b5 77 +6e ed 2d f8 d8 d3 61 af 68 6e 75 02 29 bb d6 63 +f1 61 86 8a 50 61 5e 0c 33 7b ec 0c a3 5f ec 0b +b1 9c 36 eb 2e 0b bc c0 58 2f a1 d9 3a ac db 06 +10 63 f5 9f 2c e1 ee 43 60 5e 5d 89 ec a1 83 d2 +ac df e9 f8 10 11 02 2a d3 b4 3a 3d d4 17 da c9 +4b 4e 11 ea 81 b1 92 96 6e 96 6b 18 20 82 e7 19 +64 60 7b 4f 80 02 f3 62 99 84 4a 11 f2 ae 0f ae +ac 2e ae 70 f8 f4 f9 80 88 ac dc d0 ac 55 6e 9f +cc c5 11 52 19 08 fa d2 6f 04 c6 42 01 45 03 05 +77 87 58 b0 53 8b f8 b5 bb 14 4a 82 8e 62 97 95 + +# ---------------------------------- +# RSAES-OAEP Encryption Example 10.3 +# ---------------------------------- + +# Message to be encrypted: +51 0a 2c f6 0e 86 6f a2 34 05 53 c9 4e a3 9f bc +25 63 11 e8 3e 94 45 4b 41 24 + +# Seed: +38 53 87 51 4d ec cc 7c 74 0d d8 cd f9 da ee 49 +a1 cb fd 54 + +# Encryption: +98 86 c3 e6 76 4a 8b 9a 84 e8 41 48 eb d8 c3 b1 +aa 80 50 38 1a 78 f6 68 71 4c 16 d9 cf d2 a6 ed +c5 69 79 c5 35 d9 de e3 b4 4b 85 c1 8b e8 92 89 +92 37 17 11 47 22 16 d9 5d da 98 d2 ee 83 47 c9 +b1 4d ff df f8 4a a4 8d 25 ac 06 f7 d7 e6 53 98 +ac 96 7b 1c e9 09 25 f6 7d ce 04 9b 7f 81 2d b0 +74 29 97 a7 4d 44 fe 81 db e0 e7 a3 fe af 2e 5c +40 af 88 8d 55 0d db be 3b c2 06 57 a2 95 43 f8 +fc 29 13 b9 bd 1a 61 b2 ab 22 56 ec 40 9b bd 7d +c0 d1 77 17 ea 25 c4 3f 42 ed 27 df 87 38 bf 4a +fc 67 66 ff 7a ff 08 59 55 5e e2 83 92 0f 4c 8a +63 c4 a7 34 0c ba fd dc 33 9e cd b4 b0 51 50 02 +f9 6c 93 2b 5b 79 16 7a f6 99 c0 ad 3f cc fd f0 +f4 4e 85 a7 02 62 bf 2e 18 fe 34 b8 50 58 99 75 +e8 67 ff 96 9d 48 ea bf 21 22 71 54 6c dc 05 a6 +9e cb 52 6e 52 87 0c 83 6f 30 7b d7 98 78 0e de + +# ---------------------------------- +# RSAES-OAEP Encryption Example 10.4 +# ---------------------------------- + +# Message to be encrypted: +bc dd 19 0d a3 b7 d3 00 df 9a 06 e2 2c aa e2 a7 +5f 10 c9 1f f6 67 b7 c1 6b de 8b 53 06 4a 26 49 +a9 40 45 c9 + +# Seed: +5c ac a6 a0 f7 64 16 1a 96 84 f8 5d 92 b6 e0 ef +37 ca 8b 65 + +# Encryption: +63 18 e9 fb 5c 0d 05 e5 30 7e 16 83 43 6e 90 32 +93 ac 46 42 35 8a aa 22 3d 71 63 01 3a ba 87 e2 +df da 8e 60 c6 86 0e 29 a1 e9 26 86 16 3e a0 b9 +17 5f 32 9c a3 b1 31 a1 ed d3 a7 77 59 a8 b9 7b +ad 6a 4f 8f 43 96 f2 8c f6 f3 9c a5 81 12 e4 81 +60 d6 e2 03 da a5 85 6f 3a ca 5f fe d5 77 af 49 +94 08 e3 df d2 33 e3 e6 04 db e3 4a 9c 4c 90 82 +de 65 52 7c ac 63 31 d2 9d c8 0e 05 08 a0 fa 71 +22 e7 f3 29 f6 cc a5 cf a3 4d 4d 1d a4 17 80 54 +57 e0 08 be c5 49 e4 78 ff 9e 12 a7 63 c4 77 d1 +5b bb 78 f5 b6 9b d5 78 30 fc 2c 4e d6 86 d7 9b +c7 2a 95 d8 5f 88 13 4c 6b 0a fe 56 a8 cc fb c8 +55 82 8b b3 39 bd 17 90 9c f1 d7 0d e3 33 5a e0 +70 39 09 3e 60 6d 65 53 65 de 65 50 b8 72 cd 6d +e1 d4 40 ee 03 1b 61 94 5f 62 9a d8 a3 53 b0 d4 +09 39 e9 6a 3c 45 0d 2a 8d 5e ee 9f 67 80 93 c8 + +# ---------------------------------- +# RSAES-OAEP Encryption Example 10.5 +# ---------------------------------- + +# Message to be encrypted: +a7 dd 6c 7d c2 4b 46 f9 dd 5f 1e 91 ad a4 c3 b3 +df 94 7e 87 72 32 a9 + +# Seed: +95 bc a9 e3 85 98 94 b3 dd 86 9f a7 ec d5 bb c6 +40 1b f3 e4 + +# Encryption: +75 29 08 72 cc fd 4a 45 05 66 0d 65 1f 56 da 6d +aa 09 ca 13 01 d8 90 63 2f 6a 99 2f 3d 56 5c ee +46 4a fd ed 40 ed 3b 5b e9 35 67 14 ea 5a a7 65 +5f 4a 13 66 c2 f1 7c 72 8f 6f 2c 5a 5d 1f 8e 28 +42 9b c4 e6 f8 f2 cf f8 da 8d c0 e0 a9 80 8e 45 +fd 09 ea 2f a4 0c b2 b6 ce 6f ff f5 c0 e1 59 d1 +1b 68 d9 0a 85 f7 b8 4e 10 3b 09 e6 82 66 64 80 +c6 57 50 5c 09 29 25 94 68 a3 14 78 6d 74 ea b1 +31 57 3c f2 34 bf 57 db 7d 9e 66 cc 67 48 19 2e +00 2d c0 de ea 93 05 85 f0 83 1f dc d9 bc 33 d5 +1f 79 ed 2f fc 16 bc f4 d5 98 12 fc eb ca a3 f9 +06 9b 0e 44 56 86 d6 44 c2 5c cf 63 b4 56 ee 5f +a6 ff e9 6f 19 cd f7 51 fe d9 ea f3 59 57 75 4d +bf 4b fe a5 21 6a a1 84 4d c5 07 cb 2d 08 0e 72 +2e ba 15 03 08 c2 b5 ff 11 93 62 0f 17 66 ec f4 +48 1b af b9 43 bd 29 28 77 f2 13 6c a4 94 ab a0 + +# ---------------------------------- +# RSAES-OAEP Encryption Example 10.6 +# ---------------------------------- + +# Message to be encrypted: +ea f1 a7 3a 1b 0c 46 09 53 7d e6 9c d9 22 8b bc +fb 9a 8c a8 c6 c3 ef af 05 6f e4 a7 f4 63 4e d0 +0b 7c 39 ec 69 22 d7 b8 ea 2c 04 eb ac + +# Seed: +9f 47 dd f4 2e 97 ee a8 56 a9 bd bc 71 4e b3 ac +22 f6 eb 32 + +# Encryption: +2d 20 7a 73 43 2a 8f b4 c0 30 51 b3 f7 3b 28 a6 +17 64 09 8d fa 34 c4 7a 20 99 5f 81 15 aa 68 16 +67 9b 55 7e 82 db ee 58 49 08 c6 e6 97 82 d7 de +b3 4d bd 65 af 06 3d 57 fc a7 6a 5f d0 69 49 2f +d6 06 8d 99 84 d2 09 35 05 65 a6 2e 5c 77 f2 30 +38 c1 2c b1 0c 66 34 70 9b 54 7c 46 f6 b4 a7 09 +bd 85 ca 12 2d 74 46 5e f9 77 62 c2 97 63 e0 6d +bc 7a 9e 73 8c 78 bf ca 01 02 dc 5e 79 d6 5b 97 +3f 28 24 0c aa b2 e1 61 a7 8b 57 d2 62 45 7e d8 +19 5d 53 e3 c7 ae 9d a0 21 88 3c 6d b7 c2 4a fd +d2 32 2e ac 97 2a d3 c3 54 c5 fc ef 1e 14 6c 3a +02 90 fb 67 ad f0 07 06 6e 00 42 8d 2c ec 18 ce +58 f9 32 86 98 de fe f4 b2 eb 5e c7 69 18 fd e1 +c1 98 cb b3 8b 7a fc 67 62 6a 9a ef ec 43 22 bf +d9 0d 25 63 48 1c 9a 22 1f 78 c8 27 2c 82 d1 b6 +2a b9 14 e1 c6 9f 6a f6 ef 30 ca 52 60 db 4a 46 + +# ============================================= diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/rsa-testvectors/pkcs1v15crypt-vectors.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/notes/rsa-testvectors/pkcs1v15crypt-vectors.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,5463 @@ +/* Generated from file: pkcs1v15crypt-vectors.txt + * with md5 hash: 120f611de26e7eb0f0e16da16639539c + */ + + +typedef struct rsaKey { + int n_l; + unsigned char n[256]; + int e_l; + unsigned char e[256]; + int d_l; + unsigned char d[256]; + int p_l; + unsigned char p[256]; + int q_l; + unsigned char q[256]; + int dP_l; + unsigned char dP[256]; + int dQ_l; + unsigned char dQ[256]; + int qInv_l; + unsigned char qInv[256]; +} rsaKey_t; + +typedef struct rsaData { + const char* name; + int o1_l; + unsigned char o1[256]; + int o2_l; + unsigned char o2[256]; + int o3_l; + unsigned char o3[256]; +} rsaData_t; + +typedef struct testcase { + const char* name; + rsaKey_t rsa; +#ifdef LTC_TEST_EXT + rsaData_t data[20]; +#else + rsaData_t data[1]; +#endif /* LTC_TEST_EXT */ +} testcase_t; + +testcase_t testcases_eme[] = + { +{ + "Example 1: A 1024-bit RSA key pair", +{ + /* Modulus */ + 128, + { 0xa8, 0xb3, 0xb2, 0x84, 0xaf, 0x8e, 0xb5, 0x0b, 0x38, 0x70, 0x34, 0xa8, 0x60, 0xf1, 0x46, 0xc4, 0x91, 0x9f, 0x31, 0x87, 0x63, 0xcd, 0x6c, 0x55, 0x98, 0xc8, 0xae, 0x48, 0x11, 0xa1, 0xe0, 0xab, 0xc4, 0xc7, 0xe0, 0xb0, 0x82, 0xd6, 0x93, 0xa5, 0xe7, 0xfc, 0xed, 0x67, 0x5c, 0xf4, 0x66, 0x85, 0x12, 0x77, 0x2c, 0x0c, 0xbc, 0x64, 0xa7, 0x42, 0xc6, 0xc6, 0x30, 0xf5, 0x33, 0xc8, 0xcc, 0x72, 0xf6, 0x2a, 0xe8, 0x33, 0xc4, 0x0b, 0xf2, 0x58, 0x42, 0xe9, 0x84, 0xbb, 0x78, 0xbd, 0xbf, 0x97, 0xc0, 0x10, 0x7d, 0x55, 0xbd, 0xb6, 0x62, 0xf5, 0xc4, 0xe0, 0xfa, 0xb9, 0x84, 0x5c, 0xb5, 0x14, 0x8e, 0xf7, 0x39, 0x2d, 0xd3, 0xaa, 0xff, 0x93, 0xae, 0x1e, 0x6b, 0x66, 0x7b, 0xb3, 0xd4, 0x24, 0x76, 0x16, 0xd4, 0xf5, 0xba, 0x10, 0xd4, 0xcf, 0xd2, 0x26, 0xde, 0x88, 0xd3, 0x9f, 0x16, 0xfb } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 128, + { 0x53, 0x33, 0x9c, 0xfd, 0xb7, 0x9f, 0xc8, 0x46, 0x6a, 0x65, 0x5c, 0x73, 0x16, 0xac, 0xa8, 0x5c, 0x55, 0xfd, 0x8f, 0x6d, 0xd8, 0x98, 0xfd, 0xaf, 0x11, 0x95, 0x17, 0xef, 0x4f, 0x52, 0xe8, 0xfd, 0x8e, 0x25, 0x8d, 0xf9, 0x3f, 0xee, 0x18, 0x0f, 0xa0, 0xe4, 0xab, 0x29, 0x69, 0x3c, 0xd8, 0x3b, 0x15, 0x2a, 0x55, 0x3d, 0x4a, 0xc4, 0xd1, 0x81, 0x2b, 0x8b, 0x9f, 0xa5, 0xaf, 0x0e, 0x7f, 0x55, 0xfe, 0x73, 0x04, 0xdf, 0x41, 0x57, 0x09, 0x26, 0xf3, 0x31, 0x1f, 0x15, 0xc4, 0xd6, 0x5a, 0x73, 0x2c, 0x48, 0x31, 0x16, 0xee, 0x3d, 0x3d, 0x2d, 0x0a, 0xf3, 0x54, 0x9a, 0xd9, 0xbf, 0x7c, 0xbf, 0xb7, 0x8a, 0xd8, 0x84, 0xf8, 0x4d, 0x5b, 0xeb, 0x04, 0x72, 0x4d, 0xc7, 0x36, 0x9b, 0x31, 0xde, 0xf3, 0x7d, 0x0c, 0xf5, 0x39, 0xe9, 0xcf, 0xcd, 0xd3, 0xde, 0x65, 0x37, 0x29, 0xea, 0xd5, 0xd1 } +, + /* Prime 1 */ + 64, + { 0xd3, 0x27, 0x37, 0xe7, 0x26, 0x7f, 0xfe, 0x13, 0x41, 0xb2, 0xd5, 0xc0, 0xd1, 0x50, 0xa8, 0x1b, 0x58, 0x6f, 0xb3, 0x13, 0x2b, 0xed, 0x2f, 0x8d, 0x52, 0x62, 0x86, 0x4a, 0x9c, 0xb9, 0xf3, 0x0a, 0xf3, 0x8b, 0xe4, 0x48, 0x59, 0x8d, 0x41, 0x3a, 0x17, 0x2e, 0xfb, 0x80, 0x2c, 0x21, 0xac, 0xf1, 0xc1, 0x1c, 0x52, 0x0c, 0x2f, 0x26, 0xa4, 0x71, 0xdc, 0xad, 0x21, 0x2e, 0xac, 0x7c, 0xa3, 0x9d } +, + /* Prime 2 */ + 64, + { 0xcc, 0x88, 0x53, 0xd1, 0xd5, 0x4d, 0xa6, 0x30, 0xfa, 0xc0, 0x04, 0xf4, 0x71, 0xf2, 0x81, 0xc7, 0xb8, 0x98, 0x2d, 0x82, 0x24, 0xa4, 0x90, 0xed, 0xbe, 0xb3, 0x3d, 0x3e, 0x3d, 0x5c, 0xc9, 0x3c, 0x47, 0x65, 0x70, 0x3d, 0x1d, 0xd7, 0x91, 0x64, 0x2f, 0x1f, 0x11, 0x6a, 0x0d, 0xd8, 0x52, 0xbe, 0x24, 0x19, 0xb2, 0xaf, 0x72, 0xbf, 0xe9, 0xa0, 0x30, 0xe8, 0x60, 0xb0, 0x28, 0x8b, 0x5d, 0x77 } +, + /* Prime exponent 1 */ + 64, + { 0x0e, 0x12, 0xbf, 0x17, 0x18, 0xe9, 0xce, 0xf5, 0x59, 0x9b, 0xa1, 0xc3, 0x88, 0x2f, 0xe8, 0x04, 0x6a, 0x90, 0x87, 0x4e, 0xef, 0xce, 0x8f, 0x2c, 0xcc, 0x20, 0xe4, 0xf2, 0x74, 0x1f, 0xb0, 0xa3, 0x3a, 0x38, 0x48, 0xae, 0xc9, 0xc9, 0x30, 0x5f, 0xbe, 0xcb, 0xd2, 0xd7, 0x68, 0x19, 0x96, 0x7d, 0x46, 0x71, 0xac, 0xc6, 0x43, 0x1e, 0x40, 0x37, 0x96, 0x8d, 0xb3, 0x78, 0x78, 0xe6, 0x95, 0xc1 } +, + /* Prime exponent 2 */ + 64, + { 0x95, 0x29, 0x7b, 0x0f, 0x95, 0xa2, 0xfa, 0x67, 0xd0, 0x07, 0x07, 0xd6, 0x09, 0xdf, 0xd4, 0xfc, 0x05, 0xc8, 0x9d, 0xaf, 0xc2, 0xef, 0x6d, 0x6e, 0xa5, 0x5b, 0xec, 0x77, 0x1e, 0xa3, 0x33, 0x73, 0x4d, 0x92, 0x51, 0xe7, 0x90, 0x82, 0xec, 0xda, 0x86, 0x6e, 0xfe, 0xf1, 0x3c, 0x45, 0x9e, 0x1a, 0x63, 0x13, 0x86, 0xb7, 0xe3, 0x54, 0xc8, 0x99, 0xf5, 0xf1, 0x12, 0xca, 0x85, 0xd7, 0x15, 0x83 } +, + /* Coefficient */ + 64, + { 0x4f, 0x45, 0x6c, 0x50, 0x24, 0x93, 0xbd, 0xc0, 0xed, 0x2a, 0xb7, 0x56, 0xa3, 0xa6, 0xed, 0x4d, 0x67, 0x35, 0x2a, 0x69, 0x7d, 0x42, 0x16, 0xe9, 0x32, 0x12, 0xb1, 0x27, 0xa6, 0x3d, 0x54, 0x11, 0xce, 0x6f, 0xa9, 0x8d, 0x5d, 0xbe, 0xfd, 0x73, 0x26, 0x3e, 0x37, 0x28, 0x14, 0x27, 0x43, 0x81, 0x81, 0x66, 0xed, 0x7d, 0xd6, 0x36, 0x87, 0xdd, 0x2a, 0x8c, 0xa1, 0xd2, 0xf4, 0xfb, 0xd8, 0xe1 } + +} +, +{{ + "PKCS#1 v1.5 Encryption Example 1.1", + /* Message */ + 28, + { 0x66, 0x28, 0x19, 0x4e, 0x12, 0x07, 0x3d, 0xb0, 0x3b, 0xa9, 0x4c, 0xda, 0x9e, 0xf9, 0x53, 0x23, 0x97, 0xd5, 0x0d, 0xba, 0x79, 0xb9, 0x87, 0x00, 0x4a, 0xfe, 0xfe, 0x34 } +, + /* Seed */ + 97, + { 0x01, 0x73, 0x41, 0xae, 0x38, 0x75, 0xd5, 0xf8, 0x71, 0x01, 0xf8, 0xcc, 0x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0x85, 0xf4, 0x49, 0xee, 0x61, 0xdd, 0x7b, 0x42, 0xee, 0x5b, 0x58, 0x92, 0xcb, 0x90, 0x60, 0x1f, 0x30, 0xcd, 0xa0, 0x7b, 0xf2, 0x64, 0x89, 0x31, 0x0b, 0xcd, 0x23, 0xb5, 0x28, 0xce, 0xab, 0x3c, 0x31 } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Encryption Example 1.2", + /* Message */ + 28, + { 0x75, 0x0c, 0x40, 0x47, 0xf5, 0x47, 0xe8, 0xe4, 0x14, 0x11, 0x85, 0x65, 0x23, 0x29, 0x8a, 0xc9, 0xba, 0xe2, 0x45, 0xef, 0xaf, 0x13, 0x97, 0xfb, 0xe5, 0x6f, 0x9d, 0xd5 } +, + /* Seed */ + 97, + { 0xac, 0x47, 0x28, 0xa8, 0x42, 0x8c, 0x1e, 0x52, 0x24, 0x71, 0xa8, 0xdf, 0x73, 0x5a, 0x8e, 0x92, 0x92, 0xaf, 0x0d, 0x55, 0xbc, 0xb7, 0x3a, 0x12, 0xac, 0x32, 0xc2, 0x64, 0xf3, 0x88, 0x1c, 0x7c, 0x8a, 0x71, 0x0f, 0x70, 0xfe, 0xb1, 0x04, 0x85, 0xc8, 0x37, 0x0f, 0x78, 0x1f, 0xff, 0xd0, 0x21, 0x81, 0x6f, 0x05, 0x87, 0x39, 0x76, 0x6d, 0xa0, 0xa9, 0xc9, 0xdb, 0x0e, 0xae, 0x7e, 0x9a, 0x25, 0xb6, 0xc4, 0x33, 0x18, 0xd0, 0xca, 0xac, 0x23, 0x65, 0x22, 0xca, 0x31, 0x0f, 0x17, 0xfc, 0x52, 0xad, 0x42, 0x29, 0xc8, 0x3a, 0x24, 0xe9, 0xe5, 0x45, 0xeb, 0x35, 0xe9, 0x82, 0x6d, 0x55, 0x9f, 0x57 } +, + /* Encryption */ + 128, + { 0x68, 0x42, 0xe5, 0xe2, 0xcc, 0x00, 0x41, 0xd6, 0xb0, 0xc8, 0x1a, 0x56, 0x2c, 0x39, 0xa6, 0x17, 0x37, 0x9a, 0x51, 0x5c, 0xab, 0x74, 0xab, 0xcb, 0x26, 0x19, 0xc7, 0x74, 0x0a, 0x54, 0x1d, 0x95, 0x55, 0xdd, 0x91, 0x65, 0x97, 0x5b, 0xf8, 0xa3, 0xeb, 0xd0, 0xd0, 0x45, 0x66, 0x61, 0xdf, 0xb1, 0xa6, 0x86, 0x1b, 0xa2, 0x33, 0x22, 0x69, 0x93, 0x0e, 0x0d, 0xb5, 0x14, 0xfc, 0xa0, 0x73, 0x3e, 0xeb, 0x9c, 0x40, 0x57, 0x13, 0xeb, 0x1f, 0x9d, 0x76, 0x80, 0x33, 0xed, 0x29, 0x3e, 0x1e, 0x08, 0x1a, 0x12, 0x5f, 0x32, 0xdd, 0xb9, 0xea, 0x52, 0xed, 0xbe, 0x27, 0x5c, 0x4a, 0xf6, 0x0f, 0x8a, 0x7b, 0xf8, 0x32, 0xbd, 0x22, 0x75, 0x61, 0xc2, 0x08, 0xdc, 0x00, 0x31, 0xa8, 0x4b, 0x50, 0x12, 0xc9, 0xdd, 0x9f, 0x74, 0x45, 0x9d, 0xcb, 0x07, 0x0b, 0xdb, 0xe1, 0x3c, 0xfa, 0x8c, 0x2d, 0x50 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 1.3", + /* Message */ + 55, + { 0xd9, 0x4a, 0xe0, 0x83, 0x2e, 0x64, 0x45, 0xce, 0x42, 0x33, 0x1c, 0xb0, 0x6d, 0x53, 0x1a, 0x82, 0xb1, 0xdb, 0x4b, 0xaa, 0xd3, 0x0f, 0x74, 0x6d, 0xc9, 0x16, 0xdf, 0x24, 0xd4, 0xe3, 0xc2, 0x45, 0x1f, 0xff, 0x59, 0xa6, 0x42, 0x3e, 0xb0, 0xe1, 0xd0, 0x2d, 0x4f, 0xe6, 0x46, 0xcf, 0x69, 0x9d, 0xfd, 0x81, 0x8c, 0x6e, 0x97, 0xb0, 0x51 } +, + /* Seed */ + 70, + { 0xd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, 0x19, 0x2a, 0x48, 0x1d, 0x00, 0x75, 0xbf, 0xc7, 0xce, 0x02, 0x82, 0x12, 0xcd, 0x27, 0xbe, 0xbe } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 1.4", + /* Message */ + 26, + { 0x52, 0xe6, 0x50, 0xd9, 0x8e, 0x7f, 0x2a, 0x04, 0x8b, 0x4f, 0x86, 0x85, 0x21, 0x53, 0xb9, 0x7e, 0x01, 0xdd, 0x31, 0x6f, 0x34, 0x6a, 0x19, 0xf6, 0x7a, 0x85 } +, + /* Seed */ + 99, + { 0x26, 0x29, 0xa7, 0xaa, 0xc0, 0xc3, 0x90, 0x5e, 0x83, 0x1e, 0xb6, 0x02, 0x38, 0x8c, 0x54, 0x5a, 0xf5, 0x54, 0xb9, 0x6b, 0x2a, 0xe5, 0x15, 0x32, 0xe9, 0xcc, 0xdb, 0x89, 0x72, 0xef, 0x30, 0xb6, 0x4a, 0x2f, 0x98, 0xc6, 0x95, 0x29, 0x7a, 0x01, 0xc5, 0x81, 0x2a, 0x2c, 0x40, 0x15, 0x82, 0xf3, 0x7b, 0x14, 0x4a, 0x3e, 0x90, 0xe5, 0x9d, 0x81, 0xb6, 0x90, 0x39, 0xc6, 0x4b, 0x84, 0x4b, 0x02, 0x8c, 0x10, 0x5c, 0x8e, 0x68, 0x36, 0x15, 0xaf, 0xb6, 0x58, 0xb6, 0xc4, 0xd9, 0xf3, 0x82, 0x38, 0xa7, 0x63, 0x01, 0xbb, 0x14, 0x44, 0x91, 0x13, 0xb6, 0x9d, 0xe1, 0x26, 0x04, 0x5e, 0x26, 0xf1, 0x3e, 0xe6, 0xd7 } +, + /* Encryption */ + 128, + { 0x54, 0xdd, 0xb7, 0x84, 0x26, 0x8e, 0xad, 0xb3, 0x95, 0x5b, 0xd9, 0xf9, 0x49, 0x88, 0x42, 0x59, 0x5a, 0xd2, 0x9f, 0xf8, 0xa6, 0x67, 0xfe, 0xb4, 0x1f, 0x6f, 0x53, 0x0c, 0xb6, 0x0b, 0xc9, 0x26, 0xac, 0x6c, 0x71, 0xc7, 0x72, 0xf8, 0x03, 0xd0, 0x22, 0xb4, 0x1c, 0xa5, 0x72, 0x04, 0x22, 0x3b, 0x27, 0xca, 0x79, 0xec, 0x5b, 0x72, 0x65, 0x2c, 0xa9, 0xaf, 0xbf, 0x40, 0xdc, 0x2f, 0x6a, 0x0e, 0x13, 0xbc, 0xd6, 0x0d, 0x37, 0xf7, 0x95, 0x04, 0xb0, 0xff, 0xcc, 0x01, 0xcf, 0x53, 0x42, 0xd6, 0xd3, 0x4a, 0xc6, 0xf1, 0xf2, 0xf9, 0xf2, 0xf4, 0x87, 0x46, 0x25, 0xb9, 0xfd, 0xbb, 0x7d, 0xda, 0x2e, 0xc8, 0x7d, 0xf0, 0xcf, 0x87, 0x25, 0x97, 0x98, 0xdf, 0x86, 0xa0, 0x6b, 0xd5, 0xae, 0xf7, 0x35, 0x4b, 0x8c, 0xb1, 0xcb, 0x13, 0x75, 0x75, 0xf4, 0xcf, 0xbc, 0x46, 0x28, 0x1b, 0xb3, 0x31 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 1.5", + /* Message */ + 20, + { 0x8d, 0xa8, 0x9f, 0xd9, 0xe5, 0xf9, 0x74, 0xa2, 0x9f, 0xef, 0xfb, 0x46, 0x2b, 0x49, 0x18, 0x0f, 0x6c, 0xf9, 0xe8, 0x02 } +, + /* Seed */ + 105, + { 0xc3, 0xca, 0x84, 0x60, 0x0f, 0x35, 0xc8, 0x65, 0x5f, 0xc7, 0xc6, 0x4c, 0x75, 0xc5, 0x87, 0x38, 0x53, 0xd3, 0xaa, 0x8a, 0x94, 0x26, 0xa5, 0x1b, 0x63, 0xd7, 0xe7, 0x5d, 0xcf, 0x6c, 0xae, 0x97, 0xa4, 0x25, 0x3f, 0xba, 0x87, 0x1d, 0x6f, 0x96, 0x89, 0x97, 0x19, 0x9b, 0xf0, 0x1b, 0x6a, 0x4d, 0x34, 0x28, 0xce, 0x4c, 0x96, 0xd1, 0xc4, 0x87, 0xb2, 0x83, 0x0c, 0xb9, 0xe3, 0x5d, 0x64, 0x05, 0x56, 0x23, 0x69, 0x9a, 0xb4, 0x97, 0x9a, 0x02, 0x58, 0x4b, 0x92, 0xe6, 0xba, 0x39, 0xe7, 0x57, 0x28, 0x40, 0x79, 0xab, 0xf1, 0x33, 0xa7, 0xda, 0x54, 0xe5, 0x42, 0x52, 0x17, 0xa2, 0x10, 0xf6, 0x7c, 0x18, 0x26, 0x9b, 0x51, 0x1f, 0x61, 0xf8, 0xc5 } +, + /* Encryption */ + 128, + { 0xa8, 0x55, 0x48, 0x01, 0x3b, 0xd0, 0xe2, 0x0e, 0xe0, 0xeb, 0xd3, 0x6f, 0xb7, 0x48, 0x97, 0x7f, 0x98, 0x58, 0x46, 0xd7, 0x61, 0x0e, 0xed, 0x24, 0xc3, 0x6c, 0xd8, 0x30, 0x33, 0xdd, 0x2a, 0xa4, 0x58, 0x0b, 0xd1, 0x53, 0x35, 0x20, 0x9d, 0xcf, 0x78, 0x2e, 0xe2, 0x6c, 0x48, 0xc3, 0x06, 0x44, 0xb0, 0xb5, 0xcc, 0x86, 0xc8, 0xcd, 0x16, 0x5a, 0xe2, 0x1e, 0xad, 0xf5, 0x78, 0x04, 0x18, 0x67, 0x76, 0x07, 0x03, 0x18, 0x75, 0xe2, 0x21, 0xec, 0xdf, 0x3b, 0x10, 0x57, 0x31, 0x6f, 0x3f, 0x12, 0xa4, 0x7d, 0x5d, 0xa4, 0x0c, 0x41, 0x53, 0x9b, 0x63, 0x64, 0x30, 0xda, 0x2e, 0x54, 0x21, 0x90, 0x11, 0x9e, 0x42, 0x9c, 0x53, 0xc2, 0x22, 0x6f, 0x95, 0x9b, 0x19, 0xcc, 0xf4, 0x8a, 0x3d, 0x24, 0x02, 0x17, 0xc4, 0xde, 0x70, 0xd7, 0x07, 0x2a, 0x7e, 0x0d, 0x95, 0xb6, 0x16, 0xd1, 0x15, 0xa8 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 1.6", + /* Message */ + 7, + { 0x26, 0x52, 0x10, 0x50, 0x84, 0x42, 0x71 } +, + /* Seed */ + 118, + { 0x3c, 0x6a, 0x04, 0x71, 0xda, 0xf0, 0x0b, 0x7c, 0x2e, 0xfc, 0x9e, 0xe8, 0x80, 0x41, 0x65, 0x4f, 0x87, 0x62, 0x90, 0x07, 0xc1, 0x24, 0x32, 0x22, 0x11, 0xa5, 0xf4, 0xea, 0x3c, 0x58, 0x23, 0x85, 0x7b, 0xc8, 0xfc, 0x7e, 0x21, 0xc9, 0x45, 0x48, 0xb0, 0xee, 0xbd, 0xcf, 0xf7, 0x91, 0x60, 0xe1, 0x12, 0x46, 0x1e, 0x40, 0x50, 0x91, 0x10, 0xcf, 0xdc, 0x4f, 0x0f, 0x13, 0xc7, 0xfb, 0x92, 0x1a, 0xba, 0xc8, 0xdf, 0xaa, 0xc2, 0x1a, 0xcb, 0x0f, 0x7b, 0x8a, 0x13, 0xa4, 0xb5, 0xcc, 0xa5, 0x23, 0xd5, 0xc7, 0xdd, 0xf7, 0x05, 0x23, 0xeb, 0x57, 0x0c, 0x59, 0xb6, 0xc7, 0xae, 0x97, 0x67, 0xe4, 0xec, 0x9a, 0x63, 0xd1, 0x13, 0x6d, 0x10, 0x23, 0x1b, 0x40, 0x1e, 0x20, 0xe7, 0x41, 0x02, 0x84, 0x83, 0x48, 0x01, 0x7a, 0x16, 0x16 } +, + /* Encryption */ + 128, + { 0x5e, 0x51, 0x43, 0x63, 0x28, 0x7d, 0xe9, 0xb3, 0x80, 0x04, 0x8c, 0xc4, 0x43, 0x5d, 0x53, 0x29, 0x4a, 0xd5, 0x94, 0x1c, 0x55, 0x1a, 0x97, 0xe1, 0x3c, 0x16, 0xdc, 0x13, 0x98, 0xde, 0x61, 0x0d, 0xc7, 0x33, 0x7b, 0xc6, 0xbd, 0xe5, 0x78, 0xe9, 0xe9, 0xf5, 0x6a, 0xf1, 0x44, 0x54, 0xf2, 0xe8, 0x31, 0xbe, 0xef, 0x32, 0x31, 0xa8, 0x50, 0x68, 0xe8, 0xfe, 0xf7, 0x2c, 0x89, 0xe1, 0xdf, 0x1c, 0x99, 0x43, 0x0a, 0x60, 0xf6, 0xd9, 0x42, 0x89, 0xcf, 0xba, 0x87, 0xb2, 0xb4, 0x32, 0xa4, 0x0b, 0x88, 0xdb, 0x61, 0xda, 0xe0, 0x88, 0xf9, 0xed, 0x4e, 0x28, 0x4a, 0x21, 0x63, 0xaf, 0x65, 0xbf, 0x2b, 0x43, 0x55, 0x9a, 0x5d, 0xa2, 0xae, 0xc5, 0xbb, 0x8f, 0x43, 0xf9, 0x2c, 0x1b, 0x04, 0xa5, 0x14, 0x6a, 0x65, 0xb6, 0xe0, 0x19, 0xb4, 0xcd, 0xd2, 0x94, 0x0c, 0x35, 0xd9, 0x64, 0x5b, 0x2d } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 1.7", + /* Message */ + 5, + { 0x8a, 0x84, 0x7d, 0xd9, 0xe2 } +, + /* Seed */ + 120, + { 0xa1, 0x3d, 0xff, 0x8a, 0x48, 0xe8, 0x04, 0x94, 0xae, 0x66, 0xe6, 0xba, 0x9f, 0x17, 0x9a, 0x01, 0x0d, 0x9e, 0x6d, 0x40, 0x31, 0x87, 0x96, 0x7f, 0x99, 0xfd, 0xd9, 0x0e, 0xf9, 0x0e, 0x0a, 0x94, 0x07, 0x3f, 0xf0, 0xe4, 0xd0, 0xe6, 0x66, 0x4f, 0xf3, 0x73, 0xb5, 0x09, 0x95, 0x3e, 0x04, 0xef, 0x77, 0x83, 0xbe, 0x0f, 0xb4, 0x6c, 0x8a, 0x9f, 0xc0, 0xed, 0x8c, 0x1f, 0x33, 0xcb, 0x4d, 0x0d, 0x2f, 0x1d, 0x0d, 0x5c, 0xdb, 0xa1, 0x4d, 0xca, 0x50, 0x8c, 0xa1, 0xd7, 0x3d, 0x20, 0x80, 0x18, 0x63, 0x9b, 0xc8, 0xe1, 0x65, 0x86, 0x23, 0xde, 0x1e, 0x5b, 0xa3, 0xf0, 0x5e, 0xd0, 0x91, 0x4d, 0x2f, 0x96, 0x90, 0x2f, 0x25, 0x20, 0x33, 0x2d, 0x84, 0x92, 0xd3, 0x73, 0x4a, 0xcd, 0xeb, 0xbd, 0xf4, 0x3e, 0x50, 0xa4, 0x3e, 0x7a, 0xa8, 0x72 } +, + /* Encryption */ + 128, + { 0x82, 0x7a, 0x67, 0xe8, 0x15, 0x78, 0x1c, 0x4d, 0x4e, 0x2b, 0x2e, 0x16, 0x9d, 0x80, 0xca, 0xe9, 0x36, 0x68, 0x72, 0xa7, 0x92, 0xaf, 0xbf, 0x3c, 0x0c, 0xd5, 0x1c, 0xe2, 0x8c, 0x70, 0xe8, 0x6d, 0x41, 0xeb, 0xb9, 0x75, 0x2f, 0x3f, 0x92, 0xdb, 0xa5, 0x1a, 0xdb, 0xb6, 0x85, 0x1b, 0x1f, 0x78, 0x45, 0x61, 0xa8, 0xf1, 0x97, 0x20, 0x8f, 0xde, 0x02, 0x97, 0x0b, 0x38, 0xf2, 0xa9, 0x74, 0x22, 0xec, 0x7f, 0x4f, 0xc8, 0xa1, 0x06, 0x75, 0xa9, 0xdb, 0xde, 0x10, 0x9e, 0xed, 0x0c, 0xe0, 0x65, 0x27, 0x70, 0x3e, 0xe0, 0x5b, 0x65, 0x7d, 0x34, 0x08, 0xf7, 0xfd, 0xdb, 0x1e, 0xec, 0xcf, 0xfa, 0xe1, 0x6b, 0x1d, 0xa1, 0x07, 0x30, 0x7a, 0x2c, 0xf2, 0x56, 0xfa, 0x60, 0xe8, 0x15, 0x21, 0x72, 0xde, 0x9f, 0x95, 0x27, 0xfe, 0x92, 0x0a, 0x90, 0x1d, 0x93, 0xc4, 0xf4, 0xd5, 0x7e, 0x54, 0x6e } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 1.8", + /* Message */ + 49, + { 0x37, 0x32, 0x36, 0xb7, 0x20, 0x2d, 0x39, 0xb2, 0xee, 0x30, 0xcf, 0xb4, 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0x7b, 0x2f, 0xc6, 0x7c, 0x93, 0x22, 0x5c, 0xcc, 0xd6, 0xd5, 0x03, 0x47, 0xaa, 0x96, 0x9a, 0xd8, 0x7b, 0xd3, 0xd8, 0x20, 0x81, 0x45, 0x4f, 0xea, 0xd8, 0x10, 0xdc, 0x1a, 0xb8, 0xc2, 0x17, 0x81, 0xf7, 0x61, 0x2e, 0x64, 0x06, 0x72, 0x9b, 0x32, 0x2e, 0x04, 0xb1, 0x62, 0x4f, 0x85, 0x38, 0x98, 0x56, 0x59, 0xae, 0x34, 0xd9, 0x93, 0x1e, 0x01, 0x9f, 0x76, 0x2c, 0x79, 0x7d, 0x5c, 0xbf, 0xa3, 0x2d } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 1.9", + /* Message */ + 33, + { 0x97, 0xe0, 0xb6, 0x36, 0xbf, 0xdd, 0xb8, 0xe1, 0xc8, 0xa9, 0xcf, 0x5b, 0x30, 0x5c, 0xef, 0x3a, 0x8f, 0x47, 0xf9, 0xa8, 0xb3, 0x34, 0x4f, 0x13, 0x55, 0xfa, 0x3d, 0xba, 0xb6, 0x7b, 0xb9, 0x72, 0x10 } +, + /* Seed */ + 92, + { 0xc1, 0xf8, 0x9b, 0xcd, 0xc5, 0x60, 0x40, 0xd5, 0xe6, 0x63, 0xb7, 0x4b, 0xfd, 0xe2, 0x39, 0x7b, 0x58, 0x46, 0x08, 0xcd, 0xf3, 0x2d, 0x5a, 0x58, 0x44, 0x72, 0x4a, 0xc7, 0xe5, 0x98, 0xa8, 0x6e, 0xf7, 0x11, 0x4b, 0x1b, 0xe0, 0x87, 0x30, 0xcb, 0x10, 0xf6, 0x61, 0xfb, 0xfb, 0x86, 0x09, 0xf7, 0xc6, 0xc3, 0x74, 0x42, 0xa1, 0xb1, 0x1e, 0x04, 0xa6, 0x11, 0xff, 0x8c, 0xa5, 0xce, 0x9a, 0xfc, 0x1e, 0xb3, 0xaa, 0xa9, 0x2c, 0x9f, 0x28, 0xba, 0xe2, 0x20, 0x44, 0x05, 0x78, 0x99, 0x02, 0x26, 0x07, 0x83, 0x78, 0xc4, 0x93, 0x41, 0x13, 0x74, 0xc5, 0x3e, 0x3d, 0xdc } +, + /* Encryption */ + 128, + { 0x87, 0x3c, 0xc4, 0xdc, 0xa4, 0x27, 0x97, 0x2b, 0x63, 0xc6, 0xcc, 0x8a, 0xc1, 0x1c, 0xcc, 0x33, 0xc9, 0x59, 0xf7, 0xfc, 0xfe, 0x4b, 0x45, 0xbb, 0xd4, 0x7b, 0x29, 0xd9, 0xc9, 0x88, 0xc0, 0x1a, 0x96, 0xbc, 0x1e, 0xae, 0x0e, 0xf9, 0xb1, 0x94, 0x8d, 0xce, 0x2c, 0xc9, 0xf0, 0xaa, 0x91, 0x7e, 0x86, 0xa6, 0xc1, 0x1f, 0x8d, 0xa3, 0xda, 0x29, 0xdf, 0x90, 0x59, 0x01, 0xf1, 0x91, 0x8a, 0x76, 0x16, 0x8d, 0xe1, 0x17, 0x5e, 0x27, 0x35, 0x12, 0x8c, 0x09, 0x72, 0x99, 0xd6, 0x6e, 0xa5, 0xcc, 0xf9, 0xb9, 0x5b, 0x36, 0x92, 0xee, 0xbf, 0xc6, 0xea, 0x11, 0xbc, 0x37, 0x09, 0x1b, 0x79, 0x5f, 0x18, 0x80, 0x3d, 0x70, 0xe7, 0x95, 0x58, 0xe1, 0x25, 0x16, 0x23, 0x0f, 0xed, 0x55, 0x15, 0xe5, 0x1b, 0x45, 0xae, 0x86, 0xce, 0xfe, 0x47, 0xb9, 0x37, 0x90, 0xe4, 0x99, 0x4d, 0xc4, 0x1e, 0x05 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 1.10", + /* Message */ + 55, + { 0x82, 0xb5, 0x07, 0x5b, 0xfc, 0x88, 0xf4, 0x00, 0x65, 0x76, 0xaa, 0x80, 0xa0, 0x00, 0x7a, 0x74, 0x51, 0x18, 0x4d, 0x4f, 0x76, 0x0c, 0xf9, 0x24, 0x28, 0x04, 0x22, 0x2b, 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xdb, 0x91, 0xc3, 0xa3, 0x43, 0xea, 0xff, 0x1c, 0x28, 0xd9, 0xd5, 0xf7, 0xcb, 0x65, 0x74, 0xe6, 0x31, 0x06, 0x90, 0x03, 0xcd, 0xcf, 0xa0, 0x77, 0x43, 0xa7, 0x34, 0x0d, 0x58, 0x83, 0x9e, 0x70, 0x8b, 0xf3, 0x6a, 0xf6, 0x34, 0x2d, 0xb8, 0xdf, 0xa4, 0x1f, 0xea, 0xda, 0xfc, 0x69, 0x53, 0xac } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 1.11", + /* Message */ + 34, + { 0x36, 0x48, 0xc3, 0x6f, 0x85, 0x1f, 0x52, 0xf2, 0x32, 0x87, 0x79, 0x09, 0x19, 0x85, 0xa3, 0xc8, 0x12, 0xe1, 0x8a, 0x70, 0x55, 0xd0, 0x90, 0xbb, 0xf0, 0x32, 0x4c, 0x13, 0x79, 0x3b, 0xb8, 0x22, 0x1a, 0x57 } +, + /* Seed */ + 91, + { 0xc1, 0x27, 0x71, 0x85, 0xc3, 0x59, 0x55, 0xca, 0xed, 0xfd, 0xf9, 0xde, 0x55, 0xd5, 0xd9, 0x5a, 0x39, 0x8d, 0x58, 0xf5, 0xf3, 0x33, 0x19, 0x1f, 0xc0, 0x29, 0x45, 0xef, 0xdf, 0xad, 0xfb, 0x6d, 0xb0, 0x5e, 0xe2, 0xa2, 0xd3, 0x41, 0x83, 0xed, 0xf8, 0x9a, 0x1a, 0x4d, 0xcc, 0xc4, 0x65, 0x91, 0xb3, 0x53, 0x2b, 0xa7, 0x03, 0x93, 0x62, 0xc7, 0x5d, 0xf1, 0x94, 0xec, 0x10, 0x64, 0x48, 0xaf, 0xb7, 0xf6, 0xbf, 0xb2, 0x80, 0x7e, 0x38, 0x3e, 0x15, 0x99, 0x54, 0x25, 0x5e, 0x82, 0x7c, 0xb9, 0xda, 0xdc, 0x8d, 0x9b, 0x7e, 0x68, 0xa1, 0xaa, 0x09, 0x76, 0x35 } +, + /* Encryption */ + 128, + { 0x88, 0x62, 0xf1, 0x97, 0x3f, 0xef, 0xe0, 0xaf, 0x02, 0xd9, 0x6c, 0xc4, 0x58, 0x33, 0x4d, 0xed, 0x6c, 0x02, 0xd8, 0xd7, 0xea, 0xf5, 0x93, 0x77, 0x9c, 0x5d, 0x38, 0x6c, 0x4e, 0x49, 0xf7, 0x68, 0xf1, 0x30, 0xb4, 0x87, 0xb3, 0xc9, 0x1e, 0x32, 0x3a, 0x47, 0x7e, 0x4c, 0x11, 0x0a, 0x33, 0x41, 0xff, 0x46, 0xee, 0xe3, 0x7c, 0x77, 0x3e, 0x5c, 0x0a, 0xc8, 0x39, 0xbc, 0x55, 0xcc, 0x0c, 0x07, 0x0c, 0xac, 0x01, 0xcd, 0x45, 0x18, 0x3c, 0xfe, 0xe6, 0xb8, 0x8b, 0xfb, 0x82, 0x36, 0x1d, 0x35, 0x60, 0x19, 0x7c, 0xde, 0xab, 0x42, 0xe5, 0xc7, 0x55, 0xd2, 0x37, 0x97, 0x1a, 0x88, 0xda, 0xf6, 0x10, 0xcb, 0x39, 0x52, 0x61, 0x4b, 0x36, 0x40, 0x56, 0xcd, 0x49, 0x14, 0x20, 0xef, 0xfe, 0x3a, 0x0b, 0x8c, 0xe3, 0x1f, 0x2e, 0x3e, 0x49, 0xca, 0xd6, 0xf3, 0xb0, 0x64, 0x0f, 0x44, 0x91, 0xde } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 1.12", + /* Message */ + 20, + { 0x94, 0xf7, 0x8c, 0xf4, 0x5c, 0x53, 0xfc, 0x46, 0xe7, 0xeb, 0x1b, 0x26, 0x61, 0x8a, 0x29, 0xe9, 0x48, 0x50, 0x12, 0xc1 } +, + /* Seed */ + 105, + { 0xe6, 0xde, 0x9e, 0x9b, 0x90, 0x22, 0xa5, 0x5f, 0x56, 0x12, 0x1d, 0x5a, 0xc0, 0x0a, 0xa6, 0xdf, 0x29, 0x9c, 0x8a, 0x36, 0x94, 0x22, 0xe7, 0x54, 0x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, 0x39, 0x4b, 0x06, 0x24, 0xf3, 0xb8, 0xba, 0x6d, 0x56, 0x45, 0xe9, 0x90, 0xe7, 0xc0, 0x13, 0x2c, 0xe2, 0x12, 0x31, 0x46, 0xfd, 0x9c, 0xad, 0xf7, 0x45, 0xec, 0x61 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 1.13", + /* Message */ + 35, + { 0x77, 0x9d, 0x1e, 0xb8, 0x4f, 0xa2, 0x84, 0xc3, 0x7d, 0x29, 0xd5, 0xe1, 0x79, 0xd0, 0x03, 0x06, 0xb4, 0x13, 0xc4, 0x4a, 0x80, 0x0a, 0x07, 0x7e, 0x59, 0x85, 0x3f, 0x63, 0x05, 0xf9, 0x2e, 0x59, 0xfb, 0x7f, 0x81 } +, + /* Seed */ + 90, + { 0xc3, 0xe6, 0xd1, 0x8b, 0xda, 0x97, 0x78, 0x2c, 0xa7, 0x81, 0xfa, 0x76, 0xd9, 0x7a, 0x6c, 0x94, 0xd8, 0x54, 0xd1, 0x41, 0x99, 0xb4, 0xea, 0x7d, 0x82, 0xc5, 0xbc, 0xbb, 0xe6, 0xcd, 0xaa, 0xb5, 0x25, 0x57, 0x47, 0x44, 0x3c, 0x59, 0xbf, 0x8c, 0x77, 0xec, 0xda, 0xa6, 0x4a, 0xe7, 0xce, 0x61, 0xe2, 0xc7, 0x30, 0x01, 0x32, 0xb7, 0x54, 0xe9, 0x16, 0x2f, 0x7c, 0xde, 0x75, 0x8f, 0x48, 0x0a, 0xe5, 0x88, 0xcf, 0xd4, 0x4a, 0x94, 0x6d, 0x64, 0xe2, 0x72, 0x0a, 0x2d, 0x17, 0x52, 0x55, 0x45, 0x22, 0x04, 0x84, 0x83, 0x81, 0x18, 0xad, 0x6e, 0x6b, 0x54 } +, + /* Encryption */ + 128, + { 0x72, 0x2c, 0xa9, 0x25, 0x66, 0xc7, 0x3c, 0xc8, 0x5d, 0x19, 0xce, 0x3f, 0xaa, 0x14, 0xcb, 0x2e, 0x79, 0x84, 0x9f, 0x20, 0x50, 0x92, 0xd1, 0x58, 0x92, 0x82, 0x31, 0x3c, 0x04, 0x27, 0xf0, 0x67, 0x79, 0x8a, 0xfa, 0xe3, 0xe3, 0xf0, 0xa5, 0x61, 0xf3, 0x99, 0x34, 0x6e, 0x9d, 0x10, 0x7d, 0xa0, 0x4a, 0xf4, 0x4b, 0x0c, 0x6f, 0x04, 0x4a, 0xde, 0xfe, 0x09, 0x7a, 0x0c, 0xd1, 0x4a, 0x47, 0xa9, 0x9c, 0xd9, 0x81, 0x9a, 0x98, 0x41, 0x37, 0x06, 0x30, 0x7c, 0xbd, 0x0d, 0xa0, 0x16, 0x97, 0x46, 0x9e, 0xff, 0x71, 0xd3, 0x14, 0x41, 0x63, 0x94, 0x93, 0xfb, 0xed, 0x8e, 0xee, 0x1b, 0xa3, 0x9f, 0xdd, 0x07, 0xfc, 0x0e, 0xa0, 0x82, 0x30, 0x18, 0x61, 0x79, 0xf9, 0x0e, 0x7e, 0xf1, 0x3c, 0x61, 0xee, 0x56, 0xf1, 0x67, 0xfc, 0x2f, 0x6b, 0x15, 0x79, 0x3e, 0x1a, 0x32, 0x24, 0xff, 0xa2, 0x9e } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 1.14", + /* Message */ + 1, + { 0x88 } +, + /* Seed */ + 124, + { 0xc0, 0x16, 0x9d, 0x76, 0xe4, 0xea, 0x45, 0x45, 0x41, 0x0d, 0xdf, 0x66, 0x46, 0xc1, 0xba, 0x7d, 0xd2, 0x72, 0xd7, 0xc3, 0x49, 0x8b, 0xa6, 0xb0, 0x80, 0x4b, 0x42, 0x61, 0x30, 0xa8, 0x0f, 0xbf, 0xff, 0x4b, 0xb7, 0xb5, 0xf5, 0x59, 0xb0, 0xa9, 0x09, 0x0e, 0x4a, 0xd9, 0xb9, 0xf4, 0x16, 0xa6, 0xdf, 0xdc, 0x15, 0x01, 0xb1, 0xba, 0x46, 0x87, 0x7b, 0x1a, 0x96, 0xfa, 0x84, 0x91, 0xdc, 0xfd, 0xde, 0x50, 0xeb, 0xee, 0xd2, 0x4d, 0x3f, 0x98, 0x96, 0x24, 0x13, 0x34, 0x6e, 0xd4, 0xa3, 0x39, 0x3e, 0x23, 0x5b, 0x77, 0xbc, 0x1e, 0xd6, 0x74, 0x68, 0xec, 0xe2, 0x79, 0x2a, 0x2f, 0xd3, 0xa8, 0x34, 0x8f, 0xc5, 0x50, 0x9b, 0x59, 0x06, 0xf2, 0x88, 0x56, 0x15, 0xdf, 0x8c, 0x14, 0x61, 0x37, 0x7a, 0x74, 0x1d, 0x59, 0x52, 0xfb, 0x36, 0xea, 0xc0, 0x20, 0x1e, 0x27 } +, + /* Encryption */ + 128, + { 0x4e, 0xd7, 0xd1, 0x29, 0x1a, 0x03, 0x36, 0x65, 0x4d, 0x5c, 0xa2, 0xb1, 0xf9, 0xd2, 0x0c, 0xb2, 0xda, 0x72, 0x26, 0xf7, 0x11, 0x6b, 0x93, 0x09, 0x88, 0x43, 0x9b, 0x44, 0x63, 0x98, 0x11, 0x04, 0xbd, 0x63, 0xc2, 0xce, 0x2b, 0x77, 0xd6, 0x26, 0xb3, 0x10, 0x9c, 0x93, 0x14, 0x03, 0xac, 0x5b, 0x49, 0xb4, 0x24, 0x7c, 0x4f, 0x69, 0x67, 0xb8, 0xc0, 0xdb, 0x06, 0x3c, 0x99, 0x95, 0xaf, 0x9d, 0x36, 0x54, 0x06, 0x50, 0x93, 0x8b, 0x01, 0xf9, 0x39, 0x06, 0xf9, 0x83, 0x89, 0x07, 0xed, 0x59, 0x36, 0xab, 0xb3, 0x43, 0xb0, 0xe2, 0x55, 0x09, 0xa1, 0xd2, 0xd4, 0xc5, 0xc8, 0xb9, 0x58, 0x06, 0x50, 0xda, 0x2c, 0xe1, 0x1f, 0xa3, 0xcf, 0x3e, 0x64, 0x07, 0x23, 0xea, 0xcb, 0xee, 0x87, 0xfa, 0xd3, 0xee, 0x35, 0x95, 0x8b, 0x45, 0x07, 0x5d, 0xf7, 0x81, 0xc4, 0x13, 0x46, 0x6a, 0xf1, 0x39 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 1.15", + /* Message */ + 51, + { 0xa2, 0xdc, 0x08, 0x77, 0x78, 0xd5, 0x43, 0x40, 0x8e, 0x89, 0x73, 0xf1, 0x36, 0x31, 0x59, 0xed, 0xb8, 0xf0, 0x78, 0x3c, 0x45, 0x70, 0x89, 0x07, 0x2d, 0xce, 0x66, 0xd3, 0x10, 0x2b, 0xb4, 0xfa, 0xe6, 0x0a, 0xa6, 0x0e, 0x41, 0x93, 0x3c, 0x48, 0xa1, 0xbe, 0x39, 0x53, 0xec, 0x2f, 0x80, 0x4c, 0x0c, 0xc9, 0x6c } +, + /* Seed */ + 74, + { 0x18, 0x11, 0x20, 0x14, 0x06, 0x53, 0x29, 0xd0, 0x4b, 0xfb, 0x0c, 0xf5, 0x44, 0xdd, 0x38, 0xd7, 0xbe, 0xf1, 0x54, 0x9b, 0x4a, 0x49, 0xa1, 0x67, 0x76, 0xdd, 0xa7, 0x4d, 0x0a, 0x7e, 0xdc, 0x49, 0x67, 0xb4, 0x24, 0x0c, 0x37, 0x14, 0x2f, 0xa3, 0xf6, 0x63, 0x9c, 0x26, 0x96, 0xcd, 0x7d, 0x4b, 0x18, 0xa1, 0x1e, 0x2f, 0xb5, 0x40, 0x81, 0xf2, 0xde, 0x5b, 0xd7, 0xbd, 0x15, 0xcd, 0xda, 0x92, 0xc9, 0x4c, 0x3a, 0x47, 0x18, 0x7b, 0x5f, 0xf4, 0x3b, 0x53 } +, + /* Encryption */ + 128, + { 0x71, 0x15, 0x19, 0x0a, 0x21, 0x04, 0x88, 0xf0, 0x4f, 0xa0, 0xc0, 0x0c, 0x93, 0xa4, 0x68, 0xa8, 0x03, 0x0b, 0x7b, 0x9f, 0xc1, 0x00, 0x20, 0xd8, 0x31, 0x0b, 0xcb, 0x01, 0xa5, 0xc8, 0xdd, 0xa1, 0xd0, 0x6c, 0xe2, 0x41, 0xdc, 0x77, 0x5b, 0x43, 0xe6, 0xf1, 0x3b, 0x19, 0xab, 0xfc, 0xbf, 0x36, 0x16, 0xe8, 0x4f, 0x10, 0x7c, 0x9e, 0xd8, 0x0d, 0x1b, 0x86, 0xbf, 0x87, 0xc9, 0x8c, 0x2b, 0x62, 0x9f, 0xfa, 0xda, 0xa6, 0xec, 0x01, 0xf4, 0xe6, 0x75, 0x55, 0x8e, 0xf5, 0x26, 0x06, 0xea, 0xf1, 0x26, 0x06, 0x8f, 0xa7, 0x53, 0x4d, 0xd1, 0x3b, 0x92, 0x0d, 0x23, 0x81, 0x69, 0x5a, 0xd7, 0x75, 0xff, 0xf0, 0xbb, 0x7c, 0xec, 0x46, 0x90, 0x90, 0x1d, 0x6f, 0x1e, 0x17, 0x36, 0xb8, 0x2c, 0xfe, 0x3a, 0x0c, 0x22, 0x4d, 0x18, 0xf1, 0x29, 0x15, 0xfd, 0xc9, 0x5c, 0x18, 0x39, 0x7c, 0x35, 0x70 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 1.16", + /* Message */ + 36, + { 0x11, 0x0b, 0xf2, 0xb1, 0xd0, 0xdd, 0x81, 0x2f, 0x2a, 0x5a, 0x21, 0xf3, 0x40, 0x4f, 0xa2, 0xf2, 0xc4, 0x54, 0xc4, 0x43, 0x2f, 0xdf, 0xa7, 0x0f, 0x1b, 0x0f, 0x23, 0xec, 0x69, 0xc1, 0x02, 0x37, 0x73, 0xa7, 0x3a, 0xba } +, + /* Seed */ + 89, + { 0x17, 0xb8, 0x5f, 0x76, 0x53, 0xff, 0x0e, 0xf5, 0xde, 0x7f, 0x25, 0x69, 0x6c, 0xd4, 0x90, 0x23, 0xad, 0x8e, 0xac, 0x94, 0x8a, 0x83, 0xe2, 0x24, 0x58, 0xec, 0xd5, 0xd1, 0x0a, 0x43, 0x86, 0x6d, 0xc7, 0x91, 0x55, 0x5e, 0x64, 0xf0, 0x78, 0xc3, 0x8c, 0x75, 0x2b, 0x6e, 0x9c, 0x6e, 0xee, 0xb3, 0x39, 0xee, 0xc9, 0x10, 0x16, 0xd2, 0x58, 0x88, 0x6d, 0x01, 0x27, 0x75, 0xad, 0x64, 0x36, 0x02, 0xa0, 0xf0, 0xd1, 0x79, 0x34, 0x54, 0xa0, 0x60, 0x94, 0x71, 0x16, 0x22, 0x88, 0x22, 0x39, 0x50, 0x82, 0x6e, 0xd8, 0xe2, 0x02, 0x5d, 0xa9, 0xa4, 0xe9 } +, + /* Encryption */ + 128, + { 0x5d, 0x0f, 0x2f, 0xd8, 0x5e, 0x6f, 0x9d, 0x9e, 0x43, 0x2f, 0xad, 0x86, 0x0f, 0xdc, 0x49, 0x96, 0x96, 0x24, 0xff, 0x4f, 0xa0, 0x71, 0x5d, 0x36, 0x1e, 0x9f, 0x00, 0xb0, 0x5b, 0x3a, 0xa0, 0xba, 0x9e, 0xb2, 0x7b, 0xae, 0x61, 0x0e, 0xfd, 0xe1, 0x14, 0x3c, 0xbc, 0x93, 0x3b, 0x52, 0xde, 0xa7, 0x01, 0x87, 0x60, 0xbb, 0x25, 0x1b, 0xe0, 0xe1, 0xe3, 0x0c, 0xd1, 0xc5, 0x99, 0x1a, 0xef, 0x74, 0x4d, 0xb8, 0x2f, 0x16, 0x6b, 0x90, 0x63, 0xef, 0xb7, 0xe3, 0x38, 0x40, 0xa2, 0x56, 0x90, 0x05, 0x65, 0x4b, 0x14, 0x0e, 0x11, 0x5f, 0xa5, 0x6c, 0x30, 0x40, 0x6e, 0x45, 0x65, 0x6e, 0x81, 0x99, 0xaf, 0x39, 0x4f, 0x63, 0x86, 0x34, 0x6d, 0x5f, 0x1a, 0x30, 0x0b, 0x95, 0xba, 0x48, 0xfc, 0x08, 0x73, 0xd6, 0x18, 0xd6, 0x92, 0xbb, 0x02, 0x5b, 0xf1, 0x5e, 0x9d, 0x23, 0x2c, 0x64, 0x1a, 0xda } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 1.17", + /* Message */ + 60, + { 0xd9, 0xd9, 0x37, 0x13, 0x1f, 0xf1, 0x94, 0x0a, 0x86, 0xbf, 0x71, 0x39, 0xb4, 0x81, 0x14, 0x36, 0x41, 0x95, 0xb4, 0x00, 0x52, 0x22, 0xa8, 0xbb, 0xbc, 0x26, 0x1a, 0x7f, 0x2e, 0x21, 0x2b, 0x8d, 0xd0, 0x35, 0xe5, 0x3f, 0x91, 0x44, 0xf5, 0x61, 0x0b, 0x4c, 0xec, 0x32, 0xea, 0x01, 0xbd, 0xa9, 0xd3, 0xc8, 0x0c, 0xf2, 0x94, 0x64, 0xf8, 0x0f, 0x5f, 0x56, 0x56, 0xc8 } +, + /* Seed */ + 65, + { 0x33, 0x05, 0xe1, 0xda, 0x60, 0xe5, 0x86, 0x73, 0xfc, 0x46, 0xcd, 0x33, 0xbe, 0x2a, 0x66, 0xd3, 0xa1, 0x02, 0xc3, 0xdb, 0x16, 0x1e, 0xf4, 0x8c, 0x0d, 0x60, 0xef, 0x25, 0x03, 0x1b, 0x40, 0x14, 0x16, 0x78, 0x26, 0x24, 0x6a, 0xa5, 0x28, 0xa3, 0xa3, 0xe5, 0xb0, 0xab, 0x95, 0x07, 0x8d, 0x84, 0x01, 0xd9, 0x29, 0x03, 0x59, 0x5a, 0xfc, 0x1a, 0xa8, 0x54, 0xe6, 0x04, 0x4e, 0x5e, 0xb5, 0xf5, 0xbe } +, + /* Encryption */ + 128, + { 0x0e, 0x12, 0x16, 0x74, 0x89, 0xf0, 0xba, 0xef, 0xca, 0xd6, 0x39, 0x34, 0xbc, 0x15, 0x9f, 0x1b, 0xbd, 0x9e, 0x9b, 0x28, 0x7e, 0x50, 0x0f, 0x49, 0x09, 0x23, 0xc1, 0x6a, 0x85, 0x56, 0x4a, 0x1d, 0xa6, 0x36, 0x59, 0x37, 0x5f, 0x22, 0xaf, 0x7b, 0xa4, 0x97, 0x98, 0xe1, 0x57, 0x8c, 0xf3, 0x15, 0xfa, 0xe3, 0xe9, 0xed, 0x56, 0x99, 0xc6, 0x91, 0xe3, 0xc1, 0xd0, 0xbb, 0x46, 0xda, 0x49, 0x2d, 0x01, 0x34, 0x9e, 0x93, 0x29, 0x59, 0x3d, 0x43, 0x81, 0xd0, 0x74, 0xa0, 0xa5, 0x31, 0xdf, 0x92, 0x1b, 0x31, 0x31, 0x6f, 0x7e, 0x2b, 0x4f, 0xe9, 0x15, 0x34, 0x72, 0x83, 0x24, 0x23, 0x35, 0xf0, 0xb0, 0xb2, 0x31, 0x92, 0xc7, 0x21, 0x02, 0xf2, 0xc6, 0x36, 0x24, 0xb1, 0xe7, 0x89, 0x65, 0x45, 0x0e, 0x82, 0x30, 0xd4, 0x87, 0x7e, 0x46, 0x17, 0xb0, 0x3d, 0x44, 0x83, 0x13, 0x98, 0xdd, 0xbf } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 1.18", + /* Message */ + 8, + { 0x81, 0xb3, 0x4a, 0xeb, 0x8a, 0xfb, 0x8a, 0x3f } +, + /* Seed */ + 117, + { 0x02, 0xf7, 0x48, 0x34, 0x2d, 0x01, 0x0f, 0xb5, 0x6a, 0x6f, 0x69, 0xf2, 0x1f, 0x8c, 0x6a, 0x63, 0x16, 0x79, 0xc8, 0xc4, 0xb8, 0xf6, 0xfe, 0xb5, 0x25, 0xcf, 0x8e, 0x72, 0xfd, 0xa8, 0xef, 0x8d, 0xf6, 0x62, 0x31, 0x28, 0xc0, 0xfe, 0x74, 0xbc, 0x59, 0x0c, 0xaa, 0x34, 0xf1, 0xee, 0xd1, 0xad, 0x2d, 0x61, 0x42, 0xdc, 0xc5, 0xbc, 0xae, 0x84, 0xef, 0x31, 0x37, 0x62, 0xf2, 0xe4, 0xe7, 0x03, 0x03, 0xd2, 0x09, 0xc8, 0xd9, 0x57, 0x7a, 0x7c, 0x84, 0x3d, 0x2b, 0x91, 0x72, 0xed, 0x4e, 0xfe, 0x2a, 0xd6, 0x29, 0x61, 0x4b, 0x99, 0xa9, 0x1a, 0x4c, 0xc8, 0x32, 0x5b, 0xa3, 0x24, 0x11, 0x6e, 0xcf, 0x0c, 0x5e, 0x29, 0x09, 0x49, 0x38, 0xae, 0x49, 0x89, 0x84, 0xf4, 0xf4, 0xcb, 0xb1, 0x62, 0x38, 0x86, 0xe0, 0x39, 0x73 } +, + /* Encryption */ + 128, + { 0x43, 0xb2, 0x76, 0xc7, 0xd3, 0x68, 0xea, 0x21, 0xc6, 0x80, 0x71, 0x16, 0xcd, 0xe8, 0x60, 0x82, 0x98, 0xf2, 0x40, 0x02, 0x07, 0x2d, 0x77, 0x6e, 0x56, 0xe6, 0x2c, 0x35, 0x72, 0xbf, 0xb9, 0x9d, 0xa4, 0xc5, 0x6e, 0x93, 0x8a, 0x47, 0xdc, 0x07, 0x5f, 0xa1, 0xff, 0x7a, 0x61, 0x8f, 0xb5, 0xfa, 0xed, 0x3e, 0xe3, 0x7b, 0x91, 0xdf, 0xc3, 0x91, 0x53, 0x49, 0x5a, 0xeb, 0xa9, 0xdf, 0x6d, 0x45, 0xdf, 0x94, 0xb0, 0xe8, 0xa8, 0xad, 0x2d, 0xb3, 0x7a, 0x9f, 0xe4, 0x6d, 0x0f, 0xdf, 0x15, 0x42, 0x31, 0xfd, 0x6f, 0x32, 0x21, 0x47, 0x4e, 0x8f, 0x5c, 0x19, 0x1f, 0xdb, 0x85, 0x38, 0xe1, 0xa6, 0x03, 0xe5, 0x98, 0x97, 0xe1, 0x50, 0xfa, 0xf9, 0x5b, 0x65, 0xda, 0x14, 0x06, 0x67, 0xed, 0xb1, 0x98, 0x09, 0xeb, 0x4a, 0x16, 0xac, 0xd0, 0x1e, 0xcc, 0x60, 0x4b, 0xda, 0x57, 0xf2, 0x0e, 0xf2 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 1.19", + /* Message */ + 10, + { 0x7b, 0xf9, 0xfa, 0xd8, 0x89, 0xde, 0x73, 0xed, 0x87, 0x3d } +, + /* Seed */ + 115, + { 0xfa, 0x5d, 0xad, 0x45, 0xa4, 0xbb, 0x5e, 0x74, 0xc4, 0xcf, 0x2e, 0x21, 0x3e, 0xd4, 0x0a, 0xa9, 0x61, 0x75, 0x98, 0xd1, 0x1d, 0x49, 0xae, 0x1c, 0x32, 0xd7, 0x94, 0xe0, 0x9c, 0xd0, 0xe5, 0xc7, 0xaa, 0xae, 0x81, 0xb9, 0x55, 0x4d, 0xde, 0x31, 0x08, 0xd6, 0x0a, 0x9a, 0x82, 0xf4, 0x2c, 0xc6, 0xc2, 0xa6, 0x89, 0xf4, 0x60, 0xff, 0x1d, 0x53, 0xad, 0x85, 0xbf, 0x83, 0x83, 0x11, 0xe7, 0x58, 0x9e, 0x19, 0x67, 0x95, 0x7b, 0x51, 0x56, 0x7a, 0xa0, 0xd3, 0x3a, 0xfa, 0x37, 0x52, 0xcd, 0xe6, 0xc5, 0x66, 0x1d, 0x4f, 0x27, 0xae, 0xd3, 0xdf, 0x52, 0x90, 0x5f, 0x1c, 0xf2, 0x25, 0x33, 0x04, 0x61, 0x8e, 0x07, 0x86, 0x04, 0x1e, 0x70, 0xb4, 0xdc, 0xba, 0xc8, 0xc1, 0x08, 0xba, 0x34, 0xac, 0x39, 0x39, 0xf4 } +, + /* Encryption */ + 128, + { 0x61, 0xc2, 0x55, 0x0e, 0x0b, 0x36, 0xa6, 0x79, 0x7f, 0xf8, 0x64, 0x93, 0x80, 0x1b, 0x11, 0x46, 0xd8, 0x90, 0x59, 0x49, 0x83, 0x52, 0xe4, 0xc2, 0x62, 0x27, 0x5b, 0x14, 0x04, 0xb1, 0x33, 0x15, 0xe9, 0x56, 0xbb, 0x3d, 0x31, 0x21, 0x85, 0xb5, 0x21, 0xb3, 0xc7, 0x08, 0xe9, 0xd9, 0x54, 0x02, 0x17, 0x19, 0xa0, 0x59, 0xd9, 0x84, 0x72, 0x4c, 0x53, 0xc0, 0x4f, 0x5a, 0xd2, 0x74, 0xbe, 0xf9, 0xff, 0x0a, 0x79, 0x50, 0xb2, 0xfd, 0xec, 0xc5, 0x29, 0x0c, 0xd5, 0xf3, 0xbc, 0x26, 0x52, 0x4c, 0xd1, 0x34, 0x20, 0x48, 0x18, 0x4b, 0x0e, 0x2c, 0xdf, 0x94, 0x06, 0xa4, 0x53, 0xa2, 0xef, 0x9f, 0x3b, 0xb2, 0x3c, 0x4e, 0x7c, 0x1c, 0x8b, 0x29, 0x52, 0xa0, 0x20, 0x2b, 0xcc, 0x23, 0x82, 0x47, 0xea, 0x32, 0x7b, 0x8c, 0x07, 0x00, 0xc8, 0x00, 0x3f, 0xd6, 0x34, 0xec, 0x1e, 0xd9, 0xbf, 0x30 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 1.20", + /* Message */ + 31, + { 0xb6, 0xa3, 0x50, 0x9b, 0xb3, 0xb9, 0xb0, 0xb5, 0x7c, 0xd5, 0x8d, 0xe4, 0x09, 0xd9, 0x53, 0x20, 0x1a, 0x04, 0x2f, 0x94, 0x92, 0xdc, 0x1d, 0x7e, 0x34, 0xa7, 0xd0, 0x94, 0x1a, 0x1a, 0x1b } +, + /* Seed */ + 94, + { 0x3a, 0x9e, 0x15, 0x06, 0x57, 0x86, 0xb3, 0xe0, 0x1d, 0x82, 0x6b, 0x86, 0x2a, 0x8f, 0x70, 0x2b, 0x5c, 0xac, 0x8c, 0x16, 0x62, 0xee, 0x7d, 0x15, 0xff, 0x32, 0x3c, 0xdf, 0xe7, 0x1e, 0xbf, 0x4a, 0xd1, 0xb1, 0xf3, 0xa6, 0xbc, 0xbd, 0xd4, 0xb0, 0x01, 0x08, 0x77, 0xec, 0xac, 0x09, 0x1f, 0x61, 0x59, 0x08, 0xe2, 0xbe, 0x40, 0x0b, 0xb0, 0xc4, 0x98, 0xe3, 0x55, 0xd5, 0x71, 0xfd, 0x10, 0x89, 0x5b, 0x8e, 0xe9, 0xc3, 0xa9, 0xc3, 0x1e, 0x4b, 0x11, 0x03, 0x89, 0xc3, 0xd5, 0xc4, 0x6e, 0xbf, 0x76, 0xb3, 0xb3, 0x5a, 0xd1, 0xf4, 0x79, 0x1b, 0x6d, 0x20, 0x97, 0xf1, 0x09, 0xf2 } +, + /* Encryption */ + 128, + { 0x6b, 0x4b, 0x6d, 0x7b, 0xab, 0xfe, 0x4d, 0x64, 0x17, 0xac, 0xad, 0xfb, 0x78, 0x57, 0x2e, 0x7c, 0x87, 0xe3, 0xfe, 0x1b, 0xd5, 0x8e, 0xef, 0xb0, 0xd4, 0xb1, 0x27, 0x9c, 0x7b, 0x7c, 0x83, 0x26, 0xa6, 0x8b, 0xb2, 0x87, 0x95, 0xe0, 0x9f, 0x9b, 0x1c, 0xe2, 0xe2, 0x4a, 0x53, 0x9f, 0x4b, 0x0d, 0x93, 0xb2, 0x92, 0x74, 0xce, 0xcf, 0x7c, 0xd9, 0xf0, 0xb7, 0x32, 0xae, 0xbe, 0xda, 0x91, 0x11, 0xbd, 0xfe, 0x25, 0xe2, 0x68, 0xa8, 0x8e, 0x34, 0x22, 0xe2, 0x9b, 0x52, 0xbd, 0x4b, 0x7a, 0x05, 0x47, 0xdb, 0x8f, 0xe1, 0x2a, 0x6f, 0xcf, 0x1a, 0x3c, 0x06, 0xa0, 0x02, 0xbf, 0x87, 0x0a, 0x2f, 0xab, 0xb7, 0xc4, 0x57, 0xe4, 0xbb, 0xce, 0x3e, 0x31, 0x6f, 0x72, 0x32, 0x44, 0x9f, 0x87, 0xa9, 0xd7, 0x02, 0xb1, 0x2d, 0x19, 0xbd, 0xe7, 0xf9, 0x59, 0x0f, 0x94, 0x67, 0xb0, 0x6b, 0xd5, 0x8a } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 2: A 1024-bit RSA key pair", +{ + /* Modulus */ + 128, + { 0x98, 0xb7, 0x05, 0x82, 0xca, 0x80, 0x8f, 0xd1, 0xd3, 0x50, 0x95, 0x62, 0xa0, 0xef, 0x30, 0x5a, 0xf6, 0xd9, 0x87, 0x54, 0x43, 0xb3, 0x5b, 0xdf, 0x24, 0xd5, 0x36, 0x35, 0x3e, 0x3f, 0x12, 0x28, 0xdc, 0xd1, 0x2a, 0x78, 0x56, 0x83, 0x56, 0xc6, 0xff, 0x32, 0x3a, 0xbf, 0x72, 0xac, 0x1c, 0xdb, 0xfe, 0x71, 0x2f, 0xb4, 0x9f, 0xe5, 0x94, 0xa5, 0xa2, 0x17, 0x5d, 0x48, 0xb6, 0x73, 0x25, 0x38, 0xd8, 0xdf, 0x37, 0xcb, 0x97, 0x0b, 0xe4, 0xa5, 0xb5, 0x62, 0xc3, 0xf2, 0x98, 0xdb, 0x9d, 0xdf, 0x75, 0x60, 0x78, 0x77, 0x91, 0x8c, 0xce, 0xd1, 0xd0, 0xd1, 0xf3, 0x77, 0x33, 0x8c, 0x0d, 0x3d, 0x32, 0x07, 0x79, 0x7e, 0x86, 0x2c, 0x65, 0xd1, 0x14, 0x39, 0xe5, 0x88, 0x17, 0x75, 0x27, 0xa7, 0xde, 0xd9, 0x19, 0x71, 0xad, 0xcf, 0x91, 0xe2, 0xe8, 0x34, 0xe3, 0x7f, 0x05, 0xa7, 0x36, 0x55 } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 128, + { 0x06, 0x14, 0xa7, 0x86, 0x05, 0x2d, 0x28, 0x4c, 0xd9, 0x06, 0xa8, 0xe4, 0x13, 0xf7, 0x62, 0x2c, 0x05, 0x0f, 0x35, 0x49, 0xc0, 0x26, 0x58, 0x9e, 0xa2, 0x77, 0x50, 0xe0, 0xbe, 0xd9, 0x41, 0x0e, 0x5a, 0x78, 0x83, 0xa1, 0xe6, 0x03, 0xf5, 0xc5, 0x17, 0xad, 0x36, 0xd4, 0x9f, 0xaa, 0xc5, 0xbd, 0x66, 0xbc, 0xb8, 0x03, 0x0f, 0xa8, 0xd3, 0x09, 0xe3, 0x51, 0xdd, 0xd7, 0x82, 0xd8, 0x43, 0xdf, 0x97, 0x56, 0x80, 0xae, 0x73, 0xee, 0xa9, 0xaa, 0xb2, 0x89, 0xb7, 0x57, 0x20, 0x5d, 0xad, 0xb8, 0xfd, 0xfb, 0x98, 0x9e, 0xc8, 0xdb, 0x8e, 0x70, 0x95, 0xf5, 0x1f, 0x24, 0x52, 0x9f, 0x56, 0x37, 0xaa, 0x66, 0x93, 0x31, 0xe2, 0x56, 0x9f, 0x8b, 0x85, 0x4a, 0xbe, 0xce, 0xc9, 0x9a, 0xa2, 0x64, 0xc3, 0xda, 0x7c, 0xc6, 0x86, 0x6f, 0x0c, 0x0e, 0x1f, 0xb8, 0x46, 0x98, 0x48, 0x58, 0x1c, 0x73 } +, + /* Prime 1 */ + 64, + { 0xcb, 0x61, 0xa8, 0x8c, 0x8c, 0x30, 0x5a, 0xd9, 0xa8, 0xfb, 0xec, 0x2b, 0xa4, 0xc8, 0x6c, 0xcc, 0xc2, 0x02, 0x80, 0x24, 0xaa, 0x16, 0x90, 0xc2, 0x9b, 0xc8, 0x26, 0x4d, 0x2f, 0xeb, 0xe8, 0x7e, 0x4f, 0x86, 0xe9, 0x12, 0xef, 0x0f, 0x5c, 0x18, 0x53, 0xd7, 0x1c, 0xbc, 0x9b, 0x14, 0xba, 0xed, 0x3c, 0x37, 0xce, 0xf6, 0xc7, 0xa3, 0x59, 0x8b, 0x6f, 0xbe, 0x06, 0x48, 0x10, 0x90, 0x5b, 0x57 } +, + /* Prime 2 */ + 64, + { 0xc0, 0x39, 0x9f, 0x0b, 0x93, 0x80, 0xfa, 0xba, 0x38, 0xff, 0x80, 0xd2, 0xff, 0xf6, 0xed, 0xe7, 0x9c, 0xfd, 0xab, 0xf6, 0x58, 0x97, 0x20, 0x77, 0xa5, 0xe2, 0xb2, 0x95, 0x69, 0x3e, 0xa5, 0x10, 0x72, 0x26, 0x8b, 0x91, 0x74, 0x6e, 0xea, 0x9b, 0xe0, 0x4a, 0xd6, 0x61, 0x00, 0xeb, 0xed, 0x73, 0x3d, 0xb4, 0xcd, 0x01, 0x47, 0xa1, 0x8d, 0x6d, 0xe8, 0xc0, 0xcd, 0x8f, 0xbf, 0x24, 0x9c, 0x33 } +, + /* Prime exponent 1 */ + 64, + { 0x94, 0x4c, 0x3a, 0x65, 0x79, 0x57, 0x4c, 0xf7, 0x87, 0x33, 0x62, 0xab, 0x14, 0x35, 0x9c, 0xb7, 0xd5, 0x03, 0x93, 0xc2, 0xa8, 0x4f, 0x59, 0xf0, 0xbd, 0x3c, 0xbd, 0x48, 0xed, 0x17, 0x7c, 0x68, 0x95, 0xbe, 0x8e, 0xb6, 0xe2, 0x9f, 0xf5, 0x8c, 0x3b, 0x9e, 0x0f, 0xf3, 0x2a, 0xb5, 0x7b, 0xf3, 0xbe, 0x44, 0x07, 0x62, 0x84, 0x81, 0x84, 0xaa, 0x9a, 0xa9, 0x19, 0xd5, 0x74, 0x56, 0x7e, 0x73 } +, + /* Prime exponent 2 */ + 64, + { 0x45, 0xeb, 0xef, 0xd5, 0x87, 0x27, 0x30, 0x8c, 0xd2, 0xb4, 0xe6, 0x08, 0x5a, 0x81, 0x58, 0xd2, 0x9a, 0x41, 0x8f, 0xee, 0xc1, 0x14, 0xe0, 0x03, 0x85, 0xbc, 0xeb, 0x96, 0xfb, 0xbc, 0x84, 0xd0, 0x71, 0xa5, 0x61, 0xb9, 0x5c, 0x30, 0x08, 0x79, 0x00, 0xe2, 0x58, 0x0e, 0xdb, 0x05, 0xf6, 0xce, 0xa7, 0x90, 0x7f, 0xcd, 0xca, 0x5f, 0x92, 0x91, 0x7b, 0x4b, 0xbe, 0xba, 0x5e, 0x1e, 0x14, 0x0f } +, + /* Coefficient */ + 64, + { 0xc5, 0x24, 0x68, 0xc8, 0xfd, 0x15, 0xe5, 0xda, 0x2f, 0x6c, 0x8e, 0xba, 0x4e, 0x97, 0xba, 0xeb, 0xe9, 0x95, 0xb6, 0x7a, 0x1a, 0x7a, 0xd7, 0x19, 0xdd, 0x9f, 0xff, 0x36, 0x6b, 0x18, 0x4d, 0x5a, 0xb4, 0x55, 0x07, 0x59, 0x09, 0x29, 0x20, 0x44, 0xec, 0xb3, 0x45, 0xcf, 0x2c, 0xdd, 0x26, 0x22, 0x8e, 0x21, 0xf8, 0x51, 0x83, 0x25, 0x5f, 0x4a, 0x9e, 0x69, 0xf4, 0xc7, 0x15, 0x2e, 0xbb, 0x0f } + +} +, +{{ + "PKCS#1 v1.5 Encryption Example 2.1", + /* Message */ + 17, + { 0xe9, 0xa7, 0x71, 0xe0, 0xa6, 0x5f, 0x28, 0x70, 0x8e, 0x83, 0xd5, 0xe6, 0xcc, 0x89, 0x8a, 0x41, 0xd7 } +, + /* Seed */ + 108, + { 0x16, 0x8e, 0x3e, 0xb5, 0x80, 0x9b, 0x08, 0x70, 0xe1, 0xf2, 0x48, 0x7e, 0x1b, 0xe7, 0x7a, 0x17, 0x6b, 0x34, 0x71, 0x6d, 0xe1, 0x41, 0xba, 0x4c, 0x90, 0x59, 0xda, 0x90, 0xe5, 0xe5, 0x1a, 0x36, 0x94, 0xe8, 0x58, 0xfe, 0xd1, 0x0b, 0x92, 0x6c, 0x02, 0x52, 0x39, 0x80, 0xa8, 0x90, 0x9d, 0xa9, 0x96, 0xc6, 0x43, 0x33, 0xea, 0x67, 0x67, 0x87, 0xbc, 0xe6, 0x77, 0xf1, 0x1f, 0xda, 0x77, 0xdb, 0xb1, 0xa9, 0x51, 0x6e, 0xdd, 0xa9, 0xb1, 0x29, 0x4f, 0xc2, 0xe4, 0x50, 0x52, 0x22, 0x88, 0xe9, 0x30, 0xbe, 0x7f, 0xa7, 0x29, 0xb2, 0x50, 0xe3, 0xaa, 0xc5, 0x20, 0x51, 0x1e, 0x95, 0x16, 0xaa, 0x86, 0x3a, 0xf6, 0xbc, 0x07, 0x5c, 0xbd, 0xbf, 0xf4, 0x30, 0x46, 0x70 } +, + /* Encryption */ + 128, + { 0x71, 0xc2, 0xb8, 0xfb, 0x38, 0x19, 0xf1, 0x34, 0xc2, 0x24, 0x7c, 0x6b, 0xab, 0xb4, 0xcf, 0xbe, 0x17, 0xd7, 0xb2, 0x64, 0x3f, 0x87, 0xac, 0xe5, 0xc5, 0x71, 0x27, 0x7b, 0xe1, 0x90, 0x8e, 0xf3, 0xa5, 0x28, 0x8e, 0x34, 0x38, 0x4e, 0x46, 0x0a, 0x70, 0x38, 0x6e, 0x7e, 0xa1, 0xd1, 0x9d, 0x3d, 0xca, 0x1c, 0xe1, 0x5b, 0xa9, 0x32, 0x39, 0xa8, 0xcd, 0xda, 0x18, 0xe3, 0x17, 0xfe, 0x07, 0x96, 0x80, 0xce, 0x7e, 0x6a, 0xc6, 0xd9, 0xbd, 0xaf, 0x86, 0xcb, 0x9a, 0xeb, 0xf1, 0xcf, 0x46, 0xcd, 0x10, 0xef, 0x6a, 0x68, 0x8b, 0x0c, 0xb2, 0xce, 0x76, 0x5d, 0xd0, 0xb3, 0x25, 0x20, 0x42, 0x39, 0x66, 0xee, 0xe1, 0xaa, 0x05, 0xc6, 0xc2, 0x8c, 0x6f, 0x35, 0x24, 0xfb, 0x68, 0x6b, 0x5f, 0xb1, 0x58, 0x53, 0x65, 0x9e, 0x58, 0x3a, 0xc4, 0x37, 0x21, 0x9d, 0xef, 0x8e, 0xdc, 0x58, 0xbe, 0x2d } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Encryption Example 2.2", + /* Message */ + 47, + { 0x66, 0x4b, 0xf0, 0x5d, 0x61, 0x2b, 0xaf, 0x61, 0x52, 0x4c, 0x60, 0x8e, 0xda, 0x36, 0xfc, 0x6e, 0xa2, 0xc9, 0x3c, 0x14, 0x31, 0x53, 0x22, 0x1b, 0xcf, 0xd6, 0xba, 0x0c, 0xfb, 0xbd, 0x6b, 0x64, 0x14, 0x47, 0xe4, 0x78, 0x8b, 0x0a, 0x46, 0x2c, 0xb5, 0xb3, 0xf9, 0xfa, 0xfc, 0x9a, 0x75 } +, + /* Seed */ + 78, + { 0xe7, 0xf0, 0xa2, 0x79, 0x18, 0xca, 0xd9, 0x15, 0xda, 0x28, 0x11, 0x36, 0x59, 0xff, 0xb5, 0xdf, 0xa0, 0xb5, 0x1b, 0x24, 0xd5, 0xa7, 0x1c, 0x20, 0x27, 0xf8, 0xe4, 0xd9, 0x40, 0x9e, 0x8c, 0x64, 0x72, 0xf0, 0xc5, 0x4b, 0x5c, 0x08, 0x85, 0x8d, 0xa6, 0x3d, 0x4b, 0x81, 0x72, 0xb0, 0x7d, 0xcf, 0x8c, 0x5a, 0x7e, 0x8f, 0x9e, 0x90, 0xf0, 0x17, 0xc2, 0x4b, 0x44, 0xd1, 0x6b, 0x67, 0x0b, 0xdc, 0x96, 0x03, 0x0c, 0x83, 0x53, 0xa2, 0x83, 0x9b, 0xa4, 0xc0, 0x75, 0xd2, 0x4c, 0x20 } +, + /* Encryption */ + 128, + { 0x06, 0x86, 0x90, 0x18, 0x13, 0xdb, 0x05, 0x3a, 0xc7, 0x08, 0xe3, 0xfc, 0xec, 0x6b, 0xae, 0x03, 0x60, 0x08, 0x8f, 0xd3, 0x44, 0xe9, 0xd7, 0xea, 0x11, 0x8b, 0xb3, 0xf5, 0x37, 0x53, 0x14, 0x25, 0x1e, 0x60, 0x67, 0x37, 0xf5, 0x82, 0x4b, 0x36, 0x28, 0xf6, 0x65, 0x03, 0x48, 0xf6, 0xab, 0x55, 0x3b, 0x27, 0x7d, 0xa0, 0x15, 0x44, 0xd0, 0x56, 0x73, 0xba, 0xed, 0xf4, 0x55, 0xcc, 0x03, 0x32, 0xf6, 0x13, 0xf6, 0x54, 0x78, 0xfc, 0xfe, 0x06, 0x67, 0x34, 0xc4, 0x65, 0x58, 0xbc, 0x23, 0x3b, 0x4b, 0x6f, 0x52, 0x41, 0xe4, 0xf4, 0xac, 0x53, 0xfc, 0x18, 0xc5, 0x53, 0x84, 0xc8, 0xfd, 0x96, 0x18, 0x3f, 0x0b, 0xb5, 0x51, 0x5e, 0x89, 0x31, 0x14, 0xf9, 0xc6, 0x1c, 0xcc, 0x11, 0xfc, 0x19, 0x83, 0xde, 0x74, 0x46, 0x92, 0x64, 0xdb, 0xdb, 0xb0, 0xc7, 0x49, 0x17, 0x4e, 0xcd, 0xfb, 0xe3 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 2.3", + /* Message */ + 52, + { 0x5e, 0x76, 0xe6, 0x6e, 0xd5, 0x75, 0x41, 0xfc, 0x23, 0xd3, 0x59, 0xf4, 0xad, 0xbf, 0x3f, 0x56, 0x82, 0x01, 0xd3, 0xc6, 0xf0, 0xe0, 0x26, 0xaa, 0xa5, 0x67, 0x63, 0x56, 0xcc, 0x98, 0x66, 0xf1, 0x75, 0x5d, 0xe9, 0x8c, 0xb3, 0x9f, 0x23, 0x6d, 0xaf, 0xa9, 0xe6, 0xbc, 0x79, 0x4b, 0x74, 0x43, 0xb5, 0x3a, 0x2d, 0x85 } +, + /* Seed */ + 73, + { 0x5c, 0x65, 0x68, 0xb6, 0xe3, 0x3b, 0xc1, 0x3a, 0xd2, 0xdc, 0xd6, 0x01, 0x2d, 0x17, 0xda, 0x81, 0xb1, 0x3d, 0xbd, 0x62, 0xaa, 0xe4, 0x0a, 0x64, 0xaf, 0x97, 0xe2, 0x19, 0xe7, 0x5d, 0xc1, 0x81, 0x12, 0x60, 0x77, 0xd1, 0x20, 0xdd, 0xa1, 0x9d, 0x63, 0x12, 0xcf, 0x1e, 0x98, 0x71, 0xc1, 0x15, 0xf0, 0x86, 0x7f, 0xe6, 0x62, 0xd7, 0x8a, 0x40, 0x31, 0x97, 0x6b, 0xdd, 0xef, 0x68, 0xf5, 0x2b, 0x68, 0x99, 0x58, 0x67, 0xcd, 0x80, 0x95, 0x05, 0xdd } +, + /* Encryption */ + 128, + { 0x19, 0xe7, 0x99, 0x66, 0xff, 0x1f, 0xbc, 0x10, 0x07, 0x3d, 0xe7, 0x3d, 0xf3, 0xa5, 0x31, 0x63, 0x78, 0x74, 0xe4, 0x7d, 0xf6, 0x39, 0x25, 0x6c, 0x51, 0xd0, 0xbb, 0xa9, 0x35, 0x61, 0x0b, 0x46, 0x34, 0xf9, 0xe5, 0xb4, 0x68, 0x9b, 0xd9, 0x21, 0x73, 0x5b, 0x32, 0x23, 0x6e, 0xfc, 0xc6, 0xe7, 0xcc, 0x49, 0xa9, 0xe0, 0x6a, 0x25, 0xac, 0x96, 0x59, 0xb7, 0xfe, 0x82, 0x9c, 0xb3, 0xe8, 0xb0, 0x1f, 0x10, 0x31, 0x79, 0x42, 0x23, 0x65, 0x74, 0x1b, 0x76, 0xc8, 0x34, 0x21, 0x49, 0xce, 0xdc, 0x76, 0xeb, 0x0a, 0xd0, 0x18, 0xed, 0x42, 0x35, 0xfb, 0xd5, 0x24, 0xfd, 0x87, 0xc9, 0x54, 0x9a, 0xb3, 0x3f, 0xf2, 0x3e, 0xe4, 0xf8, 0x20, 0x0e, 0xfa, 0x33, 0x02, 0x7e, 0x9d, 0xee, 0xc6, 0x0f, 0xac, 0x01, 0x3d, 0x1e, 0x56, 0xe6, 0xe3, 0x33, 0xd4, 0x93, 0xa4, 0xa9, 0x46, 0x0f, 0xe5, 0x8a } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 2.4", + /* Message */ + 9, + { 0x5b, 0x19, 0x50, 0x48, 0xeb, 0x90, 0xeb, 0x47, 0x93 } +, + /* Seed */ + 116, + { 0xbb, 0xbd, 0x49, 0x55, 0x0e, 0xd1, 0xea, 0x1b, 0x6b, 0xc7, 0x20, 0x6c, 0xe0, 0xb0, 0x03, 0xa6, 0x32, 0xa5, 0x2b, 0x0b, 0xac, 0x5f, 0x32, 0x71, 0x0b, 0x39, 0xfa, 0x64, 0xb3, 0x55, 0x6a, 0xd6, 0xf6, 0xc8, 0x2b, 0xd9, 0xd5, 0x31, 0xb3, 0x07, 0x46, 0x9e, 0x86, 0x3f, 0x54, 0xb5, 0xfe, 0x21, 0x83, 0x05, 0x69, 0x54, 0xf2, 0xa9, 0x67, 0xe4, 0xdc, 0x2b, 0x32, 0x6e, 0x41, 0xdd, 0xdf, 0x74, 0x3a, 0x76, 0x4f, 0x7e, 0x82, 0x88, 0x68, 0x29, 0xa8, 0xfa, 0xb2, 0x77, 0x2a, 0x34, 0x97, 0x70, 0x6b, 0x95, 0x38, 0xa9, 0xf8, 0x42, 0x96, 0xc8, 0x2d, 0x9b, 0xaf, 0xc2, 0x9c, 0x39, 0xd4, 0x68, 0x4f, 0x75, 0xff, 0x6b, 0xb1, 0xc1, 0x2e, 0x39, 0xbb, 0x80, 0x56, 0xaf, 0x2d, 0x24, 0x34, 0x4b, 0x2c, 0xae, 0x46, 0x29 } +, + /* Encryption */ + 128, + { 0x42, 0xc9, 0xcb, 0x68, 0x21, 0xb5, 0x5d, 0xae, 0x30, 0xd9, 0x00, 0x25, 0x75, 0x31, 0x12, 0xe6, 0xee, 0x02, 0xf4, 0xad, 0x6f, 0x0f, 0x5b, 0x3c, 0xc4, 0x95, 0x2a, 0x12, 0x7c, 0x8a, 0x16, 0xf6, 0x64, 0x79, 0xb8, 0x14, 0x4f, 0x3c, 0xf2, 0x9d, 0x84, 0xe4, 0x3d, 0x67, 0xd6, 0x77, 0x12, 0xc7, 0xf5, 0xb7, 0x6d, 0xa2, 0xc6, 0x6b, 0xa0, 0xe9, 0x0c, 0xd4, 0xb1, 0xfc, 0x1c, 0x1b, 0x3f, 0x17, 0xa3, 0x92, 0xe7, 0x04, 0x08, 0x28, 0x8a, 0xf6, 0x9b, 0x50, 0xfe, 0x8a, 0x50, 0xb3, 0x29, 0x6a, 0x0d, 0xab, 0xd7, 0xc8, 0xdc, 0x39, 0x84, 0xa1, 0x94, 0x06, 0x88, 0xbe, 0x70, 0x98, 0x25, 0x16, 0x20, 0x25, 0x6c, 0xc2, 0x1b, 0x7c, 0x76, 0xed, 0x29, 0xd8, 0x6f, 0xf7, 0xc0, 0x1e, 0xc2, 0x87, 0xdf, 0x47, 0x38, 0xbe, 0x34, 0x69, 0xb3, 0x0a, 0x3f, 0x8f, 0xb7, 0xbe, 0x83, 0xd9, 0x36, 0x1a } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 2.5", + /* Message */ + 61, + { 0x66, 0x0b, 0xbd, 0x40, 0x06, 0x9c, 0xc6, 0x7b, 0xad, 0xe4, 0x1a, 0x09, 0xec, 0xf4, 0x3c, 0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0xf4, 0xd0, 0x6e, 0x2c, 0xa5, 0xf1, 0x19, 0x49, 0xee, 0xee, 0x7e, 0xe4, 0x7f, 0x1d, 0x5b, 0x4c, 0x88, 0x24, 0x1f, 0x50, 0xe4, 0xd6, 0xed, 0xf0, 0x18, 0x3d, 0x4f, 0xa3, 0x5a, 0x37, 0x1f, 0xc4, 0x07, 0x36, 0x4f, 0x2d, 0xca, 0xa4, 0xcd, 0xae, 0xce, 0xfc, 0xea, 0x6d, 0xfa, 0xc1, 0xd5, 0x13, 0xf9, 0x05, 0xe7, 0x47, 0x94, 0x47, 0x44, 0xbb, 0x64, 0x57, 0x6b, 0xa1, 0xc8 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 2.6", + /* Message */ + 11, + { 0x81, 0xcb, 0x0a, 0x97, 0x69, 0x8f, 0x82, 0x3b, 0x56, 0xb4, 0x5f } +, + /* Seed */ + 114, + { 0x93, 0x8c, 0x8d, 0xfd, 0xa0, 0x8b, 0x89, 0x05, 0x5b, 0x68, 0xaf, 0x01, 0x1f, 0x24, 0x6c, 0xec, 0x1f, 0x93, 0xa2, 0x77, 0x1d, 0xa9, 0x7d, 0xba, 0x20, 0x95, 0x4c, 0x90, 0x09, 0x12, 0x28, 0x5e, 0x5d, 0xb1, 0x87, 0xb2, 0x9e, 0x32, 0x72, 0xe9, 0x9e, 0x69, 0x4e, 0x12, 0x14, 0x17, 0x25, 0x28, 0x45, 0x30, 0x84, 0x06, 0x4e, 0x5c, 0x60, 0xf0, 0x1e, 0x78, 0x6f, 0xc5, 0xd0, 0xd9, 0xaf, 0x06, 0x39, 0xa4, 0x98, 0xc5, 0x7a, 0xde, 0x93, 0x77, 0x60, 0xae, 0x51, 0x74, 0x84, 0xaf, 0xd7, 0x02, 0x5e, 0xa0, 0xd5, 0x5a, 0x62, 0xb1, 0x1f, 0x9a, 0xab, 0x7f, 0xa5, 0xdd, 0xd0, 0x93, 0xe5, 0xea, 0xba, 0xd6, 0x1b, 0x67, 0xa2, 0x95, 0xa7, 0x75, 0xbe, 0x96, 0xc6, 0xb7, 0x6e, 0xc3, 0xfe, 0x47, 0x29, 0x50 } +, + /* Encryption */ + 128, + { 0x7f, 0xb8, 0xf3, 0x35, 0xee, 0xdc, 0x4a, 0xf6, 0xaf, 0x44, 0x07, 0x3d, 0xa1, 0x96, 0x45, 0x7d, 0x04, 0x61, 0x45, 0x03, 0x01, 0x47, 0xf8, 0x42, 0x0f, 0xc7, 0x9b, 0xd5, 0x89, 0x77, 0x4a, 0x73, 0x0a, 0x6d, 0x94, 0xfb, 0x7e, 0xfa, 0xdc, 0x5a, 0xee, 0xa7, 0xc0, 0x70, 0xf1, 0x89, 0x24, 0x91, 0x25, 0xe1, 0x66, 0xc6, 0xd3, 0x01, 0x29, 0xec, 0xf2, 0xc4, 0x82, 0x2a, 0x50, 0x49, 0x6b, 0xc2, 0xf2, 0x1e, 0x79, 0xac, 0x57, 0xdb, 0xfb, 0xdd, 0x71, 0xa6, 0x8b, 0x58, 0xd9, 0x05, 0x1b, 0x48, 0x0b, 0xf4, 0x77, 0x48, 0xa1, 0x3d, 0xfb, 0x67, 0x3e, 0xae, 0xd7, 0x71, 0x0a, 0x46, 0x8f, 0xe7, 0x2f, 0x7d, 0x74, 0xe6, 0xf4, 0xa2, 0x89, 0x44, 0x04, 0x3a, 0x52, 0xd9, 0x30, 0xde, 0x68, 0xdb, 0xcb, 0x6e, 0xe7, 0xfb, 0x8b, 0x69, 0x64, 0x05, 0x41, 0xe3, 0xed, 0x5b, 0x75, 0x4e, 0x65, 0xfe } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 2.7", + /* Message */ + 45, + { 0x05, 0xf7, 0x83, 0x56, 0x23, 0xc8, 0xcf, 0xaa, 0xe4, 0x82, 0xa9, 0x10, 0x85, 0xb9, 0x7f, 0x6b, 0x95, 0x92, 0x8b, 0xb9, 0x74, 0xac, 0xad, 0x02, 0x36, 0x4a, 0xaf, 0x13, 0x17, 0xed, 0x53, 0xc9, 0xdb,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x05, 0x2b, 0x8a, 0xa6, 0x5b, 0x7e, 0x9c, 0x5c, 0x02, 0x00, 0x38, 0x2d, 0x35, 0xd5, 0x60, 0xf2, 0xd3, 0x3d, 0xd0, 0x49, 0xe0, 0x6a, 0xc8, 0x27, 0xcb, 0xdd, 0x9a, 0xf5, 0x81, 0xa6, 0xb2, 0x6d, 0xb6, 0x1d, 0x43, 0xd7, 0x12, 0x4b, 0x34, 0x72, 0x1d, 0xf1, 0x42 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 2.8", + /* Message */ + 59, + { 0xe2, 0xe0, 0xf6, 0xb3, 0x28, 0xd9, 0xbb, 0xe9, 0xfd, 0x66, 0xcd, 0x87, 0x98, 0x7c, 0x11, 0x60, 0xed, 0x23, 0x7b, 0x1c, 0x7c, 0x65, 0x6a, 0x89, 0xfb, 0x1f, 0x21, 0xd7, 0x09, 0x40, 0x3b, 0x04, 0x10, 0xf8, 0xe4, 0xe1, 0x2e, 0xb9, 0x69, 0x0a, 0xeb, 0xeb, 0x38, 0x07, 0x31, 0x9a, 0x93, 0x65, 0x64, 0xf6, 0x67, 0x17, 0xa7, 0x1c, 0x48, 0x62, 0xcc, 0xc5, 0x6e } +, + /* Seed */ + 66, + { 0xcf, 0x18, 0xe6, 0x08, 0xb1, 0x56, 0x14, 0x5c, 0x44, 0xde, 0x31, 0x49, 0x66, 0xcb, 0xcc, 0x66, 0x74, 0xa4, 0x5a, 0xe0, 0xdf, 0x90, 0x04, 0x06, 0xe4, 0x0d, 0x3d, 0xfc, 0x32, 0x2f, 0x39, 0x40, 0x4c, 0xee, 0xb6, 0xdc, 0x58, 0xf8, 0x01, 0xbb, 0xf2, 0xac, 0x4f, 0x47, 0x84, 0x1a, 0xbd, 0x79, 0x61, 0x79, 0xd0, 0x82, 0x4f, 0x3b, 0xf5, 0x51, 0x8d, 0x78, 0xcc, 0x66, 0xad, 0x8d, 0xfb, 0xed, 0xb1, 0x17 } +, + /* Encryption */ + 128, + { 0x14, 0x01, 0xaa, 0x21, 0xec, 0x6e, 0xba, 0xa7, 0xe3, 0xa9, 0xf7, 0x13, 0xc8, 0x6b, 0x50, 0x8e, 0x37, 0x5f, 0x6c, 0x12, 0x5b, 0x29, 0x62, 0x6e, 0xbd, 0x34, 0x9f, 0x64, 0xe2, 0x0f, 0xa4, 0x8a, 0x1b, 0x06, 0x84, 0x79, 0xff, 0xf3, 0x30, 0x22, 0xf6, 0x6f, 0x86, 0xe9, 0x7d, 0x9c, 0x5e, 0xdd, 0x90, 0x26, 0xe3, 0x18, 0x3c, 0xe0, 0x86, 0x41, 0x57, 0x06, 0x59, 0x35, 0x2f, 0x87, 0xa6, 0x18, 0x91, 0xf3, 0xd8, 0x6a, 0x3d, 0x24, 0x5f, 0x02, 0x45, 0xe3, 0x9d, 0x99, 0x89, 0x2c, 0x67, 0xfa, 0x2b, 0xed, 0x8e, 0x37, 0x54, 0x8d, 0xe2, 0x3d, 0xef, 0xdd, 0x1e, 0x43, 0xd5, 0xd7, 0xe3, 0xd9, 0xa3, 0xc2, 0x2c, 0xe6, 0xa3, 0x68, 0xd8, 0x4c, 0x5a, 0xfa, 0x1c, 0xc5, 0xbf, 0x49, 0xb6, 0x8f, 0xe5, 0xc2, 0x5a, 0x32, 0x6b, 0x0e, 0xec, 0x5e, 0x44, 0xc5, 0xe2, 0xff, 0x5a, 0x35, 0x9d, 0xd1 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 2.9", + /* Message */ + 17, + { 0xc6, 0x95, 0x78, 0xea, 0x03, 0xe2, 0x69, 0xb1, 0xb9, 0x16, 0x33, 0xa7, 0x2f, 0x9f, 0xb4, 0xd1, 0x0c } +, + /* Seed */ + 108, + { 0xe0, 0xa1, 0xa9, 0xba, 0xe3, 0x0a, 0x7a, 0xc6, 0x6c, 0xab, 0x3d, 0x86, 0x43, 0x3c, 0x1c, 0xa5, 0xe8, 0xac, 0x2b, 0x74, 0xe4, 0x83, 0xca, 0x7f, 0x34, 0x59, 0x77, 0x16, 0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 0xc3, 0xc1, 0x1a, 0xc0, 0x05, 0x53, 0xc6, 0x75, 0x27, 0x07, 0xe0, 0xdf, 0x92, 0x80, 0xc4, 0xf2, 0xb7, 0xd1, 0x9f, 0xd6, 0xf3, 0xd8, 0xbb, 0xcc, 0x7b, 0xe6 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 2.10", + /* Message */ + 20, + { 0x76, 0x72, 0xcf, 0xc2, 0x7a, 0x41, 0xd5, 0x01, 0xaa, 0x4c, 0x41, 0xba, 0xab, 0xf4, 0x52, 0x5a, 0x7c, 0x45, 0x5f, 0xc8 } +, + /* Seed */ + 105, + { 0x4c, 0xee, 0xa1, 0xa8, 0x94, 0x64, 0xa5, 0xd2, 0xf8, 0x9e, 0x07, 0x89, 0x53, 0xca, 0xf7, 0x76, 0x36, 0x58, 0x98, 0xa5, 0xbd, 0x5e, 0x8e, 0x44, 0x8c, 0x65, 0xda, 0x26, 0xff, 0x98, 0x90, 0x0c, 0xd0, 0x80, 0x61, 0xef, 0x44, 0x6c, 0x69, 0xb4, 0x8d, 0xc4, 0x60, 0x9e, 0xd8, 0x65, 0x4a, 0x64, 0x6d, 0x70, 0x82, 0x62, 0xcb, 0x84, 0x09, 0xac, 0x27, 0xc4, 0xa4, 0x9a, 0xdf, 0xed, 0x47, 0xa8, 0x5a, 0xd4, 0x29, 0xed, 0x75, 0x07, 0x75, 0x78, 0xe4, 0xc2, 0x73, 0xc6, 0x1e, 0x2c, 0x3b, 0x46, 0xbe, 0xb4, 0x72, 0xf0, 0xa3, 0x45, 0xa0, 0x5d, 0x61, 0xa7, 0xea, 0xaa, 0xd8, 0xa6, 0x3e, 0x0b, 0x3d, 0x49, 0x52, 0xf2, 0x7c, 0x40, 0x81, 0x32, 0x9e } +, + /* Encryption */ + 128, + { 0x25, 0x2b, 0x14, 0x13, 0x3f, 0x1d, 0xb2, 0x50, 0x13, 0x29, 0x35, 0x01, 0xe3, 0x56, 0x53, 0x4f, 0x26, 0xaf, 0xe3, 0x34, 0x68, 0x8e, 0x68, 0xd7, 0x91, 0x83, 0x3a, 0x0d, 0x82, 0x56, 0x05, 0x70, 0xbb, 0xb3, 0xce, 0x2b, 0x16, 0xd8, 0xb5, 0xf7, 0xf8, 0x9e, 0x7e, 0xbc, 0x7c, 0xf9, 0xc2, 0x94, 0xab, 0x34, 0x16, 0xb7, 0xc2, 0x11, 0x87, 0x70, 0x7f, 0xe5, 0xe7, 0x99, 0x2e, 0x72, 0x0f, 0xf9, 0x58, 0xda, 0xa4, 0x0f, 0x5a, 0xd4, 0x5b, 0xc7, 0x47, 0x47, 0x96, 0x39, 0xa5, 0x37, 0xfe, 0x0a, 0x4a, 0x75, 0xfc, 0xfb, 0x45, 0xa5, 0x3f, 0x01, 0x73, 0xaf, 0xc0, 0xf3, 0xcc, 0x91, 0x0b, 0x86, 0xae, 0x31, 0x37, 0x62, 0x8d, 0x90, 0xff, 0x67, 0x5a, 0xe1, 0xae, 0x31, 0xe1, 0x64, 0x05, 0x37, 0xea, 0x1a, 0x7c, 0xcc, 0xfb, 0x73, 0xf8, 0xbe, 0x5a, 0xec, 0xa0, 0x3b, 0xab, 0x19, 0x3b, 0xb0 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 2.11", + /* Message */ + 32, + { 0xa1, 0x6a, 0xd8, 0xf2, 0xe0, 0x93, 0x23, 0x42, 0xed, 0x21, 0xe1, 0x37, 0x77, 0xf4, 0x65, 0x2a, 0x35, 0x50, 0xdd, 0xb4, 0x36, 0x8b, 0x5e, 0xa7, 0x1c, 0x66, 0xdb, 0xc3, 0xbb, 0xfe, 0xb7, 0xdb } +, + /* Seed */ + 93, + { 0x55, 0x88, 0x4c, 0x83, 0x0d, 0x4a, 0x80, 0xb7, 0x9f, 0x08, 0x9d, 0xa7, 0x4d, 0xc2, 0x5a, 0xe0, 0xc4, 0x82, 0x46, 0x21, 0x45, 0xe1, 0xd0, 0x95, 0x23, 0xda, 0x3c, 0x93, 0x44, 0xbb, 0x97, 0xb0, 0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xfb, 0xb9, 0xa6, 0x78, 0x51, 0x96, 0x10 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 2.12", + /* Message */ + 1, + { 0x4a } +, + /* Seed */ + 124, + { 0x8a, 0xa0, 0xce, 0xd1, 0x7f, 0x09, 0xad, 0xae, 0x61, 0x0a, 0x46, 0x03, 0x0d, 0xad, 0x40, 0x31, 0x1b, 0xf1, 0x46, 0x9c, 0x27, 0x37, 0x41, 0x1e, 0x40, 0xf9, 0x23, 0x96, 0x75, 0x1d, 0xd5, 0x66, 0x37, 0xc9, 0x58, 0xdb, 0xc5, 0x8a, 0x17, 0xfd, 0xbd, 0xdd, 0xdb, 0xbf, 0x79, 0x75, 0x18, 0x78, 0x98, 0xbe, 0x1a, 0xa6, 0x3c, 0x5e, 0xee, 0x5f, 0x9a, 0x19, 0x02, 0x98, 0x0f, 0x59, 0x51, 0x84, 0xb9, 0xb5, 0xb4, 0x65, 0xb9, 0x2e, 0x20, 0xf7, 0xae, 0x8b, 0x5a, 0x5c, 0xee, 0x7f, 0x3b, 0x57, 0xd9, 0x97, 0xa0, 0x6a, 0x70, 0x2d, 0x23, 0x83, 0x50, 0xa9, 0x26, 0x98, 0xef, 0x27, 0x5d, 0xff, 0x52, 0x77, 0xbd, 0x2c, 0x99, 0x96, 0x47, 0x40, 0x5a, 0xdb, 0xe4, 0xfb, 0x3f, 0x1b, 0xe7, 0x5e, 0x15, 0x9a, 0x4c, 0x43, 0x83, 0x13, 0xb7, 0xfd, 0x8a, 0xca, 0x9d, 0xea } +, + /* Encryption */ + 128, + { 0x4c, 0x4e, 0x5a, 0xb6, 0x2d, 0x0c, 0x96, 0x7a, 0xb8, 0x29, 0x21, 0x42, 0x9f, 0xfe, 0x50, 0xd2, 0x24, 0x0e, 0x7e, 0x0a, 0x18, 0x75, 0x48, 0x87, 0x55, 0xbb, 0x7f, 0xf6, 0x15, 0xa8, 0xc9, 0x9a, 0xbc, 0x37, 0xb2, 0xe4, 0x71, 0x47, 0xa9, 0x27, 0xd7, 0xb9, 0x8c, 0x30, 0xdb, 0x24, 0xda, 0x8c, 0xd3, 0x5e, 0x13, 0xd7, 0xb7, 0x14, 0x14, 0xd0, 0x32, 0xbd, 0x0c, 0x3c, 0xe3, 0x8b, 0x89, 0xb1, 0x1b, 0x2c, 0x3f, 0x9d, 0x83, 0x08, 0x16, 0x71, 0x6a, 0x2e, 0x8c, 0xcd, 0x8c, 0x79, 0xe9, 0xc7, 0x49, 0x31, 0xa7, 0xb8, 0xa8, 0xdb, 0x13, 0x12, 0x8c, 0xe4, 0x0b, 0x21, 0x59, 0xe4, 0x98, 0xda, 0x98, 0xf2, 0xaa, 0x35, 0x2f, 0x23, 0x85, 0x31, 0x06, 0xb6, 0x61, 0xd8, 0x8e, 0xd0, 0x6f, 0xf6, 0x6a, 0x56, 0xe7, 0x56, 0x59, 0x72, 0x20, 0xbd, 0x10, 0x15, 0x81, 0x53, 0xce, 0x5c, 0x02, 0x63 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 2.13", + /* Message */ + 11, + { 0xbf, 0xfc, 0x42, 0x08, 0x73, 0xf5, 0xaf, 0x5d, 0xd2, 0x3b, 0xb0 } +, + /* Seed */ + 114, + { 0xdd, 0x31, 0xcc, 0xd4, 0x7d, 0x4e, 0x31, 0x02, 0xdf, 0x0f, 0xc5, 0x9b, 0x1b, 0x84, 0x77, 0xaf, 0x3a, 0x78, 0xc2, 0xfa, 0x9c, 0x8e, 0xcb, 0x4f, 0x0b, 0x3b, 0xde, 0x23, 0x50, 0x04, 0x36, 0x55, 0x03, 0x64, 0x66, 0x5f, 0x81, 0xc0, 0x35, 0x6a, 0xbc, 0x0b, 0x78, 0xe9, 0x73, 0x19, 0x11, 0x14, 0x02, 0x75, 0xc8, 0x66, 0xf7, 0x5a, 0xd0, 0xcb, 0xbc, 0x88, 0xad, 0x6b, 0x5d, 0x4d, 0xa5, 0x2d, 0x08, 0xe2, 0x2e, 0xe5, 0x39, 0xb5, 0x8e, 0x92, 0xc6, 0x19, 0x63, 0x87, 0xe2, 0x21, 0xa0, 0x87, 0x39, 0x6c, 0xbe, 0x57, 0xec, 0x56, 0x03, 0xf6, 0x16, 0x26, 0x27, 0x98, 0x3e, 0xff, 0x82, 0xde, 0x04, 0x8b, 0xdc, 0x1b, 0x5e, 0xdb, 0xb5, 0xd4, 0xea, 0x84, 0xf5, 0x02, 0x24, 0xbd, 0x88, 0xa9, 0x05, 0xda } +, + /* Encryption */ + 128, + { 0x0d, 0xa2, 0xd6, 0xf7, 0xbc, 0xb5, 0x0a, 0x47, 0x2e, 0xda, 0x24, 0x60, 0x9d, 0xa6, 0x77, 0x28, 0xe5, 0x3c, 0x98, 0x80, 0xaa, 0x5f, 0xb6, 0xfb, 0xe6, 0x0d, 0x83, 0xc1, 0x1e, 0x6b, 0xb3, 0xcf, 0xdb, 0x17, 0xd1, 0x4d, 0xbc, 0xe8, 0xec, 0x55, 0xc7, 0x3a, 0xb0, 0x14, 0x3e, 0x9b, 0x27, 0x56, 0xbb, 0x69, 0x68, 0xe5, 0xaf, 0x1a, 0xed, 0xcf, 0x6a, 0x80, 0xc2, 0x6d, 0x49, 0x0e, 0x47, 0x18, 0x7e, 0xa5, 0xd8, 0xcd, 0x2f, 0xac, 0xb8, 0x1c, 0xe6, 0x4a, 0x72, 0x3c, 0x40, 0xf0, 0xba, 0x4c, 0x69, 0x3e, 0x1b, 0x11, 0x43, 0xdf, 0x15, 0xa4, 0x20, 0x91, 0x70, 0x9a, 0xb4, 0xc7, 0xcd, 0x9d, 0x47, 0x07, 0x9e, 0xcd, 0x68, 0xf6, 0xa1, 0x96, 0x44, 0x8a, 0x44, 0x67, 0x9a, 0x04, 0x14, 0x10, 0x41, 0x8f, 0x11, 0xa1, 0xe1, 0xbc, 0xe7, 0x8e, 0x77, 0x26, 0x04, 0xa2, 0xf2, 0x77, 0x81, 0x95 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 2.14", + /* Message */ + 40, + { 0x1a, 0x9b, 0x87, 0x29, 0x21, 0x0a, 0x84, 0x71, 0xfc, 0x5c, 0xd7, 0x09, 0xf2, 0xed, 0xd3, 0x24, 0x01, 0x50, 0x24, 0x4b, 0xec, 0x96, 0xa9, 0x2f, 0xf8, 0x07, 0xe3, 0xb3, 0x0d, 0x29, 0x5d, 0x3c, 0x34, 0x5c, 0x04, 0x4f, 0x2e, 0x95, 0x60, 0x37 } +, + /* Seed */ + 85, + { 0x58, 0x78, 0xc9, 0x1b, 0x16, 0x6e, 0x90, 0xc3, 0x4e, 0x6e, 0x66, 0x56, 0x8c, 0x15, 0x1f, 0x4d, 0x44, 0x43, 0x40, 0xb5, 0xf1, 0xd7, 0x30, 0x52, 0xcc, 0x56, 0x33, 0xea, 0x2e, 0x47, 0xac, 0xed, 0x7b, 0x17, 0x8a, 0x64, 0xfb, 0x09, 0xa5, 0xad, 0x08, 0x46, 0xae, 0xe4, 0x11, 0x6d, 0x67, 0x80, 0xee, 0x75, 0xeb, 0x20, 0x85, 0x16, 0x68, 0x82, 0x0c, 0xde, 0xc0, 0xf2, 0xc4, 0x96, 0xe4, 0xc2, 0x88, 0xd8, 0x27, 0x9c, 0x1c, 0x5d, 0x4e, 0xc0, 0x0d, 0x98, 0x0c, 0x27, 0x2e, 0x87, 0x05, 0x18, 0x48, 0x6d, 0xca, 0xea, 0x85 } +, + /* Encryption */ + 128, + { 0x37, 0x00, 0xac, 0x36, 0x2c, 0xf6, 0x0e, 0x16, 0x39, 0x47, 0xa1, 0x98, 0xd0, 0x0f, 0x3b, 0x3b, 0x26, 0xe0, 0x3e, 0xe2, 0xfb, 0x78, 0x2b, 0x42, 0x88, 0xb8, 0xc1, 0xde, 0x76, 0xe9, 0xe8, 0x99, 0x46, 0xc9, 0x80, 0x7c, 0x56, 0xe0, 0x9c, 0x7b, 0x52, 0xbe, 0x00, 0x78, 0xac, 0xf6, 0x92, 0x96, 0x4a, 0xcb, 0x97, 0xd1, 0xfa, 0x5c, 0xeb, 0x57, 0x76, 0xa1, 0xd5, 0x56, 0xb4, 0xbc, 0x9d, 0xb0, 0x0b, 0xda, 0x25, 0x23, 0x7a, 0x75, 0x1b, 0x7c, 0x22, 0x9b, 0x6b, 0x57, 0xf7, 0xff, 0x75, 0x1c, 0x12, 0xd1, 0xf2, 0x2a, 0x4f, 0xb0, 0xe9, 0x0b, 0x63, 0xd0, 0x42, 0xd9, 0x49, 0x9e, 0x0f, 0x7e, 0xfe, 0xad, 0xd3, 0xc5, 0x88, 0xf2, 0xc7, 0x43, 0xa1, 0x2c, 0x56, 0x7c, 0x81, 0x57, 0x8d, 0xbe, 0xeb, 0xfd, 0x37, 0x74, 0xda, 0x34, 0xad, 0x09, 0xee, 0xbe, 0x90, 0x17, 0x89, 0x02, 0x14, 0xb5 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 2.15", + /* Message */ + 64, + { 0xa6, 0xd0, 0xe8, 0xc1, 0xea, 0x4a, 0xb4, 0xec, 0xc8, 0x95, 0x7d, 0x62, 0x28, 0x15, 0x79, 0x67, 0x5a, 0x64, 0x8d, 0x62, 0xb7, 0xf2, 0x2b, 0x2b, 0x08, 0xd1, 0x31, 0x3f, 0x40, 0x6f, 0x13, 0x7e, 0x99, 0x42, 0x67, 0x35, 0xcd, 0xb9, 0x37, 0x2f, 0xec, 0xa1, 0xee, 0x78, 0x46, 0x3f, 0xa5, 0xde, 0x9c, 0xdd, 0x84, 0x75, 0x6c, 0x68, 0xbd, 0x1d, 0x92, 0xba, 0x96, 0x5f, 0x50, 0x64, 0x10, 0xb1 } +, + /* Seed */ + 61, + { 0x1c, 0x25, 0xc9, 0xb8, 0x32, 0x16, 0x9a, 0x1f, 0xdb, 0x6c, 0x14, 0x8e, 0x47, 0xe6, 0x6c, 0x3c, 0xc8, 0x21, 0x41, 0xe6, 0x11, 0xa6, 0xf3, 0x0c, 0xc9, 0x0c, 0x50, 0x49, 0xe8, 0xc5, 0x02, 0xb3, 0x1c, 0xad, 0xc7, 0x62, 0x39, 0xb7, 0xbd, 0xaf, 0x93, 0xfa, 0x97, 0x34, 0x3e, 0x7e, 0xe5, 0x51, 0xbc, 0x52, 0xfd, 0xb5, 0xec, 0x9e, 0x40, 0x0a, 0xf0, 0x5d, 0xbe, 0xac, 0xda } +, + /* Encryption */ + 128, + { 0x00, 0xe8, 0xb2, 0xfc, 0x76, 0xdf, 0xb4, 0xa6, 0xcc, 0x43, 0x64, 0xde, 0x8f, 0x68, 0x3c, 0x3f, 0xcd, 0x0a, 0x9e, 0xcf, 0xbd, 0x4a, 0x5a, 0x72, 0x24, 0xf4, 0x9a, 0xe9, 0xb4, 0xf3, 0xb5, 0xcd, 0xc7, 0x1c, 0xbb, 0x8c, 0x66, 0xfd, 0x35, 0xf3, 0xd1, 0x8e, 0xca, 0x98, 0x96, 0x7b, 0xd4, 0x00, 0x5d, 0xf7, 0x91, 0x52, 0x41, 0x6f, 0xd4, 0x7e, 0x56, 0x2c, 0x55, 0xed, 0xc6, 0xd6, 0x12, 0x12, 0x28, 0x6e, 0xf9, 0x75, 0xbc, 0xc8, 0x02, 0x69, 0x25, 0x92, 0x65, 0x39, 0x00, 0x97, 0x3c, 0x72, 0xe0, 0x1a, 0x69, 0x3b, 0x05, 0xfc, 0x2d, 0x58, 0x56, 0xea, 0xef, 0x7a, 0xc0, 0x8f, 0xf5, 0xec, 0xd5, 0x31, 0xe2, 0xc2, 0xce, 0x92, 0x77, 0x45, 0xa1, 0x16, 0x5a, 0x51, 0xaa, 0x66, 0x98, 0xa1, 0xff, 0xcb, 0x87, 0xf8, 0x1e, 0xf6, 0x51, 0x0b, 0xca, 0xf9, 0xcb, 0x76, 0x1e, 0x9e, 0x1f, 0x0f } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 2.16", + /* Message */ + 63, + { 0xf3, 0x40, 0x5b, 0x21, 0x8f, 0x3e, 0xc6, 0x03, 0xa9, 0x80, 0x69, 0x00, 0x99, 0xc2, 0xcf, 0x5c, 0xbe, 0x0b, 0x2b, 0x05, 0x96, 0x79, 0xc4,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0xf7, 0xf9, 0x5a, 0xd1, 0xff, 0x15, 0x88, 0x90, 0x25, 0xb1, 0xb2, 0xe8, 0x1e, 0x1b, 0xf3, 0xb2, 0xde, 0x5b, 0xa9, 0x18, 0x7c, 0xa9, 0x6c, 0xeb, 0xa9, 0xfc, 0xec, 0xef, 0x9c, 0x53, 0xe4, 0x94, 0x34, 0x86, 0x18, 0x59, 0x67, 0xcf, 0x7a, 0x64, 0x77, 0xc3, 0x29, 0xf0, 0x0e, 0xa6, 0x95, 0x52, 0x5b, 0xca, 0x99, 0xf2, 0xc7 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 2.17", + /* Message */ + 52, + { 0x6a, 0xfa, 0xdb, 0xe3, 0xda, 0x68, 0xd9, 0x02, 0x85, 0xbb, 0x8f, 0x1e, 0x21, 0x29, 0xff, 0xeb, 0xb1, 0xc6, 0x5b, 0x95, 0x88, 0xd6, 0xc2, 0xc0, 0x40, 0x24, 0xc2, 0x38, 0xb2, 0x0c, 0x65, 0xd2, 0xac, 0xa5, 0xe3, 0x82, 0x76, 0x00, 0x0a, 0x0e, 0x6a, 0x0d, 0x05, 0x37, 0xef, 0xee, 0xf6, 0xd3, 0xe3, 0xd9, 0x4f, 0xb9 } +, + /* Seed */ + 73, + { 0xee, 0x17, 0x6e, 0xa3, 0xcf, 0xd4, 0x90, 0xb6, 0xc0, 0x49, 0xd2, 0xe7, 0x4c, 0x90, 0xc0, 0xee, 0x74, 0x68, 0x52, 0x03, 0x49, 0xb8, 0x51, 0x65, 0x3d, 0xb0, 0x58, 0xa1, 0xc3, 0xe9, 0x56, 0xe0, 0x88, 0x5f, 0x26, 0x1b, 0x6e, 0x71, 0xcf, 0x1e, 0x62, 0x3d, 0x3b, 0x9d, 0x1d, 0x56, 0xfa, 0x13, 0x67, 0xe4, 0x7f, 0xf3, 0x74, 0xad, 0x39, 0x30, 0x9f, 0xfa, 0x2e, 0x67, 0x11, 0x28, 0xd5, 0xab, 0xb4, 0xa6, 0x1a, 0x5b, 0x0d, 0xc2, 0xdb, 0x2c, 0x08 } +, + /* Encryption */ + 128, + { 0x67, 0x2f, 0xe9, 0x51, 0x59, 0xa9, 0x89, 0x3f, 0x34, 0x98, 0xb6, 0x16, 0xc1, 0x7b, 0x59, 0xda, 0x71, 0xda, 0x80, 0x2f, 0xeb, 0xf7, 0xcd, 0x38, 0x11, 0x06, 0x14, 0xa1, 0xb2, 0x5d, 0x96, 0xaa, 0x8a, 0x74, 0xaa, 0xaa, 0x2a, 0x0f, 0x00, 0x0e, 0xf8, 0xac, 0xa3, 0xb4, 0x1a, 0xd1, 0x61, 0xb6, 0x26, 0x33, 0xf2, 0x41, 0x31, 0x9c, 0x33, 0xe4, 0xec, 0xb7, 0x70, 0x6a, 0xb3, 0xad, 0xc6, 0xa3, 0xef, 0xea, 0x22, 0x43, 0x0f, 0x3f, 0x5c, 0x9c, 0x4c, 0xe5, 0x40, 0x4e, 0xb8, 0xe7, 0x5a, 0x10, 0x93, 0x69, 0xc0, 0xaa, 0x0b, 0x7d, 0xd7, 0x13, 0xbd, 0x8b, 0x77, 0xcc, 0xa5, 0xf7, 0x4b, 0xca, 0x5b, 0xc5, 0x55, 0x69, 0x6b, 0x68, 0xe1, 0x17, 0x2d, 0xb4, 0x02, 0x50, 0x1d, 0xcd, 0x26, 0x49, 0x68, 0x5d, 0xb0, 0xfd, 0x88, 0xc8, 0x83, 0x60, 0xda, 0xcc, 0x65, 0x09, 0xff, 0xa8, 0xdf, 0xc2 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 2.18", + /* Message */ + 48, + { 0x6d, 0x9f, 0x9b, 0x4b, 0xb1, 0x23, 0xba, 0x90, 0x95, 0x53, 0xa7, 0x57, 0x3a, 0x97, 0x1f, 0x64, 0xb7, 0x25, 0x24, 0xcf, 0xeb, 0x04, 0x2d, 0xe3, 0x92, 0x15, 0xf6, 0x50, 0xdb, 0x61, 0x2d, 0x66, 0xd7, 0xae, 0x86, 0x05, 0xd0, 0x44, 0x19, 0x54, 0x62, 0x5f, 0xa9, 0x81, 0x22, 0x33, 0x0e, 0x92 } +, + /* Seed */ + 77, + { 0x7f, 0xf8, 0x68, 0x5a, 0xec, 0xf3, 0x40, 0x26, 0x13, 0x90, 0xad, 0x07, 0x42, 0x73, 0x0c, 0xb6, 0x39, 0x28, 0x30, 0x14, 0xab, 0x37, 0x73, 0x55, 0x6c, 0x69, 0x7f, 0x97, 0xef, 0x62, 0x1a, 0x4d, 0xcb, 0xf8, 0xec, 0x6e, 0xde, 0xc5, 0x0d, 0x8e, 0xc9, 0x59, 0x0a, 0xdb, 0xaf, 0x23, 0x51, 0xdd, 0xfa, 0x0e, 0x52, 0xea, 0x6e, 0xd1, 0x8e, 0xb6, 0xc3, 0x78, 0xf3, 0x80, 0x85, 0xae, 0x5e, 0xe4, 0xcc, 0x48, 0xc1, 0x89, 0x1b, 0xa4, 0x7b, 0x20, 0x10, 0xd5, 0xd4, 0x35, 0x39 } +, + /* Encryption */ + 128, + { 0x8d, 0x30, 0x65, 0x5c, 0xf1, 0x5b, 0xf1, 0x0a, 0x46, 0x97, 0x87, 0xc6, 0xa1, 0x0e, 0x79, 0x25, 0x4f, 0xf0, 0xbd, 0x11, 0x93, 0x8b, 0xc6, 0x0a, 0x81, 0xa7, 0x58, 0xd9, 0x3c, 0xf2, 0xa0, 0x30, 0x24, 0x59, 0xfc, 0x2f, 0x0d, 0x77, 0x00, 0xb8, 0x6d, 0xd6, 0xed, 0x61, 0x83, 0x83, 0xb4, 0x4b, 0x45, 0x87, 0x04, 0xca, 0x11, 0x92, 0x8e, 0x50, 0x4f, 0x02, 0x8e, 0xfe, 0x50, 0x37, 0x17, 0x2c, 0x3e, 0x51, 0xb8, 0x37, 0xbe, 0x61, 0x56, 0xde, 0x6a, 0x09, 0xc5, 0x55, 0x97, 0xbe, 0x74, 0xc9, 0x7c, 0xaa, 0x1d, 0xeb, 0xf3, 0x14, 0xcd, 0x94, 0xb9, 0x1b, 0x9f, 0x94, 0xcb, 0xf7, 0x64, 0x0f, 0x86, 0xc2, 0x6d, 0x1d, 0x6a, 0x0b, 0x10, 0x46, 0x28, 0xb5, 0x87, 0x11, 0x4a, 0xa3, 0x1d, 0x99, 0xf6, 0x9c, 0xf9, 0x57, 0x37, 0x93, 0x2c, 0x0c, 0xb5, 0x33, 0x33, 0x74, 0xde, 0xa0, 0x7f, 0xac } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 2.19", + /* Message */ + 23, + { 0x33, 0xcc, 0xcb, 0x59, 0x7d, 0xe9, 0x5c, 0xed, 0xb8, 0xb6, 0x57, 0xfc, 0xd8, 0xf8, 0x88, 0x86, 0xda, 0x04, 0xc7, 0x57, 0x93, 0x53, 0x14 } +, + /* Seed */ + 102, + { 0x53, 0x42, 0xf4, 0x68, 0x43, 0x91, 0xcd, 0x74, 0xf5, 0x28, 0x2d, 0xb8, 0x31, 0x41, 0xff, 0xf6, 0x78, 0xf2, 0x3a, 0x3e, 0xa6, 0x52, 0xe0, 0xd4, 0x27, 0xfb, 0x6a, 0xd9, 0x76, 0xc5, 0xa7, 0x10, 0xa6, 0x37, 0x95, 0x77, 0x71, 0x89, 0x47, 0xac, 0x72, 0x7b, 0x4d, 0x58, 0xa0, 0xb0, 0xbd, 0x20, 0x7a, 0xe3, 0x73, 0xa8, 0xb9, 0x9a, 0xc8, 0xe2, 0x51, 0xeb, 0x02, 0x45, 0x8a, 0x9e, 0xdc, 0x39, 0x52, 0xfb, 0x28, 0x42, 0x6d, 0x18, 0xfd, 0xa1, 0x8a, 0x80, 0x2b, 0xbf, 0x0a, 0x0b, 0x8b, 0x2c, 0xf2, 0x5c, 0xa3, 0xa0, 0x22, 0xf7, 0x78, 0xc7, 0xf4, 0x7f, 0xc5, 0x30, 0xd0, 0xb7, 0xa5, 0xbc, 0x84, 0x6e, 0xea, 0x91, 0x80, 0xf2 } +, + /* Encryption */ + 128, + { 0x8c, 0x4a, 0x63, 0xd0, 0x73, 0x1e, 0x2e, 0x71, 0xeb, 0x46, 0x15, 0x18, 0x9a, 0x96, 0x8b, 0x3e, 0x4a, 0x24, 0x28, 0x56, 0xb2, 0x09, 0x02, 0x45, 0x23, 0x8b, 0x66, 0x45, 0x97, 0x8f, 0x1e, 0xe8, 0xd7, 0x98, 0x11, 0x06, 0x2e, 0xbd, 0x2d, 0x1f, 0x3d, 0x52, 0x3a, 0xe6, 0x00, 0xe0, 0xe5, 0xa6, 0xe4, 0x05, 0xc4, 0xe4, 0xb5, 0xa1, 0x6e, 0x8d, 0xfb, 0x49, 0x24, 0x30, 0x4b, 0x0d, 0x1f, 0xf4, 0xd6, 0x41, 0xbf, 0x98, 0x7f, 0xc6, 0xd4, 0x1d, 0x3e, 0xb7, 0xcd, 0xc5, 0x31, 0x34, 0xd0, 0x06, 0x9c, 0xdb, 0x5a, 0xfe, 0xf7, 0xf8, 0xf9, 0xca, 0xc0, 0xee, 0x52, 0x30, 0xb6, 0xf8, 0x86, 0x22, 0xa8, 0x4d, 0xe5, 0x2a, 0xd6, 0xf7, 0x50, 0x47, 0x84, 0x37, 0x06, 0xca, 0x96, 0x97, 0x42, 0xc5, 0x8d, 0xa7, 0x72, 0x62, 0xff, 0x1f, 0x12, 0x8a, 0x66, 0x4e, 0x51, 0xcd, 0x63, 0x5e, 0x71, 0x15 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 2.20", + /* Message */ + 2, + { 0x19, 0xd6 } +, + /* Seed */ + 123, + { 0xea, 0xac, 0xb5, 0x78, 0xae, 0xab, 0xf6, 0x9d, 0x4e, 0xae, 0xeb, 0x36, 0xd0, 0x4c, 0xd8, 0xa2, 0x2e, 0x8f, 0xd7, 0xa2, 0x5f, 0x04, 0x43, 0xa1, 0x1e, 0x4e, 0x08, 0xb3, 0xff, 0xac, 0x1e, 0x05, 0x42, 0x1a, 0x87, 0x6c, 0xca, 0x91, 0x31, 0x82, 0x50, 0xbe, 0xfa, 0xff, 0xef, 0x9b, 0x27, 0x49, 0xdc, 0x40, 0x2f, 0xad, 0x4f, 0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9d, 0x14, 0x43, 0x9a, 0x84, 0x6b, 0x38, 0x3f, 0x5e, 0x2c, 0x55, 0xef, 0xa7, 0x00, 0x85, 0x97, 0xb5 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 3: A 1024-bit RSA key pair", +{ + /* Modulus */ + 128, + { 0xb9, 0x30, 0x96, 0xd0, 0x26, 0x1e, 0xfe, 0x00, 0x0b, 0x3d, 0x17, 0x04, 0xf5, 0x04, 0x31, 0x60, 0xab, 0xd3, 0xeb, 0x56, 0x6c, 0x61, 0xe5, 0x3c, 0x76, 0xc4, 0x01, 0xe2, 0xb6, 0x55, 0x21, 0xbc, 0x12, 0xd4, 0x81, 0x21, 0x51, 0x83, 0xe8, 0xf4, 0x6c, 0x2c, 0xa8, 0xd0, 0x0a, 0xda, 0x5d, 0xfd, 0x04, 0xdc, 0xf7, 0xcf, 0x36, 0xcc, 0x58, 0x11, 0x05, 0xd9, 0x9d, 0x2a, 0x7d, 0xd9, 0x4b, 0x56, 0x76, 0x0a, 0x65, 0x64, 0xfe, 0xe5, 0xe8, 0xaa, 0xeb, 0x06, 0x07, 0xe1, 0x45, 0x19, 0x62, 0x10, 0xa3, 0x1b, 0x7e, 0xd8, 0xdd, 0x2a, 0xf3, 0x2d, 0x29, 0xd2, 0xba, 0xd6, 0xf1, 0x5f, 0xfa, 0x5a, 0x11, 0xdc, 0x73, 0x5c, 0xc3, 0x62, 0x19, 0x02, 0x1e, 0xe8, 0xd1, 0xee, 0xed, 0x34, 0x63, 0x9b, 0x5a, 0x91, 0xac, 0x6a, 0x92, 0x67, 0x4e, 0x18, 0x39, 0x70, 0xc5, 0x9d, 0x5b, 0x19, 0x6d, 0x4b } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 128, + { 0x01, 0x07, 0xea, 0x61, 0xad, 0xec, 0xa5, 0xe9, 0x00, 0x7c, 0x59, 0x13, 0x4a, 0x7d, 0x38, 0xfc, 0x7a, 0xf3, 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a9, 0x5c, 0xd2, 0x6a, 0x24, 0xf1, 0x41, 0x8f, 0x6e, 0xeb, 0xbe, 0x17, 0xfc, 0xc1 } +, + /* Coefficient */ + 64, + { 0xb0, 0xb1, 0xb9, 0xcb, 0x23, 0xac, 0x2a, 0x8a, 0x56, 0x36, 0x66, 0x69, 0x9a, 0x52, 0x40, 0x54, 0xbe, 0xf3, 0x81, 0xaa, 0xbd, 0x75, 0x55, 0x31, 0xa1, 0xdf, 0xa8, 0x85, 0xdc, 0x8f, 0x98, 0x86, 0xa5, 0x5a, 0xf0, 0xe3, 0x68, 0x63, 0x91, 0xc7, 0x97, 0x68, 0x1a, 0x8f, 0xef, 0xcf, 0x24, 0xdb, 0xd8, 0x1e, 0x03, 0x13, 0x16, 0x99, 0x8f, 0x5d, 0x81, 0x8d, 0x24, 0x76, 0xda, 0xd0, 0x6d, 0xe8 } + +} +, +{{ + "PKCS#1 v1.5 Encryption Example 3.1", + /* Message */ + 17, + { 0x44, 0xe5, 0x6a, 0xa7, 0x7b, 0xd9, 0x35, 0xac, 0x59, 0xa9, 0xbd, 0x32, 0x37, 0x83, 0xe1, 0x27, 0x42 } +, + /* Seed */ + 108, + { 0x92, 0xee, 0xf6, 0x19, 0xf0, 0x4f, 0x52, 0x02, 0x8f, 0x4c, 0xc3, 0xe5, 0x24, 0x1f, 0x0a, 0xa0, 0x92, 0x1b, 0x4d, 0x18, 0x3c, 0x1f, 0x5b, 0xd6, 0x8d, 0x86, 0xfb, 0xe9, 0xe7, 0xb7, 0xd0, 0xbb, 0x10, 0x4e, 0xd1, 0xca, 0xe0, 0x7a, 0xc7, 0xd8, 0x0b, 0xfd, 0x9c, 0x1c, 0xef, 0xf8, 0xdc, 0xda, 0x1d, 0xcc, 0x69, 0x30, 0xf4, 0xc5, 0x51, 0x37, 0x34, 0x6b, 0xfd, 0x68, 0xc1, 0x9d, 0x87, 0x97, 0x2f, 0x7f, 0x34, 0xcb, 0xae, 0x56, 0x63, 0x26, 0x0f, 0xeb, 0x79, 0xf7, 0x60, 0x22, 0x1c, 0xd6, 0x7b, 0xe0, 0x66, 0xd5, 0xaf, 0x0f, 0x07, 0x3c, 0x0f, 0x2c, 0x43, 0x9e, 0x8b, 0xcb, 0x74, 0x63, 0xed, 0xe4, 0x4c, 0x8b, 0x15, 0x0e, 0xba, 0xf3, 0x29, 0x87, 0x26, 0xc3 } +, + /* Encryption */ + 128, + { 0x15, 0x91, 0xd1, 0xce, 0x0f, 0xad, 0x66, 0xd8, 0x6f, 0xd4, 0x2e, 0xfd, 0xb3, 0x1e, 0x9a, 0x02, 0x8a, 0x31, 0x57, 0xfb, 0x09, 0x14, 0xb2, 0x47, 0xeb, 0x3d, 0x22, 0xd7, 0x6f, 0x97, 0x69, 0xb0, 0xe1, 0x9f, 0x6c, 0x06, 0x4c, 0xa1, 0xb9, 0x89, 0x06, 0x39, 0xee, 0x6e, 0x37, 0xb7, 0x09, 0x22, 0x4d, 0x6b, 0x58, 0xeb, 0xb6, 0x55, 0xae, 0x4b, 0x69, 0xed, 0x4c, 0xd7, 0x5d, 0x81, 0x29, 0x21, 0x17, 0xc0, 0x69, 0x30, 0xd4, 0x2a, 0xc4, 0xd4, 0x2e, 0xa7, 0x35, 0x14, 0x21, 0x8f, 0x49, 0xea, 0x07, 0xca, 0x97, 0x43, 0x67, 0x09, 0x68, 0x3d, 0x67, 0xa8, 0xe9, 0xe8, 0x08, 0xda, 0x69, 0xa5, 0x0b, 0x73, 0x9c, 0x42, 0xeb, 0x0d, 0xeb, 0x94, 0xa3, 0x49, 0x8f, 0xc5, 0x45, 0x0e, 0xb6, 0x9a, 0xce, 0x23, 0x76, 0x76, 0x61, 0xfe, 0xdf, 0x34, 0x18, 0x3a, 0x1b, 0x6f, 0x42, 0x5d, 0xd6, 0xa0 } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Encryption Example 3.2", + /* Message */ + 18, + { 0xa7, 0x57, 0x38, 0x29, 0x1f, 0xad, 0x54, 0x13, 0x95, 0x7f, 0xa3, 0xb9, 0xf3, 0xb2, 0xca, 0xac, 0x9f, 0x5a } +, + /* Seed */ + 107, + { 0x3a, 0x19, 0x1a, 0xaf, 0x45, 0xed, 0x4c, 0x25, 0x89, 0x20, 0x5d, 0x9c, 0xf6, 0xa3, 0x0f, 0x07, 0x70, 0x0e, 0x38, 0xbe, 0x06, 0x25, 0x62, 0x43, 0x01, 0x8d, 0x23, 0xc6, 0x84, 0xda, 0xec, 0xe7, 0xe8, 0x67, 0xe3, 0x9d, 0x76, 0xc6, 0xb6, 0xf0, 0x35, 0x43, 0xfc, 0x15, 0xaf, 0x81, 0xbf, 0x84, 0xf9, 0x64, 0xea, 0xf3, 0xa9, 0x5a, 0x4b, 0x80, 0x86, 0x28, 0xfd, 0x51, 0x55, 0x38, 0x99, 0xf8, 0x11, 0xc0, 0x8c, 0x62, 0x60, 0x9c, 0x51, 0x4c, 0xfa, 0x1d, 0xbb, 0x78, 0xd5, 0xa5, 0xb3, 0x3c, 0xc0, 0xb8, 0x57, 0xfc, 0xb1, 0xee, 0xcc, 0x53, 0x1b, 0x13, 0x26, 0x34, 0x43, 0x90, 0x59, 0xf5, 0x5a, 0x73, 0x3e, 0x14, 0x6e, 0x1c, 0xa1, 0xeb, 0x5a, 0x97, 0xf4 } +, + /* Encryption */ + 128, + { 0x70, 0xaa, 0xf7, 0x24, 0x39, 0x6c, 0x1a, 0xc5, 0x0e, 0xdb, 0xbf, 0xe8, 0x34, 0x1b, 0x08, 0x7b, 0xa0, 0xff, 0xe2, 0x87, 0x60, 0x5a, 0x8c, 0x3a, 0x8c, 0xcf, 0x85, 0xab, 0x2e, 0xd2, 0xfe, 0x22, 0x15, 0x9d, 0x62, 0xaa, 0x02, 0x74, 0x76, 0xeb, 0xbf, 0x07, 0x70, 0x02, 0x6d, 0x2d, 0x3b, 0x0c, 0x0d, 0x77, 0x34, 0xfa, 0xaa, 0xa8, 0xd1, 0x5e, 0x2c, 0xe5, 0x1c, 0x85, 0x53, 0x5c, 0x26, 0xb4, 0x15, 0x0a, 0xd6, 0x34, 0x6e, 0x3b, 0xfd, 0x38, 0xdb, 0x5d, 0xac, 0xf7, 0x52, 0xe7, 0x5d, 0x75, 0x31, 0x40, 0x54, 0xd1, 0x67, 0xa9, 0x6d, 0x81, 0x9f, 0x34, 0x38, 0xa7, 0xbe, 0xc4, 0x46, 0x7f, 0xc5, 0x60, 0xa6, 0x94, 0x46, 0x94, 0x85, 0xe8, 0xe7, 0x8e, 0x47, 0xe4, 0xe8, 0x27, 0x7c, 0xa7, 0xd3, 0xfd, 0x2a, 0xd9, 0x4a, 0x30, 0x46, 0x4c, 0x24, 0x57, 0x85, 0x47, 0x25, 0xc6, 0x16, 0x15 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 3.3", + /* Message */ + 14, + { 0x87, 0x31, 0x2f, 0x78, 0x7d, 0xe0, 0x65, 0x97, 0x50, 0xd6, 0x02, 0xac, 0x11, 0x02 } +, + /* Seed */ + 111, + { 0xa2, 0x29, 0xe3, 0xe8, 0xef, 0x1c, 0xaa, 0x66, 0xca, 0xf0, 0xd8, 0xac, 0xd8, 0xd6, 0x6b, 0x9e, 0x41, 0xcc, 0x77, 0x1f, 0x26, 0xe2, 0x0f, 0x12, 0xec, 0xc6, 0xe2, 0xaa, 0x38, 0x45, 0x51, 0x3d, 0xd1, 0x34, 0xf7, 0xc6, 0xe5, 0x74, 0xf4, 0x1b, 0x21, 0x5d, 0x1d, 0x11, 0x17, 0x56, 0xda, 0xf9, 0x71, 0xcc, 0xf3, 0x9c, 0xcd, 0xce, 0x78, 0x16, 0x19, 0xd7, 0x97, 0x20, 0xdf, 0x91, 0x8d, 0x33, 0x9c, 0x82, 0x6d, 0xc0, 0x49, 0xb3, 0x90, 0x91, 0x7c, 0x17, 0xba, 0x0f, 0xb1, 0x30, 0x2f, 0xff, 0x11, 0x0a, 0x14, 0xdd, 0x23, 0x84, 0x90, 0x27, 0x41, 0xf9, 0x12, 0xb2, 0x6a, 0x1a, 0xdb, 0xe0, 0xed, 0x1e, 0x8f, 0xd9, 0x89, 0x71, 0x0b, 0x40, 0x3d, 0x27, 0xc4, 0xe0, 0x18, 0xfb, 0x9b } +, + /* Encryption */ + 128, + { 0x03, 0x38, 0x46, 0xd7, 0x66, 0x4c, 0x8f, 0x92, 0x62, 0x57, 0xc7, 0xfd, 0x32, 0x64, 0x48, 0x47, 0x92, 0xac, 0x7f, 0x9b, 0xc8, 0x75, 0x8a, 0x7a, 0x16, 0xab, 0xb8, 0x9f, 0xa3, 0xcc, 0xc4, 0xd1, 0x3a, 0x1e, 0xed, 0x88, 0xaf, 0x73, 0x23, 0xbc, 0x3c, 0x74, 0xe2, 0x3f, 0xda, 0xb5, 0x03, 0x81, 0x89, 0x4c, 0x86, 0x26, 0xdf, 0xd0, 0xac, 0x85, 0x89, 0xd4, 0x62, 0x34, 0xd3, 0xc3, 0x5f, 0x18, 0x99, 0x81, 0x79, 0x44, 0x84, 0x31, 0xdc, 0x81, 0x6f, 0xb6, 0x3e, 0x55, 0xcf, 0x26, 0xd7, 0x4a, 0x9d, 0x2a, 0x09, 0x32, 0x67, 0x3c, 0xb4, 0xbe, 0xb8, 0x29, 0xcd, 0x7d, 0x49, 0x50, 0x88, 0x48, 0xc6, 0xd0, 0xc0, 0x0d, 0x5c, 0x70, 0xf7, 0xfb, 0x47, 0x67, 0x70, 0xe4, 0x03, 0x19, 0x23, 0x7c, 0x78, 0x6b, 0xf4, 0xe2, 0x6c, 0x48, 0xd2, 0xcf, 0xd9, 0x6e, 0xe3, 0x62, 0xbf, 0x29, 0x28, 0x25 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 3.4", + /* Message */ + 54, + { 0x9a, 0x2b, 0xca, 0x75, 0xe3, 0x26, 0x49, 0x77, 0x7b, 0x9f, 0x13, 0xec, 0x30, 0xfe, 0x16, 0xbb, 0x8a, 0xb4, 0x6d, 0x6d, 0x5e, 0x0c, 0x64, 0x63, 0xa7, 0x3d, 0x8c, 0x36, 0x63, 0xad, 0xab, 0xc7, 0x23, 0xbd, 0xe7, 0x2a, 0x50, 0x76, 0x5e, 0x7b, 0x30, 0x0e, 0xf6, 0xb5, 0x61, 0xde, 0xe8, 0x84, 0x84, 0x88, 0x0e, 0x4d, 0x61, 0x2c } +, + /* Seed */ + 71, + { 0x8b, 0xfa, 0xe9, 0x22, 0x2f, 0x75, 0xa0, 0x69, 0x98, 0xed, 0x6d, 0x9b, 0x14, 0x9e, 0x89, 0x05, 0xcf, 0xc8, 0xdb, 0x05, 0x5a, 0x0e, 0x32, 0xac, 0xed, 0xf8, 0x24, 0xd2, 0xf6, 0xb5, 0xb4, 0x2b, 0x3a, 0xea, 0xc6, 0xa7, 0x10, 0x4e, 0x14, 0x4d, 0x5e, 0x48, 0x34, 0x28, 0x0e, 0x36, 0x44, 0x5a, 0xb8, 0x50, 0xf3, 0xa6, 0xde, 0x16, 0x4c, 0x2c, 0x79, 0x0f, 0xe7, 0xd9, 0xd7, 0xbc, 0x7f, 0x9b, 0xdb, 0xe2, 0x52, 0x17, 0xda, 0x2d, 0xed } +, + /* Encryption */ + 128, + { 0x6e, 0xc5, 0xf5, 0x59, 0xc8, 0xa3, 0x20, 0xd9, 0x0d, 0x1e, 0xb5, 0xef, 0x09, 0x1c, 0x4d, 0x12, 0x55, 0xa2, 0x4a, 0x69, 0x19, 0x41, 0x0e, 0xb1, 0xdf, 0x65, 0xa9, 0x7b, 0x30, 0xcd, 0xd7, 0xfa, 0xe1, 0x8e, 0x65, 0x12, 0xa0, 0x27, 0xe9, 0x76, 0x70, 0x4b, 0x4f, 0xa0, 0x44, 0x37, 0x43, 0x93, 0xd5, 0x01, 0xe2, 0xba, 0x46, 0x18, 0x62, 0x00, 0xef, 0x0d, 0xdd, 0xf1, 0x9c, 0x75, 0x77, 0x58, 0xe4, 0x67, 0x94, 0x30, 0xbc, 0xd9, 0xfd, 0x11, 0x9e, 0xa2, 0x43, 0xb3, 0x49, 0xdc, 0xf8, 0x1c, 0x34, 0x32, 0xd3, 0x1f, 0xba, 0x91, 0x1e, 0xc6, 0xfc, 0x68, 0x6e, 0xaa, 0xdf, 0xf6, 0xb9, 0xfd, 0xf5, 0x3a, 0xa4, 0xc8, 0x5a, 0x49, 0xa2, 0x2a, 0x05, 0x1c, 0x5f, 0x18, 0x07, 0xf3, 0x08, 0x3b, 0x1b, 0x3e, 0x61, 0x17, 0xb4, 0xef, 0x12, 0x08, 0xde, 0x0a, 0x80, 0x01, 0xdc, 0x29, 0x1c, 0x4e } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 3.5", + /* Message */ + 48, + { 0xdf, 0xd6, 0x3e, 0x6e, 0xc6, 0x1e, 0x07, 0x27, 0x5b, 0x8e, 0x37, 0xcc, 0x63, 0x69, 0xe1, 0xf3, 0xec, 0x0b, 0xfc, 0x57, 0xa2, 0x98, 0xb9, 0x05, 0xae, 0x5d, 0x07, 0x74, 0xe0, 0xf5, 0x22, 0xe6, 0x75, 0x9c, 0x7d, 0x11, 0x6f, 0x8e, 0x8e, 0xfe, 0x69, 0x45, 0x0f, 0xa7, 0xa8, 0x38, 0x9f, 0x81 } +, + /* Seed */ + 77, + { 0xc4, 0x22, 0x37, 0x7b, 0x89, 0x86, 0x4b, 0x0d, 0xf3, 0x8b, 0x4f, 0x9c, 0x15, 0xf9, 0x8a, 0x05, 0x96, 0x55, 0xe1, 0xc9, 0xb0, 0xc7, 0x09, 0x63, 0x5c, 0xa6, 0x06, 0x49, 0xd8, 0xd2, 0x47, 0x5e, 0xe1, 0x6c, 0xb1, 0x27, 0xf6, 0x76, 0x39, 0x12, 0x96, 0x4e, 0x19, 0x84, 0xd6, 0xda, 0xad, 0x4d, 0x6a, 0xbd, 0x04, 0xb0, 0x46, 0x18, 0xb3, 0x2e, 0x53, 0x25, 0xba, 0x95, 0xeb, 0x5e, 0x76, 0xdb, 0xd4, 0x6d, 0x9f, 0xb5, 0x9d, 0xf0, 0x7a, 0x08, 0x1e, 0x95, 0x6c, 0xb0, 0x73 } +, + /* Encryption */ + 128, + { 0x9e, 0x06, 0xcd, 0x91, 0xa4, 0x4a, 0x9a, 0xde, 0xa6, 0xa7, 0x98, 0x03, 0xd3, 0xe6, 0xbb, 0xab, 0x17, 0xdb, 0x10, 0x62, 0xb6, 0x51, 0x0b, 0xed, 0x40, 0x07, 0x55, 0x66, 0x74, 0x95, 0x44, 0xc0, 0x3d, 0x7a, 0x78, 0xb1, 0x37, 0xb0, 0xdc, 0x1e, 0x66, 0x26, 0x32, 0x1f, 0xed, 0xaf, 0xc2, 0x0d, 0xcd, 0xbf, 0x70, 0x80, 0xf7, 0xf5, 0xbd, 0xd5, 0x67, 0x44, 0xce, 0x99, 0x9f, 0x76, 0x70, 0x5c, 0x4f, 0x5e, 0x6f, 0xa1, 0x5f, 0x46, 0xc5, 0xae, 0x50, 0x80, 0x90, 0xdb, 0xbc, 0x85, 0xfb, 0x86, 0x89, 0x9c, 0x95, 0x78, 0x60, 0x8d, 0xfd, 0x77, 0x8a, 0xa4, 0xa7, 0x9d, 0x3d, 0x73, 0x63, 0x54, 0xcc, 0xfb, 0xfa, 0x2c, 0x86, 0xf2, 0x9a, 0x7a, 0x58, 0x45, 0x3d, 0x75, 0x7f, 0xd5, 0x22, 0xf7, 0x84, 0x08, 0xd9, 0x91, 0x6b, 0x1b, 0xd0, 0x65, 0x4b, 0xff, 0xe6, 0xe0, 0x66, 0xba, 0xeb, 0x50 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 3.6", + /* Message */ + 35, + { 0x5d, 0x91, 0xfb, 0xc1, 0xa7, 0xba, 0x79, 0x93, 0x9b, 0x89, 0xa2, 0x40, 0x8c, 0xce, 0x8e, 0xd4, 0xbb, 0x26, 0x66, 0xdd, 0xfe, 0x09, 0xd9, 0x19, 0x21, 0xa0, 0xaa, 0x69, 0x09, 0x6a, 0x95, 0x69, 0x92, 0xc2, 0x1c } +, + /* Seed */ + 90, + { 0xaf, 0x07, 0xfe, 0xa3, 0x21, 0xea, 0xa2, 0x67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b5, 0x80, 0x76, 0x1c, 0x49, 0x88, 0x1f, 0x29, 0xdd, 0x8a, 0x76, 0xda, 0x79, 0x3f, 0x43, 0x2e, 0x7d, 0x5d, 0xc7, 0x31, 0xa2, 0x5e, 0x5b, 0xb5, 0x02, 0x58, 0xd0, 0x27, 0x39, 0x5f, 0xbd } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 3.7", + /* Message */ + 8, + { 0x04, 0xed, 0xd8, 0x3c, 0x65, 0x65, 0x6a, 0x01 } +, + /* Seed */ + 117, + { 0x88, 0xf9, 0xa2, 0x71, 0x97, 0xf9, 0xf2, 0x57, 0xfa, 0x81, 0xc0, 0xe3, 0x05, 0x90, 0xb7, 0x3e, 0x9e, 0x11, 0xc7, 0x6b, 0xc8, 0x9e, 0x08, 0x53, 0x6b, 0x4b, 0x64, 0xa2, 0x50, 0x6a, 0xeb, 0x33, 0xb4, 0x50, 0x74, 0x73, 0x08, 0x09, 0xa0, 0x5c, 0x45, 0xb9, 0xbc, 0x95, 0x71, 0x73, 0x69, 0xcf, 0x92, 0xc1, 0xbf, 0x98, 0x6e, 0x53, 0xba, 0x11, 0x23, 0x83, 0x30, 0xfd, 0xc4, 0xe0, 0x5e, 0xa1, 0x07, 0x33, 0x4a, 0xb3, 0x11, 0x06, 0xae, 0xbd, 0x9c, 0x6c, 0x29, 0xe5, 0x01, 0xa5, 0x7d, 0x99, 0x7c, 0x01, 0xbb, 0xc1, 0x01, 0x0b, 0xd5, 0x2f, 0x05, 0x38, 0xb9, 0x51, 0x59, 0xf3, 0x91, 0x32, 0x0d, 0xe6, 0xdb, 0x23, 0xd8, 0x16, 0x2c, 0xf1, 0x46, 0x58, 0x4c, 0x6e, 0x07, 0x6c, 0x4e, 0xae, 0x86, 0x20, 0x72, 0xeb, 0x5b } +, + /* Encryption */ + 128, + { 0x79, 0x1b, 0x37, 0x91, 0x48, 0xa8, 0x3a, 0x03, 0x4d, 0x31, 0x2a, 0x82, 0xbb, 0xb3, 0x7b, 0x11, 0x1b, 0x40, 0xbc, 0xf6, 0xa3, 0x37, 0xfd, 0xe2, 0x89, 0xb0, 0x8e, 0x07, 0x2e, 0x44, 0x03, 0x19, 0x73, 0xff, 0x9d, 0x0c, 0x27, 0xf7, 0x0d, 0x64, 0xa8, 0xea, 0xfc, 0x6e, 0xb5, 0xf8, 0xeb, 0x4e, 0x52, 0xe2, 0xc4, 0x19, 0x7e, 0xcf, 0xa5, 0x45, 0xed, 0x63, 0xae, 0x9a, 0x12, 0x83, 0x79, 0xd3, 0xf5, 0x62, 0xa1, 0x8f, 0xe3, 0xad, 0x14, 0x05, 0x27, 0x67, 0xf0, 0x54, 0x1b, 0x90, 0x16, 0x81, 0x85, 0xcb, 0xb7, 0x8d, 0xb6, 0x03, 0x81, 0xc0, 0x92, 0xbc, 0x23, 0xe1, 0xaa, 0x05, 0xb4, 0x08, 0x92, 0xf9, 0xa1, 0x16, 0xe6, 0x25, 0xcb, 0x14, 0x8b, 0x56, 0x07, 0x42, 0xcc, 0x12, 0x78, 0xc4, 0xd2, 0x1a, 0x4a, 0x7d, 0x37, 0xf6, 0x98, 0x2a, 0xee, 0x27, 0xf2, 0xa4, 0xc0, 0xc5, 0x73, 0xd2 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 3.8", + /* Message */ + 25, + { 0x3f, 0x7e, 0xea, 0x78, 0x1b, 0x77, 0xd8, 0x5f, 0xe3, 0x71, 0xb3, 0xe9, 0x37, 0x3e, 0x7b, 0x69, 0x21, 0x7d, 0x31, 0x50, 0xa0, 0x2d, 0x89, 0x58, 0xde } +, + /* Seed */ + 100, + { 0x49, 0x99, 0xc6, 0x4c, 0xbf, 0xa3, 0x85, 0x24, 0xad, 0xca, 0xb6, 0x6f, 0x64, 0x45, 0x4d, 0x36, 0xfb, 0xfc, 0xb2, 0x98, 0x6e, 0x1f, 0xa4, 0x75, 0x3a, 0x0e, 0x03, 0x88, 0x9f, 0xf0, 0x6e, 0xe1, 0x60, 0x0e, 0xee, 0x23, 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a9, 0x58, 0x82, 0x64, 0x71, 0x2d, 0xe3, 0xbf, 0x4a, 0x76, 0x79 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 3.9", + /* Message */ + 47, + { 0xa3, 0x85, 0x08, 0xd9, 0x46, 0x0c, 0x63, 0xf4, 0x15, 0x81, 0xa8, 0x86, 0x9a, 0x75, 0x82, 0x4b, 0x14, 0xf5, 0xc6, 0x50, 0x32, 0x29, 0x99, 0xdc, 0x41, 0x13, 0x50, 0xd0, 0xd4, 0xe8, 0x62, 0x4f, 0xf0, 0x9c, 0xeb, 0x00, 0xd3, 0xbe, 0xdc, 0x5d, 0x76, 0x2a, 0x40, 0xc9, 0x39, 0x80, 0x04 } +, + /* Seed */ + 78, + { 0x6a, 0x0a, 0x28, 0x8a, 0x1e, 0x67, 0x43, 0x0c, 0x66, 0x6a, 0xeb, 0xea, 0x44, 0xb5, 0x82, 0xa9, 0x09, 0x69, 0xcc, 0x01, 0xe9, 0x0a, 0xae, 0x10, 0x53, 0xce, 0x55, 0xee, 0xb9, 0x87, 0x9b, 0xcc, 0x62, 0x25, 0x39, 0x15, 0xe9, 0x22, 0xf1, 0x09, 0x66, 0x67, 0xbd, 0xa0, 0x2a, 0x14, 0xe7, 0x07, 0x47, 0xb3, 0x59, 0x35, 0x24, 0xc2, 0x84, 0x85, 0x47, 0xd2, 0x11, 0x4d, 0x1d, 0x0c, 0xdc, 0xb9, 0x7e, 0xb4, 0xdf, 0x45, 0x5b, 0xba, 0xc9, 0xb0, 0xcc, 0x29, 0x08, 0x39, 0xb7, 0x3a } +, + /* Encryption */ + 128, + { 0xa6, 0x77, 0x57, 0x80, 0x8f, 0x5a, 0xbd, 0xc8, 0x1e, 0xdb, 0x7f, 0x69, 0x2f, 0x9f, 0xb8, 0x52, 0xf1, 0xa1, 0x66, 0x1c, 0x4a, 0x00, 0x98, 0x05, 0xc4, 0x4b, 0x21, 0x6c, 0xd3, 0xb1, 0x32, 0x2b, 0xbb, 0x25, 0xd1, 0x45, 0x8e, 0x31, 0xb0, 0xf0, 0x7d, 0x65, 0x50, 0x57, 0x59, 0xc4, 0xb4, 0x14, 0x7f, 0x23, 0xcb, 0xee, 0x2a, 0xf4, 0xa1, 0xa5, 0x93, 0x8a, 0x06, 0x8c, 0xe9, 0xc5, 0x32, 0x3f, 0xf5, 0x3f, 0x4b, 0x39, 0x2e, 0x12, 0x50, 0xd0, 0x37, 0xb3, 0x1e, 0x62, 0x81, 0xdc, 0xdf, 0xb9, 0x6b, 0xf4, 0xbf, 0xea, 0xa1, 0x47, 0xf0, 0x96, 0xc7, 0x84, 0xc9, 0x2f, 0x4a, 0xc5, 0x70, 0x91, 0x12, 0x28, 0x02, 0x50, 0x29, 0xc3, 0xb5, 0x23, 0x30, 0x3f, 0xe8, 0x22, 0x7e, 0x8b, 0x2c, 0xc0, 0xef, 0x15, 0x70, 0x14, 0xcb, 0x67, 0x31, 0xaa, 0xc0, 0x9b, 0xfe, 0x6f, 0xfa, 0x18, 0xea, 0xf6 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 3.10", + /* Message */ + 28, + { 0xf7, 0x84, 0x05, 0x23, 0x6a, 0x9e, 0xb5, 0x57, 0xaa, 0xce, 0xc6, 0x00, 0x7d, 0xbc, 0x4c, 0x0e, 0xde, 0x78, 0xed, 0x12, 0xb0, 0x4c, 0x82, 0x88, 0x8a, 0x82, 0xc2, 0x13 } +, + /* Seed */ + 97, + { 0x86, 0xf0, 0x72, 0x3b, 0x31, 0x68, 0xe2, 0xae, 0xac, 0xe9, 0xec, 0x2e, 0x95, 0xfd, 0xa6, 0xe6, 0xd6, 0xfc, 0x8d, 0x62, 0x94, 0x55, 0x65, 0x66, 0x39, 0x9d, 0x73, 0x11, 0xe7, 0x99, 0xfa, 0xa9, 0xb1, 0xee, 0x1f, 0x03, 0x2a, 0xb2, 0xe5, 0x34, 0xa9, 0x1f, 0xbc, 0xd0, 0x7c, 0x8a, 0x7d, 0x04, 0xa9, 0xb4, 0x85, 0xf3, 0x1e, 0x07, 0x23, 0xfd, 0x29, 0xeb, 0x21, 0x88, 0x06, 0x9d, 0x9b, 0xbd, 0x76, 0x29, 0xdc, 0x6e, 0x3f, 0xc8, 0x9b, 0xe6, 0x04, 0xbc, 0xf0, 0x0c, 0x52, 0xfa, 0x8e, 0x1d, 0x6c, 0x62, 0x55, 0x5f, 0xd1, 0xf6, 0x0c, 0xec, 0x02, 0xd4, 0xd9, 0x61, 0xd8, 0x28, 0xda, 0xbc, 0x4a } +, + /* Encryption */ + 128, + { 0x6e, 0x8d, 0x2f, 0xb0, 0xb2, 0xee, 0xf8, 0x2f, 0xc1, 0x10, 0xce, 0xe0, 0xa9, 0xd3, 0x84, 0x2f, 0x2a, 0x05, 0x8a, 0x24, 0x40, 0x7f, 0xa1, 0x1b, 0xa9, 0x05, 0xd1, 0xaa, 0x50, 0xe8, 0xcc, 0x12, 0xde, 0xcc, 0x07, 0x3d, 0xbd, 0x08, 0xa8, 0xc7, 0x05, 0x18, 0xef, 0x25, 0xdb, 0x96, 0xfd, 0xa2, 0x41, 0x1c, 0xca, 0x08, 0x72, 0x87, 0x88, 0x95, 0x6f, 0x73, 0xdf, 0xa1, 0x20, 0xe0, 0xea, 0x60, 0x5b, 0xff, 0xc9, 0x3b, 0x43, 0xa4, 0x41, 0xa4, 0x3d, 0x0e, 0xaa, 0x3f, 0xf0, 0x73, 0xe6, 0x98, 0x2e, 0xef, 0x52, 0x96, 0x39, 0x06, 0x07, 0xe2, 0x5a, 0x58, 0x8a, 0x39, 0x82, 0x55, 0xba, 0x00, 0x5a, 0x48, 0x5e, 0x6e, 0x73, 0x2e, 0x3a, 0x19, 0x20, 0xcd, 0x43, 0xa3, 0x90, 0xfb, 0x66, 0xd5, 0x42, 0x8d, 0xfd, 0x62, 0x89, 0x74, 0xb8, 0xaf, 0xf2, 0xf0, 0x60, 0x2d, 0xa5, 0x78, 0xd6, 0x25 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 3.11", + /* Message */ + 40, + { 0x56, 0x1d, 0x27, 0xc1, 0xd3, 0xf6, 0xd5, 0xd1, 0xa6, 0x43, 0xaa, 0x47, 0xe5, 0x5d, 0x78, 0xeb, 0x00, 0xf3, 0x2d, 0x42, 0x89, 0x6a, 0x34, 0xe0, 0xc1, 0xd7, 0x1b, 0xc3, 0xa5, 0x45, 0x7c, 0x92, 0x05, 0xbe, 0xd1, 0x3b, 0x98, 0x4c, 0x52, 0x59 } +, + /* Seed */ + 85, + { 0x98, 0x17, 0x6e, 0x1d, 0x67, 0xa2, 0x46, 0x2f, 0x5d, 0xc1, 0xbf, 0xa6, 0xe0, 0x75, 0x95, 0x42, 0x10, 0x4a, 0xc1, 0x48, 0x11, 0xd3, 0x18, 0x79, 0x38, 0x25, 0x04, 0x55, 0xc6, 0x5e, 0x4a, 0xaa, 0x76, 0x32, 0xbd, 0x2d, 0x1d, 0x75, 0x2e, 0x1f, 0x34, 0xc5, 0x3c, 0xab, 0x26, 0x76, 0x76, 0xa7, 0x8c, 0x10, 0xc9, 0x98, 0xe7, 0x73, 0xfd, 0x8f, 0xfe, 0x35, 0xc8, 0x67, 0xc4, 0x43, 0xbe, 0xf7, 0x98, 0x65, 0xaa, 0x2d, 0xa2, 0x91, 0x5a, 0x85, 0xc7, 0x02, 0x63, 0x23, 0x69, 0x3e, 0x45, 0x4d, 0x8a, 0xb3, 0x2a, 0x77, 0x15 } +, + /* Encryption */ + 128, + { 0x0b, 0xc0, 0x47, 0x83, 0xc6, 0x92, 0x44, 0x7a, 0x3d, 0xe6, 0x1f, 0x53, 0xb7, 0x2f, 0x7a, 0xa4, 0x10, 0x31, 0x6d, 0xd5, 0x09, 0xa6, 0xf4, 0x9e, 0x3a, 0xba, 0x56, 0xad, 0x1f, 0xf8, 0x6e, 0xbe, 0x9e, 0x63, 0x66, 0xe1, 0x7e, 0x51, 0x45, 0x00, 0x76, 0xbe, 0xa3, 0x71, 0xd4, 0xc6, 0x89, 0xcd, 0x61, 0x49, 0x5c, 0xd8, 0xfa, 0x29, 0xc0, 0xe8, 0x7b, 0x6d, 0xbf, 0xa8, 0xe3, 0x86, 0xc2, 0xe8, 0x20, 0xe4, 0xc7, 0x42, 0xa4, 0x87, 0xe8, 0x9b, 0x27, 0x5a, 0x21, 0x86, 0xe2, 0x38, 0x40, 0xbe, 0x9c, 0x02, 0x52, 0x7b, 0xa7, 0x17, 0xe9, 0xe6, 0x0b, 0x5b, 0xf4, 0x17, 0x71, 0x1d, 0xf3, 0x4d, 0x7b, 0x8e, 0x2d, 0x12, 0xbc, 0xeb, 0x85, 0x93, 0x85, 0xfa, 0x00, 0x1d, 0x4b, 0x4b, 0xff, 0xbb, 0xc0, 0xed, 0xef, 0xbd, 0x40, 0x02, 0x41, 0x84, 0x68, 0xc5, 0x66, 0xfd, 0xf6, 0xb8, 0x35, 0x09 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 3.12", + /* Message */ + 45, + { 0xeb, 0x5f, 0x8c, 0x0d, 0xc9, 0xd9, 0x01, 0x06, 0x1b, 0x82, 0xae, 0xff, 0x8d, 0x67, 0xd8, 0xbf, 0xfc, 0x0c, 0x04, 0x7e, 0xcc, 0x4a, 0xa3, 0x46, 0xb2, 0x3b, 0xdb, 0xa6, 0x2a, 0x87, 0xe9, 0xdc, 0x77, 0x0b, 0x11, 0x69, 0x5f, 0xbf, 0x19, 0x02, 0xf2, 0x4b, 0x66, 0xce, 0xab } +, + /* Seed */ + 80, + { 0x74, 0x82, 0x77, 0x0f, 0x3c, 0xf5, 0x7e, 0xdb, 0x81, 0x40, 0xeb, 0xc3, 0x3a, 0x02, 0x82, 0x45, 0xee, 0x06, 0x48, 0x52, 0x06, 0x89, 0xa5, 0x0e, 0x33, 0xf5, 0xf4, 0x67, 0xf6, 0xd1, 0xe4, 0x32, 0x4e, 0x1c, 0x50, 0xc8, 0x99, 0xe5, 0xad, 0x2c, 0x46, 0xc9, 0x7f, 0x81, 0x20, 0xd1, 0xc7, 0x22, 0x39, 0xd6, 0xa8, 0x2d, 0x8f, 0x8e, 0xbc, 0x80, 0xb9, 0x73, 0xee, 0xa8, 0xc5, 0x45, 0x69, 0x29, 0x50, 0x45, 0x14, 0xb4, 0xb1, 0x56, 0x62, 0x84, 0x4f, 0x29, 0x50, 0x62, 0xf2, 0x1e, 0xbd, 0x92 } +, + /* Encryption */ + 128, + { 0xb8, 0x40, 0x43, 0x54, 0xa3, 0x81, 0xb7, 0xc2, 0xab, 0xe5, 0xf7, 0x28, 0x25, 0xf3, 0xd3, 0x15, 0xbd, 0xac, 0xe6, 0xc3, 0xcf, 0xbd, 0x88, 0xb8, 0x97, 0x68, 0x61, 0x20, 0x05, 0x19, 0x7c, 0x61, 0x66, 0x38, 0x83, 0xf2, 0xc2, 0x57, 0x4f, 0x99, 0x5e, 0xa6, 0xf9, 0x4e, 0xb3, 0x4f, 0x27, 0x68, 0x62, 0xb3, 0x3f, 0x58, 0xa8, 0x83, 0x92, 0x23, 0x70, 0x6b, 0xe1, 0xc1, 0xff, 0x47, 0x23, 0x05, 0xf1, 0x1b, 0xa9, 0x56, 0x2a, 0x0e, 0xb0, 0x12, 0xf1, 0xaa, 0xf8, 0x5c, 0x22, 0xe8, 0x8f, 0x2f, 0xdf, 0xea, 0xff, 0x86, 0x33, 0xd3, 0xcf, 0xeb, 0x5f, 0x76, 0x4f, 0x42, 0x28, 0x92, 0x0d, 0xe3, 0x0c, 0x6b, 0xde, 0x2c, 0xb4, 0xe8, 0xf0, 0x3d, 0x90, 0xed, 0x54, 0x8f, 0x64, 0x85, 0x00, 0x35, 0x1a, 0x5f, 0x41, 0xdf, 0x74, 0xad, 0x65, 0xe8, 0xc3, 0xbe, 0xe9, 0x50, 0x5a, 0x7d, 0x70, 0xe1 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 3.13", + /* Message */ + 48, + { 0x5a, 0x7f, 0x0e, 0xae, 0xba, 0xe4, 0x9c, 0xf5, 0x7c, 0x47, 0x5a, 0x6d, 0xa6, 0x79, 0x43, 0xa7, 0xd3, 0x04, 0x6e, 0x3f, 0x7c, 0x7d, 0x50, 0xb0, 0x9a, 0x80, 0x98, 0xb5, 0x44, 0x69, 0x39, 0x68, 0x93, 0xcf, 0xc0, 0xb2, 0xf0, 0x8f, 0x6c, 0x2b, 0xff, 0x23, 0x50, 0x51, 0x57, 0x5e, 0x6e, 0x56 } +, + /* Seed */ + 77, + { 0xfb, 0x08, 0x48, 0x86, 0xdb, 0x37, 0x98, 0xd2, 0xb5, 0xbb, 0x35, 0xa3, 0xb1, 0xd3, 0xaf, 0x4f, 0xdf, 0xc0, 0x45, 0x6c, 0xbc, 0x79, 0x7b, 0x96, 0x40, 0xd8, 0xc4, 0x4a, 0x0e, 0x03, 0x4e, 0x40, 0x37, 0x2b, 0x34, 0xfc, 0x7c, 0x1e, 0x8b, 0x66, 0x01, 0x1b, 0x4e, 0xcd, 0xfa, 0xec, 0x6e, 0xe4, 0xcd, 0xc8, 0x28, 0xcb, 0x1a, 0xb4, 0x91, 0x27, 0x4a, 0xc1, 0xe3, 0x9f, 0x67, 0x58, 0x7a, 0x55, 0x47, 0x67, 0x09, 0xb4, 0x02, 0x3f, 0xc5, 0x69, 0xcb, 0xe8, 0xb4, 0xfd, 0x4b } +, + /* Encryption */ + 128, + { 0x07, 0x78, 0x4e, 0xcb, 0x8c, 0xc5, 0xba, 0x02, 0xd2, 0x07, 0xba, 0xb0, 0x55, 0xc0, 0xe5, 0x5d, 0x10, 0xa9, 0xb9, 0x42, 0x70, 0xcc, 0xa2, 0x50, 0xee, 0x75, 0xfa, 0x1b, 0x5a, 0xe1, 0x90, 0xb3, 0x3b, 0x96, 0x96, 0xeb, 0x2e, 0xc9, 0x72, 0xb2, 0x6a, 0x0e, 0x94, 0x23, 0xaf, 0x16, 0xaa, 0x37, 0x89, 0x17, 0x62, 0x76, 0x06, 0x0a, 0x76, 0x40, 0x03, 0x21, 0x11, 0x74, 0x82, 0x96, 0x34, 0x03, 0x4f, 0x97, 0x12, 0xc9, 0x17, 0x10, 0x17, 0xf2, 0xfb, 0x21, 0x3f, 0x25, 0xc1, 0x46, 0xc2, 0x65, 0x1f, 0x89, 0x44, 0x0c, 0xa5, 0x36, 0xe5, 0x33, 0xe3, 0x05, 0xcc, 0x6b, 0x01, 0x13, 0x39, 0x8f, 0x61, 0xb4, 0x63, 0xb0, 0x73, 0xe1, 0xbe, 0x05, 0x07, 0x3e, 0x9d, 0x64, 0xbc, 0xae, 0xea, 0x54, 0x44, 0xb8, 0x20, 0xc6, 0xab, 0xf3, 0x46, 0x54, 0x30, 0xff, 0x4d, 0xe4, 0xa8, 0xbc, 0x0e, 0x75 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 3.14", + /* Message */ + 47, + { 0xf9, 0x1c, 0x71, 0xaf, 0x5a, 0xea, 0xca, 0xe1, 0x79, 0xe1, 0x6e, 0x87, 0xc9, 0x02, 0x3b, 0xa9, 0x4d, 0x84, 0xd7, 0x51, 0x6c, 0xec, 0x6c, 0x39, 0x89, 0x80, 0x1f, 0xb3, 0xe7, 0xad, 0xd0, 0x64, 0xbd, 0xdf, 0x92, 0x8b, 0x50, 0x00, 0x94, 0x0b, 0xbd, 0xe5, 0x39, 0xd6, 0x23, 0x37, 0x9c } +, + /* Seed */ + 78, + { 0xde, 0xb2, 0x60, 0x25, 0x8b, 0xe2, 0xc8, 0x53, 0x35, 0x21, 0x57, 0xb0, 0x65, 0x26, 0xb1, 0x43, 0xba, 0x13, 0x3c, 0x4f, 0x49, 0xbf, 0x3d, 0xf2, 0xc0, 0x50, 0xec, 0xb2, 0xc9, 0xca, 0x32, 0x53, 0x11, 0xb3, 0xc3, 0xe3, 0xd8, 0x8d, 0xf6, 0xc2, 0x4a, 0x89, 0x4e, 0xab, 0x63, 0x74, 0x5b, 0x62, 0x53, 0xe3, 0xc4, 0x6b, 0xca, 0x17, 0x1a, 0x26, 0xa4, 0xf2, 0xfc, 0x0a, 0xb6, 0x2b, 0x8a, 0x2e, 0x63, 0xa0, 0x18, 0xeb, 0x47, 0x01, 0x8c, 0xab, 0x95, 0x1f, 0x59, 0xf0, 0x20, 0x3a } +, + /* Encryption */ + 128, + { 0x0d, 0xff, 0xff, 0x51, 0x97, 0x10, 0xc9, 0xea, 0xdc, 0x53, 0x3b, 0x10, 0x8a, 0x4c, 0x29, 0x74, 0xfe, 0x53, 0x18, 0x91, 0xa3, 0x41, 0x07, 0xa6, 0x74, 0x27, 0x93, 0x5b, 0xa7, 0x20, 0xcd, 0xc6, 0xf6, 0xee, 0x02, 0x9a, 0x1b, 0x03, 0x68, 0x61, 0xdb, 0x14, 0x04, 0xc5, 0x86, 0x49, 0x90, 0x54, 0x1f, 0xa2, 0x42, 0x13, 0x01, 0xa7, 0xb2, 0x48, 0xcb, 0x11, 0xf3, 0x65, 0xb6, 0xa4, 0xaa, 0x94, 0x6f, 0x22, 0x31, 0xcb, 0xb1, 0x47, 0x32, 0xb0, 0x1a, 0xa4, 0xa6, 0x0b, 0xcb, 0xe5, 0x20, 0xec, 0x6c, 0x38, 0x53, 0xa6, 0x95, 0x8a, 0x93, 0xc5, 0xb6, 0x8b, 0x85, 0xd4, 0xbc, 0x3d, 0x84, 0x15, 0xef, 0x8b, 0x1d, 0x4f, 0x63, 0x03, 0x8f, 0x4d, 0x94, 0x2c, 0xa6, 0xbc, 0x7a, 0x38, 0x25, 0x1f, 0x15, 0xa4, 0xe3, 0x3b, 0x18, 0x9c, 0x25, 0x0b, 0xcf, 0xbc, 0x03, 0x15, 0x6e, 0x4f, 0x92, 0x11 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 3.15", + /* Message */ + 28, + { 0x07, 0x90, 0xc0, 0x81, 0xf3, 0x61, 0xc9, 0x5b, 0x59, 0xd5, 0x27, 0xd3, 0xcb, 0x50, 0x71, 0x0e, 0x66, 0xe2, 0x72, 0x59, 0x50, 0x10, 0x25, 0xed, 0x3f, 0x20, 0xf3, 0x0c } +, + /* Seed */ + 97, + { 0xfc, 0xfc, 0x2d, 0x56, 0xcb, 0x92, 0x6d, 0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0x04, 0xed, 0x60, 0xf5, 0xb5, 0xbe, 0xdf, 0x7c, 0x3b, 0x3c, 0x7d, 0xd5, 0xf3, 0x87, 0x54, 0x8f, 0x40, 0x05, 0x67, 0x02, 0xea, 0x72, 0x01, 0x76, 0xdc, 0xe2, 0x06, 0xd4, 0x13, 0xd7, 0x42, 0x3f, 0x94, 0x3f, 0xcd, 0xf6, 0x39 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 3.16", + /* Message */ + 64, + { 0x93, 0xc4, 0x1a, 0x1a, 0xdd, 0xa8, 0xf6, 0x93, 0x60, 0xf4, 0x1a, 0x58, 0xec, 0xa0, 0xb5, 0x5e, 0xcb, 0x37, 0xa6, 0xa9, 0x00, 0xfb, 0xc7, 0xda, 0xcd, 0x9c, 0xa3, 0x99, 0xc2, 0x3d, 0x31, 0x72, 0x61, 0x53, 0x77, 0xac, 0x0c, 0xc6, 0xb0, 0xed, 0x43, 0xbf, 0x59, 0x7f, 0x21, 0xcd, 0x25, 0x9d, 0x8f, 0x80, 0x88, 0x7b, 0x15, 0x9d, 0x96, 0xd6, 0x61, 0x61, 0xd5, 0x58, 0x9b, 0x95, 0xf1, 0xfe } +, + /* Seed */ + 61, + { 0x99, 0x1a, 0x2a, 0x7c, 0x06, 0x1c, 0x23, 0xa8, 0xeb, 0xc9, 0x48, 0x9a, 0xbc, 0x1b, 0x4a, 0x64, 0xa5, 0xd4, 0xe8, 0x38, 0xd9, 0xfc, 0xba, 0x42, 0x88, 0xc0, 0x1f, 0xea, 0xd6, 0x6d, 0x59, 0xf4, 0x96, 0x36, 0xe4, 0xa8, 0xd7, 0x52, 0x4c, 0xb8, 0x9d, 0x7a, 0xdc, 0x7a, 0xf3, 0xf6, 0x1a, 0xe6, 0xb3, 0x9b, 0x58, 0x8f, 0xb7, 0x7e, 0xb7, 0x02, 0x23, 0x62, 0xff, 0xd2, 0x6b } +, + /* Encryption */ + 128, + { 0x7e, 0x54, 0xa4, 0x32, 0xf5, 0x25, 0xc5, 0x23, 0x33, 0xab, 0xe3, 0xbb, 0x45, 0x48, 0x7e, 0x03, 0x9a, 0xf9, 0x4d, 0xd3, 0xef, 0xc3, 0x58, 0x44, 0xdd, 0x8e, 0x83, 0x5e, 0xe1, 0x00, 0x61, 0x78, 0xe2, 0x4d, 0xcd, 0x19, 0xfc, 0x07, 0x66, 0x7b, 0x4a, 0x34, 0xf3, 0xbd, 0x77, 0x1d, 0x09, 0xa7, 0xe2, 0x9f, 0x8c, 0xa1, 0x7e, 0x88, 0xd0, 0x29, 0xb9, 0x0d, 0xdb, 0x5f, 0x28, 0x13, 0xbe, 0x99, 0x00, 0x0d, 0x59, 0xf5, 0x43, 0x2c, 0x46, 0x6a, 0x84, 0x28, 0x75, 0x77, 0x20, 0x4b, 0xf7, 0x65, 0x97, 0x39, 0x27, 0x69, 0x98, 0x30, 0x57, 0x47, 0x66, 0x7f, 0xaf, 0xd8, 0x02, 0x9c, 0xdc, 0xbb, 0x59, 0x18, 0x39, 0x3c, 0x2c, 0xfc, 0xe4, 0xd8, 0x4a, 0x92, 0x20, 0xea, 0x3e, 0x38, 0x19, 0x72, 0x53, 0x36, 0xf2, 0x5f, 0xee, 0x8e, 0x08, 0x5d, 0xeb, 0xed, 0x33, 0x32, 0xd5, 0xdd, 0xf1, 0xee } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 3.17", + /* Message */ + 60, + { 0x9e, 0x2a, 0x7b, 0x37, 0x74, 0xb1, 0x1e, 0x62, 0xb6, 0x49, 0x0b, 0x56, 0x51, 0xa0, 0xc1, 0x8e, 0x09, 0x2e, 0x9f, 0xab, 0x8b, 0x22, 0x84, 0xae, 0x46, 0x43, 0xbe, 0xc3, 0x6b, 0x26, 0x5e, 0x5b, 0xa3, 0xc5, 0x1a, 0xc3, 0x85, 0xb2, 0xc7, 0x3d, 0x22, 0x0b, 0x2d, 0xc2, 0xe1, 0x0b, 0x0d, 0x69, 0x0f, 0x67, 0x94, 0x5a, 0x0c, 0x42, 0xb3, 0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 0x5a, 0x7c, 0x8b, 0x10, 0x33, 0x33, 0xe9, 0x06, 0xe1, 0x32, 0x63, 0x9b, 0x65, 0xa7, 0x66, 0xf4, 0x09, 0x2c, 0x8c, 0xa0, 0x78 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 3.18", + /* Message */ + 61, + { 0x0a, 0xc5, 0x2d, 0x40, 0x01, 0xf2, 0x5c, 0x2c, 0x9d, 0xb9, 0x1c, 0xe5, 0x0b, 0xdd, 0xf0, 0xd5, 0x91, 0x9e, 0x19, 0x96, 0x2e, 0x83, 0xb0, 0x7c, 0xb7, 0x9a, 0xdb, 0x00, 0x43, 0x6e, 0x13, 0x66, 0xb0, 0xaa, 0x8f, 0x3f, 0xd1, 0xee, 0x79, 0x6b, 0x23, 0xc8, 0xbc, 0x56, 0x0c, 0xcf, 0xa4, 0xbc, 0xbd, 0xb1, 0xf8, 0x40, 0x4d, 0xd6, 0xf7, 0x55, 0x15, 0x20, 0xd7, 0xd9, 0xe2 } +, + /* Seed */ + 64, + { 0x22, 0xff, 0xdc, 0xfe, 0xc6, 0xf0, 0x6b, 0x1b, 0xbd, 0x14, 0x53, 0x97, 0x70, 0x43, 0xa3, 0x4e, 0xdd, 0xf8, 0x59, 0x4d, 0xa0, 0x22, 0x13, 0x09, 0x14, 0x97, 0x55, 0x42, 0xf2, 0xf0, 0x0e, 0x98, 0xf3, 0x1e, 0x0d, 0xd0, 0xc4, 0x8f, 0x7e, 0xe5, 0xf0, 0x9d, 0x6a, 0x52, 0x71, 0x21, 0xad, 0x23, 0x37, 0x1c, 0x6c, 0xd0, 0xe0, 0x79, 0x0e, 0xb7, 0x30, 0x8b, 0xbb, 0x08, 0x96, 0xdd, 0x59, 0x0d } +, + /* Encryption */ + 128, + { 0xb2, 0x69, 0x57, 0xc5, 0x62, 0x29, 0x4d, 0xe1, 0xf3, 0x93, 0x24, 0xb1, 0xcd, 0x80, 0x3c, 0xfc, 0x39, 0xfc, 0xee, 0x2d, 0x3c, 0x9d, 0x13, 0x79, 0xf8, 0xa1, 0x12, 0x07, 0x9d, 0x69, 0x43, 0x68, 0xf5, 0x55, 0x03, 0xc2, 0x09, 0x4d, 0x98, 0x8a, 0x8a, 0x5b, 0x5a, 0xc5, 0x49, 0xbe, 0x1c, 0xf5, 0x53, 0x16, 0x04, 0x5d, 0xf5, 0xb6, 0xf6, 0x33, 0xa4, 0xef, 0x1e, 0x1f, 0x01, 0x9b, 0xa1, 0xb5, 0x42, 0xbf, 0x0a, 0x87, 0xfa, 0x3e, 0x5c, 0xa3, 0xf6, 0xb6, 0x1c, 0xc8, 0x56, 0x61, 0x28, 0xa0, 0xfa, 0x41, 0x8b, 0x08, 0x25, 0xc9, 0x0e, 0xc2, 0xf1, 0xec, 0x74, 0xe5, 0x87, 0xcd, 0x80, 0x57, 0xd9, 0x52, 0x96, 0x7a, 0xc4, 0x52, 0x1c, 0xcd, 0xbf, 0x63, 0x26, 0xf3, 0x50, 0x93, 0x00, 0x93, 0x82, 0x6d, 0x2e, 0xfa, 0x05, 0x8e, 0xd6, 0x44, 0x15, 0x37, 0x4d, 0xb3, 0x20, 0x48, 0x85, 0xca } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 3.19", + /* Message */ + 13, + { 0xa8, 0x00, 0x34, 0x62, 0xf8, 0x06, 0xb7, 0xf6, 0x61, 0xfb, 0x66, 0x46, 0x32 } +, + /* Seed */ + 112, + { 0xc7, 0x43, 0xf4, 0xa6, 0xda, 0x03, 0xab, 0x2d, 0xe5, 0xa7, 0x31, 0xcb, 0x88, 0xd8, 0xca, 0x9b, 0x61, 0xc7, 0x31, 0x9a, 0x5f, 0x8b, 0xf9, 0xd2, 0x37, 0x87, 0x7a, 0x05, 0xd0, 0xf3, 0x68, 0xc3, 0x60, 0x8a, 0x05, 0x2a, 0xc6, 0xce, 0x13, 0x73, 0x17, 0x95, 0x47, 0x55, 0x42, 0xea, 0x16, 0xa8, 0x62, 0x91, 0x3d, 0x04, 0x32, 0xf0, 0x8b, 0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c, 0x34, 0xc3, 0x95, 0x3b } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 3.20", + /* Message */ + 2, + { 0xef, 0x32 } +, + /* Seed */ + 123, + { 0x43, 0x99, 0xcb, 0x04, 0x4a, 0x60, 0x07, 0x6d, 0x18, 0xcc, 0xb3, 0x4e, 0x8b, 0x07, 0x8c, 0x81, 0x8e, 0xa7, 0x7f, 0x63, 0xb0, 0xa4, 0x3a, 0xbd, 0xec, 0xc5, 0x77, 0x81, 0x93, 0xa8, 0xbb, 0xba, 0x5d, 0x56, 0xd0, 0xfc, 0x4e, 0x82, 0xa2, 0x11, 0x51, 0x6b, 0xbd, 0xef, 0x44, 0xe7, 0xf4, 0xe7, 0xfe, 0xbb, 0xe1, 0xe1, 0x92, 0x3c, 0x99, 0x9a, 0x7e, 0x96, 0x1c, 0xd6, 0xee, 0x1c, 0x41, 0x6a, 0x85, 0x96, 0xe2, 0x4b, 0x63, 0x83, 0xa4, 0x69, 0x93, 0x5f, 0x33, 0xd1, 0x56, 0xfd, 0x5b, 0xcf, 0xdb, 0xd4, 0x27, 0x46, 0x0d, 0x48, 0x66, 0x83, 0x06, 0x1e, 0x41, 0x05, 0xf3, 0x5b, 0x5e, 0x75, 0x23, 0x20, 0x15, 0x5c, 0x7f, 0x69, 0xad, 0x8e, 0xb4, 0x02, 0xcc, 0x11, 0x06, 0xe0, 0x28, 0x9a, 0x9b, 0x49, 0x65, 0x82, 0x3e, 0x7a, 0x51, 0xcf, 0xe4, 0xd2, 0x6d } +, + /* Encryption */ + 128, + { 0x13, 0x1b, 0x62, 0x5e, 0x86, 0xe6, 0xcd, 0x1e, 0x08, 0xac, 0xf1, 0x95, 0xd9, 0x3c, 0xd3, 0xa0, 0xdc, 0x8b, 0xa9, 0xe2, 0xdc, 0xd6, 0xfc, 0x99, 0x6b, 0xe2, 0x17, 0x24, 0xaf, 0x17, 0x90, 0xb6, 0x88, 0xd7, 0x9d, 0x3e, 0xa9, 0xa9, 0x50, 0x98, 0xca, 0xbb, 0xe8, 0xa5, 0xd4, 0x85, 0x92, 0xe4, 0x74, 0x6b, 0x0e, 0xd2, 0xaf, 0x7c, 0xaf, 0x89, 0xb7, 0xb6, 0x15, 0x2e, 0x38, 0x24, 0xd9, 0x15, 0x89, 0xee, 0xec, 0x33, 0x75, 0xc7, 0x1a, 0x89, 0x97, 0x48, 0x70, 0x3a, 0xcc, 0x1e, 0x8d, 0x1d, 0xe4, 0x71, 0xea, 0x75, 0x28, 0x04, 0x0b, 0x79, 0x5f, 0x29, 0x9e, 0x66, 0x8c, 0xec, 0x9f, 0x5a, 0xf3, 0xeb, 0x48, 0xf9, 0x8c, 0x0d, 0x85, 0x20, 0x67, 0x77, 0x3e, 0x10, 0x1f, 0xa2, 0x4a, 0xeb, 0x6b, 0x40, 0x4d, 0xaf, 0xb4, 0x2e, 0x7a, 0x63, 0xb0, 0x4a, 0x66, 0xbd, 0x0e, 0x9f, 0x9c, 0x94 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 4: A 1024-bit RSA key pair", +{ + /* Modulus */ + 128, + { 0xe9, 0xf2, 0x5e, 0x48, 0x14, 0x0b, 0x5d, 0xcf, 0x46, 0x99, 0xe3, 0x03, 0x7f, 0xa8, 0x34, 0xf0, 0xc7, 0x8b, 0x16, 0x73, 0x5f, 0xf7, 0x9f, 0x6b, 0x18, 0xae, 0x60, 0xb5, 0x18, 0x48, 0xd3, 0x06, 0x99, 0xec, 0x64, 0x6d, 0x85, 0x7f, 0x15, 0x77, 0x0e, 0x2c, 0x7a, 0x0c, 0x0c, 0x90, 0x0f, 0xb6, 0x04, 0x0b, 0x5f, 0x34, 0x48, 0x4e, 0x9c, 0xf5, 0xce, 0xda, 0x23, 0xd5, 0xb2, 0x50, 0xef, 0x93, 0x28, 0x6f, 0x01, 0x1e, 0x9a, 0x5b, 0xf9, 0xe5, 0x42, 0xe5, 0xc9, 0xf4, 0x42, 0xde, 0x54, 0x58, 0xe2, 0x3e, 0x41, 0xd1, 0xd9, 0xcd, 0x9f, 0x0c, 0xe1, 0xcf, 0x20, 0x08, 0xd3, 0xea, 0x4d, 0x80, 0x32, 0xe8, 0x54, 0xcf, 0xfc, 0xdf, 0x5f, 0x69, 0x8d, 0x13, 0x16, 0xe0, 0x29, 0xc4, 0x88, 0xfc, 0xbb, 0x2b, 0xe2, 0x9a, 0x4e, 0x7b, 0xfb, 0x8e, 0x6e, 0x81, 0xd3, 0x42, 0x12, 0x3e, 0xe7, 0x5b } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 128, + { 0x45, 0x45, 0x88, 0x68, 0x44, 0x53, 0x27, 0x48, 0x60, 0x49, 0xe1, 0xbf, 0xdf, 0xf5, 0x61, 0x13, 0xa8, 0xaa, 0x45, 0x10, 0x0d, 0xab, 0x07, 0x4f, 0xd1, 0x63, 0x94, 0xec, 0x1a, 0x90, 0x39, 0xb8, 0x1b, 0x2c, 0xb5, 0x81, 0xfe, 0x84, 0xe6, 0x48, 0xb5, 0xf0, 0x32, 0x85, 0x4d, 0xd4, 0xfc, 0x69, 0xf3, 0x61, 0xa0, 0xa3, 0x9d, 0x03, 0x76, 0x13, 0x8c, 0xd7, 0xe7, 0xc3, 0x77, 0x84, 0xe2, 0xa2, 0xf9, 0xd4, 0xf2, 0x66, 0x84, 0xcc, 0x5c, 0xc9, 0xf5, 0x12, 0xba, 0x62, 0x15, 0xeb, 0xd2, 0x32, 0xf9, 0xaa, 0x3d, 0xa4, 0x69, 0xdb, 0x43, 0xda, 0x1c, 0x06, 0x46, 0xe7, 0x5b, 0x33, 0xaa, 0xc5, 0x70, 0x08, 0x1b, 0x5b, 0x2e, 0x96, 0xea, 0xb7, 0x54, 0x6a, 0xcf, 0x93, 0x17, 0x85, 0xaa, 0x2f, 0xd1, 0x82, 0x4c, 0xbe, 0x2c, 0x5f, 0x9b, 0xf5, 0x63, 0x34, 0xec, 0x15, 0x66, 0xd1, 0xcf, 0x45 } +, + /* Prime 1 */ + 64, + { 0xfc, 0xdf, 0x1c, 0x49, 0x35, 0x8a, 0x1a, 0xac, 0x93, 0x88, 0xc4, 0x6c, 0xaa, 0x04, 0x72, 0xfa, 0x35, 0xb2, 0x1b, 0xdf, 0x99, 0xa2, 0x7b, 0xc2, 0xac, 0x65, 0x46, 0x7b, 0x88, 0xd0, 0x16, 0x1f, 0xbc, 0x70, 0xf3, 0xf4, 0xfa, 0x13, 0xa5, 0xf3, 0xa9, 0x8b, 0x59, 0xc0, 0x67, 0xea, 0xbf, 0x19, 0x62, 0x16, 0xa1, 0xb8, 0x9e, 0x20, 0xaf, 0xb2, 0xe5, 0xe5, 0xed, 0xde, 0xae, 0x8e, 0xe1, 0xef } +, + /* Prime 2 */ + 64, + { 0xec, 0xd7, 0x51, 0xd3, 0xd3, 0xf3, 0xb2, 0x08, 0xbd, 0x71, 0x8a, 0xe4, 0x35, 0x5d, 0x23, 0xf9, 0x16, 0xfa, 0x8f, 0xf6, 0x7d, 0xf0, 0x36, 0x61, 0x6b, 0xfd, 0xa7, 0xcb, 0xc8, 0x7a, 0xeb, 0xef, 0xaa, 0x7e, 0xda, 0x69, 0x1f, 0xb9, 0x8f, 0xbb, 0x03, 0x8a, 0x02, 0x07, 0x22, 0x01, 0x3c, 0xa8, 0xee, 0x3d, 0x04, 0x8f, 0x97, 0xba, 0xd2, 0xa2, 0x93, 0x0b, 0xe4, 0xb9, 0x6f, 0xb7, 0x4d, 0x55 } +, + /* Prime exponent 1 */ + 64, + { 0x1d, 0x2f, 0x73, 0x08, 0x50, 0x11, 0x9c, 0x7a, 0x86, 0x9c, 0xa6, 0x6f, 0x14, 0x40, 0x67, 0x34, 0xd1, 0xb5, 0xb8, 0xd9, 0xd9, 0xd5, 0x93, 0x0b, 0x28, 0xf2, 0x97, 0x6b, 0xf2, 0xa2, 0x71, 0xab, 0x40, 0x08, 0x99, 0x5f, 0x90, 0xed, 0x6b, 0x9d, 0xef, 0xd7, 0x91, 0x88, 0x4f, 0x76, 0x1c, 0x90, 0x45, 0x6d, 0xef, 0x44, 0x6b, 0x9b, 0xc2, 0x2b, 0x97, 0xb5, 0x2d, 0xfb, 0x21, 0x92, 0x84, 0x29 } +, + /* Prime exponent 2 */ + 64, + { 0x4d, 0x50, 0x95, 0x03, 0xc3, 0x83, 0x20, 0x31, 0x3e, 0x36, 0x9c, 0x92, 0x96, 0xe1, 0x0a, 0xe7, 0x3b, 0x9b, 0x1b, 0xf7, 0xe9, 0x70, 0xcb, 0x2f, 0xce, 0x63, 0x05, 0xad, 0xbe, 0x8a, 0x72, 0x0e, 0xd0, 0xe7, 0x8c, 0x41, 0x18, 0xfc, 0x28, 0x71, 0x72, 0x5c, 0x51, 0x01, 0x27, 0x16, 0xa4, 0x48, 0xb9, 0x4c, 0xed, 0xfa, 0x3a, 0x1b, 0xe0, 0xba, 0xf5, 0xa9, 0xc2, 0x46, 0xce, 0xb3, 0x55, 0xe9 } +, + /* Coefficient */ + 64, + { 0xbc, 0x15, 0xf4, 0x7c, 0x0b, 0xb6, 0xde, 0x6a, 0x7a, 0x3a, 0x1f, 0xe9, 0x28, 0x89, 0x80, 0x9b, 0x4a, 0x3c, 0x0c, 0xfa, 0x65, 0x0c, 0x2f, 0xec, 0x36, 0xb8, 0x92, 0x85, 0x14, 0x65, 0x47, 0xa5, 0x7d, 0x2b, 0x15, 0x71, 0xac, 0xb9, 0xd3, 0x0a, 0xa7, 0x91, 0xec, 0x97, 0xfd, 0x51, 0xfd, 0xe1, 0xec, 0x26, 0xf5, 0x6b, 0x32, 0x63, 0xda, 0xec, 0x9e, 0x29, 0x2e, 0x9c, 0x17, 0x37, 0x36, 0x4b } + +} +, +{{ + "PKCS#1 v1.5 Encryption Example 4.1", + /* Message */ + 29, + { 0xca, 0x24, 0x72, 0x1c, 0x88, 0xe0, 0x47, 0x74, 0xf4, 0x15, 0xb4, 0xc4, 0x6c, 0xa0, 0xfc, 0x26, 0xd5, 0xbb, 0x53, 0xaa, 0xfb, 0x19, 0x92, 0xf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0xe4, 0x83, 0x88, 0x65, 0xd4, 0xbd, 0x9c, 0x51, 0xcd, 0xe8, 0xdf, 0xbe, 0xee, 0xa5, 0x88, 0x2b, 0x09, 0xdc, 0x70, 0xbc, 0x9f, 0xe7, 0x49, 0xb5, 0xd2, 0x4b, 0xb7, 0xca, 0x51, 0x1d, 0xb2, 0xc2, 0xb8, 0x29, 0xa7, 0xc9, 0x14, 0x6c, 0x77, 0x4e, 0xb0, 0xbd, 0x7a, 0xaf, 0xdc, 0x5c, 0x38, 0xd3, 0xd7, 0xcd, 0x58, 0x27 } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Encryption Example 4.2", + /* Message */ + 40, + { 0x25, 0xc7, 0xbc, 0x4c, 0xb2, 0x43, 0xac, 0x1f, 0x07, 0x40, 0x86, 0x9c, 0xd2, 0x6b, 0xa8, 0x26, 0xf3, 0x55, 0xd4, 0x77, 0xc4, 0xaa, 0x6c, 0xbe, 0x54, 0x3a, 0xdd, 0xea, 0x84, 0x44, 0x44, 0xf4, 0x1c, 0x35, 0x92, 0xbb, 0x3d, 0xa7, 0xd4, 0x21 } +, + /* Seed */ + 85, + { 0x27, 0x2b, 0xe3, 0xfb, 0xcc, 0x76, 0x14, 0x99, 0x6f, 0x1a, 0xc0, 0xe0, 0xa5, 0xe2, 0x69, 0x06, 0x23, 0xbb, 0x0b, 0x69, 0x70, 0xfc, 0xde, 0x0b, 0x6f, 0x45, 0x58, 0xee, 0x62, 0x34, 0x26, 0xfa, 0x60, 0xad, 0xd6, 0xc5, 0xa8, 0xa1, 0x0d, 0x4a, 0x37, 0x51, 0x50, 0x15, 0x36, 0xfe, 0x8a, 0x45, 0xc5, 0x42, 0xf6, 0x27, 0xf4, 0x22, 0x9f, 0xa1, 0x24, 0x57, 0xc1, 0x13, 0x31, 0x13, 0x72, 0x05, 0x55, 0x2b, 0x01, 0x4c, 0x91, 0xb1, 0xc4, 0xe0, 0x9e, 0x45, 0x96, 0x78, 0x34, 0x0a, 0x74, 0xc2, 0x85, 0xe2, 0x6a, 0xef, 0xb9 } +, + /* Encryption */ + 128, + { 0x76, 0x50, 0xd6, 0xf8, 0x1a, 0xef, 0x5c, 0x0e, 0x32, 0x0e, 0xc7, 0x7f, 0xc8, 0x9b, 0x7c, 0x3e, 0x61, 0x83, 0x85, 0x0d, 0x10, 0xc9, 0x8a, 0xd7, 0xe9, 0xfe, 0xea, 0x47, 0xe3, 0x8c, 0xfb, 0x37, 0xa0, 0x25, 0xdb, 0x42, 0x1f, 0xb6, 0xd0, 0x05, 0x80, 0x9e, 0x38, 0xbb, 0x3c, 0x51, 0x95, 0x1d, 0xa9, 0xd9, 0x43, 0x3b, 0xa7, 0xef, 0xb1, 0x7d, 0xe7, 0xd8, 0xfe, 0x3e, 0x9b, 0x9c, 0xe4, 0x55, 0x53, 0x74, 0xea, 0x66, 0x3a, 0x1b, 0x5d, 0xa4, 0xa0, 0x92, 0x29, 0x4c, 0xe9, 0x66, 0x98, 0x56, 0x55, 0xe2, 0xdd, 0xd2, 0x0d, 0x7d, 0xe3, 0xaa, 0x35, 0x37, 0x05, 0x8c, 0xfd, 0x7e, 0x7a, 0x7b, 0x97, 0xfc, 0xdd, 0x98, 0x53, 0x79, 0x2b, 0xa8, 0x3f, 0xcc, 0x89, 0x07, 0x4a, 0x8d, 0x0f, 0x3c, 0xef, 0xdf, 0x98, 0x5b, 0x9e, 0x78, 0xae, 0xbf, 0xb0, 0x59, 0x67, 0x36, 0x4f, 0x24, 0x11, 0xcd } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 4.3", + /* Message */ + 20, + { 0xcf, 0x00, 0x7e, 0xbd, 0x23, 0xda, 0x06, 0x97, 0x1a, 0xf7, 0x9a, 0xa6, 0x34, 0xd5, 0xd2, 0x55, 0x05, 0xbd, 0x52, 0x29 } +, + /* Seed */ + 105, + { 0x9c, 0xf7, 0x23, 0x7e, 0x28, 0xa8, 0x6e, 0x41, 0x8d, 0x66, 0x4f, 0xe3, 0xbe,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c, 0x63, 0xbd, 0x27, 0x9f, 0xae, 0x4c, 0x33, 0xf4, 0x2a, 0x9d, 0x73, 0xbb, 0x39, 0x11, 0x8e, 0xb8, 0x7d, 0x25, 0x12, 0xb9, 0xd9, 0x36, 0xa2, 0x7e, 0xd2, 0xe4, 0x49, 0x60, 0x7d, 0xbf, 0x0e, 0x3e, 0x22, 0x3a, 0x53, 0x95, 0x26, 0x35, 0x59, 0x9c } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 4.4", + /* Message */ + 34, + { 0xef, 0xda, 0x79, 0xe9, 0xc3, 0x36, 0xc2, 0x34, 0xff, 0x37, 0xb4, 0xf5, 0x8f, 0xdb, 0xd3, 0x1a, 0xf3, 0x67, 0x5b, 0x3d, 0x2b, 0x10, 0x5e, 0xaf, 0xbe, 0xad, 0x4b, 0xbb, 0xff, 0xf5, 0x4e, 0x68, 0x6a, 0xb5 } +, + /* Seed */ + 91, + { 0x30, 0xc2, 0x09, 0x43, 0xf1, 0xbf, 0xc4, 0x23, 0x61, 0xd4, 0xd2, 0x2f, 0x51, 0xa8, 0xd7, 0x86, 0xcb, 0x2d, 0x0d, 0xd5, 0xff, 0x7d, 0x70, 0x5b, 0x30, 0x28, 0x60, 0x18, 0x11, 0x29, 0x3d, 0xbe, 0x5d, 0x72, 0xc3, 0x55, 0x97, 0x10, 0xce, 0x0a, 0xe9, 0x5d, 0x2f, 0x16, 0xb2, 0x39, 0xa4, 0xac, 0x84, 0x45, 0x53, 0x7d, 0x48, 0x8e, 0x3e, 0x6d, 0x2c, 0xf5, 0xb7, 0xa6, 0x4c, 0x06, 0xc3, 0x75, 0x6e, 0x11, 0x60, 0x67, 0x63, 0x63, 0x3e, 0xdb, 0xdd, 0xbf, 0x26, 0xbe, 0xe6, 0x51, 0x18, 0x42, 0xd2, 0x75, 0x2d, 0xcd, 0x88, 0x89, 0x6c, 0xb8, 0x55, 0x8a, 0x87 } +, + /* Encryption */ + 128, + { 0xbb, 0x91, 0xb2, 0xf6, 0xf4, 0x33, 0x1d, 0x64, 0xd0, 0x73, 0x6a, 0x2e, 0xa6, 0x03, 0x29, 0xaa, 0x16, 0xc2, 0xed, 0x7a, 0x4d, 0x5c, 0xa8, 0xd7, 0x84, 0xe6, 0x30, 0x4c, 0xe4, 0x84, 0x4c, 0x71, 0x58, 0xf8, 0x22, 0xd2, 0xaf, 0x29, 0xc8, 0x90, 0x97, 0x7d, 0x75, 0xa9, 0x35, 0xe4, 0x3d, 0x93, 0xb5, 0xbe, 0x10, 0xc1, 0xd4, 0x4f, 0xa0, 0x0c, 0xe2, 0x8e, 0x75, 0xf5, 0x27, 0xbd, 0x84, 0xa3, 0xbe, 0x5a, 0xf5, 0xbe, 0xe9, 0x45, 0x67, 0xc5, 0x5e, 0x15, 0xee, 0x3e, 0x93, 0x42, 0x6a, 0xd8, 0xd5, 0x0f, 0x06, 0x4c, 0x57, 0x93, 0xca, 0x38, 0xc4, 0x3a, 0x70, 0xc5, 0xf5, 0x60, 0x74, 0x0b, 0x16, 0xee, 0xa1, 0x6b, 0x7f, 0x13, 0x41, 0x5f, 0x75, 0x1b, 0x3f, 0xdb, 0x87, 0x7a, 0x88, 0x29, 0x33, 0x21, 0xf5, 0x0f, 0xff, 0xa6, 0xf1, 0x24, 0x94, 0x96, 0xc2, 0xb0, 0x27, 0xa2, 0x18, 0xed } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 4.5", + /* Message */ + 52, + { 0x4a, 0x01, 0xfc, 0x13, 0xc1, 0xd8, 0x6f, 0xe7, 0xb2, 0xfd, 0xc7, 0x92, 0xf5, 0x28, 0x0f, 0x87, 0x5a, 0xdc, 0x5a, 0xe9, 0x9f, 0xf9, 0x11, 0xd0, 0x2c, 0x8c, 0x00, 0x3d, 0x39, 0xbb, 0xee, 0x54, 0xb8, 0x51, 0xef, 0xa3, 0x4b, 0x41, 0x31, 0xbe, 0x52, 0x0d, 0x81, 0x00, 0xef, 0x62, 0xc2, 0x5a, 0x4b, 0x51, 0x7e, 0x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5f, 0xdf, 0x59, 0x71, 0xf3, 0xdd, 0xb0, 0xe3, 0x12, 0xa9, 0x16, 0x06, 0xf3, 0x13, 0x73, 0x02, 0x0d, 0xb3, 0xa7, 0x6d, 0x04, 0xfd, 0x6d, 0x65, 0xd6 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 4.6", + /* Message */ + 7, + { 0x7a, 0xb0, 0x6e, 0x19, 0x69, 0x22, 0xc0 } +, + /* Seed */ + 118, + { 0xde, 0x0d, 0x60, 0x33, 0xc1, 0xe9, 0x6b, 0x5f, 0xd8, 0x31, 0x21, 0x4f, 0x30, 0xd8, 0x1b, 0x8f, 0xd9, 0xa2, 0x69, 0x3e, 0x5e, 0x8a, 0x36, 0xea, 0xff, 0xd0, 0x39, 0xe7, 0x47, 0x3c, 0x28, 0xee, 0x43, 0xa3, 0x91, 0x6c, 0x78, 0xc9, 0xa1, 0x12, 0x95, 0x8a, 0x94, 0xce, 0x67, 0x1c, 0xcc, 0x40, 0xd9, 0x7e, 0xd4, 0x18, 0x7a, 0x3f, 0xff, 0xa0, 0xdc, 0x12, 0x9d, 0x88, 0xa8, 0xb8, 0xc4, 0x96, 0x6e, 0xa3, 0x94, 0xa9, 0x10, 0x89, 0x61, 0x25, 0xf5, 0x4d, 0xaf, 0xbb, 0x3b, 0x17, 0xb9, 0xfa, 0x10, 0xc4, 0x82, 0x20, 0x09, 0x64, 0x90, 0xc6, 0xf7, 0x5b, 0xe2, 0x51, 0x83, 0xe9, 0x98, 0x4d, 0xf5, 0xe4, 0xd7, 0xeb, 0xf9, 0x47, 0x5d, 0x11, 0xea, 0x39, 0x33, 0x5a, 0xc7, 0x2f, 0x93, 0xd3, 0x33, 0xbd, 0x74, 0x22, 0x19, 0x42 } +, + /* Encryption */ + 128, + { 0x54, 0x18, 0x23, 0xf9, 0x05, 0x57, 0x6d, 0xa1, 0x42, 0xe2, 0x65, 0xd8, 0x90, 0x45, 0xab, 0x66, 0x20, 0xfd, 0x1a, 0x74, 0xc9, 0x53, 0x3a, 0xda, 0x4b, 0xc7, 0xb4, 0x3d, 0x95, 0x62, 0x9a, 0x31, 0x18, 0x6f, 0x4e, 0x89, 0x89, 0x20, 0x83, 0xd2, 0x54, 0x9b, 0x0e, 0x63, 0x8b, 0xdf, 0xc0, 0xd2, 0x7e, 0x14, 0xec, 0x18, 0xc4, 0x5c, 0xa3, 0x58, 0x61, 0xdf, 0xe6, 0x12, 0xa3, 0xa1, 0xed, 0xaa, 0xfc, 0x72, 0xfb, 0x46, 0x81, 0xa9, 0x9e, 0xa6, 0xe6, 0x48, 0xbe, 0x89, 0x62, 0xf1, 0x56, 0x1e, 0x75, 0x0d, 0x14, 0x49, 0xf2, 0x3f, 0x43, 0x0a, 0xf9, 0x30, 0x72, 0x25, 0x54, 0x4d, 0x8a, 0x8b, 0x89, 0x65, 0xaf, 0x5d, 0xd1, 0x8c, 0xb7, 0x89, 0x53, 0xce, 0x6d, 0x16, 0xd8, 0x5e, 0xb2, 0x11, 0xaf, 0x0c, 0x64, 0x68, 0xa2, 0xaf, 0x9f, 0x72, 0xe7, 0x86, 0x61, 0xb0, 0xfc, 0xaa, 0x48, 0x15 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 4.7", + /* Message */ + 7, + { 0x9a, 0xda, 0x9c, 0x10, 0xb8, 0xae, 0x22 } +, + /* Seed */ + 118, + { 0xcc, 0x23, 0x43, 0x72, 0x4a, 0xc5, 0x0e, 0xe5, 0x47, 0x08, 0xfc, 0x5f, 0xd0, 0x3f, 0x09, 0xa1, 0xcc, 0x12, 0x22, 0xa4, 0x4b, 0xcd, 0x44, 0x03, 0x87, 0x7c, 0x6b, 0xde, 0x86, 0xbf, 0x43, 0xe4, 0x2c, 0x10, 0x84, 0xf6, 0xef, 0xff, 0x20, 0xfa, 0xc0, 0xac, 0xc3, 0x1e, 0xca, 0x17, 0xc7, 0x38, 0xd4, 0x68, 0x68, 0x73, 0x65, 0x52, 0xfd, 0x2f, 0x7e, 0x93, 0xb8, 0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c1, 0x35, 0xab, 0x95, 0x94, 0x9a } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 4.8", + /* Message */ + 19, + { 0xd8, 0x12, 0x6f, 0x4a, 0x88, 0x78, 0x97, 0x82, 0x93, 0x11, 0x76, 0x51, 0xb3, 0x0e, 0x79, 0x22, 0xd1, 0x4a, 0xcf } +, + /* Seed */ + 106, + { 0xad, 0xf9, 0xb0, 0xa9, 0x15, 0x2f, 0x0e, 0x6e, 0xc6, 0xf4, 0x39, 0x59, 0x71, 0xad, 0x40, 0x3f, 0x02, 0xe7, 0xfa, 0x98, 0xf8, 0x15, 0x56, 0x0a, 0xfa, 0xff, 0xa7, 0xca, 0xd5, 0xb4, 0x47, 0x4b, 0x6e, 0xce, 0x65, 0xed, 0xab, 0xe2, 0x7e, 0xc2, 0x4a, 0x0a, 0xa4, 0x73, 0xed, 0x75, 0xa6, 0x1f, 0x5c, 0x24, 0x90, 0xa5, 0x36, 0xb1, 0xa4, 0xdf, 0x7b, 0x03, 0x41, 0x77, 0x37, 0xc5, 0x34, 0xe1, 0xd4, 0x5b, 0xf7, 0x26, 0x94, 0x38, 0x6b, 0xee, 0x82, 0x0c, 0x48, 0xdb, 0xd1, 0x83, 0x17, 0xbd, 0x61, 0x7c, 0x04, 0xb6, 0xa4, 0x17, 0xe3, 0x0e, 0xed, 0x79, 0x58, 0x8d, 0xc2, 0x3f, 0xd4, 0xdb, 0xa1, 0x37, 0x44, 0xb4, 0xb2, 0xaa, 0x5a, 0xf8, 0x0a, 0x8a } +, + /* Encryption */ + 128, + { 0x3b, 0x2b, 0x85, 0xed, 0xfc, 0xd7, 0xc7, 0xc2, 0x7b, 0xde, 0xde, 0xe1, 0xc2, 0x8a, 0xb6, 0x18, 0x7a, 0xbf, 0x1c, 0x96, 0xd9, 0x45, 0x30, 0x07, 0x92, 0xcf, 0x8a, 0xf1, 0x97, 0xc2, 0xf9, 0xa3, 0x91, 0xb4, 0x8b, 0x83, 0x32, 0xcf, 0xde, 0x7e, 0x4c, 0x7d, 0xc3, 0x4c, 0x42, 0x30, 0x29, 0x56, 0x92, 0xce, 0xfd, 0xa5, 0xef, 0xb2, 0x57, 0x35, 0x49, 0x2b, 0x9f, 0xf7, 0x84, 0xc7, 0xba, 0xe7, 0x35, 0x11, 0xc6, 0x18, 0xe3, 0xaa, 0x7b, 0xc8, 0x7b, 0xc3, 0x13, 0xf2, 0x67, 0x09, 0xa8, 0xea, 0x4a, 0xd7, 0x3a, 0x34, 0x9a, 0xb9, 0xe5, 0xad, 0x82, 0x6c, 0x96, 0xad, 0x0e, 0xca, 0x97, 0xe3, 0x13, 0x28, 0x6b, 0xcc, 0xbf, 0x8e, 0x33, 0xc9, 0x1f, 0x03, 0x68, 0x39, 0xb9, 0x94, 0x8b, 0x4e, 0xb0, 0xc3, 0x8e, 0x21, 0x3e, 0xf4, 0x7f, 0x77, 0x66, 0x1a, 0x27, 0xf8, 0xcf, 0xe4, 0x99, 0x03 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 4.9", + /* Message */ + 58, + { 0xf5, 0xdf, 0x01, 0xaf, 0xe6, 0xa9, 0x22, 0x51, 0x8b, 0x3f, 0x4b, 0x80, 0xcd, 0x4f, 0xca, 0x73, 0xb9, 0x7b, 0xab, 0x61, 0x71, 0x6e, 0x27, 0xd2, 0x51, 0xbd, 0x46, 0x5f, 0x4b, 0x35, 0xa1, 0xa2, 0x32, 0xe2, 0xda, 0x00, 0x90, 0x1c, 0x29, 0x4b, 0xf2, 0x23, 0x50, 0xce, 0x49, 0x0d, 0x09, 0x9f, 0x64, 0x2b, 0x53, 0x75, 0x61, 0x2d, 0xb6, 0x3b, 0xa1, 0xf2 } +, + /* Seed */ + 67, + { 0x6b, 0xf2, 0x81, 0x0d, 0xb8, 0xfb, 0x26, 0x93, 0x98, 0x41, 0x2d, 0xbb, 0x88, 0x06, 0x02, 0x82, 0xd4, 0x5f, 0xbe, 0x96, 0x27, 0x33, 0x7e, 0x54, 0x34, 0x26, 0x1a, 0x5d, 0xbc, 0x19, 0x3a, 0xd6, 0x18, 0xc1, 0x1f, 0x7b, 0xde, 0xc1, 0xde, 0x25, 0x05, 0xf8, 0x60, 0x37, 0xfc, 0x18, 0x51, 0xbf, 0x6f, 0xb4, 0x9d, 0x23, 0x60, 0x62, 0x73, 0x47, 0x49, 0x9e, 0xfc, 0x98, 0xe2, 0x92, 0x05, 0xda, 0x90, 0x6d, 0x32 } +, + /* Encryption */ + 128, + { 0x40, 0x12, 0xfc, 0xc5, 0xcf, 0xb9, 0x78, 0xde, 0xf8, 0x8f, 0xb8, 0xf8, 0x17, 0x4a, 0xa5, 0xb4, 0xa3, 0x07, 0x75, 0xac, 0x45, 0x59, 0xf0, 0xb2, 0xf3, 0xd3, 0xb4, 0x38, 0x9b, 0x82, 0x8a, 0x79, 0xd1, 0x40, 0x25, 0x10, 0xc9, 0xa0, 0x33, 0x7d, 0x48, 0x9d, 0x11, 0x82, 0xab, 0x31, 0xc8, 0x38, 0xac, 0x7c, 0x80, 0xb7, 0x48, 0x60, 0x9a, 0x2a, 0xa5, 0x37, 0xda, 0x7a, 0xcc, 0x3a, 0x4a, 0x7a, 0x31, 0xd2, 0xad, 0x25, 0x2b, 0xfd, 0x59, 0x28, 0x0b, 0x3d, 0x18, 0x13, 0xa2, 0x6f, 0x93, 0xc5, 0x9e, 0xe8, 0xc5, 0xee, 0x68, 0x87, 0x18, 0xf4, 0x27, 0x83, 0x93, 0xfe, 0xce, 0x32, 0x3a, 0x9d, 0xff, 0x83, 0x37, 0x55, 0xe8, 0x9a, 0xc8, 0xee, 0x1f, 0xa2, 0x90, 0x4b, 0xf2, 0x4c, 0xdf, 0x4f, 0x01, 0xe6, 0xea, 0xed, 0xb6, 0xa8, 0xef, 0x01, 0xf4, 0x07, 0xbe, 0xf3, 0x30, 0x9f, 0x03, 0x39 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 4.10", + /* Message */ + 4, + { 0xa3, 0x82, 0x3f, 0xaf } +, + /* Seed */ + 121, + { 0x94, 0xf6, 0x70, 0xfd, 0x82, 0xf6, 0x91, 0x32, 0x75, 0xee, 0xa4, 0xc6, 0x71, 0x16, 0xca, 0xaa, 0xbd, 0x33, 0x57, 0x8c, 0xf8, 0x4d, 0x22, 0x63, 0x64, 0x38, 0xa6, 0xfd, 0x7e, 0xcf, 0xee, 0xfc, 0x0b, 0x18, 0x7d, 0xec, 0xf7, 0x93, 0x89, 0x1c, 0x6e, 0x4c, 0xfc, 0x52, 0xb5, 0x67, 0xd8, 0x72, 0xbf, 0xfb, 0xee, 0x0a, 0x67, 0x47, 0x2a, 0x1a, 0x48, 0xc0, 0xf1, 0xba, 0x59, 0x8a, 0xd8, 0x25, 0x89, 0x01, 0xc5, 0x6a, 0x55, 0x92, 0xf1, 0x41, 0x14, 0x7e, 0x81, 0x33, 0x9d, 0x74, 0x7e, 0x06, 0x32, 0xde, 0xf0, 0x0d, 0x3d, 0xbe, 0xe9, 0x5c, 0x4e, 0x43, 0x21, 0xcc, 0x25, 0xb5, 0x31, 0x14, 0x47, 0xa3, 0x02, 0xc5, 0x34, 0x92, 0x9c, 0xf7, 0xe5, 0x34, 0xf9, 0xae, 0x67, 0xf4, 0x1e, 0x01, 0xe2, 0x2a, 0x3d, 0x7c, 0xe4, 0x1b, 0x3b, 0x31, 0x35 } +, + /* Encryption */ + 128, + { 0x7b, 0x60, 0x25, 0x42, 0xb6, 0x4f, 0x0a, 0x1e, 0x0e, 0xc2, 0xaa, 0x01, 0xcb, 0xed, 0x37, 0x7e, 0x33, 0x1e, 0xa3, 0xff, 0x86, 0xf3, 0x56, 0xfb, 0x7a, 0x58, 0x83, 0x76, 0x4b, 0xe4, 0xcb, 0xf7, 0xd0, 0x75, 0x4c, 0x58, 0x29, 0x64, 0x31, 0x36, 0xf2, 0x57, 0x23, 0x36, 0xa2, 0x3f, 0x15, 0x41, 0x1d, 0x83, 0x85, 0x14, 0xa1, 0x43, 0x87, 0x24, 0xad, 0x74, 0x09, 0xe8, 0xec, 0x8f, 0xe2, 0x63, 0x41, 0xae, 0xea, 0x56, 0x68, 0x34, 0x5d, 0x0d, 0x82, 0x3f, 0xb5, 0xc2, 0x1d, 0xf4, 0x59, 0xe8, 0xbf, 0x7c, 0x15, 0xb8, 0x0b, 0x07, 0x2e, 0x5f, 0x8a, 0x84, 0x65, 0xa4, 0x4a, 0xa9, 0xd0, 0x9d, 0x82, 0x5c, 0x03, 0x15, 0xa0, 0xec, 0xd2, 0xd6, 0x49, 0x70, 0x2b, 0x10, 0x9b, 0xe8, 0xfe, 0x35, 0xeb, 0x22, 0x84, 0x3a, 0x20, 0xe7, 0xfd, 0x87, 0x4f, 0x1c, 0x6b, 0x46, 0xa8, 0x0b, 0x68, 0xdf } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 4.11", + /* Message */ + 62, + { 0x75, 0xb9, 0xa4, 0xa0, 0xbb, 0x2d, 0x46, 0x43, 0xe4, 0x78, 0xf6, 0x54, 0xf2, 0xcc, 0x1a, 0x8c, 0x1b, 0xb4, 0x67, 0x19, 0x76, 0x0d, 0x45, 0x41, 0xa8, 0xa7, 0x33, 0xf3, 0x3b, 0x71, 0x3d, 0x32, 0xc6, 0x0b, 0xfd, 0x35, 0xf1, 0x61, 0x74, 0x83, 0x48, 0x47, 0xe8, 0x81, 0x2c, 0xbd, 0x7f, 0x06, 0xce, 0x72, 0x89, 0xf3, 0x72, 0xc5, 0x82, 0x30, 0xf2, 0xb0, 0x01, 0x45, 0x9b, 0x5d } +, + /* Seed */ + 63, + { 0x49, 0xa7, 0x3d, 0xeb, 0x93, 0xe3, 0xf1, 0xbe, 0xaa, 0xad, 0x3a, 0x19, 0x9a, 0x70, 0x56, 0x9e, 0x09, 0x9a, 0xfa, 0xca, 0xf7, 0xa7, 0x5f, 0xc4, 0xce, 0x64, 0x8f, 0xa8, 0x2e, 0xaf, 0x2a, 0x0f, 0xe4, 0x11, 0xd2, 0x64, 0xfe, 0x45, 0xf7, 0x45, 0x25, 0xc9, 0x1f, 0x3c, 0x75, 0x10, 0x17, 0xf8, 0x0a, 0x02, 0xba, 0xbf, 0xf3, 0x57, 0x99, 0x62, 0x6f, 0x2b, 0x8d, 0xdb, 0x9f, 0x36, 0x91 } +, + /* Encryption */ + 128, + { 0xe5, 0xae, 0xe7, 0x0d, 0xe8, 0x62, 0x72, 0x3c, 0x51, 0x73, 0xdf, 0xfb, 0xf6, 0x92, 0x6c, 0x3d, 0x33, 0x16, 0xd5, 0x90, 0x9c, 0xf5, 0xa1, 0xd6, 0x63, 0xe6, 0x80, 0xab, 0x2b, 0xb5, 0x76, 0xe3, 0x5b, 0x93, 0xfd, 0x43, 0x27, 0x43, 0xa1, 0x8e, 0x8d, 0xb4, 0xfa, 0xa3, 0x32, 0xf4, 0x46, 0x68, 0xa3, 0xd1, 0x9e, 0x5e, 0x69, 0x57, 0x32, 0xf8, 0x4b, 0xbd, 0x86, 0xd0, 0xdd, 0xed, 0x76, 0x65, 0xb7, 0x0b, 0x97, 0x63, 0x2e, 0xab, 0xe2, 0x36, 0x4c, 0xaf, 0xef, 0x7b, 0x74, 0xdc, 0xd1, 0xbf, 0xbd, 0x62, 0x5e, 0x2b, 0xbb, 0xf6, 0x65, 0x4c, 0xc0, 0x26, 0x61, 0x81, 0xac, 0x0a, 0x75, 0x7c, 0x3f, 0xba, 0xbd, 0x43, 0x0a, 0xe8, 0x63, 0x71, 0xeb, 0x56, 0xaf, 0x61, 0x0f, 0x77, 0xcf, 0x2f, 0xff, 0x6e, 0x24, 0x8f, 0x8c, 0x57, 0x91, 0x60, 0xb9, 0x1d, 0xce, 0xcc, 0x0d, 0x20, 0x2b, 0x50 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 4.12", + /* Message */ + 52, + { 0x15, 0x06, 0xeb, 0x34, 0x91, 0x78, 0x5a, 0xa7, 0x21, 0x06, 0xbf, 0x6c, 0x85, 0xd0, 0x10, 0x02, 0x04, 0x6d, 0x1c, 0x16, 0xd4, 0x35, 0xdd, 0x4e, 0x7c, 0x4b, 0x7e, 0x8e, 0x90, 0xdd, 0xdf, 0x16, 0x33, 0x2f, 0x94, 0xf4, 0xb8, 0x35, 0xd0, 0xe4, 0xad, 0x55, 0xd8, 0x3a, 0x81, 0xb3, 0x5c, 0x54, 0xb6, 0x79, 0xd3, 0xcf } +, + /* Seed */ + 73, + { 0xf6, 0x6e, 0x6a, 0x84, 0x75, 0x84, 0x40, 0x86, 0xe2, 0x84, 0x77, 0x22, 0x97, 0x46, 0x80, 0x1d, 0x43, 0x50, 0xd9, 0xad, 0x07, 0x68, 0xf3, 0xc3, 0xd8, 0xfa, 0xa8, 0x10, 0x7d, 0x95, 0xfb, 0x20, 0x5e, 0x4b, 0xa8, 0xc6, 0x4b, 0x73, 0x8e, 0x54, 0xe5, 0xac, 0x0d, 0xfe, 0xab, 0x99, 0x6d, 0x61, 0x12, 0x5c, 0x26, 0x79, 0x80, 0x72, 0x59, 0xbc, 0x9e, 0x47, 0xd8, 0xbd, 0xd2, 0xc0, 0x40, 0x95, 0x05, 0x44, 0x8b, 0xbf, 0x87, 0x2b, 0xf6, 0x64, 0x7a } +, + /* Encryption */ + 128, + { 0xd1, 0xfa, 0x39, 0x52, 0xcc, 0x61, 0x45, 0xff, 0x77, 0x1b, 0x6c, 0x5a, 0x68, 0x27, 0x5b, 0xbc, 0x22, 0xd0, 0x03, 0x92, 0x03, 0x66, 0x17, 0x37, 0x5f, 0x0c, 0x2b, 0xec, 0x3e, 0x28, 0x85, 0x83, 0xec, 0xfd, 0xc6, 0xdf, 0x6a, 0x82, 0x8d, 0xe3, 0x7f, 0x77, 0xc5, 0x56, 0xa8, 0xcb, 0xc4, 0xd4, 0x43, 0x36, 0xe8, 0xd2, 0xe3, 0x05, 0x87, 0xe3, 0x31, 0x58, 0x73, 0x17, 0xe9, 0x7b, 0x05, 0xa3, 0xfd, 0x78, 0x02, 0x5b, 0x2d, 0x49, 0x6b, 0x3b, 0xbe, 0xeb, 0x6c, 0x72, 0x5d, 0x9e, 0xa5, 0x61, 0xa7, 0x32, 0x28, 0x82, 0x33, 0xd6, 0x8b, 0x79, 0x49, 0x7f, 0xb0, 0xb6, 0xfe, 0xe0, 0xa6, 0xb6, 0x8a, 0xc3, 0x13, 0x66, 0x1b, 0x4b, 0x65, 0x47, 0x39, 0xf9, 0x18, 0xf6, 0xfd, 0x3b, 0xff, 0xc1, 0x7c, 0x1d, 0xf4, 0x1f, 0x01, 0x44, 0x95, 0xd5, 0x5f, 0x95, 0x90, 0x14, 0x7b, 0x82, 0xd1, 0x5d } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 4.13", + /* Message */ + 2, + { 0x9e, 0x3e } +, + /* Seed */ + 123, + { 0x9b, 0x3d, 0xdf, 0x17, 0xcd, 0x74, 0xe7, 0x6c, 0x69, 0xb5, 0xca, 0x3a, 0x01, 0x0a, 0x0e, 0x0f, 0xbd, 0x17, 0x05, 0xd6, 0x9c, 0x30, 0x74, 0x35, 0x3b, 0xe7, 0xd3, 0xc0, 0xc2, 0x05, 0xf0, 0x99, 0xc7, 0xa8, 0x10, 0xb7, 0xa1, 0xad, 0xe0, 0x9f, 0x5a, 0x03, 0x6b, 0xb7, 0x69, 0xef, 0xf5, 0x3a, 0x53, 0xd4, 0xc6, 0xf8, 0x71, 0x52, 0x92, 0x2d, 0x9a, 0x7b, 0x86, 0xed, 0xeb, 0xa3, 0x72, 0x37, 0xd7, 0xf1, 0x73, 0x4d, 0x9d, 0x97, 0x39, 0x38, 0x3f, 0x48, 0x80, 0xaf, 0x3a, 0xd6, 0x88, 0x87, 0xe0, 0xfe, 0x7c, 0x87, 0xa1, 0x74, 0xfb, 0x32, 0x38, 0xb1, 0xe5, 0x1e, 0xad, 0x2a, 0x84, 0x34, 0x40, 0xc2, 0xb2, 0x7f, 0x22, 0xdd, 0xa4, 0x22, 0x8d, 0xce, 0x70, 0xf9, 0x1c, 0x98, 0xd4, 0x71, 0xa8, 0x74, 0x4d, 0x27, 0x65, 0x55, 0x79, 0x58, 0x81, 0x02, 0x44 } +, + /* Encryption */ + 128, + { 0x42, 0x12, 0x6b, 0x49, 0x2a, 0x1e, 0x7c, 0xc0, 0x33, 0x95, 0xb2, 0xac, 0x70, 0x33, 0xcf, 0x6a, 0x67, 0x36, 0xb1, 0x2e, 0x76, 0x82, 0x5a, 0x17, 0x3b, 0x9e, 0x01, 0x1a, 0xe8, 0xbf, 0xed, 0x44, 0xfe, 0xcb, 0x8d, 0x9f, 0x58, 0xcc, 0xe1, 0x99, 0x11, 0xfe, 0x42, 0xd4, 0x55, 0xe2, 0x49, 0x20, 0x09, 0x32, 0xa9, 0xb6, 0x8f, 0xe2, 0xe4, 0x19, 0xbc, 0x63, 0x9c, 0x11, 0x78, 0xd1, 0x1f, 0xfb, 0xdb, 0xd9, 0x95, 0x5d, 0x45, 0x9f, 0x5e, 0xcf, 0xe0, 0x90, 0x20, 0x09, 0x8e, 0x29, 0x7b, 0x8e, 0x91, 0x48, 0x5e, 0x94, 0xbf, 0x11, 0xe7, 0xbf, 0x77, 0xed, 0xf5, 0xa2, 0x70, 0x11, 0xc8, 0x2b, 0x92, 0x73, 0x65, 0xa1, 0x2c, 0x9c, 0x77, 0xc7, 0xe4, 0x9b, 0xb7, 0xfe, 0x2f, 0x61, 0x33, 0x39, 0xde, 0x3f, 0x51, 0x20, 0x87, 0x79, 0x53, 0x86, 0xca, 0x58, 0x5a, 0x70, 0x24, 0x78, 0x27, 0x90 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 4.14", + /* Message */ + 28, + { 0x70, 0xaa, 0x78, 0xa4, 0xd3, 0x7f, 0x74, 0xc1, 0x81, 0xaa, 0x27, 0x40, 0x7f, 0x2f, 0x9f, 0xe6, 0x63, 0xa9, 0x1b, 0x16, 0xbe, 0x9b, 0xea, 0x6f, 0xc6, 0x12, 0x88, 0x7f } +, + /* Seed */ + 97, + { 0xd0, 0xfd, 0x16, 0xc0, 0xf0, 0xd7, 0x90, 0x9a, 0x38, 0x86, 0x17, 0x08, 0x11, 0xe4, 0x4f, 0x24, 0xfa, 0xdf, 0x94, 0xff, 0x17, 0x03, 0x9a, 0x56, 0x84, 0xa0, 0x9b, 0x24, 0xe1, 0x93, 0x3f, 0xa0, 0xc4, 0x71, 0x51, 0x63, 0x5d, 0x75, 0x7b, 0x73, 0xc2, 0x3f, 0xf3, 0x91, 0x01, 0xcb, 0xe2, 0x52, 0x9a, 0x63, 0xa7, 0xf3, 0xa0, 0x19, 0x5b, 0x6e, 0x47, 0x51, 0x07, 0x11, 0xde, 0x17, 0x1a, 0x16, 0x56, 0xc9, 0xea, 0xb3, 0xcf, 0x82, 0xd1, 0xc6, 0x52, 0x26, 0xb5, 0x8f, 0xd0, 0xfe, 0x58, 0xec, 0x31, 0x96, 0x24, 0x7f, 0x34, 0xb1, 0xa0, 0x55, 0x27, 0x02, 0xdc, 0x03, 0x75, 0x12, 0xc6, 0x81, 0x04 } +, + /* Encryption */ + 128, + { 0x95, 0x36, 0xd4, 0x7e, 0x1d, 0x68, 0x7f, 0x1f, 0x24, 0x99, 0x6c, 0xb4, 0x6c, 0xe9, 0x46, 0xae, 0x54, 0xd4, 0xa1, 0x49, 0xb3, 0x4b, 0x5b, 0xc3, 0x44, 0x43, 0xa2, 0x01, 0x51, 0x83, 0x87, 0xf4, 0xb6, 0x38, 0x18, 0x37, 0xcb, 0x7e, 0x4b, 0x0a, 0x44, 0x75, 0x13, 0x70, 0x42, 0xf1, 0x44, 0x8c, 0x1e, 0xa4, 0x15, 0x15, 0xef, 0x31, 0xc2, 0xfc, 0xbf, 0x62, 0xe7, 0xe9, 0x58, 0x67, 0xb6, 0x74, 0xac, 0x23, 0x0a, 0xed, 0x9c, 0x7d, 0x8d, 0x61, 0xc5, 0x27, 0x52, 0xb2, 0xfc, 0x2a, 0x0b, 0xba, 0xfc, 0x77, 0xb3, 0x1c, 0x51, 0x49, 0x30, 0xde, 0x98, 0x23, 0xb4, 0x38, 0xb6, 0xfa, 0xaa, 0x40, 0xd2, 0x55, 0x31, 0x03, 0x3c, 0x66, 0x48, 0x3f, 0xa0, 0x02, 0x3a, 0xf2, 0x1d, 0xa6, 0x4f, 0xcc, 0x8b, 0xb8, 0xc5, 0xd5, 0x2d, 0x3f, 0x6c, 0x43, 0x80, 0xf1, 0xd6, 0x08, 0xd8, 0xc0, 0x11, 0x8f } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 4.15", + /* Message */ + 59, + { 0x01, 0x16, 0xa4, 0x61, 0x77, 0x73, 0xb6, 0xdd, 0xb2, 0x19, 0x16, 0x1c, 0x4f, 0xd0, 0x71, 0x93, 0x7b, 0xbb, 0x07, 0x15, 0xcc, 0x62, 0x7c, 0x17, 0xb8, 0xe7, 0x52, 0x80, 0xd9, 0x9c, 0xdd, 0x41, 0x6e, 0xa5, 0xcd, 0xfa, 0x09, 0x06, 0xb9, 0xaf, 0x0a, 0x20, 0xcd, 0x47, 0x7f, 0xdc, 0xad, 0x14, 0x15, 0xa1, 0x9a, 0x9d, 0x1b, 0x96, 0xfd, 0xc3, 0xc0, 0xed, 0xb9 } +, + /* Seed */ + 66, + { 0x86, 0xb1, 0x58, 0x60, 0x9b, 0xfa, 0x08, 0xa8, 0xed, 0xe4, 0xef, 0x3f, 0x23, 0xe1, 0x2e, 0xb5, 0x0d, 0x24, 0x55, 0x74, 0x26, 0x4d, 0x76, 0x4d, 0x87, 0x12, 0x67, 0xdb, 0x8a, 0x95, 0x24, 0xea, 0x3f, 0xa2, 0xe3, 0x84, 0x5f, 0xfc, 0x29, 0x1b, 0xda, 0x98, 0x99, 0x89, 0xbf, 0x71, 0x5a, 0xa2, 0xb0, 0x8c, 0x49, 0x79, 0x8a, 0x81, 0x9f, 0x68, 0x58, 0xd9, 0xfa, 0x35, 0xf9, 0x4d, 0xf3, 0xc7, 0xe0, 0x86 } +, + /* Encryption */ + 128, + { 0x74, 0xa3, 0xdf, 0x38, 0x5d, 0x20, 0x87, 0x7b, 0xca, 0x9d, 0xbc, 0xeb, 0xca, 0x2e, 0x53, 0x2c, 0x6a, 0xbe, 0x95, 0x62, 0xd6, 0x81, 0x7b, 0xe1, 0x6e, 0x11, 0x8a, 0x60, 0xf4, 0xab, 0x0a, 0x1a, 0xc0, 0xa8, 0x46, 0x66, 0x53, 0xa8, 0xf8, 0x17, 0x0e, 0x35, 0xfc, 0xe1, 0x4b, 0x44, 0x9c, 0xd5, 0x9f, 0x55, 0x8e, 0x02, 0x0a, 0x89, 0x88, 0x94, 0xbd, 0x2a, 0x71, 0x75, 0x58, 0xe6, 0x65, 0x0f, 0x3a, 0x12, 0x85, 0x70, 0xd8, 0xc1, 0x69, 0xa7, 0x74, 0x66, 0x63, 0xc1, 0xd7, 0xef, 0x62, 0x14, 0x5f, 0x4b, 0x75, 0xc5, 0xfe, 0xb6, 0x38, 0x6f, 0xdb, 0x85, 0x33, 0x94, 0xc6, 0x59, 0xa9, 0x1a, 0xa2, 0xaa, 0xe0, 0x3b, 0xef, 0x91, 0x13, 0xdd, 0x49, 0x28, 0xff, 0x28, 0xb3, 0x80, 0x92, 0x7a, 0xd1, 0xba, 0x4e, 0x8a, 0x37, 0xed, 0xd1, 0x72, 0xef, 0xe8, 0xe9, 0xea, 0xbb, 0x61, 0x4d, 0x83 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 4.16", + /* Message */ + 63, + { 0x15, 0xc5, 0xfc, 0xc7, 0x54, 0x7d, 0x63, 0x76, 0x1f, 0x6a, 0xf1, 0xf2, 0x6e, 0xed, 0x9b, 0xe8, 0x13, 0x4f, 0x9f, 0x92, 0x12, 0x7e, 0x76, 0xb0, 0x3a, 0x33, 0xa9, 0x7b, 0x9b, 0xe3, 0xf7, 0x8b, 0x2e, 0x22, 0xfc, 0x7c, 0x85, 0x06, 0x99, 0xa1, 0x5c, 0x0e, 0x0e, 0xce, 0xbe, 0x2a, 0x71, 0x80, 0x5f, 0x02, 0x4b, 0x93, 0x88, 0xa3, 0xbd, 0xb2, 0xb3, 0x60, 0xd6, 0x9c, 0x5c, 0x0c, 0x46 } +, + /* Seed */ + 62, + { 0x5b, 0x4f, 0x17, 0xa9, 0xde, 0x91, 0x73, 0x7a, 0x7f, 0xe8, 0x54, 0xe8, 0xa1, 0x76, 0xbe, 0x5a, 0x0a, 0x16, 0xfc, 0x10, 0x42, 0xcb, 0x87, 0x0c, 0xc0, 0x18, 0x92, 0xfc, 0xd3, 0x8e, 0xa7, 0x5b, 0x07, 0x3c, 0x0f, 0xfa, 0x01, 0x4f, 0x96, 0xa3, 0x58, 0xe3, 0xaa, 0x5e, 0x73, 0xea, 0xf8, 0xa9, 0x1f, 0xce, 0x75, 0x47, 0x0b, 0xde, 0x64, 0xe8, 0x7a, 0xb8, 0x91, 0xba, 0x3b, 0xf2 } +, + /* Encryption */ + 128, + { 0x73, 0x62, 0xd7, 0x39, 0x8d, 0x0c, 0x25, 0x1f, 0x83, 0x58, 0x17, 0xe4, 0x79, 0x37, 0xa9, 0x25, 0x58, 0x36, 0xca, 0x02, 0x30, 0x45, 0x7f, 0xf6, 0x08, 0xb0, 0x78, 0xd5, 0x09, 0x31, 0xa8, 0x80, 0x33, 0xea, 0x76, 0x50, 0x81, 0x12, 0x65, 0xf8, 0xe2, 0x68, 0xb5, 0x33, 0x15, 0xd8, 0x43, 0x8e, 0x52, 0xa6, 0xa4, 0xb1, 0xb3, 0x89, 0x5d, 0x30, 0xc3, 0xda, 0xe1, 0x1a, 0x3b, 0x8e, 0xa8, 0xc3, 0x0f, 0x05, 0xe9, 0xd7, 0x1d, 0xef, 0x46, 0xd4, 0x51, 0x11, 0x92, 0xa1, 0x0f, 0x54, 0x21, 0x8d, 0x39, 0x36, 0xcb, 0x17, 0x98, 0x3a, 0x1e, 0x7a, 0xff, 0x18, 0x18, 0x89, 0x39, 0xb9, 0x46, 0x92, 0x76, 0x49, 0xb0, 0xfc, 0x4f, 0x7b, 0xbf, 0xcb, 0xfc, 0x14, 0xe1, 0xc0, 0xec, 0xa0, 0x7d, 0x00, 0xc9, 0x03, 0xdb, 0x78, 0x16, 0x9c, 0x50, 0xef, 0x0a, 0x38, 0xf1, 0xda, 0x19, 0xae, 0x44, 0x59 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 4.17", + /* Message */ + 29, + { 0x7c, 0xad, 0x18, 0xf1, 0x75, 0x13, 0x87, 0x42, 0x28, 0x5e, 0x90, 0x35, 0xd1, 0x3a, 0xd4, 0x1f, 0xc3, 0xa8, 0x52, 0x10, 0xe1, 0x54, 0x4e, 0x24, 0xde, 0xa3, 0xfc, 0xfe, 0x66 } +, + /* Seed */ + 96, + { 0x9a, 0x06, 0xca, 0x10, 0xfc, 0xc6, 0x61, 0x0e, 0x77, 0xdf, 0xf9, 0x0d, 0xd1, 0x76, 0xf8, 0x2e, 0x3f, 0x96, 0xe4, 0xa9, 0xd7, 0xab, 0x87, 0x2c, 0x74, 0x8e, 0xd4, 0x22, 0xf3, 0x4b, 0x33, 0x48, 0x61, 0x94, 0x40, 0xf0, 0xaa, 0xa2, 0x2a, 0x66, 0x98, 0x51, 0xda, 0xc8, 0x89, 0x4a, 0x8e, 0xfa, 0x34, 0xea, 0x2c, 0x2d, 0xa5, 0xe9, 0x58, 0x69, 0xe0, 0xad, 0xc0, 0x05, 0xa4, 0x9b, 0xa4, 0x58, 0x18, 0xca, 0xa4, 0x74, 0x11, 0x5c, 0x34, 0x49, 0x96, 0x6a, 0x85, 0xc4, 0x18, 0xfc, 0xaa, 0x8f, 0x45, 0x63, 0x0e, 0xfe, 0x0b, 0x1b, 0x4d, 0x3d, 0x69, 0xbe, 0x1b, 0xc0, 0x06, 0x8a, 0xa7, 0x99 } +, + /* Encryption */ + 128, + { 0x1e, 0xfa, 0xd4, 0x14, 0x46, 0xb9, 0x1f, 0xda, 0xdd, 0x8b, 0x80, 0x61, 0x9f, 0x68, 0x27, 0x36, 0x68, 0xb7, 0x58, 0x5f, 0xd9, 0x1f, 0x34, 0x49, 0xec, 0x85, 0xc2, 0x42, 0xd0, 0x84, 0x9e, 0x4a, 0x53, 0xa5, 0x97, 0x7b, 0x61, 0xaa, 0x40, 0xd1, 0x2c, 0xc4, 0x85, 0xec, 0x7e, 0x4f, 0xf2, 0x0f, 0x98, 0x86, 0x91, 0xcb, 0x9d, 0x73, 0xaf, 0x46, 0xea, 0x37, 0x6a, 0xfc, 0x69, 0xba, 0x22, 0x33, 0x86, 0xe9, 0xf1, 0x5d, 0x03, 0x26, 0x97, 0xda, 0x75, 0xe2, 0xf9, 0x52, 0xbe, 0x2a, 0xf0, 0x62, 0xe8, 0x24, 0x6c, 0xf7, 0x49, 0xb8, 0x9c, 0x4c, 0xbc, 0xd6, 0x4e, 0x23, 0xf8, 0x82, 0xbb, 0x55, 0x3c, 0x3c, 0xe3, 0x05, 0x20, 0x36, 0x22, 0xb5, 0xa7, 0x39, 0x77, 0x35, 0xa6, 0x34, 0xaa, 0xb0, 0xd1, 0x7e, 0xf9, 0xb5, 0x55, 0x9d, 0xdd, 0x34, 0xf4, 0x87, 0x2b, 0x56, 0xe7, 0x98, 0x6e, 0xfc } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 4.18", + /* Message */ + 18, + { 0xfd, 0x98, 0xc3, 0x8b, 0xe3, 0x19, 0x30, 0x70, 0xb5, 0xc4, 0x33, 0x4b, 0x11, 0xc2, 0x5b, 0x33, 0x4a, 0x44 } +, + /* Seed */ + 107, + { 0xf3, 0x57, 0x91, 0x11, 0x03, 0xe9, 0x87, 0xd1, 0xa9, 0xf1, 0x5c, 0xc2, 0xe5, 0x2f, 0x42, 0x39, 0x0e, 0x0f, 0xaa, 0x50, 0x02, 0xc4, 0xf1, 0x7d, 0x40, 0xa4, 0xaf, 0x50, 0xf3, 0x1a, 0x23, 0x17, 0x50, 0xe7, 0xaf, 0x61, 0xd9, 0xaf, 0xdf, 0x9c, 0xaa, 0x38, 0x61, 0xa2, 0x0d, 0xc7, 0x21, 0x89, 0x58, 0x61, 0xfb, 0x11, 0x8e, 0x08, 0x8d, 0x32, 0x18, 0xe6, 0xfb, 0x35, 0x56, 0xb1, 0x62, 0xd6, 0xbd, 0x67, 0x91, 0x1d, 0xbc, 0x94, 0x21, 0x98, 0x42, 0x65, 0x82, 0x72, 0xa5, 0xd4, 0x9b, 0xf5, 0xab, 0xb4, 0xa0, 0x87, 0x94, 0x95, 0xc5, 0xe6, 0xe6, 0x86, 0x28, 0x59, 0x29, 0xa5, 0x5a, 0x36, 0x8f, 0x52, 0x4c, 0x14, 0xa4, 0x0b, 0x0c, 0x61, 0x38, 0x0d, 0x0e } +, + /* Encryption */ + 128, + { 0xde, 0xae, 0x18, 0x3b, 0x56, 0xc3, 0xfb, 0x38, 0x41, 0xea, 0x57, 0x42, 0x34, 0xac, 0xd3, 0x0a, 0xff, 0x00, 0xd0, 0x05, 0x1f, 0x57, 0x80, 0x37, 0x58, 0xa4, 0x71, 0x4a, 0xbc, 0xbe, 0xdc, 0xda, 0x8b, 0xd1, 0xa4, 0x8a, 0x98, 0x01, 0x53, 0xdf, 0x89, 0x6b, 0x13, 0x76, 0xaa, 0x4b, 0x45, 0x95, 0x80, 0x13, 0xd6, 0x19, 0xbe, 0x7e, 0xaf, 0xf6, 0xc1, 0xa6, 0x75, 0xe2, 0x92, 0xef, 0xc3, 0xf4, 0x39, 0x3d, 0xdb, 0xde, 0xab, 0x47, 0xe8, 0x90, 0xa7, 0x8c, 0xef, 0x69, 0x00, 0x24, 0x49, 0x57, 0x87, 0x48, 0x90, 0x6c, 0x10, 0x21, 0xb8, 0x91, 0xb9, 0x43, 0xd8, 0x18, 0xd3, 0xa6, 0x1e, 0x67, 0xa3, 0x15, 0x61, 0x2d, 0x4c, 0xb1, 0xcf, 0x19, 0x7c, 0xe5, 0xdf, 0xab, 0xef, 0xda, 0xeb, 0x59, 0x0b, 0x8e, 0x8c, 0x73, 0x68, 0x5e, 0x74, 0x7e, 0x59, 0xa3, 0x95, 0xc8, 0x45, 0xc5, 0xd0, 0xc3 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 4.19", + /* Message */ + 54, + { 0x96, 0x53, 0xd7, 0x94, 0x69, 0xf0, 0x5d, 0x40, 0x19, 0x65, 0xa9, 0x5c, 0xe8, 0x74, 0xfa, 0x22, 0x5e, 0xc4, 0x79, 0x74, 0xe8, 0xd0, 0x68, 0x41, 0xc1, 0x3b, 0x47, 0x85, 0xe0, 0x0d, 0x54, 0x7f, 0x9d, 0x31, 0x44, 0xc3, 0x87, 0x9e, 0x6c, 0xcd, 0xaf, 0x78, 0x7a, 0xef, 0xc2, 0xf8, 0x45, 0x2a, 0x4a, 0x3c, 0x88, 0x4e, 0x38, 0xee } +, + /* Seed */ + 71, + { 0x85, 0x5d, 0x6d, 0x15, 0x12, 0xe5, 0x43, 0xa4, 0x5d, 0x3a, 0x9a, 0xa9, 0x68, 0x5d, 0x5d, 0xfd, 0xa7, 0x04, 0x79, 0xba, 0x39, 0x52, 0x63, 0x64, 0x14, 0x1b, 0xb6, 0x36, 0x27, 0x45, 0x89, 0x85, 0x71, 0x20, 0x01, 0x22, 0xf4, 0xbc, 0x82, 0xc6, 0x22, 0x43, 0x45, 0xc6, 0x9d, 0x3e, 0xf5, 0x42, 0xf1, 0x23, 0xbd, 0xe3, 0x01, 0x5b, 0x60, 0xc4, 0xc0, 0xff, 0xb9, 0x8d, 0x63, 0x01, 0x31, 0xae, 0xe8, 0x1f, 0xe4, 0xa0, 0xb0, 0x15, 0x38 } +, + /* Encryption */ + 128, + { 0x69, 0xca, 0x62, 0xe2, 0x9a, 0x5b, 0xdb, 0x4b, 0x04, 0xe2, 0x40, 0x16, 0x21, 0x2c, 0x25, 0x91, 0x40, 0xa6, 0x0c, 0xfa, 0x81, 0xeb, 0x66, 0x93, 0xbf, 0xfa, 0xfc, 0x9f, 0x60, 0x0d, 0xce, 0x10, 0x82, 0x2a, 0x00, 0x7b, 0x6a, 0xde, 0x93, 0xfa, 0xcd, 0xa1, 0xb2, 0xb1, 0x65, 0xb5, 0x57, 0x76, 0x0f, 0x0a, 0x67, 0x5a, 0xc9, 0xbc, 0xb2, 0x06, 0xb9, 0x64, 0xfb, 0x90, 0xcf, 0x6a, 0x2c, 0xf9, 0x9f, 0x18, 0x6b, 0x36, 0xd2, 0xeb, 0x99, 0x1d, 0x82, 0x53, 0xa0, 0x75, 0x4f, 0x9c, 0xc2, 0xd7, 0x2d, 0xe5, 0x49, 0xab, 0xae, 0x90, 0x94, 0xf5, 0xa8, 0x6c, 0xe1, 0xdb, 0x49, 0x4d, 0xbb, 0x6e, 0x51, 0x62, 0x86, 0x71, 0x5b, 0x3d, 0xd4, 0x05, 0x59, 0xb3, 0x10, 0x7b, 0x95, 0x24, 0xb7, 0x29, 0xac, 0x65, 0x4c, 0xfb, 0x40, 0xf9, 0xab, 0x35, 0xd0, 0x34, 0xe0, 0x27, 0x19, 0x7c, 0xbc, 0x36 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 4.20", + /* Message */ + 41, + { 0x0b, 0xdf, 0x3f, 0xce, 0x8e, 0x48, 0x7d, 0xb2, 0x2d, 0x07, 0x60, 0xab, 0x71, 0x15, 0x86, 0xca, 0x8e, 0x45, 0x9c, 0x39, 0x4f, 0xf8, 0xb1, 0xa1, 0x86, 0x70, 0x67, 0xa9, 0x31, 0x51, 0x99, 0xa8, 0x01, 0x24, 0x74, 0xb0, 0xf9, 0x0d, 0xcc, 0x87, 0xcb } +, + /* Seed */ + 84, + { 0xc9, 0xb7, 0x8d, 0xce, 0x9d, 0xfd, 0x7f, 0x04, 0x04, 0xff, 0x98, 0x2e, 0x06, 0xb5, 0x96, 0x50, 0xba, 0xfe, 0x31, 0xea, 0x19, 0xbc, 0x1f, 0x2e, 0x1f, 0x39, 0x89, 0xf4, 0xce, 0xfc, 0xe4, 0x6f, 0xc6, 0x52, 0x42, 0x3d, 0xb3, 0xc9, 0x9d, 0x92, 0xa8, 0xfb, 0x58, 0xf3, 0xee, 0x39, 0x3d, 0x55, 0x5b, 0x76, 0x84, 0x88, 0x9a, 0x4b, 0xf8, 0x15, 0xa1, 0x3e, 0x3b, 0x9b, 0xf2, 0x43, 0x71, 0x40, 0x66, 0xb9, 0x07, 0x58, 0x90, 0x67, 0x50, 0x47, 0xf1, 0x7e, 0x93, 0x5b, 0xdc, 0xf0, 0xe6, 0x6f, 0xcf, 0xe3, 0x9b, 0xcf } +, + /* Encryption */ + 128, + { 0x43, 0xad, 0x3e, 0x62, 0x5f, 0xb1, 0x72, 0x15, 0x57, 0x8b, 0xef, 0x2f, 0x46, 0x5f, 0xaa, 0x72, 0xae, 0x69, 0x43, 0x83, 0x36, 0x9f, 0xf7, 0xaa, 0x15, 0x12, 0x01, 0xa3, 0xf2, 0x59, 0xc8, 0xd8, 0xce, 0x8c, 0x16, 0xbd, 0x25, 0x52, 0x21, 0x49, 0xf6, 0x66, 0xe8, 0xd6, 0x92, 0xa0, 0x79, 0x5e, 0xa7, 0x15, 0x69, 0xd2, 0x88, 0x1f, 0x97, 0x07, 0x08, 0x5d, 0x3f, 0x59, 0xbd, 0xfa, 0x28, 0x73, 0x66, 0xd7, 0xf5, 0xa3, 0xf7, 0x6e, 0xa5, 0xdc, 0x10, 0x9f, 0xcb, 0x03, 0x30, 0x2d, 0xa0, 0xb7, 0x86, 0x99, 0x71, 0x3e, 0x0d, 0x30, 0x09, 0x58, 0x4f, 0x97, 0x17, 0x6c, 0x1b, 0x9b, 0xa6, 0x3e, 0x80, 0xcf, 0xa8, 0xfd, 0x4c, 0x01, 0x3d, 0x74, 0xb5, 0xfa, 0xde, 0x84, 0x72, 0xd5, 0x2c, 0x11, 0xe2, 0xe9, 0x36, 0x81, 0xba, 0x19, 0xd3, 0x53, 0xd3, 0x1c, 0xe6, 0xfa, 0x3c, 0x0a, 0xb6, 0x0d } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 5: A 1024-bit RSA key pair", +{ + /* Modulus */ + 128, + { 0xab, 0x29, 0xd4, 0x9c, 0xdc, 0x92, 0x5c, 0x69, 0xca, 0xe7, 0x52, 0x92, 0xfc, 0x03, 0x62, 0x03, 0x73, 0xc6, 0xfb, 0x36, 0xd3, 0xc2, 0x49, 0xdd, 0x5b, 0xb5, 0x0f, 0x88, 0x1a, 0x4c, 0x93, 0x89, 0xaf, 0xe7, 0x3e, 0x8c, 0x56, 0xb8, 0xd6, 0x67, 0xa5, 0xea, 0xf2, 0xb5, 0x71, 0x4a, 0xda, 0xf4, 0xca, 0xa0, 0x06, 0xa4, 0x9a, 0xc4, 0xbd, 0x4b, 0x91, 0xd5, 0x45, 0xcf, 0x3c, 0x10, 0x00, 0x9d, 0x31, 0x8a, 0x9d, 0xe0, 0xf3, 0xbb, 0xd8, 0x38, 0x4e, 0x8c, 0x7e, 0x96, 0xca, 0x15, 0x95, 0xe3, 0x2a, 0x70, 0x41, 0xd1, 0x68, 0xca, 0xa7, 0x34, 0x43, 0xb8, 0x85, 0xbf, 0x7f, 0x61, 0x4a, 0xe1, 0x21, 0x2e, 0x3b, 0x5a, 0xdd, 0xa2, 0x9d, 0xfa, 0xd5, 0x01, 0xb8, 0xb1, 0xa8, 0x1c, 0x3f, 0x48, 0xa4, 0x56, 0xe1, 0x33, 0xad, 0x52, 0xda, 0x2a, 0xbc, 0xe5, 0xd6, 0xe7, 0x82, 0xf2, 0x75, 0xc9 } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 128, + { 0x07, 0x7b, 0xb2, 0x73, 0x32, 0x34, 0x86, 0xec, 0x4c, 0x25, 0xed, 0x67, 0x06, 0x34, 0x1a, 0xa8, 0xa6, 0x7a, 0xec, 0x58, 0x43, 0x0d, 0x53, 0x3f, 0xe5, 0x86, 0xc6, 0xb9, 0x4f, 0x57, 0x0a, 0x3b, 0x42, 0x90, 0xc4, 0x5c, 0x0b, 0xdd, 0x94, 0x68, 0x1f, 0x29, 0xa4, 0xb7, 0x58, 0x8e, 0xea, 0x80, 0x39, 0xcc, 0xa1, 0xc5, 0xb8, 0x0b, 0x82, 0x70, 0x27, 0x9d, 0xd0, 0xa9, 0xc5, 0x09, 0x39, 0x11, 0x93, 0xe3, 0x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0x50, 0x6b, 0xad, 0x19, 0x33, 0x09, 0x72, 0xd2, 0x1c, 0xac, 0x19, 0xce, 0x99, 0x6d } +, + /* Prime exponent 1 */ + 64, + { 0xe8, 0xa6, 0x0d, 0x88, 0x39, 0x54, 0x09, 0x73, 0xa2, 0xdd, 0x4a, 0x3b, 0xd1, 0x48, 0x05, 0x1d, 0xf8, 0xd1, 0x0e, 0x82, 0x87, 0xab, 0xb5, 0x45, 0xb0, 0x0c, 0x29, 0xec, 0x90, 0x7e, 0xfe, 0x16, 0x9f, 0x39, 0xbc, 0x02, 0x2d, 0x56, 0x97, 0x5a, 0xfd, 0x5c, 0xff, 0x82, 0x7e, 0x83, 0xda, 0x86, 0x7e, 0xd7, 0xce, 0x6f, 0xc6, 0xc8, 0xa2, 0xb7, 0xe4, 0xe0, 0x35, 0x75, 0x19, 0xeb, 0x49, 0x61 } +, + /* Prime exponent 2 */ + 64, + { 0x8f, 0xf2, 0xe2, 0x27, 0x37, 0x35, 0xc5, 0x5f, 0x05, 0x56, 0x6a, 0xe7, 0x5f, 0x29, 0xa9, 0xc9, 0x33, 0xa6, 0x2d, 0xef, 0xd7, 0xe2, 0x20, 0x01, 0x7f, 0x05, 0x45, 0xfc, 0xe9, 0x07, 0xe0, 0x65, 0xc4, 0x9f, 0x7b, 0xac, 0x34, 0x84, 0xc6, 0xf0, 0x60, 0x49, 0x99, 0x43, 0x32, 0x07, 0xc9, 0x13, 0xe8, 0x0b, 0xc0, 0x1b, 0xf7, 0x8d, 0x83, 0xef, 0xaf, 0x00, 0xda, 0x17, 0x12, 0xa4, 0xa6, 0x35 } +, + /* Coefficient */ + 64, + { 0x5f, 0x1f, 0xf9, 0x6a, 0x8a, 0x90, 0x19, 0x78, 0x4f, 0x92, 0x26, 0xe2, 0x5c, 0x9b, 0xfe, 0x25, 0x08, 0x02, 0x39, 0x43, 0x73, 0x90, 0x25, 0xdd, 0x6b, 0xab, 0x03, 0x7f, 0xf4, 0x7d, 0xc6, 0x42, 0x49, 0x85, 0x15, 0xc2, 0xf9, 0xe6, 0xff, 0x60, 0x60, 0xc5, 0xb7, 0xd2, 0x34, 0x30, 0xd8, 0xd5, 0x0f, 0x1c, 0x0f, 0x6d, 0x50, 0xc1, 0x80, 0xb4, 0xae, 0xa8, 0xa4, 0xa8, 0x2f, 0xcd, 0x2b, 0x74 } + +} +, +{{ + "PKCS#1 v1.5 Encryption Example 5.1", + /* Message */ + 53, + { 0x5d, 0xc9, 0xf8, 0xb1, 0x2d, 0xc8, 0x12, 0xa0, 0x9a, 0xa4, 0xb0, 0x6d, 0xfc, 0xb5, 0x7e, 0x1d, 0x2e, 0x8d, 0x1c, 0x7d, 0x2c, 0x07, 0x6b, 0x25, 0xd5, 0xc1, 0x8e, 0xdb, 0xc0, 0x46, 0xbd, 0x63, 0xc7, 0xca, 0x4a, 0x59, 0x9f, 0x18, 0xde, 0x26, 0xf3, 0xbe, 0x73, 0x8c, 0xc2, 0x8d, 0x16, 0x67, 0x2c, 0x00, 0x6e, 0x4d, 0x9c } +, + /* Seed */ + 72, + { 0x43, 0xd6, 0x05, 0xa5, 0x74, 0x0a, 0x97, 0x0b, 0x32, 0x37, 0x27, 0xaf, 0x35, 0x2a, 0x1b, 0xd4, 0x8d, 0xe6, 0x9d, 0x95, 0x05, 0xe2, 0x2c, 0x2f, 0xad, 0x03, 0x0c, 0x3b, 0x84, 0xb6, 0xde, 0xa2, 0xd2, 0x2f, 0x91, 0x64, 0x06, 0xa7, 0x69, 0x3c, 0xf5, 0x06, 0xc2, 0xd2, 0x51, 0x88, 0x6f, 0x02, 0x20, 0x3e, 0x3f, 0x76, 0x55, 0xa3, 0x0a, 0x68, 0x37, 0xaf, 0x8a, 0x8c, 0xbe, 0xc7, 0xb5, 0xc9, 0x2f, 0xc0, 0x4c, 0x8c, 0x18, 0xdf, 0xe9, 0xd3 } +, + /* Encryption */ + 128, + { 0x21, 0x5a, 0x35, 0xf4, 0xc0, 0x43, 0x5b, 0x07, 0xed, 0x5d, 0x2c, 0x4b, 0x68, 0x65, 0xbc, 0x28, 0x1c, 0xea, 0x70, 0x50, 0xcf, 0xea, 0x7a, 0x7e, 0x86, 0xe0, 0x3f, 0x8a, 0xcb, 0x28, 0xb5, 0x8d, 0xbe, 0xe6, 0x54, 0x58, 0x91, 0x9c, 0xea, 0xa5, 0xa3, 0x3e, 0xdd, 0x98, 0x20, 0x1e, 0xa6, 0xe7, 0x63, 0x2d, 0x76, 0x22, 0xd5, 0xa5, 0x1d, 0x35, 0xa3, 0x5f, 0xed, 0xe8, 0x6e, 0xf2, 0x03, 0xee, 0xf6, 0xeb, 0x34, 0x75, 0xec, 0x8f, 0x19, 0xe6, 0x9c, 0x0e, 0xd5, 0x2c, 0x05, 0xdd, 0x7d, 0x59, 0xe3, 0x53, 0xf5, 0x2b, 0x67, 0x10, 0xaf, 0x40, 0x26, 0x65, 0x55, 0x04, 0x10, 0x7d, 0xdb, 0x86, 0xf9, 0x57, 0xe6, 0xc0, 0x6b, 0xa6, 0x7b, 0x1f, 0x4f, 0xc9, 0xf1, 0x21, 0xe1, 0x5f, 0x82, 0x73, 0x67, 0x09, 0xd2, 0xde, 0x8d, 0x77, 0x43, 0x2d, 0xf0, 0x8d, 0xcc, 0xd2, 0xa0, 0xcc, 0x77, 0x04 } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Encryption Example 5.2", + /* Message */ + 16, + { 0xd7, 0x74, 0x07, 0xd8, 0xf6, 0x9f, 0x80, 0xdc, 0x08, 0xeb, 0xa5, 0xf4, 0x26, 0x28, 0x2d, 0xe7 } +, + /* Seed */ + 109, + { 0xb8, 0x29, 0xc7, 0x89, 0xbe, 0x38, 0x1c, 0xd5, 0x9d, 0xe2, 0x14, 0x89, 0xdb, 0xa1, 0x41, 0xe0, 0xbd, 0x1f, 0xa8, 0xa3, 0xc3, 0x82, 0x6d, 0x59, 0xc6, 0xd1, 0x10, 0xe7, 0xdf, 0x72, 0x42, 0xba, 0x98, 0xc4, 0x7a,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9e, 0xf5, 0x31, 0x40, 0x21, 0x01, 0xa8, 0xd3, 0xd3, 0xea, 0xa3, 0x53, 0x9b, 0xbf, 0x62, 0xaa, 0xd9, 0x9a, 0x3b, 0xb1, 0x1e } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 5.3", + /* Message */ + 2, + { 0x23, 0x8a } +, + /* Seed */ + 123, + { 0xa5, 0x88, 0x1a, 0xcf, 0xf3, 0x52, 0x9f, 0x25, 0x1b, 0x1b, 0x9c, 0x61, 0x9c, 0xe9, 0xf9, 0xdf, 0x91, 0xe0, 0xa0, 0x3d, 0xd8, 0x89, 0x16, 0x36, 0x46, 0x87, 0x1a, 0x62, 0x72, 0x07, 0xee, 0xf1, 0x47, 0x68, 0x0c, 0x32, 0xf4, 0x50, 0xa7, 0x76, 0xe1, 0x9f, 0x54, 0xec, 0x05, 0x5d, 0xc6, 0x8b, 0x04, 0xbd, 0x4d, 0x89, 0x37, 0x6d, 0xf3, 0xea, 0xfa, 0x6f, 0xca, 0xf6, 0x0e, 0xb8, 0x31, 0x84, 0x39, 0x10, 0xb6, 0x25, 0xb6, 0x4f, 0x25, 0xd9, 0x29, 0x9a, 0xfc, 0x30, 0x6a, 0x23, 0x76, 0x53, 0x80, 0x45, 0x51, 0x94, 0xb7, 0x5d, 0xc0, 0x13, 0x5d, 0x27, 0xc3, 0xb7, 0xd7, 0x2d, 0xf9, 0x08, 0x77, 0x5c, 0x7e, 0x90, 0xbe, 0xfc, 0x0c, 0x5a, 0xdf, 0x74, 0xa1, 0x69, 0xed, 0x58, 0x68, 0xf3, 0xd6, 0x34, 0x32, 0x7a, 0x05, 0x78, 0x18, 0x92, 0x54, 0x45, 0x43 } +, + /* Encryption */ + 128, + { 0x77, 0x10, 0xee, 0xa8, 0x65, 0x7d, 0xfd, 0x15, 0x65, 0x16, 0x65, 0x62, 0xdf, 0x0e, 0x2e, 0x84, 0x0e, 0xc3, 0xe3, 0xde, 0xdc, 0x0b, 0x80, 0x2b, 0xb0, 0x21, 0x3e, 0x47, 0xa5, 0xce, 0x97, 0xf4, 0xb8, 0x5b, 0xa9, 0xba, 0x14, 0x19, 0x77, 0x36, 0x3d, 0x8f, 0x54, 0xb0, 0x6d, 0x57, 0x8d, 0x5b, 0x2a, 0x96, 0xe9, 0x69, 0xcf, 0xa9, 0x15, 0xdf, 0x21, 0x9f, 0x00, 0x2a, 0x85, 0xd0, 0x32, 0x57, 0x04, 0x7b, 0x31, 0x16, 0xa1, 0xc4, 0xdd, 0xaf, 0x79, 0x1d, 0x93, 0x98, 0x2d, 0x1b, 0x9f, 0xfa, 0x24, 0x31, 0x86, 0xe9, 0xe2, 0xb1, 0x9e, 0xf0, 0x74, 0x1c, 0xe9, 0x8d, 0xe2, 0xa4, 0xa1, 0x58, 0x6e, 0x50, 0x12, 0xc4, 0x81, 0xde, 0x23, 0xa0, 0xef, 0xf8, 0x82, 0xfd, 0x62, 0x38, 0x38, 0xd2, 0x01, 0x1f, 0x4f, 0x63, 0x73, 0x8a, 0xff, 0xd7, 0xef, 0xb8, 0xc5, 0x0f, 0x46, 0xa6, 0xc2, 0x0e } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 5.4", + /* Message */ + 33, + { 0x25, 0xa2, 0x7e, 0xb1, 0xb2, 0x1f, 0x10, 0xcf, 0x9d, 0x57, 0x1c, 0x33, 0x05, 0x61, 0x0b, 0x97, 0xf0, 0xda, 0xee, 0x39, 0x90, 0x5c, 0x65, 0x94, 0xbf, 0xbf, 0x45, 0x2a, 0x9a, 0x00, 0xd9, 0xe8, 0x2b } +, + /* Seed */ + 92, + { 0x25, 0x04, 0x61, 0x80, 0x11, 0xc6, 0x73, 0xdb, 0x3c, 0x41, 0x22, 0x79, 0xdc, 0x8a, 0xd1, 0x65, 0xab, 0x7b, 0x64, 0x73, 0xae, 0x19, 0x5e, 0x8d, 0x6d, 0x41, 0x21, 0x49, 0x18, 0x19, 0x8b, 0x34, 0x51, 0xa6, 0x50, 0x8d, 0x61, 0x38, 0xce, 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+ +} +, +{ + "PKCS#1 v1.5 Encryption Example 5.5", + /* Message */ + 6, + { 0x59, 0xcf, 0x0b, 0x6b, 0x50, 0xea } +, + /* Seed */ + 119, + { 0x2b, 0xf1, 0x91, 0x60, 0xdf, 0x69, 0x88, 0x93, 0x5b, 0xd2, 0x46, 0x10, 0x6b, 0x89, 0x09, 0xdd, 0x7b, 0xb3, 0xe5, 0x16, 0x90, 0xdf, 0x84, 0xd7, 0x6e, 0x4d, 0x31, 0xac, 0x82, 0x10, 0x44, 0x56, 0x34, 0x6b, 0x4c, 0x3c, 0x9b, 0xa7, 0xb5, 0xe9, 0xe6, 0x8e, 0xe2, 0x08, 0x6c, 0x84, 0x73, 0xc6, 0x83, 0x02, 0xe2, 0x59, 0x9a, 0xbf, 0x6b, 0x31, 0xce, 0xb3, 0xf7, 0x81, 0xad, 0x6b, 0x56, 0x89, 0x86, 0xf2, 0x1c, 0xd6, 0xd7, 0x55, 0x32, 0x8f, 0xb8, 0x3a, 0xfd, 0x55, 0x48, 0x50, 0x1d, 0x07, 0x0a, 0xc2, 0xdd, 0x8f, 0x5c, 0xdf, 0xb6, 0x2c, 0xef, 0x54, 0x5e, 0x81, 0x5f, 0xe3, 0x82, 0xbc, 0x0c, 0x67, 0xb6, 0x76, 0xe5, 0x45, 0x6e, 0xbb, 0x9a, 0xb6, 0x7d, 0xf4, 0x77, 0x40, 0xc6, 0xa4, 0x3d, 0xe3, 0xf9, 0xa2, 0x47, 0x7a, 0x9b } +, + /* Encryption */ + 128, + { 0x2e, 0xd5, 0x91, 0xfd, 0x4b, 0x35, 0x7e, 0x94, 0xf4, 0x81, 0xba, 0x84, 0xff, 0x4e, 0xbe, 0x7a, 0xe4, 0x31, 0x05, 0x4e, 0x5c, 0xd9, 0x8a, 0x99, 0x58, 0x96, 0x48, 0xe6, 0x16, 0xcd, 0x68, 0xe0, 0xd4, 0x72, 0x4f, 0xa8, 0xa6, 0xc5, 0x99, 0x68, 0x6b, 0xfe, 0xe1, 0x74, 0x7a, 0xd0, 0x77, 0xdb, 0xed, 0xad, 0x45, 0xf1, 0x24, 0x4d, 0x7f, 0x8e, 0x00, 0xda, 0x3a, 0x3a, 0x06, 0xd2, 0x31, 0x32, 0xd3, 0x17, 0x1d, 0x74, 0x4e, 0xf1, 0x4e, 0x1e, 0x97, 0xcd, 0xda, 0x10, 0x9b, 0xd2, 0xe5, 0x56, 0xa5, 0xfc, 0x7b, 0xbc, 0x60, 0x9a, 0x7f, 0xf2, 0x4c, 0xfa, 0xbe, 0xf4, 0xb5, 0x6c, 0xbb, 0xb7, 0x0e, 0x05, 0x06, 0x53, 0xb6, 0x98, 0x48, 0xd7, 0x11, 0x30, 0x75, 0xa5, 0xde, 0xbe, 0x7a, 0x46, 0x82, 0x15, 0xf8, 0xdc, 0x08, 0xe7, 0xef, 0x84, 0xfd, 0x55, 0x77, 0x8c, 0xd5, 0xb5, 0x96, 0xe5 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 5.6", + /* Message */ + 57, + { 0xe9, 0x44, 0x52, 0xf5, 0x0a, 0x5e, 0xdb, 0xe6, 0x75, 0x73, 0xab, 0x22, 0x30, 0x9f, 0xa2, 0x1b, 0xab, 0xc6, 0xd2, 0x25, 0x20, 0xe6, 0xe8, 0x3b, 0xf7, 0x2e, 0x7a, 0xfa, 0x6d, 0x71, 0xe2, 0x02, 0x96, 0xda, 0xea, 0xf5, 0x4a, 0x60, 0xc8, 0x03, 0x63, 0x04, 0x87, 0x9a, 0x21, 0x31, 0xd1, 0x78, 0x78, 0x0e, 0x34, 0x8e, 0xe0, 0x12, 0x0b, 0x99, 0x7c } +, + /* Seed */ + 68, + { 0xc5, 0x30, 0x44, 0x3a, 0x16, 0xef, 0xd8, 0xd6, 0xd7, 0x2a, 0xb4, 0x44, 0x3f, 0x8d, 0xb2, 0x44, 0x91, 0xde, 0x99, 0xd5, 0xaa, 0xbe, 0x51, 0x88, 0xb3, 0xf6, 0x1d, 0xc0, 0x48, 0x3b, 0x7e, 0xe0, 0x0b, 0x1c, 0x13, 0x25, 0x9b, 0x8a, 0xe2, 0x40, 0x9f, 0x1a, 0xe6, 0x2d, 0x99, 0x30, 0xc1, 0x1a, 0x4d, 0xde, 0xf3, 0xe8, 0x35, 0x82, 0x93, 0x88, 0x93, 0xf9, 0xac, 0x66, 0x8f, 0x79, 0xc6, 0x4c, 0x7f, 0x5d, 0x79, 0x6d } +, + /* Encryption */ + 128, + { 0x0e, 0xee, 0x90, 0xc7, 0x08, 0x18, 0x22, 0x1a, 0xe2, 0x70, 0x4b, 0xbe, 0x38, 0xd6, 0x8f, 0x8e, 0x15, 0x4c, 0x6e, 0xe7, 0xad, 0xe5, 0x3e, 0x2a, 0x1f, 0x4d, 0x1d, 0xba, 0xac, 0x98, 0xc5, 0x75, 0x91, 0xeb, 0xb6, 0xc6, 0x38, 0xbc, 0xb6, 0x8e, 0x18, 0x14, 0x35, 0xb7, 0x00, 0x01, 0xba, 0xd1, 0x80, 0x19, 0x2b, 0xfd, 0xa0, 0x57, 0x32, 0xc0, 0x5e, 0x7f, 0xb5, 0xaf, 0x22, 0xaa, 0x89, 0xd2, 0xa8, 0xff, 0x80, 0xcf, 0x9f, 0x08, 0x62, 0xf0, 0x4c, 0x05, 0xca, 0xca, 0x3d, 0x2a, 0x3a, 0x5b, 0x07, 0x79, 0x94, 0x6c, 0x6d, 0xdf, 0xa0, 0x4c, 0xd7, 0x9f, 0xa1, 0x64, 0xd6, 0x02, 0xf1, 0xb7, 0xde, 0x5c, 0x95, 0xbe, 0x85, 0xe9, 0x60, 0x84, 0x67, 0xe2, 0x5c, 0x29, 0xd0, 0x35, 0xc4, 0x66, 0x09, 0x06, 0x26, 0x9f, 0x6d, 0xc0, 0x0a, 0x47, 0x2b, 0x04, 0x46, 0xea, 0x56, 0xe7, 0x2a, 0x59 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 5.7", + /* Message */ + 44, + { 0x1c, 0xbf, 0xa0, 0xe7, 0xb1, 0xa1, 0x0c, 0x13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 0x0d, 0x86, 0xe9, 0xab, 0xca, 0x71, 0xaf, 0x09, 0xa0, 0x92, 0x9e, 0xde, 0xee, 0xde, 0x83, 0xe7, 0x22, 0x44, 0x20, 0x3b, 0x2b, 0xf4, 0x5c, 0xeb, 0x18, 0x7e, 0x9d, 0xb3, 0xc7, 0xd3, 0xad, 0x05, 0xb2, 0x3b, 0x59, 0x62, 0x4c, 0x24, 0x66, 0x96, 0xcf, 0xc7, 0x58, 0x06, 0x39, 0x14, 0x02, 0xe4, 0x44, 0xe3, 0x97, 0x49, 0x69, 0x88, 0xe1, 0xe1, 0xf4, 0x2c, 0x6a, 0xde, 0xd3, 0x0c, 0xdc, 0x93, 0x79, 0x37, 0xf3, 0x00, 0x54 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 5.8", + /* Message */ + 64, + { 0xe1, 0x72, 0xa6, 0xb8, 0xb4, 0x96, 0xf0, 0x77, 0x73, 0x8b, 0x74, 0xf6, 0xd8, 0xb2, 0x92, 0xdd, 0xa6, 0x07, 0xf2, 0xad, 0xbf, 0xb3, 0x72, 0xbe, 0x37, 0xee, 0x00, 0x08, 0x88, 0xbe, 0xa3, 0x1f, 0x99, 0xcb, 0xa1, 0xcf, 0x39, 0x32, 0xe4, 0xbe, 0x37, 0x17, 0xc9, 0xe1, 0x68, 0x90, 0x1a, 0x32, 0xd1, 0xb8, 0x20, 0xbe, 0x4f, 0xb0, 0x13, 0x75, 0x27, 0xa2, 0x48, 0x18, 0x77, 0xfe, 0x01, 0xee } +, + /* Seed */ + 61, + { 0x84, 0x0c, 0xe1, 0x3b, 0xbc, 0x96, 0x17, 0xdc, 0x9f, 0x3f, 0x26, 0xb1, 0x47, 0x30, 0x1a, 0x6f, 0x46, 0x30, 0x0d, 0x77, 0x81, 0xa5, 0xd9, 0x81, 0x16, 0x2f, 0x86, 0x92, 0x87, 0x37, 0x1f, 0x1d, 0x59, 0x58, 0x76, 0x4f, 0xb0, 0x0b, 0x05, 0x53, 0x70, 0xec, 0x71, 0x1b, 0xba, 0x52, 0x83, 0xfc, 0xb0, 0x0b, 0x83, 0xbc, 0x02, 0x17, 0x5e, 0xa1, 0x01, 0x7b, 0xcc, 0x83, 0x53 } +, + /* Encryption */ + 128, + { 0x99, 0x3e, 0x39, 0x6f, 0xb5, 0x7b, 0x2e, 0xa6, 0xa1, 0xa3, 0xfc, 0xed, 0x9a, 0x69, 0xd3, 0x61, 0xcb, 0xb6, 0x26, 0x5b, 0x26, 0x50, 0x3c, 0x17, 0x5f, 0x84, 0xc6, 0x1a, 0x41, 0xea, 0x3e, 0x1c, 0xe4, 0xfb, 0xb6, 0x2e, 0x01, 0xd6, 0x42, 0x0e, 0x22, 0xfe, 0xf1, 0xd9, 0xe2, 0x8a, 0x58, 0x83, 0xe2, 0xea, 0xc8, 0x2e, 0x05, 0xf3, 0x58, 0xea, 0x75, 0xf7, 0x7d, 0xa4, 0x89, 0x7b, 0x6b, 0x64, 0x9a, 0xa4, 0x74, 0x28, 0x39, 0x41, 0x93, 0xdd, 0xec, 0x64, 0x8c, 0x3a, 0x7f, 0xb8, 0x1c, 0xfc, 0xf4, 0xb5, 0x1c, 0xe3, 0xeb, 0xba, 0x78, 0xae, 0xdc, 0xa7, 0xbb, 0x91, 0x7b, 0x35, 0xb3, 0xe2, 0x2a, 0xeb, 0x20, 0x1c, 0xea, 0x96, 0x59, 0x2e, 0x50, 0xe0, 0xd2, 0x84, 0x1e, 0x7d, 0x2c, 0xe0, 0xd6, 0x9f, 0xf3, 0x03, 0x9d, 0xc0, 0x1e, 0x96, 0x4a, 0x97, 0x7a, 0x01, 0x76, 0x83, 0xb3, 0x87 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 5.9", + /* Message */ + 55, + { 0xc8, 0xf0, 0xea, 0x23, 0xe0, 0x66, 0x11, 0xe4, 0xfd, 0x27, 0xb6, 0x1d, 0xb7, 0x92, 0x0c, 0x55, 0xf3, 0xc0, 0xa2, 0x22, 0x12, 0x88, 0x38, 0xe4, 0xcd, 0xb0, 0x62, 0xe1, 0x76, 0xb2, 0x1f, 0xc2, 0x32, 0x53, 0x55, 0x8c, 0x5d, 0x40, 0xde, 0x2d, 0xfd, 0x62, 0x0f, 0xb7, 0xcd, 0xf1, 0x39, 0x9c, 0x2a, 0xf8, 0xfc, 0x77, 0xca, 0x33, 0x35 } +, + /* Seed */ + 70, + { 0x16, 0x4d, 0x77, 0xb5, 0xd2, 0x6a, 0xe6, 0xd7, 0xab, 0xe7, 0xca, 0xed, 0x62, 0x5d, 0x87, 0xc2, 0x11, 0xcc, 0x50, 0x9a, 0xd0, 0x17, 0x2c, 0x20, 0x83, 0x3d, 0x8f, 0x98, 0xca, 0xe3, 0x8a, 0x2c, 0x37, 0x0e, 0xf2, 0x1d, 0x40, 0x96, 0xda, 0x84, 0x1d, 0xbe, 0xee, 0x94, 0x8e, 0xc6, 0x34, 0x03, 0xca, 0xbd, 0x4a, 0x5f, 0x71, 0xac, 0xe4, 0x93, 0x64, 0xaa, 0x7d, 0xe2, 0x0f, 0x32, 0xc9, 0x88, 0x33, 0x7a, 0x11, 0x5f, 0x83, 0x46 } +, + /* Encryption */ + 128, + { 0x7a, 0x8f, 0x15, 0xee, 0xf5, 0x10, 0xad, 0xe8, 0xd5, 0xc3, 0x17, 0xf9, 0x06, 0x4a, 0xd7, 0xda, 0xe6, 0xc9, 0x3e, 0x7c, 0xf1, 0x56, 0xa7, 0x37, 0x22, 0x02, 0x32, 0x58, 0xf8, 0xb5, 0x74, 0x47, 0x34, 0x70, 0x00, 0x34, 0xa3, 0xde, 0x6f, 0x13, 0x7a, 0xf6, 0xe9, 0x00, 0x46, 0xd8, 0x6e, 0x9b, 0x90, 0x59, 0x0f, 0xa5, 0xa6, 0x50, 0xce, 0xf4, 0xfd, 0xb4, 0xd3, 0x36, 0x02, 0x33, 0xaf, 0x86, 0xf4, 0xa7, 0xa2, 0x3c, 0x24, 0x3d, 0x19, 0x51, 0xc6, 0x66, 0xb6, 0x73, 0xc3, 0x3c, 0x7d, 0xec, 0x4f, 0x51, 0xac, 0xe3, 0x4b, 0x80, 0x5c, 0x0a, 0x9e, 0x67, 0xe2, 0x09, 0xcc, 0x7f, 0x9e, 0xd6, 0x9b, 0x8f, 0x5e, 0xb5, 0xc5, 0x53, 0xe0, 0xf1, 0x5c, 0x10, 0x30, 0x4b, 0xf5, 0x6d, 0x7b, 0xe1, 0x71, 0xf3, 0x1c, 0xce, 0x88, 0xf3, 0x7d, 0x1f, 0xb4, 0xa2, 0xa0, 0x04, 0x18, 0x89, 0x75, 0x76 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 5.10", + /* Message */ + 49, + { 0x19, 0xdb, 0x24, 0x22, 0x05, 0xc0, 0x3d, 0x7f, 0xa9, 0x93, 0x5d, 0x9e, 0x04, 0xfa, 0x6e, 0xcf, 0x38, 0xa5, 0x1e, 0xa9, 0x98, 0xac, 0x8e, 0x4b, 0xac, 0xa6, 0xcd, 0xfd, 0x6a, 0x0a, 0xce, 0x1d, 0xf3, 0x67, 0xe7, 0x3d, 0x23, 0xc2, 0x40, 0xaf, 0x76, 0xb6, 0x2e, 0x9f, 0xe9, 0x21, 0x5f, 0xe9, 0x43 } +, + /* Seed */ + 76, + { 0xbe, 0x49, 0x52, 0x05, 0x55, 0x69, 0x56, 0xfa, 0xe2, 0xa2, 0x2e, 0xa7, 0x0c, 0xe1, 0x02, 0xde, 0x06, 0x6c, 0x9e, 0x58, 0x95, 0x96, 0x06, 0x21, 0x74, 0x84, 0xa5, 0xb1, 0x50, 0x36, 0xff, 0xa1, 0xd4, 0x61, 0x23, 0x9d, 0xd4, 0x7b, 0x4f, 0x38, 0x1c, 0xea, 0x71, 0x51, 0x6e, 0x2d, 0xb0, 0xfc, 0x36, 0x9d, 0x72, 0xb4, 0x40, 0x69, 0x65, 0x12, 0xa9, 0x72, 0x88, 0xf0, 0x6f, 0xc0, 0xbc, 0xeb, 0x96, 0x82, 0x86, 0xe9, 0x95, 0xe0, 0x2d, 0x21, 0x8d, 0x9c, 0x26, 0x62 } +, + /* Encryption */ + 128, + { 0x55, 0x12, 0xb3, 0x99, 0x9b, 0x30, 0xc9, 0xc1, 0x44, 0x0e, 0x59, 0x75, 0x93, 0x1d, 0x55, 0xf2, 0x1e, 0x9e, 0xb4, 0x22, 0xb6, 0x2d, 0xaf, 0xcd, 0xab, 0x5d, 0x50, 0x03, 0xa7, 0x5e, 0xb1, 0x24, 0x81, 0x99, 0x86, 0x36, 0x19, 0x13, 0x36, 0x1d, 0xfc, 0x46, 0xac, 0x29, 0xaa, 0xba, 0x8e, 0x1a, 0xa0, 0x2e, 0x1b, 0xa4, 0x44, 0x67, 0x16, 0x2d, 0x20, 0xf6, 0x3a, 0xd1, 0x70, 0xfe, 0x0d, 0x87, 0xa5, 0x3d, 0x93, 0xc6, 0x4e, 0x02, 0x6b, 0x12, 0xbe, 0x6b, 0xc2, 0xb8, 0xeb, 0x0e, 0x57, 0xc0, 0x39, 0xeb, 0x60, 0xf3, 0x2c, 0x4b, 0x52, 0x70, 0x35, 0xf7, 0x03, 0xa7, 0xa8, 0x37, 0x4b, 0xd7, 0xfa, 0xa7, 0xb5, 0x40, 0x4a, 0x3c, 0x5a, 0xad, 0xb7, 0x92, 0xe2, 0x5f, 0xf9, 0x28, 0x76, 0xb2, 0x3d, 0xd3, 0xa7, 0x42, 0x2c, 0x45, 0x26, 0x6c, 0x6d, 0x98, 0x6e, 0xec, 0x53, 0x34, 0xb9, 0xba } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 5.11", + /* Message */ + 35, + { 0x49, 0xa7, 0x61, 0xf8, 0xc1, 0x8e, 0xf9, 0x23, 0x62, 0xd6, 0xab, 0xb2, 0x4c, 0x07, 0xfc, 0x72, 0x82, 0x55, 0x84, 0x24, 0x53, 0x69, 0x4e, 0x17, 0x60, 0x58, 0x99, 0xf4, 0x37, 0xb3, 0x1a, 0xc9, 0x8d, 0xb5, 0x16 } +, + /* Seed */ + 90, + { 0xd8, 0xcd, 0x85, 0xed, 0xf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3, 0xd0, 0xf6, 0xcf, 0x92, 0xcf, 0x3c, 0xd9, 0x51, 0x96, 0x77, 0xa5, 0x8b, 0x1d, 0x1d, 0x99, 0x4f, 0xc1, 0xc9, 0x05, 0x7a, 0xc1, 0x06, 0xe8, 0x16, 0x04, 0x59, 0x26, 0xb4, 0x5b, 0x00, 0xe5 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 5.12", + /* Message */ + 10, + { 0x84, 0xe8, 0x28, 0xf7, 0x15, 0xf2, 0x28, 0xa6, 0x02, 0x65 } +, + /* Seed */ + 115, + { 0xf7, 0xf2, 0x75, 0xa8, 0x53, 0xd4, 0xe1, 0x26, 0xd7, 0xd0, 0xc3, 0x8e, 0xf7, 0x03, 0xf3, 0xfb, 0xda, 0x7a, 0x95, 0x20, 0x78, 0x8d, 0x7a, 0x81, 0xa3, 0x1b, 0x05, 0x30, 0xd4, 0x3f, 0xe6, 0xc9, 0x4b, 0x1b, 0x1b, 0xb1, 0x08, 0x51, 0x20, 0x9d, 0xb2, 0x6a, 0xc4, 0xb8, 0x88, 0xae, 0xce, 0xea, 0x77, 0x13, 0x82, 0x4c, 0x29, 0x38, 0xb4, 0xc6, 0x43, 0x1b, 0x2b, 0x03, 0xc6, 0x93, 0xab, 0x7b, 0x54, 0x63, 0x15, 0x41, 0x54, 0x6a, 0xc4, 0x03, 0x94, 0x79, 0x85, 0x48, 0xfb, 0xba, 0x95, 0x88, 0x2d, 0x91, 0xa1, 0x7c, 0x27, 0xe7, 0xdd, 0x53, 0x02, 0x6c, 0x96, 0x79, 0x1e, 0xe5, 0x5f, 0x24, 0x7d, 0x7f, 0x89, 0x8f, 0xea, 0xb3, 0x70, 0x9a, 0x13, 0x2a, 0x78, 0x26, 0x66, 0xa1, 0x4d, 0x0d, 0xf1, 0xa8, 0x4e } +, + /* Encryption */ + 128, + { 0x4e, 0x3f, 0xe9, 0x6e, 0x8f, 0x96, 0xe5, 0xb3, 0xc6, 0x11, 0xca, 0xdb, 0x96, 0xed, 0x51, 0x04, 0x20, 0x98, 0xec, 0xc5, 0x47, 0xbe, 0x7b, 0x88, 0xf8, 0xde, 0xa7, 0x65, 0xae, 0x14, 0xe8, 0x35, 0x0c, 0xfe, 0x39, 0xdc, 0xb1, 0xc1, 0xd6, 0xe4, 0x17, 0x9c, 0xa4, 0x04, 0xd5, 0x38, 0x4d, 0x87, 0xb0, 0x66, 0x50, 0x75, 0xee, 0xd7, 0xda, 0x7a, 0xaf, 0x71, 0x00, 0x8e, 0x24, 0x67, 0xd7, 0x0b, 0xff, 0xf6, 0x23, 0xb4, 0x59, 0x4b, 0x6d, 0xff, 0xf9, 0x0e, 0x3d, 0x84, 0x85, 0xf9, 0x41, 0x89, 0x48, 0x6c, 0xa0, 0xca, 0x9e, 0x72, 0x2b, 0x2a, 0x77, 0x7e, 0x25, 0xb5, 0x82, 0xf7, 0xad, 0x4e, 0xc5, 0x10, 0x3a, 0xd7, 0x67, 0x85, 0x9a, 0xc5, 0x9a, 0x1b, 0x8c, 0x5c, 0x19, 0x71, 0x30, 0x17, 0x48, 0xfc, 0xc2, 0x64, 0xf6, 0xc9, 0x29, 0x36, 0x4a, 0x8d, 0x9a, 0xf4, 0x22, 0x55, 0xc0, 0xf6 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 5.13", + /* Message */ + 51, + { 0xc4, 0x79, 0x7e, 0x8a, 0x6f, 0x26, 0x9b, 0xf2, 0x5d, 0x4c, 0xb4, 0xec, 0x3f, 0xa4, 0x6f, 0x8f, 0x11, 0xe6, 0xb3, 0x69, 0xfb, 0xda, 0xec, 0x1e, 0x51, 0x97, 0x83, 0x58, 0xd4, 0x6f, 0x3c, 0xf3, 0xb8, 0x42, 0x91, 0x7d, 0x96, 0x7a, 0xa9, 0xd3, 0x0b, 0x18, 0x34, 0x53, 0x93, 0x7a, 0x68, 0x26, 0x56, 0xb2, 0x7b } +, + /* Seed */ + 74, + { 0x17, 0x77, 0x42, 0x19, 0x7f, 0x04, 0x11, 0x44, 0x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33, 0x6d, 0xac, 0x46, 0xb6, 0x4a, 0xe2, 0x25, 0x38, 0xa7, 0xb0, 0x08, 0x7f, 0x25 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 5.14", + /* Message */ + 20, + { 0xa5, 0xe9, 0xde, 0xb1, 0xc2, 0x0f, 0x98, 0x2d, 0x5b, 0x7d, 0x4b, 0x87, 0xd7, 0x99, 0x46, 0x1f, 0x05, 0x3d, 0x91, 0x9e } +, + /* Seed */ + 105, + { 0x59, 0x75, 0x9c, 0xf5, 0xf8, 0x38, 0xd9, 0x52, 0x49, 0x3d, 0x0f, 0x42, 0x81, 0xe3, 0xea, 0x0f, 0xe2, 0x16, 0x97, 0x1c, 0x0a, 0x2e, 0x24, 0x54, 0xb9, 0x6c, 0x8a, 0x11, 0xb4, 0xc6, 0x91, 0x27, 0x15, 0x90, 0x24, 0xdb, 0x6e, 0xc5, 0xc3, 0x36, 0x40, 0xd1, 0x20, 0x29, 0x58, 0x99, 0xf6, 0x66, 0x6c, 0x94, 0x17, 0xb2, 0x02, 0xa8, 0x6c, 0x26, 0xef, 0xd7, 0xc6, 0x13, 0x4c, 0x92, 0xfd, 0x86, 0xb8, 0x32, 0x3d, 0x17, 0x4a, 0x62, 0x53, 0x48, 0x81, 0x38, 0x2d, 0x7c, 0x6c, 0x9e, 0x1b, 0x8c, 0x1e, 0x95, 0xda, 0xf2, 0x10, 0xc3, 0xe9, 0xba, 0x43, 0xe5, 0x88, 0x79, 0xf3, 0x4f, 0x2f, 0xa7, 0x1e, 0xf6, 0xae, 0x4b, 0x68, 0xd6, 0x41, 0x47, 0xbe } +, + /* Encryption */ + 128, + { 0x70, 0xac, 0x10, 0x2d, 0x07, 0x1e, 0x3d, 0x90, 0x22, 0x81, 0x83, 0x62, 0x16, 0xe0, 0x81, 0x29, 0x0b, 0xb5, 0xdf, 0xcd, 0x56, 0x68, 0xd1, 0x1d, 0xae, 0xfa, 0x0a, 0xb0, 0x64, 0x59, 0x9d, 0x0f, 0x91, 0x4b, 0x47, 0x29, 0x61, 0x37, 0x5b, 0xbf, 0x5f, 0x2a, 0x66, 0x6f, 0xae, 0x0f, 0x6a, 0x25, 0xba, 0xfd, 0x44, 0xf6, 0x65, 0xc1, 0x7c, 0x14, 0x4d, 0xc4, 0xd4, 0xcc, 0x0a, 0x5d, 0x5b, 0xa5, 0x5c, 0x47, 0xa4, 0xcd, 0xe9, 0x59, 0xb3, 0x2b, 0xaa, 0x52, 0x32, 0xa0, 0x7f, 0xbf, 0x93, 0x78, 0xc9, 0xc5, 0x3c, 0xa2, 0xb3, 0x77, 0x81, 0xc9, 0x3a, 0x1c, 0xc8, 0xd6, 0x52, 0x94, 0x78, 0xa1, 0xc6, 0x73, 0x03, 0x4d, 0xda, 0x7f, 0xf3, 0x35, 0x60, 0x78, 0x6a, 0x46, 0x4f, 0x5b, 0x4a, 0x55, 0x9c, 0x62, 0x6a, 0xe2, 0x95, 0xbc, 0x91, 0xd0, 0xee, 0xd9, 0x37, 0x5f, 0x49, 0xe3, 0xe4, 0xaa } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 5.15", + /* Message */ + 63, + { 0x73, 0x9f, 0xa7, 0x6d, 0xbd, 0x12, 0x73, 0x03, 0xb7, 0xab, 0xf9, 0x3e, 0x1d, 0x7b, 0xa7, 0x29, 0x75, 0x5d, 0x6c, 0x81, 0x1b, 0x5e, 0x93, 0x35, 0x5e, 0x0c, 0x01, 0x1f, 0x74, 0x46, 0x4c, 0x7d, 0xb4, 0x79, 0x19, 0x3c, 0x3f, 0xb7, 0x38, 0x0a, 0x62, 0xa0, 0xc0, 0x06, 0xa2, 0xd1, 0xdc, 0x49, 0xa7, 0x66, 0xaf, 0x63, 0xfb, 0xa4, 0x52, 0x7c, 0xd1, 0x57, 0x50, 0x6d, 0x62, 0xc2, 0x1a } +, + /* Seed */ + 62, + { 0xa0, 0xb4, 0xda, 0xff, 0x3e, 0x26, 0xce, 0xbb, 0x3e, 0x4e, 0x3a, 0x43, 0xdb, 0x36, 0xc4, 0x66, 0xfb, 0x8c, 0xe6, 0x05, 0xb2, 0x5a, 0xf4, 0xc9, 0xda, 0x74, 0x4b, 0x62, 0xd4, 0x1f, 0x9e, 0x62, 0xc2, 0x28, 0x5c, 0x39, 0x0d, 0x60, 0xd1, 0x8e, 0x3d, 0x7e, 0x67, 0x5b, 0x4a, 0xc3, 0x19, 0x67, 0x24, 0x45, 0x19, 0x46, 0xbc, 0x1c, 0xcf, 0x2a, 0x9b, 0x56, 0x2c, 0x45, 0x33, 0xc9 } +, + /* Encryption */ + 128, + { 0x2b, 0x79, 0x80, 0x91, 0xb3, 0xa3, 0x91, 0x53, 0x3d, 0x62, 0xdc, 0x0e, 0x41, 0x7b, 0xa6, 0xde, 0xda, 0x00, 0x5b, 0xfc, 0x30, 0xab, 0x7d, 0xc8, 0x2e, 0x8f, 0x9b, 0xcc, 0x74, 0x17, 0xbc, 0xb0, 0x04, 0x34, 0x8c, 0x6d, 0x00, 0xe5, 0x37, 0xd2, 0x72, 0x2b, 0x84, 0x38, 0x61, 0x48, 0x92, 0x45, 0xab, 0x0d, 0x51, 0xf2, 0x11, 0x44, 0x7d, 0xac, 0x33, 0xa3, 0xf9, 0xdd, 0x6f, 0x3c, 0xa6, 0x6b, 0xbf, 0xa0, 0xd1, 0xad, 0xf9, 0x8b, 0xc9, 0x09, 0x95, 0x15, 0x92, 0x69, 0x76, 0xb9, 0x25, 0x8a, 0xab, 0x63, 0x20, 0x4a, 0xd8, 0x91, 0x65, 0xc8, 0x7b, 0xbe, 0xfd, 0x8d, 0x98, 0x85, 0x34, 0xb3, 0x74, 0x07, 0xdf, 0x7d, 0x43, 0xad, 0x39, 0x1e, 0xed, 0x99, 0x82, 0x47, 0x28, 0xef, 0xc3, 0xa5, 0x33, 0xb7, 0x89, 0xb4, 0x7e, 0x8a, 0xa7, 0x12, 0x16, 0x17, 0x47, 0x4f, 0x33, 0x25, 0xc5, 0x1a } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 5.16", + /* Message */ + 21, + { 0x5a, 0x44, 0xb5, 0x47, 0xbd, 0xa1, 0x9e, 0xcc, 0xa1, 0xdc, 0x7b, 0xc0, 0x45, 0x50, 0x20, 0x5f, 0x66, 0xc5, 0xde, 0x0a, 0xcb } +, + /* Seed */ + 104, + { 0x2f, 0x54, 0x85, 0xd2, 0x5f, 0xe5, 0xce, 0x40, 0xae, 0x62, 0xa1, 0x12, 0x97, 0x6c, 0xb4, 0xa5, 0x39, 0xb7, 0x4d, 0x96, 0xef, 0x8b, 0xe8, 0x73, 0x32, 0x5e, 0x20, 0x4b, 0xb3, 0xf8, 0x66, 0x07, 0xa1, 0x6a, 0x2c, 0x2a, 0xb5, 0x0f, 0x69, 0x78, 0x09, 0xed, 0x03, 0x01, 0x72, 0x70, 0xef, 0x20, 0xa1, 0x02, 0xc4, 0x3a, 0x2c, 0x4c, 0x3b, 0xe6, 0xab, 0x7a, 0x8a, 0xe2, 0xdc, 0xb5, 0x69, 0x84, 0xd5, 0xe0, 0x65, 0x52, 0x45, 0x93, 0xeb, 0x70, 0x70, 0x83, 0x4c, 0xe5, 0x53, 0xf1, 0x75, 0x69, 0x20, 0xbb, 0xcb, 0xbe, 0x4f, 0xb2, 0x6d, 0x35, 0xd4, 0xad, 0xcb, 0x59, 0xdf, 0x52, 0x46, 0x35, 0x6f, 0xf1, 0x2e, 0x7a, 0xa9, 0xee, 0x6d, 0xef } +, + /* Encryption */ + 128, + { 0x62, 0xd1, 0x48, 0x9a, 0x40, 0x3a, 0x90, 0xfa, 0xac, 0x67, 0x7a, 0xbc, 0x17, 0x4a, 0xa7, 0x24, 0x3b, 0xc7, 0x51, 0xa9, 0x64, 0x69, 0x5f, 0x6c, 0x32, 0xb3, 0x9d, 0xe0, 0x18, 0xfe, 0x46, 0x43, 0x44, 0x20, 0xea, 0x76, 0x59, 0xbe, 0x2c, 0x41, 0x0b, 0xc5, 0x6c, 0x4e, 0x3e, 0x7a, 0x1b, 0x16, 0x77, 0xfd, 0xf4, 0xad, 0xfb, 0x23, 0x24, 0xf0, 0x41, 0xed, 0xd5, 0x79, 0x0c, 0x4c, 0xdf, 0xab, 0x36, 0x55, 0xe0, 0x7e, 0x41, 0xfe, 0x9d, 0x73, 0x29, 0x21, 0x51, 0xb0, 0xdd, 0x5b, 0x96, 0xfc, 0x84, 0xa6, 0xb2, 0x0f, 0x6f, 0x3b, 0xc0, 0xf6, 0x0e, 0xae, 0xa8, 0xd8, 0x29, 0x17, 0xb2, 0x10, 0x83, 0x05, 0x59, 0x40, 0xfc, 0x02, 0xee, 0x3e, 0x17, 0xc3, 0x78, 0xbd, 0x4d, 0x85, 0x06, 0xd0, 0x8e, 0xc4, 0x5f, 0x33, 0xde, 0x57, 0x80, 0xf0, 0x1b, 0xd3, 0x18, 0xa9, 0xa1, 0x67, 0x87, 0xad } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 5.17", + /* Message */ + 5, + { 0x16, 0x80, 0x2d, 0x80, 0x3c } +, + /* Seed */ + 120, + { 0x02, 0xf0, 0xe7, 0x62, 0xc3, 0x39, 0x17, 0xbf, 0x6a, 0x4d, 0xf1, 0x1f, 0xa2, 0x84, 0x73, 0x54, 0x7a, 0x5a, 0xb0, 0x76, 0x7d, 0xd3, 0xa6, 0x1a, 0x8d, 0x05, 0xcc, 0x1e, 0x6f, 0x98, 0x34, 0x5a, 0xf1, 0xa0, 0x0e, 0x42, 0xf6, 0x2b, 0xd8, 0xec, 0xca, 0xcb, 0xd3, 0x7f, 0x4c, 0xcb, 0x80, 0x9e, 0x9e, 0x05, 0x5f, 0x73, 0xd3, 0x37, 0x5a, 0x60, 0x41, 0xd9, 0x78, 0x2c, 0xcd, 0x85, 0xd5, 0x9d, 0x14, 0xf4, 0x3e, 0x5c, 0x94, 0x10, 0x25, 0x7b, 0x90, 0x6e, 0x41, 0xcc, 0x8b, 0x97, 0x35, 0x47, 0xd0, 0x62, 0x2b, 0xd2, 0x1d, 0xb2, 0x9a, 0x91, 0x38, 0xd3, 0xb1, 0xbe, 0xde, 0x38, 0xce, 0x5c, 0x94, 0xc4, 0xe1, 0xd2, 0xa0, 0xa8, 0x40, 0x0b, 0x45, 0xba, 0xcd, 0x42, 0x69, 0x79, 0x7c, 0x38, 0x5a, 0xa3, 0x06, 0x6e, 0x65, 0x80, 0x72, 0x99 } +, + /* Encryption */ + 128, + { 0x75, 0x3b, 0x9c, 0xee, 0x70, 0xd4, 0x18, 0x1f, 0x95, 0x63, 0x87, 0x80, 0xdb, 0x7a, 0x04, 0xf9, 0xb1, 0x2e, 0xa3, 0x8e, 0x5d, 0xae, 0xe4, 0xf2, 0x89, 0x4c, 0x02, 0x67, 0x3a, 0x53, 0xf4, 0x85, 0x30, 0x74, 0x6f, 0xf2, 0x85, 0x8b, 0x78, 0x7e, 0xfc, 0xb4, 0x2d, 0x45, 0xe5, 0x31, 0xbe, 0xa1, 0xc8, 0xda, 0xe9, 0x48, 0x77, 0x15, 0x3b, 0x95, 0x6a, 0xc7, 0xb2, 0x87, 0x46, 0xee, 0x21, 0xc6, 0x31, 0xbf, 0x9a, 0x3b, 0xa7, 0x9d, 0x2b, 0xa8, 0x13, 0x21, 0xb7, 0x96, 0x03, 0xb1, 0xd0, 0x1a, 0x4e, 0x90, 0x9e, 0xd5, 0xa2, 0x7c, 0xbf, 0x27, 0xc9, 0x57, 0x78, 0x3d, 0x3f, 0x79, 0x50, 0xe0, 0x1d, 0xd8, 0xf4, 0x47, 0xf1, 0x0e, 0xce, 0xd3, 0x6f, 0x2d, 0x19, 0x35, 0x86, 0xf5, 0xcc, 0x17, 0xfb, 0x62, 0x2a, 0x05, 0xfa, 0xa1, 0xfb, 0x5c, 0xd2, 0xaa, 0x06, 0x4c, 0x08, 0x67, 0xb1, 0xca } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 5.18", + /* Message */ + 48, + { 0xd6, 0xd0, 0xf6, 0x03, 0x85, 0x97, 0x9c, 0xa5, 0x06, 0xfc, 0x83, 0x34, 0x21, 0xbc, 0xd2, 0x2d, 0xa6, 0xa0, 0x6a, 0x8f, 0x37, 0x0a, 0x7f, 0x02, 0xfe, 0xf4, 0x7c, 0x1c, 0xb2, 0x19, 0x9f, 0x26, 0x45, 0xc7, 0x54, 0x90, 0xfb, 0xf7, 0x89, 0xad, 0x52, 0x47, 0x04, 0xda, 0x8a, 0x27, 0x66, 0xc6 } +, + /* Seed */ + 77, + { 0xa0, 0x3c, 0x05, 0x67, 0x2e, 0xfe, 0x23, 0xb4, 0x4b, 0x26, 0xc7, 0x93, 0xe7, 0x05, 0x3a, 0x77, 0x04, 0x8b, 0xa2, 0xdb, 0xb4, 0xb5, 0x3a, 0xe9, 0x75, 0x18, 0x54, 0xe7, 0xad, 0xd7, 0xd6, 0x7c, 0x12, 0xcb, 0xd1, 0x6c, 0x0b, 0x19, 0x34, 0xd2, 0xc2, 0x3e, 0x77, 0xcd, 0xcc, 0x89, 0xce, 0x1d, 0x45, 0xc7, 0x61, 0x15, 0x8a, 0xa8, 0x61, 0x31, 0x71, 0xa7, 0x39, 0x01, 0xac, 0x1f, 0x61, 0xc6, 0x57, 0x05, 0x53, 0x3d, 0x3e, 0x63, 0x9b, 0x57, 0xa2, 0x48, 0x92, 0x91, 0x79 } +, + /* Encryption */ + 128, + { 0x00, 0x78, 0xdc, 0x48, 0xa6, 0x61, 0x58, 0x99, 0x2a, 0xaa, 0x68, 0xfc, 0x3c, 0xcc, 0x62, 0x8f, 0x92, 0xa7, 0x08, 0xd0, 0xb1, 0xd4, 0x38, 0x37, 0x20, 0x8d, 0x53, 0x4b, 0xc3, 0xf9, 0xbe, 0x1c, 0x14, 0x12, 0xed, 0x0f, 0x9f, 0x7b, 0xef, 0x49, 0x43, 0x0d, 0xc9, 0xe9, 0x98, 0xf7, 0x52, 0xe0, 0x74, 0x77, 0x68, 0xb4, 0xae, 0x38, 0x14, 0x46, 0x96, 0xc0, 0x03, 0xd6, 0xd2, 0x5e, 0xa1, 0xa6, 0xca, 0x6a, 0xec, 0x92, 0x4a, 0x9f, 0x4d, 0x9b, 0x57, 0x5a, 0x8f, 0x13, 0x6b, 0xba, 0x29, 0xbf, 0x31, 0xc1, 0x3b, 0x70, 0x50, 0xbd, 0x55, 0xd1, 0x00, 0x0d, 0x43, 0x3d, 0xaa, 0x6c, 0xf1, 0x0b, 0x49, 0x11, 0x6c, 0x80, 0x63, 0x10, 0x7f, 0xd3, 0xa5, 0xbd, 0xf6, 0x15, 0x45, 0xc5, 0xd8, 0x63, 0xf6, 0xa7, 0x88, 0x81, 0x78, 0x6c, 0xc8, 0xdc, 0x37, 0x6d, 0x36, 0xc9, 0x11, 0x36, 0x82, 0x25 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 5.19", + /* Message */ + 34, + { 0xb0, 0x38, 0x1c, 0xac, 0x04, 0xf3, 0x10, 0x15, 0x04, 0x96, 0x8f, 0x26, 0xd6, 0x55, 0x47, 0x45, 0x38, 0x3b, 0xd1, 0x71, 0xd3, 0x61, 0x56, 0xdd, 0x36, 0x80, 0xb3, 0xdb, 0x6f, 0xad, 0x7f, 0x77, 0x1f, 0x7d } +, + /* Seed */ + 91, + { 0xcc, 0x54, 0x8a, 0x67, 0x77, 0xcd, 0xe9, 0x53, 0xc1, 0x5a, 0x71, 0xfc, 0x49, 0x7c, 0x0c, 0x36, 0x17, 0xb1, 0xbb, 0x05, 0x6b, 0x03, 0x28, 0x8d, 0x9a, 0x54, 0x8b, 0x69, 0x3b, 0xb4, 0x30, 0x8b, 0x67, 0xc1, 0xda, 0xc3, 0x8b, 0xb9, 0xb8, 0xc9, 0xcc, 0x89, 0x6a, 0xc2, 0x44, 0xa9, 0xe3, 0x0d, 0x13, 0x24, 0x30, 0xf4, 0xce, 0xae, 0x57, 0x90, 0x34, 0x3d, 0xbc, 0xe3, 0x8d, 0x05, 0x6f, 0x27, 0xb8, 0x6b, 0xdd, 0x9d, 0x32, 0xa8, 0x17, 0x1f, 0x3b, 0x3c, 0xc2, 0xfd, 0x14, 0x22, 0x65, 0xac, 0x9a, 0x68, 0xdc, 0x35, 0x36, 0x27, 0x33, 0x9c, 0xd8, 0x83, 0x03 } +, + /* Encryption */ + 128, + { 0x45, 0x6f, 0x7c, 0x3e, 0x3b, 0xe8, 0x5f, 0xf7, 0xbd, 0xd6, 0xb5, 0xb2, 0x50, 0xbf, 0xb8, 0x1c, 0xd6, 0xfb, 0xb1, 0x86, 0xd2, 0x5e, 0x0c, 0x1c, 0x52, 0x59, 0xd6, 0x78, 0x87, 0x93, 0xc5, 0x41, 0xed, 0xac, 0xb4, 0xec, 0xde, 0xdb, 0x8a, 0x89, 0x29, 0x01, 0x34, 0xa6, 0x06, 0xf4, 0x6a, 0x81, 0x99, 0x1c, 0x13, 0xb1, 0x20, 0xe3, 0x30, 0x56, 0xbc, 0x0f, 0xc7, 0xe9, 0x7b, 0x34, 0x2d, 0x0f, 0x20, 0x05, 0x18, 0x13, 0xdd, 0xe4, 0x5e, 0x0b, 0x59, 0x6a, 0x7d, 0xcd, 0x69, 0x04, 0x90, 0x3b, 0x8f, 0xc0, 0x76, 0xa6, 0xe2, 0x4b, 0x3a, 0xd8, 0x01, 0x34, 0x16, 0xd9, 0xfd, 0x18, 0x48, 0x30, 0x55, 0x4a, 0xd5, 0x4d, 0x55, 0x48, 0xbc, 0xad, 0xda, 0xf5, 0x92, 0x0a, 0x02, 0x49, 0x55, 0x88, 0x78, 0x25, 0xdd, 0x37, 0x1a, 0xe4, 0xef, 0x90, 0x06, 0x9a, 0x4f, 0x31, 0x1c, 0x5a, 0x17, 0x29 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 5.20", + /* Message */ + 1, + { 0xe5 } +, + /* Seed */ + 124, + { 0xfe, 0x0b, 0xc7, 0xac, 0xb5, 0x6c, 0xe1, 0x4b, 0x4e, 0x2f, 0x55, 0xfb, 0xa0, 0xe2, 0xb1, 0x71, 0x54, 0x90, 0x7b, 0xe9, 0x4c, 0xe4, 0x85, 0xc6, 0x98, 0x4d, 0x61, 0xf6, 0x7c, 0x04, 0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, 0xd4, 0x5a, 0x26, 0xf3, 0x21, 0xdd, 0x9e, 0xb3, 0x33, 0xef, 0x80, 0xaf, 0xe3, 0xaf, 0x9f, 0x72, 0x9c, 0xa1, 0x8f, 0x42, 0xc8, 0x8a, 0x71, 0x73, 0x85, 0x8c, 0x54, 0x20, 0x66, 0xf8, 0xa2, 0x52, 0xcc, 0xf0, 0xfe, 0xaf, 0xe6, 0xb5, 0xa9, 0x24 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 6: A 1024-bit RSA key pair", +{ + /* Modulus */ + 128, + { 0xdd, 0xca, 0xd6, 0xa3, 0x8b, 0x37, 0x04, 0xcb, 0xe0, 0x6b, 0xb1, 0xb5, 0x1d, 0x11, 0x62, 0x58, 0x49, 0x78, 0xa4, 0x29, 0x1f, 0xb6, 0x73, 0xb4, 0xea, 0x30, 0xed, 0x8b, 0x51, 0xa4, 0xbf, 0x26, 0x1d, 0xc9, 0xf0, 0xf4, 0x69, 0xce, 0x99, 0x88, 0xa0, 0x89, 0xf0, 0x84, 0x36, 0x64, 0x64, 0xa1, 0x80, 0xcf, 0xd7, 0x17, 0x10, 0x69, 0xa6, 0xf6, 0x36, 0xd7, 0x5f, 0x23, 0x40, 0x1b, 0x30, 0xcf, 0x43, 0xad, 0xcf, 0x87, 0x0e, 0xcd, 0x24, 0x58, 0x2f, 0x4d, 0xa2, 0x95, 0x22, 0x91, 0x51, 0xdd, 0xcf, 0xc7, 0xc9, 0x91, 0x86, 0xb2, 0x45, 0x88, 0x5c, 0xb6, 0x31, 0x96, 0xc4, 0xa5, 0x72, 0x6f, 0x20, 0x7e, 0xe3, 0x60, 0xaf, 0x3a, 0xd8, 0xc4, 0x83, 0x85, 0xa4, 0xe0, 0x84, 0x1d, 0x7d, 0x85, 0x1d, 0x54, 0x54, 0x5d, 0xe7, 0x67, 0xd8, 0xf9, 0x99, 0xdc, 0x17, 0xeb, 0x0c, 0x57, 0x11, 0x89 } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 128, + { 0x5e, 0x48, 0xe0, 0x3d, 0xdd, 0xec, 0xa1, 0xa9, 0x59, 0xd9, 0xee, 0x4d, 0xa3, 0xf1, 0xc3, 0xf0, 0xec, 0x2a, 0xd0, 0xfe, 0x7a, 0x70, 0xc1, 0x77, 0x63, 0x27, 0x31, 0x94, 0x4c, 0x3c, 0xd0, 0xd5, 0x8f, 0x4c, 0x4d, 0x96, 0x59, 0x74, 0x6e, 0x68, 0x5a, 0x76, 0xc9, 0x3c, 0x2b, 0x33, 0x3a, 0x64, 0x3d, 0xb2, 0x1d, 0x29, 0xbc, 0xdc, 0x6d, 0x11, 0xb5, 0xf6, 0x90, 0x87, 0x17, 0xb5, 0x77, 0x65, 0x99, 0xff, 0x30, 0x88, 0xb2, 0x01, 0x4f, 0xfc, 0x51, 0xf1, 0x8d, 0x93, 0x22, 0x24, 0xf1, 0x05, 0x9b, 0x22, 0x39, 0xea, 0x56, 0x44, 0xe8, 0x06, 0x9a, 0x5c, 0xc4, 0x31, 0xae, 0xf6, 0x07, 0x38, 0x0a, 0xa9, 0x24, 0xc1, 0x58, 0xab, 0xcb, 0xdd, 0x97, 0x51, 0xf5, 0x4e, 0x67, 0x79, 0xc4, 0xec, 0x23, 0x21, 0x68, 0xb0, 0x01, 0x4f, 0x4c, 0x8b, 0x49, 0x7b, 0xe9, 0x49, 0xae, 0xe6, 0x57, 0x51 } +, + /* Prime 1 */ + 64, + { 0xf9, 0x47, 0x1f, 0x2d, 0x22, 0x13, 0xa9, 0x2c, 0xf0, 0xa7, 0xc3, 0x84, 0x04, 0xd4, 0x0e, 0x32, 0x2f, 0x14, 0xf4, 0x39, 0x61, 0xf0, 0x1e, 0x92, 0x33, 0x63, 0xcf, 0x66, 0x53, 0xe8, 0x98, 0x4f, 0xb6, 0xe6, 0x8d, 0x66, 0xe6, 0xf1, 0x59, 0x80, 0x3a, 0x44, 0xbc, 0xdd, 0x09, 0xe0, 0x56, 0x19, 0x6d, 0xa4, 0x00, 0x7a, 0xe2, 0xa3, 0x7f, 0x40, 0x57, 0xbf, 0x7e, 0x3b, 0x5e, 0x4a, 0x80, 0x23 } +, + /* Prime 2 */ + 64, + { 0xe3, 0xc5, 0xf8, 0xcb, 0xfd, 0x51, 0xc6, 0xc2, 0x66, 0xb1, 0xa3, 0x2f, 0xb2, 0xf6, 0xfa, 0x48, 0x9b, 0x97, 0x54, 0xb2, 0x27, 0xc7, 0x7f, 0x53, 0x59, 0xc5, 0x5d, 0xfa, 0x03, 0x80, 0xfe, 0x9a, 0x02, 0xb4, 0xd3, 0x95, 0x05, 0xf3, 0xab, 0x36, 0x95, 0x7c, 0xeb, 0xfa, 0xd5, 0x34, 0xd7, 0xf9, 0xa2, 0x67, 0xeb, 0xee, 0x19, 0xaf, 0xe5, 0xc6, 0x24, 0x04, 0x3e, 0x30, 0x19, 0xd0, 0xac, 0x63 } +, + /* Prime exponent 1 */ + 64, + { 0x2c, 0xf4, 0x79, 0x97, 0xdf, 0x1c, 0x62, 0x97, 0x1b, 0x33, 0x76, 0x1c, 0x19, 0xee, 0xd0, 0x3c, 0x96, 0xa7, 0x15, 0xc0, 0x3f, 0x7c, 0x59, 0x57, 0x0e, 0x73, 0x82, 0x94, 0xb6, 0xaf, 0x2c, 0xc0, 0xbb, 0x80, 0x6a, 0xa1, 0xd3, 0x26, 0x55, 0x78, 0xbd, 0x89, 0x65, 0xf2, 0x0a, 0xf4, 0xed, 0x32, 0x1a, 0xc6, 0xc7, 0xdb, 0x61, 0x82, 0x10, 0xd1, 0xde, 0xc1, 0x47, 0x17, 0x97, 0xd2, 0xa1, 0xb7 } +, + /* Prime exponent 2 */ + 64, + { 0xa6, 0xc0, 0x29, 0xbb, 0xd5, 0x91, 0xc7, 0xcc, 0x4c, 0x78, 0x61, 0xfa, 0xaa, 0xaf, 0x8b, 0x5e, 0x1a, 0xa2, 0x78, 0x7c, 0x11, 0x09, 0x49, 0x5a, 0xd1, 0x0e, 0xe0, 0x15, 0x07, 0xf9, 0xa8, 0xeb, 0x41, 0x6d, 0xf6, 0xb4, 0x53, 0xee, 0x26, 0xfb, 0x48, 0x07, 0x73, 0x8f, 0x68, 0x05, 0x4e, 0xd4, 0x50, 0x24, 0x7a, 0xa2, 0x0e, 0xa6, 0x2a, 0xb6, 0x9b, 0x69, 0x8b, 0xc9, 0x95, 0x2c, 0xa2, 0xf7 } +, + /* Coefficient */ + 64, + { 0xaa, 0xd0, 0x60, 0xde, 0x5e, 0xdb, 0x35, 0x81, 0x8b, 0xd6, 0x3e, 0x85, 0xd4, 0x2e, 0xee, 0x55, 0xe4, 0xcf, 0x8f, 0xa4, 0x2d, 0x4e, 0xa5, 0x92, 0x83, 0xce, 0xf9, 0x6a, 0xca, 0xad, 0x55, 0x5d, 0x47, 0x8d, 0x2f, 0xd7, 0xc3, 0x8f, 0xa9, 0x31, 0xfa, 0x1a, 0xeb, 0x6d, 0xe5, 0x66, 0x55, 0x3d, 0x08, 0xf1, 0xcb, 0xc0, 0x6a, 0x51, 0x0f, 0xc2, 0xe5, 0x69, 0xb5, 0xa8, 0x22, 0x67, 0xac, 0x91 } + +} +, +{{ + "PKCS#1 v1.5 Encryption Example 6.1", + /* Message */ + 19, + { 0xa3, 0xe1, 0x52, 0x75, 0xfb, 0x33, 0xae, 0xc3, 0x7b, 0xd3, 0xdd, 0x58, 0x2e, 0x19, 0xf5, 0xd3, 0x8b, 0x9d, 0x0d } +, + /* Seed */ + 106, + { 0x78, 0xda, 0xa6, 0x1c, 0x07, 0xf9, 0x41, 0xb4, 0xb4, 0x40, 0xe7, 0x38, 0x33, 0x8d, 0x06, 0xcc, 0x15, 0x7a, 0x01, 0x57, 0x4a, 0x72, 0xfa, 0x78, 0xd3, 0x63, 0xdc, 0xe9, 0x94, 0x09, 0x04, 0x22, 0x0a, 0x71, 0x32, 0x35, 0x69, 0x96, 0xf0, 0x7c, 0x01, 0xd5, 0x4e, 0xe5, 0x4f, 0xa3, 0x2c, 0x5f, 0x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xc1, 0x9c, 0x4d, 0x04, 0xf6, 0x3f } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Encryption Example 6.2", + /* Message */ + 50, + { 0x44, 0x3a, 0xb0, 0x3c, 0x46, 0x04, 0xdb, 0xd8, 0xbf, 0x80, 0x06, 0xae, 0xcc, 0x2a, 0xa8, 0xde, 0x64, 0xa1, 0x55, 0xb4, 0xf9, 0x0c, 0xdb, 0x08, 0x59, 0x98, 0x6d, 0x5c, 0xa3, 0x60, 0x66, 0x03, 0x59, 0x80, 0x8c, 0x59, 0xbd, 0x9c, 0x2d, 0xe7, 0x75, 0xfc, 0x18, 0x52, 0x02, 0x24, 0xb6, 0x69, 0xc3, 0x25 } +, + /* Seed */ + 75, + { 0x3a, 0x6a, 0x60, 0x89, 0xf7, 0x27, 0xdd, 0x16, 0x92, 0x97, 0xa5, 0x79, 0xfc, 0xaf, 0x8e, 0xa7, 0xf8, 0xe1, 0x2d, 0x54, 0x27, 0xf1, 0xf7, 0x90, 0x1a, 0x90, 0x22, 0xa2, 0x1e, 0x2d, 0x82, 0xd2, 0xf0, 0x8e, 0x63, 0xba, 0xca, 0x26, 0x7b, 0x65, 0x3a, 0xaf, 0x89, 0xde, 0x23, 0x2b, 0xa3, 0xd3, 0x92, 0xd1, 0xcb, 0x49, 0xdd, 0x76, 0xb3, 0x88, 0xb2, 0xda, 0xdf, 0xb0, 0x09, 0x4f, 0xda, 0x97, 0x18, 0xf1, 0x78, 0x37, 0x38, 0xd1, 0x8f, 0xa7, 0xaa, 0xa6, 0x29 } +, + /* Encryption */ + 128, + { 0x5a, 0x0a, 0xe0, 0xde, 0x28, 0xfd, 0x33, 0xcc, 0x98, 0x01, 0xbf, 0x4d, 0xd3, 0x06, 0x71, 0x23, 0x74, 0x53, 0x63, 0xca, 0xce, 0x4d, 0xd8, 0xb7, 0xb8, 0xb8, 0x11, 0xd6, 0x48, 0x2f, 0x59, 0x12, 0x0c, 0x0d, 0x65, 0x3e, 0xee, 0x86, 0xa6, 0x1a, 0x01, 0x2a, 0x18, 0x0e, 0xc5, 0xd1, 0x7e, 0x99, 0x14, 0x6d, 0x0c, 0xca, 0x0a, 0x58, 0x7c, 0x85, 0xcf, 0x01, 0xdc, 0x7a, 0xdd, 0x84, 0x23, 0x0d, 0x91, 0x80, 0xbd, 0xdf, 0x5a, 0x77, 0x19, 0xf6, 0x9d, 0x1f, 0xc4, 0x81, 0xaf, 0x6f, 0x47, 0xdb, 0x8c, 0xbd, 0x4e, 0xe1, 0x87, 0x1a, 0x57, 0x3f, 0xc8, 0x76, 0x7c, 0xe8, 0xbe, 0xed, 0xb5, 0xc7, 0x3f, 0xa9, 0x3f, 0x0c, 0x53, 0x80, 0x4a, 0xfe, 0x2e, 0x76, 0xcc, 0xeb, 0xb8, 0x7c, 0xba, 0x00, 0xcd, 0xac, 0x94, 0xde, 0x40, 0xe2, 0xb0, 0xbe, 0xaa, 0x8e, 0x2e, 0x41, 0x58, 0xc7, 0x78, 0x50 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 6.3", + /* Message */ + 57, + { 0xd1, 0xba, 0x30, 0xe8, 0x8c, 0xdd, 0xa3, 0x3d, 0x2b, 0x41, 0x89, 0x6f, 0x43, 0xdf, 0x08, 0x1e, 0xef, 0x20, 0xca, 0xf7, 0x8d, 0x7c, 0x1b, 0x97, 0x0c, 0x6a, 0x61, 0x72, 0xe8, 0x38, 0x39, 0xdc, 0x43, 0xd4, 0xbe, 0x29, 0xf9, 0xa7, 0x72, 0xba, 0x41, 0x59, 0x73, 0x8b, 0xc6, 0x13, 0x29, 0x68, 0x61, 0x8d, 0xc7, 0x19, 0x7c, 0x0e, 0xdc, 0x57, 0xa1 } +, + /* Seed */ + 68, + { 0x9b, 0xb6, 0x2b, 0xf9, 0xa7, 0x51, 0xfe, 0x41, 0x81, 0x66, 0x43, 0x68, 0x98, 0xed, 0xe8, 0x35, 0xcf, 0xae, 0xe2, 0xf5, 0x0e, 0xfc, 0xad, 0x60, 0x94, 0x2f, 0x2f, 0xb2, 0xda, 0x1a, 0x20, 0x38, 0x03, 0xf0, 0xbe, 0x80, 0xbe, 0xb1, 0x7f, 0xfa, 0xd0, 0xda, 0xb2, 0x18, 0xb1, 0x28, 0x02, 0x7f, 0x34, 0x97, 0xa4, 0xf8, 0xd4, 0x1a, 0xb9, 0xa1, 0xbe, 0x26, 0x4e, 0x96, 0xb4, 0x45, 0x48, 0x76, 0x7b, 0xe8, 0xd4, 0xa7 } +, + /* Encryption */ + 128, + { 0x81, 0x19, 0x1c, 0x54, 0x75, 0x27, 0x3d, 0xe6, 0x6a, 0x41, 0xbf, 0x56, 0x04, 0xf3, 0x2b, 0x58, 0xb7, 0x59, 0xa1, 0x4e, 0x74, 0x26, 0xc7, 0x46, 0xde, 0x4b, 0x53, 0xba, 0xf7, 0x80, 0xbb, 0xa4, 0x2b, 0x42, 0xe9, 0x27, 0x8a, 0xa9, 0x45, 0x27, 0xf0, 0xee, 0xbf, 0x85, 0x5f, 0x46, 0x2d, 0x6f, 0xbb, 0x29, 0x78, 0xa4, 0x65, 0x30, 0x37, 0xd8, 0xb4, 0x48, 0xe1, 0xb8, 0x07, 0xa1, 0x83, 0x1d, 0xbc, 0x53, 0x22, 0xd0, 0x66, 0x98, 0x4e, 0xec, 0x28, 0x11, 0x4f, 0xb7, 0x20, 0x1c, 0x79, 0x6b, 0x57, 0x3a, 0xdc, 0xc5, 0xcc, 0x92, 0x7f, 0x3a, 0x58, 0x97, 0xb2, 0x00, 0x55, 0x64, 0xef, 0x1a, 0x2c, 0x01, 0x67, 0xf5, 0x43, 0x65, 0x51, 0x18, 0x34, 0xac, 0x6f, 0x49, 0x58, 0xb8, 0x31, 0x8d, 0x09, 0xe6, 0x78, 0x54, 0xd6, 0x31, 0xca, 0x52, 0x80, 0x76, 0x86, 0xab, 0x70, 0x5d, 0x71, 0xa3 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 6.4", + /* Message */ + 47, + { 0xa5, 0x4b, 0xc2, 0x27, 0x8b, 0x56, 0x76, 0x85, 0xc9, 0xb5, 0x68, 0x54, 0xe4, 0xc1, 0xc4, 0x06, 0xd9, 0x16, 0x17, 0x47, 0xc6, 0x81, 0x34, 0x80, 0x16, 0x3e, 0xe3, 0xaf, 0x23, 0xb2, 0x1e, 0xd1, 0x99, 0x83, 0xe0, 0xf4, 0x2b, 0xfc, 0x93, 0x25, 0xcb, 0x5c, 0x82, 0xe1, 0xa4, 0x7b, 0x8f } +, + /* Seed */ + 78, + { 0xcc, 0xba, 0x5f, 0xa5, 0xc9, 0x4e, 0x79, 0x83, 0x2a, 0xb0, 0x46, 0xc9, 0x77, 0x74, 0x95, 0xb1, 0x63, 0xbd, 0x3a, 0xf2, 0x17, 0x59, 0x0f, 0xec, 0x5a, 0xc4, 0x8c, 0x62, 0x78, 0x6a, 0x27, 0xf3, 0x70, 0xd2, 0x85, 0x99, 0x55, 0xe4, 0x5a, 0xfb, 0x2b, 0x79, 0xf1, 0x2d, 0xe4, 0x16, 0x11, 0x45, 0xbe, 0x62, 0xac, 0x13, 0xa0, 0x3b, 0xf4, 0x81, 0x95, 0xfb, 0x9e, 0x5a, 0x18, 0xb8, 0x2d, 0xeb, 0xbf, 0x3d, 0xdf, 0xc8, 0x08, 0x25, 0xd5, 0x93, 0xfc, 0xd4, 0x02, 0xe7, 0x4e, 0xef } +, + /* Encryption */ + 128, + { 0x3d, 0xe4, 0xc3, 0xe0, 0x59, 0x35, 0x7b, 0x8a, 0x54, 0x83, 0x7e, 0xa1, 0x59, 0x62, 0xcf, 0xe2, 0x00, 0x7c, 0x5e, 0xa8, 0x98, 0x5c, 0x93, 0x51, 0x91, 0x64, 0xa6, 0x89, 0xb7, 0x55, 0xb6, 0x1c, 0x8b, 0xd2, 0x73, 0x96, 0x9d, 0x33, 0x3c, 0x4b, 0xcd, 0x9b, 0x06, 0x03, 0x53, 0xc3, 0x7b, 0xaf, 0x13, 0xeb, 0x42, 0x2f, 0x1c, 0xb9, 0x77, 0x56, 0xe6, 0xb4, 0x94, 0x6a, 0xdf, 0xe1, 0xaf, 0x75, 0xe9, 0xfe, 0x2d, 0x95, 0xb4, 0xb1, 0x3d, 0xa1, 0x73, 0x2b, 0xd8, 0xb8, 0xbe, 0x11, 0x97, 0x02, 0x79, 0x19, 0x53, 0x0c, 0x34, 0x7f, 0x3d, 0xd1, 0x03, 0x9e, 0x34, 0x8a, 0x53, 0xb1, 0x16, 0xf9, 0xf8, 0xfe, 0x89, 0x36, 0xa8, 0x4a, 0xcc, 0x39, 0xf2, 0xe0, 0x69, 0x56, 0xb6, 0x78, 0xd2, 0x0f, 0xdf, 0x95, 0x17, 0x07, 0x2e, 0x02, 0xf5, 0x70, 0x78, 0xfd, 0xc0, 0x46, 0x59, 0x40, 0x0c, 0x5c } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 6.5", + /* Message */ + 58, + { 0xf3, 0xc0, 0x0b, 0x00, 0x9e, 0x5e, 0x08, 0xa6, 0x3b, 0xe1, 0xe4, 0x00, 0x35, 0xcd, 0xac, 0xa5, 0x01, 0x1c, 0xc7, 0x01, 0xcf, 0x7e, 0xeb, 0xcb, 0x99, 0xf0, 0xff, 0xe1, 0x7c, 0xfd, 0x0a, 0x4b, 0xf7, 0xbe, 0xfd, 0x2d, 0xd5, 0x36, 0xac, 0x94, 0x6d, 0xb7, 0x97, 0xfd, 0xbc, 0x67, 0x9c, 0xbe, 0x68, 0xf1, 0xa2, 0xf3, 0x62, 0x59, 0xc5, 0x58, 0xf0, 0x4d } +, + /* Seed */ + 67, + { 0xe2, 0x2d, 0x5e, 0x43, 0xb1, 0xeb, 0xa1, 0xac, 0x0c, 0xe6, 0x5c, 0x32, 0x70, 0x51, 0x0e, 0x0f, 0x13, 0xc9, 0x4e, 0x96, 0x24, 0xee, 0x52, 0x56, 0x59, 0xef, 0x4d, 0x57, 0x37, 0x88, 0x20, 0xc9, 0x35, 0x22, 0x9b, 0x30, 0x99, 0xaa, 0x2b, 0x23, 0x50, 0x61, 0x4f, 0x8c, 0xc4, 0x29, 0x58, 0x15, 0xa2, 0xc9, 0xed, 0xb2, 0xd9, 0xc5, 0x9c, 0x73, 0xd1, 0xaa, 0x90, 0x0c, 0x21, 0x34, 0xc0, 0xa7, 0xd0, 0x90, 0x9c } +, + /* Encryption */ + 128, + { 0x53, 0x3e, 0x67, 0xa2, 0xbc, 0x5b, 0x3f, 0x01, 0x34, 0x2d, 0x8c, 0xb8, 0xd9, 0x25, 0xd7, 0x3b, 0x4d, 0xb3, 0x4c, 0xb6, 0x75, 0xda, 0x90, 0x39, 0x22, 0x6a, 0x98, 0xe4, 0xd8, 0x13, 0xc6, 0x20, 0x11, 0x09, 0x90, 0xa8, 0xe6, 0xac, 0xba, 0x50, 0xfd, 0x04, 0xf3, 0x30, 0x7d, 0xeb, 0xaf, 0x20, 0xd4, 0xf3, 0x74, 0xcf, 0x6d, 0xe0, 0xd9, 0xb2, 0x1d, 0x86, 0xe2, 0x66, 0x07, 0x9c, 0xf2, 0xf1, 0x8b, 0x45, 0x03, 0x20, 0x8a, 0x21, 0x5d, 0xe2, 0xb1, 0x1c, 0xca, 0x9e, 0x34, 0x64, 0xfc, 0x5a, 0xc1, 0xdd, 0x7e, 0x96, 0xb2, 0xfc, 0x04, 0x09, 0xe4, 0x2f, 0x46, 0xa5, 0x06, 0x12, 0xa6, 0xb2, 0x06, 0x1e, 0xd1, 0x61, 0x9a, 0x7f, 0xe4, 0x67, 0x96, 0xed, 0x8f, 0x52, 0x06, 0x9a, 0x5b, 0xfc, 0x84, 0x08, 0xd5, 0x58, 0xf5, 0x2a, 0x03, 0x33, 0x2e, 0xe8, 0xed, 0xde, 0xf8, 0xf7, 0x45, 0xd9 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 6.6", + /* Message */ + 53, + { 0xaa, 0xfe, 0x5b, 0x27, 0x11, 0x11, 0xef, 0xb8, 0x79, 0x2f, 0x5a, 0xa9, 0x23, 0x83, 0x07, 0x29, 0x76, 0xb7, 0x2a, 0x0a, 0x27, 0x2f, 0x90, 0xc5, 0x24, 0x61, 0xf8, 0x8a, 0xfb, 0x1b, 0xb6, 0xb7, 0xec, 0x26, 0x38, 0x1c, 0x65, 0x76, 0xa4, 0x10, 0x87, 0xa0, 0x39, 0x80, 0x9d, 0x14, 0xf6, 0x11, 0x60, 0x67, 0x59, 0x4e, 0xbb } +, + /* Seed */ + 72, + { 0x75, 0x0e, 0xf0, 0x86, 0x9f, 0x8c, 0x75, 0x7e, 0xf4, 0x31, 0x57, 0x8b, 0x45, 0xa6, 0xe7, 0x41, 0xbd, 0x1d, 0x96, 0x0e, 0xfc, 0x37, 0x89, 0xb1, 0x0d, 0x2b, 0xde, 0x27, 0x38, 0x18, 0x07, 0x4e, 0xbf, 0xe5, 0xfa, 0xae, 0x10, 0xac, 0x24, 0x4f, 0x89, 0xf6, 0xc0, 0x2d, 0xe5, 0xd1, 0xad, 0xae, 0xfc, 0x7a, 0x8f, 0xd2, 0x4d, 0x7b, 0xc3, 0x76, 0xfd, 0x65, 0xd3, 0x5e, 0x39, 0x50, 0x8c, 0x42, 0x36, 0xac, 0xbe, 0x2d, 0x5c, 0xa7, 0x69, 0x4b } +, + /* Encryption */ + 128, + { 0x34, 0x4d, 0x43, 0x37, 0x61, 0x2b, 0x22, 0xdd, 0x40, 0x2b, 0xe3, 0x79, 0xe6, 0xb2, 0x65, 0x0b, 0x51, 0x9e, 0xf3, 0x7b, 0x7a, 0xb4, 0x85, 0x81, 0x94, 0x52, 0xd1, 0x67, 0xc1, 0xb2, 0x15, 0xdb, 0xd3, 0xfb, 0x24, 0xf9, 0xb2, 0xf9, 0x29, 0x86, 0x69, 0xcb, 0x1a, 0xee, 0x14, 0x1a, 0x7d, 0x89, 0x01, 0x64, 0x20, 0x43, 0x11, 0x1f, 0xc3, 0x8b, 0x3f, 0x40, 0xef, 0x0b, 0x7f, 0xfd, 0x7d, 0xf7, 0x6c, 0x2d, 0x92, 0xe3, 0x29, 0x41, 0x1c, 0x75, 0xe0, 0xf1, 0x72, 0x85, 0xbb, 0x6b, 0xb8, 0x26, 0x88, 0x12, 0x8e, 0xd9, 0xbb, 0x95, 0x1c, 0xae, 0xdd, 0x7d, 0x06, 0x7e, 0xdd, 0x0b, 0x13, 0xe8, 0x27, 0x5a, 0xc8, 0x86, 0x25, 0xd9, 0x7c, 0xe8, 0xd2, 0x0b, 0x69, 0xb3, 0x57, 0x38, 0xb2, 0xf4, 0x72, 0x6e, 0x29, 0x84, 0xb8, 0xdf, 0xa8, 0x66, 0x95, 0xaa, 0xe8, 0x8d, 0x9e, 0x17, 0x6d, 0xf6 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 6.7", + /* Message */ + 37, + { 0xa1, 0x22, 0x4d, 0xf9, 0xaa, 0xb6, 0x58, 0x78, 0x45, 0xb2, 0xa3, 0x93, 0xa5, 0xa8, 0x76, 0xc1, 0x7d, 0x95, 0x9d, 0x53, 0x5b, 0x54, 0x19, 0xd4, 0x12, 0xa9, 0xa5, 0x31, 0xbb, 0x43, 0x7e, 0x1d, 0xac, 0x1b, 0x54, 0x6d, 0x62 } +, + /* Seed */ + 88, + { 0x76, 0x1d, 0xc4, 0xf5, 0x1b, 0xc8, 0x51, 0x8d, 0x62, 0x7c, 0x45, 0xb3, 0xe9, 0x81, 0x8b, 0x85, 0x42, 0xa0, 0x6f, 0xfe, 0x17, 0x2b, 0xe3, 0xaf, 0x5c, 0xe7, 0xa9, 0x05, 0x3f, 0xe5, 0x4e, 0x69, 0x70, 0x12, 0x49, 0x73, 0x37, 0x4d, 0xfc, 0xc1, 0xf4, 0x9f, 0xcf, 0xfe, 0x95, 0x7a, 0xae, 0x8c, 0x9c, 0x3b, 0x13, 0x0f, 0x46, 0x05, 0xd2, 0xc3, 0xef, 0xa2, 0x93, 0x2a, 0xd0, 0x83, 0xde, 0xc5, 0x8e, 0x70, 0xd4, 0xf6, 0x92, 0x6c, 0x80, 0xb5, 0xd4, 0x89, 0x1a, 0x1a, 0x55, 0x9e, 0xdb, 0x0c, 0xaf, 0xfa, 0xca, 0xd7, 0x5e, 0xb2, 0x64, 0x83 } +, + /* Encryption */ + 128, + { 0x78, 0x5f, 0x6a, 0xaa, 0xb4, 0xd2, 0xf3, 0x18, 0xd4, 0xaf, 0x37, 0xb6, 0xe0, 0x07, 0x4e, 0xd5, 0xa4, 0x19, 0x4f, 0xa6, 0x05, 0xa7, 0xec, 0x87, 0xd0, 0x5a, 0x07, 0xf3, 0x34, 0x9b, 0x5b, 0x92, 0xf5, 0xfc, 0x47, 0x90, 0xea, 0xb1, 0x37, 0x86, 0xcb, 0xf0, 0x35, 0xc7, 0x8f, 0xfc, 0xf1, 0x34, 0x4d, 0x1f, 0x3e, 0xcd, 0xaa, 0xe0, 0x16, 0x72, 0x22, 0x2e, 0x6d, 0x4a, 0x96, 0x55, 0x59, 0xe2, 0xc0, 0x82, 0x91, 0xcb, 0x1d, 0x4c, 0x2d, 0x4e, 0x68, 0xff, 0x8e, 0xe7, 0x15, 0x23, 0xf6, 0xdd, 0xae, 0xc5, 0x0a, 0x4a, 0xb2, 0x2e, 0xdc, 0xa2, 0x47, 0x36, 0x4c, 0x92, 0xd8, 0x73, 0x99, 0xe8, 0xa7, 0x1d, 0xf7, 0x43, 0x6b, 0x62, 0xd8, 0xba, 0x8a, 0xd2, 0x02, 0x94, 0xcb, 0xc6, 0x0d, 0xca, 0xe0, 0x30, 0x5c, 0x79, 0x73, 0xf7, 0xfc, 0xb4, 0xa5, 0xcb, 0xed, 0x15, 0x71, 0x3a, 0x7a, 0x16 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 6.8", + /* Message */ + 48, + { 0x1e, 0x0e, 0x3f, 0x65, 0x0c, 0x32, 0xdb, 0xb2, 0xf6, 0x91, 0x6f, 0x36, 0xf1, 0x35, 0xbc, 0xae, 0x88, 0x1d, 0x54, 0x55, 0x07, 0x40, 0x2d, 0x6a, 0xfd, 0x3d, 0x5b, 0x3b, 0xd8, 0x38, 0x5a, 0x50, 0xb4, 0xfa, 0xd6, 0xf7, 0x89, 0x49, 0xfd, 0xe6, 0x21, 0x64, 0xed, 0x76, 0x89, 0xe5, 0xf9, 0xa4 } +, + /* Seed */ + 77, + { 0xee, 0xa9, 0x0a, 0x54, 0xd0, 0x16, 0xda, 0x7e, 0x8f, 0x08, 0x76, 0xa7, 0x33, 0xb0, 0xf2, 0xa0, 0x6f, 0x90, 0xa7, 0x3c, 0x1a, 0x3c, 0xd6, 0x39, 0xb6, 0xcf, 0xa9, 0x06, 0xce, 0x08, 0xef, 0x78, 0x8b, 0xb6, 0xfe, 0xa7, 0x4f, 0x22, 0xeb, 0x91, 0xa6, 0xab, 0x32, 0x84, 0xcd, 0xfc, 0x1e, 0x72, 0xe6, 0x3e, 0x78, 0xd1, 0x8a, 0x64, 0xd6, 0x7f, 0x9d, 0x1a, 0x29, 0x19, 0x49, 0xed, 0x2e, 0x32, 0x3e, 0x91, 0xdc, 0x03, 0x38, 0x76, 0xee, 0xeb, 0x09, 0xff, 0xa7, 0x1f, 0x59 } +, + /* Encryption */ + 128, + { 0x6b, 0xbd, 0xae, 0x20, 0xf9, 0x89, 0xbf, 0xaa, 0x5d, 0x65, 0xda, 0xdc, 0xd6, 0x1a, 0x86, 0xb6, 0x63, 0x07, 0xa0, 0x60, 0x2f, 0xb5, 0x51, 0xa7, 0x38, 0x06, 0x12, 0x2d, 0xb1, 0x88, 0xec, 0x1d, 0x41, 0xe8, 0x4d, 0xaa, 0x2c, 0xc7, 0xd6, 0xbe, 0x54, 0x1e, 0x12, 0x28, 0x88, 0x09, 0xa1, 0x7e, 0x08, 0x5f, 0x2c, 0xaf, 0xa8, 0xae, 0x13, 0x67, 0x0e, 0x0f, 0x33, 0x65, 0xa1, 0x47, 0x1c, 0xb3, 0x15, 0x7c, 0x06, 0xe0, 0xf6, 0x3b, 0x82, 0x00, 0xf3, 0x16, 0x0c, 0x16, 0x3f, 0xde, 0x7c, 0x90, 0x1e, 0xf3, 0x26, 0xe5, 0x70, 0x0c, 0x9f, 0x5e, 0x07, 0xfe, 0x01, 0x98, 0x81, 0x0f, 0xa8, 0x0c, 0x8c, 0x5d, 0xc5, 0x3a, 0x50, 0xbc, 0xe2, 0x54, 0xf7, 0xd1, 0x99, 0x01, 0xcf, 0x6c, 0xbb, 0x60, 0x34, 0x13, 0xe4, 0x1f, 0x90, 0x30, 0xe7, 0x39, 0xc8, 0xba, 0x96, 0x49, 0x97, 0x84, 0x74, 0x99 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 6.9", + /* Message */ + 32, + { 0x73, 0xdd, 0xf0, 0xa1, 0x4d, 0x57, 0xba, 0x65, 0xb4, 0xf6, 0x93, 0xac, 0x76, 0x1e, 0x20, 0x2b, 0x1e, 0x5b, 0x85, 0x7c, 0x8b, 0x34, 0x04, 0xe1, 0x41, 0x85, 0xdf, 0xa8, 0xaa, 0xf0, 0x49, 0x89 } +, + /* Seed */ + 93, + { 0xfd, 0x43, 0x3d, 0x7b, 0x01, 0x76, 0xb7, 0x31, 0xd7, 0x80, 0xdd, 0x6c, 0x58, 0x51, 0xb8, 0x2f, 0x17, 0x6d, 0x62, 0xb8, 0x0d, 0x96, 0xae, 0xb6, 0x31, 0xd7, 0xfb, 0x8a, 0xc5, 0xbe, 0x55, 0xac, 0x21, 0x7f, 0x4e, 0x08, 0xbc, 0x7e, 0xcf, 0x81, 0xf8, 0xe3, 0xf5, 0xdd, 0xaa, 0xcd, 0xc6, 0xc2, 0x17, 0x8d, 0xf7, 0x81, 0x88, 0x23, 0x97, 0x53, 0x3a, 0x63, 0x8e, 0x62, 0xf0, 0x74, 0xac, 0x48, 0x8f, 0x4c, 0x12, 0xaa, 0x57, 0xbe, 0x2e, 0xce, 0x5b, 0xb6, 0xe9, 0x09, 0x6c, 0xd9, 0x22, 0x59, 0xa4, 0x5b, 0x0b, 0x03, 0x2f, 0x10, 0x14, 0x31, 0xa2, 0x8b, 0x86, 0x40, 0xfb } +, + /* Encryption */ + 128, + { 0xae, 0x97, 0xff, 0x43, 0x4e, 0x9a, 0x5e, 0xe4, 0x87, 0x76, 0x1d, 0xb3, 0x56, 0x90, 0x0b, 0x06, 0x37, 0x37, 0x46, 0x5b, 0xe5, 0x05, 0x8d, 0xc0, 0x3a, 0x28, 0xa3, 0x22, 0xe5, 0xc0, 0xe0, 0x91, 0xb7, 0x99, 0xbf, 0x65, 0x94, 0x55, 0xcf, 0xbe, 0x05, 0x42, 0x7a, 0xc4, 0xd0, 0x44, 0x05, 0xe5, 0x6e, 0xe0, 0x4e, 0x06, 0x3a, 0x23, 0x73, 0xdb, 0xcb, 0x9b, 0x4f, 0xa1, 0x6e, 0x43, 0x07, 0x94, 0x6a, 0x49, 0xb3, 0x56, 0x34, 0x52, 0x0d, 0x41, 0x6f, 0x65, 0xc3, 0xc3, 0x22, 0xed, 0xc5, 0x46, 0x71, 0x56, 0x91, 0x28, 0xa2, 0xa1, 0x52, 0xa7, 0x6f, 0xe4, 0x44, 0xc4, 0x30, 0xaa, 0x6f, 0x03, 0xc4, 0x12, 0x9c, 0x6e, 0x21, 0x31, 0x75, 0x5d, 0x76, 0x4c, 0xec, 0x4a, 0x14, 0x86, 0xa8, 0x1b, 0xa8, 0xa3, 0x16, 0x8d, 0x16, 0xe7, 0x4d, 0xca, 0x8e, 0x77, 0xbb, 0xfd, 0x67, 0xea, 0x37, 0x2b } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 6.10", + /* Message */ + 29, + { 0xef, 0x3e, 0x76, 0x98, 0xe7, 0xd9, 0xcc, 0x86, 0x3b, 0x46, 0x6b, 0xb2, 0x88, 0x55, 0x6e, 0x4a, 0xc2, 0x52, 0x82, 0xe0, 0x94, 0xfb, 0x5b, 0x57, 0xc1, 0x76, 0x17, 0xbb, 0x98 } +, + /* Seed */ + 96, + { 0xdb, 0x90, 0xa7, 0x58, 0x0d, 0x8d, 0x42, 0x9e, 0x22, 0xbd, 0x7e, 0xa5, 0xc7, 0xb4, 0xcd, 0x0c, 0x65, 0xad, 0x0e, 0x2e, 0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7a, 0x39, 0x23, 0x66, 0x92, 0xfe, 0x35, 0x82, 0x14, 0x0b, 0x21, 0x72, 0xce, 0x64, 0x7e, 0xed, 0x41, 0x76, 0x85, 0xc6, 0xe1, 0xdb, 0x85, 0x6c } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 6.11", + /* Message */ + 31, + { 0xf8, 0x69, 0x18, 0x47, 0x4f, 0x88, 0x16, 0x97, 0x11, 0x1b, 0xdd, 0xdc, 0x1f, 0x00, 0x61, 0x3e, 0xb2, 0xc3, 0xd9, 0xc1, 0x78, 0x76, 0x68, 0x35, 0x3e, 0xbb, 0x02, 0xb3, 0x20, 0xa3, 0x26 } +, + /* Seed */ + 94, + { 0xcb, 0x7d, 0x99, 0xda, 0x9b, 0x11, 0xea, 0x57, 0xf6, 0x40, 0x55, 0x43, 0x44, 0x7d, 0xd1, 0x5f, 0xb5, 0xcc, 0xa0, 0xa1, 0x0f, 0x3b, 0x69, 0xb4, 0xd2, 0x33, 0x09, 0xef, 0xf2, 0x75, 0x0c, 0x48, 0x6c, 0xa6, 0x55, 0x32, 0x5b, 0x55, 0xa3, 0x27, 0xff, 0xe8, 0xbd, 0x6d, 0xca, 0x99, 0xbc, 0x8e, 0xfb, 0x5b, 0xc2, 0x94, 0x2e, 0xc0, 0x39, 0xe2, 0x84, 0x25, 0xe4, 0xa5, 0x6a, 0x07, 0xd3, 0x80, 0x12, 0xf1, 0x0d, 0x21, 0x5a, 0x22, 0xd6, 0x37, 0x68, 0x59, 0x43, 0xd3, 0x64, 0x72, 0x53, 0x01, 0xdd, 0x40, 0xe2, 0x17, 0x22, 0x8a, 0xb7, 0x91, 0x59, 0x89, 0x98, 0x83, 0x6b, 0xbf } +, + /* Encryption */ + 128, + { 0x2a, 0x40, 0x87, 0x80, 0xad, 0x51, 0x4e, 0x56, 0x71, 0xfe, 0x1d, 0xfc, 0x36, 0x7d, 0x7a, 0xa4, 0x65, 0xfc, 0x34, 0x69, 0xf1, 0xc1, 0x52, 0xae, 0xe1, 0x81, 0x45, 0xe0, 0xf5, 0xf0, 0x75, 0x9f, 0x44, 0x69, 0xb4, 0x3d, 0x55, 0x12, 0x3f, 0x5d, 0xc9, 0xff, 0xc6, 0x17, 0xf2, 0x3f, 0xa4, 0x9b, 0x78, 0x96, 0x02, 0x19, 0x66, 0x0e, 0xc6, 0x22, 0x74, 0xd6, 0xc5, 0x9b, 0xa3, 0x14, 0x60, 0xbd, 0x10, 0x94, 0x1e, 0xbb, 0x5e, 0x05, 0x69, 0x41, 0x51, 0xc5, 0x7b, 0x5b, 0x95, 0x88, 0xca, 0xf0, 0x9f, 0x45, 0x50, 0x20, 0xa5, 0x4e, 0x97, 0x7c, 0x3c, 0xc0, 0x27, 0xda, 0xe3, 0x1f, 0x2c, 0xe4, 0x42, 0x17, 0x02, 0x3e, 0x10, 0xad, 0xb6, 0xf2, 0xd8, 0xaa, 0x0f, 0x80, 0x84, 0xfc, 0x45, 0x86, 0x05, 0x80, 0x3f, 0xd4, 0x4b, 0x21, 0xab, 0xc2, 0x7b, 0xdb, 0x8d, 0x4c, 0x56, 0x17, 0x84, 0xcf } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 6.12", + /* Message */ + 22, + { 0x6a, 0x40, 0xbb, 0x60, 0x70, 0x8c, 0x5a, 0x99, 0x2e, 0xcf, 0xdc, 0x7e, 0xe5, 0x3f, 0x54, 0x08, 0x4d, 0x19, 0xaf, 0xfd, 0x4d, 0x21 } +, + /* Seed */ + 103, + { 0xc3, 0xf4, 0xfa, 0xca, 0x56, 0xc1, 0xff, 0x07, 0xd1, 0xad, 0x10, 0x37, 0x07, 0xd1, 0xb6, 0x68, 0x20, 0x47, 0xb4, 0xd9, 0xd6, 0x24, 0x6c, 0x2e, 0x5c, 0x4b, 0x0c, 0xe6, 0x55, 0x3d, 0x55, 0x31, 0x3f, 0x8f, 0x38, 0xae, 0xe5, 0xe4, 0xd8, 0x07, 0x3a, 0x55, 0xd2, 0x4a, 0xd7, 0x96, 0xc4, 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x00, 0x13, 0x13, 0xe8 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 6.13", + /* Message */ + 13, + { 0x32, 0x52, 0xfe, 0x99, 0x62, 0x09, 0x74, 0xe0, 0x77, 0xd6, 0xeb, 0x55, 0x75 } +, + /* Seed */ + 112, + { 0xbf, 0x06, 0x9b, 0x4b, 0xcf, 0x15, 0x44, 0x8b, 0xc3, 0x9e, 0x45, 0xf4, 0x42, 0x6a, 0xad, 0x0d, 0x5d, 0x82, 0xb7, 0x4e, 0x93, 0xae, 0x1c, 0xdd, 0x71, 0xf7, 0x1b, 0xb9, 0xbe, 0xb9, 0xb2, 0x3d, 0x59, 0x73, 0x2f, 0x9c, 0x8b, 0xc6, 0x34, 0x3d, 0x13, 0x02, 0x31, 0xde, 0x18, 0xf7, 0xc8, 0x9f, 0xc2, 0xf4, 0x22, 0x18, 0x9c, 0xd9, 0x27, 0xe5, 0x09, 0xb1, 0x31, 0x97, 0xaa, 0x56, 0xd8, 0x1a, 0x73, 0x76, 0xf8, 0x33, 0x3e, 0x47, 0x42, 0x44, 0x8c, 0xc8, 0x92, 0xde, 0x40, 0x44, 0x97, 0x2c, 0x7f, 0x67, 0xdc, 0xbe, 0x85, 0x44, 0xa9, 0x0e, 0xec, 0x59, 0xe7, 0x95, 0xae, 0x59, 0x64, 0x08, 0x39, 0x2a, 0xf5, 0x77, 0x6d, 0xa0, 0xd6, 0xcb, 0x29, 0xc7, 0xe0, 0xa7, 0x86, 0x81, 0x30, 0xa7 } +, + /* Encryption */ + 128, + { 0x76, 0x53, 0xcb, 0xff, 0x58, 0x68, 0x92, 0xcd, 0xd2, 0x58, 0xbf, 0xe6, 0xba, 0xeb, 0xd9, 0x91, 0x45, 0xeb, 0x1b, 0x22, 0x89, 0x4e, 0x1a, 0x76, 0x4d, 0x02, 0xb2, 0xba, 0x99, 0x59, 0x52, 0xa0, 0x12, 0x58, 0x20, 0x8d, 0xe1, 0xa0, 0x1d, 0x8e, 0x8c, 0xbb, 0x5c, 0xda, 0xf0, 0xd6, 0x03, 0x69, 0x4f, 0x88, 0x25, 0x5e, 0x80, 0x90, 0x97, 0xb7, 0x0e, 0x9d, 0x79, 0xe6, 0x2b, 0xd5, 0xc0, 0xd8, 0x36, 0xdc, 0xc2, 0x9d, 0xd1, 0x9b, 0x05, 0xa1, 0x60, 0x26, 0x90, 0x42, 0x05, 0xb6, 0x0c, 0x45, 0x03, 0xd4, 0xfb, 0xe9, 0x93, 0x38, 0x55, 0xe8, 0x68, 0x02, 0xc7, 0x54, 0x28, 0xd9, 0xa6, 0x34, 0x73, 0x03, 0x16, 0x76, 0x32, 0xd3, 0x3c, 0x5d, 0x9e, 0xcc, 0x8a, 0xe2, 0x49, 0x3b, 0x58, 0xc3, 0x6b, 0x2a, 0x65, 0x53, 0xa7, 0xb9, 0xe2, 0xb1, 0x35, 0x8a, 0xe2, 0x8d, 0xad, 0x50, 0x28, 0x0d } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 6.14", + /* Message */ + 2, + { 0xdc, 0x94 } +, + /* Seed */ + 123, + { 0x05, 0xe8, 0x05, 0xbf, 0xfb, 0xd1, 0xb7, 0x4d, 0x1a, 0x5a, 0x83, 0x8d, 0x85, 0x71, 0x67, 0xb4, 0xc7, 0xd4, 0x0a, 0x6c, 0xd3, 0xe6, 0x8f, 0x31, 0xbe, 0x46, 0x93, 0xb9, 0x8c, 0xec, 0x6d, 0x75, 0x89, 0x49, 0x19, 0xab, 0x18, 0x57, 0x2c, 0x75, 0x82, 0x2e, 0x75, 0xe9, 0xde, 0xd7, 0x2d, 0xa0, 0x67, 0x97, 0x83, 0xa7, 0x72, 0x18, 0x14, 0xe1, 0x99, 0x16, 0x0b, 0x75, 0x07, 0xf6, 0x7f, 0x4e, 0xde, 0x58, 0x7c, 0x88, 0xbe, 0x76, 0x81, 0x5c, 0x50, 0xb2, 0x61, 0xdf, 0x30, 0x8b, 0x31, 0x43, 0x23, 0x73, 0x0c, 0x1e, 0x07, 0x3a, 0xa7, 0x29, 0x98, 0xcc, 0x2f, 0x8e, 0x0a, 0x8a, 0x5b, 0xd6, 0x5b, 0xf9, 0x34, 0xac, 0xa8, 0xa6, 0x48, 0x59, 0xe2, 0x5f, 0x02, 0xc5, 0xa2, 0x71, 0x39, 0x41, 0xc8, 0xc8, 0xe6, 0x27, 0x20, 0x84, 0x6d, 0xfb, 0x51, 0xc2, 0xff } +, + /* Encryption */ + 128, + { 0x6a, 0xdd, 0xe2, 0x44, 0xf0, 0x63, 0x8c, 0x5a, 0xb7, 0x45, 0xff, 0xba, 0xb5, 0xab, 0xe1, 0xfe, 0x80, 0x0b, 0x0e, 0xee, 0x15, 0x35, 0x50, 0xc4, 0x8c, 0x36, 0xf4, 0x24, 0x9f, 0x9d, 0x5d, 0x36, 0xb4, 0x7b, 0x28, 0xcc, 0xda, 0x71, 0xa7, 0xdd, 0x83, 0x2e, 0x64, 0x35, 0xad, 0x0e, 0xb8, 0x5e, 0xf7, 0x55, 0x6b, 0xb8, 0x4b, 0xf9, 0x5a, 0x59, 0xcc, 0xc9, 0xc2, 0x07, 0x51, 0xed, 0x3e, 0x1a, 0xd0, 0xde, 0x10, 0x29, 0x94, 0xa7, 0x12, 0xc5, 0x14, 0x01, 0x46, 0x92, 0xa6, 0x7f, 0x1d, 0x87, 0xca, 0x2e, 0x4f, 0xef, 0x29, 0xec, 0x83, 0xe0, 0x1e, 0x29, 0xad, 0x0c, 0x97, 0x8a, 0xcc, 0xa4, 0xd5, 0xc5, 0x02, 0x74, 0x5a, 0x6c, 0x50, 0x0d, 0xf2, 0x00, 0x04, 0xbc, 0x9b, 0xf1, 0x6f, 0x5f, 0xcc, 0x69, 0xbf, 0x52, 0x70, 0x9e, 0x31, 0xcf, 0x6a, 0x2b, 0x9f, 0xe6, 0x24, 0xd9, 0xa3, 0x64 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 6.15", + /* Message */ + 8, + { 0x4f, 0xae, 0x6c, 0xf3, 0x7e, 0x9d, 0x5f, 0x59 } +, + /* Seed */ + 117, + { 0xe7, 0xf9, 0xed, 0x4a, 0x0c, 0x3a, 0x64, 0x66, 0x69, 0x03, 0x9b, 0xd0, 0x1f, 0x24, 0x9f, 0x32, 0xbe, 0xa1, 0xe6, 0x57, 0x6c, 0x21, 0xd4, 0x51, 0x89, 0xd0, 0xf8, 0x91, 0xcf, 0x4a, 0xfd, 0x62, 0x32, 0x08, 0x3a, 0x32, 0x1e, 0xd2, 0xd3, 0x4d, 0x07, 0x09, 0x84, 0xf5, 0xe9, 0x45, 0x78, 0x39, 0xb2, 0xeb, 0xc1, 0xe0, 0x3a, 0x2c, 0x0d, 0x8d, 0xd7, 0x09, 0x73, 0x1e, 0x95, 0xb2, 0xe6, 0x94, 0x1c, 0xa0, 0x90, 0x71, 0x87, 0xaf, 0xfd, 0xcf, 0x5a, 0x87, 0xf5, 0xcb, 0xea, 0xd2, 0xf9, 0x05, 0x2c, 0x38, 0xd0, 0xee, 0x54, 0xe1, 0xf1, 0x28, 0xff, 0xc3, 0x37, 0xde, 0x45, 0x66, 0xa5, 0x92, 0x5e, 0x1e, 0x94, 0x7a, 0xef, 0x50, 0x88, 0x1c, 0xbd, 0xae, 0xd9, 0x9b, 0x1b, 0xbc, 0x1a, 0xf5, 0x13, 0x23, 0x2c, 0x0f, 0xf4 } +, + /* Encryption */ + 128, + { 0x46, 0xe6, 0x70, 0x5e, 0xb1, 0x25, 0x2d, 0xeb, 0xf8, 0xec, 0x67, 0x2c, 0x4f, 0xde, 0xaf, 0x69, 0x88, 0x26, 0x84, 0x59, 0xf9, 0x95, 0x89, 0xbb, 0xd3, 0x05, 0x41, 0x33, 0xd4, 0x83, 0xab, 0xe1, 0xe2, 0x7c, 0xaa, 0xb0, 0xa7, 0xf0, 0x22, 0x1b, 0x1b, 0x67, 0xa1, 0x4e, 0xbf, 0x45, 0x12, 0x6e, 0x60, 0x13, 0x48, 0xb0, 0x43, 0x44, 0x06, 0xda, 0x3a, 0x8c, 0x76, 0xd4, 0xf1, 0xe3, 0xf1, 0xa0, 0xe0, 0x6d, 0x0d, 0xb8, 0x23, 0xda, 0x51, 0x17, 0xb9, 0x2a, 0x40, 0xb6, 0xf3, 0x9f, 0x57, 0xe4, 0x83, 0xa7, 0xda, 0x36, 0xe9, 0x9b, 0x67, 0x7b, 0xb3, 0xf7, 0x6e, 0x6c, 0x5d, 0xb0, 0x3f, 0x3c, 0xe4, 0x45, 0x04, 0xeb, 0xd4, 0x5e, 0x9f, 0x14, 0xfe, 0x0f, 0x61, 0x3a, 0x2e, 0xb7, 0x95, 0x47, 0xab, 0x57, 0x8c, 0x58, 0x6d, 0x3b, 0x65, 0x4a, 0x06, 0xfe, 0x1e, 0xf3, 0x7a, 0x22, 0x10, 0x66 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 6.16", + /* Message */ + 14, + { 0xcd, 0xfd, 0xfd, 0xaa, 0xbc, 0xa3, 0x76, 0x7e, 0x70, 0xbb, 0xc5, 0xe9, 0xab, 0xf6 } +, + /* Seed */ + 111, + { 0xac, 0x77, 0x7f, 0x67, 0x29, 0x9d, 0xe4, 0xc1, 0xc4, 0xc5, 0x74, 0xf3, 0x1f, 0x67, 0x4f, 0x6f, 0xaa, 0xbd, 0xe0, 0x31, 0xf8, 0xec, 0x33, 0xe8, 0x26, 0x76, 0xeb, 0x32, 0xa9, 0x3f, 0x65, 0x79, 0xaa, 0xc3, 0xe9, 0x59, 0x35, 0x9f, 0xc5, 0x73, 0xee, 0x5c, 0x0e, 0x3e, 0x07, 0x76, 0x53, 0xef, 0xf9, 0xd5, 0xf8, 0xdb, 0x4b, 0x1e, 0x7a, 0xca, 0xdb, 0x05, 0x99, 0x71, 0x53, 0x1f, 0x49, 0xb0, 0x7c, 0x93, 0xeb, 0x9f, 0xde, 0xdc, 0xf0, 0x90, 0x3a, 0x7d, 0x50, 0xb4, 0x79, 0x67, 0x6f, 0xcd, 0xe8, 0x74, 0x0a, 0xfb, 0xd7, 0xd3, 0x7c, 0x3a, 0x21, 0x02, 0x41, 0x2b, 0xde, 0x1d, 0x3a, 0x82, 0x44, 0x15, 0x6a, 0xd8, 0x08, 0x9d, 0x45, 0xdf, 0xdc, 0x91, 0xcd, 0xe6, 0xc3, 0xa1, 0x59 } +, + /* Encryption */ + 128, + { 0x51, 0x3c, 0x76, 0x1e, 0xb1, 0x92, 0x9a, 0xff, 0x79, 0x77, 0xa9, 0xff, 0x0e, 0x61, 0xb7, 0xa1, 0xd5, 0x11, 0xc8, 0xcb, 0x25, 0x39, 0x24, 0x33, 0x24, 0x25, 0x56, 0x9a, 0x07, 0xe2, 0x29, 0xcb, 0x39, 0x01, 0x71, 0x53, 0x90, 0xf7, 0xde, 0x37, 0xbd, 0x36, 0x2c, 0x96, 0xfc, 0x0b, 0x0d, 0x79, 0x81, 0x0c, 0x1e, 0x8b, 0x15, 0xe1, 0x3b, 0x00, 0x32, 0x73, 0x47, 0x78, 0xcf, 0x96, 0x4e, 0x6f, 0x6d, 0x17, 0xfc, 0x41, 0xc7, 0x86, 0x76, 0x72, 0xb2, 0x54, 0x0f, 0x56, 0x9d, 0x0a, 0x46, 0x0a, 0x80, 0xfa, 0xd5, 0x6b, 0x5f, 0x05, 0x4a, 0xb8, 0xe4, 0x9e, 0x40, 0x9e, 0x9e, 0x0b, 0x86, 0x13, 0xcb, 0x3d, 0xa2, 0x0c, 0x35, 0xc3, 0xe1, 0xbb, 0x99, 0xb7, 0xec, 0xab, 0x7a, 0x00, 0xfc, 0x1f, 0xc2, 0x37, 0x0f, 0x9c, 0x80, 0x85, 0x67, 0xdf, 0x89, 0xbe, 0x2e, 0xdd, 0xbd, 0xb6, 0xb1, 0x10 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 6.17", + /* Message */ + 18, + { 0xb8, 0x20, 0xc3, 0x2e, 0x73, 0x7d, 0xaa, 0x23, 0x4f, 0x29, 0xba, 0x90, 0x64, 0x7f, 0xc3, 0xbf, 0x0a, 0x8e } +, + /* Seed */ + 107, + { 0xf5, 0xca, 0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0xa3, 0x4b, 0x5a, 0x96, 0x11, 0x7a, 0xa3, 0x67, 0x51, 0xd9, 0xea, 0xf2, 0x33, 0xb0, 0x3f, 0x68, 0xdb, 0xa6, 0xa4, 0x57, 0x1b, 0x90, 0x71, 0x77, 0xf8, 0x28, 0x33, 0x6e, 0x82, 0x5a, 0x92, 0x26, 0x1b, 0x62, 0x36, 0x39, 0xbe, 0xc9, 0x8d, 0x3a, 0x09, 0xf8, 0x72, 0xc2, 0xec, 0x59, 0x1b, 0x4c, 0x38, 0x3a, 0x69, 0xc7 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 6.18", + /* Message */ + 43, + { 0x60, 0x6b, 0xbd, 0x61, 0x37, 0x15, 0xdd, 0xcd, 0x92, 0xc7, 0xb6, 0xdf, 0x04, 0xb3, 0x60, 0x72, 0xf0, 0x11, 0x62, 0xd0, 0x08, 0x76, 0x63, 0x12, 0xca, 0x69, 0x77, 0xdd, 0x3a, 0x06, 0xeb, 0x95, 0xe1, 0xba, 0xc7, 0xbc, 0x1b, 0xc6, 0x60, 0x2c, 0x9e, 0xe6, 0x44 } +, + /* Seed */ + 82, + { 0x51, 0x3a, 0x5c, 0x95, 0x68, 0xe8, 0x9b, 0x9a, 0x53, 0xd5, 0xaf, 0x71, 0x6e, 0x55, 0xfb, 0x34, 0x0f, 0x8a, 0x39, 0x23, 0x70, 0xe8, 0x88, 0xa8, 0x0c, 0xae, 0xda, 0x50, 0x2e, 0x7f, 0x9d, 0xfc, 0x17, 0x51, 0x95, 0xa5, 0x0e, 0x47, 0x07, 0x13, 0x96, 0xd6, 0xec, 0x55, 0x4e, 0xb7, 0x2f, 0x18, 0x3b, 0xe1, 0x8f, 0x3b, 0xf4, 0xec, 0x73, 0xb3, 0x05, 0x92, 0xfa, 0xef, 0x2f, 0xb5, 0x14, 0xde, 0xbe, 0xfc, 0xc6, 0x5c, 0x8d, 0x23, 0xc4, 0xad, 0x25, 0x94, 0x56, 0xc1, 0xe8, 0x0b, 0x36, 0x0a, 0xd4, 0x59 } +, + /* Encryption */ + 128, + { 0x47, 0x21, 0xa2, 0x39, 0x40, 0x18, 0x87, 0x30, 0xf5, 0xde, 0xac, 0x85, 0x00, 0x2e, 0x38, 0x31, 0xb1, 0x49, 0xae, 0x57, 0xaf, 0xc6, 0x97, 0x35, 0xa0, 0x45, 0xee, 0x3f, 0xc3, 0x53, 0x64, 0x72, 0xfc, 0x83, 0x3c, 0x27, 0xc8, 0x7e, 0xab, 0x6f, 0xc9, 0x05, 0xe3, 0x67, 0x96, 0x1b, 0x31, 0x24, 0x98, 0x63, 0x6b, 0xe6, 0xc7, 0x7a, 0xa8, 0x0b, 0x8d, 0xa2, 0xf5, 0xd9, 0x48, 0xaa, 0xa7, 0x7b, 0x5f, 0xab, 0x72, 0x4b, 0xbf, 0x64, 0xee, 0x89, 0xd2, 0x81, 0xee, 0xd4, 0x7b, 0x21, 0x2c, 0x32, 0x95, 0x26, 0x65, 0x77, 0xf4, 0xfd, 0x93, 0xa2, 0x22, 0x39, 0xde, 0xe5, 0x40, 0xc9, 0x40, 0x0f, 0xe5, 0x6d, 0x7a, 0xef, 0x51, 0xdf, 0x36, 0xa8, 0x9a, 0xe9, 0x2f, 0x92, 0x6f, 0x55, 0x83, 0x31, 0xe4, 0x1b, 0xfd, 0xfe, 0xfe, 0x35, 0x75, 0x8b, 0x93, 0xce, 0x11, 0x40, 0xac, 0x9b, 0x6a, 0x54 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 6.19", + /* Message */ + 36, + { 0x1d, 0x82, 0xde, 0xf8, 0xc5, 0x92, 0x87, 0x50, 0x08, 0xa5, 0xf8, 0x9e, 0x7e, 0xb6, 0x4e, 0x25, 0x2e, 0xdd, 0xe9, 0xdd, 0xb8, 0x81, 0xd3, 0x73, 0x62, 0x31, 0x7f, 0x6e, 0x6e, 0x6e, 0x99, 0x3c, 0x60, 0x23, 0x3b, 0x0f } +, + /* Seed */ + 89, + { 0x87, 0x5e, 0x07, 0x5e, 0x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, 0x65, 0xd4, 0xf3, 0x2f, 0x8a, 0xc0, 0x3e, 0xe0, 0x06, 0xbe, 0x62, 0x33, 0xe4, 0xd1, 0xa3, 0xc1, 0x6e, 0xb1, 0x44, 0xb5, 0xd8, 0xbe, 0x72, 0x9a, 0xd3, 0x04, 0xf8, 0x23, 0x61, 0xe0, 0x7c, 0xfb } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 6.20", + /* Message */ + 28, + { 0x8a, 0x8a, 0x3e, 0xab, 0xdc, 0xa7, 0xca, 0xb0, 0xcc, 0x29, 0x6a, 0x29, 0x1e, 0xa8, 0xa9, 0x3d, 0xa4, 0xd2, 0xd2, 0xa1, 0x96, 0xff, 0x2f, 0x8d, 0x18, 0x1f, 0xee, 0x1f } +, + /* Seed */ + 97, + { 0x2e, 0x47, 0x36, 0xe4, 0x29, 0x6a, 0xb4, 0x66, 0x18, 0xb1, 0xef, 0x34, 0xda, 0x26, 0x77, 0x6e, 0x92, 0xef, 0x66, 0xf7, 0xcd, 0x17, 0x4e, 0xf9, 0x47, 0x69, 0x72, 0x42, 0x23, 0xa7, 0x65, 0xb4, 0xeb, 0xef, 0x08, 0xa8, 0x8f, 0xed, 0xbe, 0x27, 0x05, 0x60, 0xe5, 0xf6, 0x74, 0x37, 0xcf, 0x49, 0xd5, 0x7e, 0xa6, 0x62, 0x0a, 0xca, 0x59, 0x89, 0x8a, 0xfd, 0x52, 0xcd, 0xef, 0x30, 0xa8, 0xb0, 0xd9, 0x85, 0x5e, 0x5d, 0xfb, 0xe3, 0x47, 0xde, 0x77, 0xc4, 0xc0, 0x28, 0x0b, 0x0f, 0x1f, 0xd4, 0x4d, 0x4f, 0xe6, 0x89, 0x06, 0xbe, 0x8a, 0x4f, 0x12, 0xc5, 0x33, 0x08, 0x7b, 0xf5, 0xbc, 0xea, 0xfb } +, + /* Encryption */ + 128, + { 0x03, 0xf3, 0xe4, 0xba, 0x03, 0x48, 0x31, 0xa0, 0xe3, 0x0a, 0x4a, 0x33, 0x44, 0xce, 0xad, 0x61, 0xb2, 0x8b, 0x43, 0xbe, 0x31, 0x53, 0x2c, 0x2d, 0x76, 0x37, 0x53, 0x9b, 0x90, 0x13, 0x83, 0x7e, 0xdc, 0xb1, 0xf2, 0x16, 0xd3, 0x2f, 0xdf, 0xae, 0x73, 0x32, 0x36, 0x74, 0xa2, 0x81, 0x45, 0x65, 0xdb, 0xf2, 0x9e, 0x71, 0x2d, 0x18, 0xc4, 0x37, 0x39, 0x64, 0xdf, 0x60, 0xc9, 0x39, 0x9f, 0xda, 0x54, 0x14, 0xa0, 0xeb, 0x45, 0xbd, 0xe8, 0x66, 0x1a, 0x89, 0x09, 0x12, 0x95, 0xa1, 0xef, 0x71, 0x61, 0x6a, 0x3c, 0xd1, 0x45, 0xe9, 0xb3, 0x18, 0xb6, 0x51, 0xaf, 0x17, 0x5d, 0x4e, 0xc3, 0x50, 0x1d, 0x5e, 0xb7, 0x63, 0xe8, 0xd3, 0x5a, 0x2b, 0x72, 0x74, 0x6e, 0x02, 0x0b, 0x4b, 0xa5, 0x99, 0x73, 0x83, 0x4b, 0x21, 0x50, 0x02, 0x6b, 0x43, 0x2b, 0x17, 0x9a, 0x9a, 0xe8, 0x17, 0x2b, 0x7b } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 7: A 1025-bit RSA key pair", +{ + /* Modulus */ + 129, + { 0x01, 0x70, 0x93, 0x41, 0xd2, 0xec, 0x08, 0x04, 0xa7, 0x40, 0x34, 0xe8, 0xfa, 0x72, 0x86, 0x42, 0x98, 0x3d, 0x16, 0x50, 0xd7, 0x46, 0xe4, 0x49, 0xc9, 0xee, 0x40, 0x79, 0xaa, 0x15, 0xe5, 0x1f, 0x1f, 0xc1, 0x34, 0x24, 0x2e, 0x52, 0x4b, 0x0d, 0x3d, 0x0d, 0xbf, 0x5a, 0x51, 0x21, 0x93, 0x9b, 0x12, 0x5f, 0xcc, 0x86, 0x3e, 0x51, 0x41, 0x60, 0xb6, 0x34, 0xe3, 0x7a, 0xa6, 0x98, 0x94, 0x77, 0x6c, 0x7d, 0x33, 0xe1, 0xe7, 0xc6, 0x19, 0x52, 0x1d, 0xe4, 0x82, 0xa0, 0xae, 0xa4, 0x5c, 0x3c, 0x6a, 0xbc, 0x3f, 0x33, 0xe2, 0x5d, 0x86, 0xff, 0xa1, 0x39, 0x33, 0x25, 0x65, 0x9b, 0xf2, 0xd4, 0x09, 0x8d, 0xf1, 0x69, 0xb4, 0x07, 0x21, 0x87, 0x66, 0x0e, 0x27, 0x77, 0x00, 0x19, 0x9b, 0x7a, 0x3e, 0x34, 0x84, 0xb3, 0x84, 0x5f, 0x6f, 0xbf, 0x31, 0x98, 0x65, 0x7d, 0xf8, 0xcb, 0xf3, 0xa8, 0x1b } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 128, + { 0x6f, 0xeb, 0xf7, 0x98, 0x12, 0x1e, 0x99, 0x33, 0x24, 0x97, 0x2c, 0x8c, 0x28, 0xcc, 0xc6, 0x5a, 0x2e, 0x6a, 0xa1, 0x5f, 0xcd, 0xe2, 0x32, 0xda, 0x03, 0xe4, 0x46, 0x4d, 0xb4, 0xda, 0x5f, 0xaa, 0x27, 0xe4, 0x2a, 0x7c, 0x7a, 0x76, 0xd9, 0xed, 0x49, 0x48, 0x6b, 0x27, 0xa9, 0xd7, 0x85, 0xc6, 0x7d, 0x9a, 0xc0, 0xc5, 0x19, 0xad, 0x8d, 0xad, 0xa6, 0xbf, 0xd1, 0x15, 0xd7, 0xcd, 0x75, 0xb9, 0x9c, 0x4b, 0x59, 0xc7, 0x69, 0x83, 0xa7, 0x01, 0x5b, 0x0d, 0xa6, 0x97, 0x3c, 0x69, 0xfa, 0x95, 0x08, 0x10, 0xae, 0x27, 0x68, 0xd9, 0x75, 0x88, 0x90, 0x05, 0x62, 0xe8, 0x6a, 0x6d, 0xf7, 0xc7, 0x14, 0xb8, 0x44, 0xb1, 0xe0, 0x46, 0x68, 0x6a, 0x5a, 0xfc, 0x66, 0x7b, 0x13, 0x57, 0x3a, 0x55, 0xbe, 0x9b, 0x5b, 0x38, 0xb9, 0x9b, 0xd3, 0xcf, 0x54, 0xe4, 0x34, 0x4a, 0x2f, 0x2d, 0x0e, 0x21 } +, + /* Prime 1 */ + 65, + { 0x01, 0x40, 0xef, 0x5b, 0x50, 0x70, 0x54, 0xd5, 0xa6, 0x94, 0x46, 0x4e, 0xf4, 0x7e, 0x49, 0x86, 0x8c, 0xb3, 0x3c, 0x97, 0xe0, 0xe3, 0xed, 0xd7, 0x7b, 0xf4, 0x5a, 0x52, 0x5e, 0x60, 0x8d, 0x7e, 0x21, 0x5f, 0x91, 0x33, 0x48, 0xa9, 0xb8, 0x27, 0xc8, 0x39, 0x73, 0x7a, 0x42, 0xb6, 0xad, 0xfb, 0xb2, 0xbb, 0x49, 0x7e, 0x14, 0x78, 0x92, 0x2f, 0x71, 0x88, 0x97, 0xd9, 0xfe, 0xed, 0x27, 0x7a, 0x6b } +, + /* Prime 2 */ + 65, + { 0x01, 0x26, 0x00, 0x4b, 0xbe, 0x2d, 0xf7, 0x6b, 0x6f, 0x38, 0xae, 0xa1, 0x64, 0xb1, 0xfd, 0x0f, 0x97, 0x61, 0x2b, 0x2d, 0xb9, 0x6c, 0xed, 0xe2, 0x8a, 0x3a, 0x91, 0xce, 0x0d, 0x74, 0x25, 0x3b, 0xb3, 0xf9, 0x55, 0x9b, 0x89, 0xf4, 0x81, 0x33, 0x75, 0x65, 0x2a, 0x50, 0x70, 0x06, 0xce, 0x99, 0x95, 0xa9, 0x8f, 0x0e, 0x6e, 0xf3, 0xbc, 0x22, 0xe5, 0x51, 0x9b, 0x61, 0x3b, 0xfb, 0xcd, 0x55, 0x11 } +, + /* Prime exponent 1 */ + 64, + { 0x98, 0x14, 0xd4, 0xe0, 0xb9, 0x5a, 0x7a, 0x24, 0x05, 0xff, 0x8b, 0x4a, 0xb0, 0xcd, 0x86, 0xc5, 0x05, 0xea, 0xa0, 0xce, 0x21, 0x34, 0x83, 0xf8, 0x69, 0x42, 0xa3, 0xe5, 0xb5, 0x3b, 0x57, 0x99, 0xd8, 0xff, 0xa5, 0x9d, 0xb9, 0x4f, 0x5b, 0x0a, 0xb6, 0xae, 0xd2, 0x30, 0xeb, 0x00, 0x67, 0x55, 0xbb, 0x0a, 0x88, 0x84, 0x8a, 0xde, 0x3b, 0x3d, 0x41, 0xcd, 0x33, 0xb0, 0x6a, 0x11, 0x5b, 0x21 } +, + /* Prime exponent 2 */ + 64, + { 0x1c, 0x4b, 0x1c, 0xfe, 0xf1, 0x67, 0x85, 0x34, 0x4f, 0xed, 0x26, 0x65, 0x0d, 0x68, 0x00, 0x2f, 0x1e, 0x4f, 0xcc, 0x77, 0xb2, 0xce, 0xf5, 0xe5, 0x3d, 0x9b, 0xb8, 0x8b, 0xbc, 0xe8, 0xb4, 0x65, 0x2e, 0x92, 0x99, 0x84, 0x5e, 0x3e, 0x6c, 0xd8, 0x58, 0x63, 0x09, 0x18, 0xae, 0xdf, 0x05, 0x12, 0xcd, 0x1d, 0x92, 0x53, 0x05, 0x2b, 0xce, 0xe3, 0xe8, 0xc5, 0x9e, 0x46, 0xea, 0x85, 0xa9, 0x31 } +, + /* Coefficient */ + 64, + { 0xfd, 0xc5, 0x10, 0xc4, 0xd9, 0x79, 0x07, 0x30, 0xb0, 0xfd, 0x47, 0xd3, 0x13, 0xab, 0xd4, 0x08, 0x58, 0xc7, 0xdf, 0xd5, 0x8f, 0x4b, 0x37, 0x91, 0x5f, 0x7a, 0x4b, 0x1d, 0xb3, 0xd7, 0xd8, 0xab, 0xd0, 0x6d, 0x3d, 0xa0, 0x02, 0xde, 0x98, 0x4a, 0x76, 0x09, 0xcc, 0x18, 0xa9, 0x44, 0x86, 0x46, 0x0a, 0x61, 0x74, 0x6c, 0x7e, 0xa6, 0x31, 0x17, 0xa6, 0x8a, 0xa2, 0x82, 0x59, 0x74, 0x4f, 0x49 } + +} +, +{{ + "PKCS#1 v1.5 Encryption Example 7.1", + /* Message */ + 58, + { 0xda, 0x50, 0x9d, 0xce, 0x45, 0xe2, 0x47, 0x00, 0x37, 0x9b, 0xfe, 0x5a, 0xa1, 0xa8, 0x1c, 0x24, 0x70, 0x6c, 0x18, 0x42, 0xd9, 0xb1, 0x3e, 0x7a, 0x2e, 0x0a, 0x15, 0xd3, 0xa4, 0xaf, 0x8e, 0x6d, 0x08, 0x61, 0x2d, 0xca, 0xa1, 0x5d, 0x46, 0x0e, 0xce, 0x87, 0x29, 0x88, 0xe3, 0xe9, 0x0f, 0xb2, 0x7e, 0x5c, 0xa5, 0xc1, 0x0f, 0xa1, 0xfa, 0xcd, 0xcb, 0x0e } +, + /* Seed */ + 68, + { 0x80, 0x8c, 0x20, 0x46, 0xfb, 0x50, 0x5c, 0x37, 0x69, 0x5c, 0x8d, 0xc3, 0x5c, 0x38, 0xf9, 0xf9, 0x90, 0x5a, 0xb4, 0x8a, 0x2b, 0x8a, 0x14, 0x6e, 0x8e, 0x8e, 0xda, 0x33, 0x85, 0xce, 0xd9, 0x5a, 0x31, 0x3b, 0x2d, 0xc6, 0xeb, 0x41, 0x83, 0x67, 0xfe, 0xef, 0xf7, 0x9a, 0x02, 0xad, 0x74, 0x64, 0x6d, 0xf7, 0xa5, 0xd8, 0x70, 0x54, 0xac, 0xdd, 0xaf, 0x34, 0xea, 0xfd, 0x5c, 0x1d, 0xb5, 0x8e, 0x5d, 0xec, 0x04, 0x81 } +, + /* Encryption */ + 129, + { 0x00, 0xfc, 0x3d, 0x0a, 0xaa, 0xf2, 0x6c, 0xdf, 0x25, 0xa1, 0xa8, 0xdf, 0xcb, 0x71, 0x70, 0x0f, 0xb6, 0x5e, 0x2a, 0xb5, 0x55, 0x1a, 0xe5, 0xf4, 0x19, 0xb2, 0xd2, 0xf9, 0x4c, 0xef, 0x01, 0x73, 0x02, 0xb0, 0x0a, 0xbd, 0x9e, 0x6c, 0x6e, 0xfa, 0xe9, 0x44, 0x74, 0xd1, 0x8e, 0x68, 0xda, 0x0a, 0x7c, 0x17, 0xef, 0x2c, 0x5f, 0xcc, 0x89, 0x07, 0x1d, 0x3b, 0x07, 0x12, 0x1b, 0x9c, 0x01, 0xe3, 0x0f, 0xf0, 0x53, 0x66, 0x3f, 0x61, 0xf8, 0x9f, 0xdb, 0xc4, 0x9b, 0xdc, 0xf8, 0xe6, 0x71, 0x66, 0x94, 0x43, 0x91, 0x9d, 0x41, 0x34, 0x28, 0x45, 0xe3, 0xe9, 0x9e, 0x46, 0xa8, 0xa3, 0xb4, 0x8e, 0x23, 0x98, 0xa8, 0x8e, 0x5b, 0x45, 0xd9, 0x9a, 0x17, 0xdd, 0x1f, 0x21, 0x2e, 0xda, 0xbc, 0xbc, 0xd3, 0x00, 0xa8, 0x4d, 0x39, 0x8e, 0xf5, 0x79, 0x35, 0xbd, 0xae, 0x95, 0x9e, 0x60, 0x54, 0xe7, 0x3a } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Encryption Example 7.2", + /* Message */ + 12, + { 0xce, 0x0a, 0x79, 0x47, 0x49, 0x87, 0x41, 0x60, 0xe5, 0xd2, 0xe4, 0xff } +, + /* Seed */ + 114, + { 0xf4, 0xb2, 0xc9, 0xf3, 0x11, 0xc1, 0xfd, 0x41, 0xd4, 0x79, 0x44, 0xb5, 0x0e, 0x17, 0x55, 0xd4, 0xea, 0xc5, 0xee, 0x65, 0x08, 0x7c, 0x9f, 0xc6, 0xd2, 0xf0, 0x75, 0xb7, 0x38, 0xc6, 0x49, 0x26, 0xea, 0xf7, 0xd4, 0x31, 0x6b, 0xcd, 0xb6, 0x36, 0x54, 0xd5, 0x42, 0x0d, 0xa6, 0x1e, 0x02, 0x45, 0xf1, 0x95, 0xb9, 0xe8, 0x24, 0xaa, 0x0b, 0x06, 0xc8, 0x87, 0x99, 0xb1, 0x27, 0xfe, 0x9b, 0x03, 0x6d, 0xf3, 0x61, 0x75, 0xc0, 0xa6, 0xbd, 0x80, 0xe4, 0xe0, 0xaf, 0x6e, 0xbc, 0x2f, 0x42, 0x70, 0xb0, 0x4c, 0xe3, 0x0b, 0x9f, 0xa2, 0x7f, 0x04, 0x35, 0x86, 0x0f, 0xcc, 0xf4, 0x0b, 0x3d, 0xc7, 0xea, 0xef, 0xfd, 0xba, 0xb9, 0xe1, 0x76, 0x66, 0x19, 0xbb, 0x01, 0x6c, 0x17, 0x90, 0x26, 0x63, 0xcb, 0x24 } +, + /* Encryption */ + 129, + { 0x01, 0x0c, 0xf7, 0x4b, 0xeb, 0xc2, 0x63, 0x6d, 0x2c, 0x49, 0xd9, 0xc6, 0x22, 0xbd, 0x76, 0xcc, 0x0b, 0x1d, 0x02, 0xeb, 0xb5, 0x2f, 0xdf, 0xae, 0xc0, 0x1c, 0x4a, 0xc1, 0xe7, 0x56, 0x07, 0x1a, 0x8e, 0xf7, 0x6e, 0x12, 0x2a, 0x4c, 0x62, 0xc6, 0xba, 0x32, 0x65, 0xfa, 0x4c, 0x90, 0x56, 0x26, 0xd1, 0x13, 0xd5, 0x9d, 0xb7, 0x9a, 0xd6, 0x5f, 0x86, 0x40, 0xb3, 0xc4, 0x34, 0x4d, 0x73, 0x40, 0xc1, 0x6e, 0x38, 0xde, 0xb1, 0x89, 0xe3, 0xa1, 0xb1, 0x1e, 0xaa, 0xb0, 0xb2, 0x60, 0x6a, 0x7f, 0x82, 0xf5, 0x94, 0x6d, 0x41, 0x9a, 0xce, 0xbb, 0xbb, 0x3a, 0x93, 0x7d, 0x41, 0xe2, 0x9b, 0x33, 0xed, 0xd3, 0xad, 0x15, 0xf1, 0xe7, 0x77, 0x0f, 0xcf, 0xc3, 0x0a, 0xe0, 0x6a, 0xa0, 0x1b, 0xcd, 0x03, 0xd5, 0xdf, 0xb1, 0x62, 0xf8, 0x7a, 0x18, 0x39, 0x67, 0x55, 0x3c, 0x25, 0x02, 0xcb, 0x5f, 0xfe } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 7.3", + /* Message */ + 2, + { 0x41, 0xd6 }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a, 0x88, 0x94, 0x0e, 0xe1, 0x29, 0x34, 0x0f, 0x57, 0x8e, 0x56, 0xe7, 0x2d, 0x8b, 0x27, 0x83, 0x36, 0x10, 0x06, 0xd9, 0x71, 0x29, 0xab, 0xef, 0x02, 0xcf, 0x1c, 0x19, 0x12, 0xe1, 0x7f, 0x0c, 0xd1, 0xd7, 0x1c, 0x0b, 0x32, 0x8d, 0x0b, 0x48, 0xa4, 0xac, 0x7a, 0xec, 0xe3, 0xc0, 0x05, 0xa6, 0x19, 0x0e, 0xac, 0x22, 0xc1, 0x99, 0x10, 0x41, 0x15, 0x9a, 0x2a, 0xd1, 0xdb, 0x08, 0x96, 0x01, 0x5c, 0x4f, 0xf1, 0xd7, 0xb3, 0x54, 0x47, 0xcf, 0xc1, 0x0a, 0x24, 0xbe } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 7.4", + /* Message */ + 62, + { 0x0b, 0xb4, 0xab, 0xc7, 0xdc, 0x6c, 0xa4, 0x23, 0x5c, 0x29, 0xed, 0x0a, 0x2c, 0xb6, 0x3f, 0xd1, 0x41, 0x34, 0x1e, 0x2c, 0x4c, 0x90, 0x1e, 0x6d, 0xc9, 0x5d, 0xa9, 0xf0, 0x01, 0x0f, 0xa2, 0xe0, 0x22, 0xcc, 0xfe, 0x8a, 0xdf, 0xdb, 0x6e, 0xcf, 0x4d, 0x89, 0xf5, 0x79, 0xa1, 0x0a, 0x51, 0x70, 0xbe, 0x18, 0xc4, 0x6a, 0x24, 0x1c, 0xa7, 0xee, 0xd1, 0x07, 0xca, 0xfe, 0x4a, 0x9d } +, + /* Seed */ + 64, + { 0xbb, 0x80, 0xbe, 0x78, 0x02, 0xdd, 0x8b, 0xf5, 0xfb, 0x5b, 0x1b, 0x86, 0x39, 0x66, 0x54, 0xf4, 0x73, 0x9f, 0x5d, 0x43, 0x51, 0xf1, 0x9c, 0xe3, 0x1b, 0x72, 0xc2, 0x10, 0xae, 0xa1, 0xa2, 0xed, 0x21, 0x42, 0xd8, 0xd6, 0xf7, 0xae, 0x37, 0x4f, 0x06, 0x13, 0x3a, 0x31, 0x5c, 0x62, 0x64, 0xda, 0x65, 0xce, 0xf2, 0x33, 0xed, 0x3d, 0xcc, 0x81, 0x59, 0xd7, 0x6c, 0x3a, 0x17, 0xf3, 0x6d, 0x0c } +, + /* Encryption */ + 129, + { 0x00, 0x6f, 0x1b, 0x6c, 0x1f, 0xb3, 0x7a, 0xe5, 0xc8, 0xc0, 0x24, 0x44, 0x9a, 0xbc, 0x38, 0x40, 0xe8, 0xe5, 0x09, 0x71, 0x43, 0xee, 0xd1, 0x6b, 0xea, 0xf6, 0x7b, 0x6c, 0x7a, 0x48, 0x24, 0xac, 0x38, 0xb6, 0xf8, 0xc3, 0x53, 0xb6, 0x45, 0xc8, 0xce, 0xa4, 0xfa, 0xb0, 0x9c, 0x02, 0xfa, 0x6c, 0x32, 0x5a, 0x50, 0x74, 0x38, 0xb9, 0x64, 0x5e, 0xc8, 0x23, 0x00, 0x86, 0xb3, 0x15, 0xe3, 0x4e, 0x7a, 0x56, 0xad, 0xb0, 0xec, 0xd8, 0x9f, 0xd0, 0x7b, 0x98, 0x73, 0x9c, 0x24, 0xdb, 0x6f, 0xe1, 0x1f, 0xf2, 0xe5, 0xad, 0x38, 0x31, 0x8e, 0xc3, 0x1d, 0xf2, 0xed, 0x25, 0x08, 0xde, 0xbc, 0xa7, 0xa6, 0x7e, 0x24, 0x01, 0x96, 0xaa, 0x9a, 0xcd, 0x80, 0x32, 0x9f, 0x4c, 0x43, 0x43, 0xc1, 0x0b, 0x72, 0x69, 0x9f, 0x9d, 0x6b, 0x5b, 0xc2, 0x43, 0x99, 0x5b, 0x09, 0xc4, 0x6d, 0xd3, 0xd8, 0x03, 0xce } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 7.5", + /* Message */ + 15, + { 0xed, 0x26, 0xec, 0x20, 0x2d, 0x5e, 0x69, 0x74, 0x0d, 0xa3, 0x48, 0x84, 0x06, 0xbb, 0xbd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0xe3, 0x21, 0x27, 0xc7, 0x71, 0x22, 0x4a, 0x0d, 0xd5, 0xa5, 0x64, 0xe6, 0x36, 0xad, 0xd7, 0x3b, 0xcf, 0xf7, 0xb4, 0x73, 0xe9, 0xa1, 0x2b, 0x7d, 0x46, 0x4d, 0x7d, 0xd4, 0xa7, 0x52, 0x04, 0x86, 0x61, 0xa8, 0xb0, 0x74, 0xb9, 0xfa, 0x15, 0x06, 0xfe, 0xf6, 0x03, 0xdd, 0x96, 0xd1, 0x19, 0x96, 0xa7, 0xd9, 0xe7, 0x48, 0x79, 0xf9, 0x9b, 0xb2, 0xd9, 0x1c, 0x37, 0xaa, 0xb1, 0x35, 0x72 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 7.6", + /* Message */ + 33, + { 0xdc, 0x28, 0x5a, 0x26, 0x39, 0x59, 0x39, 0xe7, 0x99, 0x72, 0x04, 0xc7, 0x1a, 0x93, 0x2f, 0x79, 0x5b, 0x4d, 0xe4, 0x01, 0xe9, 0x6f, 0x34, 0xe1, 0x89, 0x36, 0x32, 0x37, 0xe9, 0xcf, 0xda, 0xdc, 0x61 } +, + /* Seed */ + 93, + { 0xd8, 0x0b, 0xfc, 0xc2, 0x91, 0xce, 0x51, 0x8c, 0xe0, 0xbb, 0x6a, 0xe9, 0x34, 0xdf, 0xd8, 0x56, 0x58, 0xb2, 0x39, 0xfb, 0x45, 0x39, 0xcb, 0xe0, 0x5d, 0xa1, 0x26, 0xa8, 0x98, 0xb7, 0xf3, 0x64, 0x88, 0x7c, 0x0d, 0xdf, 0xb1, 0xea, 0xea, 0x1d, 0x5a, 0x90, 0xde, 0x76, 0x95, 0x66, 0x5c, 0x55, 0x82, 0x2a, 0x11, 0x72, 0xcb, 0x5b, 0xe8, 0xa1, 0x12, 0xd2, 0x8c, 0x86, 0x02, 0xc5, 0x13, 0xbe, 0x48, 0xc2, 0x92, 0xf0, 0x59, 0x72, 0xe6, 0x71, 0x1a, 0x44, 0xcb, 0xc7, 0x28, 0x17, 0x15, 0x09, 0x4b, 0x49, 0x0f, 0xde, 0x29, 0x16, 0x5a, 0x6b, 0x6b, 0x7d, 0x99, 0xdb, 0xed } +, + /* Encryption */ + 129, + { 0x01, 0x57, 0xe7, 0xb5, 0x4a, 0x34, 0x1b, 0x8d, 0xf8, 0xbd, 0x9b, 0x99, 0xfc, 0x2e, 0x6c, 0x58, 0xd8, 0x86, 0xfc, 0x79, 0xe7, 0x44, 0x2a, 0x9e, 0x76, 0xd0, 0xd6, 0x7e, 0x48, 0x58, 0xc4, 0xab, 0xf0, 0xed, 0x25, 0xc3, 0x3d, 0xf6, 0x2e, 0x2a, 0xad, 0xa3, 0x99, 0xdf, 0xea, 0xdc, 0x7f, 0xf6, 0x89, 0x28, 0xe6, 0xb9, 0x00, 0x71, 0x02, 0xdd, 0xf8, 0x09, 0xf5, 0x90, 0x8e, 0xef, 0xc1, 0x0f, 0x2a, 0x73, 0x71, 0x06, 0x09, 0x23, 0x1f, 0x5d, 0x45, 0xe0, 0x0a, 0xdd, 0xa1, 0x34, 0xb6, 0x02, 0xdd, 0x0e, 0xee, 0x0f, 0x67, 0x22, 0x49, 0x4b, 0x7e, 0x4f, 0x7b, 0x40, 0x57, 0x72, 0xc8, 0x31, 0xb6, 0x37, 0x29, 0xbe, 0x0f, 0x1c, 0x4b, 0x6d, 0x2a, 0x54, 0x2c, 0x15, 0x65, 0xc7, 0xdf, 0x23, 0x1d, 0x9e, 0x89, 0x2e, 0x58, 0x6a, 0x18, 0xec, 0x54, 0x37, 0x73, 0x76, 0xdb, 0x77, 0xf8, 0x13, 0x84 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 7.7", + /* Message */ + 55, + { 0x46, 0x47, 0xd8, 0x41, 0xc5, 0xa0, 0xb9, 0x97, 0x3a, 0x91, 0x45, 0x4d, 0xd1, 0xa0, 0x5e, 0xc0, 0xe5, 0x75, 0x03, 0xed, 0x99, 0x67, 0x2a, 0xc0, 0x02, 0xdf, 0xee, 0x77, 0x7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0xd9, 0x59, 0x12, 0xfc, 0x06, 0x10, 0x2d, 0x9b, 0xe8, 0x75, 0x25, 0xa7, 0x36, 0xb5, 0xaf, 0x21, 0xe1, 0x6d, 0xe3, 0xef, 0xaa, 0x66, 0xe9, 0xcf, 0x41, 0xca, 0x73, 0x48, 0x23, 0x23, 0xdd, 0xe8, 0x0e, 0xec, 0x30, 0x85, 0x81, 0xa4, 0x4c, 0xa3, 0xaa, 0xbf, 0x76, 0xdd, 0x48, 0x1d, 0xe6, 0x52, 0x9a } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 7.8", + /* Message */ + 8, + { 0xba, 0x10, 0xd4, 0x7a, 0x9f, 0x62, 0x42, 0x81 } +, + /* Seed */ + 118, + { 0x37, 0x9f, 0xdc, 0xfa, 0x5d, 0x8c, 0x61, 0x37, 0xc3, 0x6b, 0xad, 0x14, 0x3f, 0xd9, 0xb1, 0xf7, 0xe8, 0x94, 0xfa, 0x0e, 0x9a, 0xc0, 0xfb, 0x9c, 0xec, 0x60, 0xe8, 0x6c, 0x82, 0x53, 0x97, 0x5d, 0x8e, 0x78, 0x74, 0x21, 0x08, 0x49, 0x5e, 0x59, 0x4a, 0xd0, 0x89, 0x8f, 0xd0, 0x4c, 0x91, 0xe4, 0x01, 0xe7, 0xc8, 0x80, 0x89, 0xa8, 0x7b, 0x4a, 0x4a, 0x82, 0xe8, 0x34, 0xcd, 0x37, 0x77, 0xa7, 0xd3, 0xf8, 0x0e, 0x64, 0x86, 0x81, 0x2d, 0x4a, 0xb0, 0xd3, 0x37, 0x23, 0x16, 0x2b, 0xcb, 0xc7, 0xe0, 0x81, 0xa9, 0x9d, 0x3f, 0x9b, 0x5c, 0x3b, 0xa4, 0x4b, 0x19, 0xbd, 0xf8, 0x84, 0xa4, 0x62, 0x6f, 0xd7, 0xde, 0xf7, 0x67, 0x40, 0x57, 0xbe, 0xa0, 0x82, 0xe0, 0x0d, 0xb4, 0xb7, 0x61, 0xad, 0x75, 0x3a, 0xb5, 0x98, 0x5a, 0x94 } +, + /* Encryption */ + 129, + { 0x00, 0xc4, 0x96, 0x5e, 0x29, 0x63, 0xd7, 0xbc, 0x5b, 0x10, 0x44, 0xd8, 0xfc, 0x75, 0xeb, 0x33, 0x82, 0xce, 0xdd, 0x99, 0x07, 0x41, 0x97, 0x92, 0xef, 0xc8, 0x8c, 0x92, 0xb1, 0xd5, 0xc3, 0x90, 0xfa, 0xb1, 0x90, 0x01, 0x1c, 0x51, 0x8a, 0xc9, 0xce, 0x45, 0xc1, 0xb8, 0xe7, 0x27, 0x6b, 0xff, 0xc7, 0xc7, 0xe0, 0x5c, 0x25, 0x37, 0x08, 0x91, 0x37, 0xa9, 0x8d, 0xf6, 0xe0, 0xc6, 0x92, 0x02, 0x0e, 0xd6, 0x54, 0xaf, 0x83, 0x33, 0x9b, 0xab, 0x11, 0x92, 0x71, 0x77, 0xf2, 0xf5, 0x23, 0x22, 0x6b, 0x4f, 0xe6, 0x4b, 0x99, 0xc1, 0x72, 0x9f, 0x6c, 0x92, 0x29, 0x06, 0xbc, 0x16, 0xd3, 0x1f, 0x0c, 0x94, 0xdc, 0x2e, 0xa4, 0x13, 0x81, 0x0d, 0x55, 0x94, 0x0c, 0x97, 0xaf, 0xdd, 0x48, 0x29, 0xfb, 0xf1, 0x61, 0x8a, 0x8c, 0x9d, 0xe8, 0x9d, 0xc2, 0x40, 0x06, 0xe7, 0xe4, 0x21, 0xa5, 0x8d, 0x38 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 7.9", + /* Message */ + 38, + { 0xef, 0xc7, 0x48, 0x9f, 0xec, 0x77, 0x9e, 0x05, 0x2e, 0x37, 0x9c, 0x1a, 0xd9, 0x04, 0x59, 0x03, 0xb6, 0x84, 0x2a, 0x9c, 0xa4, 0x1b, 0x48, 0xbd, 0xdc, 0xe5, 0x80, 0x80, 0xa5, 0xed, 0xec, 0x63, 0xf3, 0x6e, 0xe1, 0x15, 0x60, 0xfd } +, + /* Seed */ + 88, + { 0xc8, 0xec, 0xba, 0x62, 0x72, 0x14, 0xc4, 0x14, 0xd7, 0xc3, 0xfd, 0xd3, 0x16, 0xc2, 0xd8, 0x2a, 0x98, 0x53, 0x57, 0x28, 0xb9, 0xa9, 0x37, 0x6f, 0x69, 0xa9, 0x53, 0xd7, 0xcd, 0x1c, 0xea, 0xd7, 0x10, 0x53, 0xdb, 0xe0, 0x14, 0x0c, 0x7f, 0x02, 0xbd, 0x71, 0xe0, 0x13, 0x7f, 0xea, 0x29, 0xcd, 0x4c, 0x21, 0xa5, 0x8b, 0xde, 0xc6, 0x66, 0x40, 0x99, 0x0d, 0x28, 0xc1, 0x0b, 0x70, 0x17, 0x59, 0x3c, 0x1d, 0x11, 0xfe, 0x9a, 0xbe, 0xbd, 0x71, 0x24, 0xe1, 0xd9, 0x85, 0x63, 0x1e, 0x94, 0xe9, 0xe5, 0x12, 0x41, 0x26, 0x0f, 0x9e, 0xf1, 0xf1 } +, + /* Encryption */ + 129, + { 0x00, 0x32, 0x18, 0x4e, 0xf2, 0x88, 0xfa, 0x0a, 0xaa, 0x0c, 0x2c, 0x1a, 0x19, 0xe7, 0xc2, 0x9f, 0x81, 0xc7, 0x01, 0x2f, 0x45, 0x29, 0xeb, 0x9e, 0xeb, 0x53, 0x68, 0x1f, 0x62, 0x47, 0xf8, 0xd4, 0x35, 0x69, 0x13, 0x45, 0xa5, 0x14, 0x8a, 0x2c, 0x87, 0x7b, 0x2b, 0x18, 0x92, 0x6b, 0xae, 0x9d, 0xe5, 0xb3, 0x17, 0xba, 0xc0, 0xe9, 0x02, 0xc9, 0x60, 0x25, 0xee, 0xc2, 0xf9, 0xea, 0xbd, 0x0f, 0x9e, 0x88, 0x86, 0xef, 0x95, 0x19, 0xc8, 0x24, 0x9f, 0xeb, 0x83, 0x46, 0x65, 0xc1, 0x01, 0x0d, 0xb7, 0x62, 0x4f, 0x48, 0x7e, 0x16, 0x1f, 0x89, 0xf6, 0xae, 0x00, 0x18, 0xc1, 0xf4, 0xe0, 0xab, 0x54, 0x72, 0xf7, 0xf0, 0x99, 0x35, 0x61, 0xcd, 0x59, 0x85, 0xf3, 0x83, 0xd0, 0x49, 0xdd, 0x83, 0x2b, 0x82, 0xc8, 0x37, 0x48, 0xb2, 0x28, 0x1b, 0xfb, 0x99, 0xd9, 0xd5, 0x00, 0x8d, 0xc8, 0x07, 0xde } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 7.10", + /* Message */ + 19, + { 0x5b, 0x26, 0x4f, 0xf8, 0x8d, 0xef, 0xd3, 0xc2, 0x99, 0x99, 0x3d, 0x81, 0x12, 0x9a, 0x6e, 0x5d, 0xd2, 0xb5, 0x7b } +, + /* Seed */ + 107, + { 0x0b, 0xe7, 0xab, 0x5b, 0x29, 0x70, 0x48, 0x43, 0xc1, 0xc0, 0xd7, 0xe4, 0xef, 0x5e, 0x93, 0xf3, 0xba, 0x71, 0x7d, 0xb7, 0x81, 0x5a, 0xf5, 0x72, 0xe3, 0xa9, 0xab, 0x3f, 0x99, 0xb1, 0xac, 0x9a, 0x22, 0xb9, 0x2d, 0x9b, 0x43, 0xda, 0x2b, 0x99, 0x65, 0xc7, 0x97, 0x70, 0x57, 0x17, 0x3c, 0x03, 0x57, 0x3f, 0x32, 0x48, 0x0a, 0x92, 0x70, 0x19, 0xaf, 0xff, 0x0e, 0x0e, 0x34, 0xe4, 0x09, 0x5e, 0x4a, 0x4d, 0x39, 0x2d, 0xcd, 0x1b, 0xd9, 0xf2, 0x7d, 0x32, 0xfd, 0xe7, 0x15, 0x9f, 0x02, 0x3c, 0x83, 0x08, 0x9e, 0x88, 0xa7, 0x1f, 0x24, 0x33, 0x64, 0x8e, 0xf8, 0xc8, 0x40, 0x45, 0xb9, 0xc3, 0x6d, 0x8e, 0x5f, 0x6e, 0xff, 0x03, 0x4b, 0x91, 0xb7, 0x02, 0x34 } +, + /* Encryption */ + 129, + { 0x00, 0x4c, 0x65, 0x29, 0x35, 0x56, 0xf2, 0xfd, 0x15, 0xab, 0x90, 0xeb, 0x22, 0xe0, 0x75, 0x33, 0xb3, 0xdc, 0x17, 0x33, 0x4f, 0x5e, 0xed, 0x27, 0xa3, 0x99, 0x31, 0x80, 0xc5, 0x6c, 0x8e, 0x3d, 0x8f, 0x51, 0xee, 0xb2, 0x75, 0x95, 0xf8, 0x78, 0xd2, 0x36, 0x65, 0xba, 0x3a, 0xb0, 0xe7, 0x28, 0xa5, 0xae, 0xf7, 0x23, 0x4f, 0x60, 0x36, 0xb0, 0x23, 0xf8, 0x71, 0xc2, 0xd6, 0x55, 0x2a, 0x18, 0xad, 0x5a, 0x25, 0xbe, 0xc5, 0x5b, 0xc7, 0x6b, 0xee, 0x63, 0x83, 0x46, 0x12, 0x81, 0xd3, 0x9a, 0x30, 0xf6, 0xd6, 0x60, 0x92, 0xe0, 0xcf, 0xf6, 0x92, 0x32, 0x68, 0xfc, 0x04, 0x3c, 0xdf, 0x74, 0x7e, 0x8d, 0x54, 0x89, 0x50, 0x4e, 0x7d, 0xb3, 0x0a, 0x7b, 0xd9, 0x1a, 0x2b, 0xfc, 0x6c, 0x1b, 0x34, 0x14, 0x40, 0x57, 0x01, 0x75, 0x3d, 0x5b, 0x85, 0xff, 0x73, 0x52, 0x01, 0x2d, 0x55, 0xe9, 0x23 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 7.11", + /* Message */ + 37, + { 0x72, 0xe2, 0x09, 0x00, 0xe5, 0xbc, 0xc2, 0x3c, 0xf8, 0x79, 0xed, 0x35, 0x31, 0x88, 0x9a, 0x1e, 0xd5, 0xaa, 0x3d, 0x5c, 0x79, 0x2e, 0x34, 0xe3, 0xb1, 0x26, 0x90, 0xd9, 0xac, 0x24, 0x03, 0xd0, 0xf6, 0xf7, 0x8f, 0x59, 0x23 } +, + /* Seed */ + 89, + { 0x11, 0x62, 0x75, 0xe9, 0xbe, 0x1b, 0xd4, 0xe6, 0xf2, 0x03, 0xff, 0xe4, 0xf0, 0xab, 0x9a, 0x32, 0x73, 0x84, 0x10, 0xe9, 0x23, 0xe8, 0x39, 0x71, 0xee, 0x9a, 0x6b, 0x99, 0x2c, 0x65, 0x0a, 0x03, 0x1f, 0x94, 0x0f, 0x6e, 0xf3, 0x3d, 0x61, 0x50, 0xdf, 0xf8, 0xb3, 0x9d, 0xcf, 0x22, 0x50, 0xd5, 0x66, 0x5c, 0x04, 0x27, 0x3b, 0x2b, 0xe2, 0xde, 0xc9, 0x97, 0x12, 0xbb, 0xc0, 0x12, 0xf7, 0x5a, 0x31, 0xb3, 0x0b, 0xa0, 0x6f, 0xf9, 0xeb, 0xe3, 0xb8, 0x9f, 0x58, 0xa6, 0x8f, 0x26, 0x85, 0xe3, 0x38, 0xff, 0x6c, 0xb8, 0xd4, 0x18, 0x1a, 0x8a, 0x14 } +, + /* Encryption */ + 129, + { 0x00, 0x21, 0x4a, 0x83, 0xbe, 0x45, 0x3a, 0x75, 0xbc, 0xda, 0x94, 0x33, 0xa7, 0xb9, 0x51, 0x43, 0x34, 0x39, 0x98, 0x30, 0x72, 0x07, 0x1c, 0xc8, 0x21, 0x12, 0xb7, 0x77, 0x42, 0xbe, 0x0c, 0x38, 0x22, 0x6c, 0xa3, 0xc6, 0xf3, 0x8d, 0x55, 0xb9, 0xca, 0x3f, 0x08, 0xc8, 0x79, 0x37, 0x89, 0x79, 0x6e, 0x6c, 0xde, 0x67, 0x37, 0x6d, 0x67, 0x3f, 0x5e, 0xc5, 0x7d, 0xac, 0xc3, 0x74, 0xc4, 0xc3, 0x17, 0x34, 0x44, 0xdd, 0x8a, 0x63, 0x76, 0xde, 0x8f, 0x9d, 0xdc, 0x31, 0xa4, 0xc0, 0x60, 0xd7, 0x72, 0xf0, 0x2e, 0xb7, 0x49, 0x51, 0x2d, 0xcd, 0x04, 0x02, 0x31, 0x17, 0x5d, 0x0b, 0x69, 0x42, 0xa9, 0x47, 0xb2, 0xc8, 0x2f, 0x7c, 0x19, 0xe2, 0xce, 0x87, 0x50, 0x00, 0xaf, 0x84, 0x27, 0x4c, 0xbe, 0x2a, 0xdb, 0xf2, 0xfb, 0xfb, 0x53, 0x7c, 0xcb, 0xe2, 0xfb, 0xd0, 0x72, 0x87, 0x13, 0x78, 0x75 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 7.12", + /* Message */ + 21, + { 0x16, 0xb1, 0x10, 0xe2, 0x90, 0x9b, 0x11, 0xb0, 0xcf, 0x36, 0xb0, 0x52, 0xc6, 0xf3, 0x93, 0x6a, 0x2c, 0xa1, 0x3f, 0xc3, 0xa5 } +, + /* Seed */ + 105, + { 0xc2, 0xbf, 0x9e, 0x4f, 0xb1, 0xed, 0x70, 0xca, 0x21, 0x2d, 0x15, 0xee, 0x8e, 0xb3, 0xcd, 0x66, 0x0e, 0xb6, 0x5c, 0x52, 0x78, 0xe0, 0x3a, 0x3b, 0x10, 0xeb, 0x12, 0xb2, 0x53, 0x34, 0xa4, 0x72, 0x8b, 0x94, 0x99, 0x20, 0x12, 0x2f, 0xb9, 0x92, 0xbf, 0x2c, 0xe4, 0x30, 0x10, 0x3d, 0x74, 0xab, 0x74, 0xe6, 0xd6, 0xe7, 0x62, 0xb8, 0x5d, 0x6e, 0xf9, 0xbe, 0xb7, 0xd7, 0x25, 0x98, 0xf2, 0x93, 0xa4, 0x35, 0x62, 0xe9, 0x06, 0x89, 0x54, 0x11, 0x11, 0x51, 0x1d, 0x31, 0x4a, 0x9c, 0x46, 0x02, 0x23, 0x76, 0xad, 0x05, 0x5d, 0x54, 0xce, 0xd6, 0xac, 0x1f, 0x36, 0xe9, 0x8c, 0x2b, 0x25, 0xa0, 0xac, 0xde, 0x64, 0xdc, 0xf6, 0x52, 0x2c, 0x3d, 0x22 } +, + /* Encryption */ + 129, + { 0x01, 0x6a, 0xa9, 0x5a, 0x08, 0x23, 0x82, 0xc1, 0x0c, 0x04, 0x53, 0x10, 0xfe, 0xfe, 0xcc, 0x8d, 0x17, 0xdb, 0xf2, 0x16, 0xd8, 0xed, 0xc0, 0x4b, 0xda, 0xcd, 0x4f, 0x52, 0x4d, 0xe4, 0x85, 0xb7, 0xfe, 0x8a, 0x26, 0xf1, 0x4c, 0xab, 0xd2, 0x97, 0xe7, 0xf0, 0x3b, 0x3c, 0x85, 0x08, 0x6a, 0x16, 0x14, 0x7d, 0x5f, 0x61, 0x93, 0x91, 0x9b, 0xb9, 0x5a, 0x53, 0xc1, 0x46, 0xc7, 0x84, 0xc0, 0x0b, 0x53, 0x32, 0xe0, 0x18, 0xf6, 0x43, 0xcf, 0x95, 0x87, 0x24, 0xcd, 0x08, 0x07, 0x5e, 0xb6, 0x4c, 0xa5, 0x68, 0x0c, 0x27, 0xc7, 0x05, 0xd4, 0x0d, 0x88, 0xb9, 0xd7, 0xf4, 0x26, 0xb7, 0x36, 0xe3, 0xc5, 0xf6, 0x39, 0x4e, 0xa6, 0x83, 0xb6, 0x5c, 0x23, 0x73, 0xa6, 0xfc, 0xeb, 0x14, 0xf2, 0xea, 0x85, 0x1c, 0xa8, 0xe0, 0x00, 0xe2, 0x4d, 0xc8, 0xf7, 0xe7, 0xc8, 0x1b, 0x1d, 0x4e, 0x72, 0x0c, 0x36 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 7.13", + /* Message */ + 17, + { 0x3c, 0x86, 0x0a, 0x28, 0xfa, 0xe8, 0xda, 0x2a, 0xc0, 0xd9, 0xa3, 0x39, 0x89, 0x97, 0x7f, 0xfa, 0x04 } +, + /* Seed */ + 109, + { 0x7c, 0x96, 0x99, 0x90, 0x6c, 0x9f, 0x16, 0x65, 0x12, 0x5c, 0x0b, 0x10, 0x67, 0x3f, 0x3d, 0xad, 0x98, 0xc9, 0x1a, 0x4f, 0xf0, 0xfa, 0xaa, 0x64, 0x7d, 0xb5, 0x54, 0xfd, 0x62, 0x27, 0xef, 0x50, 0x90, 0x9c, 0x97, 0xb7, 0x06, 0x09, 0x2b, 0xe2, 0x10, 0xdb, 0x2c, 0x24, 0xba, 0x9e, 0x8e, 0x6a, 0x87, 0xf9, 0xdd, 0xd9, 0xf3, 0x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 0x5d, 0x62, 0xd0, 0xaf } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 7.14", + /* Message */ + 30, + { 0x4e, 0xdf, 0x4a, 0xd3, 0x44, 0x0f, 0x17, 0xb1, 0x0d, 0x26, 0xaf, 0xcd, 0xf4, 0xe4, 0x44, 0xd2, 0xaa, 0x61, 0xa1, 0x97, 0x55, 0xa6, 0x21, 0x07, 0x98, 0x3f, 0x01, 0x22, 0xfb, 0x2a } +, + /* Seed */ + 96, + { 0xe0, 0x20, 0x09, 0x39, 0x39, 0xb4, 0x18, 0x9e, 0x93, 0x4c, 0xb6, 0x2d, 0x27, 0xca, 0x5e, 0x97, 0x19, 0x65, 0x2c, 0x13, 0x7f, 0xc4, 0x9e, 0x72, 0x1c, 0x4a, 0xb9, 0xe9, 0xf3, 0x98, 0xb0, 0xa6, 0x12, 0xde, 0x8a, 0x8a, 0x89, 0x99, 0xaf, 0x0d, 0xbc, 0x1c, 0xea, 0x0b, 0x61, 0x63, 0xda, 0x42, 0x61, 0x23, 0x28, 0x14, 0xed, 0x92, 0xeb, 0x21, 0x60, 0xcf, 0x4b, 0x26, 0xd0, 0x55, 0x1b, 0x1b, 0xdd, 0x91, 0x9d, 0x49, 0x47, 0x93, 0x78, 0x6e, 0x1b, 0x86, 0xf7, 0x9d, 0x64, 0x16, 0x61, 0x2a, 0x28, 0x22, 0x61, 0x36, 0x3d, 0x6c, 0x9b, 0x7a, 0x0d, 0x92, 0xad, 0x17, 0x58, 0xea, 0xad, 0x51 } +, + /* Encryption */ + 129, + { 0x00, 0x8c, 0xf9, 0xb3, 0xf3, 0xe7, 0x60, 0x90, 0xd1, 0x01, 0x17, 0x4e, 0xcd, 0x97, 0xd1, 0x0b, 0xff, 0x6d, 0xe4, 0xd4, 0x64, 0x40, 0x00, 0x3f, 0xc0, 0xd4, 0x28, 0xf1, 0x9b, 0x85, 0x58, 0xf3, 0x13, 0x74, 0xa5, 0xfa, 0x28, 0x3d, 0x03, 0xd4, 0xdd, 0x43, 0xf9, 0x3a, 0x4d, 0x9f, 0x14, 0xca, 0x00, 0x68, 0xdc, 0x2c, 0xf3, 0xe2, 0x54, 0x37, 0xb0, 0x5a, 0xb1, 0xd4, 0x06, 0x21, 0xee, 0xbd, 0x84, 0x16, 0xf5, 0x82, 0x8a, 0xe7, 0xc6, 0xcf, 0xd2, 0x97, 0xb4, 0x51, 0x8f, 0x79, 0x94, 0x2b, 0x91, 0x43, 0x23, 0x28, 0x4e, 0x29, 0x76, 0xa5, 0x4d, 0x3c, 0xd9, 0x11, 0x63, 0x3a, 0x30, 0x7e, 0xda, 0xf1, 0xed, 0xb6, 0x74, 0x98, 0x46, 0x6b, 0x3e, 0x98, 0x91, 0x6f, 0x99, 0x04, 0xf4, 0xa0, 0xea, 0x9b, 0x87, 0xa9, 0x83, 0x44, 0xf0, 0x73, 0x83, 0x3e, 0xdf, 0x9b, 0x2b, 0x53, 0x94, 0xcf, 0xd7 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 7.15", + /* Message */ + 22, + { 0x8a, 0x6d, 0x53, 0xb0, 0xad, 0xa1, 0x85, 0x4e, 0x23, 0x13, 0x69, 0x1a, 0xab, 0x23, 0x06, 0x3d, 0xe1, 0x31, 0xbc, 0x36, 0xc7, 0x64 } +, + /* Seed */ + 104, + { 0x26, 0x85, 0x45, 0x8a, 0xeb, 0xfb, 0xd6, 0x07, 0x4e, 0xbe, 0xb0, 0xfc, 0x0c, 0xc4, 0x92, 0x1c, 0x27, 0x3e, 0x8c, 0x0a, 0x88, 0x15, 0x51, 0x50, 0x2e, 0x4c, 0x29, 0x9f, 0x33, 0x4d, 0xd5, 0x67, 0xf5, 0x16, 0x75, 0xb0, 0xff, 0x30, 0xf2, 0xc4, 0x82, 0x63, 0x20, 0x03, 0x64, 0x99, 0x66, 0x99, 0xf9, 0xb1, 0x72, 0xaf, 0xfe, 0xc0, 0xe7, 0x9e, 0x5c, 0x52, 0x3d, 0x1e, 0x77, 0x9e, 0xc0, 0x6d, 0xec, 0xd4, 0x76, 0xa5, 0x74, 0x30, 0x78, 0x1e, 0x2d, 0xc8, 0x1f, 0x25, 0xd6, 0x0d, 0x3a, 0x73, 0x97, 0x65, 0x79, 0xa2, 0xf0, 0x1f, 0x07, 0x58, 0x4c, 0xf8, 0xe5, 0xfb, 0x3e, 0xbd, 0x8d, 0x5a, 0x93, 0x2d, 0x57, 0xaa, 0x8a, 0x18, 0x0a, 0xaa } +, + /* Encryption */ + 129, + { 0x01, 0x3a, 0x3d, 0x32, 0xee, 0xc7, 0x35, 0xeb, 0xda, 0x13, 0xf8, 0xbe, 0x76, 0x02, 0xa0, 0x47, 0x5c, 0xf3, 0xcf, 0x28, 0x5b, 0x42, 0x86, 0xad, 0x93, 0xd6, 0x12, 0xc3, 0xad, 0x91, 0x72, 0x48, 0x80, 0x9d, 0x1c, 0x4c, 0x18, 0x0b, 0x36, 0x70, 0x15, 0xcc, 0x66, 0xc4, 0xd8, 0xe7, 0x86, 0x73, 0x84, 0x16, 0x8c, 0xf4, 0xcb, 0x71, 0x9b, 0xd5, 0x93, 0x35, 0x53, 0x55, 0xcd, 0xd7, 0xd7, 0x53, 0x0c, 0x80, 0xc8, 0x67, 0x74, 0x5f, 0x96, 0x61, 0xc6, 0xc3, 0x3b, 0xcb, 0x97, 0xf2, 0xcf, 0x75, 0xa4, 0xc2, 0x7c, 0x3c, 0xbb, 0xdb, 0xbe, 0x7e, 0xaf, 0x4f, 0x82, 0x34, 0xf2, 0x12, 0xe3, 0x05, 0x82, 0x56, 0xd4, 0x43, 0x9a, 0x9f, 0x97, 0x81, 0xdf, 0x48, 0xef, 0xdb, 0x02, 0x35, 0x68, 0xf9, 0x4a, 0xe4, 0x59, 0x46, 0x54, 0xa0, 0xf9, 0xba, 0xf6, 0xea, 0x30, 0xb7, 0xd8, 0xd9, 0x48, 0x0a, 0xd3 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 7.16", + /* Message */ + 17, + { 0x20, 0xf0, 0x20, 0x44, 0xe6, 0x3a, 0xc9, 0x2e, 0xb9, 0xfa, 0xf1, 0xa0, 0xce, 0x35, 0xba, 0x72, 0x09 } +, + /* Seed */ + 109, + { 0x2d, 0xe1, 0xfc, 0xc1, 0x17, 0xf8, 0x21, 0xf1, 0xde, 0xa7, 0x94, 0xb5, 0xee, 0xb3, 0x13, 0xf4, 0x29, 0xe0, 0x0b, 0x97, 0x6b, 0x53, 0x41, 0x9d, 0x3d, 0x03, 0xec, 0xaa, 0x1b, 0x50, 0x76, 0x88, 0x77, 0xe8, 0xb7, 0xfb, 0xd6, 0xc3, 0x63, 0x04, 0x7e, 0x15, 0xc2, 0x55, 0x79, 0x3b, 0x3c, 0xbe, 0x0f, 0x58, 0x84, 0xf0, 0xa5, 0x11, 0x25, 0x4d, 0x31, 0xbf, 0xb2, 0x37, 0x41, 0x02, 0x3c, 0x1f, 0x88, 0x1f, 0xe0, 0x16, 0xa1, 0x2e, 0xef, 0x1b, 0x8a, 0xf2, 0x2b, 0x93, 0x68, 0x20, 0x7e, 0x7b, 0x16, 0x39, 0xf7, 0x27, 0x1d, 0xeb, 0xe3, 0xc8, 0xdf, 0x52, 0x93, 0xee, 0xc3, 0xa0, 0x32, 0xf1, 0xce, 0x55, 0x9c, 0x0a, 0x04, 0x77, 0x1b, 0xbf, 0x88, 0x98, 0x94, 0x7c, 0xa4 } +, + /* Encryption */ + 129, + { 0x01, 0x70, 0x06, 0xe8, 0x6f, 0x6c, 0x58, 0x58, 0xfe, 0x5a, 0xde, 0x0d, 0xcb, 0xfa, 0x9c, 0xcd, 0x11, 0xc0, 0x2d, 0x4e, 0x7d, 0x0d, 0xe6, 0xc1, 0x58, 0xad, 0xf9, 0xee, 0xf1, 0x01, 0x07, 0xe7, 0xa4, 0xc3, 0x6b, 0xd3, 0xd9, 0x29, 0xea, 0x6a, 0x47, 0x6e, 0xcf, 0xa0, 0xb6, 0xec, 0xd0, 0x51, 0x49, 0xb5, 0x12, 0x15, 0x95, 0x48, 0x93, 0xa1, 0xab, 0x26, 0x69, 0xc0, 0x42, 0xda, 0x83, 0xe8, 0xc8, 0x18, 0xb0, 0x0a, 0xe7, 0x34, 0xde, 0x5f, 0x9e, 0x0b, 0x97, 0xba, 0x1f, 0xe3, 0xe9, 0xc4, 0x6a, 0xe9, 0x81, 0x6b, 0x63, 0xb1, 0x5c, 0x2d, 0xcc, 0x61, 0xcb, 0x3b, 0x8b, 0x2c, 0x23, 0xdd, 0xb9, 0x9f, 0xcd, 0x54, 0xe9, 0x55, 0x60, 0x91, 0x8b, 0x9a, 0x0f, 0xa3, 0xc4, 0xb6, 0x27, 0x3d, 0x1b, 0x28, 0xa2, 0x13, 0xe1, 0x20, 0xb4, 0xf2, 0x42, 0x86, 0x96, 0x5e, 0xbe, 0xe9, 0x4f, 0xf8, 0x96 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 7.17", + /* Message */ + 3, + { 0xd3, 0x88, 0x3b } +, + /* Seed */ + 123, + { 0x5c, 0xa3, 0xbb, 0xf9, 0x92, 0xd7, 0xae, 0x35, 0x94, 0xc6, 0x05, 0xc3, 0x9c, 0x3e, 0x97, 0x90, 0x25, 0xcc, 0xb0, 0xa3, 0x5c, 0x6e, 0xf0, 0xfa, 0x57, 0x4a, 0x98, 0xbe, 0x05, 0xef, 0x7c, 0x32, 0x8a, 0x19, 0xa2, 0x77, 0x5b, 0xa0, 0x6f, 0x2d, 0xd1, 0xe0, 0xff, 0x6f, 0x0f, 0x1f, 0x6a, 0x3b, 0x20, 0xfb, 0xda, 0x21, 0x62, 0xd0, 0x92, 0x4f, 0xf5, 0x5b, 0x70, 0xeb, 0xfe, 0x2b, 0x16, 0xd4, 0xff, 0x6a, 0xef, 0x8d, 0x47, 0xeb, 0xe5, 0x96, 0x38, 0xe5, 0x81, 0x0f, 0xfd, 0xb5, 0x8d, 0xb0, 0x5f, 0x4d, 0x9b, 0x4a, 0x3a, 0x42, 0x3f, 0x96, 0x7f, 0xe5, 0x79, 0xf8, 0x73, 0x78, 0x36, 0x9d, 0x5c, 0x5c, 0x07, 0xe5, 0xe3, 0xcb, 0x5d, 0xdd, 0xf3, 0x89, 0x62, 0x11, 0x80, 0x27, 0x0a, 0x21, 0xe0, 0x10, 0x78, 0xc8, 0x9a, 0xfb, 0xab, 0x18, 0x9e, 0x87, 0xf7 } +, + /* Encryption */ + 129, + { 0x01, 0x6f, 0x55, 0x05, 0xf7, 0x4f, 0xf1, 0x10, 0x4d, 0xa1, 0xf8, 0xa5, 0x2e, 0x50, 0xbf, 0xe2, 0x9c, 0x99, 0x87, 0x10, 0xc5, 0x7d, 0xe4, 0x40, 0x98, 0xa9, 0x57, 0x9e, 0x7a, 0x33, 0x13, 0xb6, 0x29, 0x60, 0x31, 0x02, 0xf0, 0x8d, 0x2d, 0x91, 0x1f, 0x91, 0x7a, 0x9c, 0x96, 0x62, 0x60, 0x8c, 0x97, 0xa1, 0xea, 0x37, 0x17, 0x34, 0xf6, 0x7c, 0xbf, 0x70, 0x03, 0xd9, 0x3c, 0x4c, 0x31, 0x4c, 0x3a, 0x0e, 0x77, 0xf3, 0x65, 0x8f, 0xa4, 0xd0, 0x72, 0x25, 0x62, 0xc4, 0xe1, 0x3e, 0x85, 0xa7, 0xc8, 0xd0, 0xd9, 0xd4, 0xfb, 0xf7, 0x12, 0x58, 0x84, 0xba, 0x62, 0xad, 0x28, 0x59, 0xb4, 0xd9, 0x61, 0x36, 0xf7, 0xa2, 0x45, 0x54, 0x69, 0xce, 0xb6, 0x0b, 0x63, 0xba, 0x84, 0x74, 0xe6, 0x16, 0x0c, 0x83, 0x17, 0x92, 0x1a, 0x07, 0xb4, 0xb6, 0x43, 0x6f, 0x37, 0x6c, 0x5f, 0x98, 0x25, 0x7b, 0x17 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 7.18", + /* Message */ + 11, + { 0x06, 0xa2, 0xae, 0x82, 0xa4, 0x85, 0x32, 0x07, 0xc9, 0xf9, 0x75 } +, + /* Seed */ + 115, + { 0xe2, 0xc3, 0x36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 0x78, 0x7a, 0x14, 0xd6, 0x22, 0xdb, 0xb7, 0x9c, 0xe8, 0x64, 0x4c, 0x4f, 0xd1, 0xd2, 0xe4, 0x1f, 0x7c, 0x1c, 0x97, 0x27, 0x96, 0x11, 0x74, 0x0f, 0xc5, 0x00, 0x00, 0x31, 0x78, 0xb3, 0x7b, 0xbd, 0x81, 0xc5, 0xa5, 0x82, 0x9b, 0x5c, 0x14, 0xbf, 0x45, 0x9c, 0x42, 0x38, 0xb0, 0x3b, 0xee, 0xf7, 0x3e, 0x49, 0x8f, 0x86, 0x5f, 0x6c, 0xa7, 0x9a, 0x9e, 0xd6, 0x0f, 0x65 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 7.19", + /* Message */ + 6, + { 0xad, 0x8b, 0x11, 0xa9, 0x27, 0xde } +, + /* Seed */ + 120, + { 0x5e, 0xca, 0xcf, 0xf6, 0x3a, 0x79, 0x38, 0xe9, 0x98, 0x06, 0x8a, 0x2f, 0x4b, 0xa6, 0xbc, 0xc1, 0x02, 0x0e, 0x1f, 0x28, 0xc7, 0x34, 0xe4, 0x34, 0xe8, 0x86, 0x3c, 0x48, 0xe6, 0xdf, 0xfa, 0xe2, 0x8d, 0x18, 0x52, 0x72, 0x7f, 0xfa, 0x7f, 0x2e, 0xfa, 0x3d, 0xe7, 0x01, 0x3b, 0x81, 0x2a, 0x02, 0xb2, 0x17, 0x1a, 0x0f, 0x94, 0x0b, 0x36, 0xd9, 0x28, 0xdb, 0xdb, 0x96, 0x0a, 0x6b, 0x22, 0x03, 0x0c, 0x89, 0x37, 0x89, 0xcb, 0xfd, 0xea, 0x97, 0x35, 0xe9, 0xad, 0x10, 0x94, 0xa6, 0x84, 0x61, 0xc2, 0xeb, 0x6f, 0x71, 0x8b, 0xe4, 0x74, 0xd9, 0x3a, 0x51, 0x93, 0x0e, 0x3c, 0xda, 0x02, 0xc2, 0x1f, 0x63, 0x63, 0x91, 0x4e, 0x7e, 0xda, 0x54, 0x84, 0x03, 0x7a, 0x76, 0xad, 0xc5, 0x33, 0x12, 0xeb, 0x9d, 0xbb, 0xe4, 0x5e, 0x23, 0xa1, 0x4b } +, + /* Encryption */ + 129, + { 0x01, 0x1f, 0xa4, 0x3f, 0x5f, 0x4f, 0xbb, 0x98, 0x30, 0x11, 0x81, 0x4d, 0x4a, 0xf5, 0x45, 0x52, 0x1d, 0xf0, 0xb5, 0x9e, 0x9b, 0x6f, 0xfd, 0x71, 0x33, 0x3b, 0x8f, 0x9b, 0xba, 0xaa, 0x0f, 0xcd, 0xc1, 0x42, 0x1c, 0xe4, 0xbf, 0x31, 0xbf, 0x99, 0x59, 0xfd, 0xc6, 0xb0, 0x9b, 0x4f, 0x42, 0x51, 0xdd, 0xee, 0xe8, 0x21, 0x0f, 0xc3, 0xa5, 0x2f, 0xe7, 0xc7, 0x1a, 0x87, 0x6e, 0x6d, 0xde, 0x1d, 0xfb, 0x59, 0xa4, 0xda, 0xb2, 0x7d, 0x34, 0xfd, 0xce, 0x5b, 0xbf, 0xc6, 0xed, 0x62, 0x3e, 0x89, 0x96, 0x7f, 0xb6, 0xfe, 0x73, 0x16, 0x20, 0x15, 0x28, 0x2c, 0x5f, 0x45, 0x01, 0x38, 0xf2, 0x50, 0x4a, 0xb6, 0x1c, 0x1f, 0x12, 0xd2, 0x64, 0x9d, 0x81, 0x5d, 0x6e, 0x81, 0x38, 0x43, 0x8f, 0x8a, 0x80, 0x46, 0xc4, 0xe8, 0x40, 0xcb, 0x71, 0x85, 0x98, 0xe1, 0xe4, 0xa9, 0xfc, 0x25, 0xa9, 0x45, 0x64 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 7.20", + /* Message */ + 44, + { 0xbe, 0xe2, 0x94, 0x36, 0xc2, 0xa0, 0xde, 0x16, 0xf6, 0x60, 0x42, 0x91, 0x70, 0x07, 0xfb, 0x51, 0x30, 0xf3, 0xc1, 0xaa, 0x7d, 0xf2, 0xc7, 0xc3, 0xbd, 0x99, 0xfb, 0xc1, 0xb4, 0x13, 0xaf, 0x4f, 0x96, 0xa6, 0x5b, 0x0e, 0x54, 0x3e, 0xc6, 0xa5, 0x0b, 0xe8, 0x3a, 0x9f } +, + /* Seed */ + 82, + { 0x23, 0x91, 0xa6, 0x84, 0x25, 0xdd, 0x8f, 0x0b, 0x83, 0xc9, 0xb3, 0x61, 0x24, 0x67, 0xa7, 0x79, 0xcf, 0x92, 0xf5, 0xff, 0x96, 0x11, 0xc0, 0x14, 0x93, 0xbc, 0xbe, 0xf8, 0x65, 0xe1, 0x5b, 0xba, 0x5e, 0x8f, 0xcf, 0x74, 0xbe, 0xb9, 0xea, 0x25, 0x73, 0xa9, 0xfc, 0xe5, 0x41, 0x64, 0xd0, 0x6b, 0xaa, 0x8b, 0x6d, 0xf3, 0x67, 0xcc, 0x4c, 0x6a, 0x11, 0x4a, 0xa0, 0x34, 0x6c, 0x45, 0x4a, 0x2a, 0x9e, 0x60, 0x53, 0x59, 0x18, 0xd3, 0x66, 0x0c, 0x66, 0x48, 0x4e, 0xd9, 0x53, 0x72, 0x7a, 0x9c, 0x9a, 0x25 } +, + /* Encryption */ + 129, + { 0x00, 0x98, 0x9d, 0xdb, 0xd2, 0x8d, 0x60, 0x95, 0xad, 0xa6, 0x88, 0x1e, 0x28, 0x34, 0x1c, 0xe7, 0xa0, 0xa1, 0xca, 0x6b, 0xf7, 0xf3, 0x1f, 0x77, 0x2f, 0x91, 0x04, 0x93, 0xaf, 0xdb, 0xa2, 0xd6, 0x35, 0x9d, 0x50, 0xb9, 0x83, 0x3f, 0x83, 0xd0, 0xab, 0x87, 0x13, 0xab, 0xe8, 0xe2, 0x10, 0x2a, 0x27, 0xab, 0x2a, 0x60, 0x1f, 0xb7, 0x7b, 0x9a, 0x25, 0xd6, 0xa0, 0xaf, 0xf4, 0x0c, 0xfd, 0xcf, 0x9e, 0x12, 0xc4, 0x28, 0x43, 0xeb, 0xad, 0x32, 0x83, 0x24, 0xa7, 0x19, 0xf2, 0x9e, 0x8d, 0x79, 0xea, 0x9e, 0x5d, 0x0d, 0x98, 0x86, 0x95, 0x73, 0x60, 0x34, 0xdb, 0x5f, 0xea, 0x73, 0xdd, 0x36, 0x00, 0x13, 0x6f, 0x57, 0xa3, 0x98, 0xfe, 0x35, 0x2b, 0x27, 0x8c, 0x60, 0xcb, 0x74, 0xec, 0x98, 0xad, 0x57, 0xa3, 0xe1, 0xd8, 0xc4, 0x47, 0x8c, 0xa6, 0x17, 0x9f, 0x4d, 0x04, 0x26, 0xf0, 0xf4, 0x20 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 8: A 1026-bit RSA key pair", +{ + /* Modulus */ + 129, + { 0x02, 0x52, 0xe9, 0x5b, 0xb1, 0x1b, 0xa1, 0xe1, 0xc7, 0xc9, 0x5b, 0x68, 0x53, 0xf8, 0xde, 0x0b, 0xfe, 0x2b, 0x64, 0x03, 0xac, 0x1b, 0xde, 0x81, 0x9d, 0x91, 0x89, 0x07, 0x74, 0x7b, 0x01, 0x99, 0xfa, 0xdb, 0x80, 0x59, 0xc2, 0x5a, 0xaf, 0x1a, 0xc5, 0x65, 0xa7, 0x49, 0x29, 0xd0, 0x15, 0xa2, 0x01, 0xf8, 0x97, 0xa9, 0xba, 0xfe, 0x75, 0x41, 0x68, 0x95, 0x5b, 0x35, 0x5b, 0xb0, 0x09, 0xce, 0x16, 0x14, 0x93, 0x12, 0x28, 0x3c, 0x39, 0xce, 0xe2, 0x20, 0xd0, 0xf0, 0x85, 0x8b, 0x13, 0x81, 0x2e, 0x86, 0xa7, 0xd4, 0xe5, 0x38, 0x8b, 0x7e, 0xae, 0x5a, 0xca, 0x7c, 0x88, 0x6a, 0x76, 0xd3, 0xb1, 0xe6, 0xdd, 0x67, 0x92, 0x68, 0xa8, 0x23, 0x11, 0xe2, 0x82, 0x03, 0x18, 0xcb, 0x8f, 0x0f, 0x7e, 0x85, 0xf0, 0xe6, 0x69, 0x2e, 0xb0, 0xde, 0xdf, 0x30, 0x88, 0x1c, 0xaf, 0x73, 0x15, 0xd2, 0x7d } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 129, + { 0x01, 0x04, 0xc8, 0x5f, 0xd5, 0xd8, 0xd7, 0x93, 0x2a, 0x29, 0x85, 0xc4, 0xcb, 0x7e, 0x9e, 0x13, 0xa2, 0xc4, 0xf1, 0x90, 0x3c, 0x8b, 0x70, 0xf3, 0xdf, 0x97, 0x12, 0xfa, 0xee, 0x20, 0x17, 0xb9, 0x20, 0x82, 0xc5, 0x16, 0x53, 0xc0, 0xbd, 0xde, 0x9d, 0xe6, 0x6c, 0x39, 0x01, 0xb7, 0xc2, 0x2b, 0xe4, 0xf2, 0x4c, 0xc5, 0x6d, 0xff, 0xaa, 0x75, 0xd4, 0x3b, 0x18, 0xa2, 0xe0, 0xc0, 0xdf, 0xe3, 0x72, 0x6b, 0x19, 0x8c, 0xaa, 0x0c, 0x96, 0x65, 0x26, 0x3a, 0x93, 0x79, 0x6a, 0x27, 0xd3, 0x29, 0x84, 0x46, 0x5f, 0x4b, 0x4a, 0xff, 0xca, 0x0d, 0x92, 0xf4, 0xe5, 0x1a, 0x37, 0xe4, 0x1a, 0xb1, 0x55, 0x07, 0x66, 0xd5, 0xca, 0x7e, 0x90, 0xd4, 0xde, 0x90, 0x9b, 0xbd, 0x79, 0x4e, 0x8b, 0xc5, 0x2b, 0x74, 0x99, 0xa7, 0x3e, 0x46, 0x8a, 0xb4, 0x42, 0x13, 0xcb, 0x3a, 0x3b, 0x54, 0x52, 0xd2, 0xff } +, + /* Prime 1 */ + 65, + { 0x01, 0x93, 0x3f, 0x8f, 0x85, 0x82, 0xb8, 0xff, 0xf3, 0xe6, 0xbd, 0x30, 0x42, 0x81, 0x97, 0xf0, 0xac, 0xec, 0x63, 0xe6, 0x91, 0xf7, 0x9b, 0x91, 0xfb, 0xd4, 0xd4, 0xc4, 0x94, 0x2b, 0x8a, 0xe9, 0x13, 0xa4, 0x01, 0xf0, 0xe1, 0x7b, 0xa7, 0x66, 0xd0, 0xa8, 0xee, 0xec, 0x4c, 0xb0, 0xe3, 0xda, 0x17, 0xb6, 0xd9, 0x1f, 0x1a, 0x74, 0x24, 0x88, 0x09, 0x20, 0x1e, 0x37, 0x30, 0x15, 0x18, 0x61, 0x8f } +, + /* Prime 2 */ + 65, + { 0x01, 0x79, 0xad, 0x28, 0x3c, 0xac, 0x68, 0xaf, 0x21, 0x6a, 0x06, 0x86, 0xf4, 0x38, 0xb1, 0xe0, 0xe5, 0xc3, 0x6b, 0x95, 0x5f, 0x74, 0xe1, 0x07, 0xf3, 0x9c, 0x0d, 0xdd, 0xcc, 0x99, 0x0a, 0xd5, 0x73, 0xdc, 0x48, 0xa9, 0x73, 0x23, 0x5b, 0x6d, 0x82, 0x54, 0x36, 0x18, 0xf2, 0xe9, 0x55, 0x10, 0x5d, 0x8c, 0x4a, 0x5f, 0x49, 0x14, 0xbe, 0xe2, 0x5d, 0xe3, 0xc6, 0x93, 0x41, 0xde, 0x07, 0xed, 0x33 } +, + /* Prime exponent 1 */ + 65, + { 0x01, 0x6e, 0xf5, 0x3d, 0x6f, 0x3a, 0xd9, 0x8d, 0x9a, 0x6f, 0xd4, 0xa4, 0x71, 0x31, 0x2b, 0x8a, 0x8a, 0x62, 0x88, 0x3a, 0xcf, 0x84, 0x6b, 0x5e, 0xfa, 0xb3, 0xe0, 0x77, 0x8f, 0x7a, 0xdc, 0x6b, 0x64, 0x43, 0x30, 0xbc, 0xfb, 0x04, 0xa2, 0xff, 0x0e, 0x4d, 0x5d, 0x37, 0x4e, 0x46, 0xfe, 0xe2, 0x7e, 0x08, 0x18, 0x27, 0x94, 0xd4, 0x32, 0x56, 0x55, 0x2f, 0x94, 0x2f, 0x96, 0xa2, 0xeb, 0xd0, 0x03 } +, + /* Prime exponent 2 */ + 64, + { 0xe6, 0xc6, 0xe6, 0x25, 0x5c, 0xfc, 0x82, 0xb7, 0x1a, 0x40, 0x6e, 0xca, 0x60, 0xb2, 0x60, 0xc8, 0x45, 0x07, 0x42, 0x39, 0x18, 0x04, 0x41, 0x85, 0x9c, 0x3f, 0xe4, 0xde, 0x16, 0x4e, 0x46, 0x6c, 0x0b, 0x98, 0xe2, 0xe2, 0x16, 0x22, 0xd1, 0xe1, 0xa7, 0x6f, 0x7f, 0x03, 0x3f, 0x8c, 0xd8, 0xf9, 0x30, 0xb6, 0x69, 0x4f, 0x10, 0xbc, 0x2b, 0x3a, 0x4f, 0xea, 0x91, 0x24, 0xd8, 0x75, 0x63, 0x7d } +, + /* Coefficient */ + 64, + { 0x35, 0x42, 0x45, 0x2e, 0x83, 0x2c, 0x16, 0xac, 0xf9, 0xc3, 0xf4, 0x13, 0x49, 0x23, 0x5e, 0xdd, 0xd2, 0x75, 0xc7, 0x05, 0x3c, 0x55, 0x3b, 0xf8, 0x9e, 0x1a, 0x84, 0x57, 0x12, 0x48, 0x33, 0x3a, 0xad, 0x52, 0x0e, 0x3a, 0x34, 0x46, 0xc4, 0xc5, 0xe3, 0xfd, 0xd9, 0xba, 0xec, 0xd9, 0x29, 0x48, 0x0e, 0xb5, 0xb8, 0xfb, 0xef, 0x8e, 0x03, 0xad, 0xe9, 0xe3, 0x9a, 0x28, 0xfd, 0x8e, 0x75, 0x6c } + +} +, +{{ + "PKCS#1 v1.5 Encryption Example 8.1", + /* Message */ + 34, + { 0xf7, 0x26, 0x37, 0xae, 0xc2, 0x8d, 0x2b, 0x6e, 0xbf, 0x8f, 0x73, 0xd7, 0x48, 0x75, 0xdf, 0x01, 0xcd, 0x12, 0x24, 0x8f, 0x00, 0x20, 0x60, 0x8e, 0x61, 0xc7, 0x3d, 0x1a, 0x01, 0xf9, 0x72, 0xf7, 0x4d, 0xee } +, + /* Seed */ + 92, + { 0xcc, 0x20, 0x77, 0xa2, 0x40, 0x01, 0xf3, 0xe3, 0x86, 0x96, 0x94, 0xe4, 0xfe, 0x27, 0x72, 0xbf, 0x93, 0x8f, 0x76, 0x27, 0x66, 0x7b, 0x62, 0xd5, 0x90, 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f1, 0x2c, 0xbc, 0x4c, 0x9c, 0x16, 0x84, 0xac, 0xf9, 0x02, 0x97, 0x0d, 0x82, 0x09, 0x49 } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Encryption Example 8.2", + /* Message */ + 60, + { 0x2a, 0x8e, 0x3e, 0xe7, 0xea, 0xc6, 0xb2, 0x2e, 0xc6, 0x58, 0xad, 0x44, 0xd6, 0x66, 0xc8, 0xcd, 0x3f, 0x57, 0xec, 0xea, 0x29, 0x9b, 0x5c, 0xb7, 0xbf, 0x9a, 0x37, 0x3d, 0xfa, 0x66, 0x97, 0x2f, 0x13, 0xe5, 0xf3, 0xa3, 0x00, 0xe8, 0x0e, 0x6d, 0xbf, 0x74, 0x15, 0x68, 0x0d, 0x0d, 0x24, 0x90, 0x1a, 0xd6, 0xb1, 0x40, 0xb0, 0x00, 0xaa, 0xb8, 0x53, 0x51, 0xf9, 0x2f } +, + /* Seed */ + 66, + { 0xfb, 0x19, 0x20, 0x9d, 0x8a, 0x29, 0xaf, 0xaf, 0xbc, 0x05, 0x3a, 0xc1, 0xf3, 0x20, 0xba, 0x60, 0xfc, 0x1f, 0xe1, 0x04, 0xaa, 0x78, 0x39, 0xc8, 0x4c, 0x9b, 0x3e, 0xaa, 0x18, 0xa8, 0xf9, 0x43, 0xbb, 0x21, 0x9f, 0x59, 0xcc, 0x16, 0x7a, 0x38, 0x4b, 0xac, 0x7b, 0xd3, 0x65, 0x82, 0x4e, 0x10, 0x36, 0x31, 0xb9, 0x7b, 0xb9, 0xa6, 0xd1, 0x18, 0xf4, 0xf0, 0xa9, 0x51, 0xfa, 0x47, 0x8a, 0x05, 0xea, 0x09 } +, + /* Encryption */ + 129, + { 0x02, 0x1b, 0x54, 0x64, 0x65, 0x71, 0xa9, 0xa9, 0x3f, 0x0b, 0x0a, 0x03, 0x82, 0xe5, 0x40, 0xa8, 0xc3, 0x97, 0x4c, 0xb3, 0x1c, 0x87, 0xeb, 0xf1, 0x7b, 0x3b, 0xa6, 0x2a, 0x1c, 0x95, 0x21, 0xc5, 0x0d, 0x7f, 0x90, 0x70, 0x2e, 0x13, 0xae, 0x0e, 0x22, 0x26, 0x38, 0x34, 0xe7, 0x64, 0x60, 0x35, 0x15, 0x94, 0x45, 0xa0, 0x87, 0x7d, 0x9a, 0x4f, 0x5b, 0x16, 0x17, 0x7f, 0x7f, 0xe0, 0x52, 0xbb, 0xd0, 0x23, 0xd0, 0x81, 0x89, 0x4f, 0x2d, 0x97, 0xca, 0xc2, 0x45, 0x20, 0x76, 0xca, 0x11, 0x91, 0xa1, 0x71, 0xa4, 0x8f, 0xa1, 0xcb, 0xbb, 0xc3, 0xf0, 0xf6, 0xf3, 0xbc, 0x1a, 0x44, 0x78, 0x40, 0x3a, 0x5a, 0x48, 0x8f, 0xeb, 0xb3, 0xa4, 0x13, 0x80, 0x16, 0x3d, 0x94, 0x2c, 0x97, 0x7b, 0xb8, 0xec, 0xd2, 0x86, 0x6c, 0x5f, 0x5d, 0x91, 0x9e, 0xd2, 0x0c, 0x0d, 0xb3, 0xee, 0x31, 0xef, 0x2f, 0x51 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 8.3", + /* Message */ + 24, + { 0xd9, 0x9b, 0x4f, 0x10, 0xd9, 0xf3, 0x2e, 0x12, 0xec, 0xfa, 0xe2, 0x63, 0x0b, 0x22, 0xac, 0x02, 0x6a, 0xf9, 0x64, 0xb9, 0xc7, 0x15, 0xd2, 0x07 } +, + /* Seed */ + 102, + { 0xe0, 0xaf, 0x8b, 0x7e, 0xab, 0x36, 0xa6, 0xee, 0x31, 0x6d, 0x78, 0x13, 0x67, 0xf0, 0x9e, 0xa1, 0x1e, 0x31, 0xfd, 0xc1, 0xef, 0x2c, 0xf9, 0xc9, 0x7c, 0x37, 0x9e, 0xaa, 0xcf, 0x68, 0x72, 0xa8, 0x21, 0x3c, 0xbe, 0x4c, 0xe2, 0xe2, 0x9c, 0x77, 0x8b, 0x35, 0x95, 0x40, 0x10,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x2b, 0xf1, 0x28, 0x45, 0x62 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 8.4", + /* Message */ + 25, + { 0xca, 0xec, 0xa8, 0xe5, 0x9b, 0x81, 0x0c, 0xf7, 0x51, 0x12, 0xf7, 0xed, 0x04, 0x7a, 0x46, 0x69, 0x2c, 0xa0, 0xb7, 0xa8, 0x6e, 0x18, 0x41, 0xd7, 0x19 } +, + /* Seed */ + 101, + { 0x76, 0x1f, 0x68, 0x64, 0xdc, 0xeb, 0xc9, 0x5a, 0x77, 0x9b, 0xc0, 0xb1, 0x6a, 0x95, 0x86, 0x6c, 0x33, 0xdc, 0x8d, 0xca, 0xce, 0x61, 0xcd, 0x7b, 0xf9, 0x01, 0x72, 0xd9, 0x9a, 0xa4, 0x57, 0xdb, 0x6d, 0x90, 0x88, 0x7d, 0x84, 0xc4, 0x73, 0x8d, 0x25, 0xcd, 0xf0, 0xe8, 0x95, 0x69, 0xae, 0x47, 0xd3, 0x07, 0x3e, 0xc4, 0x46, 0xee, 0xed, 0xd5, 0x2d, 0x57, 0x20, 0x8b, 0xdb, 0x69, 0x45, 0x57, 0x03, 0x46, 0x57, 0xa7, 0x03, 0x78, 0x49, 0x37, 0xba, 0x69, 0x4d, 0x42, 0x51, 0x21, 0x38, 0x53, 0x2b, 0x8a, 0xd1, 0xd9, 0x86, 0xfe, 0x47, 0x31, 0x8b, 0x28, 0x23, 0xde, 0x82, 0xce, 0x27, 0x6f, 0xa6, 0xf0, 0xd3, 0xc8, 0xef } +, + /* Encryption */ + 129, + { 0x01, 0x1c, 0x0c, 0x03, 0xf7, 0xb6, 0xe1, 0xc1, 0xa8, 0x41, 0x17, 0x40, 0xa6, 0xe5, 0xb4, 0x73, 0xc2, 0x8d, 0x62, 0x21, 0x17, 0x6c, 0x9d, 0x4f, 0x68, 0x02, 0x4c, 0xa5, 0x7c, 0xda, 0x27, 0x3a, 0xf5, 0x54, 0x74, 0x03, 0x60, 0x99, 0x0a, 0x1b, 0x74, 0xde, 0x34, 0xbc, 0xea, 0x10, 0x3c, 0x2d, 0x0c, 0x36, 0x57, 0x60, 0x02, 0x08, 0x0b, 0x30, 0xbd, 0x28, 0xf0, 0x76, 0xfb, 0x75, 0xfc, 0x9b, 0xeb, 0x9e, 0x05, 0xd1, 0x98, 0x9a, 0x31, 0x1d, 0x12, 0xc1, 0xf2, 0x8f, 0xd6, 0x93, 0x92, 0xad, 0x4b, 0xe5, 0x2c, 0xe3, 0x89, 0xde, 0xc1, 0x1e, 0xba, 0x94, 0x6b, 0xe0, 0x59, 0x91, 0xda, 0x7f, 0xd8, 0x87, 0xa8, 0xd8, 0x76, 0x8d, 0xe7, 0x36, 0xb9, 0x05, 0xbf, 0x4b, 0xdb, 0xe8, 0x8b, 0x85, 0xdf, 0xc3, 0xb2, 0x5a, 0xea, 0x30, 0xfe, 0x90, 0xdf, 0x1d, 0x22, 0xd8, 0xa8, 0xd6, 0x15, 0x65, 0x1c } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 8.5", + /* Message */ + 39, + { 0x10, 0x12, 0x12, 0x85, 0x6e, 0x60, 0xcd, 0x27, 0x2f, 0xb1, 0x69, 0xcf, 0x62, 0xcf, 0x47, 0xf1, 0xbc, 0x50, 0xef, 0x9f, 0x1f, 0xcf, 0xd2, 0x14, 0x81, 0x6c, 0x80, 0x7f, 0x18, 0x4a, 0x90, 0x3f, 0x16, 0xf0, 0xe8, 0x09, 0xac, 0xf5, 0xe0 } +, + /* Seed */ + 87, + { 0x60, 0x43, 0xc8, 0xdf, 0x6a, 0x7f, 0x4a, 0xb8, 0x3e, 0x31, 0x97, 0xe8, 0xcd, 0x02, 0x25, 0xdc, 0x38, 0x66, 0xb5, 0xd8, 0xe6, 0x99, 0x3c, 0x2c, 0xc5, 0xb8, 0x76, 0x35, 0x1e, 0xe3, 0x3c, 0x71, 0xc1, 0xa4, 0xcc, 0xdc, 0xe4, 0x5f, 0x3e, 0x9d, 0xc7, 0xb7, 0xe5, 0x1b, 0x52, 0xee, 0xbe, 0x0e, 0x27, 0x0e, 0x71, 0x62, 0x07, 0xca, 0x14, 0x03, 0xe1, 0x3e, 0x72, 0x3c, 0xe7, 0x3f, 0x10, 0x45, 0x5e, 0xdb, 0xde, 0x85, 0xb0, 0x82, 0x90, 0x52, 0xed, 0xaf, 0xe5, 0x6e, 0x9a, 0x22, 0x02, 0x4d, 0x40, 0x68, 0x37, 0x1d, 0x36, 0xc9, 0x1f } +, + /* Encryption */ + 129, + { 0x00, 0x05, 0xc5, 0xcf, 0xf8, 0x9b, 0x93, 0x3d, 0x8b, 0x65, 0x23, 0xb3, 0x59, 0x06, 0xbb, 0x3a, 0x71, 0x1a, 0x0f, 0x7f, 0x50, 0x3f, 0x92, 0x14, 0x74, 0x66, 0x59, 0x85, 0x03, 0x91, 0x27, 0x30, 0x3b, 0x00, 0x11, 0xe7, 0xa4, 0x2b, 0x41, 0xc3, 0x3b, 0xd2, 0x0d, 0xb3, 0x1b, 0x15, 0x60, 0xc9, 0xb5, 0x22, 0x20, 0x89, 0xcd, 0xcf, 0x53, 0xb8, 0x2c, 0x95, 0xf8, 0xc1, 0xad, 0xcd, 0x8b, 0x78, 0x3f, 0xd4, 0xb4, 0x8a, 0x45, 0x40, 0x20, 0x66, 0x8e, 0x0b, 0x62, 0x52, 0x0e, 0x52, 0x58, 0x52, 0x09, 0xdb, 0x52, 0x9f, 0x38, 0x70, 0x86, 0x49, 0xd8, 0xe0, 0x64, 0x89, 0x0b, 0x22, 0x8f, 0xb3, 0xc1, 0x98, 0x1b, 0x2a, 0xef, 0x3a, 0x54, 0x65, 0xce, 0xb1, 0x30, 0x21, 0xeb, 0xe0, 0x8d, 0x02, 0xe3, 0x3a, 0xa2, 0xdc, 0x3c, 0x39, 0x28, 0x4e, 0xf7, 0xa8, 0x58, 0xdc, 0xce, 0xb2, 0x8f, 0xfa, 0x28 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 8.6", + /* Message */ + 17, + { 0x6f, 0x03, 0xb5, 0x72, 0x52, 0x30, 0xde, 0x7f, 0x99, 0x63, 0x69, 0x8e, 0xdb, 0x79, 0x75, 0xec, 0xe8 } +, + /* Seed */ + 109, + { 0xa3, 0x0e, 0xe5, 0xae, 0xab, 0x59, 0x31, 0x03, 0x3e, 0xfb, 0x70, 0xaf, 0xbc, 0x2d, 0x3d, 0x11, 0xa6, 0x33, 0x84, 0xcb, 0x8c, 0xb3, 0x3a, 0x8f, 0xca, 0xe6, 0x14, 0x66, 0x84, 0xe6, 0x3f, 0x0c, 0xc3, 0x2e, 0x89, 0xa7, 0xe4, 0xea, 0x43, 0x32, 0x7b, 0xf0, 0x35, 0x66, 0x95, 0x43, 0x19, 0x28, 0x86, 0xde, 0xc3, 0xfb, 0x4e, 0x2d, 0x08, 0x11, 0xef, 0xa9, 0xae, 0xc5, 0x10, 0x9e, 0x31, 0xb6, 0xa0, 0x56, 0xe5, 0x3e, 0x31, 0x7f, 0x6a, 0x90, 0x4b, 0x13, 0xa7, 0x35, 0x6f, 0x5e, 0x7a, 0xe6, 0x0b, 0x97, 0x21, 0x5e, 0xd1, 0x48, 0x17, 0xd2, 0x8f, 0x74, 0xb1, 0x64, 0x0b, 0x1f, 0x2e, 0x42, 0xef, 0x0d, 0x38, 0xca, 0x35, 0xa3, 0x54, 0xa0, 0xaf, 0xef, 0xa8, 0x03, 0xa4 } +, + /* Encryption */ + 129, + { 0x00, 0x10, 0xbd, 0x2b, 0x35, 0x6f, 0x9e, 0xab, 0xc2, 0x2f, 0x7e, 0x68, 0xf7, 0x2f, 0x61, 0x75, 0xf9, 0xab, 0x9d, 0xed, 0xa9, 0x64, 0x23, 0xb7, 0x4b, 0x11, 0xde, 0x82, 0xc6, 0x07, 0xa1, 0x38, 0x86, 0x3e, 0x17, 0x96, 0x6c, 0x07, 0xf5, 0x6c, 0xde, 0x9e, 0xd6, 0xbc, 0x42, 0x2e, 0xd9, 0xfe, 0xaa, 0x1f, 0x65, 0x36, 0x7c, 0xcf, 0x91, 0xcd, 0x4c, 0x91, 0x58, 0xa7, 0x49, 0x57, 0x1a, 0x0e, 0x9f, 0x96, 0x07, 0xcb, 0x48, 0xcd, 0x00, 0xa4, 0x48, 0xde, 0x03, 0x64, 0x91, 0x06, 0xce, 0x0c, 0x24, 0x06, 0xaa, 0x50, 0xaa, 0x12, 0x17, 0x17, 0x8c, 0xdb, 0x06, 0x80, 0x1c, 0x70, 0xa8, 0x9a, 0x7a, 0x1a, 0x83, 0x06, 0x8e, 0x68, 0xdb, 0x95, 0xd2, 0x4c, 0xa3, 0xdb, 0x33, 0xa7, 0xe5, 0xe4, 0x3a, 0x68, 0x15, 0x22, 0x74, 0xbb, 0xbf, 0x40, 0x06, 0xd9, 0xfb, 0x69, 0xf0, 0x51, 0x4c, 0xc9, 0xe2 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 8.7", + /* Message */ + 9, + { 0x87, 0x99, 0x13, 0x04, 0x54, 0x61, 0xbc, 0x0e, 0xac } +, + /* Seed */ + 117, + { 0xc3, 0xc6, 0xa2, 0x4a, 0xc3, 0x40, 0xa4, 0xa3, 0xff, 0x3b, 0x2c, 0x30, 0x2b, 0x56, 0xeb, 0x83, 0x91, 0xbb, 0xd9, 0x5f, 0xaf, 0xb6, 0x64, 0x78, 0x38, 0x44, 0x38, 0xab, 0xd8, 0xb4, 0x5d, 0x13, 0x2b, 0x26, 0x99, 0x09, 0xb1, 0x87, 0x84, 0x0a, 0x68, 0x44, 0xad, 0x39, 0x9f, 0xa8, 0x13, 0x72, 0x05, 0xe0, 0x2c, 0xca, 0xe7, 0x77, 0x5c, 0xe6, 0x66, 0x21, 0x20, 0xe1, 0x54, 0xb7, 0xbf, 0xd3, 0x0e, 0x8e, 0xa4, 0xd3, 0x4a, 0x7d, 0xb6, 0xa2, 0x34, 0x88, 0xa5, 0xda, 0xea, 0x38, 0x08, 0x5b, 0xed, 0x56, 0x78, 0x0c, 0xff, 0x87, 0x27, 0x12, 0x5f, 0x1a, 0xd5, 0xf9, 0xd5, 0xa0, 0xbc, 0x3b, 0xe5, 0x80, 0xbc, 0x4f, 0xa0, 0x68, 0x26, 0x7b, 0x27, 0xde, 0x38, 0x3c, 0x55, 0xc7, 0xfc, 0x17, 0x64, 0xc8, 0x6a, 0xc2, 0x1a } +, + /* Encryption */ + 129, + { 0x01, 0xd2, 0x1e, 0xce, 0x33, 0xf4, 0x40, 0xc7, 0x2a, 0x11, 0x1d, 0x62, 0xef, 0x48, 0x6c, 0x77, 0xc6, 0xc8, 0x90, 0xcd, 0x81, 0xa4, 0xeb, 0x05, 0x32, 0xad, 0x2c, 0x0e, 0xc7, 0x68, 0xdd, 0x1d, 0xe5, 0xb2, 0x11, 0x2f, 0xdf, 0x04, 0xe2, 0x87, 0xa9, 0x5b, 0x95, 0x0b, 0x1f, 0xca, 0x5a, 0xe6, 0x93, 0xcf, 0x0e, 0x8a, 0xcc, 0x93, 0x6f, 0x37, 0x47, 0x14, 0xde, 0x74, 0x95, 0x90, 0x8c, 0x29, 0x15, 0xa7, 0x07, 0x21, 0x3a, 0xc3, 0xdb, 0xda, 0xba, 0xd8, 0x1b, 0x4b, 0xa1, 0xcb, 0x50, 0xb9, 0x5f, 0x93, 0x14, 0x53, 0x1f, 0xec, 0x83, 0x3f, 0x08, 0x21, 0xc0, 0x4b, 0x57, 0x40, 0xd7, 0x3b, 0x8c, 0xf1, 0xf9, 0xe3, 0xd7, 0xab, 0xc9, 0x74, 0x49, 0x26, 0x13, 0x8f, 0xb0, 0x15, 0xc0, 0xf0, 0x56, 0xcc, 0x4b, 0xa2, 0xf3, 0x16, 0x37, 0x34, 0xdb, 0x44, 0x3e, 0xbd, 0x68, 0x85, 0x8c, 0x4f, 0xa6 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 8.8", + /* Message */ + 1, + { 0x5b } +, + /* Seed */ + 125, + { 0x42, 0xb9, 0x99, 0xfb, 0x16, 0x3a, 0x6f, 0xfa, 0x67, 0xa9, 0xbc, 0x4e, 0x6b, 0xa1, 0x2f, 0x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x4b, 0xa1, 0x15, 0x62, 0xe8, 0x3e, 0x9f, 0x28, 0x59, 0x2e, 0x0a, 0x79, 0x14, 0xfe, 0x88, 0xb2, 0xc0, 0xfe, 0x7a, 0x5e, 0xea, 0xf5, 0x00, 0xf7, 0xe9, 0x8a, 0x5b, 0xa9, 0x54, 0xf7, 0x50, 0x77, 0xbc, 0x8f, 0x65, 0x9f, 0x21, 0xbb, 0x22, 0x03, 0x31, 0x4b, 0xe0, 0xd6, 0xd2, 0x1e, 0x63, 0x20, 0xc0, 0x5e, 0x6e, 0x2d, 0x55, 0x79, 0x79, 0x22, 0x6b, 0x80 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 8.9", + /* Message */ + 50, + { 0xf6, 0x35, 0x29, 0x90, 0x13, 0x24, 0xa2, 0x0f, 0xe5, 0xe9, 0x25, 0x8a, 0xda, 0x2f, 0x95, 0x37, 0xb0, 0x1f, 0x58, 0x39, 0xb4, 0x45, 0x97, 0xe3, 0x29, 0x3a, 0x12, 0x25, 0xca, 0x3a, 0x2a, 0xdf, 0x68, 0x4a, 0x72, 0xa7, 0x93, 0xc6, 0x9c, 0x56, 0xaf, 0x2d, 0x34, 0x98, 0xd3, 0x2a, 0x09, 0x2e, 0x91, 0x4b } +, + /* Seed */ + 76, + { 0x7b, 0xfa, 0x85, 0x97, 0xa4, 0x34, 0xcd, 0xad, 0xfe, 0x15, 0x63, 0x14, 0x44, 0x95, 0x13, 0xd7, 0x6c, 0x10, 0x5d, 0xf1, 0xbf, 0xc4, 0x8c, 0x4d, 0x07, 0x6a, 0xbf, 0xc0, 0x5b, 0x5d, 0xda, 0x72, 0xe0, 0xdd, 0x15, 0xf9, 0xfe, 0x82, 0xa9, 0x95, 0x5b, 0xd5, 0x6d, 0x33, 0x43, 0xe7, 0xc6, 0xf2, 0x5a, 0x60, 0x74, 0x12, 0x07, 0xe7, 0x3a, 0x2d, 0x10, 0xbb, 0x95, 0xd1, 0xd7, 0x29, 0xa2, 0x27, 0x93, 0xe6, 0xc4, 0x55, 0xe9, 0x16, 0x23, 0x5a, 0x81, 0x16, 0x94, 0xdb } +, + /* Encryption */ + 129, + { 0x00, 0xad, 0xf4, 0x78, 0x74, 0x67, 0xea, 0xc2, 0xea, 0x61, 0xfe, 0x7e, 0xf8, 0x2f, 0xd8, 0x7c, 0x2d, 0xa5, 0x89, 0x9f, 0x30, 0x30, 0x2b, 0xbc, 0x11, 0x27, 0x86, 0xd2, 0xfb, 0x11, 0xc1, 0x42, 0xf3, 0xf1, 0xd8, 0xcf, 0x37, 0x16, 0x0d, 0x2e, 0x4a, 0x43, 0x98, 0x3f, 0xfb, 0xd3, 0x93, 0xa4, 0x1b, 0x59, 0x9e, 0xe6, 0xa2, 0x7e, 0x24, 0x64, 0x25, 0x50, 0x2d, 0x46, 0x90, 0x20, 0x2f, 0xe5, 0xf8, 0xee, 0x1b, 0xc6, 0xc1, 0xd5, 0xd1, 0x6b, 0xe2, 0x3b, 0x97, 0x3a, 0xed, 0xf7, 0xf9, 0x11, 0x1b, 0xd8, 0xb1, 0x42, 0x84, 0x42, 0x65, 0xfd, 0x93, 0x57, 0x7a, 0x43, 0xc3, 0xac, 0xc6, 0xe2, 0xaf, 0x20, 0x89, 0xd9, 0xd2, 0xf3, 0xf3, 0x1a, 0x5c, 0x24, 0x7a, 0x7b, 0x68, 0x31, 0x5b, 0xae, 0x25, 0xd5, 0xae, 0x81, 0x40, 0xa5, 0x1f, 0xfc, 0x00, 0x97, 0x10, 0x7e, 0xc1, 0x62, 0x0a, 0xb3, 0xb5 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 8.10", + /* Message */ + 32, + { 0xc6, 0xd1, 0x4b, 0x04, 0x71, 0x45, 0xf3, 0x17, 0x78, 0x1d, 0xd7, 0x38, 0x2d, 0xc0, 0xa9, 0x72, 0x57, 0xd5, 0x54, 0xbb, 0x53, 0x53, 0x9e, 0xe9, 0xa2, 0x92, 0xe7, 0xda, 0x5c, 0xb6, 0x42, 0x6f } +, + /* Seed */ + 94, + { 0x01, 0xff, 0x38, 0xd5, 0xde, 0xd6, 0xc4, 0x3d, 0xc1, 0xdc, 0x5c, 0x27, 0xa7, 0xe4, 0x81, 0x3f, 0x44, 0x8f, 0x45, 0xc9, 0x6e, 0xdf, 0x4b, 0xd9, 0x3e, 0x96, 0xfa, 0xda, 0x9b, 0xc8, 0xec, 0x5b, 0x43, 0x4f, 0x06, 0x19, 0xa3, 0x8e, 0x04, 0x35, 0x6e, 0x06, 0x27, 0x85, 0x51, 0x40, 0x7b, 0x7f, 0x37, 0xe4, 0x2d, 0x91, 0x45, 0x62, 0x0a, 0x81, 0x98, 0x18, 0x50, 0xa4, 0x9e, 0x28, 0x51, 0x17, 0x2d, 0x23, 0x0b, 0x37, 0x82, 0x41, 0x10, 0xf8, 0xff, 0xdb, 0x84, 0x77, 0x94, 0x63, 0x9d, 0x26, 0x50, 0xcb, 0xed, 0x36, 0x26, 0x01, 0x05, 0xf1, 0xf1, 0x29, 0x6e, 0x52, 0xa7, 0xd4 } +, + /* Encryption */ + 129, + { 0x00, 0x5e, 0xdc, 0x93, 0x97, 0x89, 0xcf, 0xbf, 0xaa, 0xff, 0x28, 0x2b, 0xaf, 0x97, 0x01, 0xd6, 0x1f, 0x9d, 0xbe, 0xe6, 0xf2, 0xd2, 0x06, 0xcf, 0xab, 0x77, 0x57, 0x61, 0xf4, 0x2c, 0xb2, 0x74, 0xec, 0xba, 0x31, 0xc7, 0xcd, 0x2f, 0xe6, 0x03, 0x1a, 0xba, 0x0b, 0x84, 0xd4, 0x62, 0x7d, 0x30, 0x37, 0xe3, 0x1c, 0xe7, 0xe1, 0x56, 0x23, 0xba, 0x7c, 0xb7, 0x69, 0x02, 0x51, 0xc0, 0x63, 0x27, 0xa4, 0x31, 0x37, 0x12, 0x98, 0xdf, 0x29, 0x21, 0x95, 0xb6, 0x45, 0x11, 0x62, 0xd2, 0xda, 0x92, 0xa7, 0x07, 0x8e, 0x2d, 0x07, 0xc9, 0xf5, 0x6a, 0x07, 0x06, 0x8a, 0x9a, 0x3e, 0x17, 0x3e, 0x4a, 0xae, 0x25, 0xa5, 0xd1, 0xc6, 0x8e, 0x68, 0x20, 0x8c, 0xb5, 0x25, 0x3a, 0x0a, 0x53, 0xaa, 0x6e, 0x2e, 0xf6, 0xc2, 0x95, 0xd1, 0x51, 0x65, 0x69, 0xb8, 0x62, 0xcb, 0x92, 0xca, 0x82, 0x3c, 0xcb, 0xab } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 8.11", + /* Message */ + 63, + { 0xc1, 0x16, 0x53, 0xe8, 0x10, 0xb5, 0x3e, 0x65, 0x11, 0xf1, 0x33, 0x23, 0xfe, 0x52, 0x26, 0xa1, 0x70, 0xc2, 0x1f, 0x6d, 0xaa, 0x44, 0x29, 0xd9, 0x68, 0xef, 0xda, 0x05, 0x29, 0xd7, 0xb6, 0xe1, 0x0d, 0xce, 0xd8, 0x0c, 0x6b, 0x63, 0x01, 0xde, 0xd2, 0x2f, 0x52, 0x91, 0x1c, 0x0f, 0x7f, 0xf4, 0x53, 0x5b, 0xd5, 0xe2, 0x0f, 0xf5, 0x35, 0x88, 0xcd, 0x3d, 0xe6, 0x64, 0x8a, 0xc0, 0x2d } +, + /* Seed */ + 63, + { 0x85, 0xfa, 0x7c, 0x6c, 0xe9, 0x6d, 0x0a, 0x8a, 0x1f, 0xba, 0x75, 0x04, 0x71, 0x7c, 0xcb, 0xe1, 0x37, 0x13, 0x80, 0x93, 0x95, 0x6e, 0xff, 0x06, 0x3f, 0xc2, 0xef, 0xd4, 0xa4, 0x6d, 0x7d, 0xc7, 0x4e, 0x90, 0xf1, 0xda, 0x9e, 0x43, 0xdb, 0xa9, 0x12, 0x9f, 0x14, 0xec, 0x55, 0x9a, 0x4d, 0x2d, 0x6c, 0x5a, 0x19, 0xcb, 0xf3, 0xa6, 0x8c, 0x62, 0xd0, 0x98, 0x34, 0x52, 0xa9, 0xee, 0x0c } +, + /* Encryption */ + 129, + { 0x01, 0xb0, 0x8d, 0x49, 0x83, 0x13, 0xa7, 0xd7, 0x4a, 0x05, 0x53, 0x14, 0xeb, 0x43, 0x15, 0xba, 0x02, 0x87, 0x60, 0xda, 0xd4, 0x11, 0x14, 0xd5, 0x94, 0x2d, 0x63, 0xbf, 0x8d, 0x27, 0xbe, 0x3f, 0x49, 0xcc, 0xd9, 0x4a, 0xcf, 0x9d, 0x3a, 0xa2, 0x2d, 0x09, 0xb9, 0x9b, 0xf9, 0x74, 0x09, 0xbc, 0xf3, 0x32, 0x13, 0xc0, 0x99, 0x67, 0x07, 0x86, 0x82, 0x03, 0xa9, 0xab, 0x27, 0x70, 0x8d, 0x3f, 0xff, 0x69, 0xb8, 0x9d, 0x02, 0xe3, 0x6e, 0x01, 0x21, 0xa1, 0x19, 0xb8, 0xd4, 0xd9, 0xbf, 0xd4, 0xfe, 0x8b, 0x16, 0x8f, 0xd7, 0xc1, 0x2a, 0x24, 0x3f, 0x7a, 0x00, 0x0b, 0x39, 0xbf, 0x8d, 0x56, 0x48, 0x17, 0x24, 0x20, 0x80, 0x23, 0xbb, 0x60, 0x7b, 0x30, 0x50, 0x5d, 0xd1, 0x74, 0x2f, 0x87, 0x9f, 0x16, 0xc1, 0x0c, 0xe4, 0x90, 0xd3, 0x4a, 0x68, 0x0d, 0x27, 0xac, 0x39, 0x60, 0x7d, 0xa2, 0x4e } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 8.12", + /* Message */ + 50, + { 0x09, 0x5b, 0x77, 0xc9, 0x4d, 0xc1, 0xb1, 0x87, 0x88, 0xe4, 0x00, 0xe6, 0x91, 0x6a, 0x4b, 0x4c, 0xfd, 0x73, 0xac, 0xe0, 0xdf, 0x9a, 0x3a, 0xc1, 0x31, 0xbd, 0xf9, 0xad, 0x0a, 0x12, 0xdb, 0x76, 0x6d, 0xeb, 0x22, 0x53, 0x59, 0xd9, 0x01, 0xcd, 0x56, 0xed, 0x88, 0xcd, 0xa3, 0xd3, 0x28, 0x56, 0x54, 0x02 } +, + /* Seed */ + 76, + { 0xa3, 0x4a, 0x68, 0x05, 0x55, 0x71, 0x09, 0xc2, 0x61, 0xdd, 0xdf, 0x5f, 0x85, 0xd3, 0x71, 0xae, 0x65, 0x20, 0xf4, 0x5a, 0xdf, 0x46, 0x96, 0x01, 0xb5, 0xc3, 0x59, 0xfe, 0xc7, 0x44, 0xcb, 0x2a, 0xae, 0x80, 0x98, 0x3c, 0x73, 0x2d, 0xb6, 0xc5, 0x45, 0xdf, 0x55, 0xe0, 0x20, 0x8a, 0xcf, 0xbb, 0xf1, 0xc2, 0xc5, 0xe7, 0x99, 0x88, 0xf3, 0x4e, 0xcd, 0x6e, 0x5b, 0xb4, 0xb5, 0x25, 0xc1, 0xb8, 0xbc, 0xb0, 0x70, 0xd0, 0xd8, 0x42, 0x48, 0xb1, 0xf8, 0xe7, 0x48, 0x0e } +, + /* Encryption */ + 129, + { 0x00, 0x39, 0x56, 0x36, 0xa8, 0x26, 0x67, 0xdc, 0xf0, 0x0d, 0x5d, 0xbd, 0xd8, 0x54, 0x12, 0x06, 0x94, 0x8d, 0x49, 0x36, 0x89, 0x17, 0xec, 0x0e, 0x00, 0xfd, 0x7a, 0xc5, 0xca, 0x8b, 0xf4, 0x4e, 0xc5, 0x83, 0x78, 0x38, 0x6e, 0x59, 0x4b, 0xc0, 0x65, 0xa9, 0xa6, 0x3c, 0xf2, 0xa3, 0x55, 0xa6, 0x08, 0xb6, 0xf0, 0xba, 0xcb, 0xa5, 0x60, 0x08, 0xbb, 0xa4, 0x72, 0x2a, 0x7c, 0x47, 0x05, 0x45, 0xa2, 0x0f, 0x38, 0x78, 0x53, 0xd4, 0x60, 0x31, 0x3b, 0x2e, 0x86, 0x4e, 0x17, 0xb2, 0x33, 0xe5, 0x96, 0x35, 0x41, 0x32, 0xaf, 0x17, 0x3b, 0x4d, 0x04, 0x49, 0x26, 0x47, 0x79, 0x02, 0x62, 0xd3, 0xa4, 0x3f, 0x84, 0x27, 0x37, 0x88, 0x37, 0x46, 0x6b, 0x06, 0x73, 0xa8, 0x15, 0x27, 0xe6, 0xbe, 0x10, 0x45, 0x80, 0x32, 0x6f, 0xec, 0x84, 0xba, 0x37, 0x1e, 0xa6, 0x10, 0x91, 0xfa, 0x40, 0x33, 0xa4 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 8.13", + /* Message */ + 1, + { 0x38 } +, + /* Seed */ + 125, + { 0x54, 0x7c, 0x91, 0x75, 0x19, 0x05, 0xd5, 0xa2, 0x84, 0xac, 0x3f, 0xe4, 0x32, 0xcb, 0xe0, 0x30, 0x55, 0xb2, 0x85, 0x06, 0x58, 0x96, 0x11, 0x0e, 0xa3, 0x6d, 0x05, 0xa1, 0x40, 0x08, 0x3c, 0xe3, 0x95, 0x5f, 0xa8, 0x28, 0x41, 0xea, 0xf6, 0xdb, 0x4a, 0x50, 0xd1, 0x2c, 0x07, 0x4f, 0x45, 0xa6, 0x88, 0xb5, 0x57, 0x6d, 0x6e, 0x61, 0x68, 0x07, 0x54, 0x0a, 0xc1, 0x17, 0x58, 0x5c, 0x5b, 0xc3, 0xbe, 0x52, 0x60, 0x72, 0x7c, 0xdf, 0x12, 0x3c, 0x77, 0x4d, 0xb4, 0x0c, 0xff, 0x29, 0x70, 0x88, 0x62, 0x48, 0x53, 0xe4, 0x69, 0x51, 0x36, 0xb9, 0x31, 0x16, 0x15, 0x17, 0xa7, 0xb9, 0xb5, 0xdd, 0xcd, 0x9d, 0x32, 0xde, 0x3d, 0xfe, 0x3e, 0xe2, 0xea, 0x68, 0x8c, 0xf7, 0xbf, 0x88, 0x2c, 0xcf, 0x7b, 0x9c, 0x48, 0xd5, 0xe1, 0x9e, 0xff, 0xa6, 0x50, 0x4a, 0x42, 0x62, 0x0b } +, + /* Encryption */ + 129, + { 0x00, 0x89, 0xe3, 0x9d, 0xcf, 0xdf, 0x91, 0x69, 0x3d, 0xef, 0xe3, 0x9d, 0x12, 0xbb, 0x25, 0xf8, 0x0a, 0x76, 0x8d, 0x44, 0x1b, 0x48, 0x1d, 0x6a, 0x75, 0x48, 0x69, 0x50, 0x42, 0x48, 0x0c, 0xd4, 0xa0, 0xba, 0x97, 0x83, 0xd5, 0xc5, 0xbd, 0x38, 0x89, 0x6d, 0xce, 0x06, 0xac, 0xb1, 0x77, 0xa4, 0xac, 0x59, 0x68, 0xe6, 0x55, 0xa7, 0xaa, 0xf5, 0x0d, 0x69, 0x4a, 0x64, 0x97, 0x13, 0xb7, 0xa4, 0xbd, 0xd1, 0x4c, 0x81, 0x9f, 0x83, 0xb2, 0x04, 0x7d, 0xe2, 0x19, 0x5f, 0x73, 0x03, 0x66, 0x54, 0x53, 0xa8, 0xa1, 0x11, 0x5e, 0x5b, 0x48, 0xac, 0x0e, 0x9a, 0x65, 0xed, 0xdb, 0x31, 0x89, 0x51, 0x7b, 0x04, 0x6f, 0xcb, 0xc2, 0xd1, 0x43, 0x81, 0x77, 0x6a, 0x77, 0xfb, 0x46, 0x8e, 0x11, 0x29, 0x3c, 0x78, 0xc8, 0x37, 0x4c, 0x8f, 0x46, 0x60, 0x35, 0x1a, 0xc2, 0xb2, 0xc7, 0x84, 0x5a, 0x25, 0xfe } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 8.14", + /* Message */ + 42, + { 0x80, 0x64, 0x6b, 0x3c, 0x4d, 0xf0, 0xeb, 0x79, 0x1b, 0xda, 0x0c, 0xcc, 0x4d, 0x97, 0xd8, 0x1e, 0xa8, 0xf6, 0xf7, 0x4e, 0xb2, 0x45, 0xe2, 0xc7, 0xc3, 0x48, 0xfd, 0x7f, 0xb9, 0x90, 0x16, 0xa9, 0xd4, 0x0a, 0x60, 0x5a, 0xc7, 0x42, 0xb2, 0x7a, 0xd2, 0x48 } +, + /* Seed */ + 84, + { 0x11, 0xb8, 0xe7, 0x98, 0xd7, 0xa1, 0x42, 0xd0, 0x82, 0xe0, 0x59, 0x8a, 0x8c, 0xb4, 0xf8, 0xc2, 0xaa, 0x87, 0x5d, 0x5b, 0x65, 0x17, 0x8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0x8f, 0xb7, 0xa3, 0xc5, 0xb5, 0x0b, 0x29, 0x18, 0x66, 0xb9 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 8.15", + /* Message */ + 9, + { 0x6b, 0x63, 0x1c, 0x7c, 0x35, 0xea, 0x75, 0xa1, 0xb0 } +, + /* Seed */ + 117, + { 0x3e, 0x42, 0x40, 0xc3, 0xe0, 0x9e, 0xa7, 0x83, 0x55, 0x35, 0x8c, 0xda, 0x61, 0x29, 0x53, 0x47, 0x30, 0xf4, 0x8a, 0x9c, 0x9a, 0x1a, 0x52, 0x13, 0x28, 0x4b, 0xfd, 0x07, 0x71, 0x21, 0x6a, 0xd4, 0xca, 0x23, 0x3d, 0x99, 0x3e, 0xe6, 0x35, 0x7f, 0x4b, 0x1b, 0x12, 0xa6, 0xba, 0xa1, 0x77, 0x43, 0x13, 0x4a, 0x85, 0x7f, 0xd7, 0x69, 0xa8, 0xbc, 0x78, 0xd6, 0x1f, 0xb1, 0x4f, 0xea, 0x05, 0x22, 0x1d, 0xcf, 0x5a, 0xeb, 0x1a, 0xff, 0xd4, 0x0d, 0x8b, 0xc6, 0x94, 0x5c, 0x30, 0x10, 0x45, 0xb6, 0x86, 0xc6, 0x11, 0xfa, 0x43, 0x7e, 0x30, 0xca, 0x0f, 0xab, 0x5a, 0x4c, 0xde, 0xf5, 0x20, 0x5b, 0xaf, 0x99, 0x26, 0xc6, 0x07, 0xbe, 0x96, 0x37, 0xb1, 0x50, 0x7f, 0x50, 0x83, 0xe9, 0x40, 0xcc, 0xfa, 0x2f, 0xb3, 0x86, 0x19 } +, + /* Encryption */ + 129, + { 0x00, 0x47, 0xcb, 0x9a, 0x91, 0x98, 0xd9, 0x83, 0xb3, 0x22, 0x24, 0xcf, 0x27, 0xfc, 0x72, 0x99, 0xbb, 0xd4, 0xae, 0x07, 0x78, 0xa8, 0x3f, 0xc5, 0x9c, 0x47, 0x45, 0xfa, 0x99, 0xe9, 0x17, 0xbb, 0x74, 0xf8, 0xbd, 0x4e, 0xf1, 0x3f, 0x14, 0x0c, 0xa9, 0xb7, 0x2e, 0x2a, 0xa1, 0x74, 0xce, 0xea, 0x26, 0x48, 0x94, 0xe2, 0x15, 0xf4, 0x1c, 0x36, 0xd4, 0xe6, 0xf3, 0x46, 0xf6, 0x9b, 0x4f, 0x85, 0x50, 0x5c, 0x54, 0xcd, 0x46, 0x25, 0x9c, 0x71, 0x2e, 0x30, 0xc4, 0x92, 0x94, 0xba, 0xdb, 0x1c, 0x47, 0x16, 0x85, 0x1f, 0x2b, 0x75, 0xe3, 0x96, 0x12, 0xcd, 0x54, 0x66, 0xba, 0x56, 0xe3, 0xf3, 0x15, 0x99, 0xc2, 0xdc, 0xe2, 0x3d, 0x04, 0xc9, 0x3a, 0x64, 0x40, 0x22, 0x27, 0xdf, 0x40, 0xb5, 0x14, 0xc7, 0x4d, 0x0a, 0xa3, 0x6e, 0x1e, 0x86, 0x58, 0xe2, 0x92, 0x77, 0xb3, 0x05, 0xaf, 0x35, 0x15 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 8.16", + /* Message */ + 53, + { 0x40, 0x08, 0x55, 0xda, 0x54, 0xa6, 0xd1, 0xfe, 0x5f, 0xb5, 0x8a, 0x73, 0xd2, 0xa5, 0xe5, 0x58, 0x38, 0x70, 0xfb, 0xd5, 0x25, 0xd2, 0xf5, 0x72, 0xad, 0xb5, 0x96, 0x30, 0x06, 0xd0, 0xa1, 0x33, 0x9b, 0xea, 0x88, 0x9d, 0x6d, 0x46, 0xa4, 0x37, 0x62, 0xf5, 0x13, 0xbb, 0x7c, 0xc0, 0x36, 0x22, 0xbf, 0x85, 0x92, 0x44, 0xd6 } +, + /* Seed */ + 73, + { 0x49, 0x6e, 0x50, 0xba, 0xb5, 0xef, 0x18, 0xf2, 0x2c, 0x3f, 0x62, 0xb9, 0x21, 0x14, 0x8d, 0x36, 0xc1, 0x01, 0xad, 0x0a, 0x9a, 0x20, 0x38, 0x67, 0x58, 0x08, 0xce, 0x8b, 0x62, 0xf8, 0xa6, 0xa0, 0xba, 0x8d, 0x91, 0x05, 0xf9, 0x2e, 0xd8, 0xa0, 0x2b, 0x31, 0x2f, 0x32, 0x4f, 0x3f, 0xd3, 0x91, 0x92, 0xbd, 0x41, 0x53, 0x78, 0x4f, 0xb5, 0x59, 0x05, 0xc3, 0xb6, 0x69, 0x30, 0x7b, 0xad, 0xa8, 0x27, 0xaf, 0xa1, 0xb5, 0xcb, 0x3d, 0xc1, 0x1d, 0xc4 } +, + /* Encryption */ + 129, + { 0x00, 0xd3, 0xa8, 0x5d, 0xec, 0x97, 0xd3, 0x44, 0x88, 0xee, 0x33, 0xc6, 0x58, 0xba, 0x18, 0x8e, 0x64, 0xcb, 0x57, 0x83, 0x7d, 0x2e, 0xdd, 0xbc, 0xba, 0x8e, 0xe5, 0x2f, 0x13, 0xf1, 0xe4, 0xfe, 0x9b, 0xec, 0x2f, 0x92, 0xe7, 0x21, 0x09, 0x87, 0xe1, 0xc3, 0xfe, 0x34, 0x5d, 0x40, 0x19, 0x77, 0x0b, 0x07, 0x74, 0x94, 0x51, 0xb0, 0x4d, 0x67, 0x30, 0xd5, 0x3a, 0x91, 0x01, 0x5b, 0x25, 0x7e, 0x81, 0x0d, 0xae, 0x0a, 0x0c, 0x11, 0x6a, 0x4f, 0x22, 0x45, 0x14, 0xed, 0xbd, 0x39, 0xb2, 0xc6, 0x5e, 0x15, 0x2d, 0x3b, 0x97, 0x89, 0xdd, 0xa4, 0xf0, 0xd4, 0x5b, 0xf9, 0x83, 0x2d, 0x27, 0x9d, 0x34, 0x31, 0x06, 0x2b, 0x4d, 0xe1, 0xb0, 0x67, 0x7e, 0xf5, 0x9c, 0x6c, 0x33, 0x27, 0x68, 0xec, 0xda, 0x3a, 0xa6, 0xbc, 0xd1, 0x0f, 0x70, 0xbd, 0x06, 0x03, 0x0a, 0x76, 0x65, 0xed, 0x3f, 0x20, 0x79 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 8.17", + /* Message */ + 48, + { 0xb8, 0x7e, 0xdb, 0x45, 0x5a, 0x7e, 0x85, 0x53, 0x9f, 0x92, 0x8e, 0xda, 0xe9, 0x09, 0xfb, 0xf8, 0xf7, 0xa1, 0x99, 0xc0, 0x3a, 0x94, 0xa9, 0xa4, 0x5a, 0xca, 0xb2, 0x5e, 0xfa, 0xee, 0xcc, 0x26, 0x29, 0x74, 0xca, 0xe0, 0xbb, 0x72, 0x24, 0x3a, 0x99, 0xc6, 0x47, 0x20, 0x79, 0xf1, 0x97, 0x38 } +, + /* Seed */ + 78, + { 0x03, 0x5e, 0x31, 0x59, 0x4a, 0x56, 0x65, 0x60, 0x5b, 0x84, 0xfe, 0xc9, 0x3a, 0xdf, 0x92, 0x58, 0x50, 0x85, 0x1d, 0xf7, 0xb3, 0x94, 0xe9, 0xbb, 0xec, 0xbe, 0x4d, 0x72, 0xc9, 0x2f, 0x27, 0x03, 0xb6, 0xd6, 0x08, 0x96, 0xe0, 0x05, 0x4c, 0x59, 0xca, 0xfa, 0x5e, 0x0d, 0x28, 0x6c, 0x81, 0x2b, 0x23, 0xe5, 0x37, 0x88, 0x5e, 0x4c, 0x34, 0x38, 0xa7, 0x72, 0xa1, 0x61, 0x0a, 0xe9, 0xfa, 0xe9, 0x18, 0xe3, 0x4d, 0x49, 0x92, 0xc7, 0xf2, 0x63, 0xf3, 0xe8, 0xe2, 0xf9, 0x80, 0xb8 } +, + /* Encryption */ + 129, + { 0x02, 0x1c, 0x8c, 0x95, 0x9a, 0xec, 0x47, 0x29, 0x68, 0x87, 0x68, 0x93, 0x0d, 0x67, 0xe2, 0x02, 0x99, 0xdd, 0x47, 0x90, 0x2d, 0xb0, 0x79, 0xf2, 0x39, 0xb8, 0xc2, 0x88, 0xb0, 0xa7, 0x04, 0x47, 0xc7, 0x19, 0x6b, 0x84, 0x91, 0x2e, 0xaa, 0x5b, 0xc3, 0xaf, 0xf6, 0xba, 0x63, 0x0c, 0x2e, 0xaa, 0x3f, 0xcb, 0xb2, 0x4b, 0xe4, 0x63, 0x83, 0x65, 0x31, 0x25, 0x0b, 0xd4, 0xc4, 0xf2, 0xa1, 0xda, 0x68, 0xc8, 0xbf, 0x4f, 0x40, 0xcf, 0x5c, 0x98, 0xb6, 0x85, 0xeb, 0xec, 0xa4, 0xd0, 0x3e, 0x76, 0xb3, 0x34, 0xaf, 0x0b, 0x1b, 0x34, 0x48, 0x8b, 0x58, 0x2e, 0x29, 0x35, 0x25, 0x35, 0x72, 0xf7, 0xfc, 0xfa, 0xa8, 0x35, 0x44, 0xe7, 0xfd, 0x52, 0xef, 0x45, 0x8a, 0xcc, 0xcb, 0x19, 0x30, 0x1a, 0x4d, 0xdd, 0x50, 0x51, 0x6f, 0x16, 0xa5, 0xfb, 0x78, 0xf3, 0x95, 0x99, 0x00, 0xdb, 0xcc, 0xa1, 0xf2 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 8.18", + /* Message */ + 38, + { 0x30, 0x2a, 0xc8, 0x0e, 0x30, 0xc6, 0x55, 0x3e, 0x93, 0x59, 0xdf, 0x85, 0xb1, 0xe2, 0x4a, 0x16, 0xc8, 0x62, 0xa2, 0x0f, 0xf4, 0xfd, 0x9d, 0x5f, 0x14, 0x6b, 0xe2, 0x81, 0xdc, 0x30, 0x66, 0xae, 0xb8, 0xfa, 0x00, 0xb5, 0x2a, 0x99 } +, + /* Seed */ + 88, + { 0x32, 0x6c, 0x99, 0x35, 0x8c, 0x4e, 0x5f, 0xa4, 0xd2, 0xc0, 0x43, 0xf0, 0x2f, 0x92, 0x70, 0x5f, 0x79, 0x1c, 0xf7, 0x12, 0xbc, 0x01, 0x04, 0x5b, 0x4c, 0xf3, 0x49, 0xb4, 0x2a, 0xe5, 0xac, 0xfa, 0xc3, 0x78, 0x38, 0x11, 0xbb, 0xf0, 0x7f, 0x34, 0xbd, 0x6c, 0x85, 0x19, 0x55, 0xcb, 0xa4, 0xa8, 0xb2, 0xa7, 0xd1, 0x39, 0xa7, 0x8b, 0xc4, 0xd8, 0x8e, 0x3a, 0x88, 0xe6, 0xc4, 0xcf, 0x49, 0x4e, 0x6a, 0x4a, 0x52, 0x35, 0x41, 0x45, 0xe1, 0x18, 0x83, 0xcb, 0x5c, 0x78, 0xb5, 0x72, 0xf3, 0x0a, 0x51, 0xed, 0x23, 0xf2, 0x56, 0x4b, 0x69, 0x60 } +, + /* Encryption */ + 129, + { 0x02, 0x03, 0x29, 0x87, 0xcc, 0xf7, 0x5a, 0x63, 0x86, 0x24, 0x17, 0x80, 0x64, 0xdb, 0xa4, 0xb7, 0x2b, 0xe5, 0x39, 0xe0, 0x7e, 0xcd, 0xf5, 0x30, 0x03, 0x56, 0xcc, 0x43, 0xd7, 0x29, 0xfe, 0x34, 0xfb, 0x35, 0xbb, 0xbf, 0x5a, 0x32, 0x17, 0x2c, 0xe3, 0x9e, 0xa1, 0xfb, 0x47, 0xd3, 0x8e, 0x49, 0x7a, 0x03, 0xb6, 0x01, 0xee, 0xaf, 0xda, 0xaf, 0x99, 0xa3, 0x4f, 0xd7, 0x21, 0x18, 0x4a, 0xf2, 0xe1, 0x8e, 0x83, 0xd0, 0x50, 0xa4, 0x10, 0x8b, 0x15, 0xe5, 0xe3, 0xa2, 0x7e, 0x0e, 0x63, 0x6d, 0xf8, 0xd9, 0x4f, 0x98, 0x16, 0x58, 0xeb, 0xde, 0xcd, 0xab, 0x0d, 0xef, 0xcc, 0x0d, 0xaf, 0x3a, 0xc9, 0xa2, 0x7b, 0x3f, 0x22, 0xa0, 0x54, 0x1d, 0x35, 0x00, 0x27, 0x52, 0xe9, 0xcc, 0x4f, 0xb2, 0x58, 0x2f, 0xae, 0x25, 0x11, 0xa1, 0x32, 0xec, 0x5c, 0x22, 0x8a, 0x88, 0x72, 0xbd, 0xba, 0xd6, 0x87 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 8.19", + /* Message */ + 43, + { 0x00, 0xb3, 0x82, 0x01, 0x74, 0x6d, 0xca, 0xf4, 0x03, 0x48, 0xaf, 0x57, 0xba, 0xd7, 0x25, 0x70, 0xca, 0xf5, 0xa2, 0x85, 0x5f, 0xec, 0x6c, 0x42, 0xee, 0x22, 0xdc, 0xfe, 0x64, 0xc9, 0x97, 0xec, 0x62, 0xa5, 0xc9, 0x75, 0x62, 0x4b, 0xbd, 0x1f, 0x8e, 0xc9, 0x16 } +, + /* Seed */ + 83, + { 0x93, 0x91, 0x05, 0xc0, 0x04, 0xc0, 0x1a, 0xa9, 0xf4, 0x74, 0x46, 0xd3, 0xcc, 0xf5, 0x30, 0xe9, 0xb2, 0x17, 0x4c, 0x50, 0xae, 0xbc, 0xa0, 0xa9, 0x5c, 0xb7, 0xa4, 0xd8, 0x39, 0x54, 0xef, 0xb8, 0x03, 0x9e, 0x59, 0x1c, 0x19, 0x71, 0xd7, 0x76, 0xce, 0xc7, 0x61, 0x12, 0x92, 0x06, 0xdb, 0x7a, 0xd3, 0xdd, 0x87, 0x16, 0x68, 0x25, 0x5a, 0x55, 0x50, 0xac, 0x4e, 0x94, 0x8b, 0xe0, 0x5c, 0x16, 0x22, 0x20, 0xdc, 0xef, 0xec, 0x13, 0xff, 0x1f, 0xd8, 0xa5, 0xa7, 0xf7, 0x8b, 0xf7, 0x15, 0xb4, 0x9d, 0x03, 0xba } +, + /* Encryption */ + 129, + { 0x01, 0x2b, 0xa8, 0x7d, 0xc0, 0x3a, 0x1a, 0x38, 0xbf, 0xed, 0xf1, 0x21, 0xed, 0x87, 0x22, 0x82, 0x7b, 0xd9, 0x7d, 0xd6, 0x3f, 0xdd, 0xfd, 0xd5, 0x90, 0x50, 0xc5, 0x3c, 0x5e, 0x7b, 0x49, 0xfb, 0x7a, 0xe6, 0x03, 0x84, 0x87, 0x82, 0x0e, 0xfd, 0x5f, 0xb9, 0x71, 0x43, 0x81, 0xce, 0x8d, 0xae, 0xb5, 0x6d, 0x13, 0x50, 0xbf, 0xc6, 0x7d, 0xf0, 0x91, 0xbe, 0xa2, 0xac, 0xdf, 0xfd, 0xe9, 0x29, 0x2a, 0xb1, 0x29, 0x1c, 0xc9, 0x75, 0x1d, 0x9e, 0x39, 0xa8, 0x26, 0xf0, 0x54, 0xad, 0x1f, 0x33, 0xa2, 0xb7, 0x94, 0xda, 0x50, 0xef, 0x80, 0x67, 0x29, 0x17, 0xe0, 0xb3, 0x81, 0x40, 0x45, 0xd2, 0x3d, 0xf4, 0x5d, 0xba, 0x3f, 0xdc, 0x6f, 0x09, 0xab, 0x0a, 0x01, 0x8b, 0x06, 0x0a, 0xa9, 0xfa, 0xfc, 0x3a, 0x5d, 0x19, 0xd5, 0xeb, 0x64, 0x31, 0x0b, 0xd6, 0x02, 0xa9, 0x91, 0x1d, 0xcb, 0x7f, 0x24 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 8.20", + /* Message */ + 26, + { 0xba, 0x28, 0x33, 0x66, 0x04, 0x76, 0xd8, 0x73, 0x15, 0x07, 0x66, 0x9f, 0x50, 0x29, 0x8c, 0x2c, 0x68, 0xd4, 0x4c, 0x53, 0xe3, 0xd0, 0xa8, 0x03, 0x78, 0x6e } +, + /* Seed */ + 100, + { 0x86, 0xce, 0x8e, 0x92, 0xad, 0x88, 0xb1, 0x46, 0x2a, 0x17, 0x1a, 0xf2, 0x8b, 0x4e, 0x99, 0x08, 0x8c, 0x04, 0x98, 0xa2, 0x9b, 0x4c, 0xa5, 0xe6, 0x6f, 0x64, 0xf8, 0x6a, 0xde, 0xc7, 0xf9, 0x64, 0xe8, 0xeb, 0x82, 0x57, 0xc5, 0xc0, 0x1c, 0xda, 0x16, 0x5e, 0x0f, 0x75, 0x11, 0xdb, 0x14, 0x7c, 0x10, 0xbc, 0x07, 0x51, 0x5f, 0x04, 0xf0, 0x5f, 0x52, 0xd2, 0xbc, 0x89, 0x22, 0x83, 0x57, 0xc6, 0x61, 0xb4, 0x3f, 0x43, 0xd5, 0x42, 0xdb, 0xe7, 0x78, 0x34, 0x09, 0x1c, 0x7c, 0xe7, 0x0b, 0x18, 0x2e, 0x19, 0xbc, 0x93, 0x6c, 0x30, 0x68, 0x4a, 0x83, 0x1e, 0x2c, 0x3b, 0x8a, 0x4a, 0x74, 0x46, 0x3f, 0x0c, 0x9f, 0x1b } +, + /* Encryption */ + 129, + { 0x01, 0x12, 0xac, 0x28, 0x98, 0xa2, 0x5c, 0x13, 0x28, 0x79, 0x1f, 0xc9, 0x6a, 0x82, 0xb7, 0x29, 0x18, 0xb5, 0x1a, 0x66, 0x8c, 0x54, 0x0b, 0xcf, 0xfc, 0x8e, 0x0b, 0x3a, 0xaf, 0xe2, 0x05, 0xee, 0x87, 0x1f, 0x5e, 0xb7, 0x6a, 0xd1, 0x16, 0xd3, 0x04, 0xcc, 0x04, 0x42, 0xbd, 0xb1, 0xaf, 0x5b, 0x9a, 0x63, 0x45, 0x82, 0x7e, 0x67, 0x8e, 0x40, 0xe3, 0x3f, 0xc8, 0x58, 0xef, 0x6c, 0x45, 0x6b, 0xe4, 0x36, 0x52, 0xbb, 0x2e, 0xbc, 0x39, 0x64, 0xb4, 0xbf, 0x4a, 0x93, 0xa8, 0xee, 0xef, 0x84, 0x04, 0xae, 0xf1, 0xa0, 0x44, 0x41, 0x5a, 0x15, 0x6f, 0x7c, 0xfd, 0x79, 0x95, 0xac, 0x25, 0xe7, 0xb0, 0x30, 0x26, 0x69, 0x8e, 0x14, 0x48, 0x9e, 0xfc, 0xc1, 0xae, 0x92, 0x96, 0x58, 0xbb, 0x66, 0x3d, 0xe0, 0xac, 0x44, 0xa7, 0xa5, 0x5c, 0xaa, 0x0b, 0x0b, 0x20, 0x34, 0xc2, 0xaa, 0xec, 0x13, 0x4e } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 9: A 1027-bit RSA key pair", +{ + /* Modulus */ + 129, + { 0x06, 0x8e, 0xf0, 0xb2, 0x74, 0x15, 0x7d, 0x7b, 0x5e, 0xc7, 0x29, 0x03, 0x86, 0x59, 0x56, 0x18, 0x3e, 0x0e, 0x34, 0x62, 0xec, 0xd2, 0x21, 0x14, 0xca, 0xd4, 0xc7, 0xba, 0xac, 0x94, 0xc7, 0xc2, 0xc5, 0xe6, 0xcb, 0xdf, 0xa2, 0xab, 0xfe, 0xaf, 0x8d, 0x23, 0x18, 0x2e, 0x9c, 0x08, 0x81, 0x5d, 0x10, 0x0d, 0x8e, 0x8f, 0x62, 0x1d, 0x3c, 0xd4, 0xaf, 0xbb, 0x99, 0x85, 0x96, 0x6f, 0xd6, 0xa4, 0x18, 0x2b, 0x59, 0x90, 0x88, 0xa3, 0x5d, 0x77, 0xfe, 0x01, 0x78, 0xac, 0xf7, 0x53, 0x1c, 0x70, 0xd8, 0x96, 0xff, 0x78, 0x8e, 0xdc, 0x82, 0x06, 0x05, 0x40, 0xef, 0xef, 0xd9, 0xf3, 0xc2, 0x4d, 0x5b, 0xe6, 0x9a, 0xf7, 0xf2, 0xf4, 0x44, 0x85, 0xb1, 0x91, 0x18, 0xa4, 0x68, 0x81, 0x4f, 0xc5, 0x13, 0xe3, 0xa1, 0xce, 0xd6, 0x77, 0x91, 0xf9, 0x03, 0x6e, 0xee, 0x56, 0xfa, 0x9e, 0x20, 0x60, 0x2b } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 128, + { 0x71, 0x94, 0x0b, 0xe6, 0x79, 0x7b, 0xb3, 0x28, 0x5e, 0xbd, 0xc2, 0x0c, 0xc9, 0x27, 0x5f, 0x5d, 0x77, 0x55, 0x88, 0xe9, 0xaf, 0x6f, 0x68, 0x7a, 0x2e, 0x39, 0xd2, 0xc1, 0x91, 0x11, 0x10, 0x76, 0x95, 0xdd, 0xed, 0xe3, 0x91, 0xd2, 0x19, 0x6b, 0x29, 0x58, 0x1d, 0xf3, 0x15, 0x4a, 0x37, 0x12, 0xfa, 0x6f, 0xcd, 0xf8, 0x5b, 0xb4, 0xfd, 0x48, 0x64, 0x1f, 0x07, 0x1f, 0xfd, 0xb1, 0xde, 0x08, 0xa1, 0xd5, 0x92, 0x1c, 0xa1, 0x0e, 0x68, 0xdc, 0x04, 0x13, 0x13, 0xc9, 0xbb, 0xcb, 0x80, 0x81, 0xbd, 0xb5, 0xd4, 0x60, 0x42, 0x27, 0xcb, 0xe5, 0x78, 0x07, 0x41, 0x65, 0x74, 0xd1, 0xa3, 0x8d, 0xa0, 0xb2, 0x34, 0x4b, 0xb2, 0x15, 0xb4, 0x18, 0x2b, 0x10, 0x6b, 0x2b, 0x53, 0x4a, 0x8d, 0x32, 0x06, 0xf2, 0xd7, 0xd3, 0x03, 0xb8, 0xdd, 0x5b, 0xce, 0x29, 0x2a, 0xbf, 0x75, 0xcd, 0x76, 0x49 } +, + /* Prime 1 */ + 65, + { 0x02, 0x95, 0x10, 0xb9, 0x33, 0xb7, 0xc8, 0x4e, 0x41, 0xff, 0xcc, 0x72, 0x2e, 0x32, 0x38, 0x60, 0xc9, 0xb2, 0xd0, 0x88, 0x3c, 0x68, 0x33, 0x62, 0x4b, 0xa5, 0xbb, 0xb8, 0x97, 0x53, 0xd7, 0x60, 0x3a, 0x7d, 0xcf, 0x26, 0x6c, 0xc8, 0xf4, 0xbb, 0x07, 0x48, 0x48, 0x26, 0x0f, 0x68, 0xdd, 0x82, 0x6b, 0x63, 0x8a, 0x8d, 0xd2, 0xef, 0xaf, 0x68, 0xaa, 0xee, 0x26, 0x5a, 0xe8, 0x98, 0x39, 0xb1, 0x63 } +, + /* Prime 2 */ + 65, + { 0x02, 0x8a, 0x2d, 0x03, 0x34, 0x49, 0x44, 0x62, 0xf6, 0x11, 0xf3, 0x60, 0x3e, 0x0d, 0x37, 0x4f, 0x3e, 0x32, 0xd2, 0xfa, 0xb5, 0xe9, 0xd6, 0x97, 0x2d, 0xfd, 0x70, 0x79, 0x64, 0x46, 0xa4, 0x8b, 0xc3, 0x03, 0xee, 0x25, 0x8b, 0x75, 0xa1, 0xb7, 0xac, 0xe7, 0x0d, 0x48, 0x58, 0x51, 0x79, 0x4e, 0x42, 0x84, 0xf2, 0xdc, 0x51, 0xd3, 0x97, 0x8d, 0x55, 0x53, 0x7b, 0xea, 0x22, 0x55, 0x11, 0xf4, 0x99 } +, + /* Prime exponent 1 */ + 65, + { 0x01, 0xb9, 0x55, 0x0d, 0xdf, 0xda, 0x3d, 0x6f, 0x09, 0x9e, 0xe5, 0xf6, 0x00, 0xa3, 0x64, 0x82, 0x31, 0x86, 0x20, 0xb4, 0x23, 0x68, 0x09, 0x8e, 0x01, 0x24, 0xe7, 0x5b, 0x88, 0x23, 0xe0, 0x31, 0x0d, 0x3b, 0xba, 0xd5, 0x53, 0x61, 0x22, 0x09, 0xcf, 0x05, 0xd1, 0xad, 0x1f, 0x32, 0x8a, 0x57, 0xac, 0xac, 0x2a, 0xef, 0x1e, 0x39, 0x08, 0x69, 0x1f, 0x5c, 0x98, 0xdc, 0xae, 0x56, 0x1a, 0x86, 0x33 } +, + /* Prime exponent 2 */ + 64, + { 0xe8, 0xff, 0xa4, 0x8c, 0x52, 0x4d, 0x5d, 0xa1, 0x8d, 0x61, 0x48, 0x76, 0x34, 0x4a, 0x43, 0xed, 0xa8, 0x4d, 0x0f, 0x67, 0xad, 0xbb, 0x27, 0x46, 0x65, 0xf2, 0xae, 0xae, 0x0e, 0xda, 0xdc, 0xf3, 0x30, 0x2f, 0x61, 0xe9, 0x0e, 0x68, 0xbb, 0xe8, 0x0c, 0x8d, 0x28, 0x05, 0xee, 0x7c, 0xa8, 0x5d, 0x12, 0x43, 0xee, 0x4c, 0xac, 0xa5, 0x3d, 0x12, 0xfc, 0xee, 0x05, 0x43, 0xf4, 0x74, 0x90, 0xd1 } +, + /* Coefficient */ + 65, + { 0x01, 0x98, 0x4a, 0x81, 0x5c, 0xdb, 0x46, 0xad, 0x81, 0xcd, 0x82, 0x10, 0xaa, 0x07, 0x22, 0x70, 0x0c, 0x59, 0x90, 0x9d, 0xdc, 0x9c, 0x4a, 0x49, 0xf1, 0x9b, 0xe1, 0x5d, 0xa6, 0x04, 0x47, 0x8c, 0x21, 0x88, 0x81, 0xd5, 0x43, 0xa7, 0x54, 0x6b, 0xf7, 0x75, 0x69, 0x4c, 0x2b, 0xd1, 0x3d, 0xda, 0x69, 0x2c, 0xd0, 0xbc, 0x24, 0x39, 0xef, 0x22, 0xef, 0xb6, 0x7f, 0xfc, 0x5d, 0x46, 0x95, 0x21, 0xb2 } + +} +, +{{ + "PKCS#1 v1.5 Encryption Example 9.1", + /* Message */ + 61, + { 0x96, 0xad, 0x3b, 0xa4, 0xd2, 0x9b, 0xdd, 0x35, 0x25, 0xbb, 0xc5, 0xd0, 0x2e, 0x88, 0xc0, 0x13, 0x3f, 0xfd, 0xea, 0x40, 0x94, 0x74, 0xdb, 0x34, 0xdf, 0x73, 0x3c, 0xa5, 0x9c, 0x3a, 0x23, 0x2f, 0x6a, 0x64, 0xc2, 0x14, 0x3c, 0xa1, 0x31, 0xa7, 0xf1, 0x8d, 0x00, 0x5b, 0xb3, 0xaa, 0x6c, 0xa1, 0xea, 0xbe, 0xaa, 0x13, 0x6b, 0xec, 0x37, 0xdb, 0x11, 0x1d, 0x4d, 0x8f, 0x61 } +, + /* Seed */ + 65, + { 0x10, 0xe9, 0xf5, 0x09, 0x3c, 0xec, 0x87, 0x2e, 0xdb, 0x16, 0x16, 0x2b, 0x6b, 0xbd, 0x52, 0x12, 0xf6, 0x10, 0x1a, 0x71, 0xd5, 0x1d, 0xc1, 0x42, 0x0c, 0xad, 0xd1, 0xd5, 0x50, 0xfa, 0xf9, 0xaf, 0x40, 0xf5, 0x73, 0xd3, 0xe3, 0xab, 0x68, 0x91, 0xd8, 0xa8, 0x82, 0xef, 0x06, 0x56, 0xbc, 0x30, 0x06, 0x2a, 0x05, 0xb1, 0xcc, 0x27, 0x7a, 0x11, 0xc9, 0xba, 0x2e, 0xfd, 0x51, 0x03, 0xc5, 0x6e, 0x23 } +, + /* Encryption */ + 129, + { 0x04, 0xde, 0xc0, 0x1b, 0xbf, 0x8e, 0x0c, 0x22, 0x96, 0xd9, 0xf5, 0xbc, 0x2d, 0x2b, 0xa8, 0x95, 0x34, 0x3e, 0xc3, 0x0e, 0xc5, 0x44, 0x13, 0x57, 0x6d, 0x80, 0x84, 0xb9, 0x31, 0x43, 0xcf, 0xa2, 0xd2, 0x03, 0x3b, 0xf4, 0xc2, 0xc2, 0xe0, 0x3f, 0x5b, 0x02, 0x59, 0xed, 0xf1, 0x4a, 0x8f, 0x3e, 0x11, 0x69, 0x85, 0x77, 0x65, 0x2a, 0x2a, 0xb9, 0xf5, 0x1a, 0xb0, 0x18, 0x7c, 0xc7, 0x51, 0x75, 0xc8, 0x6d, 0xfc, 0x9a, 0x45, 0xb1, 0xe4, 0xeb, 0x8b, 0x54, 0x47, 0xa9, 0x4a, 0xb9, 0xb5, 0x17, 0x7a, 0x04, 0x04, 0xba, 0x49, 0xe5, 0x7f, 0x83, 0xc9, 0x3f, 0x7f, 0xe2, 0xde, 0x24, 0x18, 0x45, 0xf5, 0x81, 0xf6, 0x42, 0x12, 0x43, 0x7e, 0x0c, 0x04, 0xff, 0x34, 0xea, 0x1d, 0xee, 0x6d, 0xd2, 0x8f, 0x6f, 0xf3, 0x36, 0x72, 0x35, 0x44, 0x13, 0x74, 0xf0, 0xf2, 0xef, 0x71, 0xa9, 0xcd, 0xae, 0x9e } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Encryption Example 9.2", + /* Message */ + 37, + { 0x7f, 0x92, 0xab, 0xb6, 0xe5, 0x2e, 0xd5, 0xd4, 0x20, 0x84, 0x9e, 0xd6, 0xcc, 0xab, 0x36, 0xc3, 0xd0, 0x84, 0x92, 0x55, 0x43, 0x1e, 0x19, 0x3d, 0x67, 0xbd, 0x94, 0x4b, 0x6c, 0x0f, 0xce, 0xfb, 0x77, 0x29, 0xcf, 0x5a, 0x31 } +, + /* Seed */ + 89, + { 0xce, 0xa9, 0x68, 0xbe, 0x78, 0xab, 0x5f, 0xaa, 0xc2, 0x27, 0xdc, 0x3c, 0x6f, 0xc9, 0xce, 0xd4, 0x9f, 0x85, 0x1e, 0xd5, 0x8b, 0x08, 0xd5, 0xca, 0x37, 0x54, 0x28, 0x48, 0x9a, 0xfb, 0xef, 0x3b, 0xf5, 0xed, 0x83, 0x74, 0x6d, 0x95, 0x9a, 0x0a, 0x56, 0xe9, 0xac, 0x66, 0xff, 0x2e, 0x7c, 0x8b, 0x8c, 0x3a, 0xda, 0x97, 0xfa, 0x15, 0xdd, 0x7f, 0x99, 0x13, 0x41, 0x74, 0x70, 0x70, 0xcc, 0xad, 0x65, 0x42, 0xbd, 0x7f, 0x4b, 0x33, 0xf5, 0x56, 0x04, 0x45, 0x8b, 0x91, 0x03, 0xae, 0x13, 0xdc, 0x89, 0xb4, 0xe6, 0x2c, 0xcb, 0xf8, 0x4f, 0xf7, 0x3b } +, + /* Encryption */ + 129, + { 0x02, 0x5a, 0x1e, 0x65, 0xeb, 0x37, 0xf4, 0xb3, 0x28, 0xcc, 0x31, 0xb0, 0x17, 0x24, 0xf8, 0x3c, 0x26, 0xed, 0x8d, 0x18, 0xa6, 0x51, 0x65, 0x21, 0x3b, 0xa0, 0xef, 0xf7, 0xae, 0x76, 0x7e, 0xe6, 0x0b, 0x99, 0x27, 0x76, 0x1a, 0x06, 0x94, 0xb5, 0xc3, 0xbb, 0x64, 0xb7, 0xe0, 0x39, 0x96, 0xa3, 0x56, 0x8d, 0x6f, 0xd1, 0xac, 0x6b, 0x7a, 0x8b, 0x71, 0x97, 0x5b, 0xb0, 0x71, 0x6d, 0x94, 0x5c, 0x02, 0xd4, 0x73, 0x68, 0x96, 0x6f, 0xff, 0xb1, 0xd4, 0x49, 0xfc, 0x6e, 0xd7, 0x3e, 0x2d, 0x19, 0x83, 0x1b, 0x86, 0xd1, 0x87, 0x67, 0x51, 0x29, 0x36, 0x69, 0xe7, 0x7d, 0x6e, 0x12, 0xa0, 0xf0, 0xc9, 0x62, 0xdf, 0xcd, 0x40, 0x0f, 0xb8, 0x3c, 0xe8, 0x26, 0x07, 0x16, 0x31, 0x7a, 0xd5, 0xfd, 0xe2, 0x18, 0x49, 0xaa, 0x6f, 0x68, 0xe7, 0x0c, 0xe0, 0xb5, 0xb3, 0x11, 0x42, 0x89, 0x8a, 0xd1, 0xa2 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 9.3", + /* Message */ + 61, + { 0xf5, 0xb5, 0x35, 0xb6, 0x3d, 0x53, 0x5e, 0x21, 0x37, 0x73, 0x2c, 0x30, 0x13, 0x37, 0xc9, 0x53, 0xea, 0x2e, 0xdd, 0x58, 0xa7, 0x8c, 0x20, 0x25, 0x83, 0x2d, 0xca, 0x9d, 0x6b, 0xcd, 0xad, 0x87, 0xc9, 0x97, 0xc9, 0x06, 0x83, 0x6b, 0x2b, 0xf9, 0x5c, 0x83, 0xf0, 0x3f, 0x7a, 0xfa, 0x29, 0x01, 0x34, 0x6d, 0x67, 0x4a, 0xa6, 0x9a, 0x1b, 0x47, 0xf6, 0xb9, 0x16, 0xfd, 0x4b } +, + /* Seed */ + 65, + { 0xc8, 0x9e, 0xfd, 0xb2, 0x34, 0xe0, 0x1a, 0x2f, 0x07, 0x76, 0x29, 0x57, 0xe8, 0xc0, 0xa4, 0xf9, 0x1a, 0xba, 0xe6, 0xd4, 0xf3, 0x60, 0xe8, 0x9a, 0x7c, 0x48, 0x6c, 0x55, 0x49, 0xf3, 0xd0, 0xad, 0x75, 0x77, 0x7f, 0x0c, 0xcd, 0x97, 0xa0, 0x97, 0x5e, 0x98, 0x44, 0xd9, 0x86, 0x87, 0x02, 0x76, 0xc9, 0x82, 0x5f, 0x5d, 0x1e, 0xef, 0x3d, 0x1b, 0x48, 0x7a, 0xbc, 0xd1, 0x9b, 0x51, 0x2d, 0x08, 0xbe } +, + /* Encryption */ + 129, + { 0x03, 0x9a, 0x1c, 0xe8, 0xc0, 0x91, 0x62, 0x51, 0xa0, 0x1e, 0x5f, 0xb6, 0x61, 0x5d, 0x2e, 0x11, 0x98, 0x2f, 0x4f, 0xae, 0x7d, 0x46, 0xdf, 0x21, 0xda, 0xa2, 0x98, 0xf2, 0xc7, 0x46, 0x11, 0xb5, 0x58, 0x16, 0xcc, 0x27, 0xfa, 0x37, 0x27, 0x9a, 0xaf, 0x59, 0x02, 0xec, 0xb6, 0xc8, 0x39, 0xfa, 0x90, 0x0c, 0xf3, 0xaf, 0x86, 0xff, 0x40, 0xa4, 0x47, 0xdc, 0x40, 0x22, 0x35, 0xf9, 0x06, 0x67, 0x91, 0x23, 0xf3, 0xcd, 0x38, 0x19, 0x04, 0xf3, 0x3e, 0xee, 0x35, 0x3a, 0xc9, 0x0d, 0x5f, 0x7f, 0x20, 0x3a, 0x6e, 0xa8, 0x91, 0x35, 0x1a, 0xdb, 0x11, 0x60, 0x1b, 0xd9, 0xd6, 0xb0, 0xa0, 0x24, 0x33, 0x3a, 0x24, 0x55, 0xbe, 0x1c, 0xa6, 0x2e, 0xd8, 0x2c, 0xf3, 0x7c, 0xf8, 0xde, 0x4e, 0x23, 0x92, 0xdd, 0x54, 0xe7, 0x75, 0x03, 0x3c, 0x56, 0x99, 0x0b, 0xae, 0x5c, 0x43, 0x91, 0xb6, 0x65, 0x3a } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 9.4", + /* Message */ + 47, + { 0xa7, 0xcf, 0x29, 0x82, 0x03, 0x47, 0xa5, 0x2a, 0xb9, 0xcc, 0x42, 0x04, 0xbb, 0x6a, 0xc1, 0xbd, 0x7f, 0xd9, 0x0a, 0x75, 0x8a, 0x15, 0x6d, 0xfa, 0x9c, 0xe7, 0x19, 0x27, 0xe7, 0x4e, 0xe2, 0x15, 0x98, 0x70, 0x8c, 0xf6, 0x9c, 0xfd, 0x79, 0x85, 0x74, 0x2f, 0x50, 0x27, 0xff, 0xa7, 0x10 } +, + /* Seed */ + 79, + { 0x10, 0x9f, 0x0d, 0x6c, 0xa0, 0xe1, 0x3f, 0x50, 0x4c, 0x07, 0xd8, 0x4a, 0x5b, 0xbe, 0x43, 0xed, 0x6a, 0x94, 0xac, 0xba, 0xfa, 0xb0, 0x48, 0x89, 0x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 0x2b, 0x94 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 9.5", + /* Message */ + 10, + { 0xb8, 0x03, 0xc7, 0xef, 0x5f, 0x9a, 0x9b, 0xd5, 0x84, 0x01 } +, + /* Seed */ + 116, + { 0x8e, 0x77, 0x58, 0xed, 0x4d, 0x1b, 0xa4, 0xdc, 0xe0, 0x88, 0x92, 0x6c, 0x10, 0xb2, 0xf3, 0xd4, 0xc1, 0xe2, 0x67, 0x1a, 0xe7, 0x2e, 0x65, 0x9f, 0x72, 0x1f, 0xf7, 0xbe, 0x6f, 0xc0, 0x35, 0xe3, 0x85, 0xd5, 0x12, 0xd0, 0x7a, 0x38, 0xdc, 0xca, 0x1e, 0xb8, 0x31, 0xfe, 0xf9, 0x06, 0x10, 0x04, 0x44, 0xee, 0x99, 0x5c, 0xb0, 0x7b, 0xc2, 0x6a, 0x5d, 0xc9, 0x2b, 0x27, 0x2a, 0x74, 0xa9, 0x2d, 0x21, 0x49, 0x73, 0x25, 0x22, 0xd5, 0x39, 0x43, 0x4f, 0xa4, 0xd0, 0x3b, 0x07, 0xcf, 0x96, 0x99, 0x95, 0x8c, 0x19, 0x89, 0x1d, 0x1d, 0x59, 0x06, 0xaa, 0x36, 0xd0, 0xa8, 0xd0, 0x6c, 0x6f, 0xc8, 0x7a, 0x45, 0x51, 0xbf, 0x18, 0x58, 0xbd, 0xfe, 0xd5, 0xf8, 0x86, 0xcc, 0x8d, 0x31, 0xee, 0x4c, 0x16, 0x4e, 0x98, 0x1d } +, + /* Encryption */ + 129, + { 0x04, 0xb6, 0x2d, 0x4d, 0x4b, 0x9c, 0x1c, 0x3e, 0x05, 0x13, 0x09, 0x79, 0x5c, 0x69, 0x24, 0x8a, 0xed, 0x38, 0x9d, 0xe2, 0x4a, 0x6c, 0x79, 0x53, 0x8a, 0x2d, 0x51, 0xd5, 0xd0, 0x37, 0x19, 0xa8, 0xa5, 0x28, 0x75, 0x0d, 0x5d, 0x25, 0x4a, 0x1b, 0x91, 0x40, 0x96, 0xdb, 0x96, 0xd8, 0x3d, 0x2d, 0x9a, 0xaa, 0x2a, 0x16, 0x5b, 0xb1, 0x34, 0x6e, 0x44, 0xc3, 0x57, 0x27, 0x56, 0xc3, 0x8d, 0x52, 0xf8, 0xd3, 0x07, 0xc0, 0x4e, 0x1e, 0xfe, 0xe5, 0x84, 0x78, 0x22, 0x31, 0x7a, 0xb4, 0x69, 0x34, 0x5b, 0x86, 0xc7, 0xb8, 0x5b, 0x54, 0x15, 0x41, 0xc9, 0x92, 0xab, 0xea, 0x98, 0xd1, 0x08, 0xa7, 0xdf, 0xc7, 0x09, 0x1c, 0x30, 0xc6, 0x68, 0x5a, 0xf0, 0xe3, 0x3d, 0x04, 0x66, 0xac, 0xe4, 0xcc, 0xcc, 0xb3, 0x4e, 0x5b, 0x26, 0x6d, 0x3d, 0x6b, 0x94, 0x7b, 0xc7, 0xc0, 0xae, 0x34, 0xd5, 0xe2, 0x64 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 9.6", + /* Message */ + 49, + { 0x61, 0x7e, 0xa9, 0xe4, 0xa5, 0x6c, 0x4e, 0xc1, 0xd3, 0xd7, 0xfd, 0x7f, 0x32, 0x81, 0xae, 0x7f, 0xa9, 0x32, 0xb2, 0xa0, 0xa6, 0xcf, 0x55, 0xeb, 0x60, 0x48, 0x14, 0x56, 0x81, 0xb3, 0x58, 0x8e, 0xdf, 0x70, 0x12, 0x69, 0xf8, 0x9f, 0xe6, 0x4a, 0xa1, 0x4a, 0xd8, 0xdf, 0x0d, 0x46, 0x79, 0x61, 0x31 } +, + /* Seed */ + 77, + { 0x64, 0xd7, 0xeb, 0xd0, 0x48, 0x50, 0xeb, 0x6f, 0x7a, 0xe1, 0xaf, 0x48, 0x12, 0x0a, 0x80, 0x13, 0x0f, 0x32, 0xed, 0xb5, 0x03, 0x69, 0x64, 0x0b, 0x22, 0x2b, 0x8d, 0x63, 0xef, 0xf6, 0x57, 0x12, 0x70, 0xdc, 0xab, 0x31, 0x76, 0xd0, 0x24, 0x72, 0x28, 0xdc, 0xd1, 0xc3, 0xf3, 0xcf, 0xd5, 0x13, 0x31, 0xb7, 0x56, 0xa8, 0x65, 0x2a, 0x14, 0xdd, 0xaa, 0xb9, 0x93, 0x96, 0xb9, 0x19, 0x9a, 0x73, 0x87, 0x50, 0xd6, 0x9e, 0xfc, 0xd3, 0x77, 0xf1, 0x84, 0xae, 0x19, 0xb5, 0xa9 } +, + /* Encryption */ + 129, + { 0x02, 0xdf, 0xe7, 0x29, 0x58, 0x59, 0x58, 0x81, 0xd8, 0x07, 0x56, 0x6d, 0x3e, 0x36, 0x07, 0xc0, 0x22, 0xe4, 0x61, 0xfe, 0x1d, 0xbe, 0xd3, 0xcc, 0x6d, 0x63, 0xde, 0xdc, 0xb7, 0x19, 0x0f, 0x06, 0xc7, 0xd2, 0x4b, 0x4f, 0x03, 0x26, 0x4c, 0xaf, 0xbb, 0x74, 0x82, 0xec, 0x28, 0xb9, 0xba, 0x48, 0x9d, 0x03, 0x11, 0x5a, 0xf5, 0x8f, 0xde, 0x47, 0x5e, 0xda, 0x58, 0xbf, 0x01, 0x55, 0xcd, 0xf1, 0xaf, 0x16, 0xdf, 0x20, 0x6b, 0xcd, 0x12, 0x57, 0x04, 0xc3, 0xe3, 0x15, 0xad, 0x3d, 0x95, 0x44, 0xb9, 0xe2, 0xc2, 0xfe, 0xa8, 0x10, 0xce, 0x48, 0x45, 0x56, 0xd2, 0x9e, 0x07, 0xad, 0xbf, 0x0f, 0xf4, 0x61, 0xcc, 0xbc, 0xf6, 0x62, 0xbd, 0x74, 0x95, 0x9a, 0x43, 0x7d, 0x4c, 0x80, 0x11, 0xce, 0xad, 0xa5, 0x50, 0x2a, 0xf7, 0x67, 0x6d, 0x9a, 0x15, 0x21, 0xe3, 0x18, 0x9d, 0xaf, 0xde, 0x00, 0xdd } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 9.7", + /* Message */ + 60, + { 0xc9, 0x1f, 0x2c, 0x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, 0xf5, 0x4d, 0x45, 0xce, 0xda, 0x70, 0xb9, 0xdb, 0x3b, 0x8f, 0xad, 0x25, 0xe7, 0x77, 0x95, 0xaf, 0x14, 0x81, 0xec, 0x49, 0x21, 0x84, 0xc4, 0x9e, 0x9d, 0xf8, 0x23, 0xee, 0x64, 0x66, 0x41, 0x0f, 0x65, 0x01, 0x3c, 0xe3, 0xc5, 0x79, 0x16, 0x63, 0x5d, 0xa8, 0x30, 0x67, 0x7f, 0x93, 0x2b, 0xda, 0xba, 0xb5, 0xc0, 0xa2, 0x08, 0xd7, 0xf4, 0x36, 0x7a, 0x7e, 0xab, 0xa7, 0x5b, 0x04, 0x5d, 0x25, 0xac, 0xfd, 0xb4, 0x15, 0xfe, 0xe0, 0x52, 0x19, 0xa5, 0x84, 0x23, 0x7a } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 9.8", + /* Message */ + 51, + { 0x7b, 0x1c, 0x31, 0x51, 0xa3, 0x8d, 0x32, 0xec, 0x7b, 0x82, 0xc4, 0x8c, 0x00, 0x0a, 0xa4, 0x81, 0xde, 0x41, 0x8e, 0x80, 0x3b, 0x67, 0x3d, 0x2e, 0x9a, 0x0f, 0xc3, 0xd5, 0xe9, 0x74, 0xad, 0xcd, 0xce, 0xbd, 0x3c, 0x2a, 0x8f, 0x41, 0x14, 0x21, 0x18, 0xa5, 0x5e, 0x87, 0xd0, 0x4b, 0xba, 0xd5, 0xb3, 0x64, 0x25 } +, + /* Seed */ + 75, + { 0xb0, 0xf5, 0xbe, 0x9b, 0x3f, 0x23, 0x7c, 0xc5, 0xaf, 0xca, 0x5a, 0x99, 0xfc, 0xcb, 0x77, 0xb6, 0xef, 0xd8, 0x68, 0x94, 0x7f, 0x98, 0x55, 0x4f, 0xbe, 0xce, 0xac, 0xfa, 0x88, 0x4c, 0x15, 0x15, 0x39, 0xd7, 0xcf, 0x42, 0x3e, 0x72, 0x60, 0x31, 0xbf, 0xeb, 0x8d, 0xd2, 0xd4, 0xf3, 0x01, 0xda, 0x6b, 0xdf, 0xca, 0xd6, 0xe5, 0x81, 0x65, 0x82, 0xad, 0xdc, 0xe1, 0x0d, 0x85, 0xd5, 0xee, 0x1d, 0x04, 0x46, 0xf3, 0x73, 0xb9, 0x5e, 0xe1, 0x60, 0xbc, 0xf0, 0x35 } +, + /* Encryption */ + 129, + { 0x06, 0x6c, 0x30, 0x09, 0xdc, 0x6c, 0xba, 0xc7, 0xb8, 0xbd, 0x51, 0x41, 0xc5, 0x5c, 0xf8, 0x6a, 0x3d, 0x79, 0x69, 0xd5, 0x85, 0x45, 0x2e, 0x3a, 0x66, 0x54, 0x0f, 0x94, 0x02, 0xdb, 0xa2, 0x15, 0xe3, 0xfb, 0x3a, 0x27, 0x7f, 0x0d, 0x33, 0x96, 0xc8, 0xc0, 0x08, 0xaf, 0x19, 0x91, 0x3e, 0x3d, 0x91, 0xe4, 0x0f, 0x86, 0x76, 0x06, 0xb5, 0xbf, 0x54, 0x30, 0x4c, 0x04, 0x71, 0xda, 0xdd, 0x64, 0x04, 0xb6, 0x7a, 0x48, 0x57, 0xbf, 0x52, 0x24, 0x6c, 0x0d, 0x60, 0x18, 0x23, 0xdd, 0x03, 0x80, 0xc6, 0x60, 0x9d, 0xac, 0xb9, 0x2d, 0xb6, 0x02, 0xe5, 0x57, 0x64, 0xae, 0x46, 0x50, 0xdf, 0x1a, 0xdb, 0xb4, 0xb9, 0x5f, 0xa5, 0xaf, 0x4b, 0xcd, 0x11, 0x21, 0xf1, 0x3c, 0x0a, 0x73, 0x23, 0xad, 0xa8, 0xc6, 0x0d, 0xe3, 0xd0, 0x81, 0x72, 0x9d, 0x19, 0x7f, 0x9c, 0xf8, 0xe2, 0x7c, 0xde, 0x80, 0xb1 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 9.9", + /* Message */ + 58, + { 0xb2, 0x93, 0xc6, 0xf6, 0xd0, 0x5d, 0x1f, 0x38, 0xb5, 0x61, 0xea, 0x3d, 0x0d, 0x0a, 0xd6, 0xa2, 0xaf, 0x83, 0x09, 0xbb, 0x9a, 0xde, 0xfa, 0x77, 0x8f, 0xd6, 0xbb, 0x9f, 0xff, 0x3e, 0x01, 0x0c, 0x40, 0x4c, 0x53, 0x39, 0x97, 0xcc, 0xfe, 0xd7, 0xe1, 0x91, 0x7a, 0x66, 0x92, 0x61, 0xcf, 0xcc, 0xa4, 0xe3, 0x70, 0x29, 0x99, 0x1d, 0x2d, 0xe9, 0xb2, 0x99 } +, + /* Seed */ + 68, + { 0x87, 0xbd, 0x2f, 0x6b, 0xb4, 0x82, 0x45, 0x59, 0x1d, 0x65, 0xf0, 0x23, 0xa6, 0x5b, 0x63, 0xbb, 0xba, 0x84, 0x19, 0x79, 0x2c, 0x01, 0x41, 0x09, 0x2b, 0x1d, 0xb1, 0xbe, 0x53, 0xe8, 0xc9, 0xb4, 0xdf, 0x95, 0xf0, 0xad, 0x55, 0xb9, 0x6e, 0x5e, 0x57, 0x61, 0x5d, 0x21, 0x4b, 0x49, 0x77, 0x87, 0x0a, 0x27, 0x2f, 0x72, 0x31, 0x66, 0xc6, 0x20, 0x45, 0x76, 0x5e, 0x6b, 0x4a, 0x73, 0xa7, 0xc9, 0xeb, 0xe1, 0x1d, 0x24 } +, + /* Encryption */ + 129, + { 0x03, 0x10, 0x4e, 0xc6, 0xc4, 0xab, 0x9d, 0xac, 0xae, 0x42, 0x7f, 0xb1, 0x06, 0x99, 0xbc, 0xae, 0x00, 0x3d, 0xa5, 0x6f, 0x6d, 0x07, 0x50, 0x95, 0x87, 0x14, 0x5b, 0x73, 0x3e, 0xdb, 0x53, 0x23, 0x9a, 0x6f, 0x42, 0x22, 0x86, 0x83, 0x9c, 0xac, 0x06, 0x4a, 0xdf, 0xee, 0xe5, 0xdc, 0x89, 0x78, 0x0c, 0xdd, 0xad, 0xcc, 0x80, 0x72, 0x19, 0xd6, 0xa9, 0x7b, 0x85, 0xc1, 0x3f, 0x27, 0x93, 0x7d, 0x70, 0x32, 0x7f, 0x82, 0xcc, 0x36, 0xa5, 0xda, 0x8e, 0x45, 0x63, 0x77, 0xfc, 0xa2, 0x3a, 0xee, 0x51, 0x4e, 0x04, 0x4a, 0xbf, 0x1f, 0x66, 0xc3, 0xe7, 0xbd, 0xeb, 0xc2, 0xcf, 0xf6, 0x28, 0xbd, 0x52, 0x4a, 0x09, 0x66, 0xe2, 0x63, 0x8d, 0x28, 0x33, 0xbf, 0xa3, 0x43, 0xeb, 0xc7, 0x41, 0xf7, 0x6b, 0x5b, 0x70, 0xa1, 0x13, 0x6f, 0x4a, 0xbc, 0x60, 0x28, 0x64, 0xa2, 0xad, 0x43, 0xa7, 0x91, 0xbd } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 9.10", + /* Message */ + 5, + { 0x08, 0x38, 0xf4, 0xa5, 0x92 } +, + /* Seed */ + 121, + { 0x89, 0xc5, 0x89, 0x8c, 0x6c, 0x3d, 0xc6, 0xcb, 0xdb, 0x1a, 0xcb, 0x28, 0x05, 0xdf, 0x53, 0x98, 0xf0, 0xb3, 0x35, 0x8a, 0x18, 0xe5, 0xe6, 0x3c, 0x14, 0xd2, 0x0c, 0x98, 0xd2, 0x1d, 0x9f, 0xd8, 0xb2, 0xec, 0xc9, 0xa0, 0xe8, 0x3d, 0xaf, 0x0c, 0x06, 0x92, 0x68, 0xbb, 0xe8, 0x6f, 0xee, 0xa5, 0x1c, 0x93, 0x79, 0x1b, 0x68, 0xe5, 0xd9, 0x3b, 0x74, 0x5f, 0xea, 0xf6, 0xad, 0xc4, 0x2b, 0x83, 0xc3, 0x09, 0xc9, 0xcd, 0x3d, 0xfe, 0x1c, 0x06, 0x15, 0x3a, 0xb8, 0x80, 0x85, 0x56, 0x18, 0x98, 0x90, 0xbe, 0x05, 0x3a, 0x92, 0x54, 0x88, 0xd0, 0x29, 0xfe, 0x50, 0x40, 0xe3, 0xe7, 0xd5, 0xd5, 0x31, 0xb3, 0x2e, 0xb9, 0xd2, 0xf4, 0xee, 0xa2, 0x21, 0x11, 0xb3, 0x8a, 0x65, 0x53, 0xf0, 0x0e, 0xdd, 0x23, 0x65, 0x57, 0x5b, 0xb9, 0x49, 0xf3, 0x63 } +, + /* Encryption */ + 129, + { 0x01, 0x4f, 0x27, 0x97, 0xdd, 0xe8, 0xd4, 0x60, 0x18, 0xff, 0x23, 0xd8, 0x9b, 0xe2, 0xe3, 0xae, 0x04, 0x6e, 0xed, 0x31, 0x97, 0xc8, 0x79, 0xc6, 0x0e, 0x26, 0xf3, 0xd2, 0x40, 0x08, 0x66, 0xeb, 0x50, 0xd7, 0xb4, 0x5f, 0x6b, 0x01, 0xae, 0x9c, 0xa0, 0x06, 0x84, 0x7e, 0xfb, 0xe9, 0xab, 0xcc, 0x9b, 0xc3, 0xe3, 0x56, 0x90, 0x07, 0x2b, 0x68, 0xdb, 0x9e, 0xcd, 0x92, 0x6d, 0x94, 0x5f, 0x78, 0x7b, 0x27, 0xc3, 0x75, 0x3b, 0xf9, 0x6b, 0x2d, 0x49, 0x98, 0x30, 0x84, 0x14, 0x2c, 0x42, 0xa1, 0x26, 0x1a, 0xff, 0x7b, 0x17, 0xff, 0x4b, 0x20, 0xde, 0x9b, 0xff, 0xa5, 0x86, 0x24, 0xab, 0x37, 0x1d, 0x4c, 0xe2, 0xf9, 0x64, 0x69, 0xa8, 0xe1, 0x03, 0x8d, 0x57, 0x20, 0xb8, 0x1c, 0xf0, 0x42, 0xdc, 0x78, 0xbf, 0xda, 0x9a, 0x3c, 0xcb, 0x61, 0x60, 0x81, 0x2d, 0xde, 0xa1, 0x58, 0xbd, 0x2f, 0x5c } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 9.11", + /* Message */ + 60, + { 0x12, 0x38, 0x0c, 0x5e, 0x80, 0xbb, 0x95, 0xbb, 0xc8, 0x85, 0x73, 0x57, 0xfe, 0xfd, 0x17, 0xbf, 0x9e, 0x50, 0x96, 0x27, 0xd2, 0x8c, 0xdf, 0xcd, 0x12, 0xbb, 0x13, 0x16, 0x61, 0xb3, 0x42, 0xdf, 0xa6, 0xca, 0x67, 0x2e, 0x13, 0xa8, 0x85, 0x1f, 0xce, 0x19, 0xb1, 0xa8, 0xca, 0xf0, 0xe3, 0x3c, 0xd6, 0xef, 0x53, 0x8a, 0x05, 0xfa, 0x54, 0x26, 0x9a, 0x13, 0x78, 0xe7 } +, + /* Seed */ + 66, + { 0x88, 0x03, 0x31, 0xeb, 0xe9, 0x1a, 0xb6, 0xce, 0x16, 0x84, 0xd9, 0xaf, 0x5d, 0x97, 0x7e, 0xb4, 0x26, 0xca, 0x71, 0x56, 0xe0, 0xb6, 0xf4, 0x33, 0x6c, 0x6e, 0x09, 0x33, 0xd6, 0xfa, 0x48, 0x78, 0x2c, 0x0a, 0xc9, 0x69, 0xf3, 0xdd, 0xe6, 0x1d, 0x8f, 0xd7, 0x4c, 0x47, 0xfe, 0x9e, 0x30, 0x61, 0x71, 0x0d, 0x24, 0x5b, 0x1d, 0x38, 0x11, 0x04, 0x28, 0x60, 0xc1, 0xf4, 0x8d, 0x2b, 0x8f, 0xfd, 0x80, 0x9e } +, + /* Encryption */ + 129, + { 0x04, 0x6c, 0x54, 0x5f, 0xf4, 0x96, 0xc2, 0x1f, 0x69, 0x01, 0x27, 0x24, 0x54, 0x18, 0xcc, 0x5f, 0xb1, 0x8f, 0x09, 0x10, 0x2e, 0x7a, 0xca, 0x87, 0xe2, 0x6e, 0x20, 0x82, 0xfc, 0x16, 0xf6, 0x2f, 0xe9, 0xf4, 0x2a, 0x72, 0x22, 0x71, 0xa7, 0x9e, 0xae, 0xe9, 0x62, 0x5a, 0x7e, 0x63, 0x2c, 0x19, 0x36, 0x40, 0x4c, 0xec, 0x62, 0x11, 0xd8, 0x23, 0x86, 0x3b, 0xa0, 0x2c, 0x6b, 0x0a, 0x83, 0x19, 0x58, 0xb4, 0xed, 0x8f, 0xc6, 0x25, 0xa2, 0xe5, 0x2a, 0x05, 0x4f, 0x8f, 0x18, 0x1f, 0x13, 0x0f, 0x8b, 0xc4, 0xb1, 0xdf, 0xbd, 0x44, 0xb7, 0x0a, 0x35, 0xb3, 0x5e, 0x9c, 0x7f, 0x4a, 0xc5, 0x5e, 0xe5, 0xe2, 0xcb, 0x06, 0x8b, 0x75, 0x86, 0x39, 0xb2, 0xcd, 0x64, 0x3d, 0xbf, 0xa8, 0x2e, 0x2d, 0x97, 0x20, 0xe4, 0x89, 0xf5, 0xc8, 0x21, 0xd8, 0xeb, 0xdc, 0x13, 0x68, 0xa9, 0xd3, 0x46, 0x8a, 0x37 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 9.12", + /* Message */ + 40, + { 0xee, 0xe1, 0xe4, 0x5d, 0x18, 0xb1, 0x47, 0xc2, 0x69, 0xa6, 0x0a, 0x9c, 0x64, 0x20, 0x18, 0xed, 0x6c, 0xd1, 0x15, 0x7c, 0xd0, 0xce, 0x2b, 0x29, 0x68, 0xdf, 0xa4, 0xb4, 0x97, 0xfc, 0x40, 0xb2, 0x24, 0xbd, 0x86, 0x1e, 0x25, 0x35, 0x12, 0x2b } +, + /* Seed */ + 86, + { 0x5c, 0x51, 0x3e, 0x51, 0x44, 0x52, 0xb1, 0x4a, 0xee, 0x33, 0xb6, 0x17, 0x60, 0xb8, 0x58, 0xc5, 0x35, 0x7c, 0x7d, 0x7f, 0x20, 0xe4, 0xa3, 0x7c, 0x7e, 0xef, 0xe4, 0x19, 0xca, 0xe3, 0xfd, 0x16, 0xf9, 0xd8, 0x3e, 0x5e, 0xcd, 0xe1, 0x9e, 0xe6, 0x32, 0x85, 0xdd, 0xce, 0x66, 0x80, 0xee, 0x94, 0x64, 0xfe, 0x83, 0x75, 0x6e, 0x90, 0x31, 0xd6, 0x37, 0x9e, 0x6a, 0x6b, 0x38, 0x4c, 0xe2, 0x77, 0xbc, 0x64, 0x2c, 0xed, 0x83, 0xb2, 0x9c, 0xf7, 0x4b, 0x72, 0xce, 0xff, 0xf5, 0x30, 0x71, 0x04, 0xe1, 0x83, 0xde, 0x2c, 0xe6, 0xa1 } +, + /* Encryption */ + 129, + { 0x03, 0xa8, 0x64, 0x83, 0xcb, 0xb7, 0x2c, 0x15, 0xf5, 0xa6, 0x93, 0x2b, 0x01, 0x2f, 0x40, 0xc4, 0xb1, 0x73, 0x33, 0x3b, 0x26, 0x86, 0xf4, 0x98, 0x4b, 0xa6, 0x6e, 0x24, 0xc7, 0xcf, 0x44, 0x41, 0x23, 0xba, 0x2e, 0xa6, 0x66, 0xa1, 0x75, 0x5d, 0x09, 0x35, 0x7b, 0xee, 0xa4, 0x37, 0x9c, 0xe3, 0xcd, 0xb0, 0xa7, 0x7a, 0x6e, 0xe3, 0xb7, 0xca, 0x60, 0xdb, 0x68, 0x24, 0x17, 0xf7, 0x16, 0x3d, 0x7d, 0x3a, 0xc7, 0x35, 0x28, 0x11, 0xbb, 0x94, 0xc5, 0xb7, 0x71, 0xf3, 0xd3, 0xfd, 0xa7, 0x73, 0xe5, 0xce, 0xbc, 0x8b, 0xc6, 0x60, 0x11, 0x55, 0xb3, 0xf4, 0xe4, 0xb4, 0xca, 0x85, 0xd9, 0xba, 0xb8, 0xec, 0x25, 0x8c, 0xec, 0xff, 0x44, 0x33, 0xc9, 0x2e, 0x8f, 0x86, 0x3d, 0x96, 0xfc, 0xc7, 0x94, 0x29, 0x49, 0x8a, 0x9e, 0x17, 0x90, 0x33, 0x0b, 0xc4, 0x87, 0xc0, 0x10, 0xd7, 0x99, 0x24, 0x5d } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 9.13", + /* Message */ + 28, + { 0x55, 0x09, 0xa5, 0xc1, 0xac, 0x54, 0x89, 0xdc, 0xb7, 0x65, 0xf3, 0x7c, 0xeb, 0xbe, 0x7d, 0x81, 0xcf, 0x02, 0x76, 0xb1, 0xf2, 0xcf, 0xf9, 0x5d, 0x27, 0x4b, 0xbd, 0x04 } +, + /* Seed */ + 98, + { 0x76, 0xe8, 0x1a, 0x51, 0x37, 0x1f, 0xb5, 0x07, 0x41, 0x14, 0x1d, 0xcb, 0x31, 0xd5,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xc3, 0x8c, 0xb9, 0xed, 0x98, 0x34, 0x5c, 0xd3, 0x50, 0xc3, 0xdd, 0x45, 0x30, 0x9f, 0xc8, 0x1c, 0xb4, 0x62, 0x76, 0xe4, 0xad, 0x64, 0x7f, 0xa8, 0x4c, 0x14, 0x12, 0x5e, 0xfd, 0x67, 0xd8, 0xba } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 9.14", + /* Message */ + 58, + { 0x02, 0x53, 0x81, 0xa5, 0x5c, 0x8e, 0x48, 0x7d, 0x7f, 0x4f, 0xf7, 0xc3, 0x6c, 0xfb, 0x37, 0x50, 0x07, 0xd1, 0x9f, 0x93, 0x71, 0x13, 0x6e, 0x2b, 0x3d, 0xf4, 0x42, 0x5e, 0xee, 0xee, 0x5d, 0x79, 0xc3, 0x52, 0x61, 0xfb, 0xb4, 0xea, 0x68, 0xbd, 0x91, 0xe8, 0xed, 0xab, 0xa2, 0x32, 0x9e, 0x29, 0x31, 0x53, 0x06, 0xc7, 0xd7, 0x18, 0x33, 0x15, 0x5b, 0x88 } +, + /* Seed */ + 68, + { 0xaa, 0x31, 0x0f, 0x62, 0xda, 0x90, 0xda, 0x4a, 0x20, 0x28, 0xb3, 0x81, 0x39, 0x9c, 0xb7, 0xe0, 0xed, 0x3b, 0xb5, 0x10, 0x57, 0x5c, 0x9b, 0xd0, 0xf6, 0x38, 0x21, 0x5b, 0xaf, 0x78, 0x08, 0xe3, 0x24, 0x5e, 0xaf, 0x38, 0xb7, 0x6e, 0x26, 0x52, 0x29, 0x0b, 0x7c, 0xc6, 0x20, 0x90, 0x7c, 0xda, 0x0c, 0xb7, 0xaf, 0x07, 0x3c, 0x12, 0x2f, 0xf8, 0x3d, 0xaa, 0xe1, 0x98, 0x6b, 0x43, 0xec, 0x1a, 0x14, 0x82, 0xdb, 0xa6 } +, + /* Encryption */ + 129, + { 0x04, 0x9b, 0xfa, 0xc6, 0x41, 0x0b, 0x77, 0x80, 0x39, 0x7a, 0x49, 0xfb, 0x88, 0x93, 0xb2, 0x4d, 0x90, 0x3b, 0x36, 0x00, 0xf3, 0x3c, 0x78, 0x2c, 0x14, 0x75, 0xb5, 0xd2, 0x4b, 0x4f, 0x4e, 0x88, 0xfd, 0x11, 0x24, 0xef, 0x06, 0x45, 0xf3, 0xd3, 0x91, 0xed, 0x31, 0x00, 0x6d, 0xd1, 0xb7, 0xc2, 0x64, 0x12, 0x8d, 0x0d, 0xb9, 0xaa, 0x0d, 0x65, 0xa0, 0x9f, 0xfb, 0xe2, 0x9a, 0x94, 0xcc, 0xa3, 0x58, 0xda, 0x64, 0xbd, 0x1b, 0x72, 0xff, 0x55, 0x88, 0x88, 0x08, 0x10, 0x5b, 0xe0, 0x91, 0xae, 0x23, 0xea, 0x3f, 0x34, 0x75, 0x05, 0x17, 0x9e, 0xcc, 0xb2, 0x41, 0x0d, 0x89, 0xde, 0xcb, 0x62, 0x33, 0x0f, 0x36, 0xc7, 0x44, 0x26, 0x2e, 0xb2, 0xb0, 0x78, 0xb4, 0x25, 0x4b, 0xcd, 0xce, 0xce, 0x21, 0x1c, 0xf0, 0x57, 0x4a, 0x24, 0x68, 0xe2, 0xa1, 0xe0, 0x18, 0xbc, 0x31, 0xf5, 0x02, 0x22, 0x35 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 9.15", + /* Message */ + 38, + { 0x07, 0x3c, 0x43, 0x67, 0xba, 0xfd, 0x48, 0x10, 0xd7, 0x70, 0x44, 0x60, 0xc7, 0x83, 0xd3, 0x50, 0xf7, 0xcc, 0xd0, 0x99, 0x47, 0x2f, 0x79, 0xf7, 0xfd, 0xf2, 0x3e, 0xf0, 0xcf, 0xaa, 0xcc, 0xab, 0x95, 0x71, 0xdf, 0x53, 0xfd, 0xe4 } +, + /* Seed */ + 88, + { 0xf9, 0x5a, 0x39, 0x96, 0xde, 0xf1, 0xca, 0xfc, 0x1a, 0x4a, 0x0b, 0x34, 0x14, 0x6b, 0x73, 0xde, 0x6b, 0x5a, 0x92, 0xcb, 0x81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 0x49, 0x20, 0x65, 0x50, 0x9c, 0x49, 0x21, 0x2d, 0x37, 0x0d, 0xea, 0x05, 0x22, 0xd7, 0x94 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 9.16", + /* Message */ + 42, + { 0xba, 0xb2, 0x0b, 0x9a, 0x6a, 0x53, 0x2e, 0x6f, 0x8a, 0xf0, 0x78, 0xb3, 0xa1, 0x85, 0xe0, 0xaa, 0x86, 0xe6, 0x16, 0x81, 0xbd, 0x1b, 0xd7, 0x75, 0x04, 0x4a, 0x2c, 0x95, 0x8d, 0x61, 0xed, 0xc2, 0x51, 0x60, 0x7c, 0xd9, 0xf3, 0x11, 0x48, 0xf5, 0xa9, 0x11 } +, + /* Seed */ + 84, + { 0x37, 0x6c, 0xf0, 0x18, 0x14, 0x3b, 0x0c, 0xe6, 0x70, 0x21, 0x68, 0x4c, 0xbb, 0x36, 0xe4, 0xaf, 0xe2, 0xff, 0x9d, 0xe1, 0x8b, 0xc7, 0xf0, 0x2b, 0xed, 0x86, 0x3b, 0xf1, 0xbc, 0x34, 0x66, 0x31, 0x9e, 0x72, 0x0f, 0xee, 0xf1, 0x9d, 0x38, 0xe2, 0x6b, 0xca, 0x7e, 0x99, 0xd4, 0x09, 0x6a, 0x9e, 0xed, 0x8d, 0xe5, 0xbf, 0x20, 0x3f, 0xc7, 0xdd, 0x9c, 0x84, 0x85, 0xdf, 0xa5, 0xb6, 0x90, 0x75, 0xef, 0x0c, 0xc0, 0x37, 0xfc, 0xdf, 0xb5, 0x5a, 0x0c, 0x92, 0x8c, 0xda, 0xc0, 0xcb, 0xa0, 0x49, 0x7e, 0xb6, 0x0e, 0x3f } +, + /* Encryption */ + 129, + { 0x04, 0x8d, 0xd7, 0x50, 0x99, 0x18, 0x43, 0x0e, 0xda, 0xbc, 0x01, 0x46, 0x8d, 0xb7, 0xe2, 0x87, 0xa7, 0x38, 0x1e, 0x42, 0x8b, 0x5f, 0xc9, 0x3c, 0xe8, 0xde, 0xfd, 0x7f, 0x49, 0xd5, 0xe9, 0x34, 0x15, 0x30, 0x43, 0xd1, 0x37, 0xac, 0xa9, 0xf7, 0xb9, 0x75, 0x77, 0xb7, 0x0d, 0xc0, 0x16, 0x80, 0xf2, 0xdb, 0xa9, 0x1e, 0x93, 0x2b, 0x53, 0xac, 0xf2, 0xa7, 0xf3, 0x34, 0x8f, 0x56, 0x54, 0xb2, 0xcf, 0xcf, 0xe7, 0x5d, 0x48, 0xf0, 0xfa, 0x45, 0x00, 0xd1, 0xba, 0x5d, 0x29, 0x24, 0x7f, 0xf1, 0x42, 0xd6, 0xb9, 0x80, 0xe1, 0x1b, 0x9d, 0xba, 0x68, 0x83, 0xf7, 0x3b, 0xb8, 0x55, 0xa2, 0x4c, 0xc4, 0xeb, 0x90, 0x68, 0x23, 0x6d, 0xaa, 0x0f, 0x2f, 0x93, 0x45, 0x8d, 0x72, 0x72, 0x6c, 0x2d, 0x8e, 0x31, 0x25, 0x9a, 0xcd, 0x3a, 0x7f, 0xde, 0xb6, 0xfe, 0xb5, 0xc6, 0xd2, 0xed, 0x17, 0x8d, 0xdb } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 9.17", + /* Message */ + 63, + { 0x19, 0xb1, 0xf4, 0xcd, 0x3d, 0xbd, 0xf0, 0x5b, 0x3d, 0x5f, 0x16, 0x80, 0x85, 0x6c, 0x5a, 0x74, 0x4f, 0x51, 0x62, 0xb5, 0x20, 0xbf, 0xcd, 0xfc, 0x98, 0x87, 0xdd, 0x92, 0xbe, 0x9d, 0x8c, 0xb6, 0x25, 0xc7, 0x25, 0xad, 0x75, 0xf4, 0xf2, 0xca, 0xa5, 0xef, 0x51, 0xfa, 0xca, 0x71, 0xb5, 0xe6, 0x6f, 0x84, 0xf2, 0xfc, 0x6f, 0x67, 0x8a, 0xce, 0x80, 0x9d, 0x76, 0xb8, 0x42, 0xea, 0xfe } +, + /* Seed */ + 63, + { 0x78, 0xa7, 0x18, 0x82, 0x85, 0x3d, 0x85, 0xaf, 0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0x3e, 0x3f, 0xe9 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 9.18", + /* Message */ + 32, + { 0x8c, 0xb7, 0x3b, 0xc4, 0x78, 0x50, 0xc1, 0x7f, 0xeb, 0xd3, 0x4f, 0xf4, 0xb7, 0x32, 0x3b, 0x50, 0x53, 0x03, 0x0b, 0x96, 0x22, 0x14, 0x03, 0xcd, 0xef, 0x45, 0xde, 0xc6, 0x5b, 0xa6, 0x0e, 0xa3 } +, + /* Seed */ + 94, + { 0xed, 0x64, 0x78, 0x61, 0x48, 0x81, 0xeb, 0xe3, 0xfd, 0xd6, 0xd9, 0xee, 0x05, 0xf2, 0x76, 0x5f, 0xc8, 0xa3, 0xea, 0xa5, 0x80, 0x31, 0x23, 0x5a, 0xf9, 0x6f, 0x86, 0xe7, 0xf2, 0xc8, 0x13, 0xec, 0x04, 0x80, 0x66, 0x1d, 0x1c, 0x2b, 0x4d, 0xef, 0x74, 0x2b, 0x2e, 0x41, 0x41, 0x9d, 0xf2, 0x88, 0x3e, 0xd5, 0x86, 0x79, 0xcb, 0x9a, 0xda, 0xe4, 0xde, 0xc4, 0xcf, 0x77, 0xf8, 0xbc, 0x29, 0x41, 0xd0, 0x33, 0xf8, 0x87, 0x7a, 0x90, 0x6d, 0xdc, 0x88, 0xd6, 0xdd, 0x3c, 0x53, 0x96, 0xad, 0xaa, 0xc0, 0x3e, 0xb2, 0xa7, 0x09, 0x4c, 0x0f, 0xdf, 0x0a, 0x44, 0xa6, 0xb9, 0x23, 0xab } +, + /* Encryption */ + 129, + { 0x03, 0x97, 0x8d, 0x4e, 0xff, 0xc6, 0xd6, 0x2f, 0x23, 0x2b, 0xf4, 0x6b, 0x42, 0x90, 0xc5, 0x01, 0x1d, 0x73, 0x28, 0x0a, 0xb0, 0xe8, 0x0a, 0xb9, 0xd6, 0x05, 0x0a, 0x85, 0x2a, 0x66, 0x79, 0xe0, 0x17, 0xe1, 0x70, 0xd9, 0xe7, 0x15, 0x6c, 0x8d, 0xcb, 0xd4, 0x6c, 0xde, 0xda, 0x70, 0xff, 0x9a, 0x55, 0x16, 0x8b, 0x9f, 0xdc, 0x03, 0x65, 0xb8, 0xaa, 0xbb, 0x90, 0x9a, 0xad, 0x40, 0xd5, 0x95, 0xc9, 0x0b, 0x9f, 0x00, 0xc1, 0xe0, 0x0a, 0xd6, 0xf0, 0x1d, 0x54, 0x43, 0x07, 0xb2, 0x54, 0xea, 0xf4, 0x25, 0x5d, 0xe6, 0x2b, 0xfd, 0x8a, 0x5f, 0x7e, 0x79, 0xdc, 0xfc, 0x74, 0x45, 0xce, 0xc6, 0x3d, 0xf0, 0xc2, 0xbd, 0x0a, 0xd9, 0x6c, 0xb7, 0x02, 0x42, 0xb3, 0x0b, 0x32, 0x42, 0x07, 0x88, 0x16, 0xb5, 0x8b, 0x0a, 0x9f, 0xfa, 0x16, 0xf1, 0xd8, 0x63, 0x15, 0xf8, 0xa1, 0xcb, 0x2f, 0x8f, 0x6b } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 9.19", + /* Message */ + 56, + { 0x8e, 0xa5, 0x56, 0x43, 0xdf, 0xe7, 0xcb, 0xe0, 0x75, 0xc1, 0x7b, 0x93, 0xc6, 0xba, 0x6b, 0x5a, 0x74, 0xea, 0x8d, 0x1a, 0xba, 0xb9, 0xc7, 0x28, 0xae, 0x5b, 0x00, 0x86, 0x6c, 0x62, 0x88, 0x0d, 0x3c, 0x00, 0x05, 0x20, 0x37, 0xcf, 0x80, 0x2d, 0x2c, 0xf2, 0xa8, 0xe1, 0xbe, 0xa5, 0x8c, 0x7b, 0xa6, 0x04, 0x77, 0x4d, 0x4f, 0x80, 0xbc, 0x04 } +, + /* Seed */ + 70, + { 0xaf, 0x9d, 0x9d, 0x31, 0x2e, 0x22, 0x57, 0x0f, 0xbc, 0x4b, 0xc8, 0x5a, 0x44, 0x5e, 0xd8, 0xd8, 0x99, 0x66, 0x0e, 0xd2, 0x4c, 0xf0, 0x30, 0x15, 0x33, 0x94, 0x6e, 0x5c, 0xb9, 0x47, 0x1a, 0x27, 0xc5, 0x10, 0xcd, 0x17, 0x55, 0x91, 0xd2, 0x3d, 0x36, 0x3d, 0xc4, 0xe3, 0xe6, 0x9c, 0x7b, 0xb4, 0x65, 0x51, 0x7a, 0x4c, 0xd1, 0xd1, 0xce, 0x41, 0x3e, 0x10, 0x16, 0xae, 0xaf, 0xd5, 0x5d, 0x2c, 0xb9, 0xde, 0xbc, 0xfe, 0x4b, 0x1d } +, + /* Encryption */ + 129, + { 0x05, 0x87, 0x11, 0x19, 0x16, 0xbb, 0x42, 0xf8, 0x47, 0x57, 0x69, 0x1e, 0xfe, 0xde, 0x7e, 0xb7, 0x79, 0x6a, 0x5c, 0xf8, 0x87, 0xc3, 0x7c, 0xa9, 0xf6, 0x1b, 0x45, 0x1f, 0xb1, 0xba, 0xde, 0x38, 0x9c, 0xfc, 0x5f, 0xdc, 0x21, 0x98, 0x41, 0xbb, 0x41, 0xda, 0x82, 0x74, 0x52, 0x72, 0x5f, 0xc8, 0x2b, 0x4d, 0x1a, 0xde, 0x56, 0x9c, 0xee, 0xc8, 0x05, 0x79, 0xed, 0xb1, 0xb4, 0xb1, 0x5b, 0x46, 0xad, 0x7d, 0x45, 0xb2, 0x45, 0x98, 0x80, 0x23, 0xea, 0x0d, 0xfc, 0xb3, 0x74, 0x4a, 0x69, 0x2e, 0xb9, 0xac, 0xa8, 0x5f, 0x21, 0x10, 0x10, 0xaf, 0xb1, 0xe9, 0x89, 0x4f, 0x85, 0x4a, 0x5e, 0x34, 0xfe, 0x89, 0xaa, 0x05, 0x19, 0x68, 0xa3, 0xb2, 0x36, 0x2c, 0x15, 0x0c, 0x6d, 0x97, 0x0e, 0xdd, 0x82, 0xb9, 0xe2, 0xd1, 0x3b, 0x38, 0xc3, 0xc2, 0x95, 0x6d, 0x91, 0x50, 0x08, 0x86, 0x41, 0xd5, 0x30 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 9.20", + /* Message */ + 4, + { 0x52, 0x5c, 0xff, 0xa3 } +, + /* Seed */ + 122, + { 0x0c, 0x99, 0x30, 0x4c, 0xc6, 0x26, 0x3d, 0x1e, 0xe2, 0x44, 0x6e, 0x24, 0x8c, 0x27, 0x11, 0x2c, 0x8f, 0x96, 0xda, 0x82, 0x51, 0x5f, 0x06, 0xf8, 0x12, 0x39, 0x8a, 0x88, 0x81, 0x1f, 0x39, 0xfb, 0x05, 0x62, 0x05, 0xc4, 0x4d, 0x6b, 0xd4, 0x85, 0x5a, 0x62, 0xc2, 0x1c, 0x60, 0x1b, 0x88, 0xf8, 0x02, 0x34, 0xe2, 0x32, 0x41, 0xf7, 0x16, 0x32, 0x2d, 0x80, 0x54, 0xa8, 0x4a, 0x1f, 0xc3, 0xc8, 0x46, 0xde, 0xfb, 0x61, 0x76, 0x7c, 0xc4, 0xd8, 0x16, 0xfa, 0x7b, 0x37, 0x47, 0xf8, 0x72, 0x9b, 0xf3, 0x37, 0x2a, 0xc2, 0xc2, 0x29, 0xd0, 0x52, 0xf4, 0x5b, 0xc4, 0x2f, 0xc3, 0x80, 0x50, 0xdc, 0xa3, 0xf2, 0x63, 0x2e, 0x60, 0x07, 0xb6, 0x08, 0x53, 0xb7, 0xe0, 0xcc, 0xb3, 0xda, 0xa4, 0x94, 0xe5, 0x53, 0x35, 0xfd, 0x04, 0xf1, 0x3d, 0x5f, 0xad, 0xa7 } +, + /* Encryption */ + 129, + { 0x06, 0x3e, 0x45, 0x08, 0xe5, 0x31, 0x2b, 0x5c, 0x38, 0x69, 0x4d, 0xe8, 0x2a, 0x71, 0xed, 0xa3, 0x12, 0xe9, 0xae, 0xd0, 0x5b, 0xc1, 0x43, 0xd3, 0x38, 0xf7, 0xf2, 0x28, 0x12, 0xd9, 0x3c, 0x28, 0x65, 0x12, 0x6a, 0x9b, 0x3a, 0x42, 0xc3, 0xca, 0x19, 0xed, 0xb3, 0x46, 0x01, 0xc0, 0xb2, 0x8a, 0x75, 0x66, 0x3b, 0x18, 0xf2, 0x39, 0xf5, 0xad, 0xca, 0xa4, 0xe9, 0xfa, 0x9f, 0x61, 0x18, 0x04, 0x72, 0x6f, 0xa1, 0x29, 0x62, 0xbb, 0xa3, 0x23, 0x0c, 0xb8, 0x86, 0xd6, 0x67, 0x82, 0xa4, 0x7e, 0xa9, 0x50, 0x2a, 0x83, 0x71, 0xe7, 0x57, 0x3b, 0xb6, 0xb0, 0x26, 0x6c, 0x33, 0x64, 0x6b, 0xdf, 0x53, 0xf8, 0xde, 0x36, 0x8e, 0xf2, 0x05, 0xb1, 0x1a, 0x85, 0xba, 0xf2, 0x1d, 0xaf, 0x3c, 0xe7, 0xa2, 0x59, 0x9f, 0x00, 0x8b, 0x99, 0x45, 0xee, 0xb1, 0x86, 0xec, 0x19, 0x2c, 0x54, 0x0a, 0xc2, 0x3c } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 10: A 1028-bit RSA key pair", +{ + /* Modulus */ + 129, + { 0x0b, 0x52, 0xcb, 0x6b, 0x5c, 0x3b, 0x9e, 0xc5, 0xaa, 0xad, 0x89, 0x4e, 0x51, 0x77, 0xf7, 0xf4, 0x5b, 0x8d, 0x33, 0xdc, 0xbb, 0xe9, 0x6a, 0x5b, 0x26, 0xf3, 0x00, 0x72, 0xbf, 0x15, 0x73, 0xa6, 0xc4, 0x1f, 0xb0, 0xa9, 0x7a, 0xe1, 0xe5, 0x2e, 0xd8, 0xc2, 0x5c, 0x62, 0xb9, 0x8b, 0xf5, 0x9d, 0xe7, 0xb6, 0x8a, 0xb9, 0x8c, 0x2d, 0x8b, 0x93, 0xc4, 0x94, 0x27, 0x23, 0xcc, 0x4b, 0xae, 0xd2, 0xb3, 0x93, 0xc0, 0x7b, 0x2b, 0x11, 0x90, 0x9c, 0x73, 0x2d, 0xf7, 0xc1, 0xdc, 0xbb, 0x43, 0x3a, 0x83, 0x9d, 0x46, 0xf4, 0x28, 0xe9, 0xdd, 0xc8, 0xd3, 0x5f, 0xd3, 0x3e, 0xed, 0x29, 0x81, 0x80, 0xf7, 0x5f, 0x2d, 0x5c, 0x9f, 0xe8, 0x53, 0x4f, 0x03, 0x47, 0xf8, 0x68, 0x5c, 0x28, 0xc4, 0x37, 0xea, 0x5b, 0x81, 0x1a, 0x28, 0x6e, 0x81, 0x0c, 0x69, 0x7a, 0x88, 0xcd, 0x7e, 0x45, 0x36, 0x4c, 0x1f } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 128, + { 0x45, 0xcc, 0x14, 0x17, 0xb2, 0x6f, 0xce, 0x3e, 0x9f, 0xd3, 0x10, 0x89, 0xb1, 0xa3, 0xcc, 0xc4, 0x6f, 0x8f, 0xf2, 0x1e, 0xac, 0x2e, 0x1d, 0x67, 0xc0, 0xae, 0x20, 0x15, 0x2d, 0xc5, 0x0d, 0x1c, 0xe7, 0xce, 0x6f, 0x26, 0x40, 0x4e, 0x2e, 0x64, 0x95, 0xb9, 0x77, 0xbf, 0x13, 0xf9, 0xa4, 0x05, 0xb2, 0x45, 0x80, 0xd6, 0x39, 0x3a, 0x85, 0x22, 0x54, 0x96, 0xe4, 0xab, 0xc4, 0x9e, 0xbe, 0xff, 0xde, 0x70, 0xcf, 0x26, 0x76, 0x68, 0x66, 0xf2, 0x76, 0xe1, 0x5b, 0x49, 0x2a, 0xf8, 0x03, 0x3f, 0x1b, 0xac, 0x7f, 0x66, 0xb7, 0x1a, 0x3b, 0xaf, 0x57, 0x1f, 0xfc, 0xcc, 0x03, 0x8a, 0x48, 0x86, 0x93, 0x94, 0xcc, 0xa3, 0xfa, 0x00, 0x49, 0x85, 0xb4, 0x34, 0xa5, 0x15, 0x17, 0x87, 0x7e, 0xae, 0x97, 0xa3, 0x84, 0x94, 0x7f, 0x01, 0xa7, 0x2c, 0xf4, 0xb2, 0x01, 0x93, 0xdd, 0x27, 0x64, 0x81 } +, + /* Prime 1 */ + 65, + { 0x03, 0x5f, 0xed, 0xee, 0x7e, 0x64, 0xfd, 0x68, 0x65, 0x79, 0x31, 0xa9, 0xdf, 0x9d, 0x55, 0x62, 0x28, 0xdf, 0xc6, 0x33, 0xa7, 0x50, 0x02, 0x76, 0x8f, 0x65, 0xd7, 0x15, 0xf0, 0x44, 0xf2, 0x3b, 0x3f, 0xe7, 0x88, 0xbb, 0x17, 0x86, 0x4d, 0x61, 0xdf, 0x57, 0x9e, 0x68, 0xdf, 0x80, 0xde, 0xa3, 0xa6, 0x31, 0x90, 0x62, 0x9d, 0xac, 0x7d, 0xe6, 0x29, 0xef, 0x9a, 0xb8, 0xf4, 0xdf, 0x0b, 0x27, 0x7f } +, + /* Prime 2 */ + 65, + { 0x03, 0x5a, 0xf8, 0xe6, 0xfe, 0x2f, 0x84, 0x61, 0xfc, 0x89, 0xa6, 0x45, 0x00, 0xf8, 0x19, 0x9c, 0xcb, 0xd3, 0xf4, 0x69, 0x07, 0x85, 0x96, 0x15, 0x56, 0x03, 0xd3, 0xf0, 0x88, 0x08, 0x33, 0xc3, 0x77, 0xdb, 0x07, 0x8e, 0x43, 0x7e, 0x35, 0x60, 0x00, 0x4a, 0xd1, 0xd6, 0xf8, 0xd3, 0x47, 0x88, 0x3f, 0x3e, 0xb0, 0x1d, 0x18, 0x9d, 0x52, 0xef, 0xf6, 0xe2, 0x60, 0xe5, 0x2f, 0xba, 0xa6, 0x2b, 0x61 } +, + /* Prime exponent 1 */ + 64, + { 0xb2, 0x43, 0xb3, 0x49, 0x8b, 0x67, 0x2a, 0xaa, 0x7d, 0x96, 0x7c, 0xd9, 0xf2, 0x6a, 0x12, 0xe6, 0x22, 0x3e, 0x90, 0x9b, 0xfe, 0x8b, 0x73, 0x91, 0x65, 0x4f, 0x3b, 0x6c, 0xa7, 0x9d, 0x60, 0x12, 0x70, 0xa1, 0x2b, 0x11, 0xd0, 0x99, 0x99, 0x0f, 0x6f, 0xd1, 0xf5, 0x0b, 0xe1, 0x58, 0x8f, 0x66, 0x14, 0xa6, 0x19, 0x63, 0x35, 0x9b, 0x88, 0xe9, 0xb0, 0x52, 0x39, 0xc5, 0xf5, 0x5c, 0x24, 0xdb } +, + /* Prime exponent 2 */ + 65, + { 0x01, 0x35, 0x25, 0xad, 0xe5, 0x3f, 0xee, 0xd2, 0x61, 0x54, 0x9d, 0x3d, 0xea, 0x8a, 0x60, 0x95, 0x79, 0x1a, 0x90, 0xb5, 0x98, 0x5a, 0x70, 0xd8, 0xbe, 0xfb, 0x63, 0xb5, 0x07, 0x10, 0x84, 0xa8, 0xce, 0x23, 0x4b, 0x85, 0xdd, 0x2e, 0xb8, 0x41, 0x13, 0xf9, 0xd9, 0xaa, 0x18, 0x25, 0xda, 0x71, 0xe3, 0xe9, 0x48, 0xf3, 0x3f, 0xdf, 0xa7, 0x70, 0xec, 0x17, 0x2f, 0xae, 0x6c, 0xce, 0x2d, 0x6e, 0x21 } +, + /* Coefficient */ + 64, + { 0x1c, 0x52, 0x92, 0x93, 0x3c, 0x58, 0xd0, 0x22, 0x59, 0x2f, 0xc0, 0x03, 0x38, 0xbf, 0x22, 0xed, 0xfc, 0xba, 0x33, 0x16, 0x16, 0xb7, 0x9f, 0x8d, 0x2e, 0xfd, 0x1f, 0xa2, 0x4c, 0x64, 0xf5, 0xdc, 0xfa, 0xd9, 0xaa, 0x52, 0xba, 0xa4, 0x6e, 0x86, 0x59, 0xdd, 0xa9, 0xea, 0xb3, 0xa7, 0x86, 0x3e, 0x61, 0x37, 0x4a, 0xc0, 0xda, 0xe0, 0x18, 0x5f, 0xb5, 0x8e, 0xcb, 0x0b, 0x74, 0x65, 0xee, 0x07 } + +} +, +{{ + "PKCS#1 v1.5 Encryption Example 10.1", + /* Message */ + 46, + { 0x59, 0x22, 0xd0, 0x9f, 0xdf, 0x65, 0x22, 0x80, 0x2f, 0xbc, 0xf7, 0xa2, 0x8e, 0xc3, 0xd9, 0xfa, 0xdf, 0x60, 0x72, 0x03, 0xa3, 0x1b, 0xd0, 0xda, 0x96, 0x3a, 0xa0, 0x31, 0x5f, 0x35, 0xe1, 0xa0, 0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0xc3, 0xb1, 0x1a, 0x0d, 0x38, 0xdb, 0xcc, 0x7b, 0xb7, 0xef, 0x9a, 0x72, 0x29, 0x6b, 0x6c, 0x13, 0xdc, 0x42, 0xd7, 0xec, 0x17, 0xf8, 0x51, 0xa5, 0x16, 0x12, 0xc7, 0x49, 0x4c, 0x63, 0x68, 0xa7, 0xfb, 0xec, 0x93, 0xd2, 0x2e, 0x8f, 0x9b, 0x72, 0xbd, 0xc0, 0x44, 0x9f, 0xb4, 0x30 } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Encryption Example 10.2", + /* Message */ + 62, + { 0x5f, 0xba, 0xd4, 0x3a, 0x91, 0x0a, 0x29, 0x0e, 0x50, 0x55, 0xd5, 0x14, 0xe7, 0x1c, 0x8e, 0xab, 0xf1, 0xf9, 0x33, 0x20, 0xeb, 0xd0, 0xda, 0x8f, 0x90, 0xd1, 0x46, 0xa8, 0xf3, 0xdd, 0x5c, 0x1a, 0x2c, 0x72, 0x0b, 0x93, 0x21, 0x1e, 0x48, 0x29, 0x34, 0x14, 0x9f, 0x1d, 0x21, 0xb9, 0x78, 0xf4, 0x8a, 0x0b, 0xb8, 0xe4, 0xcc, 0xa3, 0xf5, 0xd4, 0x5d, 0x3f, 0x3e, 0x3b, 0xa8, 0xe1 } +, + /* Seed */ + 64, + { 0x21, 0x04, 0x52, 0x61, 0x80, 0x4b, 0xf7, 0x54, 0xbc, 0xb8, 0xbf, 0x34, 0x98, 0xb1, 0xad, 0x10, 0xaf, 0xf3, 0x3d, 0xa1, 0xf2, 0x25, 0xed, 0xa5, 0x64, 0x65, 0x90, 0x45, 0x8b, 0x20, 0x70, 0x9f, 0xc8, 0xd0, 0xb4, 0x98, 0x90, 0x7a, 0x83, 0x64, 0xce, 0x1c, 0x43, 0x6b, 0x6b, 0x1e, 0x73, 0x18, 0x1c, 0x86, 0xc6, 0x77, 0xaf, 0x45, 0xc1, 0x7f, 0x9e, 0x4a, 0xf3, 0x75, 0x9c, 0xad, 0x24, 0x87 } +, + /* Encryption */ + 129, + { 0x02, 0x9f, 0x64, 0xac, 0x33, 0x01, 0x34, 0x00, 0x7f, 0x77, 0xf7, 0x2c, 0x37, 0xf4, 0x17, 0x7c, 0x24, 0xd6, 0x60, 0xbe, 0x4e, 0xba, 0xc1, 0x86, 0x8a, 0xd1, 0x1f, 0x9e, 0x30, 0x51, 0xb8, 0xcd, 0x77, 0xc4, 0x69, 0x11, 0x99, 0xac, 0x49, 0x19, 0xdb, 0x2e, 0xd3, 0x63, 0x74, 0x0d, 0x2d, 0xde, 0x32, 0x91, 0xf1, 0x0d, 0x92, 0x68, 0xe7, 0xc7, 0xde, 0x37, 0xea, 0x42, 0x1e, 0xbb, 0x1f, 0xad, 0x65, 0x29, 0xf2, 0x92, 0x19, 0x2a, 0x96, 0x80, 0xba, 0x96, 0x3e, 0xda, 0x93, 0x74, 0x03, 0x7a, 0xb9, 0x52, 0x9a, 0x48, 0x6f, 0x35, 0xcb, 0xd2, 0x9e, 0x09, 0xea, 0x98, 0xa5, 0x04, 0x5d, 0x9e, 0x16, 0xbb, 0x87, 0x70, 0x15, 0x5d, 0x70, 0xaf, 0xd2, 0x17, 0xa1, 0x46, 0x86, 0x27, 0x49, 0xec, 0x1a, 0xd1, 0x59, 0xcf, 0x6e, 0x6a, 0x63, 0xdf, 0x14, 0x2b, 0x82, 0x46, 0xd8, 0x44, 0xa7, 0x37, 0x2d } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 10.3", + /* Message */ + 62, + { 0x22, 0xbb, 0xc6, 0x16, 0xec, 0x6e, 0xf3, 0x57, 0x31, 0x56, 0xb4, 0x17, 0x61, 0xac, 0x3b, 0xdb, 0x57, 0xbd, 0x9b, 0x70, 0x36, 0xed, 0xc9, 0xa6, 0x97, 0x88, 0x75, 0xe2, 0xa6, 0x14, 0xcd, 0xe3, 0xef, 0xed, 0xaf, 0xd3, 0x88, 0x9a, 0x5d, 0xbd, 0xcc, 0x5f, 0xad, 0x9e, 0x9b, 0xec, 0xf8, 0xa8, 0xbb, 0x80, 0x33, 0xff, 0x91, 0xdf, 0xed, 0x60, 0x4b, 0xf8, 0xc6, 0xe9, 0xbb, 0xc7 } +, + /* Seed */ + 64, + { 0x3b, 0x47, 0xd2, 0xca, 0x95, 0x54, 0xb3, 0x4f, 0x94, 0x29, 0x57, 0x8d, 0x4f, 0xde, 0xc5, 0xd9, 0x6e, 0xca, 0x89, 0xb6, 0x81, 0x72, 0xd1, 0xdb, 0x13, 0x56, 0xb3, 0xda, 0x7a, 0x69, 0xf1, 0x58, 0x4d, 0x4c, 0x84, 0x6b, 0x18, 0x43, 0x2f, 0x02, 0xf2, 0x59, 0xca, 0xdc, 0x24, 0xe1, 0x54, 0xff, 0x15, 0xf8, 0x06, 0xf2, 0x53, 0x43, 0x50, 0x0e, 0x13, 0xb5, 0xbe, 0x43, 0xc7, 0xb5, 0xae, 0x7e } +, + /* Encryption */ + 129, + { 0x00, 0xc4, 0xe6, 0xc1, 0x0c, 0x25, 0x5e, 0x4b, 0xeb, 0x2b, 0x31, 0xc1, 0x65, 0x68, 0x46, 0xb9, 0x7c, 0xa2, 0x3a, 0x3b, 0xa3, 0x2a, 0xb1, 0x9c, 0x64, 0x85, 0x20, 0x11, 0x3d, 0x70, 0x34, 0xdf, 0xa4, 0x6b, 0x0c, 0xd2, 0x3d, 0x73, 0x99, 0xa9, 0x3c, 0xb0, 0x2f, 0x1e, 0xba, 0x94, 0x83, 0x18, 0xe3, 0x79, 0x1c, 0x30, 0x6a, 0x2e, 0xb9, 0xc0, 0xc5, 0x6d, 0x8f, 0x7e, 0x83, 0x25, 0x0f, 0x83, 0xad, 0x49, 0x2f, 0xad, 0xf7, 0x83, 0x17, 0x69, 0xf0, 0x2e, 0x18, 0x24, 0x34, 0x74, 0x45, 0xd0, 0x41, 0x9b, 0x98, 0xb8, 0xe7, 0x95, 0x45, 0x65, 0x32, 0x30, 0x0b, 0x92, 0xd6, 0xe4, 0x55, 0xb5, 0xa4, 0xeb, 0xa8, 0x53, 0xd6, 0xf7, 0x45, 0x92, 0x90, 0xab, 0x02, 0x31, 0x99, 0x48, 0x53, 0xa8, 0xc0, 0x7e, 0x54, 0xf5, 0x9c, 0x62, 0x45, 0x37, 0x08, 0x02, 0x89, 0xf9, 0x31, 0x43, 0xeb, 0xc6, 0x61 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 10.4", + /* Message */ + 50, + { 0x31, 0x6c, 0xc4, 0x45, 0x0a, 0x53, 0x70, 0x3c, 0x05, 0x8c, 0x90, 0x1f, 0x50, 0x7d, 0x7a, 0xd0, 0xcb, 0x63, 0x96, 0xc5, 0x51, 0xd4, 0xf0, 0x61, 0x82, 0xab, 0xd3, 0xa4, 0x3a, 0xac, 0xba, 0xbb, 0x31, 0x59, 0xc0, 0x26, 0xb3, 0xe7, 0xdb, 0xc1, 0x60, 0xf4, 0x19, 0x53, 0x31, 0x7e, 0x0f, 0x20, 0x80, 0x8c } +, + /* Seed */ + 76, + { 0xc1, 0xec, 0xb1, 0x16, 0x4b, 0x3e, 0x66, 0x23, 0xf0, 0xd9, 0xb9, 0xc5, 0xeb, 0xf9, 0x9e, 0x78, 0x8b, 0x7b, 0xd9, 0x4e, 0xb7, 0x43, 0x74, 0xf6, 0x1e, 0xd3, 0x14, 0x30, 0x4c, 0xaf, 0x46, 0xf8, 0x4a, 0x3f, 0xea, 0x1b, 0xa0, 0xe4, 0x7f, 0xc8, 0xbe, 0x41, 0x97, 0xd1, 0xd2, 0xcd, 0x41, 0x41, 0xcb, 0x9a, 0x61, 0x5d, 0x89, 0xc4, 0xbd, 0x91, 0x10, 0xca, 0x6a, 0xc9, 0xa5, 0x60, 0xf0, 0x76, 0xeb, 0xe6, 0x9b, 0x74, 0xa1, 0x0f, 0xe9, 0xcc, 0xdb, 0x76, 0xda, 0xbd } +, + /* Encryption */ + 129, + { 0x06, 0x16, 0xb8, 0xbc, 0x77, 0x2c, 0x55, 0x64, 0xd4, 0x51, 0xb1, 0x28, 0xd9, 0xb1, 0x36, 0x4c, 0x9e, 0x33, 0xb6, 0xe5, 0x58, 0xec, 0x67, 0xf2, 0x10, 0x5c, 0x98, 0x00, 0x11, 0x7d, 0x0b, 0x73, 0xcc, 0xab, 0x9d, 0xb5, 0x1d, 0x96, 0x7a, 0x9d, 0x66, 0x32, 0x2c, 0xbc, 0x5a, 0x01, 0x74, 0x6e, 0x47, 0x31, 0xdd, 0x7d, 0x04, 0xe6, 0x36, 0xe6, 0x4d, 0x35, 0xf2, 0xc8, 0x6c, 0xa3, 0x9d, 0x26, 0x14, 0x92, 0x17, 0x6b, 0x8d, 0xab, 0xdb, 0x13, 0x4b, 0xe9, 0x4b, 0xe5, 0x1b, 0x6c, 0x02, 0x3a, 0x0d, 0x55, 0xfc, 0xc1, 0xf0, 0x4c, 0x94, 0xc8, 0x6d, 0x47, 0x7d, 0xb4, 0x03, 0xb0, 0x4f, 0xb6, 0xc0, 0x28, 0x50, 0x57, 0x24, 0x79, 0x38, 0x40, 0xcb, 0xf4, 0x68, 0xaa, 0xaa, 0x91, 0xbc, 0x54, 0xe0, 0xd6, 0x47, 0x7c, 0xe6, 0x48, 0xce, 0xdd, 0x12, 0x76, 0xf2, 0xad, 0x2d, 0x4d, 0x42, 0x3b, 0x6c } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 10.5", + /* Message */ + 51, + { 0xd5, 0x4e, 0xa3, 0x7c, 0xbf, 0xbd, 0xb8, 0x18, 0x3b, 0x3b, 0x54, 0x7f, 0x6d, 0xf2, 0xd5, 0xd6, 0x3c, 0x41, 0x5b, 0x1c, 0x44, 0xed, 0x63, 0x93, 0xc6, 0x97, 0xb4, 0xd9, 0x3a, 0x97, 0xfa, 0x0d, 0x2f, 0x4d, 0x30, 0x0a, 0x68, 0xe9, 0x8f, 0x7f, 0xd0, 0x46, 0x07, 0x01, 0xd1, 0x57, 0x9d, 0x96, 0x83, 0x61, 0x2b } +, + /* Seed */ + 75, + { 0xd1, 0xce, 0xb0, 0xc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0xa0, 0x20, 0x9d, 0xd1, 0x6e, 0xf2, 0xd9, 0x05, 0x24, 0xdb, 0x87, 0x91, 0x7f, 0x34, 0x00, 0x6b, 0xe6, 0xb1, 0x5a, 0x13 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 10.6", + /* Message */ + 9, + { 0xf6, 0x4b, 0x25, 0x11, 0xcb, 0xe3, 0xcc, 0x65, 0x81 } +, + /* Seed */ + 117, + { 0xda, 0xca, 0x19, 0x63, 0xcb, 0x3d, 0xe5, 0x24, 0x57, 0x79, 0xe9, 0x64, 0x77, 0xff, 0xda, 0x27, 0x7f, 0x4b, 0x92, 0x3f, 0xa9, 0xa8, 0xd9, 0x38, 0x5d, 0x52, 0x31, 0x69, 0x23, 0x3f, 0x58, 0x79, 0xa3, 0xc9, 0xfc, 0x7a, 0x38, 0xe1, 0xb2, 0x08, 0xc3, 0x2d, 0xe4, 0x0b, 0xbe, 0x1d, 0xa0, 0x77, 0x47, 0x1e, 0x61, 0xc8, 0xb9, 0xb7, 0x09, 0x3c, 0x41, 0xb0, 0xa6, 0x5c, 0x99, 0x64, 0x32, 0xd6, 0x45, 0x52, 0x11, 0x84, 0xa6, 0x6a, 0xfc, 0xb9, 0x6f, 0x07, 0xa8, 0xf8, 0xee, 0xbb, 0x6e, 0xf8, 0x17, 0xe0, 0x27, 0xee, 0x2f, 0x37, 0x95, 0x45, 0x23, 0x9e, 0xf6, 0xf9, 0xc1, 0xd0, 0xd8, 0x60, 0xe8, 0x21, 0x44, 0xec, 0x71, 0x59, 0x7f, 0x24, 0x6a, 0x83, 0xcc, 0xf6, 0x60, 0xea, 0x4c, 0x70, 0xee, 0x1d, 0xf0, 0x14, 0xef } +, + /* Encryption */ + 129, + { 0x05, 0x08, 0xed, 0x84, 0x5c, 0x96, 0x23, 0x8e, 0x3a, 0x07, 0xe8, 0xec, 0x02, 0x7f, 0x7b, 0x09, 0x8a, 0x83, 0xf0, 0x3e, 0xac, 0x1f, 0xec, 0x42, 0x6f, 0x4d, 0x60, 0x05, 0xb6, 0x0d, 0x07, 0x35, 0xdb, 0x05, 0x37, 0x08, 0x2f, 0x23, 0xb7, 0x50, 0xf6, 0xdb, 0x54, 0x88, 0x21, 0x41, 0x81, 0xe1, 0x14, 0xcf, 0x1f, 0x72, 0x07, 0x41, 0x9c, 0xa2, 0x93, 0x75, 0x0a, 0xa7, 0x66, 0xfa, 0x7a, 0x5b, 0x9b, 0xe0, 0x0e, 0x37, 0x29, 0x2c, 0x23, 0x23, 0x1c, 0x6a, 0xb3, 0xbe, 0x2d, 0xed, 0xee, 0xd3, 0x21, 0xb0, 0xf9, 0xcd, 0x83, 0x2c, 0x5e, 0xdb, 0x41, 0x67, 0x7c, 0x1a, 0xb9, 0x83, 0xe7, 0xe3, 0xeb, 0xc8, 0xb5, 0x19, 0x93, 0x82, 0x1d, 0x76, 0xdf, 0x2a, 0xc2, 0x29, 0x8d, 0x8b, 0x80, 0xab, 0x17, 0xc3, 0x8b, 0x38, 0x53, 0xf1, 0x8f, 0xe3, 0x09, 0xcc, 0x7b, 0xf7, 0xc4, 0xa2, 0xc2, 0x7d, 0x63 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 10.7", + /* Message */ + 16, + { 0x85, 0x26, 0x49, 0x01, 0x52, 0x06, 0xe2, 0xa4, 0x09, 0x78, 0x76, 0xf8, 0xab, 0xb9, 0xb8, 0x46 } +, + /* Seed */ + 110, + { 0x03, 0x4f, 0xe3, 0x4e, 0x20, 0xe6, 0x06, 0xa8, 0xdc, 0x7c, 0xbc, 0xd0, 0xd6, 0xab, 0x3e, 0x07, 0x97, 0xc5, 0xdc, 0x4e, 0xd7, 0x86, 0x8e, 0xdc, 0x79, 0x59, 0x89, 0x3e, 0x58, 0x13, 0x7d, 0x26, 0x32, 0xb2, 0xc5, 0xa2, 0x9a, 0x81, 0x35, 0xc2, 0x4a, 0xf6, 0x99, 0xb5, 0x9d, 0x68, 0x10, 0x3a, 0x1f, 0x42, 0x33, 0x93, 0xe3,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xa5, 0x36, 0x05, 0x55, 0x2a, 0xb0, 0xa8 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 10.8", + /* Message */ + 58, + { 0xf4, 0xfb, 0x50, 0xbe, 0xab, 0xec, 0xba, 0x77, 0xe7, 0x1d, 0xd8, 0xd1, 0x6c, 0x97, 0x5a, 0x86, 0xf6, 0x19, 0xea, 0x7d, 0xbf, 0x41, 0x96, 0x9a, 0x24, 0xba, 0xe2, 0xb8, 0x42, 0xc2, 0x69, 0xe0, 0xb4, 0xd6, 0xa2, 0x9e, 0x82, 0x9d, 0xbe, 0x2e, 0x49, 0x79, 0x9c, 0x9e, 0xd9, 0x71, 0xa3, 0x03, 0x35, 0xe6, 0xed, 0x9b, 0xf3, 0x9d, 0x12, 0x4b, 0xe0, 0xf8 } +, + /* Seed */ + 68, + { 0x9d, 0xbd, 0x92, 0xda, 0xee, 0xb8, 0x2b, 0xde, 0x81, 0x6c, 0x59, 0x3f, 0x70, 0x6b, 0x15, 0x92, 0x56, 0x85, 0x22, 0xbc, 0xa0, 0x79, 0x7f, 0x9e, 0x81, 0x1d, 0xd9, 0xdc, 0x0e, 0x89, 0x6e, 0x98, 0x4a, 0x4a, 0x9a, 0xce, 0x77, 0xde, 0xf5, 0xa9, 0x25, 0x0d, 0xb7, 0x95, 0x81, 0xaf, 0x33, 0xfb, 0x6d, 0xe2, 0x42, 0x7d, 0x1a, 0xf6, 0xa5, 0xf6, 0x92, 0x9f, 0xa8, 0xb6, 0x7b, 0xad, 0x02, 0x3f, 0x04, 0xb3, 0xff, 0xd2 } +, + /* Encryption */ + 129, + { 0x02, 0x92, 0xed, 0xfb, 0xac, 0x38, 0xe2, 0x22, 0x45, 0x45, 0xaf, 0x82, 0x86, 0x23, 0x27, 0x63, 0xbc, 0xb1, 0x8b, 0xae, 0x13, 0x70, 0x97, 0x99, 0xe3, 0x50, 0x77, 0x58, 0xd0, 0x14, 0x1a, 0xc2, 0x97, 0x6f, 0x30, 0xb8, 0x54, 0x67, 0xd7, 0x83, 0xab, 0xf6, 0xfc, 0x71, 0xdf, 0x61, 0x9e, 0x1a, 0x59, 0xe6, 0x23, 0x4f, 0x27, 0xb6, 0x32, 0xfe, 0xaa, 0xbf, 0xd9, 0x85, 0x33, 0x77, 0x35, 0x4d, 0x93, 0x3e, 0xf4, 0xec, 0x59, 0x94, 0xc0, 0xd5, 0x0d, 0x95, 0x2e, 0x0e, 0xce, 0x0b, 0xe1, 0xbe, 0x4d, 0x38, 0xf1, 0x1f, 0x66, 0xe7, 0xc3, 0xda, 0x88, 0xc8, 0x3b, 0x4b, 0xed, 0xcc, 0x06, 0x2e, 0x09, 0xf9, 0xaf, 0x95, 0xea, 0xca, 0xc0, 0x09, 0x9c, 0x52, 0x5f, 0x24, 0x1e, 0xa7, 0xd5, 0x65, 0xe1, 0xb7, 0x68, 0xcb, 0x97, 0x08, 0xf3, 0xbc, 0xd5, 0x91, 0x77, 0xb6, 0x76, 0x6a, 0x37, 0x34, 0x88 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 10.9", + /* Message */ + 56, + { 0x76, 0x91, 0x3e, 0x84, 0x8f, 0xb7, 0xb9, 0xfa, 0xca, 0x91, 0xba, 0xf4, 0xf4, 0x42, 0x01, 0x06, 0xa9, 0x4d, 0x6c, 0xe2, 0x5d, 0x14, 0x97, 0xfc, 0x4e, 0x7f, 0x85, 0x96, 0x54, 0x79, 0x5d, 0x7f, 0x24, 0x39, 0x9f, 0x3a, 0x12, 0x08, 0xaf, 0x02, 0x8e, 0x61, 0x67, 0x8a, 0x6d, 0x19, 0xa1, 0x86, 0x40, 0xb4, 0xd5, 0x0f, 0x75, 0x55, 0x86, 0x00 } +, + /* Seed */ + 70, + { 0x9c, 0xee, 0xaa, 0x26, 0x09, 0xba, 0x90, 0xeb, 0x61, 0xe4, 0xf7, 0x49, 0xc4, 0xcd, 0xa0, 0x1a, 0xea, 0x23, 0x68, 0x81, 0x76, 0x2d, 0xfc, 0x15, 0x0d, 0x97, 0xc1, 0x1e, 0xb6, 0x44, 0x0c, 0xb0, 0x57, 0xe5, 0x3c, 0x3f, 0xd9, 0xb3, 0x9e, 0x56, 0x0a, 0x46, 0xe9, 0xd3, 0xfa, 0x3a, 0xf3, 0xfe, 0xe5, 0xee, 0x2d, 0x02, 0xfa, 0x42, 0x49, 0xaf, 0x99, 0x98, 0xf5, 0x3e, 0xd0, 0x4d, 0xb0, 0x10, 0xe9, 0x6d, 0x8a, 0x01, 0xff, 0x6b } +, + /* Encryption */ + 129, + { 0x01, 0x96, 0x30, 0x89, 0xc3, 0x43, 0xed, 0x88, 0xb5, 0x6d, 0x6a, 0xcf, 0xef, 0xbc, 0x65, 0x5a, 0x37, 0xcc, 0xfd, 0x96, 0x20, 0x3f, 0x21, 0x87, 0x64, 0x69, 0x5a, 0xd3, 0x10, 0xc0, 0xb2, 0x66, 0x65, 0xee, 0x74, 0x5e, 0xb0, 0x10, 0xfc, 0x83, 0xbe, 0x8c, 0x20, 0x64, 0x5c, 0x43, 0x47, 0xdc, 0xd9, 0x44, 0x65, 0x5d, 0x9f, 0xe6, 0xcd, 0x98, 0x77, 0xdc, 0x70, 0xe5, 0xc1, 0x88, 0xcf, 0xc9, 0xa6, 0x6e, 0x71, 0xda, 0x74, 0x5c, 0xd3, 0xe1, 0xa7, 0xb7, 0xf5, 0xa1, 0xb2, 0x5b, 0x4f, 0xc1, 0x47, 0x0a, 0xdf, 0xbf, 0x7d, 0x8e, 0x45, 0xfb, 0x10, 0x7c, 0x5a, 0xeb, 0x50, 0xea, 0x8b, 0x56, 0xe0, 0x4c, 0xa5, 0x5b, 0x9b, 0x65, 0x2a, 0xd8, 0x34, 0xd9, 0xc9, 0x65, 0x77, 0xb6, 0x42, 0xef, 0x33, 0xf1, 0x64, 0xd4, 0x93, 0x1f, 0xb8, 0x9e, 0x0c, 0x8c, 0x6b, 0xf9, 0x17, 0x08, 0xfd, 0xa6, 0xdb } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 10.10", + /* Message */ + 44, + { 0xc3, 0x39, 0xf8, 0x57, 0xe4, 0xd0, 0x23, 0x1f, 0xa3, 0x7c, 0x06, 0xf0, 0x95, 0x6b, 0x4d, 0x53, 0xa6, 0xc5, 0x8e, 0x06, 0x10, 0xd8, 0xda, 0x43, 0x17, 0xdc, 0x84, 0x11, 0xd3, 0xa0, 0xf8, 0x98, 0x49, 0xb9, 0x4e, 0x8d, 0x7c, 0xcd, 0xb0, 0xc7, 0xd5, 0x33, 0x0c, 0x25 } +, + /* Seed */ + 82, + { 0x24, 0x90, 0x81, 0x6a, 0xc9, 0x69, 0x76, 0xca, 0x72, 0x5e, 0xb4, 0x98, 0xe2, 0xff, 0x04, 0x0a, 0xfe, 0x3d, 0x64, 0x17, 0xd3, 0x2e, 0x4f, 0xfb, 0xd9, 0xfc, 0x9e, 0x3f, 0xa6, 0x8c, 0xe8, 0x49, 0xc8, 0x81, 0xbe, 0x37, 0x9f, 0x17, 0x50, 0x4b, 0x97, 0xe1, 0xe0, 0xd2, 0x2d, 0x32, 0xff, 0x8d, 0xfe, 0x76, 0xbb, 0x45, 0x49, 0xf7, 0x13, 0xb5, 0xb8, 0xd8, 0x70, 0xed, 0x36, 0x59, 0xdd, 0xd3, 0x98, 0x4b, 0x6f, 0xb3, 0x9f, 0x6e, 0xbd, 0xdc, 0x11, 0x77, 0xad, 0x69, 0x8d, 0x90, 0x44, 0x39, 0x68, 0xab } +, + /* Encryption */ + 129, + { 0x00, 0xb5, 0xfb, 0x7b, 0x1e, 0x9d, 0x71, 0xdf, 0x8b, 0x16, 0xc6, 0x3a, 0x1a, 0x49, 0x6e, 0x6f, 0x7b, 0xf7, 0x72, 0x86, 0x4c, 0xb4, 0x11, 0x55, 0x2b, 0x50, 0xe0, 0xb7, 0xf1, 0x5e, 0x45, 0x97, 0x16, 0xf5, 0x64, 0x62, 0x43, 0x68, 0x76, 0x33, 0xa9, 0x10, 0x6c, 0x34, 0x6c, 0x8c, 0x6b, 0x7c, 0xfa, 0xc7, 0x50, 0xb4, 0x56, 0x6b, 0x1b, 0x88, 0xaa, 0xc0, 0xac, 0xb9, 0x16, 0xc0, 0x7a, 0x78, 0x0b, 0xe0, 0x6d, 0xf7, 0x97, 0x5c, 0xcd, 0x8b, 0x72, 0x60, 0x78, 0x68, 0x7a, 0x8e, 0xa5, 0xd3, 0x90, 0x3e, 0x04, 0xab, 0x1d, 0x23, 0xdc, 0x9b, 0x1e, 0xd3, 0x60, 0x00, 0xc9, 0xbb, 0xc3, 0xdc, 0x81, 0x61, 0xe9, 0x48, 0x3a, 0x18, 0xab, 0xb8, 0x64, 0x1e, 0xbb, 0x1f, 0xdd, 0x02, 0x66, 0xc0, 0x84, 0xbf, 0x0b, 0xd0, 0x9c, 0xc9, 0x4e, 0xeb, 0xb9, 0x28, 0x3c, 0x5a, 0x5f, 0x74, 0xe3, 0x60, 0x13 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 10.11", + /* Message */ + 30, + { 0x47, 0x58, 0x65, 0xa5, 0x7b, 0xdb, 0x91, 0xad, 0xdf, 0x77, 0x7c, 0xc9, 0xd0, 0xa1, 0x7a, 0x71, 0xa9, 0xf9, 0x71, 0x0a, 0x93, 0x1b, 0xd0, 0xc3, 0x14, 0x9b, 0x23, 0x91, 0xa3, 0x53 } +, + /* Seed */ + 96, + { 0x56, 0x2f, 0x79, 0x70, 0x94, 0x6a, 0xc4, 0xcf, 0x05, 0xed, 0xfb, 0x26, 0x34, 0x16, 0x7e, 0x14, 0xd6, 0x65, 0x8d, 0x24, 0xcd, 0xae, 0xf7, 0x5b, 0x40, 0x7c, 0x90, 0x04, 0x81, 0x8e, 0xfa, 0x75, 0xd1, 0x64, 0x5e, 0x81, 0x52, 0xd1, 0xfc, 0x80, 0xd6, 0x99, 0xdf, 0xe9, 0x9a, 0x27, 0xa7, 0xdf, 0x99, 0x7a, 0x8a, 0x66, 0x47, 0x5a, 0xaf, 0xce, 0x41, 0x95, 0x98, 0xe2, 0xa1, 0x91, 0x99, 0xfc, 0x20, 0x53, 0xe3, 0xac, 0xdd, 0x07, 0xfe, 0xc8, 0xba, 0x61, 0xf2, 0xb0, 0x3e, 0xfc, 0x7d, 0xee, 0xd8, 0x15, 0xcd, 0xa8, 0x95, 0x2e, 0x21, 0xe3, 0xc0, 0xb9, 0xa9, 0x35, 0x2a, 0xb3, 0x6f, 0x5e } +, + /* Encryption */ + 129, + { 0x03, 0xe2, 0x68, 0xd7, 0xd1, 0x80, 0xd0, 0x3c, 0x7c, 0xbc, 0x85, 0x07, 0xed, 0x1f, 0x83, 0x0e, 0xd3, 0x7a, 0x79, 0x95, 0x71, 0x2d, 0x7d, 0x91, 0x57, 0x32, 0x24, 0x3d, 0xe6, 0x85, 0xd5, 0xbd, 0x99, 0xa1, 0x4a, 0x8e, 0x86, 0xa6, 0x7c, 0xdd, 0x60, 0xdc, 0xd9, 0x0c, 0x33, 0x92, 0x10, 0x83, 0x5a, 0x46, 0xce, 0xac, 0x19, 0x36, 0xab, 0x3a, 0xa9, 0xc3, 0x81, 0x88, 0x2d, 0x76, 0x94, 0xa8, 0x38, 0x3d, 0x68, 0x98, 0xe2, 0x73, 0x44, 0xbd, 0x15, 0x6f, 0xe9, 0x28, 0x2c, 0x71, 0x32, 0x26, 0x25, 0xd6, 0x8d, 0x30, 0x70, 0xef, 0xf0, 0x1a, 0xc8, 0xd5, 0x95, 0xf6, 0x48, 0x6d, 0x79, 0xb7, 0x88, 0xe3, 0x69, 0x12, 0xfd, 0x3c, 0xcf, 0x28, 0x4e, 0xdd, 0x5f, 0xce, 0xe2, 0x40, 0x9d, 0xca, 0x7d, 0x4f, 0x29, 0xcc, 0x18, 0x2a, 0x78, 0x47, 0x8b, 0xd3, 0xea, 0x23, 0x62, 0x11, 0x25, 0x10, 0xa5 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 10.12", + /* Message */ + 26, + { 0x9e, 0x1e, 0x53, 0xf9, 0x86, 0x59, 0x9d, 0xa8, 0x98, 0xd5, 0x6d, 0xc1, 0xc7, 0x55, 0x6f, 0xef, 0xca, 0xa3, 0x39, 0x5d, 0x84, 0x50, 0xd5, 0x2b, 0x3b, 0xa7 } +, + /* Seed */ + 100, + { 0x0b, 0x17, 0x63, 0xcc, 0x34, 0x0e, 0x6e, 0x39, 0x78, 0x62, 0x6a, 0x06, 0xd6, 0xef, 0xc4, 0x0d, 0xed, 0x73, 0xdb, 0x53, 0x5a, 0x82, 0x2e, 0xc0, 0x4c, 0x99, 0x24, 0xd9, 0xec, 0x40, 0xd3, 0x85, 0x20, 0x15, 0xd7, 0xe1, 0x02, 0x9c, 0x13, 0x93, 0xad, 0xcf, 0x01, 0x50, 0x30, 0x8a, 0xcb, 0x27, 0x3c, 0x36, 0x35, 0x68, 0x28, 0xa4, 0x77, 0xfc, 0xf9, 0xa2, 0x9a, 0xca, 0xb9, 0x09, 0x35, 0x70, 0x42, 0x50, 0x26, 0xda, 0xc1, 0x4d, 0xa6, 0xcd, 0x30, 0x4c, 0xda, 0xa5, 0x4c, 0x9a, 0x4c, 0x5a, 0x99, 0x4e, 0xd6, 0x8a, 0x5c, 0xea, 0xc7, 0xe0, 0x81, 0xde, 0xc4, 0x64, 0x6e, 0x23, 0x7e, 0x47, 0x1e, 0x52, 0x5e, 0xf8 } +, + /* Encryption */ + 129, + { 0x06, 0xd5, 0x19, 0xa7, 0x30, 0xea, 0x5f, 0x54, 0x9f, 0xe1, 0x9e, 0x30, 0x1b, 0xa5, 0x15, 0x2d, 0x10, 0x3a, 0x3e, 0xad, 0x3f, 0x89, 0xab, 0x35, 0x16, 0xff, 0x7b, 0x34, 0x4c, 0x4f, 0x72, 0xa1, 0xc2, 0x6a, 0xa9, 0x0d, 0x5a, 0x01, 0xa2, 0xa6, 0x51, 0x93, 0xd3, 0xcf, 0x63, 0x41, 0xe5, 0x9a, 0x31, 0xfd, 0x2d, 0x7d, 0xfe, 0x43, 0x5c, 0x09, 0x84, 0xd1, 0xbb, 0xe8, 0x11, 0x32, 0x01, 0x0f, 0x43, 0x58, 0xee, 0xbf, 0xe8, 0x3f, 0xaf, 0x24, 0x1e, 0x7f, 0x35, 0xaf, 0x98, 0xb7, 0xc7, 0xab, 0x91, 0xe4, 0xf0, 0xe8, 0xa3, 0x2a, 0x2f, 0x57, 0xf0, 0x7f, 0x49, 0xd5, 0xc2, 0x1f, 0x1e, 0x13, 0x80, 0xba, 0x0e, 0x17, 0x9a, 0x38, 0xd3, 0xa2, 0xca, 0x46, 0x4f, 0xc1, 0x4d, 0x2b, 0x74, 0xa0, 0x3a, 0x88, 0x84, 0xaa, 0x85, 0x7b, 0x66, 0x01, 0x47, 0x02, 0xb1, 0xbc, 0x4e, 0x7c, 0xc5, 0xe1, 0xeb } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 10.13", + /* Message */ + 25, + { 0x1a, 0xe3, 0x1e, 0x0c, 0xbe, 0x44, 0x97, 0xba, 0x43, 0xc5, 0xd1, 0x5f, 0x53, 0x5f, 0xe0, 0x18, 0x84, 0x1c, 0x73, 0x14, 0x57, 0x67, 0xa6, 0xa4, 0xc8 } +, + /* Seed */ + 101, + { 0x8f, 0xf0, 0xfa, 0xa7, 0xa2, 0xb4, 0xff, 0x55, 0x3c, 0xcb, 0xb2, 0x0f, 0xf3, 0x10, 0xac, 0x5e, 0x0e, 0xa9, 0x28, 0x18, 0x56, 0x2e, 0xc9, 0xa0, 0x60, 0x64, 0xf5, 0xde, 0x79, 0x86, 0xb4, 0xf6, 0xc9, 0xae, 0xa2, 0xb9, 0xf0, 0x11, 0x42, 0x38, 0xe5, 0xa4, 0x99, 0xa8, 0xae, 0x20, 0xea, 0xe4, 0x02, 0x1f, 0xcd, 0xd8, 0xf0, 0x60, 0xc9, 0x93, 0xa9, 0xbf, 0x64, 0x2d, 0xa0, 0x25, 0x67, 0x39, 0x33, 0x48, 0x08, 0xe3, 0x88, 0xe1, 0xda, 0x82, 0x37, 0x27, 0x8b, 0xf4, 0xf4, 0x7e, 0x05, 0x01, 0x5a, 0x8b, 0x88, 0xc5, 0x42, 0x0c, 0xeb, 0xc8, 0xbb, 0x37, 0xee, 0x43, 0x52, 0x83, 0x7a, 0xf7, 0x64, 0x70, 0x18, 0x41, 0x97 } +, + /* Encryption */ + 129, + { 0x04, 0xa2, 0x10, 0xf7, 0x6c, 0x0f, 0x84, 0x93, 0x99, 0x09, 0x53, 0x58, 0x98, 0x86, 0xf6, 0x2c, 0x1c, 0x48, 0x25, 0x01, 0x2a, 0xf4, 0x4b, 0xdc, 0xf2, 0xc9, 0x9b, 0x32, 0xa7, 0x0a, 0x17, 0xf7, 0x64, 0xa3, 0xa9, 0x7b, 0x2b, 0x04, 0x7e, 0x39, 0xd8, 0x0c, 0xde, 0x15, 0x4e, 0xbe, 0xd5, 0xd2, 0x81, 0x3e, 0xe8, 0x4a, 0xc9, 0xc8, 0xd6, 0xec, 0x6a, 0x96, 0xf4, 0x02, 0xdb, 0xb3, 0x26, 0xd5, 0xa6, 0xe9, 0xc0, 0xf7, 0x87, 0xc1, 0x5e, 0x98, 0x23, 0xc5, 0x08, 0xb3, 0x23, 0x5f, 0x3a, 0x00, 0x8d, 0xdd, 0xcd, 0xdb, 0x07, 0x9e, 0x80, 0xff, 0x50, 0xfe, 0x37, 0x25, 0x4a, 0x0c, 0xc4, 0x68, 0x29, 0x7e, 0xe3, 0x32, 0x53, 0xa7, 0x4c, 0x1e, 0x03, 0x70, 0x26, 0x05, 0x69, 0x58, 0xad, 0x07, 0x78, 0xe0, 0xaa, 0x12, 0x50, 0xdf, 0x1c, 0x14, 0x85, 0x7c, 0xb0, 0xd7, 0x1a, 0xa6, 0x93, 0x7e, 0x31 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 10.14", + /* Message */ + 17, + { 0xa6, 0xe3, 0xd1, 0x07, 0x03, 0x21, 0xd8, 0xff, 0x76, 0xb8, 0x5c, 0x70, 0x93, 0xfa, 0xa0, 0x42, 0x83 } +, + /* Seed */ + 109, + { 0xd1, 0x60, 0xb1, 0x2c, 0x76, 0x62, 0x2c, 0x3d, 0x34, 0xd8, 0x55, 0x87, 0xe6, 0xe8, 0x1c, 0xf0, 0x54, 0x61, 0x8a, 0x34, 0x6b, 0x67, 0x52, 0xd5, 0x36, 0x9a, 0x71, 0xc4, 0x92, 0x35, 0x7a, 0x13, 0x4b, 0x7f, 0x67, 0xf3, 0x34, 0xa4, 0xf3, 0xb3, 0x28, 0xba, 0xa9, 0xf0, 0x07, 0x18, 0x47, 0xd0, 0xda, 0xfd, 0xac, 0x22, 0x5d, 0x7b, 0x7f, 0x07, 0x16, 0x18, 0xea, 0x86, 0x81, 0xfc, 0xd2, 0xd2, 0x30, 0x5c, 0x2f, 0x64, 0x63, 0x1e, 0x62, 0x31, 0x85, 0xfc, 0x09, 0x96, 0xe6, 0x1c, 0x84, 0xf4, 0x18, 0x0c, 0x63, 0x7b, 0xf6, 0xea, 0x2d, 0x06, 0x03, 0x75, 0xf1, 0x6a, 0x65, 0xe5, 0xb1, 0xe2, 0xb8, 0x65, 0x28, 0x5d, 0xa3, 0xd8, 0xfb, 0x1b, 0x6a, 0x60, 0xea, 0x36, 0xe1 } +, + /* Encryption */ + 129, + { 0x0a, 0x70, 0x03, 0xb5, 0x86, 0x1a, 0x85, 0xa8, 0xf7, 0x2f, 0x19, 0x9d, 0xc6, 0x5c, 0x17, 0xfc, 0x58, 0xa9, 0x24, 0xbc, 0xc4, 0x08, 0x19, 0xe2, 0x8c, 0x95, 0x83, 0xe8, 0x21, 0x03, 0x8c, 0x00, 0x05, 0x36, 0x5e, 0x90, 0x9e, 0xee, 0x4f, 0x32, 0x66, 0xf5, 0x9a, 0x84, 0xe3, 0x25, 0xb1, 0xbe, 0xa9, 0xd2, 0x81, 0xb4, 0x82, 0x3f, 0x2f, 0xce, 0x44, 0x15, 0x3f, 0x03, 0x17, 0x0f, 0xad, 0xcb, 0x16, 0xa2, 0x79, 0xb2, 0xc9, 0x58, 0x7f, 0x6b, 0x79, 0xef, 0xfc, 0x55, 0xa3, 0xc4, 0x34, 0xe0, 0xbc, 0x5d, 0xaf, 0xe9, 0xd4, 0x03, 0x26, 0x48, 0xaa, 0xe7, 0xe4, 0xed, 0x1d, 0x7f, 0x14, 0x1b, 0xfe, 0x72, 0x26, 0x83, 0xfa, 0x32, 0xc8, 0x9d, 0xdd, 0x67, 0x3c, 0x3f, 0x0c, 0x03, 0xc8, 0x54, 0x59, 0x89, 0x0a, 0xb7, 0xfb, 0xc1, 0xd9, 0xa8, 0x14, 0xbf, 0xe9, 0xb0, 0xd1, 0x2a, 0xb1, 0x7f, 0x51 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 10.15", + /* Message */ + 40, + { 0xd0, 0xbc, 0x89, 0x03, 0x9b, 0xa1, 0x9e, 0xe5, 0x0a, 0x73, 0x82, 0x98, 0x4e, 0x42, 0x8a, 0xed, 0x88, 0x61, 0x4f, 0x78, 0x98, 0x13, 0x01, 0x89, 0x16, 0xe2, 0xe7, 0xeb, 0x0d, 0xb8, 0x3d, 0xa2, 0x8e, 0xc2, 0x3c, 0x04, 0xa0, 0xc2, 0xf7, 0x6a } +, + /* Seed */ + 86, + { 0xc6, 0x4d, 0x10, 0xa4, 0xb5, 0x2f, 0x49, 0x0a, 0xb6, 0x2a, 0x60, 0x38, 0xb3, 0x2b, 0x23, 0xc6, 0x3a, 0x1c, 0x85, 0x97, 0x0d, 0x93, 0x45, 0x14, 0x83, 0x94, 0xcd, 0x35, 0xcf, 0xd6, 0xf6, 0xb1, 0x59, 0x0f, 0xce, 0x8c, 0x67, 0x5b, 0xee, 0xf8, 0x7c, 0xd0, 0x34, 0x5e, 0x5c, 0xad, 0xe8, 0x95, 0x09, 0x45, 0x56, 0x54, 0x26, 0xb6, 0xb2, 0x83, 0x03, 0xb0, 0xb0, 0x39, 0x32, 0x98, 0xcd, 0xd9, 0x5c, 0x88, 0x1f, 0xa0, 0x65, 0x33, 0xca, 0x9d, 0x2d, 0x27, 0x14, 0xd0, 0xf1, 0x37, 0x85, 0xa6, 0x1b, 0x3a, 0x17, 0xa7, 0x81, 0x40 } +, + /* Encryption */ + 129, + { 0x00, 0x8b, 0x19, 0x75, 0x58, 0xca, 0x4c, 0xe5, 0x90, 0x14, 0x58, 0xab, 0xd8, 0xe8, 0xfd, 0x52, 0xd9, 0x89, 0x96, 0x0f, 0x01, 0xc2, 0x16, 0xef, 0xb5, 0x81, 0xf8, 0x61, 0x14, 0x8d, 0x1a, 0x2b, 0x44, 0xeb, 0x0b, 0x7c, 0x15, 0xdd, 0xc3, 0x45, 0xdc, 0x83, 0xf9, 0x03, 0x7d, 0xdb, 0x8f, 0xe2, 0xea, 0xa2, 0xcb, 0xed, 0x9b, 0x1c, 0x1e, 0xee, 0xae, 0xb8, 0x65, 0xbd, 0x29, 0xf4, 0x4e, 0xe1, 0x47, 0x8c, 0x95, 0xe9, 0xfb, 0xf4, 0x44, 0x82, 0x8e, 0xed, 0xcb, 0xc0, 0x17, 0x02, 0x00, 0xde, 0x35, 0x49, 0xb2, 0x2c, 0x11, 0xe4, 0xb4, 0x33, 0x79, 0x8b, 0x9d, 0x63, 0xbb, 0x49, 0xf0, 0xb0, 0x2d, 0xaf, 0x56, 0x58, 0xce, 0xed, 0xea, 0xa9, 0x3c, 0x0f, 0xae, 0xb9, 0x44, 0x65, 0x38, 0xba, 0x92, 0xeb, 0x17, 0xc8, 0x5d, 0xb5, 0xee, 0xa2, 0x04, 0xba, 0x2f, 0x49, 0xc3, 0xce, 0x65, 0xbf, 0x13 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 10.16", + /* Message */ + 43, + { 0xce, 0x0a, 0x4a, 0x59, 0x39, 0xf6, 0xaa, 0x26, 0x3b, 0xbf, 0x8e, 0x1e, 0x5e, 0x94, 0x31, 0x03, 0x56, 0xab, 0xa5, 0x75, 0x59, 0xc4, 0x1b, 0x39, 0x44, 0x27, 0x70, 0xb6, 0x1f, 0x6b, 0x3c, 0x9b, 0x5f, 0xe7, 0x27, 0xf3, 0x19, 0x52, 0x28, 0x08, 0xd5, 0x80, 0x19 } +, + /* Seed */ + 83, + { 0x27, 0xcc, 0xe2, 0xd4, 0x3c, 0x71, 0x31, 0x8e, 0xd4, 0xfc, 0x8c, 0x0b, 0xdb, 0x9b, 0x79, 0x13, 0x53, 0x19, 0x9f, 0x3d, 0x89, 0xfc, 0x12, 0xac, 0x47, 0xfd, 0xb6, 0xd8, 0x8b, 0x44, 0xc6, 0x54, 0x5e, 0x9e, 0xee, 0xd9, 0xf4, 0xc6, 0x85, 0x15, 0xd4, 0xf5, 0x30, 0xb8, 0x13, 0x7d, 0x77, 0x45, 0x71, 0x3b, 0xad, 0x0e, 0xbb, 0x70, 0x52, 0x23, 0x1f, 0x6b, 0x4c, 0xed, 0x18, 0x7a, 0xec, 0xd1, 0xe7, 0xa1, 0x69, 0xd8, 0x6c, 0xbd, 0x13, 0xd5, 0x0b, 0x78, 0xbe, 0x27, 0xc6, 0x54, 0x5d, 0x81, 0x92, 0xe0, 0xec } +, + /* Encryption */ + 129, + { 0x0a, 0xd3, 0xae, 0x7e, 0x5a, 0x98, 0x65, 0x2c, 0x1b, 0xf3, 0x45, 0xc4, 0x91, 0x90, 0x3f, 0x55, 0x17, 0xc6, 0x11, 0xac, 0x31, 0x00, 0x05, 0x87, 0x7f, 0xa9, 0x1a, 0xbc, 0xee, 0x64, 0x85, 0xf2, 0x77, 0x8a, 0xbf, 0x0a, 0x6c, 0x73, 0x87, 0x87, 0x37, 0x63, 0x9b, 0x26, 0x72, 0xfd, 0xd0, 0x0a, 0x39, 0x65, 0xd7, 0xd3, 0xd8, 0xd7, 0x68, 0x8e, 0x77, 0xb5, 0x45, 0x9e, 0x14, 0x5e, 0xce, 0x64, 0xa9, 0xa5, 0x2c, 0x37, 0x97, 0xf3, 0x61, 0x07, 0xc9, 0x36, 0x8b, 0xdf, 0x79, 0x90, 0xf3, 0xfb, 0x6c, 0x5c, 0xff, 0x59, 0xf4, 0xf8, 0xa3, 0xd4, 0x90, 0x93, 0xdf, 0xfe, 0x74, 0x06, 0xc9, 0x10, 0xaa, 0x57, 0x23, 0x22, 0x8d, 0xae, 0x5a, 0x9b, 0x29, 0xa4, 0xcc, 0x47, 0x69, 0xaf, 0x8b, 0xd5, 0xfd, 0x6e, 0xce, 0x88, 0x58, 0xa2, 0x9d, 0xb1, 0xb1, 0x9c, 0x08, 0x1b, 0xf0, 0xd6, 0xb0, 0xdc, 0x78 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 10.17", + /* Message */ + 40, + { 0x03, 0xbf, 0xb2, 0x59, 0xbd, 0x92, 0x46, 0xde, 0x3f, 0x71, 0xc3, 0x13, 0x9c, 0x72, 0x85, 0x74, 0xb4, 0x4d, 0x97, 0xad, 0x57, 0xbb, 0xdd, 0x67, 0x01, 0x94, 0x95, 0xc2, 0xa2, 0x00, 0x41, 0x39, 0x26, 0x34, 0xe3, 0x1a, 0xad, 0x63, 0xf6, 0x3b } +, + /* Seed */ + 86, + { 0x5f, 0xa4, 0xbb, 0xb7, 0x0e, 0x1f, 0x9e, 0xcb, 0x5e, 0xb2, 0x14, 0x7b, 0xf4, 0x59, 0xd1, 0xd0, 0x64, 0x43, 0xf0, 0x25, 0xc0, 0x8e, 0x36, 0x4c, 0xcc, 0x1b, 0x16, 0x0c, 0x16, 0x41, 0x6f, 0xb1, 0x74, 0xb4, 0x4b, 0x95, 0x36, 0x38, 0xa9, 0x68, 0x8c, 0x5e, 0xa2, 0xd0, 0x60, 0x17, 0x1f, 0x30, 0x54, 0xf3, 0xca, 0x3f, 0xe0, 0x13, 0xb9, 0xe3, 0x18, 0x8e, 0xe3, 0x9d, 0xa9, 0x1f, 0x80, 0x16, 0xd4, 0xb7, 0x33, 0x18, 0x79, 0x35, 0x1f, 0x32, 0x2a, 0xe5, 0x29, 0x86, 0x4d, 0x90, 0x74, 0x09, 0x8a, 0xa2, 0x51, 0x6b, 0x44, 0xca } +, + /* Encryption */ + 129, + { 0x01, 0x78, 0xe3, 0xa0, 0x17, 0xed, 0x2f, 0xc1, 0x18, 0xbb, 0x2e, 0x03, 0x28, 0xbe, 0xb2, 0x8a, 0x98, 0xc8, 0x53, 0xb9, 0xe5, 0xa5, 0xf8, 0x30, 0x80, 0xc0, 0xf1, 0x01, 0x7f, 0xdc, 0xa8, 0x37, 0x92, 0x07, 0x72, 0x2c, 0x25, 0x73, 0x7a, 0x89, 0x15, 0xe0, 0xeb, 0x72, 0xc5, 0x22, 0x85, 0xe8, 0x8f, 0x61, 0x30, 0xa1, 0xcf, 0x56, 0xad, 0x1d, 0x96, 0xca, 0x2c, 0xe4, 0xb7, 0x1e, 0xc3, 0x68, 0x94, 0x7b, 0xd0, 0x71, 0xf8, 0x36, 0x59, 0x10, 0xc7, 0x92, 0x57, 0x5b, 0x8c, 0xd6, 0xfd, 0x27, 0xe5, 0x23, 0xe8, 0x59, 0x65, 0xdd, 0xa9, 0x22, 0x82, 0xd5, 0xdf, 0xd1, 0xc0, 0x64, 0xea, 0xab, 0x6a, 0xbe, 0xac, 0x65, 0xe1, 0x6a, 0xe0, 0x4f, 0x0d, 0x40, 0xb3, 0xbb, 0x68, 0x41, 0x0b, 0x92, 0x74, 0xdf, 0xee, 0xa3, 0x2a, 0x43, 0xf9, 0x40, 0x83, 0xc1, 0x07, 0x80, 0x35, 0x3f, 0x43, 0xe4, 0x3c } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 10.18", + /* Message */ + 37, + { 0x16, 0x2c, 0xca, 0x9e, 0xd4, 0x70, 0x8d, 0xd1, 0x03, 0x40, 0xe1, 0x94, 0xc3, 0x5c, 0x0a, 0x5f, 0xa4, 0x9a, 0x5c, 0x3b, 0x5b, 0x24, 0x71, 0x71, 0x20, 0x3c, 0xa4, 0x8a, 0x79, 0xe5, 0x2d, 0xff, 0x40, 0xf2, 0xbc, 0xa9, 0x9a } +, + /* Seed */ + 89, + { 0x4d, 0x73, 0xff, 0xcd, 0xc2, 0x69, 0x43, 0xa8, 0x70, 0x78, 0x23, 0x47, 0x8d, 0xa3, 0x1a, 0xac, 0x01, 0x27, 0x4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0xd5, 0x47, 0x30, 0xfb, 0xc5, 0xca, 0xf1, 0x66, 0x82, 0xe9, 0xe4, 0x1b, 0x7e, 0x79, 0xd2, 0x02, 0x2f, 0x7c, 0xcf, 0x96 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 10.19", + /* Message */ + 58, + { 0x8e, 0x1b, 0x52, 0xcb, 0x4e, 0x00, 0x77, 0x27, 0xc4, 0xb5, 0xf6, 0x5d, 0x78, 0x47, 0xf3, 0x49, 0x16, 0x89, 0x1e, 0xf9, 0xc7, 0x3a, 0xd1, 0x8c, 0xf2, 0x71, 0xf8, 0x9f, 0x18, 0x2c, 0x69, 0x3e, 0x52, 0x89, 0xdc, 0x31, 0xda, 0xbc, 0x34, 0xcf, 0x7f, 0x44, 0xfb, 0xde, 0x57, 0x9e, 0x64, 0x51, 0x69, 0xec, 0xba, 0x6e, 0x4e, 0x87, 0x7f, 0x7d, 0xef, 0x44 } +, + /* Seed */ + 68, + { 0xba, 0x14, 0x74, 0x8e, 0x6d, 0xa7, 0xb6, 0xac, 0x18, 0x33, 0x32, 0x32, 0x95, 0xad, 0xb5, 0x42, 0x2d, 0xbd, 0x19, 0xe2, 0xec, 0x72, 0xdf, 0xd0, 0xaa, 0xfd, 0x7b, 0xd0, 0x7b, 0xfb, 0x97, 0xe7, 0xdb, 0x10, 0x8a, 0x3e, 0xaa, 0xdc, 0xff, 0x67, 0xb6, 0x7e, 0xc7, 0xe4, 0xc6, 0x70, 0x04, 0xc1, 0x78, 0x34, 0x6a, 0x12, 0x5d, 0xd3, 0xb6, 0xca, 0x55, 0x23, 0x70, 0x59, 0x4f, 0x7f, 0x42, 0xcb, 0x33, 0x4b, 0x44, 0x85 } +, + /* Encryption */ + 129, + { 0x09, 0x4b, 0x40, 0x30, 0xe3, 0x0c, 0x8b, 0x46, 0x2e, 0xca, 0x00, 0xf1, 0x6b, 0xb1, 0x70, 0x19, 0xd1, 0xea, 0x31, 0x25, 0xf1, 0xc6, 0x4c, 0x67, 0x1c, 0xb0, 0x0d, 0x46, 0xe3, 0xad, 0x87, 0x84, 0x28, 0x52, 0xb2, 0x01, 0x49, 0x6e, 0xe2, 0xb3, 0xd5, 0x42, 0x28, 0x93, 0xa8, 0x0c, 0x66, 0xa3, 0x0d, 0xa2, 0xc9, 0xf1, 0xa3, 0x2a, 0xd4, 0xd4, 0xe7, 0x73, 0x77, 0x43, 0xca, 0x1b, 0x78, 0xef, 0x7d, 0x4a, 0x63, 0xc5, 0xe1, 0xe0, 0xbe, 0x7e, 0x51, 0x88, 0xcc, 0xe9, 0x42, 0x95, 0x69, 0x74, 0xff, 0xd4, 0x81, 0xe6, 0x47, 0x83, 0x44, 0x23, 0x0c, 0x37, 0xda, 0x5b, 0x25, 0xf6, 0xb5, 0x99, 0xa5, 0x9a, 0x05, 0x80, 0xf1, 0xa0, 0x00, 0xc2, 0x59, 0x54, 0xf3, 0xa4, 0x63, 0xf2, 0x89, 0x5f, 0x32, 0xb0, 0x5c, 0xc0, 0x88, 0x21, 0xb1, 0xa0, 0x23, 0x60, 0x9f, 0x18, 0xca, 0x7d, 0x44, 0x9c, 0xb4 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 10.20", + /* Message */ + 12, + { 0x82, 0xff, 0x62, 0xaf, 0xfa, 0xd8, 0x00, 0x30, 0x94, 0xcc, 0x65, 0x35 } +, + /* Seed */ + 114, + { 0x1c, 0x7f, 0x21, 0xfd, 0x02, 0x09, 0x79, 0x07, 0x40, 0x5e, 0xaa, 0x77, 0xae, 0x72, 0x88, 0x65, 0x72, 0x1d, 0x93, 0x86, 0xf5, 0xaa, 0xbc, 0x2e, 0x0a, 0x95, 0xf3, 0xed, 0xb0, 0x5d, 0x46, 0xe2, 0x33, 0x79, 0x3b, 0xa1, 0xa3, 0x88, 0xe4, 0xb0, 0xdd, 0xa0, 0x0c, 0xc3, 0x2b, 0x94, 0x8a, 0xc2, 0x65, 0xae, 0x6a, 0x2b, 0xf2, 0xc3, 0x90, 0xa4, 0xdc, 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, 0x20, 0x4f, 0x6f, 0xd1 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 11: A 1029-bit RSA key pair", +{ + /* Modulus */ + 129, + { 0x11, 0x65, 0x47, 0x94, 0xf4, 0x64, 0x9a, 0x97, 0xac, 0x87, 0xef, 0x67, 0x94, 0xf6, 0xa6, 0xff, 0xb5, 0xcd, 0xab, 0x87, 0x02, 0xc2, 0x32, 0x54, 0xfd, 0xe0, 0x34, 0xf3, 0x12, 0x9a, 0xad, 0x82, 0x5c, 0xf3, 0xc0, 0xcc, 0x38, 0x80, 0xa9, 0x6f, 0xb6, 0x4e, 0x48, 0xd7, 0x59, 0x5e, 0xde, 0x06, 0xc3, 0x1d, 0x0a, 0xcb, 0xd1, 0xf8, 0xef, 0x9c, 0xd1, 0xf9, 0xf6, 0xf0, 0x0b, 0x24, 0xba, 0x53, 0x45, 0xab, 0xa1, 0x46, 0xd4, 0x1c, 0x56, 0x3b, 0xae, 0xce, 0x3b, 0x25, 0x23, 0xdf, 0x6a, 0x9f, 0x43, 0x01, 0x8a, 0x5f, 0x08, 0x69, 0xb6, 0xec, 0x99, 0x34, 0x69, 0x88, 0x6b, 0x5d, 0x23, 0x17, 0xd5, 0x9c, 0xff, 0xd4, 0xed, 0xe9, 0x46, 0x6a, 0x03, 0xf6, 0xdf, 0xec, 0x17, 0x5c, 0xad, 0x5a, 0x85, 0x44, 0x30, 0x95, 0xc7, 0x30, 0xb9, 0x8b, 0xbf, 0xa0, 0x48, 0x9b, 0x91, 0xbb, 0x27, 0x39, 0x9d } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 128, + { 0x1d, 0x4c, 0x4c, 0x6e, 0x13, 0xda, 0xb2, 0x84, 0x6c, 0xe6, 0x85, 0xd0, 0xc4, 0x93, 0x52, 0x5b, 0xb0, 0xad, 0x35, 0x62, 0x59, 0x6d, 0xb9, 0xad, 0x16, 0x94, 0x5d, 0x44, 0x5c, 0xe6, 0x7c, 0x54, 0xe9, 0x38, 0xf6, 0x54, 0x54, 0x2b, 0x09, 0x34, 0x48, 0x02, 0x91, 0xac, 0x21, 0xae, 0xd0, 0x98, 0xe8, 0x5a, 0xd6, 0xfe, 0xc6, 0xd0, 0xfe, 0x15, 0x4c, 0x3c, 0x34, 0x2b, 0x16, 0x99, 0x9a, 0x8c, 0xec, 0xe7, 0xfa, 0xf9, 0x90, 0xb7, 0xc8, 0xce, 0x87, 0xb6, 0x6f, 0xe3, 0x27, 0xfb, 0x35, 0x2e, 0xd0, 0x11, 0x32, 0x3d, 0x2b, 0x81, 0x9a, 0x36, 0xca, 0xbe, 0xcc, 0x5a, 0xae, 0x72, 0x30, 0xd3, 0xf8, 0xe0, 0x02, 0x45, 0xaf, 0x35, 0xaf, 0x80, 0x88, 0x62, 0xe5, 0x4d, 0x92, 0x56, 0x07, 0xee, 0x8b, 0x58, 0xe6, 0xa9, 0xf3, 0xad, 0x8f, 0xa7, 0x28, 0xfc, 0xe2, 0x68, 0x56, 0xc3, 0x67, 0xb1 } +, + /* Prime 1 */ + 65, + { 0x04, 0x41, 0x0a, 0xb5, 0x54, 0x60, 0x2d, 0x7e, 0xfb, 0x0c, 0xce, 0x92, 0x71, 0xa5, 0x22, 0x20, 0xf2, 0x52, 0x50, 0x02, 0x34, 0xb3, 0x82, 0x02, 0xfa, 0xfc, 0x94, 0xaa, 0x26, 0xb4, 0xfb, 0x04, 0xe5, 0xf5, 0x08, 0x74, 0x9a, 0x44, 0xef, 0xb8, 0x9b, 0x75, 0x78, 0xdb, 0x00, 0x7e, 0x03, 0x06, 0x23, 0x89, 0x48, 0x69, 0x12, 0x80, 0xf7, 0x3c, 0x12, 0x7a, 0x49, 0x30, 0xb4, 0x63, 0x39, 0xba, 0xd9 } +, + /* Prime 2 */ + 65, + { 0x04, 0x16, 0xd3, 0xfd, 0xed, 0x8f, 0x9e, 0x7b, 0x01, 0x9f, 0x67, 0x12, 0x32, 0x0e, 0xec, 0x11, 0xd8, 0xcc, 0x83, 0x81, 0xea, 0x86, 0x26, 0x6e, 0xe0, 0x3f, 0x00, 0x72, 0xe9, 0xa2, 0xfc, 0xdd, 0x80, 0x81, 0xae, 0x74, 0xfe, 0x27, 0x88, 0x70, 0xf4, 0xfd, 0xa2, 0xa0, 0x00, 0x6c, 0x4f, 0x54, 0x23, 0x9e, 0x24, 0xa1, 0x5d, 0x1a, 0xeb, 0xc6, 0x7d, 0x90, 0xd8, 0x18, 0x4d, 0x29, 0x5f, 0x52, 0x65 } +, + /* Prime exponent 1 */ + 65, + { 0x04, 0x06, 0x7b, 0x98, 0x7b, 0x5f, 0x8a, 0x8d, 0x56, 0x06, 0x97, 0x4d, 0x11, 0x06, 0x1d, 0x96, 0x29, 0x55, 0x63, 0xe9, 0xc2, 0x6e, 0x7d, 0x3e, 0x4e, 0xba, 0x43, 0xfe, 0x01, 0x24, 0x4d, 0x46, 0x24, 0x46, 0x49, 0x1a, 0xf4, 0x82, 0xf8, 0x86, 0xa9, 0x6b, 0x6d, 0xd1, 0x64, 0xd4, 0xd8, 0x0d, 0xae, 0x00, 0x90, 0x29, 0x04, 0x5e, 0x4e, 0x13, 0x64, 0xb4, 0x9b, 0x9e, 0xdf, 0x81, 0xe8, 0xb5, 0x79 } +, + /* Prime exponent 2 */ + 64, + { 0xe1, 0x38, 0x72, 0xe5, 0x6d, 0x84, 0xd7, 0x4a, 0x1e, 0x15, 0x7a, 0xe0, 0xb2, 0x3d, 0x30, 0x09, 0xc8, 0xd6, 0x72, 0x59, 0x16, 0xcb, 0xa6, 0x07, 0x31, 0x06, 0xd3, 0xb2, 0x58, 0x92, 0xb6, 0xc5, 0x33, 0x21, 0x69, 0xa2, 0x54, 0xb7, 0x12, 0x36, 0x63, 0x6b, 0x5d, 0xa9, 0x39, 0xa4, 0x47, 0xa1, 0xf2, 0x20, 0x47, 0x67, 0x54, 0xa7, 0x6d, 0x69, 0x0e, 0x84, 0xaf, 0x95, 0xca, 0x54, 0xeb, 0xd1 } +, + /* Coefficient */ + 65, + { 0x02, 0x51, 0x37, 0xae, 0x5d, 0x25, 0xfe, 0x1d, 0xaf, 0x9b, 0x38, 0x32, 0xf8, 0x07, 0x56, 0xb8, 0x6d, 0xb5, 0xca, 0x0e, 0x37, 0x2e, 0x51, 0x63, 0x03, 0x4e, 0xa3, 0x39, 0x1f, 0x5e, 0x54, 0x58, 0x2a, 0x1d, 0xd0, 0x47, 0x58, 0xb9, 0x92, 0xa5, 0xa8, 0xe4, 0x6e, 0xe1, 0x6f, 0x8a, 0xd3, 0x8c, 0xa6, 0x52, 0x27, 0x45, 0xaa, 0x7d, 0xf5, 0x1d, 0xf8, 0x9f, 0xc2, 0x21, 0x08, 0x01, 0x0e, 0x00, 0x4e } + +} +, +{{ + "PKCS#1 v1.5 Encryption Example 11.1", + /* Message */ + 15, + { 0x4e, 0xa8, 0xdf, 0xda, 0x3a, 0x9c, 0x26, 0x70, 0xca, 0x9b, 0x80, 0xfa, 0x89, 0x71, 0x0a } +, + /* Seed */ + 111, + { 0x96, 0x06, 0x42, 0x1b, 0x97, 0x3a, 0xb4, 0xba, 0x2a, 0xe2, 0x2f, 0xf5, 0x38, 0x70, 0x7d, 0x7d, 0x4e, 0x56, 0x3e, 0x8f, 0x05, 0xf2, 0x0b, 0xc3, 0x38, 0x1f, 0xf4, 0x5b, 0x0c, 0x29, 0x19, 0xa1, 0xb3, 0x46, 0xb0, 0x76, 0x03, 0x5a, 0xe7, 0x74, 0xb3, 0x2a, 0xf8, 0xee, 0x56, 0x6c, 0x73, 0xe2, 0x09, 0x49, 0x68, 0x4e, 0x44, 0x74, 0x80, 0xdf, 0xa3, 0x4d, 0xbb, 0x0c, 0x22, 0x66, 0x61, 0x50, 0x90, 0x9a, 0x59, 0xe1, 0xbb, 0x22, 0xd0, 0x95, 0xab, 0xe5, 0x02, 0x5a, 0x76, 0xd6, 0x0e, 0xc1, 0x01, 0xc7, 0x80, 0xe8, 0x3a, 0x0f, 0xf1, 0x59, 0x46, 0x5c, 0x3e, 0x7a, 0xc0, 0x21, 0x2b, 0xb3, 0x8b, 0x2f, 0x1e, 0x0e, 0x6e, 0x0b, 0x54, 0xd3, 0x5f, 0x4c, 0x76, 0x04, 0xc2, 0xd0, 0x93 } +, + /* Encryption */ + 129, + { 0x09, 0xbb, 0xcd, 0x8b, 0x63, 0xb2, 0x9c, 0xe9, 0x52, 0x26, 0xec, 0x1d, 0x51, 0x91, 0x2a, 0xf3, 0x97, 0x89, 0xfc, 0xe5, 0xe7, 0x7e, 0x7b, 0xe6, 0x78, 0x96, 0xc2, 0xc4, 0xe4, 0xc4, 0x37, 0x6f, 0xa4, 0x28, 0xec, 0x5d, 0x8a, 0x49, 0x7a, 0xcc, 0xa9, 0xe0, 0x82, 0x1e, 0x1f, 0x6d, 0xe1, 0x06, 0x78, 0x19, 0xc4, 0x8a, 0x51, 0x6f, 0x06, 0x91, 0xcb, 0xea, 0xcb, 0xb1, 0x9d, 0x1b, 0xa5, 0x09, 0xf0, 0x4f, 0xc0, 0x13, 0x36, 0xd9, 0x0f, 0x73, 0x96, 0xb4, 0x3a, 0xa2, 0xf2, 0xb5, 0x15, 0x0c, 0x28, 0xa4, 0x5f, 0x35, 0xa9, 0xde, 0x1a, 0x29, 0x73, 0xea, 0x10, 0x28, 0x67, 0x94, 0x94, 0x0a, 0xb7, 0x9f, 0x12, 0x9e, 0x31, 0x8c, 0xf9, 0x7a, 0x5f, 0xd7, 0x2b, 0x04, 0x5b, 0x46, 0x6d, 0x66, 0x6e, 0x5d, 0xe0, 0xb7, 0x14, 0xf2, 0x12, 0xa0, 0xb9, 0x05, 0x2a, 0x0c, 0x91, 0x44, 0x8e, 0x52, 0x0d } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Encryption Example 11.2", + /* Message */ + 27, + { 0xc6, 0xe2, 0x57, 0xf3, 0xa1, 0xb3, 0x5b, 0xbd, 0xc5, 0xcf, 0x42, 0x0b, 0xd7, 0x65, 0x4c, 0x52, 0xb2, 0x52, 0xdf, 0x32, 0xc5, 0x70, 0xd4, 0x28, 0xe6, 0x3e, 0xa2 } +, + /* Seed */ + 99, + { 0x77, 0xbb, 0xd7, 0x2b, 0x7b, 0x8f, 0xd2, 0x85, 0x02, 0xec, 0xf7, 0x9f, 0xd1, 0xc8, 0xaf, 0x8e, 0xbf, 0xe2, 0x44, 0x32, 0x70, 0x93, 0xb8, 0x24, 0x79, 0x5e, 0x95, 0xc0, 0xb4, 0x36, 0xeb, 0x41, 0xe5, 0xf0, 0xf2, 0xae, 0xc4, 0x33, 0x63, 0xaa, 0x2c, 0x08, 0xfc, 0x33, 0xf2, 0x87, 0xe6, 0x53, 0x80, 0x40, 0xe4, 0x28, 0x0d, 0xba, 0x47, 0x23, 0xe5, 0x32, 0x92, 0xe0, 0xa6, 0x7b, 0x21, 0xef, 0x77, 0x70, 0x79, 0x85, 0xb7, 0x2b, 0x2e, 0xca, 0xde, 0x28, 0x0a, 0x61, 0xfa, 0x73, 0xd7, 0x3d, 0xbb, 0x2f, 0xdb, 0x17, 0xf7, 0x75, 0xf4, 0x5f, 0xa1, 0x75, 0xb7, 0x7c, 0xb1, 0x06, 0x7d, 0x6f, 0x93, 0xa4, 0x37 } +, + /* Encryption */ + 129, + { 0x0d, 0x21, 0x49, 0x5c, 0x49, 0x28, 0xc2, 0x6a, 0x92, 0xc1, 0x6a, 0x90, 0x7f, 0x08, 0x33, 0x35, 0xad, 0xe8, 0xeb, 0x0c, 0x20, 0xb0, 0xb4, 0x5f, 0xe0, 0xe0, 0x8e, 0xf3, 0x9a, 0xe2, 0x4e, 0xc0, 0xb5, 0x05, 0x7e, 0x60, 0x78, 0xdd, 0x7a, 0x1b, 0x9d, 0x10, 0x2c, 0x24, 0x81, 0x85, 0x57, 0xe9, 0x0b, 0x83, 0xff, 0xda, 0x14, 0xf3, 0xcc, 0x37, 0x3c, 0x84, 0xc1, 0x05, 0xce, 0xee, 0x71, 0xbc, 0x73, 0x1a, 0x7f, 0x35, 0x71, 0xbd, 0x7b, 0xbb, 0xa1, 0xd4, 0xf2, 0x3f, 0xf4, 0xdf, 0x0a, 0x84, 0xf3, 0x12, 0x99, 0x0f, 0xf7, 0x71, 0xff, 0x11, 0x8f, 0x05, 0xbc, 0xfa, 0x22, 0x2f, 0x11, 0xc1, 0xea, 0x01, 0xf6, 0xa4, 0x68, 0xca, 0x5a, 0x87, 0x50, 0x80, 0x40, 0x98, 0xf8, 0x46, 0xa8, 0x64, 0x30, 0xea, 0x23, 0xe9, 0xf0, 0x7e, 0x23, 0x48, 0x46, 0x1e, 0xf0, 0x0b, 0xa6, 0x25, 0x34, 0xfc, 0xe7 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 11.3", + /* Message */ + 41, + { 0x2d, 0x30, 0x7f, 0x44, 0xdd, 0xff, 0x9c, 0x45, 0x35, 0xa0, 0x6e, 0xda, 0x01, 0x4a, 0x19, 0x13, 0x04, 0xfb, 0x3f, 0xa8, 0xe3, 0xa2, 0xbe, 0x88, 0xbb, 0x3b, 0x7b, 0xe9, 0x9f, 0x94, 0xd1, 0x33, 0x9c, 0x21, 0x9a, 0x51, 0xff, 0x5c, 0xad, 0xda, 0x93 } +, + /* Seed */ + 85, + { 0x5f, 0xab, 0x24, 0x2d, 0xd9, 0xf2, 0x92, 0x4b, 0x20, 0xd3, 0x78, 0xa8, 0x87, 0xb5, 0xde, 0x21, 0xd1, 0x95, 0x76, 0x9c, 0x3b, 0x53, 0x71, 0xc0, 0x0f, 0x4c, 0x3f, 0x1b, 0x63, 0x26, 0x8b, 0x01, 0x0c, 0x31, 0xf3, 0x2b, 0xb8, 0x7c, 0x9a, 0x52, 0x29, 0xe0, 0xd9, 0x30, 0x5f, 0x5f, 0xc8, 0x3b, 0x89, 0x34, 0xb9, 0x98, 0xd8, 0xce, 0xdf, 0x91, 0x6f, 0x7a, 0x4d, 0x72, 0x68, 0xfe, 0x3b, 0xe5, 0x12, 0x35, 0xf8, 0xbe, 0xac, 0x80, 0x0d, 0x4f, 0xff, 0xca, 0x6f, 0xfd, 0xdb, 0x29, 0xda, 0x4f, 0xa1, 0xc7, 0x76, 0x9d, 0x51 } +, + /* Encryption */ + 129, + { 0x0f, 0xaf, 0xb6, 0x1c, 0x37, 0x16, 0xc7, 0x96, 0x69, 0xfc, 0xd1, 0x64, 0x52, 0x46, 0xa0, 0xd3, 0xb0, 0x75, 0xb2, 0x8b, 0x73, 0x82, 0x20, 0x15, 0xa8, 0xca, 0xdc, 0x88, 0xa2, 0x2b, 0x7d, 0xa5, 0x39, 0x43, 0xe2, 0x54, 0x4d, 0xe3, 0x96, 0xbe, 0xee, 0xd3, 0xb0, 0xa9, 0x89, 0xad, 0x20, 0xa7, 0x3d, 0xdc, 0xd1, 0x91, 0xe8, 0xaa, 0x5c, 0xae, 0xb6, 0xe9, 0x08, 0x8a, 0x4a, 0x3a, 0xe8, 0x40, 0x67, 0xf9, 0x19, 0x8e, 0x92, 0x4a, 0x9c, 0xfe, 0x14, 0x50, 0xb0, 0x18, 0xa6, 0xb6, 0x9d, 0xd2, 0x37, 0x58, 0xe9, 0x25, 0x1c, 0x76, 0xcc, 0xea, 0xe8, 0x40, 0xda, 0x2c, 0xc6, 0x25, 0x17, 0x39, 0xe2, 0x3b, 0x9a, 0x42, 0xb6, 0x34, 0x46, 0xec, 0xa0, 0xd6, 0x15, 0x99, 0xa1, 0x46, 0xb7, 0x41, 0xfd, 0x43, 0x51, 0x1c, 0x73, 0x66, 0x3a, 0x92, 0x3e, 0x37, 0x57, 0xf1, 0x8a, 0x17, 0x1c, 0x3b, 0x12 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 11.4", + /* Message */ + 10, + { 0x1f, 0x03, 0x33, 0x88, 0x55, 0x4b, 0xeb, 0xfa, 0xa0, 0x1c } +, + /* Seed */ + 116, + { 0x9d, 0x81, 0x57, 0x56, 0x74, 0x66, 0x3b, 0x3d, 0x87, 0x7d, 0x4b, 0x0a, 0xa4, 0xfd, 0xc6, 0x05, 0x47, 0x0a, 0xbc, 0x55, 0x0b, 0x53, 0x52, 0x72, 0xc8, 0x23, 0x70, 0x18, 0x86, 0x7c, 0x50, 0x22, 0xca, 0xfe, 0x6a, 0x4a, 0xc8, 0x37, 0x37, 0xe9, 0x9c, 0x6e, 0xba, 0xfe, 0x69, 0xca, 0xa7, 0xfd, 0xca, 0x70, 0x27, 0xc8, 0xfb, 0xc4, 0x37, 0xec, 0x52, 0x32, 0xce, 0x2e, 0x25, 0x29, 0xa0, 0xf7, 0x03, 0xe2, 0x01, 0xf7, 0xe5, 0x10, 0x32, 0x35, 0xba, 0x65, 0xa6, 0x47, 0x94, 0xf1, 0x90, 0xef, 0x42, 0x54, 0x93, 0xb6, 0x48, 0xed, 0x24, 0xa2, 0x19, 0x7d, 0x0a, 0xb0, 0x4d, 0x81, 0xc7, 0xb3, 0x35, 0xa2, 0xda, 0xfd, 0x6b, 0x59, 0xc9, 0x43, 0xa0, 0x9b, 0x48, 0xea, 0xc3, 0x5e, 0x35, 0x59, 0x62, 0x91, 0xf5, 0xf7 } +, + /* Encryption */ + 129, + { 0x00, 0x1b, 0xdf, 0x33, 0x93, 0x34, 0x2c, 0x38, 0x13, 0xee, 0x3b, 0x87, 0x07, 0xea, 0xf5, 0x46, 0x47, 0xba, 0xde, 0x4c, 0x71, 0x8a, 0x4b, 0x64, 0x54, 0x78, 0x12, 0xe0, 0x10, 0xc2, 0xb7, 0x46, 0xc8, 0x8c, 0xda, 0xfd, 0xc3, 0x16, 0xf0, 0x36, 0x9a, 0x6c, 0x43, 0x0a, 0xe7, 0xe6, 0xc5, 0x0f, 0x05, 0xd5, 0x45, 0xc3, 0xf7, 0x98, 0xde, 0xb1, 0xd9, 0xa5, 0xbb, 0x69, 0xc5, 0x91, 0x39, 0x33, 0xc2, 0xd7, 0x79, 0x2f, 0xae, 0x9d, 0x42, 0xad, 0x76, 0x49, 0x4d, 0xc9, 0xa3, 0xe2, 0x7c, 0x21, 0x1d, 0xb4, 0xef, 0x19, 0x85, 0x18, 0x7a, 0x6c, 0x4d, 0x28, 0x1c, 0x47, 0x72, 0x17, 0x74, 0xa7, 0xa1, 0x1c, 0x12, 0x18, 0xd4, 0xdd, 0x26, 0x7b, 0x57, 0x48, 0x58, 0x77, 0xaa, 0x75, 0x1f, 0x6c, 0x28, 0x19, 0xf8, 0x1b, 0x50, 0x54, 0xa2, 0x8a, 0x26, 0xa5, 0x3d, 0xf3, 0xea, 0x34, 0x82, 0xb3, 0x40 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 11.5", + /* Message */ + 43, + { 0xf7, 0x1b, 0xc7, 0x37, 0x4b, 0xd5, 0x9c, 0x37, 0x77, 0x59, 0x76, 0xf3, 0x35, 0x24, 0x4a, 0x36, 0x84, 0x3c, 0x59, 0xe7, 0x48, 0x9a, 0xd2, 0x8b, 0x1a, 0x82, 0x2d, 0x2d, 0x7d, 0x0b, 0x9a, 0x6f, 0xe9, 0xac, 0x5b, 0xf4, 0x36, 0x82, 0xd6, 0x3d, 0x63, 0x6e, 0xf6 } +, + /* Seed */ + 83, + { 0xa1, 0xff, 0x98, 0x44, 0xa7, 0x3e, 0xc4, 0xb3, 0xbe, 0xfb, 0x1a, 0x86, 0x03, 0x52, 0xcf, 0x9b, 0x75, 0xfc, 0x66, 0xff, 0x47, 0x9a, 0x2d, 0xed, 0x59, 0x98, 0x84, 0x5a, 0x79, 0x77, 0x3a, 0x8c, 0x62, 0x06, 0xa3, 0x64, 0x36, 0xc8, 0x80, 0xa5, 0x5e, 0x18, 0x71, 0x18, 0x35, 0x45, 0x6d, 0x91, 0x45, 0x4b, 0x5b, 0xa1, 0x32, 0x07, 0x8f, 0x20, 0x37, 0xfb, 0xda, 0x72, 0x86, 0x25, 0x1b, 0xad, 0xd1, 0x2d, 0x0a, 0x97, 0x81, 0xaf, 0x3f, 0x58, 0x97, 0xcd, 0x94, 0x7b, 0x1e, 0x14, 0x25, 0xf9, 0x70, 0x55, 0x09 } +, + /* Encryption */ + 129, + { 0x09, 0x3f, 0xb6, 0x85, 0x26, 0xce, 0xad, 0x01, 0x0a, 0x54, 0xd1, 0x16, 0xcd, 0x7d, 0x60, 0x35, 0x09, 0x9b, 0xf1, 0xab, 0xff, 0xe9, 0x33, 0x1d, 0xe3, 0x64, 0x86, 0xf0, 0x53, 0xa8, 0x02, 0x98, 0xe4, 0xab, 0xfa, 0xb4, 0x0d, 0x3b, 0x03, 0xa3, 0xe7, 0xe9, 0x25, 0x59, 0x73, 0x38, 0xf1, 0x70, 0x3b, 0x04, 0x53, 0x5a, 0x9c, 0x87, 0xc6, 0x58, 0x36, 0xf1, 0x61, 0x11, 0xaa, 0xe8, 0x89, 0xe6, 0xc8, 0xd9, 0x0a, 0x24, 0x07, 0xd4, 0x41, 0xa1, 0xc2, 0xa3, 0x11, 0xcb, 0xd9, 0x46, 0x11, 0xa4, 0x2e, 0x93, 0xc7, 0x3a, 0x3d, 0x21, 0x48, 0x3f, 0xad, 0xb8, 0xf4, 0xe2, 0x46, 0xd0, 0x89, 0xf1, 0xcf, 0xd7, 0x08, 0x52, 0xb4, 0xdc, 0x77, 0x8a, 0x60, 0xd1, 0x52, 0xd3, 0xfc, 0xa7, 0x5f, 0xd6, 0x06, 0x67, 0x04, 0xe9, 0x33, 0xbf, 0x99, 0xf5, 0xbb, 0x77, 0xaf, 0xc9, 0xa9, 0xcb, 0x3b, 0x8c, 0xb5 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 11.6", + /* Message */ + 25, + { 0x46, 0x87, 0x83, 0xd4, 0xea, 0xc8, 0x81, 0x34, 0x32, 0x04, 0x85, 0x47, 0xce, 0x24, 0x1f, 0x72, 0xdb, 0x1c, 0x85, 0xce, 0x4a, 0xdb, 0xe3, 0xee, 0x2c } +, + /* Seed */ + 101, + { 0xc6, 0xe3, 0x26, 0x30, 0xed, 0x90, 0xd0, 0xaf, 0xb1, 0x68, 0xc0, 0x8b, 0x75, 0x22, 0x59, 0xef, 0x4b, 0x9e, 0x81, 0x17, 0x62, 0xf7, 0xcf, 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, 0x81, 0x90, 0x98, 0xda, 0x1c, 0xbe, 0xc9, 0xc5, 0x43, 0xa2, 0x63, 0x30, 0x0f, 0x99, 0x4f, 0xb0, 0xb4, 0x92, 0x85, 0x71, 0x40, 0x1c, 0x20, 0x2b, 0xd6 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 11.7", + /* Message */ + 26, + { 0xaf, 0x63, 0x1d, 0x76, 0xc9, 0x7f, 0xd9, 0x95, 0xe4, 0x94, 0xaa, 0x9b, 0x4b, 0xd7, 0x58, 0xc5, 0xc6, 0x72, 0xc5, 0xe4, 0x15, 0x8f, 0x3a, 0xaf, 0x87, 0x4b } +, + /* Seed */ + 100, + { 0x40, 0x6e, 0x1e, 0x23, 0xf9, 0x92, 0xbb, 0x07, 0x62, 0x12, 0x5c, 0xa4, 0x63, 0xbd, 0x0f, 0x2e, 0xfd, 0xf1, 0xbf, 0xcb, 0x08, 0x2a, 0x8d, 0xf5, 0x06, 0xaf, 0x5f, 0x72, 0x70, 0xc3, 0x9f, 0xde, 0x01, 0xd9, 0xee, 0xd3, 0x22, 0x66, 0x61, 0xdb, 0x22, 0xa9, 0xc4, 0x04, 0xb7, 0xd7, 0x65, 0xfa, 0x38, 0x4f, 0x9a, 0xd4, 0xf5, 0x1b, 0x93, 0x69, 0xd7, 0x4b, 0x0e, 0x37, 0x70, 0x66, 0x31, 0xbc, 0x65, 0x36, 0xf6, 0x55, 0x5e, 0xc7, 0xfd, 0xeb, 0xd3, 0x48, 0xef, 0x3c, 0xf5, 0xf8, 0xa8, 0x77, 0xf6, 0x06, 0x43, 0x7c, 0x27, 0x8c, 0xb8, 0x16, 0x3a, 0xd3, 0x49, 0x38, 0x4b, 0xaa, 0xe3, 0x2f, 0x31, 0xb6, 0x86, 0xe0 } +, + /* Encryption */ + 129, + { 0x01, 0xff, 0x8f, 0xe7, 0x9a, 0xf3, 0x18, 0xd7, 0x56, 0xf2, 0x84, 0x08, 0x3b, 0x51, 0xb4, 0x3b, 0x66, 0xaa, 0xe8, 0x3c, 0x6a, 0xa9, 0x1a, 0x99, 0x93, 0x4b, 0x4d, 0xe8, 0x4b, 0xd5, 0xfd, 0x24, 0xfa, 0x8d, 0x07, 0xc7, 0x55, 0x14, 0x74, 0x66, 0x5e, 0x62, 0x36, 0x0a, 0x65, 0x98, 0x4e, 0x67, 0xa4, 0x85, 0x6c, 0x3d, 0xbd, 0x2c, 0x75, 0xf2, 0x46, 0xe2, 0x22, 0x22, 0xe9, 0xf4, 0xb9, 0x69, 0x51, 0x67, 0x26, 0xed, 0x28, 0x7f, 0x42, 0x3a, 0x67, 0x47, 0x82, 0x1f, 0xbb, 0xb7, 0xfa, 0x17, 0x62, 0x35, 0xc8, 0x50, 0xa8, 0x61, 0xf2, 0x99, 0xf7, 0x39, 0x4c, 0x2c, 0x43, 0x07, 0xb1, 0x02, 0x59, 0x09, 0x40, 0xfe, 0xd1, 0x20, 0x6a, 0xd5, 0x9b, 0x9d, 0xd6, 0x44, 0x4e, 0x1e, 0x19, 0x6e, 0x94, 0x73, 0x25, 0x22, 0x4f, 0xfa, 0xca, 0x06, 0x9e, 0x9c, 0xdf, 0x8c, 0x62, 0x02, 0x69, 0x07, 0x7d } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 11.8", + /* Message */ + 56, + { 0x73, 0xcb, 0x53, 0x90, 0x82, 0xfb, 0x06, 0xdc, 0xae, 0x3c, 0x20, 0x68, 0xe9, 0x89, 0xe7, 0xc0, 0xd8, 0xff, 0xf0, 0xfb, 0x34, 0x0b, 0x6d, 0xe8, 0x0d, 0x0b, 0xa5, 0xd1, 0xe0, 0x06, 0x4f, 0x22, 0x13, 0x92, 0x8a, 0x4b, 0xaf, 0x20, 0xa8, 0x03, 0x48, 0xaf, 0x3c, 0xde, 0x9d, 0xe6, 0x3f, 0x88, 0x6d, 0x63, 0xe5, 0x6a, 0x3e, 0x32, 0xcd, 0x8e } +, + /* Seed */ + 70, + { 0x28, 0xe2, 0xa9, 0x7c, 0x7e, 0x9e, 0x03, 0x3b, 0x49, 0xaa, 0xdc, 0xee, 0x8f, 0xdc, 0x07, 0xed, 0xfd, 0xfd, 0xb9, 0x50, 0x35, 0x4b, 0x70, 0x8c, 0xe5, 0xdf, 0x84, 0x8d, 0x1b, 0x51, 0xaa, 0x2f, 0x4a, 0xff, 0x99, 0x74, 0x16, 0x01, 0x81, 0x42, 0x29, 0x47, 0xb1, 0x33, 0x76, 0x4c, 0x5a, 0x40, 0x06, 0x57, 0x04, 0x6a, 0x49, 0x36, 0x3f, 0xfd, 0xf1, 0xf9, 0x3c, 0xa4, 0x8b, 0x3e, 0x52, 0x93, 0x7e, 0x1f, 0x38, 0xfb, 0x50, 0xfb } +, + /* Encryption */ + 129, + { 0x0c, 0x72, 0xe6, 0x95, 0x48, 0xc3, 0x4e, 0xca, 0xf2, 0x48, 0xb2, 0xdc, 0x6b, 0xb6, 0x43, 0x87, 0xf4, 0xf3, 0x35, 0x0f, 0x66, 0x8e, 0x59, 0x01, 0x35, 0x60, 0x80, 0x8c, 0x41, 0x3f, 0xa8, 0x35, 0xfd, 0x36, 0x0e, 0x04, 0xe4, 0x74, 0x7a, 0x00, 0x31, 0xc8, 0xa6, 0x4a, 0x9d, 0x7a, 0x07, 0xb3, 0x63, 0xfa, 0xd2, 0x93, 0xb7, 0x03, 0xa7, 0xdc, 0x99, 0x0f, 0x80, 0x6f, 0xb9, 0x0e, 0x39, 0x12, 0x21, 0xa1, 0x16, 0xdf, 0x10, 0x8f, 0x54, 0x6e, 0xae, 0x51, 0x71, 0x6b, 0xa0, 0x45, 0x01, 0xab, 0x77, 0x7b, 0x0c, 0x2a, 0x17, 0x71, 0x2f, 0x71, 0xe4, 0x06, 0x27, 0x5f, 0x01, 0x73, 0x77, 0xcf, 0x24, 0x88, 0xc4, 0x35, 0xef, 0x6c, 0x6e, 0x7c, 0x45, 0xcd, 0xb9, 0x8f, 0x24, 0x47, 0x7c, 0xed, 0x18, 0x0e, 0xb3, 0xef, 0xc8, 0x70, 0x3e, 0x96, 0x38, 0x26, 0xbf, 0xb3, 0x44, 0xf1, 0x6e, 0xb4, 0xa1 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 11.9", + /* Message */ + 38, + { 0xf2, 0xf9, 0x85, 0xb8, 0x03, 0x12, 0x73, 0xcb, 0x5f, 0xc8, 0x9a, 0x31, 0xdd, 0xeb, 0x4c, 0x67, 0xa4, 0xe4, 0xf3, 0x8c, 0x09, 0xd3, 0x02, 0x87, 0x42, 0x09, 0xb3, 0x9c, 0x69, 0xb7, 0x1f, 0x84, 0x95, 0x88, 0x86, 0x8f, 0xa5, 0xf8 } +, + /* Seed */ + 88, + { 0xc1, 0x20, 0x44, 0x6f, 0x5b, 0xdd, 0xa0, 0x6c, 0x63, 0x73, 0x8f, 0x18, 0x15, 0x55, 0x95, 0xf6, 0x2b, 0xc2, 0x65, 0x67, 0x28, 0x4c, 0x35, 0x03, 0x65, 0x91, 0xcd, 0x5d, 0x75, 0x3e, 0x4e, 0xf7, 0x90, 0x0d, 0xff, 0x33, 0xbf, 0xdd, 0x3b, 0x10, 0x8c, 0x10, 0x2d, 0x08, 0x98, 0x80, 0xc7, 0xb6, 0x9d, 0x86, 0xe9, 0xce, 0x3d, 0x68, 0x8c, 0xda, 0x15, 0x6f, 0xd6, 0xa9, 0x92, 0x31, 0x05, 0x8c, 0xc3, 0x18, 0x33, 0x96, 0x38, 0x09, 0x46, 0xe8, 0xa9, 0x69, 0xa7, 0xfc, 0xbe, 0x9e, 0xdc, 0x95, 0x9a, 0x0e, 0x50, 0x45, 0x32, 0xba, 0xb8, 0xea } +, + /* Encryption */ + 129, + { 0x10, 0xe0, 0xbc, 0x14, 0xba, 0x16, 0x01, 0x26, 0x98, 0xcc, 0x76, 0xcb, 0x82, 0x04, 0x5e, 0x2b, 0xfd, 0xbc, 0xb2, 0xb1, 0x18, 0xf1, 0x83, 0x06, 0x79, 0x59, 0xd7, 0x13, 0x7f, 0xd5, 0x0f, 0xa8, 0x8f, 0xe4, 0xf9, 0xce, 0xcf, 0x66, 0x31, 0xa9, 0x9c, 0xcc, 0xab, 0x76, 0xcd, 0xb7, 0x74, 0x4b, 0xab, 0xd0, 0x6b, 0x2b, 0xed, 0xfb, 0xca, 0x77, 0x24, 0xda, 0xfd, 0x91, 0xe6, 0xdf, 0xa8, 0x8b, 0xea, 0x2b, 0x44, 0xa8, 0xcb, 0xb0, 0x62, 0x19, 0xb1, 0x5c, 0x2a, 0xe7, 0x68, 0x72, 0xfa, 0xd2, 0x88, 0xe8, 0x43, 0x8a, 0xcd, 0x39, 0x5c, 0xe5, 0xcb, 0xe2, 0x8a, 0x71, 0x2b, 0x67, 0xf5, 0x61, 0xa1, 0x78, 0x6d, 0x75, 0x34, 0x3e, 0xd9, 0xad, 0x0d, 0x0a, 0x5e, 0xb6, 0xfa, 0xed, 0x07, 0xb0, 0x6a, 0xef, 0x03, 0x31, 0x8f, 0xf1, 0xaf, 0xe4, 0x72, 0xdb, 0x4e, 0xe3, 0xe2, 0x1e, 0xc1, 0x29, 0x33 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 11.10", + /* Message */ + 36, + { 0x39, 0x87, 0x2c, 0xfd, 0x6c, 0xf7, 0x4b, 0x4c, 0xcc, 0x1a, 0x70, 0xd9, 0x73, 0xb3, 0x18, 0x99, 0xa6, 0x7a, 0xee, 0xde, 0xe5, 0xd6, 0x71, 0xe0, 0x5b, 0xd6, 0x01, 0x12, 0xe6, 0x45, 0x12, 0xbb, 0xe4, 0x3b, 0xb8, 0x40 } +, + /* Seed */ + 90, + { 0x68, 0xac, 0x3f, 0x96, 0x97, 0xb7, 0x50, 0x75, 0x4f, 0xa7, 0x53, 0x2e, 0x41, 0x61, 0xc1, 0x20, 0x18, 0xe0, 0x33, 0xa6, 0x02, 0x51, 0xc8, 0xdc, 0xa8, 0x38, 0x78, 0x16, 0xf4, 0x23, 0x79, 0xab, 0x97, 0x8e, 0x15, 0x57, 0x8a, 0xe2, 0xe9, 0x4c, 0x17, 0x76,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1.5 Encryption Example 11.11", + /* Message */ + 14, + { 0x74, 0xd5, 0x6b, 0xf8, 0xd9, 0xc1, 0x80, 0xdc, 0x09, 0x93, 0x71, 0xa5, 0xaf, 0x72 } +, + /* Seed */ + 112, + { 0x33, 0x78, 0x70, 0xf0, 0x47, 0x9c, 0xf1, 0x28, 0x3a, 0x0c, 0x87, 0xc9, 0xc4, 0xaf, 0x54, 0xba, 0x8f, 0x85, 0x06, 0x44, 0xd5, 0x9a, 0x20, 0x25, 0x26, 0x3d, 0x2b, 0xdc, 0x49, 0xbf, 0xa6, 0x63, 0x6e, 0x75, 0x18, 0xf9, 0x4b, 0x6a, 0xb1, 0x8f, 0x85, 0xb1, 0x93, 0x21, 0x20, 0x9b, 0x76, 0x9f, 0x0c, 0x19, 0x75, 0xd1, 0xd5, 0xad, 0xa0, 0x6f, 0xd2, 0xa7, 0x6c, 0x82, 0x45, 0x0e, 0x4e, 0x09, 0xcd, 0xad, 0xb7, 0x83, 0x2f, 0xfb, 0x8a, 0xe7, 0xdc, 0xb4, 0x74, 0x10, 0xb2, 0x87, 0x80, 0x4d, 0xdd, 0xc7, 0x49, 0x3d, 0x61, 0x0a, 0x81, 0x39, 0x9b, 0x6d, 0xf6, 0xdf, 0x5e, 0xf1, 0x52, 0x09, 0x29, 0x84, 0xfe, 0x27, 0x76, 0xa4, 0xf9, 0x30, 0x54, 0x6b, 0xe1, 0xdc, 0x18, 0x31, 0x3c, 0x14 } +, + /* Encryption */ + 129, + { 0x07, 0x61, 0xeb, 0xaa, 0xd8, 0xff, 0x1c, 0x3d, 0xbe, 0x71, 0x0f, 0x60, 0xe3, 0xbe, 0x9f, 0x28, 0x9f, 0xb2, 0x7a, 0x6b, 0x53, 0x77, 0x75, 0x5b, 0x71, 0xfb, 0x38, 0x4c, 0x5f, 0xac, 0xb1, 0x60, 0x3c, 0x95, 0x3e, 0x1e, 0x2c, 0xa1, 0x1e, 0x78, 0x43, 0x25, 0xae, 0x42, 0xf3, 0x21, 0xae, 0x5c, 0x58, 0x64, 0x8c, 0x84, 0xf5, 0x24, 0xdf, 0x9d, 0xe9, 0xf9, 0x3f, 0xb4, 0xb0, 0xc2, 0xe0, 0x97, 0x97, 0xff, 0x2d, 0x11, 0x40, 0x70, 0x73, 0xb9, 0x5a, 0x78, 0x6d, 0xf5, 0x1a, 0x43, 0xf7, 0x99, 0x82, 0xd8, 0x6c, 0x49, 0xfb, 0x9e, 0x50, 0x14, 0xb1, 0xb7, 0x68, 0x76, 0x0a, 0x51, 0x30, 0x26, 0x6d, 0x06, 0x99, 0x30, 0x6a, 0x90, 0x4e, 0xd2, 0xdf, 0xe2, 0x01, 0x38, 0xd5, 0x31, 0xc5, 0xdc, 0x4b, 0xbf, 0x4d, 0xcc, 0xf1, 0x02, 0x49, 0xa6, 0xe2, 0xb3, 0x55, 0xf7, 0xcc, 0xb3, 0x26, 0xa4, 0x8a } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 11.12", + /* Message */ + 35, + { 0x61, 0x10, 0x63, 0xb5, 0xda, 0x12, 0x3c, 0xe2, 0x12, 0x96, 0x17, 0xdf, 0x38, 0x59, 0x95, 0x57, 0xb9, 0x5d, 0x1b, 0x05, 0xe6, 0xb6, 0x6b, 0xcd, 0x49, 0xaf, 0xe9, 0x83, 0x1a, 0x04, 0x21, 0xa5, 0xbe, 0x4e, 0x48 } +, + /* Seed */ + 91, + { 0x10, 0xf9, 0xdf, 0x30, 0xec, 0x97, 0x77, 0xfc, 0xab, 0x5a, 0x92, 0x4d, 0xed, 0x36, 0xfd, 0xfd, 0x6e, 0x1f, 0x38, 0x14, 0x49, 0xad, 0x99, 0xd2, 0x0a, 0xea, 0x0e, 0x39, 0x72, 0xea, 0x60, 0x4e, 0xa2, 0x27, 0x50, 0xd0, 0x60, 0x1d, 0x10, 0xa3, 0x77, 0xda, 0xd1, 0xa9, 0x4f, 0x9b, 0x02, 0x73, 0x40, 0x94, 0x81, 0x23, 0x82, 0x73, 0x98, 0xbb, 0x22, 0xb1, 0x44, 0x5f, 0x71, 0xc5, 0x05, 0xc6, 0x23, 0xaa, 0xf5, 0x16, 0xcd, 0x9f, 0xb3, 0xe9, 0x77, 0xf7, 0x78, 0xcf, 0xdd, 0x3a, 0x5d, 0x28, 0xc2, 0x29, 0x9e, 0x4b, 0x2a, 0xbd, 0x9f, 0x98, 0xc4, 0x35, 0x5a } +, + /* Encryption */ + 129, + { 0x07, 0xf2, 0xd5, 0x8b, 0xc4, 0x16, 0x39, 0x94, 0xd7, 0x6f, 0x49, 0x1e, 0xdd, 0x69, 0x74, 0x3c, 0x45, 0xdd, 0xa0, 0xc3, 0x8c, 0xcb, 0x07, 0x69, 0xde, 0x9c, 0xf9, 0xf4, 0xfd, 0x00, 0x55, 0xd3, 0x0a, 0x0c, 0xf0, 0x02, 0x80, 0x0d, 0x76, 0xed, 0x8c, 0x12, 0xcb, 0xd3, 0x6a, 0xf0, 0x51, 0xa9, 0xd7, 0x33, 0x7b, 0x29, 0xbc, 0x77, 0x4d, 0xc3, 0xc4, 0x01, 0x2b, 0xf5, 0xc2, 0x8a, 0xea, 0xd8, 0xc3, 0xe0, 0x36, 0xaa, 0x41, 0x39, 0x8a, 0x8b, 0x0f, 0xe9, 0x91, 0xc0, 0xbf, 0x66, 0xb5, 0x34, 0x1c, 0x99, 0xd9, 0x37, 0x7d, 0x94, 0x70, 0x4a, 0xd4, 0x90, 0xa9, 0xf8, 0x74, 0x6f, 0xc5, 0xce, 0xf7, 0x26, 0xe1, 0x96, 0xf3, 0x41, 0xf9, 0x3a, 0x1f, 0x1e, 0xae, 0x2c, 0x13, 0xe0, 0x0c, 0xfd, 0x22, 0x06, 0x2f, 0x8e, 0xb3, 0xda, 0x9d, 0xaf, 0xb9, 0x5a, 0x1e, 0x7b, 0x81, 0xb1, 0xfd, 0xb6, 0x56 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 11.13", + /* Message */ + 36, + { 0x80, 0x76, 0x4f, 0x78, 0x5f, 0xd4, 0x17, 0x6e, 0x16, 0x41, 0xe1, 0x29, 0xa3, 0x5a, 0x9b, 0x31, 0xb3, 0xa8, 0x9a, 0x75, 0x67, 0xad, 0x6c, 0x1f, 0x0d, 0x65, 0xec, 0x8a, 0xf9, 0x5f, 0xc1, 0x6e, 0x15, 0x28, 0x14, 0x09 } +, + /* Seed */ + 90, + { 0x20, 0x36, 0xd0, 0x98, 0xa6, 0xe9, 0x35, 0xf9, 0xa4, 0x11, 0x20, 0x1d, 0x2b, 0xcb, 0x62, 0x9f, 0x79, 0x0a, 0x94, 0xdb, 0x2e, 0xc6, 0x98, 0x67, 0x43, 0x3b, 0x17, 0x61, 0xd7, 0xc6, 0x95, 0x4b, 0xe9, 0x1a, 0x9f, 0xc7, 0x19, 0x19, 0x0e, 0x10, 0x86, 0x13, 0xcd, 0x58, 0x4c, 0xbb, 0x97, 0x76, 0x87, 0x04, 0x69, 0x24, 0xbc, 0xa6, 0xb2, 0xfe, 0x1a, 0x54, 0xbf, 0x76, 0xac, 0xf7, 0x7b, 0x36, 0x8c, 0x39, 0x65, 0x0f, 0x6d, 0x0a, 0x49, 0x8d, 0xbd, 0xed, 0xae, 0x3f, 0x4c, 0x21, 0x04, 0x0a, 0x8a, 0xed, 0x63, 0x4d, 0xe4, 0xed, 0x8a, 0xf1, 0x34, 0x6e } +, + /* Encryption */ + 129, + { 0x04, 0x9c, 0x61, 0x44, 0x4e, 0x92, 0x47, 0x72, 0xf9, 0x4a, 0x79, 0x5c, 0xcd, 0x99, 0xeb, 0x2f, 0xe4, 0x30, 0x99, 0x7b, 0x91, 0xb4, 0x2d, 0xe6, 0x16, 0x36, 0x29, 0xab, 0x98, 0xd2, 0x5a, 0x71, 0xe7, 0xf9, 0x68, 0x86, 0xa5, 0x7e, 0x97, 0x9d, 0x9c, 0x94, 0xc9, 0x62, 0x20, 0x9c, 0x1f, 0x71, 0x2c, 0x70, 0x57, 0x1a, 0x81, 0xf3, 0x77, 0xea, 0xf7, 0x4e, 0x80, 0xe7, 0x07, 0x22, 0xe1, 0xbe, 0x3d, 0x13, 0x37, 0xc5, 0x04, 0x5f, 0x79, 0x7b, 0xd5, 0x7d, 0xf2, 0xf5, 0xae, 0x5e, 0xf3, 0x3a, 0xe5, 0x79, 0xe9, 0x3b, 0x38, 0xfb, 0x25, 0x0d, 0xf0, 0xc2, 0xbc, 0x59, 0xb3, 0x3a, 0x74, 0x86, 0x7b, 0x8f, 0x3d, 0xfe, 0x5b, 0xa7, 0x85, 0xd7, 0x28, 0xb8, 0x9d, 0x96, 0xb3, 0x00, 0x2b, 0xc0, 0x05, 0x4d, 0xb5, 0xbb, 0x0d, 0x84, 0xfd, 0xa4, 0x5d, 0xb4, 0xa1, 0xf2, 0x62, 0x8a, 0xb1, 0x12, 0x30 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 11.14", + /* Message */ + 18, + { 0x0a, 0xbc, 0x2b, 0xc5, 0xfc, 0xd0, 0x40, 0x18, 0x9f, 0x84, 0x22, 0xf1, 0xca, 0x04, 0x50, 0x21, 0xda, 0x95 } +, + /* Seed */ + 108, + { 0xe4, 0x73, 0x2e, 0x49, 0x90, 0x69, 0x9f, 0xd7, 0x47, 0x40, 0xc8, 0x52, 0xae, 0x8d, 0x4d, 0x70, 0x7f, 0xbd, 0x79, 0x46, 0x0f, 0x88, 0x74, 0x09, 0x84, 0xae, 0x53, 0xff, 0xb9, 0xfc, 0x39, 0x62, 0x68, 0x3e, 0xad, 0x0d, 0x14, 0x04, 0xf5, 0x31, 0x51, 0xd1, 0xae, 0xe8, 0x0f, 0xcd, 0x6a, 0x1f, 0xf6, 0x5f, 0xc8, 0x8e, 0xf0, 0x8f, 0xd7, 0x6d, 0x9f, 0xdc, 0xa8, 0xf9, 0xe3, 0xac, 0x7d, 0x8d, 0x82, 0xb8, 0x2e, 0xce, 0x78, 0x9c, 0x66, 0xc5, 0x40, 0x22, 0x80, 0xb3, 0xe5, 0x68, 0x10, 0x1c, 0xe2, 0xa2, 0xa7, 0xb2, 0xb2, 0xf1, 0xe9, 0x65, 0x19, 0xcf, 0xb4, 0x1e, 0x60, 0x49, 0x3d, 0x76, 0x8e, 0xb5, 0xb9, 0x6c, 0xcc, 0x49, 0xbb, 0x0f, 0x6e, 0xc7, 0x11, 0xfd } +, + /* Encryption */ + 129, + { 0x03, 0xd8, 0xae, 0x60, 0x4f, 0x92, 0x95, 0x31, 0x73, 0xc7, 0x7a, 0x01, 0xff, 0xa0, 0x90, 0xaa, 0x0e, 0x37, 0xa3, 0x8a, 0x47, 0xc9, 0x72, 0x19, 0xc0, 0xb9, 0xf8, 0x64, 0xd3, 0x48, 0x74, 0x6a, 0xf7, 0xf4, 0xa6, 0x32, 0x11, 0x29, 0xc6, 0x04, 0x6a, 0x99, 0x4c, 0xed, 0x1c, 0xcf, 0x33, 0x24, 0xda, 0x93, 0x71, 0x53, 0x88, 0x8d, 0xd6, 0xc6, 0x70, 0x19, 0xa7, 0xca, 0xa7, 0x65, 0x5a, 0x36, 0x42, 0x83, 0x8e, 0xdf, 0xa0, 0xe2, 0xed, 0x8d, 0xc2, 0x5c, 0x14, 0xbf, 0xf8, 0xbf, 0xf5, 0x65, 0xc7, 0x18, 0xf8, 0xb6, 0xc9, 0x20, 0x56, 0xc9, 0xbb, 0xe8, 0xd9, 0x30, 0x83, 0x70, 0xc7, 0xcd, 0x75, 0xa0, 0x4e, 0x11, 0xb6, 0xe2, 0x5a, 0xa6, 0xc3, 0xc2, 0xcd, 0xdd, 0x17, 0x2a, 0x4b, 0x6a, 0xee, 0xf0, 0x4f, 0xb8, 0x35, 0xb6, 0x86, 0x37, 0xcf, 0x0c, 0xa0, 0xb9, 0xa9, 0x11, 0xb8, 0xb8, 0x74 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 11.15", + /* Message */ + 24, + { 0x8f, 0x98, 0x35, 0xef, 0xb6, 0x9c, 0xca, 0x8c, 0x07, 0xbf, 0xef, 0x4d, 0x8f, 0x53, 0x5d, 0x0c, 0xbd, 0xa5, 0x36, 0x7b, 0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 0x7e, 0x45, 0x3a, 0x74, 0x37, 0xab, 0x1a, 0x19, 0xcc, 0x00, 0x30, 0x7a, 0x8c, 0x6a, 0xed, 0x95, 0xc3, 0x15, 0xb2, 0x4b, 0x47, 0x90, 0x07, 0x24, 0x56, 0xc9, 0x44, 0x60, 0x99, 0x5d, 0xbb, 0x1f, 0xe5, 0xa1, 0x2b, 0x4c, 0xf4, 0x45, 0x42, 0x96, 0xf7, 0x40, 0x02, 0x83, 0xce, 0xfd, 0xce, 0x6b, 0x00, 0xcc, 0x80, 0x49, 0xdd, 0x5d, 0xd8, 0xcb, 0x2a, 0xf3, 0x6f } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 11.16", + /* Message */ + 47, + { 0x6d, 0xfb, 0xd9, 0x3b, 0x00, 0x78, 0xd4, 0x9a, 0xe4, 0xfe, 0x1e, 0x24, 0xcc, 0xa9, 0x7d, 0x0a, 0x9a, 0xff, 0xd7, 0xbe, 0xe0, 0x62, 0xae, 0xd2, 0x9d, 0xef, 0x0b, 0x1c, 0x0b, 0x3a, 0xef, 0xad, 0x81, 0x1d, 0x6e, 0x7a, 0xce, 0x8b, 0x49, 0xd7, 0x24, 0x2a, 0x9f, 0xe6, 0xe2, 0x3c, 0x22 } +, + /* Seed */ + 79, + { 0x31, 0x9f, 0x9c, 0xda, 0x2c, 0x93, 0x38, 0x8e, 0xbe, 0x1a, 0x50, 0xe7, 0x6c, 0x93, 0x97, 0x55, 0x9d, 0xca, 0xf1, 0x4f, 0xe1, 0x03, 0x52, 0xaa, 0x51, 0x1d, 0xc5, 0xba, 0xa6, 0x4d, 0xc1, 0x52, 0xfc, 0xc7, 0x9c, 0xbb, 0x23, 0xd4, 0xe6, 0x9b, 0x12, 0xb9, 0xf2, 0x7a, 0x79, 0x09, 0x15, 0x98, 0x87, 0xbb, 0x04, 0x12, 0x9a, 0xd6, 0x35, 0x16, 0x81, 0x33, 0x86, 0x37, 0x4f, 0x31, 0x89, 0x2d, 0x4c, 0xdc, 0x4f, 0xe6, 0x39, 0x69, 0xb5, 0xbf, 0xdd, 0xc6, 0x67, 0xf9, 0x46, 0x89, 0x7d } +, + /* Encryption */ + 129, + { 0x01, 0xc5, 0xce, 0x83, 0x6b, 0xe2, 0x20, 0x8a, 0x3d, 0x81, 0x4e, 0x7e, 0x60, 0xc2, 0x76, 0x74, 0xac, 0xb7, 0xcd, 0x3e, 0x31, 0xc0, 0x24, 0xd9, 0xd3, 0x8f, 0xc2, 0x29, 0x53, 0xaa, 0xfe, 0x73, 0xaf, 0x52, 0x40, 0x43, 0x4d, 0xcf, 0x54, 0xa3, 0x88, 0x99, 0x2e, 0xac, 0x36, 0xec, 0x84, 0x64, 0xd9, 0xa0, 0x42, 0xac, 0x58, 0xd1, 0x8a, 0x70, 0x39, 0x8b, 0x8a, 0x77, 0x3e, 0x66, 0x69, 0xbb, 0x3d, 0x76, 0xee, 0xac, 0xdf, 0x1f, 0xd1, 0x52, 0x47, 0x40, 0x99, 0xbf, 0xa6, 0x62, 0xa4, 0x81, 0xdb, 0xab, 0x4c, 0xa4, 0x67, 0x14, 0x95, 0x87, 0x45, 0xe2, 0xb7, 0x83, 0x2a, 0x59, 0xcc, 0xb0, 0x05, 0x36, 0x49, 0xb7, 0xe0, 0x95, 0x07, 0x43, 0x33, 0x3f, 0x5f, 0xcd, 0x6f, 0x65, 0x19, 0x7d, 0xdc, 0xb4, 0xe1, 0xbc, 0x12, 0xa6, 0x6e, 0x8e, 0x92, 0xa8, 0x65, 0x9f, 0xae, 0xe5, 0x71, 0x31, 0xe2 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 11.17", + /* Message */ + 31, + { 0xe5, 0x87, 0x9f, 0xfc, 0xe0, 0xb6, 0x29, 0xb8, 0x85, 0x7c, 0x19, 0x5c, 0xf5, 0xd0, 0x9f, 0x7b, 0x93, 0xbf, 0xf1, 0xf7, 0xa9, 0xf2, 0xd8, 0xa4, 0x5a, 0x56, 0x3b, 0xbb, 0xe9, 0xe6, 0x2d } +, + /* Seed */ + 95, + { 0xba, 0xce, 0x2c, 0xea, 0x0b, 0xfe, 0xc2, 0x5a, 0x2d, 0x34, 0xd7, 0x29, 0x92, 0xc2, 0xb8, 0xea, 0x0a, 0xea, 0x17, 0xb7, 0xa3, 0xa8, 0xbe, 0xd6, 0x0d, 0x1b, 0xb5, 0x10, 0x13, 0x34, 0x7b, 0x2d, 0x03, 0x6a, 0x75, 0xa4, 0xec, 0x3e, 0xb2, 0xc1, 0x78, 0x8d, 0x44, 0xa9, 0xe1, 0xc5, 0xc8, 0x8d, 0x04, 0x1e, 0x82, 0xaf, 0x87, 0x81, 0x55, 0xdd, 0xc7, 0xd8, 0x1b, 0x3e, 0x27, 0xcd, 0xdd, 0x20, 0x40, 0x9d, 0xbd, 0xda, 0x4a, 0x64, 0xbf, 0x83, 0x11, 0xa7, 0xb7, 0xeb, 0x77, 0x29, 0x93, 0x12, 0x66, 0x1a, 0x6e, 0x37, 0xdf, 0x35, 0x02, 0xf8, 0x6a, 0x22, 0x49, 0x2b, 0xef, 0xac, 0xf4 } +, + /* Encryption */ + 129, + { 0x01, 0xe4, 0xfa, 0xeb, 0xca, 0xb8, 0x9d, 0x7b, 0xaa, 0x3e, 0x03, 0x93, 0xf7, 0x16, 0x84, 0xb0, 0xae, 0x53, 0xdf, 0x8e, 0xb9, 0x87, 0x3e, 0x65, 0xa7, 0x16, 0xec, 0x2f, 0x41, 0x74, 0x1f, 0x8b, 0x78, 0x16, 0xd2, 0xe1, 0x97, 0xd9, 0x76, 0xfd, 0x53, 0xa8, 0xee, 0x7f, 0x92, 0x4b, 0xf4, 0xbf, 0xd4, 0x10, 0x42, 0xe1, 0x64, 0x45, 0xe9, 0x06, 0x0b, 0x55, 0xa0, 0xb6, 0xdc, 0x16, 0xaa, 0xf3, 0x06, 0x44, 0x91, 0xd1, 0x89, 0x28, 0x22, 0x39, 0x50, 0x39, 0x33, 0x28, 0xc1, 0x47, 0xdb, 0xd0, 0x35, 0x31, 0xec, 0x01, 0x2d, 0x8c, 0x52, 0x75, 0x02, 0xe7, 0xeb, 0x3d, 0xca, 0x50, 0x9b, 0x7d, 0xe1, 0x69, 0x95, 0x92, 0x46, 0x07, 0xc8, 0xb2, 0x8a, 0x2b, 0xda, 0x9b, 0xcb, 0x2c, 0x77, 0x81, 0x46, 0x1c, 0x76, 0x66, 0x3b, 0x88, 0x7b, 0x96, 0x43, 0xe2, 0x31, 0x7f, 0x0e, 0xa1, 0xd1, 0xbb, 0x14 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 11.18", + /* Message */ + 62, + { 0x0a, 0x2e, 0x24, 0x13, 0x0e, 0x8a, 0x9d, 0x28, 0xdf, 0xcb, 0x9d, 0xf9, 0x76, 0x5f, 0x46, 0x83, 0xe9, 0xda, 0x78, 0x42, 0x5a, 0x28, 0x19, 0x98, 0x06, 0xa9, 0x3b, 0x32, 0x2e, 0xfa, 0x88, 0x49, 0x3a, 0xc3, 0x72, 0x52, 0xc2, 0x9a, 0x26, 0x4f, 0x3e, 0x85, 0xae, 0x56, 0x53, 0x8e, 0x80, 0x8d, 0xc5, 0x56, 0x42, 0xa4, 0x88, 0x5f, 0x05, 0x46, 0x40, 0xf6, 0x9c, 0x89, 0x81, 0xfe } +, + /* Seed */ + 64, + { 0x20, 0x43, 0x1e, 0xf3, 0x1f, 0xce, 0x19, 0x93, 0x9d, 0xa5, 0x45, 0xa0, 0x85, 0x30, 0x11, 0x2d, 0xb0, 0xfa, 0x07, 0x13, 0x8d, 0xd8, 0x6d, 0xb1, 0xcc, 0x65, 0xe2, 0xb0, 0x3f, 0xc2, 0xbe, 0x60, 0x7c, 0x3e, 0x60, 0x38, 0xeb, 0xb7, 0x89, 0x17, 0x55, 0xb2, 0x31, 0x29, 0xfb, 0x96, 0x9a, 0x7f, 0xe1, 0x06, 0x10, 0xf2, 0xeb, 0xc3, 0xf0, 0x77, 0xb2, 0xc8, 0xf4, 0x60, 0x1e, 0x09, 0xab, 0x4c } +, + /* Encryption */ + 129, + { 0x0c, 0x14, 0xb7, 0xd3, 0x2d, 0x3d, 0x4c, 0xe2, 0xb0, 0x8e, 0xe4, 0x4f, 0x51, 0x6a, 0xee, 0x29, 0x90, 0xb6, 0x30, 0x52, 0x40, 0xb2, 0x5d, 0x23, 0x34, 0xaa, 0x31, 0x75, 0x2a, 0xef, 0x28, 0x02, 0x16, 0x39, 0xf7, 0x6a, 0x4c, 0x47, 0x19, 0x56, 0x9b, 0x30, 0x05, 0x2d, 0x4b, 0xd0, 0x8b, 0x3a, 0x07, 0xf2, 0x3b, 0xe6, 0x86, 0x23, 0x7e, 0x48, 0x1e, 0x67, 0xbf, 0x3f, 0x5a, 0x01, 0xad, 0xd7, 0x56, 0xda, 0x77, 0x2c, 0x7d, 0xc1, 0x3d, 0x32, 0x29, 0x8b, 0x9b, 0xbc, 0x3d, 0x33, 0xe6, 0xdf, 0x82, 0xd8, 0x5c, 0x08, 0x9d, 0x34, 0x76, 0x00, 0x49, 0x7a, 0x8b, 0x8e, 0xa4, 0xde, 0x68, 0xab, 0xb9, 0x0e, 0x5c, 0x6a, 0xeb, 0x26, 0x9a, 0x97, 0xbe, 0x42, 0x6c, 0xef, 0xac, 0xde, 0xbb, 0xcc, 0x0c, 0x1f, 0x2c, 0x40, 0x9b, 0xbc, 0x7c, 0x72, 0xd9, 0x0b, 0xdb, 0x42, 0x6b, 0x13, 0xcc, 0xc1, 0x9a } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 11.19", + /* Message */ + 63, + { 0x7e, 0xfc, 0x62, 0x7b, 0xa5, 0xfa, 0x28, 0x25, 0xaa, 0xe0, 0xca, 0x94, 0x03, 0x0e, 0x70, 0x47, 0x08, 0xd3, 0x5f, 0x92, 0x23, 0x98, 0x26, 0xb4, 0x2e, 0x2d, 0x4d, 0xbb, 0xe4, 0x02, 0xab, 0x7d, 0x19, 0x6a, 0x7f, 0x54, 0x88, 0x0c, 0xf2, 0xc5, 0xa4, 0xd0, 0xfc, 0xe5, 0x3a, 0x20, 0xa3, 0x2b, 0x68, 0x30, 0xe6, 0x2d, 0xcd, 0x00, 0xdb, 0xcb, 0xf3, 0x3b, 0x5c, 0x0c, 0x70, 0x44, 0x01 } +, + /* Seed */ + 63, + { 0xf0, 0x49, 0x79, 0x19, 0xc1, 0x42, 0xf3, 0xa9, 0x8e, 0xf5, 0x5b, 0xcd, 0x59, 0x88, 0x23, 0x4f, 0xdc, 0x8a, 0xeb, 0xf7, 0x36, 0xd4, 0x7a, 0xf9, 0x70, 0x90, 0xa7, 0xa9, 0xdd, 0xe0, 0xa7, 0x35, 0x09, 0xf9, 0xcd, 0x41, 0x36, 0x26, 0xbb, 0x8b, 0xa7, 0x67, 0xc9, 0xd6, 0x38, 0x49, 0x1c, 0x28, 0x6e, 0x67, 0xbf, 0x22, 0xd6, 0x70, 0xd5, 0x6b, 0x24, 0xc1, 0x5b, 0xad, 0x70, 0x35, 0x1e } +, + /* Encryption */ + 129, + { 0x01, 0xdb, 0xce, 0x3b, 0x3f, 0x84, 0xb2, 0xda, 0x06, 0xb1, 0x67, 0xe2, 0x06, 0x64, 0x9d, 0x42, 0x4a, 0x42, 0xb8, 0xe9, 0xea, 0x54, 0x53, 0xa1, 0x6b, 0x5f, 0xc6, 0xc2, 0xe9, 0xcb, 0x17, 0xed, 0xa1, 0xef, 0xfe, 0x4e, 0x78, 0x36, 0xa5, 0xe5, 0x8f, 0x99, 0xe5, 0x31, 0x53, 0x0b, 0x40, 0x17, 0x1e, 0x4b, 0x51, 0xfc, 0x0b, 0x92, 0xde, 0x30, 0x31, 0x30, 0x09, 0x36, 0xd2, 0x59, 0x5e, 0x39, 0x10, 0x09, 0xe2, 0xe5, 0x3c, 0x32, 0xf7, 0x59, 0x60, 0x4a, 0x6d, 0xba, 0xd9, 0xc9, 0x70, 0x90, 0x0f, 0xa6, 0xe4, 0x1a, 0x35, 0x08, 0x3f, 0x78, 0x7b, 0x9b, 0xf3, 0xbe, 0xbc, 0xea, 0xa1, 0xa7, 0x71, 0x84, 0x1b, 0x5e, 0x6e, 0x4c, 0x8b, 0x50, 0x96, 0x29, 0x00, 0x7b, 0x46, 0x7e, 0x3c, 0xec, 0x8a, 0x1d, 0x03, 0x23, 0xc3, 0xc5, 0xdb, 0xc3, 0x4d, 0x8d, 0x41, 0x25, 0xa3, 0x98, 0xc9, 0xd5, 0x3d } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 11.20", + /* Message */ + 15, + { 0x59, 0x3d, 0x3f, 0xcd, 0x05, 0xac, 0xee, 0x30, 0x29, 0x81, 0x5e, 0x1e, 0x76, 0xa8, 0x90 } +, + /* Seed */ + 111, + { 0x12, 0x35, 0xee, 0x3e, 0x7a, 0x9d, 0xf5, 0x96, 0x7f, 0xe9, 0x8d, 0x97, 0x10, 0xff, 0xdd, 0x5f, 0x7e, 0xb2, 0x2d, 0xc0, 0x71, 0x47, 0xaf, 0x43, 0x6f, 0xe2, 0x0a, 0xa5, 0x26, 0xbf, 0x0b, 0x94, 0x19, 0x0c, 0xab, 0xb5, 0x21, 0x3d, 0xe9, 0x8a, 0x23, 0xf5, 0xef, 0x27, 0x50, 0x22, 0xa2, 0xf7, 0x3e, 0x60, 0xe9, 0xef, 0xe2, 0xc0, 0x34, 0xc5, 0x5c, 0xeb, 0x26, 0xaa, 0x80, 0x6c, 0xde, 0xd6, 0x73, 0x9d, 0xdb, 0x2c, 0xbd, 0x3e, 0xc3, 0xb5, 0x55, 0x20, 0x4a, 0x79, 0x84, 0x65, 0xc3, 0x7c, 0x67, 0x57, 0x19, 0x56, 0x86, 0xa3, 0xea, 0x3c, 0x56, 0x57, 0xc3, 0x60, 0xa0, 0x15, 0x8d, 0x99, 0x2d, 0x4f, 0xeb, 0xfa, 0x04, 0x29, 0xee, 0xb7, 0xc9, 0x2a, 0x46, 0x84, 0x34, 0xc5, 0xb7 } +, + /* Encryption */ + 129, + { 0x0f, 0x69, 0x98, 0x81, 0xa1, 0x52, 0x46, 0x18, 0xbc, 0x25, 0xd4, 0xe5, 0x14, 0xe2, 0x07, 0x30, 0x68, 0xea, 0x7d, 0x35, 0x38, 0x4b, 0xaf, 0xd4, 0x6f, 0xc2, 0x82, 0xe1, 0xd8, 0x55, 0x11, 0x9e, 0xe9, 0x69, 0xf2, 0x11, 0xc7, 0x18, 0x4a, 0x07, 0x03, 0x06, 0x47, 0xfc, 0x40, 0x99, 0x0e, 0xcf, 0x2e, 0xa4, 0x05, 0x22, 0x86, 0x5d, 0x91, 0x77, 0x8a, 0x62, 0x7e, 0xca, 0x8e, 0x50, 0xc2, 0xbb, 0x97, 0x60, 0xb0, 0x45, 0xda, 0xaf, 0x12, 0x77, 0xa4, 0xfa, 0x98, 0x35, 0x76, 0xca, 0x8c, 0xfa, 0xd7, 0x60, 0x83, 0x29, 0xc1, 0x88, 0x15, 0x88, 0x01, 0x7d, 0x63, 0x72, 0x2b, 0x70, 0xe9, 0x8b, 0xe5, 0x24, 0xe0, 0x03, 0x39, 0x95, 0x98, 0x25, 0x73, 0xd3, 0x38, 0x70, 0x78, 0xc8, 0xb7, 0xc1, 0xc5, 0xf9, 0xae, 0xf2, 0x64, 0xa0, 0x48, 0x46, 0x84, 0xb3, 0x42, 0x66, 0x43, 0x73, 0x7d, 0x34, 0xbb } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 12: A 1030-bit RSA key pair", +{ + /* Modulus */ + 129, + { 0x26, 0x1f, 0xe0, 0x28, 0x44, 0x59, 0xc2, 0xfa, 0x6f, 0x05, 0x54, 0x6b, 0xed, 0x58, 0x5e, 0x1e, 0xe0, 0xa1, 0x30, 0xb7, 0x1c, 0x2b, 0x8a, 0x6f, 0xbb, 0x3b, 0xdc, 0x75, 0x78, 0x7b, 0x26, 0x55, 0xd0, 0xed, 0x4e, 0x32, 0x5b, 0x54, 0xc7, 0xb3, 0x71, 0xa6, 0xfc, 0xf2, 0xb6, 0x78, 0x82, 0x77, 0xa5, 0x0d, 0x47, 0x05, 0xba, 0x23, 0xc5, 0x96, 0x28, 0x5d, 0xa7, 0xe3, 0xc9, 0x30, 0x4a, 0x41, 0xe7, 0xcc, 0x48, 0x8b, 0x44, 0x92, 0x2f, 0x7b, 0xe2, 0xb4, 0x7c, 0x16, 0x31, 0x9e, 0x33, 0x74, 0x51, 0x17, 0x3d, 0x40, 0xb1, 0xea, 0x48, 0x1d, 0x1a, 0x9c, 0x11, 0x29, 0xb1, 0xfe, 0xb7, 0xd0, 0x9f, 0x67, 0x49, 0x7a, 0xeb, 0x98, 0x94, 0x8f, 0x1a, 0xbf, 0x3b, 0x77, 0x86, 0xbd, 0x3b, 0x87, 0x04, 0x71, 0x87, 0xc8, 0xf3, 0x70, 0x15, 0x68, 0x2b, 0x3f, 0x2d, 0xe5, 0x0e, 0x07, 0x8e, 0x8d, 0x0f } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 129, + { 0x05, 0xdf, 0x76, 0x83, 0x72, 0xcc, 0x0a, 0x64, 0xd3, 0xc2, 0x14, 0x18, 0x30, 0x24, 0x23, 0x13, 0x9f, 0x47, 0x95, 0x73, 0xe5, 0x0b, 0x5c, 0x09, 0xb6, 0xe3, 0xbe, 0x23, 0xfb, 0xc9, 0xaa, 0x1a, 0x76, 0xd3, 0x27, 0x99, 0xa0, 0x47, 0x76, 0x1f, 0xfc, 0x21, 0x07, 0x94, 0x48, 0x17, 0x01, 0x04, 0xcc, 0xa5, 0xe2, 0xa1, 0x4c, 0xe4, 0x57, 0xd0, 0x0d, 0x80, 0x7d, 0x42, 0xc7, 0x6a, 0x55, 0xf6, 0x16, 0x87, 0x4b, 0xa7, 0xf7, 0xea, 0xa1, 0xce, 0x63, 0xcb, 0xf1, 0x32, 0xde, 0xb0, 0x81, 0xaa, 0xd2, 0xfd, 0x80, 0xd1, 0x24, 0xc4, 0xda, 0x86, 0xec, 0x6c, 0x02, 0x0e, 0x8c, 0xa8, 0x2d, 0xcd, 0xcd, 0x35, 0x54, 0xe6, 0x9b, 0xb1, 0x98, 0x72, 0x26, 0x2a, 0x50, 0x31, 0xab, 0x5d, 0xb7, 0xcc, 0x8c, 0x92, 0x59, 0xa1, 0x46, 0xd5, 0x8b, 0x1d, 0xb9, 0x4c, 0xc7, 0xe7, 0x56, 0x25, 0x3d, 0x5a, 0xa1 } +, + /* Prime 1 */ + 65, + { 0x06, 0x77, 0x25, 0xab, 0x55, 0x34, 0x18, 0xe1, 0xeb, 0x8a, 0x41, 0xf4, 0xfd, 0x92, 0xd2, 0x80, 0xb6, 0x9f, 0x85, 0xb0, 0x8c, 0xb4, 0x02, 0xf0, 0x1a, 0xa4, 0x96, 0x92, 0xc7, 0x20, 0x9b, 0x36, 0x42, 0x98, 0xee, 0xf4, 0xe3, 0x3d, 0xc4, 0x22, 0xbb, 0xa3, 0x35, 0x03, 0xd1, 0x1a, 0x12, 0x7d, 0xd2, 0x86, 0x43, 0xf7, 0xe7, 0x75, 0x58, 0x97, 0xe2, 0xeb, 0x96, 0xc4, 0xdd, 0xbb, 0x91, 0x12, 0xf1 } +, + /* Prime 2 */ + 65, + { 0x05, 0xe5, 0x8c, 0xeb, 0xd4, 0x7d, 0x87, 0xb1, 0xe7, 0x8d, 0xa2, 0xfe, 0xee, 0x6d, 0xc5, 0xf9, 0xbf, 0xa2, 0x20, 0xc3, 0x55, 0xe8, 0x20, 0xc8, 0xfb, 0xaa, 0x88, 0x46, 0xdf, 0x11, 0x00, 0x36, 0x2c, 0xd1, 0x69, 0x1f, 0x5c, 0xbf, 0x5c, 0x78, 0x68, 0xc4, 0x72, 0xd0, 0x28, 0x2a, 0xbe, 0x01, 0x03, 0x16, 0x1f, 0x4d, 0x8c, 0x62, 0xaf, 0xf3, 0x5b, 0xb1, 0xfb, 0x7c, 0xc6, 0x99, 0xd9, 0x9f, 0xff } +, + /* Prime exponent 1 */ + 65, + { 0x01, 0x6c, 0xc9, 0x14, 0x95, 0xd6, 0xc1, 0x95, 0x29, 0x40, 0x73, 0x80, 0xf7, 0x52, 0x20, 0xaa, 0xd5, 0x95, 0x1a, 0xf5, 0xea, 0x4c, 0xd2, 0x48, 0xf0, 0xd6, 0x4d, 0x89, 0x53, 0xf1, 0xcf, 0xc3, 0x89, 0xb2, 0x03, 0x18, 0x5d, 0xed, 0x03, 0x09, 0x54, 0xa9, 0x87, 0xc9, 0xab, 0x90, 0x3f, 0x7b, 0x13, 0xa7, 0x1b, 0xdb, 0xcb, 0x5b, 0x85, 0x87, 0x14, 0x30, 0x30, 0x2e, 0x7b, 0x60, 0x17, 0x7d, 0x41 } +, + /* Prime exponent 2 */ + 64, + { 0xf9, 0xcc, 0x89, 0x15, 0xff, 0xb3, 0xdd, 0xc7, 0xc0, 0x93, 0x71, 0x76, 0x49, 0x2a, 0x12, 0xbb, 0x18, 0x7c, 0x2d, 0x76, 0xe0, 0xd3, 0xd4, 0x0e, 0x79, 0x58, 0xd5, 0xc9, 0x82, 0x09, 0xb3, 0xed, 0x54, 0xb5, 0xfd, 0x9f, 0x9e, 0x77, 0x11, 0xe1, 0xdc, 0x68, 0x57, 0x73, 0xde, 0x26, 0xd5, 0x0a, 0x0a, 0xb6, 0x21, 0x62, 0x12, 0xce, 0xa5, 0x09, 0xce, 0x79, 0x1c, 0x5b, 0xcd, 0x07, 0xcb, 0x47 } +, + /* Coefficient */ + 65, + { 0x05, 0xfe, 0x93, 0x3b, 0x87, 0x3f, 0x1d, 0x68, 0xf6, 0xbe, 0x2d, 0x4d, 0x5a, 0xa2, 0x2d, 0x96, 0x8f, 0x2b, 0x7a, 0xf5, 0x41, 0xa2, 0xdc, 0xd6, 0x4e, 0x09, 0xc0, 0x30, 0xb1, 0x50, 0x35, 0x8a, 0x98, 0x02, 0xae, 0x86, 0x59, 0x95, 0xd7, 0x6a, 0x50, 0x03, 0x7d, 0x19, 0x8d, 0x7e, 0x70, 0x4d, 0x26, 0x84, 0x7a, 0xda, 0x8a, 0xe3, 0xd3, 0x85, 0xc2, 0x96, 0x5f, 0xb1, 0x7f, 0xcf, 0x15, 0x2f, 0x77 } + +} +, +{{ + "PKCS#1 v1.5 Encryption Example 12.1", + /* Message */ + 20, + { 0x7d, 0xe6, 0x9c, 0xd9, 0x22, 0x8b, 0xbc, 0xfb, 0x9a, 0x8c, 0xa8, 0xc6, 0xc3, 0xef, 0xaf, 0x05, 0x6f, 0xe4, 0xa7, 0xf4 } +, + /* Seed */ + 106, + { 0x33, 0xd6, 0x2c, 0xd6, 0x67, 0x82, 0x3f, 0xbf, 0x13, 0xd5, 0x92, 0xae, 0x4d, 0x02, 0xa2, 0x37, 0x0d, 0x1d, 0x99, 0xdb, 0x06, 0xc7, 0x25, 0x42, 0x5e, 0x0d, 0x12, 0xfc, 0xb4, 0x83, 0x4e, 0xf9, 0xe5, 0x49, 0x9d, 0x60, 0x7e, 0x8a, 0xae, 0xfe, 0xba, 0x81, 0x96, 0x49, 0xfb, 0x3d, 0x61, 0xc7, 0x05, 0xf5, 0xe9, 0xa3, 0xa2, 0xf8, 0x96, 0x27, 0x61, 0x89, 0xa3, 0x20, 0x0d, 0x2f, 0xaf, 0xf7, 0x76, 0x79, 0xe0, 0x56, 0x34, 0x9a, 0x5b, 0x9b, 0x7b, 0x44, 0x49, 0xb6, 0x75, 0xcd, 0x48, 0xb6, 0x98, 0x09, 0x32, 0xc2, 0xcf, 0xc4, 0x6b, 0xf8, 0x9a, 0x77, 0x34, 0xf6, 0x8d, 0xd9, 0xf4, 0xfe, 0x77, 0xe1, 0xd9, 0xcf, 0x1f, 0x31, 0xb2, 0x1c, 0x4c, 0x61 } +, + /* Encryption */ + 129, + { 0x04, 0xca, 0xef, 0xfc, 0xd5, 0x1c, 0x3f, 0xc9, 0x23, 0x63, 0x46, 0x77, 0x4d, 0xa0, 0xcf, 0xa7, 0x7e, 0x9e, 0x64, 0x65, 0xf6, 0x43, 0x7f, 0xf4, 0x6d, 0x9f, 0xa4, 0x58, 0xb3, 0x62, 0x34, 0x12, 0xc3, 0x10, 0x30, 0x09, 0xfb, 0xfe, 0x20, 0x31, 0x96, 0xdf, 0x72, 0x96, 0x26, 0xe0, 0xee, 0x3a, 0xfb, 0x6b, 0x10, 0xa5, 0xac, 0xd7, 0x2e, 0x84, 0x28, 0x1d, 0x9d, 0x9b, 0xcb, 0xa3, 0xe0, 0xef, 0x77, 0xdd, 0x84, 0xf3, 0xdb, 0x19, 0x2d, 0x31, 0xb5, 0xb6, 0x66, 0xf7, 0x6c, 0x93, 0x81, 0x06, 0x81, 0x37, 0x3b, 0xaa, 0x58, 0xe6, 0xda, 0xdb, 0x01, 0xfa, 0x5c, 0x65, 0xec, 0x89, 0xfa, 0x51, 0xcc, 0x24, 0x74, 0x61, 0x1b, 0x9a, 0x7c, 0xb0, 0x0e, 0x86, 0x2f, 0xd3, 0xd4, 0x9b, 0x1c, 0xd3, 0x1a, 0xfc, 0x2d, 0xb4, 0x49, 0xe0, 0x9d, 0xae, 0x2d, 0x0a, 0x7d, 0x4d, 0xf0, 0xbc, 0x32, 0x0b, 0x5a } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Encryption Example 12.2", + /* Message */ + 47, + { 0x97, 0xee, 0xa8, 0x56, 0xa9, 0xbd, 0xbc, 0x71, 0x4e, 0xb3, 0xac, 0x22, 0xf6, 0xeb, 0x32, 0x71, 0x96, 0x69, 0xc4, 0x2f, 0x94, 0x30, 0xc5, 0x89, 0x50, 0xc6, 0x4c, 0x0d, 0xab, 0xff, 0x3a, 0x9e, 0x20, 0x43, 0x41, 0x6c, 0x67, 0xca, 0xaa, 0xab, 0x7c, 0x68, 0xcc, 0xb3, 0xca, 0x99, 0xa3 } +, + /* Seed */ + 79, + { 0x9f, 0x14, 0x12, 0x61, 0xce, 0xc4, 0xf2, 0xc5, 0x2f, 0x96, 0x91, 0x25, 0xa3, 0x6f, 0x14, 0x10, 0x27, 0x08, 0x82, 0x50, 0xd3, 0x6b, 0x17, 0x42, 0x1c, 0xd0, 0x96, 0x14, 0x76, 0x19, 0x06, 0x46, 0x8a, 0xfa, 0xb7, 0x62, 0x2c, 0x0d, 0x02, 0x19, 0x36, 0x91, 0x74, 0x47, 0x91, 0xe0, 0xd3, 0x5b, 0x6b, 0xc9, 0xf3, 0x37, 0x7e, 0x10, 0xb2, 0x85, 0x6c, 0x8e, 0xd9, 0x19, 0x9c, 0x89, 0xf4, 0xa4, 0x16, 0x13, 0xd3, 0xc4, 0x0c, 0xca, 0x37, 0x3a, 0x7c, 0xc6, 0x3c, 0x52, 0x60, 0xfe, 0x5a } +, + /* Encryption */ + 129, + { 0x0d, 0x26, 0xa0, 0x5d, 0xe9, 0x3b, 0x70, 0x7b, 0x85, 0x40, 0xfd, 0xc1, 0x98, 0x89, 0xd2, 0xd1, 0xe7, 0x93, 0x71, 0x57, 0xd3, 0x2d, 0x30, 0x3c, 0x52, 0x8d, 0xe3, 0x5e, 0x55, 0x3f, 0x94, 0x20, 0x28, 0x74, 0x4a, 0xf6, 0xa0, 0x40, 0x2e, 0xca, 0x0f, 0xcf, 0x5a, 0x85, 0x26, 0x1a, 0xd4, 0x75, 0xd8, 0x71, 0x0c, 0xc9, 0xf8, 0xb1, 0x1b, 0xa2, 0xc6, 0xda, 0xf1, 0xd6, 0x72, 0x69, 0x0c, 0x68, 0xed, 0x11, 0xe0, 0x35, 0xe9, 0xc6, 0x60, 0xec, 0xe1, 0xd8, 0x0c, 0xda, 0xb8, 0x00, 0xea, 0xd3, 0xc6, 0xe0, 0x78, 0x61, 0x7a, 0x1b, 0x0d, 0x27, 0x3d, 0xed, 0xd8, 0xd6, 0x57, 0x49, 0x16, 0x6b, 0xd0, 0x77, 0x74, 0xfb, 0x4c, 0x14, 0x86, 0xaa, 0x8a, 0x0a, 0xdf, 0x59, 0x5d, 0xbc, 0x3d, 0x10, 0xff, 0xae, 0xf1, 0x83, 0x84, 0x98, 0xa6, 0x75, 0x55, 0xc7, 0x7b, 0x6e, 0xd9, 0x83, 0xd5, 0xb9, 0xde } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 12.3", + /* Message */ + 5, + { 0x8e, 0x3e, 0x77, 0x2f, 0x39 } +, + /* Seed */ + 121, + { 0x9e, 0xb7, 0x31, 0xfa, 0x6d, 0x8d, 0x5b, 0x75, 0x81, 0xf8, 0xfa, 0xd2, 0xc8, 0x22, 0x5b, 0xc9, 0x68, 0x34, 0xaf, 0x61, 0xdb, 0x3d, 0x40, 0x9d, 0xd5, 0x63, 0x04, 0xae, 0x23, 0xea, 0x62, 0x69, 0x63, 0xa4, 0xd8, 0x04, 0x40, 0xc2, 0x4e, 0x43, 0x1e, 0x41, 0x97, 0x60, 0x90, 0x3a, 0xc4, 0x4b, 0xfe, 0x41, 0xa7, 0x50, 0x81, 0xa5, 0x46, 0x2b, 0xae, 0x65, 0x47, 0xc0, 0xe7, 0xa0, 0x6e, 0x91, 0x60, 0xdf, 0x9c, 0x01, 0xfa, 0x6c, 0x53, 0x54, 0xc8, 0x33, 0x18, 0xdb, 0x65, 0x6d, 0xee, 0x0a, 0x43, 0x77, 0x87, 0xfa, 0x46, 0x39, 0x4e, 0x55, 0x2e, 0xa5, 0x33, 0x15, 0x59, 0xb4, 0x01, 0x7b, 0xb6, 0xa0, 0xe1, 0xd6, 0xfc, 0x8a, 0x65, 0xb4, 0x5d, 0xa0, 0xc4, 0x5d, 0x88, 0x95, 0x48, 0x61, 0xcd, 0x6e, 0x7a, 0x41, 0x7e, 0x03, 0x7b, 0x1b, 0x05 } +, + /* Encryption */ + 129, + { 0x24, 0x4a, 0x86, 0x34, 0x51, 0x9a, 0xf4, 0x9f, 0x56, 0x9b, 0x69, 0x86, 0xab, 0x47, 0x79, 0x64, 0xa6, 0xb2, 0x92, 0x0d, 0x84, 0x3a, 0x1d, 0x97, 0xef, 0xd7, 0xfe, 0xf8, 0x3e, 0x81, 0xba, 0xda, 0x4c, 0x4b, 0x56, 0x29, 0x61, 0xef, 0x4e, 0x1f, 0xc3, 0x33, 0x46, 0x4b, 0x92, 0x6b, 0xd7, 0x4b, 0x07, 0xad, 0x50, 0xc6, 0x5b, 0x68, 0x16, 0x83, 0xd3, 0x89, 0xfe, 0x41, 0xd6, 0xd2, 0x13, 0xb6, 0x46, 0x9f, 0x18, 0x2b, 0x14, 0xb4, 0x62, 0xd7, 0x2c, 0x1c, 0xe3, 0x92, 0x8c, 0xa8, 0x06, 0xd9, 0x66, 0xb5, 0x2d, 0x42, 0xd0, 0xbf, 0xd6, 0x0c, 0x9d, 0x04, 0x91, 0x4d, 0x50, 0x83, 0x7c, 0xda, 0xe0, 0x9b, 0x33, 0x0e, 0x37, 0x27, 0x44, 0xdc, 0xe1, 0x7f, 0x18, 0xe9, 0x4d, 0x71, 0x1c, 0x8b, 0x58, 0xea, 0x44, 0x9f, 0x14, 0x49, 0xd3, 0x69, 0xfa, 0xef, 0x51, 0x46, 0x83, 0xd3, 0x01, 0x60, 0x79 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 12.4", + /* Message */ + 20, + { 0xdc, 0xfa, 0xe7, 0x71, 0x8c, 0x24, 0x7c, 0x40, 0xf9, 0xa2, 0xa3, 0xc3, 0x53, 0x5c, 0x50, 0x92, 0x80, 0xc8, 0x73, 0xc3 } +, + /* Seed */ + 106, + { 0xb9, 0x3b, 0xbe, 0xa6, 0xc1, 0x85, 0x3f, 0x15, 0x3b, 0x5e, 0x01, 0xe7, 0xe4, 0xe5, 0xd0, 0xc6, 0x3d, 0x9d, 0xfb, 0x24, 0x5f, 0xc6, 0xcf, 0x64, 0x04, 0x3d, 0x7a, 0x92, 0x20, 0xb0, 0xb8, 0x1a, 0xc2, 0xaf, 0x65, 0x6b, 0x99, 0x71, 0x4b, 0xa4, 0x30, 0xe0, 0xa3, 0x96, 0x95, 0xd2, 0x5f, 0xf2, 0x69, 0xb0, 0xb9, 0xb8, 0x65, 0xfc, 0x4d, 0x4e, 0xee, 0x5e, 0x07, 0xa5, 0xb5, 0xbe, 0x35, 0x43, 0x82, 0xaa, 0xa4, 0x14, 0xbc, 0x62, 0x08, 0x54, 0x5c, 0x86, 0xce, 0x02, 0x38, 0x8c, 0x07, 0xb3, 0x76, 0xfb, 0x02, 0x98, 0xc3, 0x7d, 0x1a, 0xc3, 0x9e, 0xa1, 0x89, 0xb0, 0xad, 0xf7, 0x80, 0xf6, 0xe8, 0x30, 0xbc, 0xe9, 0x17, 0xb5, 0x0a, 0xdb, 0x7a, 0x31 } +, + /* Encryption */ + 129, + { 0x0c, 0x41, 0x20, 0x52, 0xd4, 0xef, 0x4a, 0xb5, 0x1b, 0x2f, 0x62, 0x37, 0x05, 0xf0, 0x7f, 0x41, 0xfa, 0xd6, 0x4d, 0xaf, 0xfd, 0xba, 0x62, 0x44, 0xef, 0xd4, 0x7f, 0x51, 0x9d, 0xe2, 0xe7, 0x1a, 0x01, 0xa6, 0xc5, 0x7d, 0x1f, 0x28, 0xb6, 0xbf, 0x7b, 0x5c, 0x8d, 0xbb, 0x9f, 0xe7, 0xb1, 0x49, 0xb0, 0xeb, 0xaa, 0x53, 0x59, 0x61, 0x99, 0x37, 0x6d, 0xf4, 0x90, 0x32, 0x3d, 0x25, 0xc2, 0x17, 0xbc, 0x71, 0xbe, 0x37, 0xf1, 0x81, 0x03, 0x5c, 0xf4, 0x57, 0xeb, 0x5c, 0x06, 0xd6, 0xa3, 0xde, 0xd3, 0xd6, 0x6d, 0x5b, 0x35, 0xf0, 0x61, 0x81, 0xbf, 0x94, 0xd0, 0xec, 0x13, 0xec, 0x44, 0x7c, 0x70, 0x82, 0x33, 0x49, 0x1c, 0x55, 0x4f, 0x9e, 0x99, 0x1f, 0x6b, 0xcb, 0x8b, 0x78, 0xd3, 0x3c, 0x9c, 0x36, 0x95, 0x5b, 0x8d, 0xce, 0x51, 0x79, 0xff, 0x8b, 0xc5, 0x92, 0x44, 0xf6, 0x67, 0x90, 0x87 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 12.5", + /* Message */ + 42, + { 0xd7, 0x1d, 0xd8, 0x7a, 0x13, 0x99, 0x1a, 0x0d, 0xa2, 0xc7, 0x4a, 0x58, 0xb0, 0x48, 0x56, 0x34, 0xb3, 0xe0, 0x4f, 0xec, 0x9e, 0x3f, 0x1c, 0xf2, 0x60, 0x4a, 0x93, 0xbe, 0xd7, 0x96, 0x96, 0xfa, 0x63, 0x78, 0xeb, 0x1b, 0xa0, 0xe5, 0xd2, 0x04, 0x70, 0xa4 } +, + /* Seed */ + 84, + { 0x09, 0x90, 0x59, 0x92, 0x58, 0xe9, 0x7a, 0x2e, 0xbf, 0xbe, 0x10, 0x97, 0x72, 0x25, 0xc4, 0x16, 0x76, 0x2e, 0x95, 0xd2, 0x55, 0x3a, 0x80, 0x1f, 0x72, 0x6c, 0xc2, 0x49, 0xbc, 0xdf, 0x32, 0x21, 0x32, 0x58, 0x57, 0x19, 0xfc, 0x12, 0x39, 0x9a, 0xcd, 0x72, 0x54, 0xae, 0x77, 0xda, 0x34, 0x3f, 0xe2, 0xa9, 0xa3, 0xac, 0xb1, 0x1c, 0x14, 0xe2, 0x14, 0xe2, 0xd8, 0x5a, 0x76, 0x70, 0x8c, 0x3e, 0x72, 0x17, 0x3d, 0xa5, 0xd9, 0x90, 0x58, 0xe0, 0xc8, 0x70, 0x9e, 0xdf, 0x28, 0xc3, 0x69, 0x38, 0x76, 0x9f, 0x1f, 0x22 } +, + /* Encryption */ + 129, + { 0x0f, 0xf9, 0xcc, 0xe7, 0xb6, 0x9d, 0x7f, 0xca, 0x48, 0xd7, 0xc4, 0xf6, 0xcc, 0xff, 0x24, 0x8c, 0x3d, 0xb8, 0x8b, 0xf1, 0xb7, 0x85, 0x2c, 0xd9, 0xd8, 0x52, 0x5c, 0x3b, 0x41, 0xe4, 0x4a, 0x9b, 0x54, 0x0f, 0x20, 0x8f, 0xfb, 0xb8, 0xc8, 0x5b, 0xfa, 0x89, 0x0a, 0xc0, 0x2e, 0x99, 0x49, 0x59, 0xd6, 0xb0, 0x7f, 0x64, 0x81, 0x40, 0x78, 0x55, 0x6f, 0x8e, 0xc6, 0x0d, 0xb3, 0x57, 0xac, 0xea, 0xf8, 0x39, 0x11, 0x5f, 0xad, 0x41, 0xf8, 0x91, 0x8d, 0x69, 0xc2, 0x1a, 0x3a, 0xff, 0xef, 0x6e, 0xb1, 0x4a, 0x5d, 0x2c, 0xd0, 0x64, 0x5c, 0xd7, 0x06, 0xb5, 0x81, 0x43, 0x39, 0x4a, 0x27, 0x35, 0x36, 0x82, 0xe3, 0xba, 0xa1, 0x98, 0x00, 0x2e, 0x16, 0x80, 0xf2, 0x8f, 0x34, 0xbe, 0x08, 0x9a, 0x57, 0x84, 0xac, 0xe5, 0xca, 0x6b, 0x11, 0x08, 0x99, 0xdf, 0xb9, 0x58, 0x2f, 0x2e, 0x4b, 0x2a, 0x40 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 12.6", + /* Message */ + 58, + { 0x5e, 0x4b, 0x15, 0x8f, 0x8d, 0xcb, 0xcd, 0xd7, 0xe3, 0x08, 0x38, 0x5b, 0x40, 0x19, 0x0f, 0x5d, 0xef, 0x8c, 0xf3, 0x30, 0x5f, 0xc4, 0x9d, 0xe6, 0x3c, 0x9e, 0x35, 0xb4, 0x02, 0x36, 0xae, 0xe1, 0xf4, 0x56, 0x20, 0x5a, 0x52, 0x67, 0xa2, 0xaa, 0x7d, 0x88, 0xcb, 0x2c, 0x11, 0xaf, 0x7f, 0x28, 0x99, 0xd0, 0x1d, 0xa1, 0xb2, 0xc7, 0x46, 0x6f, 0xfe, 0xf7 } +, + /* Seed */ + 68, + { 0xa5, 0x22, 0xf9, 0x80, 0x8d, 0x9c, 0x01, 0xd8, 0xff, 0x79, 0x77, 0x5f, 0x7b, 0x22, 0x09, 0x8f, 0xc5, 0xfe, 0x32, 0x54, 0xe1, 0xb0, 0x4e, 0xb1, 0xcb, 0x85, 0x0e, 0x10, 0xe2, 0xc5, 0x06, 0x5e, 0x23, 0x27, 0x4d, 0xc0, 0xa0, 0x55, 0x87, 0x43, 0x6d, 0xa3, 0x75, 0x59, 0x33, 0x5f, 0xe7, 0x09, 0x3f, 0xa5, 0xe7, 0xa2, 0xa9, 0xc9, 0xa4, 0xdc, 0xaf, 0x23, 0x51, 0x79, 0xd0, 0xe9, 0x8f, 0xa3, 0x3e, 0x34, 0xb6, 0x16 } +, + /* Encryption */ + 129, + { 0x1c, 0x0e, 0x86, 0xa6, 0x36, 0x6b, 0xeb, 0x1e, 0x12, 0xd6, 0xbc, 0xfa, 0x6a, 0xd4, 0x94, 0x06, 0xc8, 0xb7, 0xe4, 0x8d, 0x1d, 0x5b, 0xe4, 0x5c, 0xbd, 0x83, 0x19, 0x49, 0x87, 0x49, 0x6f, 0xaa, 0x3e, 0x21, 0x92, 0x7e, 0xc6, 0x62, 0xf5, 0x02, 0xac, 0x3f, 0x91, 0xa4, 0xb4, 0xb9, 0x1d, 0x16, 0x0c, 0x19, 0x86, 0xa5, 0xed, 0x09, 0x27, 0x66, 0x88, 0x3b, 0x85, 0x55, 0xe3, 0xc9, 0x31, 0x4b, 0x44, 0xba, 0x33, 0x83, 0xdb, 0x28, 0x74, 0x23, 0xaf, 0x91, 0xb4, 0x13, 0x91, 0x8c, 0x08, 0x02, 0xc7, 0x77, 0x8e, 0x46, 0xc2, 0x96, 0xdc, 0x9f, 0x04, 0xcd, 0xb8, 0xb0, 0x6a, 0xdc, 0x7c, 0x53, 0xd8, 0x59, 0xf4, 0x42, 0xcc, 0xbd, 0x5f, 0xfa, 0xb5, 0xaf, 0x75, 0x2b, 0x97, 0x9b, 0xf5, 0x23, 0xa4, 0x0a, 0x1d, 0x08, 0xd7, 0x60, 0x63, 0xff, 0xb3, 0xd5, 0xcf, 0xc8, 0x2f, 0x15, 0xeb, 0xd6, 0xd4 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 12.7", + /* Message */ + 58, + { 0x35, 0x9b, 0xa5, 0x07, 0x56, 0xa8, 0x03, 0x30, 0x40, 0x9d, 0x3f, 0x23, 0x6a, 0x34, 0x0b, 0x90, 0xf4, 0x2f, 0x73, 0x2a, 0x87, 0x71, 0x1f, 0xe2, 0x23, 0x52, 0xd4, 0xc8, 0x25,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 0x3b, 0x41, 0xd1, 0x35, 0xb4, 0x9a, 0x02, 0xb0, 0x0e, 0xff, 0xc7, 0x61, 0xec, 0x90, 0x94, 0x23, 0xaf, 0x15, 0x85, 0x52, 0x37, 0xb7, 0x7e, 0xe0, 0x7d, 0xf2, 0x5a, 0xb4, 0xe8, 0x58, 0x46, 0x7d, 0x4c, 0xcf, 0xe8, 0x08, 0x43, 0x24, 0x1b, 0xbf, 0x88, 0xeb, 0x4f, 0x85, 0x3e, 0xf4, 0xb4, 0x3b, 0xa3, 0xac } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 12.8", + /* Message */ + 25, + { 0xa9, 0xf3, 0x9f, 0x8b, 0xa0, 0x64, 0x66, 0x25, 0x0c, 0x26, 0x5d, 0xf0, 0xca, 0x46, 0x57, 0x0a, 0x16, 0x01, 0x12, 0xcf, 0x38, 0xfd, 0x74, 0x59, 0x99 } +, + /* Seed */ + 101, + { 0x88, 0xb3, 0xc2, 0x8b, 0xd3, 0x99, 0x9a, 0x86, 0x0b, 0x8d, 0xe7, 0x75, 0x93, 0x5b, 0x8e, 0xd7, 0x8f, 0xa2, 0xf2, 0x7c, 0x26, 0x8b, 0x24, 0x3a, 0x02, 0x45, 0xaf, 0x86, 0x72, 0x25, 0x47, 0x19, 0xf2, 0x3a, 0x4b, 0x7f, 0xed, 0xc0, 0x0d, 0x54, 0xe1, 0x2e, 0x9d, 0x70, 0x1f, 0x64, 0x69, 0x94, 0x24, 0xb6, 0xb8, 0x7d, 0x14, 0xd9, 0x67, 0x6e, 0xfa, 0x95, 0x9b, 0xe2, 0x1a, 0x04, 0xb6, 0x43, 0x5d, 0x25, 0x10, 0x03, 0xdd, 0x15, 0x3d, 0x7d, 0x08, 0xff, 0x28, 0xd9, 0x3a, 0x93, 0x20, 0xdc, 0x1b, 0xbc, 0x3d, 0xb3, 0x97, 0xa5, 0x48, 0x94, 0xf2, 0x05, 0x79, 0xf9, 0x3e, 0x4e, 0xad, 0x65, 0xc3, 0x1a, 0x40, 0x7e, 0xb4 } +, + /* Encryption */ + 129, + { 0x19, 0x83, 0x96, 0x50, 0xb9, 0x25, 0xf1, 0xf9, 0x6d, 0x61, 0x1e, 0x4d, 0xbb, 0x91, 0x49, 0x93, 0x54, 0x5c, 0x67, 0x39, 0x0c, 0x32, 0x93, 0x5f, 0xbf, 0x82, 0x25, 0x9d, 0xad, 0x10, 0xf2, 0x37, 0x30, 0xeb, 0x48, 0xf3, 0x42, 0x00, 0x46, 0x5a, 0x20, 0x38, 0x72, 0x77, 0xe2, 0xb9, 0x61, 0xe0, 0x83, 0x18, 0xd2, 0x07, 0x74, 0x47, 0xc9, 0x10, 0x92, 0x71, 0xe4, 0xde, 0xd8, 0xff, 0x3d, 0xc4, 0xf3, 0x79, 0xee, 0xe4, 0x55, 0xae, 0x96, 0x08, 0x1a, 0x1a, 0xe2, 0x4b, 0x96, 0xca, 0x73, 0x0a, 0x62, 0xf7, 0xac, 0xc5, 0xa5, 0xea, 0x52, 0x28, 0xe3, 0xa4, 0x8e, 0xa6, 0x74, 0x1c, 0xb3, 0x0e, 0x82, 0x9d, 0x55, 0x09, 0xcc, 0xc6, 0xc2, 0x87, 0xc7, 0x29, 0x1f, 0x3a, 0x1d, 0x89, 0xd6, 0x26, 0xbc, 0x98, 0x15, 0x77, 0xde, 0x52, 0xa1, 0x1f, 0x12, 0xae, 0x21, 0x43, 0xd3, 0xb0, 0xb5, 0x2f, 0x86 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 12.9", + /* Message */ + 1, + { 0x68 } +, + /* Seed */ + 125, + { 0x53, 0x8b, 0x09, 0x5e, 0x4f, 0x2a, 0xd6, 0x77, 0x30, 0x68, 0x74, 0x21, 0x91, 0x52, 0x42, 0x25, 0x1d, 0x07, 0xf6, 0x61, 0xed, 0xac, 0x7f, 0xe7, 0x9e, 0x31, 0xd6, 0xc3, 0x45, 0xaf, 0xf5, 0x9d, 0xf3, 0x88, 0xc7, 0x18, 0x2f, 0xff, 0x0c, 0x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, 0xf5, 0xd9, 0x30, 0x63, 0xf4, 0x90, 0x17, 0x00, 0x3b, 0x23, 0x09, 0xca, 0x7d, 0x8d, 0x36, 0x70, 0x3b, 0xfd, 0xda, 0x3f, 0x7f, 0x43, 0xdf, 0x15, 0x8a, 0x15, 0xbb, 0x22, 0x13, 0x9a, 0xae, 0x15, 0x10, 0x77 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 12.10", + /* Message */ + 23, + { 0x35, 0x65, 0x87, 0xe6, 0xc6, 0xc0, 0xb4, 0x6c, 0x24, 0x45, 0xe0, 0x18, 0x63, 0x52, 0x76, 0xab, 0x84, 0x5f, 0xd1, 0x07, 0x6d, 0x10, 0x7f } +, + /* Seed */ + 103, + { 0xe5, 0xd3, 0x3e, 0x4d, 0x93, 0xc7, 0x08, 0x44, 0xee, 0x4a, 0x01, 0x65, 0x56, 0x24, 0x2d, 0x08, 0xe8, 0xe6, 0x2f, 0x1a, 0x7f, 0x79, 0x47, 0x79, 0xe2, 0x23, 0xee, 0x9d, 0xfb, 0x23, 0x1c, 0x3a, 0x52, 0x0f, 0x29, 0x7e, 0x50, 0x73, 0xe4, 0xf9, 0x2f, 0x53, 0x5c, 0xf1, 0x44, 0x55, 0x7f, 0x94, 0xee, 0x1e, 0x1e, 0x5c, 0xc6, 0xbf, 0x4c, 0x0c, 0x0c, 0x8e, 0x5e, 0xd4, 0x0d, 0x06, 0x63, 0x56, 0x06, 0xf7, 0x54, 0xcc, 0x2d, 0xd8, 0x3f, 0xe0, 0x2c, 0x57, 0x6c, 0xcd, 0x2b, 0x83, 0x5f, 0xd0, 0xf5, 0x3a, 0x99, 0x08, 0x3f, 0x4d, 0x15, 0xbf, 0xe9, 0x26, 0x88, 0x99, 0xef, 0x09, 0xff, 0x5f, 0x2f, 0x3c, 0xec, 0x9f, 0x9b, 0x8a, 0x7e } +, + /* Encryption */ + 129, + { 0x15, 0xd3, 0x64, 0xa4, 0x49, 0x9b, 0x30, 0xa5, 0xf7, 0x8b, 0x6d, 0x7d, 0x4f, 0x66, 0x7a, 0x1f, 0x76, 0xd7, 0x15, 0x15, 0x8f, 0x28, 0x01, 0x19, 0xb0, 0x55, 0xe1, 0xf2, 0x66, 0x3f, 0xc7, 0x96, 0xe3, 0x3c, 0x0e, 0xb6, 0x4e, 0x34, 0xa8, 0xda, 0xda, 0x5c, 0x81, 0x75, 0x42, 0x57, 0xa8, 0xbd, 0xf0, 0xed, 0x81, 0x15, 0xf6, 0x07, 0xb7, 0xc9, 0xcc, 0xa4, 0x81, 0xf7, 0x45, 0x20, 0xb6, 0xd9, 0xac, 0x98, 0xf5, 0xe7, 0x2c, 0x2b, 0xaf, 0x3c, 0xbb, 0x6b, 0xd9, 0xba, 0xea, 0x5d, 0x75, 0x86, 0x0c, 0xbd, 0xae, 0x34, 0x03, 0xfd, 0x5c, 0x37, 0x96, 0x4a, 0xae, 0x64, 0x36, 0x6a, 0xb0, 0x9b, 0xc9, 0xc6, 0x72, 0x76, 0x95, 0x14, 0x48, 0x19, 0x3b, 0xb4, 0xb1, 0xaf, 0xa2, 0x70, 0x79, 0xc3, 0x41, 0x70, 0xa2, 0x69, 0x56, 0x51, 0x0d, 0x44, 0x27, 0x64, 0x22, 0x99, 0x08, 0x42, 0x0f, 0xe8, 0x0a } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 12.11", + /* Message */ + 64, + { 0xe1, 0x53, 0x27, 0x6a, 0x68, 0x79, 0x67, 0x8f, 0xee, 0x19, 0x89, 0x48, 0x28, 0xd6, 0x26, 0x2e, 0xa3, 0x9a, 0xd0, 0x54, 0xc8, 0x9e, 0xdc, 0xb2, 0x3f, 0x72, 0xdc, 0xda, 0x1b, 0x00, 0x73, 0xc2, 0x87, 0x62, 0x02, 0x18, 0xd9, 0x2d, 0x0e, 0xb3, 0x0c, 0x62, 0xaf, 0xbf, 0x2b, 0x45, 0xdf, 0x62, 0xd0, 0x66, 0x65, 0xf8, 0x05, 0x25, 0xb6, 0x72, 0x7f, 0x95, 0xe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3, 0x97, 0xea, 0xcc, 0x8b, 0x23, 0x17, 0x41, 0x47, 0xc4, 0x4e, 0x16, 0x20, 0x1e, 0xc6, 0xba, 0xbd, 0x16, 0x5b, 0xa4 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 12.12", + /* Message */ + 15, + { 0xfa, 0x4e, 0xb9, 0x31, 0xa7, 0xe2, 0x09, 0x0f, 0x31, 0xed, 0xb1, 0xff, 0x7d, 0x83, 0x61 } +, + /* Seed */ + 111, + { 0x43, 0x7f, 0xa1, 0x51, 0xf4, 0x34, 0x05, 0xdb, 0x22, 0x42, 0x2c, 0xb3, 0x5d, 0x1c, 0x57, 0x61, 0x16, 0x1c, 0xb9, 0xa7, 0x8a, 0xbc, 0xb6, 0xf0, 0x6d, 0xc4, 0xe7, 0xa8, 0x69, 0x48, 0x1f, 0x40, 0xb2, 0x1a, 0xe1, 0xd3, 0x3e, 0x07, 0x5c, 0x48, 0x5c, 0xd8, 0x50, 0x1a, 0x3c, 0xaa, 0x60, 0x18, 0x32, 0x5b, 0x7f, 0x85, 0x0d, 0x4d, 0x8f, 0x6d, 0xcf, 0xd2, 0xaf, 0xfe, 0x19, 0xd3, 0xe6, 0xc7, 0x08, 0x74, 0xe7, 0x10, 0x11, 0x14, 0xf0, 0xfb, 0xb9, 0x82, 0x25, 0x81, 0xba, 0xe6, 0xba, 0x2b, 0xa1, 0xe7, 0x49, 0x88, 0x81, 0xa5, 0xdc, 0x5b, 0xb8, 0x85, 0x27, 0x38, 0xa8, 0x2f, 0xb0, 0x6d, 0x15, 0x27, 0xb4, 0x33, 0x44, 0x87, 0xb3, 0x24, 0x01, 0x3e, 0x32, 0xbc, 0xf1, 0x7b, 0xab } +, + /* Encryption */ + 129, + { 0x22, 0x6d, 0x77, 0x67, 0x00, 0xc5, 0xe1, 0xdd, 0xb9, 0x99, 0x4b, 0x32, 0x91, 0xf1, 0xd3, 0x34, 0xb6, 0x9d, 0xd8, 0x63, 0x06, 0x5f, 0xa8, 0x34, 0x21, 0xe0, 0x1d, 0x52, 0x06, 0xec, 0x2c, 0xdb, 0x89, 0x90, 0xcf, 0x78, 0x97, 0x31, 0x09, 0xdc, 0x9f, 0x12, 0x6b, 0x60, 0x33, 0xd6, 0xd5, 0xd6, 0x91, 0x8e, 0xc8, 0x50, 0xd6, 0x9c, 0x71, 0x3c, 0xb5, 0xbb, 0xe3, 0x2e, 0xe5, 0x9e, 0x44, 0x5b, 0xcb, 0x4e, 0x50, 0xc6, 0xf1, 0x64, 0x43, 0x4d, 0x2a, 0x6c, 0xa6, 0x39, 0x69, 0xa2, 0x9b, 0x25, 0x03, 0x64, 0x15, 0xb0, 0xf7, 0xcb, 0x21, 0xb4, 0xf8, 0xb3, 0x4a, 0x8d, 0x9b, 0x74, 0x65, 0x3f, 0xff, 0x4f, 0x5d, 0xb9, 0xd1, 0xa6, 0xb5, 0x15, 0x2a, 0x64, 0x48, 0x36, 0xb6, 0x8b, 0x8e, 0xde, 0x9d, 0xc5, 0xa1, 0x69, 0xdc, 0x60, 0xdc, 0x5f, 0xac, 0x46, 0x8f, 0x24, 0x27, 0x84, 0x58, 0x10, 0x62 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 12.13", + /* Message */ + 49, + { 0x58, 0x81, 0x15, 0xe5, 0x37, 0x09, 0xeb, 0x15, 0xa3, 0x37, 0x4c, 0x25, 0x32, 0x9e, 0x88, 0x38, 0x26, 0xe3, 0x21, 0x3f, 0x37, 0xa1, 0xb7, 0xa6, 0x5d, 0xe1, 0x2d, 0xf2, 0x31, 0x72, 0xf1, 0x7f, 0xa4, 0x96, 0xff, 0x49, 0x2b, 0x09, 0x17, 0x3b, 0xa0, 0xc6, 0xf5, 0x8c, 0x29, 0x3d, 0x47, 0xf1, 0x48 } +, + /* Seed */ + 77, + { 0x07, 0x81, 0x85, 0xe0, 0x83, 0xcb, 0xb0, 0x6f, 0xe1, 0xa7, 0x49, 0x74, 0x35, 0x15, 0xf3, 0xa0, 0xb4, 0xb2, 0x6f, 0x85, 0x3b, 0x10, 0xe5, 0x68, 0xe8, 0x70, 0x82, 0xce, 0x44, 0x41, 0x2c, 0xa6, 0x7e, 0x59, 0x88, 0x8c, 0xcc, 0x0f, 0x50, 0x31, 0x01, 0x52, 0x1a, 0xca, 0xbf, 0xd9, 0x8f, 0xb7, 0xb5, 0xc1, 0x1d, 0x8a, 0x94, 0x1b, 0xa0, 0x3c, 0x49, 0x5a, 0xa0, 0x3e, 0x13, 0x52, 0x2f, 0x48, 0x7f, 0x6e, 0x16, 0x16, 0xbe, 0xc2, 0x07, 0x2b, 0x39, 0x96, 0xfa, 0xee, 0x29 } +, + /* Encryption */ + 129, + { 0x0e, 0x7e, 0x50, 0xa7, 0xb2, 0x47, 0xb0, 0x29, 0x7d, 0xec, 0x65, 0xc9, 0x52, 0x3f, 0x67, 0xca, 0xb6, 0xb5, 0x2a, 0x02, 0x5f, 0x53, 0x32, 0x0e, 0x94, 0x86, 0xcd, 0x20, 0x74, 0x10, 0xca, 0xdc, 0x74, 0xe4, 0xb0, 0x3f, 0xc0, 0x6b, 0xbe, 0xd5, 0x98, 0xb0, 0x22, 0xb6, 0x3b, 0x37, 0x76, 0x2a, 0x65, 0xfd, 0x35, 0x1c, 0xb2, 0x72, 0x7f, 0x3d, 0x80, 0x35, 0xa4, 0xcd, 0xba, 0x9c, 0x6a, 0x31, 0xe4, 0xed, 0x6b, 0xeb, 0x4f, 0xed, 0x31, 0x34, 0xeb, 0x63, 0xdf, 0xce, 0xab, 0x4f, 0x5f, 0x24, 0x59, 0xe5, 0x9f, 0xca, 0x01, 0x74, 0x75, 0x8a, 0xab, 0x37, 0x53, 0xb5, 0xc1, 0x93, 0xc8, 0x1e, 0x11, 0x49, 0x0f, 0x97, 0xb6, 0x22, 0xb7, 0x3f, 0xa7, 0x3f, 0x8e, 0xae, 0x7d, 0xa8, 0x39, 0x34, 0x84, 0xb8, 0x29, 0x79, 0x71, 0xa3, 0xe9, 0x23, 0x12, 0x9c, 0xe4, 0x35, 0x7b, 0x64, 0x5c, 0xc6, 0x38 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 12.14", + /* Message */ + 11, + { 0x20, 0xf1, 0xcf, 0xaa, 0x63, 0x67, 0xc7, 0xc3, 0x9b, 0x54, 0xa0 } +, + /* Seed */ + 115, + { 0x4a, 0x1c, 0x7b, 0x70, 0xf7, 0x83, 0xba, 0x0d, 0x5a, 0x26, 0xd4, 0x64, 0x5c, 0xf0, 0x5f, 0xa6, 0x10, 0xf5, 0xbe, 0x01, 0x77, 0xfd, 0xde, 0x9f, 0x2c, 0x34, 0x50, 0x57, 0xdb, 0x42, 0x44, 0x57, 0xfa, 0xa4, 0x30, 0xc9, 0x42, 0x4a, 0x54, 0xf7, 0xe5, 0x5f, 0xcf, 0xee, 0x6f, 0xae, 0xa4, 0x24, 0x4c, 0x03, 0x97, 0x74, 0x81, 0xed, 0xfc, 0xbb, 0x28, 0x88, 0x37, 0xc6, 0xa4, 0x8d, 0xbd, 0x72, 0x96, 0x67, 0x7a, 0x24, 0xe0, 0x6c, 0xc9, 0xd8, 0x5e, 0x68, 0x8c, 0x14, 0x09, 0x0f, 0xa2, 0x83, 0x0f, 0xf4, 0x96, 0x79, 0x33, 0xea, 0xf0, 0xdb, 0x69, 0x4b, 0x6a, 0xe4, 0x02, 0xca, 0xf9, 0xc2, 0xbe, 0xff, 0x04, 0xa5, 0x2a, 0x2f, 0x84, 0x7f, 0xe4, 0x0f, 0x4f, 0xfb, 0xdf, 0x3d, 0x58, 0xb7, 0xc4, 0xfd, 0xa8 } +, + /* Encryption */ + 129, + { 0x1e, 0x52, 0x84, 0x20, 0xbc, 0xbb, 0xa7, 0xd5, 0x9c, 0x6c, 0x40, 0xd4, 0x46, 0xd1, 0xaa, 0x95, 0x6a, 0xff, 0x03, 0x05, 0x36, 0x5b, 0x4d, 0x7c, 0xe9, 0x81, 0x0f, 0x22, 0xc3, 0x4f, 0x09, 0xa5, 0x55, 0xe5, 0xff, 0xbe, 0x51, 0x75, 0x03, 0x7f, 0x90, 0x3e, 0xaa, 0x6c, 0x40, 0x56, 0x36, 0x36, 0xd3, 0x81, 0xf4, 0x53, 0x25, 0xb5, 0xe6, 0x1a, 0x2c, 0x70, 0x51, 0x12, 0x55, 0x64, 0x02, 0xa7, 0xdc, 0xbe, 0x86, 0xcf, 0xa5, 0x4a, 0x6e, 0x6a, 0x50, 0x37, 0x8d, 0x05, 0xe2, 0x1c, 0x95, 0xcc, 0x6c, 0x45, 0xff, 0xdd, 0x05, 0x17, 0xf7, 0x7a, 0x36, 0xb2, 0x24, 0xd1, 0x70, 0x0a, 0x1f, 0x3e, 0xbb, 0x81, 0xd3, 0x67, 0x8a, 0x66, 0xe1, 0x45, 0x34, 0xa8, 0x0a, 0x59, 0x8b, 0xd7, 0x17, 0x26, 0xfe, 0x32, 0x2e, 0x73, 0x9c, 0x17, 0xeb, 0xa5, 0x08, 0xda, 0x8a, 0x03, 0x1a, 0x27, 0xf6, 0xbb, 0x28 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 12.15", + /* Message */ + 33, + { 0x73, 0x60, 0xcd, 0xb6, 0xc1, 0x59, 0x96, 0xb0, 0x60, 0x33, 0x1e, 0x9f, 0x2a, 0x36, 0x89, 0x95, 0xc0, 0x64, 0xad, 0xda, 0x56, 0x55, 0x95, 0x27, 0x78, 0x2c, 0x17, 0x0c, 0x69, 0x1b, 0xb3, 0xbd, 0x3b } +, + /* Seed */ + 93, + { 0x58, 0xdd, 0x80, 0xf4, 0xfd, 0xc5, 0xc9, 0x5d, 0xd9, 0xeb, 0x56, 0xac, 0x80, 0xa0, 0x2d, 0x53, 0xe8, 0xcc, 0x2e, 0xfb, 0x3c, 0xba, 0xc6, 0x72, 0x7d, 0x75, 0xb1, 0xe7, 0xb3, 0x5e, 0x05, 0x42, 0x19, 0x43, 0x3a, 0xf5, 0xaa, 0xe1, 0x98, 0xfd, 0x62, 0xf2, 0xec, 0xd2, 0xab, 0x8e, 0x26, 0x38, 0x77, 0xb5, 0xc9, 0x1e, 0xd5, 0x13, 0xe2, 0x35, 0x49, 0x7a, 0x63, 0x19, 0x2d, 0xb9, 0xa9, 0xbc, 0xb3, 0xbc, 0xa9, 0x7a, 0xe9, 0xbf, 0xce, 0xdf, 0x93, 0x56, 0x44, 0xb2, 0xd3, 0xbc, 0x20, 0xe0, 0x2a, 0xe5, 0xe7, 0x42, 0x4e, 0x81, 0x2a, 0x29, 0x49, 0x61, 0x6b, 0x82, 0x01 } +, + /* Encryption */ + 129, + { 0x20, 0x3b, 0xcd, 0xe1, 0xb4, 0x12, 0xe3, 0xce, 0xa2, 0x5b, 0x86, 0x30, 0xb2, 0x08, 0xf9, 0x78, 0xab, 0x22, 0xc1, 0xda, 0x81, 0x25, 0x07, 0x6e, 0x10, 0xff, 0x91, 0xd7, 0xbc, 0xfa, 0xef, 0xd7, 0xdc, 0xd8, 0x39, 0x16, 0x55, 0xc8, 0x86, 0xe8, 0xa9, 0x45, 0xa7, 0xf5, 0x7a, 0x74, 0xce, 0x2d, 0xc0, 0xe8, 0xec, 0x7f, 0xdb, 0x17, 0xcf, 0x19, 0x57, 0x80, 0xd3, 0xce, 0x80, 0xe0, 0xdd, 0xe7, 0x63, 0x9c, 0x67, 0x72, 0x05, 0xb8, 0xf9, 0xec, 0xea, 0x11, 0x54, 0x68, 0x97, 0x7b, 0xde, 0xa3, 0x50, 0x0b, 0x23, 0x9f, 0xce, 0x0d, 0x7a, 0x94, 0xbe, 0x6d, 0xe3, 0x33, 0xea, 0x7e, 0xcc, 0x22, 0xc0, 0x7e, 0x65, 0xd0, 0xeb, 0xd6, 0x5a, 0x39, 0x0a, 0x18, 0x5f, 0x18, 0x17, 0x89, 0xe7, 0xca, 0x8c, 0x1a, 0xc2, 0xfc, 0xa8, 0x28, 0xbb, 0x8d, 0x28, 0x22, 0x7e, 0x38, 0xc9, 0x88, 0x9c, 0xe0, 0x08 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 12.16", + /* Message */ + 29, + { 0x31, 0x9b, 0x82, 0x94, 0xbd, 0xf0, 0x7c, 0xd4, 0x06, 0x85, 0xe8, 0x80, 0x09, 0xfa, 0x7b, 0x3f, 0x12, 0x90, 0x16, 0x0e, 0xf3, 0x30, 0x67, 0xad, 0xd5, 0xef, 0x4d, 0x80, 0xfd } +, + /* Seed */ + 97, + { 0x4e, 0x07, 0xd7, 0xf9, 0x63, 0xbe, 0x24, 0xee, 0x6d, 0x8b, 0xd4, 0xdd, 0x95, 0xe9, 0xe3, 0x33, 0x49, 0x30, 0xe0, 0x3e, 0x65, 0x8d, 0x29, 0x6b, 0xb7, 0x95, 0x48, 0x6d, 0x72, 0x4e, 0x07, 0x41, 0xdd, 0x50, 0x73, 0x47, 0xa5, 0xb5, 0x7b, 0x79, 0xc9, 0x0d, 0x3c, 0x90, 0xc1, 0xae, 0xa7, 0x16, 0x19, 0x09, 0x1a, 0xcc, 0x81, 0x98, 0xb5, 0x51, 0x22, 0xda, 0x50, 0x99, 0x58, 0x2e, 0x0d, 0xb7, 0xda, 0x3c, 0xbd, 0x3c, 0xfd, 0x85, 0x29, 0x8f, 0x31, 0x55, 0x4e, 0x29, 0xcb, 0xcb, 0xa1, 0x19, 0x9c, 0xe4, 0x70, 0x16, 0x3c, 0xa0, 0x33, 0x7c, 0xc4, 0x14, 0xad, 0x32, 0x76, 0x70, 0x81, 0x11, 0xd6 } +, + /* Encryption */ + 129, + { 0x04, 0xfc, 0x7b, 0xb6, 0xfb, 0x64, 0x19, 0x61, 0x2b, 0x6e, 0xf5, 0x4b, 0x3c, 0xa0, 0x0a, 0x87, 0x46, 0x51, 0x95, 0xc3, 0x7f, 0x7f, 0x94, 0x0c, 0x23, 0x3e, 0xcb, 0x1d, 0x4a, 0x50, 0x5d, 0x3c, 0x56, 0xed, 0x23, 0xe0, 0x9e, 0x03, 0xf1, 0x45, 0x4f, 0x04, 0xb5, 0x6f, 0x6d, 0xa2, 0x5d, 0x0a, 0x6f, 0xca, 0xb0, 0xc4, 0x00, 0x87, 0x4a, 0xe9, 0x80, 0x6e, 0xe1, 0x87, 0x80, 0xb7, 0x5c, 0x6c, 0xa5, 0x66, 0x29, 0xe5, 0x77, 0xe8, 0xe7, 0xb5, 0xd2, 0xfc, 0x2c, 0x44, 0x0b, 0x98, 0x00, 0x19, 0x5b, 0x58, 0x51, 0x1b, 0xc3, 0xa7, 0x95, 0x44, 0x12, 0xc8, 0xf2, 0x73, 0xcc, 0x0e, 0x9d, 0x97, 0x1a, 0xbb, 0xdd, 0xd7, 0x02, 0x8e, 0x6f, 0x84, 0x87, 0x6a, 0x30, 0x58, 0xa4, 0x54, 0xfe, 0x2f, 0x33, 0xc7, 0x5e, 0x3d, 0xd0, 0x62, 0xf1, 0x19, 0xcd, 0x3e, 0xca, 0x81, 0x06, 0xb6, 0xbf, 0xbe, 0xa4 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 12.17", + /* Message */ + 26, + { 0x79, 0xc6, 0x82, 0xa2, 0xb9, 0x79, 0xfe, 0x5c, 0x96, 0x32, 0xaf, 0x18, 0x31, 0xc2, 0xaa, 0xcf, 0x0c, 0x6b, 0xf5, 0x66, 0x88, 0x5b, 0xf5, 0x25, 0x62, 0x50 } +, + /* Seed */ + 100, + { 0x5c, 0x2a, 0x95, 0x6d, 0x4b, 0x5f, 0x06, 0xf7, 0x50, 0x83, 0x5a, 0xb8, 0xb2, 0x9c, 0xf7, 0xc6, 0x41, 0xd7, 0x93, 0xc5, 0x56, 0xe1, 0x2a, 0xab, 0xa9, 0x56, 0xdf, 0xde, 0x46, 0x32, 0xd5, 0xe5, 0x02, 0xd5, 0x90, 0x41, 0x78, 0x3a, 0xfd, 0x1d, 0xa7, 0xb2, 0xe2, 0xd2, 0x4e, 0x22, 0xd6, 0x44, 0x78, 0x35, 0xbf, 0x6d, 0x77, 0xc6, 0xee, 0xbc, 0x0d, 0x2d, 0x64, 0xe7, 0xed, 0x2c, 0x14, 0x17, 0x18, 0xad, 0x86, 0x87, 0xc5, 0x97, 0xb7, 0x71, 0x8f, 0x38, 0xbf, 0x1a, 0x33, 0x16, 0xed, 0xef, 0xf6, 0xb7, 0x2e, 0x28, 0x51, 0x82, 0x88, 0x07, 0xbc, 0xff, 0xa9, 0xb8, 0xe1, 0xa8, 0x52, 0xf3, 0xfa, 0xa8, 0x07, 0xf6 } +, + /* Encryption */ + 129, + { 0x25, 0x1d, 0x48, 0x56, 0xb7, 0xa7, 0x58, 0x0d, 0x53, 0x88, 0x01, 0x62, 0x28, 0x1b, 0xb4, 0xe4, 0x1b, 0xde, 0xb2, 0xa8, 0x7d, 0xdb, 0xd5, 0xae, 0x1b, 0x30, 0x7d, 0x44, 0x48, 0xbe, 0x1f, 0x11, 0x69, 0x5f, 0xf7, 0x22, 0xc4, 0x32, 0x41, 0x5d, 0x0c, 0x74, 0xba, 0xa3, 0xfc, 0x0d, 0xd5, 0x11, 0x66, 0xac, 0x86, 0x5b, 0x31, 0x0c, 0x4f, 0x5c, 0x87, 0x07, 0x98, 0x62, 0x54, 0xc8, 0x96, 0x04, 0xcc, 0xda, 0xbc, 0xe6, 0xc6, 0x92, 0x44, 0x66, 0x21, 0x89, 0x8b, 0x4f, 0x5a, 0x08, 0xbc, 0xdf, 0x64, 0x62, 0xe5, 0x18, 0xee, 0x3a, 0xeb, 0x75, 0xe2, 0x6d, 0x8f, 0x63, 0xa0, 0x6f, 0xcb, 0xb3, 0xdf, 0x09, 0x8c, 0xee, 0xbb, 0x0f, 0xd2, 0xf6, 0x37, 0xe3, 0xa7, 0x93, 0x7f, 0x4d, 0x19, 0xe3, 0xa1, 0x92, 0x4c, 0x16, 0x08, 0x2e, 0xdc, 0x33, 0x3c, 0xb6, 0xde, 0x37, 0x63, 0x72, 0x46, 0xe4, 0x98 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 12.18", + /* Message */ + 63, + { 0x1e, 0x0d, 0x18, 0x07, 0xa2, 0xbd, 0x49, 0x6b, 0xb0, 0xcb, 0xa8, 0x41, 0xc7, 0x71, 0x58,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x8f, 0x33, 0x51, 0x2b, 0xcc, 0x66, 0xcd, 0xe7, 0x6d, 0xa0, 0x73, 0x36, 0x98, 0x5a, 0x97, 0x43, 0x5b, 0x6e, 0xfe, 0xe4, 0xee, 0x09, 0xd3, 0xa2, 0x8a, 0xff, 0x34, 0xce, 0x6a, 0xe8, 0x75, 0x0d, 0xa4, 0x1e, 0x16, 0xca, 0x47, 0xe9, 0x38, 0x81, 0x8e, 0x44, 0xa9, 0xb4, 0x1f, 0xe9, 0x1a, 0x6a, 0x80, 0x1d, 0x35, 0x5e, 0xe8, 0xd6, 0x60, 0xe2, 0x7e, 0x4f, 0xe2, 0xce, 0x7f, 0x32, 0x5b } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 12.19", + /* Message */ + 15, + { 0x1c, 0x10, 0x5d, 0x5e, 0xbe, 0xa3, 0x66, 0x46, 0xa9, 0x72, 0x84, 0xc1, 0x7a, 0x86, 0xc4 } +, + /* Seed */ + 111, + { 0xc6, 0xf8, 0x03, 0x40, 0xa6, 0x55, 0x7e, 0x07, 0x53, 0xa9, 0x57, 0x3f, 0xe4, 0xf5, 0x21, 0x49, 0x77, 0xef, 0xdb, 0x08, 0x2a, 0x50, 0xeb, 0x5d, 0x5c, 0x51, 0x7d, 0x46, 0x72, 0x9f, 0xd2, 0xa3, 0x4a, 0xf7, 0xce, 0xe1, 0xaa, 0x46, 0xb7, 0x9d, 0x47, 0xe2, 0x5d, 0x83, 0x09, 0x0a, 0xeb, 0x4f, 0x50, 0x22, 0x98, 0xc0, 0x31, 0x37, 0x24, 0xfa, 0xb5, 0x4e, 0x54, 0xbe, 0xbb, 0x48, 0xd6, 0xcd, 0x9b, 0xeb, 0xdd, 0xcb, 0xee, 0x0f, 0x07, 0x53, 0x77, 0x27, 0xd6, 0x5c, 0x50, 0xe7, 0xd4, 0xcc, 0x0c, 0x6d, 0x19, 0xfc, 0x48, 0x0b, 0xa5, 0x78, 0x67, 0x26, 0x2c, 0xf2, 0xee, 0xdd, 0x9c, 0xfa, 0xba, 0x60, 0x7d, 0x65, 0x82, 0x87, 0xeb, 0xa4, 0x2b, 0x46, 0x99, 0x44, 0xcc, 0xb6, 0x12 } +, + /* Encryption */ + 129, + { 0x05, 0xb2, 0x3d, 0xc0, 0xc6, 0x2d, 0x90, 0xc1, 0x77, 0x1e, 0xba, 0x37, 0x8e, 0x43, 0x17, 0x9d, 0x7c, 0xa6, 0xaf, 0x51, 0x5e, 0x26, 0x19, 0xae, 0x4d, 0x7c, 0x8f, 0xc8, 0xbd, 0xa3, 0x78, 0xcb, 0xf7, 0xa1, 0xdb, 0xba, 0x1a, 0x14, 0xf4, 0x94, 0xc4, 0xe0, 0xd7, 0x13, 0x38, 0x79, 0x7c, 0x7e, 0xe0, 0x6e, 0x1a, 0x79, 0xe9, 0xff, 0x28, 0x56, 0xfb, 0xf7, 0x4f, 0xe6, 0xf1, 0xa7, 0xca, 0x6e, 0x5b, 0x9c, 0xa2, 0x83, 0xc4, 0xc9, 0x7e, 0x61, 0xcf, 0x9f, 0x40, 0x73, 0xe0, 0x32, 0xca, 0x27, 0xd6, 0x9b, 0x1b, 0x4e, 0xeb, 0xea, 0x77, 0xcc, 0x95, 0xa9, 0x28, 0x1f, 0x26, 0xb6, 0x4a, 0x05, 0xa9, 0x39, 0x44, 0xc8, 0x2c, 0x5a, 0x13, 0x42, 0x8e, 0xce, 0x21, 0xfb, 0x44, 0x01, 0xad, 0x42, 0x6e, 0x7a, 0xc1, 0xf0, 0x5b, 0xff, 0x84, 0xb3, 0x47, 0xcd, 0xc4, 0xdb, 0xe5, 0x2e, 0x67, 0x8a, 0xed } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 12.20", + /* Message */ + 12, + { 0xf1, 0x04, 0x02, 0xf0, 0x02, 0x05, 0xc5, 0x27, 0x57, 0xed, 0x6e, 0x9d } +, + /* Seed */ + 114, + { 0xe2, 0xae, 0xe7, 0xfc, 0xf4, 0x3c, 0xed, 0xe0, 0x75, 0x52, 0xa2, 0x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6, 0x80, 0xa8, 0x8e, 0xee, 0x05, 0xec, 0x08, 0x88, 0x92, 0xbc, 0x0a, 0x95, 0x55, 0xb3, 0xf2, 0x0c, 0x8b, 0xee, 0x57, 0x9c, 0x0d, 0xdd, 0xe1, 0x51, 0x1a, 0x18, 0xaf, 0x98, 0xbc, 0x1d, 0x9c, 0xf9, 0x0b, 0x81, 0xbf, 0x13, 0x2a, 0xbd, 0x58, 0x97, 0x0b, 0x3e, 0x84, 0xd8, 0x14, 0xe2, 0x7d, 0x02, 0x5b, 0x73 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 13: A 1031-bit RSA key pair", +{ + /* Modulus */ + 129, + { 0x55, 0x5d, 0xc2, 0xba, 0xf0, 0x41, 0xb7, 0xf0, 0x9a, 0x04, 0x78, 0x42, 0x3a, 0xeb, 0xcb, 0x5f, 0x49, 0xb9, 0x5d, 0xbe, 0x15, 0x70, 0xe9, 0xa5, 0x42, 0x12, 0x8d, 0x33, 0x22, 0x87, 0x86, 0x6a, 0xc4, 0xcc, 0x63, 0xe7, 0x6f, 0x8e, 0x3a, 0xef, 0x22, 0xc9, 0x75, 0x3a, 0x54, 0x51, 0x99, 0x94, 0x24, 0x52, 0x41, 0x8a, 0x67, 0xd1, 0xa2, 0x23, 0x0d, 0xdb, 0x6f, 0x42, 0x22, 0xc6, 0x63, 0xd3, 0x8e, 0x80, 0x05, 0x0e, 0xeb, 0x67, 0x95, 0x6e, 0xc5, 0xf5, 0x49, 0x94, 0xa0, 0xbe, 0xa6, 0x95, 0xfa, 0x59, 0xfa, 0xdf, 0x2d, 0xcf, 0xe7, 0xac, 0xb5, 0x4e, 0xd9, 0xda, 0x3d, 0x0b, 0xeb, 0x12, 0x2c, 0x8a, 0x69, 0x1b, 0x0b, 0xb5, 0x1a, 0xe6, 0x5a, 0x77, 0x4d, 0x75, 0xb1, 0xb3, 0x49, 0xcb, 0x68, 0xc5, 0x17, 0xcb, 0xd3, 0x86, 0xae, 0x48, 0x2f, 0x05, 0xee, 0x46, 0x03, 0xec, 0xf2, 0x95, 0x5d } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 129, + { 0x05, 0x97, 0x87, 0xbb, 0x01, 0x23, 0xfc, 0xed, 0x98, 0xd9, 0x34, 0x1b, 0x7a, 0x8a, 0x99, 0x9e, 0xdb, 0x50, 0x76, 0x30, 0x8e, 0x6d, 0x00, 0x11, 0x20, 0x3b, 0xe0, 0xdd, 0xf9, 0xa4, 0x11, 0x0d, 0x0b, 0x69, 0x2c, 0x1e, 0x2b, 0xf3, 0x90, 0x2e, 0xbc, 0x03, 0xa0, 0x57, 0x3a, 0xd0, 0xc1, 0x93, 0xaf, 0xb1, 0x67, 0xb3, 0xae, 0x4b, 0x50, 0x28, 0xa5, 0xae, 0xbb, 0x22, 0x04, 0xef, 0x23, 0xf8, 0xe5, 0x83, 0x60, 0xbe, 0x94, 0x84, 0x95, 0x1e, 0x34, 0x71, 0x11, 0x76, 0x06, 0x2e, 0x53, 0xe3, 0xf6, 0x38, 0x74, 0xfc, 0x9e, 0x35, 0x91, 0xa9, 0xd9, 0x06, 0x8a, 0xa5, 0xe6, 0xc8, 0xc7, 0xa9, 0xab, 0x08, 0xe9, 0x79, 0x24, 0x70, 0x06, 0x6d, 0x71, 0xa0, 0x7c, 0x34, 0x33, 0xdd, 0x70, 0x3a, 0x42, 0xa6, 0xb3, 0xa9, 0xb1, 0xbf, 0xfb, 0x31, 0x49, 0x49, 0x8d, 0xcf, 0xf8, 0xb3, 0x57, 0x56, 0xed } +, + /* Prime 1 */ + 65, + { 0x0a, 0x7d, 0xbd, 0x7e, 0xe6, 0xde, 0xf3, 0x87, 0x5b, 0x4c, 0x55, 0x9f, 0x56, 0x69, 0x30, 0x7d, 0x17, 0x6b, 0xc1, 0x25, 0xb0, 0x9f, 0x5e, 0xb8, 0x26, 0x01, 0xb8, 0x13, 0x48, 0x57, 0x6c, 0x1c, 0xa7, 0xdc, 0xf4, 0xc2, 0xbd, 0x7f, 0x2b, 0x42, 0xa2, 0xc5, 0x46, 0x00, 0x02, 0xfc, 0xe0, 0xa9, 0xa2, 0x1d, 0xac, 0x5a, 0x97, 0x97, 0xdb, 0x23, 0x3d, 0x9d, 0x4a, 0x92, 0x93, 0xad, 0xd3, 0xdf, 0x73 } +, + /* Prime 2 */ + 65, + { 0x08, 0x23, 0x0f, 0xcf, 0x26, 0xfd, 0xc5, 0x75, 0x11, 0x9c, 0xf9, 0x05, 0x78, 0xd3, 0x66, 0x56, 0x4c, 0xfd, 0xa8, 0x65, 0xa2, 0x82, 0x0f, 0x38, 0xbc, 0xd6, 0x3e, 0xca, 0xa0, 0x95, 0x57, 0x65, 0x77, 0x2a, 0x88, 0x32, 0xfb, 0x31, 0x69, 0x7f, 0xd0, 0xdd, 0x45, 0xbb, 0xec, 0xc0, 0x4d, 0xd6, 0xa5, 0x9e, 0xc1, 0x1c, 0x1d, 0x5c, 0x6e, 0x87, 0x7c, 0x6b, 0x9d, 0x77, 0xc6, 0xa2, 0x76, 0xe3, 0xef } +, + /* Prime exponent 1 */ + 65, + { 0x08, 0xd1, 0xc7, 0xd9, 0xc4, 0xd0, 0x2c, 0xbd, 0xdf, 0x7c, 0x7e, 0x86, 0x62, 0xa8, 0x2f, 0x41, 0x19, 0xcd, 0x56, 0x24, 0x0f, 0x25, 0x0b, 0x05, 0x97, 0xbd, 0xde, 0x37, 0x27, 0x9b, 0x86, 0xa1, 0x58, 0x64, 0xa1, 0xc6, 0x8c, 0x73, 0x39, 0xb4, 0xdd, 0x0d, 0x26, 0x59, 0xa0, 0x29, 0x61, 0xdc, 0x79, 0x12, 0xa4, 0xef, 0xcb, 0x7c, 0xb7, 0x96, 0x1a, 0x97, 0xfe, 0x36, 0xd6, 0xbb, 0x4c, 0xe0, 0x0d } +, + /* Prime exponent 2 */ + 65, + { 0x01, 0xd4, 0x91, 0x3b, 0xd1, 0xd3, 0x87, 0xd5, 0x3b, 0xaf, 0x09, 0xbd, 0x17, 0x5e, 0xc6, 0x48, 0x67, 0x6d, 0x2f, 0xb2, 0x1d, 0x0a, 0x10, 0x8e, 0x7c, 0xbb, 0xdc, 0xc8, 0x0b, 0xb3, 0x4c, 0x43, 0x80, 0xb8, 0xca, 0x86, 0x5d, 0x46, 0xd2, 0x2a, 0x74, 0x3b, 0x31, 0xf2, 0x81, 0xe1, 0x08, 0x21, 0x5e, 0x84, 0x05, 0x80, 0x63, 0x82, 0x65, 0x42, 0x88, 0xd4, 0x54, 0x49, 0x9b, 0x1e, 0xf4, 0x8b, 0x75 } +, + /* Coefficient */ + 65, + { 0x08, 0x7b, 0x2e, 0xf2, 0x11, 0x44, 0x8e, 0x5c, 0x96, 0x1c, 0x9f, 0x6d, 0xfe, 0xe6, 0xaa, 0x26, 0x8e, 0xe8, 0x97, 0x7e, 0x31, 0x1c, 0x07, 0xcc, 0x8d, 0xb4, 0x72, 0xda, 0x6c, 0x49, 0x86, 0x3f, 0xaa, 0xf3, 0x3b, 0xf5, 0x05, 0xdc, 0xfd, 0x81, 0xf5, 0x3a, 0x53, 0xbe, 0x12, 0x1e, 0x44, 0x5e, 0x89, 0xd7, 0xe0, 0x38, 0xef, 0x27, 0xf3, 0x72, 0x7b, 0x51, 0x2a, 0x2b, 0x80, 0x94, 0x41, 0x20, 0xea } + +} +, +{{ + "PKCS#1 v1.5 Encryption Example 13.1", + /* Message */ + 7, + { 0x7b, 0xc8, 0x1d, 0x81, 0x46, 0xe3, 0x59 } +, + /* Seed */ + 119, + { 0x76, 0x65, 0x5e, 0x4a, 0xd8, 0xfb, 0x99, 0x34, 0xd1, 0x84, 0x7c, 0xc9, 0x0c, 0x02, 0x47, 0x3c, 0x57, 0x2b, 0x5f, 0xdf, 0xd1, 0x64, 0xa9, 0x70, 0xa3, 0xcd, 0x96, 0xbc, 0x8c, 0xd7, 0x96, 0xac, 0x80, 0x2c, 0x50, 0x28, 0x22, 0x90, 0xea, 0xd4, 0xc7, 0x7a, 0xa5, 0xcc, 0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 0xff, 0x03, 0x37, 0x20, 0x58, 0x88, 0x1b, 0x4a, 0x24, 0xb2, 0x4f, 0x4c, 0x2d, 0xcd, 0x5c, 0xb4, 0x4c, 0x2e, 0xea, 0xbe, 0x6f, 0x72 } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Encryption Example 13.2", + /* Message */ + 52, + { 0x68, 0x6a, 0x81, 0x0a, 0x03, 0x1d, 0x80, 0x61, 0xe4, 0x1a, 0x77, 0x6a, 0x7d, 0xfb, 0xdb, 0x3a, 0xf6, 0x26, 0xfe, 0x97, 0x69, 0xde, 0xee, 0xa4, 0x60, 0xba, 0x28, 0x67, 0xac, 0xf0, 0x3d, 0x9f, 0x92, 0x4d, 0x32, 0x1e, 0x8a, 0x8f, 0x42, 0x5c, 0x28, 0x51, 0x92, 0x98, 0x67, 0xa3, 0x26, 0xae, 0x27, 0x5b, 0x49, 0xd2 } +, + /* Seed */ + 74, + { 0xf7, 0x9b, 0x49, 0xf6, 0xa6, 0xbe, 0x3e, 0x68, 0x88, 0x4c, 0x80, 0xdf, 0xe1, 0xe8, 0x50, 0x1e, 0x54, 0x4c, 0xa7, 0x82, 0x23, 0x88, 0x43, 0xd4, 0x19, 0x76, 0x41, 0x12, 0x25, 0x0e, 0xdc, 0x1b, 0x69, 0xc7, 0xd1, 0xc3, 0x58, 0x7f, 0xdc, 0x75, 0x98, 0x7c, 0x62, 0xcb, 0x4c, 0x33, 0xbb, 0x81, 0x20, 0x2f, 0x72, 0xdb, 0xa7, 0xee, 0xe2, 0x4b, 0xfc, 0xf8, 0x9d, 0x4d, 0xae, 0x15, 0x0c, 0x07, 0x27, 0x24, 0x58, 0xfb, 0x01, 0xb6, 0xcd, 0x27, 0x09, 0x25 } +, + /* Encryption */ + 129, + { 0x08, 0x8a, 0x47, 0xf1, 0x1c, 0xb1, 0x34, 0xde, 0xc4, 0xb5, 0x08, 0x77, 0x25, 0xe8, 0xa5, 0xbd, 0x04, 0xf7, 0xfe, 0x58, 0x2a, 0x69, 0x91, 0x4f, 0x68, 0x3e, 0xe6, 0xde, 0x7c, 0x32, 0x4f, 0xed, 0x7e, 0x07, 0xf5, 0x70, 0x05, 0xc0, 0xe0, 0xdf, 0x75, 0x00, 0xe3, 0x70, 0xa4, 0x2e, 0xfd, 0x6f, 0xe5, 0xb2, 0x90, 0x19, 0x95, 0x19, 0xb1, 0x98, 0x06, 0xb6, 0xe6, 0x91, 0x69, 0x8a, 0xfd, 0x95, 0x17, 0xd7, 0x80, 0xda, 0x0b, 0xeb, 0xf7, 0x0a, 0x26, 0xd6, 0x5c, 0x5b, 0x64, 0xe3, 0x40, 0xa6, 0x40, 0x5e, 0x88, 0x95, 0x55, 0xdf, 0xa0, 0xa9, 0x2c, 0x42, 0x9a, 0xe9, 0xc3, 0xec, 0x88, 0xe8, 0x88, 0xee, 0xda, 0x04, 0x5e, 0x41, 0x0e, 0x3a, 0x9e, 0x61, 0x99, 0xab, 0x39, 0xeb, 0x1a, 0xc8, 0x64, 0xe2, 0x28, 0xc2, 0xcc, 0x1b, 0x64, 0xe3, 0x36, 0x16, 0x95, 0xb5, 0xaa, 0x11, 0x3d, 0xc5, 0xa7 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 13.3", + /* Message */ + 9, + { 0x18, 0x54, 0x4a, 0xad, 0x24, 0xab, 0x07, 0x5d, 0x3a } +, + /* Seed */ + 117, + { 0x23, 0x20, 0x4b, 0x8a, 0xd9, 0x45, 0x75, 0xf6, 0xe2, 0xf4, 0x6c, 0x79, 0x7b, 0xb8, 0x73, 0xaa, 0x3f, 0x46, 0x1a, 0xcd, 0x05, 0xe7, 0xdb, 0x78, 0x46, 0xa2, 0x31, 0x57, 0x59, 0x2d, 0x52, 0xe9, 0xa9, 0xa7, 0x04, 0x38, 0x19, 0xc4, 0x88, 0x96, 0x27, 0x5e, 0xd9, 0xdf, 0x0b, 0x1e, 0x54, 0x04, 0x93, 0xc0, 0x77, 0xea, 0x15, 0x41, 0x9a, 0xf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a, 0x0f, 0xdf, 0xef, 0xc3, 0xb6, 0x52, 0xcf, 0x7d, 0x79, 0xfd } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 13.4", + /* Message */ + 4, + { 0xd9, 0x0f, 0xa3, 0x8f } +, + /* Seed */ + 122, + { 0x3e, 0x09, 0xf6, 0x50, 0x6f, 0x7f, 0x71, 0x91, 0x47, 0xae, 0x21, 0xe3, 0x94, 0x53, 0xae, 0x0b, 0x41, 0x60, 0x98, 0xda, 0x10, 0x3a, 0xf8, 0x4c, 0x0f, 0x7c, 0xef, 0xae, 0x50, 0x01, 0x99, 0xc9, 0x85, 0x59, 0x67, 0xa8, 0x30, 0x0a, 0x1a, 0x7f, 0x8d, 0x2c, 0xc1, 0x3b, 0x91, 0x72, 0x7e, 0xeb, 0xd9, 0x3c, 0xf7, 0x7d, 0x3f, 0xac, 0xb1, 0x9e, 0x83, 0xa8, 0x40, 0xeb, 0x58, 0x3b, 0xce, 0xa6, 0xc6, 0x11, 0x3a, 0x9c, 0x6f, 0x6f, 0x1f, 0xb5, 0xa0, 0xb3, 0x32, 0x55, 0x9a, 0x6b, 0x43, 0x15, 0x47, 0x45, 0x7c, 0xda, 0x1d, 0x3d, 0xce, 0xe3, 0x41, 0xd1, 0x71, 0xc6, 0x2e, 0x95, 0xe7, 0xea, 0xae, 0x16, 0xae, 0x0e, 0xaf, 0x1c, 0x1f, 0xe8, 0x10, 0xfb, 0xb0, 0xb7, 0x13, 0x8c, 0xfa, 0x3d, 0x66, 0xc6, 0x38, 0x50, 0xf3, 0x81, 0xe4, 0x9a, 0x2d, 0xad } +, + /* Encryption */ + 129, + { 0x27, 0x13, 0x3f, 0x43, 0x79, 0x1b, 0x39, 0x22, 0x7c, 0x8e, 0x95, 0x4e, 0x1c, 0xaa, 0x83, 0x0f, 0xa6, 0x59, 0x95, 0xf8, 0xa9, 0xf8, 0x8e, 0x0d, 0x1f, 0x75, 0x67, 0x85, 0xed, 0x5c, 0x8c, 0x78, 0x54, 0xfb, 0x1a, 0x9d, 0xc4, 0xa9, 0x5f, 0xa4, 0x4d, 0xbd, 0xf0, 0xf2, 0x85, 0x99, 0xc4, 0x72, 0x84, 0x93, 0x79, 0x75, 0x0a, 0x6a, 0x1b, 0xcb, 0x42, 0xca, 0xfb, 0x5b, 0xbf, 0xe0, 0x8c, 0x65, 0x10, 0x6d, 0xc8, 0x40, 0xcb, 0xec, 0x8e, 0xe2, 0xcb, 0x5a, 0x20, 0x6c, 0x81, 0x18, 0xaa, 0x06, 0x1d, 0xa4, 0xd2, 0x1d, 0x1b, 0x5c, 0x46, 0x11, 0x7f, 0x77, 0xc8, 0x96, 0xbc, 0x71, 0xce, 0xe2, 0xf8, 0x75, 0x7a, 0xff, 0x5c, 0xb2, 0xb3, 0xc3, 0x47, 0x74, 0x55, 0x8e, 0x8b, 0x82, 0xed, 0xb4, 0xef, 0x9b, 0xf2, 0xd4, 0xf2, 0xca, 0x4f, 0xc5, 0x97, 0xfa, 0xb4, 0x0a, 0x2d, 0x74, 0xe5, 0x23, 0x3a } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 13.5", + /* Message */ + 47, + { 0xfc, 0xbd, 0xd0, 0x24, 0x8d, 0xf8, 0x57, 0xaf, 0x17, 0x5b, 0x43, 0x96, 0x87, 0x5c, 0x00, 0x6d, 0x51, 0x14, 0xcc, 0x11, 0x16, 0x42, 0x80, 0x04, 0x38, 0x08, 0xaa, 0x79, 0x88, 0x6c, 0x4c, 0xaa, 0x29, 0x11, 0x7b, 0xf3, 0xce, 0x45, 0xa9, 0xbe, 0x55, 0x07, 0xc6, 0xb8, 0xbf, 0x0d, 0x30 } +, + /* Seed */ + 79, + { 0x2c, 0x9d, 0x14, 0x57, 0xba, 0x44, 0x50, 0xdf, 0x40, 0x21, 0xe4, 0xe5, 0x11, 0x83, 0xf7, 0x95, 0xd0, 0x91, 0xc0, 0x7f, 0x6a, 0xe0, 0xdd, 0x96, 0x2d, 0x57, 0x28, 0xc5, 0x4b, 0x7f, 0xc3, 0xc7, 0x72, 0xd7, 0x9d, 0x7b, 0xec, 0xe1, 0xbb, 0x0c, 0x99, 0x6c, 0x9a, 0xc0, 0x7f, 0x99, 0x54, 0xdd, 0xa7, 0x68, 0x7b, 0xec, 0x86, 0xbc, 0xdb, 0x31, 0x40, 0xb2, 0x45, 0xbb, 0x5e, 0x01, 0x27, 0x5b, 0x38, 0xd1, 0xf2, 0x52, 0x33, 0x5e, 0x36, 0xc6, 0x8c, 0x0e, 0x58, 0xf4, 0xce, 0x11, 0x7e } +, + /* Encryption */ + 129, + { 0x2c, 0xed, 0xde, 0xf2, 0x02, 0x69, 0x1a, 0xae, 0x42, 0x71, 0x85, 0x2a, 0x89, 0x83, 0xde, 0x7c, 0x21, 0x4c, 0xee, 0x00, 0xdb, 0xe1, 0xa1, 0x58, 0x84, 0xf4, 0xc3, 0xc1, 0xde, 0x7a, 0x3e, 0xa0, 0x1e, 0xcc, 0xf4, 0x7a, 0xe8, 0x6c, 0x26, 0x93, 0x24, 0xae, 0x52, 0x37, 0x73, 0x37, 0xb6, 0xca, 0x82, 0xe8, 0x5d, 0x55, 0x3f, 0xbb, 0x2e, 0xe5, 0xf9, 0x77, 0xdc, 0x66, 0x4e, 0x14, 0x2f, 0x1b, 0x54, 0x53, 0x8f, 0xaf, 0x85, 0xca, 0xc2, 0x7c, 0x29, 0xf2, 0xed, 0x0c, 0x40, 0x42, 0x67, 0x33, 0x5d, 0x48, 0xea, 0x40, 0xe8, 0xa3, 0xdd, 0xd8, 0x96, 0xbb, 0xb3, 0xe0, 0xed, 0xf0, 0xe1, 0x6f, 0x9e, 0x89, 0x44, 0x68, 0x3b, 0x8c, 0xfb, 0xaa, 0xb5, 0xea, 0xf2, 0x25, 0x30, 0xf1, 0x58, 0xc4, 0x88, 0x0b, 0xc3, 0xe4, 0x60, 0xc0, 0x6a, 0x24, 0x03, 0x42, 0x21, 0x0a, 0xa8, 0x7b, 0x79, 0x09, 0x68 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 13.6", + /* Message */ + 34, + { 0x25, 0xf2, 0xa3, 0x06, 0xea, 0xbe, 0x6e, 0x3a, 0x18, 0x30, 0xdc, 0x93, 0x6b, 0xfa, 0x41, 0xcd, 0xeb, 0xb8, 0x80, 0x05, 0x17, 0x5d, 0xf4, 0xa3, 0xc9, 0xc4, 0x64, 0x23, 0x01, 0x45, 0x61, 0x11, 0x5a, 0xa8 } +, + /* Seed */ + 92, + { 0xcb, 0x8e, 0x0f, 0xf4, 0x1b, 0xab, 0x01, 0xa1, 0x42, 0xf9, 0x6e, 0x7d, 0x7c, 0xd3, 0x92, 0x82, 0x0a, 0x82, 0xa1, 0x73, 0x66, 0x74, 0xb9, 0x21, 0x35, 0xef, 0x33, 0x08, 0x96, 0x88, 0xdd, 0x30, 0xb2, 0xc2, 0xf7, 0xba, 0x11, 0x1a, 0xf7, 0x8d, 0x3f, 0x76, 0xa3, 0x7f, 0x66, 0x7d, 0xb3, 0x97, 0x5f, 0xce, 0x64, 0xec, 0x9a, 0xfb, 0x09, 0x68, 0x50, 0x7f, 0x7b, 0x31, 0x09, 0x7e, 0xaa, 0xe4, 0x88, 0x1b, 0x36, 0x24, 0x06, 0x56, 0x16, 0xca, 0x09, 0x0c, 0x20, 0x4c, 0x1f, 0xa4, 0xbe, 0x13, 0x48, 0x50, 0xea, 0x5e, 0x90, 0xfe, 0xcd, 0xc8, 0x45, 0xb9, 0xd8, 0x39 } +, + /* Encryption */ + 129, + { 0x4c, 0x7a, 0xc8, 0x12, 0x45, 0xe7, 0xd4, 0xde, 0x3c, 0x4d, 0xbf, 0xb3, 0x15, 0xc4, 0x68, 0x34, 0x1c, 0xbf, 0x22, 0x87, 0x57, 0x35, 0xc5, 0xf8, 0x05, 0x90, 0x50, 0x58, 0x53, 0x06, 0x8d, 0x6b, 0xe7, 0x03, 0x9b, 0x1c, 0xee, 0x6d, 0x07, 0xec, 0xb7, 0x66, 0x9c, 0x42, 0xf6, 0xb9, 0x2f, 0x2a, 0x71, 0xf6, 0x45, 0xf7, 0x2c, 0xba, 0xff, 0x76, 0x34, 0x16, 0x37, 0xd2, 0xf1, 0xd6, 0xb1, 0xfe, 0xce, 0xb0, 0x7f, 0x21, 0xe1, 0x4c, 0x70, 0xfb, 0x77, 0xbc, 0x7f, 0x87, 0xb0, 0x31, 0xc2, 0xc8, 0xf2, 0xad, 0xa4, 0xec, 0x43, 0xe9, 0x12, 0x68, 0x2c, 0x2f, 0x49, 0x63, 0x9e, 0x75, 0x71, 0x57, 0x18, 0x77, 0xfc, 0x48, 0x1c, 0xbf, 0x26, 0x98, 0xb3, 0x73, 0x15, 0xbd, 0x4b, 0x93, 0x07, 0x83, 0xf4, 0x79, 0x45, 0x64, 0x2b, 0x7d, 0x81, 0x5e, 0x04, 0x32, 0xd4, 0x5d, 0xd1, 0xd0, 0xd3, 0xb2, 0xa5 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 13.7", + /* Message */ + 51, + { 0xa0, 0xda, 0xab, 0x4f, 0x9f, 0xe0, 0x4a, 0x2a, 0x51, 0xbf, 0x08, 0x32, 0x70, 0x11, 0x5d, 0x0d, 0x06, 0xdc, 0x29, 0x21, 0xcf, 0x8d, 0xd1, 0x3f, 0x5c, 0xff, 0x26, 0x04, 0xbc, 0x55, 0x1e, 0xfd, 0x98, 0x3d, 0x9b, 0x25, 0xb7, 0x27, 0x4f, 0x3c, 0xcb, 0x0a, 0xdc, 0xc1, 0x1b, 0x1a, 0x39, 0x54, 0xab, 0x9d, 0xb4 } +, + /* Seed */ + 75, + { 0xc8, 0x1d, 0x1c, 0x02, 0xf0, 0x6e, 0x7f, 0xfd, 0x6e, 0x03, 0xb8, 0x1b, 0x71, 0x93, 0xaa, 0xbd, 0xac, 0x56, 0x63, 0xab, 0x14, 0x25, 0xa6, 0x7d, 0x1a, 0x29, 0x50, 0x88, 0x5f, 0x5d, 0x1c, 0x4b, 0x72, 0x5e, 0x20, 0x9d, 0xcb, 0xce, 0x9f, 0x7b, 0xf2, 0x96, 0x75, 0x23, 0x42, 0xf1, 0x84, 0xfe, 0xa0, 0x6a, 0x7d, 0x6c, 0xb2, 0xbd, 0x39, 0xb2, 0xa3, 0x18, 0x07, 0x51, 0x64, 0xa2, 0xe7, 0x61, 0xb7, 0x02, 0x70, 0x2b, 0x01, 0x92, 0x46, 0xc1, 0xe5, 0x0e, 0x6e } +, + /* Encryption */ + 129, + { 0x06, 0xc0, 0x6c, 0x97, 0x5f, 0xc6, 0xb9, 0xc2, 0x60, 0xd3, 0xd8, 0x81, 0x3b, 0x57, 0x14, 0x24, 0x8b, 0xeb, 0x39, 0x9b, 0x7d, 0x68, 0xfc, 0xac, 0x25, 0x03, 0x38, 0xca, 0xc5, 0x4c, 0x40, 0x72, 0x95, 0x9f, 0x62, 0x03, 0x84, 0x44, 0xe9, 0xe6, 0x66, 0xba, 0xb5, 0xf9, 0x36, 0x06, 0x70, 0x47, 0xbc, 0xaf, 0x4b, 0xa4, 0xed, 0x68, 0xc6, 0xc8, 0x18, 0x57, 0x46, 0x29, 0x32, 0x56, 0xe7, 0xc7, 0x24, 0x16, 0x65, 0x81, 0x54, 0xde, 0xc0, 0x67, 0xf4, 0x25, 0x0d, 0xc6, 0xb2, 0x9b, 0xba, 0xc1, 0x8e, 0x82, 0x1e, 0x49, 0xa4, 0xc9, 0xb1, 0x63, 0x83, 0x1f, 0x7b, 0xb3, 0x83, 0x92, 0x32, 0x6c, 0x6b, 0x46, 0x85, 0x46, 0x4f, 0xe4, 0xf0, 0x26, 0xc9, 0xae, 0x4d, 0xbc, 0x58, 0x49, 0x47, 0x7b, 0x4c, 0x26, 0x0a, 0xa4, 0xac, 0x02, 0xd2, 0x1a, 0x26, 0x40, 0x20, 0xf1, 0x0c, 0xa1, 0x1b, 0x4b, 0x0e } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 13.8", + /* Message */ + 51, + { 0x74, 0x3c, 0xdd, 0xb3, 0x61, 0xc0, 0xbb, 0x32, 0x47, 0x64, 0x95, 0xad, 0x5d, 0xc6, 0x3a, 0x2b, 0xce, 0x5f, 0xba, 0xc1, 0xc8, 0xc2, 0x03, 0x93, 0x69, 0x32, 0x67, 0xd8, 0x43, 0xf2, 0x8b, 0x8c, 0xf3, 0xea, 0x13, 0xe3, 0x74, 0xe0, 0x9d, 0x0a, 0xa3, 0xf7, 0xae, 0x5d, 0x8f, 0x72, 0xd8, 0xe6, 0xcb, 0x9d, 0xbd } +, + /* Seed */ + 75, + { 0xf7, 0x2e, 0xd2, 0xd0, 0x69, 0xb8, 0xae, 0x50, 0x27, 0x04, 0x6e, 0x03, 0x27, 0xb9, 0x87, 0x84, 0x58, 0x09, 0xb4, 0xe8, 0x16, 0xc8, 0x86, 0x58, 0x24, 0xfc, 0x4a, 0x23, 0x01, 0xb4, 0x56, 0x80, 0x2b, 0x18, 0x9c, 0xbb, 0x43, 0xf0, 0x48, 0x32, 0xac, 0x25, 0xc8, 0x48, 0xd7, 0x4f, 0xbe, 0x1d, 0x62, 0x5a, 0xa9, 0x8a, 0xe0, 0x5e, 0xb6, 0x25, 0x47, 0x76, 0x1c, 0x78, 0xb8, 0x17, 0x61, 0xc3, 0x03, 0xf9, 0x3d, 0xf3, 0xfc, 0x0f, 0xea, 0x3c, 0x5a, 0x7b, 0xb1 } +, + /* Encryption */ + 129, + { 0x38, 0x3e, 0xbb, 0xf1, 0x59, 0xe1, 0xd0, 0xa2, 0x1c, 0x74, 0xeb, 0x61, 0xe3, 0x64, 0x3c, 0xb6, 0x31, 0xbe, 0x18, 0xc7, 0xa2, 0xa5, 0x4e, 0x24, 0x89, 0x33, 0x58, 0x7d, 0x34, 0x5e, 0x99, 0x52, 0x72, 0x46, 0x6d, 0xc1, 0xbd, 0x61, 0x3a, 0xdd, 0xb4, 0xcd, 0x7b, 0xa5, 0x01, 0x92, 0xfc, 0x2d, 0x89, 0x4d, 0x7f, 0xda, 0xf7, 0x83, 0x63, 0xb0, 0x79, 0xd9, 0x98, 0x01, 0x9f, 0x16, 0x42, 0x31, 0xcc, 0x2d, 0x75, 0x2d, 0xb7, 0x6a, 0x9f, 0x9d, 0x0c, 0x52, 0x04, 0xbf, 0xb0, 0xf9, 0x93, 0x05, 0x53, 0x09, 0x6b, 0x5b, 0x76, 0x80, 0xb0, 0x89, 0x4f, 0xb9, 0x9c, 0x11, 0x42, 0x5c, 0x67, 0xd6, 0x5d, 0x96, 0x5e, 0x35, 0x12, 0x8e, 0x15, 0x47, 0x46, 0xb3, 0xfe, 0xd8, 0xd0, 0x16, 0x99, 0x30, 0x70, 0xa7, 0x0e, 0x07, 0xeb, 0xeb, 0xe0, 0x6f, 0x2f, 0x4e, 0x97, 0x6c, 0x9a, 0x63, 0xfb, 0xe3, 0x20 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 13.9", + /* Message */ + 58, + { 0xe5, 0x31, 0x92, 0xfe, 0xbc, 0xd3, 0x69, 0x58, 0xbd, 0x08, 0x03, 0xf2, 0xea, 0x0a, 0xfd, 0xbf, 0xdf, 0x99, 0x3b, 0x58, 0xa9, 0xe4, 0xee, 0x70, 0xdf, 0x95, 0xb0, 0x6d, 0x4e, 0x7d, 0x74, 0xb6, 0x74, 0x5b, 0x87, 0xf5, 0x81, 0xf3, 0x42, 0xf8, 0xae, 0xf9, 0xae, 0x4c, 0x31, 0x82, 0xc4, 0x19, 0x9b, 0x65, 0x51, 0xfe, 0x18, 0xf8, 0xd3, 0xb9, 0xff, 0xe4 } +, + /* Seed */ + 68, + { 0xad, 0x98, 0x2f, 0xa7, 0x29, 0xf2, 0x7f, 0xce, 0x8a, 0x67, 0x49, 0x03, 0xec, 0xac, 0x69, 0x4d, 0xd3, 0x34, 0x13, 0xc7, 0x8e, 0x34, 0x28, 0xae, 0xed, 0x46, 0x9f, 0x84, 0xd9, 0x57, 0x5c, 0x6d, 0xa2, 0x75, 0x29, 0xf2, 0xc1, 0x4b, 0x53, 0xb7, 0x58, 0xd2, 0x0f, 0xb6, 0xb2, 0x47, 0xc8, 0x29, 0xc5, 0xfb, 0x1a, 0x16, 0xaf, 0x55, 0x07, 0x9a, 0x70, 0x73, 0xcc, 0xa0, 0x56, 0x25, 0x96, 0x2b, 0x6d, 0x1a, 0x6b, 0xef } +, + /* Encryption */ + 129, + { 0x22, 0x1d, 0x88, 0xa8, 0x6c, 0x9e, 0xd3, 0x7a, 0xa0, 0x9c, 0xf5, 0x72, 0x54, 0x97, 0x82, 0xe5, 0x8c, 0xa8, 0xd4, 0x85, 0x1f, 0x01, 0x6a, 0xcf, 0x28, 0x9e, 0xe8, 0xbf, 0x23, 0x79, 0x0b, 0x1a, 0x8f, 0x14, 0x8c, 0x16, 0x55, 0x08, 0xbc, 0x3f, 0xdb, 0x1e, 0xf9, 0xc9, 0x01, 0x16, 0x27, 0x42, 0x7c, 0x5f, 0x32, 0xe5, 0xca, 0xb8, 0x50, 0xcb, 0x6b, 0xc0, 0xbc, 0x04, 0xa1, 0x1d, 0xa2, 0xf0, 0x18, 0x13, 0xf3, 0x41, 0x41, 0x7b, 0x3e, 0x63, 0x2b, 0xca, 0xe0, 0x02, 0x97, 0x7d, 0x64, 0xff, 0xc9, 0x62, 0xc7, 0xfa, 0x75, 0x72, 0xf5, 0x6d, 0x26, 0x17, 0xe2, 0xa5, 0x2d, 0x3e, 0xf9, 0x17, 0xc4, 0x4a, 0x33, 0xb7, 0x15, 0x82, 0xaf, 0xf1, 0x39, 0x0b, 0x7c, 0x77, 0x4d, 0x60, 0x7c, 0x8d, 0x57, 0x8f, 0x7b, 0xc9, 0x0b, 0x35, 0x80, 0xd7, 0x7b, 0x03, 0x73, 0x19, 0x14, 0x77, 0xbc, 0x14, 0x26 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 13.10", + /* Message */ + 25, + { 0xd0, 0xeb, 0x48, 0x0e, 0x27, 0x45, 0x77, 0x9c, 0x8a, 0x30, 0xfe, 0x82, 0x0a, 0xef, 0x56, 0xd4, 0xce, 0x39, 0xef, 0x84, 0xea, 0x40, 0xc7, 0xdf, 0x0c } +, + /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xe4, 0x47, 0xd2, 0x59, 0xb6, 0x2b, 0xf7, 0x34, 0x25, 0x91, 0xbe, 0x83, 0xba, 0xec, 0x77, 0x71, 0x4c, 0xfe, 0x2b, 0x90, 0x1f, 0x36, 0x9a, 0xea, 0x68, 0x02, 0x48, 0xba, 0xbf, 0x06, 0x87, 0x10, 0xcb, 0xb9, 0x70, 0x48, 0x4f, 0x32, 0x4a, 0x23, 0x52, 0x53, 0xa3, 0x1e, 0x02, 0x25, 0x34, 0xab, 0xec, 0x7b, 0x39, 0x96, 0x06 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 13.11", + /* Message */ + 27, + { 0x1c, 0x42, 0x97, 0xf6, 0xdf, 0xc0, 0x7f, 0xfe, 0x57, 0x59, 0xaa, 0x1e, 0xaa, 0x5b, 0x79, 0x37, 0x8a, 0xfc, 0xdd, 0x1a, 0x9a, 0x33, 0xa2, 0x13, 0x3a, 0x39, 0xac } +, + /* Seed */ + 99, + { 0xa7, 0xaf, 0x2a, 0x86, 0x01, 0xe4, 0x08, 0xc3, 0x18, 0xfd, 0x1e, 0x0f, 0x82, 0x44, 0x5b, 0x50, 0x95, 0x44, 0xd5, 0xec, 0x97, 0xa7, 0x95, 0x8f, 0x59, 0x4b, 0x20, 0x54, 0xc5, 0x09, 0xf7, 0xef, 0xfd, 0xd4, 0x16, 0x30, 0x6b, 0x2b, 0x2c, 0x91, 0xb5, 0xa6, 0x37, 0xa1, 0x56, 0x82, 0x0d, 0x60, 0x1a, 0x23, 0xff, 0xdb, 0x31, 0xfb, 0x35, 0xd3, 0x05, 0xaa, 0x93, 0x74, 0x57, 0x8e, 0xef, 0xb8, 0x10, 0x2e, 0x8b, 0x72, 0x44, 0x19, 0x1f, 0x4e, 0xc7, 0x4a, 0xa2, 0x6a, 0x0b, 0x7d, 0xb3, 0x6c, 0xab, 0x44, 0x99, 0x9c, 0x81, 0xb3, 0x61, 0x57, 0x01, 0x6b, 0x55, 0x89, 0x06, 0xe5, 0xd7, 0x08, 0x8d, 0x51, 0x32 } +, + /* Encryption */ + 129, + { 0x3c, 0xdf, 0x2d, 0xc6, 0x7a, 0x4a, 0xa5, 0x31, 0xcf, 0xa1, 0x42, 0x80, 0x08, 0xbd, 0x05, 0x44, 0xab, 0xbd, 0x03, 0x29, 0x22, 0xdc, 0xc2, 0x43, 0x6d, 0xa0, 0xb5, 0xd7, 0xef, 0x9a, 0x70, 0x17, 0xe6, 0x19, 0x3a, 0x8b, 0xaf, 0x38, 0xc5, 0x8e, 0x91, 0x96, 0x2d, 0x65, 0xa3, 0x75, 0xf0, 0x8c, 0x1d, 0x55, 0x57, 0x9c, 0xf9, 0x4a, 0x79, 0x5c, 0x9c, 0x70, 0xb6, 0xe4, 0x2e, 0x16, 0x43, 0xce, 0xf5, 0x40, 0xdc, 0xe1, 0xe9, 0x86, 0xdd, 0x99, 0x88, 0x87, 0xb6, 0x95, 0x52, 0x44, 0x4b, 0x6d, 0xe9, 0x3b, 0xa7, 0xd5, 0xf7, 0x64, 0x83, 0x54, 0xbf, 0xcb, 0x70, 0x21, 0x39, 0xed, 0x39, 0x54, 0x94, 0x7d, 0x7b, 0x18, 0x0b, 0x6c, 0x02, 0xbc, 0xad, 0x82, 0x43, 0xa0, 0xab, 0x27, 0xca, 0x66, 0x52, 0x76, 0x29, 0x1b, 0x46, 0xcc, 0x31, 0x8d, 0xa9, 0xb5, 0xf6, 0x0a, 0x04, 0xaf, 0xfe, 0xbc, 0xb0 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 13.12", + /* Message */ + 16, + { 0x00, 0x92, 0x7f, 0xca, 0x7f, 0x5e, 0xc7, 0x6f, 0x54, 0x8d, 0xd4, 0x82, 0x63, 0xe3, 0x39, 0xbe } +, + /* Seed */ + 110, + { 0xde, 0xbc, 0x2c, 0x1f, 0x22, 0xd9, 0x32, 0xff, 0xcb, 0x89, 0x7c, 0xf1, 0x0a, 0xe6, 0x2c, 0x3e, 0x05, 0x1e, 0x3f, 0x78, 0x46, 0x3a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9, 0x03, 0x82, 0xe6, 0xd6, 0x2f, 0x8d, 0xf7, 0xae, 0x68, 0x5a, 0x1d, 0xfc, 0x84, 0x9e, 0x11, 0x99, 0x7d, 0xee, 0x88, 0x60, 0xd1, 0x0f, 0x70, 0x7b, 0x0d, 0x35, 0x36, 0x5a, 0x81, 0x24, 0x30, 0x73, 0x1e, 0x7a, 0x50, 0x8d } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 13.13", + /* Message */ + 26, + { 0x8b, 0x6d, 0xf2, 0xd6, 0xda, 0x63, 0x1a, 0xc8, 0xd5, 0x55, 0x6a, 0x26, 0x97, 0x54, 0x28, 0xfc, 0x4d, 0x20, 0xef, 0x5b, 0x4a, 0x1f, 0x06, 0x8e, 0xd2, 0xe5 } +, + /* Seed */ + 100, + { 0xff, 0x2c, 0x06, 0x98, 0x85, 0x2d, 0x1b, 0x0a, 0xe3, 0xc5, 0xc5, 0xc9, 0xbe, 0x26, 0xe8, 0x3c, 0x90, 0x44, 0x84, 0x2c, 0x16, 0x07, 0xf5, 0xf4, 0x08, 0x6a, 0x6d, 0x6c, 0xf1, 0x08, 0xad, 0xca, 0x61, 0xea, 0xf6, 0x65, 0x40, 0x0d, 0x7c, 0xff, 0x2a, 0x3a, 0xda, 0xdf, 0xaf, 0xd8, 0x0c, 0x64, 0x95, 0x6d, 0xa2, 0xd7, 0xd7, 0xc1, 0x35, 0xab, 0xf5, 0xa0, 0xd1, 0x76, 0x06, 0x25, 0x56, 0xeb, 0x4d, 0x8b, 0x75, 0xb9, 0x5c, 0xd1, 0x1e, 0xa9, 0xc0, 0x44, 0x2f, 0x84, 0x6f, 0x03, 0x7d, 0xa8, 0x77, 0x29, 0x02, 0xbf, 0xfc, 0xde, 0x65, 0x59, 0xe1, 0xb5, 0x9e, 0x60, 0xc6, 0xd0, 0xf9, 0x89, 0x6b, 0xa5, 0xc3, 0xc4 } +, + /* Encryption */ + 129, + { 0x41, 0x52, 0x76, 0x69, 0x80, 0x33, 0x39, 0xeb, 0xd8, 0xf2, 0xd1, 0xcc, 0x18, 0x6c, 0x7e, 0x8e, 0xbb, 0x80, 0xcf, 0x4b, 0x94, 0x9d, 0x8a, 0x28, 0x43, 0x65, 0x32, 0x9f, 0x3c, 0xe4, 0x6e, 0xbd, 0xac, 0x0a, 0x96, 0x9f, 0x67, 0x61, 0x90, 0x0c, 0xfe, 0x34, 0x2b, 0xc8, 0x4c, 0x7d, 0x69, 0x51, 0xac, 0xcf, 0x45, 0x28, 0x0b, 0xaf, 0x24, 0xa0, 0xcb, 0xb2, 0x42, 0xa9, 0x42, 0x18, 0xef, 0x9f, 0xd3, 0x71, 0xb1, 0xe0, 0x08, 0x24, 0x62, 0x62, 0x07, 0x0b, 0xf5, 0x54, 0xed, 0x57, 0x00, 0x7b, 0x97, 0x39, 0x79, 0x16, 0x35, 0x86, 0x1d, 0x86, 0xc6, 0x5b, 0x1a, 0x82, 0x56, 0xf4, 0x25, 0xf9, 0xf3, 0xae, 0x51, 0x9e, 0x1b, 0x1b, 0xdc, 0x58, 0x75, 0xb8, 0x78, 0xdd, 0xcf, 0xc1, 0x47, 0x0f, 0xee, 0xf2, 0xae, 0xeb, 0x01, 0x4b, 0x7e, 0x33, 0xef, 0xb9, 0xf4, 0xdd, 0x07, 0x83, 0xd1, 0x71, 0x23 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 13.14", + /* Message */ + 44, + { 0xea, 0x03, 0x96, 0x69, 0xbc, 0xd7, 0xa8, 0xcd, 0xce, 0xab, 0x58, 0x55, 0x91, 0xb5, 0x63, 0x61, 0xe9, 0x0b, 0xda, 0x0e, 0xa4, 0x40, 0x10, 0x49, 0x64, 0xe8, 0x89, 0xec, 0xe1, 0x8a, 0xeb, 0x04, 0xce, 0x0a, 0xb5, 0xb1, 0xcc, 0xb2, 0x30, 0xae, 0x03, 0x25, 0x5a, 0x39 } +, + /* Seed */ + 82, + { 0x20, 0x4f, 0xae, 0xb3, 0x13, 0x96, 0x5c, 0xc1, 0xa1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 0x2f, 0xb3, 0xcf, 0xf0, 0x3c, 0xa8, 0x90, 0xf7, 0x10, 0xaa, 0x88, 0xfd, 0x2d, 0x0f, 0x39, 0x2f, 0xf4, 0xa8, 0x8d, 0x31, 0x1a, 0xa1 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 13.15", + /* Message */ + 5, + { 0x0f, 0x46, 0x2b, 0xeb, 0xc6 } +, + /* Seed */ + 121, + { 0x4e, 0xae, 0x5d, 0x54, 0x92, 0xd9, 0x44, 0xff, 0xdb, 0x04, 0x2a, 0xd9, 0x50, 0x16, 0x81, 0xad, 0xb3, 0xeb, 0x6a, 0xb5, 0x28, 0xb6, 0xe8, 0x13, 0x53, 0x55, 0xb6, 0x23, 0xab, 0x55, 0xa7, 0x40, 0x87, 0xb1, 0x9f, 0xc5, 0x9b, 0x85, 0x34, 0xda, 0x9a, 0x88, 0xda, 0x29, 0xf6, 0x6f, 0x71, 0xf9, 0x45, 0x2a, 0xed, 0xe0, 0xe3, 0xe9, 0x39, 0x07, 0x70, 0x9c, 0x34, 0x49, 0x56, 0x72, 0x85, 0x74, 0xb6, 0x6f, 0xb9, 0xa6, 0xf3, 0x38, 0x3d, 0x58, 0xa0, 0x13, 0x6f, 0x94, 0xc4, 0xed, 0x86, 0xca, 0x9d, 0xd3, 0x8b, 0xff, 0x07, 0x0f, 0xcc, 0x2d, 0xef, 0x29, 0xbd, 0xd6, 0xfc, 0x98, 0x59, 0x70, 0x96, 0x7f, 0x02, 0xfd, 0x6f, 0x93, 0x01, 0xcd, 0x56, 0xd0, 0x48, 0xa4, 0x42, 0xd7, 0x02, 0x40, 0x9a, 0x98, 0xa1, 0x32, 0xab, 0x6b, 0xed, 0xd4, 0xfe } +, + /* Encryption */ + 129, + { 0x29, 0x36, 0x9e, 0xb0, 0x0a, 0x3f, 0x87, 0x84, 0x38, 0xc9, 0x38, 0xf9, 0xd7, 0xbd, 0xa3, 0x85, 0x6c, 0x45, 0xa6, 0xd7, 0x7c, 0x17, 0x88, 0x51, 0x1b, 0x98, 0x2c, 0x58, 0xf6, 0x3d, 0xbe, 0xa3, 0x3e, 0x63, 0xae, 0x1d, 0x45, 0xc2, 0xdf, 0x6b, 0xa8, 0x0f, 0x0d, 0xe9, 0x97, 0x59, 0x2e, 0x1f, 0x8a, 0x3b, 0x3a, 0x09, 0xed, 0x76, 0x06, 0x51, 0x45, 0x3e, 0x10, 0x99, 0x78, 0xcf, 0xde, 0x3a, 0x60, 0x0a, 0x74, 0xfa, 0xa8, 0xa9, 0x1b, 0x7c, 0x72, 0x4f, 0x97, 0x3c, 0xb8, 0x0b, 0x96, 0x83, 0x5f, 0x05, 0x0b, 0x7d, 0xc0, 0x9d, 0x2f, 0x15, 0x74, 0x76, 0xc5, 0xb7, 0x05, 0x1f, 0x94, 0xd9, 0xc0, 0xf3, 0x17, 0xe1, 0xf1, 0x88, 0xe3, 0x09, 0x80, 0x79, 0x5b, 0x09, 0x6c, 0xf9, 0xbb, 0xce, 0xb5, 0x63, 0x6b, 0x3d, 0xb9, 0x87, 0x05, 0x4a, 0x56, 0x08, 0x75, 0x22, 0x75, 0x96, 0x29, 0x97, 0xe7 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 13.16", + /* Message */ + 45, + { 0x51, 0x4d, 0x3b, 0x38, 0x00, 0x22, 0xb3, 0x78, 0x2e, 0x8a, 0x77, 0xd7, 0x7b, 0xf2, 0x4a, 0xfd, 0xf9, 0x2f, 0x33, 0x97, 0x47, 0x4d, 0xae, 0x0d, 0x4b, 0xd6, 0xe4, 0xfa, 0x31, 0xca, 0x60, 0x83, 0xdf, 0x49, 0x6b, 0x36, 0x62, 0x6e, 0x7f, 0x8e, 0x1c, 0x91, 0x9f, 0x9f, 0x2e } +, + /* Seed */ + 81, + { 0xd4, 0xd3, 0xa9, 0xe8, 0xfb, 0xeb, 0x1d, 0xc6, 0x07, 0xb4, 0xdd, 0x78, 0x87, 0xba, 0x25, 0xc3, 0xd0, 0xbd, 0x81, 0x34, 0x84,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0xd3, 0x74, 0x8a, 0x81, 0x0f, 0xd9, 0x14, 0x91, 0x14 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 13.17", + /* Message */ + 55, + { 0xfb, 0xa1, 0x63, 0x17, 0xb0, 0x93, 0x08, 0x3e, 0x37, 0x20, 0xaa, 0x06, 0x48, 0x17, 0xe7, 0x4c, 0xa7, 0x51, 0xa5, 0x17, 0x87, 0x4b, 0x69, 0x26, 0x50, 0xc4, 0x14, 0x7f, 0x11, 0x9f, 0x68, 0x90, 0x70, 0x2c, 0xf8, 0xb1, 0x4f, 0x0c, 0x18, 0x82, 0x21, 0x2d, 0x72, 0x40, 0x6c, 0x3a, 0x45, 0xd7, 0xd9, 0xff, 0xa4, 0x31, 0x24, 0x10, 0xa6 } +, + /* Seed */ + 71, + { 0x9c, 0xc9, 0xa4, 0xbf, 0x8c, 0xc2, 0x75, 0xa6, 0xb9, 0xb1, 0x35, 0x10, 0x31, 0x91, 0x10, 0x91, 0x7a, 0xd8, 0x53, 0x24, 0xc5, 0xa4, 0x34, 0x5e, 0x58, 0xf1, 0xfa, 0x47, 0x27, 0x5e, 0xe5, 0x92, 0x15, 0x69, 0xdc, 0xbc, 0xbd, 0x72, 0x36, 0x70, 0xcf, 0x4a, 0x24, 0xeb, 0xcd, 0x57, 0xf5, 0x7e, 0x99, 0x8c, 0x4b, 0xbd, 0x4a, 0x95, 0x67, 0x9d, 0x60, 0xba, 0xa0, 0xab, 0xe8, 0x79, 0x66, 0x8a, 0x2c, 0xb6, 0xed, 0x0f, 0xb9, 0x4e, 0x4a } +, + /* Encryption */ + 129, + { 0x4c, 0x41, 0xb9, 0xcb, 0xcc, 0x6f, 0xa8, 0x7f, 0x23, 0xf1, 0x7a, 0x36, 0xd0, 0x51, 0xe7, 0x78, 0x0a, 0x07, 0x06, 0x56, 0xca, 0xe7, 0xbe, 0xba, 0x14, 0xfa, 0x91, 0xc5, 0x55, 0xb8, 0x58, 0x8e, 0x88, 0x09, 0xe7, 0xd3, 0x35, 0x4e, 0x7e, 0xf5, 0xe0, 0xfa, 0xef, 0xe1, 0xcf, 0x39, 0x2e, 0x6f, 0xda, 0xd4, 0x04, 0x4a, 0xef, 0x08, 0xe3, 0x3e, 0x6f, 0xc2, 0x01, 0xc5, 0x47, 0xfd, 0xbd, 0xf7, 0xc7, 0x3d, 0x3b, 0xe0, 0x96, 0xed, 0x25, 0x3f, 0x9d, 0xf4, 0xaf, 0x52, 0xe1, 0x3b, 0x9a, 0x19, 0x25, 0xaa, 0x73, 0x93, 0xa6, 0x42, 0x95, 0x30, 0x20, 0x92, 0x01, 0xe5, 0x5b, 0x20, 0xe5, 0x1d, 0x50, 0x05, 0xd0, 0x6b, 0x58, 0x35, 0x3b, 0xfa, 0xfc, 0xee, 0xc3, 0x7d, 0x60, 0xe1, 0xca, 0x0d, 0x9d, 0xdd, 0xd8, 0x68, 0x0b, 0xd0, 0xa5, 0xd6, 0x92, 0xe7, 0x4f, 0x2d, 0xbd, 0xfc, 0xe2, 0x66, 0x02 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 13.18", + /* Message */ + 53, + { 0x5f, 0xfe, 0x82, 0xe0, 0x33, 0x54, 0x42, 0x45, 0xb8, 0x49, 0x62, 0xd3, 0x92, 0x7c, 0x2f, 0xa5, 0x99, 0x72, 0xef, 0x59, 0xc2, 0x37, 0xa3, 0x86, 0xa5, 0x1b, 0xd0, 0xba, 0x1f, 0x2c, 0x1f, 0x8e, 0x45, 0xb4, 0x6a, 0x05, 0xad, 0x97, 0xdb, 0x49, 0xd3, 0xac, 0xc6, 0x34, 0x4f, 0x1e, 0xda, 0xdf, 0x65, 0x64, 0xc2, 0x8c, 0xe1 } +, + /* Seed */ + 73, + { 0xcc, 0x23, 0x59, 0xbf, 0xd0, 0xd5, 0x7b, 0xce, 0xbf, 0x07, 0x5b, 0x87, 0xa5, 0x85, 0xa9, 0xbd, 0xe6, 0x59, 0x3e, 0xb2, 0x49, 0x61, 0xef, 0xf1, 0x98, 0x7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ption Example 13.19", + /* Message */ + 49, + { 0x22, 0x63, 0x3c, 0xc3, 0xfe, 0x7a, 0x7b, 0x4f, 0x00, 0xfa, 0x99, 0x9c, 0x4f, 0xe0, 0xd8, 0x82, 0xc3, 0x1b, 0xdc, 0x0d, 0x67, 0x0c, 0x0c, 0xc3, 0xd2, 0x88, 0x96, 0x1f, 0xbe, 0x63, 0x72, 0xe0, 0xe5, 0x32, 0x46, 0x42, 0xc7, 0xb1, 0xfa, 0x85, 0x2e, 0x1b, 0x4f, 0x69, 0x6f, 0x12, 0xf5, 0x58, 0x66 } +, + /* Seed */ + 77, + { 0x3e, 0xdf, 0xca, 0xf4, 0x88, 0x71, 0xd2, 0x91, 0xd5, 0xb7, 0xf7, 0x72, 0x3d, 0x92, 0xd9, 0x51, 0x51, 0x52, 0xb6, 0xbf, 0x52, 0xb8, 0x23, 0x69, 0x9c, 0x58, 0x8f, 0x75, 0xf3, 0x4e, 0x37, 0x95, 0x55, 0x0d, 0x07, 0x81, 0x18, 0xe2, 0x86, 0xc9, 0x6e, 0x90, 0x07, 0xae, 0xe1, 0x54, 0xf5, 0x7c, 0xe7, 0xf1, 0xd4, 0x60, 0x39, 0x47, 0x3a, 0x4a, 0x37, 0xa9, 0xb5, 0x90, 0xa3, 0x7e, 0xea, 0x59, 0x94, 0x7f, 0xe8, 0x58, 0x7c, 0x95, 0x69, 0x88, 0xbc, 0xb1, 0x74, 0xe9, 0x7c } +, + /* Encryption */ + 129, + { 0x3d, 0xeb, 0xbc, 0x6c, 0xfb, 0x0e, 0xed, 0x87, 0x16, 0x6b, 0xcc, 0xd5, 0x4c, 0x75, 0x97, 0xad, 0x36, 0xca, 0x0a, 0xc9, 0x6c, 0xf1, 0x66, 0x76, 0xe1, 0x87, 0x4b, 0xf5, 0xf1, 0x0a, 0x0e, 0xc6, 0x9c, 0x3b, 0xe2, 0x25, 0x96, 0x78, 0xee, 0xa6, 0x3a, 0x18, 0x08, 0xd9, 0x06, 0x65, 0xff, 0xce, 0x9a, 0xf0, 0x82, 0x7e, 0xe6, 0x29, 0xed, 0xd6, 0x59, 0x43, 0x43, 0x7f, 0x8c, 0xa0, 0xa6, 0x71, 0x17, 0x2c, 0x52, 0x1c, 0xc0, 0xd1, 0xdd, 0x01, 0xe2, 0x2f, 0x20, 0xa6, 0xc7, 0x9c, 0x42, 0x7a, 0xda, 0x88, 0x56, 0x00, 0x0c, 0x4e, 0x03, 0x5d, 0x9c, 0x5e, 0xf2, 0xe1, 0x05, 0xf2, 0xc9, 0xf6, 0x45, 0x7d, 0x9e, 0xe9, 0x5b, 0x43, 0xbc, 0x4b, 0xe3, 0x29, 0x4a, 0x0e, 0xe1, 0xd5, 0xc8, 0x33, 0xae, 0x91, 0x07, 0x8a, 0xed, 0x09, 0xe7, 0x92, 0xbb, 0x42, 0xc2, 0x5e, 0x00, 0xb0, 0x87, 0xe5, 0x61 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 13.20", + /* Message */ + 63, + { 0x55, 0x2b, 0x38, 0x4c, 0x5e, 0x51, 0x74, 0xf5, 0x1f, 0x38, 0x0d, 0x8b, 0x53, 0xe3, 0xc8, 0x97, 0xb4, 0x8c, 0x66, 0x9a, 0x9c, 0x2d, 0x11, 0x98, 0x5b, 0x86, 0x54, 0xde, 0x7f, 0x76, 0xd9, 0x62, 0x39, 0x6a, 0x37, 0xb9, 0x53, 0x41, 0xf9, 0x9d, 0xec, 0xe4, 0xaf, 0xd7, 0x1d, 0x3c, 0x84, 0xe1, 0x28, 0x7b, 0x0f, 0x0f, 0x86, 0xee, 0xff, 0xcf, 0xd9, 0x7b, 0xa1, 0x88, 0xe3, 0x79, 0x9e } +, + /* Seed */ + 63, + { 0x2e, 0x2f, 0x3e, 0x3f, 0x46, 0xd4, 0x74, 0x0c, 0xb2, 0x6c, 0xbc, 0x65, 0xaa, 0xe2, 0xaf, 0xe4, 0x9d, 0x0b, 0xe6, 0x66, 0x39, 0xd0, 0xdb, 0x10, 0xdf, 0xd6, 0xaf, 0x60, 0x64, 0x46, 0xf3, 0xb7, 0xde, 0x98, 0x21, 0x2f, 0x86, 0x17, 0x4b, 0xdf, 0xa5, 0xb2, 0xe2, 0x35, 0x85, 0x07, 0x45, 0x3c, 0x20, 0xad, 0xa6, 0x9a, 0x4f, 0xfe, 0x0a, 0x35, 0xe1, 0x2e, 0xfb, 0xab, 0x3b, 0xb4, 0x4c } +, + /* Encryption */ + 129, + { 0x14, 0x92, 0x91, 0xee, 0xb5, 0x36, 0xfc, 0x07, 0x03, 0xf7, 0xbd, 0xf1, 0xf0, 0x31, 0xa4, 0x30, 0xcc, 0x83, 0xad, 0xc4, 0x3e, 0x09, 0x68, 0x64, 0x91, 0x26, 0x69, 0x34, 0xef, 0x37, 0xea, 0xea, 0xb1, 0x1b, 0xc7, 0xf3, 0x91, 0x49, 0xab, 0x33, 0x43, 0x66, 0x94, 0x59, 0x36, 0x73, 0xcc, 0xc6, 0x39, 0x0b, 0x52, 0x9e, 0x64, 0xd3, 0x42, 0xe9, 0xf2, 0x1d, 0x17, 0x6d, 0xa2, 0x1f, 0xa6, 0x5a, 0xbd, 0x57, 0xee, 0xc6, 0x0d, 0xde, 0xc7, 0xd1, 0xa0, 0x93, 0xdb, 0xa3, 0x76, 0x44, 0x5f, 0x1b, 0xcf, 0xe5, 0xa6, 0xaa, 0xce, 0x9f, 0x13, 0x42, 0xaf, 0x39, 0xdb, 0x8a, 0xd4, 0x85, 0xba, 0x22, 0x2d, 0x39, 0x12, 0x62, 0x28, 0xfa, 0xee, 0xb4, 0x9b, 0xb3, 0xb2, 0x71, 0xfd, 0x38, 0xe1, 0x15, 0x25, 0xd8, 0x03, 0x15, 0x4e, 0x74, 0x08, 0x4b, 0x75, 0xc3, 0xdb, 0xcd, 0xff, 0x2e, 0x3d, 0x10, 0x42 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 14: A 1536-bit RSA key pair", +{ + /* Modulus */ + 192, + { 0xbe, 0x0c, 0xa0, 0x1f, 0x9c,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x50, 0x9e, 0x59 } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 191, + { 0xf3, 0x7d, 0x28, 0xd6, 0x1f, 0x28, 0x99, 0xa5, 0xc0, 0xe0, 0xa0, 0x74, 0x9d, 0x13, 0x89, 0x38, 0x7c, 0x64, 0xc8, 0xc3, 0x58, 0xa9, 0x71, 0xda, 0xd1, 0x3c, 0xff, 0x85, 0xc5, 0x9a, 0x62, 0xdd, 0xa7, 0xbb, 0xc0, 0xf7, 0xe5, 0xbd, 0xc6, 0x5d, 0xff, 0x9d, 0xe9, 0xc7, 0x45, 0x40, 0x46, 0x31, 0x75, 0x81, 0x48, 0x16, 0x8d, 0xfe, 0x6a, 0xc0, 0xa2, 0x87, 0x6a, 0x56, 0x05, 0x3b, 0xab, 0x2a, 0x2a, 0x9f, 0xf2, 0x72, 0x79, 0x4d, 0xd5, 0xd8, 0x13, 0x9e, 0xed, 0x10, 0xbc, 0xfb, 0x4d, 0xf3, 0x30, 0x20, 0xd5, 0x9e, 0x30, 0x48, 0xfd, 0x2f, 0x0c, 0x43, 0x14, 0x26, 0x14, 0x5e, 0x36, 0xa1, 0xd0, 0xa6, 0xbf, 0xce, 0x44, 0x43, 0xef, 0x3c, 0x7e, 0x31, 0xd4, 0xa9, 0x2f, 0xb8, 0x51, 0x7a, 0x49, 0xf7, 0x88, 0xc3, 0xb4, 0xe1, 0x37, 0x39, 0x5a, 0x4b, 0xee, 0xea, 0x63, 0xe0, 0xe0, 0xad, 0xc3, 0x22, 0x4f, 0x98, 0x09, 0x25, 0x03, 0x7d, 0xf6, 0xf5, 0xb2, 0x6c, 0x00, 0x72, 0x39, 0xb4, 0xf0, 0x1f, 0x8a, 0x9a, 0x61, 0xea, 0x0b, 0x51, 0x19, 0xbc, 0x9d, 0x54, 0x96, 0xa9, 0x5b, 0x60, 0xea, 0x76, 0x6c, 0xcb, 0xad, 0xe0, 0x37, 0xe3, 0x40, 0x32, 0x4f, 0x25, 0x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3, 0xea, 0x73, 0xb8, 0x1b, 0xe2, 0x6c, 0xca, 0xd9, 0x89, 0xb9, 0xf0, 0x77, 0x28, 0xda, 0xd5, 0x3b, 0x38, 0xef, 0x7f, 0xe9, 0xeb, 0xe9, 0x11, 0x40, 0xcb, 0xad, 0x17, 0xdc, 0x7e, 0xcb, 0x1d, 0x58, 0xd1 } +, + /* Prime exponent 1 */ + 96, + { 0x9e, 0x79, 0xf6, 0x9b, 0x5d, 0x60, 0x94, 0x6f, 0x22, 0xb5, 0xb7, 0x03, 0x3f, 0x18, 0x64, 0x6c, 0x0a, 0xcf, 0x12, 0x03, 0x41, 0x19, 0xf7, 0x23, 0x5a, 0xa1, 0xa7, 0xf0, 0x6a, 0xc8, 0xab, 0x6e, 0xd7, 0x89, 0x11, 0x38, 0x0a, 0x33, 0xb9, 0xea, 0x1f, 0x3e, 0x7f, 0x22, 0x19, 0xbe, 0x30, 0xa5, 0x39, 0x3d, 0xf0, 0xdc, 0x75, 0x51, 0x22, 0xc5, 0x8f, 0x99, 0x66, 0xf8, 0x1b, 0xac, 0x40, 0xe4, 0x69, 0x38, 0x44, 0x90, 0xe3, 0x8d, 0x99, 0xe8, 0x8b, 0x0b, 0x99, 0xc4, 0x97, 0xcc, 0xb5, 0x86, 0x4c, 0xd3, 0x72, 0x9f, 0x4f, 0xf8, 0x34, 0xae, 0x1e, 0x1b, 0x77, 0x24, 0x64, 0xb5, 0xe2, 0x41 } +, + /* Prime exponent 2 */ + 96, + { 0x3a, 0x05, 0xe9, 0x18, 0x13, 0x91, 0x30, 0x76, 0xe0, 0xbf, 0x76, 0x7b, 0x2b, 0x1e, 0x55, 0x2b, 0x3e, 0xb6, 0x19, 0xe5, 0x4a, 0x24, 0x99, 0xef, 0xa9, 0xb5, 0x31, 0xbc, 0xcc, 0xba, 0x75, 0x27, 0xe9, 0x7b, 0x9a, 0xd1, 0x10, 0x4f, 0x86, 0xaa, 0xc2, 0x55, 0x7b, 0x45, 0xcc, 0xe3, 0xae, 0x27, 0x71, 0x30, 0xdc, 0xf3, 0x04, 0x27, 0x05, 0x49, 0xd5, 0xc8, 0x6e, 0x79, 0xf0, 0x89, 0x0c, 0x33, 0x03, 0x77, 0xdc, 0x59, 0x6e, 0xd8, 0x25, 0x7f, 0xd1, 0x15, 0x11, 0x78, 0xe2, 0x0f, 0x8f, 0xa2, 0xfe, 0xa9, 0x91, 0x71, 0xd9, 0xdf, 0x35, 0x00, 0x27, 0xce, 0xfa, 0x97, 0x0c, 0xf7, 0x64, 0x41 } +, + /* Coefficient */ + 96, + { 0x18, 0xb1, 0x0d, 0xd7, 0x3b, 0x14, 0x7d, 0x86, 0xb6, 0x0c, 0xf7, 0xfe, 0xbf, 0x46, 0x35, 0x93, 0xc0, 0xbd, 0xd6, 0xbc, 0x83, 0xa8, 0x39, 0x57, 0x3b, 0x4b, 0x3f, 0xe6, 0x5c, 0x0b, 0x13, 0xe7, 0xb6, 0x94, 0xb8, 0x1a, 0x56, 0x57, 0x21, 0x0b, 0xe9, 0x47, 0x01, 0x1d, 0x8d, 0x49, 0x29, 0xc1, 0x27, 0xfd, 0x2f, 0x3e, 0x31, 0x06, 0xc2, 0x53, 0x38, 0x3b, 0xe6, 0x35, 0x41, 0xd1, 0x23, 0x5b, 0xd7, 0x9c, 0x57, 0x2e, 0x92, 0xe2, 0x36, 0x34, 0x28, 0x20, 0x98, 0xbe, 0xe9, 0x4d, 0x48, 0xbd, 0x62, 0x8a, 0x0e, 0xb2, 0x1e, 0xd2, 0x61, 0xcf, 0xa3, 0x5b, 0x69, 0xb9, 0x77, 0x70, 0xe2, 0x93 } + +} +, +{{ + "PKCS#1 v1.5 Encryption Example 14.1", + /* Message */ + 9, + { 0x2b, 0xd6, 0xe3, 0xc1, 0xde, 0xfd, 0xdd, 0x5a, 0x43 } +, + /* Seed */ + 180, + { 0xe7, 0x84, 0xd5, 0x25, 0x03, 0xe6, 0x29, 0x1f, 0x25, 0x8e, 0x44, 0x2d, 0xb5, 0x77, 0xf9, 0x91, 0x63, 0x82, 0xa0, 0xd1, 0x4c, 0x7b, 0x9d, 0xcc, 0xbd, 0xb6, 0x07, 0xaf, 0x01, 0xf0, 0x25, 0x8f, 0xdc, 0x97, 0x23, 0x97, 0xda, 0x12, 0x39, 0xd4, 0x44, 0x9a, 0x58, 0x28, 0x6e, 0xce, 0x20, 0x08, 0xf7, 0x18, 0xf6, 0x90, 0xce, 0xe7, 0x3a, 0x02, 0x7f, 0xab, 0xf8, 0x4b, 0xdf, 0x7a, 0xce, 0x45, 0xf7, 0xed, 0x2d, 0x77, 0x32, 0x4c, 0xbe, 0xe9, 0x0e, 0xcc, 0x6f, 0x1e, 0x7b, 0x86, 0xcc, 0x29, 0x35, 0xa4, 0x7b, 0xa1, 0x56, 0x65, 0x0b, 0x42, 0xfc, 0x71, 0xaa, 0xd0, 0x70, 0x99, 0xa2, 0x7e, 0x97, 0xfe, 0x5a, 0x3f, 0x25, 0xfe, 0x13, 0x48, 0xe4, 0x42, 0x39, 0x12, 0x12, 0xa5, 0xcf, 0x1b, 0x44, 0x5a, 0x1e, 0x70, 0x19, 0x1f, 0xfa, 0x8f, 0xca, 0xde, 0x63, 0x5d, 0x2e, 0x44, 0x65, 0xf5, 0xf9, 0x13, 0xc5, 0x3e, 0x33, 0xb5, 0x91, 0x52, 0xcd, 0x8a, 0x14, 0x97, 0x84, 0xf2, 0x7d, 0x83, 0x18, 0x28, 0xaf, 0x2d, 0x66, 0x6a, 0x5c, 0x30, 0x9b, 0x56, 0xd0, 0x71, 0x9c, 0xfd, 0x80, 0x73, 0x40, 0x69, 0xa2, 0x3e, 0x09, 0x2d, 0x83, 0x15, 0x39, 0x9f, 0x95, 0xc4, 0x0a, 0xd7, 0xfd, 0x0b, 0xb5, 0xf9, 0x43, 0x77 } +, + /* Encryption */ + 192, + { 0x85, 0xef, 0x3e, 0x47, 0x76, 0x77, 0xbf, 0x76, 0x07, 0x1a, 0x27, 0xbb, 0xc7, 0x39, 0x57, 0x15, 0xcb, 0x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Example 14.2", + /* Message */ + 43, + { 0x10, 0x47, 0x35, 0xd9, 0xad, 0x72, 0x60, 0x46, 0x47, 0x3d, 0xf4, 0xb1, 0x3b, 0x2f, 0x5f, 0xa2, 0x85, 0xc3, 0xd2, 0x33, 0xec, 0xd4, 0x61, 0x70, 0x58, 0x2d, 0xd2, 0x28, 0xcd, 0xee, 0x46, 0x4d, 0xa5, 0x09, 0x5e, 0x20, 0x8c, 0xf8, 0xfb, 0xca, 0x05, 0x38, 0x8b } +, + /* Seed */ + 146, + { 0xdc, 0x6a, 0x63, 0x1e, 0x29, 0x75, 0x45, 0xd2, 0xf6, 0xfe, 0x9c, 0x69, 0xa5, 0xd3, 0x06, 0xa1, 0x09, 0x16, 0xd7, 0xe7, 0xef, 0x0d, 0xc9, 0x53, 0xf2, 0x1b, 0x6a, 0x04, 0x14, 0x31, 0xec, 0x8b, 0xa5, 0xce, 0x1c, 0x13, 0x87, 0x43, 0xfa, 0xac, 0x54, 0x97, 0xd6, 0x99, 0xf2, 0xff, 0x1d, 0x4a, 0x44, 0xa3, 0xe0, 0x63, 0x7c, 0xc5, 0xe5, 0xe6, 0x38, 0xcd, 0x73, 0x67, 0x7d, 0x09, 0xaf, 0xee, 0x3e, 0xc9, 0xfe, 0x80, 0x52, 0x94, 0x7a, 0x73, 0x33, 0x4c, 0x32, 0x70, 0x47, 0x28, 0x56, 0xf3, 0x07, 0x24, 0x3a, 0xc5, 0x8b, 0xf8, 0x63, 0x80, 0x74, 0x66, 0x7d, 0x7f, 0x7c, 0x18, 0xe3, 0xab, 0x32, 0x7e, 0xa3, 0xfc, 0x78, 0x91, 0xf1, 0xc5, 0x8a, 0xb4, 0x7e, 0x4f, 0xfa, 0x6e, 0x7d, 0x90, 0x11, 0xa3, 0x3d, 0x9b, 0x40, 0xa2, 0xd7, 0x89, 0xee, 0x42, 0x21, 0x25, 0x62, 0x30, 0xca, 0x8a, 0x61, 0x81, 0x1b, 0x09, 0x72, 0xcf, 0xd9, 0x86, 0x01, 0x75, 0x26, 0x18, 0x1d, 0x24, 0xee, 0xbb, 0x32, 0xcc } +, + /* Encryption */ + 192, + { 0x92, 0x1d, 0x2b, 0x02, 0x6d, 0x6b, 0x7e, 0x22, 0x20, 0x1d, 0xe7, 0x7f, 0xbf, 0x67, 0x99, 0x90, 0xf9, 0xaf, 0xf4, 0xea, 0x7f, 0xe7, 0xce, 0x45, 0x02, 0x21, 0x5f, 0x9e, 0x7a, 0xa4, 0x18, 0xb8, 0x5f, 0x72, 0xea, 0xdb, 0x6b, 0x69, 0x42, 0xbb, 0x08, 0xa0, 0x8b, 0xe7, 0xda, 0x66, 0x19, 0xaa, 0x5f, 0x1d, 0x2f, 0xf9, 0x61, 0xc9, 0xdc, 0x2c, 0x34, 0x1a, 0xe3, 0x2a, 0x25, 0x4f, 0xde, 0xab, 0xa2, 0xf6, 0x45, 0x0a, 0xc4, 0x47, 0x4b, 0x62, 0x74, 0xf0, 0xc3, 0x46, 0xf2, 0x6d, 0xa4, 0xed, 0x55, 0x5a, 0x8c, 0x95, 0x11, 0x89, 0xdc, 0x83, 0x69, 0xf3, 0x4d, 0x76, 0xd8, 0x37, 0xd6, 0xf3, 0x8a, 0x95, 0x18, 0xa6, 0x27, 0x1c, 0x5b, 0x56, 0x34, 0x62, 0x25, 0xa5, 0xab, 0x8d, 0xa6, 0x03, 0x2a, 0x59, 0x30, 0xfd, 0x5b, 0x77, 0x72, 0x9d, 0xe6, 0x32, 0xe1, 0x75, 0x2f, 0xc7, 0x2a, 0x0c, 0x34, 0xae, 0xce, 0x25, 0x65, 0x7b, 0x28, 0x1b, 0xe8, 0x93, 0x2c, 0x56, 0x50, 0xc9, 0x82, 0xfa, 0x14, 0x5f, 0xde, 0x0b, 0xcd, 0xd4, 0x8a, 0x73, 0xaa, 0x02, 0x88, 0xb4, 0xde, 0x46, 0x11, 0x33, 0xf2, 0x7d, 0x51, 0xe3, 0x86, 0x01, 0x6a, 0x72, 0x72, 0x6a, 0x9e, 0xde, 0x1d, 0x32, 0xdf, 0xc7, 0xe6, 0xf9, 0x78, 0x0c, 0x04, 0xeb, 0x70, 0xff, 0xff, 0xc2, 0x68, 0x82, 0x95, 0x66, 0x73, 0x33 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 14.3", + /* Message */ + 25, + { 0x31, 0x7e, 0x6f, 0x5e, 0x17, 0x50, 0x0f, 0xe9, 0x4f, 0xdf, 0xf2, 0x84, 0xbb, 0xe5, 0x03, 0x01, 0x04, 0x4d, 0x14, 0x22, 0xd3, 0xca, 0x70, 0x05, 0x98 } +, + /* Seed */ + 164, + { 0x46, 0x6d, 0x53, 0xc8, 0xd0, 0xbb, 0x9e, 0xd4, 0x60, 0xca, 0xa6, 0x3d, 0x79, 0xbf, 0xb8, 0x77, 0xbc, 0x4e, 0xa3, 0x45, 0xca, 0xb4, 0x35, 0x7e, 0x63, 0x9a, 0x95, 0xdc, 0xae, 0x37, 0x9d, 0xdc, 0xea, 0x5d, 0x64, 0xfe, 0xe9, 0x9f, 0xb6, 0xf7, 0x5f, 0xf2, 0x4e, 0xb7, 0x4d, 0x44, 0x03, 0x44, 0xd1, 0x47, 0xe4, 0x33, 0x14, 0xa0, 0xf8, 0x9f, 0x8b, 0x96, 0x14, 0x82, 0x15, 0x36, 0x8e, 0xb8, 0x65, 0x1f, 0x6d, 0x3c, 0xa0, 0xd0, 0x8d, 0x0b, 0x4c, 0x73, 0xe6, 0xd1, 0xa7, 0x68, 0x40, 0x98, 0x26, 0xd4, 0x3c, 0x2f, 0x81, 0xf3, 0x08, 0x40, 0x60, 0x5c, 0x43, 0xd0, 0xfe, 0x67, 0x1d, 0x3f, 0x02, 0x4c, 0x70, 0xd0, 0xb8, 0x99, 0x23, 0xcf, 0x90, 0x4e, 0x39, 0x97, 0x99, 0x62, 0xcd, 0x51, 0x5c, 0x16, 0x74, 0x29, 0x2a, 0xa3, 0x0d, 0xac, 0x70, 0x0d, 0xb4, 0xeb, 0x7e, 0x63, 0xd5, 0x6f, 0xdf, 0x08, 0xc2, 0x24, 0x70, 0xf2, 0x43, 0x86, 0x19, 0x45, 0xd0, 0x0f, 0xa4, 0xe2, 0x79, 0x90, 0x21, 0x2c, 0xfe, 0xd4, 0x28, 0x5d, 0xf1, 0xed, 0xda, 0x4b, 0x0a, 0xec, 0x91, 0x35, 0x59, 0xf5, 0x9d, 0x12, 0x55, 0x90 } +, + /* Encryption */ + 192, + { 0x14, 0x1f, 0xca, 0x68, 0xdd, 0x2e, 0x4d, 0x1d, 0xe5, 0x08, 0x6d, 0xbb, 0x78, 0x5f, 0xf4, 0x7d, 0x81, 0xe3, 0x9c, 0x31, 0x1d, 0x91, 0x7a, 0x99, 0x39, 0xa6, 0xff, 0x5b, 0x13, 0x43, 0x9c, 0xa9, 0x56, 0xc9, 0x74, 0x2b, 0xcf, 0xe4, 0x50, 0xb5, 0xbd, 0x03, 0x5b, 0x54, 0x1f, 0xab, 0x30, 0x7f, 0x24, 0xfb, 0xfb, 0x3f, 0x8b, 0x90, 0x21, 0x5b, 0x56, 0x04, 0x67, 0x6e, 0x56, 0x96, 0xf3, 0xba, 0x95, 0xfd, 0xb8, 0xd0, 0x90, 0xa6, 0xc2, 0x4a, 0x29, 0xd9, 0x90, 0xfb, 0xff, 0x1d, 0xa2, 0x02, 0x81, 0x42, 0x55, 0x8f, 0x0a, 0xd7, 0x53, 0x43, 0xc7, 0x2f, 0x38, 0x82, 0x3d, 0xb7, 0x66, 0x7b, 0x05, 0xe1, 0x6b, 0x51, 0x92, 0xb9, 0x33, 0x60, 0x07, 0xf7, 0x58, 0x10, 0x6c, 0x32, 0x8b, 0xd4, 0x76, 0x11, 0x8d, 0xf8, 0x2a, 0xd0, 0x75, 0x48, 0xa7, 0x26, 0x92, 0x1f, 0xb2, 0xe1, 0x92, 0xb4, 0x3c, 0x8c, 0x30, 0xcc, 0x9b, 0x84, 0x34, 0x63, 0x0e, 0x27, 0xfd, 0x8b, 0x23, 0xef, 0x8d, 0x8f, 0x22, 0xbe, 0x7f, 0x73, 0xae, 0xcd, 0xcb, 0x2b, 0x1e, 0xc5, 0x53, 0x9d, 0x5f, 0xbb, 0x2c, 0xff, 0x9e, 0xd5, 0xe7, 0xf1, 0x9b, 0x49, 0x18, 0x3d, 0x22, 0x1d, 0xfd, 0x53, 0x7d, 0x4f, 0x37, 0x03, 0x2e, 0xf3, 0x2f, 0x63, 0xb6, 0xff, 0x74, 0xee, 0x24, 0xa0, 0x96, 0xcf, 0x45, 0x59, 0x27, 0x09 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 14.4", + /* Message */ + 29, + { 0x90, 0x96, 0x3d, 0xda, 0xb3, 0x78, 0x91, 0xe7, 0x28, 0x8b, 0x53, 0xbe, 0x5d, 0x9d, 0xc5, 0x67, 0xb1, 0xa0, 0x7a, 0x15, 0x66, 0xc2, 0xaf, 0xdd, 0xd7, 0x72, 0x73, 0x24, 0xba } +, + /* Seed */ + 160, + { 0xa4, 0x9f, 0x12, 0x15, 0x17, 0x5b, 0xa0, 0x4c, 0x27, 0x4a, 0xbc, 0x05, 0x1f, 0x0c, 0x17, 0xa0, 0x8a, 0x63, 0x64, 0x89, 0x43, 0xdb, 0x2e, 0x8c, 0x76, 0x22, 0xbc, 0xbb, 0x1d, 0xcc, 0x56, 0x7e, 0xbe, 0x6a, 0xdd, 0x8c, 0x44, 0x48, 0x16, 0xc9, 0xd4, 0x36, 0xee, 0x93, 0xce, 0xfe, 0x23, 0xec, 0x41, 0xdd, 0xfc, 0xb0, 0xa4, 0x03, 0xbb, 0x6d, 0xbf, 0xf0, 0xae, 0x5d, 0x6f, 0xcd, 0xd7, 0x64, 0xda, 0xc1, 0xa7, 0x2a, 0x48, 0x4f, 0x36, 0x47, 0x1f, 0x4f, 0x3b, 0xd7, 0x25, 0xb2, 0xdb, 0x5a, 0xfa, 0x6a, 0xcf, 0x53, 0x0e, 0x4e, 0x4e, 0x86, 0xb4, 0xfd, 0xa8, 0x78, 0x20, 0x47, 0x87, 0x1c, 0xb0, 0x55, 0xad, 0x68, 0xc8, 0x41, 0xde, 0x54, 0x5a, 0x55, 0x40, 0xc8, 0xcc, 0x12, 0xe7, 0xe3, 0xf1, 0x58, 0x14, 0xa0, 0x03, 0x9a, 0x81, 0x03, 0x4b, 0xde, 0x9c, 0x68, 0xae, 0x22, 0x85, 0xe6, 0x16, 0xb7, 0xb5, 0x55, 0x5f, 0x98, 0xc6, 0x13, 0xce, 0x2e, 0xf6, 0x66, 0xa0, 0x22, 0x46, 0x5c, 0x63, 0x67, 0xd0, 0xbd, 0xa4, 0x0c, 0x12, 0xe9, 0x41, 0xf6, 0x99, 0x8a, 0x14, 0xa2, 0xb5, 0xe3 } +, + /* Encryption */ + 192, + { 0x8a, 0xd5, 0xbf, 0x78, 0x23, 0x2a, 0xa3, 0x6f, 0xb7, 0x83, 0x58, 0x3e, 0x71, 0xbc, 0x13, 0x93, 0x03, 0x7d, 0x13, 0xe7, 0x74, 0x54, 0xa9, 0xdc, 0x11, 0x11, 0x43, 0x4e, 0x75, 0xdd, 0x80, 0x20, 0x46, 0xba, 0xb4, 0x20, 0x25, 0x42, 0x0c, 0x63, 0x96, 0x1e, 0xa0, 0x06, 0x26, 0x57, 0xca, 0x50, 0x65, 0xde, 0xb6, 0x53, 0xac, 0x78, 0xeb, 0x64, 0x98, 0xcf, 0x14, 0xd1, 0x70, 0x4c, 0xec, 0x59, 0x11, 0x69, 0x60, 0x8d, 0xb0, 0x1f, 0xc9, 0x3d, 0x0d, 0x68, 0xe6, 0x28, 0x01, 0xb4, 0x65, 0xa3, 0x87, 0xa9, 0xc7, 0x2f, 0x7e, 0xb3, 0x5b, 0x0b, 0xa5, 0x3a, 0x5e, 0xfa, 0x98, 0xc9, 0xf0, 0xcb, 0x7c, 0x7c, 0xba, 0x18, 0x04, 0xcd, 0x70, 0x1d, 0x02, 0x97, 0xb6, 0x60, 0x05, 0xae, 0x25, 0xec, 0x3b, 0x6c, 0xd4, 0xcf, 0x31, 0x94, 0xa3, 0xfa, 0x65, 0xd9, 0x8c, 0x4b, 0x95, 0x33, 0x30, 0x79, 0x0e, 0xfd, 0xe7, 0x4f, 0xa2, 0x75, 0xd2, 0xa7, 0x9d, 0x33, 0x10, 0xa5, 0xbc, 0xc2, 0xc8, 0x1c, 0x91, 0xfc, 0x25, 0x56, 0x2c, 0xa9, 0x39, 0xf8, 0xd9, 0xc1, 0x75, 0xed, 0xf4, 0xb0, 0x76, 0x73, 0xd5, 0x39, 0x24, 0xe2, 0x7b, 0x15, 0x52, 0x88, 0x1c, 0x10, 0x83, 0x19, 0x23, 0x71, 0x5d, 0x14, 0x9f, 0x1f, 0x31, 0x9e, 0x38, 0xe9, 0x1d, 0xfa, 0x56, 0x6c, 0x54, 0x53, 0xba, 0xcc, 0x14, 0x8b } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 14.5", + /* Message */ + 11, + { 0x3d, 0x81, 0x02, 0x1f, 0xf6, 0x47, 0x33, 0x37, 0xe0, 0x4b, 0x92 } +, + /* Seed */ + 178, + { 0x9b, 0x70, 0x29, 0x73, 0x13, 0x77, 0xe8, 0x26, 0x97, 0xfa, 0x56, 0xb0, 0x86, 0xce, 0x49, 0xd3, 0xc4, 0xb1, 0x54, 0x9d, 0xe8, 0x1e, 0x3e, 0x99, 0xe1, 0x6c, 0xd9, 0x72, 0x29, 0x7a, 0x56, 0x0f, 0xf4, 0x83, 0xf2, 0xef, 0x5b, 0x71, 0xb0, 0x0f, 0xc6, 0x84, 0x74, 0x4f, 0x22, 0x4e, 0x85, 0x7e, 0x6d, 0x72, 0x39, 0xf1, 0x56, 0xd7, 0xb6, 0x10, 0x2f, 0x23, 0x04, 0xf8, 0xa5, 0x50, 0x50, 0xb3, 0x75, 0x6c, 0x54, 0x8f, 0x6e, 0xa2, 0x6e, 0xa6, 0xf7, 0x39, 0x4d, 0x2b, 0xb3, 0x79, 0x33, 0x35, 0x84, 0xe3, 0xb4, 0x81, 0xd0, 0x73, 0xc0, 0xa5, 0x8a, 0x0a, 0xd7, 0x87, 0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 0x53, 0x74, 0xbb, 0xcd, 0x2b, 0x96, 0xf5, 0xcb, 0x5b, 0xd5, 0x81, 0x5d, 0x1a, 0x5d, 0xcb, 0xf0, 0x80, 0xd2, 0xd3, 0x7c, 0xb9, 0x6c, 0x4d, 0x96, 0x1d, 0xc4, 0x7e, 0x13, 0x0d, 0xb7, 0xb8, 0xd0, 0x18, 0x2e, 0x33, 0x69, 0xde, 0xf4, 0xc0, 0xf6, 0xc4, 0x2c, 0x6c, 0x20, 0x53, 0x1a, 0xf1, 0xa1, 0x90, 0x36, 0xde, 0xf0, 0x8d, 0x4b, 0xac, 0xa7, 0x1b, 0x99, 0xaf, 0x3c, 0x4e, 0x1e, 0xd5, 0x27, 0xd5, 0x1f, 0x37, 0xd0, 0xee, 0x1e, 0xa2, 0xc8, 0xb8, 0xeb, 0xf4, 0xfd, 0x52, 0x79, 0x85, 0x1d, 0xc3, 0x20, 0xe7, 0x42, 0x00, 0x8e, 0x04, 0x04, 0x4d, 0x0d, 0xa0, 0x64, 0x36, 0x61, 0x3d, 0x1b } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 14.6", + /* Message */ + 20, + { 0x5c, 0x74, 0x5d, 0xd4, 0xa8, 0xc5, 0x92, 0x93, 0x4e, 0xd1, 0x5e, 0x22, 0xfa, 0x9d, 0xec, 0x4a, 0x4d, 0xc2, 0x0a, 0x9f } +, + /* Seed */ + 169, + { 0x0e, 0x6a, 0xbb, 0x82, 0x9a, 0x3b, 0x16, 0xd0, 0x8b, 0x0b, 0xd4, 0x3e, 0xb9, 0x5c, 0x79, 0x1a, 0xf2, 0xa3, 0x39, 0x12, 0xea, 0x83, 0x3e, 0xe6, 0x89, 0x3e, 0xd5, 0xad, 0x3e, 0xe7, 0x44, 0xc8, 0xb2, 0xdd, 0x28, 0xfc, 0xee, 0x80, 0x8d, 0x3f, 0x01, 0x49, 0x58, 0x25, 0xbe, 0x0f, 0xe6, 0x37, 0x32, 0x07, 0xa8, 0x78, 0xd4, 0xa5,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d9, 0x5e, 0x75, 0x40, 0x25, 0x4e, 0x65, 0x74, 0x98, 0x23, 0xb8, 0xa3, 0x4b, 0xf6, 0xa1, 0x41, 0x07, 0x21, 0xdf, 0x34, 0xf3, 0xc8, 0xd5, 0x79, 0xf3, 0x6a, 0xed, 0x9e, 0x0b, 0xac, 0x23, 0x1e, 0x54, 0xc2, 0x7f, 0x76, 0x73, 0x19, 0x7d, 0x19, 0xf5, 0x1c, 0xe6, 0xac, 0xbb, 0xcb, 0x7b, 0x1a, 0x55, 0xe3, 0x8e, 0xde, 0xbe, 0xed, 0x34, 0x61, 0x07, 0x3e, 0x80, 0xc7, 0x9a, 0x4f, 0xc3, 0x09, 0x31, 0x30, 0x69, 0x6b, 0xff, 0xf2, 0xbb, 0xcb, 0x74, 0x90, 0x5f, 0x2d, 0x34, 0x44, 0x33, 0x80, 0x57, 0xfd, 0xfa, 0xcb, 0xc4, 0xdb, 0x81, 0x93, 0x5b, 0x29, 0xe9, 0x9e, 0x55, 0xcc, 0xc1, 0xd4, 0x8d, 0x89, 0xe9, 0xdc, 0x4a, 0x63, 0xa0, 0x11, 0xa6, 0x23, 0x32, 0xcf, 0x57, 0x02, 0x62, 0xa0, 0x63, 0x59, 0xcc, 0x36, 0xc0, 0x5a, 0x6f, 0xe1, 0x8a, 0xfb, 0x78, 0x32, 0xb3, 0x2e } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 14.7", + /* Message */ + 45, + { 0xb0, 0xe7, 0x7f, 0x42, 0xc1, 0xa1, 0xe3, 0xf4, 0x15, 0x57, 0x23, 0xa9, 0x0d, 0xb8, 0x8e, 0xb1, 0x53, 0xcb, 0x3d, 0x3a, 0x28, 0xed, 0xdf, 0x25, 0x9c, 0x47, 0x05, 0x6a, 0x47, 0x0c, 0x91, 0x5e, 0xc9, 0x55, 0xf8, 0x31, 0x89, 0xf7, 0x1a, 0xea, 0xcd, 0xd5, 0x5c, 0x33, 0x5f } +, + /* Seed */ + 144, + { 0xfb, 0x36, 0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ae, 0xdd, 0xef, 0xfb, 0x69, 0xe2, 0x13, 0xca, 0x92, 0xb7, 0x49, 0x53, 0x66, 0x34, 0x7e, 0xde, 0x73, 0x3f, 0xf3, 0x99, 0xae, 0xc7, 0x96, 0xc3, 0xc3, 0xb1, 0xdf, 0x34, 0x9f, 0x01, 0x1d, 0xa0, 0x1f, 0xee, 0x7d, 0x21, 0xc1, 0xc2, 0x61, 0x84, 0x3d, 0xe8, 0x82, 0x08, 0x56, 0x0c, 0x0e, 0x89, 0x84, 0xb9, 0x52, 0x23, 0xea, 0x37, 0x31, 0xdb, 0x91, 0xc5, 0x93, 0x7a, 0x79, 0xb0, 0xdb, 0x93, 0x87, 0x59, 0x1c, 0xe3, 0x2e, 0xc7, 0xf5, 0x83, 0xe6, 0x00, 0xf5, 0x24, 0x44, 0xdf, 0xa7, 0x67, 0x1c, 0xe8, 0x27, 0x38, 0x98, 0xfb, 0xbc, 0xa3, 0xa4, 0xaa, 0x68, 0x32, 0xcb, 0xb3, 0x54, 0x3a, 0xbe, 0x96, 0x47, 0xe5, 0xf8, 0xc1, 0x37, 0x72, 0x82, 0x52, 0xce, 0x54, 0x40, 0xfc, 0xe1, 0x0e, 0x4d, 0x4e, 0xf7, 0x5d, 0x56, 0xb8, 0x14, 0xd5, 0x19, 0x64, 0x44, 0x41, 0x41, 0x1c, 0x10, 0xa2, 0xa1, 0x4c, 0x35, 0x04, 0x72, 0x82, 0x7c, 0x99, 0xea, 0x3e, 0xe5, 0xfd, 0xa3, 0x88, 0x0f, 0x34, 0x1d, 0xca, 0x8d, 0x3d, 0x3a, 0x4e, 0x5e, 0x05, 0xba, 0x42 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 14.8", + /* Message */ + 44, + { 0xb8, 0x7f, 0x04, 0xb3, 0x35, 0x0e, 0x12, 0x63, 0xda, 0xa3, 0xf9, 0x40, 0x5e, 0x6f, 0xd3, 0xd2, 0x5d, 0x8e, 0xfa, 0x13, 0x25, 0x56, 0xa4, 0x95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13, 0xd6, 0x5f, 0x0e, 0xba, 0x0d, 0xcd, 0x52, 0xff, 0x9d, 0xfc, 0x17, 0x95, 0xea, 0x93, 0xd0, 0xf4, 0x33, 0x57, 0x98, 0x96, 0x86, 0xfe, 0x3f, 0x8b, 0x04, 0x62, 0x23, 0xbb, 0xa5, 0xc7, 0x84, 0x9a, 0xca, 0xc3, 0x12, 0x35, 0x43, 0x43, 0x26, 0x16, 0xc3, 0x10, 0x3a, 0xc2, 0xba, 0x8d, 0xb0, 0xa1, 0xd2, 0x99, 0x40, 0xbb, 0xa2, 0x62, 0x47, 0x0e, 0x5e, 0x53, 0xbe, 0x60, 0xe0, 0xeb, 0x72, 0x4d, 0x07, 0xcd, 0x91, 0x2a, 0xef, 0xbb, 0x87, 0xfb, 0x51, 0x98, 0x0e, 0x9e, 0x1a, 0xc1, 0x94, 0xda, 0x31, 0x92, 0x95, 0x41, 0xca, 0x43, 0x22, 0x4b, 0x15, 0x2b, 0xe6, 0xf2, 0xdf, 0x6c, 0x5f, 0x04, 0x42, 0xb4, 0xf4, 0xd2, 0xcc, 0x2f, 0xb0, 0x27, 0x39, 0xd4, 0x85, 0xa0, 0x11, 0x62, 0xbc, 0x8d, 0xbb, 0xad, 0x14, 0x76, 0xeb, 0x06, 0xe2, 0x45, 0xab, 0x36, 0xc4, 0xc7, 0x2d, 0x3f, 0x36, 0x07, 0xd0, 0x50, 0x84, 0xa0, 0xf6, 0xb7, 0x2d, 0xc8, 0xba, 0xc3, 0x46, 0xbd, 0x19, 0x09, 0x1b, 0x02, 0xf5, 0x98, 0x2c, 0x91, 0x45, 0x7c, 0x7b, 0x10, 0xf4, 0x47, 0x2b, 0x57, 0x18, 0x45, 0x24, 0x21, 0x4b, 0x23, 0x82, 0x5b, 0x59, 0xf4, 0x34, 0xcc, 0x48, 0xa2, 0xb8, 0x54, 0xca, 0xb5, 0x0f, 0xf7, 0x9e, 0x59, 0x09, 0x1c } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 14.9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f, 0x28, 0x53, 0x55, 0x87, 0xa5, 0xc9, 0x9d, 0x46, 0xba, 0x4d, 0xf9, 0xae, 0x08, 0x50, 0x18, 0x51, 0x3d, 0x69, 0xab, 0xa3, 0xf6 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 14.10", + /* Message */ + 25, + { 0x04, 0x2a, 0x39, 0x22, 0xaa, 0x87, 0x1e, 0xea, 0x0d, 0x78, 0x42, 0x2c, 0xe7, 0x85, 0x66, 0xab, 0xbb, 0x5b, 0x08, 0xc2, 0xdd, 0xf1, 0xee, 0x30, 0xcf } +, + /* Seed */ + 164, + { 0x5a, 0xe8, 0x51, 0x14, 0xb0, 0x02, 0x7a, 0x23, 0xc7, 0x2b, 0xdb, 0x46, 0xae, 0x7b, 0xb8, 0x87, 0xbe, 0xc5, 0xba, 0xd7, 0xa9, 0x88, 0x4e, 0x93, 0xf6, 0xf4, 0xfd, 0x0b, 0xc9, 0x38, 0xbc, 0x72, 0x41, 0x0c, 0xce, 0x96, 0xa1, 0x4f, 0x4d, 0xe1, 0x99, 0x19, 0x77, 0x35, 0x05, 0x1e, 0xfc, 0xdc, 0xc1, 0x96, 0xf3, 0xad, 0xbf, 0xaa, 0x06, 0x3c, 0xb3, 0xf7, 0xa2, 0x34, 0xc6, 0xcf, 0x99, 0xd7, 0x0f, 0xbb, 0x7e, 0x35, 0xb6, 0xae, 0xc6, 0x64, 0x14, 0x66, 0x93, 0x91, 0xe3, 0xcb, 0xe7, 0x21, 0xec, 0x99, 0x1a, 0x1e, 0x5d, 0xfb, 0xb0, 0x38, 0xf2, 0x70, 0x36, 0x85, 0x93, 0x74, 0x9b, 0x20, 0x8d, 0x08, 0x9a, 0xae, 0xe2, 0xef, 0x35, 0xc3, 0xda, 0xf6, 0x23, 0x8b, 0x5f, 0xe4, 0x2d, 0x13, 0xdd, 0xe4, 0x07, 0xdf, 0x14, 0xf2, 0xd6, 0x18, 0xc9, 0x79, 0xc9, 0x7d, 0x2d, 0xe0, 0x29, 0x33, 0xb5, 0x7f, 0xe8, 0x81, 0x22, 0x04, 0x86, 0x2b, 0x2f, 0x1d, 0xee, 0x98, 0x3f, 0x24, 0xc2, 0xc5, 0x96, 0xea, 0x66, 0x8e, 0x63, 0x7d, 0x0a, 0x6a, 0xe6, 0xdc, 0x52, 0x65, 0x27, 0x69, 0x94, 0xe7, 0xe4, 0xf0, 0x2b, 0x6e } +, + /* Encryption */ + 192, + { 0x12, 0x44, 0xde, 0x88, 0x0e, 0x0f, 0x78, 0x52, 0xe9, 0x96, 0x95, 0x9d, 0x76, 0x2f, 0xca, 0xd9, 0x15, 0x65, 0xa4, 0xd0, 0xad, 0x3b, 0xc5, 0x27, 0x50, 0xd4, 0xa0, 0x44, 0x0f, 0x0b, 0x5c, 0x65, 0x1a, 0xa0, 0xe6, 0xf4, 0x92, 0x06, 0x1b, 0x2c, 0x86, 0x24, 0xc5, 0x2e, 0xde, 0x68, 0x58, 0xfa, 0x25, 0x18, 0xae, 0x8e, 0x8b, 0x11, 0x65, 0x58, 0xb2, 0xc8, 0x07, 0x6c, 0x17, 0xae, 0x78, 0x3d, 0x8d, 0xb2, 0x5f, 0x0d, 0x8f, 0xb1, 0xf2, 0x75, 0x8a, 0x82, 0xab, 0x97, 0x1f, 0xa7, 0x28, 0x3e, 0xf0, 0x74, 0x9a, 0x37, 0xbe, 0x28, 0x93, 0xf8, 0x94, 0x37, 0xfb, 0x8e, 0xa9, 0x00, 0x72, 0xb5, 0x85, 0x5a, 0x26, 0x08, 0xfc, 0x54, 0x2f, 0x5d, 0x2e, 0x0c, 0xb5, 0x43, 0xf4, 0xfa, 0xc5, 0x28, 0xf9, 0x43, 0x52, 0xd0, 0x16, 0x40, 0xfc, 0x2c, 0x53, 0x1b, 0x79, 0x81, 0x0c, 0x00, 0x77, 0x7b, 0xc9, 0xe1, 0x0d, 0xd9, 0xea, 0x99, 0x96, 0xe7, 0x40, 0x87, 0xfa, 0xdc, 0xb7, 0x1a, 0xa1, 0x43, 0x00, 0x67, 0x65, 0x71, 0x61, 0x48, 0x82, 0x94, 0x3f, 0x4a, 0x56, 0x14, 0x12, 0xc0, 0x54, 0x67, 0xdc, 0xa6, 0x6c, 0xa4, 0x9f, 0x82, 0x29, 0x35, 0x18, 0x23, 0xdb, 0x8a, 0x6b, 0x9f, 0x80, 0x3d, 0x70, 0x9c, 0x11, 0x87, 0xed, 0x74, 0x10, 0xcf, 0x91, 0x00, 0x15, 0x59, 0x5c, 0xea, 0xb6, 0x3e } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 14.11", + /* Message */ + 52, + { 0xf3, 0x1d, 0x3d, 0x0c, 0x30, 0xfd, 0x65, 0xd7, 0xb9, 0x8b, 0x70, 0x99, 0x44, 0x78, 0x2e, 0x20, 0x52, 0x5c, 0xa7, 0xc1, 0xf4, 0x2d, 0x5d, 0x03, 0xa0, 0xf6, 0xd2, 0x75, 0x9d, 0xf1, 0x91, 0x9e, 0xea, 0x82, 0xf8, 0x0f, 0x10, 0x00, 0xfd, 0x5c, 0xf8, 0x59, 0xdf, 0x59, 0x87, 0x1b, 0xac, 0x82, 0xdd, 0x90, 0x76, 0xcf } +, + /* Seed */ + 137, + { 0x04, 0x4b, 0xc3, 0x77, 0xe8, 0x58, 0x9f, 0xa5, 0xaf, 0x1c, 0x17, 0x34, 0x7d, 0x50, 0xe0, 0xcb, 0xbf, 0x90, 0x15, 0x76, 0xf2, 0x41, 0xde, 0x69, 0x0c, 0x88, 0x16, 0xc1, 0x29, 0xcd, 0x9f, 0x2f, 0xb0, 0x83, 0x1a, 0x01, 0x7b, 0xec, 0x30, 0xb8, 0x2b, 0x68, 0xf6, 0x98, 0x31, 0x1a, 0xf6, 0xe0, 0x77, 0x72, 0xbc, 0xd8, 0x98, 0xfa, 0x0c, 0x27, 0xf6, 0x2a, 0xfd, 0xe8, 0x95, 0x89, 0x77, 0x84, 0x46, 0x25, 0x55, 0x2d, 0x9b, 0xcb, 0x5a, 0x81, 0xaa, 0x3d, 0x74, 0x15, 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 0x72, 0xf9, 0x55, 0x5c, 0xcc, 0x97, 0xd6, 0xdb, 0x76, 0x14, 0xea, 0x06, 0xd5, 0xc4, 0x8c, 0x1c, 0x60, 0x06, 0x13, 0x3d, 0x0e, 0x9d, 0x69, 0x95, 0x79, 0x93, 0x85, 0x92, 0x0a, 0xd8, 0xaf, 0xc3, 0xde, 0xad, 0xf6, 0x31, 0xce, 0xcc, 0x55, 0x9c, 0xaf, 0xf4, 0x95, 0xb0, 0x8d, 0x68, 0x3f, 0xb2, 0x2a, 0xa6, 0x97, 0xd7, 0x1c, 0x69, 0x6e, 0x46, 0xb1, 0xbf, 0x4f, 0xd7, 0x6b, 0x8d, 0x0b, 0x39, 0xf1, 0x79, 0xbf, 0x66, 0x84, 0x1b, 0xbb, 0x97, 0x07 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 14.12", + /* Message */ + 29, + { 0x6a, 0x35, 0x55, 0x57, 0x9d, 0xad, 0x03, 0x94, 0x35, 0x43, 0xff, 0x74, 0xe1, 0x74, 0x7c, 0x25, 0x7a, 0x83, 0xd3, 0x52, 0x94, 0xc2, 0x53, 0x93, 0x83, 0xe2, 0x35, 0xde, 0x69 } +, + /* Seed */ + 160, + { 0x5d, 0x92, 0x43, 0x4e, 0xdb, 0xd4, 0xf5, 0xbd, 0x27, 0x19, 0x71, 0x71, 0xf8, 0x53, 0xce, 0xb7, 0x26, 0x30, 0x30, 0x83, 0xad, 0x45, 0x67, 0xa1, 0xd7, 0xc6, 0x10, 0x4d, 0x19, 0x2b, 0x9b, 0xcc, 0xdf, 0xd0, 0xda, 0xed, 0xa2, 0x74, 0xe5, 0xcd, 0xfb, 0x3d, 0x0c, 0x5d, 0x19, 0xc9, 0x68, 0x25, 0x81, 0xec, 0x7a, 0xdc, 0x1a, 0x87, 0xe0, 0x81, 0x51, 0x41, 0x5d, 0x5a, 0x9a, 0xdc, 0x1a, 0xf4, 0x50, 0xb1, 0xba, 0x88, 0xd0, 0xef, 0x32, 0xac, 0x2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36, 0x3d, 0x13, 0x78, 0x69, 0x1f, 0x5d, 0xd1, 0xd7, 0x96, 0x10, 0x74, 0xed, 0x95, 0xfc, 0x90, 0x07, 0xbd, 0x5f, 0x5c, 0x29, 0x23, 0xc1, 0x7c, 0x42, 0x90, 0x4e, 0x2b, 0xf9, 0xd2, 0x48, 0x77, 0x9f, 0xdf, 0xb2, 0x03, 0x97, 0x38, 0x41, 0xa1, 0x12, 0x90, 0xc7, 0xe9, 0xe9, 0x35, 0x6d, 0x4e, 0xab, 0x17, 0x0e, 0x43, 0x1b, 0xfe, 0x45, 0x4a, 0x88, 0x01, 0x0d, 0x9a, 0xff, 0x33, 0x70, 0x0c, 0xee, 0x55, 0xc7, 0x04, 0xc8, 0x2a, 0x7f, 0xfb, 0x15, 0xe2, 0x53, 0xef, 0x84, 0xf4, 0x01, 0x9e, 0x12, 0x43, 0x8f, 0x7c, 0x73, 0x86, 0xdc, 0x53, 0x5b, 0x19, 0xca, 0x86, 0xaf, 0x71, 0xd4, 0x77, 0x60, 0x8e } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 14.13", + /* Message */ + 47, + { 0xcb, 0x79, 0xaf, 0x5a, 0xea, 0xfd, 0xf2, 0xba, 0xd2, 0x1d, 0xfe, 0x62, 0x92, 0x66, 0x42, 0xcb, 0xa8, 0x04, 0xec, 0x7f, 0xd0, 0xea, 0x5d, 0x54, 0x08, 0xac, 0xe9, 0xed, 0xff, 0x28, 0xe7, 0xe8, 0xdf, 0xff, 0x6d, 0xf3, 0x83, 0xaf, 0x14, 0x40, 0x21, 0x46, 0x04, 0x76, 0xc0, 0xc8, 0x2c } +, + /* Seed */ + 142, + { 0x5f, 0xce, 0xa2, 0x57, 0xcf, 0xa9, 0x2c, 0x84, 0xf0, 0xb8, 0x93, 0x7d, 0x17, 0x3f, 0xae, 0xcf, 0x75, 0x03, 0xab, 0x16, 0x2e, 0x0b, 0xae, 0xef, 0x7e, 0x4c, 0x51, 0x1f, 0x3e, 0x32, 0xa3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0xb6, 0x8e, 0x2e, 0xaa, 0x8c, 0x8f, 0x6f, 0xb4, 0x93, 0xf6, 0x11, 0xac, 0x09, 0xb7, 0x23, 0x09, 0x5d, 0x07, 0xee, 0xd9, 0x24, 0xf6, 0xab, 0x8e, 0x09, 0xff, 0x93, 0xc5, 0x51, 0x6d, 0x1f, 0x0e, 0xbf, 0x62, 0xc5, 0xf0, 0x22, 0xf5, 0xbb, 0x4f, 0x4c, 0xb5, 0xb8, 0xf5, 0xd4, 0x87, 0xa1, 0x7d, 0xf7, 0xd0, 0x12, 0xd7, 0x04, 0x35, 0x7a, 0xbf, 0x17, 0x48, 0x67, 0xce, 0x40, 0xcd, 0xc5, 0x50, 0x11, 0xb0, 0x71, 0x39, 0xbe, 0xa4, 0x5c, 0xa0, 0xe5, 0x81, 0x78, 0x0d, 0xe6, 0x54, 0x17, 0xcc, 0x83, 0x5f, 0xf2, 0x69, 0x84, 0xfd, 0x0f, 0xeb, 0xa1, 0x87, 0x69, 0xc3, 0x94, 0xa2, 0xe4, 0x85, 0x02, 0x3e, 0x31, 0xd3, 0xb0, 0xa8, 0x88, 0xa7, 0xb1, 0x4c, 0x78, 0x1d, 0xd8, 0x5b, 0xab, 0x40, 0x86, 0x74, 0xf5, 0xf5, 0x7e, 0x4b, 0x76, 0x3d, 0x84, 0x35 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 14.14", + /* Message */ + 19, + { 0xd1, 0x62, 0x33, 0xfc, 0x77, 0x5c, 0x31, 0x9f, 0x15, 0x7a, 0xa2, 0x00, 0x47, 0x6c, 0xd6, 0xed, 0x64, 0xa1, 0xea } +, + /* Seed */ + 170, + { 0xbb, 0x33, 0xb2, 0x2b, 0x5f, 0x46, 0x79, 0x4b, 0xe8, 0x3e, 0x6a, 0xff, 0x34, 0xa0, 0xe4, 0x11, 0xd1, 0xf3, 0xf4, 0xb8, 0xda, 0xf9, 0xb5, 0x85, 0x87, 0x24, 0xef, 0xfd, 0xb9, 0x69, 0xc9, 0x55, 0x25, 0xc6, 0x2d, 0xc4, 0x4b, 0xb2, 0xb0, 0x83, 0x38, 0x60, 0x03, 0x05, 0x4b, 0xbd, 0x36, 0x66, 0xb7, 0x82, 0x82, 0x60, 0x6f, 0xe6, 0xea, 0x17, 0x27, 0x31, 0xbe, 0xe1, 0x16, 0x72, 0xd6, 0x01, 0xde, 0x32, 0x42, 0x3d, 0x83, 0xf4, 0x63, 0xcc, 0x29, 0x30, 0xf5, 0xfb, 0x79, 0xda, 0x15, 0x34, 0xc4, 0x15, 0xc9, 0x65, 0x82, 0x75, 0x65, 0x94, 0xa9, 0x99, 0xb2, 0x26, 0x35, 0x42, 0x48, 0xa0, 0x9f, 0x14, 0x1c, 0xae, 0xcf, 0x88, 0x83, 0x90, 0x78, 0xf7, 0x7f, 0x40, 0xbd, 0x48, 0x51, 0x34, 0x9c, 0x1f, 0xc7, 0x5e, 0x1e, 0xce, 0x6f, 0xd6, 0x96, 0x6b, 0xc9, 0xc9, 0xd5, 0xec, 0x12, 0x09, 0x6e, 0xd5, 0x04, 0x35, 0x46, 0x85, 0x9e, 0x4f, 0x95, 0x7d, 0x31, 0x88, 0xe1, 0xd9, 0x06, 0x0b, 0x59, 0xc1, 0xf7, 0xf6, 0x2e, 0xfb, 0xfe, 0x82, 0x5d, 0xda, 0x45, 0x35, 0x3e, 0x6f, 0xd4, 0xfa, 0xba, 0xc9, 0x83, 0xf9, 0x44, 0xf4, 0xc2, 0xc7, 0x9c, 0xbb } +, + /* Encryption */ + 192, + { 0x10, 0xc2, 0x0c, 0x0c, 0x71, 0xb1, 0x1b, 0xbe, 0xce, 0x14, 0xc8, 0x14, 0x83, 0xdc, 0xfa, 0x73, 0x0c, 0x23, 0xd4, 0xdd, 0x61, 0xb8, 0x75, 0x5b, 0x39, 0x94, 0x9d, 0xfd, 0x4a, 0x3c, 0x50, 0x33, 0x21, 0x60, 0xee, 0xc6, 0xf7, 0x71, 0x0e, 0x09, 0xc7, 0xa9, 0x7a, 0xf9, 0x3f, 0x70, 0x44, 0xb9, 0x2f, 0x41, 0xd0, 0x9f, 0xa3, 0xe6, 0xc6, 0xce, 0x1f, 0x64, 0x11, 0x48, 0x4e, 0xd4, 0x75, 0x40, 0xa1, 0xb5, 0x9e, 0x23, 0xc1, 0x93, 0x34, 0xb6, 0x6d, 0x68, 0x20, 0xc2, 0xd4, 0x4d, 0xb0, 0xf6, 0xaa, 0xf8, 0x5a, 0xa2, 0x7f, 0x53, 0xa4, 0x1f, 0x85, 0x6b, 0xf6, 0xa5, 0x91, 0x36, 0x59, 0x86, 0x9b, 0xa4, 0xab, 0xdd, 0xec, 0xbe, 0x87, 0x41, 0x3a, 0xc9, 0x5b, 0xe6, 0x40, 0x09, 0x59, 0x3b, 0x5c, 0xa2, 0xd0, 0x78, 0x3a, 0x16, 0xf6, 0x08, 0x66, 0x57, 0x55, 0x24, 0x53, 0x93, 0xfc, 0x14, 0x4f, 0xe3, 0xea, 0x5e, 0x9a, 0xac, 0x9f, 0x1f, 0x99, 0x1a, 0x92, 0x85, 0x38, 0xb4, 0x69, 0x97, 0xd3, 0x06, 0x3c, 0xc1, 0xa6, 0x9a, 0xdc, 0x19, 0x2a, 0x40, 0xc7, 0x6f, 0x92, 0xd4, 0x7a, 0x05, 0x80, 0xe3, 0xc0, 0x21, 0x20, 0x02, 0x3e, 0xce, 0x70, 0x32, 0x80, 0x7b, 0x7c, 0x09, 0x13, 0x43, 0xaa, 0x87, 0x3f, 0x6a, 0x4d, 0xdd, 0xe4, 0x3f, 0xb2, 0xdc, 0xc3, 0x79, 0xae, 0xee, 0xf6, 0x54 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 14.15", + /* Message */ + 17, + { 0xd2, 0xf3, 0xc2, 0xe6, 0xf4, 0x3b, 0x0f, 0xc9, 0xfc, 0x22, 0x93, 0xb8, 0x45, 0x88, 0xe6, 0x61, 0x15 } +, + /* Seed */ + 172, + { 0xb9, 0x81, 0x64, 0x89, 0x52, 0x5c, 0xd0, 0x26, 0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xa1, 0xa2, 0xf1, 0x74, 0xab, 0xb2, 0x98, 0x08, 0x69, 0xc2, 0x9d, 0x19, 0xbe, 0x1d, 0x2d, 0x93, 0xb4, 0xfb, 0x42, 0x99, 0x90, 0x6c, 0x35, 0x7f, 0xdd, 0x40, 0xe8, 0x9a, 0x19, 0x54, 0x92, 0xa9, 0x79, 0x76, 0x61, 0xf0, 0x5d, 0x38, 0x71, 0xd1, 0xbd, 0x0a, 0x5c, 0x45, 0xd8, 0xf9, 0xb0, 0xfe, 0xe5, 0x65, 0xb0, 0x00, 0x4f, 0xf5, 0xaf, 0xc5, 0xa6, 0xf8, 0x9a, 0xd6, 0x03, 0xe8, 0x22, 0x83, 0x57, 0x0b, 0xdb, 0x4c, 0x6e, 0x0c, 0xfc, 0x31, 0x3e, 0x4e, 0x66, 0x5a, 0x94, 0x34, 0xb3, 0x2f, 0xcc, 0x77, 0x3d, 0x6e, 0xda, 0xbc, 0xe8, 0x5f, 0xe7, 0xc8, 0x0f, 0x03, 0x30, 0x2a, 0x84, 0xe2, 0x08, 0xb5, 0xbd, 0x0a, 0xad, 0x91, 0xce, 0x62, 0xfb, 0x8c, 0x2b, 0xf5, 0x4b, 0xa6, 0x6f, 0x7e, 0x8d, 0x00, 0x21, 0x92, 0x16, 0x29, 0x20, 0xa4, 0x6e, 0x36, 0xde, 0xa5, 0x66, 0x1f, 0xdd, 0x75, 0x81, 0x53, 0x56, 0x40, 0x74, 0xb8, 0x55, 0x9f, 0x88, 0x93, 0x62, 0x42, 0xfc, 0x09, 0x98, 0x14, 0x8f, 0x19, 0xeb, 0x50, 0xfc, 0x11, 0xfb, 0x24, 0xa7, 0xed, 0x8c, 0x83, 0x49, 0x65, 0x8f, 0xe9, 0xd3, 0x1e, 0x62, 0x74, 0xd4, 0x5d, 0x6f, 0x2b, 0x60, 0x9b, 0xb5, 0xcc, 0xd1, 0x7e, 0x28, 0x4c, 0x99 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 14.16", + /* Message */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x8a, 0xd7, 0x2a, 0xed, 0x3c, 0x34, 0x59, 0x9f, 0x7a, 0x40, 0x98, 0xe3, 0xd2, 0xdf, 0x9d, 0x13, 0xa2, 0x1c, 0xe2, 0x37, 0x0c } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 14.17", + /* Message */ + 56, + { 0xa0, 0x34, 0xa6, 0xc1, 0x66, 0xcf, 0x0b, 0x25, 0xd2, 0xdd, 0xe5, 0x3a, 0xf4, 0xb8, 0x33, 0xb4, 0x78, 0xc6, 0xb0, 0xd2, 0xfb, 0x0c, 0xef, 0x13, 0x7f, 0xbf, 0x5c, 0x27, 0x12, 0x70, 0x64, 0x91, 0x23, 0x7f, 0x7b, 0x28, 0x6d, 0x12, 0x11, 0xd5, 0x73, 0x10, 0xf8, 0xa7, 0x62, 0xb1, 0xb3, 0xbf, 0xe1, 0x9c, 0x9a, 0x4b, 0x16, 0xd3, 0xe0, 0xa8 } +, + /* Seed */ + 133, + { 0xd8, 0x44, 0x17, 0x97, 0x22, 0x87, 0x13, 0x0a, 0x24, 0xa6, 0x06, 0xf5, 0x83, 0x29, 0x7a, 0xc9, 0x11, 0x52, 0x8a, 0xdc, 0xdb, 0xbd, 0x7d, 0xe1, 0x4a, 0x5b, 0x48, 0x9b, 0x67, 0x86, 0xf9, 0xf6, 0xf7, 0xe0, 0xb7, 0x3b, 0xab, 0x53, 0x8e, 0xb6, 0xc4, 0x5f, 0xf3, 0x4b, 0xd5, 0xdc, 0x43, 0xea, 0xe8, 0xd8, 0xc4, 0x3f, 0x71, 0x65, 0x16, 0xa6, 0x0d, 0xa2, 0x47, 0x53, 0x6f, 0x63, 0x4b, 0xe0, 0x65, 0xd9, 0x4e, 0x7f, 0x92, 0xad, 0xf5, 0x2a, 0x96, 0x7e, 0xe0, 0x5f, 0xd9, 0xaf, 0xd7, 0x32, 0x33, 0x3f, 0x99, 0xad, 0x05, 0x82, 0x97, 0xb2, 0x8f, 0x8e, 0xc6, 0xfe, 0xff, 0x80, 0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28, 0x57, 0x16, 0x6c, 0xa2, 0x12, 0x0e, 0x63, 0x47, 0x74, 0xa0, 0xd1, 0xd4, 0x2e, 0xb8, 0xd9, 0x48, 0x15, 0xa1, 0x04, 0x4b, 0xea, 0x8b, 0xfb, 0x02, 0xda, 0x58, 0x62, 0xcd, 0x9a, 0x74, 0x5f, 0x15, 0x92, 0x47, 0x8c, 0x6f, 0x57, 0xbf, 0xd1, 0x3a, 0x5f, 0xdf, 0x4b, 0x8f, 0xaa, 0xe8, 0xa4, 0xbf, 0xc4 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 14.18", + /* Message */ + 35, + { 0x8f, 0xc6, 0x39, 0x4c, 0xd6, 0xe1, 0x75, 0x33, 0xd1, 0xff, 0x8e, 0xbb, 0xf3, 0xe1, 0xae, 0xae, 0xa3, 0x30, 0xed, 0x9f, 0x5a, 0x6e, 0x1e, 0xfb, 0x83, 0x45, 0x42, 0x94, 0xc6, 0xce, 0x24, 0xf6, 0x90, 0x4a, 0x0e } +, + /* Seed */ + 154, + { 0xbe, 0x1c, 0x18, 0x02, 0xdb, 0x44, 0x68, 0x2e, 0x58, 0xc6, 0x1f, 0xe3, 0x87, 0x57, 0xea, 0x0e, 0x38, 0x4e, 0xba, 0xdd, 0x79, 0x59, 0x48, 0x4b, 0x38, 0xbb, 0x23, 0x57, 0x55, 0xc4, 0x61, 0x77, 0xe6, 0x71, 0x76, 0x9f, 0x36, 0x57, 0x3d, 0x7c, 0xb0, 0xee, 0x7e, 0x82, 0x08, 0x7b, 0x58, 0x4b, 0x58, 0xbb, 0x30, 0x05, 0x30, 0x33, 0x68, 0xc6, 0x59, 0x0a, 0xd9, 0xf2, 0x88, 0x2c, 0xfa, 0x74, 0x0d, 0x51, 0xdc, 0x55, 0xeb, 0x0c, 0x79, 0x0f, 0x5b, 0xb6, 0xb6, 0xa3, 0xbd, 0x71, 0xf8, 0xb2, 0x14, 0x6b, 0xb9, 0xe8, 0x03, 0x4c, 0x35, 0xb7, 0xca, 0xbc, 0xbe, 0x10, 0x93, 0x6f, 0xfc, 0x5f, 0x0a, 0x8d, 0x7b, 0x30, 0x47, 0x6a, 0xb9, 0x16, 0x85, 0xae, 0xd8, 0xfa, 0x95, 0x8e, 0x73, 0xc1, 0xee, 0xa3, 0x04, 0x4c, 0x56, 0xb4, 0xb8, 0x70, 0xda, 0x89, 0x37, 0x1a, 0x93, 0xb8, 0x96, 0x52, 0x79, 0xb5, 0x5b, 0xb9, 0x2c, 0xc3, 0x16, 0xc2, 0x3e, 0xf0, 0x97, 0x53, 0x51, 0xc7, 0x49, 0x81, 0x7d, 0xb5, 0xdc, 0xd8, 0x6b, 0x94, 0xad, 0xf6, 0x03, 0xbd } +, + /* Encryption */ + 192, + { 0xb8, 0x3c, 0x71, 0x8c, 0xe5, 0xc6, 0xab, 0x1e, 0x40, 0xff, 0xa5, 0x67, 0x0a, 0xc1, 0x66, 0x66, 0x4d, 0x3a, 0x68, 0x33, 0xcb, 0x3b, 0xde, 0xf4, 0x62, 0x79, 0x4a, 0x25, 0xd5, 0x3e, 0x17, 0x04, 0x60, 0x06, 0x85, 0x8e, 0x63, 0xf8, 0x8a, 0xb9, 0x5d, 0x04, 0xf4, 0xfb, 0x67, 0x74, 0xf7, 0x00, 0x5d, 0xbb, 0x2e, 0x22, 0xd5, 0x19, 0x36, 0x0d, 0x5e, 0x13, 0x38, 0xad, 0x15, 0x30, 0x8f, 0x6c, 0x64, 0x12, 0x54, 0x95, 0x67, 0x00, 0x7e, 0x02, 0x1c, 0xb2, 0x37, 0xed, 0x4a, 0xf5, 0xee, 0xf3, 0xbc, 0xf9, 0xb7, 0x31, 0x59, 0x9f, 0x72, 0x53, 0xce, 0xba, 0x83, 0x04, 0xf4, 0xee, 0x8c, 0x34, 0x33, 0x39, 0xd0, 0xa0, 0x64, 0xeb, 0x77, 0xf1, 0xe9, 0x3f, 0xd1, 0xcc, 0x7b, 0xa5, 0xfc, 0x3b, 0xb8, 0x18, 0x4c, 0xed, 0x0e, 0x86, 0x97, 0xac, 0x47, 0xb7, 0x46, 0x20, 0xc4, 0x94, 0xea, 0xb5, 0x86, 0xed, 0x9f, 0xe7, 0x6e, 0x07, 0xe4, 0xbd, 0x2a, 0x2d, 0x1b, 0x95, 0x59, 0x5b, 0x69, 0xc6, 0x46, 0x77, 0xa8, 0x83, 0x5d, 0x56, 0xac, 0x63, 0x9d, 0xf8, 0xf6, 0x43, 0x24, 0x1b, 0x3e, 0x2c, 0x46, 0x88, 0xd2, 0xad, 0xf2, 0x28, 0xde, 0x2d, 0xa9, 0xbb, 0x0a, 0x36, 0x34, 0x38, 0xe7, 0x51, 0xb5, 0x25, 0x0d, 0xea, 0xe3, 0x05, 0xa3, 0x90, 0x5e, 0x7e, 0x07, 0x7a, 0x4e, 0x8c, 0x74, 0x66 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 14.19", + /* Message */ + 33, + { 0x89, 0xa1, 0x2d, 0x22, 0xbf, 0x87, 0x7d, 0x44, 0x0a, 0x2e, 0x03, 0xae, 0xa9, 0x32, 0xeb, 0x51, 0x83, 0x37, 0x9b, 0x3c, 0x8b, 0x90, 0xbe, 0xe8, 0xfe, 0xd6, 0xfc, 0x6d, 0xaf, 0xb0, 0xcf, 0x05, 0x27 } +, + /* Seed */ + 156, + { 0x60, 0x72, 0x89, 0x5e, 0x47, 0x80, 0xc8, 0xf7, 0x7e, 0x0b, 0x19, 0x5f, 0xc9, 0xf5, 0xdb, 0x78, 0x33, 0xf7, 0xb6, 0xf5, 0xc8, 0x1c, 0x1d, 0x30, 0xcb, 0xe9, 0xe8, 0x0c, 0xcb, 0x38, 0x66, 0x06, 0x9f, 0x8d, 0xb6, 0x96, 0x3a, 0xd4, 0x6d, 0x52, 0x94, 0x2a, 0x5a, 0x73, 0xf6, 0xa3, 0x27, 0xa9, 0x4e, 0xd1, 0x19, 0xdf, 0xce, 0x4c, 0x37, 0x65, 0x84, 0x37, 0x13, 0xb6, 0x19, 0xf9, 0xc4, 0x38, 0x32,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8f, 0xc9, 0x84, 0x3c, 0xaf, 0x6a, 0xeb, 0x17, 0x8f, 0x0e, 0x2c, 0x6b, 0xd2, 0xa0, 0xe6, 0xf7, 0xb8, 0x09, 0x29, 0x61, 0x17, 0xcc, 0x8a, 0x6b, 0xf7, 0x37, 0x35, 0x84, 0x64, 0x24, 0xad, 0xeb, 0xa1, 0xab, 0x31, 0x14, 0x5f, 0xca, 0x3b, 0x8a, 0xf7, 0x68, 0xc9, 0xd0, 0xa2, 0x8e, 0x09, 0xd5, 0x8a, 0xd4, 0x96, 0x42, 0x31, 0x08, 0xf0, 0x8c, 0xaa, 0xc1, 0x74, 0xac, 0xd1, 0xf3, 0xac, 0x43, 0x48, 0x69, 0x61, 0xc5, 0xc9, 0x0e, 0x1e, 0xfb, 0x89, 0xbd, 0xdb, 0x7b, 0xb3, 0x9f, 0x4c, 0xa3, 0xaf, 0x57, 0x12, 0xf5, 0x53, 0xaf, 0x59, 0x4c, 0xd5, 0xd3, 0x64, 0x13, 0x29, 0x14, 0x26, 0x10, 0x07, 0xaa, 0x1d, 0x5f, 0x21, 0x6b, 0x8e } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 14.20", + /* Message */ + 54, + { 0x09, 0xd6, 0x94, 0x8c, 0xe1, 0xc1, 0xf2, 0x4c, 0x6d, 0x52, 0x9c, 0xbc, 0x5d, 0x6d, 0x6c, 0x1b, 0xea, 0xab, 0x56, 0x95, 0xb3, 0x0c, 0xaa, 0xb7, 0x44, 0x96, 0x9b, 0xf7, 0xf9, 0xdb, 0xd2, 0x83, 0x33, 0x5e, 0x98, 0xa9, 0xbc, 0xd6, 0x5d, 0xad, 0x2b, 0x4f, 0x0e, 0x3c, 0xec, 0x89, 0x0b, 0x05, 0xe6, 0x7f, 0xe9, 0x78, 0x23, 0xd4 } +, + /* Seed */ + 135, + { 0xed, 0xed, 0x62, 0xa6, 0x50, 0xf7, 0xde, 0x3b, 0x12, 0x80, 0x22, 0x9d, 0x5f, 0xb1, 0xc4,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 0x7f, 0x13, 0xd8, 0x49, 0x0b, 0xaa, 0xa7, 0x40, 0x96, 0x1f, 0x52, 0xd7, 0xe3, 0x53, 0xc5, 0x04, 0x81, 0x8a, 0x00, 0x0b, 0x03, 0x67, 0x4d, 0x9c, 0xe4, 0x93, 0xdc, 0x3a, 0x4e, 0xe9, 0x16, 0x13, 0x01, 0xf6, 0x1d, 0xe5, 0x21, 0xae, 0xf3, 0xf6, 0xd4, 0x1d, 0x82, 0xe1, 0xc5, 0xdc, 0xe0, 0x2e, 0x63, 0x6e, 0x77, 0x40, 0xa1, 0x83, 0xf8, 0x02, 0x3a, 0xd2, 0x61, 0x49, 0x41, 0xd9, 0xb1, 0x61, 0xcd, 0xbd, 0xf4, 0x8f, 0x8a, 0x56, 0x2c, 0x8f, 0xfe, 0x44, 0xf5, 0x7a, 0x74, 0x6f, 0x26, 0x39, 0xe5, 0xe8, 0x3b, 0xcf, 0xd3, 0x92, 0xd2, 0x3e, 0x1f, 0xb4, 0xa8, 0xd8, 0x5e, 0x3b, 0xa5, 0xe1, 0xcb, 0x9c, 0x0e, 0x53, 0xf0, 0xd9, 0x1b, 0x01, 0xce, 0xc0, 0xf0, 0xef, 0x9d, 0xfe, 0x3f, 0x2b, 0x30, 0x65, 0xbd, 0x55, 0xb7, 0x2f, 0xb1, 0x70, 0x60, 0xab, 0xe8, 0x83, 0x0a, 0xca, 0x00, 0x44, 0x64, 0xfe, 0x7d } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 15: A 2048-bit RSA key pair", +{ + /* Modulus */ + 256, + { 0xdc, 0xfa, 0x10, 0xff, 0xa7, 0x46, 0x65, 0xae, 0xef, 0x87, 0x09, 0x74, 0xea, 0x99, 0xb2, 0xce, 0x54, 0x54, 0x7c, 0x67, 0xf4, 0x2a, 0xaa, 0x6d, 0xd0, 0x1a, 0x2e, 0xd3, 0x1f, 0xd2, 0xc2, 0x42, 0xaf, 0x5d, 0x96, 0x0b, 0x1f, 0x89, 0x6e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xd1, 0x18, 0x7e, 0xc1, 0xd8, 0xa7, 0x44, 0xea, 0x34, 0x5b, 0xed, 0x7e, 0xa0, 0x0e, 0xe4, 0xe8, 0x1b, 0xba, 0x46, 0x48, 0x60, 0x1d, 0xd5, 0x37, 0xdc, 0x91, 0x01, 0x5d, 0x31, 0xf0, 0xc2, 0xc1 } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 256, + { 0x21, 0x95, 0x08, 0x51, 0xcd, 0xf2, 0x53, 0x20, 0x31, 0x8b, 0x30, 0x5a, 0xfa, 0x0f, 0x37, 0x1f, 0x07, 0xae, 0x5a, 0x44, 0xb3, 0x14, 0xeb, 0xd7, 0x29, 0xf5, 0xdc, 0xb1, 0x5d, 0xa7, 0xfa, 0x39, 0x47, 0xac, 0xdd, 0x91, 0x5d, 0xae, 0xd5, 0x74, 0xbd, 0x16, 0xdf, 0x88, 0xbf, 0x85, 0xf6, 0x10, 0x60, 0xb3, 0x87, 0x17, 0x2f, 0xae, 0x6e, 0x01, 0x26, 0x2b, 0x38, 0x64, 0xc2, 0xd3, 0xc2, 0x2f, 0x94, 0xe0, 0x4a, 0x81, 0x59, 0x42, 0x2b, 0x4e, 0xd2, 0x79, 0xc4, 0x8a, 0x4c, 0x9d, 0x76, 0x7d, 0x49, 0x66, 0x07, 0x1a, 0x5b, 0xbf, 0x5d, 0x04, 0x3e, 0x16, 0xff, 0x46, 0xec, 0x1b, 0xa0, 0x71, 0x6f, 0x00, 0xbb, 0xc9, 0x7b, 0xff, 0x5d, 0x56, 0x93, 0xe2, 0x14, 0xe9, 0x9c, 0x97, 0x21, 0xf1, 0x2b, 0x3e, 0xc6, 0x28, 0x2a, 0xe2, 0xa4, 0x85, 0x72, 0x1b, 0x96, 0xdd, 0xcf, 0x74, 0x03, 0xfa, 0x03, 0x7d, 0x0c, 0x57, 0xab, 0x46, 0x3c, 0x44, 0x8d, 0xe5, 0xcc, 0x12, 0x26, 0x5a, 0xdd, 0x88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x2c, 0x94, 0x40, 0xdf, 0x65, 0x32, 0x24, 0x45 } +, + /* Prime exponent 1 */ + 128, + { 0xca, 0x0c, 0x9b, 0x60, 0xb8, 0xe4, 0xa6, 0x06, 0x67, 0x56, 0xc6, 0x5d, 0x20, 0x88, 0x41, 0x9d, 0xf6, 0x25, 0x3b, 0x7b, 0x68, 0x8a, 0x85, 0xf4, 0xf6, 0xe9, 0x64, 0xd8, 0x5d, 0xad, 0x52, 0xa4, 0x52, 0x62, 0x86, 0x7f, 0x1e, 0x96, 0x18, 0x06, 0x9f, 0xcc, 0xd8, 0x65, 0xe9, 0x28, 0x9e, 0x46, 0xe3, 0x9e, 0x20, 0x22, 0x94, 0x4c, 0x5c, 0x44, 0x87, 0xd3, 0x45, 0xcf, 0x25, 0x2d, 0x46, 0x0d, 0x97, 0x7d, 0x77, 0xed, 0xfe, 0xfe, 0xdb, 0xcb, 0xae, 0x46, 0xa2, 0x3a, 0xf7, 0xfa, 0x47, 0x0f, 0x07, 0x7d, 0xa0, 0xe5, 0x09, 0x42, 0x04, 0x4c, 0xb1, 0xa3, 0x60, 0x49, 0x7c, 0xc2, 0x76, 0x0a, 0xc0, 0xf2, 0xad, 0x4a, 0x2f, 0xcd, 0x0e, 0x84, 0xd7, 0xa1, 0xd9, 0x4d, 0xfd, 0xd2, 0x65, 0x8f, 0xd9, 0xce, 0x18, 0x47, 0x5c, 0x1f, 0xa7, 0x5e, 0xe0, 0xce, 0xba, 0xd0, 0xcf, 0x0a, 0xc0, 0x4d } +, + /* Prime exponent 2 */ + 128, + { 0x52, 0x81, 0x71, 0x23, 0x3c, 0x4e, 0x4a, 0x6c, 0x63, 0xb8, 0x67, 0x64, 0xf5, 0x13, 0x38, 0x84, 0x6a, 0xfd, 0xdb, 0xcb, 0x29, 0x58, 0x34, 0x4c, 0x01, 0xc4, 0x00, 0x4a, 0x1d, 0xd8, 0x28, 0x14, 0x5a, 0x1d, 0x02, 0xa1, 0x50, 0x7d, 0xef, 0x4f, 0x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xd1, 0xed, 0xc6, 0xca, 0x41, 0x2e, 0x39, 0x53, 0x50, 0xc5, 0x9a, 0x1d, 0x84, 0x2b, 0xc4, 0xaa, 0x2f, 0x3c, 0x0b, 0x24, 0x3f, 0xde, 0x7d, 0xfd, 0x95, 0x35, 0x6f, 0x24, 0x39, 0x25, 0x1a, 0x11, 0x72, 0xc4, 0x5e } + +} +, +{{ + "PKCS#1 v1.5 Encryption Example 15.1", + /* Message */ + 19, + { 0x2a, 0xac, 0xec, 0x86, 0xf4, 0x23, 0xdd, 0x92, 0x5e, 0xc1, 0x58, 0x82, 0x2a, 0x74, 0x8c, 0xbe, 0x6c, 0x31, 0xa0 } +, + /* Seed */ + 234, + { 0xcc, 0x4b, 0x87, 0xf6, 0x74, 0x49, 0x7b, 0xb0, 0xe3, 0x3d, 0x9e, 0x2a, 0x4a, 0x80, 0x70, 0xb7, 0xd7, 0x8b, 0x5f, 0xd2, 0xc4, 0xb4, 0xf6, 0xeb, 0xac, 0xcd, 0x4e, 0xe5, 0x05, 0xb7, 0x1f, 0xca, 0xfe, 0x21, 0x56, 0x33, 0x7d, 0xdf, 0x27, 0xb4, 0x75, 0xaf, 0x33, 0xf6, 0xc3, 0x40, 0x5b, 0x8e, 0x3c, 0x0c, 0x20, 0x6e, 0xc2, 0x81, 0x29, 0x22, 0xfc, 0xd8, 0xa3, 0x66, 0x1b, 0x86, 0x19, 0xbb, 0xc1, 0x82, 0xf8, 0x07, 0xf3, 0xa1, 0x07, 0x2e, 0x62, 0xca, 0x2b, 0xf1, 0xfa, 0x8b, 0x94, 0x4e, 0x58, 0xa0, 0xe2, 0x03, 0xdb, 0xb7, 0x53, 0xf9, 0xf1, 0xb6, 0xef, 0x62, 0x7e, 0xbe, 0xe5, 0x98, 0x96, 0x7b, 0x38, 0x7a, 0x5f, 0x96, 0x36, 0xd8, 0xb6, 0x41, 0xb3, 0x89, 0x84, 0xb1, 0xca, 0x03, 0x7e, 0x3a, 0xae, 0xaa, 0x17, 0x10, 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 0xf5, 0x00, 0xec, 0x1f, 0x90, 0x4f } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Encryption Example 15.2", + /* Message */ + 21, + { 0x5c, 0x8b, 0xf2, 0xac, 0xab, 0x08, 0xbf, 0xfe, 0xfa, 0x64, 0x80, 0x95, 0x2b, 0x24, 0xda, 0xa5, 0x01, 0x9d, 0x12, 0x5f, 0xee } +, + /* Seed */ + 232, + { 0x5e, 0x16, 0x30, 0x70, 0xef, 0xdd, 0xb7, 0x9f, 0x47, 0x64, 0xf8, 0xa8, 0x1d, 0x44, 0x46, 0x0b, 0x5c, 0x40, 0x0b, 0xec, 0x70, 0x37, 0x52, 0x29, 0x20, 0xf7, 0x72, 0x95, 0x9f, 0xd4, 0xcf, 0x3a, 0xef, 0x2f, 0x14, 0x45, 0x4d, 0xcd, 0x9e, 0x86, 0x25, 0x12, 0xca, 0x69, 0xdb, 0x83, 0x68, 0xa4, 0xcd, 0x8d, 0x1a, 0x44, 0xda, 0x59, 0x5d, 0x6b, 0x43, 0x93, 0x91, 0xc9, 0x31, 0x46, 0xb1, 0x23, 0xf1, 0x86, 0x08, 0x3c, 0x4b, 0x64, 0x47, 0xbf, 0x7e, 0x20, 0x81, 0x51, 0x46, 0xac, 0x75, 0x49, 0xef, 0xb6, 0x74, 0x60, 0xe8, 0xff, 0x1b, 0x2b, 0xba, 0x5c, 0x95, 0xa5, 0x1e, 0xf8, 0x13, 0xd5, 0xdc, 0x4e, 0x6c, 0x38, 0x92, 0xbc, 0x4f, 0x43, 0x9c, 0x99, 0x11, 0x7e, 0xd0, 0x6c, 0x14, 0xa6, 0xc5, 0x40, 0xfd, 0x4c, 0x65, 0xd1, 0x95, 0xd8, 0xc6, 0x1e, 0xa7, 0x79, 0x68, 0x38, 0xe5, 0xa5, 0xdf, 0xaf, 0x11, 0xd0, 0x71, 0x3c, 0x19, 0x1e, 0x8a, 0x0b, 0x80, 0x80, 0xf7, 0xa7, 0x7e, 0x70, 0x3a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6c, 0xbf, 0x1d, 0xa8, 0xb2, 0x01, 0xd2, 0x97, 0xa4, 0xd0, 0x8b, 0xb0, 0xe5, 0xbd, 0xc8, 0x95, 0x32, 0x70, 0xf7, 0xc2, 0x80, 0x96, 0x78, 0xc4, 0x4b, 0xea, 0x75, 0xe8, 0x1f, 0xac, 0x22, 0xd2, 0x71, 0x06, 0x30, 0x2b, 0xb6, 0x9d, 0xa0, 0x74, 0xb6, 0xef, 0xa6, 0x68, 0x8c, 0xf8, 0x35, 0xc8, 0x0b, 0xf5, 0xe4, 0x55, 0x35, 0x28, 0xec, 0xe0, 0xb7, 0xc1, 0xb7, 0x7b, 0x66, 0x6e, 0xa3, 0x45, 0x23, 0xec, 0x1f, 0xcb, 0x3e, 0x25, 0x05, 0x4e, 0x0b, 0xb8, 0xe4, 0xba, 0x02, 0x7e, 0x5c, 0x21, 0xbf, 0x7a, 0x51, 0x43, 0xbf, 0x04, 0x1c, 0xe9, 0xcc, 0xbc, 0xfa, 0xfa, 0x87, 0x80, 0x82, 0xfe, 0x41, 0xf7, 0x8c, 0x70, 0xbf, 0x4e, 0x53, 0xcf, 0x48, 0x7c, 0x1a, 0xad, 0xb0, 0x19, 0x15, 0xce, 0xdd, 0xe8, 0xcd, 0x9f, 0xb8, 0x4e, 0xfd, 0x98, 0x1a, 0xc9, 0x8c, 0xd5, 0x7a, 0x82, 0x56, 0xd4, 0xe9, 0xe2, 0xd0, 0x86, 0x2d, 0xab, 0x04, 0x54, 0xd3, 0xff, 0x4f, 0xb9, 0x85, 0x26, 0x4a, 0x46, 0x99, 0x5a, 0xb0, 0x68, 0xa7, 0x4e, 0xdc, 0x7e, 0xd8, 0xae, 0xff, 0x5f, 0xa3, 0x0f, 0x3a, 0x7d, 0x75, 0x94 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 15.3", + /* Message */ + 13, + { 0xe2, 0x00, 0x4b, 0x31, 0x07, 0x39, 0x98, 0x2c, 0xfa, 0x9e, 0x95, 0x45, 0x3a }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0x4e, 0x33, 0x29, 0xb9, 0x91, 0xe6, 0xd5, 0x3d, 0xc6, 0xb5, 0x00, 0x86, 0x19, 0x92, 0x34, 0x3a, 0x6d, 0xa8, 0x9a, 0x8b, 0xd6, 0xf3, 0x7f, 0x34, 0xe5, 0xde, 0xee, 0xf8, 0x0e, 0x7d, 0x56, 0xb9, 0x3a, 0x45, 0x17, 0x60, 0x66, 0x36, 0x50, 0xfa, 0x45, 0x5d, 0x55, 0x41, 0x89, 0x9a, 0x76, 0xaa, 0xd1, 0xc6, 0x27, 0x5e, 0xc8, 0x2c, 0x46, 0x07, 0x12, 0x26, 0x59, 0xb5, 0x08, 0xcb, 0x5d, 0xc0, 0x26, 0xac, 0xf9, 0x3f, 0xa0, 0x1a, 0x5f, 0xca, 0x3d, 0x81, 0xc1, 0xbb, 0x20, 0xa5, 0xa5, 0xcf, 0x35, 0x7a, 0x23, 0xc9, 0x56, 0x88, 0xea, 0x42, 0xeb, 0x1e, 0xf2, 0xc9, 0xd4, 0x6a, 0xe3, 0x7f, 0x8c, 0xbe, 0x61, 0x5c, 0x20, 0x84, 0xd9, 0x89, 0xb8, 0x92, 0xf0, 0x16, 0x7b, 0x23, 0xbe, 0x33, 0x62, 0xfa, 0xce, 0x80, 0x8d, 0x6a, 0x5e, 0xb8, 0x96, 0x19, 0x44, 0x08, 0xdb, 0x7c, 0x01, 0x63, 0x9c, 0x58, 0x62, 0x30, 0x4c } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 15.4", + /* Message */ + 53, + { 0xdb, 0x6a, 0xf1, 0x29, 0x23, 0x05, 0x27, 0x8c, 0x5b, 0x33, 0x83, 0xf8, 0xa4, 0x1d, 0x6c, 0x83, 0x52, 0x21, 0x14, 0xc9, 0x88, 0x85, 0x50, 0x74, 0x06, 0x5b, 0x23, 0xf9, 0xfe, 0xae, 0x8e, 0xa4, 0x31, 0xfd, 0x5d, 0xa3, 0x6f, 0x9b, 0xab, 0xf9, 0xdc, 0x61, 0xdf, 0x2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0x1c, 0x93, 0x91, 0x83, 0xb2, 0xdd, 0x47, 0x88, 0x04, 0x48, 0x67, 0x8a, 0xcb, 0xa1, 0x2d, 0x7b, 0xc8, 0xa5, 0x52, 0xeb, 0x32, 0x76, 0x34, 0xe9, 0x2d, 0x0c, 0xdc, 0xf7, 0x1e, 0xff, 0xb6, 0x66, 0xad, 0x90, 0x2d, 0x9e, 0x26, 0xad, 0x18, 0x60, 0xe2, 0x92, 0x81, 0xd0, 0x2f, 0xb0, 0xc5, 0x49, 0x3b, 0xf7, 0x4a, 0xc0, 0x2c, 0x94, 0x40, 0x43, 0x6e, 0x0d, 0x75, 0x32, 0x28, 0x92, 0x77, 0x7d, 0x32, 0x5e, 0xc8, 0x45, 0x2d, 0xe7, 0x58, 0xcc, 0x6a, 0x5c, 0xbb, 0x02, 0xd3, 0x41, 0xf4, 0x5c, 0x9a, 0xc8, 0xed, 0xf1, 0x50, 0xda, 0xd7, 0x15, 0x82, 0xdc, 0x77, 0x95, 0x8a, 0x85, 0x44, 0xb0, 0xb5, 0x58, 0xee, 0x2a, 0x0b } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 15.5", + /* Message */ + 11, + { 0xe7, 0x99, 0xe4, 0xeb, 0xc8, 0x69, 0x31, 0x9e, 0xe2, 0x25, 0x80 } +, + /* Seed */ + 242, + { 0x3a, 0x07, 0x57, 0xcb, 0x49, 0xa3, 0xfe, 0x6a, 0xe8, 0x0d, 0x37, 0x42, 0x06, 0x8b, 0x5c, 0x80, 0x68, 0xb8, 0xc5, 0x88, 0x54, 0x20, 0x01, 0x10, 0x93, 0xc2, 0x20, 0x99, 0xed, 0xaa, 0xdb, 0x49, 0x1f, 0x22, 0x6f, 0x85, 0x60, 0x66, 0x16, 0x3a, 0xb5, 0x10, 0x5e, 0x78, 0x79, 0xc7, 0x49, 0x1c, 0x18, 0x35, 0x98, 0x5d, 0xc4, 0x94, 0x21, 0x0e, 0xf7, 0x8b, 0xad, 0x48, 0x16, 0xd9, 0xb6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f, 0x20, 0x86, 0xcb, 0xf6, 0x6f, 0xf4, 0xd1, 0xa9, 0xf7, 0x27, 0x0f, 0x00, 0x9c, 0xb2, 0xe0, 0x7d, 0x90, 0x20, 0xb4, 0x8a, 0x76, 0xd2, 0x41, 0x08, 0xe9, 0x98, 0x9b, 0xf9, 0x04, 0xe4, 0xa7, 0x1d, 0xdb, 0x91, 0x74, 0x0a, 0xd7, 0xe5, 0xd1, 0xb6, 0x8e, 0xc6, 0x4e, 0x3e, 0x66, 0xcd, 0x0e, 0x89, 0x7d, 0xcc, 0x66, 0x57, 0x39, 0xeb, 0xac, 0x45, 0x19, 0x93, 0xf0, 0x2c, 0xc5, 0xbf, 0xc6, 0x3a, 0x60, 0x2f, 0x55, 0x83, 0x81, 0xda } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 15.6", + /* Message */ + 55, + { 0x09, 0x97, 0x12, 0xb8, 0x26, 0xba, 0x67, 0xcf, 0x92, 0x92, 0x25, 0xbd, 0x61, 0x2e, 0xc0, 0x65, 0xd4, 0x51, 0xed, 0xe2, 0x31, 0xc8, 0xd5, 0xc2, 0x04, 0x04, 0xd4, 0x70, 0xe7, 0x9a, 0x7a, 0x1f, 0x24, 0x6e, 0x3e, 0xec, 0xdc, 0xc7, 0x5f, 0x08, 0x53, 0x29, 0xf8, 0xf1, 0x7b, 0x81, 0xd1, 0x30, 0x30, 0x0f, 0xc3, 0xb9, 0xf0, 0x93, 0xa2 } +, + /* Seed */ + 198, + { 0x81, 0xcd, 0x64, 0xc8, 0x4d, 0x77, 0x65, 0xfc, 0x60, 0xe4, 0xde, 0x3b, 0xa9, 0xb4, 0xdd, 0x21, 0xdd, 0xfb, 0x74, 0xfe, 0x2d, 0xfb, 0x7c, 0xf6, 0x19, 0xdb, 0xa4, 0xcb, 0xcc, 0x17, 0x6e, 0xd9, 0x4e, 0x6f, 0x37, 0xed, 0x1a, 0x97, 0xe3, 0xbf, 0xd3, 0x63, 0x65, 0xd2, 0x64, 0x4d, 0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xbd, 0xe7, 0x2f, 0x25, 0xb7, 0x12, 0xa4, 0x26, 0x9f, 0x23, 0xae, 0xb2, 0x41, 0xa6, 0x66, 0xe9, 0x64, 0x96, 0xcd, 0x84, 0xb8, 0x33, 0xfb, 0x53, 0xd0, 0x57, 0x1f, 0x7a, 0xc2, 0xd1, 0x96, 0x4b, 0x8f, 0x2a, 0x7e, 0x13, 0x33, 0x6d, 0x9a, 0x7e, 0x03, 0x04, 0x1d, 0xcf, 0xcb } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 15.7", + /* Message */ + 41, + { 0x5f, 0x2a, 0x5c, 0x7f, 0x93, 0xe7, 0x14, 0xee, 0xca, 0xb3, 0xa5, 0x5a, 0x69, 0xc7, 0x9a, 0x3c, 0xbc, 0x15, 0xbd, 0x19, 0xdf, 0x27, 0x98, 0x9a, 0x9b, 0xab, 0x59, 0xfb, 0xbe, 0xa9, 0xff, 0xcc, 0x66, 0x3b, 0xf8, 0xe1, 0xe7, 0x40, 0x7d, 0xc2, 0x73 } +, + /* Seed */ + 212, + { 0xe0, 0x19, 0x60, 0x82, 0x6d, 0x1a, 0x69, 0xf6, 0x84, 0xc9, 0xc0, 0xb8, 0x5d, 0x84, 0xdc, 0xa5, 0x81, 0x1c, 0x89, 0xa2, 0xc0, 0x74, 0x2f, 0x33, 0xa2, 0xad, 0x19, 0x9f, 0xb6, 0x57, 0xa1, 0xaa, 0x98, 0x13, 0x60, 0x1d, 0x29, 0x93, 0x6a, 0x43, 0xd9, 0xb9, 0xeb, 0x4d, 0x32, 0x89, 0xcd, 0x7d, 0x37, 0x06, 0xab, 0x86, 0xb4, 0xd6, 0x6a, 0xda, 0xa7, 0xe0, 0xa1, 0x34, 0x51, 0xb2, 0xed, 0xb2, 0xbc, 0x77, 0x10, 0x91, 0x11, 0x0c, 0xda, 0xdd, 0x7e, 0xe2, 0xe6, 0xaa, 0xea, 0x2b, 0x35, 0xcf, 0xae, 0x4c, 0xe3, 0xb1, 0xda, 0x18, 0x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 0xb5, 0xd5, 0x7e, 0x12, 0xa5, 0xcc, 0x54, 0xec, 0x0c, 0x80, 0x5f, 0xdc, 0xf6 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 15.8", + /* Message */ + 9, + { 0x55, 0x61, 0x39, 0x59, 0x3e, 0xee, 0x8b, 0x6e, 0x87 } +, + /* Seed */ + 244, + { 0x2d, 0xe2, 0xa5, 0x72, 0x24, 0xf5, 0xf5, 0xb1, 0x2e, 0x22, 0x3e, 0xb5, 0xf8, 0x2b, 0x9f, 0x47, 0x24, 0x9d, 0x25, 0x55, 0x93, 0x79, 0x13, 0x6e, 0xaf, 0x18, 0xe2, 0xf6, 0xc8, 0x33, 0xe3, 0xf0, 0x1b, 0xde, 0xea, 0x9c, 0x30, 0x3b, 0xd9, 0x67, 0x7c, 0x2a, 0x85, 0x71, 0x7d, 0x59, 0x3a, 0x28, 0x02, 0xae, 0xcb, 0xc6, 0xb3, 0xb7, 0x1f, 0x2c, 0x79, 0x03, 0xff, 0x69, 0x0e, 0x3f, 0x3c, 0x49, 0x57, 0xdd, 0x74, 0xcc, 0x9c, 0x2a, 0x68, 0xdc, 0x1d, 0x31, 0x9c, 0x1e, 0x17, 0x87, 0xbb, 0xb7, 0xf0, 0xe6, 0xe5, 0x1e, 0x39, 0xa5, 0xba, 0xdb, 0xba, 0x9f, 0xd4, 0x67, 0x66, 0x19, 0x74, 0x31, 0x2b, 0x55, 0x7a, 0xf1, 0x89, 0x52, 0x54, 0x9f, 0x6e, 0xba, 0x9d, 0xf4, 0x9f, 0x70, 0xea, 0xb3, 0x68, 0x9f, 0x9f, 0xa8, 0xfb, 0xea, 0x1c, 0x97, 0xe1, 0xbb, 0x2f, 0x09, 0x3e, 0x6a, 0xca, 0x9c, 0x38, 0x0e, 0xdc, 0x54, 0x6a, 0x19, 0xc4, 0x4f, 0x91, 0xf6, 0xdc, 0xaa, 0x28, 0x9b, 0xd1, 0x14, 0xfe, 0xa1, 0xb0, 0x36, 0xf9, 0x9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 0x68, 0x27, 0x3a, 0x36, 0xa8, 0xae, 0x23, 0xd1, 0x45, 0x2f, 0x94, 0xa9, 0x37, 0x88, 0x17, 0x71, 0x3e, 0x76, 0x4a, 0x09, 0x17, 0x45, 0x26, 0x29, 0xb5, 0xdc, 0x75, 0xb5, 0x7b, 0x0d, 0x5e, 0x6a, 0x72, 0x8c, 0x83, 0x69, 0x11, 0x72, 0xd2, 0xcd, 0x95, 0xf8, 0xba, 0xd0, 0x7d, 0xb4, 0x68, 0xeb, 0xf5, 0x45, 0xb7, 0xf3, 0xf2, 0xc8, 0x63, 0xb6, 0xe2, 0x0c, 0x67, 0xc4, 0x76, 0x9d, 0xed, 0x03, 0x91, 0xa3, 0x36, 0xf3, 0xa5, 0xd8, 0x7e, 0x24, 0xfc, 0xf9, 0x1a, 0xaf, 0x77, 0x4b, 0xee, 0x77, 0xa7, 0x89, 0xa5, 0x90, 0x80, 0x09, 0xc7, 0xa5, 0x5e, 0xac, 0x92, 0xaf, 0x4c, 0x3d, 0x46, 0x1e, 0x7b, 0x40, 0x61, 0x6c, 0xe8, 0x06, 0x19, 0x4b, 0xfc, 0x20, 0x74, 0xc3, 0xf4, 0xf1, 0x35, 0x59, 0x70, 0x0b, 0x27, 0x08, 0xa0, 0xb7, 0x55, 0x78, 0x96, 0x70, 0xa3, 0x62, 0x6a, 0x14, 0x63, 0x88, 0x11, 0xbb, 0x18, 0xe1, 0x5b, 0x10, 0x25, 0xc3, 0xb9, 0xbe, 0xf1, 0x11, 0x17, 0x6b, 0xc1, 0xf2, 0x46, 0x9e, 0xa9, 0x9a, 0xad, 0x20, 0x86, 0x05, 0x73, 0xd6, 0xc6, 0xa1, 0xfe, 0x40, 0xdb, 0x51, 0xe3, 0x6f, 0xe3, 0x38, 0x00, 0x10, 0x1b, 0xda, 0x20 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 15.9", + /* Message */ + 49, + { 0x9a, 0x13, 0x96, 0x62, 0x2d, 0x06, 0x6c, 0x10, 0x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xaf, 0xeb, 0xa3, 0x9d, 0xd0, 0x09, 0xa6, 0x4a, 0xde, 0x03, 0x05, 0x33, 0x76, 0xf0, 0x29, 0x36, 0xcf, 0x3f, 0x56, 0xbf, 0x64, 0xc1, 0xf3, 0xbd, 0xc0, 0x7c, 0x45, 0xa9, 0x5b, 0x9f, 0xcd, 0x93, 0x96, 0xcd, 0x9a, 0x8d, 0x41, 0xbc, 0xc5, 0x64, 0x24, 0x93, 0x7a, 0x13, 0x71, 0xb3, 0x84, 0x7c, 0x90, 0x5b, 0x9a, 0xb5, 0x84, 0x02, 0x39, 0x3d, 0x40, 0x46, 0xe4, 0xa0, 0x15, 0xc1, 0x47, 0x08, 0xf7, 0x4c, 0xe7, 0x79, 0x0e, 0xba, 0x8a, 0xf7, 0x92, 0x07, 0x24, 0x40, 0xbc, 0xaf, 0xb1, 0x4c, 0x0f, 0x81, 0x08, 0x97, 0x11, 0x87, 0xc8, 0x0f, 0x46, 0x3a, 0x1f, 0xff, 0x25, 0x86, 0x46, 0xea, 0x16, 0xe5, 0x1c, 0x6e, 0xe3, 0x61, 0xb6, 0x61, 0xa1, 0x4f, 0x07, 0xcd, 0x4f, 0x5a, 0x82, 0xc7, 0x09, 0xf4, 0x94, 0xf1, 0xdf, 0x0f, 0x80, 0x3b, 0x6f, 0x64, 0xa7, 0x2f, 0xb9, 0xc4, 0x50, 0xff, 0xe2, 0x68, 0xfc, 0xab, 0x48, 0x7d, 0x4d, 0x63, 0x01, 0x3e, 0x41 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 15.10", + /* Message */ + 53, + { 0xb3, 0x82, 0x4f, 0xb5, 0x45, 0xa8, 0x3f, 0x82, 0xef, 0x82, 0x23, 0x11, 0x82, 0x84, 0xc5, 0x45, 0x6b, 0xab, 0x60, 0x0a, 0xdf, 0x79, 0xf5, 0x07, 0x33, 0xb6, 0x66, 0x8f, 0xbc, 0x51, 0x5d, 0xa5, 0x96, 0x31, 0x62, 0xa6, 0xd7, 0xd7, 0xe9, 0x6f, 0xf9, 0x1a, 0xff, 0x12, 0xeb, 0x3e, 0x93, 0x11, 0xe2, 0x21, 0xe7, 0x0b, 0xc0 } +, + /* Seed */ + 200, + { 0xb8, 0x26, 0x8e, 0x4b, 0xce, 0x7e, 0x53, 0xf2, 0xe8, 0xbe, 0x98, 0xb1, 0x92, 0xd6, 0x3a, 0xd0, 0x65, 0x44, 0xa8, 0x0d, 0x6e, 0x62, 0xd6, 0x32, 0x48, 0x6e, 0x15, 0xe5, 0x75, 0xba, 0x70, 0x6e, 0x3e, 0x76, 0x89, 0x30, 0xdc, 0x8e, 0x41, 0x1f, 0x8e, 0xeb, 0x0b, 0x6e, 0x8f, 0x06, 0x06, 0x29, 0xda, 0x8a, 0x24, 0x23, 0x68, 0xe4, 0x79, 0xcc, 0xb3, 0x31, 0x69, 0x70, 0x70, 0xb4, 0xb3, 0x52, 0x4e, 0x69, 0x16, 0x92, 0x76, 0xba, 0xb0, 0xa9, 0x45, 0x14, 0xcc, 0xd6, 0x60, 0x70, 0x25, 0x28, 0xed, 0x20, 0xb5, 0xd1, 0xdf, 0x07, 0x77, 0x9a, 0x62, 0xc6, 0x56, 0x86, 0xe7, 0xd6, 0x68, 0x46, 0x6f, 0xfc, 0x74, 0x8e, 0xb3, 0x43, 0x44, 0xca, 0x6f, 0x30, 0x5c, 0xda, 0x3d, 0xc3, 0xe8, 0xf0, 0x1c, 0x43, 0xea, 0x91, 0x79, 0xda, 0x46, 0x21, 0x47, 0xf4, 0xd3, 0xec, 0x92, 0xf8, 0x88, 0xb7, 0xee, 0xaa, 0x41, 0x0e, 0x12, 0xc8, 0x6d, 0x89, 0x42, 0xc7, 0xd0, 0x12, 0xf4, 0x5c, 0x61, 0xff, 0xa6, 0xe2, 0xb7, 0x8f, 0x84, 0x3e, 0x9a, 0x75, 0xd9, 0x67, 0x32, 0x14, 0xd5, 0x58, 0xca, 0xf0, 0x1b, 0x45, 0xf9, 0x36, 0x86, 0xee, 0xda, 0x54, 0x79, 0xdb, 0x80, 0x52, 0x79, 0x25, 0x59, 0xcc, 0x23, 0x6a, 0x4a, 0x1e, 0xe6, 0x5d, 0x3c, 0xa6, 0x0e, 0x09, 0xa3, 0xc1, 0x84, 0xd4, 0xb3, 0x95, 0xd7, 0x0b, 0x8e, 0xf8, 0x8d, 0x78, 0x09, 0x1a } +, + /* Encryption */ + 256, + { 0xc0, 0xe9, 0x8d, 0x50, 0x89, 0x4a, 0xda, 0x84, 0x9f, 0xce, 0x89, 0x83, 0xf6, 0xf8, 0x95, 0x74, 0x03, 0x4d, 0x6c, 0xf3, 0xb8, 0x35, 0x2b, 0xfc, 0x50, 0x72, 0x4a, 0x70, 0x3d, 0xd4, 0xf4, 0x2f, 0x40, 0x06, 0xae, 0x00, 0x8a, 0xd9, 0x72, 0x33, 0xce, 0xf6, 0xf1, 0x6c, 0xe1, 0xb4, 0x23, 0xf5, 0x2c, 0x6b, 0x67, 0x7e, 0xf0, 0x05, 0x13, 0x1b, 0xa9, 0x87, 0xf9, 0x8c, 0x72, 0x2f, 0xaa, 0x49, 0x42, 0xec, 0xce, 0x2c, 0x99, 0x66, 0x37, 0x40, 0xa1, 0xa1, 0xe9, 0x81, 0x20, 0xfa, 0xed, 0x97, 0xfd, 0x03, 0xff, 0x36, 0xfe, 0x73, 0x75, 0x8e, 0x70, 0xdf, 0x17, 0xf3, 0x1f, 0x1f, 0x39, 0x41, 0x81, 0x2d, 0x34, 0xca, 0xe6, 0xc3, 0x9d, 0xe7, 0x87, 0xef, 0x57, 0x04, 0xbc, 0x39, 0xc9, 0x20, 0xea, 0x5b, 0x0e, 0xb1, 0x83, 0x3e, 0x83, 0xb4, 0x57, 0x94, 0xfd, 0xe0, 0xff, 0x00, 0x05, 0xc6, 0x27, 0x33, 0xc7, 0x0a, 0x29, 0x6c, 0xa0, 0xbd, 0x47, 0xf0, 0x65, 0x50, 0x3d, 0xdc, 0xe2, 0xd6, 0x49, 0xde, 0x1c, 0x32, 0x8d, 0xdf, 0x60, 0x32, 0xa3, 0x3f, 0xad, 0x46, 0xba, 0x04, 0x1d, 0xc0, 0xa9, 0x94, 0xbf, 0x0f, 0x56, 0xa4, 0x65, 0xf1, 0x62, 0x5f, 0xcb, 0x81, 0xce, 0x01, 0xfa, 0x29, 0x9f, 0xc2, 0xb3, 0xc8, 0x09, 0x39, 0xeb, 0xe6, 0xa6, 0x73, 0x82, 0x6e, 0x2b, 0x2f, 0x12, 0xec, 0xdd, 0xa5, 0x03, 0x5c, 0x95, 0x09, 0x31, 0x2d, 0xd1, 0x9f, 0x10, 0xc3, 0x5c, 0x8a, 0x8b, 0x0d, 0xa6, 0x3c, 0x08, 0x51, 0x97, 0x00, 0x6a, 0x9b, 0xe2, 0x36, 0x10, 0x8e, 0xb9, 0x87, 0x91, 0xb2, 0x6e, 0x28, 0x08, 0xb5, 0xcc, 0xd5, 0xac, 0xec, 0x73, 0x8b, 0xca, 0x02, 0x5b, 0x24, 0x18, 0x2e, 0xf4, 0xab, 0x9c, 0xcc, 0xb1, 0x71, 0xa6, 0x9f, 0xb4, 0x23, 0xa4, 0x6e, 0x03, 0x7a, 0x4d, 0x0a } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 15.11", + /* Message */ + 43, + { 0xa3, 0xa7, 0xda, 0x1b, 0xed, 0xb2, 0xca, 0x99, 0xfc, 0xde, 0xb7, 0xa4, 0x6d, 0x63, 0x3e, 0xca, 0x35, 0x06, 0x2d, 0xf2, 0x89, 0x6b, 0x69, 0x59, 0x07, 0xa7, 0xf9, 0x71, 0xd2, 0xcc, 0x50, 0xb6, 0xe3, 0xd2, 0xa3, 0x67, 0xd1, 0x6e, 0x72, 0x7f, 0x56, 0x97, 0xc0 } +, + /* Seed */ + 210, + { 0xf0, 0x18, 0xa9, 0xb1, 0x3f, 0xbe, 0x56, 0x0b, 0xfe, 0x95, 0x52, 0xed, 0x8a, 0x86, 0x06, 0xbe, 0xea, 0x90, 0x05, 0x5e, 0xd3, 0xf6, 0x2b, 0xb2, 0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4a, 0xfe, 0xb5, 0x74, 0xd6, 0x68, 0x66, 0xd4, 0xca, 0x84, 0xcf, 0xd6, 0xe0, 0xaf, 0x2b, 0xb9, 0x77, 0xa5, 0xd9, 0x9a, 0x5b, 0x0b, 0x37, 0x44, 0x04, 0x2d, 0x33, 0x2b, 0x93, 0x6b, 0xbd, 0xd8, 0x69, 0xe5, 0xf2, 0xc8, 0x83, 0xb4, 0x00, 0xac, 0x8b, 0xc0, 0x68, 0x3e, 0x67, 0x90, 0x63, 0x42, 0x9d, 0x98, 0xd4, 0x94, 0xf3, 0x18, 0x04, 0xd6, 0x5b, 0xb3, 0xc9, 0x74, 0xaa, 0x72, 0xe6, 0x65, 0x7d, 0x4c, 0x16, 0x38, 0xc6, 0x79, 0xc8, 0x1a, 0x16, 0x45, 0x3f, 0x6b, 0x0b, 0xaa, 0x3f, 0x05, 0x17 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 15.12", + /* Message */ + 28, + { 0x49, 0xf6, 0xf8, 0xa4, 0xa8, 0x6a, 0x8a, 0xa0, 0x97, 0x63, 0xaa, 0xc8, 0x55, 0x72, 0xb0, 0xe7, 0xee, 0x77, 0x6a, 0xef, 0xf8, 0xa8, 0x29, 0x00, 0x07, 0x76, 0xff, 0xa6 } +, + /* Seed */ + 225, + { 0x6d, 0xb6, 0xa8, 0x27, 0xac, 0x2a, 0x5e, 0x06, 0x16, 0xc0, 0xf4, 0x43, 0xb2, 0x34, 0x58, 0xe1, 0x75, 0xac, 0xf9, 0xa3, 0xb2, 0x55, 0xf5, 0xc8, 0x52, 0x5e, 0x72, 0x53, 0x42, 0x4f, 0xaa, 0x91, 0x38, 0x05, 0x4c, 0x3d, 0xba, 0xa4, 0x71, 0xf2, 0x7f, 0xe8, 0x55, 0xc1, 0xc0, 0xce, 0xc3, 0x62, 0x59, 0x7a, 0x1a, 0x1e, 0x6e, 0xb4, 0xf2, 0x98, 0xac, 0x3e, 0xb7, 0x34, 0xd3, 0x1f, 0xf0, 0xef, 0x10, 0x08, 0xc0, 0xe0, 0x2b, 0x9b, 0x06, 0xe2, 0x93, 0x15, 0xfc, 0x09, 0x4a, 0x7e, 0xd2, 0x6b, 0x11, 0xea, 0x55, 0x27, 0x0a, 0x3d, 0xcb, 0x67, 0x06, 0xf4, 0x6a, 0x94, 0x50, 0xbf, 0x83, 0x12, 0x88, 0x10, 0x65, 0x13, 0x02, 0x48, 0xd2, 0x64, 0x47, 0x66, 0xa7, 0x99, 0x66, 0xef, 0xda, 0xdb, 0xaa, 0xf5, 0x75, 0xef, 0x4d, 0xd3, 0x5a, 0x93, 0x7f, 0xf0, 0xbf, 0xbf, 0x3d, 0x95, 0x61, 0xc7, 0x54, 0x40, 0x9b, 0xe7, 0xb8, 0x84, 0x7a, 0x60, 0x8d, 0x79, 0x1f, 0xb9, 0x87, 0xee, 0xd4, 0x6a, 0xfe, 0xb0, 0xdb, 0x1c, 0xa9, 0x75, 0xc0, 0x5f, 0x61, 0x57, 0x0d, 0xd0, 0x70, 0x98, 0x5f, 0x13, 0xe4, 0xe0, 0xed, 0x7a, 0x8c, 0xb3, 0x91, 0xce, 0x4d, 0x42, 0x08, 0x32, 0xb4, 0x5a, 0x8b, 0x7e, 0x9f, 0x90, 0x88, 0x4e, 0x61, 0x18, 0x98, 0xf4, 0x72, 0xa0, 0xac, 0x46, 0xc5, 0x7a, 0xa7, 0xf8, 0x46, 0x8a, 0xa1, 0x9d, 0x9c, 0x7b, 0x31, 0x2f, 0x13, 0x43, 0x22, 0x99, 0x03, 0x93, 0x88, 0x1d, 0x32, 0xaa, 0x14, 0x68, 0xf6, 0xe5, 0xf8, 0xeb, 0x85, 0xa2, 0xc3, 0xc2, 0xda, 0xed, 0x92, 0xb9, 0x3c } +, + /* Encryption */ + 256, + { 0x0f, 0xf9, 0x5f, 0x4a, 0x2a, 0x07, 0x18, 0xd6, 0x73, 0xf9, 0x20, 0x2c, 0x80, 0x9f, 0x10, 0x45, 0x10, 0x1f, 0x52, 0xb9, 0xdb,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, 0xfe, 0x24, 0x64, 0xeb, 0x79, 0xa3, 0xde, 0xba, 0xb3, 0x7b, 0x6d, 0x3a, 0x0a, 0xb3, 0x15, 0x77, 0xde, 0x7e, 0x93, 0x22, 0x9b, 0x49, 0xd1, 0xe8, 0xfd, 0x56, 0x32, 0xd0, 0x26, 0xd8, 0x3e, 0xe0, 0x6a, 0xa7, 0x85, 0x34, 0xce, 0xe3, 0x08, 0x1b, 0x22, 0x2e, 0xc4, 0xcd, 0x94, 0x88, 0xcc, 0xde, 0x4e, 0x15, 0x29, 0x05 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 15.13", + /* Message */ + 5, + { 0x12, 0x97, 0x5d, 0xb7, 0x3d } +, + /* Seed */ + 248, + { 0x6a, 0x4b, 0x4f, 0xb8, 0x05, 0x80, 0x72, 0x72, 0x96, 0x5b, 0xff, 0x2f, 0x4c, 0x80, 0x0f, 0x96, 0x4f, 0xa3, 0xae, 0xb9, 0xfb, 0x43, 0x3b, 0x40, 0xc8, 0xac, 0xc5, 0x98, 0xb4, 0x84, 0x02, 0x98, 0x93, 0xa2, 0x19, 0xc9, 0x53, 0x21, 0x34, 0xc0, 0x6a, 0xc8, 0x42, 0x5c, 0x28, 0xa5, 0xf0, 0x63, 0xc2, 0x84, 0x20, 0x0a, 0x04, 0x56, 0x43, 0x48, 0x97, 0x16, 0x51, 0x6a, 0x98, 0x7b, 0xf8, 0x1b, 0xa1, 0x86, 0xf4, 0xce, 0xb8, 0xd8, 0xd9, 0xdc, 0x1d, 0x73, 0xf2, 0x26, 0x7f, 0xd1, 0x98, 0x8d, 0x6a, 0x2f, 0xfd, 0x68, 0xcd, 0x36, 0x69, 0xde, 0x2b, 0x04, 0x70, 0x09, 0x43, 0xd0, 0xd4, 0x44, 0xae, 0x3d, 0xa8, 0xf0, 0x59, 0x4e, 0x62, 0x61, 0xe5, 0xff, 0xf6, 0x07, 0xf0, 0x4d, 0xf3, 0x1e, 0x3d, 0x9c, 0x91, 0x22, 0xd7, 0x6f, 0xb9, 0x0f, 0x3f, 0x82, 0xc3, 0x93, 0x25, 0x3b, 0x75, 0x20, 0x16, 0x5b, 0xd1, 0xf3, 0x19, 0xab, 0x3b, 0x87, 0x5e, 0xcc, 0x6a, 0xb3, 0xed, 0x02, 0x47, 0xd0, 0x37, 0x70, 0xf8, 0xd6, 0x47, 0x1d, 0x69, 0xcd, 0x13, 0xee, 0x25, 0x7c, 0x1f, 0xc8, 0xb3, 0x0f, 0x19, 0xb9, 0x3f, 0xe4, 0xf2, 0xfc, 0x9c, 0x21, 0x49, 0x28, 0x13, 0xd1, 0xfc, 0x85, 0x2a, 0xf7, 0x0c, 0xdc, 0x63, 0x84, 0xd2, 0xae, 0x55, 0xb9, 0x1e, 0x39, 0xae, 0x6c, 0x3b, 0x19, 0xfd, 0x1a, 0x7d, 0xea, 0xf7, 0x18, 0xc0, 0x5d, 0x57, 0x80, 0x95, 0x96, 0xa2, 0x88, 0xfc, 0x9a, 0xef, 0xb8, 0x15, 0xae, 0xa2, 0x9f, 0xaf, 0x67, 0x83, 0xc0, 0x05, 0x35, 0xfd, 0x71, 0xd6, 0x25, 0x49, 0x40, 0xb7, 0x62, 0xf5, 0x07, 0x26, 0x1f, 0x20, 0x9b, 0xc8, 0xba, 0x94, 0x79, 0xbb, 0x3f, 0x5d, 0x64, 0x64, 0x23, 0x19, 0xcc, 0x31, 0x86, 0x85, 0x9c } +, + /* Encryption */ + 256, + { 0x27, 0x15, 0xd6, 0xeb, 0x53, 0xae, 0xe6, 0xd4, 0xbd, 0xdd, 0x3b, 0xe9, 0xb6, 0x63, 0x14, 0x4a, 0x41, 0x0d, 0x03, 0x81, 0x77, 0x9f, 0x79, 0x9d, 0xca, 0x88, 0x07, 0x92, 0xab, 0x43, 0x1a, 0xf9, 0x98, 0x9d, 0xeb, 0x17, 0x36, 0x9d, 0xc6, 0x74, 0x38, 0xad, 0xd8, 0x2b, 0xdf, 0x0a, 0x59, 0xdd, 0x3b, 0xc2, 0x78, 0x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 0xa9, 0x52, 0x1d, 0xaa, 0x19, 0xb0, 0x44, 0x30, 0xe8, 0x10, 0xf2, 0xc4, 0x5a, 0x57, 0xd4, 0x25, 0x3b, 0xed, 0xb9, 0x1d, 0xa0 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 15.14", + /* Message */ + 46, + { 0x8d, 0xe0, 0xf5, 0xa4, 0x13, 0xa7, 0xf7, 0x86, 0x39, 0x6f, 0x09, 0xa4, 0x5e, 0x5e, 0x77, 0x4f, 0x3c, 0x60, 0x9c, 0xe6, 0xf1, 0xb4, 0x90, 0xdd, 0xe2, 0x22, 0xb3, 0x22, 0xd5, 0x34, 0x0e, 0x9b, 0x10, 0x55, 0x81, 0xf4, 0xc5, 0xbe, 0x44, 0xea, 0xbb, 0x3d, 0x1b, 0x23, 0xf8, 0x45 } +, + /* Seed */ + 207, + { 0xf8, 0x71, 0xa8, 0x97, 0xae, 0xe8, 0x45, 0xc3, 0xbb, 0x82, 0x69, 0x90, 0xb7, 0x31, 0xd2, 0x77, 0x7c, 0xf4, 0x76, 0xb5, 0xcf, 0xc5, 0x59, 0x6d, 0xf3, 0xa5, 0x23, 0xba, 0x69, 0x79, 0xc7, 0xa4, 0x51, 0x79, 0xda, 0x5f, 0xd6, 0x0f, 0x81, 0x0b, 0xf4, 0x14, 0xc5, 0x4e, 0x18, 0x2f, 0x26, 0x01, 0x72, 0x0f, 0xfe, 0x8a, 0x50, 0xd7, 0xd9, 0xd1, 0x1e, 0x56, 0x43, 0x18, 0xe9, 0x02, 0x6f, 0x07, 0xc5, 0xaa, 0xa1, 0x3e, 0xf8, 0x91, 0x28, 0x3a, 0x96, 0x63, 0xc1, 0xe3, 0xd2, 0x7b, 0x93, 0x81, 0x7d, 0x01, 0xa5, 0x6f, 0xce, 0x33, 0xd5, 0x16, 0x9b, 0xfe, 0xa6, 0x2a, 0x8e, 0xe6, 0xc3, 0x70, 0xa3, 0xaa, 0x8c, 0x71, 0x94, 0xd9, 0xd3, 0x53, 0x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0b, 0x00, 0x25, 0x76, 0x5e, 0x9b, 0xd2, 0x85, 0x9b, 0xa9, 0x4a, 0x69, 0x63, 0x33, 0xa5, 0xeb, 0xe2, 0xeb, 0x25, 0xba, 0x9d, 0x19, 0x00, 0x7f, 0x64, 0x36, 0x0c, 0xc0, 0x75, 0xca, 0xd7, 0xf0, 0x99, 0x50, 0xe4, 0xb7, 0xaf, 0xcb, 0xac, 0x36, 0xe6, 0xec, 0xb0, 0x17, 0xcf, 0x4a, 0x1f, 0x25, 0xa4, 0xd2, 0xb9, 0x51, 0xbb, 0x85, 0xe8, 0x1c, 0xb2, 0xb4, 0xeb, 0x6f, 0x45, 0xcd, 0xd4, 0x00, 0xd2, 0xac, 0x4e, 0x21, 0x69, 0x89, 0x6d, 0x94, 0x15, 0x82, 0x44, 0x9c, 0xe3, 0x0f, 0x69, 0xc1, 0x7c, 0xb4, 0x49, 0x32, 0x1f, 0x65, 0xe4, 0x4d, 0xf3, 0x03, 0x87, 0x86, 0x27, 0x62, 0x13, 0x51, 0xf5, 0x2e, 0x5a, 0x07, 0x52, 0xe3, 0xb5, 0xeb, 0x12, 0x63, 0x61, 0x69, 0x7f, 0x53, 0xcf, 0x24, 0x66, 0x16, 0x5c, 0x3f, 0xbd, 0x66, 0x2b, 0x83, 0x75, 0x80, 0xb7, 0x6d, 0x45, 0x9f, 0xf0, 0x44, 0x97, 0xe5, 0xfe, 0x1b, 0x3c, 0xd1, 0x8c, 0x4d, 0x58, 0xff, 0xed, 0xab, 0xdd, 0x04, 0xa8, 0xc1, 0x08, 0xd8, 0x59, 0xb6, 0x52, 0x98, 0x63, 0x9c, 0x3a, 0xf8, 0x0c, 0xd9, 0x4e, 0x23, 0x87, 0xa8, 0x69, 0x44, 0x09, 0xef, 0x9e, 0x0b, 0x78, 0xb6, 0xf4, 0x67, 0x39, 0x0b, 0xe1, 0x08, 0x57, 0x9c, 0x9b, 0x2c } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 15.15", + /* Message */ + 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, 0xb4, 0x06, 0x93, 0x19, 0xb2, 0x93, 0xc2, 0x5d, 0xc3, 0x0b, 0x8f, 0xb3, 0x8b, 0xca, 0x15, 0x3e, 0x2f, 0xa6, 0x1b, 0x33, 0x76, 0xdd, 0xc3, 0xc5, 0x3a, 0x57, 0x93, 0x21, 0xd9, 0x10, 0xa1, 0x71, 0xfc, 0x42, 0xaa, 0xf1, 0x70, 0x50, 0xed, 0x6d, 0x31, 0x1a, 0x7d, 0xf5, 0xb9, 0xa5, 0xcf, 0x3a, 0x98, 0xfd, 0x69, 0xaa, 0x85, 0xac, 0x23, 0x46, 0xc1, 0x6f, 0xa0, 0x3b, 0x1e, 0x53, 0xd1, 0x03, 0xd6, 0xf5, 0xa0, 0x4b, 0x0d, 0x9d, 0x3f, 0x18, 0x83, 0x53, 0x1e, 0x2f, 0x63, 0x41, 0xfd, 0x91, 0xbd, 0x63, 0xa5, 0xaa, 0x99, 0x3b, 0x6e, 0xdb, 0x99, 0x92, 0xe5, 0xdb, 0x17, 0xa7, 0xbe, 0x55, 0x5e, 0xaf, 0xa3, 0xbb, 0xab, 0x32, 0x08, 0x6e, 0x92, 0xb8, 0xb7, 0x91, 0x06, 0x69, 0x68, 0xe0, 0x0f, 0x8a, 0x17, 0x71, 0x61, 0x44, 0x0c, 0xe5, 0x38, 0x57, 0x97, 0x89, 0xc2, 0x91, 0x2e, 0xbd, 0x7a, 0xd0, 0x19, 0xbe, 0x29, 0x37, 0x6c, 0xad, 0xee, 0xc2, 0x99, 0x21, 0x07, 0xc9, 0xdb, 0x07, 0x60, 0x49 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 15.16", + /* Message */ + 47, + { 0x6d, 0x72, 0x08, 0xb2, 0xff, 0xb0, 0x1a, 0xd2, 0x36, 0x0c, 0x46, 0x09, 0xf3, 0xba, 0xd3, 0x15, 0x79, 0xc8, 0xd4, 0x00, 0x5c, 0xc9, 0x60, 0x14, 0x2e, 0x2b, 0x69, 0x6b, 0x26, 0xe9, 0x4f, 0x2d, 0x99, 0x98, 0x0b, 0xad, 0x38, 0x41, 0x05, 0xb1, 0x89, 0x95, 0x57, 0xaf, 0x89, 0x05, 0x25 } +, + /* Seed */ + 206, + { 0x72, 0xae, 0x49, 0x97, 0x18, 0x28, 0xba, 0x54, 0x23, 0xab, 0x96, 0x3c, 0xdb, 0x18, 0xf4, 0xbd, 0xfd, 0xbc, 0x74, 0x73, 0xcf, 0x70, 0xfb, 0x77, 0x21, 0x34, 0x41, 0xf1, 0xd4, 0x46, 0xae, 0x48, 0x10, 0x93, 0x03, 0xa2, 0x60, 0xc0, 0x91, 0xab, 0x51, 0x99, 0xd9, 0x64, 0xe6, 0x21, 0x63, 0xc2, 0x46, 0x57, 0x24, 0x71, 0x73, 0xcb, 0x05, 0x11, 0xb9, 0xcb, 0xb1, 0x63, 0x45, 0x9c, 0x95, 0x6f, 0x9c, 0x0b, 0x18, 0x83, 0xb6, 0x91, 0xb5, 0xe4, 0xea, 0xe0, 0x4f, 0x0a, 0xf2, 0x4e, 0xa3, 0x28, 0xc6, 0xde, 0x88, 0x2c, 0xeb, 0xc4, 0xf8, 0x9a, 0x56, 0x37, 0x32, 0x82, 0xd6, 0x0a, 0xf2, 0xba, 0x96, 0x7e, 0x25, 0x7a, 0xc4, 0x01, 0xa3, 0x7f, 0x94, 0x41, 0xc1, 0x1f, 0x2e, 0x0e, 0x42, 0x1b, 0x2d, 0x15, 0x1e, 0xb2, 0x43, 0xa9, 0x7e, 0xae, 0x5a, 0xaa, 0x86, 0xcd, 0x38, 0xdf, 0x43, 0xc2, 0x6a, 0x1d, 0x6e, 0x3b, 0x12, 0xc1, 0x3f, 0xa3, 0x59, 0x7b, 0x85, 0xbb, 0xaa, 0x13, 0x09, 0x45, 0x2c, 0x7e, 0x9b, 0x32, 0x5d, 0x8c, 0x73, 0xfa, 0x79, 0x9c, 0x57, 0x56, 0x52, 0x73, 0x7b, 0x92, 0xa2, 0x47, 0xd2, 0x3c, 0x4c, 0x70, 0x12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, 0xa6, 0x5e, 0xc5, 0xa2, 0x9f, 0x08, 0xf8, 0x13, 0x5c, 0x73, 0x18, 0xa2, 0x21, 0x6d, 0x1b, 0x7d, 0x10, 0x37, 0x95, 0xc7, 0xec, 0x8e, 0xe5, 0x7a, 0x79, 0x28, 0x0f, 0x9a, 0x84, 0x4b, 0xd6, 0xab, 0x71, 0x28, 0x82, 0x0e, 0x1f, 0xb5, 0xe8, 0x25, 0x54, 0xfe, 0xc0, 0x2a, 0x78, 0xaa, 0x8d, 0x3f, 0xd6, 0xa1, 0x3e, 0x0f, 0xad, 0x0e, 0xce, 0xe7, 0xab, 0x61, 0x1d, 0xe4, 0xb0, 0xa0, 0x48, 0x1f, 0x42, 0xb8, 0xd0, 0xb5, 0x5c, 0xb8, 0x81, 0x3d, 0x1c, 0xa6, 0xe2, 0x61, 0x5c, 0xf5, 0xae, 0x8a, 0xe8, 0x6d, 0x0b, 0x5d, 0x46, 0x95, 0x50, 0x75, 0x49, 0xf7, 0xa3, 0x73, 0x66, 0xa4, 0x45, 0xfb, 0x55, 0xb7, 0xc4, 0xb6, 0xb5, 0x8e, 0xa6, 0x99, 0xdb, 0xe5, 0xdd, 0xc8, 0x19, 0x3e, 0x2b, 0xf3, 0xd5, 0xb8, 0x40 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 15.17", + /* Message */ + 15, + { 0x7d, 0xeb, 0x6d, 0x40, 0x41, 0x48, 0x23, 0x2c, 0x48, 0x21, 0x63, 0x4d, 0x3d, 0xf9, 0xbc } +, + /* Seed */ + 238, + { 0xe6, 0xf8, 0x3c, 0x8c, 0x99, 0x3e, 0x60, 0x15, 0xaf, 0x43, 0x04, 0x09, 0x68, 0x4e, 0x62, 0x7f, 0x3d, 0x9b, 0x84, 0xad, 0x05, 0x55, 0xc6, 0xa6, 0xc0, 0x91, 0x13, 0xa7, 0x12, 0x47, 0x2a, 0xbb, 0x36, 0xf6, 0x11, 0x92, 0x32, 0x6c, 0xf8, 0x40, 0x82, 0x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xd3, 0x9b, 0x93, 0x9d, 0xf2, 0x82, 0x53, 0x2e, 0x54, 0x83, 0x10, 0x8b } +, + /* Encryption */ + 256, + { 0xaa, 0x6e, 0x6e, 0x4a, 0xf6, 0x89, 0x26, 0x4d, 0x61, 0xbf, 0xa8, 0xf5, 0x08, 0x6d, 0x82, 0x79, 0xdd, 0xc2, 0x28, 0x9c, 0x55, 0x41, 0xaf, 0x45, 0x35, 0x19, 0xc4, 0x4b, 0x95, 0xea, 0xe6, 0xa1, 0x5e, 0x7e, 0x7b, 0xd1, 0x5f, 0xd3, 0x1a, 0x4f, 0xad, 0x5f, 0x7c, 0x85, 0x90, 0x5e, 0xfc, 0xa2, 0x26, 0x93, 0x0d, 0x67, 0xda, 0xf5, 0x58, 0xb7, 0x15, 0xb2, 0x1f, 0x36, 0x28, 0xf6, 0x1a, 0x3b, 0x04, 0x2c, 0x1a, 0x38, 0xf9, 0xaf, 0x3a, 0xda, 0x82, 0xec, 0x44, 0x88, 0xc8, 0xad, 0xe5, 0xf1, 0xda, 0x81, 0xe1, 0xa8, 0xab, 0x90, 0xe1, 0xb3, 0x12, 0xdc, 0xda, 0x83, 0x5f, 0x9e, 0x92, 0x5f, 0x2e, 0x72, 0x46, 0x3f, 0xa8, 0x33, 0xa0, 0x8b, 0x93, 0x25, 0x3f, 0xdf, 0xe8, 0xcf, 0x4e, 0x5f, 0x3c, 0xfa, 0x91, 0x10, 0x77, 0x19, 0xa6, 0xa9, 0x46, 0x9a, 0xcd, 0x71, 0x25, 0xae, 0x67, 0xb2, 0xbd, 0x75, 0x85, 0x7c, 0x59, 0xbe, 0x0a, 0xbe, 0x98, 0x40, 0x74, 0xe2, 0x95, 0x47, 0x8a, 0xf2, 0x74, 0x0e, 0x25, 0x89, 0x4e, 0x56, 0xa6, 0x25, 0x0e, 0xf7, 0x36, 0x21, 0x94, 0x13, 0x81, 0x03, 0x74, 0x3c, 0xa9, 0x54, 0x47, 0x33, 0xd2, 0x50, 0x55, 0x71, 0xbe, 0xe0, 0x0f, 0x17, 0x8a, 0x2c, 0xfa, 0x38, 0xe1, 0xf8, 0xf2, 0x2f, 0xb2, 0x39, 0x30, 0xd6, 0xa7, 0x5d, 0xd1, 0x7c, 0x68, 0x9a, 0x47, 0x6d, 0x87, 0x15, 0x31, 0x85, 0x95, 0x10, 0x8f, 0xcc, 0xe8, 0x95, 0xe3, 0x44, 0x9e, 0xca, 0x97, 0xa7, 0xdd, 0xba, 0xe3, 0xe6, 0xd6, 0xf0, 0xe3, 0x5e, 0x66, 0x6d, 0x6f, 0xbd, 0x78, 0x78, 0x48, 0xf8, 0x68, 0x13, 0x37, 0xb1, 0xd4, 0xc5, 0x23, 0x8b, 0x1c, 0x24, 0xde, 0x77, 0xa7, 0xe6, 0x75, 0xe7, 0xae, 0xd8, 0xdc, 0x13, 0xdd, 0x9e, 0xb1, 0x06, 0x87, 0x98, 0x51, 0x7c, 0x0b, 0x6e } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 15.18", + /* Message */ + 30, + { 0x03, 0x1f, 0xc3, 0xa3, 0xea, 0xa4, 0x2b, 0x0d, 0x9f, 0x6d, 0x7d, 0xd5, 0x99, 0x3d, 0x61, 0x89, 0xcb, 0xb2, 0xe0, 0xe9, 0x6f, 0xaa, 0x33, 0xd6, 0x1f, 0x31, 0x7b, 0x6b, 0x3c, 0x00 } +, + /* Seed */ + 223, + { 0x16, 0xab, 0x64, 0x85, 0xca, 0xc0, 0x39, 0x71, 0x14, 0x88, 0x0e, 0x6f, 0x72, 0xbc, 0x1f, 0x1e, 0xf3, 0x4b, 0xa2, 0x7d, 0x1c, 0x43, 0x3d, 0x77, 0xf3, 0x37, 0x2b, 0x1f, 0xd5, 0xb2, 0x1b, 0xa5, 0x7a, 0x50, 0x5c, 0xd8, 0xf3, 0x5b, 0x75, 0x24, 0x2c, 0xf1, 0xb7, 0x6d, 0x38, 0x1c, 0x68, 0x34, 0x24, 0x01, 0xee, 0xef, 0xc8, 0x42, 0x53, 0xa2, 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d, 0x99, 0xa3, 0x16, 0x52, 0x04, 0x7f, 0x46, 0x92, 0x60, 0xbe, 0xe8, 0x71, 0x0e, 0x37, 0x0f, 0x04, 0xed, 0x70, 0x75, 0x93, 0x93, 0x7a, 0x08, 0xdd, 0x82, 0x26, 0x49, 0x92, 0x31, 0x1f, 0x4a, 0xf9, 0x88, 0x4c, 0xf8, 0xad, 0x34, 0xaf, 0xb9, 0xf6, 0x75, 0x99, 0x3c, 0x8a, 0xbf, 0x41, 0x51, 0x98, 0x39, 0xf7, 0x6f, 0xa1, 0xe9, 0x31, 0xbd, 0xae, 0x1d, 0x08, 0xa6, 0x34 } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 15.19", + /* Message */ + 43, + { 0xc9, 0xc9, 0x3a, 0xfe, 0xa9, 0x97, 0xb1, 0xee, 0x36, 0xfa, 0x72, 0x72, 0x03, 0x54, 0xc7, 0x04, 0x64, 0x9b, 0xc6, 0xef, 0x44, 0xf5, 0x18, 0x7c, 0x6c, 0x28, 0x54, 0x2b, 0x9a, 0xe9, 0x55, 0xa7, 0x19, 0x3f, 0xff, 0xec, 0x86, 0x7b, 0xb6, 0x2e, 0x21, 0x9e, 0x68 } +, + /* Seed */ + 210, + { 0x52, 0xd4, 0xc3, 0xbf, 0x0c, 0x77, 0x2c, 0x02, 0xd3, 0xbb, 0x71, 0x1d, 0x7f, 0x14, 0x6d, 0x8c, 0x49, 0x76, 0xf8, 0x30, 0x81, 0xbe, 0x49, 0x53, 0xd4, 0xaf, 0xeb, 0x07, 0x8e, 0x54, 0x12, 0xa3, 0x2c, 0x3d, 0xc7, 0x37, 0xb5, 0x9b, 0xc4, 0x54, 0xc3, 0xde, 0x93, 0xa1, 0xae, 0xd0, 0x7c, 0x1b, 0xa6, 0x4d, 0x1d, 0xe4, 0x36, 0x80, 0x14, 0xd0, 0x4f, 0x64, 0x40, 0x55, 0x6a, 0x4a, 0x16, 0x97, 0x9d, 0x08, 0x03, 0xcc, 0x29, 0x22, 0xda, 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0xe2, 0x9f, 0x22, 0xfb, 0x8c, 0x2a, 0x41, 0x33, 0x1f, 0xe1, 0xfc, 0xb6, 0x15, 0x89, 0xe0, 0xec, 0x75, 0x00, 0xed, 0x84, 0x42, 0xd6, 0x18, 0x46, 0xdf, 0x6c, 0xca, 0x46, 0xcc } + +} +, +{ + "PKCS#1 v1.5 Encryption Example 15.20", + /* Message */ + 22, + { 0x69, 0xb7, 0x64, 0x48, 0x55, 0xf9, 0x1d, 0x1c, 0x61, 0xc8, 0x49, 0x8e, 0x4b, 0xa1, 0xba, 0x4d, 0x84, 0x5b, 0xa8, 0x82, 0xb1, 0x73 } +, + /* Seed */ + 231, + { 0xb2, 0x2f, 0xc7, 0xde, 0x85, 0xc5, 0xf7, 0x5a, 0x2f, 0x32, 0xaf, 0x1b, 0xfb, 0xcd, 0x57, 0x89, 0x71, 0x56, 0x87, 0xde, 0x06, 0xe6, 0x6d, 0x06, 0x4a, 0xe3, 0xeb, 0x8d, 0xfb, 0x07, 0xa2, 0x57, 0x5b, 0xe0, 0xe9, 0xe6, 0xf2, 0x9f, 0x50, 0xd7, 0x39, 0x6d, 0x07, 0x8b, 0x36, 0xef, 0x80, 0x2f, 0x75, 0x1a, 0x77, 0xcc, 0x92, 0xd7, 0x61, 0x4c, 0x91, 0xdd, 0x27, 0x99, 0x31, 0xfc, 0xe0, 0x07, 0xeb, 0xf9, 0x15, 0xa0, 0xf1, 0x4e, 0x31, 0x2c, 0xe9, 0x1f, 0xe5, 0xaa, 0x6f, 0xb3, 0x74, 0x51, 0x61, 0x4f, 0xe3, 0x7c, 0x73, 0xfc, 0x6f, 0x6d, 0x6f, 0x8e, 0x52, 0x78, 0x9b, 0x5d, 0x88, 0xe8, 0x6b, 0xeb, 0x16, 0x33, 0xf5, 0xdd, 0xd5, 0xc0, 0x70, 0xf1, 0x4f, 0xd3, 0xcf, 0xee, 0x97, 0xdd, 0x4a, 0x64, 0x3d, 0x35, 0xd4, 0x5d, 0xd9, 0xbf, 0x34, 0xdf, 0x8c, 0x31, 0x0b, 0x48, 0x59, 0x2e, 0x94, 0x68, 0x31, 0xb3, 0x4e, 0xf3, 0xc0, 0xb9, 0x16, 0xf1, 0x7c, 0xb0, 0xac, 0xb2, 0xcf, 0xc1, 0xc2, 0x5d, 0x03, 0x09, 0xac, 0xc1, 0x12, 0x4f, 0x26, 0x5c, 0x1a, 0x83, 0xed, 0x88, 0x5c, 0x87, 0xfa, 0x82, 0x6f, 0xda, 0x57, 0x10, 0xb5, 0x4e, 0x16, 0xec, 0x0f, 0x44, 0x8c, 0xdb, 0x7e, 0xe0, 0x58, 0x0f, 0xf7, 0x38, 0x65, 0x30, 0xea, 0x46, 0x1e, 0x04, 0x2a, 0x0b, 0x77, 0x42, 0xc4, 0x61, 0x97, 0x6b, 0xb5, 0xa3, 0x80, 0xad, 0xbc, 0xb0, 0x01, 0x06, 0xf2, 0x67, 0x1b, 0x6c, 0xce, 0x4f, 0x72, 0x67, 0x75, 0x2f, 0x80, 0x66, 0x80, 0x42, 0x78, 0x35, 0x0b, 0x01, 0x75, 0x3e, 0x31, 0xb3, 0x8e, 0xcc, 0xfb, 0xe9, 0x05, 0x69, 0xf6 } +, + /* Encryption */ + 256, + { 0xab, 0x42, 0x67, 0x97, 0x2c, 0x77, 0x96, 0x83, 0x93, 0x88, 0xd4, 0xad, 0x87, 0xde, 0xd7, 0x4b, 0xb6, 0x53, 0xe9, 0xa7, 0x05, 0x0e, 0x28, 0x2e, 0x82, 0x19, 0x28, 0x75, 0x68, 0x9f, 0x70, 0xee, 0x1d, 0xa1, 0x8a, 0x1f, 0x73, 0x22, 0x09, 0x2c, 0xd2, 0x9f, 0xd0, 0x01, 0x19, 0x92, 0x2a, 0x6d, 0xe1, 0x26, 0x01, 0x98, 0x0a, 0xa9, 0xfa, 0x6e, 0x61, 0x9e, 0x27, 0x75, 0xe8, 0x7a, 0xda, 0xe3, 0x16, 0x95, 0xc1, 0x30, 0x4e, 0x77, 0xf5, 0x2c, 0xce, 0x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/* LTC_TEST_EXT */ +} +}, +}; + diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/rsa-testvectors/pkcs1v15crypt-vectors.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/notes/rsa-testvectors/pkcs1v15crypt-vectors.txt Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,9709 @@ +Test vectors for RSA PKCS#1 v1.5 Encryption +=========================================== + +This file contains test vectors for the PKCS#1 v1.5 +encryption scheme. 15 RSA keys of different sizes have +been generated. For each key, 20 random messages of length +between 1 and 64 octets have been PKCS#1 v1.5 encrypted. +As specified in PKCS#1, the block type for this operation is 2. +The seed value of each example provides the pseudo random bytes +to be used for padding. This makes the result predictable. +Note that each example can be used to test encryption and +decryption. + +Key lengths: + +Key 1: 1024 bits +Key 2: 1024 bits +Key 3: 1024 bits +Key 4: 1024 bits +Key 5: 1024 bits +Key 6: 1024 bits +Key 7: 1025 bits +Key 8: 1026 bits +Key 9: 1027 bits +Key 10: 1028 bits +Key 11: 1029 bits +Key 12: 1030 bits +Key 13: 1031 bits +Key 14: 1536 bits +Key 15: 2048 bits + +These test vectors have been derived from the OAEP test vectors. +============================================================================ +# Thirteen RSA keys with bit sizes between 1024 and 1031, one 1536-bit key, +# and one 2048-bit key are generated. + +# For each key, 20 random messages are PKCS#1 v1.5 encrypted with random seeds. + +# Example 1: A 1024-bit RSA key pair +# --------------------------------------------------- + + +# Public key +# ---------- + +# Modulus: +a8 b3 b2 84 af 8e b5 0b 38 70 34 a8 60 f1 46 c4 +91 9f 31 87 63 cd 6c 55 98 c8 ae 48 11 a1 e0 ab +c4 c7 e0 b0 82 d6 93 a5 e7 fc ed 67 5c f4 66 85 +12 77 2c 0c bc 64 a7 42 c6 c6 30 f5 33 c8 cc 72 +f6 2a e8 33 c4 0b f2 58 42 e9 84 bb 78 bd bf 97 +c0 10 7d 55 bd b6 62 f5 c4 e0 fa b9 84 5c b5 14 +8e f7 39 2d d3 aa ff 93 ae 1e 6b 66 7b b3 d4 24 +76 16 d4 f5 ba 10 d4 cf d2 26 de 88 d3 9f 16 fb + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +a8 b3 b2 84 af 8e b5 0b 38 70 34 a8 60 f1 46 c4 +91 9f 31 87 63 cd 6c 55 98 c8 ae 48 11 a1 e0 ab +c4 c7 e0 b0 82 d6 93 a5 e7 fc ed 67 5c f4 66 85 +12 77 2c 0c bc 64 a7 42 c6 c6 30 f5 33 c8 cc 72 +f6 2a e8 33 c4 0b f2 58 42 e9 84 bb 78 bd bf 97 +c0 10 7d 55 bd b6 62 f5 c4 e0 fa b9 84 5c b5 14 +8e f7 39 2d d3 aa ff 93 ae 1e 6b 66 7b b3 d4 24 +76 16 d4 f5 ba 10 d4 cf d2 26 de 88 d3 9f 16 fb + +# Public exponent: +01 00 01 + +# Exponent: +53 33 9c fd b7 9f c8 46 6a 65 5c 73 16 ac a8 5c +55 fd 8f 6d d8 98 fd af 11 95 17 ef 4f 52 e8 fd +8e 25 8d f9 3f ee 18 0f a0 e4 ab 29 69 3c d8 3b +15 2a 55 3d 4a c4 d1 81 2b 8b 9f a5 af 0e 7f 55 +fe 73 04 df 41 57 09 26 f3 31 1f 15 c4 d6 5a 73 +2c 48 31 16 ee 3d 3d 2d 0a f3 54 9a d9 bf 7c bf +b7 8a d8 84 f8 4d 5b eb 04 72 4d c7 36 9b 31 de +f3 7d 0c f5 39 e9 cf cd d3 de 65 37 29 ea d5 d1 + +# Prime 1: +d3 27 37 e7 26 7f fe 13 41 b2 d5 c0 d1 50 a8 1b +58 6f b3 13 2b ed 2f 8d 52 62 86 4a 9c b9 f3 0a +f3 8b e4 48 59 8d 41 3a 17 2e fb 80 2c 21 ac f1 +c1 1c 52 0c 2f 26 a4 71 dc ad 21 2e ac 7c a3 9d + +# Prime 2: +cc 88 53 d1 d5 4d a6 30 fa c0 04 f4 71 f2 81 c7 +b8 98 2d 82 24 a4 90 ed be b3 3d 3e 3d 5c c9 3c +47 65 70 3d 1d d7 91 64 2f 1f 11 6a 0d d8 52 be +24 19 b2 af 72 bf e9 a0 30 e8 60 b0 28 8b 5d 77 + +# Prime exponent 1: +0e 12 bf 17 18 e9 ce f5 59 9b a1 c3 88 2f e8 04 +6a 90 87 4e ef ce 8f 2c cc 20 e4 f2 74 1f b0 a3 +3a 38 48 ae c9 c9 30 5f be cb d2 d7 68 19 96 7d +46 71 ac c6 43 1e 40 37 96 8d b3 78 78 e6 95 c1 + +# Prime exponent 2: +95 29 7b 0f 95 a2 fa 67 d0 07 07 d6 09 df d4 fc +05 c8 9d af c2 ef 6d 6e a5 5b ec 77 1e a3 33 73 +4d 92 51 e7 90 82 ec da 86 6e fe f1 3c 45 9e 1a +63 13 86 b7 e3 54 c8 99 f5 f1 12 ca 85 d7 15 83 + +# Coefficient: +4f 45 6c 50 24 93 bd c0 ed 2a b7 56 a3 a6 ed 4d +67 35 2a 69 7d 42 16 e9 32 12 b1 27 a6 3d 54 11 +ce 6f a9 8d 5d be fd 73 26 3e 37 28 14 27 43 81 +81 66 ed 7d d6 36 87 dd 2a 8c a1 d2 f4 fb d8 e1 + +# PKCS#1 v1.5 encryption of 20 random messages with random seeds +# --------------------------------------------------------------------------- + +# PKCS#1 v1.5 Encryption Example 1.1 +# ---------------------------------- + +# Message: +66 28 19 4e 12 07 3d b0 3b a9 4c da 9e f9 53 23 +97 d5 0d ba 79 b9 87 00 4a fe fe 34 + +# Seed: +01 73 41 ae 38 75 d5 f8 71 01 f8 cc 4f a9 b9 bc +15 6b b0 46 28 fc cd b2 f4 f1 1e 90 5b d3 a1 55 +d3 76 f5 93 bd 73 04 21 08 74 eb a0 8a 5e 22 bc +cc b4 c9 d3 88 2a 93 a5 4d b0 22 f5 03 d1 63 38 +b6 b7 ce 16 dc 7f 4b bf 9a 96 b5 97 72 d6 60 6e +97 47 c7 64 9b f9 e0 83 db 98 18 84 a9 54 ab 3c +6f + +# Encryption: +50 b4 c1 41 36 bd 19 8c 2f 3c 3e d2 43 fc e0 36 +e1 68 d5 65 17 98 4a 26 3c d6 64 92 b8 08 04 f1 +69 d2 10 f2 b9 bd fb 48 b1 2f 9e a0 50 09 c7 7d +a2 57 cc 60 0c ce fe 3a 62 83 78 9d 8e a0 e6 07 +ac 58 e2 69 0e c4 eb c1 01 46 e8 cb aa 5e d4 d5 +cc e6 fe 7b 0f f9 ef c1 ea bb 56 4d bf 49 82 85 +f4 49 ee 61 dd 7b 42 ee 5b 58 92 cb 90 60 1f 30 +cd a0 7b f2 64 89 31 0b cd 23 b5 28 ce ab 3c 31 + +# PKCS#1 v1.5 Encryption Example 1.2 +# ---------------------------------- + +# Message: +75 0c 40 47 f5 47 e8 e4 14 11 85 65 23 29 8a c9 +ba e2 45 ef af 13 97 fb e5 6f 9d d5 + +# Seed: +ac 47 28 a8 42 8c 1e 52 24 71 a8 df 73 5a 8e 92 +92 af 0d 55 bc b7 3a 12 ac 32 c2 64 f3 88 1c 7c +8a 71 0f 70 fe b1 04 85 c8 37 0f 78 1f ff d0 21 +81 6f 05 87 39 76 6d a0 a9 c9 db 0e ae 7e 9a 25 +b6 c4 33 18 d0 ca ac 23 65 22 ca 31 0f 17 fc 52 +ad 42 29 c8 3a 24 e9 e5 45 eb 35 e9 82 6d 55 9f +57 + +# Encryption: +68 42 e5 e2 cc 00 41 d6 b0 c8 1a 56 2c 39 a6 17 +37 9a 51 5c ab 74 ab cb 26 19 c7 74 0a 54 1d 95 +55 dd 91 65 97 5b f8 a3 eb d0 d0 45 66 61 df b1 +a6 86 1b a2 33 22 69 93 0e 0d b5 14 fc a0 73 3e +eb 9c 40 57 13 eb 1f 9d 76 80 33 ed 29 3e 1e 08 +1a 12 5f 32 dd b9 ea 52 ed be 27 5c 4a f6 0f 8a +7b f8 32 bd 22 75 61 c2 08 dc 00 31 a8 4b 50 12 +c9 dd 9f 74 45 9d cb 07 0b db e1 3c fa 8c 2d 50 + +# PKCS#1 v1.5 Encryption Example 1.3 +# ---------------------------------- + +# Message: +d9 4a e0 83 2e 64 45 ce 42 33 1c b0 6d 53 1a 82 +b1 db 4b aa d3 0f 74 6d c9 16 df 24 d4 e3 c2 45 +1f ff 59 a6 42 3e b0 e1 d0 2d 4f e6 46 cf 69 9d +fd 81 8c 6e 97 b0 51 + +# Seed: +dd 2d 60 a5 e0 08 eb e1 d0 be 6f 60 db c4 3f 29 +62 ef 50 bf de 54 2b bb e9 8f ed d1 fe ac 05 7e +77 1c f1 5f c6 32 c8 db 27 2e 28 d2 9b 57 93 ea +6a b8 06 21 8c 53 82 39 b9 3a 93 5e 65 d2 44 16 +ec 6c 6e 99 ae 04 + +# Encryption: +70 9c 7d 2d 45 98 c9 60 65 b6 58 8d a2 f8 9f a8 +7f 06 2d 72 41 ef 65 95 89 8f 63 7a da 57 ea e9 +01 73 f0 fb 4b f6 a9 1e bd 96 50 69 07 c8 53 da +cf 20 84 94 be 94 d3 13 a0 41 85 d4 74 a9 07 41 +2e ff c3 e0 24 d0 7e 4d 09 aa 24 5f bc b1 30 21 +9b fa 5d e0 2d 4f 7e 2e c9 e6 2e 8a d3 2d ee 5f +f4 d8 e4 cf ec bc 50 33 a1 c2 c6 1c 52 33 ae 16 +19 2a 48 1d 00 75 bf c7 ce 02 82 12 cd 27 be be + +# PKCS#1 v1.5 Encryption Example 1.4 +# ---------------------------------- + +# Message: +52 e6 50 d9 8e 7f 2a 04 8b 4f 86 85 21 53 b9 7e +01 dd 31 6f 34 6a 19 f6 7a 85 + +# Seed: +26 29 a7 aa c0 c3 90 5e 83 1e b6 02 38 8c 54 5a +f5 54 b9 6b 2a e5 15 32 e9 cc db 89 72 ef 30 b6 +4a 2f 98 c6 95 29 7a 01 c5 81 2a 2c 40 15 82 f3 +7b 14 4a 3e 90 e5 9d 81 b6 90 39 c6 4b 84 4b 02 +8c 10 5c 8e 68 36 15 af b6 58 b6 c4 d9 f3 82 38 +a7 63 01 bb 14 44 91 13 b6 9d e1 26 04 5e 26 f1 +3e e6 d7 + +# Encryption: +54 dd b7 84 26 8e ad b3 95 5b d9 f9 49 88 42 59 +5a d2 9f f8 a6 67 fe b4 1f 6f 53 0c b6 0b c9 26 +ac 6c 71 c7 72 f8 03 d0 22 b4 1c a5 72 04 22 3b +27 ca 79 ec 5b 72 65 2c a9 af bf 40 dc 2f 6a 0e +13 bc d6 0d 37 f7 95 04 b0 ff cc 01 cf 53 42 d6 +d3 4a c6 f1 f2 f9 f2 f4 87 46 25 b9 fd bb 7d da +2e c8 7d f0 cf 87 25 97 98 df 86 a0 6b d5 ae f7 +35 4b 8c b1 cb 13 75 75 f4 cf bc 46 28 1b b3 31 + +# PKCS#1 v1.5 Encryption Example 1.5 +# ---------------------------------- + +# Message: +8d a8 9f d9 e5 f9 74 a2 9f ef fb 46 2b 49 18 0f +6c f9 e8 02 + +# Seed: +c3 ca 84 60 0f 35 c8 65 5f c7 c6 4c 75 c5 87 38 +53 d3 aa 8a 94 26 a5 1b 63 d7 e7 5d cf 6c ae 97 +a4 25 3f ba 87 1d 6f 96 89 97 19 9b f0 1b 6a 4d +34 28 ce 4c 96 d1 c4 87 b2 83 0c b9 e3 5d 64 05 +56 23 69 9a b4 97 9a 02 58 4b 92 e6 ba 39 e7 57 +28 40 79 ab f1 33 a7 da 54 e5 42 52 17 a2 10 f6 +7c 18 26 9b 51 1f 61 f8 c5 + +# Encryption: +a8 55 48 01 3b d0 e2 0e e0 eb d3 6f b7 48 97 7f +98 58 46 d7 61 0e ed 24 c3 6c d8 30 33 dd 2a a4 +58 0b d1 53 35 20 9d cf 78 2e e2 6c 48 c3 06 44 +b0 b5 cc 86 c8 cd 16 5a e2 1e ad f5 78 04 18 67 +76 07 03 18 75 e2 21 ec df 3b 10 57 31 6f 3f 12 +a4 7d 5d a4 0c 41 53 9b 63 64 30 da 2e 54 21 90 +11 9e 42 9c 53 c2 22 6f 95 9b 19 cc f4 8a 3d 24 +02 17 c4 de 70 d7 07 2a 7e 0d 95 b6 16 d1 15 a8 + +# PKCS#1 v1.5 Encryption Example 1.6 +# ---------------------------------- + +# Message: +26 52 10 50 84 42 71 + +# Seed: +3c 6a 04 71 da f0 0b 7c 2e fc 9e e8 80 41 65 4f +87 62 90 07 c1 24 32 22 11 a5 f4 ea 3c 58 23 85 +7b c8 fc 7e 21 c9 45 48 b0 ee bd cf f7 91 60 e1 +12 46 1e 40 50 91 10 cf dc 4f 0f 13 c7 fb 92 1a +ba c8 df aa c2 1a cb 0f 7b 8a 13 a4 b5 cc a5 23 +d5 c7 dd f7 05 23 eb 57 0c 59 b6 c7 ae 97 67 e4 +ec 9a 63 d1 13 6d 10 23 1b 40 1e 20 e7 41 02 84 +83 48 01 7a 16 16 + +# Encryption: +5e 51 43 63 28 7d e9 b3 80 04 8c c4 43 5d 53 29 +4a d5 94 1c 55 1a 97 e1 3c 16 dc 13 98 de 61 0d +c7 33 7b c6 bd e5 78 e9 e9 f5 6a f1 44 54 f2 e8 +31 be ef 32 31 a8 50 68 e8 fe f7 2c 89 e1 df 1c +99 43 0a 60 f6 d9 42 89 cf ba 87 b2 b4 32 a4 0b +88 db 61 da e0 88 f9 ed 4e 28 4a 21 63 af 65 bf +2b 43 55 9a 5d a2 ae c5 bb 8f 43 f9 2c 1b 04 a5 +14 6a 65 b6 e0 19 b4 cd d2 94 0c 35 d9 64 5b 2d + +# PKCS#1 v1.5 Encryption Example 1.7 +# ---------------------------------- + +# Message: +8a 84 7d d9 e2 + +# Seed: +a1 3d ff 8a 48 e8 04 94 ae 66 e6 ba 9f 17 9a 01 +0d 9e 6d 40 31 87 96 7f 99 fd d9 0e f9 0e 0a 94 +07 3f f0 e4 d0 e6 66 4f f3 73 b5 09 95 3e 04 ef +77 83 be 0f b4 6c 8a 9f c0 ed 8c 1f 33 cb 4d 0d +2f 1d 0d 5c db a1 4d ca 50 8c a1 d7 3d 20 80 18 +63 9b c8 e1 65 86 23 de 1e 5b a3 f0 5e d0 91 4d +2f 96 90 2f 25 20 33 2d 84 92 d3 73 4a cd eb bd +f4 3e 50 a4 3e 7a a8 72 + +# Encryption: +82 7a 67 e8 15 78 1c 4d 4e 2b 2e 16 9d 80 ca e9 +36 68 72 a7 92 af bf 3c 0c d5 1c e2 8c 70 e8 6d +41 eb b9 75 2f 3f 92 db a5 1a db b6 85 1b 1f 78 +45 61 a8 f1 97 20 8f de 02 97 0b 38 f2 a9 74 22 +ec 7f 4f c8 a1 06 75 a9 db de 10 9e ed 0c e0 65 +27 70 3e e0 5b 65 7d 34 08 f7 fd db 1e ec cf fa +e1 6b 1d a1 07 30 7a 2c f2 56 fa 60 e8 15 21 72 +de 9f 95 27 fe 92 0a 90 1d 93 c4 f4 d5 7e 54 6e + +# PKCS#1 v1.5 Encryption Example 1.8 +# ---------------------------------- + +# Message: +37 32 36 b7 20 2d 39 b2 ee 30 cf b4 6d b0 95 11 +f6 f3 07 cc 61 cc 21 60 6c 18 a7 5b 8a 62 f8 22 +df 03 1b a0 e0 e8 2d d2 f3 e5 d3 1e 4e a2 57 b1 +5b + +# Seed: +21 99 74 a0 87 f0 a2 81 93 e6 49 a0 4a e9 d8 4c +f2 c8 a9 a4 6c df d8 f1 ac 62 c7 e0 f2 0f 4e 27 +03 0c 72 b2 0a 5d b7 25 b4 a8 68 3d f5 55 6e e7 +94 7f a0 a7 66 1b 6d 99 dc b7 9e 49 4f 46 73 f0 +73 a0 41 dd 90 7c 87 32 4e 86 25 dd + +# Encryption: +1a 6d f5 75 99 84 f2 c4 11 93 55 c5 db 35 c8 a4 +78 16 4d 5e 5e e7 7b 49 91 f1 04 ba 91 b9 87 0f +15 91 be 1f 19 f5 5a 80 51 a6 2c 0e 59 49 3d f6 +f0 0f e5 0e f7 3a 6c f0 c4 35 41 f5 32 0d ab 7b +2f c6 7c 93 22 5c cc d6 d5 03 47 aa 96 9a d8 7b +d3 d8 20 81 45 4f ea d8 10 dc 1a b8 c2 17 81 f7 +61 2e 64 06 72 9b 32 2e 04 b1 62 4f 85 38 98 56 +59 ae 34 d9 93 1e 01 9f 76 2c 79 7d 5c bf a3 2d + +# PKCS#1 v1.5 Encryption Example 1.9 +# ---------------------------------- + +# Message: +97 e0 b6 36 bf dd b8 e1 c8 a9 cf 5b 30 5c ef 3a +8f 47 f9 a8 b3 34 4f 13 55 fa 3d ba b6 7b b9 72 +10 + +# Seed: +c1 f8 9b cd c5 60 40 d5 e6 63 b7 4b fd e2 39 7b +58 46 08 cd f3 2d 5a 58 44 72 4a c7 e5 98 a8 6e +f7 11 4b 1b e0 87 30 cb 10 f6 61 fb fb 86 09 f7 +c6 c3 74 42 a1 b1 1e 04 a6 11 ff 8c a5 ce 9a fc +1e b3 aa a9 2c 9f 28 ba e2 20 44 05 78 99 02 26 +07 83 78 c4 93 41 13 74 c5 3e 3d dc + +# Encryption: +87 3c c4 dc a4 27 97 2b 63 c6 cc 8a c1 1c cc 33 +c9 59 f7 fc fe 4b 45 bb d4 7b 29 d9 c9 88 c0 1a +96 bc 1e ae 0e f9 b1 94 8d ce 2c c9 f0 aa 91 7e +86 a6 c1 1f 8d a3 da 29 df 90 59 01 f1 91 8a 76 +16 8d e1 17 5e 27 35 12 8c 09 72 99 d6 6e a5 cc +f9 b9 5b 36 92 ee bf c6 ea 11 bc 37 09 1b 79 5f +18 80 3d 70 e7 95 58 e1 25 16 23 0f ed 55 15 e5 +1b 45 ae 86 ce fe 47 b9 37 90 e4 99 4d c4 1e 05 + +# PKCS#1 v1.5 Encryption Example 1.10 +# ---------------------------------- + +# Message: +82 b5 07 5b fc 88 f4 00 65 76 aa 80 a0 00 7a 74 +51 18 4d 4f 76 0c f9 24 28 04 22 2b 0e 07 26 f5 +55 03 0e 4e 6b 01 f7 93 b0 97 01 81 27 82 4a 3e +40 24 57 d8 49 5f c0 + +# Seed: +d5 5e 3d 48 97 e9 d8 65 01 4c b1 5d 3e e3 f9 fb +d2 9c 92 e5 c2 37 dc ae 46 67 2a 46 3e aa a4 f7 +dd 09 86 1e 94 6a c6 5b 85 62 50 63 93 b8 51 92 +ad 41 fb 0c 48 c8 c0 52 98 1b dd cd 5f 1f c8 b1 +39 cd 47 ca cf fc + +# Encryption: +2e 83 c3 d2 88 01 5a 5f 50 3d 3e 5d e7 d2 ad 91 +06 54 5e f9 7d 63 e4 d0 6a 5a 0d 9d bc 29 f6 ba +fb 93 a5 17 3f a5 06 3a 69 39 db a6 c7 a4 28 c3 +5e 7d be 6a 95 93 fe 5e c4 c1 98 78 89 3f 31 37 +09 c8 76 02 72 6c b3 25 5b e7 5a dc 7f 2f 27 e6 +db 91 c3 a3 43 ea ff 1c 28 d9 d5 f7 cb 65 74 e6 +31 06 90 03 cd cf a0 77 43 a7 34 0d 58 83 9e 70 +8b f3 6a f6 34 2d b8 df a4 1f ea da fc 69 53 ac + +# PKCS#1 v1.5 Encryption Example 1.11 +# ---------------------------------- + +# Message: +36 48 c3 6f 85 1f 52 f2 32 87 79 09 19 85 a3 c8 +12 e1 8a 70 55 d0 90 bb f0 32 4c 13 79 3b b8 22 +1a 57 + +# Seed: +c1 27 71 85 c3 59 55 ca ed fd f9 de 55 d5 d9 5a +39 8d 58 f5 f3 33 19 1f c0 29 45 ef df ad fb 6d +b0 5e e2 a2 d3 41 83 ed f8 9a 1a 4d cc c4 65 91 +b3 53 2b a7 03 93 62 c7 5d f1 94 ec 10 64 48 af +b7 f6 bf b2 80 7e 38 3e 15 99 54 25 5e 82 7c b9 +da dc 8d 9b 7e 68 a1 aa 09 76 35 + +# Encryption: +88 62 f1 97 3f ef e0 af 02 d9 6c c4 58 33 4d ed +6c 02 d8 d7 ea f5 93 77 9c 5d 38 6c 4e 49 f7 68 +f1 30 b4 87 b3 c9 1e 32 3a 47 7e 4c 11 0a 33 41 +ff 46 ee e3 7c 77 3e 5c 0a c8 39 bc 55 cc 0c 07 +0c ac 01 cd 45 18 3c fe e6 b8 8b fb 82 36 1d 35 +60 19 7c de ab 42 e5 c7 55 d2 37 97 1a 88 da f6 +10 cb 39 52 61 4b 36 40 56 cd 49 14 20 ef fe 3a +0b 8c e3 1f 2e 3e 49 ca d6 f3 b0 64 0f 44 91 de + +# PKCS#1 v1.5 Encryption Example 1.12 +# ---------------------------------- + +# Message: +94 f7 8c f4 5c 53 fc 46 e7 eb 1b 26 61 8a 29 e9 +48 50 12 c1 + +# Seed: +e6 de 9e 9b 90 22 a5 5f 56 12 1d 5a c0 0a a6 df +29 9c 8a 36 94 22 e7 54 29 56 b6 da 2e 0d cd ee +96 8d b0 7d 99 5a 7b b8 76 f7 f8 cd 66 b2 f5 42 +c0 53 08 f7 49 83 a3 f8 36 0c 6b 89 47 f8 7d 60 +8b 03 1a 2c 68 dd e1 47 1a e4 96 ae 9b 16 e2 a8 +11 81 eb 6f c2 f6 5b aa ad da 64 22 a9 34 31 f6 +f3 b0 7b 5b 46 a3 cf 89 48 + +# Encryption: +3c 6d 3b 43 d2 3a db 79 d6 97 23 38 08 b0 74 48 +76 97 f3 35 fd 99 cd e8 65 41 1f b1 82 28 92 56 +1f dc 24 a8 b8 bb 2c 4f 65 3c 4d 15 6c 77 a7 5d +e3 16 00 b5 70 9e 8d 50 6e 98 e1 d3 73 cb da 01 +f4 d9 fe b0 29 71 98 ca d0 ca 2a 7e 3b 1e 63 90 +3b 10 43 ce 79 49 4c 57 54 f7 f9 0f c1 f0 73 a6 +19 92 9e f1 26 39 4b 06 24 f3 b8 ba 6d 56 45 e9 +90 e7 c0 13 2c e2 12 31 46 fd 9c ad f7 45 ec 61 + +# PKCS#1 v1.5 Encryption Example 1.13 +# ---------------------------------- + +# Message: +77 9d 1e b8 4f a2 84 c3 7d 29 d5 e1 79 d0 03 06 +b4 13 c4 4a 80 0a 07 7e 59 85 3f 63 05 f9 2e 59 +fb 7f 81 + +# Seed: +c3 e6 d1 8b da 97 78 2c a7 81 fa 76 d9 7a 6c 94 +d8 54 d1 41 99 b4 ea 7d 82 c5 bc bb e6 cd aa b5 +25 57 47 44 3c 59 bf 8c 77 ec da a6 4a e7 ce 61 +e2 c7 30 01 32 b7 54 e9 16 2f 7c de 75 8f 48 0a +e5 88 cf d4 4a 94 6d 64 e2 72 0a 2d 17 52 55 45 +22 04 84 83 81 18 ad 6e 6b 54 + +# Encryption: +72 2c a9 25 66 c7 3c c8 5d 19 ce 3f aa 14 cb 2e +79 84 9f 20 50 92 d1 58 92 82 31 3c 04 27 f0 67 +79 8a fa e3 e3 f0 a5 61 f3 99 34 6e 9d 10 7d a0 +4a f4 4b 0c 6f 04 4a de fe 09 7a 0c d1 4a 47 a9 +9c d9 81 9a 98 41 37 06 30 7c bd 0d a0 16 97 46 +9e ff 71 d3 14 41 63 94 93 fb ed 8e ee 1b a3 9f +dd 07 fc 0e a0 82 30 18 61 79 f9 0e 7e f1 3c 61 +ee 56 f1 67 fc 2f 6b 15 79 3e 1a 32 24 ff a2 9e + +# PKCS#1 v1.5 Encryption Example 1.14 +# ---------------------------------- + +# Message: +88 + +# Seed: +c0 16 9d 76 e4 ea 45 45 41 0d df 66 46 c1 ba 7d +d2 72 d7 c3 49 8b a6 b0 80 4b 42 61 30 a8 0f bf +ff 4b b7 b5 f5 59 b0 a9 09 0e 4a d9 b9 f4 16 a6 +df dc 15 01 b1 ba 46 87 7b 1a 96 fa 84 91 dc fd +de 50 eb ee d2 4d 3f 98 96 24 13 34 6e d4 a3 39 +3e 23 5b 77 bc 1e d6 74 68 ec e2 79 2a 2f d3 a8 +34 8f c5 50 9b 59 06 f2 88 56 15 df 8c 14 61 37 +7a 74 1d 59 52 fb 36 ea c0 20 1e 27 + +# Encryption: +4e d7 d1 29 1a 03 36 65 4d 5c a2 b1 f9 d2 0c b2 +da 72 26 f7 11 6b 93 09 88 43 9b 44 63 98 11 04 +bd 63 c2 ce 2b 77 d6 26 b3 10 9c 93 14 03 ac 5b +49 b4 24 7c 4f 69 67 b8 c0 db 06 3c 99 95 af 9d +36 54 06 50 93 8b 01 f9 39 06 f9 83 89 07 ed 59 +36 ab b3 43 b0 e2 55 09 a1 d2 d4 c5 c8 b9 58 06 +50 da 2c e1 1f a3 cf 3e 64 07 23 ea cb ee 87 fa +d3 ee 35 95 8b 45 07 5d f7 81 c4 13 46 6a f1 39 + +# PKCS#1 v1.5 Encryption Example 1.15 +# ---------------------------------- + +# Message: +a2 dc 08 77 78 d5 43 40 8e 89 73 f1 36 31 59 ed +b8 f0 78 3c 45 70 89 07 2d ce 66 d3 10 2b b4 fa +e6 0a a6 0e 41 93 3c 48 a1 be 39 53 ec 2f 80 4c +0c c9 6c + +# Seed: +18 11 20 14 06 53 29 d0 4b fb 0c f5 44 dd 38 d7 +be f1 54 9b 4a 49 a1 67 76 dd a7 4d 0a 7e dc 49 +67 b4 24 0c 37 14 2f a3 f6 63 9c 26 96 cd 7d 4b +18 a1 1e 2f b5 40 81 f2 de 5b d7 bd 15 cd da 92 +c9 4c 3a 47 18 7b 5f f4 3b 53 + +# Encryption: +71 15 19 0a 21 04 88 f0 4f a0 c0 0c 93 a4 68 a8 +03 0b 7b 9f c1 00 20 d8 31 0b cb 01 a5 c8 dd a1 +d0 6c e2 41 dc 77 5b 43 e6 f1 3b 19 ab fc bf 36 +16 e8 4f 10 7c 9e d8 0d 1b 86 bf 87 c9 8c 2b 62 +9f fa da a6 ec 01 f4 e6 75 55 8e f5 26 06 ea f1 +26 06 8f a7 53 4d d1 3b 92 0d 23 81 69 5a d7 75 +ff f0 bb 7c ec 46 90 90 1d 6f 1e 17 36 b8 2c fe +3a 0c 22 4d 18 f1 29 15 fd c9 5c 18 39 7c 35 70 + +# PKCS#1 v1.5 Encryption Example 1.16 +# ---------------------------------- + +# Message: +11 0b f2 b1 d0 dd 81 2f 2a 5a 21 f3 40 4f a2 f2 +c4 54 c4 43 2f df a7 0f 1b 0f 23 ec 69 c1 02 37 +73 a7 3a ba + +# Seed: +17 b8 5f 76 53 ff 0e f5 de 7f 25 69 6c d4 90 23 +ad 8e ac 94 8a 83 e2 24 58 ec d5 d1 0a 43 86 6d +c7 91 55 5e 64 f0 78 c3 8c 75 2b 6e 9c 6e ee b3 +39 ee c9 10 16 d2 58 88 6d 01 27 75 ad 64 36 02 +a0 f0 d1 79 34 54 a0 60 94 71 16 22 88 22 39 50 +82 6e d8 e2 02 5d a9 a4 e9 + +# Encryption: +5d 0f 2f d8 5e 6f 9d 9e 43 2f ad 86 0f dc 49 96 +96 24 ff 4f a0 71 5d 36 1e 9f 00 b0 5b 3a a0 ba +9e b2 7b ae 61 0e fd e1 14 3c bc 93 3b 52 de a7 +01 87 60 bb 25 1b e0 e1 e3 0c d1 c5 99 1a ef 74 +4d b8 2f 16 6b 90 63 ef b7 e3 38 40 a2 56 90 05 +65 4b 14 0e 11 5f a5 6c 30 40 6e 45 65 6e 81 99 +af 39 4f 63 86 34 6d 5f 1a 30 0b 95 ba 48 fc 08 +73 d6 18 d6 92 bb 02 5b f1 5e 9d 23 2c 64 1a da + +# PKCS#1 v1.5 Encryption Example 1.17 +# ---------------------------------- + +# Message: +d9 d9 37 13 1f f1 94 0a 86 bf 71 39 b4 81 14 36 +41 95 b4 00 52 22 a8 bb bc 26 1a 7f 2e 21 2b 8d +d0 35 e5 3f 91 44 f5 61 0b 4c ec 32 ea 01 bd a9 +d3 c8 0c f2 94 64 f8 0f 5f 56 56 c8 + +# Seed: +33 05 e1 da 60 e5 86 73 fc 46 cd 33 be 2a 66 d3 +a1 02 c3 db 16 1e f4 8c 0d 60 ef 25 03 1b 40 14 +16 78 26 24 6a a5 28 a3 a3 e5 b0 ab 95 07 8d 84 +01 d9 29 03 59 5a fc 1a a8 54 e6 04 4e 5e b5 f5 +be + +# Encryption: +0e 12 16 74 89 f0 ba ef ca d6 39 34 bc 15 9f 1b +bd 9e 9b 28 7e 50 0f 49 09 23 c1 6a 85 56 4a 1d +a6 36 59 37 5f 22 af 7b a4 97 98 e1 57 8c f3 15 +fa e3 e9 ed 56 99 c6 91 e3 c1 d0 bb 46 da 49 2d +01 34 9e 93 29 59 3d 43 81 d0 74 a0 a5 31 df 92 +1b 31 31 6f 7e 2b 4f e9 15 34 72 83 24 23 35 f0 +b0 b2 31 92 c7 21 02 f2 c6 36 24 b1 e7 89 65 45 +0e 82 30 d4 87 7e 46 17 b0 3d 44 83 13 98 dd bf + +# PKCS#1 v1.5 Encryption Example 1.18 +# ---------------------------------- + +# Message: +81 b3 4a eb 8a fb 8a 3f + +# Seed: +02 f7 48 34 2d 01 0f b5 6a 6f 69 f2 1f 8c 6a 63 +16 79 c8 c4 b8 f6 fe b5 25 cf 8e 72 fd a8 ef 8d +f6 62 31 28 c0 fe 74 bc 59 0c aa 34 f1 ee d1 ad +2d 61 42 dc c5 bc ae 84 ef 31 37 62 f2 e4 e7 03 +03 d2 09 c8 d9 57 7a 7c 84 3d 2b 91 72 ed 4e fe +2a d6 29 61 4b 99 a9 1a 4c c8 32 5b a3 24 11 6e +cf 0c 5e 29 09 49 38 ae 49 89 84 f4 f4 cb b1 62 +38 86 e0 39 73 + +# Encryption: +43 b2 76 c7 d3 68 ea 21 c6 80 71 16 cd e8 60 82 +98 f2 40 02 07 2d 77 6e 56 e6 2c 35 72 bf b9 9d +a4 c5 6e 93 8a 47 dc 07 5f a1 ff 7a 61 8f b5 fa +ed 3e e3 7b 91 df c3 91 53 49 5a eb a9 df 6d 45 +df 94 b0 e8 a8 ad 2d b3 7a 9f e4 6d 0f df 15 42 +31 fd 6f 32 21 47 4e 8f 5c 19 1f db 85 38 e1 a6 +03 e5 98 97 e1 50 fa f9 5b 65 da 14 06 67 ed b1 +98 09 eb 4a 16 ac d0 1e cc 60 4b da 57 f2 0e f2 + +# PKCS#1 v1.5 Encryption Example 1.19 +# ---------------------------------- + +# Message: +7b f9 fa d8 89 de 73 ed 87 3d + +# Seed: +fa 5d ad 45 a4 bb 5e 74 c4 cf 2e 21 3e d4 0a a9 +61 75 98 d1 1d 49 ae 1c 32 d7 94 e0 9c d0 e5 c7 +aa ae 81 b9 55 4d de 31 08 d6 0a 9a 82 f4 2c c6 +c2 a6 89 f4 60 ff 1d 53 ad 85 bf 83 83 11 e7 58 +9e 19 67 95 7b 51 56 7a a0 d3 3a fa 37 52 cd e6 +c5 66 1d 4f 27 ae d3 df 52 90 5f 1c f2 25 33 04 +61 8e 07 86 04 1e 70 b4 dc ba c8 c1 08 ba 34 ac +39 39 f4 + +# Encryption: +61 c2 55 0e 0b 36 a6 79 7f f8 64 93 80 1b 11 46 +d8 90 59 49 83 52 e4 c2 62 27 5b 14 04 b1 33 15 +e9 56 bb 3d 31 21 85 b5 21 b3 c7 08 e9 d9 54 02 +17 19 a0 59 d9 84 72 4c 53 c0 4f 5a d2 74 be f9 +ff 0a 79 50 b2 fd ec c5 29 0c d5 f3 bc 26 52 4c +d1 34 20 48 18 4b 0e 2c df 94 06 a4 53 a2 ef 9f +3b b2 3c 4e 7c 1c 8b 29 52 a0 20 2b cc 23 82 47 +ea 32 7b 8c 07 00 c8 00 3f d6 34 ec 1e d9 bf 30 + +# PKCS#1 v1.5 Encryption Example 1.20 +# ---------------------------------- + +# Message: +b6 a3 50 9b b3 b9 b0 b5 7c d5 8d e4 09 d9 53 20 +1a 04 2f 94 92 dc 1d 7e 34 a7 d0 94 1a 1a 1b + +# Seed: +3a 9e 15 06 57 86 b3 e0 1d 82 6b 86 2a 8f 70 2b +5c ac 8c 16 62 ee 7d 15 ff 32 3c df e7 1e bf 4a +d1 b1 f3 a6 bc bd d4 b0 01 08 77 ec ac 09 1f 61 +59 08 e2 be 40 0b b0 c4 98 e3 55 d5 71 fd 10 89 +5b 8e e9 c3 a9 c3 1e 4b 11 03 89 c3 d5 c4 6e bf +76 b3 b3 5a d1 f4 79 1b 6d 20 97 f1 09 f2 + +# Encryption: +6b 4b 6d 7b ab fe 4d 64 17 ac ad fb 78 57 2e 7c +87 e3 fe 1b d5 8e ef b0 d4 b1 27 9c 7b 7c 83 26 +a6 8b b2 87 95 e0 9f 9b 1c e2 e2 4a 53 9f 4b 0d +93 b2 92 74 ce cf 7c d9 f0 b7 32 ae be da 91 11 +bd fe 25 e2 68 a8 8e 34 22 e2 9b 52 bd 4b 7a 05 +47 db 8f e1 2a 6f cf 1a 3c 06 a0 02 bf 87 0a 2f +ab b7 c4 57 e4 bb ce 3e 31 6f 72 32 44 9f 87 a9 +d7 02 b1 2d 19 bd e7 f9 59 0f 94 67 b0 6b d5 8a + +# ============================================= + +# Example 2: A 1024-bit RSA key pair +# --------------------------------------------------- + + +# Public key +# ---------- + +# Modulus: +98 b7 05 82 ca 80 8f d1 d3 50 95 62 a0 ef 30 5a +f6 d9 87 54 43 b3 5b df 24 d5 36 35 3e 3f 12 28 +dc d1 2a 78 56 83 56 c6 ff 32 3a bf 72 ac 1c db +fe 71 2f b4 9f e5 94 a5 a2 17 5d 48 b6 73 25 38 +d8 df 37 cb 97 0b e4 a5 b5 62 c3 f2 98 db 9d df +75 60 78 77 91 8c ce d1 d0 d1 f3 77 33 8c 0d 3d +32 07 79 7e 86 2c 65 d1 14 39 e5 88 17 75 27 a7 +de d9 19 71 ad cf 91 e2 e8 34 e3 7f 05 a7 36 55 + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +98 b7 05 82 ca 80 8f d1 d3 50 95 62 a0 ef 30 5a +f6 d9 87 54 43 b3 5b df 24 d5 36 35 3e 3f 12 28 +dc d1 2a 78 56 83 56 c6 ff 32 3a bf 72 ac 1c db +fe 71 2f b4 9f e5 94 a5 a2 17 5d 48 b6 73 25 38 +d8 df 37 cb 97 0b e4 a5 b5 62 c3 f2 98 db 9d df +75 60 78 77 91 8c ce d1 d0 d1 f3 77 33 8c 0d 3d +32 07 79 7e 86 2c 65 d1 14 39 e5 88 17 75 27 a7 +de d9 19 71 ad cf 91 e2 e8 34 e3 7f 05 a7 36 55 + +# Public exponent: +01 00 01 + +# Exponent: +06 14 a7 86 05 2d 28 4c d9 06 a8 e4 13 f7 62 2c +05 0f 35 49 c0 26 58 9e a2 77 50 e0 be d9 41 0e +5a 78 83 a1 e6 03 f5 c5 17 ad 36 d4 9f aa c5 bd +66 bc b8 03 0f a8 d3 09 e3 51 dd d7 82 d8 43 df +97 56 80 ae 73 ee a9 aa b2 89 b7 57 20 5d ad b8 +fd fb 98 9e c8 db 8e 70 95 f5 1f 24 52 9f 56 37 +aa 66 93 31 e2 56 9f 8b 85 4a be ce c9 9a a2 64 +c3 da 7c c6 86 6f 0c 0e 1f b8 46 98 48 58 1c 73 + +# Prime 1: +cb 61 a8 8c 8c 30 5a d9 a8 fb ec 2b a4 c8 6c cc +c2 02 80 24 aa 16 90 c2 9b c8 26 4d 2f eb e8 7e +4f 86 e9 12 ef 0f 5c 18 53 d7 1c bc 9b 14 ba ed +3c 37 ce f6 c7 a3 59 8b 6f be 06 48 10 90 5b 57 + +# Prime 2: +c0 39 9f 0b 93 80 fa ba 38 ff 80 d2 ff f6 ed e7 +9c fd ab f6 58 97 20 77 a5 e2 b2 95 69 3e a5 10 +72 26 8b 91 74 6e ea 9b e0 4a d6 61 00 eb ed 73 +3d b4 cd 01 47 a1 8d 6d e8 c0 cd 8f bf 24 9c 33 + +# Prime exponent 1: +94 4c 3a 65 79 57 4c f7 87 33 62 ab 14 35 9c b7 +d5 03 93 c2 a8 4f 59 f0 bd 3c bd 48 ed 17 7c 68 +95 be 8e b6 e2 9f f5 8c 3b 9e 0f f3 2a b5 7b f3 +be 44 07 62 84 81 84 aa 9a a9 19 d5 74 56 7e 73 + +# Prime exponent 2: +45 eb ef d5 87 27 30 8c d2 b4 e6 08 5a 81 58 d2 +9a 41 8f ee c1 14 e0 03 85 bc eb 96 fb bc 84 d0 +71 a5 61 b9 5c 30 08 79 00 e2 58 0e db 05 f6 ce +a7 90 7f cd ca 5f 92 91 7b 4b be ba 5e 1e 14 0f + +# Coefficient: +c5 24 68 c8 fd 15 e5 da 2f 6c 8e ba 4e 97 ba eb +e9 95 b6 7a 1a 7a d7 19 dd 9f ff 36 6b 18 4d 5a +b4 55 07 59 09 29 20 44 ec b3 45 cf 2c dd 26 22 +8e 21 f8 51 83 25 5f 4a 9e 69 f4 c7 15 2e bb 0f + +# PKCS#1 v1.5 encryption of 20 random messages with random seeds +# --------------------------------------------------------------------------- + +# PKCS#1 v1.5 Encryption Example 2.1 +# ---------------------------------- + +# Message: +e9 a7 71 e0 a6 5f 28 70 8e 83 d5 e6 cc 89 8a 41 +d7 + +# Seed: +16 8e 3e b5 80 9b 08 70 e1 f2 48 7e 1b e7 7a 17 +6b 34 71 6d e1 41 ba 4c 90 59 da 90 e5 e5 1a 36 +94 e8 58 fe d1 0b 92 6c 02 52 39 80 a8 90 9d a9 +96 c6 43 33 ea 67 67 87 bc e6 77 f1 1f da 77 db +b1 a9 51 6e dd a9 b1 29 4f c2 e4 50 52 22 88 e9 +30 be 7f a7 29 b2 50 e3 aa c5 20 51 1e 95 16 aa +86 3a f6 bc 07 5c bd bf f4 30 46 70 + +# Encryption: +71 c2 b8 fb 38 19 f1 34 c2 24 7c 6b ab b4 cf be +17 d7 b2 64 3f 87 ac e5 c5 71 27 7b e1 90 8e f3 +a5 28 8e 34 38 4e 46 0a 70 38 6e 7e a1 d1 9d 3d +ca 1c e1 5b a9 32 39 a8 cd da 18 e3 17 fe 07 96 +80 ce 7e 6a c6 d9 bd af 86 cb 9a eb f1 cf 46 cd +10 ef 6a 68 8b 0c b2 ce 76 5d d0 b3 25 20 42 39 +66 ee e1 aa 05 c6 c2 8c 6f 35 24 fb 68 6b 5f b1 +58 53 65 9e 58 3a c4 37 21 9d ef 8e dc 58 be 2d + +# PKCS#1 v1.5 Encryption Example 2.2 +# ---------------------------------- + +# Message: +66 4b f0 5d 61 2b af 61 52 4c 60 8e da 36 fc 6e +a2 c9 3c 14 31 53 22 1b cf d6 ba 0c fb bd 6b 64 +14 47 e4 78 8b 0a 46 2c b5 b3 f9 fa fc 9a 75 + +# Seed: +e7 f0 a2 79 18 ca d9 15 da 28 11 36 59 ff b5 df +a0 b5 1b 24 d5 a7 1c 20 27 f8 e4 d9 40 9e 8c 64 +72 f0 c5 4b 5c 08 85 8d a6 3d 4b 81 72 b0 7d cf +8c 5a 7e 8f 9e 90 f0 17 c2 4b 44 d1 6b 67 0b dc +96 03 0c 83 53 a2 83 9b a4 c0 75 d2 4c 20 + +# Encryption: +06 86 90 18 13 db 05 3a c7 08 e3 fc ec 6b ae 03 +60 08 8f d3 44 e9 d7 ea 11 8b b3 f5 37 53 14 25 +1e 60 67 37 f5 82 4b 36 28 f6 65 03 48 f6 ab 55 +3b 27 7d a0 15 44 d0 56 73 ba ed f4 55 cc 03 32 +f6 13 f6 54 78 fc fe 06 67 34 c4 65 58 bc 23 3b +4b 6f 52 41 e4 f4 ac 53 fc 18 c5 53 84 c8 fd 96 +18 3f 0b b5 51 5e 89 31 14 f9 c6 1c cc 11 fc 19 +83 de 74 46 92 64 db db b0 c7 49 17 4e cd fb e3 + +# PKCS#1 v1.5 Encryption Example 2.3 +# ---------------------------------- + +# Message: +5e 76 e6 6e d5 75 41 fc 23 d3 59 f4 ad bf 3f 56 +82 01 d3 c6 f0 e0 26 aa a5 67 63 56 cc 98 66 f1 +75 5d e9 8c b3 9f 23 6d af a9 e6 bc 79 4b 74 43 +b5 3a 2d 85 + +# Seed: +5c 65 68 b6 e3 3b c1 3a d2 dc d6 01 2d 17 da 81 +b1 3d bd 62 aa e4 0a 64 af 97 e2 19 e7 5d c1 81 +12 60 77 d1 20 dd a1 9d 63 12 cf 1e 98 71 c1 15 +f0 86 7f e6 62 d7 8a 40 31 97 6b dd ef 68 f5 2b +68 99 58 67 cd 80 95 05 dd + +# Encryption: +19 e7 99 66 ff 1f bc 10 07 3d e7 3d f3 a5 31 63 +78 74 e4 7d f6 39 25 6c 51 d0 bb a9 35 61 0b 46 +34 f9 e5 b4 68 9b d9 21 73 5b 32 23 6e fc c6 e7 +cc 49 a9 e0 6a 25 ac 96 59 b7 fe 82 9c b3 e8 b0 +1f 10 31 79 42 23 65 74 1b 76 c8 34 21 49 ce dc +76 eb 0a d0 18 ed 42 35 fb d5 24 fd 87 c9 54 9a +b3 3f f2 3e e4 f8 20 0e fa 33 02 7e 9d ee c6 0f +ac 01 3d 1e 56 e6 e3 33 d4 93 a4 a9 46 0f e5 8a + +# PKCS#1 v1.5 Encryption Example 2.4 +# ---------------------------------- + +# Message: +5b 19 50 48 eb 90 eb 47 93 + +# Seed: +bb bd 49 55 0e d1 ea 1b 6b c7 20 6c e0 b0 03 a6 +32 a5 2b 0b ac 5f 32 71 0b 39 fa 64 b3 55 6a d6 +f6 c8 2b d9 d5 31 b3 07 46 9e 86 3f 54 b5 fe 21 +83 05 69 54 f2 a9 67 e4 dc 2b 32 6e 41 dd df 74 +3a 76 4f 7e 82 88 68 29 a8 fa b2 77 2a 34 97 70 +6b 95 38 a9 f8 42 96 c8 2d 9b af c2 9c 39 d4 68 +4f 75 ff 6b b1 c1 2e 39 bb 80 56 af 2d 24 34 4b +2c ae 46 29 + +# Encryption: +42 c9 cb 68 21 b5 5d ae 30 d9 00 25 75 31 12 e6 +ee 02 f4 ad 6f 0f 5b 3c c4 95 2a 12 7c 8a 16 f6 +64 79 b8 14 4f 3c f2 9d 84 e4 3d 67 d6 77 12 c7 +f5 b7 6d a2 c6 6b a0 e9 0c d4 b1 fc 1c 1b 3f 17 +a3 92 e7 04 08 28 8a f6 9b 50 fe 8a 50 b3 29 6a +0d ab d7 c8 dc 39 84 a1 94 06 88 be 70 98 25 16 +20 25 6c c2 1b 7c 76 ed 29 d8 6f f7 c0 1e c2 87 +df 47 38 be 34 69 b3 0a 3f 8f b7 be 83 d9 36 1a + +# PKCS#1 v1.5 Encryption Example 2.5 +# ---------------------------------- + +# Message: +66 0b bd 40 06 9c c6 7b ad e4 1a 09 ec f4 3c c4 +51 3f 7c 7c c0 2d de 97 2d 2b 1f 29 29 5e 09 b9 +91 0c 59 ed ba 0e d2 dd f1 1a 6d 41 69 35 1f 97 +24 07 33 52 8f 91 b2 68 fa a7 af 90 6e + +# Seed: +30 7f 61 b1 83 a8 dc f9 15 5a b2 35 e6 1f b5 6b +a2 b8 79 5d c4 23 53 85 e8 ac f3 66 d2 52 33 b4 +70 e0 5d 70 11 b6 fc 53 2f 0a 65 8a d1 3a fd 29 +0c 6f 30 e2 79 5e e3 d3 9d bd c8 0f 56 0e ce 2f + +# Encryption: +04 9b 26 05 0a 3a be f8 3e c2 77 61 11 e3 b7 2f +b9 a2 d6 a8 01 05 5d 6b 5e 0d a4 e9 5c cf 2e bd +0a 78 6a 97 21 aa 79 25 bf 15 be b6 27 13 a3 13 +87 7d d8 5d 26 58 b2 08 e8 8e 64 45 fc 35 01 9b +0c ad 6b f4 d0 6e 2c a5 f1 19 49 ee ee 7e e4 7f +1d 5b 4c 88 24 1f 50 e4 d6 ed f0 18 3d 4f a3 5a +37 1f c4 07 36 4f 2d ca a4 cd ae ce fc ea 6d fa +c1 d5 13 f9 05 e7 47 94 47 44 bb 64 57 6b a1 c8 + +# PKCS#1 v1.5 Encryption Example 2.6 +# ---------------------------------- + +# Message: +81 cb 0a 97 69 8f 82 3b 56 b4 5f + +# Seed: +93 8c 8d fd a0 8b 89 05 5b 68 af 01 1f 24 6c ec +1f 93 a2 77 1d a9 7d ba 20 95 4c 90 09 12 28 5e +5d b1 87 b2 9e 32 72 e9 9e 69 4e 12 14 17 25 28 +45 30 84 06 4e 5c 60 f0 1e 78 6f c5 d0 d9 af 06 +39 a4 98 c5 7a de 93 77 60 ae 51 74 84 af d7 02 +5e a0 d5 5a 62 b1 1f 9a ab 7f a5 dd d0 93 e5 ea +ba d6 1b 67 a2 95 a7 75 be 96 c6 b7 6e c3 fe 47 +29 50 + +# Encryption: +7f b8 f3 35 ee dc 4a f6 af 44 07 3d a1 96 45 7d +04 61 45 03 01 47 f8 42 0f c7 9b d5 89 77 4a 73 +0a 6d 94 fb 7e fa dc 5a ee a7 c0 70 f1 89 24 91 +25 e1 66 c6 d3 01 29 ec f2 c4 82 2a 50 49 6b c2 +f2 1e 79 ac 57 db fb dd 71 a6 8b 58 d9 05 1b 48 +0b f4 77 48 a1 3d fb 67 3e ae d7 71 0a 46 8f e7 +2f 7d 74 e6 f4 a2 89 44 04 3a 52 d9 30 de 68 db +cb 6e e7 fb 8b 69 64 05 41 e3 ed 5b 75 4e 65 fe + +# PKCS#1 v1.5 Encryption Example 2.7 +# ---------------------------------- + +# Message: +05 f7 83 56 23 c8 cf aa e4 82 a9 10 85 b9 7f 6b +95 92 8b b9 74 ac ad 02 36 4a af 13 17 ed 53 c9 +db 2f fb c8 a3 cb 3a 00 f4 4d ac ef 78 + +# Seed: +80 c8 3d 25 47 be 41 ba f2 32 1b d3 0a 9a b7 74 +9c 5e eb b5 a1 ff f0 b3 1d 6b db 0a d1 6d d0 c0 +fb 3e c1 57 e7 8b 09 86 60 20 41 cd e8 89 57 a5 +53 29 e3 e2 cf e8 5a 59 44 74 94 5e fa 33 35 85 +ff fd 41 eb b8 e7 c5 18 c3 c9 25 9a ea 8d e6 35 + +# Encryption: +87 f9 ce 05 f0 ac 9c 05 e4 5f b7 bb 55 5a 7a 18 +a9 cd c5 5f 54 4a 54 21 01 e9 a7 1c d2 03 66 82 +0e 7f f6 dc a3 46 75 22 9d 86 e4 fb 58 71 f9 31 +0b 12 bb 74 e2 86 18 d6 d6 58 65 87 f6 6a cc 89 +68 a8 3c d8 07 f4 d2 12 97 73 1d 7c 22 c1 45 99 +e7 57 19 fd 23 05 2b 8a a6 5b 7e 9c 5c 02 00 38 +2d 35 d5 60 f2 d3 3d d0 49 e0 6a c8 27 cb dd 9a +f5 81 a6 b2 6d b6 1d 43 d7 12 4b 34 72 1d f1 42 + +# PKCS#1 v1.5 Encryption Example 2.8 +# ---------------------------------- + +# Message: +e2 e0 f6 b3 28 d9 bb e9 fd 66 cd 87 98 7c 11 60 +ed 23 7b 1c 7c 65 6a 89 fb 1f 21 d7 09 40 3b 04 +10 f8 e4 e1 2e b9 69 0a eb eb 38 07 31 9a 93 65 +64 f6 67 17 a7 1c 48 62 cc c5 6e + +# Seed: +cf 18 e6 08 b1 56 14 5c 44 de 31 49 66 cb cc 66 +74 a4 5a e0 df 90 04 06 e4 0d 3d fc 32 2f 39 40 +4c ee b6 dc 58 f8 01 bb f2 ac 4f 47 84 1a bd 79 +61 79 d0 82 4f 3b f5 51 8d 78 cc 66 ad 8d fb ed +b1 17 + +# Encryption: +14 01 aa 21 ec 6e ba a7 e3 a9 f7 13 c8 6b 50 8e +37 5f 6c 12 5b 29 62 6e bd 34 9f 64 e2 0f a4 8a +1b 06 84 79 ff f3 30 22 f6 6f 86 e9 7d 9c 5e dd +90 26 e3 18 3c e0 86 41 57 06 59 35 2f 87 a6 18 +91 f3 d8 6a 3d 24 5f 02 45 e3 9d 99 89 2c 67 fa +2b ed 8e 37 54 8d e2 3d ef dd 1e 43 d5 d7 e3 d9 +a3 c2 2c e6 a3 68 d8 4c 5a fa 1c c5 bf 49 b6 8f +e5 c2 5a 32 6b 0e ec 5e 44 c5 e2 ff 5a 35 9d d1 + +# PKCS#1 v1.5 Encryption Example 2.9 +# ---------------------------------- + +# Message: +c6 95 78 ea 03 e2 69 b1 b9 16 33 a7 2f 9f b4 d1 +0c + +# Seed: +e0 a1 a9 ba e3 0a 7a c6 6c ab 3d 86 43 3c 1c a5 +e8 ac 2b 74 e4 83 ca 7f 34 59 77 16 ee 16 18 90 +6c 97 77 2f 28 86 f4 6d 78 31 21 b7 fe 1b 8f a5 +fb ec 09 c0 68 e5 63 5c 89 e6 a0 a9 ac cf 2b 12 +c6 47 06 b6 ae 9a 5a 74 ab b8 3f 64 e1 3a 8c 53 +f9 26 76 04 66 b6 45 e2 8e 9a d6 46 1a e7 b8 9d +5e fc cf 7d 89 14 9a a2 e6 9f 0d 25 + +# Encryption: +78 f8 7d 6b 06 76 1b d7 e7 17 e0 c5 eb 40 e1 fb +80 89 9c 7b e4 01 7c 2e fb 07 59 78 ee 38 d0 f9 +5e 98 03 dc d4 0f ee 97 92 c6 1d 4a 2d 85 da bd +ea 96 ca 29 f3 ca 1e 8b cf 81 76 55 d0 c0 94 74 +d9 80 94 eb 6a 7e f0 33 3d 69 71 c9 38 36 fe 02 +32 f7 18 46 3d c9 54 18 53 46 3b c1 cf 03 67 7e +78 6e e5 2e 72 71 c3 c1 1a c0 05 53 c6 75 27 07 +e0 df 92 80 c4 f2 b7 d1 9f d6 f3 d8 bb cc 7b e6 + +# PKCS#1 v1.5 Encryption Example 2.10 +# ---------------------------------- + +# Message: +76 72 cf c2 7a 41 d5 01 aa 4c 41 ba ab f4 52 5a +7c 45 5f c8 + +# Seed: +4c ee a1 a8 94 64 a5 d2 f8 9e 07 89 53 ca f7 76 +36 58 98 a5 bd 5e 8e 44 8c 65 da 26 ff 98 90 0c +d0 80 61 ef 44 6c 69 b4 8d c4 60 9e d8 65 4a 64 +6d 70 82 62 cb 84 09 ac 27 c4 a4 9a df ed 47 a8 +5a d4 29 ed 75 07 75 78 e4 c2 73 c6 1e 2c 3b 46 +be b4 72 f0 a3 45 a0 5d 61 a7 ea aa d8 a6 3e 0b +3d 49 52 f2 7c 40 81 32 9e + +# Encryption: +25 2b 14 13 3f 1d b2 50 13 29 35 01 e3 56 53 4f +26 af e3 34 68 8e 68 d7 91 83 3a 0d 82 56 05 70 +bb b3 ce 2b 16 d8 b5 f7 f8 9e 7e bc 7c f9 c2 94 +ab 34 16 b7 c2 11 87 70 7f e5 e7 99 2e 72 0f f9 +58 da a4 0f 5a d4 5b c7 47 47 96 39 a5 37 fe 0a +4a 75 fc fb 45 a5 3f 01 73 af c0 f3 cc 91 0b 86 +ae 31 37 62 8d 90 ff 67 5a e1 ae 31 e1 64 05 37 +ea 1a 7c cc fb 73 f8 be 5a ec a0 3b ab 19 3b b0 + +# PKCS#1 v1.5 Encryption Example 2.11 +# ---------------------------------- + +# Message: +a1 6a d8 f2 e0 93 23 42 ed 21 e1 37 77 f4 65 2a +35 50 dd b4 36 8b 5e a7 1c 66 db c3 bb fe b7 db + +# Seed: +55 88 4c 83 0d 4a 80 b7 9f 08 9d a7 4d c2 5a e0 +c4 82 46 21 45 e1 d0 95 23 da 3c 93 44 bb 97 b0 +52 fb dc 15 43 df b5 3c f2 37 82 59 68 7c 7b 1b +35 ca f2 f9 19 99 ed 4a ce 39 af 10 d6 be d0 fa +22 44 4c 12 9d 90 74 1c fc da 90 19 8e 27 82 fb +03 bd cc 7c fa fd 89 db 6f b0 fe d2 24 + +# Encryption: +08 32 6a ff 6d 03 cc 4e 26 10 dd 53 6a f7 f2 1d +76 22 7d 82 7d 52 80 d8 b8 3a b9 eb 30 e0 76 9c +fa 02 b5 c1 35 2b f4 d1 70 ce b6 6f 8b e6 98 78 +4e 1a 6c 20 3f a5 ab 90 07 a6 f7 fc 20 65 20 4b +98 2f a5 61 fb b3 61 af 2b 8e ea 42 ab 3f ec 0e +d0 86 22 e5 f2 89 80 52 75 38 0b 69 34 2a 96 f7 +6a 99 04 87 68 90 d9 2f 24 00 20 32 35 1d 8a 1c +bc 3d 27 b2 46 48 21 bb fb fb b9 a6 78 51 96 10 + +# PKCS#1 v1.5 Encryption Example 2.12 +# ---------------------------------- + +# Message: +4a + +# Seed: +8a a0 ce d1 7f 09 ad ae 61 0a 46 03 0d ad 40 31 +1b f1 46 9c 27 37 41 1e 40 f9 23 96 75 1d d5 66 +37 c9 58 db c5 8a 17 fd bd dd db bf 79 75 18 78 +98 be 1a a6 3c 5e ee 5f 9a 19 02 98 0f 59 51 84 +b9 b5 b4 65 b9 2e 20 f7 ae 8b 5a 5c ee 7f 3b 57 +d9 97 a0 6a 70 2d 23 83 50 a9 26 98 ef 27 5d ff +52 77 bd 2c 99 96 47 40 5a db e4 fb 3f 1b e7 5e +15 9a 4c 43 83 13 b7 fd 8a ca 9d ea + +# Encryption: +4c 4e 5a b6 2d 0c 96 7a b8 29 21 42 9f fe 50 d2 +24 0e 7e 0a 18 75 48 87 55 bb 7f f6 15 a8 c9 9a +bc 37 b2 e4 71 47 a9 27 d7 b9 8c 30 db 24 da 8c +d3 5e 13 d7 b7 14 14 d0 32 bd 0c 3c e3 8b 89 b1 +1b 2c 3f 9d 83 08 16 71 6a 2e 8c cd 8c 79 e9 c7 +49 31 a7 b8 a8 db 13 12 8c e4 0b 21 59 e4 98 da +98 f2 aa 35 2f 23 85 31 06 b6 61 d8 8e d0 6f f6 +6a 56 e7 56 59 72 20 bd 10 15 81 53 ce 5c 02 63 + +# PKCS#1 v1.5 Encryption Example 2.13 +# ---------------------------------- + +# Message: +bf fc 42 08 73 f5 af 5d d2 3b b0 + +# Seed: +dd 31 cc d4 7d 4e 31 02 df 0f c5 9b 1b 84 77 af +3a 78 c2 fa 9c 8e cb 4f 0b 3b de 23 50 04 36 55 +03 64 66 5f 81 c0 35 6a bc 0b 78 e9 73 19 11 14 +02 75 c8 66 f7 5a d0 cb bc 88 ad 6b 5d 4d a5 2d +08 e2 2e e5 39 b5 8e 92 c6 19 63 87 e2 21 a0 87 +39 6c be 57 ec 56 03 f6 16 26 27 98 3e ff 82 de +04 8b dc 1b 5e db b5 d4 ea 84 f5 02 24 bd 88 a9 +05 da + +# Encryption: +0d a2 d6 f7 bc b5 0a 47 2e da 24 60 9d a6 77 28 +e5 3c 98 80 aa 5f b6 fb e6 0d 83 c1 1e 6b b3 cf +db 17 d1 4d bc e8 ec 55 c7 3a b0 14 3e 9b 27 56 +bb 69 68 e5 af 1a ed cf 6a 80 c2 6d 49 0e 47 18 +7e a5 d8 cd 2f ac b8 1c e6 4a 72 3c 40 f0 ba 4c +69 3e 1b 11 43 df 15 a4 20 91 70 9a b4 c7 cd 9d +47 07 9e cd 68 f6 a1 96 44 8a 44 67 9a 04 14 10 +41 8f 11 a1 e1 bc e7 8e 77 26 04 a2 f2 77 81 95 + +# PKCS#1 v1.5 Encryption Example 2.14 +# ---------------------------------- + +# Message: +1a 9b 87 29 21 0a 84 71 fc 5c d7 09 f2 ed d3 24 +01 50 24 4b ec 96 a9 2f f8 07 e3 b3 0d 29 5d 3c +34 5c 04 4f 2e 95 60 37 + +# Seed: +58 78 c9 1b 16 6e 90 c3 4e 6e 66 56 8c 15 1f 4d +44 43 40 b5 f1 d7 30 52 cc 56 33 ea 2e 47 ac ed +7b 17 8a 64 fb 09 a5 ad 08 46 ae e4 11 6d 67 80 +ee 75 eb 20 85 16 68 82 0c de c0 f2 c4 96 e4 c2 +88 d8 27 9c 1c 5d 4e c0 0d 98 0c 27 2e 87 05 18 +48 6d ca ea 85 + +# Encryption: +37 00 ac 36 2c f6 0e 16 39 47 a1 98 d0 0f 3b 3b +26 e0 3e e2 fb 78 2b 42 88 b8 c1 de 76 e9 e8 99 +46 c9 80 7c 56 e0 9c 7b 52 be 00 78 ac f6 92 96 +4a cb 97 d1 fa 5c eb 57 76 a1 d5 56 b4 bc 9d b0 +0b da 25 23 7a 75 1b 7c 22 9b 6b 57 f7 ff 75 1c +12 d1 f2 2a 4f b0 e9 0b 63 d0 42 d9 49 9e 0f 7e +fe ad d3 c5 88 f2 c7 43 a1 2c 56 7c 81 57 8d be +eb fd 37 74 da 34 ad 09 ee be 90 17 89 02 14 b5 + +# PKCS#1 v1.5 Encryption Example 2.15 +# ---------------------------------- + +# Message: +a6 d0 e8 c1 ea 4a b4 ec c8 95 7d 62 28 15 79 67 +5a 64 8d 62 b7 f2 2b 2b 08 d1 31 3f 40 6f 13 7e +99 42 67 35 cd b9 37 2f ec a1 ee 78 46 3f a5 de +9c dd 84 75 6c 68 bd 1d 92 ba 96 5f 50 64 10 b1 + +# Seed: +1c 25 c9 b8 32 16 9a 1f db 6c 14 8e 47 e6 6c 3c +c8 21 41 e6 11 a6 f3 0c c9 0c 50 49 e8 c5 02 b3 +1c ad c7 62 39 b7 bd af 93 fa 97 34 3e 7e e5 51 +bc 52 fd b5 ec 9e 40 0a f0 5d be ac da + +# Encryption: +00 e8 b2 fc 76 df b4 a6 cc 43 64 de 8f 68 3c 3f +cd 0a 9e cf bd 4a 5a 72 24 f4 9a e9 b4 f3 b5 cd +c7 1c bb 8c 66 fd 35 f3 d1 8e ca 98 96 7b d4 00 +5d f7 91 52 41 6f d4 7e 56 2c 55 ed c6 d6 12 12 +28 6e f9 75 bc c8 02 69 25 92 65 39 00 97 3c 72 +e0 1a 69 3b 05 fc 2d 58 56 ea ef 7a c0 8f f5 ec +d5 31 e2 c2 ce 92 77 45 a1 16 5a 51 aa 66 98 a1 +ff cb 87 f8 1e f6 51 0b ca f9 cb 76 1e 9e 1f 0f + +# PKCS#1 v1.5 Encryption Example 2.16 +# ---------------------------------- + +# Message: +f3 40 5b 21 8f 3e c6 03 a9 80 69 00 99 c2 cf 5c +be 0b 2b 05 96 79 c4 6b 7e 48 f6 fd c4 da 40 92 +d8 31 c8 b5 2b 2c c7 9b d2 bb f6 e9 f5 7b 4e 8c +aa 94 b5 81 f9 f2 31 26 1f 0e 2b bb f5 3d bb + +# Seed: +f4 70 7f 58 64 2b 54 cb f8 0a 9b 50 48 a6 ec 0b +d3 5d 09 57 16 db 12 06 0c bf 50 58 5f b9 23 79 +81 05 2f 7b b1 58 3c d8 7b c8 bf b5 5b 73 3e 89 +0e b9 c0 8e f0 e8 80 e9 ba 0d 50 ec 95 41 + +# Encryption: +6d 9d 39 19 8b 5f cb 13 2d 93 15 11 49 d7 59 91 +02 4a c2 2e b6 eb 2d c7 c6 05 8f 64 87 56 45 10 +2b 95 25 4e 25 e9 f0 ae 45 06 d4 3c 60 1c 18 8a +31 4f 4b b4 e0 38 c8 15 39 41 6e 10 5e 80 97 fb +69 5a ab 36 fe f5 16 e6 a3 3f 36 f7 f9 5a d1 ff +15 88 90 25 b1 b2 e8 1e 1b f3 b2 de 5b a9 18 7c +a9 6c eb a9 fc ec ef 9c 53 e4 94 34 86 18 59 67 +cf 7a 64 77 c3 29 f0 0e a6 95 52 5b ca 99 f2 c7 + +# PKCS#1 v1.5 Encryption Example 2.17 +# ---------------------------------- + +# Message: +6a fa db e3 da 68 d9 02 85 bb 8f 1e 21 29 ff eb +b1 c6 5b 95 88 d6 c2 c0 40 24 c2 38 b2 0c 65 d2 +ac a5 e3 82 76 00 0a 0e 6a 0d 05 37 ef ee f6 d3 +e3 d9 4f b9 + +# Seed: +ee 17 6e a3 cf d4 90 b6 c0 49 d2 e7 4c 90 c0 ee +74 68 52 03 49 b8 51 65 3d b0 58 a1 c3 e9 56 e0 +88 5f 26 1b 6e 71 cf 1e 62 3d 3b 9d 1d 56 fa 13 +67 e4 7f f3 74 ad 39 30 9f fa 2e 67 11 28 d5 ab +b4 a6 1a 5b 0d c2 db 2c 08 + +# Encryption: +67 2f e9 51 59 a9 89 3f 34 98 b6 16 c1 7b 59 da +71 da 80 2f eb f7 cd 38 11 06 14 a1 b2 5d 96 aa +8a 74 aa aa 2a 0f 00 0e f8 ac a3 b4 1a d1 61 b6 +26 33 f2 41 31 9c 33 e4 ec b7 70 6a b3 ad c6 a3 +ef ea 22 43 0f 3f 5c 9c 4c e5 40 4e b8 e7 5a 10 +93 69 c0 aa 0b 7d d7 13 bd 8b 77 cc a5 f7 4b ca +5b c5 55 69 6b 68 e1 17 2d b4 02 50 1d cd 26 49 +68 5d b0 fd 88 c8 83 60 da cc 65 09 ff a8 df c2 + +# PKCS#1 v1.5 Encryption Example 2.18 +# ---------------------------------- + +# Message: +6d 9f 9b 4b b1 23 ba 90 95 53 a7 57 3a 97 1f 64 +b7 25 24 cf eb 04 2d e3 92 15 f6 50 db 61 2d 66 +d7 ae 86 05 d0 44 19 54 62 5f a9 81 22 33 0e 92 + +# Seed: +7f f8 68 5a ec f3 40 26 13 90 ad 07 42 73 0c b6 +39 28 30 14 ab 37 73 55 6c 69 7f 97 ef 62 1a 4d +cb f8 ec 6e de c5 0d 8e c9 59 0a db af 23 51 dd +fa 0e 52 ea 6e d1 8e b6 c3 78 f3 80 85 ae 5e e4 +cc 48 c1 89 1b a4 7b 20 10 d5 d4 35 39 + +# Encryption: +8d 30 65 5c f1 5b f1 0a 46 97 87 c6 a1 0e 79 25 +4f f0 bd 11 93 8b c6 0a 81 a7 58 d9 3c f2 a0 30 +24 59 fc 2f 0d 77 00 b8 6d d6 ed 61 83 83 b4 4b +45 87 04 ca 11 92 8e 50 4f 02 8e fe 50 37 17 2c +3e 51 b8 37 be 61 56 de 6a 09 c5 55 97 be 74 c9 +7c aa 1d eb f3 14 cd 94 b9 1b 9f 94 cb f7 64 0f +86 c2 6d 1d 6a 0b 10 46 28 b5 87 11 4a a3 1d 99 +f6 9c f9 57 37 93 2c 0c b5 33 33 74 de a0 7f ac + +# PKCS#1 v1.5 Encryption Example 2.19 +# ---------------------------------- + +# Message: +33 cc cb 59 7d e9 5c ed b8 b6 57 fc d8 f8 88 86 +da 04 c7 57 93 53 14 + +# Seed: +53 42 f4 68 43 91 cd 74 f5 28 2d b8 31 41 ff f6 +78 f2 3a 3e a6 52 e0 d4 27 fb 6a d9 76 c5 a7 10 +a6 37 95 77 71 89 47 ac 72 7b 4d 58 a0 b0 bd 20 +7a e3 73 a8 b9 9a c8 e2 51 eb 02 45 8a 9e dc 39 +52 fb 28 42 6d 18 fd a1 8a 80 2b bf 0a 0b 8b 2c +f2 5c a3 a0 22 f7 78 c7 f4 7f c5 30 d0 b7 a5 bc +84 6e ea 91 80 f2 + +# Encryption: +8c 4a 63 d0 73 1e 2e 71 eb 46 15 18 9a 96 8b 3e +4a 24 28 56 b2 09 02 45 23 8b 66 45 97 8f 1e e8 +d7 98 11 06 2e bd 2d 1f 3d 52 3a e6 00 e0 e5 a6 +e4 05 c4 e4 b5 a1 6e 8d fb 49 24 30 4b 0d 1f f4 +d6 41 bf 98 7f c6 d4 1d 3e b7 cd c5 31 34 d0 06 +9c db 5a fe f7 f8 f9 ca c0 ee 52 30 b6 f8 86 22 +a8 4d e5 2a d6 f7 50 47 84 37 06 ca 96 97 42 c5 +8d a7 72 62 ff 1f 12 8a 66 4e 51 cd 63 5e 71 15 + +# PKCS#1 v1.5 Encryption Example 2.20 +# ---------------------------------- + +# Message: +19 d6 + +# Seed: +ea ac b5 78 ae ab f6 9d 4e ae eb 36 d0 4c d8 a2 +2e 8f d7 a2 5f 04 43 a1 1e 4e 08 b3 ff ac 1e 05 +42 1a 87 6c ca 91 31 82 50 be fa ff ef 9b 27 49 +dc 40 2f ad 4f db 7c 1b 66 aa 5e 08 9f f9 9f 8b +30 0c dc 46 f4 8f 56 48 c9 40 8b 5f 8b 3f 5a 12 +e6 50 50 dc bc 0d 53 43 d6 3d 58 08 19 21 65 2d +5b c8 2d d3 d7 0e 07 5d 32 d8 02 c2 97 64 78 fc +9f 09 93 dd 08 59 c9 0e 22 8e 87 + +# Encryption: +61 3b ba 5c 19 0a d7 72 e0 8c 29 07 6e 2e 9e 5f +12 ef c9 29 2e 3b 5c ee 52 c2 69 7f b7 b6 07 dc +72 e8 25 78 e8 b7 53 ba ca df 23 b4 77 25 21 3d +b8 9f 88 73 fa 79 b9 14 a4 b5 16 1e fd 9e 15 cf +a8 dd 1e ff e8 9f 89 47 a6 f3 82 6d c6 bf 53 be +ca 36 5b 93 81 18 45 62 a7 9e 21 ca 0e 68 eb f0 +ab 82 ae 76 2b 28 c1 43 65 15 2a e0 f5 4f 2e 9d +14 43 9a 84 6b 38 3f 5e 2c 55 ef a7 00 85 97 b5 + +# ============================================= + +# Example 3: A 1024-bit RSA key pair +# --------------------------------------------------- + + +# Public key +# ---------- + +# Modulus: +b9 30 96 d0 26 1e fe 00 0b 3d 17 04 f5 04 31 60 +ab d3 eb 56 6c 61 e5 3c 76 c4 01 e2 b6 55 21 bc +12 d4 81 21 51 83 e8 f4 6c 2c a8 d0 0a da 5d fd +04 dc f7 cf 36 cc 58 11 05 d9 9d 2a 7d d9 4b 56 +76 0a 65 64 fe e5 e8 aa eb 06 07 e1 45 19 62 10 +a3 1b 7e d8 dd 2a f3 2d 29 d2 ba d6 f1 5f fa 5a +11 dc 73 5c c3 62 19 02 1e e8 d1 ee ed 34 63 9b +5a 91 ac 6a 92 67 4e 18 39 70 c5 9d 5b 19 6d 4b + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +b9 30 96 d0 26 1e fe 00 0b 3d 17 04 f5 04 31 60 +ab d3 eb 56 6c 61 e5 3c 76 c4 01 e2 b6 55 21 bc +12 d4 81 21 51 83 e8 f4 6c 2c a8 d0 0a da 5d fd +04 dc f7 cf 36 cc 58 11 05 d9 9d 2a 7d d9 4b 56 +76 0a 65 64 fe e5 e8 aa eb 06 07 e1 45 19 62 10 +a3 1b 7e d8 dd 2a f3 2d 29 d2 ba d6 f1 5f fa 5a +11 dc 73 5c c3 62 19 02 1e e8 d1 ee ed 34 63 9b +5a 91 ac 6a 92 67 4e 18 39 70 c5 9d 5b 19 6d 4b + +# Public exponent: +01 00 01 + +# Exponent: +01 07 ea 61 ad ec a5 e9 00 7c 59 13 4a 7d 38 fc +7a f3 10 3a d2 c4 a2 be e3 97 08 be fc 83 dc 79 +b7 0d c9 75 92 db 6d f7 0f b3 c4 9c 25 35 fc fd +9f c2 ce 7b 05 53 92 e3 ee b3 e7 97 93 cc 1b 60 +15 3f 4a 0b ff 26 be 66 7b bc db bf 6e 32 af a6 +fd 14 83 7f 3c 79 be 44 cb 1c 63 8f fa 5c 6b 17 +70 9a 96 e1 27 03 0b b1 11 6d ec fd e5 2b b0 40 +84 2a 94 d2 e6 74 f1 17 51 ec b9 03 ee 10 48 45 + +# Prime 1: +e7 fe c4 74 e0 eb 31 2d 1d 76 cb b2 72 2e fa 42 +10 68 b1 91 e2 33 b6 4e 46 08 7f dd 45 76 d3 85 +55 07 19 35 2e 10 9f e4 33 ac 4e 35 8e 7c 28 59 +eb a7 e4 3a 04 ee 85 9a 46 35 2c 12 43 a1 cc 6f + +# Prime 2: +cc 5a 02 f9 55 7a 63 5c f5 e6 9b 0f 2b 3f 2e 61 +2e 1f 0a bb d4 bc f1 69 ca c0 84 dc f4 b9 b4 34 +43 a7 85 23 90 f8 19 41 9e c1 a8 38 7e f0 4d d2 +db 7d 60 b4 0a 21 f9 4f 46 d2 27 87 4b 3e 52 e5 + +# Prime exponent 1: +ab 92 8b 10 35 57 3b 23 36 6b 28 f2 6b e7 ba 45 +29 85 83 ed 73 f0 f2 9e a8 c4 98 6b b8 77 cc af +0a d7 19 19 6f 5b f4 23 fc e3 2d 64 06 60 64 27 +3c 55 0a 40 ae 6d 08 79 b3 fa 97 01 5a eb 4a 19 + +# Prime exponent 2: +8c 7d 55 8e 15 36 0f 19 d9 f4 b0 a5 bd 15 b2 cd +1c e8 3a 78 e7 c8 fe 2f bd 34 9e 23 4a 1c 61 c7 +8c bb 9e cc d4 dd bc 7f 60 a5 c3 01 14 44 21 3c +d5 a9 5c d2 6a 24 f1 41 8f 6e eb be 17 fc c1 + +# Coefficient: +b0 b1 b9 cb 23 ac 2a 8a 56 36 66 69 9a 52 40 54 +be f3 81 aa bd 75 55 31 a1 df a8 85 dc 8f 98 86 +a5 5a f0 e3 68 63 91 c7 97 68 1a 8f ef cf 24 db +d8 1e 03 13 16 99 8f 5d 81 8d 24 76 da d0 6d e8 + +# PKCS#1 v1.5 encryption of 20 random messages with random seeds +# --------------------------------------------------------------------------- + +# PKCS#1 v1.5 Encryption Example 3.1 +# ---------------------------------- + +# Message: +44 e5 6a a7 7b d9 35 ac 59 a9 bd 32 37 83 e1 27 +42 + +# Seed: +92 ee f6 19 f0 4f 52 02 8f 4c c3 e5 24 1f 0a a0 +92 1b 4d 18 3c 1f 5b d6 8d 86 fb e9 e7 b7 d0 bb +10 4e d1 ca e0 7a c7 d8 0b fd 9c 1c ef f8 dc da +1d cc 69 30 f4 c5 51 37 34 6b fd 68 c1 9d 87 97 +2f 7f 34 cb ae 56 63 26 0f eb 79 f7 60 22 1c d6 +7b e0 66 d5 af 0f 07 3c 0f 2c 43 9e 8b cb 74 63 +ed e4 4c 8b 15 0e ba f3 29 87 26 c3 + +# Encryption: +15 91 d1 ce 0f ad 66 d8 6f d4 2e fd b3 1e 9a 02 +8a 31 57 fb 09 14 b2 47 eb 3d 22 d7 6f 97 69 b0 +e1 9f 6c 06 4c a1 b9 89 06 39 ee 6e 37 b7 09 22 +4d 6b 58 eb b6 55 ae 4b 69 ed 4c d7 5d 81 29 21 +17 c0 69 30 d4 2a c4 d4 2e a7 35 14 21 8f 49 ea +07 ca 97 43 67 09 68 3d 67 a8 e9 e8 08 da 69 a5 +0b 73 9c 42 eb 0d eb 94 a3 49 8f c5 45 0e b6 9a +ce 23 76 76 61 fe df 34 18 3a 1b 6f 42 5d d6 a0 + +# PKCS#1 v1.5 Encryption Example 3.2 +# ---------------------------------- + +# Message: +a7 57 38 29 1f ad 54 13 95 7f a3 b9 f3 b2 ca ac +9f 5a + +# Seed: +3a 19 1a af 45 ed 4c 25 89 20 5d 9c f6 a3 0f 07 +70 0e 38 be 06 25 62 43 01 8d 23 c6 84 da ec e7 +e8 67 e3 9d 76 c6 b6 f0 35 43 fc 15 af 81 bf 84 +f9 64 ea f3 a9 5a 4b 80 86 28 fd 51 55 38 99 f8 +11 c0 8c 62 60 9c 51 4c fa 1d bb 78 d5 a5 b3 3c +c0 b8 57 fc b1 ee cc 53 1b 13 26 34 43 90 59 f5 +5a 73 3e 14 6e 1c a1 eb 5a 97 f4 + +# Encryption: +70 aa f7 24 39 6c 1a c5 0e db bf e8 34 1b 08 7b +a0 ff e2 87 60 5a 8c 3a 8c cf 85 ab 2e d2 fe 22 +15 9d 62 aa 02 74 76 eb bf 07 70 02 6d 2d 3b 0c +0d 77 34 fa aa a8 d1 5e 2c e5 1c 85 53 5c 26 b4 +15 0a d6 34 6e 3b fd 38 db 5d ac f7 52 e7 5d 75 +31 40 54 d1 67 a9 6d 81 9f 34 38 a7 be c4 46 7f +c5 60 a6 94 46 94 85 e8 e7 8e 47 e4 e8 27 7c a7 +d3 fd 2a d9 4a 30 46 4c 24 57 85 47 25 c6 16 15 + +# PKCS#1 v1.5 Encryption Example 3.3 +# ---------------------------------- + +# Message: +87 31 2f 78 7d e0 65 97 50 d6 02 ac 11 02 + +# Seed: +a2 29 e3 e8 ef 1c aa 66 ca f0 d8 ac d8 d6 6b 9e +41 cc 77 1f 26 e2 0f 12 ec c6 e2 aa 38 45 51 3d +d1 34 f7 c6 e5 74 f4 1b 21 5d 1d 11 17 56 da f9 +71 cc f3 9c cd ce 78 16 19 d7 97 20 df 91 8d 33 +9c 82 6d c0 49 b3 90 91 7c 17 ba 0f b1 30 2f ff +11 0a 14 dd 23 84 90 27 41 f9 12 b2 6a 1a db e0 +ed 1e 8f d9 89 71 0b 40 3d 27 c4 e0 18 fb 9b + +# Encryption: +03 38 46 d7 66 4c 8f 92 62 57 c7 fd 32 64 48 47 +92 ac 7f 9b c8 75 8a 7a 16 ab b8 9f a3 cc c4 d1 +3a 1e ed 88 af 73 23 bc 3c 74 e2 3f da b5 03 81 +89 4c 86 26 df d0 ac 85 89 d4 62 34 d3 c3 5f 18 +99 81 79 44 84 31 dc 81 6f b6 3e 55 cf 26 d7 4a +9d 2a 09 32 67 3c b4 be b8 29 cd 7d 49 50 88 48 +c6 d0 c0 0d 5c 70 f7 fb 47 67 70 e4 03 19 23 7c +78 6b f4 e2 6c 48 d2 cf d9 6e e3 62 bf 29 28 25 + +# PKCS#1 v1.5 Encryption Example 3.4 +# ---------------------------------- + +# Message: +9a 2b ca 75 e3 26 49 77 7b 9f 13 ec 30 fe 16 bb +8a b4 6d 6d 5e 0c 64 63 a7 3d 8c 36 63 ad ab c7 +23 bd e7 2a 50 76 5e 7b 30 0e f6 b5 61 de e8 84 +84 88 0e 4d 61 2c + +# Seed: +8b fa e9 22 2f 75 a0 69 98 ed 6d 9b 14 9e 89 05 +cf c8 db 05 5a 0e 32 ac ed f8 24 d2 f6 b5 b4 2b +3a ea c6 a7 10 4e 14 4d 5e 48 34 28 0e 36 44 5a +b8 50 f3 a6 de 16 4c 2c 79 0f e7 d9 d7 bc 7f 9b +db e2 52 17 da 2d ed + +# Encryption: +6e c5 f5 59 c8 a3 20 d9 0d 1e b5 ef 09 1c 4d 12 +55 a2 4a 69 19 41 0e b1 df 65 a9 7b 30 cd d7 fa +e1 8e 65 12 a0 27 e9 76 70 4b 4f a0 44 37 43 93 +d5 01 e2 ba 46 18 62 00 ef 0d dd f1 9c 75 77 58 +e4 67 94 30 bc d9 fd 11 9e a2 43 b3 49 dc f8 1c +34 32 d3 1f ba 91 1e c6 fc 68 6e aa df f6 b9 fd +f5 3a a4 c8 5a 49 a2 2a 05 1c 5f 18 07 f3 08 3b +1b 3e 61 17 b4 ef 12 08 de 0a 80 01 dc 29 1c 4e + +# PKCS#1 v1.5 Encryption Example 3.5 +# ---------------------------------- + +# Message: +df d6 3e 6e c6 1e 07 27 5b 8e 37 cc 63 69 e1 f3 +ec 0b fc 57 a2 98 b9 05 ae 5d 07 74 e0 f5 22 e6 +75 9c 7d 11 6f 8e 8e fe 69 45 0f a7 a8 38 9f 81 + +# Seed: +c4 22 37 7b 89 86 4b 0d f3 8b 4f 9c 15 f9 8a 05 +96 55 e1 c9 b0 c7 09 63 5c a6 06 49 d8 d2 47 5e +e1 6c b1 27 f6 76 39 12 96 4e 19 84 d6 da ad 4d +6a bd 04 b0 46 18 b3 2e 53 25 ba 95 eb 5e 76 db +d4 6d 9f b5 9d f0 7a 08 1e 95 6c b0 73 + +# Encryption: +9e 06 cd 91 a4 4a 9a de a6 a7 98 03 d3 e6 bb ab +17 db 10 62 b6 51 0b ed 40 07 55 66 74 95 44 c0 +3d 7a 78 b1 37 b0 dc 1e 66 26 32 1f ed af c2 0d +cd bf 70 80 f7 f5 bd d5 67 44 ce 99 9f 76 70 5c +4f 5e 6f a1 5f 46 c5 ae 50 80 90 db bc 85 fb 86 +89 9c 95 78 60 8d fd 77 8a a4 a7 9d 3d 73 63 54 +cc fb fa 2c 86 f2 9a 7a 58 45 3d 75 7f d5 22 f7 +84 08 d9 91 6b 1b d0 65 4b ff e6 e0 66 ba eb 50 + +# PKCS#1 v1.5 Encryption Example 3.6 +# ---------------------------------- + +# Message: +5d 91 fb c1 a7 ba 79 93 9b 89 a2 40 8c ce 8e d4 +bb 26 66 dd fe 09 d9 19 21 a0 aa 69 09 6a 95 69 +92 c2 1c + +# Seed: +af 07 fe a3 21 ea a2 67 af 7f 09 80 6f 9e a8 b4 +cf 13 5e d6 f1 43 2d 51 b2 8f 92 44 87 09 c2 ee +8a ed 7f 73 b6 28 2c bf d3 7f 82 db a8 72 3e 5e +5e 0a 81 f5 90 f8 2e 2f a8 4c 3b c0 0c 9b 9f 91 +aa 55 3b 8b 2c 07 4b fe ca c2 f5 52 37 f4 cb 70 +54 3a ba 49 94 68 cf 68 44 c3 + +# Encryption: +76 05 0e 22 64 22 0e 10 05 2c 49 b9 6c c8 41 1e +39 6a 7a 6e 4a ed b0 6b 48 fd b0 71 de 83 9b 40 +1c ac 0c 46 8d e8 d1 ed 0b 56 8c e6 90 e8 03 7a +f5 de f6 b3 d2 db c7 b5 f2 fa de 35 6c 26 cf fc +dd 33 40 33 ea 2c 99 77 92 d9 30 a7 26 46 12 5c +0e e8 6a 4d d8 43 c8 24 c7 a5 2a c9 88 c9 2e 6c +69 b5 80 76 1c 49 88 1f 29 dd 8a 76 da 79 3f 43 +2e 7d 5d c7 31 a2 5e 5b b5 02 58 d0 27 39 5f bd + +# PKCS#1 v1.5 Encryption Example 3.7 +# ---------------------------------- + +# Message: +04 ed d8 3c 65 65 6a 01 + +# Seed: +88 f9 a2 71 97 f9 f2 57 fa 81 c0 e3 05 90 b7 3e +9e 11 c7 6b c8 9e 08 53 6b 4b 64 a2 50 6a eb 33 +b4 50 74 73 08 09 a0 5c 45 b9 bc 95 71 73 69 cf +92 c1 bf 98 6e 53 ba 11 23 83 30 fd c4 e0 5e a1 +07 33 4a b3 11 06 ae bd 9c 6c 29 e5 01 a5 7d 99 +7c 01 bb c1 01 0b d5 2f 05 38 b9 51 59 f3 91 32 +0d e6 db 23 d8 16 2c f1 46 58 4c 6e 07 6c 4e ae +86 20 72 eb 5b + +# Encryption: +79 1b 37 91 48 a8 3a 03 4d 31 2a 82 bb b3 7b 11 +1b 40 bc f6 a3 37 fd e2 89 b0 8e 07 2e 44 03 19 +73 ff 9d 0c 27 f7 0d 64 a8 ea fc 6e b5 f8 eb 4e +52 e2 c4 19 7e cf a5 45 ed 63 ae 9a 12 83 79 d3 +f5 62 a1 8f e3 ad 14 05 27 67 f0 54 1b 90 16 81 +85 cb b7 8d b6 03 81 c0 92 bc 23 e1 aa 05 b4 08 +92 f9 a1 16 e6 25 cb 14 8b 56 07 42 cc 12 78 c4 +d2 1a 4a 7d 37 f6 98 2a ee 27 f2 a4 c0 c5 73 d2 + +# PKCS#1 v1.5 Encryption Example 3.8 +# ---------------------------------- + +# Message: +3f 7e ea 78 1b 77 d8 5f e3 71 b3 e9 37 3e 7b 69 +21 7d 31 50 a0 2d 89 58 de + +# Seed: +49 99 c6 4c bf a3 85 24 ad ca b6 6f 64 45 4d 36 +fb fc b2 98 6e 1f a4 75 3a 0e 03 88 9f f0 6e e1 +60 0e ee 23 be 53 a9 74 42 b4 2c 69 62 18 66 63 +2e 4a 6b 6a 1c 71 05 73 26 1d 71 f3 8a bf 9e 52 +49 dd c8 e1 b7 7b 3f 12 6b a0 88 15 c4 fe 63 31 +4f 9b 9e 8e 7a 40 c7 fc 72 86 25 20 ed 49 d4 12 +59 ab 2e 0c + +# Encryption: +74 fd 8b 98 56 d7 57 6e 0f 12 87 e0 e9 08 5a 38 +01 e6 b6 77 4d b7 33 54 1d eb d3 9e 72 cf a8 29 +1f ec 27 01 8c 9f 53 05 a4 4c cb 5a 3c b5 91 fe +d2 e6 a1 d1 d8 5c aa a7 4d c2 37 59 d6 66 5a 45 +70 a6 37 f3 ab 30 4b 76 61 31 3b 96 71 3c 7b 7e +49 77 31 33 dd 5d 4e f9 d2 9a 1a f7 12 00 15 02 +8d aa b3 df 04 2c 56 26 20 aa 49 d2 c0 14 41 4d +fb 15 77 d7 19 a9 58 82 64 71 2d e3 bf 4a 76 79 + +# PKCS#1 v1.5 Encryption Example 3.9 +# ---------------------------------- + +# Message: +a3 85 08 d9 46 0c 63 f4 15 81 a8 86 9a 75 82 4b +14 f5 c6 50 32 29 99 dc 41 13 50 d0 d4 e8 62 4f +f0 9c eb 00 d3 be dc 5d 76 2a 40 c9 39 80 04 + +# Seed: +6a 0a 28 8a 1e 67 43 0c 66 6a eb ea 44 b5 82 a9 +09 69 cc 01 e9 0a ae 10 53 ce 55 ee b9 87 9b cc +62 25 39 15 e9 22 f1 09 66 67 bd a0 2a 14 e7 07 +47 b3 59 35 24 c2 84 85 47 d2 11 4d 1d 0c dc b9 +7e b4 df 45 5b ba c9 b0 cc 29 08 39 b7 3a + +# Encryption: +a6 77 57 80 8f 5a bd c8 1e db 7f 69 2f 9f b8 52 +f1 a1 66 1c 4a 00 98 05 c4 4b 21 6c d3 b1 32 2b +bb 25 d1 45 8e 31 b0 f0 7d 65 50 57 59 c4 b4 14 +7f 23 cb ee 2a f4 a1 a5 93 8a 06 8c e9 c5 32 3f +f5 3f 4b 39 2e 12 50 d0 37 b3 1e 62 81 dc df b9 +6b f4 bf ea a1 47 f0 96 c7 84 c9 2f 4a c5 70 91 +12 28 02 50 29 c3 b5 23 30 3f e8 22 7e 8b 2c c0 +ef 15 70 14 cb 67 31 aa c0 9b fe 6f fa 18 ea f6 + +# PKCS#1 v1.5 Encryption Example 3.10 +# ---------------------------------- + +# Message: +f7 84 05 23 6a 9e b5 57 aa ce c6 00 7d bc 4c 0e +de 78 ed 12 b0 4c 82 88 8a 82 c2 13 + +# Seed: +86 f0 72 3b 31 68 e2 ae ac e9 ec 2e 95 fd a6 e6 +d6 fc 8d 62 94 55 65 66 39 9d 73 11 e7 99 fa a9 +b1 ee 1f 03 2a b2 e5 34 a9 1f bc d0 7c 8a 7d 04 +a9 b4 85 f3 1e 07 23 fd 29 eb 21 88 06 9d 9b bd +76 29 dc 6e 3f c8 9b e6 04 bc f0 0c 52 fa 8e 1d +6c 62 55 5f d1 f6 0c ec 02 d4 d9 61 d8 28 da bc +4a + +# Encryption: +6e 8d 2f b0 b2 ee f8 2f c1 10 ce e0 a9 d3 84 2f +2a 05 8a 24 40 7f a1 1b a9 05 d1 aa 50 e8 cc 12 +de cc 07 3d bd 08 a8 c7 05 18 ef 25 db 96 fd a2 +41 1c ca 08 72 87 88 95 6f 73 df a1 20 e0 ea 60 +5b ff c9 3b 43 a4 41 a4 3d 0e aa 3f f0 73 e6 98 +2e ef 52 96 39 06 07 e2 5a 58 8a 39 82 55 ba 00 +5a 48 5e 6e 73 2e 3a 19 20 cd 43 a3 90 fb 66 d5 +42 8d fd 62 89 74 b8 af f2 f0 60 2d a5 78 d6 25 + +# PKCS#1 v1.5 Encryption Example 3.11 +# ---------------------------------- + +# Message: +56 1d 27 c1 d3 f6 d5 d1 a6 43 aa 47 e5 5d 78 eb +00 f3 2d 42 89 6a 34 e0 c1 d7 1b c3 a5 45 7c 92 +05 be d1 3b 98 4c 52 59 + +# Seed: +98 17 6e 1d 67 a2 46 2f 5d c1 bf a6 e0 75 95 42 +10 4a c1 48 11 d3 18 79 38 25 04 55 c6 5e 4a aa +76 32 bd 2d 1d 75 2e 1f 34 c5 3c ab 26 76 76 a7 +8c 10 c9 98 e7 73 fd 8f fe 35 c8 67 c4 43 be f7 +98 65 aa 2d a2 91 5a 85 c7 02 63 23 69 3e 45 4d +8a b3 2a 77 15 + +# Encryption: +0b c0 47 83 c6 92 44 7a 3d e6 1f 53 b7 2f 7a a4 +10 31 6d d5 09 a6 f4 9e 3a ba 56 ad 1f f8 6e be +9e 63 66 e1 7e 51 45 00 76 be a3 71 d4 c6 89 cd +61 49 5c d8 fa 29 c0 e8 7b 6d bf a8 e3 86 c2 e8 +20 e4 c7 42 a4 87 e8 9b 27 5a 21 86 e2 38 40 be +9c 02 52 7b a7 17 e9 e6 0b 5b f4 17 71 1d f3 4d +7b 8e 2d 12 bc eb 85 93 85 fa 00 1d 4b 4b ff bb +c0 ed ef bd 40 02 41 84 68 c5 66 fd f6 b8 35 09 + +# PKCS#1 v1.5 Encryption Example 3.12 +# ---------------------------------- + +# Message: +eb 5f 8c 0d c9 d9 01 06 1b 82 ae ff 8d 67 d8 bf +fc 0c 04 7e cc 4a a3 46 b2 3b db a6 2a 87 e9 dc +77 0b 11 69 5f bf 19 02 f2 4b 66 ce ab + +# Seed: +74 82 77 0f 3c f5 7e db 81 40 eb c3 3a 02 82 45 +ee 06 48 52 06 89 a5 0e 33 f5 f4 67 f6 d1 e4 32 +4e 1c 50 c8 99 e5 ad 2c 46 c9 7f 81 20 d1 c7 22 +39 d6 a8 2d 8f 8e bc 80 b9 73 ee a8 c5 45 69 29 +50 45 14 b4 b1 56 62 84 4f 29 50 62 f2 1e bd 92 + +# Encryption: +b8 40 43 54 a3 81 b7 c2 ab e5 f7 28 25 f3 d3 15 +bd ac e6 c3 cf bd 88 b8 97 68 61 20 05 19 7c 61 +66 38 83 f2 c2 57 4f 99 5e a6 f9 4e b3 4f 27 68 +62 b3 3f 58 a8 83 92 23 70 6b e1 c1 ff 47 23 05 +f1 1b a9 56 2a 0e b0 12 f1 aa f8 5c 22 e8 8f 2f +df ea ff 86 33 d3 cf eb 5f 76 4f 42 28 92 0d e3 +0c 6b de 2c b4 e8 f0 3d 90 ed 54 8f 64 85 00 35 +1a 5f 41 df 74 ad 65 e8 c3 be e9 50 5a 7d 70 e1 + +# PKCS#1 v1.5 Encryption Example 3.13 +# ---------------------------------- + +# Message: +5a 7f 0e ae ba e4 9c f5 7c 47 5a 6d a6 79 43 a7 +d3 04 6e 3f 7c 7d 50 b0 9a 80 98 b5 44 69 39 68 +93 cf c0 b2 f0 8f 6c 2b ff 23 50 51 57 5e 6e 56 + +# Seed: +fb 08 48 86 db 37 98 d2 b5 bb 35 a3 b1 d3 af 4f +df c0 45 6c bc 79 7b 96 40 d8 c4 4a 0e 03 4e 40 +37 2b 34 fc 7c 1e 8b 66 01 1b 4e cd fa ec 6e e4 +cd c8 28 cb 1a b4 91 27 4a c1 e3 9f 67 58 7a 55 +47 67 09 b4 02 3f c5 69 cb e8 b4 fd 4b + +# Encryption: +07 78 4e cb 8c c5 ba 02 d2 07 ba b0 55 c0 e5 5d +10 a9 b9 42 70 cc a2 50 ee 75 fa 1b 5a e1 90 b3 +3b 96 96 eb 2e c9 72 b2 6a 0e 94 23 af 16 aa 37 +89 17 62 76 06 0a 76 40 03 21 11 74 82 96 34 03 +4f 97 12 c9 17 10 17 f2 fb 21 3f 25 c1 46 c2 65 +1f 89 44 0c a5 36 e5 33 e3 05 cc 6b 01 13 39 8f +61 b4 63 b0 73 e1 be 05 07 3e 9d 64 bc ae ea 54 +44 b8 20 c6 ab f3 46 54 30 ff 4d e4 a8 bc 0e 75 + +# PKCS#1 v1.5 Encryption Example 3.14 +# ---------------------------------- + +# Message: +f9 1c 71 af 5a ea ca e1 79 e1 6e 87 c9 02 3b a9 +4d 84 d7 51 6c ec 6c 39 89 80 1f b3 e7 ad d0 64 +bd df 92 8b 50 00 94 0b bd e5 39 d6 23 37 9c + +# Seed: +de b2 60 25 8b e2 c8 53 35 21 57 b0 65 26 b1 43 +ba 13 3c 4f 49 bf 3d f2 c0 50 ec b2 c9 ca 32 53 +11 b3 c3 e3 d8 8d f6 c2 4a 89 4e ab 63 74 5b 62 +53 e3 c4 6b ca 17 1a 26 a4 f2 fc 0a b6 2b 8a 2e +63 a0 18 eb 47 01 8c ab 95 1f 59 f0 20 3a + +# Encryption: +0d ff ff 51 97 10 c9 ea dc 53 3b 10 8a 4c 29 74 +fe 53 18 91 a3 41 07 a6 74 27 93 5b a7 20 cd c6 +f6 ee 02 9a 1b 03 68 61 db 14 04 c5 86 49 90 54 +1f a2 42 13 01 a7 b2 48 cb 11 f3 65 b6 a4 aa 94 +6f 22 31 cb b1 47 32 b0 1a a4 a6 0b cb e5 20 ec +6c 38 53 a6 95 8a 93 c5 b6 8b 85 d4 bc 3d 84 15 +ef 8b 1d 4f 63 03 8f 4d 94 2c a6 bc 7a 38 25 1f +15 a4 e3 3b 18 9c 25 0b cf bc 03 15 6e 4f 92 11 + +# PKCS#1 v1.5 Encryption Example 3.15 +# ---------------------------------- + +# Message: +07 90 c0 81 f3 61 c9 5b 59 d5 27 d3 cb 50 71 0e +66 e2 72 59 50 10 25 ed 3f 20 f3 0c + +# Seed: +fc fc 2d 56 cb 92 6d 90 5d b3 6e 1e 2e ff 1f bb +75 d6 53 51 7f 59 e8 6f 71 bc 4b c5 57 26 f0 88 +b8 21 62 44 83 b3 e2 9a c2 1a 49 bd 85 91 34 90 +8e 6c 0e c1 a0 dc 80 79 93 01 44 12 0d 1f 6b f9 +3b c6 27 b9 99 69 b2 af e2 1a 7d e1 0d 96 f6 ef +43 c5 67 b5 e2 38 38 5c c1 1a 5a 2a 13 e1 78 55 +8b + +# Encryption: +7f 0e 6b 34 2d 6a 13 54 66 be 41 73 38 1a c0 4a +ba ab 7e 14 fd cf 51 01 89 87 e9 69 67 16 9a ea +97 78 03 eb b3 24 2a e9 ad b4 6f f5 11 20 93 4b +39 21 46 31 b0 3f 5a f5 bd ea 1c ac d3 28 ad dc +d4 0a 3a 29 96 6b f9 8b d7 c8 c6 fd 0f 4e 8b 97 +2e 2d a1 0c 6c c5 52 05 86 7f 39 04 ed 60 f5 b5 +be df 7c 3b 3c 7d d5 f3 87 54 8f 40 05 67 02 ea +72 01 76 dc e2 06 d4 13 d7 42 3f 94 3f cd f6 39 + +# PKCS#1 v1.5 Encryption Example 3.16 +# ---------------------------------- + +# Message: +93 c4 1a 1a dd a8 f6 93 60 f4 1a 58 ec a0 b5 5e +cb 37 a6 a9 00 fb c7 da cd 9c a3 99 c2 3d 31 72 +61 53 77 ac 0c c6 b0 ed 43 bf 59 7f 21 cd 25 9d +8f 80 88 7b 15 9d 96 d6 61 61 d5 58 9b 95 f1 fe + +# Seed: +99 1a 2a 7c 06 1c 23 a8 eb c9 48 9a bc 1b 4a 64 +a5 d4 e8 38 d9 fc ba 42 88 c0 1f ea d6 6d 59 f4 +96 36 e4 a8 d7 52 4c b8 9d 7a dc 7a f3 f6 1a e6 +b3 9b 58 8f b7 7e b7 02 23 62 ff d2 6b + +# Encryption: +7e 54 a4 32 f5 25 c5 23 33 ab e3 bb 45 48 7e 03 +9a f9 4d d3 ef c3 58 44 dd 8e 83 5e e1 00 61 78 +e2 4d cd 19 fc 07 66 7b 4a 34 f3 bd 77 1d 09 a7 +e2 9f 8c a1 7e 88 d0 29 b9 0d db 5f 28 13 be 99 +00 0d 59 f5 43 2c 46 6a 84 28 75 77 20 4b f7 65 +97 39 27 69 98 30 57 47 66 7f af d8 02 9c dc bb +59 18 39 3c 2c fc e4 d8 4a 92 20 ea 3e 38 19 72 +53 36 f2 5f ee 8e 08 5d eb ed 33 32 d5 dd f1 ee + +# PKCS#1 v1.5 Encryption Example 3.17 +# ---------------------------------- + +# Message: +9e 2a 7b 37 74 b1 1e 62 b6 49 0b 56 51 a0 c1 8e +09 2e 9f ab 8b 22 84 ae 46 43 be c3 6b 26 5e 5b +a3 c5 1a c3 85 b2 c7 3d 22 0b 2d c2 e1 0b 0d 69 +0f 67 94 5a 0c 42 b3 bd 09 d0 a8 a7 + +# Seed: +a1 8b fb 74 f6 de bc ed cf b4 7c 7d 5d bf 10 6e +77 4d 7e f6 63 8e c3 82 18 69 cd 2e d6 2d d5 32 +5f 4e 57 33 b8 bf d5 fa fc 43 e4 16 4e 78 d4 38 +99 4d 85 33 7d 7f 0d 38 f0 ea 3b a3 7f 4f 41 b6 +a7 + +# Encryption: +18 c8 8a ee 25 36 d9 42 f7 62 2a 64 4f ad 6f ec +d3 32 28 c7 ae a0 ca da 0e 53 1f 4c cb f1 c1 f2 +69 cc 95 86 29 a4 3b 97 52 fc af 2b f9 53 ec 9f +7e f4 bb 0e 62 d1 28 e0 cf 4b ab e9 2c 6d 92 84 +9e 98 38 dd 88 e2 b4 68 bd ce fc 04 a9 e4 cb 55 +e2 a5 18 ca 25 9f 9e 81 a4 9f 28 df 34 76 1f 9d +ea 2e 70 59 56 62 62 6c f9 6a c0 5a 7c 8b 10 33 +33 e9 06 e1 32 63 9b 65 a7 66 f4 09 2c 8c a0 78 + +# PKCS#1 v1.5 Encryption Example 3.18 +# ---------------------------------- + +# Message: +0a c5 2d 40 01 f2 5c 2c 9d b9 1c e5 0b dd f0 d5 +91 9e 19 96 2e 83 b0 7c b7 9a db 00 43 6e 13 66 +b0 aa 8f 3f d1 ee 79 6b 23 c8 bc 56 0c cf a4 bc +bd b1 f8 40 4d d6 f7 55 15 20 d7 d9 e2 + +# Seed: +22 ff dc fe c6 f0 6b 1b bd 14 53 97 70 43 a3 4e +dd f8 59 4d a0 22 13 09 14 97 55 42 f2 f0 0e 98 +f3 1e 0d d0 c4 8f 7e e5 f0 9d 6a 52 71 21 ad 23 +37 1c 6c d0 e0 79 0e b7 30 8b bb 08 96 dd 59 0d + +# Encryption: +b2 69 57 c5 62 29 4d e1 f3 93 24 b1 cd 80 3c fc +39 fc ee 2d 3c 9d 13 79 f8 a1 12 07 9d 69 43 68 +f5 55 03 c2 09 4d 98 8a 8a 5b 5a c5 49 be 1c f5 +53 16 04 5d f5 b6 f6 33 a4 ef 1e 1f 01 9b a1 b5 +42 bf 0a 87 fa 3e 5c a3 f6 b6 1c c8 56 61 28 a0 +fa 41 8b 08 25 c9 0e c2 f1 ec 74 e5 87 cd 80 57 +d9 52 96 7a c4 52 1c cd bf 63 26 f3 50 93 00 93 +82 6d 2e fa 05 8e d6 44 15 37 4d b3 20 48 85 ca + +# PKCS#1 v1.5 Encryption Example 3.19 +# ---------------------------------- + +# Message: +a8 00 34 62 f8 06 b7 f6 61 fb 66 46 32 + +# Seed: +c7 43 f4 a6 da 03 ab 2d e5 a7 31 cb 88 d8 ca 9b +61 c7 31 9a 5f 8b f9 d2 37 87 7a 05 d0 f3 68 c3 +60 8a 05 2a c6 ce 13 73 17 95 47 55 42 ea 16 a8 +62 91 3d 04 32 f0 8b d8 c8 b6 ff 81 95 69 1f ee +5e d1 42 fb 9e ca 94 67 52 4b d3 b5 fa 5a 4a c6 +14 3b 0d 38 25 0a e6 21 d4 39 90 9c be 3a 6b 5c +01 fb ea 2d 7a 3f 1a e4 1d 61 fd d6 47 64 14 9f + +# Encryption: +b7 38 e1 c4 29 f8 fc 06 82 fa ad c8 ca 87 ed 8f +16 df 93 0f af 43 b1 99 1a ac 71 d8 8f 26 4c 0d +82 9a c0 3d 23 c2 5f c5 f3 e8 5d d3 02 cb 7b 15 +33 e6 8c 24 16 c5 1a 79 bb cc 7c 29 b0 7e 2e 0e +23 c6 f2 df 0d 07 81 91 7e ba 1a 57 08 62 8e ed +8a 15 b3 b1 84 af 70 0d 0d ab b1 4d f6 0b 09 ba +d2 12 7d f1 80 f4 d6 f7 29 65 87 60 d6 33 c7 77 +5a 7b 59 6d 09 d9 03 49 1f 21 09 6c 34 c3 95 3b + +# PKCS#1 v1.5 Encryption Example 3.20 +# ---------------------------------- + +# Message: +ef 32 + +# Seed: +43 99 cb 04 4a 60 07 6d 18 cc b3 4e 8b 07 8c 81 +8e a7 7f 63 b0 a4 3a bd ec c5 77 81 93 a8 bb ba +5d 56 d0 fc 4e 82 a2 11 51 6b bd ef 44 e7 f4 e7 +fe bb e1 e1 92 3c 99 9a 7e 96 1c d6 ee 1c 41 6a +85 96 e2 4b 63 83 a4 69 93 5f 33 d1 56 fd 5b cf +db d4 27 46 0d 48 66 83 06 1e 41 05 f3 5b 5e 75 +23 20 15 5c 7f 69 ad 8e b4 02 cc 11 06 e0 28 9a +9b 49 65 82 3e 7a 51 cf e4 d2 6d + +# Encryption: +13 1b 62 5e 86 e6 cd 1e 08 ac f1 95 d9 3c d3 a0 +dc 8b a9 e2 dc d6 fc 99 6b e2 17 24 af 17 90 b6 +88 d7 9d 3e a9 a9 50 98 ca bb e8 a5 d4 85 92 e4 +74 6b 0e d2 af 7c af 89 b7 b6 15 2e 38 24 d9 15 +89 ee ec 33 75 c7 1a 89 97 48 70 3a cc 1e 8d 1d +e4 71 ea 75 28 04 0b 79 5f 29 9e 66 8c ec 9f 5a +f3 eb 48 f9 8c 0d 85 20 67 77 3e 10 1f a2 4a eb +6b 40 4d af b4 2e 7a 63 b0 4a 66 bd 0e 9f 9c 94 + +# ============================================= + +# Example 4: A 1024-bit RSA key pair +# --------------------------------------------------- + + +# Public key +# ---------- + +# Modulus: +e9 f2 5e 48 14 0b 5d cf 46 99 e3 03 7f a8 34 f0 +c7 8b 16 73 5f f7 9f 6b 18 ae 60 b5 18 48 d3 06 +99 ec 64 6d 85 7f 15 77 0e 2c 7a 0c 0c 90 0f b6 +04 0b 5f 34 48 4e 9c f5 ce da 23 d5 b2 50 ef 93 +28 6f 01 1e 9a 5b f9 e5 42 e5 c9 f4 42 de 54 58 +e2 3e 41 d1 d9 cd 9f 0c e1 cf 20 08 d3 ea 4d 80 +32 e8 54 cf fc df 5f 69 8d 13 16 e0 29 c4 88 fc +bb 2b e2 9a 4e 7b fb 8e 6e 81 d3 42 12 3e e7 5b + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +e9 f2 5e 48 14 0b 5d cf 46 99 e3 03 7f a8 34 f0 +c7 8b 16 73 5f f7 9f 6b 18 ae 60 b5 18 48 d3 06 +99 ec 64 6d 85 7f 15 77 0e 2c 7a 0c 0c 90 0f b6 +04 0b 5f 34 48 4e 9c f5 ce da 23 d5 b2 50 ef 93 +28 6f 01 1e 9a 5b f9 e5 42 e5 c9 f4 42 de 54 58 +e2 3e 41 d1 d9 cd 9f 0c e1 cf 20 08 d3 ea 4d 80 +32 e8 54 cf fc df 5f 69 8d 13 16 e0 29 c4 88 fc +bb 2b e2 9a 4e 7b fb 8e 6e 81 d3 42 12 3e e7 5b + +# Public exponent: +01 00 01 + +# Exponent: +45 45 88 68 44 53 27 48 60 49 e1 bf df f5 61 13 +a8 aa 45 10 0d ab 07 4f d1 63 94 ec 1a 90 39 b8 +1b 2c b5 81 fe 84 e6 48 b5 f0 32 85 4d d4 fc 69 +f3 61 a0 a3 9d 03 76 13 8c d7 e7 c3 77 84 e2 a2 +f9 d4 f2 66 84 cc 5c c9 f5 12 ba 62 15 eb d2 32 +f9 aa 3d a4 69 db 43 da 1c 06 46 e7 5b 33 aa c5 +70 08 1b 5b 2e 96 ea b7 54 6a cf 93 17 85 aa 2f +d1 82 4c be 2c 5f 9b f5 63 34 ec 15 66 d1 cf 45 + +# Prime 1: +fc df 1c 49 35 8a 1a ac 93 88 c4 6c aa 04 72 fa +35 b2 1b df 99 a2 7b c2 ac 65 46 7b 88 d0 16 1f +bc 70 f3 f4 fa 13 a5 f3 a9 8b 59 c0 67 ea bf 19 +62 16 a1 b8 9e 20 af b2 e5 e5 ed de ae 8e e1 ef + +# Prime 2: +ec d7 51 d3 d3 f3 b2 08 bd 71 8a e4 35 5d 23 f9 +16 fa 8f f6 7d f0 36 61 6b fd a7 cb c8 7a eb ef +aa 7e da 69 1f b9 8f bb 03 8a 02 07 22 01 3c a8 +ee 3d 04 8f 97 ba d2 a2 93 0b e4 b9 6f b7 4d 55 + +# Prime exponent 1: +1d 2f 73 08 50 11 9c 7a 86 9c a6 6f 14 40 67 34 +d1 b5 b8 d9 d9 d5 93 0b 28 f2 97 6b f2 a2 71 ab +40 08 99 5f 90 ed 6b 9d ef d7 91 88 4f 76 1c 90 +45 6d ef 44 6b 9b c2 2b 97 b5 2d fb 21 92 84 29 + +# Prime exponent 2: +4d 50 95 03 c3 83 20 31 3e 36 9c 92 96 e1 0a e7 +3b 9b 1b f7 e9 70 cb 2f ce 63 05 ad be 8a 72 0e +d0 e7 8c 41 18 fc 28 71 72 5c 51 01 27 16 a4 48 +b9 4c ed fa 3a 1b e0 ba f5 a9 c2 46 ce b3 55 e9 + +# Coefficient: +bc 15 f4 7c 0b b6 de 6a 7a 3a 1f e9 28 89 80 9b +4a 3c 0c fa 65 0c 2f ec 36 b8 92 85 14 65 47 a5 +7d 2b 15 71 ac b9 d3 0a a7 91 ec 97 fd 51 fd e1 +ec 26 f5 6b 32 63 da ec 9e 29 2e 9c 17 37 36 4b + +# PKCS#1 v1.5 encryption of 20 random messages with random seeds +# --------------------------------------------------------------------------- + +# PKCS#1 v1.5 Encryption Example 4.1 +# ---------------------------------- + +# Message: +ca 24 72 1c 88 e0 47 74 f4 15 b4 c4 6c a0 fc 26 +d5 bb 53 aa fb 19 92 f6 de 78 5c 76 3a + +# Seed: +fc 7f 85 c1 38 6d c4 3c 3a 28 46 e4 da e4 d9 54 +80 54 45 9d a2 31 82 f9 84 07 9b 07 1f db 5e 6d +9d 0f a0 b2 2e 3d e6 36 ee 5b 25 3a 42 f9 5e ed +44 22 95 6c 70 f4 8d fe cf 0e 55 5b 05 15 7b 15 +6a 55 c8 bc 65 8c d3 b5 39 7f ab 78 d7 11 56 4e +89 c7 e6 24 8a a0 6a d1 05 c4 0c 31 c4 b1 99 7d + +# Encryption: +e3 95 ff 1f a5 52 fc 2e 79 c4 a5 35 58 df 14 00 +f8 70 4e b3 6c f7 cb 05 1b ab 93 15 0a c6 39 6a +dd 63 66 9b 04 24 8b 9d b3 6a 9c 94 f5 19 8c 6e +5d 9a 17 d4 74 ed b2 03 45 fd 6a 78 b5 1d e8 16 +6e 98 ca b5 b6 d1 65 68 b4 1a 8e 93 e4 83 88 65 +d4 bd 9c 51 cd e8 df be ee a5 88 2b 09 dc 70 bc +9f e7 49 b5 d2 4b b7 ca 51 1d b2 c2 b8 29 a7 c9 +14 6c 77 4e b0 bd 7a af dc 5c 38 d3 d7 cd 58 27 + +# PKCS#1 v1.5 Encryption Example 4.2 +# ---------------------------------- + +# Message: +25 c7 bc 4c b2 43 ac 1f 07 40 86 9c d2 6b a8 26 +f3 55 d4 77 c4 aa 6c be 54 3a dd ea 84 44 44 f4 +1c 35 92 bb 3d a7 d4 21 + +# Seed: +27 2b e3 fb cc 76 14 99 6f 1a c0 e0 a5 e2 69 06 +23 bb 0b 69 70 fc de 0b 6f 45 58 ee 62 34 26 fa +60 ad d6 c5 a8 a1 0d 4a 37 51 50 15 36 fe 8a 45 +c5 42 f6 27 f4 22 9f a1 24 57 c1 13 31 13 72 05 +55 2b 01 4c 91 b1 c4 e0 9e 45 96 78 34 0a 74 c2 +85 e2 6a ef b9 + +# Encryption: +76 50 d6 f8 1a ef 5c 0e 32 0e c7 7f c8 9b 7c 3e +61 83 85 0d 10 c9 8a d7 e9 fe ea 47 e3 8c fb 37 +a0 25 db 42 1f b6 d0 05 80 9e 38 bb 3c 51 95 1d +a9 d9 43 3b a7 ef b1 7d e7 d8 fe 3e 9b 9c e4 55 +53 74 ea 66 3a 1b 5d a4 a0 92 29 4c e9 66 98 56 +55 e2 dd d2 0d 7d e3 aa 35 37 05 8c fd 7e 7a 7b +97 fc dd 98 53 79 2b a8 3f cc 89 07 4a 8d 0f 3c +ef df 98 5b 9e 78 ae bf b0 59 67 36 4f 24 11 cd + +# PKCS#1 v1.5 Encryption Example 4.3 +# ---------------------------------- + +# Message: +cf 00 7e bd 23 da 06 97 1a f7 9a a6 34 d5 d2 55 +05 bd 52 29 + +# Seed: +9c f7 23 7e 28 a8 6e 41 8d 66 4f e3 be 7a e3 0e +eb 95 5a 3f 71 02 b2 7d 5f a0 96 74 9c 7f c2 06 +4c 88 0b f3 d3 0e aa 98 1f ce 39 86 a9 10 fe ea +e1 84 c0 10 25 04 8b a6 79 48 96 fc cf f7 4a 59 +42 f9 62 f3 e3 63 71 f6 b3 55 18 29 43 4a d8 d0 +0a 2c 59 7c f6 d4 51 ea ce 88 86 85 38 a4 80 f6 +8c e6 8f c6 85 6e bb 57 dc + +# Encryption: +b6 32 52 af 2e 8e a2 71 e7 06 fd 68 3d 0f 8c 10 +b3 f4 a3 45 c4 f5 b6 78 5b a9 32 9f 44 62 43 c6 +f3 69 e3 0e a8 fb 11 08 4d b9 79 88 e9 c3 87 4b +34 d6 fd 08 71 7d 9e 81 0e 9c 22 43 60 34 6b ec +cd 3e 0e 53 d1 0b 1e d4 58 e6 4f 3f b0 92 f4 8c +b6 6a e0 3b 64 f6 aa 9c 63 bd 27 9f ae 4c 33 f4 +2a 9d 73 bb 39 11 8e b8 7d 25 12 b9 d9 36 a2 7e +d2 e4 49 60 7d bf 0e 3e 22 3a 53 95 26 35 59 9c + +# PKCS#1 v1.5 Encryption Example 4.4 +# ---------------------------------- + +# Message: +ef da 79 e9 c3 36 c2 34 ff 37 b4 f5 8f db d3 1a +f3 67 5b 3d 2b 10 5e af be ad 4b bb ff f5 4e 68 +6a b5 + +# Seed: +30 c2 09 43 f1 bf c4 23 61 d4 d2 2f 51 a8 d7 86 +cb 2d 0d d5 ff 7d 70 5b 30 28 60 18 11 29 3d be +5d 72 c3 55 97 10 ce 0a e9 5d 2f 16 b2 39 a4 ac +84 45 53 7d 48 8e 3e 6d 2c f5 b7 a6 4c 06 c3 75 +6e 11 60 67 63 63 3e db dd bf 26 be e6 51 18 42 +d2 75 2d cd 88 89 6c b8 55 8a 87 + +# Encryption: +bb 91 b2 f6 f4 33 1d 64 d0 73 6a 2e a6 03 29 aa +16 c2 ed 7a 4d 5c a8 d7 84 e6 30 4c e4 84 4c 71 +58 f8 22 d2 af 29 c8 90 97 7d 75 a9 35 e4 3d 93 +b5 be 10 c1 d4 4f a0 0c e2 8e 75 f5 27 bd 84 a3 +be 5a f5 be e9 45 67 c5 5e 15 ee 3e 93 42 6a d8 +d5 0f 06 4c 57 93 ca 38 c4 3a 70 c5 f5 60 74 0b +16 ee a1 6b 7f 13 41 5f 75 1b 3f db 87 7a 88 29 +33 21 f5 0f ff a6 f1 24 94 96 c2 b0 27 a2 18 ed + +# PKCS#1 v1.5 Encryption Example 4.5 +# ---------------------------------- + +# Message: +4a 01 fc 13 c1 d8 6f e7 b2 fd c7 92 f5 28 0f 87 +5a dc 5a e9 9f f9 11 d0 2c 8c 00 3d 39 bb ee 54 +b8 51 ef a3 4b 41 31 be 52 0d 81 00 ef 62 c2 5a +4b 51 7e 9b + +# Seed: +be 6b a5 d1 1d f1 bf cb 2b 84 67 71 b6 c9 df c9 +33 4d a8 6c 4b 7c 25 43 93 18 e8 ba 8e 47 49 2b +cd 51 1b d4 ca e1 67 7d 31 2c a2 2a 94 57 cc 81 +d9 0e 4d 52 4b a2 26 5f 0f bc a1 8e 3c 3f 48 2d +ca a7 88 33 22 39 34 6d 6f + +# Encryption: +16 bf cf b4 2d 28 b9 d1 62 70 cd 13 8d c3 ca 64 +42 95 6a 41 82 5e d0 23 0b 71 09 16 13 33 3a 9e +7c 52 ce 8c c4 b0 bf 29 10 79 41 a0 d7 2c c3 4a +fd 00 48 bb f4 c7 16 c7 3a a9 b0 c7 8d 37 c1 93 +71 9e be 03 a9 31 74 53 b5 53 d4 f5 b3 85 d1 41 +fc 3b 0e d1 9b 96 dc 35 0d fd 4d 12 e3 dd 03 ff +18 39 d4 78 2c 6d fd 5f df 59 71 f3 dd b0 e3 12 +a9 16 06 f3 13 73 02 0d b3 a7 6d 04 fd 6d 65 d6 + +# PKCS#1 v1.5 Encryption Example 4.6 +# ---------------------------------- + +# Message: +7a b0 6e 19 69 22 c0 + +# Seed: +de 0d 60 33 c1 e9 6b 5f d8 31 21 4f 30 d8 1b 8f +d9 a2 69 3e 5e 8a 36 ea ff d0 39 e7 47 3c 28 ee +43 a3 91 6c 78 c9 a1 12 95 8a 94 ce 67 1c cc 40 +d9 7e d4 18 7a 3f ff a0 dc 12 9d 88 a8 b8 c4 96 +6e a3 94 a9 10 89 61 25 f5 4d af bb 3b 17 b9 fa +10 c4 82 20 09 64 90 c6 f7 5b e2 51 83 e9 98 4d +f5 e4 d7 eb f9 47 5d 11 ea 39 33 5a c7 2f 93 d3 +33 bd 74 22 19 42 + +# Encryption: +54 18 23 f9 05 57 6d a1 42 e2 65 d8 90 45 ab 66 +20 fd 1a 74 c9 53 3a da 4b c7 b4 3d 95 62 9a 31 +18 6f 4e 89 89 20 83 d2 54 9b 0e 63 8b df c0 d2 +7e 14 ec 18 c4 5c a3 58 61 df e6 12 a3 a1 ed aa +fc 72 fb 46 81 a9 9e a6 e6 48 be 89 62 f1 56 1e +75 0d 14 49 f2 3f 43 0a f9 30 72 25 54 4d 8a 8b +89 65 af 5d d1 8c b7 89 53 ce 6d 16 d8 5e b2 11 +af 0c 64 68 a2 af 9f 72 e7 86 61 b0 fc aa 48 15 + +# PKCS#1 v1.5 Encryption Example 4.7 +# ---------------------------------- + +# Message: +9a da 9c 10 b8 ae 22 + +# Seed: +cc 23 43 72 4a c5 0e e5 47 08 fc 5f d0 3f 09 a1 +cc 12 22 a4 4b cd 44 03 87 7c 6b de 86 bf 43 e4 +2c 10 84 f6 ef ff 20 fa c0 ac c3 1e ca 17 c7 38 +d4 68 68 73 65 52 fd 2f 7e 93 b8 22 25 61 05 4e +6d ad c3 15 60 4e af 8f 77 f0 5d d8 58 3a 93 bf +03 cb 9c c2 13 9b c4 19 bb 10 e9 b2 01 b2 a7 e1 +8b 03 79 0c c8 3e d6 05 d6 d5 66 33 05 34 71 39 +c7 5e 1a e2 a5 6a + +# Encryption: +9f 54 d0 de a0 5a 5d 00 72 23 5b c4 67 93 cf c4 +7b 00 6d aa ac 02 41 c7 e6 6d 33 3e 23 c3 cf 97 +63 b6 1d 9e ea dd d8 3f 5d 7f 0a a9 7d 16 c7 69 +92 55 cf 7e 48 72 b6 a0 07 95 62 d2 60 7d 64 40 +d7 ed 37 c6 71 3c e9 66 43 a4 41 f8 39 55 64 d2 +6a de a5 82 3a 49 42 da 4a b8 e4 7b ed 58 81 b9 +d1 84 05 79 57 df 65 39 e4 36 da 35 e3 0a 25 3a +f1 2d 54 1d 4b 0e f8 3c 5e f3 c1 35 ab 95 94 9a + +# PKCS#1 v1.5 Encryption Example 4.8 +# ---------------------------------- + +# Message: +d8 12 6f 4a 88 78 97 82 93 11 76 51 b3 0e 79 22 +d1 4a cf + +# Seed: +ad f9 b0 a9 15 2f 0e 6e c6 f4 39 59 71 ad 40 3f +02 e7 fa 98 f8 15 56 0a fa ff a7 ca d5 b4 47 4b +6e ce 65 ed ab e2 7e c2 4a 0a a4 73 ed 75 a6 1f +5c 24 90 a5 36 b1 a4 df 7b 03 41 77 37 c5 34 e1 +d4 5b f7 26 94 38 6b ee 82 0c 48 db d1 83 17 bd +61 7c 04 b6 a4 17 e3 0e ed 79 58 8d c2 3f d4 db +a1 37 44 b4 b2 aa 5a f8 0a 8a + +# Encryption: +3b 2b 85 ed fc d7 c7 c2 7b de de e1 c2 8a b6 18 +7a bf 1c 96 d9 45 30 07 92 cf 8a f1 97 c2 f9 a3 +91 b4 8b 83 32 cf de 7e 4c 7d c3 4c 42 30 29 56 +92 ce fd a5 ef b2 57 35 49 2b 9f f7 84 c7 ba e7 +35 11 c6 18 e3 aa 7b c8 7b c3 13 f2 67 09 a8 ea +4a d7 3a 34 9a b9 e5 ad 82 6c 96 ad 0e ca 97 e3 +13 28 6b cc bf 8e 33 c9 1f 03 68 39 b9 94 8b 4e +b0 c3 8e 21 3e f4 7f 77 66 1a 27 f8 cf e4 99 03 + +# PKCS#1 v1.5 Encryption Example 4.9 +# ---------------------------------- + +# Message: +f5 df 01 af e6 a9 22 51 8b 3f 4b 80 cd 4f ca 73 +b9 7b ab 61 71 6e 27 d2 51 bd 46 5f 4b 35 a1 a2 +32 e2 da 00 90 1c 29 4b f2 23 50 ce 49 0d 09 9f +64 2b 53 75 61 2d b6 3b a1 f2 + +# Seed: +6b f2 81 0d b8 fb 26 93 98 41 2d bb 88 06 02 82 +d4 5f be 96 27 33 7e 54 34 26 1a 5d bc 19 3a d6 +18 c1 1f 7b de c1 de 25 05 f8 60 37 fc 18 51 bf +6f b4 9d 23 60 62 73 47 49 9e fc 98 e2 92 05 da +90 6d 32 + +# Encryption: +40 12 fc c5 cf b9 78 de f8 8f b8 f8 17 4a a5 b4 +a3 07 75 ac 45 59 f0 b2 f3 d3 b4 38 9b 82 8a 79 +d1 40 25 10 c9 a0 33 7d 48 9d 11 82 ab 31 c8 38 +ac 7c 80 b7 48 60 9a 2a a5 37 da 7a cc 3a 4a 7a +31 d2 ad 25 2b fd 59 28 0b 3d 18 13 a2 6f 93 c5 +9e e8 c5 ee 68 87 18 f4 27 83 93 fe ce 32 3a 9d +ff 83 37 55 e8 9a c8 ee 1f a2 90 4b f2 4c df 4f +01 e6 ea ed b6 a8 ef 01 f4 07 be f3 30 9f 03 39 + +# PKCS#1 v1.5 Encryption Example 4.10 +# ---------------------------------- + +# Message: +a3 82 3f af + +# Seed: +94 f6 70 fd 82 f6 91 32 75 ee a4 c6 71 16 ca aa +bd 33 57 8c f8 4d 22 63 64 38 a6 fd 7e cf ee fc +0b 18 7d ec f7 93 89 1c 6e 4c fc 52 b5 67 d8 72 +bf fb ee 0a 67 47 2a 1a 48 c0 f1 ba 59 8a d8 25 +89 01 c5 6a 55 92 f1 41 14 7e 81 33 9d 74 7e 06 +32 de f0 0d 3d be e9 5c 4e 43 21 cc 25 b5 31 14 +47 a3 02 c5 34 92 9c f7 e5 34 f9 ae 67 f4 1e 01 +e2 2a 3d 7c e4 1b 3b 31 35 + +# Encryption: +7b 60 25 42 b6 4f 0a 1e 0e c2 aa 01 cb ed 37 7e +33 1e a3 ff 86 f3 56 fb 7a 58 83 76 4b e4 cb f7 +d0 75 4c 58 29 64 31 36 f2 57 23 36 a2 3f 15 41 +1d 83 85 14 a1 43 87 24 ad 74 09 e8 ec 8f e2 63 +41 ae ea 56 68 34 5d 0d 82 3f b5 c2 1d f4 59 e8 +bf 7c 15 b8 0b 07 2e 5f 8a 84 65 a4 4a a9 d0 9d +82 5c 03 15 a0 ec d2 d6 49 70 2b 10 9b e8 fe 35 +eb 22 84 3a 20 e7 fd 87 4f 1c 6b 46 a8 0b 68 df + +# PKCS#1 v1.5 Encryption Example 4.11 +# ---------------------------------- + +# Message: +75 b9 a4 a0 bb 2d 46 43 e4 78 f6 54 f2 cc 1a 8c +1b b4 67 19 76 0d 45 41 a8 a7 33 f3 3b 71 3d 32 +c6 0b fd 35 f1 61 74 83 48 47 e8 81 2c bd 7f 06 +ce 72 89 f3 72 c5 82 30 f2 b0 01 45 9b 5d + +# Seed: +49 a7 3d eb 93 e3 f1 be aa ad 3a 19 9a 70 56 9e +09 9a fa ca f7 a7 5f c4 ce 64 8f a8 2e af 2a 0f +e4 11 d2 64 fe 45 f7 45 25 c9 1f 3c 75 10 17 f8 +0a 02 ba bf f3 57 99 62 6f 2b 8d db 9f 36 91 + +# Encryption: +e5 ae e7 0d e8 62 72 3c 51 73 df fb f6 92 6c 3d +33 16 d5 90 9c f5 a1 d6 63 e6 80 ab 2b b5 76 e3 +5b 93 fd 43 27 43 a1 8e 8d b4 fa a3 32 f4 46 68 +a3 d1 9e 5e 69 57 32 f8 4b bd 86 d0 dd ed 76 65 +b7 0b 97 63 2e ab e2 36 4c af ef 7b 74 dc d1 bf +bd 62 5e 2b bb f6 65 4c c0 26 61 81 ac 0a 75 7c +3f ba bd 43 0a e8 63 71 eb 56 af 61 0f 77 cf 2f +ff 6e 24 8f 8c 57 91 60 b9 1d ce cc 0d 20 2b 50 + +# PKCS#1 v1.5 Encryption Example 4.12 +# ---------------------------------- + +# Message: +15 06 eb 34 91 78 5a a7 21 06 bf 6c 85 d0 10 02 +04 6d 1c 16 d4 35 dd 4e 7c 4b 7e 8e 90 dd df 16 +33 2f 94 f4 b8 35 d0 e4 ad 55 d8 3a 81 b3 5c 54 +b6 79 d3 cf + +# Seed: +f6 6e 6a 84 75 84 40 86 e2 84 77 22 97 46 80 1d +43 50 d9 ad 07 68 f3 c3 d8 fa a8 10 7d 95 fb 20 +5e 4b a8 c6 4b 73 8e 54 e5 ac 0d fe ab 99 6d 61 +12 5c 26 79 80 72 59 bc 9e 47 d8 bd d2 c0 40 95 +05 44 8b bf 87 2b f6 64 7a + +# Encryption: +d1 fa 39 52 cc 61 45 ff 77 1b 6c 5a 68 27 5b bc +22 d0 03 92 03 66 17 37 5f 0c 2b ec 3e 28 85 83 +ec fd c6 df 6a 82 8d e3 7f 77 c5 56 a8 cb c4 d4 +43 36 e8 d2 e3 05 87 e3 31 58 73 17 e9 7b 05 a3 +fd 78 02 5b 2d 49 6b 3b be eb 6c 72 5d 9e a5 61 +a7 32 28 82 33 d6 8b 79 49 7f b0 b6 fe e0 a6 b6 +8a c3 13 66 1b 4b 65 47 39 f9 18 f6 fd 3b ff c1 +7c 1d f4 1f 01 44 95 d5 5f 95 90 14 7b 82 d1 5d + +# PKCS#1 v1.5 Encryption Example 4.13 +# ---------------------------------- + +# Message: +9e 3e + +# Seed: +9b 3d df 17 cd 74 e7 6c 69 b5 ca 3a 01 0a 0e 0f +bd 17 05 d6 9c 30 74 35 3b e7 d3 c0 c2 05 f0 99 +c7 a8 10 b7 a1 ad e0 9f 5a 03 6b b7 69 ef f5 3a +53 d4 c6 f8 71 52 92 2d 9a 7b 86 ed eb a3 72 37 +d7 f1 73 4d 9d 97 39 38 3f 48 80 af 3a d6 88 87 +e0 fe 7c 87 a1 74 fb 32 38 b1 e5 1e ad 2a 84 34 +40 c2 b2 7f 22 dd a4 22 8d ce 70 f9 1c 98 d4 71 +a8 74 4d 27 65 55 79 58 81 02 44 + +# Encryption: +42 12 6b 49 2a 1e 7c c0 33 95 b2 ac 70 33 cf 6a +67 36 b1 2e 76 82 5a 17 3b 9e 01 1a e8 bf ed 44 +fe cb 8d 9f 58 cc e1 99 11 fe 42 d4 55 e2 49 20 +09 32 a9 b6 8f e2 e4 19 bc 63 9c 11 78 d1 1f fb +db d9 95 5d 45 9f 5e cf e0 90 20 09 8e 29 7b 8e +91 48 5e 94 bf 11 e7 bf 77 ed f5 a2 70 11 c8 2b +92 73 65 a1 2c 9c 77 c7 e4 9b b7 fe 2f 61 33 39 +de 3f 51 20 87 79 53 86 ca 58 5a 70 24 78 27 90 + +# PKCS#1 v1.5 Encryption Example 4.14 +# ---------------------------------- + +# Message: +70 aa 78 a4 d3 7f 74 c1 81 aa 27 40 7f 2f 9f e6 +63 a9 1b 16 be 9b ea 6f c6 12 88 7f + +# Seed: +d0 fd 16 c0 f0 d7 90 9a 38 86 17 08 11 e4 4f 24 +fa df 94 ff 17 03 9a 56 84 a0 9b 24 e1 93 3f a0 +c4 71 51 63 5d 75 7b 73 c2 3f f3 91 01 cb e2 52 +9a 63 a7 f3 a0 19 5b 6e 47 51 07 11 de 17 1a 16 +56 c9 ea b3 cf 82 d1 c6 52 26 b5 8f d0 fe 58 ec +31 96 24 7f 34 b1 a0 55 27 02 dc 03 75 12 c6 81 +04 + +# Encryption: +95 36 d4 7e 1d 68 7f 1f 24 99 6c b4 6c e9 46 ae +54 d4 a1 49 b3 4b 5b c3 44 43 a2 01 51 83 87 f4 +b6 38 18 37 cb 7e 4b 0a 44 75 13 70 42 f1 44 8c +1e a4 15 15 ef 31 c2 fc bf 62 e7 e9 58 67 b6 74 +ac 23 0a ed 9c 7d 8d 61 c5 27 52 b2 fc 2a 0b ba +fc 77 b3 1c 51 49 30 de 98 23 b4 38 b6 fa aa 40 +d2 55 31 03 3c 66 48 3f a0 02 3a f2 1d a6 4f cc +8b b8 c5 d5 2d 3f 6c 43 80 f1 d6 08 d8 c0 11 8f + +# PKCS#1 v1.5 Encryption Example 4.15 +# ---------------------------------- + +# Message: +01 16 a4 61 77 73 b6 dd b2 19 16 1c 4f d0 71 93 +7b bb 07 15 cc 62 7c 17 b8 e7 52 80 d9 9c dd 41 +6e a5 cd fa 09 06 b9 af 0a 20 cd 47 7f dc ad 14 +15 a1 9a 9d 1b 96 fd c3 c0 ed b9 + +# Seed: +86 b1 58 60 9b fa 08 a8 ed e4 ef 3f 23 e1 2e b5 +0d 24 55 74 26 4d 76 4d 87 12 67 db 8a 95 24 ea +3f a2 e3 84 5f fc 29 1b da 98 99 89 bf 71 5a a2 +b0 8c 49 79 8a 81 9f 68 58 d9 fa 35 f9 4d f3 c7 +e0 86 + +# Encryption: +74 a3 df 38 5d 20 87 7b ca 9d bc eb ca 2e 53 2c +6a be 95 62 d6 81 7b e1 6e 11 8a 60 f4 ab 0a 1a +c0 a8 46 66 53 a8 f8 17 0e 35 fc e1 4b 44 9c d5 +9f 55 8e 02 0a 89 88 94 bd 2a 71 75 58 e6 65 0f +3a 12 85 70 d8 c1 69 a7 74 66 63 c1 d7 ef 62 14 +5f 4b 75 c5 fe b6 38 6f db 85 33 94 c6 59 a9 1a +a2 aa e0 3b ef 91 13 dd 49 28 ff 28 b3 80 92 7a +d1 ba 4e 8a 37 ed d1 72 ef e8 e9 ea bb 61 4d 83 + +# PKCS#1 v1.5 Encryption Example 4.16 +# ---------------------------------- + +# Message: +15 c5 fc c7 54 7d 63 76 1f 6a f1 f2 6e ed 9b e8 +13 4f 9f 92 12 7e 76 b0 3a 33 a9 7b 9b e3 f7 8b +2e 22 fc 7c 85 06 99 a1 5c 0e 0e ce be 2a 71 80 +5f 02 4b 93 88 a3 bd b2 b3 60 d6 9c 5c 0c 46 + +# Seed: +5b 4f 17 a9 de 91 73 7a 7f e8 54 e8 a1 76 be 5a +0a 16 fc 10 42 cb 87 0c c0 18 92 fc d3 8e a7 5b +07 3c 0f fa 01 4f 96 a3 58 e3 aa 5e 73 ea f8 a9 +1f ce 75 47 0b de 64 e8 7a b8 91 ba 3b f2 + +# Encryption: +73 62 d7 39 8d 0c 25 1f 83 58 17 e4 79 37 a9 25 +58 36 ca 02 30 45 7f f6 08 b0 78 d5 09 31 a8 80 +33 ea 76 50 81 12 65 f8 e2 68 b5 33 15 d8 43 8e +52 a6 a4 b1 b3 89 5d 30 c3 da e1 1a 3b 8e a8 c3 +0f 05 e9 d7 1d ef 46 d4 51 11 92 a1 0f 54 21 8d +39 36 cb 17 98 3a 1e 7a ff 18 18 89 39 b9 46 92 +76 49 b0 fc 4f 7b bf cb fc 14 e1 c0 ec a0 7d 00 +c9 03 db 78 16 9c 50 ef 0a 38 f1 da 19 ae 44 59 + +# PKCS#1 v1.5 Encryption Example 4.17 +# ---------------------------------- + +# Message: +7c ad 18 f1 75 13 87 42 28 5e 90 35 d1 3a d4 1f +c3 a8 52 10 e1 54 4e 24 de a3 fc fe 66 + +# Seed: +9a 06 ca 10 fc c6 61 0e 77 df f9 0d d1 76 f8 2e +3f 96 e4 a9 d7 ab 87 2c 74 8e d4 22 f3 4b 33 48 +61 94 40 f0 aa a2 2a 66 98 51 da c8 89 4a 8e fa +34 ea 2c 2d a5 e9 58 69 e0 ad c0 05 a4 9b a4 58 +18 ca a4 74 11 5c 34 49 96 6a 85 c4 18 fc aa 8f +45 63 0e fe 0b 1b 4d 3d 69 be 1b c0 06 8a a7 99 + +# Encryption: +1e fa d4 14 46 b9 1f da dd 8b 80 61 9f 68 27 36 +68 b7 58 5f d9 1f 34 49 ec 85 c2 42 d0 84 9e 4a +53 a5 97 7b 61 aa 40 d1 2c c4 85 ec 7e 4f f2 0f +98 86 91 cb 9d 73 af 46 ea 37 6a fc 69 ba 22 33 +86 e9 f1 5d 03 26 97 da 75 e2 f9 52 be 2a f0 62 +e8 24 6c f7 49 b8 9c 4c bc d6 4e 23 f8 82 bb 55 +3c 3c e3 05 20 36 22 b5 a7 39 77 35 a6 34 aa b0 +d1 7e f9 b5 55 9d dd 34 f4 87 2b 56 e7 98 6e fc + +# PKCS#1 v1.5 Encryption Example 4.18 +# ---------------------------------- + +# Message: +fd 98 c3 8b e3 19 30 70 b5 c4 33 4b 11 c2 5b 33 +4a 44 + +# Seed: +f3 57 91 11 03 e9 87 d1 a9 f1 5c c2 e5 2f 42 39 +0e 0f aa 50 02 c4 f1 7d 40 a4 af 50 f3 1a 23 17 +50 e7 af 61 d9 af df 9c aa 38 61 a2 0d c7 21 89 +58 61 fb 11 8e 08 8d 32 18 e6 fb 35 56 b1 62 d6 +bd 67 91 1d bc 94 21 98 42 65 82 72 a5 d4 9b f5 +ab b4 a0 87 94 95 c5 e6 e6 86 28 59 29 a5 5a 36 +8f 52 4c 14 a4 0b 0c 61 38 0d 0e + +# Encryption: +de ae 18 3b 56 c3 fb 38 41 ea 57 42 34 ac d3 0a +ff 00 d0 05 1f 57 80 37 58 a4 71 4a bc be dc da +8b d1 a4 8a 98 01 53 df 89 6b 13 76 aa 4b 45 95 +80 13 d6 19 be 7e af f6 c1 a6 75 e2 92 ef c3 f4 +39 3d db de ab 47 e8 90 a7 8c ef 69 00 24 49 57 +87 48 90 6c 10 21 b8 91 b9 43 d8 18 d3 a6 1e 67 +a3 15 61 2d 4c b1 cf 19 7c e5 df ab ef da eb 59 +0b 8e 8c 73 68 5e 74 7e 59 a3 95 c8 45 c5 d0 c3 + +# PKCS#1 v1.5 Encryption Example 4.19 +# ---------------------------------- + +# Message: +96 53 d7 94 69 f0 5d 40 19 65 a9 5c e8 74 fa 22 +5e c4 79 74 e8 d0 68 41 c1 3b 47 85 e0 0d 54 7f +9d 31 44 c3 87 9e 6c cd af 78 7a ef c2 f8 45 2a +4a 3c 88 4e 38 ee + +# Seed: +85 5d 6d 15 12 e5 43 a4 5d 3a 9a a9 68 5d 5d fd +a7 04 79 ba 39 52 63 64 14 1b b6 36 27 45 89 85 +71 20 01 22 f4 bc 82 c6 22 43 45 c6 9d 3e f5 42 +f1 23 bd e3 01 5b 60 c4 c0 ff b9 8d 63 01 31 ae +e8 1f e4 a0 b0 15 38 + +# Encryption: +69 ca 62 e2 9a 5b db 4b 04 e2 40 16 21 2c 25 91 +40 a6 0c fa 81 eb 66 93 bf fa fc 9f 60 0d ce 10 +82 2a 00 7b 6a de 93 fa cd a1 b2 b1 65 b5 57 76 +0f 0a 67 5a c9 bc b2 06 b9 64 fb 90 cf 6a 2c f9 +9f 18 6b 36 d2 eb 99 1d 82 53 a0 75 4f 9c c2 d7 +2d e5 49 ab ae 90 94 f5 a8 6c e1 db 49 4d bb 6e +51 62 86 71 5b 3d d4 05 59 b3 10 7b 95 24 b7 29 +ac 65 4c fb 40 f9 ab 35 d0 34 e0 27 19 7c bc 36 + +# PKCS#1 v1.5 Encryption Example 4.20 +# ---------------------------------- + +# Message: +0b df 3f ce 8e 48 7d b2 2d 07 60 ab 71 15 86 ca +8e 45 9c 39 4f f8 b1 a1 86 70 67 a9 31 51 99 a8 +01 24 74 b0 f9 0d cc 87 cb + +# Seed: +c9 b7 8d ce 9d fd 7f 04 04 ff 98 2e 06 b5 96 50 +ba fe 31 ea 19 bc 1f 2e 1f 39 89 f4 ce fc e4 6f +c6 52 42 3d b3 c9 9d 92 a8 fb 58 f3 ee 39 3d 55 +5b 76 84 88 9a 4b f8 15 a1 3e 3b 9b f2 43 71 40 +66 b9 07 58 90 67 50 47 f1 7e 93 5b dc f0 e6 6f +cf e3 9b cf + +# Encryption: +43 ad 3e 62 5f b1 72 15 57 8b ef 2f 46 5f aa 72 +ae 69 43 83 36 9f f7 aa 15 12 01 a3 f2 59 c8 d8 +ce 8c 16 bd 25 52 21 49 f6 66 e8 d6 92 a0 79 5e +a7 15 69 d2 88 1f 97 07 08 5d 3f 59 bd fa 28 73 +66 d7 f5 a3 f7 6e a5 dc 10 9f cb 03 30 2d a0 b7 +86 99 71 3e 0d 30 09 58 4f 97 17 6c 1b 9b a6 3e +80 cf a8 fd 4c 01 3d 74 b5 fa de 84 72 d5 2c 11 +e2 e9 36 81 ba 19 d3 53 d3 1c e6 fa 3c 0a b6 0d + +# ============================================= + +# Example 5: A 1024-bit RSA key pair +# --------------------------------------------------- + + +# Public key +# ---------- + +# Modulus: +ab 29 d4 9c dc 92 5c 69 ca e7 52 92 fc 03 62 03 +73 c6 fb 36 d3 c2 49 dd 5b b5 0f 88 1a 4c 93 89 +af e7 3e 8c 56 b8 d6 67 a5 ea f2 b5 71 4a da f4 +ca a0 06 a4 9a c4 bd 4b 91 d5 45 cf 3c 10 00 9d +31 8a 9d e0 f3 bb d8 38 4e 8c 7e 96 ca 15 95 e3 +2a 70 41 d1 68 ca a7 34 43 b8 85 bf 7f 61 4a e1 +21 2e 3b 5a dd a2 9d fa d5 01 b8 b1 a8 1c 3f 48 +a4 56 e1 33 ad 52 da 2a bc e5 d6 e7 82 f2 75 c9 + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +ab 29 d4 9c dc 92 5c 69 ca e7 52 92 fc 03 62 03 +73 c6 fb 36 d3 c2 49 dd 5b b5 0f 88 1a 4c 93 89 +af e7 3e 8c 56 b8 d6 67 a5 ea f2 b5 71 4a da f4 +ca a0 06 a4 9a c4 bd 4b 91 d5 45 cf 3c 10 00 9d +31 8a 9d e0 f3 bb d8 38 4e 8c 7e 96 ca 15 95 e3 +2a 70 41 d1 68 ca a7 34 43 b8 85 bf 7f 61 4a e1 +21 2e 3b 5a dd a2 9d fa d5 01 b8 b1 a8 1c 3f 48 +a4 56 e1 33 ad 52 da 2a bc e5 d6 e7 82 f2 75 c9 + +# Public exponent: +01 00 01 + +# Exponent: +07 7b b2 73 32 34 86 ec 4c 25 ed 67 06 34 1a a8 +a6 7a ec 58 43 0d 53 3f e5 86 c6 b9 4f 57 0a 3b +42 90 c4 5c 0b dd 94 68 1f 29 a4 b7 58 8e ea 80 +39 cc a1 c5 b8 0b 82 70 27 9d d0 a9 c5 09 39 11 +93 e3 d5 c2 5c 10 75 c4 a1 d3 dc 32 74 06 6d ab +81 7f b5 1b 16 bc 26 7e d9 a9 98 0f fb c0 92 85 +d9 7f 11 2f 15 26 95 e6 e0 9c ae 72 bb 55 06 6c +b9 db d0 98 a7 5c eb 47 b4 62 72 00 5c 6b d2 15 + +# Prime 1: +e9 4e a6 b6 19 be c3 e4 78 87 8e 87 8c f1 23 b7 +a9 f1 2c ab b1 95 e0 aa e0 22 f3 17 73 46 69 31 +38 b1 1a 86 fa 5c b7 55 5a 10 b8 e4 62 2c e9 52 +0c 57 2b ef 29 1d f7 0a 16 d8 85 f5 97 e5 90 4d + +# Prime 2: +bb cf cc 5a 60 95 34 ee 43 4a 6c bc a3 f7 e9 62 +e7 6d 45 5e 32 64 c1 9f 60 5f 6e 5f f6 13 7c 65 +c5 6d 7f b3 44 cd 52 bc 93 37 4f 3d 16 6c 9f 0c +6f 9c 50 6b ad 19 33 09 72 d2 1c ac 19 ce 99 6d + +# Prime exponent 1: +e8 a6 0d 88 39 54 09 73 a2 dd 4a 3b d1 48 05 1d +f8 d1 0e 82 87 ab b5 45 b0 0c 29 ec 90 7e fe 16 +9f 39 bc 02 2d 56 97 5a fd 5c ff 82 7e 83 da 86 +7e d7 ce 6f c6 c8 a2 b7 e4 e0 35 75 19 eb 49 61 + +# Prime exponent 2: +8f f2 e2 27 37 35 c5 5f 05 56 6a e7 5f 29 a9 c9 +33 a6 2d ef d7 e2 20 01 7f 05 45 fc e9 07 e0 65 +c4 9f 7b ac 34 84 c6 f0 60 49 99 43 32 07 c9 13 +e8 0b c0 1b f7 8d 83 ef af 00 da 17 12 a4 a6 35 + +# Coefficient: +5f 1f f9 6a 8a 90 19 78 4f 92 26 e2 5c 9b fe 25 +08 02 39 43 73 90 25 dd 6b ab 03 7f f4 7d c6 42 +49 85 15 c2 f9 e6 ff 60 60 c5 b7 d2 34 30 d8 d5 +0f 1c 0f 6d 50 c1 80 b4 ae a8 a4 a8 2f cd 2b 74 + +# PKCS#1 v1.5 encryption of 20 random messages with random seeds +# --------------------------------------------------------------------------- + +# PKCS#1 v1.5 Encryption Example 5.1 +# ---------------------------------- + +# Message: +5d c9 f8 b1 2d c8 12 a0 9a a4 b0 6d fc b5 7e 1d +2e 8d 1c 7d 2c 07 6b 25 d5 c1 8e db c0 46 bd 63 +c7 ca 4a 59 9f 18 de 26 f3 be 73 8c c2 8d 16 67 +2c 00 6e 4d 9c + +# Seed: +43 d6 05 a5 74 0a 97 0b 32 37 27 af 35 2a 1b d4 +8d e6 9d 95 05 e2 2c 2f ad 03 0c 3b 84 b6 de a2 +d2 2f 91 64 06 a7 69 3c f5 06 c2 d2 51 88 6f 02 +20 3e 3f 76 55 a3 0a 68 37 af 8a 8c be c7 b5 c9 +2f c0 4c 8c 18 df e9 d3 + +# Encryption: +21 5a 35 f4 c0 43 5b 07 ed 5d 2c 4b 68 65 bc 28 +1c ea 70 50 cf ea 7a 7e 86 e0 3f 8a cb 28 b5 8d +be e6 54 58 91 9c ea a5 a3 3e dd 98 20 1e a6 e7 +63 2d 76 22 d5 a5 1d 35 a3 5f ed e8 6e f2 03 ee +f6 eb 34 75 ec 8f 19 e6 9c 0e d5 2c 05 dd 7d 59 +e3 53 f5 2b 67 10 af 40 26 65 55 04 10 7d db 86 +f9 57 e6 c0 6b a6 7b 1f 4f c9 f1 21 e1 5f 82 73 +67 09 d2 de 8d 77 43 2d f0 8d cc d2 a0 cc 77 04 + +# PKCS#1 v1.5 Encryption Example 5.2 +# ---------------------------------- + +# Message: +d7 74 07 d8 f6 9f 80 dc 08 eb a5 f4 26 28 2d e7 + +# Seed: +b8 29 c7 89 be 38 1c d5 9d e2 14 89 db a1 41 e0 +bd 1f a8 a3 c3 82 6d 59 c6 d1 10 e7 df 72 42 ba +98 c4 7a 43 92 c7 f2 ac 1c 6e 9d ae 22 b9 eb 74 +a7 64 36 08 8b d0 ba 6e 19 91 e1 9e 3a f7 9c f3 +f7 de fb 6a 11 61 80 25 34 ba 0e 7e d1 65 34 93 +88 72 ec a6 77 05 8a c7 34 67 d4 9e d1 12 5b 50 +df e5 d6 d6 5a 5d 24 53 99 b6 bf 1b f1 + +# Encryption: +2d 48 06 cf af e4 af 36 bd 02 f6 2d 6a 43 b0 0b +41 6f 70 8e 96 85 b1 7a c8 e3 a4 d8 c2 91 80 93 +05 76 9d 78 98 f6 fc 85 91 7b a2 fd 8e 58 9f f7 +a8 bb 84 bb 7c 12 20 2e d2 79 e0 64 09 a5 c0 a7 +d3 24 bc 46 ae 4f 92 82 c9 02 3d 3d fb 3a 79 15 +de fc 16 4b 3f 08 26 6a cf 12 41 f8 26 24 98 15 +07 41 4e 56 29 78 35 1d c8 b7 a7 9e f5 31 40 21 +01 a8 d3 d3 ea a3 53 9b bf 62 aa d9 9a 3b b1 1e + +# PKCS#1 v1.5 Encryption Example 5.3 +# ---------------------------------- + +# Message: +23 8a + +# Seed: +a5 88 1a cf f3 52 9f 25 1b 1b 9c 61 9c e9 f9 df +91 e0 a0 3d d8 89 16 36 46 87 1a 62 72 07 ee f1 +47 68 0c 32 f4 50 a7 76 e1 9f 54 ec 05 5d c6 8b +04 bd 4d 89 37 6d f3 ea fa 6f ca f6 0e b8 31 84 +39 10 b6 25 b6 4f 25 d9 29 9a fc 30 6a 23 76 53 +80 45 51 94 b7 5d c0 13 5d 27 c3 b7 d7 2d f9 08 +77 5c 7e 90 be fc 0c 5a df 74 a1 69 ed 58 68 f3 +d6 34 32 7a 05 78 18 92 54 45 43 + +# Encryption: +77 10 ee a8 65 7d fd 15 65 16 65 62 df 0e 2e 84 +0e c3 e3 de dc 0b 80 2b b0 21 3e 47 a5 ce 97 f4 +b8 5b a9 ba 14 19 77 36 3d 8f 54 b0 6d 57 8d 5b +2a 96 e9 69 cf a9 15 df 21 9f 00 2a 85 d0 32 57 +04 7b 31 16 a1 c4 dd af 79 1d 93 98 2d 1b 9f fa +24 31 86 e9 e2 b1 9e f0 74 1c e9 8d e2 a4 a1 58 +6e 50 12 c4 81 de 23 a0 ef f8 82 fd 62 38 38 d2 +01 1f 4f 63 73 8a ff d7 ef b8 c5 0f 46 a6 c2 0e + +# PKCS#1 v1.5 Encryption Example 5.4 +# ---------------------------------- + +# Message: +25 a2 7e b1 b2 1f 10 cf 9d 57 1c 33 05 61 0b 97 +f0 da ee 39 90 5c 65 94 bf bf 45 2a 9a 00 d9 e8 +2b + +# Seed: +25 04 61 80 11 c6 73 db 3c 41 22 79 dc 8a d1 65 +ab 7b 64 73 ae 19 5e 8d 6d 41 21 49 18 19 8b 34 +51 a6 50 8d 61 38 ce dc 51 8d 80 12 ba 0e c7 9b +38 6a f8 fa 40 b0 34 78 bb f2 ba 06 5e 58 2d 61 +95 cc be 15 8f 11 78 1e ae b1 b1 72 0b 72 d9 b5 +21 27 de b9 55 17 11 e8 87 db d0 b8 + +# Encryption: +35 72 bd ea 23 05 e1 78 5c 75 4d e7 44 c4 fa 3f +a2 cb 75 71 60 e5 cb 39 a3 14 97 e1 48 5b bd 7c +08 99 c5 35 85 b2 bb bb d9 90 81 b4 16 ef c6 85 +78 db 78 e0 ec d0 8d a7 a3 95 3e 38 6b b2 5c 12 +bb b8 7c 78 94 42 83 a8 c8 01 87 b4 50 8d ab bc +76 97 f4 3a 8a e7 8a 33 fe bb 15 f3 cd 58 1c 80 +d4 9b 97 1b cb d4 8e 44 14 2f 58 c2 c9 1a db 1a +e1 45 aa 9a 83 b3 c5 81 5a a1 a8 ff 8d d2 31 fe + +# PKCS#1 v1.5 Encryption Example 5.5 +# ---------------------------------- + +# Message: +59 cf 0b 6b 50 ea + +# Seed: +2b f1 91 60 df 69 88 93 5b d2 46 10 6b 89 09 dd +7b b3 e5 16 90 df 84 d7 6e 4d 31 ac 82 10 44 56 +34 6b 4c 3c 9b a7 b5 e9 e6 8e e2 08 6c 84 73 c6 +83 02 e2 59 9a bf 6b 31 ce b3 f7 81 ad 6b 56 89 +86 f2 1c d6 d7 55 32 8f b8 3a fd 55 48 50 1d 07 +0a c2 dd 8f 5c df b6 2c ef 54 5e 81 5f e3 82 bc +0c 67 b6 76 e5 45 6e bb 9a b6 7d f4 77 40 c6 a4 +3d e3 f9 a2 47 7a 9b + +# Encryption: +2e d5 91 fd 4b 35 7e 94 f4 81 ba 84 ff 4e be 7a +e4 31 05 4e 5c d9 8a 99 58 96 48 e6 16 cd 68 e0 +d4 72 4f a8 a6 c5 99 68 6b fe e1 74 7a d0 77 db +ed ad 45 f1 24 4d 7f 8e 00 da 3a 3a 06 d2 31 32 +d3 17 1d 74 4e f1 4e 1e 97 cd da 10 9b d2 e5 56 +a5 fc 7b bc 60 9a 7f f2 4c fa be f4 b5 6c bb b7 +0e 05 06 53 b6 98 48 d7 11 30 75 a5 de be 7a 46 +82 15 f8 dc 08 e7 ef 84 fd 55 77 8c d5 b5 96 e5 + +# PKCS#1 v1.5 Encryption Example 5.6 +# ---------------------------------- + +# Message: +e9 44 52 f5 0a 5e db e6 75 73 ab 22 30 9f a2 1b +ab c6 d2 25 20 e6 e8 3b f7 2e 7a fa 6d 71 e2 02 +96 da ea f5 4a 60 c8 03 63 04 87 9a 21 31 d1 78 +78 0e 34 8e e0 12 0b 99 7c + +# Seed: +c5 30 44 3a 16 ef d8 d6 d7 2a b4 44 3f 8d b2 44 +91 de 99 d5 aa be 51 88 b3 f6 1d c0 48 3b 7e e0 +0b 1c 13 25 9b 8a e2 40 9f 1a e6 2d 99 30 c1 1a +4d de f3 e8 35 82 93 88 93 f9 ac 66 8f 79 c6 4c +7f 5d 79 6d + +# Encryption: +0e ee 90 c7 08 18 22 1a e2 70 4b be 38 d6 8f 8e +15 4c 6e e7 ad e5 3e 2a 1f 4d 1d ba ac 98 c5 75 +91 eb b6 c6 38 bc b6 8e 18 14 35 b7 00 01 ba d1 +80 19 2b fd a0 57 32 c0 5e 7f b5 af 22 aa 89 d2 +a8 ff 80 cf 9f 08 62 f0 4c 05 ca ca 3d 2a 3a 5b +07 79 94 6c 6d df a0 4c d7 9f a1 64 d6 02 f1 b7 +de 5c 95 be 85 e9 60 84 67 e2 5c 29 d0 35 c4 66 +09 06 26 9f 6d c0 0a 47 2b 04 46 ea 56 e7 2a 59 + +# PKCS#1 v1.5 Encryption Example 5.7 +# ---------------------------------- + +# Message: +1c bf a0 e7 b1 a1 0c 13 d7 50 77 b1 cb d8 03 10 +cd 24 10 34 0d 5f 53 72 93 46 4a 67 81 a9 cc 30 +2c b5 38 0e d9 26 7b 3e b2 3c db 13 + +# Seed: +d3 6b 7e 17 99 05 9d 1e d1 34 7b 0b f8 24 7c 6b +e5 18 7d 8f 15 21 9e 3c b6 6e c6 2e 1a c4 1f f7 +ed 35 7e d7 ca 03 84 e3 1d 39 94 85 61 fc 16 cb +d9 6b 7e 70 42 79 e5 72 bf 56 4e 06 c3 a3 40 1a +27 14 dd 51 d7 21 5b eb a1 c6 61 54 f6 0d d0 cd +4d + +# Encryption: +9c 03 dc 01 33 a6 e6 aa ba 92 05 9b df 5a 6c c1 +b1 44 b9 0d 2a 94 a4 8e 7b 3c b9 0b 0b b6 f6 24 +c7 b1 d1 72 33 1e 43 23 d0 8d 2e 8e 09 95 32 dc +b3 b2 a8 7c a4 20 74 9f c6 34 5c 0d 86 e9 ab ca +71 af 09 a0 92 9e de ee de 83 e7 22 44 20 3b 2b +f4 5c eb 18 7e 9d b3 c7 d3 ad 05 b2 3b 59 62 4c +24 66 96 cf c7 58 06 39 14 02 e4 44 e3 97 49 69 +88 e1 e1 f4 2c 6a de d3 0c dc 93 79 37 f3 00 54 + +# PKCS#1 v1.5 Encryption Example 5.8 +# ---------------------------------- + +# Message: +e1 72 a6 b8 b4 96 f0 77 73 8b 74 f6 d8 b2 92 dd +a6 07 f2 ad bf b3 72 be 37 ee 00 08 88 be a3 1f +99 cb a1 cf 39 32 e4 be 37 17 c9 e1 68 90 1a 32 +d1 b8 20 be 4f b0 13 75 27 a2 48 18 77 fe 01 ee + +# Seed: +84 0c e1 3b bc 96 17 dc 9f 3f 26 b1 47 30 1a 6f +46 30 0d 77 81 a5 d9 81 16 2f 86 92 87 37 1f 1d +59 58 76 4f b0 0b 05 53 70 ec 71 1b ba 52 83 fc +b0 0b 83 bc 02 17 5e a1 01 7b cc 83 53 + +# Encryption: +99 3e 39 6f b5 7b 2e a6 a1 a3 fc ed 9a 69 d3 61 +cb b6 26 5b 26 50 3c 17 5f 84 c6 1a 41 ea 3e 1c +e4 fb b6 2e 01 d6 42 0e 22 fe f1 d9 e2 8a 58 83 +e2 ea c8 2e 05 f3 58 ea 75 f7 7d a4 89 7b 6b 64 +9a a4 74 28 39 41 93 dd ec 64 8c 3a 7f b8 1c fc +f4 b5 1c e3 eb ba 78 ae dc a7 bb 91 7b 35 b3 e2 +2a eb 20 1c ea 96 59 2e 50 e0 d2 84 1e 7d 2c e0 +d6 9f f3 03 9d c0 1e 96 4a 97 7a 01 76 83 b3 87 + +# PKCS#1 v1.5 Encryption Example 5.9 +# ---------------------------------- + +# Message: +c8 f0 ea 23 e0 66 11 e4 fd 27 b6 1d b7 92 0c 55 +f3 c0 a2 22 12 88 38 e4 cd b0 62 e1 76 b2 1f c2 +32 53 55 8c 5d 40 de 2d fd 62 0f b7 cd f1 39 9c +2a f8 fc 77 ca 33 35 + +# Seed: +16 4d 77 b5 d2 6a e6 d7 ab e7 ca ed 62 5d 87 c2 +11 cc 50 9a d0 17 2c 20 83 3d 8f 98 ca e3 8a 2c +37 0e f2 1d 40 96 da 84 1d be ee 94 8e c6 34 03 +ca bd 4a 5f 71 ac e4 93 64 aa 7d e2 0f 32 c9 88 +33 7a 11 5f 83 46 + +# Encryption: +7a 8f 15 ee f5 10 ad e8 d5 c3 17 f9 06 4a d7 da +e6 c9 3e 7c f1 56 a7 37 22 02 32 58 f8 b5 74 47 +34 70 00 34 a3 de 6f 13 7a f6 e9 00 46 d8 6e 9b +90 59 0f a5 a6 50 ce f4 fd b4 d3 36 02 33 af 86 +f4 a7 a2 3c 24 3d 19 51 c6 66 b6 73 c3 3c 7d ec +4f 51 ac e3 4b 80 5c 0a 9e 67 e2 09 cc 7f 9e d6 +9b 8f 5e b5 c5 53 e0 f1 5c 10 30 4b f5 6d 7b e1 +71 f3 1c ce 88 f3 7d 1f b4 a2 a0 04 18 89 75 76 + +# PKCS#1 v1.5 Encryption Example 5.10 +# ---------------------------------- + +# Message: +19 db 24 22 05 c0 3d 7f a9 93 5d 9e 04 fa 6e cf +38 a5 1e a9 98 ac 8e 4b ac a6 cd fd 6a 0a ce 1d +f3 67 e7 3d 23 c2 40 af 76 b6 2e 9f e9 21 5f e9 +43 + +# Seed: +be 49 52 05 55 69 56 fa e2 a2 2e a7 0c e1 02 de +06 6c 9e 58 95 96 06 21 74 84 a5 b1 50 36 ff a1 +d4 61 23 9d d4 7b 4f 38 1c ea 71 51 6e 2d b0 fc +36 9d 72 b4 40 69 65 12 a9 72 88 f0 6f c0 bc eb +96 82 86 e9 95 e0 2d 21 8d 9c 26 62 + +# Encryption: +55 12 b3 99 9b 30 c9 c1 44 0e 59 75 93 1d 55 f2 +1e 9e b4 22 b6 2d af cd ab 5d 50 03 a7 5e b1 24 +81 99 86 36 19 13 36 1d fc 46 ac 29 aa ba 8e 1a +a0 2e 1b a4 44 67 16 2d 20 f6 3a d1 70 fe 0d 87 +a5 3d 93 c6 4e 02 6b 12 be 6b c2 b8 eb 0e 57 c0 +39 eb 60 f3 2c 4b 52 70 35 f7 03 a7 a8 37 4b d7 +fa a7 b5 40 4a 3c 5a ad b7 92 e2 5f f9 28 76 b2 +3d d3 a7 42 2c 45 26 6c 6d 98 6e ec 53 34 b9 ba + +# PKCS#1 v1.5 Encryption Example 5.11 +# ---------------------------------- + +# Message: +49 a7 61 f8 c1 8e f9 23 62 d6 ab b2 4c 07 fc 72 +82 55 84 24 53 69 4e 17 60 58 99 f4 37 b3 1a c9 +8d b5 16 + +# Seed: +d8 cd 85 ed fa 0a 84 d0 76 a9 f8 b2 f9 3d aa eb +a9 ae 37 43 81 ea 4f 8c ea bc 14 f6 2a 4e d7 63 +8c 1e 39 67 57 de 3a e2 b7 ef a3 a1 7c 9a 55 86 +da 84 a5 e5 0e cd ed 61 08 7f a6 f0 ce 93 82 87 +99 8a c1 b9 bc 33 21 a7 ed 16 0d 28 67 04 e0 52 +6e ce 7b 30 b4 68 14 64 9f ec + +# Encryption: +9b 47 82 68 40 62 12 ca 05 30 f4 31 bd b2 63 72 +61 50 84 ca 48 8d a4 34 51 d2 5a 22 b3 5a c6 fc +61 e3 70 74 a5 c2 2b c1 c7 01 db 19 32 b8 c5 57 +b8 48 7c ea 56 60 50 e4 8a d6 e0 37 6f 8d b4 19 +8c 4d 27 db 2e 6b 28 c2 5a ed 83 7e f4 77 42 d5 +eb 8e b1 d8 b4 32 c9 d5 73 cd 4b 86 fd f3 2c 52 +a3 d0 f6 cf 92 cf 3c d9 51 96 77 a5 8b 1d 1d 99 +4f c1 c9 05 7a c1 06 e8 16 04 59 26 b4 5b 00 e5 + +# PKCS#1 v1.5 Encryption Example 5.12 +# ---------------------------------- + +# Message: +84 e8 28 f7 15 f2 28 a6 02 65 + +# Seed: +f7 f2 75 a8 53 d4 e1 26 d7 d0 c3 8e f7 03 f3 fb +da 7a 95 20 78 8d 7a 81 a3 1b 05 30 d4 3f e6 c9 +4b 1b 1b b1 08 51 20 9d b2 6a c4 b8 88 ae ce ea +77 13 82 4c 29 38 b4 c6 43 1b 2b 03 c6 93 ab 7b +54 63 15 41 54 6a c4 03 94 79 85 48 fb ba 95 88 +2d 91 a1 7c 27 e7 dd 53 02 6c 96 79 1e e5 5f 24 +7d 7f 89 8f ea b3 70 9a 13 2a 78 26 66 a1 4d 0d +f1 a8 4e + +# Encryption: +4e 3f e9 6e 8f 96 e5 b3 c6 11 ca db 96 ed 51 04 +20 98 ec c5 47 be 7b 88 f8 de a7 65 ae 14 e8 35 +0c fe 39 dc b1 c1 d6 e4 17 9c a4 04 d5 38 4d 87 +b0 66 50 75 ee d7 da 7a af 71 00 8e 24 67 d7 0b +ff f6 23 b4 59 4b 6d ff f9 0e 3d 84 85 f9 41 89 +48 6c a0 ca 9e 72 2b 2a 77 7e 25 b5 82 f7 ad 4e +c5 10 3a d7 67 85 9a c5 9a 1b 8c 5c 19 71 30 17 +48 fc c2 64 f6 c9 29 36 4a 8d 9a f4 22 55 c0 f6 + +# PKCS#1 v1.5 Encryption Example 5.13 +# ---------------------------------- + +# Message: +c4 79 7e 8a 6f 26 9b f2 5d 4c b4 ec 3f a4 6f 8f +11 e6 b3 69 fb da ec 1e 51 97 83 58 d4 6f 3c f3 +b8 42 91 7d 96 7a a9 d3 0b 18 34 53 93 7a 68 26 +56 b2 7b + +# Seed: +17 77 42 19 7f 04 11 44 3b d8 7e 28 ea 88 d5 4b +4f 2c 7a b1 dc ae d8 1a 56 f8 d7 87 91 12 44 54 +02 85 04 d3 22 e1 de 34 60 47 a4 93 93 3e 87 62 +8c e0 8b 06 c0 17 08 2d cc d3 8b 48 94 65 14 ea +37 7c 2d fc 75 2a dc 24 fb 57 + +# Encryption: +79 84 c3 ba d8 6a 54 79 90 e0 47 5a 48 4f 8d ba +5d 4d ce b0 d3 e3 fc e0 71 d6 f8 71 76 b7 cb e6 +f8 11 2d 81 d7 cd aa d7 7e d0 d5 78 8e 65 f8 bf +5f 0c 2a d0 df 07 cc df 54 b2 da ce fc 19 ba 65 +20 1c cf d3 61 d1 86 b7 d9 e2 69 aa 1e 6a d2 c7 +2b d2 3f 58 08 4f db c3 bc 60 e1 7a 33 e3 c5 5a +95 eb 0c 38 a0 81 bc 0d 39 81 db 26 a7 21 2d 6f +69 1b 33 6d ac 46 b6 4a e2 25 38 a7 b0 08 7f 25 + +# PKCS#1 v1.5 Encryption Example 5.14 +# ---------------------------------- + +# Message: +a5 e9 de b1 c2 0f 98 2d 5b 7d 4b 87 d7 99 46 1f +05 3d 91 9e + +# Seed: +59 75 9c f5 f8 38 d9 52 49 3d 0f 42 81 e3 ea 0f +e2 16 97 1c 0a 2e 24 54 b9 6c 8a 11 b4 c6 91 27 +15 90 24 db 6e c5 c3 36 40 d1 20 29 58 99 f6 66 +6c 94 17 b2 02 a8 6c 26 ef d7 c6 13 4c 92 fd 86 +b8 32 3d 17 4a 62 53 48 81 38 2d 7c 6c 9e 1b 8c +1e 95 da f2 10 c3 e9 ba 43 e5 88 79 f3 4f 2f a7 +1e f6 ae 4b 68 d6 41 47 be + +# Encryption: +70 ac 10 2d 07 1e 3d 90 22 81 83 62 16 e0 81 29 +0b b5 df cd 56 68 d1 1d ae fa 0a b0 64 59 9d 0f +91 4b 47 29 61 37 5b bf 5f 2a 66 6f ae 0f 6a 25 +ba fd 44 f6 65 c1 7c 14 4d c4 d4 cc 0a 5d 5b a5 +5c 47 a4 cd e9 59 b3 2b aa 52 32 a0 7f bf 93 78 +c9 c5 3c a2 b3 77 81 c9 3a 1c c8 d6 52 94 78 a1 +c6 73 03 4d da 7f f3 35 60 78 6a 46 4f 5b 4a 55 +9c 62 6a e2 95 bc 91 d0 ee d9 37 5f 49 e3 e4 aa + +# PKCS#1 v1.5 Encryption Example 5.15 +# ---------------------------------- + +# Message: +73 9f a7 6d bd 12 73 03 b7 ab f9 3e 1d 7b a7 29 +75 5d 6c 81 1b 5e 93 35 5e 0c 01 1f 74 46 4c 7d +b4 79 19 3c 3f b7 38 0a 62 a0 c0 06 a2 d1 dc 49 +a7 66 af 63 fb a4 52 7c d1 57 50 6d 62 c2 1a + +# Seed: +a0 b4 da ff 3e 26 ce bb 3e 4e 3a 43 db 36 c4 66 +fb 8c e6 05 b2 5a f4 c9 da 74 4b 62 d4 1f 9e 62 +c2 28 5c 39 0d 60 d1 8e 3d 7e 67 5b 4a c3 19 67 +24 45 19 46 bc 1c cf 2a 9b 56 2c 45 33 c9 + +# Encryption: +2b 79 80 91 b3 a3 91 53 3d 62 dc 0e 41 7b a6 de +da 00 5b fc 30 ab 7d c8 2e 8f 9b cc 74 17 bc b0 +04 34 8c 6d 00 e5 37 d2 72 2b 84 38 61 48 92 45 +ab 0d 51 f2 11 44 7d ac 33 a3 f9 dd 6f 3c a6 6b +bf a0 d1 ad f9 8b c9 09 95 15 92 69 76 b9 25 8a +ab 63 20 4a d8 91 65 c8 7b be fd 8d 98 85 34 b3 +74 07 df 7d 43 ad 39 1e ed 99 82 47 28 ef c3 a5 +33 b7 89 b4 7e 8a a7 12 16 17 47 4f 33 25 c5 1a + +# PKCS#1 v1.5 Encryption Example 5.16 +# ---------------------------------- + +# Message: +5a 44 b5 47 bd a1 9e cc a1 dc 7b c0 45 50 20 5f +66 c5 de 0a cb + +# Seed: +2f 54 85 d2 5f e5 ce 40 ae 62 a1 12 97 6c b4 a5 +39 b7 4d 96 ef 8b e8 73 32 5e 20 4b b3 f8 66 07 +a1 6a 2c 2a b5 0f 69 78 09 ed 03 01 72 70 ef 20 +a1 02 c4 3a 2c 4c 3b e6 ab 7a 8a e2 dc b5 69 84 +d5 e0 65 52 45 93 eb 70 70 83 4c e5 53 f1 75 69 +20 bb cb be 4f b2 6d 35 d4 ad cb 59 df 52 46 35 +6f f1 2e 7a a9 ee 6d ef + +# Encryption: +62 d1 48 9a 40 3a 90 fa ac 67 7a bc 17 4a a7 24 +3b c7 51 a9 64 69 5f 6c 32 b3 9d e0 18 fe 46 43 +44 20 ea 76 59 be 2c 41 0b c5 6c 4e 3e 7a 1b 16 +77 fd f4 ad fb 23 24 f0 41 ed d5 79 0c 4c df ab +36 55 e0 7e 41 fe 9d 73 29 21 51 b0 dd 5b 96 fc +84 a6 b2 0f 6f 3b c0 f6 0e ae a8 d8 29 17 b2 10 +83 05 59 40 fc 02 ee 3e 17 c3 78 bd 4d 85 06 d0 +8e c4 5f 33 de 57 80 f0 1b d3 18 a9 a1 67 87 ad + +# PKCS#1 v1.5 Encryption Example 5.17 +# ---------------------------------- + +# Message: +16 80 2d 80 3c + +# Seed: +02 f0 e7 62 c3 39 17 bf 6a 4d f1 1f a2 84 73 54 +7a 5a b0 76 7d d3 a6 1a 8d 05 cc 1e 6f 98 34 5a +f1 a0 0e 42 f6 2b d8 ec ca cb d3 7f 4c cb 80 9e +9e 05 5f 73 d3 37 5a 60 41 d9 78 2c cd 85 d5 9d +14 f4 3e 5c 94 10 25 7b 90 6e 41 cc 8b 97 35 47 +d0 62 2b d2 1d b2 9a 91 38 d3 b1 be de 38 ce 5c +94 c4 e1 d2 a0 a8 40 0b 45 ba cd 42 69 79 7c 38 +5a a3 06 6e 65 80 72 99 + +# Encryption: +75 3b 9c ee 70 d4 18 1f 95 63 87 80 db 7a 04 f9 +b1 2e a3 8e 5d ae e4 f2 89 4c 02 67 3a 53 f4 85 +30 74 6f f2 85 8b 78 7e fc b4 2d 45 e5 31 be a1 +c8 da e9 48 77 15 3b 95 6a c7 b2 87 46 ee 21 c6 +31 bf 9a 3b a7 9d 2b a8 13 21 b7 96 03 b1 d0 1a +4e 90 9e d5 a2 7c bf 27 c9 57 78 3d 3f 79 50 e0 +1d d8 f4 47 f1 0e ce d3 6f 2d 19 35 86 f5 cc 17 +fb 62 2a 05 fa a1 fb 5c d2 aa 06 4c 08 67 b1 ca + +# PKCS#1 v1.5 Encryption Example 5.18 +# ---------------------------------- + +# Message: +d6 d0 f6 03 85 97 9c a5 06 fc 83 34 21 bc d2 2d +a6 a0 6a 8f 37 0a 7f 02 fe f4 7c 1c b2 19 9f 26 +45 c7 54 90 fb f7 89 ad 52 47 04 da 8a 27 66 c6 + +# Seed: +a0 3c 05 67 2e fe 23 b4 4b 26 c7 93 e7 05 3a 77 +04 8b a2 db b4 b5 3a e9 75 18 54 e7 ad d7 d6 7c +12 cb d1 6c 0b 19 34 d2 c2 3e 77 cd cc 89 ce 1d +45 c7 61 15 8a a8 61 31 71 a7 39 01 ac 1f 61 c6 +57 05 53 3d 3e 63 9b 57 a2 48 92 91 79 + +# Encryption: +00 78 dc 48 a6 61 58 99 2a aa 68 fc 3c cc 62 8f +92 a7 08 d0 b1 d4 38 37 20 8d 53 4b c3 f9 be 1c +14 12 ed 0f 9f 7b ef 49 43 0d c9 e9 98 f7 52 e0 +74 77 68 b4 ae 38 14 46 96 c0 03 d6 d2 5e a1 a6 +ca 6a ec 92 4a 9f 4d 9b 57 5a 8f 13 6b ba 29 bf +31 c1 3b 70 50 bd 55 d1 00 0d 43 3d aa 6c f1 0b +49 11 6c 80 63 10 7f d3 a5 bd f6 15 45 c5 d8 63 +f6 a7 88 81 78 6c c8 dc 37 6d 36 c9 11 36 82 25 + +# PKCS#1 v1.5 Encryption Example 5.19 +# ---------------------------------- + +# Message: +b0 38 1c ac 04 f3 10 15 04 96 8f 26 d6 55 47 45 +38 3b d1 71 d3 61 56 dd 36 80 b3 db 6f ad 7f 77 +1f 7d + +# Seed: +cc 54 8a 67 77 cd e9 53 c1 5a 71 fc 49 7c 0c 36 +17 b1 bb 05 6b 03 28 8d 9a 54 8b 69 3b b4 30 8b +67 c1 da c3 8b b9 b8 c9 cc 89 6a c2 44 a9 e3 0d +13 24 30 f4 ce ae 57 90 34 3d bc e3 8d 05 6f 27 +b8 6b dd 9d 32 a8 17 1f 3b 3c c2 fd 14 22 65 ac +9a 68 dc 35 36 27 33 9c d8 83 03 + +# Encryption: +45 6f 7c 3e 3b e8 5f f7 bd d6 b5 b2 50 bf b8 1c +d6 fb b1 86 d2 5e 0c 1c 52 59 d6 78 87 93 c5 41 +ed ac b4 ec de db 8a 89 29 01 34 a6 06 f4 6a 81 +99 1c 13 b1 20 e3 30 56 bc 0f c7 e9 7b 34 2d 0f +20 05 18 13 dd e4 5e 0b 59 6a 7d cd 69 04 90 3b +8f c0 76 a6 e2 4b 3a d8 01 34 16 d9 fd 18 48 30 +55 4a d5 4d 55 48 bc ad da f5 92 0a 02 49 55 88 +78 25 dd 37 1a e4 ef 90 06 9a 4f 31 1c 5a 17 29 + +# PKCS#1 v1.5 Encryption Example 5.20 +# ---------------------------------- + +# Message: +e5 + +# Seed: +fe 0b c7 ac b5 6c e1 4b 4e 2f 55 fb a0 e2 b1 71 +54 90 7b e9 4c e4 85 c6 98 4d 61 f6 7c 04 a7 40 +a2 8d 60 94 ae ae 33 b3 ea 0d 58 18 3e 1e c7 f6 +01 b2 ab 82 0f b8 a7 ff ac 0b 4f 96 0e 1b 4a cb +e5 7c dc 35 b2 25 c4 97 fc ac a0 30 19 a2 95 b3 +e6 6d a9 6f 53 79 cc d1 da 44 47 9a 4f 21 35 e1 +06 3d 71 a2 82 c1 e6 6f db d5 d9 53 f5 71 8c 25 +39 d0 0c e4 9b 45 18 20 45 4d 2d 49 + +# Encryption: +5c 53 36 77 a1 dc b3 63 95 da 9a 6d 34 77 bf bf +71 51 2c 6a 93 3d 04 1c a3 13 44 e1 cb e1 e5 55 +88 a1 14 6e 3d ec 46 10 ef ac 41 b5 f8 02 66 02 +66 52 b3 d7 aa 59 42 74 d9 d9 20 d3 3a a0 ad 9b +4e c5 9a a8 80 71 2a 1d 1c 36 8a 45 7f 35 c7 43 +88 b0 42 f2 49 8e 9f 4b d4 5a 26 f3 21 dd 9e b3 +33 ef 80 af e3 af 9f 72 9c a1 8f 42 c8 8a 71 73 +85 8c 54 20 66 f8 a2 52 cc f0 fe af e6 b5 a9 24 + +# ============================================= + +# Example 6: A 1024-bit RSA key pair +# --------------------------------------------------- + + +# Public key +# ---------- + +# Modulus: +dd ca d6 a3 8b 37 04 cb e0 6b b1 b5 1d 11 62 58 +49 78 a4 29 1f b6 73 b4 ea 30 ed 8b 51 a4 bf 26 +1d c9 f0 f4 69 ce 99 88 a0 89 f0 84 36 64 64 a1 +80 cf d7 17 10 69 a6 f6 36 d7 5f 23 40 1b 30 cf +43 ad cf 87 0e cd 24 58 2f 4d a2 95 22 91 51 dd +cf c7 c9 91 86 b2 45 88 5c b6 31 96 c4 a5 72 6f +20 7e e3 60 af 3a d8 c4 83 85 a4 e0 84 1d 7d 85 +1d 54 54 5d e7 67 d8 f9 99 dc 17 eb 0c 57 11 89 + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +dd ca d6 a3 8b 37 04 cb e0 6b b1 b5 1d 11 62 58 +49 78 a4 29 1f b6 73 b4 ea 30 ed 8b 51 a4 bf 26 +1d c9 f0 f4 69 ce 99 88 a0 89 f0 84 36 64 64 a1 +80 cf d7 17 10 69 a6 f6 36 d7 5f 23 40 1b 30 cf +43 ad cf 87 0e cd 24 58 2f 4d a2 95 22 91 51 dd +cf c7 c9 91 86 b2 45 88 5c b6 31 96 c4 a5 72 6f +20 7e e3 60 af 3a d8 c4 83 85 a4 e0 84 1d 7d 85 +1d 54 54 5d e7 67 d8 f9 99 dc 17 eb 0c 57 11 89 + +# Public exponent: +01 00 01 + +# Exponent: +5e 48 e0 3d dd ec a1 a9 59 d9 ee 4d a3 f1 c3 f0 +ec 2a d0 fe 7a 70 c1 77 63 27 31 94 4c 3c d0 d5 +8f 4c 4d 96 59 74 6e 68 5a 76 c9 3c 2b 33 3a 64 +3d b2 1d 29 bc dc 6d 11 b5 f6 90 87 17 b5 77 65 +99 ff 30 88 b2 01 4f fc 51 f1 8d 93 22 24 f1 05 +9b 22 39 ea 56 44 e8 06 9a 5c c4 31 ae f6 07 38 +0a a9 24 c1 58 ab cb dd 97 51 f5 4e 67 79 c4 ec +23 21 68 b0 01 4f 4c 8b 49 7b e9 49 ae e6 57 51 + +# Prime 1: +f9 47 1f 2d 22 13 a9 2c f0 a7 c3 84 04 d4 0e 32 +2f 14 f4 39 61 f0 1e 92 33 63 cf 66 53 e8 98 4f +b6 e6 8d 66 e6 f1 59 80 3a 44 bc dd 09 e0 56 19 +6d a4 00 7a e2 a3 7f 40 57 bf 7e 3b 5e 4a 80 23 + +# Prime 2: +e3 c5 f8 cb fd 51 c6 c2 66 b1 a3 2f b2 f6 fa 48 +9b 97 54 b2 27 c7 7f 53 59 c5 5d fa 03 80 fe 9a +02 b4 d3 95 05 f3 ab 36 95 7c eb fa d5 34 d7 f9 +a2 67 eb ee 19 af e5 c6 24 04 3e 30 19 d0 ac 63 + +# Prime exponent 1: +2c f4 79 97 df 1c 62 97 1b 33 76 1c 19 ee d0 3c +96 a7 15 c0 3f 7c 59 57 0e 73 82 94 b6 af 2c c0 +bb 80 6a a1 d3 26 55 78 bd 89 65 f2 0a f4 ed 32 +1a c6 c7 db 61 82 10 d1 de c1 47 17 97 d2 a1 b7 + +# Prime exponent 2: +a6 c0 29 bb d5 91 c7 cc 4c 78 61 fa aa af 8b 5e +1a a2 78 7c 11 09 49 5a d1 0e e0 15 07 f9 a8 eb +41 6d f6 b4 53 ee 26 fb 48 07 73 8f 68 05 4e d4 +50 24 7a a2 0e a6 2a b6 9b 69 8b c9 95 2c a2 f7 + +# Coefficient: +aa d0 60 de 5e db 35 81 8b d6 3e 85 d4 2e ee 55 +e4 cf 8f a4 2d 4e a5 92 83 ce f9 6a ca ad 55 5d +47 8d 2f d7 c3 8f a9 31 fa 1a eb 6d e5 66 55 3d +08 f1 cb c0 6a 51 0f c2 e5 69 b5 a8 22 67 ac 91 + +# PKCS#1 v1.5 encryption of 20 random messages with random seeds +# --------------------------------------------------------------------------- + +# PKCS#1 v1.5 Encryption Example 6.1 +# ---------------------------------- + +# Message: +a3 e1 52 75 fb 33 ae c3 7b d3 dd 58 2e 19 f5 d3 +8b 9d 0d + +# Seed: +78 da a6 1c 07 f9 41 b4 b4 40 e7 38 33 8d 06 cc +15 7a 01 57 4a 72 fa 78 d3 63 dc e9 94 09 04 22 +0a 71 32 35 69 96 f0 7c 01 d5 4e e5 4f a3 2c 5f +aa 1b 90 d2 43 0c 80 a2 32 17 e0 6b b1 c8 04 3d +61 ff a1 8a a1 d1 8e 15 e4 30 aa 12 1c df f4 3f +ab 2b b0 de bf 73 e3 d5 a7 5b 46 f9 0d f7 3d 65 +6b b0 66 ac 1c 76 8f a3 83 e4 + +# Encryption: +9b f1 dc fc 65 4c a7 a2 3d 80 a1 2c 09 c2 59 d0 +4b ae 07 e8 31 f6 09 e9 f0 35 d3 56 41 4e d1 06 +f9 b4 62 35 fa 3d a9 1a 32 b8 fd c8 fb 88 30 c9 +65 23 dc aa 9b 25 38 fc 01 02 dc 0f 7a 5f ae 86 +35 b3 b1 23 14 c3 90 55 fa ac fb e0 0a 15 16 34 +24 14 8c c9 e0 f0 ab 42 df 09 02 3c 05 2a 46 ae +3f 86 a1 8d cc 53 80 ce 39 06 2e 36 23 75 d3 a5 +f9 e3 b3 4a 5d a2 5c f0 de 9c c1 9c 4d 04 f6 3f + +# PKCS#1 v1.5 Encryption Example 6.2 +# ---------------------------------- + +# Message: +44 3a b0 3c 46 04 db d8 bf 80 06 ae cc 2a a8 de +64 a1 55 b4 f9 0c db 08 59 98 6d 5c a3 60 66 03 +59 80 8c 59 bd 9c 2d e7 75 fc 18 52 02 24 b6 69 +c3 25 + +# Seed: +3a 6a 60 89 f7 27 dd 16 92 97 a5 79 fc af 8e a7 +f8 e1 2d 54 27 f1 f7 90 1a 90 22 a2 1e 2d 82 d2 +f0 8e 63 ba ca 26 7b 65 3a af 89 de 23 2b a3 d3 +92 d1 cb 49 dd 76 b3 88 b2 da df b0 09 4f da 97 +18 f1 78 37 38 d1 8f a7 aa a6 29 + +# Encryption: +5a 0a e0 de 28 fd 33 cc 98 01 bf 4d d3 06 71 23 +74 53 63 ca ce 4d d8 b7 b8 b8 11 d6 48 2f 59 12 +0c 0d 65 3e ee 86 a6 1a 01 2a 18 0e c5 d1 7e 99 +14 6d 0c ca 0a 58 7c 85 cf 01 dc 7a dd 84 23 0d +91 80 bd df 5a 77 19 f6 9d 1f c4 81 af 6f 47 db +8c bd 4e e1 87 1a 57 3f c8 76 7c e8 be ed b5 c7 +3f a9 3f 0c 53 80 4a fe 2e 76 cc eb b8 7c ba 00 +cd ac 94 de 40 e2 b0 be aa 8e 2e 41 58 c7 78 50 + +# PKCS#1 v1.5 Encryption Example 6.3 +# ---------------------------------- + +# Message: +d1 ba 30 e8 8c dd a3 3d 2b 41 89 6f 43 df 08 1e +ef 20 ca f7 8d 7c 1b 97 0c 6a 61 72 e8 38 39 dc +43 d4 be 29 f9 a7 72 ba 41 59 73 8b c6 13 29 68 +61 8d c7 19 7c 0e dc 57 a1 + +# Seed: +9b b6 2b f9 a7 51 fe 41 81 66 43 68 98 ed e8 35 +cf ae e2 f5 0e fc ad 60 94 2f 2f b2 da 1a 20 38 +03 f0 be 80 be b1 7f fa d0 da b2 18 b1 28 02 7f +34 97 a4 f8 d4 1a b9 a1 be 26 4e 96 b4 45 48 76 +7b e8 d4 a7 + +# Encryption: +81 19 1c 54 75 27 3d e6 6a 41 bf 56 04 f3 2b 58 +b7 59 a1 4e 74 26 c7 46 de 4b 53 ba f7 80 bb a4 +2b 42 e9 27 8a a9 45 27 f0 ee bf 85 5f 46 2d 6f +bb 29 78 a4 65 30 37 d8 b4 48 e1 b8 07 a1 83 1d +bc 53 22 d0 66 98 4e ec 28 11 4f b7 20 1c 79 6b +57 3a dc c5 cc 92 7f 3a 58 97 b2 00 55 64 ef 1a +2c 01 67 f5 43 65 51 18 34 ac 6f 49 58 b8 31 8d +09 e6 78 54 d6 31 ca 52 80 76 86 ab 70 5d 71 a3 + +# PKCS#1 v1.5 Encryption Example 6.4 +# ---------------------------------- + +# Message: +a5 4b c2 27 8b 56 76 85 c9 b5 68 54 e4 c1 c4 06 +d9 16 17 47 c6 81 34 80 16 3e e3 af 23 b2 1e d1 +99 83 e0 f4 2b fc 93 25 cb 5c 82 e1 a4 7b 8f + +# Seed: +cc ba 5f a5 c9 4e 79 83 2a b0 46 c9 77 74 95 b1 +63 bd 3a f2 17 59 0f ec 5a c4 8c 62 78 6a 27 f3 +70 d2 85 99 55 e4 5a fb 2b 79 f1 2d e4 16 11 45 +be 62 ac 13 a0 3b f4 81 95 fb 9e 5a 18 b8 2d eb +bf 3d df c8 08 25 d5 93 fc d4 02 e7 4e ef + +# Encryption: +3d e4 c3 e0 59 35 7b 8a 54 83 7e a1 59 62 cf e2 +00 7c 5e a8 98 5c 93 51 91 64 a6 89 b7 55 b6 1c +8b d2 73 96 9d 33 3c 4b cd 9b 06 03 53 c3 7b af +13 eb 42 2f 1c b9 77 56 e6 b4 94 6a df e1 af 75 +e9 fe 2d 95 b4 b1 3d a1 73 2b d8 b8 be 11 97 02 +79 19 53 0c 34 7f 3d d1 03 9e 34 8a 53 b1 16 f9 +f8 fe 89 36 a8 4a cc 39 f2 e0 69 56 b6 78 d2 0f +df 95 17 07 2e 02 f5 70 78 fd c0 46 59 40 0c 5c + +# PKCS#1 v1.5 Encryption Example 6.5 +# ---------------------------------- + +# Message: +f3 c0 0b 00 9e 5e 08 a6 3b e1 e4 00 35 cd ac a5 +01 1c c7 01 cf 7e eb cb 99 f0 ff e1 7c fd 0a 4b +f7 be fd 2d d5 36 ac 94 6d b7 97 fd bc 67 9c be +68 f1 a2 f3 62 59 c5 58 f0 4d + +# Seed: +e2 2d 5e 43 b1 eb a1 ac 0c e6 5c 32 70 51 0e 0f +13 c9 4e 96 24 ee 52 56 59 ef 4d 57 37 88 20 c9 +35 22 9b 30 99 aa 2b 23 50 61 4f 8c c4 29 58 15 +a2 c9 ed b2 d9 c5 9c 73 d1 aa 90 0c 21 34 c0 a7 +d0 90 9c + +# Encryption: +53 3e 67 a2 bc 5b 3f 01 34 2d 8c b8 d9 25 d7 3b +4d b3 4c b6 75 da 90 39 22 6a 98 e4 d8 13 c6 20 +11 09 90 a8 e6 ac ba 50 fd 04 f3 30 7d eb af 20 +d4 f3 74 cf 6d e0 d9 b2 1d 86 e2 66 07 9c f2 f1 +8b 45 03 20 8a 21 5d e2 b1 1c ca 9e 34 64 fc 5a +c1 dd 7e 96 b2 fc 04 09 e4 2f 46 a5 06 12 a6 b2 +06 1e d1 61 9a 7f e4 67 96 ed 8f 52 06 9a 5b fc +84 08 d5 58 f5 2a 03 33 2e e8 ed de f8 f7 45 d9 + +# PKCS#1 v1.5 Encryption Example 6.6 +# ---------------------------------- + +# Message: +aa fe 5b 27 11 11 ef b8 79 2f 5a a9 23 83 07 29 +76 b7 2a 0a 27 2f 90 c5 24 61 f8 8a fb 1b b6 b7 +ec 26 38 1c 65 76 a4 10 87 a0 39 80 9d 14 f6 11 +60 67 59 4e bb + +# Seed: +75 0e f0 86 9f 8c 75 7e f4 31 57 8b 45 a6 e7 41 +bd 1d 96 0e fc 37 89 b1 0d 2b de 27 38 18 07 4e +bf e5 fa ae 10 ac 24 4f 89 f6 c0 2d e5 d1 ad ae +fc 7a 8f d2 4d 7b c3 76 fd 65 d3 5e 39 50 8c 42 +36 ac be 2d 5c a7 69 4b + +# Encryption: +34 4d 43 37 61 2b 22 dd 40 2b e3 79 e6 b2 65 0b +51 9e f3 7b 7a b4 85 81 94 52 d1 67 c1 b2 15 db +d3 fb 24 f9 b2 f9 29 86 69 cb 1a ee 14 1a 7d 89 +01 64 20 43 11 1f c3 8b 3f 40 ef 0b 7f fd 7d f7 +6c 2d 92 e3 29 41 1c 75 e0 f1 72 85 bb 6b b8 26 +88 12 8e d9 bb 95 1c ae dd 7d 06 7e dd 0b 13 e8 +27 5a c8 86 25 d9 7c e8 d2 0b 69 b3 57 38 b2 f4 +72 6e 29 84 b8 df a8 66 95 aa e8 8d 9e 17 6d f6 + +# PKCS#1 v1.5 Encryption Example 6.7 +# ---------------------------------- + +# Message: +a1 22 4d f9 aa b6 58 78 45 b2 a3 93 a5 a8 76 c1 +7d 95 9d 53 5b 54 19 d4 12 a9 a5 31 bb 43 7e 1d +ac 1b 54 6d 62 + +# Seed: +76 1d c4 f5 1b c8 51 8d 62 7c 45 b3 e9 81 8b 85 +42 a0 6f fe 17 2b e3 af 5c e7 a9 05 3f e5 4e 69 +70 12 49 73 37 4d fc c1 f4 9f cf fe 95 7a ae 8c +9c 3b 13 0f 46 05 d2 c3 ef a2 93 2a d0 83 de c5 +8e 70 d4 f6 92 6c 80 b5 d4 89 1a 1a 55 9e db 0c +af fa ca d7 5e b2 64 83 + +# Encryption: +78 5f 6a aa b4 d2 f3 18 d4 af 37 b6 e0 07 4e d5 +a4 19 4f a6 05 a7 ec 87 d0 5a 07 f3 34 9b 5b 92 +f5 fc 47 90 ea b1 37 86 cb f0 35 c7 8f fc f1 34 +4d 1f 3e cd aa e0 16 72 22 2e 6d 4a 96 55 59 e2 +c0 82 91 cb 1d 4c 2d 4e 68 ff 8e e7 15 23 f6 dd +ae c5 0a 4a b2 2e dc a2 47 36 4c 92 d8 73 99 e8 +a7 1d f7 43 6b 62 d8 ba 8a d2 02 94 cb c6 0d ca +e0 30 5c 79 73 f7 fc b4 a5 cb ed 15 71 3a 7a 16 + +# PKCS#1 v1.5 Encryption Example 6.8 +# ---------------------------------- + +# Message: +1e 0e 3f 65 0c 32 db b2 f6 91 6f 36 f1 35 bc ae +88 1d 54 55 07 40 2d 6a fd 3d 5b 3b d8 38 5a 50 +b4 fa d6 f7 89 49 fd e6 21 64 ed 76 89 e5 f9 a4 + +# Seed: +ee a9 0a 54 d0 16 da 7e 8f 08 76 a7 33 b0 f2 a0 +6f 90 a7 3c 1a 3c d6 39 b6 cf a9 06 ce 08 ef 78 +8b b6 fe a7 4f 22 eb 91 a6 ab 32 84 cd fc 1e 72 +e6 3e 78 d1 8a 64 d6 7f 9d 1a 29 19 49 ed 2e 32 +3e 91 dc 03 38 76 ee eb 09 ff a7 1f 59 + +# Encryption: +6b bd ae 20 f9 89 bf aa 5d 65 da dc d6 1a 86 b6 +63 07 a0 60 2f b5 51 a7 38 06 12 2d b1 88 ec 1d +41 e8 4d aa 2c c7 d6 be 54 1e 12 28 88 09 a1 7e +08 5f 2c af a8 ae 13 67 0e 0f 33 65 a1 47 1c b3 +15 7c 06 e0 f6 3b 82 00 f3 16 0c 16 3f de 7c 90 +1e f3 26 e5 70 0c 9f 5e 07 fe 01 98 81 0f a8 0c +8c 5d c5 3a 50 bc e2 54 f7 d1 99 01 cf 6c bb 60 +34 13 e4 1f 90 30 e7 39 c8 ba 96 49 97 84 74 99 + +# PKCS#1 v1.5 Encryption Example 6.9 +# ---------------------------------- + +# Message: +73 dd f0 a1 4d 57 ba 65 b4 f6 93 ac 76 1e 20 2b +1e 5b 85 7c 8b 34 04 e1 41 85 df a8 aa f0 49 89 + +# Seed: +fd 43 3d 7b 01 76 b7 31 d7 80 dd 6c 58 51 b8 2f +17 6d 62 b8 0d 96 ae b6 31 d7 fb 8a c5 be 55 ac +21 7f 4e 08 bc 7e cf 81 f8 e3 f5 dd aa cd c6 c2 +17 8d f7 81 88 23 97 53 3a 63 8e 62 f0 74 ac 48 +8f 4c 12 aa 57 be 2e ce 5b b6 e9 09 6c d9 22 59 +a4 5b 0b 03 2f 10 14 31 a2 8b 86 40 fb + +# Encryption: +ae 97 ff 43 4e 9a 5e e4 87 76 1d b3 56 90 0b 06 +37 37 46 5b e5 05 8d c0 3a 28 a3 22 e5 c0 e0 91 +b7 99 bf 65 94 55 cf be 05 42 7a c4 d0 44 05 e5 +6e e0 4e 06 3a 23 73 db cb 9b 4f a1 6e 43 07 94 +6a 49 b3 56 34 52 0d 41 6f 65 c3 c3 22 ed c5 46 +71 56 91 28 a2 a1 52 a7 6f e4 44 c4 30 aa 6f 03 +c4 12 9c 6e 21 31 75 5d 76 4c ec 4a 14 86 a8 1b +a8 a3 16 8d 16 e7 4d ca 8e 77 bb fd 67 ea 37 2b + +# PKCS#1 v1.5 Encryption Example 6.10 +# ---------------------------------- + +# Message: +ef 3e 76 98 e7 d9 cc 86 3b 46 6b b2 88 55 6e 4a +c2 52 82 e0 94 fb 5b 57 c1 76 17 bb 98 + +# Seed: +db 90 a7 58 0d 8d 42 9e 22 bd 7e a5 c7 b4 cd 0c +65 ad 0e 2e 27 f5 33 41 bc 23 a8 b1 35 8a 76 a0 +b5 e9 4f c5 b4 2a 9f 75 6c c6 3b 9d 62 3f 55 17 +67 fb c6 f7 11 4e 40 ba 73 61 fd 32 d6 f8 d7 72 +34 37 43 6d f7 24 b1 32 7a ae f7 b9 57 56 27 68 +f8 fa dd 57 86 2b a0 b3 14 09 6a 3b 38 77 0e 31 + +# Encryption: +43 f8 cc ce a8 12 d3 38 5f 43 fa 83 7c b5 e6 fa +59 0f 1a ff b8 62 d2 ca cc c6 d8 e8 bb 5d 5c 0d +50 ff b9 f8 f8 09 89 00 c1 2e 77 2a 84 7b 37 81 +57 78 2b 0a 90 40 f7 a6 16 c2 eb 05 8e 44 d4 a7 +e2 0b 48 5a c2 9f 40 d6 8e 03 c3 9d dc 8d ae 7e +7e 09 e2 8f 9d d2 19 0f 3a 9f 35 74 b2 f6 34 00 +15 44 36 3c 86 1f e2 7f 7a 39 23 66 92 fe 35 82 +14 0b 21 72 ce 64 7e ed 41 76 85 c6 e1 db 85 6c + +# PKCS#1 v1.5 Encryption Example 6.11 +# ---------------------------------- + +# Message: +f8 69 18 47 4f 88 16 97 11 1b dd dc 1f 00 61 3e +b2 c3 d9 c1 78 76 68 35 3e bb 02 b3 20 a3 26 + +# Seed: +cb 7d 99 da 9b 11 ea 57 f6 40 55 43 44 7d d1 5f +b5 cc a0 a1 0f 3b 69 b4 d2 33 09 ef f2 75 0c 48 +6c a6 55 32 5b 55 a3 27 ff e8 bd 6d ca 99 bc 8e +fb 5b c2 94 2e c0 39 e2 84 25 e4 a5 6a 07 d3 80 +12 f1 0d 21 5a 22 d6 37 68 59 43 d3 64 72 53 01 +dd 40 e2 17 22 8a b7 91 59 89 98 83 6b bf + +# Encryption: +2a 40 87 80 ad 51 4e 56 71 fe 1d fc 36 7d 7a a4 +65 fc 34 69 f1 c1 52 ae e1 81 45 e0 f5 f0 75 9f +44 69 b4 3d 55 12 3f 5d c9 ff c6 17 f2 3f a4 9b +78 96 02 19 66 0e c6 22 74 d6 c5 9b a3 14 60 bd +10 94 1e bb 5e 05 69 41 51 c5 7b 5b 95 88 ca f0 +9f 45 50 20 a5 4e 97 7c 3c c0 27 da e3 1f 2c e4 +42 17 02 3e 10 ad b6 f2 d8 aa 0f 80 84 fc 45 86 +05 80 3f d4 4b 21 ab c2 7b db 8d 4c 56 17 84 cf + +# PKCS#1 v1.5 Encryption Example 6.12 +# ---------------------------------- + +# Message: +6a 40 bb 60 70 8c 5a 99 2e cf dc 7e e5 3f 54 08 +4d 19 af fd 4d 21 + +# Seed: +c3 f4 fa ca 56 c1 ff 07 d1 ad 10 37 07 d1 b6 68 +20 47 b4 d9 d6 24 6c 2e 5c 4b 0c e6 55 3d 55 31 +3f 8f 38 ae e5 e4 d8 07 3a 55 d2 4a d7 96 c4 b7 +61 26 c8 aa 61 c4 6a 4e e8 5f a9 05 7a 52 6c d0 +aa 24 5e 58 28 f2 18 1b 4a 64 79 86 87 48 e7 47 +9f 40 34 53 3c 0f 3e 1e b4 35 fa 47 d5 3b 58 e4 +2c 96 17 bf 7e 77 7e + +# Encryption: +c4 64 11 c7 11 6f e6 f4 6f 1c a0 f7 4c 60 81 a5 +5d f4 1d 2c 0b 8f c5 d3 8f aa 34 0b 5e cf 71 83 +f8 5f 88 c4 fb 28 ac 5f b1 f1 8a eb fc fc 10 bf +dd 3a 19 00 2c 6b 52 24 14 92 70 4b 6f e6 3d 61 +a7 30 10 c1 49 ff 63 03 28 3e 99 78 cd 84 54 04 +fa 06 b8 c6 98 aa ea 8f 86 13 61 d8 86 b2 c0 f0 +1b 47 a1 a9 a3 dd 90 3f 8a 58 ae d6 6a fc 85 e9 +b7 1e fc 3f 55 a1 21 66 74 16 a3 00 00 13 13 e8 + +# PKCS#1 v1.5 Encryption Example 6.13 +# ---------------------------------- + +# Message: +32 52 fe 99 62 09 74 e0 77 d6 eb 55 75 + +# Seed: +bf 06 9b 4b cf 15 44 8b c3 9e 45 f4 42 6a ad 0d +5d 82 b7 4e 93 ae 1c dd 71 f7 1b b9 be b9 b2 3d +59 73 2f 9c 8b c6 34 3d 13 02 31 de 18 f7 c8 9f +c2 f4 22 18 9c d9 27 e5 09 b1 31 97 aa 56 d8 1a +73 76 f8 33 3e 47 42 44 8c c8 92 de 40 44 97 2c +7f 67 dc be 85 44 a9 0e ec 59 e7 95 ae 59 64 08 +39 2a f5 77 6d a0 d6 cb 29 c7 e0 a7 86 81 30 a7 + +# Encryption: +76 53 cb ff 58 68 92 cd d2 58 bf e6 ba eb d9 91 +45 eb 1b 22 89 4e 1a 76 4d 02 b2 ba 99 59 52 a0 +12 58 20 8d e1 a0 1d 8e 8c bb 5c da f0 d6 03 69 +4f 88 25 5e 80 90 97 b7 0e 9d 79 e6 2b d5 c0 d8 +36 dc c2 9d d1 9b 05 a1 60 26 90 42 05 b6 0c 45 +03 d4 fb e9 93 38 55 e8 68 02 c7 54 28 d9 a6 34 +73 03 16 76 32 d3 3c 5d 9e cc 8a e2 49 3b 58 c3 +6b 2a 65 53 a7 b9 e2 b1 35 8a e2 8d ad 50 28 0d + +# PKCS#1 v1.5 Encryption Example 6.14 +# ---------------------------------- + +# Message: +dc 94 + +# Seed: +05 e8 05 bf fb d1 b7 4d 1a 5a 83 8d 85 71 67 b4 +c7 d4 0a 6c d3 e6 8f 31 be 46 93 b9 8c ec 6d 75 +89 49 19 ab 18 57 2c 75 82 2e 75 e9 de d7 2d a0 +67 97 83 a7 72 18 14 e1 99 16 0b 75 07 f6 7f 4e +de 58 7c 88 be 76 81 5c 50 b2 61 df 30 8b 31 43 +23 73 0c 1e 07 3a a7 29 98 cc 2f 8e 0a 8a 5b d6 +5b f9 34 ac a8 a6 48 59 e2 5f 02 c5 a2 71 39 41 +c8 c8 e6 27 20 84 6d fb 51 c2 ff + +# Encryption: +6a dd e2 44 f0 63 8c 5a b7 45 ff ba b5 ab e1 fe +80 0b 0e ee 15 35 50 c4 8c 36 f4 24 9f 9d 5d 36 +b4 7b 28 cc da 71 a7 dd 83 2e 64 35 ad 0e b8 5e +f7 55 6b b8 4b f9 5a 59 cc c9 c2 07 51 ed 3e 1a +d0 de 10 29 94 a7 12 c5 14 01 46 92 a6 7f 1d 87 +ca 2e 4f ef 29 ec 83 e0 1e 29 ad 0c 97 8a cc a4 +d5 c5 02 74 5a 6c 50 0d f2 00 04 bc 9b f1 6f 5f +cc 69 bf 52 70 9e 31 cf 6a 2b 9f e6 24 d9 a3 64 + +# PKCS#1 v1.5 Encryption Example 6.15 +# ---------------------------------- + +# Message: +4f ae 6c f3 7e 9d 5f 59 + +# Seed: +e7 f9 ed 4a 0c 3a 64 66 69 03 9b d0 1f 24 9f 32 +be a1 e6 57 6c 21 d4 51 89 d0 f8 91 cf 4a fd 62 +32 08 3a 32 1e d2 d3 4d 07 09 84 f5 e9 45 78 39 +b2 eb c1 e0 3a 2c 0d 8d d7 09 73 1e 95 b2 e6 94 +1c a0 90 71 87 af fd cf 5a 87 f5 cb ea d2 f9 05 +2c 38 d0 ee 54 e1 f1 28 ff c3 37 de 45 66 a5 92 +5e 1e 94 7a ef 50 88 1c bd ae d9 9b 1b bc 1a f5 +13 23 2c 0f f4 + +# Encryption: +46 e6 70 5e b1 25 2d eb f8 ec 67 2c 4f de af 69 +88 26 84 59 f9 95 89 bb d3 05 41 33 d4 83 ab e1 +e2 7c aa b0 a7 f0 22 1b 1b 67 a1 4e bf 45 12 6e +60 13 48 b0 43 44 06 da 3a 8c 76 d4 f1 e3 f1 a0 +e0 6d 0d b8 23 da 51 17 b9 2a 40 b6 f3 9f 57 e4 +83 a7 da 36 e9 9b 67 7b b3 f7 6e 6c 5d b0 3f 3c +e4 45 04 eb d4 5e 9f 14 fe 0f 61 3a 2e b7 95 47 +ab 57 8c 58 6d 3b 65 4a 06 fe 1e f3 7a 22 10 66 + +# PKCS#1 v1.5 Encryption Example 6.16 +# ---------------------------------- + +# Message: +cd fd fd aa bc a3 76 7e 70 bb c5 e9 ab f6 + +# Seed: +ac 77 7f 67 29 9d e4 c1 c4 c5 74 f3 1f 67 4f 6f +aa bd e0 31 f8 ec 33 e8 26 76 eb 32 a9 3f 65 79 +aa c3 e9 59 35 9f c5 73 ee 5c 0e 3e 07 76 53 ef +f9 d5 f8 db 4b 1e 7a ca db 05 99 71 53 1f 49 b0 +7c 93 eb 9f de dc f0 90 3a 7d 50 b4 79 67 6f cd +e8 74 0a fb d7 d3 7c 3a 21 02 41 2b de 1d 3a 82 +44 15 6a d8 08 9d 45 df dc 91 cd e6 c3 a1 59 + +# Encryption: +51 3c 76 1e b1 92 9a ff 79 77 a9 ff 0e 61 b7 a1 +d5 11 c8 cb 25 39 24 33 24 25 56 9a 07 e2 29 cb +39 01 71 53 90 f7 de 37 bd 36 2c 96 fc 0b 0d 79 +81 0c 1e 8b 15 e1 3b 00 32 73 47 78 cf 96 4e 6f +6d 17 fc 41 c7 86 76 72 b2 54 0f 56 9d 0a 46 0a +80 fa d5 6b 5f 05 4a b8 e4 9e 40 9e 9e 0b 86 13 +cb 3d a2 0c 35 c3 e1 bb 99 b7 ec ab 7a 00 fc 1f +c2 37 0f 9c 80 85 67 df 89 be 2e dd bd b6 b1 10 + +# PKCS#1 v1.5 Encryption Example 6.17 +# ---------------------------------- + +# Message: +b8 20 c3 2e 73 7d aa 23 4f 29 ba 90 64 7f c3 bf +0a 8e + +# Seed: +f5 ca f8 fe b4 2d f7 b6 b3 89 f5 05 99 a4 ec 20 +e6 19 ca 22 d2 bf c9 1b c7 f1 4a e9 f1 22 9e 07 +c8 88 ed 57 aa 6a d3 c1 04 10 44 c5 1a fb 55 21 +7b 0c aa 23 34 ad 79 f4 7a bb f9 b4 20 83 33 b7 +2b 4b a4 bb 5f d0 37 98 1d d8 01 70 c8 03 60 c1 +4d 5a f5 1e 5f 82 ab f5 1f d3 6f 02 18 67 a6 ec +09 7b c3 39 22 ac ea d9 e3 35 58 + +# Encryption: +3e 23 25 18 41 db 2e 20 7a 27 10 1f 13 29 19 1a +b7 fa 6a 70 1a 52 62 61 48 23 53 a1 a2 21 ef a9 +d3 a9 d4 59 cd 2a 2d 86 68 90 8b 78 3b b0 9c 87 +9a 21 7f 1e 40 0f 95 b2 17 b0 40 a5 3e 34 1c 17 +b9 3d 3c 3d 65 46 0c 5c 7f 2b 4d 79 a3 4b 5a 96 +11 7a a3 67 51 d9 ea f2 33 b0 3f 68 db a6 a4 57 +1b 90 71 77 f8 28 33 6e 82 5a 92 26 1b 62 36 39 +be c9 8d 3a 09 f8 72 c2 ec 59 1b 4c 38 3a 69 c7 + +# PKCS#1 v1.5 Encryption Example 6.18 +# ---------------------------------- + +# Message: +60 6b bd 61 37 15 dd cd 92 c7 b6 df 04 b3 60 72 +f0 11 62 d0 08 76 63 12 ca 69 77 dd 3a 06 eb 95 +e1 ba c7 bc 1b c6 60 2c 9e e6 44 + +# Seed: +51 3a 5c 95 68 e8 9b 9a 53 d5 af 71 6e 55 fb 34 +0f 8a 39 23 70 e8 88 a8 0c ae da 50 2e 7f 9d fc +17 51 95 a5 0e 47 07 13 96 d6 ec 55 4e b7 2f 18 +3b e1 8f 3b f4 ec 73 b3 05 92 fa ef 2f b5 14 de +be fc c6 5c 8d 23 c4 ad 25 94 56 c1 e8 0b 36 0a +d4 59 + +# Encryption: +47 21 a2 39 40 18 87 30 f5 de ac 85 00 2e 38 31 +b1 49 ae 57 af c6 97 35 a0 45 ee 3f c3 53 64 72 +fc 83 3c 27 c8 7e ab 6f c9 05 e3 67 96 1b 31 24 +98 63 6b e6 c7 7a a8 0b 8d a2 f5 d9 48 aa a7 7b +5f ab 72 4b bf 64 ee 89 d2 81 ee d4 7b 21 2c 32 +95 26 65 77 f4 fd 93 a2 22 39 de e5 40 c9 40 0f +e5 6d 7a ef 51 df 36 a8 9a e9 2f 92 6f 55 83 31 +e4 1b fd fe fe 35 75 8b 93 ce 11 40 ac 9b 6a 54 + +# PKCS#1 v1.5 Encryption Example 6.19 +# ---------------------------------- + +# Message: +1d 82 de f8 c5 92 87 50 08 a5 f8 9e 7e b6 4e 25 +2e dd e9 dd b8 81 d3 73 62 31 7f 6e 6e 6e 99 3c +60 23 3b 0f + +# Seed: +87 5e 07 5e f1 b0 54 b5 84 1e 08 45 0d 78 eb 54 +a5 5c 88 b6 d0 18 13 c1 07 a0 9b 74 54 3b 3f 9f +e1 b7 c9 02 11 c6 2e a7 33 81 20 d4 ae 0f 73 ba +82 c0 1d 28 f8 19 4b 3a 39 6b df 50 f9 41 3a 7f +b0 3b e2 25 fe 05 45 db 80 cd f0 f6 10 a9 5f d9 +03 76 e0 39 e3 83 1f f9 9e + +# Encryption: +8f b5 46 26 3c 1d 18 75 c7 43 f5 2f 02 67 b2 f2 +fe 68 8d 25 42 02 10 49 f5 34 89 ce 7c 35 91 30 +f8 e1 1e 3c 46 1c 5e 86 3e 4d c1 9f 07 a1 3a 4c +1a 88 22 4b 26 c5 c0 cb e2 02 02 45 d9 1e 1b 83 +42 42 52 52 f5 3f c4 0e 4b 14 fa 02 bb d7 47 37 +d4 02 2c c5 4f e3 8f 0d 27 d8 fe a5 0f 2f dd 84 +65 d4 f3 2f 8a c0 3e e0 06 be 62 33 e4 d1 a3 c1 +6e b1 44 b5 d8 be 72 9a d3 04 f8 23 61 e0 7c fb + +# PKCS#1 v1.5 Encryption Example 6.20 +# ---------------------------------- + +# Message: +8a 8a 3e ab dc a7 ca b0 cc 29 6a 29 1e a8 a9 3d +a4 d2 d2 a1 96 ff 2f 8d 18 1f ee 1f + +# Seed: +2e 47 36 e4 29 6a b4 66 18 b1 ef 34 da 26 77 6e +92 ef 66 f7 cd 17 4e f9 47 69 72 42 23 a7 65 b4 +eb ef 08 a8 8f ed be 27 05 60 e5 f6 74 37 cf 49 +d5 7e a6 62 0a ca 59 89 8a fd 52 cd ef 30 a8 b0 +d9 85 5e 5d fb e3 47 de 77 c4 c0 28 0b 0f 1f d4 +4d 4f e6 89 06 be 8a 4f 12 c5 33 08 7b f5 bc ea +fb + +# Encryption: +03 f3 e4 ba 03 48 31 a0 e3 0a 4a 33 44 ce ad 61 +b2 8b 43 be 31 53 2c 2d 76 37 53 9b 90 13 83 7e +dc b1 f2 16 d3 2f df ae 73 32 36 74 a2 81 45 65 +db f2 9e 71 2d 18 c4 37 39 64 df 60 c9 39 9f da +54 14 a0 eb 45 bd e8 66 1a 89 09 12 95 a1 ef 71 +61 6a 3c d1 45 e9 b3 18 b6 51 af 17 5d 4e c3 50 +1d 5e b7 63 e8 d3 5a 2b 72 74 6e 02 0b 4b a5 99 +73 83 4b 21 50 02 6b 43 2b 17 9a 9a e8 17 2b 7b + +# ============================================= + +# Example 7: A 1025-bit RSA key pair +# --------------------------------------------------- + + +# Public key +# ---------- + +# Modulus: +01 70 93 41 d2 ec 08 04 a7 40 34 e8 fa 72 86 42 +98 3d 16 50 d7 46 e4 49 c9 ee 40 79 aa 15 e5 1f +1f c1 34 24 2e 52 4b 0d 3d 0d bf 5a 51 21 93 9b +12 5f cc 86 3e 51 41 60 b6 34 e3 7a a6 98 94 77 +6c 7d 33 e1 e7 c6 19 52 1d e4 82 a0 ae a4 5c 3c +6a bc 3f 33 e2 5d 86 ff a1 39 33 25 65 9b f2 d4 +09 8d f1 69 b4 07 21 87 66 0e 27 77 00 19 9b 7a +3e 34 84 b3 84 5f 6f bf 31 98 65 7d f8 cb f3 a8 +1b + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +01 70 93 41 d2 ec 08 04 a7 40 34 e8 fa 72 86 42 +98 3d 16 50 d7 46 e4 49 c9 ee 40 79 aa 15 e5 1f +1f c1 34 24 2e 52 4b 0d 3d 0d bf 5a 51 21 93 9b +12 5f cc 86 3e 51 41 60 b6 34 e3 7a a6 98 94 77 +6c 7d 33 e1 e7 c6 19 52 1d e4 82 a0 ae a4 5c 3c +6a bc 3f 33 e2 5d 86 ff a1 39 33 25 65 9b f2 d4 +09 8d f1 69 b4 07 21 87 66 0e 27 77 00 19 9b 7a +3e 34 84 b3 84 5f 6f bf 31 98 65 7d f8 cb f3 a8 +1b + +# Public exponent: +01 00 01 + +# Exponent: +6f eb f7 98 12 1e 99 33 24 97 2c 8c 28 cc c6 5a +2e 6a a1 5f cd e2 32 da 03 e4 46 4d b4 da 5f aa +27 e4 2a 7c 7a 76 d9 ed 49 48 6b 27 a9 d7 85 c6 +7d 9a c0 c5 19 ad 8d ad a6 bf d1 15 d7 cd 75 b9 +9c 4b 59 c7 69 83 a7 01 5b 0d a6 97 3c 69 fa 95 +08 10 ae 27 68 d9 75 88 90 05 62 e8 6a 6d f7 c7 +14 b8 44 b1 e0 46 68 6a 5a fc 66 7b 13 57 3a 55 +be 9b 5b 38 b9 9b d3 cf 54 e4 34 4a 2f 2d 0e 21 + +# Prime 1: +01 40 ef 5b 50 70 54 d5 a6 94 46 4e f4 7e 49 86 +8c b3 3c 97 e0 e3 ed d7 7b f4 5a 52 5e 60 8d 7e +21 5f 91 33 48 a9 b8 27 c8 39 73 7a 42 b6 ad fb +b2 bb 49 7e 14 78 92 2f 71 88 97 d9 fe ed 27 7a +6b + +# Prime 2: +01 26 00 4b be 2d f7 6b 6f 38 ae a1 64 b1 fd 0f +97 61 2b 2d b9 6c ed e2 8a 3a 91 ce 0d 74 25 3b +b3 f9 55 9b 89 f4 81 33 75 65 2a 50 70 06 ce 99 +95 a9 8f 0e 6e f3 bc 22 e5 51 9b 61 3b fb cd 55 +11 + +# Prime exponent 1: +98 14 d4 e0 b9 5a 7a 24 05 ff 8b 4a b0 cd 86 c5 +05 ea a0 ce 21 34 83 f8 69 42 a3 e5 b5 3b 57 99 +d8 ff a5 9d b9 4f 5b 0a b6 ae d2 30 eb 00 67 55 +bb 0a 88 84 8a de 3b 3d 41 cd 33 b0 6a 11 5b 21 + +# Prime exponent 2: +1c 4b 1c fe f1 67 85 34 4f ed 26 65 0d 68 00 2f +1e 4f cc 77 b2 ce f5 e5 3d 9b b8 8b bc e8 b4 65 +2e 92 99 84 5e 3e 6c d8 58 63 09 18 ae df 05 12 +cd 1d 92 53 05 2b ce e3 e8 c5 9e 46 ea 85 a9 31 + +# Coefficient: +fd c5 10 c4 d9 79 07 30 b0 fd 47 d3 13 ab d4 08 +58 c7 df d5 8f 4b 37 91 5f 7a 4b 1d b3 d7 d8 ab +d0 6d 3d a0 02 de 98 4a 76 09 cc 18 a9 44 86 46 +0a 61 74 6c 7e a6 31 17 a6 8a a2 82 59 74 4f 49 + +# PKCS#1 v1.5 encryption of 20 random messages with random seeds +# --------------------------------------------------------------------------- + +# PKCS#1 v1.5 Encryption Example 7.1 +# ---------------------------------- + +# Message: +da 50 9d ce 45 e2 47 00 37 9b fe 5a a1 a8 1c 24 +70 6c 18 42 d9 b1 3e 7a 2e 0a 15 d3 a4 af 8e 6d +08 61 2d ca a1 5d 46 0e ce 87 29 88 e3 e9 0f b2 +7e 5c a5 c1 0f a1 fa cd cb 0e + +# Seed: +80 8c 20 46 fb 50 5c 37 69 5c 8d c3 5c 38 f9 f9 +90 5a b4 8a 2b 8a 14 6e 8e 8e da 33 85 ce d9 5a +31 3b 2d c6 eb 41 83 67 fe ef f7 9a 02 ad 74 64 +6d f7 a5 d8 70 54 ac dd af 34 ea fd 5c 1d b5 8e +5d ec 04 81 + +# Encryption: +00 fc 3d 0a aa f2 6c df 25 a1 a8 df cb 71 70 0f +b6 5e 2a b5 55 1a e5 f4 19 b2 d2 f9 4c ef 01 73 +02 b0 0a bd 9e 6c 6e fa e9 44 74 d1 8e 68 da 0a +7c 17 ef 2c 5f cc 89 07 1d 3b 07 12 1b 9c 01 e3 +0f f0 53 66 3f 61 f8 9f db c4 9b dc f8 e6 71 66 +94 43 91 9d 41 34 28 45 e3 e9 9e 46 a8 a3 b4 8e +23 98 a8 8e 5b 45 d9 9a 17 dd 1f 21 2e da bc bc +d3 00 a8 4d 39 8e f5 79 35 bd ae 95 9e 60 54 e7 +3a + +# PKCS#1 v1.5 Encryption Example 7.2 +# ---------------------------------- + +# Message: +ce 0a 79 47 49 87 41 60 e5 d2 e4 ff + +# Seed: +f4 b2 c9 f3 11 c1 fd 41 d4 79 44 b5 0e 17 55 d4 +ea c5 ee 65 08 7c 9f c6 d2 f0 75 b7 38 c6 49 26 +ea f7 d4 31 6b cd b6 36 54 d5 42 0d a6 1e 02 45 +f1 95 b9 e8 24 aa 0b 06 c8 87 99 b1 27 fe 9b 03 +6d f3 61 75 c0 a6 bd 80 e4 e0 af 6e bc 2f 42 70 +b0 4c e3 0b 9f a2 7f 04 35 86 0f cc f4 0b 3d c7 +ea ef fd ba b9 e1 76 66 19 bb 01 6c 17 90 26 63 +cb 24 + +# Encryption: +01 0c f7 4b eb c2 63 6d 2c 49 d9 c6 22 bd 76 cc +0b 1d 02 eb b5 2f df ae c0 1c 4a c1 e7 56 07 1a +8e f7 6e 12 2a 4c 62 c6 ba 32 65 fa 4c 90 56 26 +d1 13 d5 9d b7 9a d6 5f 86 40 b3 c4 34 4d 73 40 +c1 6e 38 de b1 89 e3 a1 b1 1e aa b0 b2 60 6a 7f +82 f5 94 6d 41 9a ce bb bb 3a 93 7d 41 e2 9b 33 +ed d3 ad 15 f1 e7 77 0f cf c3 0a e0 6a a0 1b cd +03 d5 df b1 62 f8 7a 18 39 67 55 3c 25 02 cb 5f +fe + +# PKCS#1 v1.5 Encryption Example 7.3 +# ---------------------------------- + +# Message: +41 d6 + +# Seed: +55 6e 59 b2 c1 89 58 75 08 e2 08 92 fa 56 02 d2 +49 fb fb 71 a1 09 05 ed 5a f7 b7 9b e8 71 11 a0 +c6 9a dd b1 9e ef 31 6d 7c 0b 21 81 79 90 dc 3e +d8 c7 6c b2 3e 83 0e 17 c0 f4 38 73 15 9f ab 7c +5c 4a 6c f2 19 cb 1d c5 c5 da 45 53 a3 e0 bf 18 +3b 8e 11 2b 61 f6 92 a7 dd f0 04 bd bf dc c8 d6 +65 9c 3d d8 0c b2 3a ab e8 c6 fd f2 67 5d 07 3b +66 23 12 e4 ac cd e9 1c 12 25 e6 d1 + +# Encryption: +00 2a 10 04 95 59 66 55 30 4b dd f9 09 7f 78 d9 +dd b5 eb 42 9b 66 63 5a 58 a2 98 f1 92 8e ed 61 +53 4f 80 b4 ea 05 ee 39 b0 2a 64 56 6f 6c 45 6e +3b 58 6e 7c b4 3a 88 94 0e e1 29 34 0f 57 8e 56 +e7 2d 8b 27 83 36 10 06 d9 71 29 ab ef 02 cf 1c +19 12 e1 7f 0c d1 d7 1c 0b 32 8d 0b 48 a4 ac 7a +ec e3 c0 05 a6 19 0e ac 22 c1 99 10 41 15 9a 2a +d1 db 08 96 01 5c 4f f1 d7 b3 54 47 cf c1 0a 24 +be + +# PKCS#1 v1.5 Encryption Example 7.4 +# ---------------------------------- + +# Message: +0b b4 ab c7 dc 6c a4 23 5c 29 ed 0a 2c b6 3f d1 +41 34 1e 2c 4c 90 1e 6d c9 5d a9 f0 01 0f a2 e0 +22 cc fe 8a df db 6e cf 4d 89 f5 79 a1 0a 51 70 +be 18 c4 6a 24 1c a7 ee d1 07 ca fe 4a 9d + +# Seed: +bb 80 be 78 02 dd 8b f5 fb 5b 1b 86 39 66 54 f4 +73 9f 5d 43 51 f1 9c e3 1b 72 c2 10 ae a1 a2 ed +21 42 d8 d6 f7 ae 37 4f 06 13 3a 31 5c 62 64 da +65 ce f2 33 ed 3d cc 81 59 d7 6c 3a 17 f3 6d 0c + +# Encryption: +00 6f 1b 6c 1f b3 7a e5 c8 c0 24 44 9a bc 38 40 +e8 e5 09 71 43 ee d1 6b ea f6 7b 6c 7a 48 24 ac +38 b6 f8 c3 53 b6 45 c8 ce a4 fa b0 9c 02 fa 6c +32 5a 50 74 38 b9 64 5e c8 23 00 86 b3 15 e3 4e +7a 56 ad b0 ec d8 9f d0 7b 98 73 9c 24 db 6f e1 +1f f2 e5 ad 38 31 8e c3 1d f2 ed 25 08 de bc a7 +a6 7e 24 01 96 aa 9a cd 80 32 9f 4c 43 43 c1 0b +72 69 9f 9d 6b 5b c2 43 99 5b 09 c4 6d d3 d8 03 +ce + +# PKCS#1 v1.5 Encryption Example 7.5 +# ---------------------------------- + +# Message: +ed 26 ec 20 2d 5e 69 74 0d a3 48 84 06 bb bd + +# Seed: +f2 fd 08 cc 0d b9 a5 5a bf eb d9 2e 2a 9d 75 87 +2a b7 df fb 0b 4d a1 36 06 e1 52 75 9f 86 6f 22 +eb 87 29 fb 8c 9a 5c 45 ba 2f 4a ca e4 31 59 a7 +ad 3c f7 8e 81 fd 09 54 90 9b 1f 0e 70 89 ca 86 +a4 58 8d 8c 87 a1 a6 1f 1a 48 39 82 36 de f9 b4 +97 5e 25 49 57 3f 60 ad b5 e8 61 b7 c3 b2 df eb +81 0d 13 e2 97 a6 cd 3f 2a fe cb 0e 4f 14 7c + +# Encryption: +00 93 3c 58 a5 0c 70 15 0d a0 82 3a 7c 1e 36 7d +36 e5 21 3f 66 a3 00 50 fd ed 72 d5 75 5b 5f 9c +24 05 0b 41 14 f5 35 09 98 8b 62 54 20 cf d0 0a +c1 c8 cd 84 48 9c a2 6b 74 3f b4 7d 1b 64 d0 a8 +80 8e e3 21 27 c7 71 22 4a 0d d5 a5 64 e6 36 ad +d7 3b cf f7 b4 73 e9 a1 2b 7d 46 4d 7d d4 a7 52 +04 86 61 a8 b0 74 b9 fa 15 06 fe f6 03 dd 96 d1 +19 96 a7 d9 e7 48 79 f9 9b b2 d9 1c 37 aa b1 35 +72 + +# PKCS#1 v1.5 Encryption Example 7.6 +# ---------------------------------- + +# Message: +dc 28 5a 26 39 59 39 e7 99 72 04 c7 1a 93 2f 79 +5b 4d e4 01 e9 6f 34 e1 89 36 32 37 e9 cf da dc +61 + +# Seed: +d8 0b fc c2 91 ce 51 8c e0 bb 6a e9 34 df d8 56 +58 b2 39 fb 45 39 cb e0 5d a1 26 a8 98 b7 f3 64 +88 7c 0d df b1 ea ea 1d 5a 90 de 76 95 66 5c 55 +82 2a 11 72 cb 5b e8 a1 12 d2 8c 86 02 c5 13 be +48 c2 92 f0 59 72 e6 71 1a 44 cb c7 28 17 15 09 +4b 49 0f de 29 16 5a 6b 6b 7d 99 db ed + +# Encryption: +01 57 e7 b5 4a 34 1b 8d f8 bd 9b 99 fc 2e 6c 58 +d8 86 fc 79 e7 44 2a 9e 76 d0 d6 7e 48 58 c4 ab +f0 ed 25 c3 3d f6 2e 2a ad a3 99 df ea dc 7f f6 +89 28 e6 b9 00 71 02 dd f8 09 f5 90 8e ef c1 0f +2a 73 71 06 09 23 1f 5d 45 e0 0a dd a1 34 b6 02 +dd 0e ee 0f 67 22 49 4b 7e 4f 7b 40 57 72 c8 31 +b6 37 29 be 0f 1c 4b 6d 2a 54 2c 15 65 c7 df 23 +1d 9e 89 2e 58 6a 18 ec 54 37 73 76 db 77 f8 13 +84 + +# PKCS#1 v1.5 Encryption Example 7.7 +# ---------------------------------- + +# Message: +46 47 d8 41 c5 a0 b9 97 3a 91 45 4d d1 a0 5e c0 +e5 75 03 ed 99 67 2a c0 02 df ee 77 7f 7f a5 06 +fb 41 b2 ec 8b 8d 2c db 9b ef 01 33 bd 5e 3a 7d +0c 43 44 b2 8f a8 db + +# Seed: +f5 27 a1 4e 2e 06 e7 3f 1c 24 5d 19 0d 02 cc ed +01 1e 46 84 87 ac fa 5e 0b ce 39 78 6b 46 a9 a8 +c7 51 a8 b4 40 6c cf a1 fc 5b 7a b9 ba da 7b 4a +d4 52 46 7e 50 b7 fc 41 31 8e dc 73 dc 2d 84 a2 +8a 08 1f a1 79 05 bc + +# Encryption: +00 4e 03 ca a9 48 1d 7f 96 78 20 7c 17 b6 82 2a +5f 69 17 ed 01 eb 40 2e 7f 23 01 35 a1 23 cd 9b +6d e3 be c3 b9 bf 33 8a de f8 07 6f b7 65 2f c7 +e3 a3 73 fc 16 22 f1 dc 67 9d 41 5c 32 00 02 6d +8a 8a 50 f8 db 6a 58 3f 66 69 29 d0 31 8e bf 91 +d9 59 12 fc 06 10 2d 9b e8 75 25 a7 36 b5 af 21 +e1 6d e3 ef aa 66 e9 cf 41 ca 73 48 23 23 dd e8 +0e ec 30 85 81 a4 4c a3 aa bf 76 dd 48 1d e6 52 +9a + +# PKCS#1 v1.5 Encryption Example 7.8 +# ---------------------------------- + +# Message: +ba 10 d4 7a 9f 62 42 81 + +# Seed: +37 9f dc fa 5d 8c 61 37 c3 6b ad 14 3f d9 b1 f7 +e8 94 fa 0e 9a c0 fb 9c ec 60 e8 6c 82 53 97 5d +8e 78 74 21 08 49 5e 59 4a d0 89 8f d0 4c 91 e4 +01 e7 c8 80 89 a8 7b 4a 4a 82 e8 34 cd 37 77 a7 +d3 f8 0e 64 86 81 2d 4a b0 d3 37 23 16 2b cb c7 +e0 81 a9 9d 3f 9b 5c 3b a4 4b 19 bd f8 84 a4 62 +6f d7 de f7 67 40 57 be a0 82 e0 0d b4 b7 61 ad +75 3a b5 98 5a 94 + +# Encryption: +00 c4 96 5e 29 63 d7 bc 5b 10 44 d8 fc 75 eb 33 +82 ce dd 99 07 41 97 92 ef c8 8c 92 b1 d5 c3 90 +fa b1 90 01 1c 51 8a c9 ce 45 c1 b8 e7 27 6b ff +c7 c7 e0 5c 25 37 08 91 37 a9 8d f6 e0 c6 92 02 +0e d6 54 af 83 33 9b ab 11 92 71 77 f2 f5 23 22 +6b 4f e6 4b 99 c1 72 9f 6c 92 29 06 bc 16 d3 1f +0c 94 dc 2e a4 13 81 0d 55 94 0c 97 af dd 48 29 +fb f1 61 8a 8c 9d e8 9d c2 40 06 e7 e4 21 a5 8d +38 + +# PKCS#1 v1.5 Encryption Example 7.9 +# ---------------------------------- + +# Message: +ef c7 48 9f ec 77 9e 05 2e 37 9c 1a d9 04 59 03 +b6 84 2a 9c a4 1b 48 bd dc e5 80 80 a5 ed ec 63 +f3 6e e1 15 60 fd + +# Seed: +c8 ec ba 62 72 14 c4 14 d7 c3 fd d3 16 c2 d8 2a +98 53 57 28 b9 a9 37 6f 69 a9 53 d7 cd 1c ea d7 +10 53 db e0 14 0c 7f 02 bd 71 e0 13 7f ea 29 cd +4c 21 a5 8b de c6 66 40 99 0d 28 c1 0b 70 17 59 +3c 1d 11 fe 9a be bd 71 24 e1 d9 85 63 1e 94 e9 +e5 12 41 26 0f 9e f1 f1 + +# Encryption: +00 32 18 4e f2 88 fa 0a aa 0c 2c 1a 19 e7 c2 9f +81 c7 01 2f 45 29 eb 9e eb 53 68 1f 62 47 f8 d4 +35 69 13 45 a5 14 8a 2c 87 7b 2b 18 92 6b ae 9d +e5 b3 17 ba c0 e9 02 c9 60 25 ee c2 f9 ea bd 0f +9e 88 86 ef 95 19 c8 24 9f eb 83 46 65 c1 01 0d +b7 62 4f 48 7e 16 1f 89 f6 ae 00 18 c1 f4 e0 ab +54 72 f7 f0 99 35 61 cd 59 85 f3 83 d0 49 dd 83 +2b 82 c8 37 48 b2 28 1b fb 99 d9 d5 00 8d c8 07 +de + +# PKCS#1 v1.5 Encryption Example 7.10 +# ---------------------------------- + +# Message: +5b 26 4f f8 8d ef d3 c2 99 99 3d 81 12 9a 6e 5d +d2 b5 7b + +# Seed: +0b e7 ab 5b 29 70 48 43 c1 c0 d7 e4 ef 5e 93 f3 +ba 71 7d b7 81 5a f5 72 e3 a9 ab 3f 99 b1 ac 9a +22 b9 2d 9b 43 da 2b 99 65 c7 97 70 57 17 3c 03 +57 3f 32 48 0a 92 70 19 af ff 0e 0e 34 e4 09 5e +4a 4d 39 2d cd 1b d9 f2 7d 32 fd e7 15 9f 02 3c +83 08 9e 88 a7 1f 24 33 64 8e f8 c8 40 45 b9 c3 +6d 8e 5f 6e ff 03 4b 91 b7 02 34 + +# Encryption: +00 4c 65 29 35 56 f2 fd 15 ab 90 eb 22 e0 75 33 +b3 dc 17 33 4f 5e ed 27 a3 99 31 80 c5 6c 8e 3d +8f 51 ee b2 75 95 f8 78 d2 36 65 ba 3a b0 e7 28 +a5 ae f7 23 4f 60 36 b0 23 f8 71 c2 d6 55 2a 18 +ad 5a 25 be c5 5b c7 6b ee 63 83 46 12 81 d3 9a +30 f6 d6 60 92 e0 cf f6 92 32 68 fc 04 3c df 74 +7e 8d 54 89 50 4e 7d b3 0a 7b d9 1a 2b fc 6c 1b +34 14 40 57 01 75 3d 5b 85 ff 73 52 01 2d 55 e9 +23 + +# PKCS#1 v1.5 Encryption Example 7.11 +# ---------------------------------- + +# Message: +72 e2 09 00 e5 bc c2 3c f8 79 ed 35 31 88 9a 1e +d5 aa 3d 5c 79 2e 34 e3 b1 26 90 d9 ac 24 03 d0 +f6 f7 8f 59 23 + +# Seed: +11 62 75 e9 be 1b d4 e6 f2 03 ff e4 f0 ab 9a 32 +73 84 10 e9 23 e8 39 71 ee 9a 6b 99 2c 65 0a 03 +1f 94 0f 6e f3 3d 61 50 df f8 b3 9d cf 22 50 d5 +66 5c 04 27 3b 2b e2 de c9 97 12 bb c0 12 f7 5a +31 b3 0b a0 6f f9 eb e3 b8 9f 58 a6 8f 26 85 e3 +38 ff 6c b8 d4 18 1a 8a 14 + +# Encryption: +00 21 4a 83 be 45 3a 75 bc da 94 33 a7 b9 51 43 +34 39 98 30 72 07 1c c8 21 12 b7 77 42 be 0c 38 +22 6c a3 c6 f3 8d 55 b9 ca 3f 08 c8 79 37 89 79 +6e 6c de 67 37 6d 67 3f 5e c5 7d ac c3 74 c4 c3 +17 34 44 dd 8a 63 76 de 8f 9d dc 31 a4 c0 60 d7 +72 f0 2e b7 49 51 2d cd 04 02 31 17 5d 0b 69 42 +a9 47 b2 c8 2f 7c 19 e2 ce 87 50 00 af 84 27 4c +be 2a db f2 fb fb 53 7c cb e2 fb d0 72 87 13 78 +75 + +# PKCS#1 v1.5 Encryption Example 7.12 +# ---------------------------------- + +# Message: +16 b1 10 e2 90 9b 11 b0 cf 36 b0 52 c6 f3 93 6a +2c a1 3f c3 a5 + +# Seed: +c2 bf 9e 4f b1 ed 70 ca 21 2d 15 ee 8e b3 cd 66 +0e b6 5c 52 78 e0 3a 3b 10 eb 12 b2 53 34 a4 72 +8b 94 99 20 12 2f b9 92 bf 2c e4 30 10 3d 74 ab +74 e6 d6 e7 62 b8 5d 6e f9 be b7 d7 25 98 f2 93 +a4 35 62 e9 06 89 54 11 11 51 1d 31 4a 9c 46 02 +23 76 ad 05 5d 54 ce d6 ac 1f 36 e9 8c 2b 25 a0 +ac de 64 dc f6 52 2c 3d 22 + +# Encryption: +01 6a a9 5a 08 23 82 c1 0c 04 53 10 fe fe cc 8d +17 db f2 16 d8 ed c0 4b da cd 4f 52 4d e4 85 b7 +fe 8a 26 f1 4c ab d2 97 e7 f0 3b 3c 85 08 6a 16 +14 7d 5f 61 93 91 9b b9 5a 53 c1 46 c7 84 c0 0b +53 32 e0 18 f6 43 cf 95 87 24 cd 08 07 5e b6 4c +a5 68 0c 27 c7 05 d4 0d 88 b9 d7 f4 26 b7 36 e3 +c5 f6 39 4e a6 83 b6 5c 23 73 a6 fc eb 14 f2 ea +85 1c a8 e0 00 e2 4d c8 f7 e7 c8 1b 1d 4e 72 0c +36 + +# PKCS#1 v1.5 Encryption Example 7.13 +# ---------------------------------- + +# Message: +3c 86 0a 28 fa e8 da 2a c0 d9 a3 39 89 97 7f fa +04 + +# Seed: +7c 96 99 90 6c 9f 16 65 12 5c 0b 10 67 3f 3d ad +98 c9 1a 4f f0 fa aa 64 7d b5 54 fd 62 27 ef 50 +90 9c 97 b7 06 09 2b e2 10 db 2c 24 ba 9e 8e 6a +87 f9 dd d9 f3 f4 91 29 10 29 ac 6e e4 6e 08 d0 +d7 a5 3c 46 2d b4 f0 fd 1c c2 3e c8 f5 5e da 07 +f4 ca 0d 3e 3c d3 76 22 85 5b 4d b0 8f 64 be 3e +26 c3 e9 78 75 17 12 94 ea df 86 fc d6 + +# Encryption: +01 0c 1e 04 a8 58 c6 15 ee 96 95 f6 4a b2 db 99 +80 6d a4 82 d2 b4 60 29 3c 46 dc 7b 71 7a 59 76 +a3 c7 e3 6d 8d 47 a8 4a 34 d6 3c df ca 2c 1e 38 +45 25 73 ed 44 c3 a0 40 40 5e cf 3f bf 36 83 41 +c4 a1 fc 90 83 a8 f5 52 93 67 b9 9c b8 9f c5 a0 +8b 8f 34 75 a0 d5 5e 3e 42 cc cb eb 20 d0 4a 19 +97 ee da 4e 3c c9 e9 92 d2 37 ec 7d 32 fe 25 84 +5a b0 24 d5 88 28 05 ed 52 f1 0e d7 d2 5d 62 d0 +af + +# PKCS#1 v1.5 Encryption Example 7.14 +# ---------------------------------- + +# Message: +4e df 4a d3 44 0f 17 b1 0d 26 af cd f4 e4 44 d2 +aa 61 a1 97 55 a6 21 07 98 3f 01 22 fb 2a + +# Seed: +e0 20 09 39 39 b4 18 9e 93 4c b6 2d 27 ca 5e 97 +19 65 2c 13 7f c4 9e 72 1c 4a b9 e9 f3 98 b0 a6 +12 de 8a 8a 89 99 af 0d bc 1c ea 0b 61 63 da 42 +61 23 28 14 ed 92 eb 21 60 cf 4b 26 d0 55 1b 1b +dd 91 9d 49 47 93 78 6e 1b 86 f7 9d 64 16 61 2a +28 22 61 36 3d 6c 9b 7a 0d 92 ad 17 58 ea ad 51 + +# Encryption: +00 8c f9 b3 f3 e7 60 90 d1 01 17 4e cd 97 d1 0b +ff 6d e4 d4 64 40 00 3f c0 d4 28 f1 9b 85 58 f3 +13 74 a5 fa 28 3d 03 d4 dd 43 f9 3a 4d 9f 14 ca +00 68 dc 2c f3 e2 54 37 b0 5a b1 d4 06 21 ee bd +84 16 f5 82 8a e7 c6 cf d2 97 b4 51 8f 79 94 2b +91 43 23 28 4e 29 76 a5 4d 3c d9 11 63 3a 30 7e +da f1 ed b6 74 98 46 6b 3e 98 91 6f 99 04 f4 a0 +ea 9b 87 a9 83 44 f0 73 83 3e df 9b 2b 53 94 cf +d7 + +# PKCS#1 v1.5 Encryption Example 7.15 +# ---------------------------------- + +# Message: +8a 6d 53 b0 ad a1 85 4e 23 13 69 1a ab 23 06 3d +e1 31 bc 36 c7 64 + +# Seed: +26 85 45 8a eb fb d6 07 4e be b0 fc 0c c4 92 1c +27 3e 8c 0a 88 15 51 50 2e 4c 29 9f 33 4d d5 67 +f5 16 75 b0 ff 30 f2 c4 82 63 20 03 64 99 66 99 +f9 b1 72 af fe c0 e7 9e 5c 52 3d 1e 77 9e c0 6d +ec d4 76 a5 74 30 78 1e 2d c8 1f 25 d6 0d 3a 73 +97 65 79 a2 f0 1f 07 58 4c f8 e5 fb 3e bd 8d 5a +93 2d 57 aa 8a 18 0a aa + +# Encryption: +01 3a 3d 32 ee c7 35 eb da 13 f8 be 76 02 a0 47 +5c f3 cf 28 5b 42 86 ad 93 d6 12 c3 ad 91 72 48 +80 9d 1c 4c 18 0b 36 70 15 cc 66 c4 d8 e7 86 73 +84 16 8c f4 cb 71 9b d5 93 35 53 55 cd d7 d7 53 +0c 80 c8 67 74 5f 96 61 c6 c3 3b cb 97 f2 cf 75 +a4 c2 7c 3c bb db be 7e af 4f 82 34 f2 12 e3 05 +82 56 d4 43 9a 9f 97 81 df 48 ef db 02 35 68 f9 +4a e4 59 46 54 a0 f9 ba f6 ea 30 b7 d8 d9 48 0a +d3 + +# PKCS#1 v1.5 Encryption Example 7.16 +# ---------------------------------- + +# Message: +20 f0 20 44 e6 3a c9 2e b9 fa f1 a0 ce 35 ba 72 +09 + +# Seed: +2d e1 fc c1 17 f8 21 f1 de a7 94 b5 ee b3 13 f4 +29 e0 0b 97 6b 53 41 9d 3d 03 ec aa 1b 50 76 88 +77 e8 b7 fb d6 c3 63 04 7e 15 c2 55 79 3b 3c be +0f 58 84 f0 a5 11 25 4d 31 bf b2 37 41 02 3c 1f +88 1f e0 16 a1 2e ef 1b 8a f2 2b 93 68 20 7e 7b +16 39 f7 27 1d eb e3 c8 df 52 93 ee c3 a0 32 f1 +ce 55 9c 0a 04 77 1b bf 88 98 94 7c a4 + +# Encryption: +01 70 06 e8 6f 6c 58 58 fe 5a de 0d cb fa 9c cd +11 c0 2d 4e 7d 0d e6 c1 58 ad f9 ee f1 01 07 e7 +a4 c3 6b d3 d9 29 ea 6a 47 6e cf a0 b6 ec d0 51 +49 b5 12 15 95 48 93 a1 ab 26 69 c0 42 da 83 e8 +c8 18 b0 0a e7 34 de 5f 9e 0b 97 ba 1f e3 e9 c4 +6a e9 81 6b 63 b1 5c 2d cc 61 cb 3b 8b 2c 23 dd +b9 9f cd 54 e9 55 60 91 8b 9a 0f a3 c4 b6 27 3d +1b 28 a2 13 e1 20 b4 f2 42 86 96 5e be e9 4f f8 +96 + +# PKCS#1 v1.5 Encryption Example 7.17 +# ---------------------------------- + +# Message: +d3 88 3b + +# Seed: +5c a3 bb f9 92 d7 ae 35 94 c6 05 c3 9c 3e 97 90 +25 cc b0 a3 5c 6e f0 fa 57 4a 98 be 05 ef 7c 32 +8a 19 a2 77 5b a0 6f 2d d1 e0 ff 6f 0f 1f 6a 3b +20 fb da 21 62 d0 92 4f f5 5b 70 eb fe 2b 16 d4 +ff 6a ef 8d 47 eb e5 96 38 e5 81 0f fd b5 8d b0 +5f 4d 9b 4a 3a 42 3f 96 7f e5 79 f8 73 78 36 9d +5c 5c 07 e5 e3 cb 5d dd f3 89 62 11 80 27 0a 21 +e0 10 78 c8 9a fb ab 18 9e 87 f7 + +# Encryption: +01 6f 55 05 f7 4f f1 10 4d a1 f8 a5 2e 50 bf e2 +9c 99 87 10 c5 7d e4 40 98 a9 57 9e 7a 33 13 b6 +29 60 31 02 f0 8d 2d 91 1f 91 7a 9c 96 62 60 8c +97 a1 ea 37 17 34 f6 7c bf 70 03 d9 3c 4c 31 4c +3a 0e 77 f3 65 8f a4 d0 72 25 62 c4 e1 3e 85 a7 +c8 d0 d9 d4 fb f7 12 58 84 ba 62 ad 28 59 b4 d9 +61 36 f7 a2 45 54 69 ce b6 0b 63 ba 84 74 e6 16 +0c 83 17 92 1a 07 b4 b6 43 6f 37 6c 5f 98 25 7b +17 + +# PKCS#1 v1.5 Encryption Example 7.18 +# ---------------------------------- + +# Message: +06 a2 ae 82 a4 85 32 07 c9 f9 75 + +# Seed: +e2 c3 36 33 d5 47 54 ad dd 24 c8 5c 32 d2 8a d8 +70 f1 60 3d 44 44 60 a0 3a ac ad 7d cb 80 96 01 +56 bb b2 59 ca d3 46 be 90 c0 d4 f3 fb 18 ac 6e +9d 5a 9a e2 a5 ab 98 a1 f8 4b 8e 70 c7 1d 0c cc +0a 1a 2a a3 99 70 d9 c8 3b 4b 0c 25 ae a4 3a 5a +5d ea df 9d c6 11 b9 6d 11 33 4e f9 43 09 03 89 +a8 d3 c6 6c f3 18 77 aa 2c df f1 11 99 43 27 8a +dd ff 5e + +# Encryption: +01 22 41 0e 76 5b 2c 9e 90 bd ac bc ff 1b ca 8a +e6 4b e9 9c f0 13 29 74 85 72 17 68 37 0c 36 f8 +c0 d9 db 8d 79 37 62 54 b9 c6 91 52 72 0e 05 ca +ef d4 ce 7e ae 08 b3 df e3 ea a9 1c 46 02 ef f3 +8e 4d 81 bc d3 78 7a 14 d6 22 db b7 9c e8 64 4c +4f d1 d2 e4 1f 7c 1c 97 27 96 11 74 0f c5 00 00 +31 78 b3 7b bd 81 c5 a5 82 9b 5c 14 bf 45 9c 42 +38 b0 3b ee f7 3e 49 8f 86 5f 6c a7 9a 9e d6 0f +65 + +# PKCS#1 v1.5 Encryption Example 7.19 +# ---------------------------------- + +# Message: +ad 8b 11 a9 27 de + +# Seed: +5e ca cf f6 3a 79 38 e9 98 06 8a 2f 4b a6 bc c1 +02 0e 1f 28 c7 34 e4 34 e8 86 3c 48 e6 df fa e2 +8d 18 52 72 7f fa 7f 2e fa 3d e7 01 3b 81 2a 02 +b2 17 1a 0f 94 0b 36 d9 28 db db 96 0a 6b 22 03 +0c 89 37 89 cb fd ea 97 35 e9 ad 10 94 a6 84 61 +c2 eb 6f 71 8b e4 74 d9 3a 51 93 0e 3c da 02 c2 +1f 63 63 91 4e 7e da 54 84 03 7a 76 ad c5 33 12 +eb 9d bb e4 5e 23 a1 4b + +# Encryption: +01 1f a4 3f 5f 4f bb 98 30 11 81 4d 4a f5 45 52 +1d f0 b5 9e 9b 6f fd 71 33 3b 8f 9b ba aa 0f cd +c1 42 1c e4 bf 31 bf 99 59 fd c6 b0 9b 4f 42 51 +dd ee e8 21 0f c3 a5 2f e7 c7 1a 87 6e 6d de 1d +fb 59 a4 da b2 7d 34 fd ce 5b bf c6 ed 62 3e 89 +96 7f b6 fe 73 16 20 15 28 2c 5f 45 01 38 f2 50 +4a b6 1c 1f 12 d2 64 9d 81 5d 6e 81 38 43 8f 8a +80 46 c4 e8 40 cb 71 85 98 e1 e4 a9 fc 25 a9 45 +64 + +# PKCS#1 v1.5 Encryption Example 7.20 +# ---------------------------------- + +# Message: +be e2 94 36 c2 a0 de 16 f6 60 42 91 70 07 fb 51 +30 f3 c1 aa 7d f2 c7 c3 bd 99 fb c1 b4 13 af 4f +96 a6 5b 0e 54 3e c6 a5 0b e8 3a 9f + +# Seed: +23 91 a6 84 25 dd 8f 0b 83 c9 b3 61 24 67 a7 79 +cf 92 f5 ff 96 11 c0 14 93 bc be f8 65 e1 5b ba +5e 8f cf 74 be b9 ea 25 73 a9 fc e5 41 64 d0 6b +aa 8b 6d f3 67 cc 4c 6a 11 4a a0 34 6c 45 4a 2a +9e 60 53 59 18 d3 66 0c 66 48 4e d9 53 72 7a 9c +9a 25 + +# Encryption: +00 98 9d db d2 8d 60 95 ad a6 88 1e 28 34 1c e7 +a0 a1 ca 6b f7 f3 1f 77 2f 91 04 93 af db a2 d6 +35 9d 50 b9 83 3f 83 d0 ab 87 13 ab e8 e2 10 2a +27 ab 2a 60 1f b7 7b 9a 25 d6 a0 af f4 0c fd cf +9e 12 c4 28 43 eb ad 32 83 24 a7 19 f2 9e 8d 79 +ea 9e 5d 0d 98 86 95 73 60 34 db 5f ea 73 dd 36 +00 13 6f 57 a3 98 fe 35 2b 27 8c 60 cb 74 ec 98 +ad 57 a3 e1 d8 c4 47 8c a6 17 9f 4d 04 26 f0 f4 +20 + +# ============================================= + +# Example 8: A 1026-bit RSA key pair +# --------------------------------------------------- + + +# Public key +# ---------- + +# Modulus: +02 52 e9 5b b1 1b a1 e1 c7 c9 5b 68 53 f8 de 0b +fe 2b 64 03 ac 1b de 81 9d 91 89 07 74 7b 01 99 +fa db 80 59 c2 5a af 1a c5 65 a7 49 29 d0 15 a2 +01 f8 97 a9 ba fe 75 41 68 95 5b 35 5b b0 09 ce +16 14 93 12 28 3c 39 ce e2 20 d0 f0 85 8b 13 81 +2e 86 a7 d4 e5 38 8b 7e ae 5a ca 7c 88 6a 76 d3 +b1 e6 dd 67 92 68 a8 23 11 e2 82 03 18 cb 8f 0f +7e 85 f0 e6 69 2e b0 de df 30 88 1c af 73 15 d2 +7d + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +02 52 e9 5b b1 1b a1 e1 c7 c9 5b 68 53 f8 de 0b +fe 2b 64 03 ac 1b de 81 9d 91 89 07 74 7b 01 99 +fa db 80 59 c2 5a af 1a c5 65 a7 49 29 d0 15 a2 +01 f8 97 a9 ba fe 75 41 68 95 5b 35 5b b0 09 ce +16 14 93 12 28 3c 39 ce e2 20 d0 f0 85 8b 13 81 +2e 86 a7 d4 e5 38 8b 7e ae 5a ca 7c 88 6a 76 d3 +b1 e6 dd 67 92 68 a8 23 11 e2 82 03 18 cb 8f 0f +7e 85 f0 e6 69 2e b0 de df 30 88 1c af 73 15 d2 +7d + +# Public exponent: +01 00 01 + +# Exponent: +01 04 c8 5f d5 d8 d7 93 2a 29 85 c4 cb 7e 9e 13 +a2 c4 f1 90 3c 8b 70 f3 df 97 12 fa ee 20 17 b9 +20 82 c5 16 53 c0 bd de 9d e6 6c 39 01 b7 c2 2b +e4 f2 4c c5 6d ff aa 75 d4 3b 18 a2 e0 c0 df e3 +72 6b 19 8c aa 0c 96 65 26 3a 93 79 6a 27 d3 29 +84 46 5f 4b 4a ff ca 0d 92 f4 e5 1a 37 e4 1a b1 +55 07 66 d5 ca 7e 90 d4 de 90 9b bd 79 4e 8b c5 +2b 74 99 a7 3e 46 8a b4 42 13 cb 3a 3b 54 52 d2 +ff + +# Prime 1: +01 93 3f 8f 85 82 b8 ff f3 e6 bd 30 42 81 97 f0 +ac ec 63 e6 91 f7 9b 91 fb d4 d4 c4 94 2b 8a e9 +13 a4 01 f0 e1 7b a7 66 d0 a8 ee ec 4c b0 e3 da +17 b6 d9 1f 1a 74 24 88 09 20 1e 37 30 15 18 61 +8f + +# Prime 2: +01 79 ad 28 3c ac 68 af 21 6a 06 86 f4 38 b1 e0 +e5 c3 6b 95 5f 74 e1 07 f3 9c 0d dd cc 99 0a d5 +73 dc 48 a9 73 23 5b 6d 82 54 36 18 f2 e9 55 10 +5d 8c 4a 5f 49 14 be e2 5d e3 c6 93 41 de 07 ed +33 + +# Prime exponent 1: +01 6e f5 3d 6f 3a d9 8d 9a 6f d4 a4 71 31 2b 8a +8a 62 88 3a cf 84 6b 5e fa b3 e0 77 8f 7a dc 6b +64 43 30 bc fb 04 a2 ff 0e 4d 5d 37 4e 46 fe e2 +7e 08 18 27 94 d4 32 56 55 2f 94 2f 96 a2 eb d0 +03 + +# Prime exponent 2: +e6 c6 e6 25 5c fc 82 b7 1a 40 6e ca 60 b2 60 c8 +45 07 42 39 18 04 41 85 9c 3f e4 de 16 4e 46 6c +0b 98 e2 e2 16 22 d1 e1 a7 6f 7f 03 3f 8c d8 f9 +30 b6 69 4f 10 bc 2b 3a 4f ea 91 24 d8 75 63 7d + +# Coefficient: +35 42 45 2e 83 2c 16 ac f9 c3 f4 13 49 23 5e dd +d2 75 c7 05 3c 55 3b f8 9e 1a 84 57 12 48 33 3a +ad 52 0e 3a 34 46 c4 c5 e3 fd d9 ba ec d9 29 48 +0e b5 b8 fb ef 8e 03 ad e9 e3 9a 28 fd 8e 75 6c + +# PKCS#1 v1.5 encryption of 20 random messages with random seeds +# --------------------------------------------------------------------------- + +# PKCS#1 v1.5 Encryption Example 8.1 +# ---------------------------------- + +# Message: +f7 26 37 ae c2 8d 2b 6e bf 8f 73 d7 48 75 df 01 +cd 12 24 8f 00 20 60 8e 61 c7 3d 1a 01 f9 72 f7 +4d ee + +# Seed: +cc 20 77 a2 40 01 f3 e3 86 96 94 e4 fe 27 72 bf +93 8f 76 27 66 7b 62 d5 90 f9 ee 4f cf ff bb b4 +7a fd 5f ed 6a 18 08 44 a9 12 1a 32 ed 7c bc 56 +cd 28 70 a2 d6 96 b9 43 d6 fd e9 76 7c 1b 96 48 +61 6c 32 ed 6c 40 0d 42 3d d4 ab 72 16 af ad a0 +28 40 2e b2 a1 c3 eb cc 24 5a fc 7f + +# Encryption: +00 72 57 5d 3b 11 c5 ff d6 ae 24 f3 53 ff 74 99 +27 b4 ae 5d f4 63 f7 0c 5f 3e f5 49 6b 0d 14 5e +b2 b8 a5 3c 28 d5 3e fe 8b f9 f2 7b 2e f4 ce ea +48 31 05 77 c3 d2 b4 b9 49 a1 2e 3d f3 f5 67 76 +82 88 18 45 2d 81 bd 45 af 15 8c 87 bb 57 74 5b +8a 10 fc 1a 92 a0 ea 55 c8 51 39 f8 42 f7 3f 1d +61 3b 9a 96 4a f8 ed 72 0d 0e 08 47 f7 ae 5b 30 +5c 05 f1 2c bc 4c 9c 16 84 ac f9 02 97 0d 82 09 +49 + +# PKCS#1 v1.5 Encryption Example 8.2 +# ---------------------------------- + +# Message: +2a 8e 3e e7 ea c6 b2 2e c6 58 ad 44 d6 66 c8 cd +3f 57 ec ea 29 9b 5c b7 bf 9a 37 3d fa 66 97 2f +13 e5 f3 a3 00 e8 0e 6d bf 74 15 68 0d 0d 24 90 +1a d6 b1 40 b0 00 aa b8 53 51 f9 2f + +# Seed: +fb 19 20 9d 8a 29 af af bc 05 3a c1 f3 20 ba 60 +fc 1f e1 04 aa 78 39 c8 4c 9b 3e aa 18 a8 f9 43 +bb 21 9f 59 cc 16 7a 38 4b ac 7b d3 65 82 4e 10 +36 31 b9 7b b9 a6 d1 18 f4 f0 a9 51 fa 47 8a 05 +ea 09 + +# Encryption: +02 1b 54 64 65 71 a9 a9 3f 0b 0a 03 82 e5 40 a8 +c3 97 4c b3 1c 87 eb f1 7b 3b a6 2a 1c 95 21 c5 +0d 7f 90 70 2e 13 ae 0e 22 26 38 34 e7 64 60 35 +15 94 45 a0 87 7d 9a 4f 5b 16 17 7f 7f e0 52 bb +d0 23 d0 81 89 4f 2d 97 ca c2 45 20 76 ca 11 91 +a1 71 a4 8f a1 cb bb c3 f0 f6 f3 bc 1a 44 78 40 +3a 5a 48 8f eb b3 a4 13 80 16 3d 94 2c 97 7b b8 +ec d2 86 6c 5f 5d 91 9e d2 0c 0d b3 ee 31 ef 2f +51 + +# PKCS#1 v1.5 Encryption Example 8.3 +# ---------------------------------- + +# Message: +d9 9b 4f 10 d9 f3 2e 12 ec fa e2 63 0b 22 ac 02 +6a f9 64 b9 c7 15 d2 07 + +# Seed: +e0 af 8b 7e ab 36 a6 ee 31 6d 78 13 67 f0 9e a1 +1e 31 fd c1 ef 2c f9 c9 7c 37 9e aa cf 68 72 a8 +21 3c be 4c e2 e2 9c 77 8b 35 95 40 10 06 3f 17 +76 ab 5b 17 2d a6 24 b4 06 a1 c5 8e 0b 57 4a 03 +b1 b1 b2 cd 7d 3a 9e 50 35 a9 a9 73 05 8f 04 97 +65 2d 2f 73 b1 dc 8f 48 7c 09 cf e7 1d 8f f8 f1 +45 8c 79 0e e0 c5 + +# Encryption: +01 02 3b be 85 57 c2 63 0a 26 22 46 db 7a bc 54 +03 43 88 70 38 f6 4c 64 1f d7 4e e8 74 ae 96 70 +fb 28 62 d4 24 70 3d a2 0b e4 f4 8b 23 9c d0 60 +43 81 9d 8f 61 51 44 e2 b1 f0 0c 8f 88 49 2e 62 +f6 e0 73 16 f8 49 05 35 3b 0b 18 80 ed 77 da 2b +62 d3 a9 3b b7 0f f6 a5 00 79 38 b9 73 b4 cd 5a +bf ee 0c f1 3f 5d 4a b2 16 01 02 68 5c ac 80 81 +83 4f 95 55 80 6b b3 22 d0 dc 5b 8a 2b f1 28 45 +62 + +# PKCS#1 v1.5 Encryption Example 8.4 +# ---------------------------------- + +# Message: +ca ec a8 e5 9b 81 0c f7 51 12 f7 ed 04 7a 46 69 +2c a0 b7 a8 6e 18 41 d7 19 + +# Seed: +76 1f 68 64 dc eb c9 5a 77 9b c0 b1 6a 95 86 6c +33 dc 8d ca ce 61 cd 7b f9 01 72 d9 9a a4 57 db +6d 90 88 7d 84 c4 73 8d 25 cd f0 e8 95 69 ae 47 +d3 07 3e c4 46 ee ed d5 2d 57 20 8b db 69 45 57 +03 46 57 a7 03 78 49 37 ba 69 4d 42 51 21 38 53 +2b 8a d1 d9 86 fe 47 31 8b 28 23 de 82 ce 27 6f +a6 f0 d3 c8 ef + +# Encryption: +01 1c 0c 03 f7 b6 e1 c1 a8 41 17 40 a6 e5 b4 73 +c2 8d 62 21 17 6c 9d 4f 68 02 4c a5 7c da 27 3a +f5 54 74 03 60 99 0a 1b 74 de 34 bc ea 10 3c 2d +0c 36 57 60 02 08 0b 30 bd 28 f0 76 fb 75 fc 9b +eb 9e 05 d1 98 9a 31 1d 12 c1 f2 8f d6 93 92 ad +4b e5 2c e3 89 de c1 1e ba 94 6b e0 59 91 da 7f +d8 87 a8 d8 76 8d e7 36 b9 05 bf 4b db e8 8b 85 +df c3 b2 5a ea 30 fe 90 df 1d 22 d8 a8 d6 15 65 +1c + +# PKCS#1 v1.5 Encryption Example 8.5 +# ---------------------------------- + +# Message: +10 12 12 85 6e 60 cd 27 2f b1 69 cf 62 cf 47 f1 +bc 50 ef 9f 1f cf d2 14 81 6c 80 7f 18 4a 90 3f +16 f0 e8 09 ac f5 e0 + +# Seed: +60 43 c8 df 6a 7f 4a b8 3e 31 97 e8 cd 02 25 dc +38 66 b5 d8 e6 99 3c 2c c5 b8 76 35 1e e3 3c 71 +c1 a4 cc dc e4 5f 3e 9d c7 b7 e5 1b 52 ee be 0e +27 0e 71 62 07 ca 14 03 e1 3e 72 3c e7 3f 10 45 +5e db de 85 b0 82 90 52 ed af e5 6e 9a 22 02 4d +40 68 37 1d 36 c9 1f + +# Encryption: +00 05 c5 cf f8 9b 93 3d 8b 65 23 b3 59 06 bb 3a +71 1a 0f 7f 50 3f 92 14 74 66 59 85 03 91 27 30 +3b 00 11 e7 a4 2b 41 c3 3b d2 0d b3 1b 15 60 c9 +b5 22 20 89 cd cf 53 b8 2c 95 f8 c1 ad cd 8b 78 +3f d4 b4 8a 45 40 20 66 8e 0b 62 52 0e 52 58 52 +09 db 52 9f 38 70 86 49 d8 e0 64 89 0b 22 8f b3 +c1 98 1b 2a ef 3a 54 65 ce b1 30 21 eb e0 8d 02 +e3 3a a2 dc 3c 39 28 4e f7 a8 58 dc ce b2 8f fa +28 + +# PKCS#1 v1.5 Encryption Example 8.6 +# ---------------------------------- + +# Message: +6f 03 b5 72 52 30 de 7f 99 63 69 8e db 79 75 ec +e8 + +# Seed: +a3 0e e5 ae ab 59 31 03 3e fb 70 af bc 2d 3d 11 +a6 33 84 cb 8c b3 3a 8f ca e6 14 66 84 e6 3f 0c +c3 2e 89 a7 e4 ea 43 32 7b f0 35 66 95 43 19 28 +86 de c3 fb 4e 2d 08 11 ef a9 ae c5 10 9e 31 b6 +a0 56 e5 3e 31 7f 6a 90 4b 13 a7 35 6f 5e 7a e6 +0b 97 21 5e d1 48 17 d2 8f 74 b1 64 0b 1f 2e 42 +ef 0d 38 ca 35 a3 54 a0 af ef a8 03 a4 + +# Encryption: +00 10 bd 2b 35 6f 9e ab c2 2f 7e 68 f7 2f 61 75 +f9 ab 9d ed a9 64 23 b7 4b 11 de 82 c6 07 a1 38 +86 3e 17 96 6c 07 f5 6c de 9e d6 bc 42 2e d9 fe +aa 1f 65 36 7c cf 91 cd 4c 91 58 a7 49 57 1a 0e +9f 96 07 cb 48 cd 00 a4 48 de 03 64 91 06 ce 0c +24 06 aa 50 aa 12 17 17 8c db 06 80 1c 70 a8 9a +7a 1a 83 06 8e 68 db 95 d2 4c a3 db 33 a7 e5 e4 +3a 68 15 22 74 bb bf 40 06 d9 fb 69 f0 51 4c c9 +e2 + +# PKCS#1 v1.5 Encryption Example 8.7 +# ---------------------------------- + +# Message: +87 99 13 04 54 61 bc 0e ac + +# Seed: +c3 c6 a2 4a c3 40 a4 a3 ff 3b 2c 30 2b 56 eb 83 +91 bb d9 5f af b6 64 78 38 44 38 ab d8 b4 5d 13 +2b 26 99 09 b1 87 84 0a 68 44 ad 39 9f a8 13 72 +05 e0 2c ca e7 77 5c e6 66 21 20 e1 54 b7 bf d3 +0e 8e a4 d3 4a 7d b6 a2 34 88 a5 da ea 38 08 5b +ed 56 78 0c ff 87 27 12 5f 1a d5 f9 d5 a0 bc 3b +e5 80 bc 4f a0 68 26 7b 27 de 38 3c 55 c7 fc 17 +64 c8 6a c2 1a + +# Encryption: +01 d2 1e ce 33 f4 40 c7 2a 11 1d 62 ef 48 6c 77 +c6 c8 90 cd 81 a4 eb 05 32 ad 2c 0e c7 68 dd 1d +e5 b2 11 2f df 04 e2 87 a9 5b 95 0b 1f ca 5a e6 +93 cf 0e 8a cc 93 6f 37 47 14 de 74 95 90 8c 29 +15 a7 07 21 3a c3 db da ba d8 1b 4b a1 cb 50 b9 +5f 93 14 53 1f ec 83 3f 08 21 c0 4b 57 40 d7 3b +8c f1 f9 e3 d7 ab c9 74 49 26 13 8f b0 15 c0 f0 +56 cc 4b a2 f3 16 37 34 db 44 3e bd 68 85 8c 4f +a6 + +# PKCS#1 v1.5 Encryption Example 8.8 +# ---------------------------------- + +# Message: +5b + +# Seed: +42 b9 99 fb 16 3a 6f fa 67 a9 bc 4e 6b a1 2f 81 +b1 d5 6e 54 bf 08 66 39 7f d3 14 eb 0c f9 7f 13 +b7 80 4f 76 8f ba 54 06 21 f0 5c d3 72 64 d8 e8 +f5 82 28 fb 6a b3 0e f5 4e 30 fa 8c fc b5 a8 7e +14 8f ba bf 85 88 6a b1 f0 d5 25 49 2f 56 c6 47 +f7 22 9b 2b f3 94 a0 ce ab bd 37 c9 3e 6d a8 09 +7e 82 72 7b 3d 53 e8 c2 ad 1f 77 13 e3 4e d1 3b +a5 9e 0a 91 4d b0 6f aa e4 9c b3 79 96 + +# Encryption: +00 90 e5 35 59 47 90 2b c3 fb 58 0a 84 77 09 03 +a3 95 5b 3d d7 19 1c 92 8f 74 07 ba 74 72 65 dc +8c bc 1d 22 f9 37 72 72 b1 a8 c3 5c 23 8f 04 a1 +19 37 d1 b4 35 4f 64 37 95 e9 86 de e2 e4 0a 40 +67 41 b0 21 fd f0 5c 4b a1 15 62 e8 3e 9f 28 59 +2e 0a 79 14 fe 88 b2 c0 fe 7a 5e ea f5 00 f7 e9 +8a 5b a9 54 f7 50 77 bc 8f 65 9f 21 bb 22 03 31 +4b e0 d6 d2 1e 63 20 c0 5e 6e 2d 55 79 79 22 6b +80 + +# PKCS#1 v1.5 Encryption Example 8.9 +# ---------------------------------- + +# Message: +f6 35 29 90 13 24 a2 0f e5 e9 25 8a da 2f 95 37 +b0 1f 58 39 b4 45 97 e3 29 3a 12 25 ca 3a 2a df +68 4a 72 a7 93 c6 9c 56 af 2d 34 98 d3 2a 09 2e +91 4b + +# Seed: +7b fa 85 97 a4 34 cd ad fe 15 63 14 44 95 13 d7 +6c 10 5d f1 bf c4 8c 4d 07 6a bf c0 5b 5d da 72 +e0 dd 15 f9 fe 82 a9 95 5b d5 6d 33 43 e7 c6 f2 +5a 60 74 12 07 e7 3a 2d 10 bb 95 d1 d7 29 a2 27 +93 e6 c4 55 e9 16 23 5a 81 16 94 db + +# Encryption: +00 ad f4 78 74 67 ea c2 ea 61 fe 7e f8 2f d8 7c +2d a5 89 9f 30 30 2b bc 11 27 86 d2 fb 11 c1 42 +f3 f1 d8 cf 37 16 0d 2e 4a 43 98 3f fb d3 93 a4 +1b 59 9e e6 a2 7e 24 64 25 50 2d 46 90 20 2f e5 +f8 ee 1b c6 c1 d5 d1 6b e2 3b 97 3a ed f7 f9 11 +1b d8 b1 42 84 42 65 fd 93 57 7a 43 c3 ac c6 e2 +af 20 89 d9 d2 f3 f3 1a 5c 24 7a 7b 68 31 5b ae +25 d5 ae 81 40 a5 1f fc 00 97 10 7e c1 62 0a b3 +b5 + +# PKCS#1 v1.5 Encryption Example 8.10 +# ---------------------------------- + +# Message: +c6 d1 4b 04 71 45 f3 17 78 1d d7 38 2d c0 a9 72 +57 d5 54 bb 53 53 9e e9 a2 92 e7 da 5c b6 42 6f + +# Seed: +01 ff 38 d5 de d6 c4 3d c1 dc 5c 27 a7 e4 81 3f +44 8f 45 c9 6e df 4b d9 3e 96 fa da 9b c8 ec 5b +43 4f 06 19 a3 8e 04 35 6e 06 27 85 51 40 7b 7f +37 e4 2d 91 45 62 0a 81 98 18 50 a4 9e 28 51 17 +2d 23 0b 37 82 41 10 f8 ff db 84 77 94 63 9d 26 +50 cb ed 36 26 01 05 f1 f1 29 6e 52 a7 d4 + +# Encryption: +00 5e dc 93 97 89 cf bf aa ff 28 2b af 97 01 d6 +1f 9d be e6 f2 d2 06 cf ab 77 57 61 f4 2c b2 74 +ec ba 31 c7 cd 2f e6 03 1a ba 0b 84 d4 62 7d 30 +37 e3 1c e7 e1 56 23 ba 7c b7 69 02 51 c0 63 27 +a4 31 37 12 98 df 29 21 95 b6 45 11 62 d2 da 92 +a7 07 8e 2d 07 c9 f5 6a 07 06 8a 9a 3e 17 3e 4a +ae 25 a5 d1 c6 8e 68 20 8c b5 25 3a 0a 53 aa 6e +2e f6 c2 95 d1 51 65 69 b8 62 cb 92 ca 82 3c cb +ab + +# PKCS#1 v1.5 Encryption Example 8.11 +# ---------------------------------- + +# Message: +c1 16 53 e8 10 b5 3e 65 11 f1 33 23 fe 52 26 a1 +70 c2 1f 6d aa 44 29 d9 68 ef da 05 29 d7 b6 e1 +0d ce d8 0c 6b 63 01 de d2 2f 52 91 1c 0f 7f f4 +53 5b d5 e2 0f f5 35 88 cd 3d e6 64 8a c0 2d + +# Seed: +85 fa 7c 6c e9 6d 0a 8a 1f ba 75 04 71 7c cb e1 +37 13 80 93 95 6e ff 06 3f c2 ef d4 a4 6d 7d c7 +4e 90 f1 da 9e 43 db a9 12 9f 14 ec 55 9a 4d 2d +6c 5a 19 cb f3 a6 8c 62 d0 98 34 52 a9 ee 0c + +# Encryption: +01 b0 8d 49 83 13 a7 d7 4a 05 53 14 eb 43 15 ba +02 87 60 da d4 11 14 d5 94 2d 63 bf 8d 27 be 3f +49 cc d9 4a cf 9d 3a a2 2d 09 b9 9b f9 74 09 bc +f3 32 13 c0 99 67 07 86 82 03 a9 ab 27 70 8d 3f +ff 69 b8 9d 02 e3 6e 01 21 a1 19 b8 d4 d9 bf d4 +fe 8b 16 8f d7 c1 2a 24 3f 7a 00 0b 39 bf 8d 56 +48 17 24 20 80 23 bb 60 7b 30 50 5d d1 74 2f 87 +9f 16 c1 0c e4 90 d3 4a 68 0d 27 ac 39 60 7d a2 +4e + +# PKCS#1 v1.5 Encryption Example 8.12 +# ---------------------------------- + +# Message: +09 5b 77 c9 4d c1 b1 87 88 e4 00 e6 91 6a 4b 4c +fd 73 ac e0 df 9a 3a c1 31 bd f9 ad 0a 12 db 76 +6d eb 22 53 59 d9 01 cd 56 ed 88 cd a3 d3 28 56 +54 02 + +# Seed: +a3 4a 68 05 55 71 09 c2 61 dd df 5f 85 d3 71 ae +65 20 f4 5a df 46 96 01 b5 c3 59 fe c7 44 cb 2a +ae 80 98 3c 73 2d b6 c5 45 df 55 e0 20 8a cf bb +f1 c2 c5 e7 99 88 f3 4e cd 6e 5b b4 b5 25 c1 b8 +bc b0 70 d0 d8 42 48 b1 f8 e7 48 0e + +# Encryption: +00 39 56 36 a8 26 67 dc f0 0d 5d bd d8 54 12 06 +94 8d 49 36 89 17 ec 0e 00 fd 7a c5 ca 8b f4 4e +c5 83 78 38 6e 59 4b c0 65 a9 a6 3c f2 a3 55 a6 +08 b6 f0 ba cb a5 60 08 bb a4 72 2a 7c 47 05 45 +a2 0f 38 78 53 d4 60 31 3b 2e 86 4e 17 b2 33 e5 +96 35 41 32 af 17 3b 4d 04 49 26 47 79 02 62 d3 +a4 3f 84 27 37 88 37 46 6b 06 73 a8 15 27 e6 be +10 45 80 32 6f ec 84 ba 37 1e a6 10 91 fa 40 33 +a4 + +# PKCS#1 v1.5 Encryption Example 8.13 +# ---------------------------------- + +# Message: +38 + +# Seed: +54 7c 91 75 19 05 d5 a2 84 ac 3f e4 32 cb e0 30 +55 b2 85 06 58 96 11 0e a3 6d 05 a1 40 08 3c e3 +95 5f a8 28 41 ea f6 db 4a 50 d1 2c 07 4f 45 a6 +88 b5 57 6d 6e 61 68 07 54 0a c1 17 58 5c 5b c3 +be 52 60 72 7c df 12 3c 77 4d b4 0c ff 29 70 88 +62 48 53 e4 69 51 36 b9 31 16 15 17 a7 b9 b5 dd +cd 9d 32 de 3d fe 3e e2 ea 68 8c f7 bf 88 2c cf +7b 9c 48 d5 e1 9e ff a6 50 4a 42 62 0b + +# Encryption: +00 89 e3 9d cf df 91 69 3d ef e3 9d 12 bb 25 f8 +0a 76 8d 44 1b 48 1d 6a 75 48 69 50 42 48 0c d4 +a0 ba 97 83 d5 c5 bd 38 89 6d ce 06 ac b1 77 a4 +ac 59 68 e6 55 a7 aa f5 0d 69 4a 64 97 13 b7 a4 +bd d1 4c 81 9f 83 b2 04 7d e2 19 5f 73 03 66 54 +53 a8 a1 11 5e 5b 48 ac 0e 9a 65 ed db 31 89 51 +7b 04 6f cb c2 d1 43 81 77 6a 77 fb 46 8e 11 29 +3c 78 c8 37 4c 8f 46 60 35 1a c2 b2 c7 84 5a 25 +fe + +# PKCS#1 v1.5 Encryption Example 8.14 +# ---------------------------------- + +# Message: +80 64 6b 3c 4d f0 eb 79 1b da 0c cc 4d 97 d8 1e +a8 f6 f7 4e b2 45 e2 c7 c3 48 fd 7f b9 90 16 a9 +d4 0a 60 5a c7 42 b2 7a d2 48 + +# Seed: +11 b8 e7 98 d7 a1 42 d0 82 e0 59 8a 8c b4 f8 c2 +aa 87 5d 5b 65 17 8c 4e e6 7a 5c b8 41 d1 cd a3 +04 31 d0 20 df 28 80 d7 93 58 15 d5 9d 91 b9 99 +3e 53 ac 34 1c 97 28 61 ea a2 66 97 cf 10 ca 8b +27 94 b4 53 03 be 03 48 9e be 07 4d 8f 23 98 54 +c3 a6 06 fb + +# Encryption: +01 f1 e5 a3 db d8 24 75 2d 2f ba 3c 32 42 e9 d9 +96 e6 27 43 0d 49 3e 1b 44 6a 2d bc d8 6a 48 09 +3e 37 a2 e1 28 b2 8c 49 d2 d1 72 bf 5a 97 7c 36 +9b aa 9f fb 83 9b d2 fd f0 0b d3 0f f5 22 8b 57 +6b 94 e6 d8 ec f9 44 24 7a da d0 19 f2 1d 06 fb +e4 18 d3 a6 d5 4c df 11 3e 8d 14 f6 ea 06 d8 db +79 64 93 bc b1 89 6f c4 f3 f3 03 86 c5 c8 ba b7 +03 7c 87 9a fe a4 7c 8f b7 a3 c5 b5 0b 29 18 66 +b9 + +# PKCS#1 v1.5 Encryption Example 8.15 +# ---------------------------------- + +# Message: +6b 63 1c 7c 35 ea 75 a1 b0 + +# Seed: +3e 42 40 c3 e0 9e a7 83 55 35 8c da 61 29 53 47 +30 f4 8a 9c 9a 1a 52 13 28 4b fd 07 71 21 6a d4 +ca 23 3d 99 3e e6 35 7f 4b 1b 12 a6 ba a1 77 43 +13 4a 85 7f d7 69 a8 bc 78 d6 1f b1 4f ea 05 22 +1d cf 5a eb 1a ff d4 0d 8b c6 94 5c 30 10 45 b6 +86 c6 11 fa 43 7e 30 ca 0f ab 5a 4c de f5 20 5b +af 99 26 c6 07 be 96 37 b1 50 7f 50 83 e9 40 cc +fa 2f b3 86 19 + +# Encryption: +00 47 cb 9a 91 98 d9 83 b3 22 24 cf 27 fc 72 99 +bb d4 ae 07 78 a8 3f c5 9c 47 45 fa 99 e9 17 bb +74 f8 bd 4e f1 3f 14 0c a9 b7 2e 2a a1 74 ce ea +26 48 94 e2 15 f4 1c 36 d4 e6 f3 46 f6 9b 4f 85 +50 5c 54 cd 46 25 9c 71 2e 30 c4 92 94 ba db 1c +47 16 85 1f 2b 75 e3 96 12 cd 54 66 ba 56 e3 f3 +15 99 c2 dc e2 3d 04 c9 3a 64 40 22 27 df 40 b5 +14 c7 4d 0a a3 6e 1e 86 58 e2 92 77 b3 05 af 35 +15 + +# PKCS#1 v1.5 Encryption Example 8.16 +# ---------------------------------- + +# Message: +40 08 55 da 54 a6 d1 fe 5f b5 8a 73 d2 a5 e5 58 +38 70 fb d5 25 d2 f5 72 ad b5 96 30 06 d0 a1 33 +9b ea 88 9d 6d 46 a4 37 62 f5 13 bb 7c c0 36 22 +bf 85 92 44 d6 + +# Seed: +49 6e 50 ba b5 ef 18 f2 2c 3f 62 b9 21 14 8d 36 +c1 01 ad 0a 9a 20 38 67 58 08 ce 8b 62 f8 a6 a0 +ba 8d 91 05 f9 2e d8 a0 2b 31 2f 32 4f 3f d3 91 +92 bd 41 53 78 4f b5 59 05 c3 b6 69 30 7b ad a8 +27 af a1 b5 cb 3d c1 1d c4 + +# Encryption: +00 d3 a8 5d ec 97 d3 44 88 ee 33 c6 58 ba 18 8e +64 cb 57 83 7d 2e dd bc ba 8e e5 2f 13 f1 e4 fe +9b ec 2f 92 e7 21 09 87 e1 c3 fe 34 5d 40 19 77 +0b 07 74 94 51 b0 4d 67 30 d5 3a 91 01 5b 25 7e +81 0d ae 0a 0c 11 6a 4f 22 45 14 ed bd 39 b2 c6 +5e 15 2d 3b 97 89 dd a4 f0 d4 5b f9 83 2d 27 9d +34 31 06 2b 4d e1 b0 67 7e f5 9c 6c 33 27 68 ec +da 3a a6 bc d1 0f 70 bd 06 03 0a 76 65 ed 3f 20 +79 + +# PKCS#1 v1.5 Encryption Example 8.17 +# ---------------------------------- + +# Message: +b8 7e db 45 5a 7e 85 53 9f 92 8e da e9 09 fb f8 +f7 a1 99 c0 3a 94 a9 a4 5a ca b2 5e fa ee cc 26 +29 74 ca e0 bb 72 24 3a 99 c6 47 20 79 f1 97 38 + +# Seed: +03 5e 31 59 4a 56 65 60 5b 84 fe c9 3a df 92 58 +50 85 1d f7 b3 94 e9 bb ec be 4d 72 c9 2f 27 03 +b6 d6 08 96 e0 05 4c 59 ca fa 5e 0d 28 6c 81 2b +23 e5 37 88 5e 4c 34 38 a7 72 a1 61 0a e9 fa e9 +18 e3 4d 49 92 c7 f2 63 f3 e8 e2 f9 80 b8 + +# Encryption: +02 1c 8c 95 9a ec 47 29 68 87 68 93 0d 67 e2 02 +99 dd 47 90 2d b0 79 f2 39 b8 c2 88 b0 a7 04 47 +c7 19 6b 84 91 2e aa 5b c3 af f6 ba 63 0c 2e aa +3f cb b2 4b e4 63 83 65 31 25 0b d4 c4 f2 a1 da +68 c8 bf 4f 40 cf 5c 98 b6 85 eb ec a4 d0 3e 76 +b3 34 af 0b 1b 34 48 8b 58 2e 29 35 25 35 72 f7 +fc fa a8 35 44 e7 fd 52 ef 45 8a cc cb 19 30 1a +4d dd 50 51 6f 16 a5 fb 78 f3 95 99 00 db cc a1 +f2 + +# PKCS#1 v1.5 Encryption Example 8.18 +# ---------------------------------- + +# Message: +30 2a c8 0e 30 c6 55 3e 93 59 df 85 b1 e2 4a 16 +c8 62 a2 0f f4 fd 9d 5f 14 6b e2 81 dc 30 66 ae +b8 fa 00 b5 2a 99 + +# Seed: +32 6c 99 35 8c 4e 5f a4 d2 c0 43 f0 2f 92 70 5f +79 1c f7 12 bc 01 04 5b 4c f3 49 b4 2a e5 ac fa +c3 78 38 11 bb f0 7f 34 bd 6c 85 19 55 cb a4 a8 +b2 a7 d1 39 a7 8b c4 d8 8e 3a 88 e6 c4 cf 49 4e +6a 4a 52 35 41 45 e1 18 83 cb 5c 78 b5 72 f3 0a +51 ed 23 f2 56 4b 69 60 + +# Encryption: +02 03 29 87 cc f7 5a 63 86 24 17 80 64 db a4 b7 +2b e5 39 e0 7e cd f5 30 03 56 cc 43 d7 29 fe 34 +fb 35 bb bf 5a 32 17 2c e3 9e a1 fb 47 d3 8e 49 +7a 03 b6 01 ee af da af 99 a3 4f d7 21 18 4a f2 +e1 8e 83 d0 50 a4 10 8b 15 e5 e3 a2 7e 0e 63 6d +f8 d9 4f 98 16 58 eb de cd ab 0d ef cc 0d af 3a +c9 a2 7b 3f 22 a0 54 1d 35 00 27 52 e9 cc 4f b2 +58 2f ae 25 11 a1 32 ec 5c 22 8a 88 72 bd ba d6 +87 + +# PKCS#1 v1.5 Encryption Example 8.19 +# ---------------------------------- + +# Message: +00 b3 82 01 74 6d ca f4 03 48 af 57 ba d7 25 70 +ca f5 a2 85 5f ec 6c 42 ee 22 dc fe 64 c9 97 ec +62 a5 c9 75 62 4b bd 1f 8e c9 16 + +# Seed: +93 91 05 c0 04 c0 1a a9 f4 74 46 d3 cc f5 30 e9 +b2 17 4c 50 ae bc a0 a9 5c b7 a4 d8 39 54 ef b8 +03 9e 59 1c 19 71 d7 76 ce c7 61 12 92 06 db 7a +d3 dd 87 16 68 25 5a 55 50 ac 4e 94 8b e0 5c 16 +22 20 dc ef ec 13 ff 1f d8 a5 a7 f7 8b f7 15 b4 +9d 03 ba + +# Encryption: +01 2b a8 7d c0 3a 1a 38 bf ed f1 21 ed 87 22 82 +7b d9 7d d6 3f dd fd d5 90 50 c5 3c 5e 7b 49 fb +7a e6 03 84 87 82 0e fd 5f b9 71 43 81 ce 8d ae +b5 6d 13 50 bf c6 7d f0 91 be a2 ac df fd e9 29 +2a b1 29 1c c9 75 1d 9e 39 a8 26 f0 54 ad 1f 33 +a2 b7 94 da 50 ef 80 67 29 17 e0 b3 81 40 45 d2 +3d f4 5d ba 3f dc 6f 09 ab 0a 01 8b 06 0a a9 fa +fc 3a 5d 19 d5 eb 64 31 0b d6 02 a9 91 1d cb 7f +24 + +# PKCS#1 v1.5 Encryption Example 8.20 +# ---------------------------------- + +# Message: +ba 28 33 66 04 76 d8 73 15 07 66 9f 50 29 8c 2c +68 d4 4c 53 e3 d0 a8 03 78 6e + +# Seed: +86 ce 8e 92 ad 88 b1 46 2a 17 1a f2 8b 4e 99 08 +8c 04 98 a2 9b 4c a5 e6 6f 64 f8 6a de c7 f9 64 +e8 eb 82 57 c5 c0 1c da 16 5e 0f 75 11 db 14 7c +10 bc 07 51 5f 04 f0 5f 52 d2 bc 89 22 83 57 c6 +61 b4 3f 43 d5 42 db e7 78 34 09 1c 7c e7 0b 18 +2e 19 bc 93 6c 30 68 4a 83 1e 2c 3b 8a 4a 74 46 +3f 0c 9f 1b + +# Encryption: +01 12 ac 28 98 a2 5c 13 28 79 1f c9 6a 82 b7 29 +18 b5 1a 66 8c 54 0b cf fc 8e 0b 3a af e2 05 ee +87 1f 5e b7 6a d1 16 d3 04 cc 04 42 bd b1 af 5b +9a 63 45 82 7e 67 8e 40 e3 3f c8 58 ef 6c 45 6b +e4 36 52 bb 2e bc 39 64 b4 bf 4a 93 a8 ee ef 84 +04 ae f1 a0 44 41 5a 15 6f 7c fd 79 95 ac 25 e7 +b0 30 26 69 8e 14 48 9e fc c1 ae 92 96 58 bb 66 +3d e0 ac 44 a7 a5 5c aa 0b 0b 20 34 c2 aa ec 13 +4e + +# ============================================= + +# Example 9: A 1027-bit RSA key pair +# --------------------------------------------------- + + +# Public key +# ---------- + +# Modulus: +06 8e f0 b2 74 15 7d 7b 5e c7 29 03 86 59 56 18 +3e 0e 34 62 ec d2 21 14 ca d4 c7 ba ac 94 c7 c2 +c5 e6 cb df a2 ab fe af 8d 23 18 2e 9c 08 81 5d +10 0d 8e 8f 62 1d 3c d4 af bb 99 85 96 6f d6 a4 +18 2b 59 90 88 a3 5d 77 fe 01 78 ac f7 53 1c 70 +d8 96 ff 78 8e dc 82 06 05 40 ef ef d9 f3 c2 4d +5b e6 9a f7 f2 f4 44 85 b1 91 18 a4 68 81 4f c5 +13 e3 a1 ce d6 77 91 f9 03 6e ee 56 fa 9e 20 60 +2b + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +06 8e f0 b2 74 15 7d 7b 5e c7 29 03 86 59 56 18 +3e 0e 34 62 ec d2 21 14 ca d4 c7 ba ac 94 c7 c2 +c5 e6 cb df a2 ab fe af 8d 23 18 2e 9c 08 81 5d +10 0d 8e 8f 62 1d 3c d4 af bb 99 85 96 6f d6 a4 +18 2b 59 90 88 a3 5d 77 fe 01 78 ac f7 53 1c 70 +d8 96 ff 78 8e dc 82 06 05 40 ef ef d9 f3 c2 4d +5b e6 9a f7 f2 f4 44 85 b1 91 18 a4 68 81 4f c5 +13 e3 a1 ce d6 77 91 f9 03 6e ee 56 fa 9e 20 60 +2b + +# Public exponent: +01 00 01 + +# Exponent: +71 94 0b e6 79 7b b3 28 5e bd c2 0c c9 27 5f 5d +77 55 88 e9 af 6f 68 7a 2e 39 d2 c1 91 11 10 76 +95 dd ed e3 91 d2 19 6b 29 58 1d f3 15 4a 37 12 +fa 6f cd f8 5b b4 fd 48 64 1f 07 1f fd b1 de 08 +a1 d5 92 1c a1 0e 68 dc 04 13 13 c9 bb cb 80 81 +bd b5 d4 60 42 27 cb e5 78 07 41 65 74 d1 a3 8d +a0 b2 34 4b b2 15 b4 18 2b 10 6b 2b 53 4a 8d 32 +06 f2 d7 d3 03 b8 dd 5b ce 29 2a bf 75 cd 76 49 + +# Prime 1: +02 95 10 b9 33 b7 c8 4e 41 ff cc 72 2e 32 38 60 +c9 b2 d0 88 3c 68 33 62 4b a5 bb b8 97 53 d7 60 +3a 7d cf 26 6c c8 f4 bb 07 48 48 26 0f 68 dd 82 +6b 63 8a 8d d2 ef af 68 aa ee 26 5a e8 98 39 b1 +63 + +# Prime 2: +02 8a 2d 03 34 49 44 62 f6 11 f3 60 3e 0d 37 4f +3e 32 d2 fa b5 e9 d6 97 2d fd 70 79 64 46 a4 8b +c3 03 ee 25 8b 75 a1 b7 ac e7 0d 48 58 51 79 4e +42 84 f2 dc 51 d3 97 8d 55 53 7b ea 22 55 11 f4 +99 + +# Prime exponent 1: +01 b9 55 0d df da 3d 6f 09 9e e5 f6 00 a3 64 82 +31 86 20 b4 23 68 09 8e 01 24 e7 5b 88 23 e0 31 +0d 3b ba d5 53 61 22 09 cf 05 d1 ad 1f 32 8a 57 +ac ac 2a ef 1e 39 08 69 1f 5c 98 dc ae 56 1a 86 +33 + +# Prime exponent 2: +e8 ff a4 8c 52 4d 5d a1 8d 61 48 76 34 4a 43 ed +a8 4d 0f 67 ad bb 27 46 65 f2 ae ae 0e da dc f3 +30 2f 61 e9 0e 68 bb e8 0c 8d 28 05 ee 7c a8 5d +12 43 ee 4c ac a5 3d 12 fc ee 05 43 f4 74 90 d1 + +# Coefficient: +01 98 4a 81 5c db 46 ad 81 cd 82 10 aa 07 22 70 +0c 59 90 9d dc 9c 4a 49 f1 9b e1 5d a6 04 47 8c +21 88 81 d5 43 a7 54 6b f7 75 69 4c 2b d1 3d da +69 2c d0 bc 24 39 ef 22 ef b6 7f fc 5d 46 95 21 +b2 + +# PKCS#1 v1.5 encryption of 20 random messages with random seeds +# --------------------------------------------------------------------------- + +# PKCS#1 v1.5 Encryption Example 9.1 +# ---------------------------------- + +# Message: +96 ad 3b a4 d2 9b dd 35 25 bb c5 d0 2e 88 c0 13 +3f fd ea 40 94 74 db 34 df 73 3c a5 9c 3a 23 2f +6a 64 c2 14 3c a1 31 a7 f1 8d 00 5b b3 aa 6c a1 +ea be aa 13 6b ec 37 db 11 1d 4d 8f 61 + +# Seed: +10 e9 f5 09 3c ec 87 2e db 16 16 2b 6b bd 52 12 +f6 10 1a 71 d5 1d c1 42 0c ad d1 d5 50 fa f9 af +40 f5 73 d3 e3 ab 68 91 d8 a8 82 ef 06 56 bc 30 +06 2a 05 b1 cc 27 7a 11 c9 ba 2e fd 51 03 c5 6e +23 + +# Encryption: +04 de c0 1b bf 8e 0c 22 96 d9 f5 bc 2d 2b a8 95 +34 3e c3 0e c5 44 13 57 6d 80 84 b9 31 43 cf a2 +d2 03 3b f4 c2 c2 e0 3f 5b 02 59 ed f1 4a 8f 3e +11 69 85 77 65 2a 2a b9 f5 1a b0 18 7c c7 51 75 +c8 6d fc 9a 45 b1 e4 eb 8b 54 47 a9 4a b9 b5 17 +7a 04 04 ba 49 e5 7f 83 c9 3f 7f e2 de 24 18 45 +f5 81 f6 42 12 43 7e 0c 04 ff 34 ea 1d ee 6d d2 +8f 6f f3 36 72 35 44 13 74 f0 f2 ef 71 a9 cd ae +9e + +# PKCS#1 v1.5 Encryption Example 9.2 +# ---------------------------------- + +# Message: +7f 92 ab b6 e5 2e d5 d4 20 84 9e d6 cc ab 36 c3 +d0 84 92 55 43 1e 19 3d 67 bd 94 4b 6c 0f ce fb +77 29 cf 5a 31 + +# Seed: +ce a9 68 be 78 ab 5f aa c2 27 dc 3c 6f c9 ce d4 +9f 85 1e d5 8b 08 d5 ca 37 54 28 48 9a fb ef 3b +f5 ed 83 74 6d 95 9a 0a 56 e9 ac 66 ff 2e 7c 8b +8c 3a da 97 fa 15 dd 7f 99 13 41 74 70 70 cc ad +65 42 bd 7f 4b 33 f5 56 04 45 8b 91 03 ae 13 dc +89 b4 e6 2c cb f8 4f f7 3b + +# Encryption: +02 5a 1e 65 eb 37 f4 b3 28 cc 31 b0 17 24 f8 3c +26 ed 8d 18 a6 51 65 21 3b a0 ef f7 ae 76 7e e6 +0b 99 27 76 1a 06 94 b5 c3 bb 64 b7 e0 39 96 a3 +56 8d 6f d1 ac 6b 7a 8b 71 97 5b b0 71 6d 94 5c +02 d4 73 68 96 6f ff b1 d4 49 fc 6e d7 3e 2d 19 +83 1b 86 d1 87 67 51 29 36 69 e7 7d 6e 12 a0 f0 +c9 62 df cd 40 0f b8 3c e8 26 07 16 31 7a d5 fd +e2 18 49 aa 6f 68 e7 0c e0 b5 b3 11 42 89 8a d1 +a2 + +# PKCS#1 v1.5 Encryption Example 9.3 +# ---------------------------------- + +# Message: +f5 b5 35 b6 3d 53 5e 21 37 73 2c 30 13 37 c9 53 +ea 2e dd 58 a7 8c 20 25 83 2d ca 9d 6b cd ad 87 +c9 97 c9 06 83 6b 2b f9 5c 83 f0 3f 7a fa 29 01 +34 6d 67 4a a6 9a 1b 47 f6 b9 16 fd 4b + +# Seed: +c8 9e fd b2 34 e0 1a 2f 07 76 29 57 e8 c0 a4 f9 +1a ba e6 d4 f3 60 e8 9a 7c 48 6c 55 49 f3 d0 ad +75 77 7f 0c cd 97 a0 97 5e 98 44 d9 86 87 02 76 +c9 82 5f 5d 1e ef 3d 1b 48 7a bc d1 9b 51 2d 08 +be + +# Encryption: +03 9a 1c e8 c0 91 62 51 a0 1e 5f b6 61 5d 2e 11 +98 2f 4f ae 7d 46 df 21 da a2 98 f2 c7 46 11 b5 +58 16 cc 27 fa 37 27 9a af 59 02 ec b6 c8 39 fa +90 0c f3 af 86 ff 40 a4 47 dc 40 22 35 f9 06 67 +91 23 f3 cd 38 19 04 f3 3e ee 35 3a c9 0d 5f 7f +20 3a 6e a8 91 35 1a db 11 60 1b d9 d6 b0 a0 24 +33 3a 24 55 be 1c a6 2e d8 2c f3 7c f8 de 4e 23 +92 dd 54 e7 75 03 3c 56 99 0b ae 5c 43 91 b6 65 +3a + +# PKCS#1 v1.5 Encryption Example 9.4 +# ---------------------------------- + +# Message: +a7 cf 29 82 03 47 a5 2a b9 cc 42 04 bb 6a c1 bd +7f d9 0a 75 8a 15 6d fa 9c e7 19 27 e7 4e e2 15 +98 70 8c f6 9c fd 79 85 74 2f 50 27 ff a7 10 + +# Seed: +10 9f 0d 6c a0 e1 3f 50 4c 07 d8 4a 5b be 43 ed +6a 94 ac ba fa b0 48 89 36 05 d3 41 c5 d2 8d 85 +44 c3 fd 28 43 50 f2 c2 2d 1f 36 7d fb 9b 6a 67 +51 d0 6a ae b1 7c 3c 0a 10 11 ae 38 fb a4 e4 6d +4e 44 c4 82 87 9e ba 06 44 37 48 71 b5 c5 3b + +# Encryption: +04 48 c3 9c c4 57 d6 cc c3 0b 0d 76 ff 5a 13 2e +00 c7 5d 53 36 46 b8 44 0b 13 ce 73 0e 1b 7a d8 +3b b2 ba 4a 08 2b b5 a3 3c f4 14 66 e0 67 fc f1 +6c 6a 29 f1 87 9f 77 e9 b0 db f3 ec 08 05 75 be +ba c0 c5 67 6b ae e0 02 d5 73 d1 bc c8 a7 0f ed +2a b6 79 43 ef c9 bc 13 13 9e 5d 8d de 2c b3 0e +1b 93 4f 50 cf 6c 45 73 92 3f 73 98 de 66 70 cc +26 34 1f 3e 35 a4 19 36 1e 59 f6 08 98 f2 69 2b +94 + +# PKCS#1 v1.5 Encryption Example 9.5 +# ---------------------------------- + +# Message: +b8 03 c7 ef 5f 9a 9b d5 84 01 + +# Seed: +8e 77 58 ed 4d 1b a4 dc e0 88 92 6c 10 b2 f3 d4 +c1 e2 67 1a e7 2e 65 9f 72 1f f7 be 6f c0 35 e3 +85 d5 12 d0 7a 38 dc ca 1e b8 31 fe f9 06 10 04 +44 ee 99 5c b0 7b c2 6a 5d c9 2b 27 2a 74 a9 2d +21 49 73 25 22 d5 39 43 4f a4 d0 3b 07 cf 96 99 +95 8c 19 89 1d 1d 59 06 aa 36 d0 a8 d0 6c 6f c8 +7a 45 51 bf 18 58 bd fe d5 f8 86 cc 8d 31 ee 4c +16 4e 98 1d + +# Encryption: +04 b6 2d 4d 4b 9c 1c 3e 05 13 09 79 5c 69 24 8a +ed 38 9d e2 4a 6c 79 53 8a 2d 51 d5 d0 37 19 a8 +a5 28 75 0d 5d 25 4a 1b 91 40 96 db 96 d8 3d 2d +9a aa 2a 16 5b b1 34 6e 44 c3 57 27 56 c3 8d 52 +f8 d3 07 c0 4e 1e fe e5 84 78 22 31 7a b4 69 34 +5b 86 c7 b8 5b 54 15 41 c9 92 ab ea 98 d1 08 a7 +df c7 09 1c 30 c6 68 5a f0 e3 3d 04 66 ac e4 cc +cc b3 4e 5b 26 6d 3d 6b 94 7b c7 c0 ae 34 d5 e2 +64 + +# PKCS#1 v1.5 Encryption Example 9.6 +# ---------------------------------- + +# Message: +61 7e a9 e4 a5 6c 4e c1 d3 d7 fd 7f 32 81 ae 7f +a9 32 b2 a0 a6 cf 55 eb 60 48 14 56 81 b3 58 8e +df 70 12 69 f8 9f e6 4a a1 4a d8 df 0d 46 79 61 +31 + +# Seed: +64 d7 eb d0 48 50 eb 6f 7a e1 af 48 12 0a 80 13 +0f 32 ed b5 03 69 64 0b 22 2b 8d 63 ef f6 57 12 +70 dc ab 31 76 d0 24 72 28 dc d1 c3 f3 cf d5 13 +31 b7 56 a8 65 2a 14 dd aa b9 93 96 b9 19 9a 73 +87 50 d6 9e fc d3 77 f1 84 ae 19 b5 a9 + +# Encryption: +02 df e7 29 58 59 58 81 d8 07 56 6d 3e 36 07 c0 +22 e4 61 fe 1d be d3 cc 6d 63 de dc b7 19 0f 06 +c7 d2 4b 4f 03 26 4c af bb 74 82 ec 28 b9 ba 48 +9d 03 11 5a f5 8f de 47 5e da 58 bf 01 55 cd f1 +af 16 df 20 6b cd 12 57 04 c3 e3 15 ad 3d 95 44 +b9 e2 c2 fe a8 10 ce 48 45 56 d2 9e 07 ad bf 0f +f4 61 cc bc f6 62 bd 74 95 9a 43 7d 4c 80 11 ce +ad a5 50 2a f7 67 6d 9a 15 21 e3 18 9d af de 00 +dd + +# PKCS#1 v1.5 Encryption Example 9.7 +# ---------------------------------- + +# Message: +c9 1f 2c 98 c7 5b 2f d4 cd 8d 5c 7f f2 e7 69 b1 +2f 28 f3 13 fb ac b5 1b 5e 50 14 df ce 9d 63 5e +7c 6b 2d 88 af 5e ac 30 d1 62 b8 dd c2 2e d8 bc +7b ee 50 6b fb f3 1e 51 ba 48 f4 26 + +# Seed: +6c 44 59 61 f8 6f a2 98 d7 64 7c 22 24 d9 5b c1 +27 da fc bd 5b 90 21 ec 7e 9e bd e9 6f 5d 7a 76 +f4 ee d0 ac 92 2a 6e 93 eb 3b 4c 3c 43 f8 a5 7e +18 29 4e 1a 51 73 b0 f7 e2 dd 2c 4e 57 7a 4b ec +e7 14 + +# Encryption: +03 a8 85 aa f7 b7 d9 4f da e3 4b 41 c3 74 17 66 +a4 09 c1 ee 02 32 b1 c5 3e 5f 6c 5a a5 4a c1 ef +0e 5b f9 9b 9f 7d f3 e9 b0 0c ed 94 76 ee 1a db +8f c5 71 68 91 f5 4d 45 ce da 70 b9 db 3b 8f ad +25 e7 77 95 af 14 81 ec 49 21 84 c4 9e 9d f8 23 +ee 64 66 41 0f 65 01 3c e3 c5 79 16 63 5d a8 30 +67 7f 93 2b da ba b5 c0 a2 08 d7 f4 36 7a 7e ab +a7 5b 04 5d 25 ac fd b4 15 fe e0 52 19 a5 84 23 +7a + +# PKCS#1 v1.5 Encryption Example 9.8 +# ---------------------------------- + +# Message: +7b 1c 31 51 a3 8d 32 ec 7b 82 c4 8c 00 0a a4 81 +de 41 8e 80 3b 67 3d 2e 9a 0f c3 d5 e9 74 ad cd +ce bd 3c 2a 8f 41 14 21 18 a5 5e 87 d0 4b ba d5 +b3 64 25 + +# Seed: +b0 f5 be 9b 3f 23 7c c5 af ca 5a 99 fc cb 77 b6 +ef d8 68 94 7f 98 55 4f be ce ac fa 88 4c 15 15 +39 d7 cf 42 3e 72 60 31 bf eb 8d d2 d4 f3 01 da +6b df ca d6 e5 81 65 82 ad dc e1 0d 85 d5 ee 1d +04 46 f3 73 b9 5e e1 60 bc f0 35 + +# Encryption: +06 6c 30 09 dc 6c ba c7 b8 bd 51 41 c5 5c f8 6a +3d 79 69 d5 85 45 2e 3a 66 54 0f 94 02 db a2 15 +e3 fb 3a 27 7f 0d 33 96 c8 c0 08 af 19 91 3e 3d +91 e4 0f 86 76 06 b5 bf 54 30 4c 04 71 da dd 64 +04 b6 7a 48 57 bf 52 24 6c 0d 60 18 23 dd 03 80 +c6 60 9d ac b9 2d b6 02 e5 57 64 ae 46 50 df 1a +db b4 b9 5f a5 af 4b cd 11 21 f1 3c 0a 73 23 ad +a8 c6 0d e3 d0 81 72 9d 19 7f 9c f8 e2 7c de 80 +b1 + +# PKCS#1 v1.5 Encryption Example 9.9 +# ---------------------------------- + +# Message: +b2 93 c6 f6 d0 5d 1f 38 b5 61 ea 3d 0d 0a d6 a2 +af 83 09 bb 9a de fa 77 8f d6 bb 9f ff 3e 01 0c +40 4c 53 39 97 cc fe d7 e1 91 7a 66 92 61 cf cc +a4 e3 70 29 99 1d 2d e9 b2 99 + +# Seed: +87 bd 2f 6b b4 82 45 59 1d 65 f0 23 a6 5b 63 bb +ba 84 19 79 2c 01 41 09 2b 1d b1 be 53 e8 c9 b4 +df 95 f0 ad 55 b9 6e 5e 57 61 5d 21 4b 49 77 87 +0a 27 2f 72 31 66 c6 20 45 76 5e 6b 4a 73 a7 c9 +eb e1 1d 24 + +# Encryption: +03 10 4e c6 c4 ab 9d ac ae 42 7f b1 06 99 bc ae +00 3d a5 6f 6d 07 50 95 87 14 5b 73 3e db 53 23 +9a 6f 42 22 86 83 9c ac 06 4a df ee e5 dc 89 78 +0c dd ad cc 80 72 19 d6 a9 7b 85 c1 3f 27 93 7d +70 32 7f 82 cc 36 a5 da 8e 45 63 77 fc a2 3a ee +51 4e 04 4a bf 1f 66 c3 e7 bd eb c2 cf f6 28 bd +52 4a 09 66 e2 63 8d 28 33 bf a3 43 eb c7 41 f7 +6b 5b 70 a1 13 6f 4a bc 60 28 64 a2 ad 43 a7 91 +bd + +# PKCS#1 v1.5 Encryption Example 9.10 +# ---------------------------------- + +# Message: +08 38 f4 a5 92 + +# Seed: +89 c5 89 8c 6c 3d c6 cb db 1a cb 28 05 df 53 98 +f0 b3 35 8a 18 e5 e6 3c 14 d2 0c 98 d2 1d 9f d8 +b2 ec c9 a0 e8 3d af 0c 06 92 68 bb e8 6f ee a5 +1c 93 79 1b 68 e5 d9 3b 74 5f ea f6 ad c4 2b 83 +c3 09 c9 cd 3d fe 1c 06 15 3a b8 80 85 56 18 98 +90 be 05 3a 92 54 88 d0 29 fe 50 40 e3 e7 d5 d5 +31 b3 2e b9 d2 f4 ee a2 21 11 b3 8a 65 53 f0 0e +dd 23 65 57 5b b9 49 f3 63 + +# Encryption: +01 4f 27 97 dd e8 d4 60 18 ff 23 d8 9b e2 e3 ae +04 6e ed 31 97 c8 79 c6 0e 26 f3 d2 40 08 66 eb +50 d7 b4 5f 6b 01 ae 9c a0 06 84 7e fb e9 ab cc +9b c3 e3 56 90 07 2b 68 db 9e cd 92 6d 94 5f 78 +7b 27 c3 75 3b f9 6b 2d 49 98 30 84 14 2c 42 a1 +26 1a ff 7b 17 ff 4b 20 de 9b ff a5 86 24 ab 37 +1d 4c e2 f9 64 69 a8 e1 03 8d 57 20 b8 1c f0 42 +dc 78 bf da 9a 3c cb 61 60 81 2d de a1 58 bd 2f +5c + +# PKCS#1 v1.5 Encryption Example 9.11 +# ---------------------------------- + +# Message: +12 38 0c 5e 80 bb 95 bb c8 85 73 57 fe fd 17 bf +9e 50 96 27 d2 8c df cd 12 bb 13 16 61 b3 42 df +a6 ca 67 2e 13 a8 85 1f ce 19 b1 a8 ca f0 e3 3c +d6 ef 53 8a 05 fa 54 26 9a 13 78 e7 + +# Seed: +88 03 31 eb e9 1a b6 ce 16 84 d9 af 5d 97 7e b4 +26 ca 71 56 e0 b6 f4 33 6c 6e 09 33 d6 fa 48 78 +2c 0a c9 69 f3 dd e6 1d 8f d7 4c 47 fe 9e 30 61 +71 0d 24 5b 1d 38 11 04 28 60 c1 f4 8d 2b 8f fd +80 9e + +# Encryption: +04 6c 54 5f f4 96 c2 1f 69 01 27 24 54 18 cc 5f +b1 8f 09 10 2e 7a ca 87 e2 6e 20 82 fc 16 f6 2f +e9 f4 2a 72 22 71 a7 9e ae e9 62 5a 7e 63 2c 19 +36 40 4c ec 62 11 d8 23 86 3b a0 2c 6b 0a 83 19 +58 b4 ed 8f c6 25 a2 e5 2a 05 4f 8f 18 1f 13 0f +8b c4 b1 df bd 44 b7 0a 35 b3 5e 9c 7f 4a c5 5e +e5 e2 cb 06 8b 75 86 39 b2 cd 64 3d bf a8 2e 2d +97 20 e4 89 f5 c8 21 d8 eb dc 13 68 a9 d3 46 8a +37 + +# PKCS#1 v1.5 Encryption Example 9.12 +# ---------------------------------- + +# Message: +ee e1 e4 5d 18 b1 47 c2 69 a6 0a 9c 64 20 18 ed +6c d1 15 7c d0 ce 2b 29 68 df a4 b4 97 fc 40 b2 +24 bd 86 1e 25 35 12 2b + +# Seed: +5c 51 3e 51 44 52 b1 4a ee 33 b6 17 60 b8 58 c5 +35 7c 7d 7f 20 e4 a3 7c 7e ef e4 19 ca e3 fd 16 +f9 d8 3e 5e cd e1 9e e6 32 85 dd ce 66 80 ee 94 +64 fe 83 75 6e 90 31 d6 37 9e 6a 6b 38 4c e2 77 +bc 64 2c ed 83 b2 9c f7 4b 72 ce ff f5 30 71 04 +e1 83 de 2c e6 a1 + +# Encryption: +03 a8 64 83 cb b7 2c 15 f5 a6 93 2b 01 2f 40 c4 +b1 73 33 3b 26 86 f4 98 4b a6 6e 24 c7 cf 44 41 +23 ba 2e a6 66 a1 75 5d 09 35 7b ee a4 37 9c e3 +cd b0 a7 7a 6e e3 b7 ca 60 db 68 24 17 f7 16 3d +7d 3a c7 35 28 11 bb 94 c5 b7 71 f3 d3 fd a7 73 +e5 ce bc 8b c6 60 11 55 b3 f4 e4 b4 ca 85 d9 ba +b8 ec 25 8c ec ff 44 33 c9 2e 8f 86 3d 96 fc c7 +94 29 49 8a 9e 17 90 33 0b c4 87 c0 10 d7 99 24 +5d + +# PKCS#1 v1.5 Encryption Example 9.13 +# ---------------------------------- + +# Message: +55 09 a5 c1 ac 54 89 dc b7 65 f3 7c eb be 7d 81 +cf 02 76 b1 f2 cf f9 5d 27 4b bd 04 + +# Seed: +76 e8 1a 51 37 1f b5 07 41 14 1d cb 31 d5 1d 1c +46 1f cc 02 6a ea 85 20 15 d4 68 74 0b 45 23 40 +5f 95 ba 87 9b 08 69 bf 03 1a 60 65 4f c4 e5 68 +c1 95 7c e4 e4 2a 35 0a 95 bf 8c b2 a8 b5 fd e6 +dc fd 25 05 c0 37 a2 9e de 68 9c 53 d8 32 19 e7 +3e 64 08 17 bf 8a fc 9a b0 04 ec ae c8 43 e4 fe +4e 38 + +# Encryption: +02 55 de 28 0b 71 af ef af a2 0f 24 1e 08 1b 7e +c6 c1 62 dd da 18 84 fa 9f 82 5c 4c e7 63 6e fb +c1 1b 84 a6 eb ea 35 89 25 71 ac 9e 6b 1a d8 47 +3f a5 73 c8 83 c9 f2 15 a1 95 80 c3 ea 30 2f 88 +f4 4f 48 e4 d9 5c 34 40 d4 93 1f 17 66 a1 fe 7e +79 0e 5d 38 e8 5d 1f 63 85 0a 3c 70 7a d8 97 7b +88 c3 8c b9 ed 98 34 5c d3 50 c3 dd 45 30 9f c8 +1c b4 62 76 e4 ad 64 7f a8 4c 14 12 5e fd 67 d8 +ba + +# PKCS#1 v1.5 Encryption Example 9.14 +# ---------------------------------- + +# Message: +02 53 81 a5 5c 8e 48 7d 7f 4f f7 c3 6c fb 37 50 +07 d1 9f 93 71 13 6e 2b 3d f4 42 5e ee ee 5d 79 +c3 52 61 fb b4 ea 68 bd 91 e8 ed ab a2 32 9e 29 +31 53 06 c7 d7 18 33 15 5b 88 + +# Seed: +aa 31 0f 62 da 90 da 4a 20 28 b3 81 39 9c b7 e0 +ed 3b b5 10 57 5c 9b d0 f6 38 21 5b af 78 08 e3 +24 5e af 38 b7 6e 26 52 29 0b 7c c6 20 90 7c da +0c b7 af 07 3c 12 2f f8 3d aa e1 98 6b 43 ec 1a +14 82 db a6 + +# Encryption: +04 9b fa c6 41 0b 77 80 39 7a 49 fb 88 93 b2 4d +90 3b 36 00 f3 3c 78 2c 14 75 b5 d2 4b 4f 4e 88 +fd 11 24 ef 06 45 f3 d3 91 ed 31 00 6d d1 b7 c2 +64 12 8d 0d b9 aa 0d 65 a0 9f fb e2 9a 94 cc a3 +58 da 64 bd 1b 72 ff 55 88 88 08 10 5b e0 91 ae +23 ea 3f 34 75 05 17 9e cc b2 41 0d 89 de cb 62 +33 0f 36 c7 44 26 2e b2 b0 78 b4 25 4b cd ce ce +21 1c f0 57 4a 24 68 e2 a1 e0 18 bc 31 f5 02 22 +35 + +# PKCS#1 v1.5 Encryption Example 9.15 +# ---------------------------------- + +# Message: +07 3c 43 67 ba fd 48 10 d7 70 44 60 c7 83 d3 50 +f7 cc d0 99 47 2f 79 f7 fd f2 3e f0 cf aa cc ab +95 71 df 53 fd e4 + +# Seed: +f9 5a 39 96 de f1 ca fc 1a 4a 0b 34 14 6b 73 de +6b 5a 92 cb 81 2e 20 b2 0c 12 2a 25 1e 6b 22 e0 +46 9c 98 db 12 8d 43 ce fc dd 80 c7 ff 36 99 80 +16 a8 92 a8 b6 34 b3 6b 9b 0c e8 7e a8 0b 5d d9 +fd 7a 08 29 14 e7 3b 83 a3 84 1d e5 1b 71 b1 a6 +b7 ef 7d e4 e4 b8 8e dc + +# Encryption: +02 de e4 8b 0f 99 53 ee 12 c7 18 b3 03 b0 c8 9d +61 50 eb be 83 ad 62 4e 11 7e 3f 27 04 a0 b1 7a +2e be e8 38 52 56 f0 e6 42 80 fb 06 c3 b1 46 c0 +99 af 23 a9 f2 47 93 39 37 81 a5 55 ac 4e a2 d8 +8d 78 5d 8c db 6e 7a 2f 89 52 d2 50 3c cf 90 1f +12 39 f6 f7 b1 ac d4 41 21 c3 65 fd ae 37 07 46 +de 45 26 e7 c6 56 0f 87 54 6e d5 77 cf 97 98 be +f4 7e 49 20 65 50 9c 49 21 2d 37 0d ea 05 22 d7 +94 + +# PKCS#1 v1.5 Encryption Example 9.16 +# ---------------------------------- + +# Message: +ba b2 0b 9a 6a 53 2e 6f 8a f0 78 b3 a1 85 e0 aa +86 e6 16 81 bd 1b d7 75 04 4a 2c 95 8d 61 ed c2 +51 60 7c d9 f3 11 48 f5 a9 11 + +# Seed: +37 6c f0 18 14 3b 0c e6 70 21 68 4c bb 36 e4 af +e2 ff 9d e1 8b c7 f0 2b ed 86 3b f1 bc 34 66 31 +9e 72 0f ee f1 9d 38 e2 6b ca 7e 99 d4 09 6a 9e +ed 8d e5 bf 20 3f c7 dd 9c 84 85 df a5 b6 90 75 +ef 0c c0 37 fc df b5 5a 0c 92 8c da c0 cb a0 49 +7e b6 0e 3f + +# Encryption: +04 8d d7 50 99 18 43 0e da bc 01 46 8d b7 e2 87 +a7 38 1e 42 8b 5f c9 3c e8 de fd 7f 49 d5 e9 34 +15 30 43 d1 37 ac a9 f7 b9 75 77 b7 0d c0 16 80 +f2 db a9 1e 93 2b 53 ac f2 a7 f3 34 8f 56 54 b2 +cf cf e7 5d 48 f0 fa 45 00 d1 ba 5d 29 24 7f f1 +42 d6 b9 80 e1 1b 9d ba 68 83 f7 3b b8 55 a2 4c +c4 eb 90 68 23 6d aa 0f 2f 93 45 8d 72 72 6c 2d +8e 31 25 9a cd 3a 7f de b6 fe b5 c6 d2 ed 17 8d +db + +# PKCS#1 v1.5 Encryption Example 9.17 +# ---------------------------------- + +# Message: +19 b1 f4 cd 3d bd f0 5b 3d 5f 16 80 85 6c 5a 74 +4f 51 62 b5 20 bf cd fc 98 87 dd 92 be 9d 8c b6 +25 c7 25 ad 75 f4 f2 ca a5 ef 51 fa ca 71 b5 e6 +6f 84 f2 fc 6f 67 8a ce 80 9d 76 b8 42 ea fe + +# Seed: +78 a7 18 82 85 3d 85 af 16 5c c0 b2 2f fd c8 87 +3d f4 9e 2d 6c c0 ad 0b 0a 99 5b 4a 25 9c 86 7d +c1 aa b6 42 8a 5b 8e 9f 3b e8 7d 87 f9 e6 ea c5 +50 f4 df 11 36 8e 7f 6c fd 7d 0e 47 6a 45 9b + +# Encryption: +06 2a 78 db 5c a6 9a 30 48 10 78 94 93 db 8c d6 +44 fb 29 4e 17 fd 36 45 32 b8 ec 17 ce 3f da 70 +47 64 65 62 4a 60 a6 ec db d5 d9 72 40 c8 d8 9d +ea c1 1d c3 0d 7b 85 14 41 40 8e dd 64 28 81 a0 +11 2b 62 f8 cf de 34 d9 c1 13 85 c2 91 89 bf 38 +93 a6 ab ac e0 4a 10 aa 68 0c d3 a6 ee 00 2c 30 +70 35 d2 39 9a 2a 60 b5 a7 f1 ca af 05 84 d1 0f +d0 6d 6e fd 56 11 4c 05 e4 3d 42 d8 34 f0 3e 3f +e9 + +# PKCS#1 v1.5 Encryption Example 9.18 +# ---------------------------------- + +# Message: +8c b7 3b c4 78 50 c1 7f eb d3 4f f4 b7 32 3b 50 +53 03 0b 96 22 14 03 cd ef 45 de c6 5b a6 0e a3 + +# Seed: +ed 64 78 61 48 81 eb e3 fd d6 d9 ee 05 f2 76 5f +c8 a3 ea a5 80 31 23 5a f9 6f 86 e7 f2 c8 13 ec +04 80 66 1d 1c 2b 4d ef 74 2b 2e 41 41 9d f2 88 +3e d5 86 79 cb 9a da e4 de c4 cf 77 f8 bc 29 41 +d0 33 f8 87 7a 90 6d dc 88 d6 dd 3c 53 96 ad aa +c0 3e b2 a7 09 4c 0f df 0a 44 a6 b9 23 ab + +# Encryption: +03 97 8d 4e ff c6 d6 2f 23 2b f4 6b 42 90 c5 01 +1d 73 28 0a b0 e8 0a b9 d6 05 0a 85 2a 66 79 e0 +17 e1 70 d9 e7 15 6c 8d cb d4 6c de da 70 ff 9a +55 16 8b 9f dc 03 65 b8 aa bb 90 9a ad 40 d5 95 +c9 0b 9f 00 c1 e0 0a d6 f0 1d 54 43 07 b2 54 ea +f4 25 5d e6 2b fd 8a 5f 7e 79 dc fc 74 45 ce c6 +3d f0 c2 bd 0a d9 6c b7 02 42 b3 0b 32 42 07 88 +16 b5 8b 0a 9f fa 16 f1 d8 63 15 f8 a1 cb 2f 8f +6b + +# PKCS#1 v1.5 Encryption Example 9.19 +# ---------------------------------- + +# Message: +8e a5 56 43 df e7 cb e0 75 c1 7b 93 c6 ba 6b 5a +74 ea 8d 1a ba b9 c7 28 ae 5b 00 86 6c 62 88 0d +3c 00 05 20 37 cf 80 2d 2c f2 a8 e1 be a5 8c 7b +a6 04 77 4d 4f 80 bc 04 + +# Seed: +af 9d 9d 31 2e 22 57 0f bc 4b c8 5a 44 5e d8 d8 +99 66 0e d2 4c f0 30 15 33 94 6e 5c b9 47 1a 27 +c5 10 cd 17 55 91 d2 3d 36 3d c4 e3 e6 9c 7b b4 +65 51 7a 4c d1 d1 ce 41 3e 10 16 ae af d5 5d 2c +b9 de bc fe 4b 1d + +# Encryption: +05 87 11 19 16 bb 42 f8 47 57 69 1e fe de 7e b7 +79 6a 5c f8 87 c3 7c a9 f6 1b 45 1f b1 ba de 38 +9c fc 5f dc 21 98 41 bb 41 da 82 74 52 72 5f c8 +2b 4d 1a de 56 9c ee c8 05 79 ed b1 b4 b1 5b 46 +ad 7d 45 b2 45 98 80 23 ea 0d fc b3 74 4a 69 2e +b9 ac a8 5f 21 10 10 af b1 e9 89 4f 85 4a 5e 34 +fe 89 aa 05 19 68 a3 b2 36 2c 15 0c 6d 97 0e dd +82 b9 e2 d1 3b 38 c3 c2 95 6d 91 50 08 86 41 d5 +30 + +# PKCS#1 v1.5 Encryption Example 9.20 +# ---------------------------------- + +# Message: +52 5c ff a3 + +# Seed: +0c 99 30 4c c6 26 3d 1e e2 44 6e 24 8c 27 11 2c +8f 96 da 82 51 5f 06 f8 12 39 8a 88 81 1f 39 fb +05 62 05 c4 4d 6b d4 85 5a 62 c2 1c 60 1b 88 f8 +02 34 e2 32 41 f7 16 32 2d 80 54 a8 4a 1f c3 c8 +46 de fb 61 76 7c c4 d8 16 fa 7b 37 47 f8 72 9b +f3 37 2a c2 c2 29 d0 52 f4 5b c4 2f c3 80 50 dc +a3 f2 63 2e 60 07 b6 08 53 b7 e0 cc b3 da a4 94 +e5 53 35 fd 04 f1 3d 5f ad a7 + +# Encryption: +06 3e 45 08 e5 31 2b 5c 38 69 4d e8 2a 71 ed a3 +12 e9 ae d0 5b c1 43 d3 38 f7 f2 28 12 d9 3c 28 +65 12 6a 9b 3a 42 c3 ca 19 ed b3 46 01 c0 b2 8a +75 66 3b 18 f2 39 f5 ad ca a4 e9 fa 9f 61 18 04 +72 6f a1 29 62 bb a3 23 0c b8 86 d6 67 82 a4 7e +a9 50 2a 83 71 e7 57 3b b6 b0 26 6c 33 64 6b df +53 f8 de 36 8e f2 05 b1 1a 85 ba f2 1d af 3c e7 +a2 59 9f 00 8b 99 45 ee b1 86 ec 19 2c 54 0a c2 +3c + +# ============================================= + +# Example 10: A 1028-bit RSA key pair +# --------------------------------------------------- + + +# Public key +# ---------- + +# Modulus: +0b 52 cb 6b 5c 3b 9e c5 aa ad 89 4e 51 77 f7 f4 +5b 8d 33 dc bb e9 6a 5b 26 f3 00 72 bf 15 73 a6 +c4 1f b0 a9 7a e1 e5 2e d8 c2 5c 62 b9 8b f5 9d +e7 b6 8a b9 8c 2d 8b 93 c4 94 27 23 cc 4b ae d2 +b3 93 c0 7b 2b 11 90 9c 73 2d f7 c1 dc bb 43 3a +83 9d 46 f4 28 e9 dd c8 d3 5f d3 3e ed 29 81 80 +f7 5f 2d 5c 9f e8 53 4f 03 47 f8 68 5c 28 c4 37 +ea 5b 81 1a 28 6e 81 0c 69 7a 88 cd 7e 45 36 4c +1f + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +0b 52 cb 6b 5c 3b 9e c5 aa ad 89 4e 51 77 f7 f4 +5b 8d 33 dc bb e9 6a 5b 26 f3 00 72 bf 15 73 a6 +c4 1f b0 a9 7a e1 e5 2e d8 c2 5c 62 b9 8b f5 9d +e7 b6 8a b9 8c 2d 8b 93 c4 94 27 23 cc 4b ae d2 +b3 93 c0 7b 2b 11 90 9c 73 2d f7 c1 dc bb 43 3a +83 9d 46 f4 28 e9 dd c8 d3 5f d3 3e ed 29 81 80 +f7 5f 2d 5c 9f e8 53 4f 03 47 f8 68 5c 28 c4 37 +ea 5b 81 1a 28 6e 81 0c 69 7a 88 cd 7e 45 36 4c +1f + +# Public exponent: +01 00 01 + +# Exponent: +45 cc 14 17 b2 6f ce 3e 9f d3 10 89 b1 a3 cc c4 +6f 8f f2 1e ac 2e 1d 67 c0 ae 20 15 2d c5 0d 1c +e7 ce 6f 26 40 4e 2e 64 95 b9 77 bf 13 f9 a4 05 +b2 45 80 d6 39 3a 85 22 54 96 e4 ab c4 9e be ff +de 70 cf 26 76 68 66 f2 76 e1 5b 49 2a f8 03 3f +1b ac 7f 66 b7 1a 3b af 57 1f fc cc 03 8a 48 86 +93 94 cc a3 fa 00 49 85 b4 34 a5 15 17 87 7e ae +97 a3 84 94 7f 01 a7 2c f4 b2 01 93 dd 27 64 81 + +# Prime 1: +03 5f ed ee 7e 64 fd 68 65 79 31 a9 df 9d 55 62 +28 df c6 33 a7 50 02 76 8f 65 d7 15 f0 44 f2 3b +3f e7 88 bb 17 86 4d 61 df 57 9e 68 df 80 de a3 +a6 31 90 62 9d ac 7d e6 29 ef 9a b8 f4 df 0b 27 +7f + +# Prime 2: +03 5a f8 e6 fe 2f 84 61 fc 89 a6 45 00 f8 19 9c +cb d3 f4 69 07 85 96 15 56 03 d3 f0 88 08 33 c3 +77 db 07 8e 43 7e 35 60 00 4a d1 d6 f8 d3 47 88 +3f 3e b0 1d 18 9d 52 ef f6 e2 60 e5 2f ba a6 2b +61 + +# Prime exponent 1: +b2 43 b3 49 8b 67 2a aa 7d 96 7c d9 f2 6a 12 e6 +22 3e 90 9b fe 8b 73 91 65 4f 3b 6c a7 9d 60 12 +70 a1 2b 11 d0 99 99 0f 6f d1 f5 0b e1 58 8f 66 +14 a6 19 63 35 9b 88 e9 b0 52 39 c5 f5 5c 24 db + +# Prime exponent 2: +01 35 25 ad e5 3f ee d2 61 54 9d 3d ea 8a 60 95 +79 1a 90 b5 98 5a 70 d8 be fb 63 b5 07 10 84 a8 +ce 23 4b 85 dd 2e b8 41 13 f9 d9 aa 18 25 da 71 +e3 e9 48 f3 3f df a7 70 ec 17 2f ae 6c ce 2d 6e +21 + +# Coefficient: +1c 52 92 93 3c 58 d0 22 59 2f c0 03 38 bf 22 ed +fc ba 33 16 16 b7 9f 8d 2e fd 1f a2 4c 64 f5 dc +fa d9 aa 52 ba a4 6e 86 59 dd a9 ea b3 a7 86 3e +61 37 4a c0 da e0 18 5f b5 8e cb 0b 74 65 ee 07 + +# PKCS#1 v1.5 encryption of 20 random messages with random seeds +# --------------------------------------------------------------------------- + +# PKCS#1 v1.5 Encryption Example 10.1 +# ---------------------------------- + +# Message: +59 22 d0 9f df 65 22 80 2f bc f7 a2 8e c3 d9 fa +df 60 72 03 a3 1b d0 da 96 3a a0 31 5f 35 e1 a0 +a3 74 d4 87 dd 08 62 a6 f6 be c9 32 b7 db + +# Seed: +61 39 5a 0f a1 2e 1e c2 ff ea 2a 88 90 65 3e 8f +37 8d c4 6c e2 b8 aa 4a 0a 1c 56 7b 30 e5 9c 3a +33 a6 68 98 97 14 fc 3d 45 ac 88 63 27 e3 6c 34 +5d a8 58 f9 03 d1 e6 06 74 03 14 cb 80 8d 86 ab +c3 1b 49 b3 5b 3f 20 e3 79 29 dc c8 59 d5 91 41 + +# Encryption: +04 39 e7 dd 09 af 61 c0 ee 25 f3 e5 c2 95 1d a4 +9d 3f d7 08 b2 97 a3 05 5f f9 98 3a 9e a5 38 b8 +3d 59 da bd b8 5d af 82 ae 7b b1 97 8e 7d a2 a6 +dc 05 87 ef 9c 73 2e e6 88 37 3f bc bf a2 da cf +f9 b3 c1 2f 70 4e e1 4f 83 24 bd 4c c6 bf 9d cd +3f 05 33 c3 b1 1a 0d 38 db cc 7b b7 ef 9a 72 29 +6b 6c 13 dc 42 d7 ec 17 f8 51 a5 16 12 c7 49 4c +63 68 a7 fb ec 93 d2 2e 8f 9b 72 bd c0 44 9f b4 +30 + +# PKCS#1 v1.5 Encryption Example 10.2 +# ---------------------------------- + +# Message: +5f ba d4 3a 91 0a 29 0e 50 55 d5 14 e7 1c 8e ab +f1 f9 33 20 eb d0 da 8f 90 d1 46 a8 f3 dd 5c 1a +2c 72 0b 93 21 1e 48 29 34 14 9f 1d 21 b9 78 f4 +8a 0b b8 e4 cc a3 f5 d4 5d 3f 3e 3b a8 e1 + +# Seed: +21 04 52 61 80 4b f7 54 bc b8 bf 34 98 b1 ad 10 +af f3 3d a1 f2 25 ed a5 64 65 90 45 8b 20 70 9f +c8 d0 b4 98 90 7a 83 64 ce 1c 43 6b 6b 1e 73 18 +1c 86 c6 77 af 45 c1 7f 9e 4a f3 75 9c ad 24 87 + +# Encryption: +02 9f 64 ac 33 01 34 00 7f 77 f7 2c 37 f4 17 7c +24 d6 60 be 4e ba c1 86 8a d1 1f 9e 30 51 b8 cd +77 c4 69 11 99 ac 49 19 db 2e d3 63 74 0d 2d de +32 91 f1 0d 92 68 e7 c7 de 37 ea 42 1e bb 1f ad +65 29 f2 92 19 2a 96 80 ba 96 3e da 93 74 03 7a +b9 52 9a 48 6f 35 cb d2 9e 09 ea 98 a5 04 5d 9e +16 bb 87 70 15 5d 70 af d2 17 a1 46 86 27 49 ec +1a d1 59 cf 6e 6a 63 df 14 2b 82 46 d8 44 a7 37 +2d + +# PKCS#1 v1.5 Encryption Example 10.3 +# ---------------------------------- + +# Message: +22 bb c6 16 ec 6e f3 57 31 56 b4 17 61 ac 3b db +57 bd 9b 70 36 ed c9 a6 97 88 75 e2 a6 14 cd e3 +ef ed af d3 88 9a 5d bd cc 5f ad 9e 9b ec f8 a8 +bb 80 33 ff 91 df ed 60 4b f8 c6 e9 bb c7 + +# Seed: +3b 47 d2 ca 95 54 b3 4f 94 29 57 8d 4f de c5 d9 +6e ca 89 b6 81 72 d1 db 13 56 b3 da 7a 69 f1 58 +4d 4c 84 6b 18 43 2f 02 f2 59 ca dc 24 e1 54 ff +15 f8 06 f2 53 43 50 0e 13 b5 be 43 c7 b5 ae 7e + +# Encryption: +00 c4 e6 c1 0c 25 5e 4b eb 2b 31 c1 65 68 46 b9 +7c a2 3a 3b a3 2a b1 9c 64 85 20 11 3d 70 34 df +a4 6b 0c d2 3d 73 99 a9 3c b0 2f 1e ba 94 83 18 +e3 79 1c 30 6a 2e b9 c0 c5 6d 8f 7e 83 25 0f 83 +ad 49 2f ad f7 83 17 69 f0 2e 18 24 34 74 45 d0 +41 9b 98 b8 e7 95 45 65 32 30 0b 92 d6 e4 55 b5 +a4 eb a8 53 d6 f7 45 92 90 ab 02 31 99 48 53 a8 +c0 7e 54 f5 9c 62 45 37 08 02 89 f9 31 43 eb c6 +61 + +# PKCS#1 v1.5 Encryption Example 10.4 +# ---------------------------------- + +# Message: +31 6c c4 45 0a 53 70 3c 05 8c 90 1f 50 7d 7a d0 +cb 63 96 c5 51 d4 f0 61 82 ab d3 a4 3a ac ba bb +31 59 c0 26 b3 e7 db c1 60 f4 19 53 31 7e 0f 20 +80 8c + +# Seed: +c1 ec b1 16 4b 3e 66 23 f0 d9 b9 c5 eb f9 9e 78 +8b 7b d9 4e b7 43 74 f6 1e d3 14 30 4c af 46 f8 +4a 3f ea 1b a0 e4 7f c8 be 41 97 d1 d2 cd 41 41 +cb 9a 61 5d 89 c4 bd 91 10 ca 6a c9 a5 60 f0 76 +eb e6 9b 74 a1 0f e9 cc db 76 da bd + +# Encryption: +06 16 b8 bc 77 2c 55 64 d4 51 b1 28 d9 b1 36 4c +9e 33 b6 e5 58 ec 67 f2 10 5c 98 00 11 7d 0b 73 +cc ab 9d b5 1d 96 7a 9d 66 32 2c bc 5a 01 74 6e +47 31 dd 7d 04 e6 36 e6 4d 35 f2 c8 6c a3 9d 26 +14 92 17 6b 8d ab db 13 4b e9 4b e5 1b 6c 02 3a +0d 55 fc c1 f0 4c 94 c8 6d 47 7d b4 03 b0 4f b6 +c0 28 50 57 24 79 38 40 cb f4 68 aa aa 91 bc 54 +e0 d6 47 7c e6 48 ce dd 12 76 f2 ad 2d 4d 42 3b +6c + +# PKCS#1 v1.5 Encryption Example 10.5 +# ---------------------------------- + +# Message: +d5 4e a3 7c bf bd b8 18 3b 3b 54 7f 6d f2 d5 d6 +3c 41 5b 1c 44 ed 63 93 c6 97 b4 d9 3a 97 fa 0d +2f 4d 30 0a 68 e9 8f 7f d0 46 07 01 d1 57 9d 96 +83 61 2b + +# Seed: +d1 ce b0 c0 72 d6 88 8f a9 1a 75 7c bf 50 d6 69 +76 bb b7 2e 61 94 62 61 4d 5d ec 0f c0 bb ca bb +07 07 89 c2 b0 89 50 91 b8 fa 9c 7e 75 ab 20 b8 +97 58 f9 7f d0 47 bc 44 a5 68 a2 61 2d 0d 50 1d +15 d4 fb 82 e7 75 28 79 69 49 f3 + +# Encryption: +03 c1 38 c7 91 99 b0 b1 70 0b ab 2e 63 e1 d2 a0 +03 1e f6 02 f7 dd f1 ed 3a 16 1a 5e 70 f1 64 51 +da a1 01 f7 4c dd 65 47 a7 c6 52 c7 32 9b b1 73 +7f b1 4c 1c c0 c0 c3 e7 61 2a e2 0e e0 21 ab 21 +d7 0b f9 51 7b 4d 33 a9 d8 09 61 2e 7f 42 68 85 +b7 9b 31 2e 26 6e 42 b2 02 b5 71 c6 6f 9a 10 7b +8f d7 c5 6c 05 0a 8e 1e b1 89 56 db 06 a0 20 9d +d1 6e f2 d9 05 24 db 87 91 7f 34 00 6b e6 b1 5a +13 + +# PKCS#1 v1.5 Encryption Example 10.6 +# ---------------------------------- + +# Message: +f6 4b 25 11 cb e3 cc 65 81 + +# Seed: +da ca 19 63 cb 3d e5 24 57 79 e9 64 77 ff da 27 +7f 4b 92 3f a9 a8 d9 38 5d 52 31 69 23 3f 58 79 +a3 c9 fc 7a 38 e1 b2 08 c3 2d e4 0b be 1d a0 77 +47 1e 61 c8 b9 b7 09 3c 41 b0 a6 5c 99 64 32 d6 +45 52 11 84 a6 6a fc b9 6f 07 a8 f8 ee bb 6e f8 +17 e0 27 ee 2f 37 95 45 23 9e f6 f9 c1 d0 d8 60 +e8 21 44 ec 71 59 7f 24 6a 83 cc f6 60 ea 4c 70 +ee 1d f0 14 ef + +# Encryption: +05 08 ed 84 5c 96 23 8e 3a 07 e8 ec 02 7f 7b 09 +8a 83 f0 3e ac 1f ec 42 6f 4d 60 05 b6 0d 07 35 +db 05 37 08 2f 23 b7 50 f6 db 54 88 21 41 81 e1 +14 cf 1f 72 07 41 9c a2 93 75 0a a7 66 fa 7a 5b +9b e0 0e 37 29 2c 23 23 1c 6a b3 be 2d ed ee d3 +21 b0 f9 cd 83 2c 5e db 41 67 7c 1a b9 83 e7 e3 +eb c8 b5 19 93 82 1d 76 df 2a c2 29 8d 8b 80 ab +17 c3 8b 38 53 f1 8f e3 09 cc 7b f7 c4 a2 c2 7d +63 + +# PKCS#1 v1.5 Encryption Example 10.7 +# ---------------------------------- + +# Message: +85 26 49 01 52 06 e2 a4 09 78 76 f8 ab b9 b8 46 + +# Seed: +03 4f e3 4e 20 e6 06 a8 dc 7c bc d0 d6 ab 3e 07 +97 c5 dc 4e d7 86 8e dc 79 59 89 3e 58 13 7d 26 +32 b2 c5 a2 9a 81 35 c2 4a f6 99 b5 9d 68 10 3a +1f 42 33 93 e3 88 6e 3f a8 54 e3 97 21 50 19 41 +3a f0 b0 d4 fb 1b d6 9b d4 93 4d 4d 1e 2e 9f 3b +9e 7c 46 d4 98 4f e9 e7 a3 7a b2 f1 c7 8b 0b 8d +9c d8 fa bb 3d 18 d4 c5 06 e2 fd 3f 85 ae + +# Encryption: +01 6f bf 2a 7d 36 80 71 cc 7b e5 94 49 35 4b 9d +e0 5a 85 e1 bb 97 b2 51 4b 52 b8 d1 f3 e2 69 94 +e1 2c fe da 59 e0 58 a2 f3 c8 79 23 50 c0 68 41 +7f 99 44 1b fe 74 17 e0 b5 31 6e 16 3b a8 d1 f9 +e3 2c 59 a4 44 98 82 f4 7a d9 b2 4f 68 76 d4 78 +d3 f5 b7 d2 75 35 73 e3 f6 97 bf 64 c7 b3 ac 22 +28 ce 69 e7 5e 8e 14 ab 93 f2 19 78 05 9a 14 3b +87 7c 6d d4 21 b6 e2 0b 07 35 a5 36 05 55 2a b0 +a8 + +# PKCS#1 v1.5 Encryption Example 10.8 +# ---------------------------------- + +# Message: +f4 fb 50 be ab ec ba 77 e7 1d d8 d1 6c 97 5a 86 +f6 19 ea 7d bf 41 96 9a 24 ba e2 b8 42 c2 69 e0 +b4 d6 a2 9e 82 9d be 2e 49 79 9c 9e d9 71 a3 03 +35 e6 ed 9b f3 9d 12 4b e0 f8 + +# Seed: +9d bd 92 da ee b8 2b de 81 6c 59 3f 70 6b 15 92 +56 85 22 bc a0 79 7f 9e 81 1d d9 dc 0e 89 6e 98 +4a 4a 9a ce 77 de f5 a9 25 0d b7 95 81 af 33 fb +6d e2 42 7d 1a f6 a5 f6 92 9f a8 b6 7b ad 02 3f +04 b3 ff d2 + +# Encryption: +02 92 ed fb ac 38 e2 22 45 45 af 82 86 23 27 63 +bc b1 8b ae 13 70 97 99 e3 50 77 58 d0 14 1a c2 +97 6f 30 b8 54 67 d7 83 ab f6 fc 71 df 61 9e 1a +59 e6 23 4f 27 b6 32 fe aa bf d9 85 33 77 35 4d +93 3e f4 ec 59 94 c0 d5 0d 95 2e 0e ce 0b e1 be +4d 38 f1 1f 66 e7 c3 da 88 c8 3b 4b ed cc 06 2e +09 f9 af 95 ea ca c0 09 9c 52 5f 24 1e a7 d5 65 +e1 b7 68 cb 97 08 f3 bc d5 91 77 b6 76 6a 37 34 +88 + +# PKCS#1 v1.5 Encryption Example 10.9 +# ---------------------------------- + +# Message: +76 91 3e 84 8f b7 b9 fa ca 91 ba f4 f4 42 01 06 +a9 4d 6c e2 5d 14 97 fc 4e 7f 85 96 54 79 5d 7f +24 39 9f 3a 12 08 af 02 8e 61 67 8a 6d 19 a1 86 +40 b4 d5 0f 75 55 86 00 + +# Seed: +9c ee aa 26 09 ba 90 eb 61 e4 f7 49 c4 cd a0 1a +ea 23 68 81 76 2d fc 15 0d 97 c1 1e b6 44 0c b0 +57 e5 3c 3f d9 b3 9e 56 0a 46 e9 d3 fa 3a f3 fe +e5 ee 2d 02 fa 42 49 af 99 98 f5 3e d0 4d b0 10 +e9 6d 8a 01 ff 6b + +# Encryption: +01 96 30 89 c3 43 ed 88 b5 6d 6a cf ef bc 65 5a +37 cc fd 96 20 3f 21 87 64 69 5a d3 10 c0 b2 66 +65 ee 74 5e b0 10 fc 83 be 8c 20 64 5c 43 47 dc +d9 44 65 5d 9f e6 cd 98 77 dc 70 e5 c1 88 cf c9 +a6 6e 71 da 74 5c d3 e1 a7 b7 f5 a1 b2 5b 4f c1 +47 0a df bf 7d 8e 45 fb 10 7c 5a eb 50 ea 8b 56 +e0 4c a5 5b 9b 65 2a d8 34 d9 c9 65 77 b6 42 ef +33 f1 64 d4 93 1f b8 9e 0c 8c 6b f9 17 08 fd a6 +db + +# PKCS#1 v1.5 Encryption Example 10.10 +# ---------------------------------- + +# Message: +c3 39 f8 57 e4 d0 23 1f a3 7c 06 f0 95 6b 4d 53 +a6 c5 8e 06 10 d8 da 43 17 dc 84 11 d3 a0 f8 98 +49 b9 4e 8d 7c cd b0 c7 d5 33 0c 25 + +# Seed: +24 90 81 6a c9 69 76 ca 72 5e b4 98 e2 ff 04 0a +fe 3d 64 17 d3 2e 4f fb d9 fc 9e 3f a6 8c e8 49 +c8 81 be 37 9f 17 50 4b 97 e1 e0 d2 2d 32 ff 8d +fe 76 bb 45 49 f7 13 b5 b8 d8 70 ed 36 59 dd d3 +98 4b 6f b3 9f 6e bd dc 11 77 ad 69 8d 90 44 39 +68 ab + +# Encryption: +00 b5 fb 7b 1e 9d 71 df 8b 16 c6 3a 1a 49 6e 6f +7b f7 72 86 4c b4 11 55 2b 50 e0 b7 f1 5e 45 97 +16 f5 64 62 43 68 76 33 a9 10 6c 34 6c 8c 6b 7c +fa c7 50 b4 56 6b 1b 88 aa c0 ac b9 16 c0 7a 78 +0b e0 6d f7 97 5c cd 8b 72 60 78 68 7a 8e a5 d3 +90 3e 04 ab 1d 23 dc 9b 1e d3 60 00 c9 bb c3 dc +81 61 e9 48 3a 18 ab b8 64 1e bb 1f dd 02 66 c0 +84 bf 0b d0 9c c9 4e eb b9 28 3c 5a 5f 74 e3 60 +13 + +# PKCS#1 v1.5 Encryption Example 10.11 +# ---------------------------------- + +# Message: +47 58 65 a5 7b db 91 ad df 77 7c c9 d0 a1 7a 71 +a9 f9 71 0a 93 1b d0 c3 14 9b 23 91 a3 53 + +# Seed: +56 2f 79 70 94 6a c4 cf 05 ed fb 26 34 16 7e 14 +d6 65 8d 24 cd ae f7 5b 40 7c 90 04 81 8e fa 75 +d1 64 5e 81 52 d1 fc 80 d6 99 df e9 9a 27 a7 df +99 7a 8a 66 47 5a af ce 41 95 98 e2 a1 91 99 fc +20 53 e3 ac dd 07 fe c8 ba 61 f2 b0 3e fc 7d ee +d8 15 cd a8 95 2e 21 e3 c0 b9 a9 35 2a b3 6f 5e + +# Encryption: +03 e2 68 d7 d1 80 d0 3c 7c bc 85 07 ed 1f 83 0e +d3 7a 79 95 71 2d 7d 91 57 32 24 3d e6 85 d5 bd +99 a1 4a 8e 86 a6 7c dd 60 dc d9 0c 33 92 10 83 +5a 46 ce ac 19 36 ab 3a a9 c3 81 88 2d 76 94 a8 +38 3d 68 98 e2 73 44 bd 15 6f e9 28 2c 71 32 26 +25 d6 8d 30 70 ef f0 1a c8 d5 95 f6 48 6d 79 b7 +88 e3 69 12 fd 3c cf 28 4e dd 5f ce e2 40 9d ca +7d 4f 29 cc 18 2a 78 47 8b d3 ea 23 62 11 25 10 +a5 + +# PKCS#1 v1.5 Encryption Example 10.12 +# ---------------------------------- + +# Message: +9e 1e 53 f9 86 59 9d a8 98 d5 6d c1 c7 55 6f ef +ca a3 39 5d 84 50 d5 2b 3b a7 + +# Seed: +0b 17 63 cc 34 0e 6e 39 78 62 6a 06 d6 ef c4 0d +ed 73 db 53 5a 82 2e c0 4c 99 24 d9 ec 40 d3 85 +20 15 d7 e1 02 9c 13 93 ad cf 01 50 30 8a cb 27 +3c 36 35 68 28 a4 77 fc f9 a2 9a ca b9 09 35 70 +42 50 26 da c1 4d a6 cd 30 4c da a5 4c 9a 4c 5a +99 4e d6 8a 5c ea c7 e0 81 de c4 64 6e 23 7e 47 +1e 52 5e f8 + +# Encryption: +06 d5 19 a7 30 ea 5f 54 9f e1 9e 30 1b a5 15 2d +10 3a 3e ad 3f 89 ab 35 16 ff 7b 34 4c 4f 72 a1 +c2 6a a9 0d 5a 01 a2 a6 51 93 d3 cf 63 41 e5 9a +31 fd 2d 7d fe 43 5c 09 84 d1 bb e8 11 32 01 0f +43 58 ee bf e8 3f af 24 1e 7f 35 af 98 b7 c7 ab +91 e4 f0 e8 a3 2a 2f 57 f0 7f 49 d5 c2 1f 1e 13 +80 ba 0e 17 9a 38 d3 a2 ca 46 4f c1 4d 2b 74 a0 +3a 88 84 aa 85 7b 66 01 47 02 b1 bc 4e 7c c5 e1 +eb + +# PKCS#1 v1.5 Encryption Example 10.13 +# ---------------------------------- + +# Message: +1a e3 1e 0c be 44 97 ba 43 c5 d1 5f 53 5f e0 18 +84 1c 73 14 57 67 a6 a4 c8 + +# Seed: +8f f0 fa a7 a2 b4 ff 55 3c cb b2 0f f3 10 ac 5e +0e a9 28 18 56 2e c9 a0 60 64 f5 de 79 86 b4 f6 +c9 ae a2 b9 f0 11 42 38 e5 a4 99 a8 ae 20 ea e4 +02 1f cd d8 f0 60 c9 93 a9 bf 64 2d a0 25 67 39 +33 48 08 e3 88 e1 da 82 37 27 8b f4 f4 7e 05 01 +5a 8b 88 c5 42 0c eb c8 bb 37 ee 43 52 83 7a f7 +64 70 18 41 97 + +# Encryption: +04 a2 10 f7 6c 0f 84 93 99 09 53 58 98 86 f6 2c +1c 48 25 01 2a f4 4b dc f2 c9 9b 32 a7 0a 17 f7 +64 a3 a9 7b 2b 04 7e 39 d8 0c de 15 4e be d5 d2 +81 3e e8 4a c9 c8 d6 ec 6a 96 f4 02 db b3 26 d5 +a6 e9 c0 f7 87 c1 5e 98 23 c5 08 b3 23 5f 3a 00 +8d dd cd db 07 9e 80 ff 50 fe 37 25 4a 0c c4 68 +29 7e e3 32 53 a7 4c 1e 03 70 26 05 69 58 ad 07 +78 e0 aa 12 50 df 1c 14 85 7c b0 d7 1a a6 93 7e +31 + +# PKCS#1 v1.5 Encryption Example 10.14 +# ---------------------------------- + +# Message: +a6 e3 d1 07 03 21 d8 ff 76 b8 5c 70 93 fa a0 42 +83 + +# Seed: +d1 60 b1 2c 76 62 2c 3d 34 d8 55 87 e6 e8 1c f0 +54 61 8a 34 6b 67 52 d5 36 9a 71 c4 92 35 7a 13 +4b 7f 67 f3 34 a4 f3 b3 28 ba a9 f0 07 18 47 d0 +da fd ac 22 5d 7b 7f 07 16 18 ea 86 81 fc d2 d2 +30 5c 2f 64 63 1e 62 31 85 fc 09 96 e6 1c 84 f4 +18 0c 63 7b f6 ea 2d 06 03 75 f1 6a 65 e5 b1 e2 +b8 65 28 5d a3 d8 fb 1b 6a 60 ea 36 e1 + +# Encryption: +0a 70 03 b5 86 1a 85 a8 f7 2f 19 9d c6 5c 17 fc +58 a9 24 bc c4 08 19 e2 8c 95 83 e8 21 03 8c 00 +05 36 5e 90 9e ee 4f 32 66 f5 9a 84 e3 25 b1 be +a9 d2 81 b4 82 3f 2f ce 44 15 3f 03 17 0f ad cb +16 a2 79 b2 c9 58 7f 6b 79 ef fc 55 a3 c4 34 e0 +bc 5d af e9 d4 03 26 48 aa e7 e4 ed 1d 7f 14 1b +fe 72 26 83 fa 32 c8 9d dd 67 3c 3f 0c 03 c8 54 +59 89 0a b7 fb c1 d9 a8 14 bf e9 b0 d1 2a b1 7f +51 + +# PKCS#1 v1.5 Encryption Example 10.15 +# ---------------------------------- + +# Message: +d0 bc 89 03 9b a1 9e e5 0a 73 82 98 4e 42 8a ed +88 61 4f 78 98 13 01 89 16 e2 e7 eb 0d b8 3d a2 +8e c2 3c 04 a0 c2 f7 6a + +# Seed: +c6 4d 10 a4 b5 2f 49 0a b6 2a 60 38 b3 2b 23 c6 +3a 1c 85 97 0d 93 45 14 83 94 cd 35 cf d6 f6 b1 +59 0f ce 8c 67 5b ee f8 7c d0 34 5e 5c ad e8 95 +09 45 56 54 26 b6 b2 83 03 b0 b0 39 32 98 cd d9 +5c 88 1f a0 65 33 ca 9d 2d 27 14 d0 f1 37 85 a6 +1b 3a 17 a7 81 40 + +# Encryption: +00 8b 19 75 58 ca 4c e5 90 14 58 ab d8 e8 fd 52 +d9 89 96 0f 01 c2 16 ef b5 81 f8 61 14 8d 1a 2b +44 eb 0b 7c 15 dd c3 45 dc 83 f9 03 7d db 8f e2 +ea a2 cb ed 9b 1c 1e ee ae b8 65 bd 29 f4 4e e1 +47 8c 95 e9 fb f4 44 82 8e ed cb c0 17 02 00 de +35 49 b2 2c 11 e4 b4 33 79 8b 9d 63 bb 49 f0 b0 +2d af 56 58 ce ed ea a9 3c 0f ae b9 44 65 38 ba +92 eb 17 c8 5d b5 ee a2 04 ba 2f 49 c3 ce 65 bf +13 + +# PKCS#1 v1.5 Encryption Example 10.16 +# ---------------------------------- + +# Message: +ce 0a 4a 59 39 f6 aa 26 3b bf 8e 1e 5e 94 31 03 +56 ab a5 75 59 c4 1b 39 44 27 70 b6 1f 6b 3c 9b +5f e7 27 f3 19 52 28 08 d5 80 19 + +# Seed: +27 cc e2 d4 3c 71 31 8e d4 fc 8c 0b db 9b 79 13 +53 19 9f 3d 89 fc 12 ac 47 fd b6 d8 8b 44 c6 54 +5e 9e ee d9 f4 c6 85 15 d4 f5 30 b8 13 7d 77 45 +71 3b ad 0e bb 70 52 23 1f 6b 4c ed 18 7a ec d1 +e7 a1 69 d8 6c bd 13 d5 0b 78 be 27 c6 54 5d 81 +92 e0 ec + +# Encryption: +0a d3 ae 7e 5a 98 65 2c 1b f3 45 c4 91 90 3f 55 +17 c6 11 ac 31 00 05 87 7f a9 1a bc ee 64 85 f2 +77 8a bf 0a 6c 73 87 87 37 63 9b 26 72 fd d0 0a +39 65 d7 d3 d8 d7 68 8e 77 b5 45 9e 14 5e ce 64 +a9 a5 2c 37 97 f3 61 07 c9 36 8b df 79 90 f3 fb +6c 5c ff 59 f4 f8 a3 d4 90 93 df fe 74 06 c9 10 +aa 57 23 22 8d ae 5a 9b 29 a4 cc 47 69 af 8b d5 +fd 6e ce 88 58 a2 9d b1 b1 9c 08 1b f0 d6 b0 dc +78 + +# PKCS#1 v1.5 Encryption Example 10.17 +# ---------------------------------- + +# Message: +03 bf b2 59 bd 92 46 de 3f 71 c3 13 9c 72 85 74 +b4 4d 97 ad 57 bb dd 67 01 94 95 c2 a2 00 41 39 +26 34 e3 1a ad 63 f6 3b + +# Seed: +5f a4 bb b7 0e 1f 9e cb 5e b2 14 7b f4 59 d1 d0 +64 43 f0 25 c0 8e 36 4c cc 1b 16 0c 16 41 6f b1 +74 b4 4b 95 36 38 a9 68 8c 5e a2 d0 60 17 1f 30 +54 f3 ca 3f e0 13 b9 e3 18 8e e3 9d a9 1f 80 16 +d4 b7 33 18 79 35 1f 32 2a e5 29 86 4d 90 74 09 +8a a2 51 6b 44 ca + +# Encryption: +01 78 e3 a0 17 ed 2f c1 18 bb 2e 03 28 be b2 8a +98 c8 53 b9 e5 a5 f8 30 80 c0 f1 01 7f dc a8 37 +92 07 72 2c 25 73 7a 89 15 e0 eb 72 c5 22 85 e8 +8f 61 30 a1 cf 56 ad 1d 96 ca 2c e4 b7 1e c3 68 +94 7b d0 71 f8 36 59 10 c7 92 57 5b 8c d6 fd 27 +e5 23 e8 59 65 dd a9 22 82 d5 df d1 c0 64 ea ab +6a be ac 65 e1 6a e0 4f 0d 40 b3 bb 68 41 0b 92 +74 df ee a3 2a 43 f9 40 83 c1 07 80 35 3f 43 e4 +3c + +# PKCS#1 v1.5 Encryption Example 10.18 +# ---------------------------------- + +# Message: +16 2c ca 9e d4 70 8d d1 03 40 e1 94 c3 5c 0a 5f +a4 9a 5c 3b 5b 24 71 71 20 3c a4 8a 79 e5 2d ff +40 f2 bc a9 9a + +# Seed: +4d 73 ff cd c2 69 43 a8 70 78 23 47 8d a3 1a ac +01 27 4b 17 17 c5 0c 6a d0 c6 2e e2 bc d5 57 95 +2e f1 3f 15 ff af 66 bb 4f 45 39 99 11 c6 d6 5a +d1 87 57 2b c1 eb a0 d2 86 cc 45 aa 49 32 e7 3e +47 0c 5d c8 29 39 04 02 5c 86 3f bc 96 22 37 04 +90 c9 1c 87 40 b0 94 d8 f0 + +# Encryption: +04 2b ce 0d fc ec a9 ff 05 a6 e3 f7 4a 6a 70 cd +cb e0 de c8 1e dd c8 8e 46 7f 47 bb 76 0d a4 4c +79 4d 3c dc ab 93 92 49 f8 49 d1 d4 39 56 64 1b +0b 79 c6 86 1c 5f 71 5b 9d 8d 8b e9 f0 76 6a db +3f 18 af 7d b3 6a d9 5f fc d7 e0 fa c1 62 85 23 +e8 f6 9a de b7 ff 50 94 a2 b5 bf 92 b9 d0 ef b1 +11 8b 85 39 26 25 fd 56 f8 8f aa 0a 16 d5 47 30 +fb c5 ca f1 66 82 e9 e4 1b 7e 79 d2 02 2f 7c cf +96 + +# PKCS#1 v1.5 Encryption Example 10.19 +# ---------------------------------- + +# Message: +8e 1b 52 cb 4e 00 77 27 c4 b5 f6 5d 78 47 f3 49 +16 89 1e f9 c7 3a d1 8c f2 71 f8 9f 18 2c 69 3e +52 89 dc 31 da bc 34 cf 7f 44 fb de 57 9e 64 51 +69 ec ba 6e 4e 87 7f 7d ef 44 + +# Seed: +ba 14 74 8e 6d a7 b6 ac 18 33 32 32 95 ad b5 42 +2d bd 19 e2 ec 72 df d0 aa fd 7b d0 7b fb 97 e7 +db 10 8a 3e aa dc ff 67 b6 7e c7 e4 c6 70 04 c1 +78 34 6a 12 5d d3 b6 ca 55 23 70 59 4f 7f 42 cb +33 4b 44 85 + +# Encryption: +09 4b 40 30 e3 0c 8b 46 2e ca 00 f1 6b b1 70 19 +d1 ea 31 25 f1 c6 4c 67 1c b0 0d 46 e3 ad 87 84 +28 52 b2 01 49 6e e2 b3 d5 42 28 93 a8 0c 66 a3 +0d a2 c9 f1 a3 2a d4 d4 e7 73 77 43 ca 1b 78 ef +7d 4a 63 c5 e1 e0 be 7e 51 88 cc e9 42 95 69 74 +ff d4 81 e6 47 83 44 23 0c 37 da 5b 25 f6 b5 99 +a5 9a 05 80 f1 a0 00 c2 59 54 f3 a4 63 f2 89 5f +32 b0 5c c0 88 21 b1 a0 23 60 9f 18 ca 7d 44 9c +b4 + +# PKCS#1 v1.5 Encryption Example 10.20 +# ---------------------------------- + +# Message: +82 ff 62 af fa d8 00 30 94 cc 65 35 + +# Seed: +1c 7f 21 fd 02 09 79 07 40 5e aa 77 ae 72 88 65 +72 1d 93 86 f5 aa bc 2e 0a 95 f3 ed b0 5d 46 e2 +33 79 3b a1 a3 88 e4 b0 dd a0 0c c3 2b 94 8a c2 +65 ae 6a 2b f2 c3 90 a4 dc ce 11 0d 5e 86 64 47 +28 f5 37 81 36 47 6c f7 1d c7 ba ac 50 cc 41 c2 +01 48 dd 37 d5 f7 0a 81 2a 29 4e 24 2d e8 03 b4 +8b 63 40 f4 28 d3 c9 bc a9 6f 76 6f c4 f4 41 67 +e0 4a + +# Encryption: +00 30 3c 35 2e 1f dd 2a f8 a8 e3 a1 69 b5 da c5 +43 45 ca a3 35 a7 1a 37 e9 38 bf 98 47 08 86 56 +84 18 ae 98 d0 aa df e7 9d 0c 65 1b 3f 51 6e 70 +f1 01 74 fe 63 22 cd 37 6d a0 2f 22 6d 15 b3 6a +bf 6d 1c bd ab 6d d5 65 4d 99 25 f7 25 3c e9 91 +51 2a 44 e9 fa 15 27 12 d7 b8 db 7f 18 33 75 80 +fe 51 dc 32 a0 58 2c e2 60 53 f1 b9 49 28 69 b9 +c4 7d f9 28 39 c0 50 2f 2d b4 cc 4d 0b 20 4f 6f +d1 + +# ============================================= + +# Example 11: A 1029-bit RSA key pair +# --------------------------------------------------- + + +# Public key +# ---------- + +# Modulus: +11 65 47 94 f4 64 9a 97 ac 87 ef 67 94 f6 a6 ff +b5 cd ab 87 02 c2 32 54 fd e0 34 f3 12 9a ad 82 +5c f3 c0 cc 38 80 a9 6f b6 4e 48 d7 59 5e de 06 +c3 1d 0a cb d1 f8 ef 9c d1 f9 f6 f0 0b 24 ba 53 +45 ab a1 46 d4 1c 56 3b ae ce 3b 25 23 df 6a 9f +43 01 8a 5f 08 69 b6 ec 99 34 69 88 6b 5d 23 17 +d5 9c ff d4 ed e9 46 6a 03 f6 df ec 17 5c ad 5a +85 44 30 95 c7 30 b9 8b bf a0 48 9b 91 bb 27 39 +9d + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +11 65 47 94 f4 64 9a 97 ac 87 ef 67 94 f6 a6 ff +b5 cd ab 87 02 c2 32 54 fd e0 34 f3 12 9a ad 82 +5c f3 c0 cc 38 80 a9 6f b6 4e 48 d7 59 5e de 06 +c3 1d 0a cb d1 f8 ef 9c d1 f9 f6 f0 0b 24 ba 53 +45 ab a1 46 d4 1c 56 3b ae ce 3b 25 23 df 6a 9f +43 01 8a 5f 08 69 b6 ec 99 34 69 88 6b 5d 23 17 +d5 9c ff d4 ed e9 46 6a 03 f6 df ec 17 5c ad 5a +85 44 30 95 c7 30 b9 8b bf a0 48 9b 91 bb 27 39 +9d + +# Public exponent: +01 00 01 + +# Exponent: +1d 4c 4c 6e 13 da b2 84 6c e6 85 d0 c4 93 52 5b +b0 ad 35 62 59 6d b9 ad 16 94 5d 44 5c e6 7c 54 +e9 38 f6 54 54 2b 09 34 48 02 91 ac 21 ae d0 98 +e8 5a d6 fe c6 d0 fe 15 4c 3c 34 2b 16 99 9a 8c +ec e7 fa f9 90 b7 c8 ce 87 b6 6f e3 27 fb 35 2e +d0 11 32 3d 2b 81 9a 36 ca be cc 5a ae 72 30 d3 +f8 e0 02 45 af 35 af 80 88 62 e5 4d 92 56 07 ee +8b 58 e6 a9 f3 ad 8f a7 28 fc e2 68 56 c3 67 b1 + +# Prime 1: +04 41 0a b5 54 60 2d 7e fb 0c ce 92 71 a5 22 20 +f2 52 50 02 34 b3 82 02 fa fc 94 aa 26 b4 fb 04 +e5 f5 08 74 9a 44 ef b8 9b 75 78 db 00 7e 03 06 +23 89 48 69 12 80 f7 3c 12 7a 49 30 b4 63 39 ba +d9 + +# Prime 2: +04 16 d3 fd ed 8f 9e 7b 01 9f 67 12 32 0e ec 11 +d8 cc 83 81 ea 86 26 6e e0 3f 00 72 e9 a2 fc dd +80 81 ae 74 fe 27 88 70 f4 fd a2 a0 00 6c 4f 54 +23 9e 24 a1 5d 1a eb c6 7d 90 d8 18 4d 29 5f 52 +65 + +# Prime exponent 1: +04 06 7b 98 7b 5f 8a 8d 56 06 97 4d 11 06 1d 96 +29 55 63 e9 c2 6e 7d 3e 4e ba 43 fe 01 24 4d 46 +24 46 49 1a f4 82 f8 86 a9 6b 6d d1 64 d4 d8 0d +ae 00 90 29 04 5e 4e 13 64 b4 9b 9e df 81 e8 b5 +79 + +# Prime exponent 2: +e1 38 72 e5 6d 84 d7 4a 1e 15 7a e0 b2 3d 30 09 +c8 d6 72 59 16 cb a6 07 31 06 d3 b2 58 92 b6 c5 +33 21 69 a2 54 b7 12 36 63 6b 5d a9 39 a4 47 a1 +f2 20 47 67 54 a7 6d 69 0e 84 af 95 ca 54 eb d1 + +# Coefficient: +02 51 37 ae 5d 25 fe 1d af 9b 38 32 f8 07 56 b8 +6d b5 ca 0e 37 2e 51 63 03 4e a3 39 1f 5e 54 58 +2a 1d d0 47 58 b9 92 a5 a8 e4 6e e1 6f 8a d3 8c +a6 52 27 45 aa 7d f5 1d f8 9f c2 21 08 01 0e 00 +4e + +# PKCS#1 v1.5 encryption of 20 random messages with random seeds +# --------------------------------------------------------------------------- + +# PKCS#1 v1.5 Encryption Example 11.1 +# ---------------------------------- + +# Message: +4e a8 df da 3a 9c 26 70 ca 9b 80 fa 89 71 0a + +# Seed: +96 06 42 1b 97 3a b4 ba 2a e2 2f f5 38 70 7d 7d +4e 56 3e 8f 05 f2 0b c3 38 1f f4 5b 0c 29 19 a1 +b3 46 b0 76 03 5a e7 74 b3 2a f8 ee 56 6c 73 e2 +09 49 68 4e 44 74 80 df a3 4d bb 0c 22 66 61 50 +90 9a 59 e1 bb 22 d0 95 ab e5 02 5a 76 d6 0e c1 +01 c7 80 e8 3a 0f f1 59 46 5c 3e 7a c0 21 2b b3 +8b 2f 1e 0e 6e 0b 54 d3 5f 4c 76 04 c2 d0 93 + +# Encryption: +09 bb cd 8b 63 b2 9c e9 52 26 ec 1d 51 91 2a f3 +97 89 fc e5 e7 7e 7b e6 78 96 c2 c4 e4 c4 37 6f +a4 28 ec 5d 8a 49 7a cc a9 e0 82 1e 1f 6d e1 06 +78 19 c4 8a 51 6f 06 91 cb ea cb b1 9d 1b a5 09 +f0 4f c0 13 36 d9 0f 73 96 b4 3a a2 f2 b5 15 0c +28 a4 5f 35 a9 de 1a 29 73 ea 10 28 67 94 94 0a +b7 9f 12 9e 31 8c f9 7a 5f d7 2b 04 5b 46 6d 66 +6e 5d e0 b7 14 f2 12 a0 b9 05 2a 0c 91 44 8e 52 +0d + +# PKCS#1 v1.5 Encryption Example 11.2 +# ---------------------------------- + +# Message: +c6 e2 57 f3 a1 b3 5b bd c5 cf 42 0b d7 65 4c 52 +b2 52 df 32 c5 70 d4 28 e6 3e a2 + +# Seed: +77 bb d7 2b 7b 8f d2 85 02 ec f7 9f d1 c8 af 8e +bf e2 44 32 70 93 b8 24 79 5e 95 c0 b4 36 eb 41 +e5 f0 f2 ae c4 33 63 aa 2c 08 fc 33 f2 87 e6 53 +80 40 e4 28 0d ba 47 23 e5 32 92 e0 a6 7b 21 ef +77 70 79 85 b7 2b 2e ca de 28 0a 61 fa 73 d7 3d +bb 2f db 17 f7 75 f4 5f a1 75 b7 7c b1 06 7d 6f +93 a4 37 + +# Encryption: +0d 21 49 5c 49 28 c2 6a 92 c1 6a 90 7f 08 33 35 +ad e8 eb 0c 20 b0 b4 5f e0 e0 8e f3 9a e2 4e c0 +b5 05 7e 60 78 dd 7a 1b 9d 10 2c 24 81 85 57 e9 +0b 83 ff da 14 f3 cc 37 3c 84 c1 05 ce ee 71 bc +73 1a 7f 35 71 bd 7b bb a1 d4 f2 3f f4 df 0a 84 +f3 12 99 0f f7 71 ff 11 8f 05 bc fa 22 2f 11 c1 +ea 01 f6 a4 68 ca 5a 87 50 80 40 98 f8 46 a8 64 +30 ea 23 e9 f0 7e 23 48 46 1e f0 0b a6 25 34 fc +e7 + +# PKCS#1 v1.5 Encryption Example 11.3 +# ---------------------------------- + +# Message: +2d 30 7f 44 dd ff 9c 45 35 a0 6e da 01 4a 19 13 +04 fb 3f a8 e3 a2 be 88 bb 3b 7b e9 9f 94 d1 33 +9c 21 9a 51 ff 5c ad da 93 + +# Seed: +5f ab 24 2d d9 f2 92 4b 20 d3 78 a8 87 b5 de 21 +d1 95 76 9c 3b 53 71 c0 0f 4c 3f 1b 63 26 8b 01 +0c 31 f3 2b b8 7c 9a 52 29 e0 d9 30 5f 5f c8 3b +89 34 b9 98 d8 ce df 91 6f 7a 4d 72 68 fe 3b e5 +12 35 f8 be ac 80 0d 4f ff ca 6f fd db 29 da 4f +a1 c7 76 9d 51 + +# Encryption: +0f af b6 1c 37 16 c7 96 69 fc d1 64 52 46 a0 d3 +b0 75 b2 8b 73 82 20 15 a8 ca dc 88 a2 2b 7d a5 +39 43 e2 54 4d e3 96 be ee d3 b0 a9 89 ad 20 a7 +3d dc d1 91 e8 aa 5c ae b6 e9 08 8a 4a 3a e8 40 +67 f9 19 8e 92 4a 9c fe 14 50 b0 18 a6 b6 9d d2 +37 58 e9 25 1c 76 cc ea e8 40 da 2c c6 25 17 39 +e2 3b 9a 42 b6 34 46 ec a0 d6 15 99 a1 46 b7 41 +fd 43 51 1c 73 66 3a 92 3e 37 57 f1 8a 17 1c 3b +12 + +# PKCS#1 v1.5 Encryption Example 11.4 +# ---------------------------------- + +# Message: +1f 03 33 88 55 4b eb fa a0 1c + +# Seed: +9d 81 57 56 74 66 3b 3d 87 7d 4b 0a a4 fd c6 05 +47 0a bc 55 0b 53 52 72 c8 23 70 18 86 7c 50 22 +ca fe 6a 4a c8 37 37 e9 9c 6e ba fe 69 ca a7 fd +ca 70 27 c8 fb c4 37 ec 52 32 ce 2e 25 29 a0 f7 +03 e2 01 f7 e5 10 32 35 ba 65 a6 47 94 f1 90 ef +42 54 93 b6 48 ed 24 a2 19 7d 0a b0 4d 81 c7 b3 +35 a2 da fd 6b 59 c9 43 a0 9b 48 ea c3 5e 35 59 +62 91 f5 f7 + +# Encryption: +00 1b df 33 93 34 2c 38 13 ee 3b 87 07 ea f5 46 +47 ba de 4c 71 8a 4b 64 54 78 12 e0 10 c2 b7 46 +c8 8c da fd c3 16 f0 36 9a 6c 43 0a e7 e6 c5 0f +05 d5 45 c3 f7 98 de b1 d9 a5 bb 69 c5 91 39 33 +c2 d7 79 2f ae 9d 42 ad 76 49 4d c9 a3 e2 7c 21 +1d b4 ef 19 85 18 7a 6c 4d 28 1c 47 72 17 74 a7 +a1 1c 12 18 d4 dd 26 7b 57 48 58 77 aa 75 1f 6c +28 19 f8 1b 50 54 a2 8a 26 a5 3d f3 ea 34 82 b3 +40 + +# PKCS#1 v1.5 Encryption Example 11.5 +# ---------------------------------- + +# Message: +f7 1b c7 37 4b d5 9c 37 77 59 76 f3 35 24 4a 36 +84 3c 59 e7 48 9a d2 8b 1a 82 2d 2d 7d 0b 9a 6f +e9 ac 5b f4 36 82 d6 3d 63 6e f6 + +# Seed: +a1 ff 98 44 a7 3e c4 b3 be fb 1a 86 03 52 cf 9b +75 fc 66 ff 47 9a 2d ed 59 98 84 5a 79 77 3a 8c +62 06 a3 64 36 c8 80 a5 5e 18 71 18 35 45 6d 91 +45 4b 5b a1 32 07 8f 20 37 fb da 72 86 25 1b ad +d1 2d 0a 97 81 af 3f 58 97 cd 94 7b 1e 14 25 f9 +70 55 09 + +# Encryption: +09 3f b6 85 26 ce ad 01 0a 54 d1 16 cd 7d 60 35 +09 9b f1 ab ff e9 33 1d e3 64 86 f0 53 a8 02 98 +e4 ab fa b4 0d 3b 03 a3 e7 e9 25 59 73 38 f1 70 +3b 04 53 5a 9c 87 c6 58 36 f1 61 11 aa e8 89 e6 +c8 d9 0a 24 07 d4 41 a1 c2 a3 11 cb d9 46 11 a4 +2e 93 c7 3a 3d 21 48 3f ad b8 f4 e2 46 d0 89 f1 +cf d7 08 52 b4 dc 77 8a 60 d1 52 d3 fc a7 5f d6 +06 67 04 e9 33 bf 99 f5 bb 77 af c9 a9 cb 3b 8c +b5 + +# PKCS#1 v1.5 Encryption Example 11.6 +# ---------------------------------- + +# Message: +46 87 83 d4 ea c8 81 34 32 04 85 47 ce 24 1f 72 +db 1c 85 ce 4a db e3 ee 2c + +# Seed: +c6 e3 26 30 ed 90 d0 af b1 68 c0 8b 75 22 59 ef +4b 9e 81 17 62 f7 cf 4c 53 5c b4 a0 a0 4b 1d 43 +65 4e d4 fa df c7 dd bc 3a ad 03 14 07 8b 22 6c +4f 3e 97 84 45 7c 91 c7 76 8c 5c 37 b7 60 08 93 +2e 8d 04 57 85 05 73 ce 6b 41 a4 3c dd a9 70 03 +18 36 84 0e 4e 60 a3 48 7b 47 a1 85 c8 6f 8a 16 +f6 f2 21 d0 a0 + +# Encryption: +01 71 a1 2b 00 cf d1 09 67 4e 5b f7 f8 43 47 fd +a3 fe 4a 8e a2 f4 8e 0d 6b 6d 94 b4 9f d7 bd fb +26 e3 24 00 a7 12 51 ab 84 22 06 92 1d 83 72 3a +89 ea 09 93 00 25 92 0e 3e f8 a8 87 d2 bc 24 15 +a7 f1 ed 37 ba 8a 5d 03 ef 92 6a ce f6 11 90 00 +1c 5e a0 f8 cd 92 02 0c d8 96 67 e9 ea 5f 7f 2b +15 37 8a 21 0b 8a e9 14 81 90 98 da 1c be c9 c5 +43 a2 63 30 0f 99 4f b0 b4 92 85 71 40 1c 20 2b +d6 + +# PKCS#1 v1.5 Encryption Example 11.7 +# ---------------------------------- + +# Message: +af 63 1d 76 c9 7f d9 95 e4 94 aa 9b 4b d7 58 c5 +c6 72 c5 e4 15 8f 3a af 87 4b + +# Seed: +40 6e 1e 23 f9 92 bb 07 62 12 5c a4 63 bd 0f 2e +fd f1 bf cb 08 2a 8d f5 06 af 5f 72 70 c3 9f de +01 d9 ee d3 22 66 61 db 22 a9 c4 04 b7 d7 65 fa +38 4f 9a d4 f5 1b 93 69 d7 4b 0e 37 70 66 31 bc +65 36 f6 55 5e c7 fd eb d3 48 ef 3c f5 f8 a8 77 +f6 06 43 7c 27 8c b8 16 3a d3 49 38 4b aa e3 2f +31 b6 86 e0 + +# Encryption: +01 ff 8f e7 9a f3 18 d7 56 f2 84 08 3b 51 b4 3b +66 aa e8 3c 6a a9 1a 99 93 4b 4d e8 4b d5 fd 24 +fa 8d 07 c7 55 14 74 66 5e 62 36 0a 65 98 4e 67 +a4 85 6c 3d bd 2c 75 f2 46 e2 22 22 e9 f4 b9 69 +51 67 26 ed 28 7f 42 3a 67 47 82 1f bb b7 fa 17 +62 35 c8 50 a8 61 f2 99 f7 39 4c 2c 43 07 b1 02 +59 09 40 fe d1 20 6a d5 9b 9d d6 44 4e 1e 19 6e +94 73 25 22 4f fa ca 06 9e 9c df 8c 62 02 69 07 +7d + +# PKCS#1 v1.5 Encryption Example 11.8 +# ---------------------------------- + +# Message: +73 cb 53 90 82 fb 06 dc ae 3c 20 68 e9 89 e7 c0 +d8 ff f0 fb 34 0b 6d e8 0d 0b a5 d1 e0 06 4f 22 +13 92 8a 4b af 20 a8 03 48 af 3c de 9d e6 3f 88 +6d 63 e5 6a 3e 32 cd 8e + +# Seed: +28 e2 a9 7c 7e 9e 03 3b 49 aa dc ee 8f dc 07 ed +fd fd b9 50 35 4b 70 8c e5 df 84 8d 1b 51 aa 2f +4a ff 99 74 16 01 81 42 29 47 b1 33 76 4c 5a 40 +06 57 04 6a 49 36 3f fd f1 f9 3c a4 8b 3e 52 93 +7e 1f 38 fb 50 fb + +# Encryption: +0c 72 e6 95 48 c3 4e ca f2 48 b2 dc 6b b6 43 87 +f4 f3 35 0f 66 8e 59 01 35 60 80 8c 41 3f a8 35 +fd 36 0e 04 e4 74 7a 00 31 c8 a6 4a 9d 7a 07 b3 +63 fa d2 93 b7 03 a7 dc 99 0f 80 6f b9 0e 39 12 +21 a1 16 df 10 8f 54 6e ae 51 71 6b a0 45 01 ab +77 7b 0c 2a 17 71 2f 71 e4 06 27 5f 01 73 77 cf +24 88 c4 35 ef 6c 6e 7c 45 cd b9 8f 24 47 7c ed +18 0e b3 ef c8 70 3e 96 38 26 bf b3 44 f1 6e b4 +a1 + +# PKCS#1 v1.5 Encryption Example 11.9 +# ---------------------------------- + +# Message: +f2 f9 85 b8 03 12 73 cb 5f c8 9a 31 dd eb 4c 67 +a4 e4 f3 8c 09 d3 02 87 42 09 b3 9c 69 b7 1f 84 +95 88 86 8f a5 f8 + +# Seed: +c1 20 44 6f 5b dd a0 6c 63 73 8f 18 15 55 95 f6 +2b c2 65 67 28 4c 35 03 65 91 cd 5d 75 3e 4e f7 +90 0d ff 33 bf dd 3b 10 8c 10 2d 08 98 80 c7 b6 +9d 86 e9 ce 3d 68 8c da 15 6f d6 a9 92 31 05 8c +c3 18 33 96 38 09 46 e8 a9 69 a7 fc be 9e dc 95 +9a 0e 50 45 32 ba b8 ea + +# Encryption: +10 e0 bc 14 ba 16 01 26 98 cc 76 cb 82 04 5e 2b +fd bc b2 b1 18 f1 83 06 79 59 d7 13 7f d5 0f a8 +8f e4 f9 ce cf 66 31 a9 9c cc ab 76 cd b7 74 4b +ab d0 6b 2b ed fb ca 77 24 da fd 91 e6 df a8 8b +ea 2b 44 a8 cb b0 62 19 b1 5c 2a e7 68 72 fa d2 +88 e8 43 8a cd 39 5c e5 cb e2 8a 71 2b 67 f5 61 +a1 78 6d 75 34 3e d9 ad 0d 0a 5e b6 fa ed 07 b0 +6a ef 03 31 8f f1 af e4 72 db 4e e3 e2 1e c1 29 +33 + +# PKCS#1 v1.5 Encryption Example 11.10 +# ---------------------------------- + +# Message: +39 87 2c fd 6c f7 4b 4c cc 1a 70 d9 73 b3 18 99 +a6 7a ee de e5 d6 71 e0 5b d6 01 12 e6 45 12 bb +e4 3b b8 40 + +# Seed: +68 ac 3f 96 97 b7 50 75 4f a7 53 2e 41 61 c1 20 +18 e0 33 a6 02 51 c8 dc a8 38 78 16 f4 23 79 ab +97 8e 15 57 8a e2 e9 4c 17 76 48 8b 0c fd ff 18 +6f a6 d7 98 88 f8 16 9e e4 49 ea dd c8 e7 f5 a6 +58 d0 99 7a 93 4f 58 6e 31 f7 47 30 be 60 3f 1e +e6 2f a6 c0 8b 0b ff ae 6b 88 + +# Encryption: +09 b7 70 07 f1 5d 65 9e fc ca ca 66 c1 e7 d9 62 +e0 47 a1 e1 49 e5 2d cc 0e 1a dc 9e 18 3b f7 3b +5f 23 48 d3 43 28 24 1b 40 7f 61 82 2f 6d 57 e1 +ab b3 22 d3 02 f4 53 0d 2c b9 a4 1a 27 70 23 8a +1b df 87 5e dd 79 78 10 d9 04 e9 7a 4d 7c 51 51 +32 d6 ab bf 3a 4a 40 74 86 dd 00 4e a3 8a ff 8d +4e d3 82 5f e1 31 42 f1 36 fd 1d 71 3e 80 e0 cf +22 57 69 b4 19 cc a5 4c 15 6e 54 66 8b 30 6b 5f +2a + +# PKCS#1 v1.5 Encryption Example 11.11 +# ---------------------------------- + +# Message: +74 d5 6b f8 d9 c1 80 dc 09 93 71 a5 af 72 + +# Seed: +33 78 70 f0 47 9c f1 28 3a 0c 87 c9 c4 af 54 ba +8f 85 06 44 d5 9a 20 25 26 3d 2b dc 49 bf a6 63 +6e 75 18 f9 4b 6a b1 8f 85 b1 93 21 20 9b 76 9f +0c 19 75 d1 d5 ad a0 6f d2 a7 6c 82 45 0e 4e 09 +cd ad b7 83 2f fb 8a e7 dc b4 74 10 b2 87 80 4d +dd c7 49 3d 61 0a 81 39 9b 6d f6 df 5e f1 52 09 +29 84 fe 27 76 a4 f9 30 54 6b e1 dc 18 31 3c 14 + +# Encryption: +07 61 eb aa d8 ff 1c 3d be 71 0f 60 e3 be 9f 28 +9f b2 7a 6b 53 77 75 5b 71 fb 38 4c 5f ac b1 60 +3c 95 3e 1e 2c a1 1e 78 43 25 ae 42 f3 21 ae 5c +58 64 8c 84 f5 24 df 9d e9 f9 3f b4 b0 c2 e0 97 +97 ff 2d 11 40 70 73 b9 5a 78 6d f5 1a 43 f7 99 +82 d8 6c 49 fb 9e 50 14 b1 b7 68 76 0a 51 30 26 +6d 06 99 30 6a 90 4e d2 df e2 01 38 d5 31 c5 dc +4b bf 4d cc f1 02 49 a6 e2 b3 55 f7 cc b3 26 a4 +8a + +# PKCS#1 v1.5 Encryption Example 11.12 +# ---------------------------------- + +# Message: +61 10 63 b5 da 12 3c e2 12 96 17 df 38 59 95 57 +b9 5d 1b 05 e6 b6 6b cd 49 af e9 83 1a 04 21 a5 +be 4e 48 + +# Seed: +10 f9 df 30 ec 97 77 fc ab 5a 92 4d ed 36 fd fd +6e 1f 38 14 49 ad 99 d2 0a ea 0e 39 72 ea 60 4e +a2 27 50 d0 60 1d 10 a3 77 da d1 a9 4f 9b 02 73 +40 94 81 23 82 73 98 bb 22 b1 44 5f 71 c5 05 c6 +23 aa f5 16 cd 9f b3 e9 77 f7 78 cf dd 3a 5d 28 +c2 29 9e 4b 2a bd 9f 98 c4 35 5a + +# Encryption: +07 f2 d5 8b c4 16 39 94 d7 6f 49 1e dd 69 74 3c +45 dd a0 c3 8c cb 07 69 de 9c f9 f4 fd 00 55 d3 +0a 0c f0 02 80 0d 76 ed 8c 12 cb d3 6a f0 51 a9 +d7 33 7b 29 bc 77 4d c3 c4 01 2b f5 c2 8a ea d8 +c3 e0 36 aa 41 39 8a 8b 0f e9 91 c0 bf 66 b5 34 +1c 99 d9 37 7d 94 70 4a d4 90 a9 f8 74 6f c5 ce +f7 26 e1 96 f3 41 f9 3a 1f 1e ae 2c 13 e0 0c fd +22 06 2f 8e b3 da 9d af b9 5a 1e 7b 81 b1 fd b6 +56 + +# PKCS#1 v1.5 Encryption Example 11.13 +# ---------------------------------- + +# Message: +80 76 4f 78 5f d4 17 6e 16 41 e1 29 a3 5a 9b 31 +b3 a8 9a 75 67 ad 6c 1f 0d 65 ec 8a f9 5f c1 6e +15 28 14 09 + +# Seed: +20 36 d0 98 a6 e9 35 f9 a4 11 20 1d 2b cb 62 9f +79 0a 94 db 2e c6 98 67 43 3b 17 61 d7 c6 95 4b +e9 1a 9f c7 19 19 0e 10 86 13 cd 58 4c bb 97 76 +87 04 69 24 bc a6 b2 fe 1a 54 bf 76 ac f7 7b 36 +8c 39 65 0f 6d 0a 49 8d bd ed ae 3f 4c 21 04 0a +8a ed 63 4d e4 ed 8a f1 34 6e + +# Encryption: +04 9c 61 44 4e 92 47 72 f9 4a 79 5c cd 99 eb 2f +e4 30 99 7b 91 b4 2d e6 16 36 29 ab 98 d2 5a 71 +e7 f9 68 86 a5 7e 97 9d 9c 94 c9 62 20 9c 1f 71 +2c 70 57 1a 81 f3 77 ea f7 4e 80 e7 07 22 e1 be +3d 13 37 c5 04 5f 79 7b d5 7d f2 f5 ae 5e f3 3a +e5 79 e9 3b 38 fb 25 0d f0 c2 bc 59 b3 3a 74 86 +7b 8f 3d fe 5b a7 85 d7 28 b8 9d 96 b3 00 2b c0 +05 4d b5 bb 0d 84 fd a4 5d b4 a1 f2 62 8a b1 12 +30 + +# PKCS#1 v1.5 Encryption Example 11.14 +# ---------------------------------- + +# Message: +0a bc 2b c5 fc d0 40 18 9f 84 22 f1 ca 04 50 21 +da 95 + +# Seed: +e4 73 2e 49 90 69 9f d7 47 40 c8 52 ae 8d 4d 70 +7f bd 79 46 0f 88 74 09 84 ae 53 ff b9 fc 39 62 +68 3e ad 0d 14 04 f5 31 51 d1 ae e8 0f cd 6a 1f +f6 5f c8 8e f0 8f d7 6d 9f dc a8 f9 e3 ac 7d 8d +82 b8 2e ce 78 9c 66 c5 40 22 80 b3 e5 68 10 1c +e2 a2 a7 b2 b2 f1 e9 65 19 cf b4 1e 60 49 3d 76 +8e b5 b9 6c cc 49 bb 0f 6e c7 11 fd + +# Encryption: +03 d8 ae 60 4f 92 95 31 73 c7 7a 01 ff a0 90 aa +0e 37 a3 8a 47 c9 72 19 c0 b9 f8 64 d3 48 74 6a +f7 f4 a6 32 11 29 c6 04 6a 99 4c ed 1c cf 33 24 +da 93 71 53 88 8d d6 c6 70 19 a7 ca a7 65 5a 36 +42 83 8e df a0 e2 ed 8d c2 5c 14 bf f8 bf f5 65 +c7 18 f8 b6 c9 20 56 c9 bb e8 d9 30 83 70 c7 cd +75 a0 4e 11 b6 e2 5a a6 c3 c2 cd dd 17 2a 4b 6a +ee f0 4f b8 35 b6 86 37 cf 0c a0 b9 a9 11 b8 b8 +74 + +# PKCS#1 v1.5 Encryption Example 11.15 +# ---------------------------------- + +# Message: +8f 98 35 ef b6 9c ca 8c 07 bf ef 4d 8f 53 5d 0c +bd a5 36 7b bd 41 08 0a + +# Seed: +32 d4 be 07 e6 c7 fb 81 d5 20 8c 25 01 c5 df 7c +56 d1 98 6d c6 d6 31 10 ad 21 d8 1e 57 ce 11 3f +3d bb fe be 0f 80 c0 16 b7 19 e9 d5 c3 d9 a3 bb +bb 2f 35 be 95 d4 56 22 2b 51 c3 d6 5b 38 8e 7a +da f6 b9 ce ae 1f d4 6a 6e 05 ca 1b b1 99 c2 7b +ac dc 8b 5f d1 4f 03 51 ae b3 fd d6 dc 1d 93 f3 +b5 31 56 ef a3 c6 + +# Encryption: +0e 47 ad 4d 92 d1 9a 1e bc ac bf 87 5d 80 19 27 +d4 fe 5a fa f6 6e d8 01 5c 55 9b 56 6a 9f 3c bf +0a be 8a 76 fe 73 24 f6 28 c2 e4 f3 45 84 a5 0f +f7 7e 82 2a 54 11 8e fa 9b ae 9d 0f a5 02 94 c6 +18 0b af 3a 8b 0c 7e 45 3a 74 37 ab 1a 19 cc 00 +30 7a 8c 6a ed 95 c3 15 b2 4b 47 90 07 24 56 c9 +44 60 99 5d bb 1f e5 a1 2b 4c f4 45 42 96 f7 40 +02 83 ce fd ce 6b 00 cc 80 49 dd 5d d8 cb 2a f3 +6f + +# PKCS#1 v1.5 Encryption Example 11.16 +# ---------------------------------- + +# Message: +6d fb d9 3b 00 78 d4 9a e4 fe 1e 24 cc a9 7d 0a +9a ff d7 be e0 62 ae d2 9d ef 0b 1c 0b 3a ef ad +81 1d 6e 7a ce 8b 49 d7 24 2a 9f e6 e2 3c 22 + +# Seed: +31 9f 9c da 2c 93 38 8e be 1a 50 e7 6c 93 97 55 +9d ca f1 4f e1 03 52 aa 51 1d c5 ba a6 4d c1 52 +fc c7 9c bb 23 d4 e6 9b 12 b9 f2 7a 79 09 15 98 +87 bb 04 12 9a d6 35 16 81 33 86 37 4f 31 89 2d +4c dc 4f e6 39 69 b5 bf dd c6 67 f9 46 89 7d + +# Encryption: +01 c5 ce 83 6b e2 20 8a 3d 81 4e 7e 60 c2 76 74 +ac b7 cd 3e 31 c0 24 d9 d3 8f c2 29 53 aa fe 73 +af 52 40 43 4d cf 54 a3 88 99 2e ac 36 ec 84 64 +d9 a0 42 ac 58 d1 8a 70 39 8b 8a 77 3e 66 69 bb +3d 76 ee ac df 1f d1 52 47 40 99 bf a6 62 a4 81 +db ab 4c a4 67 14 95 87 45 e2 b7 83 2a 59 cc b0 +05 36 49 b7 e0 95 07 43 33 3f 5f cd 6f 65 19 7d +dc b4 e1 bc 12 a6 6e 8e 92 a8 65 9f ae e5 71 31 +e2 + +# PKCS#1 v1.5 Encryption Example 11.17 +# ---------------------------------- + +# Message: +e5 87 9f fc e0 b6 29 b8 85 7c 19 5c f5 d0 9f 7b +93 bf f1 f7 a9 f2 d8 a4 5a 56 3b bb e9 e6 2d + +# Seed: +ba ce 2c ea 0b fe c2 5a 2d 34 d7 29 92 c2 b8 ea +0a ea 17 b7 a3 a8 be d6 0d 1b b5 10 13 34 7b 2d +03 6a 75 a4 ec 3e b2 c1 78 8d 44 a9 e1 c5 c8 8d +04 1e 82 af 87 81 55 dd c7 d8 1b 3e 27 cd dd 20 +40 9d bd da 4a 64 bf 83 11 a7 b7 eb 77 29 93 12 +66 1a 6e 37 df 35 02 f8 6a 22 49 2b ef ac f4 + +# Encryption: +01 e4 fa eb ca b8 9d 7b aa 3e 03 93 f7 16 84 b0 +ae 53 df 8e b9 87 3e 65 a7 16 ec 2f 41 74 1f 8b +78 16 d2 e1 97 d9 76 fd 53 a8 ee 7f 92 4b f4 bf +d4 10 42 e1 64 45 e9 06 0b 55 a0 b6 dc 16 aa f3 +06 44 91 d1 89 28 22 39 50 39 33 28 c1 47 db d0 +35 31 ec 01 2d 8c 52 75 02 e7 eb 3d ca 50 9b 7d +e1 69 95 92 46 07 c8 b2 8a 2b da 9b cb 2c 77 81 +46 1c 76 66 3b 88 7b 96 43 e2 31 7f 0e a1 d1 bb +14 + +# PKCS#1 v1.5 Encryption Example 11.18 +# ---------------------------------- + +# Message: +0a 2e 24 13 0e 8a 9d 28 df cb 9d f9 76 5f 46 83 +e9 da 78 42 5a 28 19 98 06 a9 3b 32 2e fa 88 49 +3a c3 72 52 c2 9a 26 4f 3e 85 ae 56 53 8e 80 8d +c5 56 42 a4 88 5f 05 46 40 f6 9c 89 81 fe + +# Seed: +20 43 1e f3 1f ce 19 93 9d a5 45 a0 85 30 11 2d +b0 fa 07 13 8d d8 6d b1 cc 65 e2 b0 3f c2 be 60 +7c 3e 60 38 eb b7 89 17 55 b2 31 29 fb 96 9a 7f +e1 06 10 f2 eb c3 f0 77 b2 c8 f4 60 1e 09 ab 4c + +# Encryption: +0c 14 b7 d3 2d 3d 4c e2 b0 8e e4 4f 51 6a ee 29 +90 b6 30 52 40 b2 5d 23 34 aa 31 75 2a ef 28 02 +16 39 f7 6a 4c 47 19 56 9b 30 05 2d 4b d0 8b 3a +07 f2 3b e6 86 23 7e 48 1e 67 bf 3f 5a 01 ad d7 +56 da 77 2c 7d c1 3d 32 29 8b 9b bc 3d 33 e6 df +82 d8 5c 08 9d 34 76 00 49 7a 8b 8e a4 de 68 ab +b9 0e 5c 6a eb 26 9a 97 be 42 6c ef ac de bb cc +0c 1f 2c 40 9b bc 7c 72 d9 0b db 42 6b 13 cc c1 +9a + +# PKCS#1 v1.5 Encryption Example 11.19 +# ---------------------------------- + +# Message: +7e fc 62 7b a5 fa 28 25 aa e0 ca 94 03 0e 70 47 +08 d3 5f 92 23 98 26 b4 2e 2d 4d bb e4 02 ab 7d +19 6a 7f 54 88 0c f2 c5 a4 d0 fc e5 3a 20 a3 2b +68 30 e6 2d cd 00 db cb f3 3b 5c 0c 70 44 01 + +# Seed: +f0 49 79 19 c1 42 f3 a9 8e f5 5b cd 59 88 23 4f +dc 8a eb f7 36 d4 7a f9 70 90 a7 a9 dd e0 a7 35 +09 f9 cd 41 36 26 bb 8b a7 67 c9 d6 38 49 1c 28 +6e 67 bf 22 d6 70 d5 6b 24 c1 5b ad 70 35 1e + +# Encryption: +01 db ce 3b 3f 84 b2 da 06 b1 67 e2 06 64 9d 42 +4a 42 b8 e9 ea 54 53 a1 6b 5f c6 c2 e9 cb 17 ed +a1 ef fe 4e 78 36 a5 e5 8f 99 e5 31 53 0b 40 17 +1e 4b 51 fc 0b 92 de 30 31 30 09 36 d2 59 5e 39 +10 09 e2 e5 3c 32 f7 59 60 4a 6d ba d9 c9 70 90 +0f a6 e4 1a 35 08 3f 78 7b 9b f3 be bc ea a1 a7 +71 84 1b 5e 6e 4c 8b 50 96 29 00 7b 46 7e 3c ec +8a 1d 03 23 c3 c5 db c3 4d 8d 41 25 a3 98 c9 d5 +3d + +# PKCS#1 v1.5 Encryption Example 11.20 +# ---------------------------------- + +# Message: +59 3d 3f cd 05 ac ee 30 29 81 5e 1e 76 a8 90 + +# Seed: +12 35 ee 3e 7a 9d f5 96 7f e9 8d 97 10 ff dd 5f +7e b2 2d c0 71 47 af 43 6f e2 0a a5 26 bf 0b 94 +19 0c ab b5 21 3d e9 8a 23 f5 ef 27 50 22 a2 f7 +3e 60 e9 ef e2 c0 34 c5 5c eb 26 aa 80 6c de d6 +73 9d db 2c bd 3e c3 b5 55 20 4a 79 84 65 c3 7c +67 57 19 56 86 a3 ea 3c 56 57 c3 60 a0 15 8d 99 +2d 4f eb fa 04 29 ee b7 c9 2a 46 84 34 c5 b7 + +# Encryption: +0f 69 98 81 a1 52 46 18 bc 25 d4 e5 14 e2 07 30 +68 ea 7d 35 38 4b af d4 6f c2 82 e1 d8 55 11 9e +e9 69 f2 11 c7 18 4a 07 03 06 47 fc 40 99 0e cf +2e a4 05 22 86 5d 91 77 8a 62 7e ca 8e 50 c2 bb +97 60 b0 45 da af 12 77 a4 fa 98 35 76 ca 8c fa +d7 60 83 29 c1 88 15 88 01 7d 63 72 2b 70 e9 8b +e5 24 e0 03 39 95 98 25 73 d3 38 70 78 c8 b7 c1 +c5 f9 ae f2 64 a0 48 46 84 b3 42 66 43 73 7d 34 +bb + +# ============================================= + +# Example 12: A 1030-bit RSA key pair +# --------------------------------------------------- + + +# Public key +# ---------- + +# Modulus: +26 1f e0 28 44 59 c2 fa 6f 05 54 6b ed 58 5e 1e +e0 a1 30 b7 1c 2b 8a 6f bb 3b dc 75 78 7b 26 55 +d0 ed 4e 32 5b 54 c7 b3 71 a6 fc f2 b6 78 82 77 +a5 0d 47 05 ba 23 c5 96 28 5d a7 e3 c9 30 4a 41 +e7 cc 48 8b 44 92 2f 7b e2 b4 7c 16 31 9e 33 74 +51 17 3d 40 b1 ea 48 1d 1a 9c 11 29 b1 fe b7 d0 +9f 67 49 7a eb 98 94 8f 1a bf 3b 77 86 bd 3b 87 +04 71 87 c8 f3 70 15 68 2b 3f 2d e5 0e 07 8e 8d +0f + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +26 1f e0 28 44 59 c2 fa 6f 05 54 6b ed 58 5e 1e +e0 a1 30 b7 1c 2b 8a 6f bb 3b dc 75 78 7b 26 55 +d0 ed 4e 32 5b 54 c7 b3 71 a6 fc f2 b6 78 82 77 +a5 0d 47 05 ba 23 c5 96 28 5d a7 e3 c9 30 4a 41 +e7 cc 48 8b 44 92 2f 7b e2 b4 7c 16 31 9e 33 74 +51 17 3d 40 b1 ea 48 1d 1a 9c 11 29 b1 fe b7 d0 +9f 67 49 7a eb 98 94 8f 1a bf 3b 77 86 bd 3b 87 +04 71 87 c8 f3 70 15 68 2b 3f 2d e5 0e 07 8e 8d +0f + +# Public exponent: +01 00 01 + +# Exponent: +05 df 76 83 72 cc 0a 64 d3 c2 14 18 30 24 23 13 +9f 47 95 73 e5 0b 5c 09 b6 e3 be 23 fb c9 aa 1a +76 d3 27 99 a0 47 76 1f fc 21 07 94 48 17 01 04 +cc a5 e2 a1 4c e4 57 d0 0d 80 7d 42 c7 6a 55 f6 +16 87 4b a7 f7 ea a1 ce 63 cb f1 32 de b0 81 aa +d2 fd 80 d1 24 c4 da 86 ec 6c 02 0e 8c a8 2d cd +cd 35 54 e6 9b b1 98 72 26 2a 50 31 ab 5d b7 cc +8c 92 59 a1 46 d5 8b 1d b9 4c c7 e7 56 25 3d 5a +a1 + +# Prime 1: +06 77 25 ab 55 34 18 e1 eb 8a 41 f4 fd 92 d2 80 +b6 9f 85 b0 8c b4 02 f0 1a a4 96 92 c7 20 9b 36 +42 98 ee f4 e3 3d c4 22 bb a3 35 03 d1 1a 12 7d +d2 86 43 f7 e7 75 58 97 e2 eb 96 c4 dd bb 91 12 +f1 + +# Prime 2: +05 e5 8c eb d4 7d 87 b1 e7 8d a2 fe ee 6d c5 f9 +bf a2 20 c3 55 e8 20 c8 fb aa 88 46 df 11 00 36 +2c d1 69 1f 5c bf 5c 78 68 c4 72 d0 28 2a be 01 +03 16 1f 4d 8c 62 af f3 5b b1 fb 7c c6 99 d9 9f +ff + +# Prime exponent 1: +01 6c c9 14 95 d6 c1 95 29 40 73 80 f7 52 20 aa +d5 95 1a f5 ea 4c d2 48 f0 d6 4d 89 53 f1 cf c3 +89 b2 03 18 5d ed 03 09 54 a9 87 c9 ab 90 3f 7b +13 a7 1b db cb 5b 85 87 14 30 30 2e 7b 60 17 7d +41 + +# Prime exponent 2: +f9 cc 89 15 ff b3 dd c7 c0 93 71 76 49 2a 12 bb +18 7c 2d 76 e0 d3 d4 0e 79 58 d5 c9 82 09 b3 ed +54 b5 fd 9f 9e 77 11 e1 dc 68 57 73 de 26 d5 0a +0a b6 21 62 12 ce a5 09 ce 79 1c 5b cd 07 cb 47 + +# Coefficient: +05 fe 93 3b 87 3f 1d 68 f6 be 2d 4d 5a a2 2d 96 +8f 2b 7a f5 41 a2 dc d6 4e 09 c0 30 b1 50 35 8a +98 02 ae 86 59 95 d7 6a 50 03 7d 19 8d 7e 70 4d +26 84 7a da 8a e3 d3 85 c2 96 5f b1 7f cf 15 2f +77 + +# PKCS#1 v1.5 encryption of 20 random messages with random seeds +# --------------------------------------------------------------------------- + +# ---------------------------------- + +# PKCS#1 v1.5 Encryption Example 12.1 +# Message: +7d e6 9c d9 22 8b bc fb 9a 8c a8 c6 c3 ef af 05 +6f e4 a7 f4 + +# Seed: +33 d6 2c d6 67 82 3f bf 13 d5 92 ae 4d 02 a2 37 +0d 1d 99 db 06 c7 25 42 5e 0d 12 fc b4 83 4e f9 +e5 49 9d 60 7e 8a ae fe ba 81 96 49 fb 3d 61 c7 +05 f5 e9 a3 a2 f8 96 27 61 89 a3 20 0d 2f af f7 +76 79 e0 56 34 9a 5b 9b 7b 44 49 b6 75 cd 48 b6 +98 09 32 c2 cf c4 6b f8 9a 77 34 f6 8d d9 f4 fe +77 e1 d9 cf 1f 31 b2 1c 4c 61 + +# Encryption: +04 ca ef fc d5 1c 3f c9 23 63 46 77 4d a0 cf a7 +7e 9e 64 65 f6 43 7f f4 6d 9f a4 58 b3 62 34 12 +c3 10 30 09 fb fe 20 31 96 df 72 96 26 e0 ee 3a +fb 6b 10 a5 ac d7 2e 84 28 1d 9d 9b cb a3 e0 ef +77 dd 84 f3 db 19 2d 31 b5 b6 66 f7 6c 93 81 06 +81 37 3b aa 58 e6 da db 01 fa 5c 65 ec 89 fa 51 +cc 24 74 61 1b 9a 7c b0 0e 86 2f d3 d4 9b 1c d3 +1a fc 2d b4 49 e0 9d ae 2d 0a 7d 4d f0 bc 32 0b +5a + +# PKCS#1 v1.5 Encryption Example 12.2 +# ---------------------------------- + +# Message: +97 ee a8 56 a9 bd bc 71 4e b3 ac 22 f6 eb 32 71 +96 69 c4 2f 94 30 c5 89 50 c6 4c 0d ab ff 3a 9e +20 43 41 6c 67 ca aa ab 7c 68 cc b3 ca 99 a3 + +# Seed: +9f 14 12 61 ce c4 f2 c5 2f 96 91 25 a3 6f 14 10 +27 08 82 50 d3 6b 17 42 1c d0 96 14 76 19 06 46 +8a fa b7 62 2c 0d 02 19 36 91 74 47 91 e0 d3 5b +6b c9 f3 37 7e 10 b2 85 6c 8e d9 19 9c 89 f4 a4 +16 13 d3 c4 0c ca 37 3a 7c c6 3c 52 60 fe 5a + +# Encryption: +0d 26 a0 5d e9 3b 70 7b 85 40 fd c1 98 89 d2 d1 +e7 93 71 57 d3 2d 30 3c 52 8d e3 5e 55 3f 94 20 +28 74 4a f6 a0 40 2e ca 0f cf 5a 85 26 1a d4 75 +d8 71 0c c9 f8 b1 1b a2 c6 da f1 d6 72 69 0c 68 +ed 11 e0 35 e9 c6 60 ec e1 d8 0c da b8 00 ea d3 +c6 e0 78 61 7a 1b 0d 27 3d ed d8 d6 57 49 16 6b +d0 77 74 fb 4c 14 86 aa 8a 0a df 59 5d bc 3d 10 +ff ae f1 83 84 98 a6 75 55 c7 7b 6e d9 83 d5 b9 +de + +# PKCS#1 v1.5 Encryption Example 12.3 +# ---------------------------------- + +# Message: +8e 3e 77 2f 39 + +# Seed: +9e b7 31 fa 6d 8d 5b 75 81 f8 fa d2 c8 22 5b c9 +68 34 af 61 db 3d 40 9d d5 63 04 ae 23 ea 62 69 +63 a4 d8 04 40 c2 4e 43 1e 41 97 60 90 3a c4 4b +fe 41 a7 50 81 a5 46 2b ae 65 47 c0 e7 a0 6e 91 +60 df 9c 01 fa 6c 53 54 c8 33 18 db 65 6d ee 0a +43 77 87 fa 46 39 4e 55 2e a5 33 15 59 b4 01 7b +b6 a0 e1 d6 fc 8a 65 b4 5d a0 c4 5d 88 95 48 61 +cd 6e 7a 41 7e 03 7b 1b 05 + +# Encryption: +24 4a 86 34 51 9a f4 9f 56 9b 69 86 ab 47 79 64 +a6 b2 92 0d 84 3a 1d 97 ef d7 fe f8 3e 81 ba da +4c 4b 56 29 61 ef 4e 1f c3 33 46 4b 92 6b d7 4b +07 ad 50 c6 5b 68 16 83 d3 89 fe 41 d6 d2 13 b6 +46 9f 18 2b 14 b4 62 d7 2c 1c e3 92 8c a8 06 d9 +66 b5 2d 42 d0 bf d6 0c 9d 04 91 4d 50 83 7c da +e0 9b 33 0e 37 27 44 dc e1 7f 18 e9 4d 71 1c 8b +58 ea 44 9f 14 49 d3 69 fa ef 51 46 83 d3 01 60 +79 + +# PKCS#1 v1.5 Encryption Example 12.4 +# ---------------------------------- + +# Message: +dc fa e7 71 8c 24 7c 40 f9 a2 a3 c3 53 5c 50 92 +80 c8 73 c3 + +# Seed: +b9 3b be a6 c1 85 3f 15 3b 5e 01 e7 e4 e5 d0 c6 +3d 9d fb 24 5f c6 cf 64 04 3d 7a 92 20 b0 b8 1a +c2 af 65 6b 99 71 4b a4 30 e0 a3 96 95 d2 5f f2 +69 b0 b9 b8 65 fc 4d 4e ee 5e 07 a5 b5 be 35 43 +82 aa a4 14 bc 62 08 54 5c 86 ce 02 38 8c 07 b3 +76 fb 02 98 c3 7d 1a c3 9e a1 89 b0 ad f7 80 f6 +e8 30 bc e9 17 b5 0a db 7a 31 + +# Encryption: +0c 41 20 52 d4 ef 4a b5 1b 2f 62 37 05 f0 7f 41 +fa d6 4d af fd ba 62 44 ef d4 7f 51 9d e2 e7 1a +01 a6 c5 7d 1f 28 b6 bf 7b 5c 8d bb 9f e7 b1 49 +b0 eb aa 53 59 61 99 37 6d f4 90 32 3d 25 c2 17 +bc 71 be 37 f1 81 03 5c f4 57 eb 5c 06 d6 a3 de +d3 d6 6d 5b 35 f0 61 81 bf 94 d0 ec 13 ec 44 7c +70 82 33 49 1c 55 4f 9e 99 1f 6b cb 8b 78 d3 3c +9c 36 95 5b 8d ce 51 79 ff 8b c5 92 44 f6 67 90 +87 + +# PKCS#1 v1.5 Encryption Example 12.5 +# ---------------------------------- + +# Message: +d7 1d d8 7a 13 99 1a 0d a2 c7 4a 58 b0 48 56 34 +b3 e0 4f ec 9e 3f 1c f2 60 4a 93 be d7 96 96 fa +63 78 eb 1b a0 e5 d2 04 70 a4 + +# Seed: +09 90 59 92 58 e9 7a 2e bf be 10 97 72 25 c4 16 +76 2e 95 d2 55 3a 80 1f 72 6c c2 49 bc df 32 21 +32 58 57 19 fc 12 39 9a cd 72 54 ae 77 da 34 3f +e2 a9 a3 ac b1 1c 14 e2 14 e2 d8 5a 76 70 8c 3e +72 17 3d a5 d9 90 58 e0 c8 70 9e df 28 c3 69 38 +76 9f 1f 22 + +# Encryption: +0f f9 cc e7 b6 9d 7f ca 48 d7 c4 f6 cc ff 24 8c +3d b8 8b f1 b7 85 2c d9 d8 52 5c 3b 41 e4 4a 9b +54 0f 20 8f fb b8 c8 5b fa 89 0a c0 2e 99 49 59 +d6 b0 7f 64 81 40 78 55 6f 8e c6 0d b3 57 ac ea +f8 39 11 5f ad 41 f8 91 8d 69 c2 1a 3a ff ef 6e +b1 4a 5d 2c d0 64 5c d7 06 b5 81 43 39 4a 27 35 +36 82 e3 ba a1 98 00 2e 16 80 f2 8f 34 be 08 9a +57 84 ac e5 ca 6b 11 08 99 df b9 58 2f 2e 4b 2a +40 + +# PKCS#1 v1.5 Encryption Example 12.6 +# ---------------------------------- + +# Message: +5e 4b 15 8f 8d cb cd d7 e3 08 38 5b 40 19 0f 5d +ef 8c f3 30 5f c4 9d e6 3c 9e 35 b4 02 36 ae e1 +f4 56 20 5a 52 67 a2 aa 7d 88 cb 2c 11 af 7f 28 +99 d0 1d a1 b2 c7 46 6f fe f7 + +# Seed: +a5 22 f9 80 8d 9c 01 d8 ff 79 77 5f 7b 22 09 8f +c5 fe 32 54 e1 b0 4e b1 cb 85 0e 10 e2 c5 06 5e +23 27 4d c0 a0 55 87 43 6d a3 75 59 33 5f e7 09 +3f a5 e7 a2 a9 c9 a4 dc af 23 51 79 d0 e9 8f a3 +3e 34 b6 16 + +# Encryption: +1c 0e 86 a6 36 6b eb 1e 12 d6 bc fa 6a d4 94 06 +c8 b7 e4 8d 1d 5b e4 5c bd 83 19 49 87 49 6f aa +3e 21 92 7e c6 62 f5 02 ac 3f 91 a4 b4 b9 1d 16 +0c 19 86 a5 ed 09 27 66 88 3b 85 55 e3 c9 31 4b +44 ba 33 83 db 28 74 23 af 91 b4 13 91 8c 08 02 +c7 77 8e 46 c2 96 dc 9f 04 cd b8 b0 6a dc 7c 53 +d8 59 f4 42 cc bd 5f fa b5 af 75 2b 97 9b f5 23 +a4 0a 1d 08 d7 60 63 ff b3 d5 cf c8 2f 15 eb d6 +d4 + +# PKCS#1 v1.5 Encryption Example 12.7 +# ---------------------------------- + +# Message: +35 9b a5 07 56 a8 03 30 40 9d 3f 23 6a 34 0b 90 +f4 2f 73 2a 87 71 1f e2 23 52 d4 c8 25 0d 45 47 +5e 32 b9 58 83 e1 60 97 55 a1 3c df c1 bf 39 4c +5c 67 36 9e ca 1f 9a 33 e8 ba + +# Seed: +f9 eb dd ac 9d e1 70 9a 06 bf 6b bd df 58 94 e2 +3b 96 2b a0 c0 64 bf cd 7c c5 76 60 3b 0a 1a 1f +f3 5d 64 5e e8 7a c6 f8 21 a6 a1 51 e6 bb b0 5b +f3 e0 5c d9 a6 e2 cd 9c 6c f5 53 bf b0 7b d2 fd +a0 40 df b6 + +# Encryption: +08 33 60 e6 49 05 9d 00 65 8d ba 21 f2 df 28 a2 +76 4c 45 89 f7 a7 7d 5a f9 95 79 a8 ab 44 80 c8 +26 a7 7c 2f b7 95 4f 4f 31 fe 1d 9e b1 bf 40 e8 +09 57 7f 39 30 1a d3 ab 95 b3 81 6c 90 ec 3f 1c +d6 29 c4 39 61 74 be d9 fe 1e 0f 47 68 23 e5 3b +41 d1 35 b4 9a 02 b0 0e ff c7 61 ec 90 94 23 af +15 85 52 37 b7 7e e0 7d f2 5a b4 e8 58 46 7d 4c +cf e8 08 43 24 1b bf 88 eb 4f 85 3e f4 b4 3b a3 +ac + +# PKCS#1 v1.5 Encryption Example 12.8 +# ---------------------------------- + +# Message: +a9 f3 9f 8b a0 64 66 25 0c 26 5d f0 ca 46 57 0a +16 01 12 cf 38 fd 74 59 99 + +# Seed: +88 b3 c2 8b d3 99 9a 86 0b 8d e7 75 93 5b 8e d7 +8f a2 f2 7c 26 8b 24 3a 02 45 af 86 72 25 47 19 +f2 3a 4b 7f ed c0 0d 54 e1 2e 9d 70 1f 64 69 94 +24 b6 b8 7d 14 d9 67 6e fa 95 9b e2 1a 04 b6 43 +5d 25 10 03 dd 15 3d 7d 08 ff 28 d9 3a 93 20 dc +1b bc 3d b3 97 a5 48 94 f2 05 79 f9 3e 4e ad 65 +c3 1a 40 7e b4 + +# Encryption: +19 83 96 50 b9 25 f1 f9 6d 61 1e 4d bb 91 49 93 +54 5c 67 39 0c 32 93 5f bf 82 25 9d ad 10 f2 37 +30 eb 48 f3 42 00 46 5a 20 38 72 77 e2 b9 61 e0 +83 18 d2 07 74 47 c9 10 92 71 e4 de d8 ff 3d c4 +f3 79 ee e4 55 ae 96 08 1a 1a e2 4b 96 ca 73 0a +62 f7 ac c5 a5 ea 52 28 e3 a4 8e a6 74 1c b3 0e +82 9d 55 09 cc c6 c2 87 c7 29 1f 3a 1d 89 d6 26 +bc 98 15 77 de 52 a1 1f 12 ae 21 43 d3 b0 b5 2f +86 + +# PKCS#1 v1.5 Encryption Example 12.9 +# ---------------------------------- + +# Message: +68 + +# Seed: +53 8b 09 5e 4f 2a d6 77 30 68 74 21 91 52 42 25 +1d 07 f6 61 ed ac 7f e7 9e 31 d6 c3 45 af f5 9d +f3 88 c7 18 2f ff 0c 04 27 b5 99 35 c6 91 da b8 +bc 42 be 47 d7 69 11 88 0d 91 7b 86 27 18 b4 c1 +c1 88 8d 42 20 b9 f8 23 1a cd f1 2d 9b 85 18 6b +e0 95 0c 1a ff 84 cd 0f e3 65 86 a5 0e 7e 04 b1 +72 ca 9c 85 9e 2d ed 6b 8e a5 79 dd 5e 6e ee 77 +2c ca a6 b4 a5 d8 ab 17 31 a8 35 d6 a8 + +# Encryption: +1e 86 8a db 0e 65 32 80 60 4e 8d 3b c4 d9 69 84 +a2 0a a0 9d 48 0b 4d ff ac 62 ba 78 cb b7 ee d0 +64 5a 6d 94 d9 d2 f2 d1 e9 17 c1 46 b4 1f aa 3d +1d 2c 19 01 05 36 8f b4 84 06 a1 d2 42 6a f3 dc +c8 5b d0 2d 5c 26 c8 97 cc b2 2e 57 59 12 64 1a +18 8e f4 ac 47 a0 a9 fe 9a a2 70 6d 8e 10 61 f5 +d9 30 63 f4 90 17 00 3b 23 09 ca 7d 8d 36 70 3b +fd da 3f 7f 43 df 15 8a 15 bb 22 13 9a ae 15 10 +77 + +# PKCS#1 v1.5 Encryption Example 12.10 +# ---------------------------------- + +# Message: +35 65 87 e6 c6 c0 b4 6c 24 45 e0 18 63 52 76 ab +84 5f d1 07 6d 10 7f + +# Seed: +e5 d3 3e 4d 93 c7 08 44 ee 4a 01 65 56 24 2d 08 +e8 e6 2f 1a 7f 79 47 79 e2 23 ee 9d fb 23 1c 3a +52 0f 29 7e 50 73 e4 f9 2f 53 5c f1 44 55 7f 94 +ee 1e 1e 5c c6 bf 4c 0c 0c 8e 5e d4 0d 06 63 56 +06 f7 54 cc 2d d8 3f e0 2c 57 6c cd 2b 83 5f d0 +f5 3a 99 08 3f 4d 15 bf e9 26 88 99 ef 09 ff 5f +2f 3c ec 9f 9b 8a 7e + +# Encryption: +15 d3 64 a4 49 9b 30 a5 f7 8b 6d 7d 4f 66 7a 1f +76 d7 15 15 8f 28 01 19 b0 55 e1 f2 66 3f c7 96 +e3 3c 0e b6 4e 34 a8 da da 5c 81 75 42 57 a8 bd +f0 ed 81 15 f6 07 b7 c9 cc a4 81 f7 45 20 b6 d9 +ac 98 f5 e7 2c 2b af 3c bb 6b d9 ba ea 5d 75 86 +0c bd ae 34 03 fd 5c 37 96 4a ae 64 36 6a b0 9b +c9 c6 72 76 95 14 48 19 3b b4 b1 af a2 70 79 c3 +41 70 a2 69 56 51 0d 44 27 64 22 99 08 42 0f e8 +0a + +# PKCS#1 v1.5 Encryption Example 12.11 +# ---------------------------------- + +# Message: +e1 53 27 6a 68 79 67 8f ee 19 89 48 28 d6 26 2e +a3 9a d0 54 c8 9e dc b2 3f 72 dc da 1b 00 73 c2 +87 62 02 18 d9 2d 0e b3 0c 62 af bf 2b 45 df 62 +d0 66 65 f8 05 25 b6 72 7f 95 e3 42 29 e6 82 a8 + +# Seed: +2a d7 14 2f cf a3 bd be b7 55 b2 c5 b5 cf 13 e6 +96 9e b7 3b 7a 06 bc 29 bc ad 7e 75 30 a5 90 23 +0f 6a 43 fc 03 d6 c3 a9 c6 41 e5 3a 41 77 d5 75 +02 91 ec 6d 4b 33 f8 71 66 8a d8 56 90 77 + +# Encryption: +17 8e 49 77 0a 4c 8f fb 7f 65 f3 82 cd b5 76 e6 +08 e9 75 c4 37 13 39 10 2b 95 2a 1e 71 cb cb 91 +fd cd 0c 0e d5 a8 5f bd 26 3d a6 a7 4e 49 1f b0 +4b 60 a5 96 1d 8e 6a c7 24 ec 8a 81 61 c2 2a e3 +10 40 7f 59 f7 e6 02 da 48 aa 2d ad 68 3e 88 db +1d 84 29 5e 0f ba 5f f2 f6 73 df 32 85 4d 01 b7 +1a 89 46 0f f0 e6 e1 be 98 ae bf a2 27 e3 97 ea +cc 8b 23 17 41 47 c4 4e 16 20 1e c6 ba bd 16 5b +a4 + +# PKCS#1 v1.5 Encryption Example 12.12 +# ---------------------------------- + +# Message: +fa 4e b9 31 a7 e2 09 0f 31 ed b1 ff 7d 83 61 + +# Seed: +43 7f a1 51 f4 34 05 db 22 42 2c b3 5d 1c 57 61 +16 1c b9 a7 8a bc b6 f0 6d c4 e7 a8 69 48 1f 40 +b2 1a e1 d3 3e 07 5c 48 5c d8 50 1a 3c aa 60 18 +32 5b 7f 85 0d 4d 8f 6d cf d2 af fe 19 d3 e6 c7 +08 74 e7 10 11 14 f0 fb b9 82 25 81 ba e6 ba 2b +a1 e7 49 88 81 a5 dc 5b b8 85 27 38 a8 2f b0 6d +15 27 b4 33 44 87 b3 24 01 3e 32 bc f1 7b ab + +# Encryption: +22 6d 77 67 00 c5 e1 dd b9 99 4b 32 91 f1 d3 34 +b6 9d d8 63 06 5f a8 34 21 e0 1d 52 06 ec 2c db +89 90 cf 78 97 31 09 dc 9f 12 6b 60 33 d6 d5 d6 +91 8e c8 50 d6 9c 71 3c b5 bb e3 2e e5 9e 44 5b +cb 4e 50 c6 f1 64 43 4d 2a 6c a6 39 69 a2 9b 25 +03 64 15 b0 f7 cb 21 b4 f8 b3 4a 8d 9b 74 65 3f +ff 4f 5d b9 d1 a6 b5 15 2a 64 48 36 b6 8b 8e de +9d c5 a1 69 dc 60 dc 5f ac 46 8f 24 27 84 58 10 +62 + +# PKCS#1 v1.5 Encryption Example 12.13 +# ---------------------------------- + +# Message: +58 81 15 e5 37 09 eb 15 a3 37 4c 25 32 9e 88 38 +26 e3 21 3f 37 a1 b7 a6 5d e1 2d f2 31 72 f1 7f +a4 96 ff 49 2b 09 17 3b a0 c6 f5 8c 29 3d 47 f1 +48 + +# Seed: +07 81 85 e0 83 cb b0 6f e1 a7 49 74 35 15 f3 a0 +b4 b2 6f 85 3b 10 e5 68 e8 70 82 ce 44 41 2c a6 +7e 59 88 8c cc 0f 50 31 01 52 1a ca bf d9 8f b7 +b5 c1 1d 8a 94 1b a0 3c 49 5a a0 3e 13 52 2f 48 +7f 6e 16 16 be c2 07 2b 39 96 fa ee 29 + +# Encryption: +0e 7e 50 a7 b2 47 b0 29 7d ec 65 c9 52 3f 67 ca +b6 b5 2a 02 5f 53 32 0e 94 86 cd 20 74 10 ca dc +74 e4 b0 3f c0 6b be d5 98 b0 22 b6 3b 37 76 2a +65 fd 35 1c b2 72 7f 3d 80 35 a4 cd ba 9c 6a 31 +e4 ed 6b eb 4f ed 31 34 eb 63 df ce ab 4f 5f 24 +59 e5 9f ca 01 74 75 8a ab 37 53 b5 c1 93 c8 1e +11 49 0f 97 b6 22 b7 3f a7 3f 8e ae 7d a8 39 34 +84 b8 29 79 71 a3 e9 23 12 9c e4 35 7b 64 5c c6 +38 + +# PKCS#1 v1.5 Encryption Example 12.14 +# ---------------------------------- + +# Message: +20 f1 cf aa 63 67 c7 c3 9b 54 a0 + +# Seed: +4a 1c 7b 70 f7 83 ba 0d 5a 26 d4 64 5c f0 5f a6 +10 f5 be 01 77 fd de 9f 2c 34 50 57 db 42 44 57 +fa a4 30 c9 42 4a 54 f7 e5 5f cf ee 6f ae a4 24 +4c 03 97 74 81 ed fc bb 28 88 37 c6 a4 8d bd 72 +96 67 7a 24 e0 6c c9 d8 5e 68 8c 14 09 0f a2 83 +0f f4 96 79 33 ea f0 db 69 4b 6a e4 02 ca f9 c2 +be ff 04 a5 2a 2f 84 7f e4 0f 4f fb df 3d 58 b7 +c4 fd a8 + +# Encryption: +1e 52 84 20 bc bb a7 d5 9c 6c 40 d4 46 d1 aa 95 +6a ff 03 05 36 5b 4d 7c e9 81 0f 22 c3 4f 09 a5 +55 e5 ff be 51 75 03 7f 90 3e aa 6c 40 56 36 36 +d3 81 f4 53 25 b5 e6 1a 2c 70 51 12 55 64 02 a7 +dc be 86 cf a5 4a 6e 6a 50 37 8d 05 e2 1c 95 cc +6c 45 ff dd 05 17 f7 7a 36 b2 24 d1 70 0a 1f 3e +bb 81 d3 67 8a 66 e1 45 34 a8 0a 59 8b d7 17 26 +fe 32 2e 73 9c 17 eb a5 08 da 8a 03 1a 27 f6 bb +28 + +# PKCS#1 v1.5 Encryption Example 12.15 +# ---------------------------------- + +# Message: +73 60 cd b6 c1 59 96 b0 60 33 1e 9f 2a 36 89 95 +c0 64 ad da 56 55 95 27 78 2c 17 0c 69 1b b3 bd +3b + +# Seed: +58 dd 80 f4 fd c5 c9 5d d9 eb 56 ac 80 a0 2d 53 +e8 cc 2e fb 3c ba c6 72 7d 75 b1 e7 b3 5e 05 42 +19 43 3a f5 aa e1 98 fd 62 f2 ec d2 ab 8e 26 38 +77 b5 c9 1e d5 13 e2 35 49 7a 63 19 2d b9 a9 bc +b3 bc a9 7a e9 bf ce df 93 56 44 b2 d3 bc 20 e0 +2a e5 e7 42 4e 81 2a 29 49 61 6b 82 01 + +# Encryption: +20 3b cd e1 b4 12 e3 ce a2 5b 86 30 b2 08 f9 78 +ab 22 c1 da 81 25 07 6e 10 ff 91 d7 bc fa ef d7 +dc d8 39 16 55 c8 86 e8 a9 45 a7 f5 7a 74 ce 2d +c0 e8 ec 7f db 17 cf 19 57 80 d3 ce 80 e0 dd e7 +63 9c 67 72 05 b8 f9 ec ea 11 54 68 97 7b de a3 +50 0b 23 9f ce 0d 7a 94 be 6d e3 33 ea 7e cc 22 +c0 7e 65 d0 eb d6 5a 39 0a 18 5f 18 17 89 e7 ca +8c 1a c2 fc a8 28 bb 8d 28 22 7e 38 c9 88 9c e0 +08 + +# PKCS#1 v1.5 Encryption Example 12.16 +# ---------------------------------- + +# Message: +31 9b 82 94 bd f0 7c d4 06 85 e8 80 09 fa 7b 3f +12 90 16 0e f3 30 67 ad d5 ef 4d 80 fd + +# Seed: +4e 07 d7 f9 63 be 24 ee 6d 8b d4 dd 95 e9 e3 33 +49 30 e0 3e 65 8d 29 6b b7 95 48 6d 72 4e 07 41 +dd 50 73 47 a5 b5 7b 79 c9 0d 3c 90 c1 ae a7 16 +19 09 1a cc 81 98 b5 51 22 da 50 99 58 2e 0d b7 +da 3c bd 3c fd 85 29 8f 31 55 4e 29 cb cb a1 19 +9c e4 70 16 3c a0 33 7c c4 14 ad 32 76 70 81 11 +d6 + +# Encryption: +04 fc 7b b6 fb 64 19 61 2b 6e f5 4b 3c a0 0a 87 +46 51 95 c3 7f 7f 94 0c 23 3e cb 1d 4a 50 5d 3c +56 ed 23 e0 9e 03 f1 45 4f 04 b5 6f 6d a2 5d 0a +6f ca b0 c4 00 87 4a e9 80 6e e1 87 80 b7 5c 6c +a5 66 29 e5 77 e8 e7 b5 d2 fc 2c 44 0b 98 00 19 +5b 58 51 1b c3 a7 95 44 12 c8 f2 73 cc 0e 9d 97 +1a bb dd d7 02 8e 6f 84 87 6a 30 58 a4 54 fe 2f +33 c7 5e 3d d0 62 f1 19 cd 3e ca 81 06 b6 bf be +a4 + +# PKCS#1 v1.5 Encryption Example 12.17 +# ---------------------------------- + +# Message: +79 c6 82 a2 b9 79 fe 5c 96 32 af 18 31 c2 aa cf +0c 6b f5 66 88 5b f5 25 62 50 + +# Seed: +5c 2a 95 6d 4b 5f 06 f7 50 83 5a b8 b2 9c f7 c6 +41 d7 93 c5 56 e1 2a ab a9 56 df de 46 32 d5 e5 +02 d5 90 41 78 3a fd 1d a7 b2 e2 d2 4e 22 d6 44 +78 35 bf 6d 77 c6 ee bc 0d 2d 64 e7 ed 2c 14 17 +18 ad 86 87 c5 97 b7 71 8f 38 bf 1a 33 16 ed ef +f6 b7 2e 28 51 82 88 07 bc ff a9 b8 e1 a8 52 f3 +fa a8 07 f6 + +# Encryption: +25 1d 48 56 b7 a7 58 0d 53 88 01 62 28 1b b4 e4 +1b de b2 a8 7d db d5 ae 1b 30 7d 44 48 be 1f 11 +69 5f f7 22 c4 32 41 5d 0c 74 ba a3 fc 0d d5 11 +66 ac 86 5b 31 0c 4f 5c 87 07 98 62 54 c8 96 04 +cc da bc e6 c6 92 44 66 21 89 8b 4f 5a 08 bc df +64 62 e5 18 ee 3a eb 75 e2 6d 8f 63 a0 6f cb b3 +df 09 8c ee bb 0f d2 f6 37 e3 a7 93 7f 4d 19 e3 +a1 92 4c 16 08 2e dc 33 3c b6 de 37 63 72 46 e4 +98 + +# PKCS#1 v1.5 Encryption Example 12.18 +# ---------------------------------- + +# Message: +1e 0d 18 07 a2 bd 49 6b b0 cb a8 41 c7 71 58 bf +a5 f8 aa 77 d0 56 75 c6 4a 5e b1 85 65 91 d3 48 +54 f8 65 92 5b 37 1b 68 6a aa b4 45 98 b4 a1 6a +b6 b7 93 44 d3 c2 3f 7d 5b f1 73 b8 42 d7 8c + +# Seed: +db af a5 33 2f 0b 55 27 96 63 6d 8a 09 28 b7 d8 +7d 9c ee 3d 4b e6 a3 1c 77 e1 4e 0e 5d fd d4 03 +ef b9 8f a3 38 81 6e 12 62 c0 64 96 fd e9 d5 57 +c0 0c c0 dd 35 fc 33 ac cd 79 a3 15 06 90 eb + +# Encryption: +1b 2e ce a5 fa 90 03 fa b6 55 98 57 c6 d9 4f 95 +70 03 f4 e4 1c 09 45 64 80 4f e6 96 39 e5 40 b6 +8f 26 3f aa ec a1 99 69 7a 48 85 8b 8a 0f ce a4 +91 05 7d f2 fb 8b 35 d0 93 d8 94 ae c1 7c 5c de +5d fd 8f 33 51 2b cc 66 cd e7 6d a0 73 36 98 5a +97 43 5b 6e fe e4 ee 09 d3 a2 8a ff 34 ce 6a e8 +75 0d a4 1e 16 ca 47 e9 38 81 8e 44 a9 b4 1f e9 +1a 6a 80 1d 35 5e e8 d6 60 e2 7e 4f e2 ce 7f 32 +5b + +# PKCS#1 v1.5 Encryption Example 12.19 +# ---------------------------------- + +# Message: +1c 10 5d 5e be a3 66 46 a9 72 84 c1 7a 86 c4 + +# Seed: +c6 f8 03 40 a6 55 7e 07 53 a9 57 3f e4 f5 21 49 +77 ef db 08 2a 50 eb 5d 5c 51 7d 46 72 9f d2 a3 +4a f7 ce e1 aa 46 b7 9d 47 e2 5d 83 09 0a eb 4f +50 22 98 c0 31 37 24 fa b5 4e 54 be bb 48 d6 cd +9b eb dd cb ee 0f 07 53 77 27 d6 5c 50 e7 d4 cc +0c 6d 19 fc 48 0b a5 78 67 26 2c f2 ee dd 9c fa +ba 60 7d 65 82 87 eb a4 2b 46 99 44 cc b6 12 + +# Encryption: +05 b2 3d c0 c6 2d 90 c1 77 1e ba 37 8e 43 17 9d +7c a6 af 51 5e 26 19 ae 4d 7c 8f c8 bd a3 78 cb +f7 a1 db ba 1a 14 f4 94 c4 e0 d7 13 38 79 7c 7e +e0 6e 1a 79 e9 ff 28 56 fb f7 4f e6 f1 a7 ca 6e +5b 9c a2 83 c4 c9 7e 61 cf 9f 40 73 e0 32 ca 27 +d6 9b 1b 4e eb ea 77 cc 95 a9 28 1f 26 b6 4a 05 +a9 39 44 c8 2c 5a 13 42 8e ce 21 fb 44 01 ad 42 +6e 7a c1 f0 5b ff 84 b3 47 cd c4 db e5 2e 67 8a +ed + +# PKCS#1 v1.5 Encryption Example 12.20 +# ---------------------------------- + +# Message: +f1 04 02 f0 02 05 c5 27 57 ed 6e 9d + +# Seed: +e2 ae e7 fc f4 3c ed e0 75 52 a2 df e5 b5 a9 ef +80 82 76 d8 f1 0e b3 f9 bc 50 f1 bd 94 0a aa e6 +34 c9 d8 a0 78 8d 44 d4 1e 8a 5c 60 36 49 ef ea +83 03 32 31 51 6c 69 d3 3e 12 f1 f5 d3 f0 ac 1f +c2 3a 9b 3f 5d a4 e0 ef 6e 45 50 cb 43 fd ff 02 +b2 5d ac 86 27 2d 66 db 59 cd d6 35 f9 c0 dd 0d +aa 08 57 91 0c 15 88 1b 16 0d 70 ea 53 40 5a a9 +59 f4 + +# Encryption: +0b 96 56 31 78 32 a9 40 c7 95 bb a5 8d aa 15 9a +4f 73 3e 82 6c e5 5a 4e c5 64 33 c5 16 84 44 4c +78 e2 e2 fc b3 7f 85 ad 87 79 16 52 2d 8a 35 a4 +3f 53 c5 95 17 a8 18 e5 21 e1 98 2a 50 91 bf 2c +68 b0 0e e4 9a bd 90 dd 77 6c 02 f6 4f 34 f6 80 +a8 8e ee 05 ec 08 88 92 bc 0a 95 55 b3 f2 0c 8b +ee 57 9c 0d dd e1 51 1a 18 af 98 bc 1d 9c f9 0b +81 bf 13 2a bd 58 97 0b 3e 84 d8 14 e2 7d 02 5b +73 + +# ============================================= + +# Example 13: A 1031-bit RSA key pair +# --------------------------------------------------- + + +# Public key +# ---------- + +# Modulus: +55 5d c2 ba f0 41 b7 f0 9a 04 78 42 3a eb cb 5f +49 b9 5d be 15 70 e9 a5 42 12 8d 33 22 87 86 6a +c4 cc 63 e7 6f 8e 3a ef 22 c9 75 3a 54 51 99 94 +24 52 41 8a 67 d1 a2 23 0d db 6f 42 22 c6 63 d3 +8e 80 05 0e eb 67 95 6e c5 f5 49 94 a0 be a6 95 +fa 59 fa df 2d cf e7 ac b5 4e d9 da 3d 0b eb 12 +2c 8a 69 1b 0b b5 1a e6 5a 77 4d 75 b1 b3 49 cb +68 c5 17 cb d3 86 ae 48 2f 05 ee 46 03 ec f2 95 +5d + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +55 5d c2 ba f0 41 b7 f0 9a 04 78 42 3a eb cb 5f +49 b9 5d be 15 70 e9 a5 42 12 8d 33 22 87 86 6a +c4 cc 63 e7 6f 8e 3a ef 22 c9 75 3a 54 51 99 94 +24 52 41 8a 67 d1 a2 23 0d db 6f 42 22 c6 63 d3 +8e 80 05 0e eb 67 95 6e c5 f5 49 94 a0 be a6 95 +fa 59 fa df 2d cf e7 ac b5 4e d9 da 3d 0b eb 12 +2c 8a 69 1b 0b b5 1a e6 5a 77 4d 75 b1 b3 49 cb +68 c5 17 cb d3 86 ae 48 2f 05 ee 46 03 ec f2 95 +5d + +# Public exponent: +01 00 01 + +# Exponent: +05 97 87 bb 01 23 fc ed 98 d9 34 1b 7a 8a 99 9e +db 50 76 30 8e 6d 00 11 20 3b e0 dd f9 a4 11 0d +0b 69 2c 1e 2b f3 90 2e bc 03 a0 57 3a d0 c1 93 +af b1 67 b3 ae 4b 50 28 a5 ae bb 22 04 ef 23 f8 +e5 83 60 be 94 84 95 1e 34 71 11 76 06 2e 53 e3 +f6 38 74 fc 9e 35 91 a9 d9 06 8a a5 e6 c8 c7 a9 +ab 08 e9 79 24 70 06 6d 71 a0 7c 34 33 dd 70 3a +42 a6 b3 a9 b1 bf fb 31 49 49 8d cf f8 b3 57 56 +ed + +# Prime 1: +0a 7d bd 7e e6 de f3 87 5b 4c 55 9f 56 69 30 7d +17 6b c1 25 b0 9f 5e b8 26 01 b8 13 48 57 6c 1c +a7 dc f4 c2 bd 7f 2b 42 a2 c5 46 00 02 fc e0 a9 +a2 1d ac 5a 97 97 db 23 3d 9d 4a 92 93 ad d3 df +73 + +# Prime 2: +08 23 0f cf 26 fd c5 75 11 9c f9 05 78 d3 66 56 +4c fd a8 65 a2 82 0f 38 bc d6 3e ca a0 95 57 65 +77 2a 88 32 fb 31 69 7f d0 dd 45 bb ec c0 4d d6 +a5 9e c1 1c 1d 5c 6e 87 7c 6b 9d 77 c6 a2 76 e3 +ef + +# Prime exponent 1: +08 d1 c7 d9 c4 d0 2c bd df 7c 7e 86 62 a8 2f 41 +19 cd 56 24 0f 25 0b 05 97 bd de 37 27 9b 86 a1 +58 64 a1 c6 8c 73 39 b4 dd 0d 26 59 a0 29 61 dc +79 12 a4 ef cb 7c b7 96 1a 97 fe 36 d6 bb 4c e0 +0d + +# Prime exponent 2: +01 d4 91 3b d1 d3 87 d5 3b af 09 bd 17 5e c6 48 +67 6d 2f b2 1d 0a 10 8e 7c bb dc c8 0b b3 4c 43 +80 b8 ca 86 5d 46 d2 2a 74 3b 31 f2 81 e1 08 21 +5e 84 05 80 63 82 65 42 88 d4 54 49 9b 1e f4 8b +75 + +# Coefficient: +08 7b 2e f2 11 44 8e 5c 96 1c 9f 6d fe e6 aa 26 +8e e8 97 7e 31 1c 07 cc 8d b4 72 da 6c 49 86 3f +aa f3 3b f5 05 dc fd 81 f5 3a 53 be 12 1e 44 5e +89 d7 e0 38 ef 27 f3 72 7b 51 2a 2b 80 94 41 20 +ea + +# PKCS#1 v1.5 encryption of 20 random messages with random seeds +# --------------------------------------------------------------------------- + +# PKCS#1 v1.5 Encryption Example 13.1 +# ---------------------------------- + +# Message: +7b c8 1d 81 46 e3 59 + +# Seed: +76 65 5e 4a d8 fb 99 34 d1 84 7c c9 0c 02 47 3c +57 2b 5f df d1 64 a9 70 a3 cd 96 bc 8c d7 96 ac +80 2c 50 28 22 90 ea d4 c7 7a a5 cc 2a 7e 34 34 +18 c9 df 47 ef b8 87 86 af 4c c8 d1 82 1c 50 07 +39 09 e8 4f 7b 45 1a f4 a3 2a ee 6c 7c c8 97 ee +f7 66 0e 1c 4c 53 5d 10 03 9d 3a a2 03 5c 98 51 +01 25 ec 5f 2a 2e 9d ac 63 95 89 ff 8b b3 9f 07 +43 8d ef b7 d1 33 77 + +# Encryption: +14 6d 65 12 df df fb c0 2d 5d 54 bf f3 e0 36 a3 +5b 4c 2a a9 44 d6 f6 72 47 93 30 65 37 08 1b d1 +1e e5 68 a4 e9 71 9f 1e 31 f2 d1 4e 18 c2 da 62 +44 70 c5 b0 ff ab 39 7f 92 31 b6 ef 46 34 f6 3a +18 28 5d f3 41 45 17 a5 1f 93 58 6d 66 b0 3c ab +1e 78 a4 eb 94 1b 9d 3d 7f 92 03 b5 9e 1c b3 bb +48 64 b6 46 dc 17 a0 64 11 eb d5 ff 03 37 20 58 +88 1b 4a 24 b2 4f 4c 2d cd 5c b4 4c 2e ea be 6f +72 + +# PKCS#1 v1.5 Encryption Example 13.2 +# ---------------------------------- + +# Message: +68 6a 81 0a 03 1d 80 61 e4 1a 77 6a 7d fb db 3a +f6 26 fe 97 69 de ee a4 60 ba 28 67 ac f0 3d 9f +92 4d 32 1e 8a 8f 42 5c 28 51 92 98 67 a3 26 ae +27 5b 49 d2 + +# Seed: +f7 9b 49 f6 a6 be 3e 68 88 4c 80 df e1 e8 50 1e +54 4c a7 82 23 88 43 d4 19 76 41 12 25 0e dc 1b +69 c7 d1 c3 58 7f dc 75 98 7c 62 cb 4c 33 bb 81 +20 2f 72 db a7 ee e2 4b fc f8 9d 4d ae 15 0c 07 +27 24 58 fb 01 b6 cd 27 09 25 + +# Encryption: +08 8a 47 f1 1c b1 34 de c4 b5 08 77 25 e8 a5 bd +04 f7 fe 58 2a 69 91 4f 68 3e e6 de 7c 32 4f ed +7e 07 f5 70 05 c0 e0 df 75 00 e3 70 a4 2e fd 6f +e5 b2 90 19 95 19 b1 98 06 b6 e6 91 69 8a fd 95 +17 d7 80 da 0b eb f7 0a 26 d6 5c 5b 64 e3 40 a6 +40 5e 88 95 55 df a0 a9 2c 42 9a e9 c3 ec 88 e8 +88 ee da 04 5e 41 0e 3a 9e 61 99 ab 39 eb 1a c8 +64 e2 28 c2 cc 1b 64 e3 36 16 95 b5 aa 11 3d c5 +a7 + +# PKCS#1 v1.5 Encryption Example 13.3 +# ---------------------------------- + +# Message: +18 54 4a ad 24 ab 07 5d 3a + +# Seed: +23 20 4b 8a d9 45 75 f6 e2 f4 6c 79 7b b8 73 aa +3f 46 1a cd 05 e7 db 78 46 a2 31 57 59 2d 52 e9 +a9 a7 04 38 19 c4 88 96 27 5e d9 df 0b 1e 54 04 +93 c0 77 ea 15 41 9a fa 87 dc 35 f9 fd f7 ab 8a +af 47 ee e1 d3 3e cc 28 95 06 45 f1 b6 91 38 2d +87 54 1e d0 64 06 93 0c 7e e1 10 9a a5 ca 75 a4 +90 93 4e a8 d3 b2 a0 4b a1 52 1b e0 92 c8 68 f7 +ea 5b e3 78 ea + +# Encryption: +34 d6 e5 46 d6 9e 27 06 cd fc 6d 9e 74 18 f8 be +03 e4 57 56 a8 b1 9b 60 c2 1d 27 34 20 aa 7d 5e +bb bf 46 0e f4 c8 4f 6d 47 77 e6 bf 20 3f f9 18 +5f d5 7d c7 23 b5 8f 35 c1 e9 b5 ff f4 7c f9 5a +e5 69 a5 cb 64 dd 9c b8 d6 40 7c 0b a5 ef d1 48 +f1 8b 56 96 b0 47 da aa a2 77 ed 8d 45 28 61 4e +e3 da 52 38 71 32 b7 a9 cc fe 07 3b e5 03 32 c9 +e2 83 73 53 c6 7d aa 0f df ef c3 b6 52 cf 7d 79 +fd + +# PKCS#1 v1.5 Encryption Example 13.4 +# ---------------------------------- + +# Message: +d9 0f a3 8f + +# Seed: +3e 09 f6 50 6f 7f 71 91 47 ae 21 e3 94 53 ae 0b +41 60 98 da 10 3a f8 4c 0f 7c ef ae 50 01 99 c9 +85 59 67 a8 30 0a 1a 7f 8d 2c c1 3b 91 72 7e eb +d9 3c f7 7d 3f ac b1 9e 83 a8 40 eb 58 3b ce a6 +c6 11 3a 9c 6f 6f 1f b5 a0 b3 32 55 9a 6b 43 15 +47 45 7c da 1d 3d ce e3 41 d1 71 c6 2e 95 e7 ea +ae 16 ae 0e af 1c 1f e8 10 fb b0 b7 13 8c fa 3d +66 c6 38 50 f3 81 e4 9a 2d ad + +# Encryption: +27 13 3f 43 79 1b 39 22 7c 8e 95 4e 1c aa 83 0f +a6 59 95 f8 a9 f8 8e 0d 1f 75 67 85 ed 5c 8c 78 +54 fb 1a 9d c4 a9 5f a4 4d bd f0 f2 85 99 c4 72 +84 93 79 75 0a 6a 1b cb 42 ca fb 5b bf e0 8c 65 +10 6d c8 40 cb ec 8e e2 cb 5a 20 6c 81 18 aa 06 +1d a4 d2 1d 1b 5c 46 11 7f 77 c8 96 bc 71 ce e2 +f8 75 7a ff 5c b2 b3 c3 47 74 55 8e 8b 82 ed b4 +ef 9b f2 d4 f2 ca 4f c5 97 fa b4 0a 2d 74 e5 23 +3a + +# PKCS#1 v1.5 Encryption Example 13.5 +# ---------------------------------- + +# Message: +fc bd d0 24 8d f8 57 af 17 5b 43 96 87 5c 00 6d +51 14 cc 11 16 42 80 04 38 08 aa 79 88 6c 4c aa +29 11 7b f3 ce 45 a9 be 55 07 c6 b8 bf 0d 30 + +# Seed: +2c 9d 14 57 ba 44 50 df 40 21 e4 e5 11 83 f7 95 +d0 91 c0 7f 6a e0 dd 96 2d 57 28 c5 4b 7f c3 c7 +72 d7 9d 7b ec e1 bb 0c 99 6c 9a c0 7f 99 54 dd +a7 68 7b ec 86 bc db 31 40 b2 45 bb 5e 01 27 5b +38 d1 f2 52 33 5e 36 c6 8c 0e 58 f4 ce 11 7e + +# Encryption: +2c ed de f2 02 69 1a ae 42 71 85 2a 89 83 de 7c +21 4c ee 00 db e1 a1 58 84 f4 c3 c1 de 7a 3e a0 +1e cc f4 7a e8 6c 26 93 24 ae 52 37 73 37 b6 ca +82 e8 5d 55 3f bb 2e e5 f9 77 dc 66 4e 14 2f 1b +54 53 8f af 85 ca c2 7c 29 f2 ed 0c 40 42 67 33 +5d 48 ea 40 e8 a3 dd d8 96 bb b3 e0 ed f0 e1 6f +9e 89 44 68 3b 8c fb aa b5 ea f2 25 30 f1 58 c4 +88 0b c3 e4 60 c0 6a 24 03 42 21 0a a8 7b 79 09 +68 + +# PKCS#1 v1.5 Encryption Example 13.6 +# ---------------------------------- + +# Message: +25 f2 a3 06 ea be 6e 3a 18 30 dc 93 6b fa 41 cd +eb b8 80 05 17 5d f4 a3 c9 c4 64 23 01 45 61 11 +5a a8 + +# Seed: +cb 8e 0f f4 1b ab 01 a1 42 f9 6e 7d 7c d3 92 82 +0a 82 a1 73 66 74 b9 21 35 ef 33 08 96 88 dd 30 +b2 c2 f7 ba 11 1a f7 8d 3f 76 a3 7f 66 7d b3 97 +5f ce 64 ec 9a fb 09 68 50 7f 7b 31 09 7e aa e4 +88 1b 36 24 06 56 16 ca 09 0c 20 4c 1f a4 be 13 +48 50 ea 5e 90 fe cd c8 45 b9 d8 39 + +# Encryption: +4c 7a c8 12 45 e7 d4 de 3c 4d bf b3 15 c4 68 34 +1c bf 22 87 57 35 c5 f8 05 90 50 58 53 06 8d 6b +e7 03 9b 1c ee 6d 07 ec b7 66 9c 42 f6 b9 2f 2a +71 f6 45 f7 2c ba ff 76 34 16 37 d2 f1 d6 b1 fe +ce b0 7f 21 e1 4c 70 fb 77 bc 7f 87 b0 31 c2 c8 +f2 ad a4 ec 43 e9 12 68 2c 2f 49 63 9e 75 71 57 +18 77 fc 48 1c bf 26 98 b3 73 15 bd 4b 93 07 83 +f4 79 45 64 2b 7d 81 5e 04 32 d4 5d d1 d0 d3 b2 +a5 + +# PKCS#1 v1.5 Encryption Example 13.7 +# ---------------------------------- + +# Message: +a0 da ab 4f 9f e0 4a 2a 51 bf 08 32 70 11 5d 0d +06 dc 29 21 cf 8d d1 3f 5c ff 26 04 bc 55 1e fd +98 3d 9b 25 b7 27 4f 3c cb 0a dc c1 1b 1a 39 54 +ab 9d b4 + +# Seed: +c8 1d 1c 02 f0 6e 7f fd 6e 03 b8 1b 71 93 aa bd +ac 56 63 ab 14 25 a6 7d 1a 29 50 88 5f 5d 1c 4b +72 5e 20 9d cb ce 9f 7b f2 96 75 23 42 f1 84 fe +a0 6a 7d 6c b2 bd 39 b2 a3 18 07 51 64 a2 e7 61 +b7 02 70 2b 01 92 46 c1 e5 0e 6e + +# Encryption: +06 c0 6c 97 5f c6 b9 c2 60 d3 d8 81 3b 57 14 24 +8b eb 39 9b 7d 68 fc ac 25 03 38 ca c5 4c 40 72 +95 9f 62 03 84 44 e9 e6 66 ba b5 f9 36 06 70 47 +bc af 4b a4 ed 68 c6 c8 18 57 46 29 32 56 e7 c7 +24 16 65 81 54 de c0 67 f4 25 0d c6 b2 9b ba c1 +8e 82 1e 49 a4 c9 b1 63 83 1f 7b b3 83 92 32 6c +6b 46 85 46 4f e4 f0 26 c9 ae 4d bc 58 49 47 7b +4c 26 0a a4 ac 02 d2 1a 26 40 20 f1 0c a1 1b 4b +0e + +# PKCS#1 v1.5 Encryption Example 13.8 +# ---------------------------------- + +# Message: +74 3c dd b3 61 c0 bb 32 47 64 95 ad 5d c6 3a 2b +ce 5f ba c1 c8 c2 03 93 69 32 67 d8 43 f2 8b 8c +f3 ea 13 e3 74 e0 9d 0a a3 f7 ae 5d 8f 72 d8 e6 +cb 9d bd + +# Seed: +f7 2e d2 d0 69 b8 ae 50 27 04 6e 03 27 b9 87 84 +58 09 b4 e8 16 c8 86 58 24 fc 4a 23 01 b4 56 80 +2b 18 9c bb 43 f0 48 32 ac 25 c8 48 d7 4f be 1d +62 5a a9 8a e0 5e b6 25 47 76 1c 78 b8 17 61 c3 +03 f9 3d f3 fc 0f ea 3c 5a 7b b1 + +# Encryption: +38 3e bb f1 59 e1 d0 a2 1c 74 eb 61 e3 64 3c b6 +31 be 18 c7 a2 a5 4e 24 89 33 58 7d 34 5e 99 52 +72 46 6d c1 bd 61 3a dd b4 cd 7b a5 01 92 fc 2d +89 4d 7f da f7 83 63 b0 79 d9 98 01 9f 16 42 31 +cc 2d 75 2d b7 6a 9f 9d 0c 52 04 bf b0 f9 93 05 +53 09 6b 5b 76 80 b0 89 4f b9 9c 11 42 5c 67 d6 +5d 96 5e 35 12 8e 15 47 46 b3 fe d8 d0 16 99 30 +70 a7 0e 07 eb eb e0 6f 2f 4e 97 6c 9a 63 fb e3 +20 + +# PKCS#1 v1.5 Encryption Example 13.9 +# ---------------------------------- + +# Message: +e5 31 92 fe bc d3 69 58 bd 08 03 f2 ea 0a fd bf +df 99 3b 58 a9 e4 ee 70 df 95 b0 6d 4e 7d 74 b6 +74 5b 87 f5 81 f3 42 f8 ae f9 ae 4c 31 82 c4 19 +9b 65 51 fe 18 f8 d3 b9 ff e4 + +# Seed: +ad 98 2f a7 29 f2 7f ce 8a 67 49 03 ec ac 69 4d +d3 34 13 c7 8e 34 28 ae ed 46 9f 84 d9 57 5c 6d +a2 75 29 f2 c1 4b 53 b7 58 d2 0f b6 b2 47 c8 29 +c5 fb 1a 16 af 55 07 9a 70 73 cc a0 56 25 96 2b +6d 1a 6b ef + +# Encryption: +22 1d 88 a8 6c 9e d3 7a a0 9c f5 72 54 97 82 e5 +8c a8 d4 85 1f 01 6a cf 28 9e e8 bf 23 79 0b 1a +8f 14 8c 16 55 08 bc 3f db 1e f9 c9 01 16 27 42 +7c 5f 32 e5 ca b8 50 cb 6b c0 bc 04 a1 1d a2 f0 +18 13 f3 41 41 7b 3e 63 2b ca e0 02 97 7d 64 ff +c9 62 c7 fa 75 72 f5 6d 26 17 e2 a5 2d 3e f9 17 +c4 4a 33 b7 15 82 af f1 39 0b 7c 77 4d 60 7c 8d +57 8f 7b c9 0b 35 80 d7 7b 03 73 19 14 77 bc 14 +26 + +# PKCS#1 v1.5 Encryption Example 13.10 +# ---------------------------------- + +# Message: +d0 eb 48 0e 27 45 77 9c 8a 30 fe 82 0a ef 56 d4 +ce 39 ef 84 ea 40 c7 df 0c + +# Seed: +46 5f 91 e3 f0 7c b7 22 83 bc 2b be 52 8b 9a b3 +68 16 54 fe 20 b6 1a 33 f1 23 ad e5 2e 83 2f fa +8a 1b 74 a4 44 3c c8 92 95 a2 1a 2a ac 98 74 da +0a 56 79 d1 8c b5 c4 cd 69 0b d0 a2 0c bd 9e 9a +a0 72 aa 87 13 44 8f 95 e5 d6 a6 e6 24 d5 b9 08 +5c fc ec b7 99 2f 10 ea 2d a6 d6 26 eb e5 43 d8 +70 22 36 ee 6c + +# Encryption: +06 f3 f8 c7 0d 0f c4 e7 44 73 e6 8f d2 3c c9 df +1e dd 42 35 b4 28 b7 72 a0 83 b4 1c 34 51 62 5a +6f 15 de a4 bf 31 3b f4 f0 3f dc 4f e9 f6 a2 07 +1a c6 9a a3 f0 fc 41 57 ef c6 21 f9 59 40 61 f6 +c1 98 06 bd 5d 75 9a d0 23 ca d1 48 e4 47 d2 59 +b6 2b f7 34 25 91 be 83 ba ec 77 71 4c fe 2b 90 +1f 36 9a ea 68 02 48 ba bf 06 87 10 cb b9 70 48 +4f 32 4a 23 52 53 a3 1e 02 25 34 ab ec 7b 39 96 +06 + +# PKCS#1 v1.5 Encryption Example 13.11 +# ---------------------------------- + +# Message: +1c 42 97 f6 df c0 7f fe 57 59 aa 1e aa 5b 79 37 +8a fc dd 1a 9a 33 a2 13 3a 39 ac + +# Seed: +a7 af 2a 86 01 e4 08 c3 18 fd 1e 0f 82 44 5b 50 +95 44 d5 ec 97 a7 95 8f 59 4b 20 54 c5 09 f7 ef +fd d4 16 30 6b 2b 2c 91 b5 a6 37 a1 56 82 0d 60 +1a 23 ff db 31 fb 35 d3 05 aa 93 74 57 8e ef b8 +10 2e 8b 72 44 19 1f 4e c7 4a a2 6a 0b 7d b3 6c +ab 44 99 9c 81 b3 61 57 01 6b 55 89 06 e5 d7 08 +8d 51 32 + +# Encryption: +3c df 2d c6 7a 4a a5 31 cf a1 42 80 08 bd 05 44 +ab bd 03 29 22 dc c2 43 6d a0 b5 d7 ef 9a 70 17 +e6 19 3a 8b af 38 c5 8e 91 96 2d 65 a3 75 f0 8c +1d 55 57 9c f9 4a 79 5c 9c 70 b6 e4 2e 16 43 ce +f5 40 dc e1 e9 86 dd 99 88 87 b6 95 52 44 4b 6d +e9 3b a7 d5 f7 64 83 54 bf cb 70 21 39 ed 39 54 +94 7d 7b 18 0b 6c 02 bc ad 82 43 a0 ab 27 ca 66 +52 76 29 1b 46 cc 31 8d a9 b5 f6 0a 04 af fe bc +b0 + +# PKCS#1 v1.5 Encryption Example 13.12 +# ---------------------------------- + +# Message: +00 92 7f ca 7f 5e c7 6f 54 8d d4 82 63 e3 39 be + +# Seed: +de bc 2c 1f 22 d9 32 ff cb 89 7c f1 0a e6 2c 3e +05 1e 3f 78 46 3a e6 7d 95 61 cf 1a 73 d5 5c 4b +14 ac a6 c2 1d 83 ba f9 76 cd 8b f2 46 c2 29 78 +61 a6 b1 e9 c9 ef 30 81 c5 1c 4b 68 7c 67 b5 dd +0f e0 f7 55 3f 73 8c 2c 8a 5f 81 d1 26 8a 0c 2d +4a 46 1d 63 5b 0e 59 d2 3b a4 17 ab b8 04 5e 9c +10 d6 6b 0e c8 92 f9 53 c6 f2 11 f0 2f f0 + +# Encryption: +49 b9 20 89 b5 2a b7 8c 33 b5 bb 30 32 cf 70 24 +94 4a c6 8e 13 9d 2d 56 06 8c 7a 26 2a 53 e7 80 +9f b5 b0 15 65 cc 65 61 d7 13 30 46 87 52 30 ac +21 75 64 72 96 cf 2b 48 47 e1 2b 73 63 19 72 53 +21 be a2 64 75 7d e0 eb 49 88 72 d8 9a 4d 7c e4 +a1 bd b7 33 5d ae a7 8b a1 96 fd 50 d9 03 82 e6 +d6 2f 8d f7 ae 68 5a 1d fc 84 9e 11 99 7d ee 88 +60 d1 0f 70 7b 0d 35 36 5a 81 24 30 73 1e 7a 50 +8d + +# PKCS#1 v1.5 Encryption Example 13.13 +# ---------------------------------- + +# Message: +8b 6d f2 d6 da 63 1a c8 d5 55 6a 26 97 54 28 fc +4d 20 ef 5b 4a 1f 06 8e d2 e5 + +# Seed: +ff 2c 06 98 85 2d 1b 0a e3 c5 c5 c9 be 26 e8 3c +90 44 84 2c 16 07 f5 f4 08 6a 6d 6c f1 08 ad ca +61 ea f6 65 40 0d 7c ff 2a 3a da df af d8 0c 64 +95 6d a2 d7 d7 c1 35 ab f5 a0 d1 76 06 25 56 eb +4d 8b 75 b9 5c d1 1e a9 c0 44 2f 84 6f 03 7d a8 +77 29 02 bf fc de 65 59 e1 b5 9e 60 c6 d0 f9 89 +6b a5 c3 c4 + +# Encryption: +41 52 76 69 80 33 39 eb d8 f2 d1 cc 18 6c 7e 8e +bb 80 cf 4b 94 9d 8a 28 43 65 32 9f 3c e4 6e bd +ac 0a 96 9f 67 61 90 0c fe 34 2b c8 4c 7d 69 51 +ac cf 45 28 0b af 24 a0 cb b2 42 a9 42 18 ef 9f +d3 71 b1 e0 08 24 62 62 07 0b f5 54 ed 57 00 7b +97 39 79 16 35 86 1d 86 c6 5b 1a 82 56 f4 25 f9 +f3 ae 51 9e 1b 1b dc 58 75 b8 78 dd cf c1 47 0f +ee f2 ae eb 01 4b 7e 33 ef b9 f4 dd 07 83 d1 71 +23 + +# PKCS#1 v1.5 Encryption Example 13.14 +# ---------------------------------- + +# Message: +ea 03 96 69 bc d7 a8 cd ce ab 58 55 91 b5 63 61 +e9 0b da 0e a4 40 10 49 64 e8 89 ec e1 8a eb 04 +ce 0a b5 b1 cc b2 30 ae 03 25 5a 39 + +# Seed: +20 4f ae b3 13 96 5c c1 a1 8f af 10 39 fd de 68 +1b c4 3b 22 3e 28 bc 47 1c 50 42 3d a0 bd 79 7d +6a 8c 73 8c 54 03 3c 8e 55 9e a2 d1 0c 3b 79 b8 +0e 2e fd ec fe 89 1c ea 2e cb 34 51 a1 a8 e2 ec +2f 44 7b 79 8d 7d e5 64 1b da 4a a9 90 b3 01 e1 +dd e7 + +# Encryption: +4c a1 c8 5c e3 c6 20 d4 29 91 cf 41 73 3e ad 26 +a0 93 11 18 5f ff e5 8f 41 28 8f 6d 0b b6 84 5b +2d 5a cf 1a a0 6c 78 d7 1f 76 93 96 a9 43 42 03 +e3 8b b0 1f d8 8e b2 3e 6b c5 1b a0 c5 f3 ee b3 +27 13 ca d4 d0 87 80 50 61 ab 47 3a 15 67 e7 9b +bf 4e ae 49 36 f1 8d 02 05 b3 74 6a 17 e0 64 8c +52 22 3d d9 f9 99 72 81 b5 35 ab 2f b3 cf f0 3c +a8 90 f7 10 aa 88 fd 2d 0f 39 2f f4 a8 8d 31 1a +a1 + +# PKCS#1 v1.5 Encryption Example 13.15 +# ---------------------------------- + +# Message: +0f 46 2b eb c6 + +# Seed: +4e ae 5d 54 92 d9 44 ff db 04 2a d9 50 16 81 ad +b3 eb 6a b5 28 b6 e8 13 53 55 b6 23 ab 55 a7 40 +87 b1 9f c5 9b 85 34 da 9a 88 da 29 f6 6f 71 f9 +45 2a ed e0 e3 e9 39 07 70 9c 34 49 56 72 85 74 +b6 6f b9 a6 f3 38 3d 58 a0 13 6f 94 c4 ed 86 ca +9d d3 8b ff 07 0f cc 2d ef 29 bd d6 fc 98 59 70 +96 7f 02 fd 6f 93 01 cd 56 d0 48 a4 42 d7 02 40 +9a 98 a1 32 ab 6b ed d4 fe + +# Encryption: +29 36 9e b0 0a 3f 87 84 38 c9 38 f9 d7 bd a3 85 +6c 45 a6 d7 7c 17 88 51 1b 98 2c 58 f6 3d be a3 +3e 63 ae 1d 45 c2 df 6b a8 0f 0d e9 97 59 2e 1f +8a 3b 3a 09 ed 76 06 51 45 3e 10 99 78 cf de 3a +60 0a 74 fa a8 a9 1b 7c 72 4f 97 3c b8 0b 96 83 +5f 05 0b 7d c0 9d 2f 15 74 76 c5 b7 05 1f 94 d9 +c0 f3 17 e1 f1 88 e3 09 80 79 5b 09 6c f9 bb ce +b5 63 6b 3d b9 87 05 4a 56 08 75 22 75 96 29 97 +e7 + +# PKCS#1 v1.5 Encryption Example 13.16 +# ---------------------------------- + +# Message: +51 4d 3b 38 00 22 b3 78 2e 8a 77 d7 7b f2 4a fd +f9 2f 33 97 47 4d ae 0d 4b d6 e4 fa 31 ca 60 83 +df 49 6b 36 62 6e 7f 8e 1c 91 9f 9f 2e + +# Seed: +d4 d3 a9 e8 fb eb 1d c6 07 b4 dd 78 87 ba 25 c3 +d0 bd 81 34 84 bd 53 76 dc 83 ef b5 8e c5 b2 56 +2c b4 4f 98 5e 59 f5 0b 9a de 3c 66 71 6c c6 f4 +2e 51 c6 0a 2f 4d 8d 75 bf b9 b8 24 10 5d 1e e1 +58 35 f5 f5 f2 54 fc 6f 68 0e ee 0b 85 af 54 7c +17 + +# Encryption: +19 fb 39 1a 31 00 87 bc 3d 08 79 1f d5 99 94 be +80 12 df fd 76 a0 2a db d4 79 cc 0c 15 56 60 5d +4d a2 a3 46 1c 7c 71 a8 5e d8 cf 85 e0 8f 45 da +de 51 8c 00 af 09 f4 93 ee 8a 55 46 ff be fb 05 +3c ca 2e ef 06 84 76 3c f7 80 f2 e0 97 bd 8e 5c +2e a8 4c b1 a8 b8 f8 49 6c c9 18 16 7f 65 6c dc +9e 1d 3b 2a 23 38 b6 4c 61 e9 0e cc 27 4a 12 10 +e3 db 57 83 ae 3c 00 ab d3 74 8a 81 0f d9 14 91 +14 + +# PKCS#1 v1.5 Encryption Example 13.17 +# ---------------------------------- + +# Message: +fb a1 63 17 b0 93 08 3e 37 20 aa 06 48 17 e7 4c +a7 51 a5 17 87 4b 69 26 50 c4 14 7f 11 9f 68 90 +70 2c f8 b1 4f 0c 18 82 21 2d 72 40 6c 3a 45 d7 +d9 ff a4 31 24 10 a6 + +# Seed: +9c c9 a4 bf 8c c2 75 a6 b9 b1 35 10 31 91 10 91 +7a d8 53 24 c5 a4 34 5e 58 f1 fa 47 27 5e e5 92 +15 69 dc bc bd 72 36 70 cf 4a 24 eb cd 57 f5 7e +99 8c 4b bd 4a 95 67 9d 60 ba a0 ab e8 79 66 8a +2c b6 ed 0f b9 4e 4a + +# Encryption: +4c 41 b9 cb cc 6f a8 7f 23 f1 7a 36 d0 51 e7 78 +0a 07 06 56 ca e7 be ba 14 fa 91 c5 55 b8 58 8e +88 09 e7 d3 35 4e 7e f5 e0 fa ef e1 cf 39 2e 6f +da d4 04 4a ef 08 e3 3e 6f c2 01 c5 47 fd bd f7 +c7 3d 3b e0 96 ed 25 3f 9d f4 af 52 e1 3b 9a 19 +25 aa 73 93 a6 42 95 30 20 92 01 e5 5b 20 e5 1d +50 05 d0 6b 58 35 3b fa fc ee c3 7d 60 e1 ca 0d +9d dd d8 68 0b d0 a5 d6 92 e7 4f 2d bd fc e2 66 +02 + +# PKCS#1 v1.5 Encryption Example 13.18 +# ---------------------------------- + +# Message: +5f fe 82 e0 33 54 42 45 b8 49 62 d3 92 7c 2f a5 +99 72 ef 59 c2 37 a3 86 a5 1b d0 ba 1f 2c 1f 8e +45 b4 6a 05 ad 97 db 49 d3 ac c6 34 4f 1e da df +65 64 c2 8c e1 + +# Seed: +cc 23 59 bf d0 d5 7b ce bf 07 5b 87 a5 85 a9 bd +e6 59 3e b2 49 61 ef f1 98 7e 73 56 05 d4 e3 0e +97 19 37 f6 f3 f5 be 52 78 fd 47 6d c6 60 ee 07 +30 cd 07 e5 d1 f4 20 09 a3 33 31 2d 93 28 f3 b0 +08 5c 40 75 bc 70 9a 10 f1 + +# Encryption: +05 8b 50 e0 bc a6 b9 34 c0 1b f7 c3 3b b6 15 b7 +22 ea 41 80 7a 7d 2c 7c b3 d4 38 e2 8d be 33 3e +d6 d8 37 47 7a f8 4b b0 06 bb b1 0b 36 94 4f 15 +d4 f6 d2 8b 5e d2 49 d5 69 0c 08 37 a1 6e 15 7b +a8 80 22 74 10 1c d4 4e 7f ed 72 a7 59 81 c9 75 +66 bc 70 e5 55 97 02 bf 5b 62 fb 09 b2 13 60 56 +73 aa eb b7 fe 9b 1a e6 d8 04 03 a2 01 33 80 3e +1e d2 35 0b 8e 15 ff 01 9a 70 0f 2a be 87 d6 e7 +33 + +# PKCS#1 v1.5 Encryption Example 13.19 +# ---------------------------------- + +# Message: +22 63 3c c3 fe 7a 7b 4f 00 fa 99 9c 4f e0 d8 82 +c3 1b dc 0d 67 0c 0c c3 d2 88 96 1f be 63 72 e0 +e5 32 46 42 c7 b1 fa 85 2e 1b 4f 69 6f 12 f5 58 +66 + +# Seed: +3e df ca f4 88 71 d2 91 d5 b7 f7 72 3d 92 d9 51 +51 52 b6 bf 52 b8 23 69 9c 58 8f 75 f3 4e 37 95 +55 0d 07 81 18 e2 86 c9 6e 90 07 ae e1 54 f5 7c +e7 f1 d4 60 39 47 3a 4a 37 a9 b5 90 a3 7e ea 59 +94 7f e8 58 7c 95 69 88 bc b1 74 e9 7c + +# Encryption: +3d eb bc 6c fb 0e ed 87 16 6b cc d5 4c 75 97 ad +36 ca 0a c9 6c f1 66 76 e1 87 4b f5 f1 0a 0e c6 +9c 3b e2 25 96 78 ee a6 3a 18 08 d9 06 65 ff ce +9a f0 82 7e e6 29 ed d6 59 43 43 7f 8c a0 a6 71 +17 2c 52 1c c0 d1 dd 01 e2 2f 20 a6 c7 9c 42 7a +da 88 56 00 0c 4e 03 5d 9c 5e f2 e1 05 f2 c9 f6 +45 7d 9e e9 5b 43 bc 4b e3 29 4a 0e e1 d5 c8 33 +ae 91 07 8a ed 09 e7 92 bb 42 c2 5e 00 b0 87 e5 +61 + +# PKCS#1 v1.5 Encryption Example 13.20 +# ---------------------------------- + +# Message: +55 2b 38 4c 5e 51 74 f5 1f 38 0d 8b 53 e3 c8 97 +b4 8c 66 9a 9c 2d 11 98 5b 86 54 de 7f 76 d9 62 +39 6a 37 b9 53 41 f9 9d ec e4 af d7 1d 3c 84 e1 +28 7b 0f 0f 86 ee ff cf d9 7b a1 88 e3 79 9e + +# Seed: +2e 2f 3e 3f 46 d4 74 0c b2 6c bc 65 aa e2 af e4 +9d 0b e6 66 39 d0 db 10 df d6 af 60 64 46 f3 b7 +de 98 21 2f 86 17 4b df a5 b2 e2 35 85 07 45 3c +20 ad a6 9a 4f fe 0a 35 e1 2e fb ab 3b b4 4c + +# Encryption: +14 92 91 ee b5 36 fc 07 03 f7 bd f1 f0 31 a4 30 +cc 83 ad c4 3e 09 68 64 91 26 69 34 ef 37 ea ea +b1 1b c7 f3 91 49 ab 33 43 66 94 59 36 73 cc c6 +39 0b 52 9e 64 d3 42 e9 f2 1d 17 6d a2 1f a6 5a +bd 57 ee c6 0d de c7 d1 a0 93 db a3 76 44 5f 1b +cf e5 a6 aa ce 9f 13 42 af 39 db 8a d4 85 ba 22 +2d 39 12 62 28 fa ee b4 9b b3 b2 71 fd 38 e1 15 +25 d8 03 15 4e 74 08 4b 75 c3 db cd ff 2e 3d 10 +42 + +# ============================================= + +# Example 14: A 1536-bit RSA key pair +# --------------------------------------------------- + + +# Public key +# ---------- + +# Modulus: +be 0c a0 1f 9c 17 21 66 f9 12 39 1e 5d 58 dd c3 +0d 5d d0 27 9a 49 bb 31 2a 31 e4 c8 a6 6a 52 fb +4e 8b 67 42 fa ac b2 24 c3 03 9f 1e 19 8f 33 23 +b8 88 ba 0e 35 bb 94 c5 11 bd 22 b8 86 40 5a 71 +5e 40 9d e3 bc eb 4f c9 91 1b 0e 9c 3b 1e 42 e2 +57 d5 bb ea 07 22 b5 d5 dd 35 37 56 9d c7 56 06 +46 a7 50 b8 7e aa 6f 3a 40 5a 94 bf 2a da 72 b5 +0a 4b 01 87 bb 9d 00 ec 45 1d 50 a6 a9 1a 1e 2a +91 19 2a 7f d7 56 b9 00 14 1f e8 8f 96 e2 08 0d +fd d8 01 66 a7 bf 67 e3 71 44 d0 9e 3a f8 99 74 +e5 7c 72 b0 3a 2b 88 fd 29 95 25 2a ce 4f 30 e2 +e4 7c 28 18 05 72 40 53 6b 58 db 42 07 50 9e 59 + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +be 0c a0 1f 9c 17 21 66 f9 12 39 1e 5d 58 dd c3 +0d 5d d0 27 9a 49 bb 31 2a 31 e4 c8 a6 6a 52 fb +4e 8b 67 42 fa ac b2 24 c3 03 9f 1e 19 8f 33 23 +b8 88 ba 0e 35 bb 94 c5 11 bd 22 b8 86 40 5a 71 +5e 40 9d e3 bc eb 4f c9 91 1b 0e 9c 3b 1e 42 e2 +57 d5 bb ea 07 22 b5 d5 dd 35 37 56 9d c7 56 06 +46 a7 50 b8 7e aa 6f 3a 40 5a 94 bf 2a da 72 b5 +0a 4b 01 87 bb 9d 00 ec 45 1d 50 a6 a9 1a 1e 2a +91 19 2a 7f d7 56 b9 00 14 1f e8 8f 96 e2 08 0d +fd d8 01 66 a7 bf 67 e3 71 44 d0 9e 3a f8 99 74 +e5 7c 72 b0 3a 2b 88 fd 29 95 25 2a ce 4f 30 e2 +e4 7c 28 18 05 72 40 53 6b 58 db 42 07 50 9e 59 + +# Public exponent: +01 00 01 + +# Exponent: +f3 7d 28 d6 1f 28 99 a5 c0 e0 a0 74 9d 13 89 38 +7c 64 c8 c3 58 a9 71 da d1 3c ff 85 c5 9a 62 dd +a7 bb c0 f7 e5 bd c6 5d ff 9d e9 c7 45 40 46 31 +75 81 48 16 8d fe 6a c0 a2 87 6a 56 05 3b ab 2a +2a 9f f2 72 79 4d d5 d8 13 9e ed 10 bc fb 4d f3 +30 20 d5 9e 30 48 fd 2f 0c 43 14 26 14 5e 36 a1 +d0 a6 bf ce 44 43 ef 3c 7e 31 d4 a9 2f b8 51 7a +49 f7 88 c3 b4 e1 37 39 5a 4b ee ea 63 e0 e0 ad +c3 22 4f 98 09 25 03 7d f6 f5 b2 6c 00 72 39 b4 +f0 1f 8a 9a 61 ea 0b 51 19 bc 9d 54 96 a9 5b 60 +ea 76 6c cb ad e0 37 e3 40 32 4f 25 f0 2e 72 45 +c2 36 ea e4 36 7a 64 68 a7 a0 93 8d 85 c0 a1 + +# Prime 1: +df cc 92 74 2c 48 d3 34 c6 6f ca a6 d8 a7 e4 22 +54 43 0f 80 a8 35 9e a2 3b 9a 83 b2 41 e4 7f 39 +9b 3f fe 3d ab 3f 15 be 8f a5 c9 e6 46 df f9 7c +cf 9b 43 17 61 07 80 ad 44 cb 1f bc ef bd 6e ba +05 5d 96 94 3c 02 47 e0 c8 76 78 eb 0b f7 6c 88 +76 c3 ab b9 ef 72 cf 01 8f 58 11 a6 be e0 4f 09 + +# Prime 2: +d9 64 e9 6e a6 fa 43 70 b5 91 ee 79 e7 e7 2e cc +21 81 53 78 7a 60 e2 f7 ae 94 fa 95 b9 bd 68 69 +d2 81 ac 3c cf b6 57 24 7c 58 3e af dc 13 d4 d7 +a7 d7 76 5e 44 67 df 76 b5 28 bf 94 bd 03 a3 ea +73 b8 1b e2 6c ca d9 89 b9 f0 77 28 da d5 3b 38 +ef 7f e9 eb e9 11 40 cb ad 17 dc 7e cb 1d 58 d1 + +# Prime exponent 1: +9e 79 f6 9b 5d 60 94 6f 22 b5 b7 03 3f 18 64 6c +0a cf 12 03 41 19 f7 23 5a a1 a7 f0 6a c8 ab 6e +d7 89 11 38 0a 33 b9 ea 1f 3e 7f 22 19 be 30 a5 +39 3d f0 dc 75 51 22 c5 8f 99 66 f8 1b ac 40 e4 +69 38 44 90 e3 8d 99 e8 8b 0b 99 c4 97 cc b5 86 +4c d3 72 9f 4f f8 34 ae 1e 1b 77 24 64 b5 e2 41 + +# Prime exponent 2: +3a 05 e9 18 13 91 30 76 e0 bf 76 7b 2b 1e 55 2b +3e b6 19 e5 4a 24 99 ef a9 b5 31 bc cc ba 75 27 +e9 7b 9a d1 10 4f 86 aa c2 55 7b 45 cc e3 ae 27 +71 30 dc f3 04 27 05 49 d5 c8 6e 79 f0 89 0c 33 +03 77 dc 59 6e d8 25 7f d1 15 11 78 e2 0f 8f a2 +fe a9 91 71 d9 df 35 00 27 ce fa 97 0c f7 64 41 + +# Coefficient: +18 b1 0d d7 3b 14 7d 86 b6 0c f7 fe bf 46 35 93 +c0 bd d6 bc 83 a8 39 57 3b 4b 3f e6 5c 0b 13 e7 +b6 94 b8 1a 56 57 21 0b e9 47 01 1d 8d 49 29 c1 +27 fd 2f 3e 31 06 c2 53 38 3b e6 35 41 d1 23 5b +d7 9c 57 2e 92 e2 36 34 28 20 98 be e9 4d 48 bd +62 8a 0e b2 1e d2 61 cf a3 5b 69 b9 77 70 e2 93 + +# PKCS#1 v1.5 encryption of 20 random messages with random seeds +# --------------------------------------------------------------------------- + +# PKCS#1 v1.5 Encryption Example 14.1 +# ---------------------------------- + +# Message: +2b d6 e3 c1 de fd dd 5a 43 + +# Seed: +e7 84 d5 25 03 e6 29 1f 25 8e 44 2d b5 77 f9 91 +63 82 a0 d1 4c 7b 9d cc bd b6 07 af 01 f0 25 8f +dc 97 23 97 da 12 39 d4 44 9a 58 28 6e ce 20 08 +f7 18 f6 90 ce e7 3a 02 7f ab f8 4b df 7a ce 45 +f7 ed 2d 77 32 4c be e9 0e cc 6f 1e 7b 86 cc 29 +35 a4 7b a1 56 65 0b 42 fc 71 aa d0 70 99 a2 7e +97 fe 5a 3f 25 fe 13 48 e4 42 39 12 12 a5 cf 1b +44 5a 1e 70 19 1f fa 8f ca de 63 5d 2e 44 65 f5 +f9 13 c5 3e 33 b5 91 52 cd 8a 14 97 84 f2 7d 83 +18 28 af 2d 66 6a 5c 30 9b 56 d0 71 9c fd 80 73 +40 69 a2 3e 09 2d 83 15 39 9f 95 c4 0a d7 fd 0b +b5 f9 43 77 + +# Encryption: +85 ef 3e 47 76 77 bf 76 07 1a 27 bb c7 39 57 15 +cb 35 07 96 e4 4f 1b 52 a0 8e 90 5e 08 ff 12 56 +70 5a 9b f0 15 2e 87 2b dc 74 bb 1f 2f c8 63 1e +f8 81 2d 16 94 6a 30 b5 8f 44 64 d6 e7 b2 45 0b +e4 5b 48 cc ff 5d 8e cf 7a 00 b1 b7 8f c8 fa 54 +71 3d d6 96 a1 4a cb 68 00 c0 d3 b6 9a 0b 44 43 +77 fa 30 3a 7d 66 db 49 27 91 8a 4b fb 0f d4 93 +bf aa 01 6a eb ff 99 53 30 a6 dc b6 21 5d d3 bd +b3 5d 7c d6 1c cf 0e 9c cc bf 51 e9 ea 65 8e a3 +1d 12 43 44 4c 4b 72 ff f0 1a c9 3f 28 eb 7f 67 +c1 83 2e 56 8e d7 2f d9 57 d5 b4 fd 2f 00 b6 02 +31 71 b8 5a b0 ca a1 03 0e d3 e3 ed c9 50 31 45 + +# PKCS#1 v1.5 Encryption Example 14.2 +# ---------------------------------- + +# Message: +10 47 35 d9 ad 72 60 46 47 3d f4 b1 3b 2f 5f a2 +85 c3 d2 33 ec d4 61 70 58 2d d2 28 cd ee 46 4d +a5 09 5e 20 8c f8 fb ca 05 38 8b + +# Seed: +dc 6a 63 1e 29 75 45 d2 f6 fe 9c 69 a5 d3 06 a1 +09 16 d7 e7 ef 0d c9 53 f2 1b 6a 04 14 31 ec 8b +a5 ce 1c 13 87 43 fa ac 54 97 d6 99 f2 ff 1d 4a +44 a3 e0 63 7c c5 e5 e6 38 cd 73 67 7d 09 af ee +3e c9 fe 80 52 94 7a 73 33 4c 32 70 47 28 56 f3 +07 24 3a c5 8b f8 63 80 74 66 7d 7f 7c 18 e3 ab +32 7e a3 fc 78 91 f1 c5 8a b4 7e 4f fa 6e 7d 90 +11 a3 3d 9b 40 a2 d7 89 ee 42 21 25 62 30 ca 8a +61 81 1b 09 72 cf d9 86 01 75 26 18 1d 24 ee bb +32 cc + +# Encryption: +92 1d 2b 02 6d 6b 7e 22 20 1d e7 7f bf 67 99 90 +f9 af f4 ea 7f e7 ce 45 02 21 5f 9e 7a a4 18 b8 +5f 72 ea db 6b 69 42 bb 08 a0 8b e7 da 66 19 aa +5f 1d 2f f9 61 c9 dc 2c 34 1a e3 2a 25 4f de ab +a2 f6 45 0a c4 47 4b 62 74 f0 c3 46 f2 6d a4 ed +55 5a 8c 95 11 89 dc 83 69 f3 4d 76 d8 37 d6 f3 +8a 95 18 a6 27 1c 5b 56 34 62 25 a5 ab 8d a6 03 +2a 59 30 fd 5b 77 72 9d e6 32 e1 75 2f c7 2a 0c +34 ae ce 25 65 7b 28 1b e8 93 2c 56 50 c9 82 fa +14 5f de 0b cd d4 8a 73 aa 02 88 b4 de 46 11 33 +f2 7d 51 e3 86 01 6a 72 72 6a 9e de 1d 32 df c7 +e6 f9 78 0c 04 eb 70 ff ff c2 68 82 95 66 73 33 + +# PKCS#1 v1.5 Encryption Example 14.3 +# ---------------------------------- + +# Message: +31 7e 6f 5e 17 50 0f e9 4f df f2 84 bb e5 03 01 +04 4d 14 22 d3 ca 70 05 98 + +# Seed: +46 6d 53 c8 d0 bb 9e d4 60 ca a6 3d 79 bf b8 77 +bc 4e a3 45 ca b4 35 7e 63 9a 95 dc ae 37 9d dc +ea 5d 64 fe e9 9f b6 f7 5f f2 4e b7 4d 44 03 44 +d1 47 e4 33 14 a0 f8 9f 8b 96 14 82 15 36 8e b8 +65 1f 6d 3c a0 d0 8d 0b 4c 73 e6 d1 a7 68 40 98 +26 d4 3c 2f 81 f3 08 40 60 5c 43 d0 fe 67 1d 3f +02 4c 70 d0 b8 99 23 cf 90 4e 39 97 99 62 cd 51 +5c 16 74 29 2a a3 0d ac 70 0d b4 eb 7e 63 d5 6f +df 08 c2 24 70 f2 43 86 19 45 d0 0f a4 e2 79 90 +21 2c fe d4 28 5d f1 ed da 4b 0a ec 91 35 59 f5 +9d 12 55 90 + +# Encryption: +14 1f ca 68 dd 2e 4d 1d e5 08 6d bb 78 5f f4 7d +81 e3 9c 31 1d 91 7a 99 39 a6 ff 5b 13 43 9c a9 +56 c9 74 2b cf e4 50 b5 bd 03 5b 54 1f ab 30 7f +24 fb fb 3f 8b 90 21 5b 56 04 67 6e 56 96 f3 ba +95 fd b8 d0 90 a6 c2 4a 29 d9 90 fb ff 1d a2 02 +81 42 55 8f 0a d7 53 43 c7 2f 38 82 3d b7 66 7b +05 e1 6b 51 92 b9 33 60 07 f7 58 10 6c 32 8b d4 +76 11 8d f8 2a d0 75 48 a7 26 92 1f b2 e1 92 b4 +3c 8c 30 cc 9b 84 34 63 0e 27 fd 8b 23 ef 8d 8f +22 be 7f 73 ae cd cb 2b 1e c5 53 9d 5f bb 2c ff +9e d5 e7 f1 9b 49 18 3d 22 1d fd 53 7d 4f 37 03 +2e f3 2f 63 b6 ff 74 ee 24 a0 96 cf 45 59 27 09 + +# PKCS#1 v1.5 Encryption Example 14.4 +# ---------------------------------- + +# Message: +90 96 3d da b3 78 91 e7 28 8b 53 be 5d 9d c5 67 +b1 a0 7a 15 66 c2 af dd d7 72 73 24 ba + +# Seed: +a4 9f 12 15 17 5b a0 4c 27 4a bc 05 1f 0c 17 a0 +8a 63 64 89 43 db 2e 8c 76 22 bc bb 1d cc 56 7e +be 6a dd 8c 44 48 16 c9 d4 36 ee 93 ce fe 23 ec +41 dd fc b0 a4 03 bb 6d bf f0 ae 5d 6f cd d7 64 +da c1 a7 2a 48 4f 36 47 1f 4f 3b d7 25 b2 db 5a +fa 6a cf 53 0e 4e 4e 86 b4 fd a8 78 20 47 87 1c +b0 55 ad 68 c8 41 de 54 5a 55 40 c8 cc 12 e7 e3 +f1 58 14 a0 03 9a 81 03 4b de 9c 68 ae 22 85 e6 +16 b7 b5 55 5f 98 c6 13 ce 2e f6 66 a0 22 46 5c +63 67 d0 bd a4 0c 12 e9 41 f6 99 8a 14 a2 b5 e3 + +# Encryption: +8a d5 bf 78 23 2a a3 6f b7 83 58 3e 71 bc 13 93 +03 7d 13 e7 74 54 a9 dc 11 11 43 4e 75 dd 80 20 +46 ba b4 20 25 42 0c 63 96 1e a0 06 26 57 ca 50 +65 de b6 53 ac 78 eb 64 98 cf 14 d1 70 4c ec 59 +11 69 60 8d b0 1f c9 3d 0d 68 e6 28 01 b4 65 a3 +87 a9 c7 2f 7e b3 5b 0b a5 3a 5e fa 98 c9 f0 cb +7c 7c ba 18 04 cd 70 1d 02 97 b6 60 05 ae 25 ec +3b 6c d4 cf 31 94 a3 fa 65 d9 8c 4b 95 33 30 79 +0e fd e7 4f a2 75 d2 a7 9d 33 10 a5 bc c2 c8 1c +91 fc 25 56 2c a9 39 f8 d9 c1 75 ed f4 b0 76 73 +d5 39 24 e2 7b 15 52 88 1c 10 83 19 23 71 5d 14 +9f 1f 31 9e 38 e9 1d fa 56 6c 54 53 ba cc 14 8b + +# PKCS#1 v1.5 Encryption Example 14.5 +# ---------------------------------- + +# Message: +3d 81 02 1f f6 47 33 37 e0 4b 92 + +# Seed: +9b 70 29 73 13 77 e8 26 97 fa 56 b0 86 ce 49 d3 +c4 b1 54 9d e8 1e 3e 99 e1 6c d9 72 29 7a 56 0f +f4 83 f2 ef 5b 71 b0 0f c6 84 74 4f 22 4e 85 7e +6d 72 39 f1 56 d7 b6 10 2f 23 04 f8 a5 50 50 b3 +75 6c 54 8f 6e a2 6e a6 f7 39 4d 2b b3 79 33 35 +84 e3 b4 81 d0 73 c0 a5 8a 0a d7 87 ad b4 80 e1 +f2 0a 1a 59 0e 03 1e 6b 2b b7 f3 6a 93 61 0d df +70 83 a5 07 68 c9 98 62 3f 6e 64 37 6a 29 b4 a4 +18 03 2d 27 39 bd 4e 74 7d df c7 7f e3 cf 27 93 +a2 9b c7 67 bf ac c7 13 e5 f1 0e 53 1b 4c 71 89 +97 b9 bb 6b 65 15 e0 71 13 28 89 74 7e 54 6b 13 +46 8d + +# Encryption: +1b 88 4b 06 7d 0b b1 59 7f 5f ab 93 30 95 75 5a +53 0d 9d 04 e2 75 4a 57 97 ff ff 5e f9 ce f1 89 +54 99 98 23 00 50 3b 3f eb cb aa 09 d3 6b 7d ac +c3 0d f3 c8 68 f0 1a 5f 17 ed 4a 72 a8 5b 6a dc +80 a2 6a 1b 81 97 6b 39 3c ba 9b 0c 82 cb 1e 2c +58 3a b6 f3 14 ed a2 9a 43 32 21 b6 e3 ed 53 51 +53 74 bb cd 2b 96 f5 cb 5b d5 81 5d 1a 5d cb f0 +80 d2 d3 7c b9 6c 4d 96 1d c4 7e 13 0d b7 b8 d0 +18 2e 33 69 de f4 c0 f6 c4 2c 6c 20 53 1a f1 a1 +90 36 de f0 8d 4b ac a7 1b 99 af 3c 4e 1e d5 27 +d5 1f 37 d0 ee 1e a2 c8 b8 eb f4 fd 52 79 85 1d +c3 20 e7 42 00 8e 04 04 4d 0d a0 64 36 61 3d 1b + +# PKCS#1 v1.5 Encryption Example 14.6 +# ---------------------------------- + +# Message: +5c 74 5d d4 a8 c5 92 93 4e d1 5e 22 fa 9d ec 4a +4d c2 0a 9f + +# Seed: +0e 6a bb 82 9a 3b 16 d0 8b 0b d4 3e b9 5c 79 1a +f2 a3 39 12 ea 83 3e e6 89 3e d5 ad 3e e7 44 c8 +b2 dd 28 fc ee 80 8d 3f 01 49 58 25 be 0f e6 37 +32 07 a8 78 d4 a5 25 ea 72 cf b0 bb 58 a2 67 76 +fb 39 ee bd 33 5f 04 cf 71 86 be 61 c5 63 5d 95 +e5 60 ed df d4 5d d8 6a 4e 67 0d 33 56 8d 83 d2 +ca 20 3e d2 8d 90 e4 8b 06 4d 09 a7 5f 82 8d ea +cd 5b 37 ef cf 78 4f b1 1b 17 d6 d9 f2 31 52 24 +f8 e7 63 79 1b ac 6c f4 6e 1c 23 b0 b0 25 2c 19 +ed f0 40 d3 5f 59 25 53 26 5b 88 6b 29 ca 56 eb +c5 38 63 71 41 4d 82 a3 40 + +# Encryption: +2b 0a 43 b3 cd c9 9d 6c fc 74 da 2a 86 ec d7 d5 +76 24 75 d1 43 e5 48 6f a9 cb eb bf 27 d8 e4 14 +1e f7 2b 6d 4f 13 f6 64 b3 d2 e9 ec 32 22 7c 1a +d5 b7 6c 0d 1b ef bd 65 89 68 c7 db 14 95 23 82 +49 bc d9 5e 75 40 25 4e 65 74 98 23 b8 a3 4b f6 +a1 41 07 21 df 34 f3 c8 d5 79 f3 6a ed 9e 0b ac +23 1e 54 c2 7f 76 73 19 7d 19 f5 1c e6 ac bb cb +7b 1a 55 e3 8e de be ed 34 61 07 3e 80 c7 9a 4f +c3 09 31 30 69 6b ff f2 bb cb 74 90 5f 2d 34 44 +33 80 57 fd fa cb c4 db 81 93 5b 29 e9 9e 55 cc +c1 d4 8d 89 e9 dc 4a 63 a0 11 a6 23 32 cf 57 02 +62 a0 63 59 cc 36 c0 5a 6f e1 8a fb 78 32 b3 2e + +# PKCS#1 v1.5 Encryption Example 14.7 +# ---------------------------------- + +# Message: +b0 e7 7f 42 c1 a1 e3 f4 15 57 23 a9 0d b8 8e b1 +53 cb 3d 3a 28 ed df 25 9c 47 05 6a 47 0c 91 5e +c9 55 f8 31 89 f7 1a ea cd d5 5c 33 5f + +# Seed: +fb 36 01 10 5c aa 9a 2f dd 6d d6 c5 74 6f 4f ca +fe f4 41 bc b0 fb 8a 2c c0 3d 0b 57 34 9f 93 21 +af 9d 99 84 e6 4e 2e c4 85 c9 ad 75 5f 14 0c 0b +66 db 1c fc 26 69 1c 26 77 31 d1 a3 af e6 87 20 +2a 96 77 e4 2e 84 4d 47 7b 75 bc bb 8c 97 d9 9f +cf 72 b3 fb 6d 34 9f a9 c4 76 61 91 47 21 7a 04 +dc 06 aa 3c 3c 17 64 95 38 0c b9 2c 0a 7e 09 7b +4b 4c 5f fe 04 63 1a b1 d1 bf ea 03 67 86 50 c8 +5c 17 0f a4 a1 d6 4a 4c 13 5e 61 48 14 90 b6 2b + +# Encryption: +a4 bd d4 92 fe c7 9c 3a 79 09 3a 44 33 42 72 d9 +d1 7f 54 3d 02 02 c3 9e 40 8b fb 39 36 6b e2 de +61 df 50 ac 45 8c ae dd ef fb 69 e2 13 ca 92 b7 +49 53 66 34 7e de 73 3f f3 99 ae c7 96 c3 c3 b1 +df 34 9f 01 1d a0 1f ee 7d 21 c1 c2 61 84 3d e8 +82 08 56 0c 0e 89 84 b9 52 23 ea 37 31 db 91 c5 +93 7a 79 b0 db 93 87 59 1c e3 2e c7 f5 83 e6 00 +f5 24 44 df a7 67 1c e8 27 38 98 fb bc a3 a4 aa +68 32 cb b3 54 3a be 96 47 e5 f8 c1 37 72 82 52 +ce 54 40 fc e1 0e 4d 4e f7 5d 56 b8 14 d5 19 64 +44 41 41 1c 10 a2 a1 4c 35 04 72 82 7c 99 ea 3e +e5 fd a3 88 0f 34 1d ca 8d 3d 3a 4e 5e 05 ba 42 + +# PKCS#1 v1.5 Encryption Example 14.8 +# ---------------------------------- + +# Message: +b8 7f 04 b3 35 0e 12 63 da a3 f9 40 5e 6f d3 d2 +5d 8e fa 13 25 56 a4 95 71 f5 70 8a 42 52 7a f3 +1d b0 1e df 79 82 0f 93 26 64 5f b1 + +# Seed: +ec 8d 01 4d 6e b8 d0 23 9a 97 73 bd d3 20 bf b3 +f2 ee 8f c2 7d 5f dd 91 f3 f3 90 5d c8 a4 c5 ff +13 52 9a ee e4 61 85 4c cc d4 e0 9b 62 4a fa 64 +7a 7c 04 81 4e b1 e5 7b a1 4d f4 c7 95 b4 2e 84 +c4 d0 86 29 24 5d ac bb ed 27 39 9a 72 5a 94 8f +3b a2 f8 b6 4d 26 02 dd 0d 5f 55 cb 23 ea af fb +3a 66 50 8e 4a 68 9a d9 ee e6 44 e6 a2 6d 43 8f +36 63 fe a9 bd 03 12 bb 0e 7e 5a 6d ee 04 bb e8 +a0 74 5a 73 d5 ac 89 fa a0 96 a5 2e d3 04 6d 77 +de + +# Encryption: +77 5d c3 24 fe 9d 5e 05 ad 01 50 13 d6 5f 0e ba +0d cd 52 ff 9d fc 17 95 ea 93 d0 f4 33 57 98 96 +86 fe 3f 8b 04 62 23 bb a5 c7 84 9a ca c3 12 35 +43 43 26 16 c3 10 3a c2 ba 8d b0 a1 d2 99 40 bb +a2 62 47 0e 5e 53 be 60 e0 eb 72 4d 07 cd 91 2a +ef bb 87 fb 51 98 0e 9e 1a c1 94 da 31 92 95 41 +ca 43 22 4b 15 2b e6 f2 df 6c 5f 04 42 b4 f4 d2 +cc 2f b0 27 39 d4 85 a0 11 62 bc 8d bb ad 14 76 +eb 06 e2 45 ab 36 c4 c7 2d 3f 36 07 d0 50 84 a0 +f6 b7 2d c8 ba c3 46 bd 19 09 1b 02 f5 98 2c 91 +45 7c 7b 10 f4 47 2b 57 18 45 24 21 4b 23 82 5b +59 f4 34 cc 48 a2 b8 54 ca b5 0f f7 9e 59 09 1c + +# PKCS#1 v1.5 Encryption Example 14.9 +# ---------------------------------- + +# Message: +e1 95 a0 36 a5 30 e1 c2 a9 d7 a1 03 35 8d c2 bd +25 b1 01 bf 70 44 50 ab 8e 50 62 cb 63 df 56 10 +35 + +# Seed: +0e f8 81 de fc 45 ad 3f 3e 58 b1 10 5e 49 b4 23 +ab 89 12 4a 65 b5 2c fd 81 cf d5 42 b9 1e 7c 4c +1a 60 71 a2 cf 12 b4 82 7e d5 d1 9c ba f8 fe ea +54 bb 3d 73 85 7e e8 7c 71 5c 71 b9 ed 1c 07 c3 +af d9 0f ce 40 44 8b b5 7e 35 24 d0 38 80 98 39 +e3 6a 4f 55 44 c3 e1 81 e8 c2 e2 93 cd 57 54 c8 +65 74 ad e6 df ce 0a b3 4a 80 b4 d4 8a 9d 42 e7 +11 5d 8c bc b1 fa 28 c8 a2 65 01 db 7d 0b b4 96 +d0 1d d6 92 65 a0 26 e1 a9 7e 9d 3a 1a 65 a8 aa +8e c2 df 06 34 e6 f2 65 1e f4 35 40 + +# Encryption: +1a d7 7a 00 7c a4 37 ab d0 15 9e d4 b0 b6 81 54 +16 f9 f0 9d 1b 12 15 fb 7c ff 11 52 97 60 1a 88 +30 f2 09 17 86 35 63 85 3e d7 8e 9c 3d 7b a4 c9 +7a 05 cf 19 dd 32 92 48 47 1a 47 03 a4 65 17 8b +85 d4 ec d5 42 24 12 98 c2 fe cd 41 3e 23 a7 0c +8a 5d 47 c2 0e 31 c2 da be 3c 82 a9 54 50 27 27 +49 ae 2e bb 89 98 5d 00 b6 3d ed d9 59 6d 05 16 +d1 2a 78 c3 74 b7 ed dc 7d ce e8 e4 fd d1 6c 1d +fa bf f7 ff d4 c1 fd 61 ce 04 be 8e 49 75 c5 cd +71 e2 cb 0e 54 1b 84 61 bb 81 fb 28 cc e7 73 65 +3e 8b 16 b2 8a 8c 20 74 28 89 5f 28 53 55 87 a5 +c9 9d 46 ba 4d f9 ae 08 50 18 51 3d 69 ab a3 f6 + +# PKCS#1 v1.5 Encryption Example 14.10 +# ---------------------------------- + +# Message: +04 2a 39 22 aa 87 1e ea 0d 78 42 2c e7 85 66 ab +bb 5b 08 c2 dd f1 ee 30 cf + +# Seed: +5a e8 51 14 b0 02 7a 23 c7 2b db 46 ae 7b b8 87 +be c5 ba d7 a9 88 4e 93 f6 f4 fd 0b c9 38 bc 72 +41 0c ce 96 a1 4f 4d e1 99 19 77 35 05 1e fc dc +c1 96 f3 ad bf aa 06 3c b3 f7 a2 34 c6 cf 99 d7 +0f bb 7e 35 b6 ae c6 64 14 66 93 91 e3 cb e7 21 +ec 99 1a 1e 5d fb b0 38 f2 70 36 85 93 74 9b 20 +8d 08 9a ae e2 ef 35 c3 da f6 23 8b 5f e4 2d 13 +dd e4 07 df 14 f2 d6 18 c9 79 c9 7d 2d e0 29 33 +b5 7f e8 81 22 04 86 2b 2f 1d ee 98 3f 24 c2 c5 +96 ea 66 8e 63 7d 0a 6a e6 dc 52 65 27 69 94 e7 +e4 f0 2b 6e + +# Encryption: +12 44 de 88 0e 0f 78 52 e9 96 95 9d 76 2f ca d9 +15 65 a4 d0 ad 3b c5 27 50 d4 a0 44 0f 0b 5c 65 +1a a0 e6 f4 92 06 1b 2c 86 24 c5 2e de 68 58 fa +25 18 ae 8e 8b 11 65 58 b2 c8 07 6c 17 ae 78 3d +8d b2 5f 0d 8f b1 f2 75 8a 82 ab 97 1f a7 28 3e +f0 74 9a 37 be 28 93 f8 94 37 fb 8e a9 00 72 b5 +85 5a 26 08 fc 54 2f 5d 2e 0c b5 43 f4 fa c5 28 +f9 43 52 d0 16 40 fc 2c 53 1b 79 81 0c 00 77 7b +c9 e1 0d d9 ea 99 96 e7 40 87 fa dc b7 1a a1 43 +00 67 65 71 61 48 82 94 3f 4a 56 14 12 c0 54 67 +dc a6 6c a4 9f 82 29 35 18 23 db 8a 6b 9f 80 3d +70 9c 11 87 ed 74 10 cf 91 00 15 59 5c ea b6 3e + +# PKCS#1 v1.5 Encryption Example 14.11 +# ---------------------------------- + +# Message: +f3 1d 3d 0c 30 fd 65 d7 b9 8b 70 99 44 78 2e 20 +52 5c a7 c1 f4 2d 5d 03 a0 f6 d2 75 9d f1 91 9e +ea 82 f8 0f 10 00 fd 5c f8 59 df 59 87 1b ac 82 +dd 90 76 cf + +# Seed: +04 4b c3 77 e8 58 9f a5 af 1c 17 34 7d 50 e0 cb +bf 90 15 76 f2 41 de 69 0c 88 16 c1 29 cd 9f 2f +b0 83 1a 01 7b ec 30 b8 2b 68 f6 98 31 1a f6 e0 +77 72 bc d8 98 fa 0c 27 f6 2a fd e8 95 89 77 84 +46 25 55 2d 9b cb 5a 81 aa 3d 74 15 b2 42 a0 3b +12 fc 1d 3f e2 d2 ce 6e 5f 71 c4 a4 a4 c7 ca 83 +e0 65 6f 50 02 ac 36 d8 d0 2b 69 ae 65 73 44 98 +f1 31 95 2c ea 48 1f a2 c2 96 5b 6e f0 51 7e de +50 dd b0 9b 3e a7 02 6d 06 + +# Encryption: +86 f6 6f 0c 25 05 85 06 59 43 de 2f 71 1f ae 4f +f2 62 70 0e 0d 33 06 a2 4c 94 30 f8 7c fd 93 de +f4 c3 44 7c c7 21 0f d9 4a 14 33 62 f4 f9 45 c6 +db e2 80 bd ef 5d 14 f7 5e b7 bb 31 32 0b cb d0 +d8 8f 0c cf 2c 95 a7 4c b4 58 c6 27 2b 58 bf 74 +30 93 c4 bb a2 d7 be e9 ea 2d d3 0c f7 2f e2 93 +c9 0c 97 43 0a 04 7b 17 26 63 91 c5 1f 5c 39 8b +a3 df 8c b7 4b a3 e3 72 f9 55 5c cc 97 d6 db 76 +14 ea 06 d5 c4 8c 1c 60 06 13 3d 0e 9d 69 95 79 +93 85 92 0a d8 af c3 de ad f6 31 ce cc 55 9c af +f4 95 b0 8d 68 3f b2 2a a6 97 d7 1c 69 6e 46 b1 +bf 4f d7 6b 8d 0b 39 f1 79 bf 66 84 1b bb 97 07 + +# PKCS#1 v1.5 Encryption Example 14.12 +# ---------------------------------- + +# Message: +6a 35 55 57 9d ad 03 94 35 43 ff 74 e1 74 7c 25 +7a 83 d3 52 94 c2 53 93 83 e2 35 de 69 + +# Seed: +5d 92 43 4e db d4 f5 bd 27 19 71 71 f8 53 ce b7 +26 30 30 83 ad 45 67 a1 d7 c6 10 4d 19 2b 9b cc +df d0 da ed a2 74 e5 cd fb 3d 0c 5d 19 c9 68 25 +81 ec 7a dc 1a 87 e0 81 51 41 5d 5a 9a dc 1a f4 +50 b1 ba 88 d0 ef 32 ac 2d 1f 8a e3 45 95 28 14 +75 3a f3 8e 12 63 5c ff 8c 09 21 59 b4 e7 5d ee +a1 98 3e d3 d2 d9 ec 2f e7 b9 a2 e1 6a 14 1e 81 +8b 84 cd 9b 71 c1 29 a8 b3 c6 db 62 02 32 dc 03 +a2 40 1f 73 1f f8 a6 3d a4 58 a7 d8 78 90 56 25 +ae e1 fc 09 4d fb 07 b4 57 5a 7f 0a ad 23 3e 82 + +# Encryption: +93 10 27 2d 12 4b c5 cd b7 21 88 98 40 aa 77 15 +e7 67 32 17 00 cb 39 b2 b8 a5 a8 2a e3 f0 2e b9 +67 e8 db 46 84 3b c1 bf 62 ed 8b d2 ab e8 14 34 +49 7f 99 00 64 02 53 98 2d 37 2b 2b f7 c1 b0 9b +d5 01 96 74 a8 34 fb bd ff 35 68 a2 82 4a ed 4a +80 48 d2 b8 61 36 27 75 bd 5f 0d 63 b3 48 36 3d +13 78 69 1f 5d d1 d7 96 10 74 ed 95 fc 90 07 bd +5f 5c 29 23 c1 7c 42 90 4e 2b f9 d2 48 77 9f df +b2 03 97 38 41 a1 12 90 c7 e9 e9 35 6d 4e ab 17 +0e 43 1b fe 45 4a 88 01 0d 9a ff 33 70 0c ee 55 +c7 04 c8 2a 7f fb 15 e2 53 ef 84 f4 01 9e 12 43 +8f 7c 73 86 dc 53 5b 19 ca 86 af 71 d4 77 60 8e + +# PKCS#1 v1.5 Encryption Example 14.13 +# ---------------------------------- + +# Message: +cb 79 af 5a ea fd f2 ba d2 1d fe 62 92 66 42 cb +a8 04 ec 7f d0 ea 5d 54 08 ac e9 ed ff 28 e7 e8 +df ff 6d f3 83 af 14 40 21 46 04 76 c0 c8 2c + +# Seed: +5f ce a2 57 cf a9 2c 84 f0 b8 93 7d 17 3f ae cf +75 03 ab 16 2e 0b ae ef 7e 4c 51 1f 3e 32 a3 24 +ed 40 e2 42 a8 52 ba 57 89 5b 7c fe 4d 61 79 61 +e0 36 f6 63 e0 22 8a 29 cd 1a 95 ac ac 08 a2 55 +26 d1 eb ff 0a b3 f0 33 ed bf 1a e2 76 a8 d2 36 +73 6c c7 af 51 b5 d2 bd c8 3d cc 7d 7d 3b f5 b8 +22 af 2e ff ed 7e fc b6 17 e0 83 e5 1b e9 94 ae +d6 56 9b 23 83 b9 41 ae e5 94 c7 b0 12 e6 75 1c +37 b7 a5 4e 2a 19 18 24 a1 30 d5 5c f8 45 + +# Encryption: +11 fa 81 9d 3a 63 88 04 ee f1 d9 56 0a 11 f5 23 +0a 0b ad fd 66 eb 68 4e 7d 69 df a2 89 8c 8e 0b +6e 04 af 8e fc 70 61 08 1e c5 9e 45 85 76 42 e8 +b2 00 41 af 50 8d 9d 4e 28 82 20 f9 fd 38 9d e8 +b2 91 24 ce 74 7e b6 8e 2e aa 8c 8f 6f b4 93 f6 +11 ac 09 b7 23 09 5d 07 ee d9 24 f6 ab 8e 09 ff +93 c5 51 6d 1f 0e bf 62 c5 f0 22 f5 bb 4f 4c b5 +b8 f5 d4 87 a1 7d f7 d0 12 d7 04 35 7a bf 17 48 +67 ce 40 cd c5 50 11 b0 71 39 be a4 5c a0 e5 81 +78 0d e6 54 17 cc 83 5f f2 69 84 fd 0f eb a1 87 +69 c3 94 a2 e4 85 02 3e 31 d3 b0 a8 88 a7 b1 4c +78 1d d8 5b ab 40 86 74 f5 f5 7e 4b 76 3d 84 35 + +# PKCS#1 v1.5 Encryption Example 14.14 +# ---------------------------------- + +# Message: +d1 62 33 fc 77 5c 31 9f 15 7a a2 00 47 6c d6 ed +64 a1 ea + +# Seed: +bb 33 b2 2b 5f 46 79 4b e8 3e 6a ff 34 a0 e4 11 +d1 f3 f4 b8 da f9 b5 85 87 24 ef fd b9 69 c9 55 +25 c6 2d c4 4b b2 b0 83 38 60 03 05 4b bd 36 66 +b7 82 82 60 6f e6 ea 17 27 31 be e1 16 72 d6 01 +de 32 42 3d 83 f4 63 cc 29 30 f5 fb 79 da 15 34 +c4 15 c9 65 82 75 65 94 a9 99 b2 26 35 42 48 a0 +9f 14 1c ae cf 88 83 90 78 f7 7f 40 bd 48 51 34 +9c 1f c7 5e 1e ce 6f d6 96 6b c9 c9 d5 ec 12 09 +6e d5 04 35 46 85 9e 4f 95 7d 31 88 e1 d9 06 0b +59 c1 f7 f6 2e fb fe 82 5d da 45 35 3e 6f d4 fa +ba c9 83 f9 44 f4 c2 c7 9c bb + +# Encryption: +10 c2 0c 0c 71 b1 1b be ce 14 c8 14 83 dc fa 73 +0c 23 d4 dd 61 b8 75 5b 39 94 9d fd 4a 3c 50 33 +21 60 ee c6 f7 71 0e 09 c7 a9 7a f9 3f 70 44 b9 +2f 41 d0 9f a3 e6 c6 ce 1f 64 11 48 4e d4 75 40 +a1 b5 9e 23 c1 93 34 b6 6d 68 20 c2 d4 4d b0 f6 +aa f8 5a a2 7f 53 a4 1f 85 6b f6 a5 91 36 59 86 +9b a4 ab dd ec be 87 41 3a c9 5b e6 40 09 59 3b +5c a2 d0 78 3a 16 f6 08 66 57 55 24 53 93 fc 14 +4f e3 ea 5e 9a ac 9f 1f 99 1a 92 85 38 b4 69 97 +d3 06 3c c1 a6 9a dc 19 2a 40 c7 6f 92 d4 7a 05 +80 e3 c0 21 20 02 3e ce 70 32 80 7b 7c 09 13 43 +aa 87 3f 6a 4d dd e4 3f b2 dc c3 79 ae ee f6 54 + +# PKCS#1 v1.5 Encryption Example 14.15 +# ---------------------------------- + +# Message: +d2 f3 c2 e6 f4 3b 0f c9 fc 22 93 b8 45 88 e6 61 +15 + +# Seed: +b9 81 64 89 52 5c d0 26 15 6f b4 e8 a4 a8 f3 4a +ea 8a 3a a1 a6 34 cc cb 32 58 91 8f e8 5c b8 d4 +aa 02 a5 28 52 a8 94 1d 3e a6 c0 48 b5 8c c6 c7 +56 85 67 56 25 e5 e4 dd 7d f9 3b 8a ce c0 79 67 +0b 49 f3 dc 6e 07 63 ed 4c 8e 2d 0e e9 b5 ca 5b +b6 2d e0 06 91 98 38 e4 b6 9b a1 05 d4 c5 a4 cc +6d ca 67 b1 21 93 a0 32 b6 92 73 96 44 cc cf 72 +3f 9f 69 e4 8b 94 c0 bd ce 5a a3 5f 75 dc 53 92 +7b 81 e3 42 ce 72 c6 b6 5c f7 5e ae ca c5 fe 0d +ea 93 88 5b a4 20 af 99 32 d8 4c a4 b5 0e 07 e3 +28 ec 5f 81 6d 2d 86 96 b2 0d f7 5f + +# Encryption: +80 f1 df 25 f3 6f 31 4b 98 2c 9c 8a af c0 b8 a1 +a2 f1 74 ab b2 98 08 69 c2 9d 19 be 1d 2d 93 b4 +fb 42 99 90 6c 35 7f dd 40 e8 9a 19 54 92 a9 79 +76 61 f0 5d 38 71 d1 bd 0a 5c 45 d8 f9 b0 fe e5 +65 b0 00 4f f5 af c5 a6 f8 9a d6 03 e8 22 83 57 +0b db 4c 6e 0c fc 31 3e 4e 66 5a 94 34 b3 2f cc +77 3d 6e da bc e8 5f e7 c8 0f 03 30 2a 84 e2 08 +b5 bd 0a ad 91 ce 62 fb 8c 2b f5 4b a6 6f 7e 8d +00 21 92 16 29 20 a4 6e 36 de a5 66 1f dd 75 81 +53 56 40 74 b8 55 9f 88 93 62 42 fc 09 98 14 8f +19 eb 50 fc 11 fb 24 a7 ed 8c 83 49 65 8f e9 d3 +1e 62 74 d4 5d 6f 2b 60 9b b5 cc d1 7e 28 4c 99 + +# PKCS#1 v1.5 Encryption Example 14.16 +# ---------------------------------- + +# Message: +21 ee 58 12 e3 24 6d ab 9c 3c 25 9b 21 37 d6 5f +98 a0 5e 57 40 46 5c a2 2c 69 34 97 00 a4 2c be +4f fb 39 3f e2 81 99 33 9c 51 03 1c d3 b2 2f 2f +0a 83 + +# Seed: +e9 de 5b d3 55 e6 af f1 9f a1 1a 2d 0d 3e dc 3f +64 69 bd 3c 75 72 06 d6 6b 3f 09 90 8f f6 18 af +48 01 ac 77 b5 2c de 03 d4 ae 74 9d 02 15 5e 5c +70 fc 99 5f 48 76 72 d2 80 63 58 55 db 4b 64 a2 +26 09 b0 c1 60 67 16 3c 51 90 42 05 7c b3 67 12 +c7 c2 fe fe d1 1f 73 c2 8b db 9d 25 f0 63 6a 4c +aa 11 26 9e 5f e6 5a 2b 17 56 86 a1 5f 1e 48 d2 +8d 34 5d d9 a1 b2 90 0a 24 f9 dd da 3d f3 a6 9f +fb 9c f5 04 5a c4 a1 93 ae 90 2f + +# Encryption: +7d 8c 53 1d 4d 35 49 e0 bd 2e e1 62 b6 82 53 9d +a6 17 22 b8 8e cf 8c 7d f6 d6 b8 1f ef 50 18 bc +4e a1 0a 7e 1a 4e aa 02 15 d9 b3 cd f4 13 47 92 +9e ac 27 48 eb d7 79 94 5c 9b c4 61 dc 51 f4 8d +f6 52 75 53 f0 70 37 e5 33 ce b1 34 8a 46 a7 ea +79 7d 85 a2 6a 9f 44 c5 88 69 99 6e f1 14 69 bc +c1 0b 75 6c 02 d5 c0 e6 18 83 68 5c c3 7d 75 8d +fd e4 c9 b7 35 4e 3b 4f 31 6c a7 f7 fd e6 59 c3 +fd 5e 33 2e 1b 63 92 a2 92 9e 13 17 66 ce 9b a1 +d9 71 ad 24 6f 3d f0 22 43 38 63 8b b6 53 45 8c +d4 b5 26 d9 61 74 4d af ec d5 99 8a d7 2a ed 3c +34 59 9f 7a 40 98 e3 d2 df 9d 13 a2 1c e2 37 0c + +# PKCS#1 v1.5 Encryption Example 14.17 +# ---------------------------------- + +# Message: +a0 34 a6 c1 66 cf 0b 25 d2 dd e5 3a f4 b8 33 b4 +78 c6 b0 d2 fb 0c ef 13 7f bf 5c 27 12 70 64 91 +23 7f 7b 28 6d 12 11 d5 73 10 f8 a7 62 b1 b3 bf +e1 9c 9a 4b 16 d3 e0 a8 + +# Seed: +d8 44 17 97 22 87 13 0a 24 a6 06 f5 83 29 7a c9 +11 52 8a dc db bd 7d e1 4a 5b 48 9b 67 86 f9 f6 +f7 e0 b7 3b ab 53 8e b6 c4 5f f3 4b d5 dc 43 ea +e8 d8 c4 3f 71 65 16 a6 0d a2 47 53 6f 63 4b e0 +65 d9 4e 7f 92 ad f5 2a 96 7e e0 5f d9 af d7 32 +33 3f 99 ad 05 82 97 b2 8f 8e c6 fe ff 80 28 44 +a0 09 7d f9 1a 97 70 2c 48 3a a1 c7 89 2c 7d 43 +b6 b9 1c d4 d8 5d 3e d2 f1 e9 55 39 57 06 c3 b3 +39 ba f2 a0 e0 + +# Encryption: +90 4e 04 07 23 ab 97 88 a5 ed 03 52 eb 96 c7 f3 +d7 07 cf 0d bc 25 8c 51 dc f6 24 34 06 f0 c7 42 +c6 cd f2 07 67 13 2c 09 5e 6c 82 a5 02 5b e7 b4 +13 4d 8f a4 de 18 7f 8e cf 12 fd d3 be ab db 06 +15 8a ef 46 c3 fe d2 d1 83 34 06 ec a7 a6 9e b2 +d2 08 a2 f6 f4 40 d5 4f 6b e5 dd 56 47 09 ed a8 +12 ac 06 29 a9 4c 7f 8a ee 78 be af 9e 93 78 c8 +dd 9c 62 03 74 bb ac a3 94 18 59 dd 70 2f 6f 7b +25 a2 38 45 9e e8 97 59 de 94 22 b5 bb 6d 28 57 +16 6c a2 12 0e 63 47 74 a0 d1 d4 2e b8 d9 48 15 +a1 04 4b ea 8b fb 02 da 58 62 cd 9a 74 5f 15 92 +47 8c 6f 57 bf d1 3a 5f df 4b 8f aa e8 a4 bf c4 + +# PKCS#1 v1.5 Encryption Example 14.18 +# ---------------------------------- + +# Message: +8f c6 39 4c d6 e1 75 33 d1 ff 8e bb f3 e1 ae ae +a3 30 ed 9f 5a 6e 1e fb 83 45 42 94 c6 ce 24 f6 +90 4a 0e + +# Seed: +be 1c 18 02 db 44 68 2e 58 c6 1f e3 87 57 ea 0e +38 4e ba dd 79 59 48 4b 38 bb 23 57 55 c4 61 77 +e6 71 76 9f 36 57 3d 7c b0 ee 7e 82 08 7b 58 4b +58 bb 30 05 30 33 68 c6 59 0a d9 f2 88 2c fa 74 +0d 51 dc 55 eb 0c 79 0f 5b b6 b6 a3 bd 71 f8 b2 +14 6b b9 e8 03 4c 35 b7 ca bc be 10 93 6f fc 5f +0a 8d 7b 30 47 6a b9 16 85 ae d8 fa 95 8e 73 c1 +ee a3 04 4c 56 b4 b8 70 da 89 37 1a 93 b8 96 52 +79 b5 5b b9 2c c3 16 c2 3e f0 97 53 51 c7 49 81 +7d b5 dc d8 6b 94 ad f6 03 bd + +# Encryption: +b8 3c 71 8c e5 c6 ab 1e 40 ff a5 67 0a c1 66 66 +4d 3a 68 33 cb 3b de f4 62 79 4a 25 d5 3e 17 04 +60 06 85 8e 63 f8 8a b9 5d 04 f4 fb 67 74 f7 00 +5d bb 2e 22 d5 19 36 0d 5e 13 38 ad 15 30 8f 6c +64 12 54 95 67 00 7e 02 1c b2 37 ed 4a f5 ee f3 +bc f9 b7 31 59 9f 72 53 ce ba 83 04 f4 ee 8c 34 +33 39 d0 a0 64 eb 77 f1 e9 3f d1 cc 7b a5 fc 3b +b8 18 4c ed 0e 86 97 ac 47 b7 46 20 c4 94 ea b5 +86 ed 9f e7 6e 07 e4 bd 2a 2d 1b 95 59 5b 69 c6 +46 77 a8 83 5d 56 ac 63 9d f8 f6 43 24 1b 3e 2c +46 88 d2 ad f2 28 de 2d a9 bb 0a 36 34 38 e7 51 +b5 25 0d ea e3 05 a3 90 5e 7e 07 7a 4e 8c 74 66 + +# PKCS#1 v1.5 Encryption Example 14.19 +# ---------------------------------- + +# Message: +89 a1 2d 22 bf 87 7d 44 0a 2e 03 ae a9 32 eb 51 +83 37 9b 3c 8b 90 be e8 fe d6 fc 6d af b0 cf 05 +27 + +# Seed: +60 72 89 5e 47 80 c8 f7 7e 0b 19 5f c9 f5 db 78 +33 f7 b6 f5 c8 1c 1d 30 cb e9 e8 0c cb 38 66 06 +9f 8d b6 96 3a d4 6d 52 94 2a 5a 73 f6 a3 27 a9 +4e d1 19 df ce 4c 37 65 84 37 13 b6 19 f9 c4 38 +32 03 d5 5e 2a b6 1d a8 96 1a 81 03 7f 11 18 a7 +82 97 eb 36 6a 1c 51 d9 f9 46 6b 71 5b b6 29 99 +e0 a9 d6 e0 25 01 d4 7f 97 db 40 9e 38 86 e1 36 +6c 3e ff 2b a7 90 e2 62 43 22 7a a1 58 80 82 bc +e6 d5 cd e3 ea 7e fb f1 5c 6c 7d fa 54 54 72 fa +9e 93 95 6a 45 51 d5 a7 7c a0 0e 26 + +# Encryption: +b7 ac bb cf f0 fa 9f ca 6f 0b bd e5 a2 f0 a1 e6 +a0 ab ad b3 2c 89 e3 17 25 5b d1 8d 12 e1 a6 0b +3e 00 2c 1d 69 35 64 48 32 9a 49 b5 bd 24 19 10 +fa 0c e0 3b 3e 68 a5 90 50 75 99 39 1e d1 53 97 +92 29 3f ef 13 17 4d ac ea 6d 2a 05 b3 9f 68 48 +28 a5 d6 d2 17 f8 4b 78 2c 8f c9 84 3c af 6a eb +17 8f 0e 2c 6b d2 a0 e6 f7 b8 09 29 61 17 cc 8a +6b f7 37 35 84 64 24 ad eb a1 ab 31 14 5f ca 3b +8a f7 68 c9 d0 a2 8e 09 d5 8a d4 96 42 31 08 f0 +8c aa c1 74 ac d1 f3 ac 43 48 69 61 c5 c9 0e 1e +fb 89 bd db 7b b3 9f 4c a3 af 57 12 f5 53 af 59 +4c d5 d3 64 13 29 14 26 10 07 aa 1d 5f 21 6b 8e + +# PKCS#1 v1.5 Encryption Example 14.20 +# ---------------------------------- + +# Message: +09 d6 94 8c e1 c1 f2 4c 6d 52 9c bc 5d 6d 6c 1b +ea ab 56 95 b3 0c aa b7 44 96 9b f7 f9 db d2 83 +33 5e 98 a9 bc d6 5d ad 2b 4f 0e 3c ec 89 0b 05 +e6 7f e9 78 23 d4 + +# Seed: +ed ed 62 a6 50 f7 de 3b 12 80 22 9d 5f b1 c4 40 +8e 82 df e0 31 7e 64 30 fc f4 71 b1 e2 8d a8 cf +6b 4b f4 c5 d0 31 e3 ee 68 8b 64 07 72 aa 50 08 +e5 86 3c 70 7a 40 22 c3 29 a6 66 4e 71 10 12 06 +b5 4d b5 40 6e 7f a9 c8 22 6f 42 93 11 19 62 0c +a3 0d e7 d0 3b e1 43 94 0c bb 4d 1a 9c 86 e9 86 +3c 98 7b ff 07 02 3d e1 98 64 f7 33 da 0c 89 bd +03 9f 19 f4 d8 ed 61 6f 7c 6e 94 94 18 5b 60 4a +1a 7b f7 49 0f d0 d8 + +# Encryption: +7a dd b0 5c bf 0b 17 aa 50 8a 0b 17 0c 4c 5a ee +84 ce 06 65 0d 08 c9 96 6d 95 d3 07 1a 9a 8f 3a +93 f9 6a 87 53 99 b4 78 c2 56 d0 41 5e 74 84 95 +98 21 1f 9f 9d 0b 89 36 7b aa af 17 4b 7f 13 d8 +49 0b aa a7 40 96 1f 52 d7 e3 53 c5 04 81 8a 00 +0b 03 67 4d 9c e4 93 dc 3a 4e e9 16 13 01 f6 1d +e5 21 ae f3 f6 d4 1d 82 e1 c5 dc e0 2e 63 6e 77 +40 a1 83 f8 02 3a d2 61 49 41 d9 b1 61 cd bd f4 +8f 8a 56 2c 8f fe 44 f5 7a 74 6f 26 39 e5 e8 3b +cf d3 92 d2 3e 1f b4 a8 d8 5e 3b a5 e1 cb 9c 0e +53 f0 d9 1b 01 ce c0 f0 ef 9d fe 3f 2b 30 65 bd +55 b7 2f b1 70 60 ab e8 83 0a ca 00 44 64 fe 7d + +# ============================================= + +# Example 15: A 2048-bit RSA key pair +# --------------------------------------------------- + + +# Public key +# ---------- + +# Modulus: +dc fa 10 ff a7 46 65 ae ef 87 09 74 ea 99 b2 ce +54 54 7c 67 f4 2a aa 6d d0 1a 2e d3 1f d2 c2 42 +af 5d 96 0b 1f 89 6e fb a3 54 3d 65 54 b7 b1 26 +87 a5 c6 88 56 8f 32 e0 26 c5 32 d2 59 93 b9 7a +7c 28 42 ec 2b 8e 12 35 ee e2 41 4d 25 80 6c 6f +ba e4 38 95 4e ba 9d 27 55 df fe eb 1b 47 70 09 +57 81 5a 8a 23 3f 97 b1 a2 c7 14 b3 e2 be 2e 42 +d8 be 30 b1 96 15 82 ea 99 48 91 0e 0c 79 7c 50 +fc 4b b4 55 f0 fc 45 e5 e3 4e 63 96 ac 5b 2d 46 +23 93 65 c7 f3 da af 09 09 40 0d 61 cf 9e 0c a8 +08 3e af 33 5a 6f ce b6 86 3c 1c c0 cf 5a 17 1a +ff 35 d9 7e cb 60 ef 25 1c 7e c2 c8 a5 88 36 1d +c4 12 66 a4 b7 ed 38 b0 26 ce 0d 53 78 64 49 db +b1 1a 06 ea 33 cc f1 ec a5 75 20 1e d1 aa 47 3e +d1 18 7e c1 d8 a7 44 ea 34 5b ed 7e a0 0e e4 e8 +1b ba 46 48 60 1d d5 37 dc 91 01 5d 31 f0 c2 c1 + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +dc fa 10 ff a7 46 65 ae ef 87 09 74 ea 99 b2 ce +54 54 7c 67 f4 2a aa 6d d0 1a 2e d3 1f d2 c2 42 +af 5d 96 0b 1f 89 6e fb a3 54 3d 65 54 b7 b1 26 +87 a5 c6 88 56 8f 32 e0 26 c5 32 d2 59 93 b9 7a +7c 28 42 ec 2b 8e 12 35 ee e2 41 4d 25 80 6c 6f +ba e4 38 95 4e ba 9d 27 55 df fe eb 1b 47 70 09 +57 81 5a 8a 23 3f 97 b1 a2 c7 14 b3 e2 be 2e 42 +d8 be 30 b1 96 15 82 ea 99 48 91 0e 0c 79 7c 50 +fc 4b b4 55 f0 fc 45 e5 e3 4e 63 96 ac 5b 2d 46 +23 93 65 c7 f3 da af 09 09 40 0d 61 cf 9e 0c a8 +08 3e af 33 5a 6f ce b6 86 3c 1c c0 cf 5a 17 1a +ff 35 d9 7e cb 60 ef 25 1c 7e c2 c8 a5 88 36 1d +c4 12 66 a4 b7 ed 38 b0 26 ce 0d 53 78 64 49 db +b1 1a 06 ea 33 cc f1 ec a5 75 20 1e d1 aa 47 3e +d1 18 7e c1 d8 a7 44 ea 34 5b ed 7e a0 0e e4 e8 +1b ba 46 48 60 1d d5 37 dc 91 01 5d 31 f0 c2 c1 + +# Public exponent: +01 00 01 + +# Exponent: +21 95 08 51 cd f2 53 20 31 8b 30 5a fa 0f 37 1f +07 ae 5a 44 b3 14 eb d7 29 f5 dc b1 5d a7 fa 39 +47 ac dd 91 5d ae d5 74 bd 16 df 88 bf 85 f6 10 +60 b3 87 17 2f ae 6e 01 26 2b 38 64 c2 d3 c2 2f +94 e0 4a 81 59 42 2b 4e d2 79 c4 8a 4c 9d 76 7d +49 66 07 1a 5b bf 5d 04 3e 16 ff 46 ec 1b a0 71 +6f 00 bb c9 7b ff 5d 56 93 e2 14 e9 9c 97 21 f1 +2b 3e c6 28 2a e2 a4 85 72 1b 96 dd cf 74 03 fa +03 7d 0c 57 ab 46 3c 44 8d e5 cc 12 26 5a dd 88 +6d 31 1e a8 d8 a5 90 3f a5 6c 5f 1c 9c f2 eb 11 +cb 65 7a 1a 7d 3e 41 35 2d c3 e6 86 89 8c 4c e4 +30 5e 8b 63 8e 1b 08 a2 a8 6c c9 eb 98 66 f3 49 +9a c7 7b 61 36 b8 1c b2 76 d6 14 cf eb 7b 6e d3 +f3 bc 77 5e 46 c0 00 66 eb ee e2 cf f7 16 6b 57 +52 05 98 94 7f f6 21 03 20 b2 88 fb 4f 2c 3f 8f +e9 7b 27 94 14 eb f7 20 30 00 a1 9f c0 42 48 75 + +# Prime 1: +f1 23 bf e5 3d e9 7a 56 9d 91 ad cf 55 6f a6 25 +ad 30 f3 fd 3d 81 1f 9e 91 e6 af 44 b6 e7 80 cb +0f 32 78 29 fb 21 19 0a e2 80 66 46 d7 28 cd 9b +65 31 13 2b 1e bf ef 12 72 99 30 60 f1 ce 70 b1 +24 39 30 91 ee 85 93 b7 27 36 7e db ba 00 9e c5 +be 17 c4 ac ee 12 0c 84 12 67 d4 76 31 a1 6c 36 +a6 d1 c9 99 73 c1 b0 b5 a8 35 bf 39 fe af e8 f6 +42 1f d9 c2 a9 0b c2 79 76 65 9e 67 bc 83 12 4d + +# Prime 2: +ea 98 39 b7 e3 7e a8 9b bd a2 7e 4c 93 47 1c b4 +fd 92 18 9a 0a 96 bc b4 d7 56 93 f1 8a 5c 2f 74 +2a f9 e3 6f de 67 9f bd 9e ae 34 5f a2 69 52 7b +69 65 02 1c 4b df 54 d6 85 bf 08 96 0c c9 76 f6 +8d ca 21 ce bf 44 f2 68 a5 9d ab 8d 1a 25 e5 19 +f5 14 7e 1f 45 fe 28 7d 74 cf 72 5b ec 13 26 d3 +42 12 c5 6c f4 ff fa 20 2f 57 b6 8e e8 cc a9 43 +f3 c1 38 c4 cd e3 3b df 2c 94 40 df 65 32 24 45 + +# Prime exponent 1: +ca 0c 9b 60 b8 e4 a6 06 67 56 c6 5d 20 88 41 9d +f6 25 3b 7b 68 8a 85 f4 f6 e9 64 d8 5d ad 52 a4 +52 62 86 7f 1e 96 18 06 9f cc d8 65 e9 28 9e 46 +e3 9e 20 22 94 4c 5c 44 87 d3 45 cf 25 2d 46 0d +97 7d 77 ed fe fe db cb ae 46 a2 3a f7 fa 47 0f +07 7d a0 e5 09 42 04 4c b1 a3 60 49 7c c2 76 0a +c0 f2 ad 4a 2f cd 0e 84 d7 a1 d9 4d fd d2 65 8f +d9 ce 18 47 5c 1f a7 5e e0 ce ba d0 cf 0a c0 4d + +# Prime exponent 2: +52 81 71 23 3c 4e 4a 6c 63 b8 67 64 f5 13 38 84 +6a fd db cb 29 58 34 4c 01 c4 00 4a 1d d8 28 14 +5a 1d 02 a1 50 7d ef 4f 58 24 7a 64 fc 10 c0 a2 +88 c1 ae 89 57 21 d7 8b 8f 04 4d b7 c0 0d 86 da +55 a9 b6 54 29 2e cd 76 82 70 be 69 e4 bd 59 22 +d4 ef fd 1f 70 95 5f 96 27 e3 e1 9b 74 9e 93 b4 +0e f3 dd 1d 61 d9 39 15 e2 b0 9d 93 0b 4b 17 68 +bf ac c0 13 6f 39 b0 cf df b4 d0 50 01 1e 2e 65 + +# Coefficient: +df 2e b2 32 2c c2 da ab f4 d1 46 55 08 f4 15 21 +cd a7 ce ff 23 eb e6 1d 00 d4 41 ee 72 8d da 5d +16 c7 bf 92 0c d9 5f 34 be b4 fe 32 ee 81 7e f3 +36 2e 0b cd 1d 12 45 f7 b0 77 93 ea a1 90 dc 5a +37 fd af 4c 68 e2 ca 13 97 2d 7f 51 48 b7 96 b6 +fb 6d 7a dd a0 7b d2 cd 13 be 98 ce be d1 ed c6 +ca 41 2e 39 53 50 c5 9a 1d 84 2b c4 aa 2f 3c 0b +24 3f de 7d fd 95 35 6f 24 39 25 1a 11 72 c4 5e + +# PKCS#1 v1.5 encryption of 20 random messages with random seeds +# --------------------------------------------------------------------------- + +# PKCS#1 v1.5 Encryption Example 15.1 +# ---------------------------------- + +# Message: +2a ac ec 86 f4 23 dd 92 5e c1 58 82 2a 74 8c be +6c 31 a0 + +# Seed: +cc 4b 87 f6 74 49 7b b0 e3 3d 9e 2a 4a 80 70 b7 +d7 8b 5f d2 c4 b4 f6 eb ac cd 4e e5 05 b7 1f ca +fe 21 56 33 7d df 27 b4 75 af 33 f6 c3 40 5b 8e +3c 0c 20 6e c2 81 29 22 fc d8 a3 66 1b 86 19 bb +c1 82 f8 07 f3 a1 07 2e 62 ca 2b f1 fa 8b 94 4e +58 a0 e2 03 db b7 53 f9 f1 b6 ef 62 7e be e5 98 +96 7b 38 7a 5f 96 36 d8 b6 41 b3 89 84 b1 ca 03 +7e 3a ae aa 17 10 f5 16 25 ea 85 f8 fb 9a 6e 02 +9e 64 57 58 14 d5 30 fc 14 6b 34 45 ac 42 01 b4 +e4 08 ad f6 55 f6 78 43 d8 87 1c ac e5 d9 06 d7 +fc 03 8f ea 88 5b 96 fb 8e b1 a7 21 c6 c1 4a bb +eb 78 fb 4c 79 8a 19 58 99 59 89 84 55 a3 16 84 +3c 6c d9 9e f5 8c 2b 0b 49 b8 ab 41 91 b4 02 a5 +4c 92 97 31 0c d2 24 b1 7f 21 41 67 72 5c 48 fc +c6 1b c4 7c fa cc f1 5e b3 b0 + +# Encryption: +60 42 e7 45 58 9a f0 3a f8 75 20 f9 3c 45 d8 c3 +59 85 ad a1 16 1a 37 d8 22 e9 f9 46 0f c7 5f cf +01 79 d8 49 1b 8f 5d 1e 4d e8 ce b3 1e 07 c4 86 +5c 5a 3e fd bb b6 9a 88 03 b8 9e e6 5a 43 0a 58 +09 c7 07 56 91 50 b5 80 bb 68 6a 94 c5 54 1c 46 +ad cd 82 79 60 ce 24 4f f6 88 38 7d 16 16 e8 5b +4d 17 80 c6 48 36 06 cf 92 4b 54 f0 80 cf 41 54 +e6 68 29 bf 6e 53 24 81 04 8e c4 1f ad c0 7d 75 +5b b3 4b b2 81 45 21 9c b3 0d 47 d0 d6 18 70 91 +80 e9 03 03 ff 9e f0 90 18 be d3 da 75 76 1d a7 +94 81 1f 96 bc 9e 8d 7c 4b a1 b5 94 6b da 0b d3 +13 fa ec 4c 99 3e d2 74 8e ed 8c ce 4b db 52 0b +a7 db 16 5f 9f e5 6a a8 45 4d 6f f3 38 74 fe ee +bf 29 de 2d f5 b7 f0 0a a1 d9 fb 07 3f c4 06 7b +58 dc 50 62 4e 12 7f 71 1d de 2c c2 cf da b4 91 +9c cf 28 c8 36 60 df c2 27 b0 f5 00 ec 1f 90 4f + +# PKCS#1 v1.5 Encryption Example 15.2 +# ---------------------------------- + +# Message: +5c 8b f2 ac ab 08 bf fe fa 64 80 95 2b 24 da a5 +01 9d 12 5f ee + +# Seed: +5e 16 30 70 ef dd b7 9f 47 64 f8 a8 1d 44 46 0b +5c 40 0b ec 70 37 52 29 20 f7 72 95 9f d4 cf 3a +ef 2f 14 45 4d cd 9e 86 25 12 ca 69 db 83 68 a4 +cd 8d 1a 44 da 59 5d 6b 43 93 91 c9 31 46 b1 23 +f1 86 08 3c 4b 64 47 bf 7e 20 81 51 46 ac 75 49 +ef b6 74 60 e8 ff 1b 2b ba 5c 95 a5 1e f8 13 d5 +dc 4e 6c 38 92 bc 4f 43 9c 99 11 7e d0 6c 14 a6 +c5 40 fd 4c 65 d1 95 d8 c6 1e a7 79 68 38 e5 a5 +df af 11 d0 71 3c 19 1e 8a 0b 80 80 f7 a7 7e 70 +3a b3 66 22 f1 c6 48 b7 65 43 5b 90 27 97 18 11 +b1 15 2d 97 2f b7 6a a8 92 05 03 3d 95 78 18 7a +e6 34 88 fd a3 c8 6b 2f 28 e7 79 ac 4c 89 cd 25 +20 17 d1 a9 95 8a 52 c5 b8 7e c1 bf 9c bd f7 de +0e 97 c5 8b a1 1b a3 a3 37 05 f3 f4 99 58 9a 3a +72 e2 c0 fc 5b 16 fc a2 + +# Encryption: +44 e6 71 e0 3b b6 67 80 ec 05 86 d5 6f 8f 6a 49 +41 5a d4 bb ce 22 6d 75 d7 0f 06 ce 29 de ea 7d +a1 af a8 28 7e 44 36 3c 51 0f 34 eb 8b f3 1c a2 +47 29 59 26 9c 18 df 09 36 ff 12 c6 16 6f 4f 45 +96 cb 1c ae c4 1d ed a8 c5 09 99 bf 4c 94 4d 21 +37 5b 36 75 31 91 b4 cb 7c aa 1b 43 e9 11 6c bf +1d a8 b2 01 d2 97 a4 d0 8b b0 e5 bd c8 95 32 70 +f7 c2 80 96 78 c4 4b ea 75 e8 1f ac 22 d2 71 06 +30 2b b6 9d a0 74 b6 ef a6 68 8c f8 35 c8 0b f5 +e4 55 35 28 ec e0 b7 c1 b7 7b 66 6e a3 45 23 ec +1f cb 3e 25 05 4e 0b b8 e4 ba 02 7e 5c 21 bf 7a +51 43 bf 04 1c e9 cc bc fa fa 87 80 82 fe 41 f7 +8c 70 bf 4e 53 cf 48 7c 1a ad b0 19 15 ce dd e8 +cd 9f b8 4e fd 98 1a c9 8c d5 7a 82 56 d4 e9 e2 +d0 86 2d ab 04 54 d3 ff 4f b9 85 26 4a 46 99 5a +b0 68 a7 4e dc 7e d8 ae ff 5f a3 0f 3a 7d 75 94 + +# PKCS#1 v1.5 Encryption Example 15.3 +# ---------------------------------- + +# Message: +e2 00 4b 31 07 39 98 2c fa 9e 95 45 3a + +# Seed: +e9 3e 64 12 33 7a b7 b0 f1 b5 69 80 1a 3c 16 4a +6f 23 e3 c2 7c 7c 55 a8 c5 ac 9e af 31 88 55 f8 +32 8b 5d 7a b4 cb 86 19 a0 0e 99 41 cc aa 94 85 +70 52 71 82 61 74 43 c1 d2 1e 4a 6e 21 b3 f6 d4 +f6 98 a6 1a e0 29 17 2c f4 da 03 9d 91 58 5a 87 +da d1 28 c2 fa c5 53 1b 2f 45 dc ef 9b 9f c3 31 +c8 04 48 85 28 84 7c 90 87 5d 19 07 5f ff b0 05 +76 3d 88 e0 81 47 66 92 28 a9 aa d0 16 25 bc 61 +11 2c c7 b7 72 f3 21 d4 33 d4 f2 69 78 20 9d 0e +79 67 6a f3 b8 a7 4b 97 3f 52 ab 91 90 85 f3 52 +35 5f 85 6a a4 0f fa bc e5 43 d4 e7 6d 45 48 92 +98 9c b3 83 f3 e6 6b bb 0e 8f ee bf f7 c6 a5 4e +f2 62 5f c4 05 0e 6f 87 a3 23 13 2a 4e 67 12 68 +fb 83 cf f2 d8 22 51 b7 9c be 32 da a8 e5 53 20 +2f e8 87 22 61 f6 0d 5b b5 11 f2 fa 2f 14 21 a3 + +# Encryption: +2b bf 6b 0c 5c f2 0e f2 f6 c5 a0 aa 48 45 4f 85 +0a a5 f6 bb eb 03 0d b4 e2 be c1 1f b2 00 f0 1e +4e ae f0 44 d8 14 33 33 33 8e 5e 66 38 00 87 66 +0e d0 17 3a 76 82 12 85 67 7e 37 1f 28 ec 45 00 +f4 d5 9f ab ab 20 73 e7 34 36 5f c6 b0 94 ee 0a +db ce ac cf e2 49 88 ce 61 5d 60 5f c3 40 8c 03 +be 22 1c 99 3f 61 aa 72 4f c8 71 4a 8a 4a 18 15 +f9 e9 a9 98 82 aa 46 88 3e 70 47 4e 33 29 b9 91 +e6 d5 3d c6 b5 00 86 19 92 34 3a 6d a8 9a 8b d6 +f3 7f 34 e5 de ee f8 0e 7d 56 b9 3a 45 17 60 66 +36 50 fa 45 5d 55 41 89 9a 76 aa d1 c6 27 5e c8 +2c 46 07 12 26 59 b5 08 cb 5d c0 26 ac f9 3f a0 +1a 5f ca 3d 81 c1 bb 20 a5 a5 cf 35 7a 23 c9 56 +88 ea 42 eb 1e f2 c9 d4 6a e3 7f 8c be 61 5c 20 +84 d9 89 b8 92 f0 16 7b 23 be 33 62 fa ce 80 8d +6a 5e b8 96 19 44 08 db 7c 01 63 9c 58 62 30 4c + +# PKCS#1 v1.5 Encryption Example 15.4 +# ---------------------------------- + +# Message: +db 6a f1 29 23 05 27 8c 5b 33 83 f8 a4 1d 6c 83 +52 21 14 c9 88 85 50 74 06 5b 23 f9 fe ae 8e a4 +31 fd 5d a3 6f 9b ab f9 dc 61 df 2e 39 23 47 83 +04 73 38 ec 4f + +# Seed: +cb 85 1f b2 76 a7 49 1c d3 ef e4 d3 39 50 16 c1 +ec 2b 15 09 4a 1e c6 d9 30 d4 ca 21 b4 20 f8 47 +ff 68 68 f0 14 d2 09 ff 80 7e 8b 1f 71 67 0b 32 +50 94 c0 f6 e3 2f 84 f7 68 22 22 02 b2 1b e3 6a +28 6b 30 e0 82 ef 3b ba 64 7c eb ee af e3 10 69 +44 18 d7 0a 67 9e b2 01 07 80 dd 0e 96 55 3c 43 +cb c6 d0 0e ac 22 aa 71 f2 48 21 c4 d6 c1 77 8e +78 6c d8 c7 bf 2c bb f2 14 e2 03 e2 ef 2f 33 35 +78 cf 1a 94 7e 27 e5 99 96 29 0c bc d6 ca 3f 8f +96 ba 67 e0 e3 41 30 cf df 86 ef 48 e6 7c 90 b8 +b7 2e 6f 42 55 01 7d a2 d1 f3 ae dd 7f b1 d9 de +42 ef c0 37 ab e6 61 6e bd a8 d0 b4 0b d7 80 cb +db 68 ce 54 31 8f da fd + +# Encryption: +c9 9a 9a b6 7c ad 0c 41 ec 84 7b c2 74 67 fd f5 +bf 61 ed 6d 04 c6 5f 7d 9d d8 bb 70 07 a8 a9 b8 +3a 3c 38 a9 cb 92 5e 3e 7b 3c 40 7d 64 66 93 15 +b3 54 49 e7 54 28 ae 96 19 14 b0 b9 10 23 e7 83 +19 1f 95 41 b6 78 65 97 1c 95 b0 be 18 93 1e b1 +c8 47 c2 6a 29 83 c0 58 4e b2 17 c9 9c 70 5f 5a +d8 cb b0 9f 99 b0 6b df 7b d1 26 28 ae 36 67 c1 +2c 72 27 d9 6f f9 c1 08 dc e3 22 51 06 f6 2f 9a +4a 3a 81 17 a9 92 f2 88 c3 b5 97 91 09 87 8f cd +59 c6 79 6b 19 98 48 2e a8 2f 30 1c 93 91 83 b2 +dd 47 88 04 48 67 8a cb a1 2d 7b c8 a5 52 eb 32 +76 34 e9 2d 0c dc f7 1e ff b6 66 ad 90 2d 9e 26 +ad 18 60 e2 92 81 d0 2f b0 c5 49 3b f7 4a c0 2c +94 40 43 6e 0d 75 32 28 92 77 7d 32 5e c8 45 2d +e7 58 cc 6a 5c bb 02 d3 41 f4 5c 9a c8 ed f1 50 +da d7 15 82 dc 77 95 8a 85 44 b0 b5 58 ee 2a 0b + +# PKCS#1 v1.5 Encryption Example 15.5 +# ---------------------------------- + +# Message: +e7 99 e4 eb c8 69 31 9e e2 25 80 + +# Seed: +3a 07 57 cb 49 a3 fe 6a e8 0d 37 42 06 8b 5c 80 +68 b8 c5 88 54 20 01 10 93 c2 20 99 ed aa db 49 +1f 22 6f 85 60 66 16 3a b5 10 5e 78 79 c7 49 1c +18 35 98 5d c4 94 21 0e f7 8b ad 48 16 d9 b6 94 +c9 c8 be 46 6a 4d 17 8a 7d de cb ce 53 65 40 0d +68 21 b6 e9 ae 0e 03 bb 69 ad c4 ec 73 4a fd cd +ea 6d c0 c4 85 96 c4 8b 27 35 ef 70 f3 73 4c 18 +6d 03 18 37 8d 2b f8 09 96 88 67 2f a3 85 91 da +4a e6 fc 11 2b 72 7e c8 19 84 df 7b 56 c9 84 4e +25 b0 fc d8 1d 2b e7 d1 8d 01 64 6a 6d 9f e2 25 +d3 69 7c 34 ed 2e 33 6c c0 37 3d aa 28 d8 82 e4 +97 75 7b 0a 65 10 86 2e ac 10 d3 b2 4a db 25 2f +30 d4 34 e3 0a 63 76 46 9d 80 b9 57 11 16 17 78 +df 35 88 9b 3a cf b1 f6 53 ea 63 07 2f 35 a3 c8 +9f 6b a5 2a fb bd c2 8f 23 d3 8f 4d 4e 79 fc 39 +7c 10 + +# Encryption: +3a 3e 72 5c 6e 4b b0 06 12 69 61 8c bb 8a 62 67 +d9 55 83 ab aa 03 d8 df 85 a4 f6 a5 cc 35 9b f1 +15 26 0d db 70 ae 7c 66 bb 8d 87 d6 33 1f f1 b0 +b5 4b e5 64 8e 83 e8 3a 91 c5 4c f3 71 49 6e e5 +ca 02 73 b1 9f 70 03 70 c2 c8 cd f4 28 13 38 a6 +e7 2f 66 32 41 68 ea 8c db c6 4c 60 9b a9 67 91 +c7 91 b5 ac 84 00 99 2a 8c 66 fb 09 f4 e3 13 07 +49 12 af 0c b7 41 5f b2 15 eb 97 fa eb be f1 a4 +47 23 9a 91 db 4a 34 fc a4 d8 43 46 25 9e e0 a1 +da dd 10 b7 f0 1f c8 c5 3e 42 0f 88 cd fa 0c bc +f6 2b e4 4b 8a 79 40 86 4f f8 13 7e db 12 2a c2 +da e5 41 0a 47 cf 07 62 e2 0f 20 86 cb f6 6f f4 +d1 a9 f7 27 0f 00 9c b2 e0 7d 90 20 b4 8a 76 d2 +41 08 e9 98 9b f9 04 e4 a7 1d db 91 74 0a d7 e5 +d1 b6 8e c6 4e 3e 66 cd 0e 89 7d cc 66 57 39 eb +ac 45 19 93 f0 2c c5 bf c6 3a 60 2f 55 83 81 da + +# PKCS#1 v1.5 Encryption Example 15.6 +# ---------------------------------- + +# Message: +09 97 12 b8 26 ba 67 cf 92 92 25 bd 61 2e c0 65 +d4 51 ed e2 31 c8 d5 c2 04 04 d4 70 e7 9a 7a 1f +24 6e 3e ec dc c7 5f 08 53 29 f8 f1 7b 81 d1 30 +30 0f c3 b9 f0 93 a2 + +# Seed: +81 cd 64 c8 4d 77 65 fc 60 e4 de 3b a9 b4 dd 21 +dd fb 74 fe 2d fb 7c f6 19 db a4 cb cc 17 6e d9 +4e 6f 37 ed 1a 97 e3 bf d3 63 65 d2 64 4d 3b 6e +e6 c7 71 09 fa 18 41 2e e7 cd dd 3b e8 d4 bd ee +94 c0 96 f0 72 ca b6 f1 88 6e 3a 84 a7 fd b5 af +f3 dd 83 f7 e5 c5 b4 9b b1 b3 8f 8f aa 75 25 31 +d8 9c 88 39 3e 9e b8 f5 7e dc 5b 9f e6 ed 2b c9 +5d 27 2c a9 95 f7 e2 59 b0 08 32 d9 8b 87 23 12 +cb ef 8a 04 8f 6e b7 91 97 84 ae d3 d3 1e b4 b1 +2f d8 07 60 a1 34 c9 d6 c3 34 c2 dd 3d fd f4 97 +5c f1 b5 1e 87 12 2b 97 33 33 44 96 08 ff bb 2c +f3 0a 02 bc 46 ea 24 7b 45 39 b1 86 07 bd 47 d3 +cd f0 87 72 14 ba + +# Encryption: +78 6b 3f 59 9d 1b 74 3e 23 58 26 24 fa 2c 94 a3 +6f b6 bd 33 fd dd 57 64 08 cc 85 4a d7 cf 66 7f +17 38 0a f2 0b 0b 73 0c 6b e9 8c 01 80 76 b9 b5 +04 1d af 2e eb 02 54 69 30 0a a4 36 43 35 be 26 +7d 33 b0 6b 4a 7a 79 7a 3c 0a a5 fd 3f 91 6a 55 +dc 27 4c 0a 24 87 f1 25 f9 da 82 59 6f 43 4c 7f +ba c7 ec e2 ef 6c 83 e0 34 8b f4 f2 c0 83 05 07 +55 b5 6a 9c 63 47 f3 9c 76 b0 e0 ee dc 61 54 10 +25 c2 3a a1 85 5c 0b 22 b4 46 fe 1e c5 f1 11 2c +5a 7f c2 85 ef dc 84 20 ec 01 a3 a7 c3 3f 73 5b +45 55 09 2a 9e 8d e1 6f 3f 7d 46 9f 88 cd 75 c0 +1c 7f 2e 7d 54 6a 1b 9e 7f 49 84 fa 29 a2 cc 80 +d3 10 f9 d7 81 8d f6 d9 ad 6c c2 05 37 4d 52 e8 +e1 73 90 bd e7 2f 25 b7 12 a4 26 9f 23 ae b2 41 +a6 66 e9 64 96 cd 84 b8 33 fb 53 d0 57 1f 7a c2 +d1 96 4b 8f 2a 7e 13 33 6d 9a 7e 03 04 1d cf cb + +# PKCS#1 v1.5 Encryption Example 15.7 +# ---------------------------------- + +# Message: +5f 2a 5c 7f 93 e7 14 ee ca b3 a5 5a 69 c7 9a 3c +bc 15 bd 19 df 27 98 9a 9b ab 59 fb be a9 ff cc +66 3b f8 e1 e7 40 7d c2 73 + +# Seed: +e0 19 60 82 6d 1a 69 f6 84 c9 c0 b8 5d 84 dc a5 +81 1c 89 a2 c0 74 2f 33 a2 ad 19 9f b6 57 a1 aa +98 13 60 1d 29 93 6a 43 d9 b9 eb 4d 32 89 cd 7d +37 06 ab 86 b4 d6 6a da a7 e0 a1 34 51 b2 ed b2 +bc 77 10 91 11 0c da dd 7e e2 e6 aa ea 2b 35 cf +ae 4c e3 b1 da 18 16 68 4c 89 c0 b3 fb 2f 87 79 +b2 5c e0 c1 2d 42 b1 d3 d3 0b 8f 20 be b8 99 91 +6e 4f d0 a1 58 86 37 19 2e 05 28 ce 6e a5 4c 8e +b7 54 fd 7f f0 03 25 81 a9 50 59 98 e6 9e 14 f0 +72 bf 95 df ef f0 14 df 99 ed 78 53 b9 82 e8 89 +41 29 a1 d2 7c 53 ea aa 23 4c 8d 14 a7 ff c5 f5 +e2 18 7c ef 79 eb f5 2b 3d 6c 06 65 89 5b fb 87 +e4 bd 61 0e 35 8f 35 26 da 05 92 c9 e5 02 b7 2b +76 e4 65 66 + +# Encryption: +77 d9 07 18 1c c3 b1 bb 19 81 e8 cb 22 f7 ad 75 +f8 82 e2 6a fd 28 1b 64 db 70 c8 4c 6a 50 fe 74 +24 9e 22 fb ee 90 e3 0d 0b 70 ae 2f 7e 12 ac dd +f6 78 f0 0d 22 7e 53 61 54 26 62 43 02 69 fe ea +34 12 47 92 af b3 f8 7b 30 f9 50 f4 ed f2 2c 44 +04 c9 68 8d ec 38 ea 0b 99 cb 3d c3 84 bd 88 fa +31 83 d7 e0 7a 20 54 d7 3e a5 1d 42 86 bb 39 da +e3 ae 6d 0b 96 51 f1 ea 48 8f 80 5f 2a 21 6e a2 +1a 56 76 b9 7d 1b 11 d3 b4 03 6c e1 67 fe f6 4e +0e ba 41 9a f6 73 98 3f c6 ee 01 c6 37 b1 64 e5 +aa ac c9 9a de e9 f4 7d 21 92 54 69 6c 8f ce ec +6c 74 ac 4e 39 05 1e 15 26 94 01 73 82 64 f0 ca +5b f1 22 c5 5c 9e 5d d8 47 b1 d5 77 4e 74 08 c3 +68 4a a9 74 b0 ba af 40 ed c2 2a 03 57 af 72 c8 +16 cf 73 1f cb 63 96 53 60 69 9f 26 99 97 b8 48 +0f 30 a6 b5 d5 7e 12 a5 cc 54 ec 0c 80 5f dc f6 + +# PKCS#1 v1.5 Encryption Example 15.8 +# ---------------------------------- + +# Message: +55 61 39 59 3e ee 8b 6e 87 + +# Seed: +2d e2 a5 72 24 f5 f5 b1 2e 22 3e b5 f8 2b 9f 47 +24 9d 25 55 93 79 13 6e af 18 e2 f6 c8 33 e3 f0 +1b de ea 9c 30 3b d9 67 7c 2a 85 71 7d 59 3a 28 +02 ae cb c6 b3 b7 1f 2c 79 03 ff 69 0e 3f 3c 49 +57 dd 74 cc 9c 2a 68 dc 1d 31 9c 1e 17 87 bb b7 +f0 e6 e5 1e 39 a5 ba db ba 9f d4 67 66 19 74 31 +2b 55 7a f1 89 52 54 9f 6e ba 9d f4 9f 70 ea b3 +68 9f 9f a8 fb ea 1c 97 e1 bb 2f 09 3e 6a ca 9c +38 0e dc 54 6a 19 c4 4f 91 f6 dc aa 28 9b d1 14 +fe a1 b0 36 f9 9b 1a 57 f8 61 43 d8 67 5b d0 7d +4d ea bc 9d 51 0c 61 70 99 44 9c cc ed 5c 45 07 +b7 9e 85 1e fe b1 8d 06 b1 99 81 0b b6 b3 cb e4 +12 73 ba a7 35 16 02 e5 f9 52 13 f9 69 55 ad 5f +dd 3a 20 52 db c7 5f cf 60 aa 22 47 f2 d4 e6 03 +da 45 37 0d e1 c1 da 68 7e 26 8e e4 46 67 f9 4d +ad 13 bc 9b + +# Encryption: +4a ce 54 a7 52 f5 56 e3 6e ab b1 19 48 95 84 12 +14 0c 80 c3 1b 61 dc 40 f8 1a 6b 12 17 a0 1c e0 +67 ab 37 f5 3d f4 c7 7d 9e a9 c2 d7 95 0c 8c d4 +97 00 b8 cd 24 d4 e7 8f 7f a3 46 29 62 cb fd e6 +d0 2f b0 e5 03 65 64 93 25 05 ae 1c 85 1a a6 d1 +d8 4e fd 04 d5 78 ad 68 27 3a 36 a8 ae 23 d1 45 +2f 94 a9 37 88 17 71 3e 76 4a 09 17 45 26 29 b5 +dc 75 b5 7b 0d 5e 6a 72 8c 83 69 11 72 d2 cd 95 +f8 ba d0 7d b4 68 eb f5 45 b7 f3 f2 c8 63 b6 e2 +0c 67 c4 76 9d ed 03 91 a3 36 f3 a5 d8 7e 24 fc +f9 1a af 77 4b ee 77 a7 89 a5 90 80 09 c7 a5 5e +ac 92 af 4c 3d 46 1e 7b 40 61 6c e8 06 19 4b fc +20 74 c3 f4 f1 35 59 70 0b 27 08 a0 b7 55 78 96 +70 a3 62 6a 14 63 88 11 bb 18 e1 5b 10 25 c3 b9 +be f1 11 17 6b c1 f2 46 9e a9 9a ad 20 86 05 73 +d6 c6 a1 fe 40 db 51 e3 6f e3 38 00 10 1b da 20 + +# PKCS#1 v1.5 Encryption Example 15.9 +# ---------------------------------- + +# Message: +9a 13 96 62 2d 06 6c 10 56 08 58 c2 c4 cd 5c 04 +44 9e 2b 95 50 c5 bc 92 93 76 1a 91 04 41 1d a1 +8a 57 d9 b6 a9 97 33 3c db ce 77 e9 fd be 6b b8 +31 + +# Seed: +f1 78 61 ac ff b2 4c ac ed 90 ba 38 aa 7e a0 f2 +e5 4e ea a6 2a e6 64 98 f3 c2 8f 99 6b ce e2 53 +be e8 19 9e 3e b8 0d 62 7f ee b6 e0 b3 94 90 ed +f7 6d 16 a2 a0 bc 20 09 32 52 a9 d7 f1 f9 38 8b +06 19 44 85 2a fb e7 3c e4 13 a3 fc a5 21 b9 47 +4e 67 81 29 46 4d 91 b8 2b ca a5 9f 56 ec fb 12 +4f 61 f5 04 67 13 01 05 b2 cb c6 94 3b 95 36 95 +cf cd 20 c9 b6 ef 53 f3 f2 10 33 1d 39 32 dc 01 +0c 73 59 29 09 6b 2e 68 ff 16 66 4b 0b 90 a0 fa +1b e4 60 57 85 92 b0 cb 4d 6c a4 5e a0 6b de 3e +8a 1e bf ef 70 d8 3e f7 9b 3a 74 db 06 0f c0 20 +3b 74 80 7f 40 70 01 f4 b4 d9 9e c5 15 8e 8e 7e +4b 10 2a 51 5d e9 5d 2b 70 fe 1f b4 + +# Encryption: +10 0e ce 63 45 25 d4 67 f6 d4 a6 b6 6e de 1c c2 +37 f6 1f b2 b6 70 23 a8 3d c4 56 b9 2c da 18 3e +d6 62 0f e5 7d 5a 67 33 2c 77 23 3a c1 e8 72 5b +36 f8 e1 b1 08 41 2c a6 fb 35 dc d4 d8 16 77 a2 +b3 0d 5e af 25 e0 b9 19 1b 38 f7 ee f8 3f 91 21 +a8 08 43 8c 92 ab 03 f5 20 80 7b c9 a8 94 70 5e +af 4e ed 06 68 23 a6 7a a2 a5 59 9c d9 5e 58 da +7c 09 48 36 d2 af eb a3 9d d0 09 a6 4a de 03 05 +33 76 f0 29 36 cf 3f 56 bf 64 c1 f3 bd c0 7c 45 +a9 5b 9f cd 93 96 cd 9a 8d 41 bc c5 64 24 93 7a +13 71 b3 84 7c 90 5b 9a b5 84 02 39 3d 40 46 e4 +a0 15 c1 47 08 f7 4c e7 79 0e ba 8a f7 92 07 24 +40 bc af b1 4c 0f 81 08 97 11 87 c8 0f 46 3a 1f +ff 25 86 46 ea 16 e5 1c 6e e3 61 b6 61 a1 4f 07 +cd 4f 5a 82 c7 09 f4 94 f1 df 0f 80 3b 6f 64 a7 +2f b9 c4 50 ff e2 68 fc ab 48 7d 4d 63 01 3e 41 + +# PKCS#1 v1.5 Encryption Example 15.10 +# ---------------------------------- + +# Message: +b3 82 4f b5 45 a8 3f 82 ef 82 23 11 82 84 c5 45 +6b ab 60 0a df 79 f5 07 33 b6 66 8f bc 51 5d a5 +96 31 62 a6 d7 d7 e9 6f f9 1a ff 12 eb 3e 93 11 +e2 21 e7 0b c0 + +# Seed: +b8 26 8e 4b ce 7e 53 f2 e8 be 98 b1 92 d6 3a d0 +65 44 a8 0d 6e 62 d6 32 48 6e 15 e5 75 ba 70 6e +3e 76 89 30 dc 8e 41 1f 8e eb 0b 6e 8f 06 06 29 +da 8a 24 23 68 e4 79 cc b3 31 69 70 70 b4 b3 52 +4e 69 16 92 76 ba b0 a9 45 14 cc d6 60 70 25 28 +ed 20 b5 d1 df 07 77 9a 62 c6 56 86 e7 d6 68 46 +6f fc 74 8e b3 43 44 ca 6f 30 5c da 3d c3 e8 f0 +1c 43 ea 91 79 da 46 21 47 f4 d3 ec 92 f8 88 b7 +ee aa 41 0e 12 c8 6d 89 42 c7 d0 12 f4 5c 61 ff +a6 e2 b7 8f 84 3e 9a 75 d9 67 32 14 d5 58 ca f0 +1b 45 f9 36 86 ee da 54 79 db 80 52 79 25 59 cc +23 6a 4a 1e e6 5d 3c a6 0e 09 a3 c1 84 d4 b3 95 +d7 0b 8e f8 8d 78 09 1a + +# Encryption: +c0 e9 8d 50 89 4a da 84 9f ce 89 83 f6 f8 95 74 +03 4d 6c f3 b8 35 2b fc 50 72 4a 70 3d d4 f4 2f +40 06 ae 00 8a d9 72 33 ce f6 f1 6c e1 b4 23 f5 +2c 6b 67 7e f0 05 13 1b a9 87 f9 8c 72 2f aa 49 +42 ec ce 2c 99 66 37 40 a1 a1 e9 81 20 fa ed 97 +fd 03 ff 36 fe 73 75 8e 70 df 17 f3 1f 1f 39 41 +81 2d 34 ca e6 c3 9d e7 87 ef 57 04 bc 39 c9 20 +ea 5b 0e b1 83 3e 83 b4 57 94 fd e0 ff 00 05 c6 +27 33 c7 0a 29 6c a0 bd 47 f0 65 50 3d dc e2 d6 +49 de 1c 32 8d df 60 32 a3 3f ad 46 ba 04 1d c0 +a9 94 bf 0f 56 a4 65 f1 62 5f cb 81 ce 01 fa 29 +9f c2 b3 c8 09 39 eb e6 a6 73 82 6e 2b 2f 12 ec +dd a5 03 5c 95 09 31 2d d1 9f 10 c3 5c 8a 8b 0d +a6 3c 08 51 97 00 6a 9b e2 36 10 8e b9 87 91 b2 +6e 28 08 b5 cc d5 ac ec 73 8b ca 02 5b 24 18 2e +f4 ab 9c cc b1 71 a6 9f b4 23 a4 6e 03 7a 4d 0a + +# PKCS#1 v1.5 Encryption Example 15.11 +# ---------------------------------- + +# Message: +a3 a7 da 1b ed b2 ca 99 fc de b7 a4 6d 63 3e ca +35 06 2d f2 89 6b 69 59 07 a7 f9 71 d2 cc 50 b6 +e3 d2 a3 67 d1 6e 72 7f 56 97 c0 + +# Seed: +f0 18 a9 b1 3f be 56 0b fe 95 52 ed 8a 86 06 be +ea 90 05 5e d3 f6 2b b2 af 07 f6 92 cb 60 ac fb +6d 59 07 d6 0e 0a 59 7a 54 ca ea f8 44 91 1c dc +87 4f af 95 69 53 a2 7d 30 0e 9b 71 5b 10 4d f3 +c2 32 c3 c9 63 82 cf 5b 5f 3d 07 b2 30 b5 25 bb +33 0e 31 9d 1a 7c 82 d1 53 af 81 7e f1 1c f7 2e +76 dd 50 b0 d7 e5 56 22 65 c8 34 5d a8 29 f5 60 +d6 a5 4e 6f 1e 28 8a 3d c2 17 6d 19 a6 8a 0b 1c +5c 92 b1 6b 8b b2 9e 4d 01 df bd 0b 18 07 9b d4 +0c fc d5 23 35 b3 a1 8b c4 ee 92 44 76 0e b4 94 +f5 be 5b 19 71 88 6c a2 be ec e0 a3 94 4f ff 8b +e6 b4 2d 96 e1 c2 c7 2e 4e 90 f8 7e d1 36 15 46 +7c fc 91 c2 6e b3 8a 7a f9 f5 66 86 93 1a 47 26 +da 04 + +# Encryption: +25 17 7b fe 12 61 9b 44 f4 a4 fe 7c b7 6d e9 3d +4e d4 a0 5a 31 e5 be 8c c4 e5 60 66 1d e9 a3 4a +e3 17 cc 02 ff 63 10 67 08 32 8b d3 f7 87 63 ab +3e 57 65 2c 63 f1 05 f7 97 1d 2d 8d 70 1e 62 97 +a7 9c 78 7b 7c cd 62 a5 3b 39 d9 c0 39 46 e6 6f +48 8a 92 e8 e1 7d c6 ec b0 f6 5b f0 1e 3a ff ee +99 76 87 31 1b e0 e9 45 ad d6 3f a3 f4 00 38 2c +b8 ff d8 91 57 54 01 8c c7 5e 82 82 26 b5 03 9c +d9 c5 7f c6 d9 9c be 8e a4 a3 d2 9c bd 09 d5 4d +95 cc 07 34 c2 35 44 f8 e1 fb c7 49 3e 06 d1 6c +0a 0a c1 53 0d 21 f0 33 7e 26 2f d9 d2 7f cc 4a +fe b5 74 d6 68 66 d4 ca 84 cf d6 e0 af 2b b9 77 +a5 d9 9a 5b 0b 37 44 04 2d 33 2b 93 6b bd d8 69 +e5 f2 c8 83 b4 00 ac 8b c0 68 3e 67 90 63 42 9d +98 d4 94 f3 18 04 d6 5b b3 c9 74 aa 72 e6 65 7d +4c 16 38 c6 79 c8 1a 16 45 3f 6b 0b aa 3f 05 17 + +# PKCS#1 v1.5 Encryption Example 15.12 +# ---------------------------------- + +# Message: +49 f6 f8 a4 a8 6a 8a a0 97 63 aa c8 55 72 b0 e7 +ee 77 6a ef f8 a8 29 00 07 76 ff a6 + +# Seed: +6d b6 a8 27 ac 2a 5e 06 16 c0 f4 43 b2 34 58 e1 +75 ac f9 a3 b2 55 f5 c8 52 5e 72 53 42 4f aa 91 +38 05 4c 3d ba a4 71 f2 7f e8 55 c1 c0 ce c3 62 +59 7a 1a 1e 6e b4 f2 98 ac 3e b7 34 d3 1f f0 ef +10 08 c0 e0 2b 9b 06 e2 93 15 fc 09 4a 7e d2 6b +11 ea 55 27 0a 3d cb 67 06 f4 6a 94 50 bf 83 12 +88 10 65 13 02 48 d2 64 47 66 a7 99 66 ef da db +aa f5 75 ef 4d d3 5a 93 7f f0 bf bf 3d 95 61 c7 +54 40 9b e7 b8 84 7a 60 8d 79 1f b9 87 ee d4 6a +fe b0 db 1c a9 75 c0 5f 61 57 0d d0 70 98 5f 13 +e4 e0 ed 7a 8c b3 91 ce 4d 42 08 32 b4 5a 8b 7e +9f 90 88 4e 61 18 98 f4 72 a0 ac 46 c5 7a a7 f8 +46 8a a1 9d 9c 7b 31 2f 13 43 22 99 03 93 88 1d +32 aa 14 68 f6 e5 f8 eb 85 a2 c3 c2 da ed 92 b9 +3c + +# Encryption: +0f f9 5f 4a 2a 07 18 d6 73 f9 20 2c 80 9f 10 45 +10 1f 52 b9 db a7 72 88 fe 28 8c b2 77 c4 db aa +35 db 93 27 ec ee c3 76 5a e0 33 e0 b6 b7 77 b2 +2c a6 be 66 20 03 ea fa 2b fb da 60 6f d8 ce e7 +ee e0 6c 6a 00 c9 45 a6 55 6c 60 b0 08 69 f9 99 +97 1a 8c 57 af e1 dd ee 7a 75 77 04 7a 0d b9 0f +62 cd 24 7a 88 7f 32 27 ef 6d a9 07 a7 5b cf f1 +9a a3 0c 90 8f 58 35 ef 10 10 0a dc 7f 6a d6 fb +31 99 79 0b 3f 4d 6a d1 9a 0d f5 02 7f db 8f 84 +66 04 e0 2d af 33 55 d9 56 40 77 79 af 15 5a cf +a5 a3 2e 6d 61 74 dc 90 13 1d bd 7a be 58 5d d7 +59 fa 3c b7 e9 f7 21 45 3f 3e 35 4f e7 be 0b 11 +8e f5 b8 79 42 b5 fe d4 c3 0d 7a 08 fe 24 64 eb +79 a3 de ba b3 7b 6d 3a 0a b3 15 77 de 7e 93 22 +9b 49 d1 e8 fd 56 32 d0 26 d8 3e e0 6a a7 85 34 +ce e3 08 1b 22 2e c4 cd 94 88 cc de 4e 15 29 05 + +# PKCS#1 v1.5 Encryption Example 15.13 +# ---------------------------------- + +# Message: +12 97 5d b7 3d + +# Seed: +6a 4b 4f b8 05 80 72 72 96 5b ff 2f 4c 80 0f 96 +4f a3 ae b9 fb 43 3b 40 c8 ac c5 98 b4 84 02 98 +93 a2 19 c9 53 21 34 c0 6a c8 42 5c 28 a5 f0 63 +c2 84 20 0a 04 56 43 48 97 16 51 6a 98 7b f8 1b +a1 86 f4 ce b8 d8 d9 dc 1d 73 f2 26 7f d1 98 8d +6a 2f fd 68 cd 36 69 de 2b 04 70 09 43 d0 d4 44 +ae 3d a8 f0 59 4e 62 61 e5 ff f6 07 f0 4d f3 1e +3d 9c 91 22 d7 6f b9 0f 3f 82 c3 93 25 3b 75 20 +16 5b d1 f3 19 ab 3b 87 5e cc 6a b3 ed 02 47 d0 +37 70 f8 d6 47 1d 69 cd 13 ee 25 7c 1f c8 b3 0f +19 b9 3f e4 f2 fc 9c 21 49 28 13 d1 fc 85 2a f7 +0c dc 63 84 d2 ae 55 b9 1e 39 ae 6c 3b 19 fd 1a +7d ea f7 18 c0 5d 57 80 95 96 a2 88 fc 9a ef b8 +15 ae a2 9f af 67 83 c0 05 35 fd 71 d6 25 49 40 +b7 62 f5 07 26 1f 20 9b c8 ba 94 79 bb 3f 5d 64 +64 23 19 cc 31 86 85 9c + +# Encryption: +27 15 d6 eb 53 ae e6 d4 bd dd 3b e9 b6 63 14 4a +41 0d 03 81 77 9f 79 9d ca 88 07 92 ab 43 1a f9 +98 9d eb 17 36 9d c6 74 38 ad d8 2b df 0a 59 dd +3b c2 78 01 02 58 c7 df 87 69 84 ff 52 76 78 bf +9b 34 c0 77 43 b5 d2 2f 4f 30 cb 5d 7d 8a 6c fd +50 58 24 f2 e0 94 02 4f b0 43 30 f6 6d a7 cb c0 +1d 5e cc 8d fc a1 ca 9e 50 91 b9 d9 c8 e3 8d 0a +c3 93 1d e5 d1 fd c8 33 73 84 82 a7 fd 15 2c 1d +24 e6 9e a0 1d d3 e1 fa 77 23 54 a6 07 d6 2c 60 +b5 61 dc 5c cb 01 2b 71 2f 5c 2d a1 89 2c 31 20 +ef 99 0d 74 61 1d dd 35 66 af 1a cd 8b 48 50 06 +1c 91 28 f8 2a d1 12 da 9f 68 ac 88 39 3f 9a 5c +2c 10 20 aa 77 e9 b6 2e 2d 1e 98 5f ef 86 4c c1 +ae b4 51 ac 83 9c 72 0c b9 73 e7 b5 df 24 a9 8c +cb 6e 67 72 66 29 a3 66 fe a3 f9 a9 52 1d aa 19 +b0 44 30 e8 10 f2 c4 5a 57 d4 25 3b ed b9 1d a0 + +# PKCS#1 v1.5 Encryption Example 15.14 +# ---------------------------------- + +# Message: +8d e0 f5 a4 13 a7 f7 86 39 6f 09 a4 5e 5e 77 4f +3c 60 9c e6 f1 b4 90 dd e2 22 b3 22 d5 34 0e 9b +10 55 81 f4 c5 be 44 ea bb 3d 1b 23 f8 45 + +# Seed: +f8 71 a8 97 ae e8 45 c3 bb 82 69 90 b7 31 d2 77 +7c f4 76 b5 cf c5 59 6d f3 a5 23 ba 69 79 c7 a4 +51 79 da 5f d6 0f 81 0b f4 14 c5 4e 18 2f 26 01 +72 0f fe 8a 50 d7 d9 d1 1e 56 43 18 e9 02 6f 07 +c5 aa a1 3e f8 91 28 3a 96 63 c1 e3 d2 7b 93 81 +7d 01 a5 6f ce 33 d5 16 9b fe a6 2a 8e e6 c3 70 +a3 aa 8c 71 94 d9 d3 53 d0 98 16 61 fe 85 81 62 +50 e0 32 4e ae 1b 84 7f c7 32 91 91 60 d0 1e 11 +92 ac 16 be 0e b8 e9 95 e4 86 40 27 6a 2d b7 b8 +7f 84 b3 fa c0 4c e8 62 f0 22 38 62 3f 62 b9 2a +2e 32 7b 01 b8 c7 b9 e5 ec 87 05 5c 6c b7 b5 56 +51 ab 5a c9 89 83 3b 03 4f 8b e0 11 6f 28 b1 e8 +86 a2 ce d1 23 29 8e b0 04 07 5a 6b 5b 71 b1 + +# Encryption: +d3 67 ac a8 d4 f1 74 14 e9 bf 09 ad 81 1d 78 db +0e 85 0c 45 c8 f9 d7 02 44 75 d3 e5 6e 3c bf be +6e e8 ab bf d7 74 58 26 41 7c c8 ed 52 f5 4e 00 +a9 2f 81 7e f9 83 e9 8d 10 0a 1f 99 0d b1 e2 90 +a8 51 6d 60 9b b3 2e 50 2a 77 e1 1f 76 20 0b 00 +25 76 5e 9b d2 85 9b a9 4a 69 63 33 a5 eb e2 eb +25 ba 9d 19 00 7f 64 36 0c c0 75 ca d7 f0 99 50 +e4 b7 af cb ac 36 e6 ec b0 17 cf 4a 1f 25 a4 d2 +b9 51 bb 85 e8 1c b2 b4 eb 6f 45 cd d4 00 d2 ac +4e 21 69 89 6d 94 15 82 44 9c e3 0f 69 c1 7c b4 +49 32 1f 65 e4 4d f3 03 87 86 27 62 13 51 f5 2e +5a 07 52 e3 b5 eb 12 63 61 69 7f 53 cf 24 66 16 +5c 3f bd 66 2b 83 75 80 b7 6d 45 9f f0 44 97 e5 +fe 1b 3c d1 8c 4d 58 ff ed ab dd 04 a8 c1 08 d8 +59 b6 52 98 63 9c 3a f8 0c d9 4e 23 87 a8 69 44 +09 ef 9e 0b 78 b6 f4 67 39 0b e1 08 57 9c 9b 2c + +# PKCS#1 v1.5 Encryption Example 15.15 +# ---------------------------------- + +# Message: +9e 78 c8 2b fd 0f 23 d3 91 e7 60 01 64 01 9a ad +28 f5 9b 14 15 44 04 d9 e9 66 13 3c 10 3f c3 7c + +# Seed: +bb 42 24 7d b2 40 ba ca cb cb e8 c6 8c b0 f7 0e +46 0a 49 73 da e6 56 99 35 8f ef 82 70 d6 5c 3d +0c 45 5a 37 9c 56 3c 59 7b 28 f4 ff a0 70 e0 ec +1e bb 9e d4 27 fe 89 ab cd 47 93 c4 22 c3 38 87 +8c 8b 14 5b 46 c4 f7 13 78 a0 fd 7d 50 53 b8 67 +98 bc 02 d9 32 93 fe d8 47 f1 8f e0 61 59 07 4a +c1 89 d9 56 23 20 74 db 6d dc f9 94 1a 70 f2 8b +60 e4 83 39 5a 2d 21 01 54 b6 2a ba b8 75 0f 5a +eb f1 ac ef e2 05 6f 5a bd 2f 0e 0e c4 94 af a8 +2f c5 9b b3 57 f1 16 a9 4e c1 cd 06 03 b5 2f e5 +6d 31 a4 3b 87 aa 63 77 88 c7 24 cb 6f 88 37 3c +92 f6 07 11 bf 3f 35 94 e2 3d ee 2f ec ed fe 6f +5f c8 86 e9 6a ee 7c 74 68 22 e5 6c ba 7e bd aa +2a 92 10 ea 81 98 e4 c2 2d e9 29 89 45 + +# Encryption: +81 8d cb ba 98 c3 46 79 3c 79 d4 bb 78 5a a6 40 +19 1b 05 f8 83 5f f7 39 74 44 3b ce 35 7a 26 9d +44 64 6e 8c 79 10 2d ce 22 92 39 78 a3 94 1e bc +b9 90 4f c1 bb 1f b4 3f 11 27 5e 71 eb 7a 84 d2 +74 be 10 4b 00 af 92 25 e2 a4 f7 f5 a0 48 ab b6 +6c ba b6 52 5d 1b 11 5d a8 c0 bb 08 de ea ec 7f +80 eb 6c 39 50 4d c4 eb 38 15 4c e4 b6 91 b4 06 +93 19 b2 93 c2 5d c3 0b 8f b3 8b ca 15 3e 2f a6 +1b 33 76 dd c3 c5 3a 57 93 21 d9 10 a1 71 fc 42 +aa f1 70 50 ed 6d 31 1a 7d f5 b9 a5 cf 3a 98 fd +69 aa 85 ac 23 46 c1 6f a0 3b 1e 53 d1 03 d6 f5 +a0 4b 0d 9d 3f 18 83 53 1e 2f 63 41 fd 91 bd 63 +a5 aa 99 3b 6e db 99 92 e5 db 17 a7 be 55 5e af +a3 bb ab 32 08 6e 92 b8 b7 91 06 69 68 e0 0f 8a +17 71 61 44 0c e5 38 57 97 89 c2 91 2e bd 7a d0 +19 be 29 37 6c ad ee c2 99 21 07 c9 db 07 60 49 + +# PKCS#1 v1.5 Encryption Example 15.16 +# ---------------------------------- + +# Message: +6d 72 08 b2 ff b0 1a d2 36 0c 46 09 f3 ba d3 15 +79 c8 d4 00 5c c9 60 14 2e 2b 69 6b 26 e9 4f 2d +99 98 0b ad 38 41 05 b1 89 95 57 af 89 05 25 + +# Seed: +72 ae 49 97 18 28 ba 54 23 ab 96 3c db 18 f4 bd +fd bc 74 73 cf 70 fb 77 21 34 41 f1 d4 46 ae 48 +10 93 03 a2 60 c0 91 ab 51 99 d9 64 e6 21 63 c2 +46 57 24 71 73 cb 05 11 b9 cb b1 63 45 9c 95 6f +9c 0b 18 83 b6 91 b5 e4 ea e0 4f 0a f2 4e a3 28 +c6 de 88 2c eb c4 f8 9a 56 37 32 82 d6 0a f2 ba +96 7e 25 7a c4 01 a3 7f 94 41 c1 1f 2e 0e 42 1b +2d 15 1e b2 43 a9 7e ae 5a aa 86 cd 38 df 43 c2 +6a 1d 6e 3b 12 c1 3f a3 59 7b 85 bb aa 13 09 45 +2c 7e 9b 32 5d 8c 73 fa 79 9c 57 56 52 73 7b 92 +a2 47 d2 3c 4c 70 12 40 c5 3d cf e2 ea 69 7a f6 +1c 07 2f a7 6b db 05 2a 58 c9 19 e6 9e c5 7b 39 +a2 a6 c4 7d 77 0e de 67 10 fc 7b dd e6 01 + +# Encryption: +4b 56 dc d3 04 bd c7 f0 cc b7 0d 2c 58 6f 52 74 +60 1e e6 05 36 bb 21 80 61 67 13 50 d6 d3 ae 2e +28 4f 07 b5 ed 63 01 79 26 94 13 12 2b 98 37 60 +90 f7 a4 a4 f6 43 4a f7 3a c4 0c 7a f4 b6 d7 a3 +e3 14 70 2a b9 b8 5e 08 73 1d a0 d1 2e d3 f0 07 +0b 0d 20 95 05 3b 3f 0d 09 d6 c2 cd 8f 98 ba de +d9 11 48 c3 5b 7b 33 c5 43 65 3c cc 32 d8 36 f5 +f7 f2 ee 39 ca bd 0b d8 9d d9 a4 a9 4e 91 2b 4c +a9 7f 18 51 d0 17 45 1f 60 96 ac bf 20 a6 5e c5 +a2 9f 08 f8 13 5c 73 18 a2 21 6d 1b 7d 10 37 95 +c7 ec 8e e5 7a 79 28 0f 9a 84 4b d6 ab 71 28 82 +0e 1f b5 e8 25 54 fe c0 2a 78 aa 8d 3f d6 a1 3e +0f ad 0e ce e7 ab 61 1d e4 b0 a0 48 1f 42 b8 d0 +b5 5c b8 81 3d 1c a6 e2 61 5c f5 ae 8a e8 6d 0b +5d 46 95 50 75 49 f7 a3 73 66 a4 45 fb 55 b7 c4 +b6 b5 8e a6 99 db e5 dd c8 19 3e 2b f3 d5 b8 40 + +# PKCS#1 v1.5 Encryption Example 15.17 +# ---------------------------------- + +# Message: +7d eb 6d 40 41 48 23 2c 48 21 63 4d 3d f9 bc + +# Seed: +e6 f8 3c 8c 99 3e 60 15 af 43 04 09 68 4e 62 7f +3d 9b 84 ad 05 55 c6 a6 c0 91 13 a7 12 47 2a bb +36 f6 11 92 32 6c f8 40 82 aa bd 1e c9 5f 4d 1a +92 d9 10 7e 30 61 0c 8d 27 59 55 6d 5d 61 47 5c +a3 f3 cb d9 49 fa c2 20 3c 42 3d 56 c2 75 58 e6 +11 8f aa 0f 6f 68 4a da 13 c3 15 3f 6d 25 53 38 +bf f7 34 e9 5f 60 ad 29 19 ab f2 88 15 d3 cc 0b +1e fd 38 5d 0d 45 81 b0 ee 84 94 f2 bb e2 99 59 +91 ac 1e a8 15 40 cb 7e 88 56 68 e5 a5 2e ca 90 +57 ed 9a 1f b2 3f df 83 b5 75 51 35 8c 23 cd 43 +ce 0e 7a 33 c7 25 66 b8 8f e5 93 43 f1 87 24 46 +d3 2c 44 b3 99 0a a4 db 3e e5 93 42 4c 8e 09 46 +d2 61 e3 27 0e f4 07 6b b3 5d f3 c3 c6 da 4b be +42 3f 59 1b 5c 93 ba 56 c5 cf 01 d4 f0 a9 40 96 +71 09 d3 9b 93 9d f2 82 53 2e 54 83 10 8b + +# Encryption: +aa 6e 6e 4a f6 89 26 4d 61 bf a8 f5 08 6d 82 79 +dd c2 28 9c 55 41 af 45 35 19 c4 4b 95 ea e6 a1 +5e 7e 7b d1 5f d3 1a 4f ad 5f 7c 85 90 5e fc a2 +26 93 0d 67 da f5 58 b7 15 b2 1f 36 28 f6 1a 3b +04 2c 1a 38 f9 af 3a da 82 ec 44 88 c8 ad e5 f1 +da 81 e1 a8 ab 90 e1 b3 12 dc da 83 5f 9e 92 5f +2e 72 46 3f a8 33 a0 8b 93 25 3f df e8 cf 4e 5f +3c fa 91 10 77 19 a6 a9 46 9a cd 71 25 ae 67 b2 +bd 75 85 7c 59 be 0a be 98 40 74 e2 95 47 8a f2 +74 0e 25 89 4e 56 a6 25 0e f7 36 21 94 13 81 03 +74 3c a9 54 47 33 d2 50 55 71 be e0 0f 17 8a 2c +fa 38 e1 f8 f2 2f b2 39 30 d6 a7 5d d1 7c 68 9a +47 6d 87 15 31 85 95 10 8f cc e8 95 e3 44 9e ca +97 a7 dd ba e3 e6 d6 f0 e3 5e 66 6d 6f bd 78 78 +48 f8 68 13 37 b1 d4 c5 23 8b 1c 24 de 77 a7 e6 +75 e7 ae d8 dc 13 dd 9e b1 06 87 98 51 7c 0b 6e + +# PKCS#1 v1.5 Encryption Example 15.18 +# ---------------------------------- + +# Message: +03 1f c3 a3 ea a4 2b 0d 9f 6d 7d d5 99 3d 61 89 +cb b2 e0 e9 6f aa 33 d6 1f 31 7b 6b 3c 00 + +# Seed: +16 ab 64 85 ca c0 39 71 14 88 0e 6f 72 bc 1f 1e +f3 4b a2 7d 1c 43 3d 77 f3 37 2b 1f d5 b2 1b a5 +7a 50 5c d8 f3 5b 75 24 2c f1 b7 6d 38 1c 68 34 +24 01 ee ef c8 42 53 a2 de 1a 19 13 e4 38 77 3b +7b cb 31 cb ab 25 8f 72 6a c9 34 a8 71 26 96 9a +db 7f 76 8c 1b ab 87 54 a1 3a 3c cb ba 6f 3d d8 +d0 ec 6a 7c 6d 68 7d 04 95 b6 e2 2c 9a e7 67 af +c9 d9 4f 2e 45 a1 06 13 3c 42 c7 9b 52 c2 6a d4 +b6 7b d8 ec e5 5e 84 32 5c a6 f4 9c 8e 95 31 f5 +f6 b9 ca c3 5c 93 3e eb e3 b9 a1 1b 9b b1 c9 ea +8c e6 d2 28 5d a9 08 e5 91 97 82 b5 b3 08 fe 47 +8d 98 e4 9a ea 54 3b f8 ca 1b 22 ed f4 3f db f6 +af 31 cc 8c d4 fb 7d e2 d8 19 af a5 48 3e ac dd +56 d7 78 7b c8 bb 16 22 38 40 49 bc 30 9a 66 + +# Encryption: +61 c7 54 76 30 43 b5 84 e4 a8 54 6b 79 f0 a3 e2 +e0 f3 b3 e2 db 6c 94 ad 81 7e 92 81 f4 85 c0 82 +08 fe d4 f4 d7 d0 a7 8c 6c 31 1a 07 c7 5b 9b be +85 04 f4 b7 a6 92 99 02 16 de 12 58 5c 00 9a e5 +8c 26 f0 85 07 1f 39 5e 5a f8 92 5f 39 33 f6 d9 +f4 12 d4 25 54 64 54 e8 00 b7 e3 aa c7 8b 7a 08 +b9 2e 79 8b b8 34 eb ea dc 4b 4a 63 56 af 1c a0 +9b f5 86 74 5f 61 6d 51 74 8c c7 a3 7b 48 cb 10 +97 7e 30 3b be 10 bf 27 c6 9b df f0 ba 5c ab 8f +62 d0 58 7a 09 d6 e0 22 82 32 33 c8 c7 aa 41 87 +22 23 ed 15 a7 4a cc b0 f1 f8 22 f2 4d 75 94 ed +99 25 a1 c6 c0 c0 f9 ad 0e 07 1e b6 b5 eb e1 ba +b6 ba 3b 6d 99 a3 16 52 04 7f 46 92 60 be e8 71 +0e 37 0f 04 ed 70 75 93 93 7a 08 dd 82 26 49 92 +31 1f 4a f9 88 4c f8 ad 34 af b9 f6 75 99 3c 8a +bf 41 51 98 39 f7 6f a1 e9 31 bd ae 1d 08 a6 34 + +# PKCS#1 v1.5 Encryption Example 15.19 +# ---------------------------------- + +# Message: +c9 c9 3a fe a9 97 b1 ee 36 fa 72 72 03 54 c7 04 +64 9b c6 ef 44 f5 18 7c 6c 28 54 2b 9a e9 55 a7 +19 3f ff ec 86 7b b6 2e 21 9e 68 + +# Seed: +52 d4 c3 bf 0c 77 2c 02 d3 bb 71 1d 7f 14 6d 8c +49 76 f8 30 81 be 49 53 d4 af eb 07 8e 54 12 a3 +2c 3d c7 37 b5 9b c4 54 c3 de 93 a1 ae d0 7c 1b +a6 4d 1d e4 36 80 14 d0 4f 64 40 55 6a 4a 16 97 +9d 08 03 cc 29 22 da 97 ed 67 61 90 12 f8 f7 d3 +b1 a4 55 84 b0 94 6a f6 db d4 a0 85 7d 4c 2d b9 +9a 17 bb d2 7a cd 9a 62 e6 7f 88 79 db ef 27 f1 +04 6a 86 7e 69 95 16 2b 2a 1a 1c cc dc ea f4 5b +e1 33 7e 5f a8 f8 5e da ad f7 50 8d 58 f3 26 aa +7c f3 01 f4 41 ba 55 8b 60 e0 fa c6 e0 d1 99 20 +61 a0 a4 69 be 02 16 26 89 0e e8 7e 68 13 9b d5 +19 ae 77 3e 3e c4 81 b7 f2 b3 77 33 1f 52 f2 e3 +86 88 4f 76 57 23 e2 6c d4 a8 d9 68 61 4c 9c 33 +dc db + +# Encryption: +d0 68 67 02 2a 0f af 57 3d 62 cc 24 a6 e0 6a 44 +cd 3d 83 ea c5 d0 80 9e bf 91 30 45 68 cb 1b 27 +56 1b b2 92 e8 77 6e 21 6d 1d 02 3e 75 3c 12 4b +51 86 7b 94 dc 60 89 4d 62 c7 da e5 fa 1a 9f af +03 76 e1 75 8c b6 ad c7 14 17 e8 31 02 52 8f 23 +f4 c5 e5 b5 03 62 a3 9e 2a a9 76 8b 10 62 08 6f +a8 c5 3f f1 c3 9a 0e e0 3d 38 3d 24 bf 49 07 22 +b7 86 da ec 90 8c d7 15 1e 18 5d dd 17 88 26 78 +02 7e 36 8b 05 12 cf 98 41 3f 3e 59 6f a3 db 4e +c1 96 ae 5f f5 24 a8 26 6d 76 0e 00 51 43 3d 18 +98 ff c2 30 e9 6a 2f 0b fd f2 b2 44 29 ad fa 91 +8a ba 1a 45 0f 76 78 34 72 30 12 93 84 8b d8 2d +5a 33 84 31 d6 cb 1c 10 6d c7 41 d2 34 bf 5a 80 +db d3 25 da 64 a3 94 a0 06 5f 22 02 8d 0f dc 5a +df 0d 0d e2 9f 22 fb 8c 2a 41 33 1f e1 fc b6 15 +89 e0 ec 75 00 ed 84 42 d6 18 46 df 6c ca 46 cc + +# PKCS#1 v1.5 Encryption Example 15.20 +# ---------------------------------- + +# Message: +69 b7 64 48 55 f9 1d 1c 61 c8 49 8e 4b a1 ba 4d +84 5b a8 82 b1 73 + +# Seed: +b2 2f c7 de 85 c5 f7 5a 2f 32 af 1b fb cd 57 89 +71 56 87 de 06 e6 6d 06 4a e3 eb 8d fb 07 a2 57 +5b e0 e9 e6 f2 9f 50 d7 39 6d 07 8b 36 ef 80 2f +75 1a 77 cc 92 d7 61 4c 91 dd 27 99 31 fc e0 07 +eb f9 15 a0 f1 4e 31 2c e9 1f e5 aa 6f b3 74 51 +61 4f e3 7c 73 fc 6f 6d 6f 8e 52 78 9b 5d 88 e8 +6b eb 16 33 f5 dd d5 c0 70 f1 4f d3 cf ee 97 dd +4a 64 3d 35 d4 5d d9 bf 34 df 8c 31 0b 48 59 2e +94 68 31 b3 4e f3 c0 b9 16 f1 7c b0 ac b2 cf c1 +c2 5d 03 09 ac c1 12 4f 26 5c 1a 83 ed 88 5c 87 +fa 82 6f da 57 10 b5 4e 16 ec 0f 44 8c db 7e e0 +58 0f f7 38 65 30 ea 46 1e 04 2a 0b 77 42 c4 61 +97 6b b5 a3 80 ad bc b0 01 06 f2 67 1b 6c ce 4f +72 67 75 2f 80 66 80 42 78 35 0b 01 75 3e 31 b3 +8e cc fb e9 05 69 f6 + +# Encryption: +ab 42 67 97 2c 77 96 83 93 88 d4 ad 87 de d7 4b +b6 53 e9 a7 05 0e 28 2e 82 19 28 75 68 9f 70 ee +1d a1 8a 1f 73 22 09 2c d2 9f d0 01 19 92 2a 6d +e1 26 01 98 0a a9 fa 6e 61 9e 27 75 e8 7a da e3 +16 95 c1 30 4e 77 f5 2c ce 01 66 65 f2 26 7c 20 +76 26 43 c6 00 3c 01 6d 84 80 44 3c 70 1d f6 c1 +d8 d6 55 54 96 00 ee 45 5b 70 e4 73 31 9b 0d 44 +45 e0 b7 55 2a 1f 80 8e 88 f3 26 48 42 73 5a e6 +1d f0 32 5e d0 36 90 d6 d5 d6 93 ad 1f ed 22 66 +84 50 37 9d b5 32 3d c0 1c 89 af fa e3 69 b9 c3 +01 c3 19 c3 7d df 51 ed f4 6e 09 b2 1e 5d e9 14 +83 e8 e3 cb 21 ee b7 05 7b c2 eb dc 3a aa 3d 65 +00 c9 2f 99 b1 7b 31 80 bb a0 47 d7 60 73 77 63 +36 b1 5d 05 4d 79 a4 40 cc 5e 98 5e a5 43 fc aa +25 db 1d d8 92 b7 1b b7 4a 5c f6 82 63 d8 fd 58 +f1 a4 8e 6c 2f cb 8c 0b 71 a2 51 cf c1 a2 01 57 + +# ============================================= diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/rsa-testvectors/pkcs1v15sign-vectors.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/notes/rsa-testvectors/pkcs1v15sign-vectors.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,4261 @@ +/* Generated from file: pkcs1v15sign-vectors.txt + * with md5 hash: d799f020ab2fc966cae369de7ff62641 + */ + + +typedef struct rsaKey { + int n_l; + unsigned char n[256]; + int e_l; + unsigned char e[256]; + int d_l; + unsigned char d[256]; + int p_l; + unsigned char p[256]; + int q_l; + unsigned char q[256]; + int dP_l; + unsigned char dP[256]; + int dQ_l; + unsigned char dQ[256]; + int qInv_l; + unsigned char qInv[256]; +} rsaKey_t; + +typedef struct rsaData { + const char* name; + int o1_l; + unsigned char o1[256]; + int o2_l; + unsigned char o2[256]; +} rsaData_t; + +typedef struct testcase { + const char* name; + rsaKey_t rsa; +#ifdef LTC_TEST_EXT + rsaData_t data[20]; +#else + rsaData_t data[1]; +#endif /* LTC_TEST_EXT */ +} testcase_t; + +testcase_t testcases_emsa[] = + { +{ + "Example 1: A 1024-bit RSA key pair", +{ + /* Modulus */ + 128, + { 0xa5, 0x6e, 0x4a, 0x0e, 0x70, 0x10, 0x17, 0x58, 0x9a, 0x51, 0x87, 0xdc, 0x7e, 0xa8, 0x41, 0xd1, 0x56, 0xf2, 0xec, 0x0e, 0x36, 0xad, 0x52, 0xa4, 0x4d, 0xfe, 0xb1, 0xe6, 0x1f, 0x7a, 0xd9, 0x91, 0xd8, 0xc5, 0x10, 0x56, 0xff, 0xed, 0xb1, 0x62, 0xb4, 0xc0, 0xf2, 0x83, 0xa1, 0x2a, 0x88, 0xa3, 0x94, 0xdf, 0xf5, 0x26, 0xab, 0x72, 0x91, 0xcb, 0xb3, 0x07, 0xce, 0xab, 0xfc, 0xe0, 0xb1, 0xdf, 0xd5, 0xcd, 0x95, 0x08, 0x09, 0x6d, 0x5b, 0x2b, 0x8b, 0x6d, 0xf5, 0xd6, 0x71, 0xef, 0x63, 0x77, 0xc0, 0x92, 0x1c, 0xb2, 0x3c, 0x27, 0x0a, 0x70, 0xe2, 0x59, 0x8e, 0x6f, 0xf8, 0x9d, 0x19, 0xf1, 0x05, 0xac, 0xc2, 0xd3, 0xf0, 0xcb, 0x35, 0xf2, 0x92, 0x80, 0xe1, 0x38, 0x6b, 0x6f, 0x64, 0xc4, 0xef, 0x22, 0xe1, 0xe1, 0xf2, 0x0d, 0x0c, 0xe8, 0xcf, 0xfb, 0x22, 0x49, 0xbd, 0x9a, 0x21, 0x37 } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 128, + { 0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51, 0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf, 0x88, 0x43, 0x40, 0xae, 0xf9, 0x88, 0x5f, 0x2a, 0x4b, 0xbe, 0x92, 0xe8, 0x94, 0xa7, 0x24, 0xac, 0x3c, 0x56, 0x8c, 0x8f, 0x97, 0x85, 0x3a, 0xd0, 0x7c, 0x02, 0x66, 0xc8, 0xc6, 0xa3, 0xca, 0x09, 0x29, 0xf1, 0xe8, 0xf1, 0x12, 0x31, 0x88, 0x44, 0x29, 0xfc, 0x4d, 0x9a, 0xe5, 0x5f, 0xee, 0x89, 0x6a, 0x10, 0xce, 0x70, 0x7c, 0x3e, 0xd7, 0xe7, 0x34, 0xe4, 0x47, 0x27, 0xa3, 0x95, 0x74, 0x50, 0x1a, 0x53, 0x26, 0x83, 0x10, 0x9c, 0x2a, 0xba, 0xca, 0xba, 0x28, 0x3c, 0x31, 0xb4, 0xbd, 0x2f, 0x53, 0xc3, 0xee, 0x37, 0xe3, 0x52, 0xce, 0xe3, 0x4f, 0x9e, 0x50, 0x3b, 0xd8, 0x0c, 0x06, 0x22, 0xad, 0x79, 0xc6, 0xdc, 0xee, 0x88, 0x35, 0x47, 0xc6, 0xa3, 0xb3, 0x25 } +, + /* Prime 1 */ + 64, + { 0xe7, 0xe8, 0x94, 0x27, 0x20, 0xa8, 0x77, 0x51, 0x72, 0x73, 0xa3, 0x56, 0x05, 0x3e, 0xa2, 0xa1, 0xbc, 0x0c, 0x94, 0xaa, 0x72, 0xd5, 0x5c, 0x6e, 0x86, 0x29, 0x6b, 0x2d, 0xfc, 0x96, 0x79, 0x48, 0xc0, 0xa7, 0x2c, 0xbc, 0xcc, 0xa7, 0xea, 0xcb, 0x35, 0x70, 0x6e, 0x09, 0xa1, 0xdf, 0x55, 0xa1, 0x53, 0x5b, 0xd9, 0xb3, 0xcc, 0x34, 0x16, 0x0b, 0x3b, 0x6d, 0xcd, 0x3e, 0xda, 0x8e, 0x64, 0x43 } +, + /* Prime 2 */ + 64, + { 0xb6, 0x9d, 0xca, 0x1c, 0xf7, 0xd4, 0xd7, 0xec, 0x81, 0xe7, 0x5b, 0x90, 0xfc, 0xca, 0x87, 0x4a, 0xbc, 0xde, 0x12, 0x3f, 0xd2, 0x70, 0x01, 0x80, 0xaa, 0x90, 0x47, 0x9b, 0x6e, 0x48, 0xde, 0x8d, 0x67, 0xed, 0x24, 0xf9, 0xf1, 0x9d, 0x85, 0xba, 0x27, 0x58, 0x74, 0xf5, 0x42, 0xcd, 0x20, 0xdc, 0x72, 0x3e, 0x69, 0x63, 0x36, 0x4a, 0x1f, 0x94, 0x25, 0x45, 0x2b, 0x26, 0x9a, 0x67, 0x99, 0xfd } +, + /* Prime exponent 1 */ + 64, + { 0x28, 0xfa, 0x13, 0x93, 0x86, 0x55, 0xbe, 0x1f, 0x8a, 0x15, 0x9c, 0xba, 0xca, 0x5a, 0x72, 0xea, 0x19, 0x0c, 0x30, 0x08, 0x9e, 0x19, 0xcd, 0x27, 0x4a, 0x55, 0x6f, 0x36, 0xc4, 0xf6, 0xe1, 0x9f, 0x55, 0x4b, 0x34, 0xc0, 0x77, 0x79, 0x04, 0x27, 0xbb, 0xdd, 0x8d, 0xd3, 0xed, 0xe2, 0x44, 0x83, 0x28, 0xf3, 0x85, 0xd8, 0x1b, 0x30, 0xe8, 0xe4, 0x3b, 0x2f, 0xff, 0xa0, 0x27, 0x86, 0x19, 0x79 } +, + /* Prime exponent 2 */ + 64, + { 0x1a, 0x8b, 0x38, 0xf3, 0x98, 0xfa, 0x71, 0x20, 0x49, 0x89, 0x8d, 0x7f, 0xb7, 0x9e, 0xe0, 0xa7, 0x76, 0x68, 0x79, 0x12, 0x99, 0xcd, 0xfa, 0x09, 0xef, 0xc0, 0xe5, 0x07, 0xac, 0xb2, 0x1e, 0xd7, 0x43, 0x01, 0xef, 0x5b, 0xfd, 0x48, 0xbe, 0x45, 0x5e, 0xae, 0xb6, 0xe1, 0x67, 0x82, 0x55, 0x82, 0x75, 0x80, 0xa8, 0xe4, 0xe8, 0xe1, 0x41, 0x51, 0xd1, 0x51, 0x0a, 0x82, 0xa3, 0xf2, 0xe7, 0x29 } +, + /* Coefficient */ + 64, + { 0x27, 0x15, 0x6a, 0xba, 0x41, 0x26, 0xd2, 0x4a, 0x81, 0xf3, 0xa5, 0x28, 0xcb, 0xfb, 0x27, 0xf5, 0x68, 0x86, 0xf8, 0x40, 0xa9, 0xf6, 0xe8, 0x6e, 0x17, 0xa4, 0x4b, 0x94, 0xfe, 0x93, 0x19, 0x58, 0x4b, 0x8e, 0x22, 0xfd, 0xde, 0x1e, 0x5a, 0x2e, 0x3b, 0xd8, 0xaa, 0x5b, 0xa8, 0xd8, 0x58, 0x41, 0x94, 0xeb, 0x21, 0x90, 0xac, 0xf8, 0x32, 0xb8, 0x47, 0xf1, 0x3a, 0x3d, 0x24, 0xa7, 0x9f, 0x4d } + +} +, +{{ + "PKCS#1 v1.5 Signature Example 1.1", + /* Message to be signed */ + 217, + { 0xcd, 0xc8, 0x7d, 0xa2, 0x23, 0xd7, 0x86, 0xdf, 0x3b, 0x45, 0xe0, 0xbb, 0xbc, 0x72, 0x13, 0x26, 0xd1, 0xee, 0x2a, 0xf8, 0x06, 0xcc, 0x31, 0x54, 0x75, 0xcc, 0x6f, 0x0d, 0x9c, 0x66, 0xe1, 0xb6, 0x23, 0x71, 0xd4, 0x5c, 0xe2, 0x39, 0x2e, 0x1a, 0xc9, 0x28, 0x44, 0xc3, 0x10, 0x10, 0x2f, 0x15, 0x6a, 0x0d, 0x8d, 0x52, 0xc1, 0xf4, 0xc4, 0x0b, 0xa3, 0xaa, 0x65, 0x09, 0x57, 0x86, 0xcb, 0x76, 0x97, 0x57, 0xa6, 0x56, 0x3b, 0xa9, 0x58, 0xfe, 0xd0, 0xbc, 0xc9, 0x84, 0xe8, 0xb5, 0x17, 0xa3, 0xd5, 0xf5, 0x15, 0xb2, 0x3b, 0x8a, 0x41, 0xe7, 0x4a, 0xa8, 0x67, 0x69, 0x3f, 0x90, 0xdf, 0xb0, 0x61, 0xa6, 0xe8, 0x6d, 0xfa, 0xae, 0xe6, 0x44, 0x72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, 0x4e, 0xcb, 0x5f, 0x89, 0x11, 0xaf, 0xe5, 0x39, 0xad, 0xa4, 0xa8, 0xf3, 0x82, 0x3d, 0x1d, 0x13, 0xe4, 0x72, 0xd1, 0x49, 0x05, 0x47, 0xc6, 0x59, 0xc7, 0x61, 0x7f, 0x3d, 0x24, 0x08, 0x7d, 0xdb, 0x6f, 0x2b, 0x72, 0x09, 0x61, 0x67, 0xfc, 0x09, 0x7c, 0xab, 0x18, 0xe9, 0xa4, 0x58, 0xfc, 0xb6, 0x34, 0xcd, 0xce, 0x8e, 0xe3, 0x58, 0x94, 0xc4, 0x84, 0xd7 } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Signature Example 1.2", + /* Message to be signed */ + 51, + { 0x85, 0x13, 0x84, 0xcd, 0xfe, 0x81, 0x9c, 0x22, 0xed, 0x6c, 0x4c, 0xcb, 0x30, 0xda, 0xeb, 0x5c, 0xf0, 0x59, 0xbc, 0x8e, 0x11, 0x66, 0xb7, 0xe3, 0x53, 0x0c, 0x4c, 0x23, 0x3e, 0x2b, 0x5f, 0x8f, 0x71, 0xa1, 0xcc, 0xa5, 0x82, 0xd4, 0x3e, 0xcc, 0x72, 0xb1, 0xbc, 0xa1, 0x6d, 0xfc, 0x70, 0x13, 0x22, 0x6b, 0x9e } +, + /* Signature */ + 128, + { 0x84, 0xfd, 0x2c, 0xe7, 0x34, 0xec, 0x1d, 0xa8, 0x28, 0xd0, 0xf1, 0x5b, 0xf4, 0x9a, 0x87, 0x07, 0xc1, 0x5d, 0x05, 0x94, 0x81, 0x36, 0xde, 0x53, 0x7a, 0x3d, 0xb4, 0x21, 0x38, 0x41, 0x67, 0xc8, 0x6f, 0xae, 0x02, 0x25, 0x87, 0xee, 0x9e, 0x13, 0x7d, 0xae, 0xe7, 0x54, 0x73, 0x82, 0x62, 0x93, 0x2d, 0x27, 0x1c, 0x74, 0x4c, 0x6d, 0x3a, 0x18, 0x9a, 0xd4, 0x31, 0x1b, 0xdb, 0x02, 0x04, 0x92, 0xe3, 0x22, 0xfb, 0xdd, 0xc4, 0x04, 0x06, 0xea, 0x86, 0x0d, 0x4e, 0x8e, 0xa2, 0xa4, 0x08, 0x4a, 0xa9, 0x8b, 0x96, 0x22, 0xa4, 0x46, 0x75, 0x6f, 0xdb, 0x74, 0x0d, 0xdb, 0x3d, 0x91, 0xdb, 0x76, 0x70, 0xe2, 0x11, 0x66, 0x1b, 0xbf, 0x87, 0x09, 0xb1, 0x1c, 0x08, 0xa7, 0x07, 0x71, 0x42, 0x2d, 0x1a, 0x12, 0xde, 0xf2, 0x9f, 0x06, 0x88, 0xa1, 0x92, 0xae, 0xbd, 0x89, 0xe0, 0xf8, 0x96, 0xf8 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 1.3", + /* Message to be signed */ + 228, + { 0xa4, 0xb1, 0x59, 0x94, 0x17, 0x61, 0xc4, 0x0c, 0x6a, 0x82, 0xf2, 0xb8, 0x0d, 0x1b, 0x94, 0xf5, 0xaa, 0x26, 0x54, 0xfd, 0x17, 0xe1, 0x2d, 0x58, 0x88, 0x64, 0x67, 0x9b, 0x54, 0xcd, 0x04, 0xef, 0x8b, 0xd0, 0x30, 0x12, 0xbe, 0x8d, 0xc3, 0x7f, 0x4b, 0x83, 0xaf, 0x79, 0x63, 0xfa, 0xff, 0x0d, 0xfa, 0x22, 0x54, 0x77, 0x43, 0x7c, 0x48, 0x01, 0x7f, 0xf2, 0xbe, 0x81, 0x91, 0xcf, 0x39, 0x55, 0xfc, 0x07, 0x35, 0x6e, 0xab, 0x3f, 0x32, 0x2f, 0x7f, 0x62, 0x0e, 0x21, 0xd2, 0x54, 0xe5, 0xdb, 0x43, 0x24, 0x27, 0x9f, 0xe0, 0x67, 0xe0, 0x91, 0x0e, 0x2e, 0x81, 0xca, 0x2c, 0xab, 0x31, 0xc7, 0x45, 0xe6, 0x7a, 0x54, 0x05, 0x8e, 0xb5, 0x0d, 0x99, 0x3c, 0xdb, 0x9e, 0xd0, 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xd6, 0xe1, 0x41, 0x73, 0x81, 0x11, 0x1a, 0x1d, 0x36, 0xde, 0x63, 0x75, 0xcf, 0x45, 0x5b, 0x3c, 0x98, 0x12, 0x63, 0x9d, 0xbc, 0x27, 0x60, 0x0c, 0x75, 0x19, 0x94, 0xfb, 0x61, 0x79, 0x9e, 0xcf, 0x7d, 0xa6, 0xbc, 0xf5, 0x15, 0x40, 0xaf, 0xd0, 0x17, 0x4d, 0xb4, 0x03, 0x31, 0x88, 0x55, 0x66, 0x75, 0xb1, 0xd7, 0x63, 0x36, 0x0a, 0xf4, 0x6f, 0xee, 0xca, 0x5b, 0x60, 0xf8, 0x82, 0x82, 0x9e, 0xe7, 0xb2 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 1.4", + /* Message to be signed */ + 9, + { 0xbc, 0x65, 0x67, 0x47, 0xfa, 0x9e, 0xaf, 0xb3, 0xf0 } +, + /* Signature */ + 128, + { 0x45, 0x60, 0x7a, 0xd6, 0x11, 0xcf, 0x57, 0x47, 0xa4, 0x1a, 0xc9, 0x4d, 0x0f, 0xfe, 0xc8, 0x78, 0xbd, 0xaf, 0x63, 0xf6, 0xb5, 0x7a, 0x4b, 0x08, 0x8b, 0xf3, 0x6e, 0x34, 0xe1, 0x09, 0xf8, 0x40, 0xf2, 0x4b, 0x74, 0x2a, 0xda, 0x16, 0x10, 0x2d, 0xab, 0xf9, 0x51, 0xcb, 0xc4, 0x4f, 0x89, 0x82, 0xe9, 0x4e, 0xd4, 0xcd, 0x09, 0x44, 0x8d, 0x20, 0xec, 0x0e, 0xfa, 0x73, 0x54, 0x5f, 0x80, 0xb6, 0x54, 0x06, 0xbe, 0xd6, 0x19, 0x4a, 0x61, 0xc3, 0x40, 0xb4, 0xad, 0x15, 0x68, 0xcb, 0xb7, 0x58, 0x51, 0x04, 0x9f, 0x11, 0xaf, 0x17, 0x34, 0x96, 0x40, 0x76, 0xe0, 0x20, 0x29, 0xae, 0xe2, 0x00, 0xe4, 0x0e, 0x80, 0xbe, 0x0f, 0x43, 0x61, 0xf6, 0x98, 0x41, 0xc4, 0xf9, 0x2a, 0x44, 0x50, 0xa2, 0x28, 0x6d, 0x43, 0x28, 0x9b, 0x40, 0x55, 0x54, 0xc5, 0x4d, 0x25, 0xc6, 0xec, 0xb5, 0x84, 0xf4 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 1.5", + /* Message to be signed */ + 149, + { 0xb4, 0x55, 0x81, 0x54, 0x7e, 0x54, 0x27, 0x77, 0x0c, 0x76, 0x8e, 0x8b, 0x82, 0xb7, 0x55, 0x64, 0xe0, 0xea, 0x4e, 0x9c, 0x32, 0x59, 0x4d, 0x6b, 0xff, 0x70, 0x65, 0x44, 0xde, 0x0a, 0x87, 0x76, 0xc7, 0xa8, 0x0b, 0x45, 0x76, 0x55, 0x0e, 0xee, 0x1b, 0x2a, 0xca, 0xbc, 0x7e, 0x8b, 0x7d, 0x3e, 0xf7, 0xbb, 0x5b, 0x03, 0xe4, 0x62, 0xc1, 0x10, 0x47, 0xea, 0xdd, 0x00, 0x62, 0x9a, 0xe5, 0x75, 0x48, 0x0a, 0xc1, 0x47, 0x0f, 0xe0, 0x46, 0xf1, 0x3a, 0x2b, 0xf5, 0xaf, 0x17, 0x92, 0x1d, 0xc4, 0xb0, 0xaa, 0x8b, 0x02, 0xbe, 0xe6, 0x33, 0x49, 0x11, 0x65, 0x1d, 0x7f, 0x85, 0x25, 0xd1, 0x0f, 0x32, 0xb5, 0x1d, 0x33, 0xbe, 0x52, 0x0d, 0x3d, 0xdf, 0x5a, 0x70, 0x99, 0x55, 0xa3, 0xdf, 0xe7, 0x82, 0x83, 0xb9, 0xe0, 0xab, 0x54, 0x04, 0x6d, 0x15, 0x0c, 0x17, 0x7f, 0x03, 0x7f, 0xdc, 0xcc, 0x5b, 0xe4, 0xea, 0x5f, 0x68, 0xb5, 0xe5, 0xa3, 0x8c, 0x9d, 0x7e, 0xdc, 0xcc, 0xc4, 0x97, 0x5f, 0x45, 0x5a, 0x69, 0x09, 0xb4 } +, + /* Signature */ + 128, + { 0x54, 0xbe, 0x9d, 0x90, 0x87, 0x75, 0x15, 0xf4, 0x50, 0x27, 0x9c, 0x15, 0xb5, 0xf6, 0x1a, 0xd6, 0xf1, 0x5e, 0xcc, 0x95, 0xf1, 0x8c, 0xbe, 0xd8, 0x2b, 0x65, 0xb1, 0x66, 0x7a, 0x57, 0x58, 0x09, 0x58, 0x79, 0x94, 0x66, 0x80, 0x44, 0xf3, 0xbc, 0x2a, 0xe7, 0xf8, 0x84, 0x50, 0x1f, 0x64, 0xf0, 0xb4, 0x3f, 0x58, 0x8c, 0xfa, 0x20, 0x5a, 0x6a, 0xb7, 0x04, 0x32, 0x8c, 0x2d, 0x4a, 0xb9, 0x2a, 0x7a, 0xe1, 0x34, 0x40, 0x61, 0x4d, 0x3e, 0x08, 0x5f, 0x40, 0x1d, 0xa9, 0xad, 0x28, 0xe2, 0x10, 0x5e, 0x4a, 0x0e, 0xdb, 0x68, 0x1a, 0x64, 0x24, 0xdf, 0x04, 0x73, 0x88, 0xce, 0x05, 0x1e, 0xe9, 0xdf, 0x7b, 0xc2, 0x16, 0x3f, 0xe3, 0x47, 0x52, 0x0a, 0xd5, 0x1c, 0xcd, 0x51, 0x80, 0x64, 0x38, 0x3e, 0x74, 0x1a, 0xca, 0xd3, 0xcb, 0xdc, 0x2c, 0xb5, 0xa7, 0xc6, 0x8e, 0x86, 0x84, 0x64, 0xc2 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 1.6", + /* Message to be signed */ + 233, + { 0x10, 0xaa, 0xe9, 0xa0, 0xab, 0x0b, 0x59, 0x5d, 0x08, 0x41, 0x20, 0x7b, 0x70, 0x0d, 0x48, 0xd7, 0x5f, 0xae, 0xdd, 0xe3, 0xb7, 0x75, 0xcd, 0x6b, 0x4c, 0xc8, 0x8a, 0xe0, 0x6e, 0x46, 0x94, 0xec, 0x74, 0xba, 0x18, 0xf8, 0x52, 0x0d, 0x4f, 0x5e, 0xa6, 0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d, 0x14, 0x4f, 0x8c, 0xe4, 0xe2, 0xda, 0x73 } +, + /* Signature */ + 128, + { 0x0e, 0x6f, 0xf6, 0x3a, 0x85, 0x6b, 0x9c, 0xbd, 0x5d, 0xbe, 0x42, 0x31, 0x83, 0x12, 0x20, 0x47, 0xdd, 0x39, 0xd6, 0xf7, 0x6d, 0x1b, 0x23, 0x10, 0xe5, 0x46, 0xfe, 0x9e, 0xe7, 0x3b, 0x33, 0xef, 0xa7, 0xc7, 0x8f, 0x94, 0x74, 0x45, 0x5c, 0x9e, 0x5b, 0x88, 0xcb, 0x38, 0x3a, 0xaf, 0xc3, 0x69, 0x86, 0x68, 0xe7, 0xb7, 0xa5, 0x9a, 0x9c, 0xbb, 0x5b, 0x08, 0x97, 0xb6, 0xc5, 0xaf, 0xb7, 0xf8, 0xba, 0xc4, 0xb9, 0x24, 0xe9, 0x8d, 0x76, 0x0a, 0x15, 0xfc, 0x43, 0xd2, 0x81, 0x4a, 0xb2, 0xd5, 0x18, 0x7f, 0x79, 0xbe, 0xd9, 0x91, 0x5a, 0x93, 0x39, 0x7e, 0xbc, 0x22, 0xa7, 0x67, 0x75, 0x06, 0xa0, 0x2e, 0x07, 0x6d, 0x3f, 0xfd, 0xc0, 0x44, 0x1d, 0xbd, 0x4d, 0xb0, 0x04, 0x53, 0xdc, 0x28, 0xd8, 0x30, 0xe0, 0x57, 0x3f, 0x77, 0xb8, 0x17, 0xb5, 0x05, 0xc3, 0x8b, 0x4a, 0x4b, 0xb5, 0xd0 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 1.7", + /* Message to be signed */ + 127, + { 0xef, 0xb5, 0xda, 0x1b, 0x4d, 0x1e, 0x6d, 0x9a, 0x5d, 0xff, 0x92, 0xd0, 0x18, 0x4d, 0xa7, 0xe3, 0x1f, 0x87, 0x7d, 0x12, 0x81, 0xdd, 0xda, 0x62, 0x56, 0x64, 0x86, 0x9e, 0x83, 0x79, 0xe6, 0x7a, 0xd3, 0xb7, 0x5e, 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x08, 0x01, 0x75, 0x68, 0x45, 0x01, 0x02, 0x8f, 0x67, 0x64, 0x61, 0xd8, 0x1c, 0x00, 0x8f, 0xe4, 0x75, 0x06, 0x71, 0x64, 0x99, 0x70, 0x87, 0x8f, 0xc1, 0x75, 0xcf, 0x98, 0xe9, 0x6b, 0x2e, 0xcb, 0xf6, 0x87, 0x4d, 0x77, 0xda, 0xcb } + +} +, +{ + "PKCS#1 v1.5 Signature Example 1.8", + /* Message to be signed */ + 232, + { 0x53, 0xbb, 0x58, 0xce, 0x42, 0xf1, 0x98, 0x49, 0x40, 0x55, 0x26, 0x57, 0x23, 0x3b, 0x14, 0x96, 0x9a, 0xf3, 0x65, 0xc0, 0xa5, 0x61, 0xa4, 0x13, 0x2a, 0xf1, 0x8a, 0xf3, 0x94, 0x32, 0x28, 0x0e, 0x3e, 0x43, 0x70, 0x82, 0x43, 0x4b, 0x19, 0x23, 0x18, 0x37, 0x18, 0x4f, 0x02, 0xcf, 0x2b, 0x2e, 0x72, 0x6b, 0xeb, 0xf7, 0x4d, 0x7a, 0xe3, 0x25, 0x6d, 0x8b, 0x72, 0xf3, 0xea, 0xfd, 0xb1, 0x34, 0xd3, 0x3d, 0xe0, 0x6f, 0x29, 0x91, 0xd2, 0x99, 0xd5, 0x9f, 0x54, 0x68, 0xd4, 0x3b, 0x99, 0x58, 0xd6, 0xa9, 0x68, 0xf5, 0x96, 0x9e, 0xdb, 0xbc, 0x6e, 0x71, 0x85, 0xcb, 0xc7, 0x16, 0xc7, 0xc9, 0x45, 0xda, 0xfa, 0x9c, 0xc7, 0x1d, 0xdf, 0xaa, 0xa0, 0x10, 0x94, 0xa4, 0x52, 0xdd, 0xf5, 0xe2, 0x40, 0x73, 0x20, 0x40, 0x0b, 0xf0, 0x5e, 0xa9, 0x72, 0x9c, 0xaf, 0xbf, 0x06, 0x00, 0xe7, 0x88, 0x07, 0xef, 0x94, 0x62, 0xe3, 0xfd, 0xe3, 0x2e, 0xd7, 0xd9, 0x81, 0xa5, 0x6f, 0x47, 0x51, 0xef, 0x64, 0xfb, 0x45, 0x49, 0x91, 0x0e, 0xcc, 0x91, 0x1d, 0x72, 0x80, 0x53, 0xb3, 0x99, 0x43, 0x00, 0x47, 0x40, 0xe6, 0xf5, 0x82, 0x1f, 0xe8, 0xd7, 0x5c, 0x06, 0x17, 0xbf, 0x2c, 0x6b, 0x24, 0xbb, 0xfc, 0x34, 0x01, 0x3f, 0xc9, 0x5f, 0x0d, 0xed, 0xf5, 0xba, 0x29, 0x7f, 0x50, 0x4f, 0xb8, 0x33, 0xda, 0x2a, 0x43, 0x6d, 0x1d, 0x8f, 0xf1, 0xcc, 0x51, 0x93, 0xe2, 0xa6, 0x43, 0x89, 0xfc, 0xed, 0x91, 0x8e, 0x7f, 0xeb, 0x67, 0x16, 0x33, 0x0f, 0x66, 0x80, 0x1d, 0xb9, 0x49, 0x75, 0x49, 0xcf, 0x1d, 0x3b, 0xd9, 0x7c, 0xf1, 0xbc, 0x62, 0x55 } +, + /* Signature */ + 128, + { 0x8e, 0x1f, 0x3d, 0x26, 0xec, 0x7c, 0x6b, 0xbb, 0x8c, 0x54, 0xc5, 0xd2, 0x5f, 0x31, 0x20, 0x58, 0x78, 0x03, 0xaf, 0x6d, 0x3c, 0x2b, 0x99, 0xa3, 0x7c, 0xed, 0x6a, 0x36, 0x57, 0xd4, 0xae, 0x54, 0x26, 0x6f, 0x63, 0xff, 0xfd, 0xe6, 0x60, 0xc8, 0x66, 0xd6, 0x5d, 0x0a, 0xb0, 0x58, 0x9e, 0x1d, 0x12, 0xd9, 0xce, 0x60, 0x54, 0xb0, 0x5c, 0x86, 0x68, 0xae, 0x12, 0x71, 0x71, 0xcc, 0xaa, 0xe7, 0xf1, 0xcd, 0x40, 0x96, 0x77, 0xf5, 0x21, 0x57, 0xb6, 0x12, 0x3a, 0xb2, 0x27, 0xf2, 0x7a, 0x00, 0x96, 0x6d, 0x14, 0x39, 0xb4, 0x2a, 0x32, 0x16, 0x9d, 0x10, 0x70, 0x39, 0x40, 0x26, 0xfc, 0x8b, 0xc9, 0x35, 0x45, 0xb1, 0xac, 0x25, 0x2d, 0x0f, 0x7d, 0xa7, 0x51, 0xc0, 0x2e, 0x33, 0xa4, 0x78, 0x31, 0xfb, 0xd7, 0x15, 0x14, 0xc2, 0xbb, 0xbd, 0x3a, 0xdb, 0x67, 0x40, 0xc0, 0xfd, 0x68, 0xad } + +} +, +{ + "PKCS#1 v1.5 Signature Example 1.9", + /* Message to be signed */ + 42, + { 0x27, 0xca, 0xdc, 0x69, 0x84, 0x50, 0x94, 0x5f, 0x20, 0x4e, 0xc3, 0xcf, 0x8c, 0x6c, 0xbd, 0x8c, 0xeb, 0x4c, 0xc0, 0xcb, 0xe3, 0x12, 0x27, 0x4f, 0xa9, 0x6b, 0x04, 0xde, 0xac, 0x85, 0x51, 0x60, 0xc0, 0xe0, 0x4e, 0x4a, 0xc5, 0xd3, 0x82, 0x10, 0xc2, 0x7c } +, + /* Signature */ + 128, + { 0x7b, 0x63, 0xf9, 0x22, 0x33, 0x56, 0xf3, 0x5f, 0x61, 0x17, 0xf6, 0x8c, 0x8f, 0x82, 0x20, 0x03, 0x4f, 0xc2, 0x38, 0x4a, 0xb5, 0xdc, 0x69, 0x04, 0x14, 0x1f, 0x13, 0x93, 0x14, 0xd6, 0xee, 0x89, 0xf5, 0x4e, 0xc6, 0xff, 0xd1, 0x8c, 0x41, 0x3a, 0x23, 0xc5, 0x93, 0x1c, 0x7f, 0xbb, 0x13, 0xc5, 0x55, 0xcc, 0xfd, 0x59, 0x0e, 0x0e, 0xaa, 0x85, 0x3c, 0x8c, 0x94, 0xd2, 0x52, 0x0c, 0xd4, 0x25, 0x0d, 0x9a, 0x05, 0xa1, 0x93, 0xb6, 0x5d, 0xc7, 0x49, 0xb8, 0x24, 0x78, 0xaf, 0x01, 0x56, 0xee, 0x1d, 0xe5, 0x5d, 0xda, 0xd3, 0x3e, 0xc1, 0xf0, 0x09, 0x9c, 0xad, 0x6c, 0x89, 0x1a, 0x36, 0x17, 0xc7, 0x39, 0x3d, 0x05, 0xfb, 0xfb, 0xbb, 0x00, 0x52, 0x8a, 0x00, 0x1d, 0xf0, 0xb2, 0x04, 0xeb, 0xdf, 0x1a, 0x34, 0x10, 0x90, 0xde, 0xa8, 0x9f, 0x87, 0x0a, 0x87, 0x74, 0x58, 0x42, 0x7f, 0x7b } + +} +, +{ + "PKCS#1 v1.5 Signature Example 1.10", + /* Message to be signed */ + 19, + { 0x71, 0x64, 0x07, 0xe9, 0x01, 0xb9, 0xef, 0x92, 0xd7, 0x61, 0xb0, 0x13, 0xfd, 0x13, 0xeb, 0x7a, 0xd7, 0x2a, 0xed } +, + /* Signature */ + 128, + { 0x2a, 0x22, 0xdb, 0xe3, 0x77, 0x4d, 0x5b, 0x29, 0x72, 0x01, 0xb5, 0x5a, 0x0f, 0x17, 0xf4, 0x2d, 0xce, 0x63, 0xb7, 0x84, 0x5c, 0xb3, 0x25, 0xcf, 0xe9, 0x51, 0xd0, 0xba, 0xdb, 0x5c, 0x5a, 0x14, 0x47, 0x21, 0x43, 0xd8, 0x96, 0xc8, 0x6c, 0xc3, 0x39, 0xf8, 0x36, 0x71, 0x16, 0x42, 0x15, 0xab, 0xc9, 0x78, 0x62, 0xf2, 0x15, 0x16, 0x54, 0xe7, 0x5a, 0x3b, 0x35, 0x7c, 0x37, 0x31, 0x1b, 0x3d, 0x72, 0x68, 0xca, 0xb5, 0x40, 0x20, 0x2e, 0x23, 0xbe, 0xe5, 0x27, 0x36, 0xf2, 0xcd, 0x86, 0xcc, 0xe0, 0xc7, 0xdb, 0xde, 0x95, 0xe1, 0xc6, 0x00, 0xa4, 0x73, 0x95, 0xdc, 0x5e, 0xb0, 0xa4, 0x72, 0x15, 0x3f, 0xbc, 0x4f, 0xb2, 0x1b, 0x64, 0x3e, 0x0c, 0x04, 0xae, 0x14, 0xdd, 0x37, 0xe9, 0x7e, 0x61, 0x7a, 0x75, 0x67, 0xc8, 0x96, 0x52, 0x21, 0x97, 0x81, 0x00, 0x1b, 0xa6, 0xf8, 0x32, 0x98 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 1.11", + /* Message to be signed */ + 206, + { 0x46, 0xc2, 0x4e, 0x41, 0x03, 0x00, 0x16, 0x29, 0xc7, 0x12, 0xdd, 0x4c, 0xe8, 0xd7, 0x47, 0xee, 0x59, 0x5d, 0x6c, 0x74, 0x4c, 0xcc, 0x4f, 0x71, 0x34, 0x7d, 0x9b, 0x8a, 0xbf, 0x49, 0xd1, 0xb8, 0xfb, 0x2e, 0xf9, 0x1b, 0x95, 0xdc, 0x89, 0x9d, 0x4c, 0x0e, 0x3d, 0x29, 0x97, 0xe6, 0x38, 0xf4, 0xcf, 0x3f, 0x68, 0xe0, 0x49, 0x8d, 0xe5, 0xaa, 0xbd, 0x13, 0xf0, 0xdf, 0xe0, 0x2f, 0xf2, 0x6b, 0xa4, 0x37, 0x91, 0x04, 0xe7, 0x8f, 0xfa, 0x95, 0xff, 0xbd, 0x15, 0x06, 0x7e, 0xf8, 0xcb, 0xd7, 0xeb, 0x78, 0x60, 0xfe, 0xcc, 0x71, 0xab, 0xe1, 0x3d, 0x5c, 0x72, 0x0a, 0x66, 0x85, 0x1f, 0x2d, 0xef, 0xd4, 0xe7, 0x95, 0x05, 0x4d, 0x7b, 0xec, 0x02, 0x4b, 0xb4, 0x22, 0xa4, 0x6a, 0x73, 0x68, 0xb5, 0x6d, 0x95, 0xb4, 0x7a, 0xeb, 0xaf, 0xbe, 0xad, 0xd6, 0x12, 0x81, 0x25, 0x93, 0xa7, 0x0d, 0xb9, 0xf9, 0x6d, 0x45, 0x1e, 0xe1, 0x5e, 0xdb, 0x29, 0x93, 0x08, 0xd7, 0x77, 0xf4, 0xbb, 0x68, 0xed, 0x33, 0x77, 0xc3, 0x21, 0x56, 0xb4, 0x1b, 0x7a, 0x9c, 0x92, 0xa1, 0x4c, 0x8b, 0x81, 0x14, 0x43, 0x99, 0xc5, 0x6a, 0x5a, 0x43, 0x2f, 0x4f, 0x77, 0x0a, 0xa9, 0x7d, 0xa8, 0x41, 0x5d, 0x0b, 0xda, 0x2e, 0x81, 0x32, 0x06, 0x03, 0x1e, 0x70, 0x62, 0x00, 0x31, 0xc8, 0x81, 0xd6, 0x16, 0xbf, 0xfd, 0x5f, 0x03, 0xbf, 0x14, 0x7c, 0x1e, 0x73, 0x76, 0x6c, 0x26, 0x24, 0x62, 0x08 } +, + /* Signature */ + 128, + { 0x12, 0x23, 0x5b, 0x0b, 0x40, 0x61, 0x26, 0xd9, 0xd2, 0x60, 0xd4, 0x47, 0xe9, 0x23, 0xa1, 0x10, 0x51, 0xfb, 0x24, 0x30, 0x79, 0xf4, 0x46, 0xfd, 0x73, 0xa7, 0x01, 0x81, 0xd5, 0x36, 0x34, 0xd7, 0xa0, 0x96, 0x8e, 0x4e, 0xe2, 0x77, 0x77, 0xed, 0xa6, 0x3f, 0x6e, 0x4a, 0x3a, 0x91, 0xad, 0x59, 0x85, 0x99, 0x8a, 0x48, 0x48, 0xda, 0x59, 0xce, 0x69, 0x7b, 0x24, 0xbb, 0x33, 0x2f, 0xa2, 0xad, 0x9c, 0xe4, 0x62, 0xca, 0x4a, 0xff, 0xdc, 0x21, 0xda, 0xb9, 0x08, 0xe8, 0xce, 0x15, 0xaf, 0x6e, 0xb9, 0x10, 0x5b, 0x1a, 0xbc, 0xf3, 0x91, 0x42, 0xaa, 0x17, 0xb3, 0x4c, 0x4c, 0x09, 0x23, 0x86, 0xa7, 0xab, 0xbf, 0xe0, 0x28, 0xaf, 0xdb, 0xeb, 0xc1, 0x4f, 0x2c, 0xe2, 0x6f, 0xbe, 0xe5, 0xed, 0xec, 0xa1, 0x15, 0x02, 0xd3, 0x9a, 0x6b, 0x74, 0x03, 0x15, 0x48, 0x43, 0xd9, 0x8a, 0x62, 0xa7 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 1.12", + /* Message to be signed */ + 107, + { 0xbc, 0x99, 0xa9, 0x32, 0xaa, 0x16, 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 0x54, 0xa2, 0x80, 0x10, 0x59, 0x58, 0x26, 0xa2, 0xc9, 0xb9, 0x7f, 0xa0, 0xaa, 0x85, 0x1c, 0xc6, 0x8b, 0x70, 0x5d, 0x7a, 0x06, 0xd7, 0x20, 0xba, 0x02, 0x7e, 0x4a, 0x1c, 0x0b, 0x01, 0x95, 0x00, 0xfb, 0x63, 0xb7, 0x80, 0x71, 0x68, 0x4d, 0xcf, 0xa9, 0x77, 0x27, 0x00, 0xb9, 0x82, 0xdc, 0x66 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 1.13", + /* Message to be signed */ + 128, + { 0x73, 0x1e, 0x17, 0x2a, 0xc0, 0x63, 0x99, 0x2c, 0x5b, 0x11, 0xba, 0x17, 0x0d, 0xfb, 0x23, 0xbb, 0x00, 0x0d, 0x47, 0xba, 0x19, 0x53, 0x29, 0xcf, 0x27, 0x80, 0x61, 0x03, 0x73, 0x81, 0x51, 0x4c, 0x14, 0x60, 0x64, 0xc5, 0x28, 0x5d, 0xb1, 0x30, 0xdd, 0x5b, 0xae, 0x98, 0xb7, 0x72, 0x22, 0x59, 0x50, 0xea, 0xb0, 0x5d, 0x3e, 0xa9, 0x96, 0xf6, 0xff, 0xfb, 0x9a, 0x8c, 0x86, 0x22, 0x91, 0x3f, 0x27, 0x99, 0x14, 0xc8, 0x9a, 0xda, 0x4f, 0x3d, 0xd7, 0x76, 0x66, 0xa8, 0x68, 0xbf, 0xcb, 0xff, 0x2b, 0x95, 0xb7, 0xda, 0xf4, 0x53, 0xd4, 0xe2, 0xc9, 0xd7, 0x5b, 0xee, 0xe7, 0xf8, 0xe7, 0x09, 0x05, 0xe4, 0x06, 0x6a, 0x4f, 0x73, 0xae, 0xcc, 0x67, 0xf9, 0x56, 0xaa, 0x5a, 0x32, 0x92, 0xb8, 0x48, 0x8c, 0x91, 0x7d, 0x31, 0x7c, 0xfd, 0xc8, 0x62, 0x53, 0xe6, 0x90, 0x38, 0x1e, 0x15, 0xab } +, + /* Signature */ + 128, + { 0x76, 0x20, 0x4e, 0xac, 0xc1, 0xd6, 0x3e, 0xc1, 0xd6, 0xad, 0x5b, 0xd0, 0x69, 0x2e, 0x1a, 0x2f, 0x68, 0x6d, 0xf6, 0xe6, 0x4c, 0xa9, 0x45, 0xc7, 0x7a, 0x82, 0x4d, 0xe2, 0x12, 0xef, 0xa6, 0xd9, 0x78, 0x2d, 0x81, 0xb4, 0x59, 0x14, 0x03, 0xff, 0x40, 0x20, 0x62, 0x02, 0x98, 0xc0, 0x7e, 0xbd, 0x3a, 0x8a, 0x61, 0xc5, 0xbf, 0x4d, 0xad, 0x62, 0xcb, 0xfc, 0x4a, 0xe6, 0xa0, 0x39, 0x37, 0xbe, 0x4b, 0x49, 0xa2, 0x16, 0xd5, 0x70, 0xfc, 0x6e, 0x81, 0x87, 0x29, 0x37, 0x87, 0x6e, 0x27, 0xbd, 0x19, 0xcf, 0x60, 0x1e, 0xff, 0xc3, 0x0d, 0xdc, 0xa5, 0x73, 0xc9, 0xd5, 0x6c, 0xd4, 0x56, 0x9b, 0xdb, 0x48, 0x51, 0xc4, 0x50, 0xc4, 0x2c, 0xb2, 0x1e, 0x73, 0x8c, 0xdd, 0x61, 0x02, 0x7b, 0x8b, 0xe5, 0xe9, 0xb4, 0x10, 0xfc, 0x46, 0xaa, 0x3f, 0x29, 0xe4, 0xbe, 0x9e, 0x64, 0x45, 0x13, 0x46 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 1.14", + /* Message to be signed */ + 217, + { 0x02, 0x11, 0x38, 0x26, 0x83, 0xa7, 0x4d, 0x8d, 0x2a, 0x2c, 0xb6, 0xa0, 0x65, 0x50, 0x56, 0x3b, 0xe1, 0xc2, 0x6c, 0xa6, 0x28, 0x21, 0xe4, 0xff, 0x16, 0x3b, 0x72, 0x04, 0x64, 0xfc, 0x3a, 0x28, 0xd9, 0x1b, 0xed, 0xdd, 0xc6, 0x27, 0x49, 0xa5, 0x53, 0x8e, 0xaf, 0x41, 0xfb, 0xe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0x0c, 0x5c, 0x20, 0x54, 0xaa, 0x7f, 0x92, 0xde, 0xb2, 0x69, 0x91, 0xb5, 0x79, 0x66, 0x34, 0xf2, 0x29, 0xda, 0xf9, 0xb4, 0x9e, 0xb2, 0x05, 0x4d, 0x87, 0x31, 0x9f, 0x3c, 0xfa, 0x9b, 0x46, 0x6b, 0xd0, 0x75, 0xef, 0x66, 0x99, 0xae, 0xa4, 0xbd, 0x4a, 0x19, 0x5a, 0x1c, 0x52, 0x96, 0x8b, 0x5e, 0x2b, 0x75, 0xe0, 0x92, 0xd8, 0x46, 0xea, 0x1b, 0x5c, 0xc2, 0x79, 0x05, 0xa8, 0xe1, 0xd5, 0xe5, 0xde, 0x0e, 0xdf, 0xdb, 0x21, 0x39, 0x1e, 0xbb, 0x95, 0x18, 0x64, 0xeb, 0xd9, 0xf0, 0xb0, 0xec, 0x35, 0xb6, 0x54, 0x28, 0x71, 0x36, 0x0a, 0x31, 0x7b, 0x7e, 0xf1, 0x3a, 0xe0, 0x6a, 0xf6, 0x84, 0xe3, 0x8e, 0x21, 0xb1, 0xe1, 0x9b, 0xc7, 0x29, 0x8e, 0x5d, 0x6f, 0xe0, 0x01, 0x3a, 0x16, 0x4b, 0xfa, 0x25, 0xd3, 0xe7, 0x31, 0x3d } + +} +, +{ + "PKCS#1 v1.5 Signature Example 1.15", + /* Message to be signed */ + 66, + { 0xfc, 0x6b, 0x70, 0x0d, 0x22, 0x58, 0x33, 0x88, 0xab, 0x2f, 0x8d, 0xaf, 0xca, 0xf1, 0xa0, 0x56, 0x20, 0x69, 0x80, 0x20, 0xda, 0x4b, 0xae, 0x44, 0xda, 0xfb, 0xd0, 0x87, 0x7b, 0x50, 0x12, 0x50, 0x6d, 0xc3, 0x18, 0x1d, 0x5c, 0x66, 0xbf, 0x02, 0x3f, 0x34, 0x8b, 0x41, 0xfd, 0x9f, 0x94, 0x79, 0x5a, 0xb9, 0x64, 0x52, 0xa4, 0x21, 0x9f, 0x2d, 0x39, 0xd7, 0x2a, 0xf3, 0x59, 0xcf, 0x19, 0x56, 0x51, 0xc7 } +, + /* Signature */ + 128, + { 0x44, 0x52, 0xa6, 0xcc, 0x26, 0x26, 0xb0, 0x1e, 0x95, 0xab, 0x30, 0x6d, 0xf0, 0xd0, 0xcc, 0x74, 0x84, 0xfb, 0xab, 0x3c, 0x22, 0xe9, 0x70, 0x32, 0x83, 0x56, 0x7f, 0x66, 0xea, 0xdc, 0x24, 0x8d, 0xbd, 0xa5, 0x8f, 0xce, 0x7d, 0xd0, 0xc7, 0x0c, 0xce, 0x3f, 0x15, 0x0f, 0xca, 0x4b, 0x36, 0x9d, 0xff, 0x3b, 0x62, 0x37, 0xe2, 0xb1, 0x62, 0x81, 0xab, 0x55, 0xb5, 0x3f, 0xb1, 0x30, 0x89, 0xc8, 0x5c, 0xd2, 0x65, 0x05, 0x6b, 0x3d, 0x62, 0xa8, 0x8b, 0xfc, 0x21, 0x35, 0xb1, 0x67, 0x91, 0xf7, 0xfb, 0xca, 0xb9, 0xfd, 0x2d, 0xc3, 0x3b, 0xec, 0xb6, 0x17, 0xbe, 0x41, 0x9d, 0x2c, 0x04, 0x61, 0x42, 0xa4, 0xd4, 0x7b, 0x33, 0x83, 0x14, 0x55, 0x2e, 0xdd, 0x4b, 0x6f, 0xe9, 0xce, 0x11, 0x04, 0xec, 0xec, 0x4a, 0x99, 0x58, 0xd7, 0x33, 0x1e, 0x93, 0x0f, 0xc0, 0x9b, 0xf0, 0x8a, 0x6e, 0x64 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 1.16", + /* Message to be signed */ + 169, + { 0x13, 0xba, 0x08, 0x6d, 0x70, 0x9c, 0xfa, 0x5f, 0xed, 0xaa, 0x55, 0x7a, 0x89, 0x18, 0x1a, 0x61, 0x40, 0xf2, 0x30, 0x0e, 0xd6, 0xd7, 0xc3, 0xfe, 0xbb, 0x6c, 0xf6, 0x8a, 0xbe, 0xbc, 0xbc, 0x67, 0x8f, 0x2b, 0xca, 0x3d, 0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, 0x43, 0x86, 0xc9, 0xa3, 0xfd, 0xe1, 0x8e, 0x3c, 0xa1, 0x68, 0x7f, 0xb6, 0x49, 0xe8, 0x6c, 0x51, 0xd6, 0x58, 0x61, 0x9d, 0xde, 0x5d, 0xeb, 0xb8, 0x6f, 0xe1, 0x54, 0x91, 0xff, 0x77, 0xab, 0x74, 0x83, 0x73, 0xf1, 0xbe, 0x50, 0x88, 0x80, 0xd6, 0x6e, 0xa8, 0x1e, 0x87, 0x0e, 0x91, 0xcd, 0xf1, 0x70, 0x48, 0x75, 0xc1, 0x7f, 0x0b, 0x10, 0x10, 0x31, 0x88, 0xbc, 0x64, 0xee, 0xf5, 0xa3, 0x55, 0x1b, 0x41, 0x4c, 0x73, 0x36, 0x70, 0x21, 0x5b, 0x1a, 0x22, 0x70, 0x25, 0x62, 0x58, 0x1a, 0xb1 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 1.17", + /* Message to be signed */ + 4, + { 0xeb, 0x1e, 0x59, 0x35 } +, + /* Signature */ + 128, + { 0x37, 0x0c, 0xb9, 0x83, 0x9a, 0xe6, 0x07, 0x4f, 0x84, 0xb2, 0xac, 0xd6, 0xe6, 0xf6, 0xb7, 0x92, 0x1b, 0x4b, 0x52, 0x34, 0x63, 0x75, 0x7f, 0x64, 0x46, 0x71, 0x61, 0x40, 0xc4, 0xe6, 0xc0, 0xe7, 0x5b, 0xec, 0x6a, 0xd0, 0x19, 0x7e, 0xbf, 0xa8, 0x6b, 0xf4, 0x6d, 0x09, 0x4f, 0x5f, 0x6c, 0xd3, 0x6d, 0xca, 0x3a, 0x5c, 0xc7, 0x3c, 0x8b, 0xbb, 0x70, 0xe2, 0xc7, 0xc9, 0xab, 0x5d, 0x96, 0x4e, 0xc8, 0xe3, 0xdf, 0xde, 0x48, 0x1b, 0x4a, 0x1b, 0xef, 0xfd, 0x01, 0xb4, 0xad, 0x15, 0xb3, 0x1a, 0xe7, 0xae, 0xbb, 0x9b, 0x70, 0x34, 0x4a, 0x94, 0x11, 0x08, 0x31, 0x65, 0xfd, 0xf9, 0xc3, 0x75, 0x4b, 0xbb, 0x8b, 0x94, 0xdd, 0x34, 0xbd, 0x48, 0x13, 0xdf, 0xad, 0xa1, 0xf6, 0x93, 0x7d, 0xe4, 0x26, 0x7d, 0x55, 0x97, 0xca, 0x09, 0xa3, 0x1e, 0x83, 0xd7, 0xf1, 0xa7, 0x9d, 0xd1, 0x9b, 0x5e } + +} +, +{ + "PKCS#1 v1.5 Signature Example 1.18", + /* Message to be signed */ + 28, + { 0x63, 0x46, 0xb1, 0x53, 0xe8, 0x89, 0xc8, 0x22, 0x82, 0x09, 0x63, 0x00, 0x71, 0xc8, 0xa5, 0x77, 0x83, 0xf3, 0x68, 0x76, 0x0b, 0x8e, 0xb9, 0x08, 0xcf, 0xc2, 0xb2, 0x76 } +, + /* Signature */ + 128, + { 0x24, 0x79, 0xc9, 0x75, 0xc5, 0xb1, 0xae, 0x4c, 0x4e, 0x94, 0x0f, 0x47, 0x3a, 0x90, 0x45, 0xb8, 0xbf, 0x5b, 0x0b, 0xfc, 0xa7, 0x8e, 0xc2, 0x9a, 0x38, 0xdf, 0xbe, 0xdc, 0x8a, 0x74, 0x9b, 0x7a, 0x26, 0x92, 0xf7, 0xc5, 0x2d, 0x5b, 0xc7, 0xc8, 0x31, 0xc7, 0x23, 0x23, 0x72, 0xa0, 0x0f, 0xed, 0x3b, 0x6b, 0x49, 0xe7, 0x60, 0xec, 0x99, 0xe0, 0x74, 0xff, 0x2e, 0xea, 0xd5, 0x13, 0x4e, 0x83, 0x05, 0x72, 0x5d, 0xfa, 0x39, 0x21, 0x2b, 0x84, 0xbd, 0x4b, 0x8d, 0x80, 0xbc, 0x8b, 0xc1, 0x7a, 0x51, 0x28, 0x23, 0xa3, 0xbe, 0xb1, 0x8f, 0xc0, 0x8e, 0x45, 0xed, 0x19, 0xc2, 0x6c, 0x81, 0x77, 0x07, 0xd6, 0x7f, 0xb0, 0x58, 0x32, 0xef, 0x1f, 0x12, 0xa3, 0x3e, 0x90, 0xcd, 0x93, 0xb8, 0xa7, 0x80, 0x31, 0x9e, 0x29, 0x63, 0xca, 0x25, 0xa2, 0xaf, 0x7b, 0x09, 0xad, 0x8f, 0x59, 0x5c, 0x21 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 1.19", + /* Message to be signed */ + 50, + { 0x64, 0x70, 0x2d, 0xb9, 0xf8, 0x25, 0xa0, 0xf3, 0xab, 0xc3, 0x61, 0x97, 0x46, 0x59, 0xf5, 0xe9, 0xd3, 0x0c, 0x3a, 0xa4, 0xf5, 0x6f, 0xea, 0xc6, 0x90, 0x50, 0xc7, 0x29, 0x05, 0xe7, 0x7f, 0xe0, 0xc2, 0x2f, 0x88, 0xa3, 0x78, 0xc2, 0x1f, 0xcf, 0x45, 0xfe, 0x8a, 0x5c, 0x71, 0x73, 0x02, 0x09, 0x39, 0x29 } +, + /* Signature */ + 128, + { 0x15, 0x2f, 0x34, 0x51, 0xc8, 0x58, 0xd6, 0x95, 0x94, 0xe6, 0x56, 0x7d, 0xfb, 0x31, 0x29, 0x1c, 0x1e, 0xe7, 0x86, 0x0b, 0x9d, 0x15, 0xeb, 0xd5, 0xa5, 0xed, 0xd2, 0x76, 0xac, 0x3e, 0x6f, 0x7a, 0x8d, 0x14, 0x80, 0xe4, 0x2b, 0x33, 0x81, 0xd2, 0xbe, 0x02, 0x3a, 0xcf, 0x7e, 0xbb, 0xdb, 0x28, 0xde, 0x3d, 0x21, 0x63, 0xae, 0x44, 0x25, 0x9c, 0x6d, 0xf9, 0x8c, 0x33, 0x5d, 0x04, 0x5b, 0x61, 0xda, 0xc9, 0xdb, 0xa9, 0xdb, 0xbb, 0x4e, 0x6a, 0xb4, 0xa0, 0x83, 0xcd, 0x76, 0xb5, 0x80, 0xcb, 0xe4, 0x72, 0x20, 0x6a, 0x1a, 0x9f, 0xd6, 0x06, 0x80, 0xce, 0xea, 0x1a, 0x57, 0x0a, 0x29, 0xb0, 0x88, 0x1c, 0x77, 0x5e, 0xae, 0xf5, 0x52, 0x5d, 0x6d, 0x2f, 0x34, 0x4c, 0x28, 0x83, 0x7d, 0x0a, 0xca, 0x42, 0x2b, 0xbb, 0x0f, 0x1a, 0xba, 0x8f, 0x68, 0x61, 0xae, 0x18, 0xbd, 0x73, 0xfe, 0x44 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 1.20", + /* Message to be signed */ + 43, + { 0x94, 0x19, 0x21, 0xde, 0x4a, 0x1c, 0x9c, 0x16, 0x18, 0xd6, 0xf3, 0xca, 0x3c, 0x17, 0x9f, 0x6e, 0x29, 0xba, 0xe6, 0xdd, 0xf9, 0xa6, 0xa5, 0x64, 0xf9, 0x29, 0xe3, 0xce, 0x82, 0xcf, 0x32, 0x65, 0xd7, 0x83, 0x7d, 0x5e, 0x69, 0x2b, 0xe8, 0xdc, 0xc9, 0xe8, 0x6c } +, + /* Signature */ + 128, + { 0x70, 0x76, 0xc2, 0x87, 0xfc, 0x6f, 0xff, 0x2b, 0x20, 0x53, 0x74, 0x35, 0xe5, 0xa3, 0x10, 0x7c, 0xe4, 0xda, 0x10, 0x71, 0x61, 0x86, 0xd0, 0x15, 0x39, 0x41, 0x3e, 0x60, 0x9d, 0x27, 0xd1, 0xda, 0x6f, 0xd9, 0x52, 0xc6, 0x1f, 0x4b, 0xab, 0x91, 0xc0, 0x45, 0xfa, 0x4f, 0x86, 0x83, 0xec, 0xc4, 0xf8, 0xdd, 0xe7, 0x42, 0x27, 0xf7, 0x73, 0xcf, 0xf3, 0xd9, 0x6d, 0xb8, 0x47, 0x18, 0xc4, 0x94, 0x4b, 0x06, 0xaf, 0xfe, 0xba, 0x94, 0xb7, 0x25, 0xf1, 0xb0, 0x7d, 0x39, 0x28, 0xb2, 0x49, 0x0a, 0x85, 0xc2, 0xf1, 0xab, 0xf4, 0x92, 0xa9, 0x17, 0x7a, 0x7c, 0xd2, 0xea, 0x0c, 0x96, 0x68, 0x75, 0x6f, 0x82, 0x5b, 0xbe, 0xc9, 0x00, 0xfa, 0x8a, 0xc3, 0x82, 0x4e, 0x11, 0x43, 0x87, 0xef, 0x57, 0x37, 0x80, 0xca, 0x33, 0x48, 0x82, 0x38, 0x7b, 0x94, 0xe5, 0xaa, 0xd7, 0xa2, 0x7a, 0x28, 0xdc } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 2: A 1024-bit RSA key pair", +{ + /* Modulus */ + 128, + { 0xac, 0x13, 0xd9, 0xfd, 0xae, 0x7b, 0x73, 0x35, 0xb6, 0x9c, 0xd9, 0x85, 0x67, 0xe9, 0x64, 0x7d, 0x99, 0xbf, 0x37, 0x3a, 0x9e, 0x05, 0xce, 0x34, 0x35, 0xd6, 0x64, 0x65, 0xf3, 0x28, 0xb7, 0xf7, 0x33, 0x4b, 0x79, 0x2a, 0xee, 0x7e, 0xfa, 0x04, 0x4e, 0xbc, 0x4c, 0x7a, 0x30, 0xb2, 0x1a, 0x5d, 0x7a, 0x89, 0xcd, 0xb3, 0xa3, 0x0d, 0xfc, 0xd9, 0xfe, 0xe9, 0x99, 0x5e, 0x09, 0x41, 0x5e, 0xdc, 0x0b, 0xf9, 0xe5, 0xb4, 0xc3, 0xf7, 0x4f, 0xf5, 0x3f, 0xb4, 0xd2, 0x94, 0x41, 0xbf, 0x1b, 0x7e, 0xd6, 0xcb, 0xdd, 0x4a, 0x47, 0xf9, 0x25, 0x22, 0x69, 0xe1, 0x64, 0x6f, 0x6c, 0x1a, 0xee, 0x05, 0x14, 0xe9, 0x3f, 0x6c, 0xb9, 0xdf, 0x71, 0xd0, 0x6c, 0x06, 0x0a, 0x21, 0x04, 0xb4, 0x7b, 0x72, 0x60, 0xac, 0x37, 0xc1, 0x06, 0x86, 0x1d, 0xc7, 0x8c, 0xa5, 0xa2, 0x5f, 0xaa, 0x9c, 0xb2, 0xe3 } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 128, + { 0x04, 0x84, 0xcc, 0xef, 0xad, 0x7a, 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0xfa, 0xb2, 0xc0, 0xf9 } +, + /* Prime 2 */ + 64, + { 0xc5, 0x14, 0x59, 0xa6, 0x72, 0xed, 0x8b, 0x72, 0x4c, 0x6a, 0x8f, 0x28, 0x5c, 0xbb, 0x8e, 0xa7, 0x6a, 0x23, 0x93, 0x91, 0x79, 0x28, 0xbe, 0x56, 0xc0, 0xdc, 0xdf, 0xc9, 0x43, 0xc3, 0x0b, 0xda, 0x3c, 0xee, 0xfb, 0x86, 0xdc, 0xc8, 0xc4, 0x55, 0x67, 0x8c, 0xfe, 0x88, 0x25, 0xf3, 0x88, 0x77, 0xa3, 0x72, 0x8a, 0x1f, 0x10, 0x29, 0x1f, 0x54, 0x7b, 0x1e, 0x8b, 0x16, 0x04, 0x83, 0xe5, 0xbb } +, + /* Prime exponent 1 */ + 64, + { 0xb6, 0xba, 0x83, 0xa9, 0x7c, 0xa7, 0x6f, 0x5f, 0xe6, 0x0f, 0xaf, 0x0f, 0xad, 0x5a, 0x97, 0x00, 0x2a, 0x7e, 0xe5, 0x2e, 0x67, 0x1b, 0x1d, 0x38, 0x77, 0x05, 0x87, 0xa9, 0xfe, 0x2b, 0x59, 0x9c, 0x48, 0x15, 0xf5, 0x34, 0xa6, 0x28, 0x39, 0xe6, 0x21, 0x12, 0x45, 0xd2, 0x7a, 0x0d, 0xeb, 0xb1, 0xb0, 0x29, 0x1a, 0x32, 0x8e, 0x52, 0xa2, 0x61, 0x34, 0xec, 0x12, 0x42, 0xb4, 0x0f, 0xbd, 0xc1 } +, + /* Prime exponent 2 */ + 64, + { 0xb9, 0xb1, 0xc6, 0x13, 0x2e, 0xe1, 0x22, 0x6e, 0x6d, 0x10, 0x4e, 0x99, 0x72, 0x5f, 0x0b, 0x38, 0x35, 0xab, 0x15, 0xe5, 0x91, 0x6a, 0xd1, 0x85, 0xbe, 0xad, 0x9f, 0x72, 0xed, 0x95, 0x3f, 0x7a, 0xbf, 0xc5, 0x52, 0x5c, 0xad, 0x75, 0xc2, 0x80, 0xd2, 0x54, 0x28, 0x94, 0xb2, 0x65, 0xb8, 0x65, 0x3a, 0x2d, 0xb7, 0x75, 0x33, 0x6d, 0xfb, 0xe6, 0x47, 0x27, 0xed, 0x57, 0xae, 0xa3, 0x74, 0xf7 } +, + /* Coefficient */ + 64, + { 0x7b, 0x8d, 0x15, 0xa5, 0xdd, 0x28, 0x90, 0xa6, 0x7d, 0x1b, 0x54, 0x9c, 0x93, 0x5f, 0x58, 0x5a, 0x38, 0xda, 0x56, 0xf7, 0xc8, 0x15, 0x5a, 0x51, 0x9d, 0xc8, 0xf1, 0xf6, 0xad, 0xe5, 0x53, 0xd6, 0x37, 0x93, 0xc7, 0x8a, 0x0e, 0xce, 0x8d, 0x53, 0x72, 0x4e, 0x62, 0xae, 0x50, 0x3a, 0xd5, 0x25, 0xbf, 0xaf, 0x10, 0xcf, 0x61, 0x6a, 0x47, 0x73, 0xce, 0x7c, 0xcd, 0x5c, 0x1b, 0x31, 0x51, 0xbd } + +} +, +{{ + "PKCS#1 v1.5 Signature Example 2.1", + /* Message to be signed */ + 158, + { 0xe1, 0xc0, 0xf9, 0x8d, 0x53, 0xf8, 0xf8, 0xb1, 0x41, 0x90, 0x57, 0xd5, 0xb9, 0xb1, 0x0b, 0x07, 0xfe, 0xea, 0xec, 0x32, 0xc0, 0x46, 0x3a, 0x4d, 0x68, 0x38, 0x2f, 0x53, 0x1b, 0xa1, 0xd6, 0xcf, 0xe4, 0xed, 0x38, 0xa2, 0x69, 0x4a, 0x34, 0xb9, 0xc8, 0x05, 0xad, 0xf0, 0x72, 0xff, 0xbc, 0xeb, 0xe2, 0x1d, 0x8d, 0x4b, 0x5c, 0x0e, 0x8c, 0x33, 0x45, 0x2d, 0xd8, 0xf9, 0xc9, 0xbf, 0x45, 0xd1, 0xe6, 0x33, 0x75, 0x11, 0x33, 0x58, 0x82, 0x29, 0xd2, 0x93, 0xc6, 0x49, 0x6b, 0x7c, 0x98, 0x3c, 0x2c, 0x72, 0xbd, 0x21, 0x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 0x51, 0x90, 0x2f, 0x38, 0xcd, 0xec, 0x0b, 0x61, 0x32, 0x72, 0x90, 0x45, 0x32, 0x5f, 0xc1, 0xfb, 0x8f, 0xd5, 0x58, 0xe8 } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Signature Example 2.2", + /* Message to be signed */ + 177, + { 0xc1, 0x11, 0x46, 0x4e, 0x00, 0x2e, 0x4e, 0xc6, 0x18, 0xa8, 0xe2, 0x63, 0xdb, 0xcc, 0xa9, 0x1f, 0xb1, 0x8a, 0x00, 0xa1, 0x8b, 0x44, 0x0c, 0x4b, 0x55, 0x97, 0xbe, 0xe7, 0xdb, 0x2a, 0xed, 0xa8, 0x31, 0xe6, 0x21, 0xfc, 0xac, 0x8d, 0xd8, 0x1c, 0xee, 0x35, 0x03, 0x24, 0x2b, 0x33, 0xb0, 0xda, 0xa9, 0x87, 0xfe, 0x2f, 0x54, 0x93, 0xad, 0x2d, 0x06, 0xa1, 0x50, 0x07, 0x59, 0x00, 0x40, 0xce, 0x3c, 0x22, 0x77, 0x64, 0x2f, 0xd2, 0x7f, 0x3f, 0x25, 0x5e, 0x3d, 0x98, 0xd8, 0x9d, 0xfa, 0xeb, 0x86, 0xbe, 0x34, 0xe0, 0xb8, 0xfb, 0xb9, 0x35, 0xfb, 0x92, 0x85, 0x60, 0xfa, 0x29, 0x2d, 0x26, 0x34, 0x62, 0x5a, 0x50, 0x7d, 0xd5, 0x80, 0xa8, 0x91, 0x24, 0xb9, 0x21, 0x29, 0x3e, 0x8d, 0xfe, 0xdd, 0xc2, 0x81, 0xd7, 0x9e, 0xb3, 0xa5, 0x69, 0xd5, 0x9e, 0x0d, 0xb8, 0x01, 0x3e, 0x53, 0xf7, 0xd4, 0xc2, 0xf9, 0x6e, 0x5f, 0x2e, 0xc2, 0x7f, 0xd8, 0xdd, 0xb0, 0x18, 0x25, 0xd1, 0x7f, 0xca, 0x40, 0x6d, 0xaa, 0x62, 0x24, 0xc7, 0x60, 0x6d, 0x2c, 0x91, 0x52, 0x82, 0x09, 0x6a, 0x78, 0x05, 0x5a, 0x49, 0x62, 0x15, 0x37, 0xb4, 0xf0, 0x25, 0xa6, 0xe5, 0xb2, 0x12, 0x9b, 0xc8, 0xc1, 0xa4, 0x07 } +, + /* Signature */ + 128, + { 0x6e, 0x7e, 0xaa, 0xd8, 0x04, 0x94, 0x5e, 0xb0, 0x46, 0x70, 0xdd, 0x86, 0x76, 0xb7, 0x05, 0x7d, 0x03, 0xac, 0x3e, 0x22, 0x64, 0x65, 0xb1, 0xfb, 0x84, 0x03, 0xe6, 0xae, 0x79, 0x83, 0xe0, 0xa4, 0x6a, 0x89, 0xa4, 0xeb, 0x32, 0xbd, 0xc8, 0xe7, 0xae, 0x5a, 0x53, 0xd4, 0x8a, 0xa6, 0x4b, 0xc9, 0xc3, 0xdb, 0xc8, 0xcf, 0x9c, 0xd6, 0xdc, 0x6a, 0x68, 0xfc, 0xea, 0xe9, 0xe2, 0x9f, 0x47, 0x45, 0xfa, 0x49, 0xe1, 0x8d, 0x18, 0x4d, 0xc5, 0xd2, 0x6c, 0x4f, 0xeb, 0x35, 0x1f, 0xb4, 0xb2, 0x28, 0xc4, 0xc1, 0x8c, 0xab, 0xdb, 0xde, 0x86, 0x01, 0x72, 0x4a, 0xe3, 0x80, 0x3d, 0xb3, 0x05, 0xf2, 0xa0, 0x76, 0xfa, 0x8a, 0x57, 0xf4, 0x61, 0x0b, 0x8a, 0x6e, 0x0e, 0xd4, 0x35, 0x75, 0xbe, 0x5d, 0x5b, 0xfc, 0x16, 0x30, 0x47, 0x9d, 0xf3, 0xbc, 0xbc, 0x51, 0x51, 0x77, 0xaf, 0xe4, 0x99, 0x4a } + +} +, +{ + "PKCS#1 v1.5 Signature Example 2.3", + /* Message to be signed */ + 65, + { 0x29, 0xb8, 0x5b, 0x14, 0xb2, 0xda, 0x94, 0x7a, 0x4c, 0x3a, 0xd1, 0xe5, 0x93, 0x7d, 0xa1, 0x92, 0xc6, 0x05, 0x08, 0x65, 0xaf, 0x95, 0x04, 0xa5, 0x44, 0x53, 0x70, 0xe4, 0x3d, 0x3a, 0x8d, 0xa5, 0xd3, 0x55, 0xfd, 0x58, 0x76, 0x6b, 0x25, 0x43, 0xac, 0x6f, 0x93, 0x10, 0x87, 0x83, 0xc1, 0x3f, 0xf2, 0x8b, 0x2b, 0xe5, 0x60, 0x83, 0xf0, 0x29, 0x82, 0x39, 0xe0, 0xee, 0x96, 0x81, 0xee, 0x47, 0xc6 } +, + /* Signature */ + 128, + { 0x80, 0xb3, 0x8c, 0xe7, 0x35, 0x12, 0x6c, 0x85, 0x45, 0xd9, 0x1d, 0x18, 0xec, 0x90, 0x37, 0x65, 0x4d, 0x46, 0xe4, 0xf3, 0xc5, 0x1a, 0x6b, 0x86, 0x18, 0xe1, 0x5f, 0x72, 0xcd, 0x20, 0x75, 0x00, 0xa4, 0x70, 0x01, 0x75, 0x77, 0xd0, 0xa8, 0xc5, 0x5a, 0x2b, 0xa3, 0x34, 0x38, 0x3f, 0x1f, 0x8d, 0x99, 0xfc, 0xe2, 0x46, 0x0b, 0x32, 0x97, 0xbc, 0x03, 0x7e, 0xf6, 0x4a, 0xc4, 0xa3, 0x09, 0x8c, 0x6a, 0xaa, 0x24, 0xa4, 0xd0, 0x14, 0x4a, 0xf1, 0x02, 0xd0, 0xdd, 0xa1, 0x7e, 0x07, 0xdc, 0x69, 0x59, 0x23, 0x93, 0x2e, 0x56, 0x8a, 0xda, 0x00, 0xdc, 0x4f, 0x7d, 0xbf, 0xbc, 0xde, 0xc4, 0x3c, 0xc9, 0x08, 0x38, 0x80, 0x17, 0xd2, 0xee, 0xf0, 0x4e, 0x60, 0xdf, 0xe4, 0xd5, 0x73, 0x40, 0xfa, 0xb9, 0x16, 0xe2, 0xb8, 0x11, 0x24, 0x4c, 0xb1, 0xe4, 0xa5, 0x52, 0x38, 0x6f, 0xe3, 0xed, 0x4c } + +} +, +{ + "PKCS#1 v1.5 Signature Example 2.4", + /* Message to be signed */ + 93, + { 0xd3, 0xb7, 0xaa, 0xd3, 0x7a, 0x48, 0x90, 0xe0, 0x36, 0x5b, 0x86, 0xc7, 0xda, 0x94, 0x91, 0xe7, 0x3c, 0xdf, 0x55, 0x5d, 0x1b, 0x02, 0xb4, 0x51, 0x81, 0x6d, 0xc5, 0x2f, 0x96, 0x30, 0xd5, 0x90, 0xde, 0x83, 0xa5, 0xc9, 0x39, 0x61, 0x01, 0x25, 0x22, 0xdf, 0xf6, 0xdb, 0xbb, 0x9c, 0xdb, 0x0e, 0x71, 0xae, 0x51, 0x40, 0x19, 0x64, 0xaf, 0x18, 0x90, 0xe8, 0x93, 0x25, 0xdb, 0xd6, 0x26, 0xf2, 0xda, 0x01, 0x34, 0x58, 0xe3, 0x9e, 0xec, 0xa5, 0x83, 0xe8, 0x9e, 0x4c, 0x08, 0xe5, 0xd4, 0x12, 0xbe, 0x49, 0x84, 0x95, 0x88, 0x6e, 0x05, 0x51, 0xcf, 0xe7, 0x42, 0xb8, 0xb5 } +, + /* Signature */ + 128, + { 0x9d, 0x8a, 0x88, 0x89, 0xa3, 0x11, 0xb4, 0x86, 0xcb, 0xe2, 0x22, 0x57, 0x03, 0xf5, 0xd4, 0xae, 0x2a, 0x54, 0xc2, 0xbc, 0xaa, 0xad, 0x06, 0xfe, 0x76, 0x48, 0xb9, 0xe2, 0xd8, 0x5e, 0xdd, 0xa1, 0xa0, 0x7d, 0x85, 0x6d, 0x6a, 0xe9, 0xbd, 0x5c, 0xc1, 0xe5, 0x15, 0x32, 0x66, 0xec, 0x7f, 0x1e, 0x1d, 0xf3, 0xd9, 0x29, 0xcc, 0x44, 0x70, 0x0f, 0xac, 0x92, 0x64, 0x58, 0x41, 0x4c, 0x28, 0x41, 0xda, 0x83, 0x32, 0x8e, 0x81, 0xe0, 0xb9, 0xd6, 0xc3, 0x88, 0x5e, 0x76, 0x73, 0x70, 0xad, 0x5c, 0xf1, 0xf5, 0x76, 0xd9, 0xdc, 0xe3, 0x48, 0xca, 0xec, 0x5e, 0x64, 0x43, 0xe0, 0xae, 0xb7, 0xc3, 0xf7, 0x2b, 0x7d, 0xd2, 0x53, 0x66, 0x70, 0x23, 0xb9, 0xa4, 0x77, 0xab, 0x34, 0xdf, 0x8f, 0x20, 0x67, 0xe2, 0x25, 0xad, 0xcb, 0x73, 0xee, 0x11, 0xe1, 0x59, 0xeb, 0x64, 0x91, 0x47, 0xd6, 0x02 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 2.5", + /* Message to be signed */ + 82, + { 0xf6, 0x58, 0x18, 0x8c, 0x8f, 0x9d, 0xe6, 0x0b, 0x5e, 0x99, 0xa2, 0x9f, 0x52, 0xd3, 0xb8, 0x89, 0x20, 0x1b, 0x30, 0xd4, 0x64, 0xc3, 0xb7, 0x27, 0x92, 0xa3, 0x02, 0x09, 0x5d, 0xc1, 0xe7, 0x7d, 0x45, 0xe9, 0x4f, 0x5d, 0xab, 0x73, 0xdb, 0xb3, 0x13, 0x54, 0x38, 0x57, 0xff, 0x91, 0xdb, 0xf4, 0x73, 0xdf, 0xc1, 0x45, 0xd7, 0x3b, 0xd5, 0x06, 0x20, 0x75, 0xd1, 0x92, 0xa3, 0xfb, 0xf4, 0xa1, 0x33, 0xe7, 0xe5, 0x68, 0xdf, 0x20, 0xb8, 0xcf, 0xf7, 0x7b, 0x3a, 0xf6, 0x87, 0xaa, 0x22, 0x55, 0x9e, 0xc1 } +, + /* Signature */ + 128, + { 0x0a, 0x95, 0xa4, 0x4f, 0x62, 0x74, 0xe7, 0x4c, 0xec, 0x45, 0x17, 0x96, 0xaf, 0x56, 0x88, 0xd4, 0xbe, 0x01, 0x08, 0x93, 0xfa, 0xae, 0x27, 0xd4, 0x90, 0xf4, 0x77, 0x1b, 0x00, 0x3f, 0x70, 0x46, 0xcc, 0xcd, 0x41, 0x9f, 0xc8, 0x19, 0xd7, 0x33, 0x19, 0x55, 0xf4, 0x1e, 0xac, 0x93, 0x39, 0xf5, 0x46, 0xc5, 0x84, 0xa8, 0xb4, 0x2a, 0x5a, 0xc6, 0x32, 0x90, 0x58, 0x3f, 0xf3, 0xeb, 0x6b, 0x29, 0xca, 0xdc, 0x75, 0x4a, 0xe5, 0x8d, 0x5a, 0x56, 0x37, 0xb6, 0x60, 0x97, 0x96, 0xe8, 0x05, 0x51, 0x73, 0xff, 0x20, 0xa9, 0xcc, 0xe4, 0x92, 0xfd, 0x78, 0x37, 0x46, 0x86, 0x15, 0xe8, 0x41, 0x08, 0x87, 0xf0, 0xb4, 0xa5, 0x9f, 0xf2, 0x52, 0xa8, 0x25, 0x97, 0x76, 0xc8, 0xff, 0xda, 0xa6, 0x7c, 0x87, 0xdf, 0xf8, 0x98, 0x3a, 0xe6, 0x79, 0xd1, 0xde, 0x22, 0xea, 0x15, 0x8d, 0x48, 0xf6, 0x8b } + +} +, +{ + "PKCS#1 v1.5 Signature Example 2.6", + /* Message to be signed */ + 128, + { 0x31, 0xae, 0x5f, 0x83, 0xa0, 0xfb, 0x3a, 0xc9, 0x25, 0x5f, 0xfa, 0x43, 0x5f, 0x70, 0xe2, 0xab, 0x65, 0x55, 0x66, 0xe5, 0xfb, 0x8b, 0x78, 0xb8, 0x02, 0xc1, 0x87, 0xcf, 0xf1, 0xc5, 0xe4, 0x0f, 0xed, 0x06, 0x97, 0x8c, 0x5d, 0x59, 0x76, 0xeb, 0x4c, 0xa7, 0x75, 0x80, 0x63, 0x99, 0xa6, 0xfc, 0x4d, 0xb5, 0x0c, 0x1f, 0x88, 0x66, 0x1b, 0xa6, 0x8a, 0xbc, 0x21, 0xfb, 0x2c, 0xcd, 0x53, 0x7f, 0x50, 0x18, 0xf3, 0x6e, 0xd1, 0xf7, 0xd4, 0x53, 0x83, 0xfd, 0x46, 0x9e, 0x77, 0xba, 0xb3, 0xe8, 0xa9, 0x5d, 0xfa, 0x1b, 0x94, 0x1e, 0x43, 0x0d, 0xde, 0xc5, 0x52, 0xdc, 0xd8, 0x2f, 0x5d, 0x10, 0xd2, 0x9c, 0xd1, 0x0a, 0x22, 0xd1, 0x7c, 0xe2, 0x42, 0x59, 0x28, 0xff, 0x5d, 0x07, 0x10, 0xdc, 0xe7, 0xd9, 0xf8, 0x3b, 0x12, 0xe0, 0x4c, 0x1a, 0x01, 0x59, 0xc2, 0x71, 0x76, 0xe0, 0x4a, 0xcc } +, + /* Signature */ + 128, + { 0x3f, 0x11, 0xea, 0x73, 0x9f, 0x32, 0x9c, 0x9d, 0x40, 0x04, 0x60, 0x34, 0xb6, 0xc0, 0xcf, 0xce, 0xb4, 0x9b, 0xc3, 0x20, 0x1a, 0x5f, 0x25, 0xea, 0xf5, 0x01, 0x5a, 0xed, 0xed, 0x02, 0x18, 0x9c, 0xe0, 0xb0, 0xcf, 0xde, 0x19, 0x12, 0x5b, 0xd2, 0x88, 0xb7, 0xd0, 0xc0, 0x62, 0x32, 0x1a, 0x5b, 0xdc, 0x2c, 0xfa, 0x42, 0x26, 0xf5, 0x10, 0x4a, 0x1f, 0xba, 0xeb, 0xbe, 0x7f, 0x72, 0xf5, 0xf7, 0x92, 0x7e, 0x1e, 0xae, 0x26, 0xfd, 0xc5, 0xba, 0x92, 0xf2, 0xd3, 0xf8, 0x69, 0xeb, 0xc3, 0x2d, 0x90, 0x18, 0xdd, 0x04, 0xed, 0xe8, 0x6d, 0xe5, 0xc4, 0x54, 0xf1, 0xf7, 0xa1, 0xb2, 0xe2, 0xd1, 0x94, 0x0a, 0xac, 0xae, 0x27, 0x79, 0x63, 0x55, 0xfe, 0x18, 0xac, 0x80, 0x97, 0x53, 0x53, 0x92, 0x9a, 0xc6, 0xa8, 0x38, 0x45, 0x8b, 0x5d, 0x9d, 0xc7, 0x57, 0x6e, 0x38, 0x87, 0xee, 0x7b, 0xca } + +} +, +{ + "PKCS#1 v1.5 Signature Example 2.7", + /* Message to be signed */ + 256, + { 0x96, 0xff, 0x99, 0xf1, 0x50, 0x60, 0xc9, 0x73, 0xa6, 0x5b, 0x69, 0xa8, 0xb5, 0xb6, 0x3a, 0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 0xb2, 0xa2, 0x38, 0xc1, 0x99, 0x56, 0x20, 0x6c, 0x12, 0x4e, 0x0c, 0xd9, 0xc2, 0x46, 0x20, 0xb3, 0x6a, 0x83, 0xbf, 0x93, 0xb9, 0x6e, 0xf2, 0x04, 0xbd, 0xe5, 0x31, 0x6c, 0x1f, 0x53, 0x27, 0xc0, 0xa6, 0x21, 0xec, 0xce, 0x20, 0x93, 0xc0, 0x65, 0x2d, 0xdf, 0x32, 0x17, 0x68, 0xd7, 0x45, 0x02, 0xf1, 0x90, 0x85, 0x29, 0x62, 0x9b, 0xab, 0x68 } +, + /* Signature */ + 128, + { 0x18, 0x3f, 0x85, 0x3d, 0x0d, 0x03, 0x62, 0x18, 0x70, 0xe3, 0xba, 0x58, 0x68, 0x50, 0xc5, 0xea, 0x59, 0xfc, 0x4e, 0x9a, 0xcf, 0x37, 0x94, 0xb9, 0xad, 0x59, 0xa1, 0xbb, 0x80, 0x18, 0x1e, 0x77, 0xb1, 0x11, 0xd6, 0x64, 0x86, 0x47, 0xe1, 0x39, 0xa3, 0x9e, 0xc0, 0x4f, 0x86, 0x18, 0x74, 0x91, 0xe7, 0x7b, 0x4d, 0x75, 0xc0, 0x60, 0x79, 0x5b, 0xf7, 0x27, 0x08, 0x46, 0xd3, 0x96, 0xe0, 0xbf, 0xea, 0x83, 0x15, 0x79, 0x5e, 0x79, 0xd7, 0x6a, 0x91, 0x9e, 0xa7, 0x6b, 0x06, 0xee, 0xc1, 0x3b, 0xaf, 0x4c, 0xe8, 0xaf, 0xe1, 0xe3, 0x4b, 0xc2, 0x24, 0x57, 0xd7, 0xb7, 0x99, 0x2e, 0x08, 0x42, 0xef, 0xad, 0xe1, 0x79, 0xb0, 0xae, 0xda, 0xcc, 0xfb, 0xe2, 0xd2, 0x3d, 0x3e, 0xb3, 0x14, 0xe1, 0xde, 0x91, 0xc8, 0x71, 0xb9, 0xdb, 0x5a, 0xbf, 0xfb, 0x17, 0x47, 0x7f, 0xba, 0x23, 0x3a, 0x06 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 2.8", + /* Message to be signed */ + 179, + { 0x3a, 0x17, 0x6c, 0x79, 0x3a, 0x54, 0x6e, 0x2d, 0x27, 0x6f, 0xb8, 0xff, 0xc3, 0x28, 0x16, 0x3b, 0x49, 0x49, 0x97, 0xa5, 0x30, 0x2a, 0xae, 0x2e, 0x50, 0x45, 0xa2, 0xa2, 0x06, 0x87, 0xea, 0x6d, 0x1f, 0x18, 0x1c, 0x6a, 0xbf, 0xe6, 0x09, 0x0c, 0x8d, 0xc4, 0x02, 0x56, 0xdb, 0x3d, 0xe0, 0x83, 0x22, 0x64, 0x7f, 0xb7, 0x95, 0xbb, 0xa1, 0x71, 0x3f, 0xb5, 0x7e, 0x33, 0xd5, 0x3e, 0x0e, 0x13, 0xbe, 0xda, 0xc6, 0xa6, 0x58, 0xad, 0x4a, 0xb4, 0x91, 0x22, 0x38, 0x81, 0x19, 0x8d, 0xf2, 0x93, 0x67, 0xfa, 0xad, 0xe8, 0xbe, 0x9f, 0xca, 0xa4, 0xe4, 0x83, 0xf7, 0xb7, 0xf3, 0xdc, 0x7c, 0xbb, 0xf9, 0x7a, 0x17, 0xaa, 0xd8, 0x8c, 0x26, 0xcf, 0xc6, 0x41, 0x0f, 0x94, 0x5b, 0x54, 0xfc, 0x53, 0xdb, 0x55, 0xac, 0x80, 0x3d, 0x8b, 0x73, 0x69, 0x1b, 0x14, 0x84, 0x84, 0x7d, 0x7f, 0x3b, 0x7e, 0x93, 0x94, 0xe5, 0x5f, 0x0a, 0x51, 0xfe, 0x61, 0xae, 0x84, 0x52, 0x3c, 0x94, 0xb2, 0x2e, 0x82, 0x39, 0x6d, 0xb6, 0xcf, 0xac, 0xb7, 0x2e, 0x0e, 0xe4, 0x94, 0xaa, 0x0f, 0x1f, 0xa5, 0x93, 0x12, 0x54, 0x43, 0xae, 0x15, 0x55, 0xa6, 0xa9, 0x33, 0xfa, 0xce, 0x00, 0x74, 0x79, 0x1d, 0xc2, 0xc2, 0x92, 0x42, 0xeb } +, + /* Signature */ + 128, + { 0x41, 0x3c, 0x92, 0x23, 0xa2, 0xe9, 0xb1, 0x22, 0xcd, 0x87, 0x25, 0x77, 0xe5, 0x2f, 0x31, 0x3d, 0x41, 0xda, 0xc7, 0x9a, 0x26, 0xcb, 0x10, 0x33, 0xda, 0x0b, 0x6f, 0xcc, 0x4b, 0x48, 0x21, 0x07, 0x74, 0x4b, 0xf4, 0x90, 0xfa, 0x79, 0x8d, 0xcc, 0xd0, 0xcb, 0xd1, 0x18, 0xef, 0x39, 0xc0, 0xf5, 0x59, 0xd8, 0x7b, 0x89, 0x33, 0x5d, 0xb0, 0x9b, 0xe7, 0x70, 0x0f, 0xb0, 0x9f, 0xdb, 0xd3, 0x40, 0x40, 0xa0, 0x0b, 0xe5, 0xca, 0x42, 0x88, 0x34, 0x77, 0xb0, 0x6e, 0x4e, 0x10, 0xa7, 0xcb, 0x11, 0x76, 0x8f, 0xcb, 0x02, 0xc3, 0x4f, 0xb1, 0x06, 0xe5, 0x22, 0x86, 0x0d, 0x10, 0x69, 0x39, 0x06, 0x26, 0x0f, 0x43, 0xd9, 0x06, 0x12, 0x99, 0x03, 0x93, 0xa8, 0xff, 0xac, 0x9f, 0xd7, 0x0c, 0xa3, 0x78, 0x29, 0x11, 0x1e, 0xeb, 0xa6, 0xf3, 0xde, 0xe5, 0x4e, 0xf1, 0xc1, 0x62, 0x68, 0xb3, 0x3e } + +} +, +{ + "PKCS#1 v1.5 Signature Example 2.9", + /* Message to be signed */ + 197, + { 0x06, 0x8a, 0x99, 0x1b, 0x32, 0xb6, 0x76, 0xc6, 0x4b, 0x89, 0x8c, 0x67, 0xe1, 0x13, 0x72, 0x82, 0xb4, 0x37, 0x11, 0xb0, 0xd0, 0x67, 0x1c, 0x24, 0x7d, 0x9f, 0x7c, 0x48, 0xf5, 0x04, 0x3e, 0x4f, 0xc2, 0x06, 0xdc, 0x65, 0xaf, 0x89, 0x06, 0xf2, 0x52, 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0xbd, 0x15, 0x0b, 0x13, 0x94, 0xc7, 0xac, 0xd5, 0x97, 0x8b, 0xca, 0x03, 0xf7, 0xb9, 0xd9, 0x2a, 0x29, 0xb8, 0xe2, 0x85, 0x6b, 0x0d, 0xa0, 0x7f, 0x0b, 0xb1, 0x5c, 0x0b, 0x33, 0xe0, 0x54, 0x87, 0x99, 0x1a, 0xd9, 0x7a, 0x81, 0x2d, 0xc9, 0x04, 0xaa, 0xf0, 0xfd, 0x1e, 0x38, 0x7e, 0xf1, 0xc2, 0x70, 0xc6, 0x86, 0x8d, 0x3e, 0xe1, 0xc6, 0x11, 0x57, 0x7b, 0xc4, 0xd0, 0x7f, 0xf4, 0x56, 0xb2, 0x43, 0x98, 0x32, 0x90, 0x8a, 0x3d, 0xcc, 0x4f, 0xc0, 0x99, 0x04, 0x72, 0xfd, 0xa3, 0xcc, 0x61, 0x11, 0x93, 0x0b, 0x99, 0x79, 0x5d, 0x60, 0xc0, 0xe3, 0x78, 0x88, 0xe8, 0x7c, 0xe0, 0x0b, 0xbf, 0x3c, 0x1c, 0xf3, 0x07, 0xf9, 0xe1 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 2.10", + /* Message to be signed */ + 88, + { 0xd6, 0x83, 0x9e, 0xe6, 0xd0, 0x74, 0x50, 0x32, 0x7e, 0x09, 0xa0, 0x3e, 0x1e, 0xc2, 0x80, 0xe1, 0xc8, 0xd1, 0x15, 0x00, 0xdc, 0x39, 0x0a, 0x49, 0xa9, 0xc9, 0x82, 0x87, 0x49, 0xc3, 0xe9, 0xa4, 0xbe, 0xe2, 0xba, 0x57, 0x6f, 0x6d, 0x12, 0x17, 0xa8, 0xe7, 0x85, 0x4a, 0x90, 0x7e, 0xeb, 0x93, 0xdf, 0xff, 0x92, 0x30, 0x8a, 0xd0, 0xd9, 0x4e, 0x2b, 0x38, 0x1f, 0x92, 0xb0, 0xe8, 0x4a, 0x47, 0x1b, 0xf1, 0xf3, 0x7a, 0x68, 0xe9, 0x65, 0xf6, 0x58, 0x59, 0xd1, 0xfd, 0xfd, 0x6f, 0xea, 0x84, 0x40, 0x79, 0xc4, 0x03, 0x70, 0xdc, 0xea, 0xe2 } +, + /* Signature */ + 128, + { 0xa7, 0xc5, 0xf6, 0xd0, 0xde, 0x9c, 0xf8, 0xf4, 0x17, 0x37, 0xf2, 0x3a, 0xe3, 0xe8, 0xcf, 0x60, 0x9a, 0xeb, 0xcf, 0x22, 0xd5, 0xde, 0x12, 0x13, 0xd9, 0x57, 0x3c, 0xb9, 0x44, 0x03, 0xf8, 0x9c, 0x0f, 0x70, 0x88, 0xff, 0xfc, 0x61, 0x10, 0x6f, 0xa6, 0x09, 0xc7, 0x37, 0x1a, 0x8d, 0x7e, 0x1b, 0xcd, 0x22, 0x1b, 0xc1, 0xad, 0x94, 0x91, 0x2f, 0xab, 0xf2, 0xff, 0xc0, 0x2f, 0x84, 0x84, 0x56, 0x4c, 0x22, 0x5c, 0x06, 0x9b, 0xfc, 0x6d, 0xa9, 0xf3, 0xf9, 0xf4, 0x97, 0x4e, 0x08, 0xe1, 0xfe, 0x56, 0xf7, 0x48, 0xff, 0x79, 0x05, 0x97, 0x90, 0x6a, 0x95, 0x4e, 0x38, 0x37, 0x43, 0xa3, 0x7e, 0x57, 0x5f, 0xef, 0x07, 0x4f, 0x06, 0x0f, 0x3d, 0xd1, 0x5b, 0x5e, 0xe0, 0xf9, 0x4d, 0xba, 0x69, 0xd8, 0x6c, 0x99, 0x22, 0x3f, 0xa9, 0xc3, 0xa6, 0x1a, 0x8c, 0xb2, 0xaf, 0x2f, 0xab, 0x1e, 0x04 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 2.11", + /* Message to be signed */ + 33, + { 0x33, 0x84, 0x9c, 0x67, 0xdf, 0x9a, 0x6f, 0xfa, 0xc3, 0xda, 0x90, 0xa8, 0xcd, 0x31, 0x73, 0x1a, 0x02, 0x97, 0xb9, 0xd6, 0x01, 0x0a, 0x03, 0x32, 0x0f, 0x88, 0x45, 0x03, 0x5f, 0xc3, 0x43, 0x09, 0xad } +, + /* Signature */ + 128, + { 0x1b, 0x87, 0x05, 0x1f, 0x15, 0x91, 0xc8, 0xae, 0x7e, 0xe3, 0xcb, 0x24, 0x26, 0x70, 0x39, 0xa7, 0x28, 0x40, 0x5d, 0xbf, 0x23, 0x1c, 0xaf, 0x21, 0xf3, 0x24, 0x7f, 0x05, 0x85, 0x8b, 0x2a, 0x51, 0x65, 0x0b, 0x81, 0xbc, 0x53, 0x77, 0x86, 0x5e, 0x4c, 0x1e, 0x8f, 0xd0, 0x36, 0x41, 0x52, 0xa1, 0x6b, 0xc5, 0x8f, 0x7d, 0x2a, 0xc0, 0x1c, 0xa6, 0x79, 0xcc, 0x49, 0xdd, 0x04, 0x89, 0x03, 0xd5, 0x5a, 0xd0, 0x5f, 0x10, 0x2c, 0x74, 0xb3, 0x60, 0x1f, 0x25, 0xad, 0x30, 0x62, 0x40, 0x25, 0xc3, 0x0b, 0x6f, 0x0f, 0x79, 0x11, 0xfc, 0x22, 0x45, 0x8e, 0x5d, 0x43, 0x5f, 0x38, 0x8e, 0x3f, 0xbc, 0x49, 0x5f, 0xa0, 0xc6, 0x10, 0xc1, 0x29, 0x8f, 0x82, 0x1d, 0xa5, 0x38, 0x40, 0x3a, 0x93, 0x36, 0x4d, 0x2e, 0xab, 0xf1, 0xe3, 0xb3, 0x2f, 0x81, 0x10, 0xa7, 0xe0, 0x3e, 0x37, 0x2e, 0xcb, 0xc5 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 2.12", + /* Message to be signed */ + 77, + { 0xb3, 0xda, 0xba, 0xca, 0x20, 0x59, 0xa7, 0x0e, 0x25, 0xcb, 0xdd, 0xf4, 0xaa, 0x59, 0x25, 0x99, 0x57, 0x54, 0xac, 0xe4, 0x3c, 0x5d, 0x60, 0x36, 0x40, 0x48, 0x9a, 0xf4, 0x8f, 0xea, 0x6e, 0xdc, 0x4e, 0x19, 0xcb, 0xee, 0xa2, 0xc0, 0xdb, 0x62, 0xae, 0x0a, 0x10, 0x4c, 0x72, 0xe4, 0xcd, 0x56, 0xcb, 0x53, 0x2f, 0x4f, 0xe5, 0x77, 0xb3, 0x6a, 0x81, 0x98, 0xb4, 0x87, 0x9d, 0x7f, 0xf8, 0x04, 0x26, 0x90, 0xf6, 0x62, 0x77, 0x3f, 0x3d, 0x63, 0x93, 0xf2, 0x58, 0x98, 0xd2 } +, + /* Signature */ + 128, + { 0x26, 0xf1, 0x37, 0x70, 0x26, 0x3f, 0xc5, 0xbd, 0xbe, 0xad, 0xf8, 0x8f, 0xb4, 0xdd, 0x30, 0x7a, 0x38, 0x95, 0x9b, 0x16, 0xf3, 0xdf, 0x94, 0x6a, 0xde, 0x86, 0x4b, 0x1e, 0x7e, 0x91, 0x4d, 0x36, 0x4e, 0xbf, 0x9a, 0xdf, 0xd8, 0x6a, 0x70, 0x02, 0x2d, 0xc6, 0x1b, 0x43, 0xfb, 0x1f, 0xdf, 0x86, 0x96, 0x97, 0x8e, 0x2d, 0x1f, 0x6a, 0x2d, 0xef, 0xee, 0x75, 0xad, 0xaa, 0x69, 0xa3, 0x95, 0x32, 0x07, 0x40, 0x50, 0xbe, 0x70, 0x8e, 0xaf, 0x03, 0x1d, 0x5f, 0xae, 0x0f, 0xfe, 0x24, 0x5b, 0xa4, 0xff, 0x3c, 0x5e, 0x34, 0x0a, 0xf5, 0xdf, 0xec, 0x6a, 0x4c, 0xce, 0x0e, 0x18, 0x87, 0x6c, 0xfc, 0x13, 0x66, 0xee, 0xed, 0xdf, 0xce, 0x0f, 0x83, 0x5b, 0x38, 0xe8, 0x18, 0x81, 0xb1, 0xfc, 0x58, 0x32, 0x93, 0x0f, 0xc7, 0x9b, 0x08, 0xf1, 0xfb, 0x34, 0xfb, 0x22, 0x42, 0x33, 0xf4, 0xc4, 0x68 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 2.13", + /* Message to be signed */ + 94, + { 0x09, 0x91, 0x12, 0xfa, 0xe7, 0x40, 0x88, 0x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0x9c, 0xff, 0xdd, 0xef, 0x0b, 0xa2, 0x17, 0x58, 0x85, 0xa8, 0x0d, 0xc4, 0xcd, 0x92, 0xd6, 0xb7, 0x9d, 0x9c, 0x6a, 0x81, 0x69, 0x6e, 0x16, 0xf9, 0xa8, 0x3a, 0x10, 0xca, 0x8e, 0xfa, 0xf1, 0x97, 0x5f, 0x55 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 2.14", + /* Message to be signed */ + 194, + { 0xaa, 0x17, 0xe6, 0xbb, 0xd6, 0xdb, 0x19, 0xe5, 0x4b, 0xee, 0x1a, 0x7f, 0x0e, 0xdc, 0xca, 0xce, 0xab, 0x63, 0x5d, 0x76, 0x28, 0xfc, 0xaa, 0x18, 0xec, 0xfa, 0xfc, 0x40, 0x1c, 0xb3, 0xfe, 0xb5, 0x1f, 0x9a, 0x37, 0x31, 0xf3, 0x80, 0x2c, 0xbe, 0xa8, 0x1c, 0x73, 0x30, 0x28, 0xc9, 0x58, 0x4b, 0x6b, 0x78, 0xe2, 0x05, 0x59, 0x54, 0xcf, 0x91, 0x04, 0xda, 0xa6, 0x77, 0xaa, 0x40, 0xbe, 0x9b, 0x7c, 0x65, 0xb0, 0x7a, 0xc4, 0xa8, 0xbf, 0x25, 0xc1, 0x14, 0x9e, 0x05, 0x47, 0x35, 0xcf, 0x3c, 0xe3, 0x32, 0xd4, 0x29, 0xbc, 0x73, 0x80, 0x24, 0x45, 0xdf, 0xb3, 0x68, 0x8b, 0xb8, 0x19, 0x48, 0xb5, 0x7e, 0x27, 0x6a, 0xf3, 0x24, 0x62, 0xf7, 0xad, 0x80, 0x4d, 0x50, 0xc9, 0x3b, 0xc7, 0xe9, 0xef, 0x75, 0x37, 0x69, 0x5a, 0x27, 0x1a, 0xf7, 0x2e, 0x4b, 0xd4, 0x7c, 0xe5, 0xfa, 0x9d, 0x62, 0xf2, 0xda, 0xc0, 0x33, 0x36, 0x23, 0xf4, 0x9e, 0xb9, 0xd6, 0xd7, 0x80, 0x34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 0x4a } + +} +, +{ + "PKCS#1 v1.5 Signature Example 2.15", + /* Message to be signed */ + 141, + { 0x28, 0x24, 0x9c, 0x38, 0x7a, 0x06, 0x14, 0x40, 0xe9, 0x86, 0x38, 0xe1, 0xed, 0x78, 0xa4, 0x86, 0x51, 0x30, 0xe5, 0x75, 0x33, 0xd7, 0x89, 0x10, 0x8c, 0x63, 0xe1, 0x5f, 0xd8, 0x01, 0x9b, 0xad, 0x2c, 0xd1, 0xa7, 0x55, 0x2b, 0xd8, 0xaf, 0xd2, 0x06, 0xd9, 0x78, 0xeb, 0x1f, 0x2c, 0xf3, 0xf2, 0x3a, 0xfc, 0x4b, 0x34, 0xe6, 0xdd, 0x7f, 0x69, 0xc1, 0xfd, 0xf4, 0xfe, 0xc2, 0x52, 0x68, 0xd1, 0x86, 0x55, 0x51, 0x94, 0x49, 0x22, 0x90, 0x6d, 0xce, 0x6d, 0xc4, 0x41, 0xf9, 0x4a, 0x46, 0x6b, 0xf8, 0x39, 0x1a, 0xd8, 0x2b, 0xf5, 0x94, 0x0e, 0x44, 0x71, 0x10, 0xf1, 0xd1, 0x5d, 0xe1, 0x29, 0x31, 0x29, 0xfb, 0x44, 0x24, 0xa1, 0x71, 0x75, 0x19, 0xd6, 0xd4, 0x28, 0xd6, 0x6b, 0x7a, 0x10, 0x91, 0x42, 0xac, 0xc9, 0x15, 0xf1, 0xea, 0xc9, 0x6d, 0xef, 0x2c, 0x32, 0x90, 0xb0, 0x1d, 0x05, 0x99, 0x0b, 0xf8, 0x02, 0x3a, 0x6a, 0x64, 0x71, 0x2f, 0x63, 0x13, 0x7a, 0x8e } +, + /* Signature */ + 128, + { 0x57, 0x02, 0x06, 0x06, 0x69, 0xed, 0x47, 0xbb, 0xca, 0x11, 0xb9, 0x16, 0x68, 0x28, 0x9e, 0xa3, 0xf5, 0xe7, 0x46, 0xad, 0x2e, 0x38, 0x6d, 0xd1, 0xbc, 0x2a, 0x8b, 0xab, 0x17, 0x46, 0xba, 0x2a, 0x64, 0xbf, 0x15, 0xb3, 0xfc, 0x2e, 0xc8, 0xb0, 0xcc, 0x99, 0xd8, 0x54, 0xfa, 0x32, 0x11, 0xc9, 0x55, 0xc4, 0x55, 0xd7, 0xff, 0x2e, 0x1e, 0xe2, 0x39, 0xf5, 0x4f, 0x38, 0x6a, 0x42, 0xbb, 0x25, 0x40, 0xa8, 0x75, 0x8f, 0x32, 0x97, 0xe5, 0x52, 0xde, 0x1e, 0xbe, 0x8e, 0xac, 0x70, 0xf3, 0x54, 0x87, 0x94, 0x2b, 0xba, 0xda, 0xd5, 0xbd, 0x95, 0x73, 0x90, 0xff, 0x17, 0x93, 0xaf, 0x3d, 0x30, 0xd9, 0x36, 0xb6, 0xf7, 0x9b, 0x44, 0xa9, 0xb6, 0x3c, 0xee, 0x62, 0xd5, 0x58, 0x4d, 0xa3, 0xa1, 0xfc, 0xff, 0xa5, 0xb6, 0xfe, 0xee, 0xc1, 0x1c, 0xd6, 0x3b, 0x18, 0x0f, 0x0b, 0xfc, 0x5b, 0x6b } + +} +, +{ + "PKCS#1 v1.5 Signature Example 2.16", + /* Message to be signed */ + 135, + { 0xe4, 0x91, 0xa1, 0x56, 0xfd, 0xba, 0x31, 0x6a, 0x2a, 0x20, 0xa1, 0x2e, 0xea, 0x50, 0xbe, 0x77, 0x4e, 0xc9, 0xaa, 0xbe, 0xb1, 0xc3, 0x98, 0xe9, 0x08, 0xbe, 0xa3, 0x29, 0x68, 0x21, 0x7e, 0xa4, 0x1e, 0x96, 0x6d, 0xb7, 0x27, 0x2f, 0x0e, 0xfa, 0x37, 0xc9, 0x0a, 0xe4, 0xe9, 0xf3, 0x86, 0x21, 0xa6, 0x27, 0xa9, 0xd1, 0x2c, 0x8b, 0x4e, 0x80, 0x60, 0xc5, 0x45, 0xc5, 0x60, 0x59, 0xe9, 0xe4, 0x8a, 0x7f, 0x16, 0x81, 0x36, 0x72, 0x47, 0x33, 0x58, 0x19, 0xba, 0x12, 0x7e, 0x65, 0x93, 0x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b, 0x43, 0x9a } + +} +, +{ + "PKCS#1 v1.5 Signature Example 2.17", + /* Message to be signed */ + 62, + { 0x06, 0xad, 0xd7, 0x5a, 0xb6, 0x89, 0xde, 0x06, 0x77, 0x44, 0xe6, 0x9a, 0x2e, 0xbd, 0x4b, 0x90, 0xfa, 0x93, 0x83, 0x00, 0x3c, 0xd0, 0x5f, 0xf5, 0x36, 0xcb, 0xf2, 0x94, 0xcd, 0x21, 0x5f, 0x09, 0x23, 0xb7, 0xfc, 0x90, 0x04, 0xf0, 0xaa, 0x18, 0x52, 0x71, 0xa1, 0xd0, 0x06, 0x1f, 0xd0, 0xe9, 0x77, 0x7a, 0xd1, 0xec, 0x0c, 0x71, 0x59, 0x1f, 0x57, 0x8b, 0xf7, 0xb8, 0xe5, 0xa1 } +, + /* Signature */ + 128, + { 0x45, 0x14, 0x21, 0x0e, 0x54, 0x1d, 0x5b, 0xad, 0x7d, 0xd6, 0x0a, 0xe5, 0x49, 0xb9, 0x43, 0xac, 0xc4, 0x4f, 0x21, 0x39, 0x0d, 0xf5, 0xb6, 0x13, 0x18, 0x45, 0x5a, 0x17, 0x61, 0x0d, 0xf5, 0xb7, 0x4d, 0x84, 0xae, 0xd2, 0x32, 0xf1, 0x7e, 0x59, 0xd9, 0x1d, 0xd2, 0x65, 0x99, 0x22, 0xf8, 0x12, 0xdb, 0xd4, 0x96, 0x81, 0x69, 0x03, 0x84, 0xb9, 0x54, 0xe9, 0xad, 0xfb, 0x9b, 0x1a, 0x96, 0x8c, 0x0c, 0xbf, 0xf7, 0x63, 0xec, 0xee, 0xd6, 0x27, 0x50, 0xc5, 0x91, 0x64, 0xb5, 0xe0, 0x80, 0xa8, 0xfe, 0xf3, 0xd5, 0x5b, 0xfe, 0x2a, 0xcf, 0xad, 0x27, 0x52, 0xa6, 0xa8, 0x45, 0x9f, 0xa1, 0xfa, 0xb4, 0x9a, 0xd3, 0x78, 0xc6, 0x96, 0x4b, 0x23, 0xee, 0x97, 0xfd, 0x10, 0x34, 0x61, 0x0c, 0x5c, 0xc1, 0x4c, 0x61, 0xe0, 0xeb, 0xfb, 0x17, 0x11, 0xf8, 0xad, 0xe9, 0x6f, 0xe6, 0x55, 0x7b, 0x38 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 2.18", + /* Message to be signed */ + 78, + { 0x31, 0x1c, 0x88, 0x80, 0x05, 0x35, 0xd1, 0xb4, 0xe9, 0xbc, 0x78, 0x65, 0x18, 0x31, 0xa3, 0xe9, 0x67, 0xe7, 0x4b, 0x58, 0x28, 0xe0, 0x14, 0x11, 0x5f, 0xbe, 0x5f, 0x60, 0x9c, 0xe8, 0x65, 0xfe, 0xd2, 0x41, 0x97, 0x0f, 0x87, 0x2e, 0xc8, 0xf2, 0x3d, 0xc2, 0xbf, 0x61, 0x6b, 0x80, 0x20, 0xe4, 0x45, 0x64, 0xf9, 0x34, 0xdc, 0xbf, 0x72, 0x38, 0x61, 0x70, 0x07, 0x4d, 0x92, 0x0b, 0xa8, 0x95, 0xd3, 0x3d, 0xdf, 0x27, 0x93, 0x69, 0xf2, 0x36, 0xa1, 0x9a, 0xcd, 0x4f, 0xeb, 0x2b } +, + /* Signature */ + 128, + { 0x89, 0x46, 0x63, 0xe6, 0x3e, 0xc1, 0x9f, 0x56, 0x20, 0x3f, 0x4a, 0x44, 0x6b, 0x5e, 0x2b, 0x51, 0x74, 0xc8, 0x14, 0xa5, 0x4c, 0xbe, 0xa2, 0xc8, 0xe2, 0x98, 0xf9, 0x9b, 0x34, 0xc4, 0xbb, 0xc2, 0xc8, 0xb1, 0x77, 0xba, 0x98, 0x57, 0xd8, 0x1c, 0x85, 0x44, 0x36, 0xbd, 0x99, 0xaf, 0x58, 0xc0, 0x9d, 0xde, 0x5a, 0xca, 0xd2, 0xd6, 0x41, 0x50, 0x43, 0xfb, 0x40, 0xe7, 0x84, 0x75, 0xef, 0x74, 0x01, 0x2e, 0x4d, 0x4f, 0x75, 0xb2, 0xe9, 0x58, 0x85, 0xc8, 0x51, 0xa2, 0x3b, 0x4a, 0x25, 0x54, 0x93, 0xf3, 0x0c, 0x17, 0x2e, 0xae, 0x01, 0xd4, 0x79, 0x10, 0xfa, 0xbd, 0x26, 0x9f, 0x57, 0x94, 0x0b, 0xa4, 0x43, 0x50, 0x6c, 0x05, 0x22, 0xbf, 0x72, 0x8a, 0x25, 0x7a, 0xc1, 0x07, 0x3b, 0xdf, 0x99, 0xb4, 0x29, 0x56, 0xdb, 0x00, 0x2a, 0x30, 0xa5, 0x4d, 0xbd, 0xaf, 0x28, 0x4d, 0x8f, 0x69 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 2.19", + /* Message to be signed */ + 28, + { 0xb2, 0x65, 0xa9, 0x77, 0x7f, 0xaa, 0xf1, 0x58, 0xa8, 0x08, 0xaa, 0xe7, 0x08, 0x5a, 0x83, 0xe7, 0x07, 0x9c, 0xef, 0x80, 0xd5, 0xfc, 0x9d, 0x7c, 0xdc, 0x96, 0x3e, 0xc9 } +, + /* Signature */ + 128, + { 0x28, 0x1e, 0x88, 0xce, 0x19, 0x0e, 0x98, 0x62, 0x90, 0x34, 0x36, 0xa8, 0x6b, 0xa4, 0x37, 0x27, 0x16, 0x44, 0x9c, 0xc0, 0xce, 0x8d, 0x55, 0x4f, 0x70, 0x2d, 0x72, 0x52, 0xa0, 0x67, 0x60, 0xaf, 0x42, 0x12, 0x1d, 0xd0, 0x9b, 0xf6, 0xea, 0x13, 0xf0, 0xeb, 0x25, 0x2e, 0xcc, 0x76, 0x42, 0x10, 0x61, 0xf5, 0x74, 0x4b, 0xd8, 0xe3, 0x2c, 0x5a, 0x8c, 0x4f, 0xc1, 0xf9, 0x52, 0x1b, 0x3f, 0x5c, 0x29, 0x14, 0x6d, 0xd0, 0x59, 0x12, 0x91, 0xac, 0xbd, 0xc5, 0xb6, 0x3b, 0x55, 0x1d, 0x22, 0x8a, 0xe5, 0x38, 0x95, 0xb1, 0x97, 0xe6, 0xe2, 0x7a, 0x70, 0x68, 0xaa, 0x31, 0x03, 0xb7, 0x0c, 0xfb, 0x30, 0xf4, 0x15, 0x84, 0x5c, 0x7e, 0x52, 0x87, 0xf1, 0x11, 0x4e, 0x4c, 0xdf, 0xb4, 0x01, 0xed, 0x51, 0x98, 0x64, 0xcf, 0x61, 0xbc, 0x46, 0x9c, 0x66, 0x69, 0x9b, 0x29, 0x60, 0xa0, 0xaf, 0xf2 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 2.20", + /* Message to be signed */ + 102, + { 0x7c, 0x43, 0x9e, 0x7a, 0xb9, 0x90, 0xcd, 0xef, 0x95, 0x6c, 0x42, 0x39, 0x47, 0x9b, 0x49, 0xda, 0x84, 0x2f, 0x8b, 0x76, 0x76, 0x5a, 0x7a, 0xd4, 0x89, 0x7b, 0xc1, 0x6c, 0x61, 0xed, 0x3d, 0x09, 0x80, 0x5d, 0x76, 0xe8, 0xa5, 0xbe, 0x8b, 0x57, 0x8b, 0x95, 0x1f, 0x45, 0x45, 0xdf, 0x92, 0xa8, 0xa5, 0x37, 0xba, 0x3e, 0x2c, 0x13, 0xdc, 0xe0, 0xa0, 0x03, 0xe7, 0xb6, 0x24, 0x9e, 0x32, 0xbe, 0x94, 0x1f, 0x21, 0xcd, 0xa7, 0x25, 0xb8, 0x04, 0x07, 0xbe, 0x1e, 0x28, 0xbb, 0x9e, 0x39, 0x37, 0x38, 0x32, 0x53, 0x56, 0xec, 0x21, 0x74, 0x1d, 0x5c, 0x86, 0xf3, 0xc2, 0xb4, 0xf7, 0xb9, 0x47, 0xaf, 0xd5, 0x6b, 0x2d, 0x3a, 0xec } +, + /* Signature */ + 128, + { 0x6a, 0xfa, 0xd7, 0x7a, 0x05, 0x6d, 0x07, 0x29, 0x05, 0x86, 0xe9, 0x13, 0x80, 0x9a, 0x04, 0x37, 0xd3, 0x9a, 0xb3, 0x07, 0x32, 0x45, 0x12, 0xb2, 0xf5, 0xbc, 0x2b, 0xaf, 0x58, 0x0b, 0xf4, 0x55, 0x43, 0xeb, 0x04, 0xff, 0x83, 0xe9, 0x63, 0xa6, 0xd7, 0xf3, 0x3e, 0x9d, 0xff, 0xc1, 0xfc, 0xf4, 0x24, 0x48, 0xc5, 0xfc, 0xfa, 0x47, 0x27, 0x19, 0xc6, 0x51, 0xf8, 0x1f, 0x3c, 0x62, 0x22, 0x98, 0x3d, 0x38, 0x91, 0x7e, 0x29, 0xb4, 0x84, 0x85, 0x87, 0x9c, 0xeb, 0xb0, 0xa6, 0x1d, 0x38, 0x9e, 0x23, 0x8c, 0x9c, 0x71, 0xc3, 0x68, 0xed, 0xe4, 0x08, 0x3a, 0x94, 0x62, 0x97, 0xf7, 0x19, 0x0b, 0x4c, 0xef, 0x86, 0x7e, 0x9c, 0xcd, 0xa8, 0xf9, 0xff, 0xc6, 0x19, 0x84, 0xfc, 0xf0, 0x5d, 0x4f, 0xba, 0xfe, 0x10, 0x7d, 0xac, 0xf5, 0xb1, 0xdc, 0x8e, 0x2b, 0x14, 0x95, 0xb2, 0x44, 0xf8, 0xe7 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 3: A 1024-bit RSA key pair", +{ + /* Modulus */ + 128, + { 0xb5, 0xd7, 0x07, 0xb7, 0x92, 0xe0, 0x56, 0xf7, 0x2f, 0xd7, 0x6d, 0x8d, 0xa8, 0x89, 0xa5, 0x3c, 0xe4, 0xd8, 0xeb, 0xaa, 0x08, 0x2a, 0xee, 0xb2, 0x30, 0x32, 0xe3, 0xc5, 0xd8, 0xeb, 0xc4, 0xc1, 0x55, 0x61, 0x31, 0x9b, 0xe8, 0xdf, 0xe1, 0x88, 0x99, 0x1a, 0x89, 0x51, 0xd4, 0xb2, 0x3a, 0x51, 0xe8, 0xa9, 0x38, 0x2c, 0x80, 0x5e, 0x4c, 0xfd, 0x49, 0x0e, 0xbb, 0xce, 0xaa, 0x20, 0x80, 0x2a, 0xd6, 0x83, 0xb0, 0x5a, 0x10, 0x0f, 0x29, 0x98, 0x5f, 0x01, 0x1c, 0x3c, 0x8a, 0x44, 0x26, 0x25, 0x52, 0xd8, 0x3d, 0x9a, 0x1b, 0x7c, 0x27, 0x31, 0x5e, 0x14, 0x4a, 0xd8, 0xdf, 0x5c, 0xbe, 0x8b, 0xc6, 0x40, 0x0f, 0xd9, 0xcb, 0xe7, 0x6b, 0x74, 0x21, 0xd7, 0x08, 0xaa, 0x64, 0xf0, 0x40, 0xba, 0xe0, 0x7b, 0x7b, 0xd6, 0xf9, 0x22, 0x18, 0xf9, 0xa7, 0x29, 0x28, 0x4c, 0xc5, 0x98, 0xcd, 0xd1 } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 128, + { 0x45, 0x17, 0x92, 0xb5, 0x94, 0x47, 0xcc, 0x93, 0x78, 0xa8, 0xa4, 0xd6, 0x45, 0xfb, 0x22, 0xff, 0x4b, 0xbf, 0x06, 0x70, 0x61, 0x51, 0x1a, 0xc8, 0x36, 0xdb, 0x27, 0x43, 0xa6, 0x24, 0x13, 0x6b, 0x18, 0x6b, 0x69, 0x43, 0xa1, 0xcc, 0xeb, 0x6f, 0x91, 0x29, 0x0d, 0x93, 0x3b, 0xbb, 0x8a, 0xc0, 0x53, 0xa4, 0x74, 0x95, 0x28, 0x23, 0x6c, 0xa2, 0x72, 0xcf, 0x77, 0xd9, 0xd3, 0x37, 0xad, 0x2a, 0xb3, 0x6a, 0x87, 0xa9, 0x15, 0x3c, 0x5e, 0x16, 0x71, 0x6e, 0x09, 0xba, 0x0b, 0xea, 0xa6, 0x4b, 0x31, 0x25, 0x26, 0xd4, 0xa8, 0xc2, 0xdc, 0x68, 0xfe, 0x09, 0xe3, 0x7e, 0x50, 0x74, 0xa0, 0x90, 0x9d, 0x3f, 0x04, 0xab, 0x73, 0x90, 0x8a, 0x98, 0x0d, 0xec, 0x1d, 0xa7, 0xeb, 0x45, 0x05, 0xa4, 0x8b, 0xca, 0xd3, 0xb6, 0x0d, 0x01, 0x60, 0x84, 0x58, 0x64, 0xa6, 0x51, 0x1f, 0xf5, 0x59, 0xa7 } +, + /* Prime 1 */ + 64, + { 0xff, 0xa9, 0xf8, 0xe8, 0xb0, 0x82, 0x17, 0x0b, 0x63, 0x73, 0xf0, 0x0d, 0x73, 0xc4, 0x23, 0x86, 0xd4, 0x02, 0xf2, 0x80, 0x8b, 0x39, 0x3b, 0x32, 0xf7, 0x8f, 0x86, 0xea, 0xf6, 0x4b, 0x21, 0xbf, 0xdd, 0x33, 0x4f, 0xb9, 0xaa, 0xd1, 0x6b, 0xa6, 0xd9, 0xda, 0xdb, 0xc8, 0x94, 0x3a, 0x29, 0xe6, 0x63, 0xc8, 0xb3, 0x9c, 0x09, 0x59, 0x69, 0x02, 0x5b, 0xb9, 0xb2, 0xd9, 0xd6, 0xfe, 0x67, 0xb7 } +, + /* Prime 2 */ + 64, + { 0xb6, 0x14, 0x37, 0x8d, 0x5e, 0x3d, 0xa5, 0xa8, 0x0a, 0x6d, 0x73, 0x52, 0xfc, 0x66, 0xa5, 0x64, 0x59, 0x7b, 0x06, 0x8f, 0xc9, 0xd3, 0xaf, 0x5d, 0xb0, 0xe4, 0xe7, 0x35, 0xbe, 0xf8, 0x81, 0xdd, 0x40, 0x17, 0xee, 0x70, 0x82, 0x96, 0x19, 0x0b, 0x6f, 0xdc, 0x84, 0x04, 0xf0, 0x7b, 0xd9, 0xdc, 0x5c, 0xd5, 0xd2, 0xbe, 0x48, 0x86, 0xa7, 0xcb, 0xbc, 0xb2, 0x1d, 0x8c, 0x3d, 0x64, 0xa6, 0xb7 } +, + /* Prime exponent 1 */ + 64, + { 0x51, 0x0e, 0x68, 0x96, 0x0d, 0x70, 0x11, 0x32, 0x51, 0x23, 0xae, 0xd5, 0xf5, 0x00, 0x18, 0x6b, 0x64, 0xc8, 0x52, 0x6e, 0x22, 0xb5, 0xd0, 0x69, 0x06, 0x48, 0x00, 0xf4, 0x79, 0x85, 0xb4, 0x7b, 0x89, 0xfb, 0xfc, 0xa8, 0xd6, 0xd9, 0x72, 0x92, 0x01, 0xbb, 0xfb, 0xb6, 0x8a, 0x18, 0x2e, 0xb4, 0x96, 0xaa, 0x49, 0x17, 0x8d, 0x77, 0x45, 0x6d, 0xb3, 0xfb, 0x1a, 0x13, 0x2a, 0xb0, 0x99, 0xdd } +, + /* Prime exponent 2 */ + 64, + { 0x57, 0xeb, 0xbf, 0x3f, 0x76, 0x48, 0x52, 0x5b, 0xa8, 0x5d, 0x5d, 0x98, 0xae, 0xe4, 0x69, 0xec, 0xe1, 0x00, 0x75, 0x14, 0xad, 0xa2, 0x98, 0x45, 0xa7, 0x8b, 0x80, 0xd2, 0x05, 0x1b, 0x3e, 0xaa, 0x35, 0xae, 0xd8, 0xa6, 0x5f, 0x88, 0x57, 0x23, 0x9c, 0xaa, 0x60, 0xdd, 0x79, 0xba, 0x74, 0x62, 0xe2, 0x39, 0x26, 0x00, 0x58, 0x49, 0x1d, 0x71, 0x55, 0xf6, 0xb4, 0x29, 0xe9, 0xe3, 0x56, 0x55 } +, + /* Coefficient */ + 64, + { 0xee, 0x10, 0x7d, 0xc7, 0xef, 0xec, 0xe9, 0xa6, 0x5c, 0x0e, 0x87, 0x78, 0x9a, 0xf5, 0x59, 0x0c, 0x93, 0x83, 0x9d, 0xfe, 0x82, 0x85, 0x20, 0xda, 0x17, 0x74, 0xff, 0x80, 0xf7, 0xe5, 0x14, 0x55, 0x7f, 0xff, 0x10, 0xbd, 0x8c, 0xae, 0x18, 0x46, 0xef, 0xee, 0x7c, 0x10, 0xd7, 0xa1, 0x2c, 0x4a, 0x05, 0x5c, 0xc1, 0x36, 0xe4, 0xa4, 0xef, 0x25, 0xfd, 0x3e, 0xd9, 0xd0, 0xcd, 0xdf, 0x74, 0xf9 } + +} +, +{{ + "PKCS#1 v1.5 Signature Example 3.1", + /* Message to be signed */ + 82, + { 0x98, 0x6e, 0x7c, 0x43, 0xdb, 0xb6, 0x71, 0xbd, 0x41, 0xb9, 0xa7, 0xf4, 0xb6, 0xaf, 0xc8, 0x0e, 0x80, 0x5f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fd, 0x42, 0xf0, 0xac, 0xc8, 0x24, 0x62, 0x38, 0x1d, 0x9f, 0xa2, 0xef } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Signature Example 3.2", + /* Message to be signed */ + 11, + { 0x4c, 0x7b, 0x98, 0x12, 0x0c, 0x87, 0x50, 0x90, 0x87, 0xc4, 0x78 } +, + /* Signature */ + 128, + { 0x59, 0xe5, 0xcb, 0xe7, 0x33, 0x1b, 0x92, 0xe0, 0xcb, 0x8f, 0x68, 0x9e, 0xae, 0xbb, 0x30, 0xf2, 0xb3, 0x34, 0xa7, 0x46, 0xa6, 0x57, 0x05, 0x59, 0x12, 0xff, 0x1c, 0x92, 0x76, 0x0b, 0x0b, 0x85, 0xbc, 0x42, 0x82, 0xf3, 0x18, 0x4b, 0x9a, 0x81, 0x4f, 0x44, 0x37, 0xf8, 0x25, 0xae, 0x07, 0xd3, 0x56, 0xba, 0xc6, 0x9e, 0x54, 0x0c, 0x90, 0x94, 0x2c, 0x7f, 0x7e, 0x6f, 0xf4, 0x4f, 0xe5, 0x74, 0xf1, 0x21, 0x25, 0x0a, 0xd2, 0x30, 0xf4, 0xb5, 0x0c, 0x78, 0x31, 0x1e, 0x4f, 0xd3, 0xc9, 0xe2, 0x65, 0xf5, 0x17, 0xce, 0x32, 0x97, 0xc3, 0xe1, 0xdd, 0xdb, 0x5c, 0x86, 0x9c, 0x69, 0x8f, 0x44, 0xaf, 0x52, 0x5e, 0x73, 0x64, 0x01, 0xa8, 0x1b, 0x45, 0x9f, 0x19, 0x8a, 0xd1, 0x80, 0x8c, 0xcd, 0x92, 0x9d, 0x49, 0x04, 0x74, 0xca, 0xf7, 0x00, 0x5f, 0x91, 0x0d, 0xac, 0xde, 0x21, 0xb0, 0x77 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 3.3", + /* Message to be signed */ + 233, + { 0x66, 0xf7, 0x07, 0x54, 0x22, 0xc8, 0xec, 0x42, 0x16, 0xa9, 0xc4, 0xff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f, 0x47, 0xf6, 0xc7, 0xb0, 0xfa, 0x59, 0x6c, 0x65, 0xfa, 0x68, 0xa2, 0x3f, 0x0a, 0xb4, 0x32, 0x96, 0x2d, 0x18, 0xd4, 0x34, 0x3b, 0xd6, 0xfd, 0x67, 0xd0, 0x0b, 0x25, 0xb8, 0x1b, 0x09, 0xb5, 0x62, 0x03, 0x85, 0x64 } +, + /* Signature */ + 128, + { 0x59, 0x9e, 0x69, 0xc1, 0x54, 0xe4, 0xfe, 0x66, 0xb3, 0x6a, 0x69, 0x04, 0x92, 0xfa, 0xeb, 0xb2, 0xbb, 0xe7, 0x34, 0xe0, 0x41, 0x5d, 0x9f, 0x3c, 0xf7, 0xe3, 0x78, 0x28, 0xf5, 0x3e, 0x61, 0x13, 0x04, 0x49, 0x17, 0x3a, 0x33, 0x46, 0x0c, 0x6b, 0x4c, 0x8d, 0xc7, 0xd6, 0x81, 0xca, 0x6f, 0x4d, 0xaf, 0x1c, 0xb8, 0x16, 0xd4, 0x0a, 0xa9, 0x08, 0x2e, 0xe1, 0x93, 0x7b, 0xe4, 0xbc, 0x6a, 0x09, 0xc6, 0xde, 0x79, 0x8c, 0x82, 0x86, 0xfc, 0xd2, 0xa2, 0xb2, 0x19, 0x6c, 0x59, 0x99, 0x4c, 0x93, 0x7f, 0x37, 0x13, 0x07, 0x52, 0x61, 0x2c, 0x6b, 0xff, 0x6d, 0xbb, 0x53, 0xe0, 0x64, 0x7f, 0x88, 0x58, 0xbc, 0x38, 0x38, 0x64, 0x02, 0x1e, 0x6d, 0x56, 0x68, 0x19, 0x20, 0x24, 0x92, 0x97, 0x82, 0x22, 0x46, 0xa0, 0xf5, 0x28, 0xaa, 0xb3, 0xed, 0x18, 0x5e, 0xeb, 0xce, 0x91, 0x9c, 0xf8, 0x3e } + +} +, +{ + "PKCS#1 v1.5 Signature Example 3.4", + /* Message to be signed */ + 148, + { 0xd9, 0x34, 0x44, 0x28, 0xfa, 0x8a, 0x58, 0xf8, 0xfa, 0x7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0x96, 0x7b, 0x99, 0xe3, 0x44, 0xcb, 0x17, 0xfa, 0x3c, 0x96, 0x31, 0x29, 0x9b, 0x35, 0x89, 0x81, 0x8b, 0x37, 0xed, 0x9d, 0x5d, 0x78, 0x94, 0xe4, 0xa6, 0x9d, 0xdb, 0x24, 0x83, 0x2e, 0x1a, 0x88, 0x60, 0x01, 0x4e, 0xe5, 0xe5, 0xeb, 0x95, 0x3e, 0x8b, 0x35, 0x48, 0x4b, 0xa4, 0xfe, 0xc9, 0xc3, 0x03, 0x3a, 0xe2, 0xe1, 0x18, 0x9a, 0xf7, 0x94, 0xa7, 0x2e, 0x42, 0x67, 0x21, 0x5b, 0xfe, 0x45, 0x8f, 0x0f, 0xce, 0x6b, 0x37, 0xa5, 0x54, 0x9e, 0xf8, 0x05, 0x43, 0xd0, 0xd4, 0x1a, 0x87, 0xb2, 0xc6, 0xe4, 0xd8, 0x4c, 0xb5 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 3.5", + /* Message to be signed */ + 201, + { 0x8c, 0x67, 0x02, 0xda, 0xaf, 0x58, 0xf6, 0xa4, 0x75, 0xfa, 0xd2, 0xc7, 0xa4, 0xbb, 0x15, 0x6a, 0x57, 0x06, 0x42, 0x55, 0x77, 0xd5, 0xe3, 0x0c, 0x6a, 0x6b, 0xd3, 0x66, 0x9f, 0xd0, 0x30, 0xaf, 0xd7, 0x89, 0xfa, 0xa3, 0xd0, 0x10, 0x18, 0xd4, 0x5d, 0xb2, 0xa0, 0x47, 0xf5, 0x2c, 0xb4, 0xf6, 0x3d, 0xea, 0x36, 0x09, 0x42, 0xaf, 0xe4, 0x76, 0x26, 0x42, 0x06, 0xd9, 0x83, 0xad, 0x38, 0x36, 0xe1, 0x55, 0xc5, 0x6b, 0x2e, 0xcc, 0x08, 0x76, 0x3a, 0xfb, 0x9f, 0xd5, 0x1d, 0x19, 0x99, 0x0e, 0xfc, 0x33, 0x63, 0xf6, 0x57, 0xe2, 0x85, 0xe0, 0x35, 0x21,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d, 0x4d, 0xe0, 0xa3, 0x76, 0xe2, 0x2d, 0xac, 0x2f, 0x54, 0x8c, 0xd4, 0xba, 0x4a, 0x54, 0x2e, 0x71, 0x0f, 0x55, 0xce, 0x85, 0xa9, 0xc1, 0x95, 0x93, 0xc0, 0x8c, 0x87, 0xd2, 0x96, 0xd6, 0x35, 0x87, 0xb3, 0xfe, 0x2c, 0x5d, 0x11, 0x65, 0xee, 0x27, 0x74, 0x4c, 0x75, 0xd8, 0xf4, 0xf1, 0x43, 0x71, 0x63, 0x7c, 0x0c, 0x0a, 0x44, 0x62, 0x76, 0x28, 0x95, 0x83 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 3.6", + /* Message to be signed */ + 225, + { 0x56, 0xf4, 0xff, 0xd1, 0x27, 0x9d, 0xcf, 0xe5, 0x62, 0xa9, 0xdd, 0xd4, 0x1e, 0xcd, 0xf6, 0x0a, 0x3f, 0xf5, 0x82, 0x46, 0xbf, 0xaf, 0x95, 0x65, 0xcf, 0x67, 0x4b, 0x0b, 0x90, 0x75, 0xf4, 0x0e, 0xea, 0xc0, 0x8f, 0x0b, 0x89, 0x66, 0x61, 0x8a, 0x19, 0x6b, 0x12, 0x28, 0xeb, 0xce, 0x93, 0xfc, 0x9d, 0xd7, 0x9b, 0xd4, 0x63, 0xea, 0x7d, 0x2c, 0x97, 0x4d, 0x2c, 0x2f, 0x53, 0x9e, 0xaf, 0xb1, 0xb2, 0xbc, 0x1e, 0xa3, 0x4d, 0x74, 0xf7, 0x20, 0xe1, 0x19, 0x34, 0x2f, 0xf7, 0x13, 0x12, 0x25, 0xaa, 0x9a, 0xda, 0x89, 0x4b, 0x76, 0xb2, 0xec, 0xb1, 0x2f, 0x2f, 0x40, 0x28, 0x44, 0xb4, 0x42, 0x5c, 0xf8, 0xf1, 0xa3, 0x9b, 0x0a, 0x9c, 0x83, 0xb4, 0x5b, 0x03, 0xcf, 0xc0, 0xd1, 0x5f, 0xd3, 0x14, 0xd6, 0xab, 0xf5, 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0x72, 0x32, 0x9f, 0x00, 0xcc, 0x4c, 0x01, 0x22, 0x35, 0x59, 0x9a, 0x83, 0xfc, 0x45, 0x94, 0xfe, 0xd9, 0x23, 0x03, 0x49, 0x01, 0xed, 0xc2, 0x7d, 0x5f, 0x05, 0x79, 0x98, 0x34, 0x93, 0x5c, 0xab, 0xe2, 0x64, 0xff, 0xc1, 0x96, 0x63, 0x71, 0x4d, 0x8c, 0x3d, 0xe8, 0xe9, 0x61, 0x9f, 0xd2, 0x84, 0x2d, 0x22, 0x98, 0xf7, 0xa7, 0x2c, 0x99 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 3.7", + /* Message to be signed */ + 179, + { 0x0e, 0x79, 0xac, 0x9c, 0x9c, 0x03, 0x96, 0xd9, 0x69, 0xfb, 0x3f, 0x7c, 0xc9, 0x94, 0x7b, 0x07, 0x8b, 0xac, 0x49, 0x3b, 0x03, 0x52, 0xc8, 0xe0, 0xcd, 0xe5, 0x46, 0x3e, 0xa5, 0xc1, 0x18, 0x4f, 0xd5, 0x2a, 0x1f, 0xb7, 0x48, 0x19, 0x3c, 0x14, 0x7a, 0x74, 0x80, 0x0d, 0x24, 0xf7, 0x51, 0xba, 0x93, 0x5e, 0x19, 0xc9, 0x11, 0x5e, 0xdf, 0x07, 0x22, 0x88, 0x33, 0x0b, 0xf3, 0x83, 0xf4, 0x95, 0x29, 0x6b, 0xe1, 0xaa, 0x4a, 0x50, 0x95, 0xb9, 0x57, 0x3b, 0xcb, 0xdb, 0x22, 0x8a, 0x43, 0x13, 0x12, 0x37, 0x86, 0x5d, 0x26, 0xdf, 0xbf, 0xcf, 0xef, 0x07, 0x8f, 0x35, 0x9f, 0x9a, 0x95, 0x62, 0xe2, 0x5b, 0x69, 0x63, 0x85, 0xe1, 0x28, 0x13, 0xff, 0xfb, 0xc8, 0xd5, 0x29, 0x81, 0x9a, 0x91, 0x45, 0x1d, 0x33, 0xa5, 0x07, 0x26, 0x39, 0x2e, 0x4f, 0xef, 0x29, 0x41, 0x8c, 0xca, 0x2c, 0x73, 0xa0, 0x68, 0xe6, 0x0e, 0xae, 0x31, 0x84, 0x70, 0x33, 0x1a, 0x0f, 0x1d, 0xb4, 0xbb, 0xb6, 0x37, 0x17, 0x3b, 0xe8, 0x0f, 0xea, 0x03, 0xc8, 0x2c, 0x15, 0xd0, 0x01, 0x93, 0x36, 0x2d, 0x3a, 0x18, 0xad, 0x9e, 0x2f, 0x68, 0x05, 0x00, 0xd7, 0x26, 0x5b, 0x15, 0x57, 0x03, 0x3a, 0x52, 0x09, 0x77, 0xd8, 0x10, 0xfc } +, + /* Signature */ + 128, + { 0x73, 0x3b, 0x7f, 0xea, 0x12, 0x0c, 0xa5, 0xf0, 0x35, 0x9a, 0x89, 0x05, 0x75, 0x0c, 0x49, 0xc3, 0x63, 0xd8, 0x84, 0xf5, 0x6c, 0x2b, 0x7a, 0x72, 0x9f, 0xad, 0x7b, 0xff, 0x44, 0x5a, 0x1e, 0x54, 0x79, 0x89, 0x41, 0x74, 0x53, 0x93, 0xe1, 0x76, 0x77, 0x12, 0xac, 0x4b, 0x9d, 0xd2, 0x68, 0x38, 0x88, 0xd9, 0xe6, 0x8b, 0x90, 0x5d, 0xba, 0xb8, 0x79, 0x21, 0x85, 0x18, 0x48, 0x72, 0x73, 0x86, 0x02, 0xea, 0xf4, 0xa8, 0x0f, 0x45, 0x95, 0xf7, 0x8f, 0xd4, 0xa4, 0x61, 0x0b, 0xf8, 0x22, 0x0b, 0x86, 0xa2, 0x88, 0x5f, 0xda, 0x24, 0xe1, 0x99, 0x64, 0x28, 0xcc, 0xd1, 0x5f, 0x20, 0x08, 0xe0, 0x68, 0x51, 0xb2, 0xee, 0xad, 0xc3, 0xdc, 0x8e, 0x03, 0x01, 0x2f, 0x9b, 0xdb, 0x3c, 0xe0, 0x57, 0x5d, 0xdc, 0x3a, 0xdc, 0x7c, 0x59, 0x08, 0x49, 0x8b, 0x69, 0xa7, 0x97, 0xba, 0x58, 0x29, 0xc7 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 3.8", + /* Message to be signed */ + 29, + { 0x22, 0xeb, 0x7d, 0xba, 0x73, 0x30, 0x7c, 0x7c, 0x52, 0xa0, 0x7c, 0xed, 0x89, 0xdb, 0x8b, 0xc5, 0x39, 0x4a, 0xed, 0x22, 0x72, 0xf7, 0xe8, 0x1a, 0x74, 0xf4, 0xc0, 0x2d, 0x14 } +, + /* Signature */ + 128, + { 0x9e, 0xa4, 0x60, 0x0a, 0x1a, 0x65, 0x49, 0xfd, 0x39, 0x75, 0xf6, 0x49, 0x8a, 0x04, 0xd6, 0x9f, 0x96, 0xfa, 0xd0, 0xe8, 0xe6, 0xfe, 0xbc, 0xfb, 0xe0, 0x1c, 0x2f, 0x83, 0x17, 0x0b, 0xc7, 0x4e, 0xb9, 0x1f, 0x2e, 0x33, 0x53, 0x38, 0xd5, 0x83, 0xe8, 0x85, 0xaa, 0xc6, 0x14, 0x24, 0xc9, 0xb2, 0x66, 0xc3, 0xd2, 0xd9, 0x8e, 0x79, 0x77, 0xff, 0xe4, 0x95, 0xf9, 0xc1, 0xa6, 0xee, 0x5e, 0xf4, 0x1a, 0x4c, 0xc7, 0x47, 0x8c, 0x24, 0xb3, 0x16, 0xc7, 0xd9, 0xf6, 0xdb, 0xaa, 0x65, 0xa4, 0xca, 0xde, 0xf1, 0x81, 0xca, 0x94, 0x6f, 0x9b, 0x92, 0x18, 0x4f, 0xae, 0xca, 0x8a, 0x13, 0x16, 0xae, 0xab, 0x5c, 0xd3, 0x87, 0x8c, 0x6d, 0xf0, 0x74, 0xf9, 0x06, 0x0b, 0x9d, 0xb6, 0x6d, 0xec, 0xe9, 0xa9, 0x36, 0x7d, 0x75, 0x49, 0x03, 0x5a, 0xc6, 0xbf, 0x19, 0x62, 0x36, 0x5e, 0x1f, 0xd3, 0xfc } + +} +, +{ + "PKCS#1 v1.5 Signature Example 3.9", + /* Message to be signed */ + 2, + { 0xf6, 0x80 } +, + /* Signature */ + 128, + { 0x51, 0x63, 0x90, 0x61, 0xfa, 0x7b, 0x7c, 0xd5, 0xdf, 0x64, 0xb3, 0x0a, 0x39, 0x4c, 0xcf, 0x7e, 0x24, 0x26, 0x97, 0x2a, 0xa1, 0xdc, 0xf5, 0xd4, 0x5e, 0xb8, 0xec, 0x2c, 0xd9, 0x0b, 0x9b, 0x19, 0x68, 0x92, 0xbe, 0x5f, 0xa0, 0x3c, 0x43, 0xf3, 0xc3, 0x72, 0x3a, 0xe3, 0x13, 0x0d, 0x61, 0x51, 0xb3, 0x3a, 0x63, 0x7c, 0xfc, 0x50, 0xba, 0x35, 0x26, 0xa7, 0x39, 0x6c, 0xf8, 0x47, 0x9c, 0x50, 0x8c, 0x18, 0x11, 0x81, 0x0d, 0x68, 0xb3, 0x88, 0x0a, 0xf6, 0xe6, 0x4b, 0x16, 0xbd, 0x70, 0x79, 0xbe, 0x9c, 0x00, 0x39, 0x29, 0x51, 0x22, 0x61, 0x89, 0x8f, 0xa5, 0x7c, 0x06, 0xff, 0x7e, 0x1d, 0x80, 0x39, 0xfa, 0x99, 0x3f, 0xd2, 0x05, 0x6a, 0xc7, 0x01, 0x9b, 0x8d, 0xbc, 0xf2, 0x53, 0x0d, 0x53, 0x80, 0xe6, 0x01, 0xa4, 0xa1, 0x87, 0x1b, 0x86, 0xc2, 0x0b, 0xc1, 0xc4, 0x89, 0xc5, 0xf3 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 3.10", + /* Message to be signed */ + 104, + { 0x65, 0x0e, 0x64, 0xed, 0x1d, 0xa8, 0x8b, 0xcf, 0x8a, 0xe2, 0x75, 0x22, 0xbe, 0x1d, 0x5c, 0x99, 0x19, 0xf2, 0x09, 0x9d, 0xd6, 0x32, 0x45, 0x5f, 0x66, 0xd9, 0xaf, 0xe8, 0xba, 0xf4, 0x6c, 0xc8, 0xa1, 0x98, 0x40, 0x9b, 0x09, 0x28, 0xdd, 0x87, 0x22, 0x62, 0x84, 0xd6, 0x69, 0xbf, 0x01, 0xbc, 0xec, 0x44, 0x37, 0x6c, 0xb0, 0xe9, 0xbd, 0xc6, 0x86, 0xac, 0xaa, 0x8b, 0x46, 0x34, 0x86, 0x08, 0x59, 0x94, 0xca, 0xfb, 0x5a, 0x8c, 0xfc, 0x33, 0xd4, 0x9c, 0xee, 0xf4, 0x79, 0xfc, 0x6e, 0x04, 0xf8, 0xee, 0xf6, 0x37, 0xeb, 0x68, 0xcb, 0x57, 0x81, 0x8d, 0x5f, 0x97, 0x70, 0xac, 0x52, 0x3e, 0xd5, 0xb0, 0x16, 0x38, 0x36, 0x7f, 0xf4, 0x7f } +, + /* Signature */ + 128, + { 0x50, 0x3e, 0x05, 0x66, 0x1d, 0x68, 0x1e, 0xca, 0x57, 0x4e, 0x02, 0x30, 0xaf, 0x2d, 0xaa, 0x87, 0x7b, 0x90, 0x51, 0x6e, 0x5e, 0x19, 0x72, 0x8c, 0x91, 0x76, 0x8d, 0x6e, 0xef, 0xee, 0x00, 0x1b, 0x35, 0x41, 0x9c, 0x5f, 0xcb, 0x56, 0x11, 0xd6, 0x0e, 0x7e, 0xcb, 0xe3, 0xc9, 0x5e, 0x5c, 0x88, 0xba, 0x93, 0x46, 0x07, 0x04, 0xf1, 0x69, 0x4a, 0xe8, 0x04, 0x44, 0xeb, 0x97, 0x18, 0xa0, 0x8b, 0x66, 0x86, 0xfa, 0xd8, 0x6e, 0x52, 0x59, 0x90, 0xc3, 0xc1, 0xa6, 0x6c, 0x8c, 0x53, 0xaa, 0x31, 0xae, 0xd8, 0xcb, 0xc4, 0x0f, 0xd5, 0x4f, 0x5f, 0xf8, 0xa1, 0x34, 0x74, 0x9d, 0x79, 0xd3, 0x8f, 0xbb, 0x0d, 0x58, 0x44, 0x26, 0x78, 0xff, 0x2f, 0x70, 0xc6, 0xc5, 0x0f, 0x25, 0x47, 0x2a, 0x72, 0xd6, 0x32, 0x05, 0xe7, 0x82, 0x42, 0x3d, 0xf4, 0x0b, 0x6c, 0x43, 0xde, 0x03, 0xa1, 0x8f, 0x8b } + +} +, +{ + "PKCS#1 v1.5 Signature Example 3.11", + /* Message to be signed */ + 50, + { 0x57, 0xf8, 0xac, 0x6a, 0x9e, 0x46, 0x8b, 0x7f, 0x1f, 0x74, 0x5d, 0xff, 0xe3, 0x9e, 0x9c, 0xbf, 0x90, 0x24, 0xa0, 0xff, 0x36, 0xe0, 0x22, 0x83, 0x92, 0xbe, 0x6b, 0x29, 0x94, 0x29, 0x17, 0x76, 0xb8, 0x9c, 0x0a, 0x4b, 0x1f, 0xa8, 0x6b, 0x2e, 0xc8, 0xbb, 0x7c, 0x3e, 0x64, 0xf5, 0x58, 0x5a, 0xfa, 0x77 } +, + /* Signature */ + 128, + { 0x90, 0xbe, 0x16, 0xb4, 0x08, 0xb3, 0x85, 0x73, 0x95, 0x39, 0xb3, 0xb9, 0xa2, 0x9b, 0x94, 0xc7, 0x29, 0x38, 0x5f, 0x79, 0xdd, 0x4a, 0x79, 0x81, 0x1e, 0x6f, 0x67, 0xc8, 0x0e, 0xd3, 0x59, 0xe5, 0xf4, 0xb2, 0xa1, 0x9c, 0x22, 0x2a, 0x82, 0xb3, 0xd6, 0xd6, 0x2a, 0x90, 0x3f, 0xb1, 0x80, 0xc1, 0xf4, 0x3c, 0xb3, 0xfe, 0x06, 0xa2, 0x50, 0xbc, 0xb0, 0xe7, 0xc6, 0x88, 0x66, 0x5c, 0x83, 0x68, 0xa1, 0x1a, 0xb1, 0x16, 0x0a, 0xdb, 0x74, 0x02, 0x91, 0x35, 0x2b, 0x38, 0x38, 0xb6, 0x92, 0x3a, 0x4a, 0x37, 0xad, 0x06, 0x04, 0x0a, 0x53, 0x59, 0x20, 0xdc, 0x0f, 0x10, 0x57, 0x9e, 0xcf, 0x48, 0x1c, 0xd4, 0x41, 0x37, 0x17, 0xd7, 0xd4, 0xd9, 0x60, 0xaa, 0x75, 0x1a, 0x74, 0x3e, 0x2f, 0x7c, 0x61, 0x6e, 0x54, 0x2e, 0xe6, 0x5f, 0xbb, 0xfe, 0x24, 0x66, 0x0e, 0x10, 0x1d, 0xaa, 0x2b, 0xdd } + +} +, +{ + "PKCS#1 v1.5 Signature Example 3.12", + /* Message to be signed */ + 77, + { 0x80, 0xef, 0x01, 0xaa, 0xcc, 0x5b, 0xfb, 0x0d, 0xb4, 0x8c, 0x6d, 0xe3, 0xd8, 0x14, 0x95, 0xb9, 0xc2, 0x31, 0x1a, 0x38, 0x93, 0x89, 0xf2, 0x3b, 0x70, 0xc0, 0x24, 0xda, 0x44, 0x78, 0xbf, 0xab, 0x2b, 0xfe, 0x4e, 0x54, 0x6f, 0x13, 0xff, 0xfd, 0xb9, 0x63, 0x89, 0x4e, 0xc6, 0xda, 0xdb, 0x3d, 0x2b, 0x0e, 0xe3, 0x37, 0xf1, 0x16, 0x31, 0x05, 0x8e, 0xac, 0x86, 0x09, 0xe5, 0xa1, 0x55, 0x4a, 0xf7, 0x97, 0xa9, 0xf9, 0xab, 0x47, 0x8c, 0x2d, 0x5b, 0x91, 0x88, 0xc8, 0x25 } +, + /* Signature */ + 128, + { 0x44, 0xc3, 0xf5, 0x1d, 0xcc, 0x6f, 0xb2, 0xb4, 0xe7, 0x0f, 0x53, 0x7f, 0x54, 0x64, 0xc6, 0x32, 0x0a, 0xd4, 0x2e, 0x21, 0x28, 0xfa, 0xdf, 0xd9, 0xa7, 0xe9, 0x37, 0xcd, 0x65, 0xdc, 0xbf, 0x35, 0xac, 0x66, 0xcf, 0xfa, 0xfd, 0x39, 0x28, 0x39, 0x66, 0xf2, 0xf1, 0x5d, 0xe5, 0x27, 0x72, 0x35, 0x50, 0x71, 0x5a, 0x31, 0x04, 0x29, 0x45, 0xe2, 0x00, 0xcc, 0x5c, 0x86, 0xfa, 0xba, 0x5e, 0xc8, 0xab, 0xaf, 0x50, 0x9c, 0x0c, 0xcd, 0x64, 0xd9, 0x9d, 0xed, 0xc7, 0x6e, 0x3c, 0xea, 0xa8, 0xc4, 0x47, 0x17, 0x93, 0x37, 0xf4, 0xa0, 0x77, 0x7b, 0x11, 0x52, 0x6e, 0x47, 0x2a, 0xcd, 0x41, 0x3b, 0x4a, 0xc7, 0xc3, 0x03, 0xcd, 0xcd, 0x84, 0xca, 0xfc, 0x02, 0x52, 0x43, 0xef, 0x00, 0x6f, 0x79, 0xdd, 0xaf, 0x55, 0xc1, 0x5c, 0xc4, 0xa8, 0xf1, 0x5e, 0xa2, 0xc8, 0x7f, 0x05, 0x77, 0x38, 0x14 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 3.13", + /* Message to be signed */ + 184, + { 0xac, 0x17, 0x95, 0x91, 0x55, 0x28, 0x3b, 0x0c, 0x7c, 0xff, 0x51, 0x5c, 0x33, 0x15, 0xd8, 0x9b, 0xdf, 0xe9, 0x58, 0x7c, 0xc0, 0x01, 0x20, 0xd3, 0xab, 0x31, 0xbb, 0x76, 0x07, 0xbd, 0xb3, 0x01, 0xca, 0xea, 0xf5, 0xe1, 0x5f, 0x5a, 0x6f, 0x58, 0xc9, 0xc5, 0x68, 0xff, 0xb3, 0xd2, 0x34, 0x02, 0x51, 0x6f, 0xfe, 0x23, 0x0c, 0x69, 0x81, 0xa8, 0x1c, 0x17, 0x8a, 0x8a, 0x18, 0xca, 0x33, 0x0b, 0xb8, 0xec, 0xaf, 0xb4, 0x81, 0xb2, 0x49, 0xb4, 0x66, 0xa8, 0xcf, 0x78, 0xb7, 0x0d, 0x9e, 0x78, 0xa1, 0x39, 0xa8, 0x8f, 0x48, 0x4c, 0xce, 0x7c, 0x20, 0x35, 0xb2, 0xe8, 0x9d, 0x49, 0x3b, 0xde, 0x88, 0x5e, 0x1c, 0xde, 0x42, 0xcb, 0x1a, 0x94, 0x49, 0xff, 0x57, 0x0d, 0xcf, 0x9e, 0x33, 0xc5, 0xcc, 0x77, 0xb2, 0x59, 0xbe, 0xe2, 0x83, 0x05, 0x39, 0x68, 0x02, 0xed, 0xc1, 0x6f, 0xc5, 0xa8, 0xe1, 0x0b, 0x56, 0xda, 0x2d, 0xa7, 0x86, 0xb5, 0xfb, 0x6c, 0x81, 0x2b, 0x2e, 0x17, 0x5b, 0x69, 0x6b, 0x1a, 0x9a, 0x96, 0xfc, 0x72, 0x2a, 0x43, 0x21, 0x46, 0x45, 0x0f, 0x07, 0xa6, 0x48, 0xef, 0x3c, 0xcf, 0x99, 0x6e, 0xf3, 0x08, 0x1f, 0xa5, 0xbb, 0x42, 0x21, 0xc9, 0x13, 0xba, 0x22, 0x28, 0x97, 0x0c, 0x9b, 0x0e, 0xa5, 0x26, 0x6b, 0xff } +, + /* Signature */ + 128, + { 0x48, 0x45, 0x8c, 0x72, 0xf0, 0x67, 0xdd, 0x9a, 0xb7, 0x20, 0xef, 0x16, 0x0c, 0xf3, 0x18, 0x4b, 0xb9, 0x80, 0x1e, 0x26, 0xd6, 0x14, 0xa8, 0x89, 0xa8, 0x35, 0x84, 0x41, 0x07, 0xac, 0x01, 0x65, 0x0b, 0x11, 0x84, 0xa0, 0x0b, 0xca, 0xa7, 0xaf, 0x1f, 0xf7, 0xde, 0x3a, 0x2e, 0xf2, 0xe7, 0xce, 0xb5, 0xb2, 0x5c, 0x3b, 0x5d, 0x5b, 0xcb, 0x29, 0x86, 0x59, 0x34, 0x32, 0x47, 0x48, 0xc6, 0x8f, 0x07, 0xde, 0x17, 0x4e, 0x17, 0x80, 0xa7, 0x0f, 0xa2, 0x4d, 0x6a, 0x3a, 0x9f, 0x7a, 0x41, 0xb8, 0x19, 0x37, 0xc4, 0x98, 0x4b, 0x2c, 0xbe, 0x06, 0xb3, 0xd7, 0xb4, 0x4c, 0xda, 0xe9, 0xcb, 0xd4, 0x16, 0x32, 0xd0, 0x09, 0x43, 0xc3, 0xb5, 0x73, 0xb1, 0xaa, 0x29, 0x12, 0x75, 0x0a, 0x9a, 0xeb, 0x07, 0xf1, 0x10, 0x13, 0x0b, 0xa3, 0x61, 0xdc, 0xf8, 0xf5, 0x36, 0x79, 0x0d, 0x60, 0x78, 0x47 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 3.14", + /* Message to be signed */ + 232, + { 0x99, 0x09, 0x8f, 0x77, 0xf6, 0xed, 0x35, 0xc0, 0x8f, 0xab, 0x3f, 0xa9, 0x78, 0x86, 0x93, 0x67, 0x1a, 0x58, 0x00, 0xdc, 0x30, 0x3c, 0x9c, 0xce, 0x42, 0x46, 0x16, 0xfa, 0x0c, 0x7e, 0xe8, 0x88, 0x86, 0x87, 0x67, 0x4c, 0xa8, 0x8a, 0xb2, 0x2a, 0x5f, 0xf2, 0xd1, 0x2e, 0x2b, 0x38, 0x8b, 0x09, 0x4f, 0xfd, 0x7d, 0xbf, 0x9a, 0x09, 0x27, 0xa9, 0x62, 0x17, 0x17, 0x15, 0x1e, 0x08, 0xec, 0xb8, 0xad, 0xe1, 0x55, 0x9f, 0x4b, 0x48, 0xe2, 0x3d, 0x31, 0xcf, 0x57, 0xcd, 0x38, 0x84, 0xdf, 0xe2, 0xb3, 0xe4, 0xb2, 0x60, 0xe8, 0x96, 0x02, 0x94, 0x07, 0x96, 0x94, 0x96, 0x02, 0x6c, 0x74, 0xa2, 0x18, 0x90, 0xd9, 0xa9, 0xaf, 0xd2, 0xcb, 0xb8, 0xf2, 0x83, 0x0a, 0x56, 0x6a, 0xed, 0x24, 0xf0, 0x16, 0x19, 0x74, 0x01, 0xa8, 0xcd, 0x22, 0xc8, 0x2f, 0xb8, 0xb2, 0x28, 0x91, 0x84, 0x58, 0x24, 0x0a, 0x23, 0xd1, 0x01, 0x85, 0xeb, 0xe7, 0x72, 0xdc, 0x19, 0xbc, 0xfe, 0x3e, 0x44, 0x92, 0x2f, 0xe7, 0x32, 0x09, 0xc1, 0xee, 0x00, 0x40, 0x07, 0x9f, 0xb0, 0x3b, 0x82, 0x7c, 0x82, 0x17, 0xd9, 0xed, 0x7c, 0x98, 0xc9, 0x5f, 0x30, 0x97, 0x4f, 0xbe, 0x4f, 0xbd, 0xdc, 0xf0, 0xf2, 0x8d, 0x60, 0x21, 0xc0, 0xe9, 0x1d, 0xa6, 0x0c, 0xa2, 0xad, 0x77, 0x79, 0x7e, 0xce, 0x86, 0xde, 0x5b, 0xf7, 0x68, 0x75, 0x0d, 0xdb, 0x5e, 0xd6, 0xa3, 0x11, 0x6a, 0xd9, 0x9b, 0xbd, 0x17, 0xed, 0xf7, 0xf7, 0x82, 0xf0, 0xdb, 0x1c, 0xd0, 0x5b, 0x0f, 0x67, 0x74, 0x68, 0xc5, 0xea, 0x42, 0x0d, 0xc1, 0x16, 0xb1, 0x0e, 0x80, 0xd1, 0x10, 0xde, 0x2b, 0x04 } +, + /* Signature */ + 128, + { 0xb4, 0x6a, 0xe8, 0x66, 0x13, 0x91, 0x89, 0xb6, 0xb1, 0x71, 0xa7, 0x62, 0x05, 0xfb, 0x9c, 0xe0, 0x41, 0xb4, 0x02, 0x98, 0xe5, 0xba, 0x92, 0xc2, 0xe9, 0xcc, 0x0b, 0xbf, 0xbb, 0x4a, 0x76, 0x42, 0x5d, 0xe6, 0xce, 0x13, 0x02, 0x1a, 0xe1, 0xa4, 0xa9, 0x42, 0x29, 0x9f, 0x98, 0xff, 0x89, 0xf5, 0x52, 0xf4, 0x3a, 0x90, 0x73, 0xde, 0x64, 0xf4, 0x9c, 0x2c, 0xa3, 0x62, 0x0d, 0x09, 0xd7, 0xe6, 0xe3, 0xfe, 0x28, 0x22, 0x1e, 0x93, 0x68, 0x98, 0x7e, 0x11, 0x0c, 0xd6, 0x06, 0x71, 0x06, 0xc4, 0xdb, 0x31, 0xa0, 0x38, 0x90, 0x23, 0x67, 0x96, 0xc8, 0x42, 0x52, 0xf5, 0x6c, 0x95, 0x03, 0x4a, 0x01, 0xc5, 0xfe, 0x98, 0x1e, 0x81, 0xb6, 0x54, 0x85, 0x5a, 0xaf, 0x27, 0x47, 0x50, 0x11, 0x55, 0x72, 0x0c, 0x21, 0x93, 0xf3, 0xa1, 0xd1, 0x0f, 0x49, 0xfe, 0xe9, 0x0c, 0x52, 0xfe, 0xe9, 0xe4 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 3.15", + /* Message to be signed */ + 33, + { 0xff, 0x79, 0x06, 0x42, 0x30, 0x5b, 0xf3, 0x02, 0x00, 0x38, 0x92, 0xe5, 0x4d, 0xf9, 0xf6, 0x67, 0x50, 0x9d, 0xc5, 0x39, 0x20, 0xdf, 0x58, 0x3f, 0x50, 0xa3, 0xdd, 0x61, 0xab, 0xb6, 0xfa, 0xb7, 0x5d } +, + /* Signature */ + 128, + { 0x07, 0x56, 0x32, 0x47, 0x73, 0x4f, 0x3c, 0x3d, 0x7a, 0x31, 0x02, 0xbc, 0xb4, 0x5b, 0xb5, 0x68, 0x15, 0x68, 0xed, 0x10, 0xf2, 0xec, 0x45, 0x9e, 0x46, 0x9e, 0x1a, 0x9e, 0x34, 0x09, 0xa1, 0x39, 0xfb, 0x15, 0x1b, 0x98, 0xd3, 0xf3, 0xb6, 0x2d, 0xaa, 0xac, 0x8b, 0x8f, 0x89, 0x16, 0xdf, 0x85, 0xd6, 0xdf, 0xa9, 0xab, 0x76, 0x0d, 0xf1, 0xe1, 0x5a, 0xc8, 0x90, 0x44, 0xe5, 0x79, 0xcf, 0x47, 0xa1, 0xaf, 0x6c, 0xd6, 0xec, 0x70, 0x4c, 0xed, 0x9b, 0x03, 0x4c, 0x6a, 0xaa, 0x90, 0xd0, 0xe7, 0x0e, 0x08, 0x52, 0x14, 0x0e, 0x75, 0x41, 0xf2, 0xef, 0xbe, 0x2c, 0xf1, 0x90, 0xb9, 0x58, 0x94, 0x1e, 0xc8, 0xb5, 0x97, 0x4f, 0x9c, 0x44, 0x4d, 0x26, 0xc3, 0x43, 0x16, 0xc9, 0x21, 0x6b, 0x65, 0x95, 0xe6, 0x56, 0xbc, 0x6c, 0x78, 0x44, 0xfa, 0xc1, 0x6c, 0x51, 0x52, 0x60, 0x92, 0x8e, 0x78 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 3.16", + /* Message to be signed */ + 91, + { 0xe9, 0x9f, 0xcb, 0xf8, 0x59, 0x2d, 0xbe, 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e, 0xab, 0xcd, 0x97, 0x02, 0x05, 0xed, 0x76, 0x02, 0x02, 0xd0, 0xd8, 0x7a, 0x65, 0x79, 0x59, 0x08, 0xb2, 0x8d, 0x32, 0x6f, 0x93, 0x62, 0x13, 0xf2, 0x9f, 0xeb, 0x59, 0x77, 0x34, 0x91 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 3.17", + /* Message to be signed */ + 224, + { 0x6a, 0x6a, 0x0c, 0x9b, 0x5b, 0x15, 0xbc, 0xda, 0x19, 0x6a, 0x9d, 0x0c, 0x76, 0xb1, 0x19, 0xd5, 0x34, 0xd8, 0x5a, 0xbd, 0x12, 0x39, 0x62, 0xd5, 0x83, 0xb7, 0x6c, 0xe9, 0xd1, 0x80, 0xbc, 0xe1, 0xca, 0x4a, 0xf8, 0x70, 0xfb, 0xc6, 0x51, 0x60, 0x12, 0xca, 0x91, 0x6c, 0x70, 0xba, 0x86, 0x2a, 0xc7, 0xe8, 0x24, 0x36, 0x17, 0x30, 0x6f, 0x4f, 0x9a, 0xb9, 0x50, 0x11, 0x99, 0xce, 0xf5, 0x5c, 0x6c, 0xf4, 0x08, 0xfe, 0x7b, 0x36, 0xc5, 0x57, 0xc4, 0x9d, 0x42, 0x0a, 0x47, 0x63, 0xd2, 0x46, 0x3c, 0x8a, 0xd4, 0x4b, 0x3c, 0xfc, 0x5b, 0xe2, 0x74, 0x2c, 0x0e, 0x7d, 0x9b, 0x0f, 0x66, 0x08, 0xf0, 0x8c, 0x7f, 0x47, 0xb6, 0x93, 0xee, 0x40, 0xd2, 0xe1, 0x80, 0xfa, 0xe1, 0xea, 0xc4, 0x39, 0xc1, 0x90, 0xb5, 0x6c, 0x2c, 0x0e, 0x14, 0xdd, 0xf9, 0xa2, 0x26, 0xba, 0xe1, 0x7d, 0x20, 0x38, 0x5d, 0x50, 0x19, 0x55, 0x82, 0x3c, 0x3f, 0x66, 0x62, 0x54, 0xc1, 0xd3, 0xdd, 0x36, 0xad, 0x51, 0x68, 0xb8, 0xf1, 0x8d, 0x28, 0x6f, 0xdc, 0xf6, 0x7a, 0x7d, 0xad, 0x94, 0x09, 0x70, 0x85, 0xfa, 0xb7, 0xed, 0x86, 0xfe, 0x21, 0x42, 0xa2, 0x87, 0x71, 0x71, 0x79, 0x97, 0xef, 0x1a, 0x7a, 0x08, 0x88, 0x4e, 0xfc, 0x39, 0x35, 0x6d, 0x76, 0x07, 0x7a, 0xaf, 0x82, 0x45, 0x9a, 0x7f, 0xad, 0x45, 0x84, 0x88, 0x75, 0xf2, 0x81, 0x9b, 0x09, 0x89, 0x37, 0xfe, 0x92, 0x3b, 0xcc, 0x9d, 0xc4, 0x42, 0xd7, 0x2d, 0x75, 0x4d, 0x81, 0x20, 0x25, 0x09, 0x0c, 0x9b, 0xc0, 0x3d, 0xb3, 0x08, 0x0c, 0x13 } +, + /* Signature */ + 128, + { 0x41, 0x93, 0x22, 0xfa, 0xca, 0xce, 0x76, 0xf2, 0xd5, 0xe2, 0xfb, 0xc1, 0x9a, 0xab, 0x86, 0xc7, 0x18, 0xa2, 0x80, 0x64, 0xf1, 0xd7, 0xb4, 0xc6, 0x62, 0xf0, 0x47, 0x4a, 0x87, 0x77, 0xa9, 0x59, 0xbd, 0x65, 0x69, 0x53, 0x8c, 0x16, 0x08, 0x1c, 0x0f, 0x52, 0x69, 0x8b, 0x2f, 0x00, 0x17, 0x30, 0xc0, 0x3b, 0x9a, 0x3d, 0x26, 0x94, 0x73, 0x74, 0xc9, 0x61, 0xfd, 0xed, 0xa1, 0x15, 0xb6, 0xb7, 0xda, 0xf6, 0x65, 0x18, 0xf1, 0xfe, 0x82, 0x0f, 0x67, 0xc3, 0xff, 0x12, 0xf0, 0xbc, 0x3f, 0x11, 0x01, 0xe3, 0x91, 0x1c, 0x43, 0x90, 0x6b, 0x0a, 0x12, 0x7e, 0x50, 0xbe, 0x01, 0x40, 0xc5, 0xef, 0xc4, 0x35, 0xe2, 0x95, 0x7b, 0x44, 0x2e, 0x60, 0xad, 0x52, 0x5a, 0xd7, 0x0a, 0xc9, 0xef, 0x61, 0xc3, 0xd6, 0x4f, 0x0e, 0x56, 0x6c, 0xbc, 0x1f, 0x9d, 0x51, 0xba, 0xe1, 0xd4, 0x72, 0x71, 0xda } + +} +, +{ + "PKCS#1 v1.5 Signature Example 3.18", + /* Message to be signed */ + 56, + { 0x3b, 0x93, 0xef, 0x4a, 0x55, 0x50, 0x96, 0x69, 0x19, 0x15, 0xdc, 0x23, 0xc0, 0x0e, 0x95, 0x4c, 0xde, 0xb2, 0x0a, 0x47, 0xcd, 0x55, 0xd1, 0x6c, 0x3d, 0x86, 0x81, 0xd4, 0x6e, 0xd7, 0xf2, 0xed, 0x5e, 0xa4, 0x27, 0x95, 0xbe, 0x17, 0xba, 0xed, 0x25, 0xf0, 0xf4, 0xd1, 0x13, 0xb3, 0x63, 0x6a, 0xdd, 0xd5, 0x85, 0xf1, 0x6a, 0x8b, 0x5a, 0xec } +, + /* Signature */ + 128, + { 0xae, 0x21, 0x1f, 0x4f, 0x77, 0xda, 0x1b, 0xe6, 0xaf, 0x9c, 0x9e, 0xa7, 0x04, 0xdb, 0xac, 0x4b, 0x3f, 0x3e, 0x27, 0x0d, 0x2f, 0xac, 0xf3, 0x65, 0x1d, 0x78, 0x7d, 0x0e, 0xbf, 0x59, 0xa7, 0x9a, 0x39, 0x61, 0x2d, 0xa1, 0x2d, 0x57, 0xc4, 0xac, 0x8a, 0xbc, 0x72, 0x8e, 0x1d, 0xa3, 0xf0, 0x1a, 0x15, 0x20, 0xfc, 0x9b, 0x32, 0xcb, 0x0f, 0xfe, 0x00, 0x8c, 0x80, 0x69, 0x92, 0x8f, 0x83, 0xe1, 0x35, 0x90, 0xa7, 0x8b, 0x81, 0x7e, 0x81, 0x9f, 0xbf, 0x2f, 0xd0, 0x58, 0x93, 0xec, 0xe5, 0xb1, 0x41, 0x86, 0xd9, 0x01, 0xc7, 0x68, 0xe3, 0x42, 0xdc, 0x54, 0x72, 0x23, 0x45, 0xae, 0x8a, 0xa8, 0x73, 0x8d, 0x4d, 0x59, 0x70, 0xc5, 0x08, 0x54, 0x72, 0xbd, 0x98, 0x99, 0xfa, 0x00, 0x42, 0xcf, 0x14, 0xbc, 0xed, 0xff, 0xdb, 0xc0, 0xef, 0x50, 0x81, 0x90, 0x75, 0x84, 0x2f, 0xc3, 0x6b, 0xb8 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 3.19", + /* Message to be signed */ + 62, + { 0x49, 0xff, 0xd5, 0x6b, 0xf7, 0xef, 0xc1, 0x13, 0x04, 0xa5, 0xaf, 0xbc, 0x19, 0xd4, 0x79, 0x24, 0x90, 0x18, 0xfd, 0xf4, 0xe0, 0x9f, 0x61, 0x87, 0x26, 0x44, 0x04, 0x95, 0xde, 0x11, 0xdd, 0xee, 0xe3, 0x88, 0x72, 0xd7, 0x75, 0xfc, 0xea, 0x74, 0xa2, 0x38, 0x96, 0xb5, 0x34, 0x3c, 0x9c, 0x38, 0xd4, 0x6a, 0xf0, 0xdb, 0xa2, 0x24, 0xd0, 0x47, 0x58, 0x0c, 0xc6, 0x0a, 0x65, 0xe9 } +, + /* Signature */ + 128, + { 0x68, 0xfb, 0x0b, 0xd5, 0x19, 0xbf, 0x6f, 0x96, 0xe0, 0x76, 0xaf, 0x29, 0x01, 0x2f, 0x3c, 0x3a, 0x11, 0x37, 0xc0, 0x98, 0x8d, 0xe7, 0xb6, 0xfc, 0xed, 0xf4, 0xf5, 0x1b, 0xdf, 0xee, 0x64, 0x5b, 0x89, 0x7f, 0x17, 0x70, 0x9e, 0x05, 0xca, 0xa0, 0xb1, 0x13, 0x50, 0x0d, 0x90, 0x4d, 0xc0, 0x60, 0x0d, 0x17, 0xa9, 0xff, 0x8e, 0xb0, 0x2e, 0x1e, 0xfc, 0x9c, 0x46, 0x7a, 0x24, 0x00, 0x3e, 0xf8, 0x1e, 0x72, 0x74, 0x67, 0xc4, 0x7d, 0xd6, 0x56, 0x35, 0x6d, 0x70, 0x37, 0x2a, 0x15, 0xea, 0x88, 0x41, 0x21, 0x63, 0x4b, 0x01, 0x5d, 0x29, 0x51, 0x1f, 0x28, 0x95, 0x55, 0x77, 0x99, 0x07, 0x9d, 0x03, 0xc6, 0xd4, 0xde, 0x25, 0x9b, 0x3b, 0x36, 0x2b, 0x80, 0x49, 0x2d, 0x81, 0xbc, 0x9f, 0xe8, 0x54, 0x44, 0x63, 0xec, 0x03, 0x0b, 0xb5, 0xc9, 0xc7, 0x3c, 0x32, 0x74, 0xe3, 0xed, 0x12, 0x22 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 3.20", + /* Message to be signed */ + 136, + { 0xbc, 0x25, 0x5a, 0xf8, 0x9a, 0x6a, 0x19, 0x9b, 0xca, 0x4a, 0x39, 0x1e, 0xad, 0xbc, 0x3a, 0x24, 0x90, 0x3c, 0x0b, 0xd6, 0x67, 0x36, 0x8f, 0x6b, 0xe7, 0x8e, 0x3f, 0xea, 0xbf, 0xb4, 0xff, 0xd4, 0x63, 0x12, 0x27, 0x63, 0x74, 0x0f, 0xfb, 0xbe, 0xfe, 0xab, 0x9a, 0x25, 0x56, 0x4b, 0xc5, 0xd1, 0xc2, 0x4c, 0x93, 0xe4, 0x22, 0xf7, 0x50, 0x73, 0xe2, 0xad, 0x72, 0xbf, 0x45, 0xb1, 0x0d, 0xf0, 0x0b, 0x52, 0xa1, 0x47, 0x12, 0x8e, 0x73, 0xfe, 0xe3, 0x3f, 0xa3, 0xf0, 0x57, 0x7d, 0x77, 0xf8, 0x0f, 0xbc, 0x2d, 0xf1, 0xbe, 0xd3, 0x13, 0x29, 0x0c, 0x12, 0x77, 0x7f, 0x50, 0xa3, 0x34, 0xdb, 0x6f, 0xae, 0xbf, 0x11, 0x08, 0x1a, 0x04, 0xf8, 0x7c, 0x2d, 0x62, 0x1c, 0xde, 0xc7, 0x93, 0x0b, 0x9b, 0x18, 0x3a, 0x99, 0x04, 0x75, 0xdc, 0xbb, 0x9c, 0xc7, 0xf3, 0x45, 0xa3, 0xb5, 0x58, 0x03, 0x03, 0x0c, 0xf0, 0x36, 0x1a, 0x5d, 0x80, 0x81 } +, + /* Signature */ + 128, + { 0x41, 0xf6, 0x52, 0xdf, 0x79, 0xfd, 0xd2, 0x6d, 0xe9, 0x5c, 0x7a, 0x98, 0xfa, 0x85, 0x87, 0x13, 0xfb, 0x56, 0x6d, 0x8b, 0x39, 0x92, 0x8e, 0x71, 0x76, 0x4b, 0x2b, 0xeb, 0x19, 0x84, 0x03, 0xe0, 0x3b, 0x7e, 0x06, 0xdc, 0x96, 0x0c, 0x50, 0x51, 0x57, 0xbd, 0xf4, 0x05, 0x92, 0xc4, 0xd7, 0x75, 0x03, 0xfb, 0x72, 0xa4, 0xe0, 0x05, 0x5f, 0x97, 0x4f, 0xe9, 0x39, 0x44, 0x8d, 0xa3, 0x68, 0xf5, 0x3b, 0xd2, 0xef, 0xe2, 0x6e, 0x6f, 0x9a, 0x25, 0x4b, 0x3e, 0x87, 0x32, 0xaa, 0xd8, 0x16, 0x87, 0xb3, 0x61, 0xe2, 0x1a, 0x40, 0xcf, 0x3e, 0x5e, 0x92, 0x38, 0x9a, 0x2b, 0x48, 0x9c, 0x05, 0xc5, 0x97, 0xf0, 0xe1, 0x64, 0xe2, 0x67, 0x70, 0x93, 0x72, 0x00, 0x43, 0x27, 0x16, 0x35, 0x62, 0xdd, 0x8a, 0x0a, 0xdb, 0xbd, 0xfe, 0x3b, 0xc6, 0x16, 0xbd, 0x08, 0x42, 0x96, 0x84, 0xc2, 0x0c, 0x69 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 4: A 1024-bit RSA key pair", +{ + /* Modulus */ + 128, + { 0xd1, 0x31, 0xe0, 0x92, 0x43, 0x37, 0x0d, 0xd2, 0xcd, 0x54, 0x25, 0xc8, 0xd0, 0x30, 0xf9, 0x9a, 0xdb, 0x10, 0x5b, 0x14, 0x7b, 0x8a, 0x3d, 0x00, 0x67, 0xc6, 0x16, 0x44, 0x3b, 0x7d, 0x4b, 0x96, 0x82, 0x38, 0xe0, 0x6d, 0xbb, 0x5f, 0x20, 0x28, 0xe8, 0x53, 0x57, 0x4b, 0x7c, 0x14, 0xbe, 0x10, 0x83, 0xc1, 0xe5, 0x7e, 0x13, 0x2c, 0x1d, 0xf4, 0xa3, 0xa2, 0x71, 0x32, 0x63, 0xfa, 0xde, 0x12, 0xf7, 0x11, 0x4f, 0x43, 0x69, 0xbb, 0xf0, 0x56, 0x20, 0x55, 0x48, 0x41, 0x33, 0x1e, 0xd8, 0x11, 0x00, 0x50, 0x52, 0x19, 0x25, 0x72, 0xce, 0xb4, 0x8d, 0x66, 0x24, 0x07, 0xfd, 0x30, 0x81, 0xcf, 0xab, 0x8b, 0x48, 0xc7, 0xe9, 0x2d, 0x3c, 0x4a, 0x26, 0xa9, 0x64, 0x5a, 0x38, 0xe6, 0xde, 0xe8, 0x8b, 0xb0, 0x07, 0x59, 0x75, 0xa4, 0xda, 0xd9, 0x64, 0x6b, 0x21, 0x60, 0x38, 0x40, 0xaf, 0x5f } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 128, + { 0x56, 0xb5, 0x31, 0xbb, 0xee, 0x18, 0x37, 0xa6, 0x94, 0x6c, 0xb8, 0x6c, 0x8f, 0xbe, 0x7c, 0xf6, 0xee, 0xad, 0xcc, 0xd2, 0xa4, 0x92, 0x1b, 0xce, 0xbb, 0x34, 0xa3, 0xae, 0x0c, 0x6a, 0x56, 0x96, 0x3f, 0xcb, 0x8b, 0x5a, 0x70, 0x3b, 0x71, 0x7d, 0x03, 0x2e, 0xe8, 0x13, 0xe5, 0x8e, 0x43, 0x69, 0x5c, 0xf3, 0x55, 0x47, 0xf8, 0x72, 0x64, 0xc8, 0x2d, 0xba, 0xfa, 0xe8, 0x44, 0x00, 0x8b, 0x62, 0xd9, 0x12, 0x2e, 0x9d, 0xe8, 0x95, 0x85, 0x60, 0xc8, 0xdb, 0xb0, 0x07, 0x72, 0x7e, 0x71, 0x39, 0xe0, 0xa9, 0x82, 0xe0, 0x75, 0x88, 0x14, 0x11, 0x3d, 0xe5, 0x4b, 0xa0, 0xa4, 0x55, 0x17, 0x51, 0xfc, 0xa0, 0xfc, 0xb1, 0x2d, 0x8d, 0xe3, 0x0d, 0x78, 0xb8, 0xb1, 0x12, 0x98, 0xa7, 0xf7, 0x8f, 0x0b, 0x08, 0x8f, 0x16, 0x87, 0x05, 0x3c, 0x84, 0xa5, 0x76, 0x2f, 0x62, 0xa4, 0xbd, 0x05, 0xc1 } +, + /* Prime 1 */ + 64, + { 0xee, 0x22, 0xa4, 0x24, 0x62, 0xf7, 0x71, 0x8d, 0xfe, 0xcf, 0x02, 0x4b, 0x17, 0xc9, 0x26, 0x76, 0x78, 0x05, 0x91, 0x71, 0x33, 0x9c, 0xc0, 0x07, 0x06, 0x52, 0x60, 0xd3, 0x04, 0x7e, 0x5f, 0x89, 0xfe, 0xd9, 0x10, 0x34, 0x28, 0x43, 0x37, 0x8c, 0x22, 0x68, 0x5d, 0x53, 0x2e, 0x84, 0xd2, 0x59, 0x3a, 0x7c, 0x8c, 0x02, 0x6a, 0x87, 0x66, 0xc5, 0xa2, 0xb2, 0xed, 0x55, 0x8e, 0x88, 0x23, 0x19 } +, + /* Prime 2 */ + 64, + { 0xe0, 0xe3, 0x70, 0x0c, 0x99, 0xa3, 0xe8, 0x15, 0xd7, 0x4b, 0x75, 0x2a, 0x84, 0xfb, 0x42, 0xec, 0x20, 0xe5, 0x20, 0x3c, 0xa7, 0xc1, 0xaf, 0x97, 0xfb, 0xf3, 0x97, 0xb9, 0x5d, 0x11, 0x05, 0x37, 0x6c, 0xf5, 0xd6, 0x3e, 0x3c, 0x57, 0xbf, 0xa6, 0x58, 0x55, 0xe5, 0x08, 0x14, 0x6c, 0x86, 0xdb, 0xaa, 0xb2, 0x89, 0xc9, 0x5b, 0xc0, 0x45, 0x5a, 0x58, 0x2d, 0xd8, 0xf5, 0x3f, 0xfb, 0xed, 0x37 } +, + /* Prime exponent 1 */ + 64, + { 0xd1, 0xf1, 0x34, 0x68, 0xe7, 0xdf, 0x62, 0xfb, 0x5e, 0xb3, 0xbe, 0x3f, 0xd9, 0xde, 0x7a, 0xcc, 0x63, 0x0f, 0xf5, 0xa3, 0xa9, 0x6e, 0xfe, 0x54, 0xb3, 0x1c, 0x19, 0x44, 0xb0, 0x67, 0x81, 0x6f, 0x35, 0x80, 0xc4, 0xaa, 0x56, 0xfc, 0xbb, 0x92, 0x0e, 0x1b, 0x98, 0x7b, 0x67, 0x3d, 0xad, 0xfd, 0x00, 0x75, 0x21, 0x32, 0x58, 0x1c, 0xbb, 0x5c, 0x6e, 0x0d, 0xf4, 0xf3, 0x42, 0xcf, 0x7e, 0xb1 } +, + /* Prime exponent 2 */ + 64, + { 0xac, 0xd0, 0xda, 0x38, 0x34, 0x90, 0xea, 0x36, 0x6e, 0x7d, 0xc4, 0x09, 0xea, 0xab, 0x13, 0x20, 0x55, 0x9e, 0xfd, 0x88, 0xde, 0xf9, 0x4e, 0x30, 0xa3, 0x22, 0xec, 0x03, 0x3b, 0xeb, 0x6a, 0x70, 0xcf, 0x40, 0x93, 0x64, 0xbc, 0x06, 0x4a, 0x76, 0x50, 0x07, 0xa1, 0xba, 0xf5, 0xc6, 0xf8, 0x53, 0x31, 0xf7, 0x85, 0x3e, 0xc1, 0x4d, 0x1d, 0x7e, 0x71, 0xa8, 0xb9, 0xc2, 0xad, 0x6a, 0xb1, 0x3d } +, + /* Coefficient */ + 64, + { 0x1e, 0xda, 0x83, 0xd4, 0xa6, 0xd0, 0x99, 0xb6, 0x0b, 0x2b, 0x2b, 0x84, 0xc6, 0xae, 0x41, 0x65, 0xc7, 0x22, 0x50, 0x3e, 0xbd, 0x37, 0x3c, 0x83, 0x6f, 0x97, 0x35, 0xca, 0x3b, 0x20, 0xa3, 0xeb, 0x08, 0x1b, 0x31, 0xe7, 0x83, 0x04, 0x13, 0x20, 0xdf, 0xc6, 0xdd, 0xf9, 0x05, 0x14, 0xca, 0xb6, 0xec, 0x4b, 0x80, 0xae, 0x0c, 0x05, 0x2d, 0xd1, 0xe7, 0xce, 0x34, 0x18, 0xae, 0xee, 0x24, 0xa4 } + +} +, +{{ + "PKCS#1 v1.5 Signature Example 4.1", + /* Message to be signed */ + 174, + { 0x2c, 0x93, 0x6b, 0xf6, 0x13, 0x3a, 0x96, 0x93, 0xf1, 0x46, 0xee, 0x5a, 0x1a, 0x91, 0xc2, 0xf1, 0x69, 0xb2, 0xe6, 0x44, 0xa5, 0x18, 0xe8, 0x5a, 0x75, 0xf6, 0xe4, 0x3b, 0x56, 0x0d, 0x4a, 0x72, 0xf3, 0x8c, 0x64, 0xf8, 0x4c, 0x05, 0x24, 0x0e, 0x8b, 0x4e, 0x55, 0x78, 0x61, 0x63, 0xe7, 0x27, 0x62, 0x65, 0xba, 0x21, 0x3b, 0xa9, 0x3d, 0xee, 0x1b, 0x2e, 0x10, 0x21, 0x35, 0xa9, 0x89, 0xb6, 0x24, 0x8e, 0x88, 0x32, 0x7e, 0x30, 0x03, 0x61, 0xa7, 0x4f, 0x2e, 0x9b, 0xc4, 0x1f, 0x2a, 0x37, 0x68, 0x3f, 0x1a, 0x1a, 0x15, 0xf9, 0xdd, 0x47, 0x2e, 0x11, 0x8e, 0x1c, 0x4b, 0x3e, 0xde, 0x58, 0xdd, 0x70, 0xf3, 0xba, 0xcc, 0x25, 0x2e, 0x0c, 0x65, 0x4b, 0x0f, 0x7a, 0x6e, 0x41, 0xa9, 0x28, 0x75, 0x10, 0xef, 0xa0, 0x3b, 0xc9, 0x2e, 0x80, 0x5e, 0x5b, 0x2c, 0x91, 0x3f, 0x51, 0xe2, 0x5c, 0x7f, 0x85, 0x86, 0x40, 0xca, 0xfa, 0xc9, 0xd3, 0xc9, 0x17, 0x68, 0x65, 0x07, 0xfa, 0x94, 0xf8, 0x86, 0x6f, 0x86, 0x9a, 0x4e, 0x5a, 0x6a, 0x3d, 0x4f, 0x9d, 0x97, 0xed, 0x81, 0x37, 0xf4, 0x14, 0xd1, 0x44, 0x7a, 0x86, 0xee, 0xf9, 0xe1, 0x49, 0x69, 0x94, 0xad, 0x2d, 0xa5, 0x97 } +, + /* Signature */ + 128, + { 0x9e, 0x93, 0xf7, 0xac, 0xc5, 0x0f, 0xb3, 0xa0, 0xb1, 0x24, 0x3d, 0xc3, 0x38, 0xc8, 0xcc, 0xb1, 0x2b, 0xca, 0xb4, 0xaa, 0x45, 0x04, 0x40, 0xb6, 0x30, 0x6c, 0x81, 0xb5, 0x0b, 0x8f, 0x95, 0xa9, 0x36, 0xdd, 0x16, 0x63, 0x30, 0xc6, 0x99, 0xb2, 0x85, 0x80, 0xda, 0x1b, 0xe2, 0x75, 0x61, 0x64, 0x02, 0xda, 0x85, 0xbf, 0xd8, 0xee, 0xfc, 0xd6, 0x99, 0x35, 0x87, 0xe6, 0x09, 0x28, 0x65, 0xd8, 0x25, 0x3b, 0x04, 0x08, 0x1d, 0x57, 0x2f, 0x26, 0x27, 0x59, 0xf5, 0x56, 0xdf, 0xb9, 0x11, 0xe8, 0xd9, 0x4e, 0x92, 0xe5, 0x5a, 0xf6, 0xd5, 0x89, 0x80, 0x18, 0xff, 0x33, 0xe5, 0xf6, 0xb1, 0xf9, 0x90, 0x19, 0x96, 0xe9, 0x2f, 0xaf, 0x33, 0x6e, 0x2d, 0xcc, 0xe3, 0xab, 0x0a, 0x93, 0xdb, 0x93, 0x2e, 0x94, 0x2c, 0xc6, 0x47, 0x8d, 0x6c, 0xc2, 0xfb, 0x66, 0x08, 0x11, 0x91, 0x0c, 0xcd, 0x17 } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Signature Example 4.2", + /* Message to be signed */ + 154, + { 0x94, 0x32, 0x3f, 0x7c, 0x38, 0xb9, 0x95, 0xcc, 0x6b, 0xd8, 0x5d, 0x47, 0x9f, 0x8d, 0xe2, 0xde, 0xc1, 0xef, 0x2e, 0x84, 0xb1, 0xfe, 0xef, 0xec, 0xf3, 0x91, 0x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0x9e, 0x83, 0x2d, 0x5d, 0x14, 0xb9, 0xd7, 0xec, 0x5a, 0x3d, 0xc2, 0x8f, 0x01, 0xeb, 0xb0, 0x6e, 0x39, 0xd5, 0x9e, 0x84, 0x61, 0xb9, 0x55, 0xb2, 0xa7, 0xf5, 0xb1, 0xf2, 0x04, 0xb0, 0x4c, 0xc6, 0xcc, 0x62, 0x64, 0x61, 0x61, 0xac, 0x1c, 0x2b, 0xf5, 0xba, 0xb5, 0x0f, 0x06, 0x8c, 0x90, 0x8d, 0x28, 0xde, 0x5e, 0xae, 0xf7, 0xe8, 0xeb, 0xfc, 0xab, 0xb0, 0x9b, 0x7d, 0x75, 0xd8, 0x35, 0x40, 0xdd, 0x4b, 0x35, 0x4d, 0x13, 0x1d, 0x86, 0xf0, 0x77, 0x07, 0x17 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 4.3", + /* Message to be signed */ + 154, + { 0x0e, 0x23, 0x3b, 0x25, 0x49, 0xbd, 0xd2, 0x1b, 0xa5, 0x14, 0x80, 0xda, 0x8e, 0x3d, 0xce, 0xf4, 0xdb, 0x20, 0xe0, 0xdc, 0xc0, 0x5e, 0xe2, 0x37, 0x35, 0x1e, 0xdb, 0xc9, 0xa5, 0x3c, 0x52, 0xf6, 0x74, 0xd1, 0x05, 0xfe, 0xc0, 0x93, 0x9d, 0x36, 0x99, 0x64, 0x7e, 0xfc, 0x1e, 0x25, 0xcb, 0x4e, 0x9b, 0x1a, 0xb7, 0x52, 0xab, 0x6f, 0xe2, 0x88, 0x69, 0xff, 0x73, 0xf2, 0x3e, 0x01, 0xee, 0xf8, 0x67, 0x4c, 0x53, 0x5c, 0x4c, 0x93, 0x35, 0xf7, 0x98, 0xf1, 0xde, 0xec, 0xd4, 0x89, 0xd0, 0x6d, 0xc8, 0x8f, 0xd6, 0xbc, 0x1d, 0x49, 0x96, 0xef, 0xf7, 0x2b, 0x43, 0x9e, 0x3c, 0x01, 0x4d, 0xd1, 0x4c, 0xbf, 0x17, 0x71, 0x5c, 0x15, 0x89, 0x43, 0xde, 0x2e, 0x6f, 0x97, 0x1c, 0x34, 0x99, 0x87, 0xa1, 0xb3, 0x95, 0xd6, 0x82, 0xc3, 0xb0, 0xc1, 0x7b, 0x66, 0xcd, 0x3c, 0xa4, 0x10, 0x60, 0xb5, 0x71, 0x11, 0xe2, 0x28, 0x31, 0x4b, 0x2d, 0x34, 0xb5, 0xe4, 0x4e, 0x55, 0xf1, 0xc1, 0x1c, 0x31, 0xa6, 0xeb, 0x80, 0xb5, 0xf8, 0x2d, 0x96, 0xbd, 0x4a, 0x17 } +, + /* Signature */ + 128, + { 0xd0, 0x75, 0xbe, 0x06, 0xcb, 0xd6, 0x22, 0x3e, 0x87, 0x1b, 0x0f, 0x33, 0x62, 0xa7, 0x97, 0xde, 0x28, 0x2d, 0xa5, 0xc4, 0x03, 0x23, 0xf3, 0x7c, 0x2c, 0xc3, 0x74, 0x65, 0xa1, 0xa8, 0x63, 0x68, 0xdd, 0xcf, 0xa6, 0xda, 0xa1, 0x35, 0x86, 0x6c, 0x32, 0x03, 0xd0, 0x47, 0x22, 0x60, 0xb2, 0x9c, 0x3c, 0x9b, 0x1b, 0x88, 0x94, 0x08, 0x5d, 0x54, 0x7c, 0x5e, 0xb9, 0x31, 0x42, 0x4f, 0x24, 0x14, 0x0a, 0x5c, 0xba, 0x15, 0x3b, 0xde, 0xd4, 0xb9, 0xce, 0x7d, 0xae, 0xdc, 0x64, 0x5d, 0x39, 0x80, 0xc5, 0xf5, 0x83, 0xf7, 0x67, 0x11, 0xc6, 0x7b, 0x19, 0x3a, 0x52, 0x12, 0xf2, 0xa9, 0x35, 0x4a, 0x67, 0x96, 0xaf, 0x09, 0x08, 0x20, 0x91, 0x31, 0x34, 0xec, 0xf3, 0x05, 0xbe, 0xfb, 0x65, 0x32, 0xcd, 0x48, 0xd4, 0x11, 0x3a, 0x0e, 0xc4, 0x86, 0x9a, 0x0a, 0x56, 0x55, 0xdb, 0xdc, 0x72, 0x59 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 4.4", + /* Message to be signed */ + 103, + { 0xd4, 0x7c, 0x0f, 0x5c, 0x92, 0x2e, 0x4f, 0x80, 0x9e, 0x9c, 0xee, 0xd2, 0x07, 0xf1, 0x24, 0xa5, 0xac, 0xde, 0x37, 0xfa, 0x14, 0x63, 0x8e, 0x8f, 0xbd, 0x0a, 0x72, 0xfe, 0x45, 0x26, 0x21, 0x95, 0x8e, 0x37, 0x68, 0x2c, 0x6f, 0xf2, 0x83, 0xf3, 0xd5, 0x1d, 0xa1, 0x52, 0xaa, 0x1f, 0x63, 0x74, 0xcd, 0x27, 0xd2, 0xa4, 0xa5, 0x33, 0x05, 0x39, 0x16, 0xdf, 0xf1, 0xc0, 0x7b, 0xa9, 0x36, 0x31, 0x74, 0x81, 0x69, 0x63, 0x60, 0x69, 0x04, 0x58, 0xd8, 0xd1, 0xe5, 0xd6, 0x6c, 0x35, 0xf9, 0xc9, 0x9a, 0x50, 0x55, 0xd9, 0xf7, 0xcf, 0xe7, 0x60, 0x5c, 0xca, 0x57, 0xea, 0xc3, 0x35, 0xad, 0xe2, 0xef, 0xf6, 0xb5, 0xaa, 0x62, 0x7d, 0x5b } +, + /* Signature */ + 128, + { 0x11, 0x86, 0x0b, 0xf4, 0xd7, 0x45, 0x19, 0xff, 0x8c, 0xfc, 0xce, 0x3d, 0x33, 0xe3, 0xaa, 0xbd, 0xf7, 0x71, 0x40, 0xa1, 0x56, 0x36, 0xb2, 0x67, 0x8d, 0xf9, 0x67, 0x31, 0x44, 0xc2, 0x41, 0xb0, 0xa9, 0x9a, 0x0a, 0x37, 0xf2, 0x92, 0xca, 0xd5, 0x1d, 0xf0, 0xb6, 0x3b, 0x14, 0xf8, 0xab, 0x17, 0xe3, 0xfa, 0x15, 0x58, 0x77, 0x90, 0xfb, 0x06, 0x2b, 0x5f, 0x26, 0x6c, 0x16, 0x6b, 0x2c, 0xa7, 0x51, 0x57, 0xa0, 0xf9, 0xe1, 0xa5, 0xc8, 0xec, 0x26, 0xb9, 0x19, 0x9d, 0x07, 0x18, 0x77, 0x99, 0x80, 0x6a, 0x1d, 0xe9, 0x87, 0x15, 0xfb, 0xe5, 0x27, 0x57, 0xa7, 0x03, 0x77, 0x3c, 0x91, 0x8a, 0x00, 0x0c, 0x21, 0x1a, 0x78, 0x22, 0x85, 0x25, 0xcb, 0x52, 0xeb, 0x44, 0x1b, 0x26, 0x9b, 0x3f, 0x33, 0x05, 0x0e, 0xd1, 0x93, 0x5a, 0xc0, 0xe8, 0x59, 0x63, 0x19, 0xae, 0x80, 0xc7, 0x5b, 0x84 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 4.5", + /* Message to be signed */ + 107, + { 0xbe, 0xbd, 0x9d, 0xde, 0xa3, 0xab, 0xf9, 0xf8, 0xeb, 0x58, 0x55, 0x97, 0x66, 0xf8, 0xb3, 0xab, 0x83, 0x53, 0x52, 0x38, 0xc4, 0x3d, 0xcd, 0x81, 0xa2, 0x94, 0x93, 0x03, 0xa9, 0x5f, 0x05, 0x5a, 0x83, 0x40, 0xce, 0xee, 0x16, 0x15, 0xe5, 0x8d, 0xf1, 0xe0, 0x14, 0xc7, 0x55, 0x2d, 0x76, 0x9f, 0x88, 0x41, 0xba, 0x09, 0x97, 0x5c, 0xef, 0xe7, 0xe4, 0x8d, 0xfc, 0x6a, 0x26, 0x49, 0xe8, 0x20, 0x03, 0xe7, 0xbf, 0x42, 0x0e, 0x70, 0x10, 0x1b, 0x32, 0x7d, 0x91, 0x70, 0xf7, 0x3e, 0x8d, 0x88, 0x7c, 0xd2, 0x98, 0xf5, 0x3d, 0xc1, 0xbf, 0xc8, 0x82, 0xcf, 0x0e, 0xfc, 0xfa, 0xd6, 0xe8, 0x6a, 0x0e, 0x7f, 0x90, 0x94, 0xc4, 0xf2, 0x6c, 0x46, 0x92, 0x1e, 0x09 } +, + /* Signature */ + 128, + { 0x84, 0xa2, 0x6f, 0xbe, 0x67, 0x01, 0x0a, 0xa1, 0xef, 0x2d, 0x6c, 0x79, 0x26, 0x32, 0x39, 0xb9, 0x78, 0xf4, 0xe8, 0x93, 0xdd, 0x1e, 0xc6, 0xf0, 0x7d, 0x23, 0x17, 0xf1, 0x51, 0xa2, 0xa1, 0xb3, 0x23, 0xe5, 0x05, 0xf9, 0x45, 0x0c, 0x37, 0xdf, 0x6b, 0x1b, 0xf3, 0xe2, 0x4f, 0x38, 0xb6, 0x36, 0xbf, 0x77, 0x4e, 0x96, 0x74, 0x1f, 0xfa, 0xa7, 0x69, 0xcf, 0xd7, 0xa8, 0xa6, 0xb3, 0xa5, 0xef, 0xab, 0xa2, 0x3a, 0xab, 0x3a, 0x43, 0x7a, 0x22, 0x5b, 0xd9, 0x41, 0x86, 0xe9, 0x1d, 0x39, 0x2b, 0xed, 0x2e, 0xad, 0x8a, 0x78, 0xf3, 0x81, 0xf4, 0x09, 0x49, 0xcf, 0x1f, 0x3d, 0x27, 0x24, 0x58, 0x1f, 0x25, 0x70, 0x4b, 0xdf, 0x66, 0x08, 0xdd, 0x11, 0x9e, 0x36, 0xd8, 0x7d, 0x03, 0x55, 0xe6, 0x70, 0x6c, 0x8a, 0x52, 0x59, 0xfd, 0x60, 0xc8, 0xdf, 0x13, 0xbc, 0x62, 0xaa, 0x9f, 0xd5, 0x7a } + +} +, +{ + "PKCS#1 v1.5 Signature Example 4.6", + /* Message to be signed */ + 247, + { 0x9d, 0x19, 0x8e, 0x2c, 0x6e, 0x12, 0xf7, 0x4a, 0x9a, 0x08, 0x1b, 0xcf, 0x70, 0xfc, 0x04, 0x16, 0x8a, 0x49, 0xe0, 0x9c, 0x5f, 0xaa, 0xa0, 0x11, 0xe9, 0xa0, 0x9e, 0x2c, 0x43, 0xee, 0x2c, 0xd3, 0x9b, 0xb2, 0xf7, 0xe5, 0x68, 0x2d, 0xea, 0xb1, 0xfa, 0x11, 0x1e, 0x41, 0xa3, 0x19, 0x4a, 0x20, 0xa8, 0x6d, 0xa5, 0x51, 0x01, 0x82, 0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18, 0x4b, 0xae, 0x0c, 0x83, 0x41, 0x59, 0x56 } +, + /* Signature */ + 128, + { 0x38, 0xef, 0x24, 0x5b, 0x94, 0x0d, 0x93, 0x97, 0x0a, 0x50, 0x3b, 0xf4, 0x3e, 0x28, 0xe1, 0x7b, 0x8a, 0xff, 0x08, 0x3c, 0xcb, 0xe1, 0xe9, 0xc4, 0x8e, 0x4d, 0x80, 0xf5, 0x16, 0xc2, 0x7d, 0x08, 0x5c, 0xa2, 0xa4, 0xe5, 0x73, 0x23, 0x6a, 0x24, 0x94, 0xd9, 0xb9, 0x97, 0xf8, 0x12, 0x48, 0x48, 0x12, 0xf6, 0x65, 0x25, 0xd0, 0x6c, 0x0a, 0x0b, 0xb2, 0x13, 0x0c, 0x15, 0xd6, 0xce, 0x18, 0xb2, 0x2f, 0x3c, 0xee, 0x57, 0x09, 0x7f, 0xc0, 0xd5, 0x58, 0xaf, 0xd9, 0xaf, 0x27, 0xf1, 0x51, 0xf8, 0x43, 0x6f, 0xbc, 0x87, 0xd6, 0xbe, 0x61, 0x42, 0x64, 0x7a, 0x17, 0xe0, 0x4d, 0xf6, 0xde, 0xc7, 0x0a, 0x95, 0xc7, 0xda, 0xa8, 0x4e, 0xde, 0x94, 0xcc, 0xb4, 0x3e, 0x1d, 0x2c, 0x37, 0xb9, 0x45, 0x81, 0x73, 0x10, 0xd1, 0x4a, 0x22, 0xb5, 0xb9, 0xae, 0x61, 0x14, 0x48, 0xee, 0x41, 0xbc, 0x70 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 4.7", + /* Message to be signed */ + 47, + { 0x8e, 0x8b, 0xa8, 0x43, 0x6f, 0xe3, 0x10, 0x4b, 0x7c, 0xe2, 0xa4, 0xef, 0xc3, 0x6c, 0x85, 0x7d, 0x49, 0xe8, 0x49, 0xc0, 0x08, 0x5f, 0xc6, 0x57, 0xba, 0xa0, 0x33, 0x17, 0x93, 0xb3, 0xf3, 0x6c, 0x7c, 0xe7, 0x38, 0xb6, 0x13, 0x0b, 0xfa, 0xc7, 0x5e, 0x50, 0x11, 0xf3, 0x2a, 0xa3, 0xd1 } +, + /* Signature */ + 128, + { 0x78, 0x44, 0x69, 0x9f, 0x1c, 0x4f, 0x29, 0x6e, 0x50, 0x26, 0x1f, 0x15, 0x26, 0xe0, 0xdd, 0x84, 0xf0, 0x1c, 0x82, 0xcb, 0x85, 0xfa, 0x24, 0x60, 0x9e, 0xb0, 0x33, 0x58, 0x75, 0x2c, 0x6c, 0xf5, 0x99, 0x94, 0xd8, 0x4e, 0x12, 0xf4, 0x6a, 0x72, 0x00, 0xcf, 0x5a, 0xd9, 0x7c, 0x08, 0xdd, 0x4f, 0xfc, 0x44, 0x65, 0x7d, 0xb5, 0x72, 0x14, 0xcd, 0x1f, 0x4e, 0xed, 0x6b, 0x77, 0xd2, 0x39, 0xfb, 0x58, 0x21, 0x69, 0x88, 0xc5, 0xe5, 0xbc, 0x73, 0x5a, 0x4f, 0xdf, 0xf4, 0x08, 0xeb, 0x9f, 0x12, 0x79, 0xd6, 0x5b, 0xba, 0xf6, 0xa6, 0x81, 0x92, 0x44, 0x18, 0x34, 0x9e, 0x62, 0xff, 0x5e, 0x58, 0x15, 0xea, 0xea, 0x59, 0x2d, 0x90, 0xd1, 0xee, 0xf5, 0x56, 0xfc, 0xd4, 0xd5, 0xb4, 0xb8, 0x9c, 0x6c, 0x70, 0x73, 0x9d, 0x6f, 0x0d, 0x3d, 0x0b, 0xd1, 0x6a, 0x50, 0xf1, 0xe0, 0x02, 0x4e, 0x98 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 4.8", + /* Message to be signed */ + 185, + { 0x58, 0x5f, 0xa6, 0xa7, 0xf7, 0x7a, 0x4b, 0x6e, 0xba, 0x56, 0x90, 0xe7, 0x3e, 0x71, 0x28, 0xb7, 0x2e, 0x67, 0x7c, 0xdb, 0x3a, 0xaa, 0x86, 0x29, 0xed, 0x61, 0xf2, 0xee, 0x63, 0xaf, 0x1a, 0x71, 0xba, 0x87, 0x13, 0x6a, 0x52, 0xdb, 0x1a, 0x33, 0x21, 0xfc, 0xfe, 0xb2, 0x48, 0xbf, 0x2e, 0x5c, 0xf5, 0xc6, 0x39, 0x57, 0x1d, 0x58, 0x95, 0xad, 0xf1, 0xfb, 0x06, 0x17, 0xed, 0x14, 0x0a, 0x2a, 0x0d, 0x98, 0x37, 0xc3, 0xc1, 0xd8, 0x45, 0x0c, 0x28, 0x9d, 0x33, 0xbc, 0x96, 0x23, 0x79, 0xd7, 0x3e, 0x30, 0x87, 0xf2, 0xb7, 0xee, 0x6e, 0xad, 0xd6, 0x65, 0x01, 0x48, 0xc0, 0x42, 0xb6, 0xff, 0x04, 0x48, 0x21, 0x96, 0xc7, 0x18, 0xfd, 0xc0, 0xce, 0x57, 0x9c, 0xeb, 0x62, 0xa8, 0x1e, 0x58, 0x43, 0x73, 0xeb, 0x93, 0x75, 0x40, 0xc4, 0x26, 0xb5, 0x56, 0x6a, 0x9f, 0x40, 0x7c, 0xfc, 0xcf, 0xbc, 0x4b, 0x75, 0x36, 0x94, 0xaf, 0x0d, 0xf4, 0xcd, 0x6a, 0xa9, 0xf1, 0x65, 0x46, 0xa6, 0x33, 0x94, 0xa0, 0xf6, 0x57, 0x73, 0x71, 0x34, 0x3f, 0xfd, 0xdb, 0x65, 0x1a, 0x62, 0xa3, 0xa5, 0x8e, 0xdd, 0xec, 0x67, 0xa2, 0x9c, 0xca, 0xe8, 0x96, 0x56, 0x3c, 0x63, 0xe3, 0xc9, 0x0d, 0x54, 0xd9, 0x13, 0x58, 0xad, 0xf1, 0x94, 0xe6, 0xaa, 0xb1, 0xf9 } +, + /* Signature */ + 128, + { 0x68, 0x93, 0x35, 0x1c, 0x73, 0x91, 0x5f, 0xac, 0x47, 0xc9, 0x62, 0xcc, 0x60, 0x17, 0xca, 0x74, 0xa5, 0xb5, 0xee, 0x4c, 0xb1, 0xbb, 0x5a, 0x10, 0xad, 0xa2, 0xa4, 0x31, 0x58, 0xa2, 0x26, 0x1e, 0xb2, 0x7b, 0x86, 0x6d, 0xb3, 0x9d, 0x35, 0x90, 0xb4, 0xf8, 0xd2, 0x0e, 0xe6, 0x7c, 0xb1, 0xa5, 0x78, 0x94, 0x63, 0x15, 0x0d, 0x83, 0x93, 0x43, 0x23, 0x25, 0x43, 0xc8, 0x26, 0x50, 0x51, 0x01, 0xe1, 0xd2, 0x57, 0x04, 0x26, 0xab, 0x9f, 0xef, 0xd6, 0x5b, 0xa8, 0x4f, 0xaa, 0xec, 0x73, 0x1f, 0x27, 0x37, 0x4a, 0xb1, 0x01, 0x91, 0xc9, 0x60, 0x83, 0x16, 0x93, 0xf2, 0x9a, 0x85, 0x4c, 0x38, 0x12, 0x85, 0x99, 0xf7, 0x28, 0x77, 0x49, 0xb0, 0xb4, 0x8b, 0xf7, 0xe9, 0xdf, 0xda, 0xed, 0xc8, 0x4e, 0xec, 0xe0, 0x71, 0x40, 0x45, 0x84, 0x73, 0x0c, 0xec, 0xce, 0x0d, 0x5c, 0xf0, 0x05, 0xcc } + +} +, +{ + "PKCS#1 v1.5 Signature Example 4.9", + /* Message to be signed */ + 5, + { 0x78, 0x3c, 0x18, 0xb1, 0x1f } +, + /* Signature */ + 128, + { 0x13, 0x2f, 0xdf, 0xb8, 0x41, 0x93, 0xdf, 0xb7, 0x9f, 0xdf, 0xe6, 0xba, 0xbc, 0x2e, 0xfd, 0x39, 0xb2, 0x6a, 0xa2, 0x09, 0x68, 0xa0, 0x7c, 0x0e, 0x41, 0x56, 0x0e, 0xe4, 0xdf, 0xcd, 0x4f, 0xca, 0x79, 0x17, 0x49, 0x0f, 0x24, 0xe8, 0xdf, 0x84, 0xf4, 0xe0, 0x11, 0x5a, 0x3e, 0x63, 0x27, 0x3e, 0x7a, 0x3b, 0x12, 0x8a, 0xbb, 0xbd, 0x17, 0xb8, 0xaa, 0x5a, 0x06, 0xba, 0x15, 0x5e, 0xcb, 0x23, 0x0f, 0xe7, 0x97, 0x26, 0x04, 0x79, 0x95, 0x70, 0x10, 0xe4, 0x4b, 0xa5, 0x75, 0x29, 0x2e, 0xc3, 0xf1, 0x51, 0xab, 0xf4, 0x8e, 0x91, 0x03, 0xe5, 0x51, 0x42, 0xec, 0x67, 0xa4, 0x13, 0x4d, 0xd8, 0xf3, 0x8e, 0xc6, 0x59, 0xf9, 0xa7, 0x89, 0xfd, 0x03, 0x41, 0xce, 0xf2, 0xbb, 0xcf, 0x9f, 0x52, 0x9b, 0x93, 0x21, 0x8f, 0xc3, 0xe4, 0x3a, 0x76, 0x69, 0x69, 0xd1, 0xbf, 0x87, 0x88, 0x48, 0x07 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 4.10", + /* Message to be signed */ + 85, + { 0x96, 0xdc, 0x98, 0xb0, 0xeb, 0x84, 0xf5, 0x59, 0x48, 0x30, 0x7a, 0xdd, 0xec, 0xcb, 0xe7, 0x64, 0x39, 0xca, 0x36, 0x58, 0xbc, 0x36, 0x35, 0x96, 0x24, 0xc8, 0xfe, 0x2f, 0xa0, 0x9c, 0x52, 0xe4, 0x7a, 0xcd, 0xc3, 0x2a, 0x15, 0x6d, 0x90, 0x76, 0x82, 0x41, 0x0a, 0x85, 0x67, 0xab, 0xca, 0xfd, 0xc6, 0xd8, 0xbb, 0x53, 0x25, 0x35, 0x9e, 0xc7, 0x5f, 0xfd, 0xb7, 0x3e, 0xe0, 0xa9, 0x51, 0x5a, 0x4d, 0xdf, 0x9a, 0x31, 0xe5, 0xd5, 0x19, 0x46, 0x03, 0x74, 0x28, 0x0a, 0xda, 0x30, 0xde, 0x7d, 0xd5, 0x34, 0xde, 0xaa, 0x57 } +, + /* Signature */ + 128, + { 0x8f, 0xb4, 0x3d, 0xc8, 0xf0, 0x6f, 0x2b, 0xa4, 0x8f, 0x19, 0xbe, 0x5b, 0x1a, 0x09, 0x31, 0x21, 0x3a, 0x99, 0x0a, 0xed, 0x9c, 0x9f, 0xed, 0x1d, 0xe5, 0xd6, 0xf3, 0x5a, 0x2a, 0x78, 0x2f, 0x0a, 0x19, 0x8f, 0xf6, 0x38, 0x8d, 0x96, 0xe9, 0xd5, 0x9b, 0x88, 0xe9, 0x78, 0x22, 0xf3, 0x49, 0xff, 0x41, 0x64, 0xee, 0xa5, 0x0a, 0x62, 0x93, 0x5c, 0x61, 0xcb, 0xc7, 0x6e, 0x3d, 0xf7, 0x5f, 0x68, 0x4d, 0x96, 0x24, 0x75, 0xe5, 0x63, 0x59, 0x64, 0x96, 0xc9, 0x88, 0x0a, 0x48, 0xed, 0x97, 0x8a, 0x63, 0x15, 0xa3, 0x45, 0x57, 0x17, 0x91, 0xcb, 0x2d, 0xdc, 0x88, 0xda, 0xbe, 0x41, 0x87, 0x98, 0xa6, 0xa4, 0x41, 0xc4, 0x7a, 0xfb, 0xb1, 0xcd, 0x15, 0x21, 0x3e, 0xca, 0x3b, 0x11, 0x15, 0xec, 0x8f, 0x58, 0xf8, 0x77, 0xbe, 0x8f, 0xbd, 0x38, 0xf4, 0xfd, 0xae, 0xf9, 0x39, 0xf5, 0x26, 0x40 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 4.11", + /* Message to be signed */ + 115, + { 0x37, 0x20, 0x01, 0x59, 0x9d, 0x99, 0x30, 0xc7, 0xd5, 0x57, 0x45, 0x8b, 0x43, 0x6d, 0xec, 0xfd, 0xc1, 0x4d, 0x06, 0xcb, 0x7b, 0x96, 0xb0, 0x67, 0x18, 0xc4, 0x8d, 0x7d, 0xe5, 0x74, 0x82, 0xa8, 0x68, 0xae, 0x7f, 0x06, 0x58, 0x70, 0xa6, 0x21, 0x65, 0x06, 0xd1, 0x1b, 0x77, 0x93, 0x23, 0xdf, 0xdf, 0x04, 0x6c, 0xf5, 0x77, 0x51, 0x29, 0x13, 0x4b, 0x4d, 0x56, 0x89, 0xe4, 0xd9, 0xc0, 0xce, 0x1e, 0x12, 0xd7, 0xd4, 0xb0, 0x6c, 0xb5, 0xfc, 0x58, 0x20, 0xde, 0xcf, 0xa4, 0x1b, 0xaf, 0x59, 0xbf, 0x25, 0x7b, 0x32, 0xf0, 0x25, 0xb7, 0x67, 0x9b, 0x44, 0x5b, 0x94, 0x99, 0xc9, 0x25, 0x55, 0x14, 0x58, 0x85, 0x99, 0x2f, 0x1b, 0x76, 0xf8, 0x48, 0x91, 0xee, 0x4d, 0x3b, 0xe0, 0xf5, 0x15, 0x0f, 0xd5, 0x90 } +, + /* Signature */ + 128, + { 0xa8, 0x97, 0xc7, 0xf9, 0x72, 0xe1, 0x17, 0x49, 0xe1, 0xe7, 0xc1, 0x55, 0xce, 0x94, 0x62, 0xaa, 0x7e, 0x1c, 0xc0, 0xa9, 0x79, 0xc1, 0x27, 0x29, 0x79, 0x51, 0x26, 0xcb, 0x8c, 0x0e, 0xa5, 0x02, 0x21, 0xc4, 0x26, 0xf1, 0xbb, 0x06, 0xc1, 0xca, 0xf7, 0xc5, 0x1a, 0xc2, 0xfb, 0xd9, 0x4d, 0x68, 0x8d, 0xa6, 0x7d, 0xdf, 0x3e, 0xf6, 0x66, 0x06, 0xe9, 0x89, 0xa1, 0x6d, 0xe1, 0xf9, 0x2b, 0x17, 0x70, 0x6f, 0x88, 0xe8, 0x7d, 0x9f, 0x14, 0x69, 0xa0, 0x05, 0xc9, 0xfd, 0x76, 0x78, 0x8e, 0xe8, 0xc4, 0xa7, 0xf0, 0x12, 0x09, 0xe2, 0x8b, 0x86, 0xf6, 0x74, 0x88, 0x1a, 0xf5, 0x7d, 0xb6, 0xc3, 0x42, 0x9b, 0x6f, 0xb4, 0x56, 0x98, 0xbf, 0x5d, 0x30, 0x07, 0xf6, 0x1c, 0x7d, 0x44, 0x11, 0x78, 0xad, 0x12, 0x43, 0xa4, 0x9b, 0x2a, 0xa6, 0x02, 0x9b, 0xfe, 0x90, 0x2d, 0x26, 0xe4, 0x23, 0x75 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 4.12", + /* Message to be signed */ + 35, + { 0xbf, 0xbf, 0xd0, 0x73, 0x21, 0xf0, 0xf1, 0xd5, 0xfa, 0x9f, 0xdf, 0x00, 0x14, 0xc2, 0xfc, 0xb0, 0x35, 0x8a, 0xad, 0x0e, 0x35, 0x4b, 0x0d, 0x29, 0x08, 0x1b, 0x23, 0x3b, 0x43, 0x56, 0x77, 0x50, 0xbd, 0x6e, 0x78 } +, + /* Signature */ + 128, + { 0xc2, 0x4d, 0x31, 0x04, 0x94, 0x09, 0xaa, 0x16, 0xd3, 0xf9, 0x72, 0xef, 0x8b, 0x75, 0x95, 0xea, 0xa0, 0x07, 0x83, 0x3e, 0x2b, 0xcd, 0xc7, 0x50, 0x48, 0x52, 0xf2, 0x50, 0x5f, 0xba, 0x1f, 0xc1, 0x5f, 0x19, 0xa0, 0xea, 0xdd, 0xe8, 0x33, 0x5c, 0x73, 0x06, 0xfc, 0x3f, 0x51, 0x66, 0x1d, 0xa5, 0x20, 0xec, 0xc8, 0xdb, 0x7f, 0x47, 0x38, 0x85, 0xca, 0xbd, 0xe9, 0x3f, 0x0c, 0xeb, 0xf1, 0xdf, 0x9e, 0x8a, 0x82, 0x37, 0x0b, 0x00, 0xa0, 0x43, 0xad, 0x63, 0x2c, 0xdc, 0xc7, 0x8f, 0x3f, 0xac, 0x1d, 0x8a, 0x37, 0x57, 0xfc, 0x8e, 0x52, 0x41, 0xbf, 0xed, 0x55, 0xc4, 0x96, 0x04, 0xac, 0x19, 0xab, 0xda, 0xc0, 0xc9, 0xc4, 0x0d, 0xa3, 0x73, 0xc1, 0x5f, 0x3c, 0x1b, 0xcc, 0x97, 0x3f, 0xfb, 0x4f, 0x8b, 0x7b, 0x5b, 0x55, 0x3a, 0xe0, 0x75, 0xe1, 0xb1, 0xbd, 0xdd, 0xd2, 0x3d, 0x7d, 0x2a } + +} +, +{ + "PKCS#1 v1.5 Signature Example 4.13", + /* Message to be signed */ + 107, + { 0xc6, 0x97, 0x39, 0xd2, 0x2a, 0xc8, 0x96, 0x6b, 0xf1, 0x1c, 0x11, 0x6f, 0x61, 0x4b, 0x16, 0x67, 0x40, 0xe9, 0x6b, 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, 0xe8, 0x10, 0x45, 0x2c, 0x15, 0xe0, 0x6e, 0x93, 0x96, 0x66, 0xdf, 0x0c, 0x83, 0x34, 0x03, 0x30, 0x96, 0xc0, 0x7d, 0xea, 0x05, 0xb4, 0x4e, 0xbb, 0x14, 0x24, 0x92, 0xe7, 0x66, 0x91, 0x31, 0xeb, 0xcf, 0x2c } + +} +, +{ + "PKCS#1 v1.5 Signature Example 4.14", + /* Message to be signed */ + 16, + { 0x73, 0x30, 0x47, 0xf3, 0x36, 0xf9, 0x15, 0x47, 0x38, 0x67, 0x45, 0x47, 0xdb, 0x02, 0xa9, 0xf4 } +, + /* Signature */ + 128, + { 0xc1, 0x13, 0xc0, 0x46, 0x5c, 0x84, 0xcb, 0xfb, 0x0f, 0xa1, 0xbd, 0xbc, 0x54, 0xc3, 0xe1, 0x06, 0x8c, 0xa2, 0x3e, 0x69, 0xb8, 0x39, 0x19, 0x09, 0xc3, 0x90, 0x0f, 0xe5, 0xb4, 0xe7, 0xe3, 0xf0, 0x34, 0xc9, 0xa9, 0x88, 0xa3, 0xdd, 0xc3, 0xc3, 0x81, 0x75, 0x6a, 0x1e, 0x1a, 0x27, 0xc1, 0xec, 0xfb, 0x3a, 0x70, 0xe1, 0xee, 0x0e, 0x92, 0x04, 0x18, 0xac, 0x4a, 0xb6, 0xd9, 0x53, 0x2b, 0x8d, 0x09, 0x59, 0xa6, 0x53, 0xb4, 0xc5, 0x08, 0x67, 0x06, 0x63, 0x46, 0x2b, 0x2e, 0x13, 0x58, 0x16, 0xb6, 0x94, 0xa6, 0xb9, 0xb4, 0x68, 0xa2, 0x9f, 0x38, 0xde, 0x53, 0xbf, 0xcd, 0xdf, 0x97, 0xe0, 0x3d, 0x8d, 0xd2, 0x4f, 0x97, 0x26, 0x33, 0xa4, 0x9c, 0xf3, 0xea, 0xae, 0x1d, 0x69, 0x62, 0x94, 0x38, 0x60, 0xdd, 0x25, 0x43, 0x40, 0x08, 0x6b, 0x10, 0x35, 0x7b, 0x80, 0xc1, 0xcf, 0xbf, 0x31 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 4.15", + /* Message to be signed */ + 119, + { 0xa9, 0x74, 0x0b, 0x9a, 0xa0, 0xd3, 0x40, 0x58, 0xfd, 0x3b, 0x90, 0x6e, 0x4f, 0x78, 0x59, 0xdf, 0xb0, 0x7d, 0x71, 0x73, 0xe5, 0xe6, 0xf6, 0x35, 0x0a, 0xda, 0xc2, 0x1f, 0x27, 0xb2, 0x30, 0x74, 0x69, 0xbd, 0x0c, 0xe1, 0x95, 0x49, 0xd0, 0x70, 0x01, 0x20, 0xcb, 0xe5, 0x10, 0x77, 0xdb, 0xbb, 0xb0, 0x0a, 0x8d, 0x8b, 0x09, 0xde, 0x8d, 0x83, 0x96, 0xe3, 0x65, 0x07, 0xfe, 0x1e, 0xf6, 0xa1, 0x90, 0x17, 0x54, 0x8e, 0x0c, 0x71, 0x66, 0x74, 0xc2, 0xfe, 0xc2, 0x33, 0xad, 0xb2, 0xf7, 0x75, 0x66, 0x5e, 0xc4, 0x1f, 0x2b, 0xd0, 0xba, 0x39, 0x6b, 0x06, 0x1a, 0x9d, 0xaa, 0x7e, 0x86, 0x6f, 0x7c, 0x23, 0xfd, 0x35, 0x31, 0x95, 0x43, 0x00, 0xa3, 0x42, 0xf9, 0x24, 0x53, 0x5e, 0xa1, 0x49, 0x8c, 0x48, 0xf6, 0xc8, 0x79, 0x93, 0x28 } +, + /* Signature */ + 128, + { 0x4f, 0xbd, 0x4f, 0xb2, 0x37, 0x04, 0xf4, 0x14, 0x9a, 0xda, 0x32, 0x7f, 0xa5, 0x33, 0x88, 0x52, 0x6a, 0x07, 0xdd, 0x43, 0xd9, 0x15, 0xfc, 0xbd, 0xa9, 0xa1, 0x3b, 0xb2, 0xa3, 0x73, 0x8f, 0x4a, 0xdb, 0x1c, 0x3d, 0xb2, 0x6a, 0xb6, 0x90, 0x48, 0x80, 0x5a, 0x80, 0xc8, 0x16, 0x05, 0xc9, 0x6d, 0x68, 0xf8, 0x41, 0x80, 0x2f, 0x5a, 0xbb, 0x02, 0x05, 0x7b, 0x61, 0x1f, 0xe2, 0xf3, 0x94, 0x71, 0x62, 0x65, 0xe5, 0x45, 0x25, 0x2c, 0x23, 0x0c, 0xe4, 0x74, 0xaf, 0xf0, 0xbb, 0xd4, 0xff, 0x1f, 0x38, 0x08, 0x49, 0x60, 0x36, 0xa4, 0x94, 0x8c, 0xa7, 0xa1, 0x10, 0xff, 0x26, 0xc6, 0x38, 0xc5, 0x0f, 0x32, 0x15, 0xb2, 0x8a, 0x09, 0xf2, 0x3a, 0xf6, 0xf8, 0x4c, 0xdc, 0x89, 0x78, 0x98, 0xd0, 0xfd, 0x22, 0x3b, 0x13, 0x48, 0x1f, 0xe8, 0x92, 0xb1, 0xa5, 0x8b, 0xa2, 0xe4, 0xb3, 0x68, 0x5b } + +} +, +{ + "PKCS#1 v1.5 Signature Example 4.16", + /* Message to be signed */ + 51, + { 0xaf, 0x8f, 0x08, 0x87, 0xc2, 0x19, 0x00, 0x4d, 0x2a, 0xbd, 0x89, 0x4e, 0xa9, 0x25, 0x59, 0xee, 0x31, 0x98, 0xaf, 0x3a, 0x73, 0x4f, 0xe9, 0xb9, 0x63, 0x8c, 0x26, 0x3a, 0x72, 0x8a, 0xd9, 0x5a, 0x5a, 0xe8, 0xce, 0x3e, 0xb1, 0x58, 0x39, 0xf3, 0xaa, 0x78, 0x52, 0xbb, 0x39, 0x07, 0x06, 0xe7, 0x76, 0x0e, 0x43 } +, + /* Signature */ + 128, + { 0x32, 0x7e, 0xc9, 0xd0, 0xbe, 0x7a, 0xab, 0x7b, 0xc9, 0x59, 0xd4, 0x02, 0x27, 0xe1, 0xd0, 0x04, 0x81, 0xfc, 0x04, 0x01, 0x1f, 0xe0, 0x8f, 0xd5, 0x44, 0x9b, 0x90, 0xc0, 0xf0, 0x54, 0xe0, 0xd6, 0x59, 0xb9, 0x26, 0xcc, 0x81, 0x29, 0x21, 0xc2, 0x0a, 0x56, 0x3c, 0x4a, 0xbe, 0x4f, 0x82, 0x5d, 0x6b, 0x5e, 0xef, 0x57, 0xb3, 0xe2, 0xd6, 0x5d, 0x20, 0xa8, 0x01, 0x3a, 0x50, 0xdd, 0x5c, 0x93, 0x23, 0x8c, 0xf0, 0x49, 0xf2, 0xff, 0x0c, 0x7e, 0xbe, 0xb8, 0xe8, 0xca, 0xf7, 0x2e, 0x46, 0xe7, 0xcf, 0x8a, 0x0c, 0x3f, 0x49, 0x25, 0x61, 0x6b, 0x1b, 0xc1, 0x82, 0x6f, 0xfc, 0xb0, 0xbd, 0xa6, 0x0b, 0xbe, 0xbe, 0xdf, 0xd4, 0xc6, 0x0f, 0x27, 0x88, 0xd1, 0x66, 0x6f, 0xb8, 0x45, 0x11, 0x85, 0x36, 0x46, 0xc2, 0xdd, 0x46, 0x68, 0x51, 0xfa, 0xc8, 0x5b, 0xe0, 0xed, 0x5a, 0xce, 0x5f, 0xe2 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 4.17", + /* Message to be signed */ + 115, + { 0x38, 0xdf, 0x86, 0x55, 0x7f, 0x37, 0x5d, 0x09, 0xcc, 0xd8, 0xbd, 0x15, 0xd8, 0xcc, 0xf6, 0x1f, 0x5d, 0x78, 0xca, 0x5c, 0x7f, 0x5c, 0xde, 0x78, 0x2e, 0x6b, 0xf5, 0xd0, 0x05, 0x70, 0x56, 0xd4, 0xba, 0xd9, 0x8b, 0x3d, 0x2f, 0x95, 0x75, 0xe8, 0x24, 0xab, 0x7a, 0x33, 0xff, 0x57, 0xb0, 0xac, 0x10, 0x0a, 0xb0, 0xd6, 0xea, 0xd7, 0xaa, 0x0b, 0x50, 0xf6, 0xe4, 0xd3, 0xe5, 0xec, 0x0b, 0x96, 0x6b, 0x81, 0x57, 0x79, 0xa9, 0x1b, 0x3a, 0x8b, 0xd0, 0x49, 0xbf, 0x2a, 0xeb, 0x92, 0x01, 0x42, 0x77, 0x22, 0x22, 0xc9, 0xca, 0x0c, 0x32, 0x8c, 0x65, 0x9e, 0x0a, 0x64, 0x37, 0x43, 0x3c, 0xce, 0xb7, 0x3c, 0x14, 0x9a, 0xec, 0x4a, 0x74, 0x80, 0xd5, 0xbb, 0xc4, 0x29, 0x20, 0xd7, 0xca, 0x23, 0x5d, 0xb6, 0x74 } +, + /* Signature */ + 128, + { 0x30, 0x46, 0x05, 0x5c, 0x2b, 0x8e, 0xf7, 0xfa, 0x92, 0xc8, 0xa9, 0xe3, 0x95, 0x98, 0x5b, 0xd4, 0x60, 0xfb, 0x6b, 0x47, 0x98, 0x65, 0x53, 0x94, 0x4d, 0x21, 0x04, 0x51, 0x19, 0xf7, 0xe7, 0x61, 0x7e, 0x03, 0xfe, 0x80, 0x87, 0x0a, 0xc6, 0xaa, 0xbf, 0x63, 0xb0, 0x96, 0xca, 0xd5, 0xcc, 0xe7, 0xf5, 0x06, 0x95, 0x3a, 0x7f, 0x69, 0x3f, 0xe1, 0x37, 0xad, 0xfb, 0x97, 0xcd, 0x45, 0x81, 0x28, 0xae, 0x95, 0xc4, 0x7c, 0xa9, 0x48, 0xda, 0xcf, 0x24, 0x03, 0x6a, 0xde, 0xaa, 0x48, 0xf2, 0x9a, 0x46, 0x9f, 0xb5, 0x13, 0x19, 0x1e, 0x05, 0xac, 0xf7, 0x9e, 0x67, 0xa7, 0x93, 0xa3, 0xaf, 0x5e, 0x4f, 0x9c, 0x6d, 0x0d, 0x01, 0xfd, 0xd0, 0xe0, 0xcd, 0x42, 0x96, 0xad, 0x3d, 0xa2, 0xca, 0x89, 0xa5, 0x0e, 0xed, 0xcd, 0x9f, 0x7b, 0x87, 0x7d, 0x2a, 0xe1, 0xd5, 0x8d, 0x98, 0xdc, 0xd7, 0x8f } + +} +, +{ + "PKCS#1 v1.5 Signature Example 4.18", + /* Message to be signed */ + 12, + { 0xcb, 0x34, 0xed, 0xd5, 0xab, 0x65, 0x40, 0x41, 0xb6, 0x14, 0x30, 0x56 } +, + /* Signature */ + 128, + { 0x1d, 0xdf, 0x48, 0xba, 0x53, 0x51, 0xbe, 0xd0, 0x79, 0x5f, 0x55, 0xb3, 0x06, 0xaa, 0x1c, 0x6e, 0xd8, 0x36, 0xf5, 0x92, 0xba, 0x93, 0xcf, 0x0c, 0x46, 0xb7, 0xc2, 0x73, 0x70, 0x9d, 0x36, 0xb8, 0xdf, 0xf0, 0x2a, 0xbd, 0xb1, 0xa7, 0x68, 0xd1, 0xc7, 0x11, 0x4a, 0x86, 0xa4, 0x57, 0x49, 0x6d, 0xa5, 0x79, 0xe4, 0xd8, 0x19, 0xf7, 0x2a, 0x19, 0x2e, 0x29, 0x8b, 0xe2, 0x15, 0x2f, 0x7c, 0xf3, 0x9d, 0x1e, 0x30, 0x82, 0x7d, 0x02, 0x82, 0xcc, 0xf3, 0x4d, 0xc8, 0x88, 0x9f, 0x1c, 0x2f, 0x59, 0x70, 0x93, 0x0d, 0x97, 0x35, 0x04, 0x2f, 0x8a, 0x5a, 0x71, 0x22, 0x63, 0x16, 0x5d, 0x6e, 0x6c, 0x50, 0x35, 0xe2, 0xe4, 0xa5, 0x0e, 0x86, 0x3c, 0x06, 0x79, 0x9e, 0x3c, 0x89, 0xcc, 0xb5, 0xcb, 0x0e, 0x70, 0xb3, 0xc9, 0x9c, 0x08, 0x40, 0x30, 0x67, 0x7a, 0x7c, 0x97, 0x90, 0x7a, 0x17, 0x24 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 4.19", + /* Message to be signed */ + 181, + { 0x5b, 0x09, 0xec, 0x88, 0xb1, 0x52, 0x71, 0x78, 0xfa, 0x04, 0x32, 0x63, 0xf3, 0x06, 0x7d, 0x9f, 0xfe, 0x97, 0x30, 0x32, 0xa9, 0x9f, 0x4c, 0xb0, 0x8a, 0xd2, 0xc7, 0xe0, 0xa2, 0x45, 0x6c, 0xdd, 0x57, 0xa7, 0xdf, 0x56, 0xfe, 0x60, 0x53, 0x52, 0x7a, 0x5a, 0xeb, 0x67, 0xd7, 0xe5, 0x52, 0x06, 0x3c, 0x1c, 0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, 0x02, 0xe2, 0xa3, 0x41, 0xc9, 0x72, 0x06, 0x2c, 0x23, 0x81, 0x4a, 0x00, 0x13, 0x1e, 0x17, 0xb1, 0xde, 0xc7, 0xb4, 0xc5, 0x7c, 0x5b, 0xf1, 0xd4, 0xfa, 0x79, 0x22, 0x29, 0x37, 0xa4, 0xdc, 0x5c, 0x00, 0x23, 0x5f, 0x85, 0x3d, 0xd2, 0x3d, 0xc9, 0x75, 0x7f, 0x33, 0x5c, 0x85, 0xc2, 0x07, 0xeb, 0x07, 0x4d, 0x4b, 0xcc, 0x24, 0x3e, 0xda, 0xa7, 0x83, 0x1b, 0x83, 0x13, 0x56, 0x55, 0xe2, 0x27, 0x7e, 0xf2, 0x9e, 0x7a, 0xeb, 0xf3, 0x4a, 0x0f, 0x7b, 0x23, 0x4a, 0x28, 0x65, 0x0a, 0x30 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 4.20", + /* Message to be signed */ + 17, + { 0x3c, 0x33, 0x0c, 0x1e, 0xf7, 0x18, 0xc1, 0x41, 0xe4, 0x7b, 0x8f, 0xa8, 0x59, 0xbe, 0x4d, 0x5b, 0x96 } +, + /* Signature */ + 128, + { 0x0b, 0x10, 0x22, 0xdc, 0x38, 0xe2, 0x17, 0xfd, 0x3b, 0x0e, 0x7e, 0xf1, 0x9d, 0xfc, 0xb4, 0xb4, 0x56, 0x36, 0x62, 0x40, 0x98, 0x30, 0x95, 0xf6, 0xdb, 0x96, 0x58, 0x31, 0xa7, 0x0f, 0x0f, 0x8e, 0x20, 0xe2, 0xdd, 0x2a, 0xc2, 0x31, 0xcc, 0x37, 0x90, 0x45, 0xc2, 0x73, 0x65, 0xe7, 0x3a, 0x53, 0x71, 0x9b, 0xb6, 0xf0, 0x11, 0xc3, 0xf8, 0x63, 0x6b, 0x64, 0x99, 0x4c, 0xa4, 0x80, 0x60, 0x2f, 0xb3, 0xb4, 0xf0, 0xe2, 0x27, 0x4b, 0x58, 0xb3, 0x63, 0xe0, 0xd3, 0x08, 0xb5, 0x28, 0xe1, 0x58, 0x59, 0xa9, 0x1d, 0xcf, 0x99, 0xbf, 0xfe, 0xfb, 0xc8, 0x05, 0x22, 0x41, 0xb9, 0x74, 0x19, 0x2e, 0x63, 0x62, 0x18, 0xf3, 0x98, 0x33, 0x2d, 0xaf, 0xe8, 0x25, 0x9c, 0xa5, 0xf5, 0xcc, 0xfa, 0x54, 0xc9, 0xb3, 0x2b, 0x27, 0x35, 0xaf, 0x07, 0x24, 0xf4, 0x0b, 0x5a, 0x5d, 0x61, 0x21, 0xa4, 0x0d } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 5: A 1024-bit RSA key pair", +{ + /* Modulus */ + 128, + { 0xc5, 0x5f, 0xfb, 0xdd, 0x6a, 0x27, 0x53, 0xbc, 0x02, 0xaf, 0x20, 0xae, 0x18, 0xea, 0x0d, 0xaf, 0x23, 0x0b, 0xb6, 0xf8, 0x79, 0x5d, 0x05, 0xef, 0xec, 0xc8, 0x15, 0xba, 0xec, 0xe2, 0x2b, 0x38, 0x79, 0x99, 0x5f, 0x6d, 0x97, 0x64, 0xc1, 0xdf, 0x8f, 0x97, 0x85, 0x13, 0x81, 0x68, 0x62, 0x66, 0xb8, 0x09, 0x2f, 0xb6, 0x01, 0x18, 0x98, 0xa7, 0x67, 0x07, 0xa4, 0xd1, 0xd5, 0xbd, 0xa0, 0x8d, 0x24, 0x6c, 0x68, 0x7a, 0x8b, 0xba, 0xfa, 0x63, 0x98, 0xac, 0x9e, 0xa2, 0x72, 0x68, 0x23, 0x71, 0x4a, 0x0c, 0x39, 0x34, 0xca, 0x6e, 0x5f, 0x8c, 0xe3, 0x39, 0x87, 0xb5, 0x34, 0x85, 0x7e, 0xa9, 0xf8, 0x5c, 0xc4, 0xe1, 0x9a, 0x1d, 0x21, 0x83, 0xe0, 0xe4, 0xc8, 0xaa, 0x55, 0xcb, 0x22, 0x7b, 0x0e, 0x56, 0xce, 0xb2, 0xb6, 0x2b, 0x30, 0xef, 0xc7, 0x88, 0x64, 0xb2, 0xf9, 0xfb, 0x92, 0x49 } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 128, + { 0x07, 0xe3, 0xfa, 0x71, 0xb3, 0x98, 0xb6, 0xe4, 0x41, 0x47, 0x37, 0x0b, 0x3e, 0xbb, 0xbc, 0xa8, 0x4f, 0xc2, 0x5c, 0x22, 0x3a, 0xd7, 0xd9, 0x30, 0xea, 0x4a, 0x65, 0x73, 0xff, 0x9c, 0x5b, 0x15, 0xfa, 0xe6, 0x82, 0xc6, 0x22, 0xd3, 0x48, 0x5c, 0xe3, 0xa4, 0xaf, 0x11, 0x44, 0x8f, 0x23, 0xbf, 0xef, 0x83, 0x8e, 0x80, 0xbc, 0x32, 0x7b, 0x87, 0xd5, 0xba, 0x9c, 0x80, 0x37, 0x07, 0x49, 0xaf, 0xc8, 0xc1, 0xc0, 0x17, 0x54, 0x6f, 0xc6, 0xb6, 0x59, 0x31, 0xb7, 0x59, 0xca, 0x43, 0x41, 0xfa, 0x5e, 0x5e, 0x10, 0xb2, 0x40, 0x87, 0xe6, 0xe2, 0xc0, 0xf4, 0xdb, 0xb7, 0x90, 0x69, 0x52, 0x99, 0x9c, 0xbd, 0x90, 0xd2, 0x43, 0x5f, 0xca, 0xcc, 0x9c, 0x82, 0xe4, 0x8f, 0xdf, 0x24, 0xe4, 0x95, 0xcf, 0xf3, 0x0a, 0xd4, 0x19, 0xe7, 0x12, 0x3e, 0x3a, 0xc9, 0x42, 0x27, 0x2e, 0x1a, 0xba, 0xb1 } +, + /* Prime 1 */ + 64, + { 0xf7, 0xf7, 0xc0, 0x02, 0xf0, 0x19, 0x6e, 0xcd, 0xd7, 0x1b, 0xa5, 0xad, 0x74, 0x2b, 0x69, 0x48, 0x27, 0xd2, 0x88, 0xaf, 0x1b, 0x1b, 0xb6, 0x9c, 0x5e, 0xd7, 0xfb, 0x22, 0x9d, 0xee, 0x4b, 0x7a, 0x32, 0xf2, 0xf7, 0x56, 0x8a, 0x6f, 0xca, 0xf3, 0x83, 0xd8, 0x9a, 0xda, 0x9f, 0xc1, 0x4a, 0x7b, 0xa5, 0xd0, 0xa4, 0xa4, 0x6c, 0x2c, 0x54, 0x3e, 0xec, 0x17, 0x75, 0x49, 0xc8, 0xa0, 0x48, 0xb7 } +, + /* Prime 2 */ + 64, + { 0xcb, 0xc4, 0xb2, 0x86, 0x04, 0x76, 0xa2, 0xd3, 0xe8, 0xa4, 0xda, 0x21, 0x00, 0x16, 0xca, 0xce, 0xd0, 0xe3, 0x67, 0xcb, 0x86, 0x77, 0x10, 0xa4, 0xb5, 0xaa, 0x2d, 0xf2, 0xb8, 0xe5, 0xda, 0xf5, 0xfd, 0xc6, 0x47, 0x80, 0x7d, 0x4d, 0x5e, 0xbb, 0x6c, 0x56, 0xb9, 0x76, 0x3c, 0xcd, 0xae, 0x4d, 0xea, 0x33, 0x08, 0xeb, 0x0a, 0xc2, 0xa8, 0x95, 0x01, 0xcb, 0x20, 0x9d, 0x26, 0x39, 0xfc, 0xff } +, + /* Prime exponent 1 */ + 64, + { 0x6c, 0x76, 0x27, 0xbc, 0xa1, 0x3c, 0xde, 0xa4, 0x96, 0xa4, 0x77, 0x31, 0x89, 0x90, 0xbb, 0x7a, 0x5e, 0x40, 0xce, 0x9c, 0x99, 0x24, 0xe4, 0x19, 0x3d, 0xbb, 0x07, 0x14, 0x3b, 0x34, 0x52, 0x3b, 0x5f, 0x31, 0xbb, 0x52, 0x55, 0x37, 0x54, 0xf4, 0x73, 0x05, 0x39, 0xa6, 0xcb, 0x1e, 0x06, 0xf0, 0x52, 0xb5, 0x12, 0x6f, 0x01, 0x09, 0xda, 0xc7, 0xb3, 0x09, 0x07, 0xba, 0x80, 0x50, 0xeb, 0xbd } +, + /* Prime exponent 2 */ + 64, + { 0x40, 0x92, 0x74, 0x80, 0x43, 0xa9, 0xd4, 0xaf, 0x92, 0x69, 0xab, 0x36, 0x09, 0xf1, 0x2f, 0x13, 0x9a, 0xde, 0x75, 0x65, 0xe9, 0x96, 0x91, 0x8f, 0xa0, 0x81, 0xed, 0x4d, 0x9d, 0x8a, 0x39, 0x78, 0xfa, 0x92, 0x7a, 0xd6, 0x1c, 0xdf, 0x07, 0xc6, 0x1c, 0xee, 0xde, 0x96, 0xb9, 0x6d, 0xf4, 0x6e, 0x7c, 0x68, 0xef, 0xca, 0x8b, 0xfe, 0x63, 0xad, 0xd4, 0x83, 0xaa, 0x32, 0x22, 0x8a, 0xfd, 0xc1 } +, + /* Coefficient */ + 64, + { 0x2a, 0x61, 0x94, 0xca, 0x29, 0x70, 0x72, 0x38, 0x45, 0xff, 0xf3, 0x8c, 0xa1, 0xa9, 0xa3, 0xb5, 0x66, 0xb4, 0x24, 0x5d, 0xe2, 0xf9, 0x01, 0x34, 0xb8, 0xe6, 0xae, 0xc8, 0xae, 0x07, 0xf3, 0xbb, 0x7c, 0x5e, 0x5a, 0xe6, 0xe1, 0x83, 0x34, 0x85, 0xe5, 0x5d, 0x8c, 0xa6, 0x0c, 0xe1, 0x64, 0x2f, 0x72, 0x75, 0x96, 0x8e, 0x66, 0x12, 0x38, 0x35, 0x52, 0x11, 0xc6, 0x38, 0x48, 0x94, 0x0f, 0x3c } + +} +, +{{ + "PKCS#1 v1.5 Signature Example 5.1", + /* Message to be signed */ + 187, + { 0xea, 0xe9, 0xa4, 0x0b, 0xff, 0x18, 0x3f, 0x41, 0x14, 0x73, 0x2e, 0x7b, 0x3b, 0xa5, 0x56, 0xf4, 0xce, 0x28, 0x8d, 0xaa, 0x83, 0xe3, 0xff, 0x23, 0x61, 0x12, 0x44, 0xa7, 0xa0, 0x90, 0x1f, 0x11, 0x7d, 0x86, 0xc0, 0x9c, 0x33, 0xa5, 0x23, 0x2b, 0xd3, 0x20, 0xfa, 0x37, 0xa2, 0x38, 0xa8, 0xaa, 0x62, 0xdd, 0x21, 0xab, 0xbf, 0xac, 0xdb, 0x93, 0xfa, 0x1c, 0x44, 0xcc, 0x55, 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 0xae, 0x51, 0x7b, 0xfa, 0x7f, 0xca, 0x8a, 0x66, 0xfc, 0xfd, 0x63, 0x2a, 0xf7, 0x47, 0xc4, 0x9c, 0xdf, 0xb0, 0xb9, 0xae, 0xe3, 0x52, 0x28, 0xb7, 0xdc, 0x4c, 0x21, 0x00, 0x39, 0x69, 0xb0, 0xa0, 0x13, 0xed, 0xe1, 0x29, 0x2b, 0x65, 0xd1, 0x0a, 0x50, 0xc9, 0x02, 0x63, 0xfb, 0x0b, 0xf4, 0xf4, 0xb8, 0x37, 0x66, 0x41, 0xb0, 0x3e, 0x1f, 0xaf, 0xb8, 0x83, 0xf0, 0x38, 0xf4, 0x32, 0x3d, 0xfe, 0x5b, 0xea, 0xc4, 0x68, 0xde, 0xea, 0x99, 0xc3 } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Signature Example 5.2", + /* Message to be signed */ + 92, + { 0x9d, 0xe5, 0xca, 0x46, 0x74, 0x85, 0x61, 0xa0, 0xb9, 0x28, 0xb2, 0x60, 0xa9, 0x5a, 0x3e, 0xd9, 0x20, 0xad, 0xc8, 0xd5, 0xee, 0xb9, 0x27, 0x1d, 0xc7, 0x1b, 0xc1, 0x4f, 0x69, 0xcc, 0xd6, 0x31, 0x1d, 0x18, 0x6a, 0x77, 0x9f, 0x5e, 0xb8, 0xdb, 0x17, 0xc6, 0x90, 0xd6, 0x86, 0x7c, 0xf3, 0x36, 0x9b, 0xbf, 0xf1, 0x5f, 0xab, 0xb3, 0xcd, 0x2c, 0xfd, 0xd6, 0xf7, 0xd7, 0x52, 0x86, 0xff, 0x2d, 0x24, 0x99, 0xc5, 0xab, 0xb4, 0x8e, 0xd5, 0x4f, 0xd4, 0xd8, 0x49, 0xa9, 0x18, 0x0e, 0x11, 0x0e, 0x0a, 0x53, 0xa7, 0x21, 0x39, 0x82, 0x92, 0x11, 0x0f, 0xe8, 0xbe, 0x26 } +, + /* Signature */ + 128, + { 0x44, 0x5f, 0xf5, 0xb6, 0x87, 0x9f, 0x8c, 0xe7, 0x53, 0x95, 0x01, 0x6f, 0x04, 0x95, 0xf1, 0x31, 0x35, 0xb1, 0x79, 0xe7, 0x3a, 0x3c, 0xae, 0xb3, 0x30, 0xe3, 0xcd, 0xa7, 0xf3, 0x1f, 0x1d, 0xcb, 0xa7, 0xaa, 0x82, 0xe2, 0x68, 0xc9, 0x35, 0xe9, 0xd7, 0x01, 0x4e, 0x0b, 0x0d, 0xce, 0xa6, 0x9c, 0x7b, 0x96, 0x8a, 0xdb, 0x17, 0x42, 0x4a, 0x64, 0xdf, 0xd1, 0xe2, 0xbc, 0x57, 0x07, 0xf9, 0x20, 0xfc, 0x0c, 0x83, 0xcc, 0x63, 0xdf, 0xc7, 0x4b, 0x96, 0x3e, 0x68, 0x2b, 0x46, 0xa2, 0x2a, 0xc2, 0x56, 0xac, 0x6b, 0xe5, 0x70, 0x9c, 0x07, 0xcf, 0xcc, 0x3d, 0x4e, 0xba, 0x3a, 0x1d, 0x61, 0xab, 0x15, 0xf1, 0xba, 0xdb, 0x0a, 0x49, 0xfb, 0x5c, 0xf0, 0x9a, 0x1f, 0x74, 0x81, 0xa3, 0xaa, 0xea, 0xf7, 0xc2, 0x57, 0x54, 0x03, 0x77, 0xae, 0xa7, 0xb5, 0x44, 0x17, 0xa6, 0x09, 0xc7, 0x6f, 0x4c } + +} +, +{ + "PKCS#1 v1.5 Signature Example 5.3", + /* Message to be signed */ + 232, + { 0x18, 0x3b, 0xa1, 0xa3, 0x81, 0x1d, 0x62, 0x5c, 0xa9, 0xda, 0x1b, 0xba, 0xae, 0xdc, 0x76, 0x19, 0x20, 0x12, 0xfc, 0xb6, 0x74, 0xbb, 0x9e, 0x77, 0xd8, 0xf3, 0x77, 0x08, 0xd2, 0x40, 0xd3, 0x49, 0xe0, 0x57, 0x97, 0x41, 0x6f, 0xeb, 0x24, 0xe3, 0x01, 0x8c, 0x7a, 0x20, 0x5d, 0x05, 0x9d, 0xe8, 0xe0, 0xae, 0x05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{ 0xab, 0x4b, 0x78, 0x96, 0x4c, 0x2a, 0x35, 0xd3, 0x28, 0x55, 0xe0, 0xef, 0xce, 0xd3, 0x4b, 0xf8, 0x02, 0x19, 0xb5, 0x8c, 0x48, 0x8e, 0xa3, 0x75, 0xb1, 0xf3, 0x27, 0x16, 0x6a, 0x51, 0x35, 0xe5, 0xda, 0x99, 0x45, 0xc2, 0x87, 0x29, 0x7a, 0x3d, 0x93, 0x2e, 0x57, 0x27, 0x46, 0xf0, 0x22, 0x74, 0x8b, 0x85, 0x58, 0x5a, 0x0a, 0xbd, 0x91, 0x86, 0xf4, 0xac, 0x35, 0xed, 0xc8, 0x50, 0xd2, 0xfd, 0x88, 0x05, 0xb9, 0xe9, 0xf5, 0x1a, 0x5a, 0xdc, 0xb9, 0x5e, 0x1a, 0xc1, 0x72, 0x9e, 0x57, 0xb8, 0x53, 0x31, 0xc1, 0xed, 0x15, 0xc3, 0xd0, 0xcf, 0xae, 0x33, 0xf6, 0x1c, 0x11, 0x9b, 0x55, 0xc9, 0x5e, 0x34, 0x4b, 0x72, 0xf2, 0xb4, 0xf8, 0xe7, 0xe8, 0xfa, 0xc7, 0xa3, 0x3e, 0x5b, 0x8b, 0x27, 0x6a, 0x60, 0x88, 0xa7, 0xfa, 0xbf, 0x4f, 0xa1, 0x72, 0x35, 0x7f, 0xb6, 0xe3, 0xf4, 0x4a, 0x94 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 5.4", + /* Message to be signed */ + 215, + { 0x87, 0x07, 0xdc, 0xdb, 0x49, 0xd2, 0x83, 0xa2, 0x3a, 0x9b, 0xd6, 0xff, 0x87, 0xaf, 0xf8, 0x34, 0xf0, 0x6f, 0xf7, 0xf4, 0x7b, 0x0e, 0x5f, 0x57, 0xff, 0x1a, 0x0d, 0x99, 0x5b, 0xba, 0x9c, 0xdd, 0x5e, 0xa0, 0x1b, 0x42, 0xb2, 0x5d, 0x6f, 0xf1, 0x7a, 0x0d, 0xc1, 0x06, 0x05, 0xc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xee, 0x69, 0xca, 0xda, 0x73, 0xa9, 0x87, 0x7c, 0xca, 0x12, 0xf6, 0xd4, 0x06, 0x27, 0xdc, 0xed, 0x76, 0x22, 0x14, 0x7e, 0xc9, 0x01, 0xa5, 0xb4, 0x63, 0xe7, 0xef, 0x9b, 0x37, 0xfb, 0xd6, 0x92, 0x78, 0x5a, 0xa2, 0x2a, 0x46, 0x5d, 0xf4, 0x03, 0xaf, 0x92, 0xa2, 0x9f, 0x79, 0x5d, 0x40, 0xa8, 0x3f, 0xa9, 0x64, 0xb8, 0x5a, 0x7e, 0xc0, 0x5a, 0x3c, 0xda, 0xe3, 0xf8, 0xbc, 0x8a, 0x61, 0xa7, 0x9d, 0xc8, 0x42, 0xe1, 0xd3, 0x77, 0xbc, 0x5e, 0x1d, 0x46, 0xad, 0xaa, 0xa8, 0x66, 0xbe, 0x28, 0x2c, 0x6e, 0x23, 0x88, 0x17, 0x36, 0x44, 0xf4, 0x06, 0x27, 0xbc, 0xf8, 0xa0, 0x97, 0x4a, 0x4b, 0xe8, 0xfc, 0xc4, 0x8a, 0xee, 0x7e, 0x82, 0x59, 0xf8, 0x68, 0xa2, 0xbd, 0x78, 0x9a, 0x90, 0x89, 0x92, 0x05, 0x6e, 0x55 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 5.5", + /* Message to be signed */ + 246, + { 0xac, 0x9f, 0xa3, 0xf6, 0x3d, 0xf0, 0x68, 0xe9, 0x0d, 0x69, 0x2e, 0xcc, 0xfa, 0x7d, 0x87, 0x96, 0x49, 0x1a, 0xca, 0x79, 0x5b, 0x98, 0x58, 0xa4, 0x55, 0x18, 0x62, 0x32, 0x29, 0xaf, 0x28, 0xb1, 0x3a, 0x50, 0x2d, 0x8c, 0xb3, 0xb9, 0x50, 0x92, 0x50, 0x58, 0x82, 0xeb, 0x99, 0x4d, 0xe7, 0x46, 0x59, 0x62, 0x56, 0x98, 0xa0, 0x05, 0x04, 0x17, 0x94, 0x0d, 0x8b, 0xfa, 0x28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8e, 0x10, 0x88 } +, + /* Signature */ + 128, + { 0x11, 0xe1, 0xa8, 0x28, 0xf0, 0x0a, 0x98, 0x7e, 0x03, 0xd6, 0x2e, 0x2a, 0x53, 0x6c, 0x29, 0x7d, 0xda, 0xc0, 0x22, 0xe0, 0x63, 0xee, 0x0d, 0xe4, 0xe4, 0x69, 0x5d, 0xed, 0x1f, 0xdb, 0x22, 0x09, 0x00, 0xa3, 0xac, 0x3f, 0x87, 0xd1, 0xbe, 0x75, 0xf9, 0x59, 0xc2, 0x8b, 0x57, 0x8a, 0x43, 0xb2, 0x56, 0x64, 0x3c, 0xdf, 0xff, 0x92, 0x15, 0x95, 0xfd, 0xfb, 0xea, 0xf4, 0x10, 0xc2, 0xae, 0xd9, 0xe5, 0xe4, 0x7e, 0x1d, 0x15, 0x1a, 0xe2, 0x8c, 0x76, 0x99, 0xae, 0xe2, 0x25, 0xa6, 0x45, 0xbc, 0x42, 0xb3, 0xbe, 0xb5, 0x2f, 0x08, 0x38, 0x7e, 0xc5, 0x54, 0xd0, 0x20, 0x4d, 0x28, 0x3c, 0x3b, 0xcc, 0xbc, 0xca, 0x21, 0x6e, 0xda, 0xd9, 0x4e, 0xc6, 0x4f, 0x9c, 0x20, 0xb3, 0x40, 0x6a, 0xb7, 0x8a, 0x6c, 0x4a, 0x4d, 0xae, 0x3f, 0xa6, 0x17, 0xa0, 0x0c, 0x6a, 0xb2, 0xf8, 0xe2, 0x47, 0x62 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 5.6", + /* Message to be signed */ + 16, + { 0x15, 0x74, 0x69, 0x73, 0x44, 0xe9, 0x86, 0x85, 0xcd, 0x6e, 0x65, 0xe4, 0x67, 0x83, 0xf0, 0xb5 } +, + /* Signature */ + 128, + { 0x3b, 0x7d, 0x67, 0xd1, 0x3c, 0xd3, 0xc0, 0xfd, 0x30, 0x5a, 0xd4, 0x04, 0xd8, 0xa3, 0xdc, 0xde, 0x4a, 0x45, 0x17, 0x9c, 0x2d, 0x0b, 0x87, 0x11, 0x5d, 0x6d, 0x06, 0x0c, 0x24, 0x9b, 0x87, 0xf3, 0x9e, 0x46, 0x3b, 0x76, 0x4b, 0x42, 0x07, 0xc4, 0x8a, 0x74, 0xcf, 0xce, 0x25, 0x31, 0xe8, 0x18, 0x3d, 0x3d, 0x01, 0x25, 0x85, 0xce, 0x57, 0x39, 0xd1, 0x62, 0xc4, 0xea, 0x22, 0x32, 0x44, 0x02, 0xea, 0x2e, 0x6e, 0xaf, 0xb8, 0xa5, 0x73, 0xfc, 0xff, 0x40, 0x15, 0xc9, 0x5c, 0x45, 0xe4, 0xca, 0x7a, 0xc5, 0x1a, 0xe3, 0xa0, 0x6f, 0x42, 0x1e, 0x60, 0x6d, 0x68, 0x3f, 0x5e, 0x12, 0x2b, 0x55, 0x79, 0x14, 0x8a, 0x9c, 0x46, 0x6a, 0xde, 0xb0, 0x24, 0x28, 0xf4, 0x89, 0x6a, 0x86, 0xdf, 0x63, 0xbe, 0x58, 0x7d, 0xdd, 0x7a, 0x6a, 0x8d, 0xe7, 0x17, 0x6b, 0xe4, 0xe7, 0xff, 0x4a, 0xaa, 0x99 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 5.7", + /* Message to be signed */ + 150, + { 0xbe, 0x46, 0xbe, 0x8b, 0xdd, 0x85, 0x43, 0xd3, 0x70, 0xbb, 0xb7, 0xac, 0x83, 0x9f, 0x5e, 0x64, 0x53, 0xf3, 0x0c, 0xd8, 0x75, 0x2a, 0x4b, 0x92, 0x67, 0x32, 0xc5, 0x9e, 0x61, 0x09, 0x04, 0x4b, 0xe3, 0xa0, 0x75, 0x6c, 0x70, 0x25, 0xa2, 0x32, 0x80, 0xdf, 0x2e, 0xd7, 0x66, 0xba, 0x39, 0xab, 0xb2, 0x0b, 0x94, 0x4c, 0x06, 0x5f, 0xe1, 0x48, 0x7d, 0xea, 0x31, 0xb4, 0x70, 0x8a, 0x68, 0x9a, 0x50, 0xb2, 0x8d, 0x54, 0x29, 0x94, 0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c8, 0xb4, 0xc8, 0xad, 0x5c, 0x75, 0x32, 0xcf, 0xa0, 0x44, 0xae, 0xdc, 0x73, 0x78, 0x77, 0x94, 0xc2, 0x98, 0x79, 0x7c, 0x8a, 0x7e, 0x14, 0x49, 0xea, 0xd6, 0x15, 0x0d, 0xed } + +} +, +{ + "PKCS#1 v1.5 Signature Example 5.8", + /* Message to be signed */ + 167, + { 0x0b, 0x7e, 0x06, 0x63, 0xe7, 0x15, 0xea, 0x38, 0xbc, 0x93, 0x0e, 0xc9, 0xd8, 0xe2, 0xa0, 0x29, 0xaa, 0x1a, 0x4c, 0x95, 0xe7, 0xb2, 0x00, 0x47, 0xae, 0x15, 0x44, 0xd5, 0xb2, 0xd8, 0x47, 0x6f, 0xc8, 0x05, 0x53, 0x9f, 0xb0, 0xef, 0xab, 0x7d, 0x5f, 0xf1, 0x2c, 0x36, 0xd7, 0x6a, 0x79, 0x7b, 0x75, 0xc0, 0xb5, 0x3f, 0xa9, 0x26, 0x54, 0x73, 0xda, 0xb6, 0x80, 0xc2, 0x55, 0xd5, 0x7e, 0x99, 0xb6, 0xd9, 0xfe, 0x08, 0xcf, 0x1a, 0x57, 0x34, 0x91, 0xe2, 0x19, 0x78, 0xfa, 0xe9, 0x53, 0x9c, 0xc0, 0x58, 0x84, 0x63, 0x3a, 0x1d, 0xd5, 0xcb, 0x21, 0x53, 0x6f, 0xd4, 0x2d, 0xdd, 0x73, 0x1c, 0xa7, 0x6c, 0x34, 0x57, 0x81, 0x3c, 0xe1, 0xbb, 0x59, 0xc2, 0x1d, 0xd3, 0x1b, 0xf2, 0xae, 0x3b, 0xfd, 0x7d, 0x20, 0xc6, 0xc7, 0x12, 0xa9, 0xdd, 0x43, 0x95, 0x1f, 0x1b, 0x19, 0x8d, 0xea, 0xf7, 0x41, 0x08, 0xea, 0xd2, 0x29, 0x26, 0xd2, 0xb0, 0x19, 0x1e, 0x59, 0xd5, 0xf6, 0x79, 0xad, 0x97, 0xc7, 0x1e, 0xdc, 0x69, 0xde, 0x97, 0x98, 0x7e, 0x54, 0x3e, 0x87, 0xa9, 0x6a, 0x9f, 0xee, 0x77, 0xe3, 0xf0, 0xea, 0x95, 0x7b, 0xd4, 0x6a } +, + /* Signature */ + 128, + { 0x48, 0x51, 0x09, 0x8a, 0x85, 0xe7, 0x0d, 0xa3, 0x33, 0x92, 0xa9, 0xe9, 0x0b, 0x34, 0x76, 0xa4, 0x8b, 0xa0, 0xe3, 0x2c, 0xd6, 0xad, 0x3d, 0xc1, 0xdd, 0x91, 0xda, 0x57, 0xe8, 0x8d, 0xfb, 0xc7, 0xb6, 0x57, 0x4b, 0x08, 0xe8, 0x71, 0x60, 0x80, 0xe1, 0x5d, 0xf4, 0x05, 0x79, 0xc5, 0x70, 0x5d, 0x5b, 0xef, 0x58, 0x4b, 0x08, 0xb2, 0x63, 0xdb, 0xc4, 0xf0, 0xd1, 0x59, 0x56, 0xff, 0x11, 0x25, 0xc4, 0x8f, 0x89, 0x59, 0x1e, 0xbc, 0x94, 0x1d, 0x9f, 0xe8, 0xf9, 0xa7, 0x80, 0xc8, 0x2e, 0xa3, 0x2b, 0xf3, 0xef, 0xa1, 0x6c, 0xab, 0xbe, 0xe5, 0x80, 0xfd, 0x6b, 0x95, 0x74, 0x08, 0x0f, 0x69, 0x07, 0xfe, 0xaf, 0xf8, 0x1d, 0x48, 0xc4, 0x9a, 0x6d, 0xe2, 0x24, 0x84, 0x80, 0xf1, 0xd8, 0x52, 0x39, 0xe9, 0xa4, 0x18, 0xdd, 0x53, 0x10, 0xde, 0xf7, 0x76, 0xe0, 0x8f, 0x50, 0x9a, 0x14, 0x78 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 5.9", + /* Message to be signed */ + 226, + { 0x13, 0x42, 0x33, 0xba, 0xcf, 0xa1, 0x6d, 0xc8, 0x4d, 0x8f, 0xa4, 0xbd, 0xbb, 0x47, 0x93, 0xd1, 0xda, 0xc0, 0x7d, 0x60, 0x54, 0xbd, 0x08, 0x39, 0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x88, 0x09, 0x1f, 0xc5, 0xcd, 0x2f, 0x36, 0xad, 0x95, 0x5b, 0x7c, 0x6f, 0x2b, 0x19, 0xbb, 0xa3, 0x74, 0xfd } +, + /* Signature */ + 128, + { 0x3e, 0x37, 0xb4, 0x2d, 0xbe, 0xc1, 0x29, 0xdb, 0x81, 0xc5, 0xe2, 0xa2, 0x22, 0xf3, 0x1e, 0x81, 0xb9, 0x37, 0xff, 0x02, 0x24, 0x95, 0x18, 0x18, 0x37, 0x30, 0x37, 0x8b, 0x4c, 0x09, 0x2a, 0xa7, 0xf3, 0xb2, 0x34, 0x59, 0x61, 0x1a, 0x82, 0x4f, 0xc5, 0x27, 0x54, 0x42, 0x1a, 0x27, 0xcc, 0xe9, 0x18, 0xb6, 0x2a, 0xa7, 0xb4, 0x46, 0x38, 0xa0, 0xc0, 0x82, 0x79, 0x80, 0x52, 0xa5, 0x88, 0x46, 0x68, 0x82, 0x51, 0x06, 0x90, 0xac, 0x77, 0x30, 0x23, 0x28, 0x02, 0x46, 0xc8, 0x90, 0xff, 0x1f, 0x62, 0x27, 0x04, 0x9e, 0x66, 0x8b, 0xc9, 0xd6, 0xe4, 0x89, 0xb6, 0x94, 0x4a, 0x34, 0xe8, 0xf9, 0x30, 0x02, 0xbb, 0xb0, 0x0d, 0x75, 0x2b, 0x57, 0x7c, 0xe3, 0x52, 0x53, 0x00, 0x82, 0xbe, 0xcd, 0x30, 0x9b, 0x0d, 0xac, 0xcd, 0x1d, 0x68, 0xd0, 0x6e, 0x1d, 0xf7, 0x12, 0x21, 0xc6, 0x22, 0x69 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 5.10", + /* Message to be signed */ + 111, + { 0x35, 0xda, 0x3d, 0x02, 0x34, 0xbd, 0x74, 0xfc, 0xd7, 0x6e, 0x8e, 0x69, 0x52, 0x8f, 0x65, 0x1b, 0x88, 0x27, 0x1c, 0xbf, 0x16, 0x28, 0x69, 0x38, 0xc2, 0xc4, 0xa3, 0x7d, 0x41, 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 0x3b, 0xcd, 0xfd, 0xb2, 0x09, 0xa1, 0x6e, 0xf4, 0x5c, 0xc6, 0xf9, 0x68, 0x2e, 0xae, 0x96, 0x3c, 0xbb, 0x21, 0x3a, 0xdb, 0x7f, 0xad, 0x1b, 0xef, 0x49, 0xc0, 0x70, 0x4f } + +} +, +{ + "PKCS#1 v1.5 Signature Example 5.11", + /* Message to be signed */ + 50, + { 0x75, 0xfd, 0xb0, 0x72, 0x73, 0xf7, 0x54, 0xd1, 0x11, 0x6f, 0x99, 0x7a, 0xf2, 0xd1, 0x1a, 0x51, 0x2b, 0x94, 0xe9, 0xe0, 0x48, 0x01, 0xb3, 0xfc, 0x73, 0x91, 0x30, 0xb7, 0x47, 0xb4, 0xbe, 0x87, 0x44, 0xd7, 0xe7, 0xf8, 0xa2, 0x97, 0xa0, 0x89, 0xd9, 0x05, 0x0c, 0x5f, 0x54, 0xf8, 0xa3, 0x9a, 0xa3, 0xf2 } +, + /* Signature */ + 128, + { 0x07, 0xff, 0xc1, 0xb7, 0xa1, 0x0d, 0xda, 0xba, 0x96, 0x05, 0xf0, 0xa3, 0xd9, 0x3c, 0x8a, 0x5e, 0x4c, 0x0b, 0x77, 0x58, 0x61, 0x39, 0x05, 0x07, 0x31, 0xd9, 0xcc, 0x9b, 0x3c, 0x83, 0xd2, 0xb7, 0x3f, 0xaf, 0x9a, 0x4e, 0x24, 0xd1, 0xc8, 0xbb, 0x0d, 0x62, 0x3d, 0xf1, 0x0f, 0xc8, 0x40, 0x7d, 0x15, 0x14, 0x48, 0xfa, 0x43, 0xee, 0x65, 0x81, 0xe7, 0xb0, 0xac, 0x80, 0xd1, 0x4a, 0xdf, 0xa4, 0xf6, 0xd2, 0x7a, 0x76, 0x67, 0x50, 0xb2, 0x31, 0xcb, 0xc1, 0xc5, 0xcf, 0xd6, 0x2d, 0xf1, 0xb9, 0x72, 0x7d, 0x8b, 0x87, 0x41, 0x46, 0x9f, 0x68, 0xe5, 0x0a, 0x9b, 0x3b, 0xc7, 0xad, 0xe1, 0x37, 0xdb, 0x06, 0x74, 0x76, 0x03, 0x74, 0x28, 0x56, 0xd5, 0xe7, 0xdd, 0xb4, 0xe1, 0x6a, 0x5b, 0x49, 0xd7, 0x36, 0x5d, 0xb2, 0x76, 0x3b, 0xf5, 0xfd, 0xea, 0x08, 0x3d, 0x81, 0xfa, 0xc9, 0x2d, 0x87 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 5.12", + /* Message to be signed */ + 245, + { 0x96, 0xc9, 0xfa, 0xce, 0xfb, 0xa2, 0xed, 0x33, 0xed, 0x8b, 0x7b, 0x3d, 0x8b, 0x6d, 0xf2, 0x8f, 0x2f, 0xab, 0x0d, 0xcd, 0xd7, 0xa3, 0xcd, 0x7a, 0x7d, 0xed, 0xa2, 0x54, 0x5e, 0xd4, 0x47, 0x0e, 0xd2, 0x5b, 0x46, 0xd2, 0x16, 0x6e, 0xeb, 0xb7, 0xe1, 0x47, 0x10, 0x17, 0x83, 0xb6, 0x45, 0xba, 0xc6, 0x26, 0x64, 0xb8, 0x72, 0x70, 0x09, 0xf3, 0x5d, 0x1e, 0xa5, 0xfd, 0xa5, 0xe7, 0xc2, 0x8d, 0x6a, 0xf6, 0xfe, 0x92, 0x04, 0x6c, 0xa7, 0x24, 0xca, 0xb8, 0x42, 0x5a, 0x52, 0xa0, 0x85, 0xf9, 0xac, 0x90, 0x83, 0xd4, 0xd6, 0x90, 0xbb, 0xdd, 0xdf, 0xd0, 0xa8, 0x2d, 0x94, 0x8f, 0x70, 0xd6, 0x85, 0xe2, 0x6b, 0xb9, 0xf5, 0x27, 0x40, 0x8a, 0xbc, 0x84, 0x7b, 0xff, 0x12, 0x02, 0xde, 0xdf, 0x6d, 0x2f, 0xac, 0x6c, 0xf3, 0x68, 0x2a, 0x51, 0x6b, 0xa7, 0x2f, 0x4f, 0xe9, 0x7b, 0x90, 0x46, 0x6a, 0xf6, 0xe5, 0x43, 0x12, 0x31, 0x65, 0xb8, 0xa6, 0x83, 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 0x04, 0xa5, 0xde, 0xe6, 0xca, 0x88, 0xd9, 0x1a, 0xe2, 0x8b, 0x7b, 0x53, 0x6c, 0x90, 0x20, 0x2b, 0xc7, 0x72, 0x6d, 0xa5, 0x04, 0x2a, 0x85, 0x08, 0xd3, 0xb1, 0x3c, 0xfb, 0xaa, 0xdc, 0xee, 0x12, 0x78, 0xd3, 0x5d, 0x30, 0x3a, 0xcf, 0xee, 0x6e, 0x07, 0x41, 0x90, 0x49, 0x11, 0xa5, 0xf1, 0x88, 0x10, 0xad, 0xd3, 0xe7, 0xb8, 0xf6 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 5.13", + /* Message to be signed */ + 58, + { 0xc4, 0xb4, 0xc9, 0x96, 0x6e, 0x56, 0xf4, 0x0a, 0xff, 0x47, 0x08, 0x13, 0x1c, 0xd3, 0x71, 0x44, 0x21, 0x34, 0x3e, 0xde, 0x70, 0xc4, 0xd4, 0x6d, 0xb6, 0xef, 0xbe, 0x1b, 0x19, 0xa9, 0xe3, 0xc2, 0xe5, 0x81, 0x06, 0x00, 0x8a, 0x98, 0x38, 0x59, 0xcf, 0x94, 0x2a, 0x31, 0x97, 0x74, 0x69, 0x5a, 0x0c, 0x98, 0xa9, 0x63, 0xe2, 0xfe, 0x9d, 0x93, 0x79, 0xbc } +, + /* Signature */ + 128, + { 0xb1, 0x6b, 0x10, 0xf2, 0xbd, 0x7e, 0xa0, 0xf7, 0x6a, 0x9e, 0xd2, 0xff, 0xcf, 0x3e, 0xc1, 0x0e, 0xdc, 0xb8, 0x24, 0x60, 0xfe, 0x55, 0x82, 0xa7, 0x76, 0x4c, 0x0c, 0x50, 0x56, 0xec, 0xfb, 0x09, 0x72, 0x06, 0x48, 0xd5, 0xf1, 0x9b, 0x3d, 0xea, 0xf2, 0xac, 0xc9, 0x86, 0x46, 0x0e, 0x71, 0x14, 0x26, 0x15, 0x83, 0xa5, 0xf4, 0xa9, 0x90, 0xe9, 0x22, 0xfe, 0xb5, 0xb4, 0x78, 0x97, 0x34, 0xfd, 0xcc, 0xe1, 0x5d, 0xdc, 0x87, 0xca, 0xc3, 0xf6, 0xc7, 0xc9, 0xe9, 0xe2, 0x19, 0x23, 0x15, 0xf0, 0x84, 0x1f, 0x43, 0xea, 0x86, 0xde, 0xa9, 0xa9, 0x38, 0x05, 0x08, 0xb0, 0x6c, 0x9c, 0xa5, 0xe9, 0xd4, 0xa6, 0x51, 0xd0, 0x12, 0x16, 0x62, 0x7c, 0x46, 0x6b, 0xf0, 0xd6, 0xae, 0x74, 0x4b, 0xf3, 0x0f, 0xd7, 0x91, 0xa8, 0x21, 0x03, 0x39, 0xf5, 0x05, 0x7f, 0xf8, 0x5c, 0xeb, 0x84, 0xf1, 0x96 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 5.14", + /* Message to be signed */ + 165, + { 0xb8, 0x38, 0xa5, 0xd8, 0x88, 0x95, 0x0f, 0x1b, 0x8e, 0x4d, 0x94, 0x7b, 0xba, 0x51, 0xaf, 0xf9, 0xbb, 0x60, 0xb8, 0x3d, 0x09, 0xed, 0x9d, 0x97, 0x96, 0x7a, 0x76, 0x95, 0x5e, 0xd1, 0xdd, 0xf0, 0x48, 0x15, 0x20, 0xbc, 0xf4, 0xf0, 0x8b, 0xeb, 0xbf, 0x89, 0x9c, 0xc7, 0xc3, 0xef, 0x0c, 0x04, 0xd5, 0x00, 0x1b, 0x1e, 0x2e, 0x84, 0x5f, 0xaf, 0xc5, 0x83, 0x30, 0x0c, 0x98, 0xac, 0xa7, 0xa0, 0x3e, 0x90, 0xa4, 0x34, 0xde, 0x77, 0xfe, 0xf7, 0x20, 0xda, 0x36, 0x63, 0xf2, 0x19, 0x98, 0x20, 0x8a, 0x94, 0xf8, 0x94, 0x76, 0x7d, 0x3e, 0xd8, 0x13, 0x96, 0xb7, 0xef, 0xb2, 0x86, 0xe0, 0xff, 0x7d, 0xb6, 0xea, 0x8f, 0xdb, 0x4e, 0x72, 0x83, 0x46, 0x00, 0xfe, 0x5f, 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7, 0xd4, 0x7b, 0xa5, 0xac } + +} +, +{ + "PKCS#1 v1.5 Signature Example 5.15", + /* Message to be signed */ + 77, + { 0x9f, 0xd5, 0x39, 0xc8, 0xad, 0x86, 0x49, 0x24, 0xee, 0xc1, 0xd6, 0x55, 0xc0, 0x7d, 0x1f, 0x28, 0x27, 0x0c, 0xdb, 0x32, 0x6b, 0x57, 0x2c, 0x46, 0x67, 0xec, 0xa6, 0x48, 0x8c, 0x03, 0x36, 0x57, 0xff, 0x29, 0x25, 0x4b, 0x91, 0xf3, 0x21, 0x6e, 0x1c, 0xac, 0x97, 0x97, 0x53, 0xf2, 0x23, 0xb1, 0x79, 0xea, 0x5f, 0x9e, 0xfc, 0x23, 0x6d, 0x40, 0x1d, 0x1b, 0x9a, 0x3c, 0x20, 0xeb, 0x2a, 0xfc, 0x9b, 0xfc, 0xfd, 0x07, 0x92, 0xac, 0xc5, 0xb0, 0x0c, 0x98, 0x28, 0xa6, 0x45 } +, + /* Signature */ + 128, + { 0x38, 0xbf, 0xdf, 0xd3, 0x27, 0x2e, 0x48, 0xcf, 0xee, 0x68, 0xce, 0xb9, 0x13, 0x04, 0xeb, 0x91, 0xee, 0x25, 0xe4, 0x83, 0x40, 0x1f, 0x30, 0xfe, 0x12, 0xd5, 0xe4, 0x35, 0x18, 0xe4, 0xb7, 0x71, 0x14, 0xa1, 0x2c, 0x8c, 0x79, 0x92, 0xae, 0xe7, 0xd2, 0xe7, 0x74, 0xff, 0xf9, 0x1d, 0x8f, 0xd1, 0xcb, 0x7c, 0x6a, 0x2a, 0xdf, 0x79, 0xb7, 0xc8, 0xab, 0x93, 0xe8, 0x37, 0x4d, 0xb7, 0x4c, 0x26, 0x90, 0x9c, 0x65, 0x9a, 0x97, 0xc7, 0x6a, 0x22, 0x2d, 0xf4, 0xfc, 0x8c, 0x7e, 0xf5, 0x19, 0x90, 0x80, 0xea, 0xae, 0x2d, 0x03, 0x1c, 0xa7, 0x51, 0xc5, 0x01, 0x32, 0x89, 0xdb, 0x4e, 0xad, 0x77, 0xb2, 0x8b, 0x76, 0xa4, 0xc4, 0x96, 0xad, 0x0e, 0xb4, 0x22, 0xfc, 0xa8, 0x8f, 0xc6, 0x84, 0xe4, 0x2a, 0xea, 0x88, 0xfd, 0x33, 0xc2, 0x56, 0x75, 0x1b, 0xa0, 0x66, 0x83, 0x4e, 0x77, 0xa1, 0xe2 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 5.16", + /* Message to be signed */ + 23, + { 0x1d, 0xe8, 0x07, 0x40, 0x9d, 0x0a, 0x61, 0xb0, 0x32, 0x2d, 0xfe, 0xd4, 0x99, 0xe8, 0xc3, 0x32, 0x41, 0xec, 0x89, 0xcd, 0x7d, 0x9f, 0xc5 } +, + /* Signature */ + 128, + { 0x8b, 0x66, 0x64, 0xf8, 0x69, 0xd7, 0x55, 0xc5, 0xd3, 0xe6, 0xdf, 0x99, 0x22, 0xe2, 0x27, 0xc1, 0x10, 0x91, 0x8a, 0x6f, 0xbd, 0x88, 0xc1, 0xa2, 0xe1, 0x28, 0x95, 0x23, 0xad, 0xbb, 0xd8, 0xaa, 0x43, 0x1d, 0x07, 0x86, 0x85, 0x3a, 0xb5, 0x96, 0xdd, 0x5b, 0x00, 0x12, 0x43, 0xb5, 0x4a, 0x2c, 0xb1, 0x0c, 0x31, 0x66, 0xbf, 0x00, 0x23, 0x38, 0xfc, 0xa2, 0x03, 0x45, 0xae, 0xde, 0x1b, 0x22, 0xea, 0x1f, 0xa3, 0xd2, 0x41, 0xc8, 0x6c, 0x76, 0xbf, 0xc0, 0x2f, 0x4f, 0xce, 0xae, 0x12, 0xc8, 0xa9, 0xd7, 0xe4, 0x4a, 0xd6, 0x17, 0x16, 0x65, 0xe8, 0x8f, 0x12, 0x85, 0x22, 0xdd, 0x53, 0x5a, 0x9d, 0x65, 0x00, 0x8f, 0x6a, 0x73, 0x2d, 0x40, 0xaf, 0x20, 0x4e, 0x22, 0x0f, 0x1f, 0xac, 0xd9, 0x42, 0xe0, 0x9d, 0x15, 0x09, 0x9f, 0xdc, 0x51, 0xb3, 0xa1, 0x42, 0x6c, 0xb2, 0xdd, 0x32, 0x93 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 5.17", + /* Message to be signed */ + 22, + { 0x4b, 0x2b, 0xcb, 0x26, 0x79, 0xa1, 0x4c, 0x3c, 0x4c, 0x06, 0x9e, 0xd0, 0x89, 0xa6, 0x5a, 0xba, 0x29, 0xf2, 0x2b, 0x61, 0x78, 0xc0 } +, + /* Signature */ + 128, + { 0x1c, 0x47, 0x82, 0x8e, 0xa5, 0x3f, 0xb6, 0x43, 0x6e, 0x95, 0x96, 0xb0, 0xce, 0x47, 0xd9, 0xf3, 0x8b, 0x5d, 0xeb, 0x0b, 0x19, 0x7c, 0x1b, 0xc4, 0x74, 0xe2, 0xe8, 0x22, 0x65, 0x70, 0xcc, 0x1b, 0x72, 0xf2, 0x39, 0x31, 0x2a, 0xe7, 0xc3, 0xc6, 0x38, 0x2e, 0x1d, 0x8c, 0xda, 0x7d, 0x4f, 0x12, 0xfe, 0xba, 0xd7, 0x0a, 0xfa, 0xe5, 0xac, 0xbf, 0x24, 0x28, 0xab, 0xc0, 0x44, 0x21, 0xbb, 0x4e, 0x1e, 0x59, 0x90, 0x11, 0x1b, 0x9a, 0xc8, 0x3c, 0x62, 0x43, 0x5c, 0x21, 0xaa, 0x25, 0xfd, 0x9b, 0x49, 0x07, 0x58, 0x54, 0x11, 0xd2, 0x53, 0xba, 0x9b, 0x87, 0x78, 0xf6, 0x24, 0x05, 0x3d, 0x46, 0xfe, 0x95, 0xd7, 0xe2, 0x2c, 0xa3, 0x93, 0x81, 0xc7, 0x79, 0x2e, 0xff, 0x46, 0x43, 0x8f, 0xbc, 0x16, 0x5e, 0xd7, 0x62, 0x9c, 0x2f, 0xc1, 0xce, 0xf1, 0xb3, 0x4d, 0x77, 0x76, 0x8a, 0x20, 0x55 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 5.18", + /* Message to be signed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9, 0x7e, 0x8d } + +} +, +{ + "PKCS#1 v1.5 Signature Example 5.19", + /* Message to be signed */ + 192, + { 0xf8, 0x7b, 0xb1, 0x2d, 0xaa, 0xad, 0x62, 0xc8, 0x64, 0xac, 0x3d, 0x44, 0x4d, 0x51, 0x4e, 0xec, 0x6e, 0x59, 0xb6, 0x7c, 0xd0, 0x82, 0x0d, 0xfc, 0xbd, 0xf8, 0x51, 0xea, 0x73, 0x89, 0x1f, 0x58, 0xa8, 0xbe, 0x6e, 0x84, 0x3e, 0xe8, 0x77, 0x3e, 0x4d, 0xc1, 0xc7, 0xd7, 0x42, 0xda, 0x82, 0xff, 0x16, 0xc1, 0x01, 0x1b, 0x99, 0x56, 0x6b, 0x9f, 0x3f, 0xd1, 0x7d, 0x68, 0xd5, 0xac, 0x99, 0xce, 0xf5, 0xa3, 0xa0, 0xf7, 0x53, 0x18, 0x76, 0x9d, 0xc0, 0x13, 0xbb, 0x05, 0x5b, 0xe1, 0x30, 0x56, 0xdf, 0x49, 0xa8, 0x39, 0xb8, 0x39, 0x52, 0x51, 0x39, 0x9b, 0x27, 0xa0, 0xbb, 0x31, 0xc5, 0x54, 0xae, 0xdf, 0x3d, 0x9c, 0x74, 0x82, 0xb6, 0x62, 0x0c, 0x5d, 0x7c, 0x69, 0x14, 0xa5, 0x64, 0xdb, 0x04, 0xa0, 0x00, 0x04, 0x56, 0x99, 0xee, 0x1e, 0x50, 0x88, 0xa5, 0xb6, 0x8d, 0x81, 0x4e, 0xfe, 0x9d, 0x13, 0x0d, 0xc3, 0x4e, 0x2b, 0xd9, 0x78, 0x51, 0x13, 0x9c, 0x73, 0x46, 0x07, 0x65, 0xb1, 0xf2, 0x65, 0x46, 0x86, 0xfe, 0xde, 0x9c, 0x9b, 0x3e, 0x92, 0x40, 0x9d, 0xb2, 0xd4, 0x2a, 0x32, 0xba, 0x9e, 0x20, 0xbc, 0xae, 0xb2, 0xc4, 0xf9, 0xff, 0x9b, 0x0e, 0x83, 0x4b, 0x74, 0x92, 0xa2, 0xb1, 0xd8, 0xc6, 0x5c, 0x8b, 0xa4, 0x98, 0x34, 0x2a, 0xe7, 0xd1, 0xd9, 0xfe, 0x74, 0x05, 0xc2 } +, + /* Signature */ + 128, + { 0x20, 0x7a, 0x34, 0x8c, 0xdf, 0x68, 0x4a, 0xa8, 0xe1, 0xa4, 0xaf, 0x7b, 0x7c, 0x25, 0x27, 0x07, 0xce, 0x6f, 0x1f, 0x9d, 0xb2, 0x29, 0x1f, 0x2a, 0x95, 0xa0, 0x71, 0x5d, 0x9c, 0x7f, 0xc5, 0x1a, 0xa2, 0x30, 0x11, 0x0b, 0x5b, 0x51, 0x8a, 0x9c, 0x8f, 0x95, 0x8d, 0xd2, 0x0c, 0x75, 0x24, 0xd5, 0xb6, 0x51, 0x06, 0xd7, 0x42, 0x1b, 0xa9, 0xfc, 0xfb, 0x78, 0x91, 0x78, 0x41, 0x2c, 0x36, 0x40, 0xf5, 0x40, 0xb8, 0x1b, 0xb3, 0x18, 0x97, 0xd2, 0x64, 0x5e, 0xc7, 0x9d, 0x8e, 0x59, 0x75, 0x04, 0x8e, 0x45, 0x22, 0x61, 0xa1, 0xc2, 0x00, 0x9c, 0xfe, 0xee, 0x07, 0x15, 0xa0, 0x1b, 0xee, 0xfd, 0x75, 0xe7, 0x04, 0xb2, 0xa6, 0xf0, 0xf0, 0xae, 0x7e, 0xa3, 0x6c, 0x53, 0xcf, 0xe3, 0x6f, 0x57, 0xf0, 0x34, 0xe3, 0x85, 0x44, 0x8f, 0xca, 0xab, 0x08, 0xdc, 0xff, 0x47, 0x7d, 0x36, 0xff, 0x15 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 5.20", + /* Message to be signed */ + 2, + { 0x4c, 0x4b } +, + /* Signature */ + 128, + { 0x1c, 0xb6, 0x88, 0x12, 0x83, 0xdc, 0xd1, 0x86, 0x3b, 0xa7, 0x9d, 0xfb, 0x22, 0x35, 0x1b, 0xc9, 0xa8, 0xe0, 0x35, 0x8b, 0x2f, 0x8a, 0x1d, 0xe3, 0xf9, 0x06, 0x5d, 0x8c, 0xa8, 0x59, 0x31, 0x4a, 0xe1, 0x12, 0x13, 0xa2, 0xcc, 0x87, 0xb2, 0xf6, 0x32, 0xef, 0xa6, 0x7d, 0x21, 0x03, 0xf3, 0x82, 0x00, 0xb9, 0x19, 0x3e, 0xb8, 0xd4, 0x99, 0x82, 0x09, 0x9a, 0xfc, 0x74, 0x42, 0x8f, 0x4b, 0x41, 0x31, 0x6f, 0x48, 0x78, 0xb3, 0xf6, 0x00, 0xbc, 0x2f, 0xb3, 0x04, 0x58, 0xcc, 0x9c, 0x2a, 0x03, 0x4a, 0x06, 0x8e, 0x98, 0xd5, 0x7a, 0xe7, 0x9c, 0xe3, 0xe2, 0xfc, 0x84, 0xb6, 0xa7, 0x45, 0xf0, 0x37, 0xa5, 0xde, 0xa2, 0xb9, 0xda, 0x4e, 0x8d, 0xb4, 0xad, 0xa6, 0x9f, 0xb8, 0x2d, 0x20, 0xa4, 0x1b, 0xb8, 0x43, 0x07, 0x93, 0xee, 0xf9, 0x2a, 0x4f, 0xd6, 0x18, 0x6d, 0x17, 0x96, 0x63, 0xcb } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 6: A 1024-bit RSA key pair", +{ + /* Modulus */ + 128, + { 0xd6, 0x31, 0x14, 0x57, 0xe1, 0xca, 0xf1, 0x22, 0x44, 0x36, 0x69, 0x79, 0x83, 0xc8, 0x6d, 0xd3, 0x38, 0x20, 0x58, 0x62, 0xd2, 0xa1, 0x05, 0xba, 0xf7, 0x10, 0x34, 0x28, 0xfd, 0x83, 0x53, 0xa1, 0x9b, 0x7b, 0xa4, 0x22, 0x8f, 0x78, 0xb4, 0x7f, 0x79, 0x07, 0x35, 0x70, 0x34, 0xc5, 0x2d, 0x85, 0x97, 0xda, 0x2b, 0x5d, 0x13, 0xdc, 0x53, 0x5b, 0x83, 0x6c, 0x74, 0x13, 0x0a, 0x36, 0x48, 0x91, 0x8d, 0x4a, 0x7a, 0x83, 0x99, 0x0c, 0x2e, 0x28, 0x81, 0x6a, 0xec, 0x0f, 0xca, 0x01, 0xd1, 0x05, 0xc6, 0xc6, 0x52, 0xec, 0x57, 0x33, 0xd0, 0x1f, 0x00, 0x58, 0xb2, 0xdf, 0x5a, 0xe6, 0x73, 0x33, 0x40, 0x5a, 0x3a, 0x5b, 0x12, 0x20, 0xa2, 0x6a, 0xc3, 0xd1, 0x42, 0xf2, 0xb4, 0xd8, 0x37, 0xeb, 0x73, 0x86, 0xa4, 0x0a, 0x74, 0xcc, 0x3d, 0x1e, 0x4f, 0xbc, 0x64, 0xfd, 0x7d, 0xa6, 0x3c, 0x41 } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 127, + { 0x5e, 0xa6, 0x11, 0x77, 0x44, 0x2f, 0x89, 0x9e, 0xba, 0xc5, 0xd0, 0x96, 0x01, 0xc5, 0xef, 0xc2, 0x06, 0x6b, 0x44, 0xa3, 0x66, 0xb0, 0x00, 0xf8, 0x3d, 0x74, 0xcb, 0x97, 0xd1, 0x6e, 0xd6, 0xe5, 0xf2, 0xef, 0x0f, 0xf8, 0xb5, 0xad, 0x81, 0x15, 0x53, 0x45, 0xfc, 0x37, 0x39, 0x1a, 0x68, 0xa3, 0x40, 0x17, 0x08, 0x52, 0x79, 0x14, 0x43, 0x41, 0x8d, 0x31, 0xbf, 0x99, 0x2a, 0x4a, 0x12, 0x86, 0x6f, 0xe9, 0xff, 0xcc, 0xde, 0xbb, 0xbb, 0xa6, 0x37, 0xee, 0x88, 0x7b, 0x71, 0x6c, 0xaa, 0x92, 0xe2, 0x49, 0xce, 0xd6, 0x57, 0xee, 0xd7, 0x1f, 0x5c, 0xcd, 0xd9, 0x16, 0x3f, 0x32, 0x69, 0x52, 0x5d, 0x78, 0x9f, 0x4b, 0x33, 0xc4, 0x8a, 0x95, 0x76, 0x44, 0x36, 0xec, 0x32, 0x5e, 0x86, 0x89, 0x69, 0x1c, 0x27, 0x2d, 0x90, 0xbd, 0x88, 0x88, 0x98, 0x51, 0x37, 0x2f, 0xb8, 0xdc, 0xb9 } +, + /* Prime 1 */ + 64, + { 0xf3, 0xd4, 0xb8, 0x51, 0xad, 0x7a, 0xc7, 0x78, 0xbe, 0xcd, 0xdd, 0xae, 0x71, 0xb6, 0x13, 0xf6, 0x59, 0x7c, 0x70, 0x75, 0xc4, 0xd2, 0x8d, 0xdb, 0xae, 0x1e, 0xfa, 0xcf, 0x03, 0x59, 0x71, 0xab, 0x63, 0xee, 0x90, 0xdb, 0xbd, 0xfb, 0xda, 0x43, 0x25, 0xa1, 0x5f, 0xbf, 0x84, 0x5e, 0xea, 0x54, 0xbb, 0xcd, 0x05, 0x57, 0x4b, 0x1c, 0xd6, 0x01, 0xdc, 0xad, 0xba, 0x12, 0x06, 0x28, 0x05, 0xb9 } +, + /* Prime 2 */ + 64, + { 0xe0, 0xe1, 0xad, 0x57, 0xd6, 0x8f, 0x30, 0x13, 0x28, 0x8c, 0x14, 0x83, 0xe8, 0xc5, 0xb1, 0x2e, 0xfe, 0xb6, 0xec, 0x14, 0x5a, 0xe4, 0x18, 0x8e, 0x1b, 0x3b, 0x39, 0x04, 0x87, 0x90, 0x0a, 0xd2, 0xc3, 0x25, 0xd2, 0x32, 0x80, 0x6a, 0x62, 0x17, 0x34, 0x2a, 0x65, 0x75, 0x95, 0x14, 0xf2, 0x26, 0x8f, 0xca, 0x72, 0xc4, 0xc5, 0xbb, 0xa0, 0x32, 0x81, 0x89, 0xdc, 0xfa, 0xe2, 0x06, 0xae, 0xc9 } +, + /* Prime exponent 1 */ + 64, + { 0x3b, 0xb6, 0xd2, 0xd5, 0x1d, 0xf9, 0x3d, 0xb4, 0xb2, 0x75, 0xd4, 0x5e, 0x8e, 0x76, 0x9a, 0xf8, 0xef, 0xfd, 0x6b, 0xc5, 0x4b, 0xc8, 0x8c, 0xf9, 0x49, 0xf1, 0x48, 0x57, 0x3e, 0x68, 0xbf, 0x4f, 0xcc, 0x0f, 0x76, 0xe6, 0x79, 0xe6, 0x9e, 0x13, 0x67, 0xb9, 0xd7, 0xab, 0x1d, 0x8d, 0xe9, 0x31, 0x8b, 0x34, 0xb0, 0xa4, 0x2a, 0x3f, 0x0b, 0xa2, 0x35, 0x1b, 0x4e, 0xc0, 0x6f, 0x45, 0x89, 0xf1 } +, + /* Prime exponent 2 */ + 64, + { 0x71, 0xf4, 0xaa, 0x5c, 0x8a, 0x93, 0x80, 0xaf, 0x14, 0xaa, 0xf7, 0x72, 0x68, 0xb0, 0x55, 0x3b, 0x15, 0x44, 0x28, 0x99, 0x9f, 0xfd, 0x5a, 0x1c, 0x18, 0xdc, 0x87, 0xe6, 0x2d, 0xb3, 0xe6, 0x68, 0x2b, 0x0f, 0xad, 0x56, 0x7e, 0x10, 0x6a, 0xa8, 0x8b, 0x7c, 0xb8, 0x71, 0x3f, 0x1c, 0xa0, 0x20, 0xbe, 0x58, 0xbe, 0x93, 0xcc, 0x07, 0x6a, 0x04, 0x6d, 0xf4, 0x28, 0x90, 0xd1, 0x9c, 0xc5, 0x51 } +, + /* Coefficient */ + 64, + { 0x23, 0x1a, 0xb8, 0xdd, 0x9a, 0x56, 0x99, 0xd7, 0x97, 0x59, 0x11, 0xef, 0x0e, 0xf8, 0x7c, 0x28, 0xdd, 0xb9, 0x2e, 0x24, 0x6e, 0xc3, 0x4c, 0x5f, 0xac, 0x33, 0x83, 0x22, 0xdd, 0xec, 0x89, 0x8d, 0x56, 0x68, 0x67, 0x45, 0x3d, 0xe6, 0xd7, 0x8a, 0x45, 0xc3, 0x16, 0xb1, 0x45, 0xa2, 0x86, 0x18, 0x94, 0x0e, 0x1a, 0xcd, 0x11, 0x58, 0xc3, 0xaf, 0x92, 0xfa, 0xab, 0xfd, 0xc3, 0x97, 0x84, 0x32 } + +} +, +{{ + "PKCS#1 v1.5 Signature Example 6.1", + /* Message to be signed */ + 74, + { 0x8f, 0x75, 0x0e, 0x65, 0x95, 0x1b, 0x5d, 0xe7, 0x58, 0x14, 0xb0, 0xb7, 0x66, 0x30, 0xdc, 0x9f, 0x1c, 0x62, 0x53, 0xa0, 0x59, 0x0e, 0xac, 0xb5, 0x51, 0x2a, 0x8a, 0x4e, 0x1a, 0x8b, 0xe8, 0x52, 0x5d, 0x36, 0x94, 0x1f, 0xa9, 0xd0, 0x92, 0xf6, 0xbb, 0x44, 0x22, 0xaa, 0x8c, 0x0a, 0xd6, 0x42, 0x3e, 0xa2, 0x8c, 0x10, 0xca, 0xa6, 0xe9, 0x54, 0xb7, 0x95, 0x69, 0xd4, 0x4c, 0x86, 0x0f, 0x1c, 0x65, 0x81, 0xeb, 0x17, 0xa7, 0x54, 0x3e, 0x7b, 0xf7, 0xfe } +, + /* Signature */ + 128, + { 0xb1, 0x8b, 0x5e, 0xc8, 0x8d, 0x4e, 0x24, 0xc9, 0x14, 0xb6, 0x65, 0xff, 0x9a, 0x2c, 0x75, 0xf4, 0xe9, 0x19, 0x37, 0xdf, 0x8c, 0x19, 0x95, 0x59, 0x43, 0xe4, 0x51, 0xad, 0xdf, 0x34, 0x84, 0xe4, 0x97, 0x97, 0x8d, 0x26, 0xda, 0x23, 0x1a, 0xf1, 0x4d, 0x9c, 0x29, 0x27, 0xed, 0x21, 0x0a, 0xfb, 0xf9, 0xde, 0xe3, 0x32, 0x67, 0xaa, 0x45, 0x68, 0x46, 0x49, 0xe8, 0x6f, 0xb2, 0x25, 0xa0, 0x53, 0xb5, 0x45, 0x52, 0x90, 0xc3, 0x20, 0xe3, 0xf6, 0x40, 0x62, 0x3c, 0x75, 0xca, 0x42, 0x37, 0x21, 0xf2, 0x80, 0xb8, 0x87, 0x44, 0x24, 0x97, 0xf3, 0x2a, 0x90, 0xd7, 0x8f, 0x64, 0x44, 0x04, 0x77, 0xad, 0x09, 0x27, 0xc7, 0xba, 0x01, 0xc4, 0x4d, 0xa9, 0xd5, 0xc2, 0x83, 0xa4, 0x38, 0xbe, 0x0d, 0xc5, 0x80, 0xa0, 0x05, 0x28, 0xfc, 0x65, 0xe2, 0x04, 0xd4, 0x2a, 0x2d, 0x4e, 0x29, 0x13, 0xc1 } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Signature Example 6.2", + /* Message to be signed */ + 53, + { 0xbd, 0xbf, 0x3b, 0x36, 0x40, 0x73, 0xfe, 0x04, 0x8f, 0xba, 0xe5, 0x5e, 0x3c, 0xde, 0x66, 0x8e, 0x84, 0xf7, 0x53, 0xab, 0xfc, 0x71, 0x0b, 0x8c, 0xdb, 0x7b, 0x6c, 0x0c, 0xf8, 0x2d, 0xd5, 0xb6, 0x74, 0xd2, 0x1e, 0x2b, 0x3e, 0x36, 0xb1, 0xb0, 0x36, 0x0d, 0xf8, 0xbf, 0x7e, 0x62, 0x27, 0xc9, 0x2e, 0x15, 0xf3, 0xd7, 0x84 } +, + /* Signature */ + 128, + { 0x66, 0xac, 0xf0, 0x43, 0xbc, 0x6a, 0xae, 0x81, 0xa4, 0xd5, 0x2b, 0x4e, 0x8c, 0x40, 0x12, 0x8b, 0x25, 0xc6, 0xd1, 0x0a, 0x8c, 0x69, 0x8c, 0x83, 0xae, 0xd7, 0x1e, 0x8f, 0x35, 0x83, 0x89, 0x8b, 0xe8, 0xf4, 0xc9, 0xbe, 0xa4, 0xb6, 0x31, 0x90, 0xe2, 0x15, 0x26, 0xca, 0xf8, 0x3a, 0xb1, 0x4a, 0x4f, 0x8b, 0xeb, 0xe8, 0x13, 0xa5, 0xab, 0xeb, 0x95, 0x95, 0x67, 0xbb, 0x2f, 0x06, 0xc5, 0xf1, 0x1e, 0x46, 0x4b, 0x5c, 0xdf, 0x7b, 0x2a, 0x13, 0x2d, 0x42, 0x6d, 0xdb, 0xec, 0xf5, 0x85, 0x90, 0x0a, 0x0d, 0x80, 0x92, 0xca, 0x52, 0xb6, 0xdc, 0x0a, 0xbc, 0x35, 0xf1, 0x40, 0x94, 0x69, 0x89, 0x46, 0xe1, 0xcd, 0x0e, 0xcd, 0x6b, 0xd4, 0x1e, 0x2c, 0x6f, 0x96, 0x3e, 0xe8, 0x9c, 0x82, 0x19, 0x3e, 0xcc, 0x5f, 0xd4, 0x76, 0x30, 0xd3, 0x4a, 0xd1, 0x6c, 0xa2, 0x47, 0x9e, 0xaf, 0x06, 0x2d } + +} +, +{ + "PKCS#1 v1.5 Signature Example 6.3", + /* Message to be signed */ + 223, + { 0x3c, 0x5c, 0x74, 0xbc, 0x8f, 0xae, 0x80, 0x7a, 0xe5, 0x8b, 0xd2, 0x13, 0xe6, 0x27, 0x2a, 0xa3, 0x85, 0x79, 0x31, 0x57, 0x5c, 0x2a, 0xa2, 0xbe, 0x4b, 0xca, 0xe4, 0xd7, 0x9a, 0xe0, 0x87, 0xb6, 0xb8, 0x6f, 0x91, 0x5d, 0xf8, 0xc0, 0x96, 0xc1, 0x22, 0xed, 0xfb, 0xdc, 0x79, 0x7f, 0x9d, 0x70, 0xb9, 0x76, 0x13, 0x97, 0xfc, 0xe3, 0xd3, 0xe0, 0xb8, 0xa6, 0xf2, 0x56, 0xdb, 0xc6, 0x60, 0x5b, 0xa9, 0x48, 0xd5, 0xfb, 0xe6, 0xf5, 0x24, 0x5c, 0x02, 0x95, 0xce, 0x5d, 0xd7, 0x3b, 0xf7, 0x43, 0x65, 0x17, 0xf7, 0xc4, 0x22, 0x2d, 0x2c, 0xfd, 0x85, 0x42, 0xe7, 0xa1, 0x00, 0xcf, 0x05, 0x13, 0x04, 0xa1, 0xab, 0x6f, 0xe0, 0x05, 0xda, 0x07, 0x7b, 0x62, 0x87, 0x8f, 0xd0, 0xb7, 0x41, 0xe6, 0x27, 0x1e, 0x0d, 0x34, 0x6b, 0x20, 0x72, 0x3b, 0x7e, 0x00, 0xb3, 0xb8, 0x19, 0x4e, 0x1a, 0x46, 0x0c, 0x6b, 0xf2, 0x56, 0x00, 0x76, 0x82, 0x90, 0xc1, 0xdc, 0xaa, 0x2f, 0x41, 0xb9, 0x41, 0xa6, 0x4f, 0xd9, 0x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xe6, 0xc4, 0xc0, 0x30, 0x93, 0xc2, 0xaf, 0x0f, 0x07, 0x88, 0x8b, 0x8b, 0xbe, 0xfa, 0x79, 0x40, 0x03, 0x23, 0x13, 0x3f, 0x77, 0x6a, 0x32, 0x13 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 6.4", + /* Message to be signed */ + 61, + { 0x42, 0x56, 0x46, 0x65, 0x0d, 0x6b, 0x37, 0x9e, 0x16, 0xe1, 0x5b, 0xf3, 0x85, 0x3d, 0xdc, 0x9d, 0x44, 0x4f, 0x44, 0x53, 0x5c, 0x49, 0x3a, 0x37, 0x03, 0xb0, 0x01, 0x63, 0xaf, 0x34, 0x76, 0xdf, 0x37, 0x2a, 0x5b, 0x28, 0xf3, 0x34, 0xc0, 0x86, 0x03, 0x13, 0xe8, 0x13, 0x6d, 0xe6, 0x08, 0x29, 0x1b, 0x33, 0x78, 0x38, 0x1b, 0x9e, 0x21, 0xeb, 0xef, 0x24, 0x82, 0x5d, 0x12 } +, + /* Signature */ + 128, + { 0xa6, 0xa0, 0xcb, 0x02, 0x48, 0x1a, 0xf2, 0x48, 0xab, 0xae, 0x89, 0xcd, 0xf4, 0x16, 0x1f, 0x67, 0x76, 0xd4, 0x71, 0x08, 0xf1, 0x8e, 0xc6, 0xe8, 0x43, 0x7c, 0x22, 0x4a, 0x14, 0xf4, 0x52, 0xad, 0xa1, 0x36, 0x52, 0x0f, 0x0f, 0xe0, 0x10, 0xa7, 0x34, 0x5a, 0xf1, 0x97, 0x1a, 0x02, 0xe4, 0xbc, 0xf8, 0xc9, 0x8b, 0x26, 0xc5, 0xb8, 0xc6, 0x00, 0x3d, 0xe4, 0xd2, 0xb4, 0x07, 0x2d, 0x8d, 0xef, 0x1e, 0x19, 0x23, 0xd9, 0xcc, 0xe0, 0xa6, 0x75, 0x14, 0x1d, 0x37, 0x87, 0x3e, 0x59, 0x48, 0xea, 0x6c, 0x8a, 0x78, 0x0e, 0xd2, 0xa5, 0xec, 0xc2, 0xba, 0x9a, 0x81, 0x20, 0x6c, 0x7e, 0xcc, 0xc8, 0x0e, 0xac, 0x02, 0x6d, 0xb7, 0xd7, 0x60, 0x22, 0x3a, 0xa2, 0x38, 0x7a, 0x18, 0x2e, 0x98, 0xd6, 0x6f, 0x1e, 0x23, 0xdf, 0xea, 0xf3, 0x51, 0x5c, 0xee, 0x4f, 0xa1, 0xab, 0xd4, 0x64, 0xb7, 0x68 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 6.5", + /* Message to be signed */ + 85, + { 0xf4, 0x7d, 0x87, 0xbf, 0xd4, 0x88, 0xaf, 0x5b, 0x24, 0xdb, 0x34, 0xad, 0x0c, 0x13, 0x1e, 0xfc, 0xa1, 0x0c, 0xdd, 0x1a, 0xae, 0xff, 0xbe, 0x6e, 0x36, 0x48, 0x47, 0x22, 0xed, 0x68, 0x09, 0xb1, 0xd5, 0x7a, 0x18, 0x3b, 0xa0, 0x3d, 0x5e, 0x40, 0x5d, 0x12, 0x56, 0xb2, 0x50, 0x5e, 0xcb, 0x84, 0xdb, 0x35, 0xdf, 0xa9, 0x4d, 0xe8, 0x5d, 0xc2, 0xa1, 0x58, 0x8b, 0x6e, 0x83, 0x12, 0x4c, 0xf8, 0x6c, 0x5e, 0x91, 0x66, 0x86, 0x0d, 0x4d, 0xd4, 0x71, 0x70, 0x43, 0x2b, 0x08, 0xae, 0x6a, 0x6e, 0x30, 0x87, 0x10, 0x86, 0xfa } +, + /* Signature */ + 128, + { 0x6c, 0x00, 0x8f, 0xf0, 0xe1, 0x28, 0xfc, 0xec, 0x26, 0x5f, 0x37, 0x9e, 0xb0, 0x83, 0xdb, 0x50, 0x62, 0x4a, 0x27, 0x98, 0xf9, 0x33, 0x67, 0xc6, 0xd1, 0x6e, 0x5d, 0x95, 0xa9, 0x89, 0xf4, 0xf1, 0xee, 0xd0, 0xcc, 0x4c, 0xd8, 0x61, 0xc6, 0xa5, 0x24, 0xf2, 0xb9, 0xfa, 0x30, 0xe8, 0x86, 0xf1, 0x47, 0x77, 0x41, 0xd7, 0xea, 0x8a, 0x60, 0xdf, 0x14, 0x0a, 0xec, 0xf3, 0xa6, 0xcc, 0xf0, 0x04, 0x3d, 0xab, 0x92, 0xcb, 0xe7, 0x29, 0x53, 0xcb, 0x1c, 0x18, 0x41, 0xe0, 0x59, 0x18, 0xec, 0xed, 0x5b, 0x0f, 0x69, 0x4a, 0xf9, 0xa9, 0x8e, 0xc7, 0xf4, 0xe2, 0x28, 0x6d, 0x23, 0x3d, 0xfd, 0x35, 0x13, 0x2a, 0x0b, 0x58, 0x4b, 0xf0, 0xe0, 0xdc, 0xbf, 0x05, 0x11, 0x9c, 0xe2, 0xe3, 0xa4, 0xd8, 0x13, 0xcf, 0x02, 0x8f, 0xec, 0x48, 0xc3, 0x4a, 0x18, 0x81, 0xeb, 0xb5, 0x31, 0xca, 0x48, 0x9b } + +} +, +{ + "PKCS#1 v1.5 Signature Example 6.6", + /* Message to be signed */ + 6, + { 0x03, 0x18, 0x78, 0xd5, 0x88, 0xee } +, + /* Signature */ + 128, + { 0xcc, 0x15, 0x4e, 0x1a, 0xf7, 0x13, 0xf2, 0xf9, 0x5e, 0x16, 0xf4, 0x11, 0x17, 0x5d, 0x98, 0x36, 0xad, 0x6d, 0x8b, 0xbd, 0xc8, 0xf9, 0x8c, 0xf0, 0x5c, 0xfa, 0x00, 0x58, 0x23, 0x5d, 0x1f, 0xdd, 0xe0, 0x40, 0x82, 0x76, 0x4c, 0x29, 0xdc, 0xdc, 0xc5, 0x9e, 0xbe, 0x26, 0x57, 0x8b, 0xf9, 0xe8, 0xad, 0x6a, 0x5a, 0xa8, 0x6b, 0x9d, 0x62, 0x91, 0x4b, 0x4c, 0xf6, 0x96, 0xa8, 0xec, 0x2d, 0xa8, 0x79, 0xf8, 0xfa, 0x42, 0x31, 0x46, 0x31, 0x32, 0xea, 0xd7, 0xbb, 0x3b, 0xe7, 0x50, 0xae, 0x0c, 0x56, 0x28, 0xa3, 0x96, 0xb7, 0x0a, 0xdf, 0xa2, 0x7b, 0x40, 0x34, 0x23, 0xb1, 0x00, 0x18, 0xf9, 0xd2, 0x4f, 0xea, 0x33, 0x70, 0x30, 0x14, 0x7f, 0xbf, 0xaa, 0x15, 0xd4, 0x75, 0x32, 0xc9, 0x25, 0x7c, 0x2c, 0x7f, 0x54, 0x1b, 0x5b, 0x97, 0x4d, 0x15, 0xdd, 0x1e, 0x3f, 0xd2, 0xe2, 0x0a, 0x69 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 6.7", + /* Message to be signed */ + 136, + { 0x27, 0x26, 0x38, 0x52, 0xea, 0xa9, 0x60, 0xbf, 0x76, 0x71, 0x87, 0x6f, 0xc7, 0x90, 0x0f, 0x89, 0x8e, 0xa8, 0x2e, 0xb2, 0xb0, 0xfc, 0x41, 0x85, 0x65, 0xfd, 0xae, 0x62, 0xf7, 0xd9, 0xec, 0x4c, 0xe2, 0x21, 0x7b, 0x97, 0x99, 0x0d, 0xd2, 0x72, 0xdb, 0x15, 0x7f, 0x99, 0xf6, 0x3c, 0x0d, 0xcb, 0xb9, 0xfb, 0xac, 0xdb, 0xd4, 0xc4, 0xda, 0xdb, 0x6d, 0xf6, 0x77, 0x56, 0x35, 0x8c, 0xa4, 0x40, 0x11, 0x5d, 0x3e, 0x5b, 0x3d, 0xeb, 0x1b, 0xa1, 0xbd, 0x90, 0xca, 0x12, 0x86, 0xfd, 0x10, 0x0c, 0xaf, 0x9b, 0xe4, 0x85, 0xa4, 0x4a, 0x38, 0x45, 0x00, 0x57, 0x18, 0x10, 0x4b, 0xbd, 0xfc, 0x5e, 0x78, 0x1a, 0x9e, 0x37, 0xd6, 0x7a, 0xff, 0xe5, 0x56, 0xdc, 0xa1, 0x0f, 0x8e, 0xfa, 0x39, 0xf9, 0xcb, 0x63, 0x92, 0xa7, 0x2e, 0x3f, 0x28, 0x25, 0x81, 0x1a, 0x2c, 0x05, 0xaf, 0x84, 0xaf, 0x9b, 0xe7, 0xf3, 0x71, 0xdb, 0xd4, 0x10, 0x6d, 0x9f } +, + /* Signature */ + 128, + { 0x94, 0x79, 0x8d, 0x17, 0x94, 0x78, 0xbf, 0xe0, 0x6d, 0x96, 0xa3, 0x4a, 0xc9, 0x9b, 0xc9, 0xd5, 0xde, 0x35, 0xdc, 0x46, 0x97, 0xac, 0x3f, 0x70, 0xe9, 0xb3, 0x4c, 0x95, 0xe2, 0x2b, 0x1c, 0x30, 0xd1, 0x42, 0x6b, 0xe3, 0x50, 0x8e, 0x62, 0x2c, 0x1a, 0x18, 0xab, 0x3c, 0x46, 0x72, 0xfe, 0x3d, 0xe3, 0x40, 0xeb, 0x51, 0x0f, 0xb9, 0x87, 0xb5, 0x3a, 0xe9, 0x3a, 0x59, 0xaf, 0x6b, 0x00, 0xbb, 0xae, 0xe0, 0xe8, 0x27, 0x08, 0xe6, 0xc6, 0xae, 0x82, 0xc8, 0x45, 0x53, 0x24, 0x01, 0x78, 0x36, 0xdb, 0x17, 0x66, 0x0d, 0x06, 0x9d, 0x80, 0x27, 0x1e, 0x1e, 0xa9, 0x98, 0x11, 0x63, 0xb1, 0x4b, 0x66, 0x87, 0x6d, 0xfd, 0x12, 0x8f, 0x09, 0xcd, 0x2e, 0x3d, 0x6a, 0x36, 0xb7, 0x3c, 0x3b, 0x40, 0xad, 0x8e, 0x13, 0x24, 0x84, 0x90, 0x29, 0xc8, 0xb8, 0xe3, 0xc8, 0x89, 0x4e, 0xbf, 0xa1, 0x94 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 6.8", + /* Message to be signed */ + 200, + { 0xa4, 0xfb, 0x21, 0x03, 0xd0, 0xbe, 0x29, 0x0e, 0x99, 0x60, 0x16, 0xa4, 0x39, 0x46, 0x2e, 0x6b, 0xbd, 0xb0, 0x72, 0x4d, 0x86, 0xcd, 0x51, 0x85, 0x91, 0x33, 0xca, 0x3d, 0x39, 0xda, 0xb7, 0x7d, 0xa2, 0x06, 0x9d, 0x82, 0x83, 0x58, 0x96, 0x38, 0x7c, 0xc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x52, 0x73, 0xa8, 0x20, 0xa0, 0xc3, 0x0d, 0x39, 0x24, 0x46, 0x0f, 0xa5, 0xbc, 0x33, 0xdf, 0xe1, 0x9d, 0x72, 0xe5, 0x63, 0x49, 0x28, 0x2a, 0x80, 0xfb, 0x12, 0xa8, 0xfa, 0x9e, 0xa4, 0xa5, 0xda, 0x69, 0xc5, 0x82, 0xd7, 0xc6, 0x41, 0x22, 0xa8, 0xa7, 0x91, 0xb3, 0x21, 0x2c, 0x39, 0xe0, 0x28, 0x26, 0x5b, 0x84, 0x54, 0xdf, 0x71, 0x5b, 0xa3, 0x0b, 0x00, 0x3d, 0x12, 0x91, 0x69, 0xcf, 0x12, 0x51, 0x1c, 0x0d, 0x3e, 0x7a, 0xae, 0xce, 0xf3, 0x79, 0x2c, 0xf1, 0x85, 0x64, 0x4c, 0xf8, 0x0e, 0x44, 0x81, 0x47, 0xb1, 0xa7, 0x96, 0x1a, 0xf3, 0x84, 0x41, 0x7d, 0x18, 0x2c, 0x6f, 0x85, 0x52, 0x46, 0xda, 0xd5, 0xb8, 0x93, 0xd9, 0xa7, 0x68, 0x0e, 0xbc } + +} +, +{ + "PKCS#1 v1.5 Signature Example 6.9", + /* Message to be signed */ + 160, + { 0xe5, 0x50, 0x6e, 0x04, 0xb1, 0x91, 0x84, 0x10, 0x76, 0x85, 0x87, 0x25, 0xa9, 0xfd, 0xd8, 0xf9, 0x74, 0x5f, 0x24, 0x2e, 0x99, 0x49, 0x4a, 0x42, 0x3f, 0x80, 0x36, 0x74, 0x74, 0x27, 0x1d, 0xce, 0x95, 0xa9, 0x9a, 0x2f, 0x71, 0x13, 0x4f, 0x39, 0xfb, 0x3f, 0x2e, 0x47, 0xc6, 0xa0, 0xb2, 0xfb, 0x6f, 0x61, 0x5b, 0x0d, 0xee, 0x6d, 0xf3, 0x3b, 0x28, 0xf8, 0xb0, 0xd4, 0x1e, 0x92, 0xd1, 0x42, 0xb1, 0x46, 0xe8, 0xcd, 0xe9, 0xb1, 0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xb8, 0xc3, 0xc8, 0x76, 0x57, 0x22, 0x83, 0xef, 0x34, 0xd7, 0x0c, 0x64, 0x03, 0xef, 0x9e, 0x2e, 0x87, 0xa2, 0x76, 0xb2, 0x35, 0x72, 0xed, 0x82, 0xe2, 0x40, 0x22, 0x67, 0xc2, 0x73, 0x7f, 0x75, 0xbb, 0x4a, 0x27, 0xd3, 0xcf, 0x16, 0xd2 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 6.10", + /* Message to be signed */ + 166, + { 0x8f, 0xc9, 0xcf, 0xa7, 0x21, 0xdf, 0xa0, 0x9b, 0xa0, 0x72, 0x9e, 0xf9, 0x18, 0x9e, 0x54, 0x27, 0xb3, 0xe7, 0x38, 0xc5, 0xae, 0x38, 0xa2, 0x65, 0x7f, 0x7c, 0x7e, 0x31, 0x4a, 0x49, 0xca, 0xeb, 0xa0, 0xfc, 0x9d, 0x45, 0x40, 0xf5, 0xf8, 0xd6, 0xc0, 0x47, 0x53, 0x60, 0x0e, 0xf6, 0xb9, 0xc3, 0x39, 0x65, 0x40, 0xf8, 0x6c, 0x11, 0x75, 0xb6, 0x0b, 0xf4, 0x0e, 0x3d, 0x8c, 0x84, 0x51, 0x35, 0x5e, 0x13, 0x74, 0xf4, 0x30, 0x43, 0xc0, 0xc6, 0xaa, 0x41, 0xd3, 0x79, 0x6b, 0xd8, 0x27, 0x9b, 0x3c, 0x30, 0x62, 0xb3, 0x74, 0x99, 0x6b, 0x7e, 0xae, 0xdd, 0x4d, 0xb0, 0xae, 0xe8, 0xc9, 0x4b, 0x93, 0xb1, 0x71, 0xfc, 0x41, 0x1d, 0x4d, 0xfc, 0x37, 0x28, 0xd0, 0x23, 0x15, 0x58, 0xcf, 0xc8, 0xfa, 0x45, 0xf9, 0x51, 0xb3, 0x5c, 0x9d, 0x46, 0x12, 0x18, 0xa6, 0x50, 0xc7, 0x02, 0xce, 0xa9, 0x3b, 0xb3, 0xfa, 0x14, 0x36, 0xed, 0x44, 0x5c, 0x95, 0x24, 0x9d, 0xc2, 0x20, 0x54, 0x71, 0x01, 0xb9, 0xa9, 0x3e, 0xb0, 0x14, 0xcd, 0x84, 0x3f, 0xf3, 0x9c, 0xe4, 0xc9, 0x6f, 0x82, 0xa3, 0x9f, 0x86, 0x3a, 0x4c, 0x2e, 0x1f, 0xa9 } +, + /* Signature */ + 128, + { 0xa2, 0x6e, 0x7d, 0xbd, 0x5d, 0xfe, 0x08, 0xc7, 0x2b, 0xd8, 0x0d, 0x5e, 0x26, 0x68, 0xd5, 0xd7, 0x2a, 0xbb, 0x1a, 0x0c, 0x04, 0x20, 0xff, 0x0e, 0xa8, 0x6a, 0x9c, 0x76, 0x08, 0xc4, 0x70, 0xe1, 0xc3, 0xf7, 0x2e, 0xbf, 0x44, 0x5d, 0x12, 0x18, 0x71, 0x81, 0x41, 0x55, 0x58, 0xdd, 0x03, 0xeb, 0xe4, 0x07, 0xaa, 0x06, 0xb5, 0x16, 0x47, 0xba, 0xfe, 0x0c, 0x85, 0xf3, 0xd3, 0xb8, 0xdc, 0xe9, 0x0c, 0xeb, 0xf0, 0xa0, 0xee, 0xcb, 0xac, 0x12, 0x28, 0xe7, 0x85, 0x82, 0x0c, 0x4f, 0x90, 0x9d, 0x2e, 0xf3, 0x92, 0xf0, 0x31, 0x17, 0x56, 0x1e, 0xc3, 0x8e, 0xb0, 0xd8, 0x8b, 0x02, 0x32, 0x72, 0xa4, 0x28, 0x63, 0x51, 0x62, 0x0f, 0x21, 0x04, 0x3c, 0xca, 0xf7, 0x50, 0x36, 0x84, 0x00, 0x29, 0x57, 0xef, 0x79, 0xbc, 0xff, 0x9d, 0x1c, 0x20, 0x1c, 0x42, 0xe0, 0x96, 0x0b, 0xd9, 0x69, 0x79 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 6.11", + /* Message to be signed */ + 238, + { 0x96, 0x1f, 0xe3, 0x4a, 0x21, 0x2c, 0xb0, 0xe6, 0xf6, 0xdc, 0xde, 0xcf, 0x1a, 0x4c, 0x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, 0xac, 0xd9, 0x93, 0x7e, 0x47, 0x2b, 0x3e, 0xb6, 0xd4, 0xb7, 0x0a, 0x08, 0x0d, 0xe8, 0xe0, 0x35, 0x48, 0xf5, 0x12, 0x45, 0xbe, 0x7c, 0xe0, 0xb8, 0x6d, 0xee, 0xc1, 0x76, 0xe0, 0x0e, 0x54, 0xbd, 0x63, 0xbd, 0x5b, 0xb0, 0x2f, 0xc9, 0x54 } +, + /* Signature */ + 128, + { 0x98, 0xac, 0x47, 0x73, 0x59, 0x15, 0x9e, 0x93, 0xe1, 0xb3, 0x36, 0xee, 0x05, 0x60, 0x6d, 0x42, 0xb7, 0xe1, 0x25, 0x0d, 0x12, 0x95, 0x60, 0xc0, 0xd0, 0x95, 0xf8, 0xf8, 0xea, 0x3c, 0x04, 0x74, 0x32, 0xa9, 0x9c, 0x1e, 0xc4, 0xbc, 0x88, 0x7d, 0x7f, 0x07, 0xf6, 0x1d, 0xf1, 0x6f, 0x0c, 0x09, 0xf7, 0x15, 0xb7, 0x05, 0x38, 0x8b, 0xb8, 0xa6, 0x11, 0x87, 0x34, 0x6e, 0x8d, 0x7b, 0x07, 0xea, 0xb2, 0xfc, 0x05, 0xdb, 0x89, 0xe0, 0x30, 0x09, 0x44, 0xae, 0x37, 0x73, 0xe4, 0x4c, 0xb9, 0x2c, 0x5c, 0xf0, 0xf4, 0xfb, 0xe0, 0x1a, 0x05, 0xad, 0x79, 0xbf, 0xaa, 0x24, 0x7f, 0x83, 0xed, 0x1e, 0xda, 0x48, 0xba, 0xaf, 0xd1, 0xe1, 0x80, 0x07, 0x8c, 0xa8, 0xd3, 0x21, 0xd5, 0x0b, 0x42, 0x57, 0x87, 0xf0, 0x12, 0x43, 0xa4, 0x93, 0x37, 0x4e, 0x84, 0xf5, 0xcd, 0x56, 0xb7, 0x53, 0xd7, 0xac } + +} +, +{ + "PKCS#1 v1.5 Signature Example 6.12", + /* Message to be signed */ + 121, + { 0x96, 0xff, 0x0a, 0x5e, 0xca, 0xc9, 0x51, 0x16, 0xbd, 0x73, 0x43, 0x79, 0x5a, 0xf8, 0x3c, 0x87, 0xed, 0x9f, 0x83, 0x45, 0xd0, 0x3f, 0x6f, 0x32, 0x2f, 0x29, 0x54, 0x93, 0xf4, 0x0b, 0x19, 0xba, 0x8f, 0xfe, 0x2c, 0x89, 0x8c, 0x7b, 0x20, 0x66, 0x21, 0xf7, 0x2e, 0x02, 0xc7, 0xf0, 0xf0, 0x0f, 0x9f, 0x1c, 0x52, 0x3d, 0x73, 0xd3, 0x35, 0xa2, 0x6c, 0xed, 0xdc, 0x73, 0x98, 0xb7, 0xca, 0x20, 0x09, 0xca, 0xcb, 0xb1, 0x82, 0x83, 0xb7, 0x6b, 0x28, 0x15, 0xd1, 0xe9, 0x01, 0x00, 0x09, 0x6e, 0x95, 0xb8, 0x85, 0x30, 0xf1, 0xc4, 0x8c, 0x39, 0x61, 0xc4, 0x35, 0xbc, 0xe0, 0x28, 0x9f, 0xf6, 0x2e, 0x21, 0xbf, 0x4d, 0x3e, 0xc8, 0x99, 0xc8, 0x7e, 0x14, 0xc8, 0xea, 0xd7, 0x92, 0x2e, 0x79, 0x5e, 0x3e, 0x6f, 0x41, 0x80, 0xc0, 0x89, 0x9e, 0xa0 } +, + /* Signature */ + 128, + { 0x7c, 0x7b, 0x01, 0x57, 0xf6, 0xa5, 0x09, 0x09, 0x51, 0x09, 0x63, 0x28, 0x2f, 0x00, 0x11, 0x1e, 0xea, 0x70, 0x19, 0x37, 0x54, 0xe4, 0x27, 0xa0, 0x2b, 0x34, 0x6f, 0xeb, 0x68, 0x2f, 0x4c, 0x71, 0x87, 0xbb, 0x38, 0x1d, 0x31, 0xd2, 0x3b, 0x94, 0x76, 0x88, 0x43, 0x24, 0x5a, 0xad, 0x53, 0x61, 0xfc, 0xa4, 0x2d, 0x8b, 0x28, 0x4c, 0x8d, 0x92, 0xe6, 0xfb, 0x99, 0x2f, 0xa7, 0x71, 0x2f, 0xa5, 0xa9, 0x31, 0x55, 0xdf, 0x02, 0x0d, 0x30, 0x0a, 0x3b, 0xf8, 0x98, 0x86, 0x66, 0x8c, 0xf3, 0x7b, 0xd1, 0x3b, 0x55, 0x0a, 0xdb, 0x2d, 0x2a, 0x86, 0xc6, 0x9d, 0xaa, 0xac, 0xdc, 0x50, 0x30, 0xdc, 0x84, 0x34, 0x3c, 0x8b, 0x49, 0x34, 0xf0, 0x3c, 0xdc, 0x0e, 0xef, 0x0f, 0x6c, 0x1e, 0xa7, 0xec, 0x09, 0x62, 0x00, 0x79, 0x03, 0xb4, 0x48, 0x21, 0x7d, 0xe9, 0x3b, 0x75, 0x07, 0x54, 0x9b, 0x2e } + +} +, +{ + "PKCS#1 v1.5 Signature Example 6.13", + /* Message to be signed */ + 79, + { 0x32, 0xa1, 0x2e, 0x0c, 0x67, 0x0e, 0xd2, 0x15, 0xae, 0x54, 0x49, 0xa0, 0x91, 0x7a, 0xe9, 0x5e, 0x23, 0xdb, 0x80, 0x3a, 0xd2, 0x8a, 0x18, 0x42, 0xed, 0xfa, 0x90, 0xbc, 0x40, 0x5d, 0xd8, 0x9a, 0x1b, 0x46, 0x8a, 0xce, 0xbd, 0x08, 0xfe, 0x9c, 0x69, 0x3d, 0x8f, 0xb1, 0x05, 0xe8, 0x22, 0x2e, 0xb5, 0x7f, 0x79, 0xe4, 0xb2, 0x27, 0x00, 0xe0, 0x7f, 0x27, 0x6d, 0x4a, 0xec, 0xc7, 0xa1, 0x5f, 0xb7, 0x47, 0x33, 0x06, 0x56, 0x27, 0xb8, 0x79, 0xb0, 0x16, 0xee, 0xd4, 0xab, 0x4a, 0x1c } +, + /* Signature */ + 128, + { 0x85, 0xb9, 0x0e, 0xb8, 0x26, 0x51, 0x4a, 0x0e, 0xc0, 0xfc, 0x1b, 0xdc, 0x34, 0x86, 0xa8, 0xdc, 0x8b, 0x0f, 0x26, 0x3e, 0xfe, 0x57, 0xcf, 0x17, 0x50, 0xa4, 0x2a, 0x6b, 0x5b, 0x99, 0x72, 0x64, 0xfa, 0x61, 0x78, 0x64, 0x83, 0x7e, 0x63, 0x9f, 0x45, 0xd9, 0x20, 0x58, 0x41, 0xcd, 0xc1, 0x34, 0xab, 0xea, 0xcf, 0x6e, 0xe0, 0xec, 0xda, 0x09, 0xb9, 0x8d, 0x76, 0x9f, 0x51, 0xf3, 0x94, 0x7a, 0x33, 0x58, 0x7f, 0xf0, 0xc8, 0xdd, 0x01, 0xb7, 0xf6, 0xb2, 0x4a, 0x2f, 0xbf, 0x29, 0xc9, 0xff, 0xf7, 0x37, 0xee, 0xe5, 0x6a, 0xda, 0x2c, 0xeb, 0x74, 0x6b, 0x02, 0x5d, 0x95, 0x65, 0x22, 0xd9, 0x20, 0xd1, 0x2d, 0xdd, 0x13, 0xdb, 0xa0, 0x8b, 0x20, 0xe1, 0xee, 0xe1, 0x3a, 0x8b, 0x25, 0x80, 0xe5, 0x92, 0xc3, 0x4e, 0x39, 0x33, 0x37, 0x66, 0x11, 0x5a, 0x23, 0xb9, 0xd0, 0x0e, 0x2a, 0x42 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 6.14", + /* Message to be signed */ + 78, + { 0xbb, 0xda, 0x73, 0xcb, 0xe2, 0xbf, 0xf7, 0xff, 0x53, 0x62, 0xeb, 0xe9, 0x32, 0xc0, 0xa0, 0xdd, 0x68, 0xac, 0x84, 0xee, 0x99, 0x8f, 0xbf, 0x59, 0xa2, 0xa9, 0x26, 0x55, 0x20, 0x32, 0x31, 0x63, 0xb3, 0x0d, 0x9e, 0x70, 0x08, 0xb9, 0x4b, 0x0c, 0x0e, 0xbc, 0x5f, 0x6c, 0x4c, 0x97, 0x3c, 0x13, 0xff, 0x15, 0x3d, 0x31, 0x69, 0x0c, 0x3c, 0x95, 0xab, 0x23, 0x1f, 0x0c, 0x9e, 0xc9, 0x98, 0xfb, 0xfc, 0xad, 0xc2, 0x8b, 0x2d, 0x7f, 0x06, 0x50, 0x7e, 0x17, 0xd2, 0x1e, 0x82, 0xda } +, + /* Signature */ + 128, + { 0x26, 0xf9, 0x52, 0xb6, 0x57, 0xfd, 0xb9, 0xa1, 0x1d, 0xc8, 0x43, 0x79, 0x0c, 0x9d, 0x2a, 0x6a, 0x51, 0xc9, 0x76, 0x10, 0x1e, 0xfb, 0x82, 0xd0, 0x53, 0x60, 0x67, 0x62, 0xab, 0xa3, 0x3a, 0xf6, 0x28, 0x0b, 0xde, 0x38, 0x15, 0xe0, 0x87, 0x4d, 0x60, 0x78, 0x75, 0x38, 0x42, 0xe5, 0xb1, 0xc9, 0x0c, 0xf7, 0x99, 0x12, 0x20, 0xfc, 0xfa, 0x62, 0x28, 0x49, 0x43, 0x69, 0x0c, 0x30, 0x1e, 0x9f, 0xc6, 0xe4, 0x79, 0xaf, 0x68, 0xb9, 0x69, 0x47, 0x85, 0xbe, 0x40, 0xd4, 0x69, 0x86, 0xa6, 0x2a, 0x12, 0x1a, 0xa9, 0xad, 0x0d, 0xe9, 0x69, 0x52, 0x1f, 0x1c, 0xb8, 0xe7, 0xc4, 0xbd, 0x70, 0xc7, 0xc8, 0xcd, 0x7a, 0x9d, 0x13, 0x54, 0xe7, 0xd0, 0xaa, 0x0d, 0x85, 0xd6, 0xd7, 0xaa, 0x00, 0xe4, 0x64, 0x90, 0x26, 0xd6, 0xf0, 0x70, 0xf8, 0xb3, 0xc2, 0x7c, 0x98, 0x55, 0x6b, 0xea, 0xa4, 0xc0 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 6.15", + /* Message to be signed */ + 150, + { 0x2c, 0x32, 0x5d, 0xda, 0xf6, 0x52, 0x6a, 0x1e, 0xa3, 0x51, 0x8e, 0xe5, 0xe5, 0x40, 0x7f, 0x03, 0x90, 0xe0, 0xeb, 0xaa, 0xa5, 0xf4, 0x72, 0xa1, 0xe9, 0xab, 0x46, 0xf7, 0x46, 0xd7, 0x1b, 0xa2, 0xe2, 0x17, 0xfa, 0xa8, 0x17, 0x99, 0xbf, 0x35, 0x8f, 0x95, 0xe9, 0x83, 0x08, 0x27, 0x0b, 0x18, 0xa0, 0x01, 0x99, 0x29, 0xa2, 0x88, 0xd0, 0xc9, 0x56, 0xe0, 0xbf, 0x17, 0xc5, 0x19, 0x8c, 0xeb, 0x2c, 0xd9, 0xfe, 0x40, 0xd7, 0x02, 0xa4, 0x4e, 0x56, 0x45, 0xec, 0xa5, 0xb4, 0x39, 0xab, 0xca, 0x7b, 0x2c, 0x6f, 0x95, 0xac, 0xc3, 0xc2, 0xc3, 0x65, 0x19, 0x5c, 0x79, 0x5e, 0x91, 0xd6, 0x3b, 0x3c, 0x09, 0x33, 0x24, 0x4f, 0xf1, 0x25, 0x63, 0xaf, 0x66, 0x22, 0xa4, 0x0c, 0x74, 0x15, 0xdb, 0x60, 0xa7, 0x8d, 0xca, 0x02, 0x60, 0x25, 0x14, 0x39, 0x53, 0x8d, 0x38, 0xaa, 0x38, 0x28, 0x9d, 0x92, 0x88, 0x86, 0xab, 0x12, 0x87, 0x36, 0xa6, 0xa8, 0x73, 0x9c, 0x14, 0x55, 0xc4, 0x84, 0x9f, 0x2d, 0x54, 0x56, 0x45, 0x37, 0x93 } +, + /* Signature */ + 128, + { 0x6d, 0x1f, 0x20, 0x3d, 0xc3, 0xff, 0xa7, 0xa3, 0x34, 0xd3, 0x1b, 0x9a, 0x75, 0xe0, 0x12, 0x58, 0x1b, 0x8d, 0x62, 0xb2, 0xbf, 0x73, 0x80, 0x0b, 0xe5, 0x1d, 0x02, 0x65, 0x33, 0x99, 0x83, 0x18, 0xc0, 0xca, 0xc9, 0x2a, 0x02, 0xd4, 0x6d, 0x75, 0x9b, 0xf8, 0x0a, 0x41, 0xda, 0xa0, 0xa6, 0xa2, 0x9f, 0x4f, 0xa0, 0xbb, 0x60, 0x66, 0x4c, 0xac, 0xad, 0xe2, 0x4a, 0x65, 0xcb, 0x47, 0x65, 0x11, 0x09, 0xbe, 0xec, 0x82, 0x31, 0x91, 0x95, 0x25, 0xd1, 0x47, 0x32, 0x68, 0x74, 0x55, 0x78, 0xdb, 0x9e, 0x30, 0x64, 0x10, 0x8a, 0xe4, 0x6a, 0x48, 0x70, 0xf1, 0x80, 0x66, 0x78, 0x9b, 0x03, 0x66, 0xa7, 0xd0, 0xce, 0x37, 0xe0, 0x30, 0xb5, 0x89, 0x46, 0xec, 0x8c, 0x1a, 0x14, 0x11, 0x54, 0xdb, 0x0e, 0x26, 0x1b, 0xef, 0x8b, 0xaf, 0x2e, 0x9f, 0x65, 0xfc, 0xd1, 0x6b, 0x7d, 0x57, 0x97, 0xb6 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 6.16", + /* Message to be signed */ + 25, + { 0x29, 0x85, 0xe8, 0xb5, 0x50, 0x81, 0x2f, 0xb6, 0x6c, 0x18, 0xf8, 0x0e, 0x6f, 0x09, 0x2a, 0x94, 0x5d, 0x09, 0x15, 0x83, 0x86, 0x1b, 0x62, 0x5d, 0x1e } +, + /* Signature */ + 128, + { 0x2e, 0x84, 0x30, 0x13, 0xcd, 0x5e, 0x79, 0x5e, 0x21, 0x66, 0xc8, 0xe9, 0x1b, 0x06, 0xc3, 0x13, 0x1d, 0xc3, 0xa5, 0xe1, 0x21, 0x36, 0xd7, 0x16, 0x0f, 0xfd, 0x11, 0xbb, 0xef, 0xcf, 0x6a, 0xb6, 0x40, 0xe0, 0x5d, 0x76, 0xe0, 0xc6, 0x1e, 0xd3, 0x06, 0xf6, 0x08, 0x6b, 0xbb, 0x56, 0x7c, 0xa8, 0x7e, 0x40, 0xc6, 0x92, 0x4d, 0x5c, 0x84, 0xa6, 0xce, 0x28, 0xa8, 0x39, 0x50, 0xbd, 0x4b, 0x84, 0xe2, 0x7f, 0xc5, 0x06, 0x9f, 0xd0, 0x62, 0x4d, 0x50, 0xea, 0xc2, 0x4a, 0x94, 0x11, 0xb5, 0xf7, 0x67, 0x85, 0xd9, 0xdb, 0x5d, 0xa3, 0x0f, 0x42, 0x56, 0x95, 0xb0, 0x19, 0xb8, 0x4c, 0xdb, 0xb8, 0x25, 0xbd, 0x46, 0xe7, 0x35, 0x2e, 0x08, 0xf1, 0x14, 0xc8, 0x7b, 0x06, 0x6f, 0xe4, 0x3d, 0x10, 0x56, 0xa2, 0xc6, 0x10, 0xce, 0xa7, 0xe3, 0xd3, 0xdc, 0x98, 0xbf, 0x44, 0x97, 0xeb, 0x4f, 0x13 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 6.17", + /* Message to be signed */ + 146, + { 0x77, 0x78, 0x8e, 0x83, 0x8b, 0x83, 0x4e, 0x8f, 0x4d, 0x04, 0x5a, 0xa8, 0x94, 0xb9, 0x0a, 0xbb, 0x85, 0x94, 0x0c, 0xfc, 0x58, 0xd7, 0x72, 0x5e, 0x7f, 0x37, 0x3d, 0xa5, 0x54, 0x71, 0x37, 0xc6, 0x0b, 0xea, 0x75, 0x1e, 0x01, 0x42, 0xbf, 0x9a, 0x6f, 0x46, 0x49, 0xae, 0xb5, 0x46, 0xed, 0x56, 0x0c, 0xc4, 0xea, 0x15, 0x62, 0xd4, 0xa5, 0xfa, 0x3e, 0xb1, 0xb1, 0x14, 0x77, 0xa3, 0x05, 0x1e, 0x24, 0xc6, 0x06, 0xb8, 0xa7, 0x1c, 0x1a, 0x77, 0x4b, 0xdc, 0xf1, 0xa5, 0x31, 0x0f, 0xed, 0x55, 0x59, 0x23, 0x73, 0x0f, 0xa8, 0xaf, 0x4c, 0x15, 0x80, 0x0d, 0x36, 0x2b, 0x37, 0xad, 0xf1, 0x4f, 0x7a, 0xfc, 0xe7, 0x8e, 0xfa, 0x6b, 0xd8, 0x93, 0x56, 0x3e, 0xfe, 0x0b, 0x3b, 0x82, 0x8e, 0xbd, 0x49, 0x9f, 0x12, 0xa2, 0xfe, 0x33, 0x2b, 0xfe, 0x46, 0xdc, 0xbb, 0x31, 0x4b, 0xbd, 0xbf, 0x69, 0x08, 0x7e, 0x2a, 0x66, 0x5d, 0xf1, 0x10, 0x83, 0x5d, 0xe5, 0x5d, 0x61, 0xe5, 0xc2, 0x02, 0x5f, 0xd8, 0xdb } +, + /* Signature */ + 128, + { 0x8e, 0x5f, 0x33, 0x53, 0xc4, 0x9c, 0xbb, 0xb2, 0xea, 0x69, 0x6a, 0xbb, 0x57, 0x40, 0xba, 0xe0, 0x15, 0xef, 0xfd, 0x95, 0x0d, 0x56, 0x07, 0x13, 0x76, 0x05, 0xa1, 0x00, 0xc4, 0xa5, 0x3f, 0x1b, 0x95, 0x17, 0x6c, 0xaf, 0x34, 0x9f, 0x4f, 0xd5, 0x88, 0xae, 0xdd, 0xdc, 0xf5, 0x06, 0x0c, 0xcb, 0x72, 0x47, 0x8c, 0xfb, 0x09, 0x85, 0x62, 0xf3, 0x4d, 0x8f, 0x8e, 0xba, 0x44, 0x6a, 0x38, 0x47, 0x56, 0x5a, 0x7b, 0x89, 0x55, 0xad, 0x9e, 0x0c, 0x6e, 0xb6, 0x70, 0x99, 0xe1, 0xa4, 0x6c, 0x3e, 0xb2, 0xd4, 0x9d, 0x90, 0x90, 0xae, 0x5f, 0x63, 0xe8, 0xa0, 0x8b, 0x6e, 0x8f, 0x21, 0xf0, 0x03, 0xe4, 0x51, 0xd2, 0x50, 0xff, 0xc5, 0xa7, 0x90, 0xd6, 0x6a, 0x0e, 0x2e, 0x3e, 0x28, 0xa6, 0x33, 0x9f, 0xe9, 0x1d, 0x11, 0x29, 0x21, 0xf5, 0x5d, 0x12, 0x30, 0x30, 0x6f, 0xad, 0x5c, 0x01, 0x90 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 6.18", + /* Message to be signed */ + 62, + { 0x1d, 0x59, 0x9d, 0x76, 0x2c, 0xd5, 0x4d, 0xf7, 0x0f, 0x1a, 0x09, 0x83, 0xbc, 0x3e, 0xa2, 0xbb, 0xca, 0x6f, 0xcb, 0xbd, 0x16, 0x26, 0x03, 0xba, 0x81, 0x56, 0x10, 0x77, 0xfd, 0x92, 0x84, 0x92, 0x5c, 0xf1, 0xf1, 0xb0, 0x8b, 0xea, 0x1e, 0x70, 0xbc, 0x59, 0x5d, 0xf0, 0xb3, 0x43, 0xb8, 0x3b, 0x9c, 0xf3, 0xd6, 0x34, 0xf9, 0x5e, 0x37, 0xe8, 0xd1, 0xc5, 0x85, 0xfa, 0xb1, 0x99 } +, + /* Signature */ + 128, + { 0x71, 0x74, 0x97, 0xa4, 0xe6, 0x0d, 0xbf, 0xfa, 0x19, 0x6e, 0xff, 0x75, 0x8e, 0x90, 0x1c, 0xe1, 0xfe, 0x6e, 0x2b, 0xc7, 0xe1, 0xd5, 0x3a, 0x3d, 0xcf, 0x62, 0x25, 0x67, 0x1a, 0xf1, 0x46, 0xc5, 0xde, 0xe2, 0x00, 0xa8, 0x14, 0xf4, 0x89, 0x8d, 0x16, 0xa9, 0xb5, 0xf5, 0x08, 0xdc, 0x9f, 0xde, 0x4d, 0x64, 0x07, 0x0e, 0x55, 0xae, 0x3b, 0x1f, 0xdf, 0x79, 0x19, 0xf4, 0x2b, 0x7c, 0xff, 0xb7, 0xe9, 0x28, 0xc4, 0xca, 0xeb, 0x55, 0x2d, 0xc6, 0xfd, 0x08, 0x18, 0x34, 0xb2, 0xdc, 0x2f, 0xed, 0x07, 0xe7, 0xe6, 0x27, 0xd3, 0x4b, 0x39, 0x10, 0xca, 0x71, 0x3b, 0xf4, 0x15, 0x4e, 0xff, 0x99, 0x96, 0x57, 0x36, 0x15, 0x18, 0xfc, 0xe5, 0xa8, 0xf6, 0x42, 0xdc, 0x9a, 0x18, 0xa6, 0x6e, 0xde, 0x22, 0x19, 0x0f, 0x60, 0xaa, 0xf9, 0x58, 0xd6, 0x24, 0x6b, 0x00, 0xa0, 0x32, 0xc3, 0x98, 0x41 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 6.19", + /* Message to be signed */ + 169, + { 0xda, 0x51, 0x00, 0x86, 0x60, 0xb6, 0x3b, 0x87, 0x67, 0xe6, 0x5f, 0x12, 0xc6, 0x30, 0x8e, 0xc1, 0x8e, 0xd9, 0x57, 0x5a, 0x42, 0x6b, 0xc5, 0xfb, 0xe6, 0x60, 0x10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 0xf7, 0x35, 0xee, 0x24, 0xa1, 0xf6, 0x40, 0xa1, 0x89, 0x8d, 0x40, 0x9e, 0xb5, 0x3a, 0xbd, 0xb6, 0x93, 0x94, 0x27, 0x34, 0x56, 0x9a, 0xf7, 0x1a, 0x4c, 0xd9, 0x9a, 0x65, 0x20, 0xba, 0xca, 0x5d, 0x42, 0x86, 0xb1, 0x99, 0xcc, 0x67, 0x62, 0x8e, 0x2f, 0xca, 0xd2, 0x96, 0xa3, 0x0e, 0xca, 0x49, 0x9e, 0xb8, 0x80, 0x50, 0x7f, 0x6a, 0x37, 0x44, 0x0b, 0x61, 0xc1, 0x28, 0x4c, 0x40, 0x3c, 0x41, 0x32, 0x1b, 0x99, 0x05, 0x3f, 0x5d, 0x69, 0x72, 0x8d, 0x5b, 0x97, 0x35, 0x76, 0xcf, 0x04, 0x74, 0x83, 0x33, 0xd8, 0x08, 0xd5, 0xe6, 0x8a, 0x8f } + +} +, +{ + "PKCS#1 v1.5 Signature Example 6.20", + /* Message to be signed */ + 50, + { 0x8c, 0xd2, 0xda, 0xd2, 0xa5, 0xd5, 0xf9, 0xfa, 0xa0, 0x7e, 0x24, 0xa9, 0x6e, 0x86, 0xf9, 0xb0, 0xac, 0x8b, 0x40, 0x22, 0x2a, 0xc9, 0xfb, 0x8a, 0x8a, 0x15, 0x72, 0x7c, 0xf2, 0xf5, 0x3e, 0x68, 0x4a, 0xf4, 0xab, 0xdc, 0x98, 0x68, 0xa7, 0x25, 0x3b, 0x25, 0xb0, 0x96, 0xbd, 0x70, 0x1f, 0x46, 0xa9, 0x43 } +, + /* Signature */ + 128, + { 0x8f, 0x03, 0x22, 0xeb, 0x2c, 0x54, 0x05, 0x24, 0x85, 0xa6, 0x45, 0x49, 0xad, 0xff, 0x2a, 0x36, 0x31, 0xdb, 0x65, 0x76, 0xfc, 0x0c, 0xaf, 0xb5, 0x51, 0x69, 0x7d, 0xc5, 0x35, 0x6f, 0x02, 0xe0, 0x93, 0xcb, 0x69, 0x17, 0x3a, 0x7e, 0x83, 0x55, 0xa0, 0xda, 0xde, 0xbf, 0xa5, 0x3c, 0xb2, 0x90, 0x7f, 0x00, 0x2d, 0xb3, 0xa3, 0xe3, 0x87, 0xda, 0x05, 0x7b, 0x7c, 0x73, 0x55, 0x16, 0x43, 0x84, 0x3e, 0xf5, 0x74, 0x48, 0x1f, 0x80, 0x74, 0x15, 0x17, 0x7e, 0x4b, 0x34, 0xc2, 0x5b, 0xd5, 0x5f, 0x4c, 0x02, 0xfa, 0x0a, 0xde, 0xa3, 0xa9, 0x58, 0x04, 0x65, 0xf3, 0x58, 0xc0, 0x05, 0x96, 0xb5, 0xcc, 0x06, 0x2d, 0x58, 0x92, 0x30, 0x3e, 0x1a, 0xcc, 0x11, 0x3c, 0x3b, 0x4b, 0xc7, 0x4d, 0x42, 0xe8, 0x58, 0x02, 0x90, 0x78, 0x48, 0x2a, 0x1b, 0x23, 0x4a, 0x62, 0x5b, 0x04, 0x28, 0x44, 0x06 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 7: A 1025-bit RSA key pair", +{ + /* Modulus */ + 129, + { 0x01, 0x69, 0x34, 0xcd, 0xff, 0x48, 0x50, 0xb6, 0x00, 0x2c, 0xc0, 0xf0, 0xf4, 0x01, 0x0a, 0x32, 0xc6, 0x55, 0xe5, 0xcf, 0x6e, 0x7c, 0x89, 0x93, 0x7f, 0xd7, 0x55, 0xef, 0x6a, 0xbe, 0x37, 0x9d, 0xad, 0xde, 0x70, 0xcc, 0x21, 0x77, 0x51, 0xf1, 0x4c, 0xba, 0x6d, 0x90, 0xfe, 0x52, 0xdc, 0x0a, 0xf5, 0x8b, 0x25, 0x2f, 0x26, 0xbf, 0x72, 0xda, 0x57, 0x9f, 0xda, 0xf5, 0x7d, 0xdd, 0x6c, 0xd6, 0x02, 0x18, 0x79, 0x94, 0x9a, 0x02, 0x76, 0xb4, 0x43, 0x3f, 0xf0, 0x1e, 0xfc, 0xcc, 0xf3, 0x5a, 0x11, 0xe7, 0xc7, 0x7b, 0x38, 0xc1, 0x8c, 0xca, 0x94, 0xae, 0x01, 0x2d, 0x0f, 0x37, 0x04, 0x21, 0x49, 0x1c, 0x52, 0xad, 0x15, 0xac, 0x76, 0xb1, 0x2e, 0xcd, 0x21, 0x8f, 0x52, 0xe7, 0x57, 0x86, 0x6e, 0x08, 0x9d, 0xd8, 0xad, 0xbb, 0x48, 0xe9, 0xba, 0x89, 0x43, 0x36, 0xc5, 0x75, 0xc4, 0x06, 0x55 } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 128, + { 0x0d, 0x17, 0x19, 0xe5, 0xbd, 0x47, 0x6d, 0x87, 0xc7, 0xec, 0xc3, 0x1e, 0xb8, 0xab, 0x42, 0x5d, 0x4f, 0xe4, 0xc8, 0xf5, 0xc7, 0xae, 0x23, 0x0a, 0x10, 0x47, 0x55, 0x3f, 0xfb, 0x53, 0x9f, 0xd3, 0x85, 0x5a, 0xf5, 0xa4, 0x3b, 0x2d, 0xdd, 0x4e, 0x95, 0xa2, 0xb3, 0x0d, 0x40, 0x7a, 0xa8, 0x81, 0x59, 0xbb, 0xad, 0x2a, 0x87, 0x3d, 0x80, 0x93, 0xb4, 0x8a, 0x4b, 0xce, 0x20, 0xad, 0x99, 0x26, 0x25, 0x3e, 0xd3, 0x39, 0xac, 0x3b, 0x54, 0x3f, 0xc7, 0x42, 0x96, 0x95, 0x33, 0x8d, 0xb0, 0xbc, 0x1d, 0xc3, 0x68, 0x6c, 0xfd, 0x13, 0x9b, 0xb5, 0xb2, 0x87, 0x36, 0xbc, 0x16, 0x60, 0xa9, 0x53, 0x48, 0xfc, 0x91, 0xc3, 0x25, 0xd0, 0x3a, 0x7f, 0xb2, 0x16, 0xd2, 0xd9, 0xcd, 0x93, 0x64, 0xde, 0x4e, 0xe7, 0xd2, 0x11, 0x9c, 0x3b, 0x0f, 0xbb, 0xa8, 0xa7, 0x1f, 0x0d, 0x3f, 0x5a, 0xb9, 0xb9 } +, + /* Prime 1 */ + 65, + { 0x01, 0x58, 0xc0, 0x24, 0x6c, 0xd1, 0x69, 0xfc, 0x59, 0x3b, 0x25, 0x8b, 0xbf, 0x45, 0x23, 0xab, 0x2b, 0x55, 0xc4, 0x60, 0x73, 0x3a, 0x7f, 0xb4, 0x69, 0x10, 0x90, 0x77, 0xb3, 0x0e, 0x4d, 0x35, 0xf2, 0x1a, 0x35, 0xb1, 0xf4, 0x1e, 0x42, 0x04, 0xe8, 0x1d, 0x2e, 0x4c, 0x46, 0x3c, 0x24, 0x11, 0x39, 0x34, 0x09, 0x8b, 0x45, 0x2d, 0xab, 0x4b, 0xe1, 0x59, 0x97, 0x20, 0xef, 0x68, 0x72, 0x83, 0x3d } +, + /* Prime 2 */ + 65, + { 0x01, 0x0c, 0x38, 0x2d, 0xea, 0x5e, 0x7d, 0x79, 0x29, 0x8c, 0x64, 0x1f, 0xb2, 0xe4, 0xfa, 0x09, 0xf2, 0x4f, 0x6a, 0x7a, 0x45, 0x9a, 0x88, 0x2c, 0x87, 0xa8, 0x03, 0x49, 0x5f, 0x05, 0x6e, 0xcc, 0x3b, 0x43, 0xc5, 0x37, 0x73, 0x1f, 0x85, 0xef, 0xc8, 0xfb, 0x53, 0x87, 0xad, 0x67, 0x31, 0xa6, 0x43, 0x53, 0x32, 0x15, 0xde, 0xcc, 0x38, 0x7d, 0x96, 0x76, 0x12, 0x2c, 0x17, 0x0e, 0x91, 0xe0, 0xf9 } +, + /* Prime exponent 1 */ + 64, + { 0xd5, 0x78, 0xdc, 0xd5, 0x38, 0xf2, 0xfc, 0xdc, 0x30, 0x00, 0xb6, 0xc0, 0xf0, 0x49, 0xfe, 0xe2, 0xad, 0x90, 0x14, 0xfd, 0x24, 0xfb, 0x10, 0xb6, 0x82, 0x18, 0x42, 0xd6, 0x70, 0x03, 0xa5, 0x64, 0xcd, 0x8f, 0xf4, 0x2a, 0x2a, 0x56, 0x4c, 0xfd, 0x81, 0x9c, 0x3a, 0x84, 0xbf, 0x16, 0xc2, 0x47, 0x7e, 0x8e, 0x6e, 0x5b, 0x9e, 0xc4, 0xd4, 0x0e, 0xad, 0x50, 0x24, 0x87, 0xba, 0x50, 0x36, 0x2d } +, + /* Prime exponent 2 */ + 64, + { 0x88, 0x88, 0xdc, 0x8e, 0xae, 0x94, 0xee, 0xa5, 0x80, 0xca, 0xc2, 0xfc, 0x1c, 0xe5, 0x4f, 0x44, 0xe2, 0xba, 0x50, 0x0d, 0xb8, 0x71, 0x53, 0x41, 0xa6, 0xfc, 0x2d, 0x50, 0x4a, 0x82, 0xb1, 0x42, 0x05, 0xe8, 0x91, 0xa6, 0x6f, 0xc8, 0x8d, 0x5c, 0x60, 0xdb, 0x8f, 0x78, 0x6c, 0xcc, 0x70, 0x57, 0x5b, 0x35, 0x66, 0xbe, 0xa8, 0x74, 0xa5, 0x31, 0x7f, 0x5f, 0x16, 0xc4, 0x91, 0xed, 0x1e, 0x79 } +, + /* Coefficient */ + 64, + { 0x17, 0xb0, 0xd6, 0x23, 0x36, 0x19, 0x1e, 0x63, 0xbc, 0xa1, 0x59, 0x93, 0x4d, 0x06, 0x16, 0xcb, 0x89, 0x97, 0x40, 0x9c, 0xbf, 0xca, 0x37, 0x05, 0x69, 0x5b, 0x14, 0xfb, 0x64, 0xa0, 0x81, 0xc1, 0xc9, 0xf5, 0x86, 0x19, 0x3e, 0x52, 0x3a, 0xbd, 0x0b, 0xeb, 0x8d, 0x72, 0x0c, 0xfe, 0x53, 0x7d, 0xfa, 0x1e, 0xde, 0xc4, 0xa6, 0x64, 0x37, 0xd2, 0x41, 0x19, 0x6b, 0x7a, 0x2c, 0xe5, 0x56, 0xc4 } + +} +, +{{ + "PKCS#1 v1.5 Signature Example 7.1", + /* Message to be signed */ + 157, + { 0x35, 0x39, 0x99, 0x7a, 0xe7, 0x09, 0xfe, 0x32, 0xc1, 0x03, 0x6a, 0x13, 0x27, 0x57, 0xf2, 0xa1, 0x66, 0x7a, 0x91, 0xcc,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e6, 0xf3, 0xbd, 0x06, 0x10, 0x24, 0x44, 0x36, 0xa4, 0x73, 0x01, 0x60, 0xe6, 0xa6, 0x72, 0x11, 0x0c, 0x01, 0xae, 0xb5, 0x62, 0x4b, 0x71, 0x8d, 0xc7, 0xc0, 0x86, 0x1e, 0x58, 0x6b, 0xa8, 0xb6, 0x0a, 0x29, 0xd6, 0xa5, 0x75, 0x5c, 0xd2, 0xcc, 0x50, 0x85, 0x99, 0xc6, 0xe2, 0x8d, 0x73, 0x55, 0xb2, 0x7e, 0x40, 0xb7, 0x40, 0xc6, 0xfb, 0xbb, 0xb1, 0xa9, 0x18, 0x23, 0xb1, 0xc1, 0x24, 0x2b, 0xa6, 0x93, 0xd4, 0x52, 0x69, 0x51, 0x47, 0xdb, 0xb2, 0x3e, 0xa8, 0x9c, 0xbf, 0x11, 0xeb, 0x8b, 0x07, 0xec, 0x3a, 0x02, 0x7b, 0x0f, 0x17 } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Signature Example 7.2", + /* Message to be signed */ + 180, + { 0x31, 0x80, 0x08, 0x87, 0x3c, 0x4c, 0xfe, 0xa7, 0x12, 0x5e, 0xa6, 0xfd, 0x52, 0x15, 0xdf, 0xd9, 0x8d, 0x5c, 0x5e, 0x73, 0x32, 0x3f, 0x03, 0xf2, 0x15, 0xc6, 0x9c, 0x8f, 0x2b, 0xb1, 0x98, 0x3b, 0x59, 0xdf, 0xa6, 0xe9, 0x9a, 0xdd, 0x30, 0x69, 0x66, 0xf3, 0x11, 0x0c, 0x16, 0x1c, 0xa2, 0x26, 0x24, 0xb8, 0x80, 0x70, 0x26, 0x5b, 0x8f, 0x3f, 0x9d, 0x5d, 0xf7, 0x29, 0x91, 0xe7, 0x9e, 0x5b, 0x18, 0x9a, 0xa3, 0xd9, 0xcd, 0x9b, 0x20, 0x47, 0xcf, 0xa6, 0x1d, 0x01, 0x23, 0x4b, 0x23, 0x3d, 0x36, 0xac, 0x4b, 0x96, 0xed, 0x08, 0x16, 0x48, 0x87, 0x74, 0x90, 0xfa, 0x4a, 0x80, 0xec, 0x4c, 0xbb, 0xd9, 0xd2, 0xe0, 0x06, 0x2c, 0x39, 0xe1, 0x85, 0x3a, 0x0c, 0x38, 0x34, 0x4b, 0xa8, 0x58, 0xbd, 0x1d, 0x99, 0x5f, 0x6c, 0xaa, 0x28, 0xbf, 0x90, 0x40, 0x26, 0x26, 0x8a, 0x99, 0x72, 0x11, 0x43, 0xc8, 0x6a, 0x43, 0x43, 0xba, 0xf8, 0x9b, 0x6d, 0x55, 0x07, 0x64, 0x25, 0x1f, 0xb0, 0x7d, 0x16, 0x7b, 0x4c, 0x4b, 0x1b, 0x70, 0xf9, 0x9e, 0xf5, 0xfe, 0x50, 0xe6, 0x2e, 0x54, 0x13, 0xfc, 0xce, 0x0f, 0x99, 0x59, 0xc2, 0xa3, 0x78, 0xc4, 0x1d, 0x6f, 0x42, 0x36, 0x17, 0x8b, 0x14, 0xb8, 0x91, 0x9d, 0xb1, 0xd0 } +, + /* Signature */ + 129, + { 0x00, 0x6d, 0x54, 0x7d, 0xa4, 0xed, 0xcb, 0x10, 0x33, 0x15, 0xcb, 0x8e, 0x4b, 0x66, 0x9b, 0xee, 0x96, 0xaa, 0x21, 0x56, 0x23, 0x5c, 0xa5, 0xc3, 0xe3, 0x1b, 0x24, 0xa1, 0x5a, 0x13, 0x92, 0xe4, 0x94, 0x04, 0x7f, 0xed, 0xcb, 0x70, 0x81, 0x90, 0x7c, 0x56, 0x17, 0xa8, 0xaa, 0x18, 0xd1, 0x01, 0xb0, 0x53, 0x2a, 0x36, 0x32, 0x45, 0x19, 0x23, 0xc4, 0x8a, 0x75, 0xb0, 0xec, 0x21, 0x76, 0xcb, 0x98, 0xe5, 0xce, 0x51, 0x58, 0x8b, 0xcf, 0x86, 0x8e, 0x29, 0xd5, 0xd9, 0x69, 0x4f, 0x00, 0xae, 0x2c, 0x92, 0x4e, 0x73, 0xd2, 0xe6, 0xdd, 0x14, 0x4d, 0x24, 0xfa, 0x45, 0xd0, 0x12, 0x06, 0xa3, 0xf5, 0xd9, 0x36, 0x41, 0x3c, 0xcb, 0xb7, 0x4b, 0x0e, 0x2d, 0x04, 0x7d, 0x82, 0xb6, 0x00, 0xb8, 0x9d, 0x51, 0x59, 0x4f, 0xce, 0x7d, 0xe6, 0xbb, 0xd9, 0x5b, 0x97, 0xfc, 0xfe, 0xc5, 0x98, 0xc4, 0xeb } + +} +, +{ + "PKCS#1 v1.5 Signature Example 7.3", + /* Message to be signed */ + 37, + { 0x7f, 0x83, 0xb3, 0xe0, 0x54, 0xc0, 0x24, 0x82, 0x50, 0x78, 0xdd, 0x9f, 0x04, 0x0e, 0x1d, 0x09, 0x05, 0x82, 0x00, 0xc9, 0x75, 0x7b, 0x76, 0xfb, 0x37, 0x2b, 0x8b, 0x52, 0x66, 0xb9, 0xdc, 0x26, 0x9e, 0xc7, 0x56, 0x9d, 0x00 } +, + /* Signature */ + 129, + { 0x01, 0x34, 0xee, 0x21, 0x51, 0x51, 0xe5, 0x32, 0x50, 0xf5, 0xa0, 0x01, 0x6a, 0xcc, 0xe3, 0x70, 0x1e, 0x2a, 0x58, 0xdd, 0xaa, 0xd6, 0xcc, 0x36, 0x9d, 0xf0, 0xdc, 0xd9, 0x34, 0x6a, 0x2b, 0x53, 0x0f, 0xe3, 0x71, 0x5a, 0xfe, 0xff, 0x1e, 0x9b, 0xcb, 0x72, 0x08, 0x31, 0xc1, 0x25, 0x58, 0x97, 0x0a, 0x9e, 0x03, 0x89, 0x60, 0x04, 0xf2, 0x87, 0xad, 0xb8, 0x21, 0xf3, 0x17, 0xcf, 0x63, 0x93, 0x00, 0xca, 0xe6, 0xe9, 0x09, 0xe9, 0x1e, 0xd2, 0xa3, 0xea, 0xcb, 0x99, 0x52, 0xa7, 0xcc, 0x54, 0x94, 0x76, 0x52, 0x64, 0x24, 0x79, 0x51, 0xd2, 0x8c, 0x16, 0xaf, 0x03, 0xe2, 0x4b, 0x80, 0xee, 0x32, 0xb0, 0xb6, 0x2e, 0xdf, 0x10, 0xd7, 0x00, 0x91, 0x92, 0x71, 0x35, 0xf0, 0x5a, 0x88, 0x9f, 0x2f, 0x60, 0x56, 0xb9, 0x5c, 0xdd, 0xac, 0xe4, 0x7c, 0x69, 0xf9, 0x73, 0x08, 0xc0, 0xdf, 0x2e, 0xba } + +} +, +{ + "PKCS#1 v1.5 Signature Example 7.4", + /* Message to be signed */ + 198, + { 0x17, 0xeb, 0xc1, 0x50, 0x07, 0xbb, 0x5e, 0x4a, 0xf9, 0x17, 0x20, 0x1c, 0x3b, 0xa3, 0x84, 0x92, 0x65, 0x89, 0xc3, 0x15, 0x9a, 0x89, 0xd1, 0xab, 0xd4, 0xc2, 0xc9, 0x86, 0xfb, 0xa0, 0x37, 0x9e, 0x8a, 0xf1, 0x29, 0x75, 0xc5, 0xd0, 0x31, 0xd1, 0xbf, 0xc1, 0x5c, 0xa9, 0x17, 0x36, 0xf0, 0x7b, 0x17, 0x66, 0xd8, 0xb8, 0xa7, 0x2d, 0xb1, 0x0c, 0x26, 0x8c, 0x98, 0xfd, 0x7a, 0xa1, 0x1e, 0x29, 0x99, 0xf0, 0x6d, 0x86, 0x12, 0x7c, 0xc8, 0x89, 0xcf, 0x15, 0x0d, 0xcc, 0x73, 0x8f, 0x6a, 0xb8, 0xba, 0xae, 0x94, 0x3c, 0xc6, 0x06, 0xdd, 0x4d, 0x9e, 0xce, 0x70, 0x1a, 0x4a, 0x7b, 0x10, 0x1e, 0x35, 0x1d, 0xee, 0x20, 0xb1, 0x5e, 0xbc, 0x55, 0x25, 0x6d, 0xb3, 0xce, 0x46, 0xa6, 0xbd, 0x50, 0x61, 0x12, 0x5b, 0x62, 0xb9, 0x95, 0xe9, 0x70, 0xd1, 0x6f, 0x7c, 0x9a, 0x8f, 0xc1, 0x57, 0xff, 0x68, 0xce, 0xc7, 0xe6, 0x0f, 0x60, 0x8f, 0x66, 0x26, 0xdd, 0x39, 0x52, 0x8b, 0x24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 0x54, 0xd2, 0x46 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 7.5", + /* Message to be signed */ + 51, + { 0x6a, 0x52, 0xba, 0x19, 0x0e, 0x44, 0xca, 0x0f, 0x10, 0x70, 0x02, 0x10, 0x48, 0x76, 0x2f, 0x3e, 0x79, 0xed, 0x51, 0xc9, 0x4f, 0x6d, 0xc1, 0xa9, 0xf1, 0xed, 0x78, 0x35, 0x2e, 0xf3, 0x79, 0xaa, 0x49, 0xb3, 0xa9, 0x38, 0x7e, 0x3c, 0xa7, 0xa1, 0x96, 0xf1, 0x05, 0xdc, 0xab, 0x18, 0x50, 0x6f, 0x29, 0x4a, 0x69 } +, + /* Signature */ + 129, + { 0x00, 0x0b, 0x70, 0xe6, 0x01, 0xc5, 0xec, 0x58, 0x68, 0x4e, 0x09, 0x18, 0xba, 0x7a, 0x53, 0x9e, 0x9d, 0x2d, 0xd2, 0x9b, 0x01, 0xa3, 0xf4, 0x53, 0xca, 0xd4, 0xa9, 0xa4, 0x0e, 0x50, 0xf5, 0xdb, 0xdf, 0x72, 0xc1, 0x10, 0x52, 0xf2, 0x0b, 0xe4, 0x4a, 0x5d, 0x38, 0x51, 0xb0, 0x1f, 0xd0, 0x9d, 0x9c, 0x92, 0x08, 0x47, 0x0f, 0x0a, 0x4a, 0x95, 0x03, 0x5e, 0x98, 0x9e, 0xed, 0x7d, 0x6b, 0x06, 0x2e, 0x13, 0xf4, 0x99, 0x5b, 0xf0, 0x93, 0x0b, 0x4a, 0x3d, 0x9b, 0x8a, 0x9e, 0xd7, 0x5e, 0x33, 0x88, 0x6e, 0x4b, 0x19, 0x4a, 0xb5, 0xcc, 0xd6, 0xb4, 0x12, 0x95, 0x9c, 0xb4, 0xf5, 0x49, 0x8b, 0xd3, 0x2f, 0x66, 0x85, 0x46, 0xbe, 0x2c, 0x00, 0x7a, 0xe8, 0xde, 0x5d, 0x98, 0x97, 0x7b, 0x94, 0xb1, 0x7e, 0x12, 0x63, 0x88, 0x4b, 0x54, 0xe7, 0x84, 0xb3, 0x8f, 0xc1, 0x12, 0xb8, 0xcb, 0xdd, 0x56 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 7.6", + /* Message to be signed */ + 236, + { 0xbb, 0xe0, 0xb9, 0xde, 0x2b, 0x5e, 0x9d, 0xcd, 0x31, 0x67, 0x42, 0x94, 0x3f, 0x92, 0x19, 0xb2, 0x4f, 0x66, 0xa3, 0x8f, 0x9d, 0xe7, 0x09, 0x46, 0x4f, 0xa5, 0x49, 0x5d, 0x79, 0x4a, 0x63, 0x7b, 0x9e, 0xbc, 0x06, 0x77, 0x62, 0xda, 0x7a, 0x6e, 0xef, 0xf0, 0x98, 0xfa, 0x44, 0xf3, 0xcc, 0x36, 0xf2, 0xcc, 0xef, 0x67, 0xfd, 0x46, 0xc5, 0x9e, 0x24, 0x73, 0x8c, 0x81, 0x0c, 0x69, 0xed, 0xdc, 0xd9, 0x0c, 0xc7, 0xd7, 0x1a, 0x4c, 0x3e, 0x69, 0x3b, 0xca, 0xa2, 0x8a, 0x53, 0x3d, 0x90, 0x4b, 0x41, 0xce, 0xd3, 0x39, 0x9b, 0x4c, 0x76, 0x47, 0xe5, 0xec, 0x4b, 0x3a, 0xd9, 0x03, 0x87, 0x0f, 0x5b, 0x5f, 0x8d, 0x6a, 0x8d, 0x81, 0x28, 0xae, 0x23, 0x81, 0xce, 0xc8, 0x6c, 0x4d, 0x85, 0xb7, 0x8a, 0x45, 0x1e, 0x1e, 0xa9, 0x7e, 0x33, 0x93, 0xff, 0xe9, 0x97, 0xe5, 0x46, 0xb0, 0x9c, 0x8c, 0xf8, 0x22, 0x52, 0xb3, 0x3f, 0x74, 0x5f, 0xee, 0xd4, 0x13, 0x32, 0x06, 0x51, 0x8e, 0x2b, 0x88, 0x03, 0x19, 0xdc, 0xdf, 0x91, 0x06, 0x71, 0x8a, 0xfb, 0x01, 0x6c, 0x51, 0x4b, 0x38, 0x05, 0x32, 0x65, 0xbc, 0x98, 0x79, 0x10,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0xf2, 0x75, 0x06, 0x08, 0xa7, 0x8f, 0x3e, 0xd8, 0x3a, 0xd7, 0x12, 0xa7, 0xa1, 0xb0, 0xfb, 0xde, 0x7c, 0x7c, 0x8d } + +} +, +{ + "PKCS#1 v1.5 Signature Example 7.7", + /* Message to be signed */ + 64, + { 0x83, 0xa4, 0x8b, 0xff, 0x88, 0x6d, 0x1d, 0x68, 0xf2, 0x92, 0x0a, 0x0e, 0xcf, 0xf2, 0x98, 0x32, 0x1a, 0x96, 0xf5, 0xca, 0xdc, 0xdf, 0xd8, 0xbe, 0x16, 0xb5, 0x0d, 0x34, 0xd6, 0x7d, 0x94, 0xcd, 0xb1, 0xa1, 0xbf, 0xa0, 0xea, 0xe2, 0x46, 0x99, 0xb6, 0x63, 0xc7, 0xba, 0x3a, 0x08, 0xa3, 0x90, 0xf7, 0x22, 0x58, 0x84, 0x85, 0x67, 0x94, 0xd1, 0x80, 0xc5, 0x46, 0xca, 0xc0, 0x6e, 0x41, 0x18 } +, + /* Signature */ + 129, + { 0x01, 0x2e, 0x81, 0xbd, 0x38, 0x63, 0x50, 0x65, 0xbf, 0x65, 0x54, 0x33, 0x6b, 0x00, 0xd1, 0x06, 0x18, 0x33, 0x05, 0x53, 0xe0, 0xe8, 0x08, 0x78, 0xaa, 0xd3, 0x55, 0xf0, 0x0d, 0x59, 0x40, 0xd8, 0xba, 0x45, 0x01, 0xc5, 0xc4, 0x9f, 0x10, 0x16, 0xd5, 0xf0, 0xe6, 0xa7, 0x3a, 0x4d, 0x9f, 0x87, 0x40, 0xd2, 0xcf, 0xc2, 0x5e, 0xa2, 0x48, 0xdf, 0x3f, 0x7b, 0x1a, 0xe8, 0xfc, 0xd2, 0x6b, 0xd5, 0x62, 0xe0, 0xf6, 0xeb, 0x77, 0x7f, 0x46, 0xd7, 0x57, 0x30, 0x69, 0xdb, 0x89, 0x07, 0xc0, 0x21, 0xb6, 0x45, 0xd3, 0xb2, 0x40, 0x58, 0x47, 0x51, 0x99, 0xa9, 0x1b, 0x55, 0x72, 0xd8, 0xac, 0x87, 0xf8, 0x3e, 0xe6, 0xaf, 0x5c, 0xf9, 0xe1, 0x71, 0xa8, 0x58, 0xf6, 0x0d, 0x2b, 0x81, 0x40, 0xf5, 0x2d, 0xae, 0xd6, 0x84, 0x42, 0x22, 0x8b, 0x4f, 0xff, 0xd8, 0xde, 0x40, 0x07, 0x8d, 0x3d, 0xe8, 0xcb } + +} +, +{ + "PKCS#1 v1.5 Signature Example 7.8", + /* Message to be signed */ + 1, + { 0x18 } +, + /* Signature */ + 129, + { 0x00, 0xf2, 0xc2, 0x99, 0x02, 0x4a, 0xb7, 0xbd, 0x25, 0x2c, 0x69, 0x46, 0xbe, 0xa1, 0x0d, 0xc0, 0x53, 0x97, 0x38, 0x98, 0xbd, 0x5f, 0x0e, 0x3c, 0x94, 0x60, 0xe6, 0xfe, 0x09, 0xd7, 0xd1, 0x91, 0xe7, 0x1b, 0xf7, 0x9d, 0x43, 0x6c, 0xaa, 0x84, 0xe9, 0x86, 0xbe, 0x3f, 0xc0, 0x98, 0x19, 0xc0, 0x80, 0xe5, 0x6a, 0x08, 0x5c, 0xf4, 0x24, 0x41, 0x4a, 0xf3, 0xfc, 0x70, 0x07, 0xcf, 0x1a, 0xc3, 0x6f, 0x1c, 0xf8, 0x63, 0x57, 0x80, 0xb5, 0x56, 0x8d, 0x73, 0x4a, 0xd6, 0xd8, 0x1a, 0x2b, 0xa8, 0xeb, 0x18, 0x8b, 0x29, 0x46, 0x69, 0xd8, 0x71, 0xca, 0x40, 0xe6, 0x08, 0xf0, 0xed, 0x33, 0xd5, 0x69, 0x0c, 0xc6, 0x15, 0x70, 0xc5, 0xb8, 0x47, 0xeb, 0xdb, 0xdc, 0xdc, 0x4f, 0xa7, 0x8f, 0x42, 0x9e, 0xfc, 0xe1, 0x3c, 0x67, 0x47, 0xe5, 0x4d, 0x6f, 0x26, 0x1b, 0x04, 0x55, 0xd6, 0xdd, 0x65, 0xc2 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 7.9", + /* Message to be signed */ + 40, + { 0x04, 0xa6, 0xe2, 0x4b, 0x93, 0xc2, 0xe5, 0xf6, 0xb4, 0xbb, 0xe0, 0x5f, 0x5f, 0xb0, 0xaf, 0xa0, 0x42, 0xd2, 0x04, 0xfe, 0x33, 0x78, 0xd3, 0x65, 0xc2, 0xf2, 0x88, 0xb6, 0xa8, 0xda, 0xd7, 0xef, 0xe4, 0x5d, 0x15, 0x3e, 0xef, 0x40, 0xca, 0xcc } +, + /* Signature */ + 129, + { 0x00, 0xec, 0xc8, 0x95, 0xfb, 0xd9, 0x47, 0xe2, 0xdf, 0xc4, 0x7c, 0x03, 0xba, 0x2e, 0x99, 0x3d, 0x1a, 0x14, 0x3a, 0x7a, 0x6a, 0xd6, 0x3a, 0x91, 0x6e, 0xd5, 0x44, 0x83, 0xce, 0x26, 0x38, 0x9f, 0x89, 0xd5, 0x80, 0xf4, 0xed, 0xbd, 0xd0, 0xb3, 0x7e, 0x08, 0xca, 0xaa, 0x5a, 0x0c, 0x1e, 0x52, 0x6e, 0x1e, 0x9a, 0x1a, 0x8c, 0x0d, 0xc9, 0xcf, 0x50, 0xed, 0x77, 0xde, 0x26, 0x76, 0x46, 0x0d, 0x28, 0x8d, 0xce, 0x56, 0x5f, 0x12, 0x8a, 0x26, 0x6e, 0xa2, 0x9b, 0x4e, 0xcc, 0x32, 0x9a, 0x94, 0xcc, 0x25, 0x23, 0x96, 0xdc, 0x50, 0xd5, 0xc0, 0xa1, 0x3d, 0x80, 0x93, 0x81, 0xfa, 0xd8, 0x8a, 0x07, 0x89, 0xad, 0x4f, 0x56, 0xaa, 0x77, 0xe5, 0x44, 0xec, 0x25, 0x70, 0xaf, 0x99, 0x18, 0xb7, 0xf7, 0x41, 0xb4, 0x86, 0xca, 0x50, 0xb3, 0x38, 0x4a, 0xd1, 0x12, 0x40, 0x60, 0x59, 0x16, 0x85, 0xa1 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 7.10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db, 0x3d, 0x0d, 0xcf, 0x9e, 0xb2, 0x9d, 0x41, 0xff, 0xc1, 0x10, 0x07, 0xce, 0x86, 0xb9, 0x82, 0xe8, 0x9c, 0x03, 0x75, 0xbd, 0x99, 0x76, 0xa5, 0xaf, 0x13, 0x1a, 0x61, 0x4d, 0x28, 0x08, 0xba, 0x25, 0x07, 0x9d, 0x97, 0x7f, 0x0b, 0x23, 0x97, 0x96, 0xba, 0x6b, 0x1b, 0xcd, 0x5e, 0x85, 0x5d, 0x96 } +, + /* Signature */ + 129, + { 0x01, 0x56, 0x62, 0xe3, 0x0e, 0x79, 0x0e, 0x37, 0x86, 0x83, 0x81, 0xb4, 0xf6, 0x77, 0xa2, 0xae, 0xd6, 0xb2, 0xac, 0xc5, 0x64, 0x49, 0x17, 0x31, 0x82, 0x49, 0x10, 0xed, 0x80, 0xad, 0xc4, 0x77, 0x15, 0x9c, 0x88, 0x61, 0x8c, 0xc7, 0xd0, 0xbe, 0xb0, 0x49, 0xb1, 0xaa, 0xe7, 0x4b, 0x17, 0x21, 0xe9, 0x0b, 0xa7, 0xf7, 0xb0, 0xea, 0x26, 0xbf, 0x33, 0xad, 0x04, 0xf8, 0x6f, 0xf3, 0x14, 0x38, 0x97, 0xbf, 0x0d, 0x4e, 0xb4, 0x5e, 0xb7, 0xde, 0xb5, 0x44, 0x11, 0xba, 0x96, 0x80, 0xaa, 0xb1, 0x3a, 0xdb, 0xfc, 0xf1, 0x8a, 0xf4, 0x6b, 0x87, 0xfc, 0xb1, 0x46, 0x1c, 0x26, 0x20, 0x6a, 0x95, 0x3b, 0xc3, 0xcd, 0xbb, 0x31, 0xe2, 0x96, 0xea, 0x09, 0x02, 0x4b, 0xc5, 0xc7, 0xb6, 0x2d, 0xe6, 0xc6, 0x9c, 0x14, 0xbf, 0xcf, 0xeb, 0x56, 0x39, 0x1a, 0x9e, 0xf5, 0x8c, 0xd8, 0x05, 0xeb, 0x63, 0x1f } + +} +, +{ + "PKCS#1 v1.5 Signature Example 7.11", + /* Message to be signed */ + 186, + { 0x71, 0xc7, 0xb1, 0x8b, 0x4a, 0xa8, 0xea, 0x53, 0x89, 0xad, 0x78, 0x49, 0x23, 0x28, 0x65, 0xbe, 0x2a, 0x93, 0xe3, 0x47, 0xa1, 0x68, 0xd2, 0x5c, 0x6c, 0x6e, 0xa2, 0x43, 0x9c, 0x1c, 0xc8, 0x0b, 0xb0, 0xb7, 0x22, 0x3b, 0xe9, 0xc8, 0x93, 0x71, 0x22, 0x84, 0x5b, 0xb0, 0xa3, 0x9c, 0x02, 0x5c, 0x43, 0x75, 0x9d, 0xef, 0xe6, 0xe4, 0xe8, 0xeb, 0x3b, 0xaa, 0xb4, 0xf1, 0xeb, 0xdc, 0xa2, 0xc8, 0xad, 0x12, 0xa4, 0x65, 0xa3, 0x0f, 0x8a, 0x65, 0x25, 0xb1, 0x20, 0xef, 0x6a, 0xae, 0xc9, 0xbd, 0xdb, 0x45, 0xcd, 0x42, 0xc0, 0x15, 0x0c, 0x40, 0x7b, 0x04, 0x8e, 0xdf, 0x65, 0x19, 0x94, 0x92, 0xf2, 0x07, 0xca, 0x01, 0xaa, 0xa5, 0x54, 0x3a, 0xf3, 0x8e, 0xe9, 0x8d, 0x53, 0xbd, 0x10, 0xd8, 0xee, 0xbc, 0x3b, 0x64, 0x97, 0x7e, 0x75, 0x75, 0x1d, 0x74, 0x50, 0xdd, 0xb1, 0xc0, 0xe1, 0xfc, 0x24, 0xda, 0x17, 0x18, 0x81, 0x1f, 0xbe, 0x9b, 0x0a, 0xbf, 0xc3, 0xca, 0x31, 0xe6, 0x99, 0x5f, 0xc7, 0x34, 0x90, 0x73, 0xe2, 0x17, 0xb3, 0x7e, 0x23, 0xc5, 0xf1, 0x7a, 0x8b, 0x7a, 0x3f, 0x00, 0x48, 0x6a, 0x37, 0x02, 0xb9, 0x51, 0x0d, 0x6f, 0x05, 0x1b, 0x27, 0x61, 0x71, 0x6e, 0x32, 0xc6, 0x2b, 0xb5, 0x93, 0x9b, 0x2f, 0xb1, 0x1a, 0xcb, 0x1c, 0x83 } +, + /* Signature */ + 129, + { 0x01, 0x3a, 0xb6, 0x3a, 0xb1, 0x83, 0x35, 0x3a, 0x23, 0x5f, 0xb8, 0x93, 0xab, 0x4c, 0x35, 0xd6, 0x40, 0x9c, 0x21, 0x84, 0x9d, 0xcf, 0xcd, 0xa3, 0xbf, 0xda, 0x14, 0x29, 0xfe, 0xe7, 0x42, 0xa7, 0xd8, 0x16, 0x0f, 0xd3, 0xc8, 0x3b, 0x38, 0x53, 0xa3, 0x33, 0xf9, 0x51, 0x53, 0x9b, 0xb5, 0x77, 0x1f, 0x4d, 0x0f, 0xe1, 0x3a, 0xde, 0xb6, 0x4e, 0x40, 0x30, 0xb9, 0x2e, 0x8b, 0x08, 0x13, 0xeb, 0x52, 0xb1, 0xaa, 0x33, 0xbd, 0x94, 0xc5, 0xb8, 0xbc, 0x1b, 0xbc, 0xcd, 0xf6, 0xc1, 0xdf, 0x0b, 0xa6, 0x70, 0x71, 0x7c, 0x0c, 0xf6, 0xfd, 0x48, 0x5b, 0xe2, 0xfe, 0x9e, 0x16, 0x81, 0x3b, 0xe8, 0xcd, 0xd5, 0x80, 0xe6, 0x10, 0x86, 0x67, 0x5e, 0x31, 0x83, 0x1c, 0x92, 0x4a, 0x41, 0xd4, 0x67, 0x1a, 0x95, 0xd8, 0x35, 0xe3, 0xfc, 0xa4, 0x95, 0xe8, 0x86, 0x58, 0xd1, 0xe5, 0x70, 0xe6, 0x28, 0xc7 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 7.12", + /* Message to be signed */ + 111, + { 0x0b, 0xeb, 0x19, 0xb5, 0x62, 0x92, 0x8c, 0x27, 0x1b, 0xb7, 0x06, 0x18, 0x9e, 0x43, 0xcf, 0xa5, 0x7b, 0xe7, 0x6b, 0x2f, 0x7a, 0x83, 0xe0, 0x2a, 0xa2, 0xcc, 0xb0, 0x37, 0xc0, 0xf4, 0xf7, 0xf7, 0x31, 0x62, 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0xcd, 0xfd, 0x63, 0xfc, 0x17, 0xc1, 0x93, 0xc4, 0x25, 0xd7, 0xed, 0xe9, 0x41, 0xf7, 0x6d, 0xa1, 0xe3, 0x45, 0xaf, 0x0e, 0x2a, 0x8b, 0x88, 0x44, 0xc7, 0x40 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 7.13", + /* Message to be signed */ + 12, + { 0x02, 0x87, 0xab, 0xe2, 0x67, 0x0a, 0x45, 0xf8, 0x77, 0x90, 0x48, 0xf5 } +, + /* Signature */ + 129, + { 0x00, 0x42, 0xf4, 0x14, 0x78, 0x2d, 0xf6, 0x5d, 0x93, 0x47, 0xbf, 0x1c, 0xad, 0x53, 0x48, 0x53, 0x74, 0x6c, 0xc0, 0xb8, 0x53, 0xc1, 0xc5, 0x26, 0xf9, 0x17, 0x14, 0x45, 0xfc, 0xfa, 0xa4, 0x99, 0x1a, 0x70, 0xf5, 0xa8, 0x44, 0x5b, 0xcf, 0x41, 0x14, 0xf0, 0x7f, 0xc8, 0x35, 0x4c, 0x84, 0xa9, 0x3b, 0x94, 0x37, 0x33, 0xd3, 0x93, 0x7a, 0x59, 0x88, 0x3b, 0x89, 0x6c, 0xe6, 0x5f, 0xdb, 0x16, 0x5b, 0x1e, 0x30, 0x55, 0x37, 0x4c, 0xe2, 0x42, 0xe1, 0x26, 0x8c, 0x16, 0x41, 0xcc, 0x44, 0x3b, 0xb9, 0xe7, 0xda, 0x7f, 0x71, 0xf3, 0xe7, 0xf6, 0x31, 0x3f, 0x23, 0x9e, 0x62, 0x00, 0xe7, 0x9a, 0x1b, 0xe3, 0xea, 0xd6, 0xc3, 0x6e, 0x94, 0x1f, 0x24, 0x46, 0x0b, 0xaa, 0x57, 0xdf, 0x63, 0x9e, 0x57, 0xda, 0xb3, 0xef, 0xf9, 0xe7, 0x7b, 0x87, 0xaf, 0x35, 0x5b, 0x83, 0xda, 0xe7, 0x7c, 0xbe, 0x06 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 7.14", + /* Message to be signed */ + 91, + { 0x3f, 0x49, 0x54, 0x2c, 0x0e, 0x9f, 0x50, 0x93, 0x2c, 0x0d, 0x45, 0x3d, 0xc9, 0x53, 0x20, 0xaf, 0x21, 0xdd, 0x2b, 0xd1, 0x72, 0x9c, 0x29, 0xf4, 0xf0, 0x8c, 0x70, 0x94, 0x4c, 0x2c, 0xc7, 0x5d, 0xe9, 0x16, 0x6b, 0x4f, 0xd2, 0x30, 0xaa, 0x93, 0x70, 0x2c, 0x5f, 0x2c, 0x3d, 0x9c, 0x29, 0x9a, 0x35, 0x91, 0x02, 0x57, 0x00, 0x33, 0x54, 0x0e, 0xb8, 0x28, 0xca, 0xd7, 0x5a, 0x57, 0x76, 0xd2, 0xe8, 0xcb, 0x45, 0x61, 0x41, 0xa6, 0xfa, 0x97, 0xbc, 0x4e, 0x6e, 0x62, 0xd3, 0xdf, 0x08, 0x29, 0x82, 0xa4, 0xd9, 0x8c, 0x2d, 0xe4, 0x41, 0xe5, 0x9e, 0x93, 0x12 } +, + /* Signature */ + 129, + { 0x01, 0x5c, 0x39, 0x93, 0xce, 0xeb, 0xd8, 0xdb, 0xa4, 0x5a, 0x36, 0x8d, 0xd4, 0x05, 0xaf, 0x8a, 0x53, 0xb9, 0x3e, 0x82, 0x70, 0x19, 0xf9, 0x94, 0xe4, 0xed, 0x78, 0x2c, 0x39, 0x11, 0xb9, 0xb5, 0x80, 0xd5, 0x42, 0x24, 0x26, 0x9b, 0x79, 0x97, 0xf1, 0x74, 0x96, 0x30, 0xe5, 0x2f, 0x22, 0x1f, 0xaf, 0xab, 0x96, 0x41, 0xc7, 0x81, 0xe7, 0x04, 0x4d, 0x32, 0x56, 0xe2, 0xe4, 0x4e, 0x14, 0x37, 0x91, 0x72, 0x32, 0x69, 0x45, 0x18, 0xba, 0x9e, 0x71, 0x38, 0xda, 0x47, 0xfe, 0x53, 0x43, 0x29, 0xb8, 0xc9, 0x68, 0x9e, 0x27, 0x85, 0xc0, 0x2b, 0x60, 0x3d, 0xd1, 0x60, 0xd3, 0x73, 0x36, 0xa2, 0xb0, 0x5b, 0xe0, 0x47, 0x82, 0x65, 0x9a, 0xc0, 0xe9, 0x67, 0x1f, 0xe9, 0x32, 0xea, 0x80, 0x91, 0xd6, 0x13, 0x18, 0xb2, 0xb2, 0x01, 0xbd, 0xa7, 0x9a, 0xf6, 0xc0, 0xc4, 0x44, 0x69, 0x38, 0xe3, 0xf6 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 7.15", + /* Message to be signed */ + 221, + { 0xd0, 0xdb, 0xc9, 0x6c, 0xf9, 0xbf, 0xb1, 0xe3, 0xcd, 0x6d, 0xe2, 0xea, 0xa0, 0x8d, 0x6d, 0x79, 0x5b, 0xed, 0x81, 0x87, 0xce, 0xb0, 0x85, 0x65, 0x80, 0xe4, 0xb1, 0x42, 0xb9, 0xae, 0x60, 0xa0, 0x98, 0xcd, 0x42, 0x98, 0x4e, 0x8d, 0xbf, 0x1d, 0x05, 0xa0, 0xc0, 0xab, 0x83, 0x51, 0x54, 0x8f, 0x0a, 0x13, 0x64, 0x6f, 0x33, 0x39, 0x0b, 0x2b, 0xb0, 0xc8, 0x64, 0xb3, 0x97, 0xcf, 0x13, 0x37, 0x1f, 0x8b, 0x2f, 0x67, 0x5a, 0x82, 0xe4, 0x6b, 0xf1, 0x6c, 0x4a, 0xfc, 0x60, 0x5e, 0xe3, 0xe5, 0xa1, 0x46, 0x9c, 0xac, 0x51, 0xfa, 0x73, 0x4b, 0x44, 0x65, 0xd4, 0xc1, 0x3d, 0x5b, 0x2d, 0xd1, 0x2e, 0xed, 0xa5, 0x4e, 0x7d, 0x08, 0x1c, 0xd9, 0xe3, 0xea, 0xaf, 0x9e, 0x57, 0xdb, 0x42, 0x20, 0x20, 0xa0, 0xb5, 0xa5, 0xec, 0x28, 0xca, 0x43, 0x97, 0x7a, 0x5d, 0x67, 0x6f, 0xfa, 0xb6, 0x2f, 0x78, 0x10, 0x71, 0x93, 0x59, 0x41, 0x59, 0xce, 0xbf, 0xbd, 0x86, 0x26, 0x98, 0x19, 0xa0, 0xf3, 0x41, 0xa0, 0xf4, 0x12, 0x84, 0xdd, 0x0a, 0x73, 0xca, 0x80, 0x14, 0xd2, 0xe0, 0xb8, 0x01, 0x79, 0xc6, 0x38, 0x0b, 0x40, 0x3a, 0xfb, 0xb1, 0x1b, 0x42, 0xdb, 0x34, 0x9b, 0xaf, 0xd7, 0x57, 0x0f, 0xbe, 0xcb, 0xd1, 0x4b, 0xd0, 0xc2, 0x1a, 0xd6, 0x41, 0x68, 0x7a, 0x6a, 0xc3, 0x29, 0x25, 0xf7, 0x03, 0x1a, 0x24, 0xa6, 0x56, 0x8a, 0xb9, 0xe2, 0x87, 0xeb, 0x80, 0x75, 0x41, 0x10, 0xdf, 0xba, 0x68, 0x8a, 0x59, 0x63, 0x25, 0xbc, 0xac, 0x4a, 0x39, 0xce, 0x8b, 0x84, 0xa4 } +, + /* Signature */ + 129, + { 0x00, 0x8c, 0xc8, 0x2d, 0x64, 0x55, 0x9d, 0xe0, 0x04, 0x0f, 0x55, 0x41, 0x19, 0x9a, 0xef, 0xf3, 0x99, 0x9f, 0xe2, 0xf0, 0x86, 0xf1, 0x57, 0xff, 0x51, 0xf2, 0x22, 0x0d, 0xb3, 0x45, 0x51, 0x9a, 0xa1, 0x14, 0xb0, 0x17, 0x62, 0xe7, 0x0b, 0xc9, 0x65, 0x83, 0xbb, 0x38, 0xb2, 0x2b, 0x3f, 0x87, 0xbe, 0xab, 0x32, 0xe2, 0x3a, 0x3d, 0xeb, 0xdb, 0x8a, 0x59, 0x54, 0x29, 0xff, 0x12, 0xfa, 0xd4, 0x95, 0xd7, 0x4e, 0x22, 0x0e, 0x4f, 0x7d, 0xca, 0x22, 0x27, 0x28, 0x43, 0x89, 0x9e, 0x81, 0x04, 0xc6, 0x9a, 0x59, 0x64, 0x2f, 0x6f, 0xa8, 0x25, 0x89, 0x0f, 0xe8, 0x13, 0x2a, 0x0f, 0x79, 0x94, 0x02, 0x53, 0xe5, 0x00, 0x7f, 0xb1, 0x17, 0x7a, 0x5b, 0xf4, 0x18, 0x06, 0x7e, 0xdd, 0xc8, 0xd3, 0x2c, 0x5e, 0x59, 0x35, 0xbf, 0x33, 0x8f, 0x1c, 0x69, 0x0e, 0xfc, 0x80, 0x11, 0xdc, 0x8c, 0x84, 0x2e } + +} +, +{ + "PKCS#1 v1.5 Signature Example 7.16", + /* Message to be signed */ + 230, + { 0x7d, 0xf0, 0x23, 0x6e, 0x87, 0x1a, 0x71, 0xc3, 0x17, 0x90, 0xeb, 0x5f, 0x01, 0x1c, 0x91, 0x1c, 0x27, 0xc6, 0x03, 0x73, 0xb8, 0xdc, 0x9e, 0xbb, 0x13, 0xac, 0x85, 0xac, 0xcb, 0x3b, 0xcb, 0xd3, 0xb4, 0x74, 0xf9, 0x78, 0x86, 0x2d, 0xd8, 0x42, 0x02, 0xab, 0x20, 0xb3, 0x34, 0x73, 0x94, 0x25, 0xe1, 0xb7, 0x9e, 0x0b, 0xb8, 0xb4, 0xbc, 0x47, 0xdc, 0x71, 0x53, 0xf5, 0x7a, 0xda, 0x04, 0x12, 0x44, 0x7b, 0xf5, 0xa5, 0xe6, 0x67, 0x34, 0x19, 0xba, 0xad, 0x65, 0x3e, 0x5f, 0x5c, 0x39, 0xe2, 0xef, 0x7c, 0xfe, 0x7e, 0xf4, 0x77, 0x8a, 0xb9, 0x98, 0xca, 0xf9, 0x7c, 0xe1, 0x6c, 0x58, 0x33, 0x27, 0x72, 0xdd, 0xdf, 0x82, 0x6f, 0x1e, 0xec, 0x1a, 0xf3, 0xdb, 0x80, 0xe3, 0x13, 0x75, 0xd6, 0x68, 0x0a, 0xa2, 0x54, 0xb4, 0xab, 0x6e, 0xf9, 0xa3, 0xec, 0x0e, 0x04, 0x03, 0xe4, 0xb5, 0x83, 0xd3, 0x71, 0xdd, 0xd9, 0x6d, 0xd5, 0x7b, 0x2c, 0x61, 0xa6, 0xe4, 0x01, 0x25, 0x1a, 0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x95, 0x3d, 0xe6, 0x17, 0x6f, 0x15, 0x82, 0x03, 0x70, 0x17, 0xc8, 0x38, 0x60, 0x9a, 0x57, 0xa1, 0x2a, 0xcb, 0xaf, 0xa6, 0xa5, 0x65, 0x47, 0xf5, 0x7d, 0x62, 0xdb, 0xe8, 0x76, 0x69, 0xed, 0xc0, 0xfe, 0x3b, 0xaa, 0xda } + +} +, +{ + "PKCS#1 v1.5 Signature Example 7.17", + /* Message to be signed */ + 144, + { 0x12, 0x88, 0xc0, 0x3f, 0x95, 0x00, 0x6e, 0xa3, 0x2f, 0x56, 0x2d, 0x40, 0xd5, 0x2a, 0xf9, 0xfe, 0xb3, 0x2f, 0x0f, 0xa0, 0x6d, 0xb6, 0x5b, 0x58, 0x8a, 0x23, 0x7b, 0x34, 0xe5, 0x92, 0xd5, 0x5c, 0xf9, 0x79, 0xf9, 0x03, 0xa6, 0x42, 0xef, 0x64, 0xd2, 0xed, 0x54, 0x2a, 0xa8, 0xc7, 0x7d, 0xc1, 0xdd, 0x76, 0x2f, 0x45, 0xa5, 0x93, 0x03, 0xed, 0x75, 0xe5, 0x41, 0xca, 0x27, 0x1e, 0x2b, 0x60, 0xca, 0x70, 0x9e, 0x44, 0xfa, 0x06, 0x61, 0x13, 0x1e, 0x8d, 0x5d, 0x41, 0x63, 0xfd, 0x8d, 0x39, 0x85, 0x66, 0xce, 0x26, 0xde, 0x87, 0x30, 0xe7, 0x2f, 0x9c, 0xca, 0x73, 0x76, 0x41, 0xc2, 0x44, 0x15, 0x94, 0x20, 0x63, 0x70, 0x28, 0xdf, 0x0a, 0x18, 0x07, 0x9d, 0x62, 0x08, 0xea, 0x8b, 0x47, 0x11, 0xa2, 0xc7, 0x50, 0xf5, 0xc0, 0xa4, 0x25, 0x31, 0x3d, 0xf8, 0xd7, 0x56, 0x4b, 0xd2, 0x43, 0x4d, 0x31, 0x15, 0x23, 0xd5, 0x25, 0x7e, 0xed, 0x80, 0x6a, 0xc8, 0xc9, 0xc6, 0xaf, 0x04, 0xac } +, + /* Signature */ + 129, + { 0x00, 0x6b, 0xeb, 0xb9, 0x6f, 0x0e, 0x28, 0x2f, 0x1b, 0x4d, 0x03, 0xe6, 0xc5, 0x65, 0x05, 0xb9, 0x37, 0x78, 0xda, 0x9f, 0x49, 0x36, 0x50, 0xe8, 0xaa, 0xeb, 0x65, 0xcf, 0xe6, 0x28, 0x50, 0x04, 0x2f, 0x75, 0xab, 0xe6, 0xe6, 0xea, 0xfe, 0xb9, 0xa7, 0x0a, 0xbd, 0x21, 0xeb, 0x5d, 0xba, 0x73, 0xcb, 0xb8, 0x7c, 0x12, 0x98, 0x0a, 0xac, 0xdf, 0x16, 0x71, 0x6b, 0x19, 0x98, 0xc9, 0x49, 0x9c, 0xe4, 0x39, 0xc5, 0x4a, 0xab, 0x4d, 0x19, 0xce, 0x72, 0x7b, 0x78, 0x75, 0xa4, 0x1a, 0x3d, 0x30, 0x81, 0x4e, 0x50, 0x8d, 0xaa, 0x26, 0xeb, 0x70, 0xaa, 0xbb, 0xd0, 0xdc, 0xae, 0xcc, 0x4d, 0x4b, 0x51, 0x69, 0x80, 0x71, 0x51, 0x1e, 0xb3, 0x1b, 0x21, 0x0e, 0x66, 0xdc, 0xbc, 0x7f, 0xc0, 0xb8, 0xc6, 0x23, 0x14, 0xda, 0xea, 0x69, 0xd4, 0x7a, 0xe2, 0x78, 0x10, 0x0d, 0xeb, 0x51, 0x40, 0x92, 0x00 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 7.18", + /* Message to be signed */ + 10, + { 0x54, 0x13, 0x99, 0x3c, 0x26, 0x58, 0xbc, 0x1d, 0x98, 0x85 } +, + /* Signature */ + 129, + { 0x00, 0xbb, 0xeb, 0x2c, 0xa0, 0xbd, 0x64, 0xcb, 0x89, 0x60, 0x37, 0x5b, 0x08, 0xa9, 0x48, 0x0e, 0x69, 0xc0, 0x9f, 0xd3, 0x82, 0xde, 0xa2, 0xf9, 0x40, 0x89, 0xb1, 0x53, 0x3a, 0x08, 0x51, 0xfa, 0x0c, 0xbd, 0x0e, 0xad, 0xef, 0xca, 0x8c, 0x70, 0xb7, 0x70, 0x79, 0x7a, 0xd0, 0x89, 0xe8, 0x40, 0xd2, 0xfe, 0x1a, 0x8f, 0xb8, 0x54, 0x9f, 0x32, 0x90, 0x58, 0x3b, 0xbb, 0x81, 0xd3, 0xee, 0x2b, 0x1c, 0x48, 0xf1, 0xea, 0x75, 0x1b, 0xf3, 0x2f, 0x95, 0x90, 0xbe, 0x3a, 0xfd, 0xb7, 0x74, 0x5e, 0x16, 0x6e, 0x0b, 0x32, 0x2c, 0x08, 0x31, 0x24, 0xe6, 0x45, 0x83, 0x94, 0x82, 0xd0, 0x81, 0x26, 0x22, 0xd3, 0x1a, 0xb1, 0x87, 0x7a, 0x9b, 0xb4, 0x1b, 0x8d, 0xaa, 0xd8, 0x68, 0xf3, 0x0e, 0x75, 0x07, 0x83, 0x2a, 0xc3, 0x41, 0x01, 0x12, 0x13, 0x3a, 0xa1, 0x7b, 0x2d, 0x47, 0x6d, 0x47, 0x6d, 0x89 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 7.19", + /* Message to be signed */ + 232, + { 0x9c, 0x84, 0xc1, 0x48, 0x6b, 0xc1, 0x2b, 0x3f, 0xa6, 0xc5, 0x98, 0x71, 0xb6, 0x82, 0x7c, 0x8c, 0xe2, 0x53, 0xca, 0x5f, 0xef, 0xa8, 0xa8, 0xc6, 0x90, 0xbf, 0x32, 0x6e, 0x8e, 0x37, 0xcd, 0xb9, 0x6d, 0x90, 0xa8, 0x2e, 0xba, 0xb6, 0x9f, 0x86, 0x35, 0x0e, 0x18, 0x22, 0xe8, 0xbd, 0x53, 0x6a, 0x2e, 0xb3, 0x07, 0xc4, 0x3b, 0x48, 0x50, 0xa8, 0xda, 0xc2, 0xf1, 0x5f, 0x32, 0xe3, 0x78, 0x39, 0xef, 0x8c, 0x5c, 0x0e, 0x91, 0xdd, 0x0a, 0xfa, 0xd4, 0x2c, 0xcd, 0x4f, 0xc6, 0x06, 0x54, 0xa5, 0x50, 0x02, 0xd2, 0x28, 0xf5, 0x2a, 0x4a, 0x5f, 0xe0, 0x3b, 0x8b, 0xbb, 0x08, 0xca, 0x82, 0xda, 0xca, 0x55, 0x8b, 0x44, 0xdb, 0xe1, 0x26, 0x6e, 0x50, 0xc0, 0xe7, 0x45, 0xa3, 0x6d, 0x9d, 0x29, 0x04, 0xe3, 0x40, 0x8a, 0xbc, 0xd1, 0xfd, 0x56, 0x99, 0x94, 0x06, 0x3f, 0x4a, 0x75, 0xcc, 0x72, 0xf2, 0xfe, 0xe2, 0xa0, 0xcd, 0x89, 0x3a, 0x43, 0xaf, 0x1c, 0x5b, 0x8b, 0x48, 0x7d, 0xf0, 0xa7, 0x16, 0x10, 0x02, 0x4e, 0x4f, 0x6d, 0xdf, 0x9f, 0x28, 0xad, 0x08, 0x13, 0xc1, 0xaa, 0xb9, 0x1b, 0xcb, 0x3c, 0x90, 0x64, 0xd5, 0xff, 0x74, 0x2d, 0xef, 0xfe, 0xa6, 0x57, 0x09, 0x41, 0x39, 0x36, 0x9e, 0x5e, 0xa6, 0xf4, 0xa9, 0x63, 0x19, 0xa5, 0xcc, 0x82, 0x24, 0x14, 0x5b, 0x54, 0x50, 0x62, 0x75, 0x8f, 0xef, 0xd1, 0xfe, 0x34, 0x09, 0xae, 0x16, 0x92, 0x59, 0xc6, 0xcd, 0xfd, 0x6b, 0x5f, 0x29, 0x58, 0xe3, 0x14, 0xfa, 0xec, 0xbe, 0x69, 0xd2, 0xca, 0xce, 0x58, 0xee, 0x55, 0x17, 0x9a, 0xb9, 0xb3, 0xe6, 0xd1, 0xec, 0xc1, 0x4a, 0x55 } +, + /* Signature */ + 129, + { 0x00, 0xe6, 0xbe, 0x96, 0xe1, 0x8d, 0xce, 0xbf, 0x83, 0x88, 0xba, 0x82, 0xec, 0x6f, 0x27, 0x10, 0x5b, 0xc2, 0x78, 0x71, 0x59, 0x5e, 0x01, 0x70, 0x5a, 0x2b, 0x97, 0xa1, 0xf4, 0xd7, 0x88, 0x38, 0x35, 0x2b, 0x0e, 0x7c, 0x0a, 0x2c, 0x62, 0x7a, 0x6f, 0xf3, 0x7d, 0xb1, 0x69, 0xa9, 0xa4, 0x64, 0x8a, 0xd2, 0x7a, 0xf0, 0x65, 0x33, 0xa4, 0xf0, 0x41, 0xd4, 0xc8, 0x20, 0xab, 0xf4, 0xfb, 0x52, 0x64, 0x64, 0x08, 0x14, 0x34, 0xdf, 0x36, 0x78, 0x85, 0x03, 0xc6, 0x5a, 0xf7, 0x62, 0xaa, 0x21, 0x9f, 0xb7, 0x6a, 0x91, 0xcb, 0xb4, 0x0e, 0x14, 0x92, 0xa9, 0xcb, 0x77, 0x36, 0x9b, 0xb4, 0xcc, 0xa1, 0x93, 0x4e, 0x38, 0x53, 0xde, 0x6c, 0x86, 0xa5, 0xdc, 0x11, 0x48, 0xed, 0xee, 0xb3, 0xb0, 0x03, 0x04, 0x14, 0xfe, 0x30, 0x83, 0xad, 0x72, 0xfe, 0x29, 0x5c, 0x29, 0xb5, 0xea, 0x9b, 0x66, 0x60 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 7.20", + /* Message to be signed */ + 165, + { 0x94, 0x0c, 0xda, 0xb4, 0xa3, 0xe9, 0x20, 0x09, 0xcc, 0xd4, 0x2e, 0x1e, 0x94, 0x7b, 0x13, 0x14, 0xe3, 0x22, 0x38, 0xa2, 0xde, 0xce, 0x7d, 0x23, 0xa8, 0x9b, 0x5b, 0x30, 0xc7, 0x51, 0xfd, 0x0a, 0x4a, 0x43, 0x0d, 0x2c, 0x54, 0x85, 0x94, 0x9a, 0x2b, 0x00, 0x7e, 0x80, 0x97, 0x8b, 0xbb, 0x19, 0x2c, 0x35, 0x4e, 0xb7, 0xda, 0x9a, 0xed, 0xfc, 0x74, 0xdb, 0xf5, 0xf7, 0x1d, 0xfd, 0x43, 0xb4, 0x6c, 0x93, 0xdb, 0x82, 0x62, 0x9b, 0xda, 0xe2,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1, 0x36, 0xa5, 0xb8, 0xdd, 0x96, 0xdd, 0x4b, 0x22, 0x5c, 0x5f, 0x49, 0xcd, 0xf6, 0x07, 0x1d, 0xbf, 0x71, 0x93, 0x5c, 0x7a, 0x6f, 0x1e, 0x2e, 0x9a, 0xf3, 0x02, 0x1c, 0x0d, 0x58, 0xa9, 0xb8, 0x1c, 0x9b, 0xde, 0x61, 0xfa, 0x47, 0x2c, 0x07, 0xa6 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 8: A 1026-bit RSA key pair", +{ + /* Modulus */ + 129, + { 0x03, 0x33, 0x12, 0x64, 0x88, 0xf7, 0xa2, 0x91, 0x51, 0x32, 0xe3, 0x0d, 0x5e, 0x97, 0xf6, 0xed, 0x7b, 0xbb, 0x67, 0xb6, 0x19, 0x85, 0x00, 0x8e, 0xae, 0xa2, 0xa5, 0xda, 0xfb, 0x96, 0xa4, 0x48, 0xab, 0x75, 0xce, 0x3d, 0x6e, 0x68, 0xa6, 0x26, 0x5e, 0x7c, 0x24, 0x56, 0x84, 0x99, 0x93, 0x24, 0xc8, 0x1e, 0x0b, 0xa6, 0x38, 0x98, 0x63, 0xfe, 0xb4, 0x88, 0xb3, 0xf2, 0x55, 0xd0, 0xd6, 0x19, 0xc1, 0x90, 0x40, 0xb7, 0x4c, 0x18, 0x9f, 0x0c, 0x9a, 0xf4, 0xb0, 0xd5, 0xa5, 0x5a, 0x54, 0x4c, 0x09, 0x0c, 0xd6, 0x15, 0x2c, 0x90, 0xa6, 0xf2, 0x55, 0x0d, 0x7d, 0x2a, 0x6b, 0x6d, 0x34, 0x7d, 0x5b, 0x1b, 0x9d, 0xfb, 0x1d, 0xe4, 0x40, 0x3c, 0x79, 0x66, 0x23, 0xd7, 0x03, 0xbf, 0x9d, 0xb4, 0x43, 0xbf, 0x67, 0x02, 0x68, 0x3b, 0x8d, 0x2a, 0x9c, 0x61, 0xe9, 0x36, 0x8a, 0xc4, 0x25, 0xa5, 0x81 } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 129, + { 0x01, 0x4a, 0x2b, 0x15, 0xdf, 0xa8, 0x83, 0x1d, 0xb4, 0xef, 0xa0, 0x5b, 0x19, 0x50, 0x84, 0xb7, 0x42, 0x73, 0x4e, 0xe1, 0x36, 0xf4, 0x48, 0x3f, 0x3b, 0xe2, 0x50, 0x9d, 0x2f, 0x61, 0x90, 0x23, 0xc3, 0x0a, 0x1f, 0xf2, 0xdf, 0x78, 0xcb, 0xd1, 0x17, 0xb1, 0x4f, 0x2c, 0x99, 0x13, 0x17, 0x1f, 0x72, 0x93, 0xb9, 0xfa, 0x6d, 0x41, 0xf0, 0xbd, 0x11, 0xa5, 0x31, 0x74, 0x74, 0x67, 0x54, 0x86, 0xd7, 0xf0, 0xae, 0xc0, 0xa7, 0x78, 0xba, 0x92, 0x0e, 0x81, 0xf5, 0x64, 0xd1, 0x59, 0x30, 0xcd, 0xde, 0xe7, 0xe2, 0xb0, 0x6a, 0xd8, 0xad, 0xb6, 0x12, 0x75, 0x1f, 0x4e, 0x38, 0x4d, 0x6f, 0x3f, 0xa0, 0xa6, 0x63, 0x9f, 0xd6, 0x2e, 0xdf, 0x86, 0xf5, 0x2c, 0x9f, 0xe0, 0x77, 0x62, 0x91, 0x83, 0x21, 0x83, 0xd3, 0x59, 0xb7, 0x34, 0x32, 0x60, 0xc9, 0x4e, 0x12, 0x5f, 0x4a, 0xb8, 0xbf, 0x43, 0x69 } +, + /* Prime 1 */ + 65, + { 0x01, 0xd6, 0xe7, 0xbd, 0x8e, 0x39, 0x5b, 0xbe, 0xf2, 0x10, 0x46, 0x49, 0xc0, 0x12, 0x78, 0xcc, 0x1c, 0x51, 0xc9, 0x68, 0x7d, 0xef, 0xb4, 0x59, 0x1f, 0x03, 0xb6, 0x78, 0x52, 0xa4, 0xbc, 0xb5, 0x30, 0x75, 0x0c, 0xf9, 0xbf, 0xca, 0xd0, 0x72, 0x8c, 0x53, 0x99, 0xd8, 0x70, 0x35, 0x01, 0x06, 0xcb, 0xa3, 0xec, 0x41, 0x6a, 0x31, 0xe4, 0x2d, 0x0b, 0x59, 0x75, 0x10, 0xff, 0x1c, 0x9d, 0x53, 0xbb } +, + /* Prime 2 */ + 65, + { 0x01, 0xbd, 0x46, 0x6f, 0x43, 0xa4, 0xd4, 0x61, 0x3e, 0x42, 0x64, 0xf0, 0x1b, 0x2d, 0xac, 0x2e, 0x5a, 0xa4, 0x20, 0x43, 0xf8, 0xfb, 0x5f, 0x69, 0xfa, 0x87, 0x1d, 0x14, 0xfb, 0x27, 0x3e, 0x76, 0x7a, 0x53, 0x1c, 0x40, 0xf0, 0x2f, 0x34, 0x3b, 0xc2, 0xfb, 0x45, 0xa0, 0xc7, 0xe0, 0xf6, 0xbe, 0x25, 0x61, 0x92, 0x3a, 0x77, 0x21, 0x1d, 0x66, 0xa6, 0xe2, 0xdb, 0xb4, 0x3c, 0x36, 0x63, 0x51, 0xf3 } +, + /* Prime exponent 1 */ + 64, + { 0xfb, 0x66, 0x85, 0x00, 0x65, 0x06, 0xe2, 0x0e, 0x01, 0x3a, 0x45, 0x2d, 0x51, 0xaf, 0x43, 0xe8, 0xea, 0x91, 0x08, 0x44, 0x13, 0xb0, 0xc8, 0xd3, 0x91, 0xfb, 0xdc, 0x88, 0xe2, 0x82, 0x0c, 0x89, 0x6e, 0x34, 0x1b, 0x31, 0x95, 0x69, 0x6b, 0x7e, 0x17, 0x33, 0xcf, 0x25, 0x38, 0x66, 0xef, 0xe5, 0xd0, 0x01, 0xd5, 0x7a, 0x88, 0x60, 0x34, 0xdc, 0x16, 0x4a, 0x35, 0x64, 0xbd, 0x36, 0x10, 0xf9 } +, + /* Prime exponent 2 */ + 64, + { 0xbe, 0x4e, 0x9e, 0x3b, 0x40, 0xf5, 0x6c, 0x62, 0x59, 0xaa, 0x1e, 0x5c, 0xdf, 0x56, 0x59, 0xb1, 0x6f, 0xb8, 0x42, 0x94, 0xe5, 0x8a, 0xd0, 0x16, 0xbd, 0x2c, 0x96, 0xcd, 0x08, 0xe6, 0xcf, 0x68, 0x54, 0xa1, 0x1c, 0xb8, 0x0a, 0xd4, 0xbe, 0x3e, 0x05, 0x7a, 0xaa, 0xcf, 0x02, 0xbd, 0x32, 0x63, 0x73, 0xa2, 0x35, 0xce, 0xb8, 0x9e, 0x82, 0x43, 0x0d, 0x6e, 0x6d, 0x47, 0xd6, 0xce, 0xf8, 0x35 } +, + /* Coefficient */ + 64, + { 0xc0, 0x23, 0x5c, 0x89, 0x73, 0xcf, 0xbf, 0x30, 0xbf, 0x1d, 0xd3, 0xc8, 0x39, 0xf0, 0x2c, 0x94, 0xc6, 0x9d, 0xc5, 0x34, 0xcb, 0xfc, 0x98, 0x88, 0x05, 0xd6, 0xfc, 0x46, 0x2a, 0xdb, 0xd3, 0x77, 0xd1, 0x75, 0xb9, 0xa9, 0x64, 0x60, 0x18, 0xd7, 0xfa, 0xb7, 0x5c, 0x1d, 0x1f, 0x7d, 0x61, 0xb7, 0x7f, 0xa7, 0x95, 0x59, 0xb8, 0x6f, 0xfa, 0x9e, 0xc6, 0xe2, 0x11, 0x33, 0xfa, 0x7f, 0x1a, 0x45 } + +} +, +{{ + "PKCS#1 v1.5 Signature Example 8.1", + /* Message to be signed */ + 181, + { 0x9a, 0x28, 0x20, 0xf3, 0xb9, 0x02, 0x9a, 0xbc, 0x18, 0x65, 0xeb, 0x06, 0xfe, 0x61, 0xb8, 0xd3, 0x97, 0xb6, 0x55, 0x72, 0xd6, 0x00, 0x61, 0xca, 0xa7, 0x4e, 0x63, 0x56, 0x93, 0x1e, 0x25, 0x6b, 0x89, 0x71, 0x2d, 0x18, 0x66, 0x84, 0xb4, 0xde, 0x1e, 0x14, 0xc9, 0xeb, 0xfe, 0xf1, 0x6e, 0x40, 0xd9, 0x9d, 0x10, 0x94, 0x39, 0x6c, 0x56, 0x1c, 0x88, 0x31, 0x77, 0xe5, 0x12, 0x6b, 0x9b, 0xe2, 0xd9, 0xa9, 0x68, 0x03, 0x27, 0xd5, 0x37, 0x0c, 0x6f, 0x26, 0x86, 0x1f, 0x58, 0x20, 0xc4, 0x3d, 0xa6, 0x7a, 0x3a, 0xd6, 0x09, 0x04, 0xe2, 0x15, 0xee, 0x6f, 0xf9, 0x34, 0xb9, 0xda, 0x70, 0xd7, 0x73, 0x0c, 0x87, 0x34, 0xab, 0xfc, 0xec, 0xde, 0x89, 0x7f, 0xdd, 0x67, 0x0a, 0x01, 0x46, 0x58, 0x68, 0xad, 0xc9, 0x3f, 0x26, 0x13, 0x19, 0x57, 0xa5, 0x0c, 0x52, 0xfb, 0x77, 0x7c, 0xdb, 0xaa, 0x30, 0x89, 0x2c, 0x9e, 0x12, 0x36, 0x11, 0x64, 0xec, 0x13, 0x97, 0x9d, 0x43, 0x04, 0x81, 0x18, 0xe4, 0x44, 0x5d, 0xb8, 0x7b, 0xee, 0x58, 0xdd, 0x98, 0x7b, 0x34, 0x25, 0xd0, 0x20, 0x71, 0xd8, 0xdb, 0xae, 0x80, 0x70, 0x8b, 0x03, 0x9d, 0xbb, 0x64, 0xdb, 0xd1, 0xde, 0x56, 0x57, 0xd9, 0xfe, 0xd0, 0xc1, 0x18, 0xa5, 0x41 } +, + /* Signature */ + 129, + { 0x03, 0x22, 0xd0, 0x0f, 0xc1, 0xd9, 0x66, 0x94, 0xf3, 0x6e, 0xae, 0xd2, 0x30, 0x90, 0x56, 0xf3, 0xea, 0x1c, 0x1c, 0xc2, 0x2b, 0x13, 0xb6, 0x5e, 0x79, 0x11, 0x8d, 0x20, 0x2c, 0x42, 0xd1, 0x61, 0x30, 0x99, 0x38, 0x05, 0x09, 0xda, 0x74, 0x35, 0xbb, 0x57, 0x92, 0x16, 0xfd, 0x57, 0x65, 0x06, 0x68, 0x42, 0xe3, 0x56, 0xa6, 0x41, 0x6f, 0xc8, 0x42, 0xa2, 0x4a, 0x9e, 0xa1, 0xbc, 0x6a, 0x90, 0x98, 0x05, 0x23, 0xb4, 0x28, 0xe3, 0x99, 0xbb, 0xd6, 0xfc, 0xdc, 0x2c, 0xb7, 0x71, 0xda, 0xf0, 0x03, 0x7a, 0x2d, 0xe8, 0xc7, 0x64, 0x9b, 0xd5, 0x33, 0x17, 0xde, 0x0e, 0x37, 0xc3, 0x14, 0xba, 0xb0, 0xc4, 0x37, 0xbb, 0xd7, 0x98, 0xdf, 0xb9, 0x65, 0x50, 0x6c, 0x34, 0x8b, 0x74, 0x2f, 0x13, 0x8e, 0xf1, 0xd1, 0xa2, 0x03, 0xe0, 0x51, 0xe3, 0x4b, 0xdd, 0x3a, 0x30, 0xe0, 0xfc, 0xe1, 0xac, 0x43 } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Signature Example 8.2", + /* Message to be signed */ + 118, + { 0xea, 0x9a, 0x1a, 0x04, 0xb7, 0xcf, 0x47, 0x8a, 0x89, 0x7a, 0x70, 0x8f, 0xd9, 0x88, 0xf4, 0x8e, 0x80, 0x1e, 0xdb, 0x0b, 0x70, 0x39, 0xdf, 0x8c, 0x23, 0xbb, 0x3c, 0x56, 0xf4, 0xe8, 0x21, 0xac, 0x8b, 0x2b, 0xdd, 0x4b, 0x40, 0xfa, 0xf5, 0x45, 0xc7, 0x78, 0xdd, 0xf9, 0xbc, 0x1a, 0x49, 0xcb, 0x57, 0xf9, 0xb7, 0x1b, 0x6d, 0x48, 0xb2, 0xb6, 0xa5, 0x7a, 0x63, 0xc8, 0x4c, 0xea, 0x85, 0x9d, 0x65, 0xc6, 0x68, 0x28, 0x4b, 0x08, 0xd9, 0x6b, 0xdc, 0xaa, 0xbe, 0x25, 0x2d, 0xb0, 0xe4, 0xa9, 0x6c, 0xb1, 0xba, 0xc6, 0x01, 0x93, 0x41, 0xdb, 0x6f, 0xbe, 0xfb, 0x8d, 0x10, 0x6b, 0x0e, 0x90, 0xed, 0xa6, 0xbc, 0xc6, 0xc6, 0x26, 0x2f, 0x37, 0xe7, 0xea, 0x9c, 0x7e, 0x5d, 0x22, 0x6b, 0xd7, 0xdf, 0x85, 0xec, 0x5e, 0x71, 0xef } +, + /* Signature */ + 129, + { 0x02, 0x68, 0x44, 0x09, 0x39, 0x99, 0x6a, 0xe5, 0xcb, 0xda, 0xfd, 0xbc, 0xa8, 0x6a, 0x7c, 0x42, 0x8a, 0x04, 0xb5, 0x78, 0xfe, 0x2d, 0xbe, 0x51, 0x26, 0xa8, 0x2f, 0xaf, 0x2b, 0xec, 0xff, 0x09, 0x9a, 0xc6, 0x0c, 0xb8, 0x1b, 0x11, 0x7f, 0x1e, 0xbf, 0x42, 0x04, 0xfe, 0x43, 0x70, 0x54, 0x8d, 0x5d, 0x2c, 0x46, 0x80, 0x63, 0x68, 0x2d, 0xa8, 0x7d, 0xc8, 0x01, 0x79, 0xbb, 0x3b, 0xba, 0x85, 0xa1, 0x48, 0xae, 0x2d, 0xe7, 0xdc, 0xb4, 0x94, 0xf4, 0x76, 0x22, 0x1d, 0xf8, 0x21, 0x9d, 0x4a, 0xae, 0x1e, 0x45, 0xaf, 0x65, 0xde, 0x33, 0x4a, 0x1a, 0x6d, 0xc1, 0x45, 0x52, 0x86, 0xae, 0x09, 0xcf, 0x26, 0x72, 0x58, 0x85, 0xe7, 0x74, 0x80, 0x99, 0x72, 0xd7, 0x81, 0x98, 0x05, 0xff, 0xf5, 0xa8, 0xc8, 0x9d, 0x37, 0x37, 0x64, 0x50, 0x73, 0x92, 0x49, 0xf5, 0x7e, 0xb1, 0x51, 0xb7, 0x1d, 0xc0 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 8.3", + /* Message to be signed */ + 23, + { 0x07, 0xdf, 0x58, 0x6b, 0x90, 0x5b, 0x23, 0xb9, 0x1a, 0xf1, 0x3d, 0xa1, 0x23, 0x04, 0xbf, 0x83, 0xec, 0xa8, 0xa7, 0x3e, 0x87, 0x1f, 0xf9 } +, + /* Signature */ + 129, + { 0x01, 0xbf, 0xd9, 0x15, 0xff, 0x77, 0x80, 0xf1, 0x4c, 0xcc, 0x55, 0xbd, 0x03, 0x06, 0xb3, 0xae, 0xda, 0x5b, 0x5b, 0x59, 0x55, 0xa8, 0x26, 0xd4, 0x52, 0x6b, 0x0b, 0xc7, 0x66, 0x15, 0x4f, 0xa8, 0xda, 0x59, 0x56, 0x05, 0x78, 0xcc, 0xd4, 0x88, 0x2f, 0xe9, 0x70, 0x92, 0xfb, 0xc7, 0x36, 0xfd, 0xa7, 0x3c, 0xee, 0xfd, 0x10, 0x38, 0x94, 0x06, 0x3e, 0x93, 0xe2, 0x2a, 0x7b, 0x5c, 0x44, 0xf7, 0xa8, 0x5e, 0x3b, 0xdb, 0x96, 0x71, 0x9a, 0x09, 0x37, 0x43, 0x03, 0xc9, 0x1e, 0xd7, 0xe2, 0x27, 0x49, 0xfe, 0x3c, 0x4d, 0x6b, 0x96, 0x69, 0x9d, 0x50, 0x7c, 0x50, 0xad, 0xcf, 0xbd, 0xfc, 0x13, 0x1d, 0x6b, 0x5f, 0x2c, 0xf1, 0x83, 0x0e, 0x31, 0xea, 0xbe, 0x39, 0xae, 0xb5, 0x17, 0x96, 0x9c, 0x94, 0xa8, 0x1c, 0xfe, 0xfe, 0x67, 0x31, 0xaa, 0x2c, 0xdf, 0xfe, 0x28, 0xc8, 0xaf, 0x71, 0x40, 0xf4 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 8.4", + /* Message to be signed */ + 116, + { 0x50, 0x0b, 0x87, 0x77, 0xc7, 0xf8, 0x39, 0xba, 0xf0, 0xa6, 0x4b, 0xbb, 0xdb, 0xc5, 0xce, 0x79, 0x75, 0x5c, 0x57, 0xa2, 0x05, 0xb8, 0x45, 0xc1, 0x74, 0xe2, 0xd2, 0xe9, 0x05, 0x46, 0xa0, 0x89, 0xc4, 0xe6, 0xec, 0x8a, 0xdf, 0xfa, 0x23, 0xa7, 0xea, 0x97, 0xba, 0xe6, 0xb6, 0x5d, 0x78, 0x2b, 0x82, 0xdb, 0x5d, 0x2b, 0x5a, 0x56, 0xd2, 0x2a, 0x29, 0xa0, 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ab, 0xd5, 0x66, 0xde, 0x35, 0xd1, 0x4f } + +} +, +{ + "PKCS#1 v1.5 Signature Example 8.5", + /* Message to be signed */ + 238, + { 0x6b, 0x3f, 0x6a, 0x63, 0xd4, 0xe7, 0x78, 0x59, 0x24, 0x3c, 0x9c, 0xcc, 0xdc, 0x98, 0x01, 0x65, 0x23, 0xab, 0xb0, 0x24, 0x83, 0xb3, 0x55, 0x91, 0xc3, 0x3a, 0xad, 0x81, 0x21, 0x3b, 0xb7, 0xc7, 0xbb, 0x1a, 0x47, 0x0a, 0xab, 0xc1, 0x0d, 0x44, 0x25, 0x6c, 0x4d, 0x45, 0x59, 0xd9, 0x16, 0xef, 0xa8, 0xbf, 0xf9, 0x62, 0x12, 0xb2, 0xf4, 0xa3, 0xf3, 0x71, 0xa1, 0x0d, 0x57, 0x41, 0x52, 0x65, 0x5f, 0x5d, 0xfb, 0xa2, 0x25, 0xf1, 0x08, 0x95, 0xa8, 0x77, 0x16, 0xc1, 0x37, 0x45, 0x0b, 0xb9, 0x51, 0x9d, 0xfa, 0xa1, 0xf2, 0x07, 0xfa, 0xa9, 0x42, 0xea, 0x88, 0xab, 0xf7, 0x1e, 0x9c, 0x17, 0x98, 0x00, 0x85, 0xb5, 0x55, 0xae, 0xba, 0xb7, 0x62, 0x64, 0xae, 0x2a, 0x3a, 0xb9, 0x3c, 0x2d, 0x12, 0x98, 0x11, 0x91, 0xdd, 0xac, 0x6f, 0xb5, 0x94, 0x9e, 0xb3, 0x6a, 0xee, 0x3c, 0x5d, 0xa9, 0x40, 0xf0, 0x07, 0x52, 0xc9, 0x16, 0xd9, 0x46, 0x08, 0xfa, 0x7d, 0x97, 0xba, 0x6a, 0x29, 0x15, 0xb6, 0x88, 0xf2, 0x03, 0x23, 0xd4, 0xe9, 0xd9, 0x68, 0x01, 0xd8, 0x9a, 0x72, 0xab, 0x58, 0x92, 0xdc, 0x21, 0x17, 0xc0, 0x74, 0x34, 0xfc, 0xf9, 0x72, 0xe0, 0x58,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df, 0x26, 0x78, 0x87, 0xe0, 0xac, 0xa7, 0x0b, 0x54, 0x1c, 0x4c, 0x1e, 0xea, 0x16, 0xb5 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 8.6", + /* Message to be signed */ + 10, + { 0x93, 0x29, 0xa5, 0x80, 0x90, 0xde, 0x8b, 0xe5, 0x7c, 0x42 } +, + /* Signature */ + 129, + { 0x01, 0x5c, 0xe2, 0x4a, 0x6f, 0x2b, 0x37, 0x3a, 0x19, 0x99, 0x7b, 0xb2, 0x0c, 0x18, 0xac, 0x65, 0x9f, 0x1e, 0xdc, 0x0f, 0x25, 0xc9, 0xe5, 0xbf, 0x76, 0xd5, 0x69, 0x99, 0x65, 0x20, 0xc2, 0x80, 0xef, 0xdc, 0xf1, 0x5e, 0x2d, 0x63, 0xca, 0xaf, 0xf6, 0xc7, 0x7a, 0xe0, 0x38, 0x97, 0x03, 0x7a, 0x06, 0x15, 0xf9, 0x83, 0x8c, 0x52, 0x10, 0x4e, 0x97, 0x25, 0x18, 0xe2, 0x90, 0xfa, 0xc3, 0x8f, 0x63, 0x24, 0x75, 0x30, 0xb4, 0xcf, 0x61, 0xc6, 0xec, 0xe3, 0x42, 0x9b, 0x53, 0x07, 0x81, 0xcf, 0x34, 0x96, 0x4f, 0x32, 0xae, 0x50, 0xf1, 0x09, 0x34, 0x63, 0x83, 0x86, 0xd3, 0xb4, 0xdf, 0x76, 0x1c, 0x59, 0x7d, 0x4a, 0xa7, 0xfe, 0xca, 0x26, 0x6c, 0x27, 0xf8, 0xce, 0x66, 0xad, 0xe1, 0xbe, 0x26, 0x59, 0xce, 0x14, 0x2b, 0xa5, 0xf9, 0x35, 0x88, 0x3c, 0x7e, 0x8c, 0x9b, 0x89, 0x57, 0xab, 0xf2 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 8.7", + /* Message to be signed */ + 211, + { 0x6a, 0xce, 0x0f, 0x1e, 0x1d, 0xc6, 0x3e, 0x39, 0x4a, 0x06, 0x1f, 0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59, 0x27, 0xd4, 0xa0, 0x96, 0x58, 0x7f, 0xc3, 0x8d, 0x3d, 0x64, 0x94, 0x39, 0x1e } +, + /* Signature */ + 129, + { 0x02, 0x73, 0xba, 0x2c, 0x50, 0x2b, 0x3f, 0x29, 0x84, 0xc5, 0x48, 0xd9, 0xf7, 0xd6, 0xc9, 0xb3, 0xd7, 0xfd, 0x46, 0x08, 0x78, 0xc8, 0x4d, 0x6b, 0xe3, 0x3b, 0x28, 0x10, 0x6e, 0x15, 0xfc, 0x22, 0x17, 0xef, 0xf7, 0x41, 0xcd, 0xc2, 0x66, 0x83, 0x4b, 0xea, 0xa8, 0x6d, 0xa4, 0x05, 0xf3, 0xca, 0xe6, 0x06, 0xcc, 0x61, 0xf2, 0x54, 0x7b, 0xb9, 0x22, 0x92, 0x03, 0x45, 0xfe, 0x8f, 0xbb, 0x5e, 0x7b, 0x6a, 0xbf, 0x91, 0xea, 0xe8, 0xc4, 0x26, 0x60, 0x64, 0x50, 0x25, 0xcc, 0x7f, 0xc0, 0x7a, 0x53, 0x4b, 0x76, 0xd3, 0x78, 0x75, 0xe3, 0xf4, 0x0d, 0x52, 0x70, 0xc1, 0x0e, 0xf4, 0x6c, 0x7f, 0xe4, 0x5a, 0xfa, 0xbc, 0xff, 0xae, 0x2a, 0x9c, 0x94, 0x11, 0xbd, 0x04, 0xd6, 0x1d, 0x4c, 0x0e, 0x5f, 0xfc, 0x02, 0x2c, 0xb3, 0x6a, 0x64, 0xb7, 0xc3, 0xa8, 0xc8, 0x9b, 0xfd, 0xe4, 0x36, 0xba, 0xfd } + +} +, +{ + "PKCS#1 v1.5 Signature Example 8.8", + /* Message to be signed */ + 157, + { 0xfd, 0xcc, 0x0f, 0x1e, 0x5d, 0xcb, 0xe5, 0x01, 0x6a, 0x6b, 0x0f, 0x8c, 0x28, 0xf5, 0xb3, 0x31, 0xff, 0x58, 0x28, 0x37, 0x13, 0x8d, 0xbf, 0x62, 0xef, 0x7f, 0xf6, 0x1b, 0xc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xd5, 0xc1, 0x5d, 0xff, 0xd3, 0xa2, 0x47, 0x8f, 0xd9, 0x33, 0x70, 0x80, 0xdc, 0xa1, 0x6b, 0x9c, 0x13, 0xe6, 0x23, 0x3b, 0x82, 0x92, 0xb2, 0xfd, 0xcc, 0x29, 0xe9, 0xbf, 0x3b, 0x21, 0xa7, 0x18, 0x78, 0xf3, 0x4e, 0xf5, 0xeb, 0x7c, 0xd5, 0x0a, 0xd4, 0x12, 0x03, 0x72, 0x5a, 0x0f, 0x1c, 0x66, 0x3f, 0x73, 0x42, 0xec, 0x7c, 0x3d, 0xf3, 0xd5, 0xaa, 0x51, 0xd0, 0x58, 0xdf, 0xcc, 0xce, 0x5f, 0xe6, 0x9d, 0x36, 0x3b, 0x42, 0x84, 0x32, 0x08, 0x79, 0xe8, 0x6d, 0x58, 0xb5 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 8.9", + /* Message to be signed */ + 92, + { 0x2d, 0x1f, 0xcd, 0x17, 0x66, 0xf7, 0xd4, 0x5f, 0x29, 0x59, 0x4f, 0x9d, 0x4f, 0x74, 0x39, 0x41, 0xae, 0x91, 0x2a, 0x97, 0x91, 0x1f, 0xfc, 0x3d, 0x65, 0xdc, 0xd9, 0x65, 0x60, 0x10, 0x77, 0x3b, 0xb0, 0x22, 0x4b, 0xa6, 0xdf, 0x11, 0x1b, 0x1c, 0x13, 0x68, 0x38, 0x4f, 0x24, 0x92, 0xfc, 0x4f, 0xa7, 0x28, 0x0c, 0x06, 0x65, 0x14, 0xae, 0x84, 0xf7, 0x61, 0x45, 0x63, 0xd9, 0x05, 0x2c, 0xa9, 0x4e, 0xf4, 0x46, 0xa3, 0x1b, 0x46, 0x3b, 0xd6, 0xc2, 0x50, 0x56, 0x80, 0x50, 0x88, 0xc1, 0xd3, 0x1a, 0xba, 0xff, 0x52, 0x15, 0xf7, 0xa8, 0xf8, 0x9e, 0x7b, 0x64, 0xf2 } +, + /* Signature */ + 129, + { 0x02, 0xc0, 0xe0, 0x71, 0xe8, 0x36, 0x90, 0xdc, 0x14, 0xd9, 0xa3, 0x7d, 0x61, 0xe0, 0xaf, 0xc2, 0x7d, 0xf9, 0x78, 0x03, 0x9d, 0xa6, 0x01, 0xca, 0x2c, 0xec, 0x1d, 0xec, 0x8f, 0x0d, 0x17, 0xd2, 0xff, 0xc4, 0x50, 0xe6, 0x78, 0x38, 0x0a, 0x02, 0x5a, 0x41, 0xc7, 0x46, 0x11, 0x8f, 0x58, 0x36, 0x42, 0x52, 0xa1, 0x22, 0x53, 0x9e, 0xcc, 0xbb, 0xb4, 0xab, 0x3d, 0x8d, 0x37, 0x7b, 0xdb, 0xb9, 0x11, 0xc5, 0x8a, 0x4c, 0xb9, 0x46, 0x2f, 0x36, 0xdc, 0x38, 0x92, 0x48, 0x50, 0x1b, 0xd0, 0x8f, 0x48, 0xe3, 0x53, 0x3b, 0x82, 0x59, 0x1a, 0x2a, 0x20, 0xcf, 0x62, 0xdf, 0x5f, 0x5a, 0x1f, 0x84, 0xea, 0x30, 0x0c, 0xb3, 0x94, 0x57, 0x13, 0x71, 0x41, 0xad, 0x8c, 0xd1, 0xd1, 0x85, 0xab, 0xb1, 0x7b, 0xa5, 0xd0, 0x3b, 0xe3, 0x48, 0xc0, 0x67, 0x97, 0xb0, 0x95, 0x58, 0xf0, 0x33, 0x1c, 0x24, 0xb9 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 8.10", + /* Message to be signed */ + 179, + { 0x4f, 0x46, 0x9a, 0xb7, 0x9c, 0xb8, 0x93, 0xa5, 0x3c, 0x0e, 0xe3, 0x81, 0x5a, 0x8b, 0xc0, 0x87, 0xeb, 0x74, 0xea, 0x36, 0x61, 0x5b, 0xdd, 0xc3, 0x33, 0xde, 0xe0, 0x5f, 0xc7, 0x26, 0x65, 0xaa, 0x6d, 0x0b, 0xd5, 0x9e, 0x47, 0x22, 0x98, 0x29, 0x83, 0x4b, 0x1f, 0x91, 0xc9, 0xcd, 0x81, 0xce, 0x28, 0xd6, 0x8f, 0x14, 0x82, 0x5a, 0x34, 0x5f, 0x3a, 0x4f, 0x38, 0xa0, 0x1b, 0x2d, 0xae, 0x59, 0x10, 0x07, 0x64, 0xaa, 0xb9, 0x90, 0xa8, 0x50, 0xb1, 0x1c, 0x13, 0xd5, 0xdf, 0xe4, 0x19, 0xf1, 0xd9, 0x20, 0xd0, 0x0c, 0xf1, 0x3b, 0xf4, 0x30, 0xe4, 0xca, 0x82, 0x87, 0x98, 0x9b, 0xee, 0xbe, 0xda, 0x3e, 0x5d, 0x40, 0x36, 0x02, 0x8c, 0x8e, 0xf9, 0x54, 0x6e, 0x35, 0x01, 0x50, 0xd1, 0x96, 0xf0, 0x05, 0x60, 0xba, 0xe1, 0x47, 0x22, 0x99, 0xe7, 0xf4, 0x29, 0x1d, 0x54, 0x46, 0x29, 0xc4, 0xf6, 0x52, 0xe3, 0x5c, 0xde, 0x4f, 0x80, 0x3e, 0x1b, 0x3c, 0xa3, 0x38, 0x09, 0x51, 0x5e, 0xf2, 0x3d, 0x25, 0x4b, 0x8e, 0x65, 0x20, 0x2a, 0x14, 0xa4, 0x11, 0xb1, 0xbc, 0x31, 0x5c, 0x5f, 0xfa, 0xec, 0xb8, 0x21, 0x11, 0x97, 0x80, 0x9d, 0xcb, 0x5c, 0xed, 0x68, 0x2c, 0x09, 0xf6, 0x7e, 0x41, 0xd1, 0x60, 0x2c } +, + /* Signature */ + 129, + { 0x01, 0x71, 0x29, 0x64, 0xea, 0x9a, 0xb9, 0x70, 0x29, 0x5b, 0x81, 0xb0, 0xfb, 0xd8, 0x35, 0x7e, 0x54, 0xb9, 0x36, 0xee, 0x87, 0x72, 0xd8, 0xae, 0x9c, 0x96, 0x12, 0x71, 0x6f, 0xcc, 0x2f, 0xcb, 0x78, 0x4c, 0xa9, 0xab, 0xee, 0xeb, 0xb8, 0xfc, 0xb6, 0x89, 0x82, 0x16, 0x1c, 0xc7, 0x4e, 0x40, 0xc7, 0xc0, 0x22, 0x47, 0xc0, 0xd0, 0x0e, 0x03, 0xbc, 0x8e, 0x1a, 0x70, 0x51, 0xb8, 0x7c, 0x90, 0xdd, 0x7d, 0x3d, 0xfc, 0x95, 0xe0, 0xb3, 0xc8, 0x8e, 0x7a, 0x0f, 0x37, 0xf3, 0x0e, 0x1b, 0xd5, 0xfe, 0x8b, 0x6e, 0xee, 0x46, 0x5a, 0x0b, 0x34, 0xcb, 0x59, 0xc6, 0x4e, 0xbd, 0xb5, 0x7d, 0x6f, 0x5f, 0xdf, 0xf2, 0xe7, 0x0b, 0xb1, 0x9c, 0x60, 0xd9, 0x88, 0xea, 0x95, 0x6c, 0xdc, 0xdd, 0x1b, 0xe5, 0x62, 0xf2, 0x6f, 0xb3, 0x7c, 0x34, 0xda, 0x52, 0xa9, 0xf9, 0x11, 0xb9, 0x97, 0x43, 0x81, 0x2c } + +} +, +{ + "PKCS#1 v1.5 Signature Example 8.11", + /* Message to be signed */ + 35, + { 0x52, 0xbb, 0x76, 0xc9, 0xea, 0x26, 0x5d, 0x6f, 0xad, 0x10, 0x83, 0x72, 0xff, 0xab, 0x25, 0x03, 0xbb, 0x20, 0xd3, 0x8d, 0x37, 0xdf, 0x19, 0x92, 0x54, 0xa2, 0xf6, 0xde, 0x0c, 0x4f, 0xca, 0x7a, 0x73, 0x03, 0x36 } +, + /* Signature */ + 129, + { 0x01, 0x0c, 0x55, 0x34, 0x23, 0x60, 0x22, 0x60, 0x15, 0x8a, 0x17, 0x13, 0x3b, 0x5d, 0x30, 0xef, 0xe9, 0x8e, 0x9a, 0xeb, 0x35, 0x3b, 0xab, 0x33, 0x71, 0xe4, 0x91, 0xcd, 0xbe, 0xbd, 0x35, 0x0a, 0x0a, 0x47, 0x0b, 0x9d, 0xbf, 0xd1, 0x89, 0x33, 0x51, 0x1f, 0x0d, 0x0e, 0x36, 0x94, 0xa8, 0xac, 0x4b, 0xf3, 0xf5, 0xb6, 0xeb, 0x9b, 0xf7, 0x1c, 0x23, 0xd9, 0x4c, 0x2e, 0x64, 0xbe, 0xb7, 0xb7, 0xc7, 0x22, 0x52, 0xca, 0x82, 0x7b, 0xd0, 0xc0, 0x56, 0x7b, 0xa8, 0xa1, 0x0a, 0x6d, 0x3b, 0x7e, 0x18, 0x7b, 0x0f, 0xd8, 0xe9, 0xe9, 0x5d, 0x4f, 0xe4, 0x80, 0xf2, 0x50, 0xdc, 0x7f, 0x03, 0x42, 0x29, 0x0e, 0x9a, 0x7d, 0x32, 0x70, 0x3a, 0x72, 0x13, 0xc6, 0x52, 0x13, 0xad, 0xed, 0x45, 0x57, 0x54, 0x78, 0x1f, 0x3d, 0xb7, 0x3e, 0x79, 0xe3, 0xd1, 0xba, 0x6a, 0xf7, 0xf6, 0x90, 0xfe, 0x81, 0x73 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 8.12", + /* Message to be signed */ + 72, + { 0x5f, 0x59, 0x7a, 0x19, 0xcb, 0xf5, 0x14, 0x30, 0xd3, 0xc6, 0xa2, 0x47, 0xa5, 0x23, 0x54, 0x07, 0x38, 0x6c, 0xae, 0xd0, 0xa2, 0x94, 0xf3, 0xf4, 0x1f, 0x3f, 0x37, 0x82, 0x50, 0xd4, 0xc5, 0xa2, 0xc9, 0x92, 0x75, 0xf9, 0x55, 0x44, 0xcc, 0xc1, 0xd7, 0x7e, 0x5c, 0x15, 0x1a, 0xf1, 0x3e, 0xd6, 0x0b, 0xe5, 0x22, 0xeb, 0x8c, 0xab, 0xed, 0x89, 0xa9, 0xb4, 0x5b, 0x09, 0x65, 0x46, 0x00, 0xf9, 0xfc, 0x75, 0x1e, 0x8b, 0x12, 0xe6, 0x7e, 0x52 } +, + /* Signature */ + 129, + { 0x00, 0x3b, 0xd4, 0xaa, 0x90, 0x81, 0xfe, 0x7e, 0x9f, 0x69, 0xa2, 0x69, 0xfe, 0xc8, 0xc8, 0xa7, 0x36, 0x70, 0xc0, 0x37, 0xe8, 0x5a, 0x1f, 0x36, 0xfc, 0xad, 0x74, 0xe5, 0xb5, 0x2d, 0x71, 0x0a, 0x5a, 0x18, 0xba, 0x09, 0x5b, 0x98, 0x10, 0xcc, 0x69, 0x37, 0xbc, 0x76, 0x34, 0x09, 0x51, 0xe7, 0xfe, 0xd7, 0x5b, 0x32, 0x6d, 0x0a, 0x3b, 0x0f, 0x26, 0xc2, 0x9c, 0xd5, 0xeb, 0x64, 0x15, 0xbb, 0xf7, 0xe2, 0xdd, 0x60, 0xad, 0xf6, 0xa0, 0xe6, 0x13, 0x02, 0xdc, 0xc6, 0x60, 0xcc, 0xe9, 0x10, 0x40, 0x8b, 0x4f, 0x99, 0xa4, 0x40, 0xae, 0x2a, 0xd6, 0xc3, 0x07, 0x72, 0xc2, 0x9a, 0x9e, 0x7b, 0x32, 0x80, 0xe2, 0xe2, 0x93, 0x9a, 0xba, 0x0b, 0x54, 0xab, 0x02, 0x2a, 0xa3, 0x29, 0x50, 0x22, 0x71, 0x8c, 0xd3, 0xb7, 0x87, 0xb1, 0x13, 0x79, 0x90, 0xfb, 0xeb, 0xef, 0xac, 0xec, 0x8c, 0xb7, 0x49 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 8.13", + /* Message to be signed */ + 36, + { 0x84, 0x0c, 0xc9, 0x00, 0xcb, 0x4b, 0x2c, 0xb6, 0x7a, 0x30, 0x4a, 0x9b, 0x02, 0x82, 0x6d, 0xb0, 0xd6, 0x67, 0x36, 0x92, 0x2e, 0x78, 0x70, 0x13, 0xd6, 0xbf, 0x21, 0x4d, 0xf5, 0x79, 0xff, 0x0c, 0xf4, 0x82, 0x1f, 0x9b } +, + /* Signature */ + 129, + { 0x01, 0x3b, 0x6c, 0x08, 0x0f, 0x68, 0x93, 0x95, 0x05, 0xe1, 0x87, 0xa4, 0x94, 0x82, 0xc7, 0x91, 0x27, 0x8d, 0xa3, 0xad, 0x4a, 0x74, 0x7c, 0x4f, 0x01, 0x79, 0x1b, 0x92, 0x48, 0x05, 0xb6, 0x82, 0xf6, 0x49, 0xbb, 0xd8, 0x0d, 0xba, 0x12, 0xfb, 0xbe, 0x59, 0x40, 0xf1, 0x7f, 0x27, 0xe7, 0x5d, 0x42, 0x67, 0x7c, 0x4c, 0xcc, 0xdf, 0xfd, 0x00, 0x48, 0x77, 0x2e, 0x36, 0x93, 0x4c, 0x69, 0x12, 0x12, 0x8f, 0xf9, 0x03, 0xaf, 0xea, 0x5e, 0x1c, 0xa8, 0xfe, 0x94, 0x24, 0xfc, 0x97, 0x9b, 0x21, 0x87, 0x98, 0x76, 0x98, 0xa5, 0xc5, 0xa7, 0x5e, 0x7d, 0x70, 0x70, 0xa2, 0xa6, 0x74, 0x85, 0x2b, 0xd8, 0x05, 0xbf, 0x13, 0xbb, 0xd1, 0x29, 0x6b, 0xff, 0x13, 0x10, 0xa6, 0xd6, 0xed, 0x45, 0xfd, 0xf8, 0x67, 0x2d, 0x52, 0x41, 0xe7, 0x4c, 0xd4, 0xc4, 0x19, 0x86, 0xe4, 0x36, 0x25, 0x50, 0x0c, 0x23 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 8.14", + /* Message to be signed */ + 216, + { 0xc6, 0x41, 0x71, 0x94, 0x13, 0x3b, 0x5f, 0x8e, 0xa6, 0x3d, 0x95, 0x58, 0x1c, 0x89, 0x6f, 0x5b, 0x9e, 0xf3, 0xd8, 0x7c, 0xf6, 0x6c, 0x02, 0x91, 0x64, 0x0f, 0x35, 0x0a, 0x32, 0x5b, 0x49, 0x11, 0x52, 0xe9, 0xd1, 0x43, 0x0d, 0x68, 0x70, 0x34, 0x6e, 0x46, 0x8e, 0x71, 0x99, 0x45, 0xd4, 0xe3, 0x65, 0xd0, 0x01, 0x07, 0x5f, 0xa9, 0x70, 0xf2, 0xa9, 0x87, 0x0a, 0x1c, 0x65, 0x43, 0x4b, 0xa1, 0x70, 0x02, 0x41, 0x2a, 0xcc, 0x4c, 0xc7, 0x4d, 0x28, 0xb2, 0xde, 0xe2, 0x9b, 0x36, 0xe3, 0x97, 0xb6, 0x8c, 0x5d, 0x59, 0xcf, 0x67, 0x7c, 0x29, 0xae, 0xe7, 0x93, 0xa9, 0x30, 0x0b, 0x7b, 0xf4, 0xc6, 0x73, 0xb3, 0xe0, 0xb6, 0x03, 0xa3, 0x61, 0x1c, 0xa9, 0x02, 0x44, 0xff, 0x08, 0x78, 0x75, 0xc5, 0x16, 0x88, 0x57, 0xcb, 0x92, 0xa9, 0x5a, 0xaa, 0x61, 0xdf, 0xf3, 0xc2, 0x12, 0xdc, 0x62, 0x06, 0xf1, 0x71, 0x47, 0xc4, 0x4b, 0x95, 0x07, 0xd5, 0xc8, 0x90, 0x75, 0x8b, 0xb3, 0x5b, 0xb7, 0x2a, 0x2a, 0x5e, 0x9d, 0x4d, 0xb2, 0x65, 0xe5, 0x37, 0x3a, 0x5b, 0x34, 0x02, 0x90, 0x4f, 0x0f, 0x1a, 0x12, 0x05, 0xd5, 0xbc, 0xc5, 0x90, 0x25, 0xd3, 0x22, 0x0a, 0x5d, 0xe1, 0xb1, 0x82, 0xa8, 0x4d, 0x30, 0x41, 0x2b, 0x84, 0x26, 0xd4, 0x69, 0x32, 0x32, 0x1b, 0x57, 0xef, 0x72, 0x64, 0x0a, 0xdd, 0x2c, 0xee, 0xbf, 0x5b, 0xe9, 0x68, 0x43, 0x6b, 0xcd, 0x12, 0x16, 0x90, 0x78, 0x84, 0x82, 0x32, 0x93, 0xb0, 0x10, 0xec, 0x28, 0xf0, 0xd9 } +, + /* Signature */ + 129, + { 0x01, 0x60, 0x47, 0xca, 0xad, 0x6c, 0x47, 0xbf, 0x27, 0xd0, 0xcc, 0xfa, 0x03, 0x41, 0x01, 0x7e, 0x56, 0x5e, 0x02, 0x8c, 0xf2, 0x6c, 0x8e, 0x66, 0x0f, 0x79, 0xe0, 0x91, 0xf3, 0x50, 0xce, 0xb2, 0xaa, 0xcf, 0x92, 0xf7, 0xd0, 0x1d, 0x37, 0x3f, 0x71, 0x55, 0x11, 0x9c, 0x07, 0x29, 0x17, 0xf2, 0x4f, 0x01, 0xbf, 0x74, 0x7b, 0xe2, 0xdc, 0xdc, 0x41, 0xd1, 0xbe, 0x58, 0x85, 0x35, 0xc2, 0xd6, 0xac, 0x17, 0x04, 0xc5, 0xfb, 0x16, 0xf6, 0xe5, 0xdc, 0x4b, 0xbc, 0x84, 0x53, 0xf5, 0x21, 0xdb, 0x73, 0x1e, 0xba, 0x78, 0x98, 0xe6, 0xe5, 0x21, 0x2b, 0x80, 0xce, 0x9d, 0xa0, 0xf1, 0x56, 0x28, 0x18, 0x99, 0x98, 0x31, 0x35, 0x03, 0xdf, 0xd4, 0x4e, 0x3d, 0x69, 0xde, 0x9b, 0xa9, 0xcb, 0x5e, 0xb3, 0x2a, 0xc4, 0x1c, 0xb8, 0xe3, 0x62, 0x1b, 0xa1, 0xd2, 0x91, 0xd0, 0xc5, 0xda, 0x24, 0x9f, 0x15 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 8.15", + /* Message to be signed */ + 15, + { 0xa6, 0x42, 0xf0, 0xf7, 0x0b, 0x4b, 0xd3, 0xb5, 0x4b, 0xe2, 0x20, 0x11, 0x9a, 0x7f, 0x79 } +, + /* Signature */ + 129, + { 0x00, 0xa0, 0x33, 0x6e, 0x63, 0x67, 0x52, 0x7b, 0xbf, 0x13, 0xb0, 0xa9, 0x33, 0xb6, 0x31, 0xc7, 0x2c, 0xb3, 0x3e, 0xab, 0xbc, 0x29, 0x2a, 0x0f, 0x8f, 0x75, 0x55, 0x0c, 0x22, 0x30, 0xfe, 0x82, 0x57, 0xf2, 0xaf, 0x76, 0xd5, 0x43, 0xcc, 0xd1, 0x07, 0xdd, 0x2c, 0x87, 0x78, 0xd3, 0xac, 0x8a, 0x7b, 0x5b, 0xb4, 0xac, 0xfa, 0x57, 0xf2, 0xaf, 0x6a, 0x23, 0x14, 0x95, 0x23, 0x5a, 0x51, 0xda, 0xdd, 0xb0, 0x83, 0xe3, 0x73, 0xb7, 0x77, 0xa9, 0x5c, 0xf9, 0xc4, 0xa9, 0xb6, 0xbe, 0x77, 0x51, 0xb6, 0x5f, 0xeb, 0x62, 0x3a, 0xb3, 0x34, 0x43, 0x36, 0x54, 0xb1, 0x21, 0x0f, 0x7f, 0x78, 0x2b, 0x17, 0x25, 0xc6, 0xba, 0x4f, 0xfd, 0x20, 0xd1, 0x7e, 0xd4, 0xb6, 0xec, 0x4a, 0x3a, 0xf6, 0x4b, 0xd2, 0x73, 0x47, 0x55, 0xb7, 0x73, 0x9e, 0xeb, 0xf4, 0x18, 0xf0, 0x9d, 0x3a, 0xff, 0x28, 0x9d, 0x13 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 8.16", + /* Message to be signed */ + 230, + { 0xca, 0x16, 0xe4, 0x3d, 0x9c, 0x82, 0xd9, 0xd3, 0x0c, 0x8f, 0xcb, 0x40, 0x22, 0x93, 0x3c, 0xff, 0xc7, 0xd7, 0x4c, 0xaa, 0x0d, 0xf4, 0x86, 0x35, 0x09, 0x31, 0x8e, 0xda, 0xba, 0x4e, 0x0d, 0x51, 0x99, 0x77, 0x9c, 0x03, 0x50, 0x4a, 0xff, 0xa2, 0x7d, 0x87, 0x19, 0x1b, 0x6b, 0xf6, 0x86, 0xa8, 0x4d, 0x97, 0x9a, 0x2f, 0xdd, 0x5b, 0x8a, 0x4c, 0x49, 0x32, 0x14, 0x45, 0xc6, 0xf7, 0x5d, 0x25, 0x23, 0x59, 0x17, 0xad, 0xbe, 0xe2, 0xa5, 0xcf, 0xf8, 0xa9, 0x7a, 0xef, 0x78, 0xc0, 0x09, 0x22, 0x10, 0x11, 0xd8, 0x3c, 0x0f, 0x9d, 0x37, 0x16, 0x08, 0x75, 0xaf, 0x73, 0x67, 0x71, 0x8b, 0x10, 0xee, 0xc3, 0xb4, 0x29, 0x90, 0xe6, 0x43, 0xf6, 0x37, 0x07, 0xcf, 0xbb, 0x30, 0xa7, 0xfa, 0x74, 0xab, 0x16, 0xa7, 0xeb, 0xf1, 0xc8, 0x38, 0xc3, 0xb2, 0x26, 0x37, 0xb6, 0x3c, 0xcd, 0xcb, 0x6e,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d, 0x1a, 0xc3, 0x1f, 0xb3, 0xef, 0xab, 0xe7, 0xc2, 0x88, 0xcb, 0x4e, 0xe7, 0x2a, 0x99, 0x2a, 0xc9, 0x6d, 0x1e, 0xdd, 0x78, 0xec, 0x72, 0x82, 0x73, 0x97, 0x0a, 0x79, 0x69, 0x95, 0xc3, 0xe2, 0xa3, 0x85, 0x81, 0xe2, 0x28, 0x03, 0x25, 0x8e, 0xb4, 0xcd, 0x9d, 0xa2, 0x04, 0x0f, 0xaf, 0x74, 0x1c, 0x54, 0x2a } + +} +, +{ + "PKCS#1 v1.5 Signature Example 8.17", + /* Message to be signed */ + 162, + { 0x3b, 0xaa, 0x7e, 0x9a, 0xda, 0x21, 0x43, 0xf8, 0x48, 0x82, 0x5d, 0x22, 0x93, 0x67, 0x04, 0xd1, 0xc9, 0x97, 0xb2, 0xda, 0x76, 0x76, 0x9c, 0x98, 0x6f, 0xa1, 0x52, 0xb8, 0x98, 0xae, 0xb1, 0x1c, 0x10, 0xb9, 0x45, 0x79, 0x76, 0x4f, 0x9d, 0xc9, 0x33, 0x65, 0x2a, 0x81, 0x03, 0x67, 0x04, 0x76, 0x95, 0x8d, 0x59, 0x86, 0x7a, 0xb2, 0x4a, 0x97, 0x12, 0x84, 0x05, 0x6e, 0x99, 0xc6, 0x48, 0xb7, 0x7e, 0x7a, 0x65, 0x36, 0x44, 0x87, 0x0f, 0xe4, 0xc7, 0xce, 0xf3, 0x7f, 0x90, 0x01, 0x60, 0x48, 0x72, 0xad, 0xed, 0xe1, 0x6a, 0xac, 0xed, 0x8a, 0xa5, 0xdf, 0x42, 0x05, 0x33, 0x04, 0xe4, 0xd1, 0x71, 0x12, 0x0d, 0x7a, 0xb3, 0xce, 0x81, 0xa4, 0xd1, 0xa2, 0x74, 0x98, 0xd1, 0x38, 0x01, 0x8f, 0x66, 0x21, 0xbd, 0xfc, 0x1d, 0x53, 0xe7, 0xf3, 0xc1, 0xa5, 0xaa, 0x5d, 0x62, 0xb0, 0x9a, 0x55, 0x4a, 0x56, 0xf1, 0xed, 0x4f, 0x38, 0x5a, 0x07, 0x68, 0xea, 0xa2, 0xda, 0x0c, 0x9f, 0x56, 0x37, 0x03, 0x4c, 0x2e, 0xef, 0x58, 0xcc, 0x35, 0x17, 0x8b, 0xc2, 0xa6, 0x27, 0x2c, 0xf5, 0x29, 0xb6, 0x5a, 0xdf } +, + /* Signature */ + 129, + { 0x01, 0xe6, 0x3b, 0x86, 0xd0, 0xc1, 0x59, 0x99, 0x09, 0x3d, 0x44, 0x28, 0xaf, 0x7c, 0x6d, 0xe6, 0x48, 0x07, 0x45, 0xd8, 0x19, 0xe4, 0x29, 0x62, 0x3f, 0x47, 0x2b, 0x45, 0xde, 0x61, 0xaa, 0x56, 0x7b, 0x60, 0xd9, 0x94, 0x79, 0x2a, 0x0d, 0x11, 0x65, 0x80, 0x55, 0x98, 0xf4, 0xe2, 0x1f, 0xe6, 0x13, 0x99, 0x9a, 0x96, 0x22, 0x5d, 0x0b, 0xba, 0x98, 0xf9, 0xcf, 0xbe, 0xe8, 0x3a, 0xf5, 0x85, 0xfa, 0x07, 0x84, 0x39, 0xa7, 0x42, 0x51, 0x5a, 0xe2, 0x18, 0xec, 0x31, 0xf8, 0xd5, 0x08, 0xf2, 0x9b, 0x0e, 0x58, 0x75, 0xfc, 0xa8, 0xf0, 0x4f, 0x11, 0xa1, 0xc8, 0x2f, 0x2b, 0xb0, 0xae, 0x52, 0x8f, 0xda, 0xd3, 0xca, 0x50, 0x75, 0xbb, 0x3f, 0x41, 0xbb, 0x57, 0x83, 0x34, 0x81, 0x33, 0xfb, 0xa8, 0xa0, 0xb3, 0xad, 0x95, 0x1a, 0x1a, 0x64, 0x9c, 0xa0, 0xf9, 0x75, 0x8b, 0x20, 0xc8, 0x70, 0xfd } + +} +, +{ + "PKCS#1 v1.5 Signature Example 8.18", + /* Message to be signed */ + 184, + { 0x7e, 0xb3, 0xc9, 0x8e, 0x46, 0xfd, 0x1b, 0x5c, 0x9f, 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e, 0x4b, 0x57, 0xd9, 0xcb, 0xb5, 0x78, 0xc7, 0x90, 0x74, 0xa2, 0xba, 0x86, 0x9c, 0x06, 0x02, 0x88, 0x68, 0xc5, 0xa3, 0xfc, 0xf4, 0xa5, 0xe3, 0x61, 0x83, 0x1b, 0xd8, 0xc0, 0x2c, 0x25, 0xb1, 0x2b, 0x90, 0x23, 0x4c, 0x8e, 0xa4, 0x82, 0x2f, 0xb6, 0x5e, 0x82, 0xd0, 0x91, 0xa9, 0x0f, 0x89, 0xb6, 0xc1, 0x15, 0x6e, 0x4b, 0x44, 0xd7, 0x8d, 0x32, 0xa6, 0x47, 0x37, 0xd6, 0x15, 0x87, 0xc0, 0xce, 0x3f, 0x4b, 0x34, 0x3e, 0x71, 0xf8, 0xf7, 0xa8, 0x4c, 0x6f, 0x8f, 0xc8, 0xae, 0xf8, 0xf4, 0x64, 0xc8, 0xb3, 0x59, 0xe4, 0xfb, 0x18, 0xad, 0xc6, 0x99, 0xc5, 0xa0, 0x76, 0x45, 0x37, 0x55, 0x93, 0x0c, 0x5f, 0x6f, 0xa7, 0x07, 0x1f, 0x8f, 0xec, 0xb8, 0x63, 0x1a, 0xa4, 0x14, 0xf5, 0x08, 0x35, 0x03, 0x8b, 0xe7, 0xab, 0x05, 0xa4, 0xb0, 0x50, 0xf3, 0xf5, 0x6e, 0x86 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 8.19", + /* Message to be signed */ + 184, + { 0x6a, 0x45, 0xee, 0x0b, 0x7e, 0xa8, 0x03, 0x68, 0xb2, 0xc4, 0x29, 0xaf, 0x28, 0x81, 0x53, 0xf4, 0x56, 0xcc, 0x66, 0x32, 0x17, 0xa8, 0xff, 0xcd, 0x2a, 0xa0, 0x5c, 0x5d, 0x32, 0x2d, 0xb7, 0x57, 0x56, 0xcd, 0xbc, 0x0f, 0x68, 0x41, 0x41, 0xfe, 0x6b, 0xca, 0xe1, 0x89, 0xbf, 0x24, 0xde, 0x1c, 0x8e, 0xdd, 0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 0x5f, 0x91, 0x8c, 0x6b, 0x06, 0xc9, 0x2a, 0x11, 0xa0, 0xbf, 0xd5, 0xef, 0xcc, 0xb7, 0xb0, 0x3a, 0x01, 0x07, 0x24, 0x14, 0x39, 0xd3, 0x4d, 0x31, 0x3d, 0x35, 0xb3, 0x6a, 0x0d, 0x8c, 0xa0, 0x81, 0x3c, 0x36, 0x23, 0xb2, 0xbd, 0x78, 0xf2, 0xe3, 0xa9, 0x71, 0x99, 0x64, 0x8d, 0xa3, 0x58, 0x06, 0xff, 0xc5, 0x8e, 0xed, 0x33, 0xac, 0x9f, 0xcf, 0x79, 0x53, 0x8f, 0xa8, 0x89, 0x15, 0xb1, 0xa5, 0x75, 0x85, 0x78, 0xb9, 0xa2, 0xdb, 0x01, 0x38, 0x04, 0xbf, 0x32, 0xe7, 0xa5, 0x6d, 0xc7, 0x24, 0x37 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 8.20", + /* Message to be signed */ + 79, + { 0x92, 0xa4, 0xb4, 0xbc, 0xe3, 0xda, 0xa0, 0xa7, 0xa6, 0x4b, 0x72, 0xad, 0x87, 0x1f, 0x3a, 0xa8, 0xea, 0xb5, 0xac, 0x40, 0x11, 0xaa, 0xae, 0xa2, 0xce, 0xeb, 0xa8, 0x92, 0x77, 0xc6, 0x43, 0x29, 0x57, 0x26, 0x26, 0xc9, 0x56, 0x88, 0x4f, 0x48, 0x54, 0xf8, 0x61, 0x3d, 0x22, 0x51, 0x8b, 0x14, 0xf0, 0x38, 0xfc, 0xaf, 0x9e, 0x68, 0xe1, 0x30, 0x02, 0xfb, 0x0a, 0x00, 0xa7, 0x8c, 0xc2, 0xea, 0x51, 0x44, 0xfc, 0x13, 0x11, 0x76, 0xd5, 0xe5, 0xd6, 0x7e, 0x10, 0x6a, 0x99, 0x87, 0x9c } +, + /* Signature */ + 129, + { 0x01, 0x24, 0xfd, 0x8b, 0x2a, 0xcf, 0x22, 0x37, 0xfc, 0x71, 0xa2, 0xee, 0x97, 0xe2, 0x6a, 0x4d, 0xab, 0x7d, 0xea, 0x82, 0x9e, 0x15, 0xbe, 0xb2, 0xf8, 0xa7, 0x37, 0x91, 0xa0, 0xba, 0x15, 0x2d, 0xa5, 0xb0, 0x6a, 0xdf, 0x34, 0x1d, 0x74, 0x09, 0xe8, 0xd3, 0xd3, 0x17, 0x5b, 0x51, 0x01, 0x34, 0x32, 0x5a, 0x35, 0x32, 0x97, 0xa8, 0xd6, 0xd6, 0x6c, 0x09, 0x70, 0x03, 0x22, 0xee, 0xc5, 0xe3, 0x3f, 0x62, 0x48, 0x6a, 0x21, 0x11, 0x30, 0xd7, 0x4c, 0x70, 0xdd, 0x92, 0x5d, 0xf8, 0x60, 0x2a, 0xe3, 0xc4, 0xc6, 0xcc, 0xaf, 0x93, 0xcc, 0x9a, 0x97, 0x0d, 0x1e, 0x85, 0x32, 0x60, 0xee, 0xc6, 0x94, 0x81, 0xc5, 0xf1, 0x33, 0x7e, 0x9d, 0xd3, 0xae, 0xda, 0x88, 0xd8, 0x82, 0x99, 0xbe, 0x08, 0x09, 0x5b, 0x71, 0x5a, 0x5b, 0x21, 0x66, 0xe6, 0x17, 0xc9, 0x26, 0x72, 0x2c, 0xed, 0xd6, 0xef, 0x34 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 9: A 1027-bit RSA key pair", +{ + /* Modulus */ + 129, + { 0x05, 0xf3, 0x74, 0x34, 0x88, 0x26, 0x1c, 0x6f, 0x06, 0x25, 0xe4, 0x32, 0xfa, 0x6e, 0xb8, 0x7f, 0xb1, 0x2b, 0x26, 0x21, 0x82, 0x90, 0xbf, 0xe3, 0x96, 0xba, 0x76, 0xea, 0x42, 0x61, 0x32, 0x2f, 0x81, 0x43, 0xe4, 0xb4, 0xeb, 0xcd, 0x5d, 0x2a, 0xe1, 0x9b, 0x0f, 0x9d, 0x8d, 0xcd, 0x2f, 0xc7, 0xe6, 0x82, 0x32, 0x08, 0xa7, 0x51, 0x83, 0x3d, 0x3b, 0x4e, 0x8e, 0x38, 0x7c, 0x39, 0xf8, 0xed, 0x6b, 0xbc, 0x9f, 0xda, 0xec, 0x32, 0xd3, 0xea, 0x9a, 0xbb, 0xff, 0x57, 0x47, 0x23, 0xf3, 0xf1, 0x22, 0x99, 0x90, 0x96, 0x3e, 0xa4, 0xfd, 0x9f, 0xb5, 0x44, 0xf6, 0x42, 0x90, 0xaa, 0x2e, 0xa7, 0xda, 0x63, 0x11, 0x91, 0xa2, 0x0d, 0xbc, 0x94, 0x23, 0xb4, 0x61, 0x23, 0x3b, 0x93, 0x72, 0x49, 0xf2, 0xf4, 0xea, 0x10, 0x92, 0x8f, 0xae, 0x2a, 0x6f, 0xe6, 0x64, 0xf1, 0x2c, 0x09, 0x23, 0xed, 0x11 } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 129, + { 0x01, 0x4c, 0xc3, 0x26, 0x32, 0x52, 0xf8, 0xc4, 0xfb, 0x77, 0xcd, 0x57, 0xa1, 0x42, 0x0c, 0x04, 0xc0, 0x43, 0x27, 0x8a, 0x0c, 0x45, 0xe7, 0xd4, 0x23, 0x79, 0x49, 0x3e, 0x34, 0x0f, 0x9c, 0xf1, 0xa9, 0x6f, 0x96, 0x06, 0x3a, 0xb7, 0x59, 0xd1, 0x63, 0x04, 0x06, 0xae, 0x28, 0x6a, 0x18, 0x34, 0xb6, 0xd1, 0xdb, 0x71, 0xee, 0x72, 0x2c, 0x93, 0x74, 0x5f, 0xdd, 0x4a, 0xd3, 0x3f, 0xaa, 0x72, 0xd8, 0x93, 0x51, 0xda, 0x69, 0x1a, 0x7d, 0x0a, 0x71, 0xd2, 0xc5, 0x5c, 0x57, 0x97, 0xd2, 0xcc, 0xb3, 0xb4, 0x62, 0x62, 0x08, 0xbc, 0x5f, 0x5c, 0x84, 0xfe, 0x43, 0x2f, 0x66, 0x4d, 0xc3, 0x0e, 0xde, 0x09, 0x63, 0xe6, 0x58, 0x45, 0x2b, 0x2a, 0xd5, 0xef, 0xa4, 0x93, 0x5a, 0x12, 0x2f, 0x46, 0x1d, 0x1e, 0xab, 0x84, 0x1c, 0x8a, 0xe0, 0xe6, 0xe8, 0x2f, 0xc1, 0xfe, 0xe8, 0x5d, 0x18, 0x1c, 0xbd } +, + /* Prime 1 */ + 65, + { 0x02, 0x94, 0xea, 0x0f, 0xa3, 0x4e, 0xc3, 0x13, 0x72, 0x33, 0x44, 0x20, 0x2e, 0x85, 0xec, 0xa2, 0x4b, 0x5d, 0xf6, 0x46, 0x1a, 0x1c, 0x30, 0x08, 0x7d, 0xca, 0xb5, 0xd2, 0x53, 0x39, 0x4a, 0xf5, 0x66, 0x6f, 0x03, 0x5c, 0x33, 0x35, 0x41, 0x0d, 0x8b, 0xb9, 0x86, 0x62, 0xc9, 0x78, 0xf6, 0x1d, 0x37, 0xdb, 0x4d, 0x83, 0xf0, 0xb2, 0x4c, 0xdc, 0xb6, 0x3f, 0xca, 0xdb, 0x79, 0xc5, 0x27, 0xf5, 0xab } +, + /* Prime 2 */ + 65, + { 0x02, 0x4e, 0x19, 0x16, 0x52, 0xf1, 0x70, 0x9f, 0xf4, 0x74, 0x37, 0x40, 0x85, 0x81, 0x88, 0x8a, 0x9d, 0xa1, 0x09, 0x17, 0xc5, 0xb5, 0xab, 0xaf, 0x91, 0x46, 0x10, 0x9f, 0xda, 0xc6, 0x94, 0x76, 0x6f, 0x4c, 0x8f, 0xb0, 0x57, 0x96, 0x8e, 0x84, 0x8d, 0x99, 0x58, 0x6b, 0x05, 0xf8, 0xa0, 0x2f, 0xba, 0x6c, 0xa1, 0xeb, 0x12, 0xba, 0x08, 0xdf, 0xd4, 0x9b, 0x62, 0xc2, 0x7a, 0x8f, 0x15, 0xf4, 0x33 } +, + /* Prime exponent 1 */ + 65, + { 0x01, 0x22, 0x7f, 0x36, 0xdc, 0x6b, 0x14, 0x27, 0x89, 0xfc, 0xaa, 0xa7, 0x12, 0x8b, 0xdf, 0x14, 0xfe, 0xd7, 0x90, 0x16, 0x04, 0x07, 0xfb, 0xbc, 0xdf, 0xbd, 0xa7, 0xe9, 0x88, 0x97, 0x18, 0x31, 0x81, 0x12, 0xae, 0x81, 0x6a, 0x28, 0xb0, 0x2d, 0x4a, 0x0b, 0x03, 0xdc, 0x8b, 0xfd, 0xd4, 0xff, 0xc6, 0xbb, 0x67, 0xf8, 0xe4, 0x65, 0x1a, 0x8f, 0xb0, 0xb3, 0x9d, 0x70, 0x96, 0xb7, 0x67, 0xf6, 0xfd } +, + /* Prime exponent 2 */ + 65, + { 0x02, 0x25, 0xec, 0x05, 0x3c, 0xe8, 0xda, 0x6f, 0x86, 0xad, 0xe3, 0x6b, 0xd2, 0xbf, 0x43, 0x93, 0x02, 0x91, 0x37, 0x5b, 0x1b, 0x1a, 0x51, 0xd4, 0x7d, 0x0b, 0x11, 0xa5, 0x17, 0x8a, 0x26, 0x83, 0x34, 0xf7, 0xe1, 0x94, 0x92, 0x1b, 0xb1, 0xd7, 0x5f, 0xea, 0x7f, 0x56, 0xc5, 0xaa, 0xcd, 0x05, 0x8d, 0xb3, 0x7d, 0x36, 0x08, 0x2e, 0xac, 0xe4, 0x83, 0x4b, 0x07, 0xbf, 0x7b, 0xdd, 0xea, 0xb4, 0xb7 } +, + /* Coefficient */ + 65, + { 0x02, 0x0b, 0xd0, 0xf5, 0x15, 0x80, 0x87, 0xed, 0xe3, 0x8c, 0xb5, 0xdc, 0x66, 0xe4, 0x01, 0x0a, 0xe4, 0xe4, 0x8c, 0xc0, 0x04, 0x2e, 0x15, 0x2c, 0xd5, 0xee, 0xb0, 0x51, 0xc9, 0xec, 0x45, 0xad, 0x23, 0x40, 0x24, 0x53, 0x52, 0xc0, 0x1d, 0x94, 0xc6, 0xa5, 0x26, 0xaa, 0x5a, 0x45, 0x4c, 0xdb, 0xae, 0xac, 0x85, 0x95, 0x34, 0x9b, 0xbe, 0x6a, 0x8d, 0x55, 0x19, 0xa3, 0xc9, 0xb7, 0xd0, 0x7c, 0x3a } + +} +, +{{ + "PKCS#1 v1.5 Signature Example 9.1", + /* Message to be signed */ + 13, + { 0x82, 0xe5, 0xc5, 0xaa, 0xe6, 0x4e, 0x60, 0x8b, 0x27, 0x50, 0x4b, 0x91, 0xdb } +, + /* Signature */ + 129, + { 0x01, 0x45, 0x82, 0xda, 0xe9, 0x35, 0xe6, 0xb2, 0xae, 0xff, 0x7d, 0x72, 0x50, 0x89, 0xda, 0xb0, 0x58, 0xc6, 0x78, 0xb2, 0xee, 0x28, 0xbc, 0xd4, 0x44, 0xa7, 0x2b, 0xdf, 0xac, 0x31, 0x46, 0x3e, 0x18, 0xe9, 0x4d, 0x7b, 0x5e, 0xcc, 0x84, 0xa4, 0x31, 0x69, 0x6a, 0x1c, 0xdd, 0x79, 0xf9, 0xc0, 0x8c, 0x33, 0xe1, 0xd4, 0xb3, 0x22, 0xdd, 0x27, 0x7b, 0x50, 0x3a, 0xe6, 0xe4, 0xf9, 0xc3, 0x15, 0x30, 0x5b, 0x43, 0x72, 0xfe, 0x45, 0xfe, 0x4a, 0x7e, 0xbb, 0xfc, 0x4a, 0xe5, 0x90, 0xfa, 0x3c, 0x52, 0x0b, 0xf8, 0x28, 0x15, 0x8f, 0x78, 0x20, 0x29, 0x9f, 0x09, 0xb1, 0x34, 0xed, 0xe1, 0x17, 0xb6, 0x72, 0xa1, 0xea, 0xc2, 0xf0, 0x50, 0xc0, 0x44, 0xb2, 0x55, 0xca, 0x8d, 0x45, 0x52, 0xd4, 0xb5, 0xf3, 0xf5, 0x7b, 0x87, 0x34, 0xdb, 0x24, 0x74, 0x50, 0x07, 0x44, 0xa5, 0x33, 0x75, 0x00, 0x5e } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Signature Example 9.2", + /* Message to be signed */ + 104, + { 0x77, 0xe0, 0xfb, 0xdc, 0xd6, 0xe0, 0x49, 0x8f, 0xc5, 0x68, 0x4f, 0xf1, 0x3d, 0x4c, 0x9f, 0x5b, 0x78, 0x0e, 0x77, 0xe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91, 0x8f, 0x2b, 0xbe, 0xc1, 0xd7, 0x52, 0x02, 0xaf, 0x24, 0x0a, 0x61, 0xcd, 0x2d, 0xcc, 0x55, 0x5c, 0xae, 0xae, 0x9a, 0x68, 0x57, 0x0d, 0x77, 0x81, 0x0c, 0xf1, 0xdf, 0x81, 0x23, 0xff, 0x41, 0xc0 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 9.3", + /* Message to be signed */ + 116, + { 0x0d, 0xfa, 0x5b, 0xaa, 0x1c, 0xdd, 0xb8, 0x34, 0x70, 0x7a, 0x5f, 0x8c, 0xc6, 0xec, 0xe5, 0x71, 0xa7, 0xa7, 0xfc, 0xa5, 0x67, 0x63, 0x62, 0xd2, 0xb2, 0x37, 0x41, 0xa9, 0x57, 0x0a, 0xe2, 0x63, 0x8f, 0x6b, 0x1c, 0x23, 0x89, 0x85, 0x36, 0x75, 0xcc, 0xc6, 0xcc, 0x1b, 0x4c, 0x6d, 0xae, 0x23, 0xcd, 0xa7, 0x1a, 0xb9, 0x6b, 0x5a, 0x2f, 0x22, 0x14, 0x57, 0x50, 0x43, 0x3e, 0x2d, 0x6b, 0xa4, 0x27, 0x6a, 0xc1, 0xff, 0x9a, 0x48, 0xaf, 0xc9, 0xf3, 0x12, 0xf4, 0x13, 0x37, 0x85, 0xca, 0x5a, 0xf3, 0x74, 0x66, 0x74, 0x31, 0x9a, 0x67, 0x57, 0xa1, 0x64, 0xe3, 0x4d, 0x14, 0x98, 0xbd, 0x55, 0x30, 0x90, 0x2e, 0x32, 0x18, 0x55, 0xe3, 0xbe, 0xd4, 0x08, 0x81, 0xf0, 0x05, 0x42, 0x25, 0x6a, 0xa2, 0x1a, 0x42, 0xfc } +, + /* Signature */ + 129, + { 0x01, 0xd1, 0x95, 0x41, 0x69, 0xaf, 0x58, 0x99, 0x3e, 0x14, 0x77, 0x2a, 0x94, 0xf1, 0x9b, 0xc4, 0x79, 0x24, 0xcc, 0xdb, 0x2e, 0x90, 0xee, 0x43, 0x36, 0xfb, 0x6e, 0x08, 0x49, 0x8a, 0xf4, 0xda, 0x26, 0x51, 0xa2, 0xb7, 0x83, 0x6c, 0x31, 0x3a, 0x57, 0xc8, 0x61, 0xb5, 0x51, 0x84, 0xec, 0x3b, 0x15, 0xfa, 0xc8, 0x14, 0x53, 0x51, 0xbe, 0xc5, 0xa7, 0x27, 0x0a, 0x3a, 0xa8, 0x69, 0x4d, 0xb4, 0xe9, 0xa9, 0x2c, 0xb9, 0x32, 0x7b, 0xb7, 0xa4, 0xf7, 0xb7, 0x0d, 0x24, 0x4e, 0xaf, 0x9e, 0xbf, 0xa9, 0xed, 0xfd, 0x4d, 0x54, 0x78, 0x2f, 0x3f, 0x97, 0x26, 0x26, 0x95, 0xb9, 0x7d, 0x41, 0x6e, 0x52, 0x7b, 0xe4, 0xea, 0x2d, 0xef, 0xfe, 0x6e, 0xb5, 0xe0, 0x6c, 0xda, 0x6f, 0x0a, 0x7e, 0x41, 0x66, 0x77, 0xac, 0x0f, 0xd6, 0xf8, 0x19, 0x5d, 0x4c, 0xe2, 0x89, 0x70, 0xd2, 0xca, 0x41, 0x1a, 0x2b } + +} +, +{ + "PKCS#1 v1.5 Signature Example 9.4", + /* Message to be signed */ + 45, + { 0x16, 0x7e, 0x79, 0x56, 0x8c, 0x77, 0x36, 0x69, 0x0c, 0x3b, 0xed, 0xbb, 0xc8, 0xd4, 0x24, 0xeb, 0x53, 0x6a, 0x12, 0x85, 0x5a, 0x60, 0xcd, 0xb1, 0x0f, 0x94, 0xba, 0x11, 0x23, 0x17, 0xe9, 0x17, 0xa1, 0xb7, 0xd6, 0xfc, 0xfa, 0xa3, 0x43, 0x8d, 0x68, 0xee, 0x09, 0xfd, 0x47 } +, + /* Signature */ + 129, + { 0x02, 0x9a, 0x2b, 0x90, 0x86, 0x14, 0xed, 0x7a, 0x5f, 0xab, 0x72, 0xf2, 0xa1, 0xc8, 0xe5, 0x48, 0xb6, 0xf8, 0xb8, 0xb4, 0x5b, 0x75, 0x81, 0xfd, 0x24, 0x51, 0xfe, 0x45, 0xa6, 0x22, 0xfa, 0x0f, 0x08, 0xdd, 0x0b, 0xa2, 0xe8, 0xf3, 0xc4, 0x17, 0x20, 0x1e, 0xa0, 0x27, 0x79, 0x10, 0x18, 0x4f, 0x37, 0x6d, 0xa8, 0x03, 0xfa, 0x72, 0xc5, 0x0d, 0x39, 0xbe, 0x28, 0x82, 0x52, 0x6d, 0x1e, 0x85, 0xdf, 0x9a, 0xb1, 0x79, 0x75, 0x76, 0x4a, 0xcf, 0xb2, 0x07, 0x36, 0x6f, 0x6c, 0xd2, 0xc8, 0xb1, 0x36, 0xa9, 0x99, 0xda, 0xaf, 0x48, 0xf1, 0xc0, 0x8a, 0x9e, 0xa1, 0xf0, 0x84, 0x25, 0xc2, 0x1b, 0x65, 0x41, 0x80, 0xda, 0x4a, 0xdf, 0x10, 0x9b, 0x4b, 0xc5, 0xb8, 0x17, 0xdd, 0x67, 0xbf, 0x7d, 0xaa, 0xb4, 0xa3, 0x84, 0x03, 0x4a, 0xb4, 0xad, 0xe6, 0x94, 0x89, 0x8c, 0xfc, 0x27, 0x2a, 0xb6, 0x53 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 9.5", + /* Message to be signed */ + 229, + { 0x0d, 0x03, 0xf7, 0x12, 0x84, 0xf2, 0xe4, 0x83, 0x24, 0x2d, 0x92, 0x3f, 0xd1, 0xe1, 0x53, 0xbc, 0x16, 0x0f, 0x0c, 0xdc, 0x2c, 0x0b, 0x76, 0xf1, 0xbc, 0x2c, 0xf7, 0xd1, 0xbe, 0x9c, 0xcc, 0x7f, 0xaf, 0xa6, 0xaf, 0xc3, 0x90, 0x34, 0x01, 0x84, 0x09, 0xcc, 0xfd, 0x16, 0x28, 0xa7, 0x0b, 0x35, 0x83, 0x33, 0xbd, 0x96, 0xee, 0xd3, 0xad, 0xf3, 0x14, 0x2b, 0x17, 0x60, 0xbf, 0x8a, 0x9b, 0xb1, 0x9e, 0xa2, 0x47, 0x3a,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 0xa1, 0x86, 0x1c, 0x1e, 0x71, 0xdd, 0x6f, 0xce, 0x19, 0x23, 0x71, 0x0d, 0xbc, 0xed, 0x43, 0x01, 0xfd, 0xcd, 0x4a, 0xad, 0x8f, 0x4f, 0xc2, 0x7d, 0xfa, 0x02, 0xa9, 0x4d, 0x91, 0xbd, 0x96, 0x20, 0x0a, 0xed, 0x8b, 0x3c, 0x5a, 0x96, 0xef, 0xee, 0x7d, 0x11, 0xaf, 0x90, 0x87, 0xfb, 0x81, 0x90, 0x5c, 0x5d, 0xf2, 0xc2, 0x4e, 0xd7, 0xed, 0x63, 0xd5, 0xfc, 0x22, 0xba, 0xbd, 0x6b, 0x9e, 0x3b, 0x57, 0xcd, 0x25, 0x41, 0x9a, 0x78, 0x17, 0xe9, 0x36, 0x16, 0xe9, 0x34, 0x54, 0xb9, 0x58, 0x53, 0xfe, 0x52, 0x04, 0xb5, 0x8c, 0x09, 0x8b, 0x46, 0xde, 0x0b, 0x3f, 0x01, 0xf5, 0x82, 0x76, 0x32, 0x48, 0xc2, 0x90, 0xb9, 0xe8, 0x09, 0x69, 0x65, 0x24, 0x42, 0xa4, 0xd8, 0xe5 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 9.6", + /* Message to be signed */ + 222, + { 0x4a, 0xca, 0x96, 0x3f, 0x14, 0xac, 0xf6, 0xa7, 0x9c, 0x51, 0x08, 0x1e, 0xf2, 0x57, 0x16, 0x66, 0x71, 0xe3, 0xb4, 0x5f, 0xee, 0x31, 0x24, 0x07, 0xba, 0x3c, 0xf6, 0xd7, 0x11, 0xab, 0xa1, 0xae, 0x25, 0xa4, 0xa8, 0xba, 0x45, 0x48, 0x19, 0xa3, 0x91, 0x2a, 0x31, 0x2e, 0x99, 0x0f, 0x1f, 0xa7, 0x4c, 0xbc, 0xb7, 0x27, 0x77, 0xf1, 0xc7, 0xc6, 0x63, 0xa2, 0xd1, 0xcd, 0xb2, 0xc5, 0xc0, 0x07, 0x4d, 0x45, 0x16, 0xf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 0x29, 0x35, 0x6c, 0xf4, 0xc3, 0xf1, 0xca, 0x19, 0x37, 0x76, 0xd5, 0xfe, 0xf4, 0x3f, 0xc5, 0x54, 0x17, 0x71, 0x66, 0x69, 0xde, 0x9a, 0xb2, 0xad, 0xdd, 0x3e, 0xa8, 0x8a, 0x90, 0xae, 0x93, 0x9a, 0x5e, 0xb1, 0x10, 0x13, 0xe2, 0x28, 0xae, 0x08, 0x16, 0xee, 0xfa, 0x4d, 0xd4, 0x2c, 0x6c, 0x08, 0xc8, 0x78, 0xbd, 0x58, 0xb4, 0x90, 0x40, 0x29, 0x6a, 0x86, 0x3b, 0xfd, 0x11, 0x28, 0x5f, 0x8b, 0xbd, 0x31, 0x5b, 0xe1, 0x6d, 0x2d, 0x65, 0xd7, 0xf5, 0xe5, 0xf2, 0x6a, 0xa9, 0x71, 0x47, 0xf9, 0x5f, 0x5e, 0xe3, 0x6f, 0x98, 0x9a, 0xa8, 0x96, 0xd7, 0xf9, 0xf1, 0xb3, 0x05, 0x1f, 0x82, 0x42, 0x44, 0xf9, 0x05, 0x96, 0x72, 0x3d, 0x11 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 9.7", + /* Message to be signed */ + 4, + { 0xa7, 0x5a, 0x45, 0x80 } +, + /* Signature */ + 129, + { 0x00, 0x4f, 0xe4, 0xc5, 0xd9, 0x14, 0x3c, 0x85, 0x1e, 0x46, 0x16, 0x7c, 0xc1, 0x81, 0x57, 0x5c, 0x07, 0x5e, 0x69, 0xb9, 0x81, 0xf9, 0xc1, 0x03, 0xf9, 0xd9, 0xb0, 0x11, 0xff, 0x8b, 0x29, 0xba, 0x55, 0xa4, 0x31, 0x87, 0xce, 0x87, 0x77, 0x99, 0x63, 0x17, 0xa0, 0x3c, 0x9d, 0x90, 0xaf, 0xc1, 0x89, 0x0a, 0x9a, 0xde, 0xec, 0x8e, 0xac, 0x08, 0x7f, 0x99, 0xb8, 0x15, 0xe6, 0xeb, 0x2b, 0x87, 0x1d, 0xcd, 0xdc, 0x80, 0x92, 0x24, 0x9d, 0x8f, 0x51, 0x3c, 0x6c, 0x56, 0x09, 0xfd, 0xae, 0x2c, 0xfc, 0x6b, 0xf0, 0x1f, 0xcb, 0x80, 0x25, 0xa4, 0xf7, 0x9b, 0xf1, 0x2a, 0xa8, 0xe1, 0x09, 0x82, 0x9a, 0x0b, 0xb3, 0x8a, 0x09, 0xd1, 0xa3, 0x93, 0x65, 0xe0, 0x40, 0x56, 0x52, 0xda, 0xe4, 0x51, 0xe5, 0xc3, 0x29, 0x8f, 0x47, 0x04, 0x05, 0x98, 0xec, 0xd7, 0x0e, 0x4b, 0x40, 0x33, 0x89, 0xbc, 0xd5 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 9.8", + /* Message to be signed */ + 109, + { 0x7c, 0xfc, 0x00, 0xa6, 0x43, 0xae, 0x99, 0x79, 0x68, 0x01, 0xee, 0x3c, 0xeb, 0xe2, 0xcb, 0xb1, 0xa6, 0xbe, 0x1c, 0xac, 0x15, 0xc6, 0x48, 0xd4, 0xba, 0x33, 0x01, 0x29, 0x38, 0x71, 0xa9, 0x9f, 0x7c, 0xb1, 0x43, 0xc1, 0x28, 0xc7, 0x7f, 0x96, 0x31, 0x1f, 0xe4, 0x3a, 0x39, 0x01, 0xdf, 0x2c, 0x2a, 0x5c, 0x40, 0x4b, 0xe8, 0x31, 0x46, 0x97, 0xe0, 0x9b, 0x2e, 0x80, 0xaa, 0xc6, 0xac, 0x39, 0x97, 0x1b, 0xbe, 0x0d, 0xbc, 0x26, 0x67, 0x3f, 0x31, 0x95, 0x9f, 0x23, 0x8e, 0xaf, 0xd1, 0x50, 0x12, 0xe4, 0x96, 0x7d, 0x33, 0x55, 0x18, 0x92, 0xa3, 0xd3, 0x65, 0x1f, 0xe4, 0x46, 0x9b, 0x2d, 0xba, 0x45, 0x57, 0xdf, 0x89, 0x3a, 0xb6, 0xb9, 0x4f, 0x13, 0x25, 0xc3, 0xa1 } +, + /* Signature */ + 129, + { 0x05, 0x98, 0x5a, 0x4c, 0xce, 0xd0, 0xe8, 0xfd, 0xc5, 0x89, 0x24, 0xed, 0xba, 0x9e, 0x40, 0x0e, 0x67, 0x48, 0x21, 0x4f, 0x8d, 0x0b, 0x83, 0xaa, 0xfa, 0x20, 0x35, 0x0b, 0xbf, 0x0e, 0x68, 0x76, 0xca, 0x5a, 0x9a, 0xf3, 0x97, 0x0d, 0xd6, 0x3b, 0xe6, 0x84, 0xf9, 0x93, 0x6d, 0xb2, 0x82, 0xff, 0x8b, 0x53, 0xcf, 0x5f, 0x1b, 0xb1, 0xcb, 0xf4, 0x47, 0x33, 0x01, 0xf3, 0x72, 0xd9, 0x94, 0x8a, 0xf9, 0x39, 0x1b, 0x20, 0x02, 0xb2, 0xbe, 0x3e, 0x45, 0xff, 0x24, 0xa2, 0xd8, 0x99, 0xae, 0x8b, 0x52, 0xb6, 0x71, 0xb0, 0x4b, 0xab, 0x46, 0x01, 0x06, 0xbe, 0xdc, 0xfa, 0xc0, 0x13, 0x95, 0x9a, 0x48, 0x18, 0x95, 0x98, 0x42, 0x7f, 0xb9, 0x57, 0x15, 0x9a, 0x6d, 0x32, 0x9c, 0x19, 0xf3, 0x6c, 0xa7, 0x53, 0x81, 0xb9, 0x35, 0x0d, 0x34, 0x38, 0x9c, 0x16, 0xe1, 0x80, 0xa8, 0x51, 0xe4, 0x57, 0xcd } + +} +, +{ + "PKCS#1 v1.5 Signature Example 9.9", + /* Message to be signed */ + 206, + { 0x3d, 0x90, 0xde, 0x72, 0x35, 0x51, 0x59, 0x49, 0x24, 0x5f, 0x49, 0x03, 0x68, 0xc1, 0xf4, 0x93, 0x83, 0xe4, 0x4c, 0x1d, 0xb5, 0x1d, 0xd5, 0x38, 0x5b, 0xdf, 0xf5, 0xbd, 0x34, 0x45, 0x0e, 0x63, 0xce, 0x42, 0x15, 0x0b, 0x44, 0x1e, 0xf9, 0xeb, 0xc7, 0x29, 0xa9, 0x03, 0x34, 0x53, 0xf0, 0xa9, 0x39, 0x9f, 0xf6, 0x86, 0x1f, 0x50, 0x65, 0xb6, 0x66, 0x6d, 0xc2, 0x0b, 0x28, 0x72, 0x03, 0x42, 0x8e, 0x72, 0xbd, 0xf4, 0xcb, 0x74, 0x8a, 0xc8, 0xd4, 0xa5, 0x5f, 0x43, 0xd2, 0x23, 0x5e, 0x0a, 0xb2, 0xec, 0x2c, 0xf2, 0xb0, 0x6a, 0x01, 0x5f, 0x41, 0xe3, 0x51, 0x68, 0xac, 0x7e, 0x3c, 0x56, 0x8f, 0x2f, 0x16, 0xef, 0x57, 0x28, 0xb2, 0xbe, 0x95, 0x24, 0x91, 0x9d, 0x36, 0x76, 0xd6, 0x8f, 0x53, 0x7e, 0xfe, 0xf2, 0x9a, 0x05, 0xaf, 0x97, 0xcf, 0xed, 0x7c, 0xe9, 0xec, 0x45, 0xc1, 0x2f, 0x16, 0x5e, 0x4d, 0x7a, 0x4f, 0xe7, 0x2b, 0x99, 0xea, 0xbf, 0x83, 0x31, 0x6c, 0xdf, 0x2b, 0xd1, 0x64, 0x4b, 0x82, 0xfa, 0x13, 0xe4, 0xff, 0xc4, 0x49, 0xe7, 0x6d, 0x44, 0xc3, 0x87, 0x69, 0x63, 0x51, 0x47, 0x8b, 0x1a, 0x0f, 0x85, 0x96, 0x15, 0xda, 0x90, 0x5f, 0x20, 0xe6, 0x8b, 0x24, 0x56, 0x5c, 0x87, 0x3f, 0x83, 0x4e, 0x59, 0x34, 0x58, 0x51, 0x8a, 0xde, 0x41, 0xc1, 0x42, 0x81, 0x74, 0xda, 0x0c, 0x47, 0x66, 0x3a, 0x76, 0x00, 0xc6, 0x50, 0x25, 0x01, 0x5e, 0x09, 0xc1 } +, + /* Signature */ + 129, + { 0x00, 0x98, 0x13, 0xb2, 0xfd, 0xc5, 0x1b, 0xff, 0x88, 0xde, 0xdb, 0xec, 0xa3, 0xb1, 0x4a, 0xe5, 0x8b, 0xc7, 0xe7, 0x14, 0xc1, 0xd9, 0x2d, 0x74, 0x26, 0xe4, 0x94, 0x4e, 0xf9, 0x3e, 0xf9, 0xce, 0x6d, 0x10, 0xdc, 0x98, 0x9e, 0xaf, 0xe7, 0x34, 0x8d, 0x0a, 0x95, 0xf9, 0x9f, 0x56, 0x94, 0x8f, 0x72, 0x60, 0x2a, 0xc5, 0xe8, 0x61, 0x4f, 0x6b, 0x38, 0xe6, 0x8d, 0xa7, 0x9f, 0x48, 0xe2, 0x76, 0x8e, 0xda, 0x58, 0x64, 0xcf, 0xf2, 0x54, 0x51, 0x37, 0xf3, 0xcf, 0x4d, 0x81, 0xa5, 0xae, 0xb8, 0x9b, 0x21, 0x07, 0x26, 0x74, 0xca, 0xeb, 0xa0, 0x00, 0x71, 0x00, 0xc0, 0x7e, 0xf4, 0xdc, 0xbb, 0xd0, 0x5a, 0xfb, 0xad, 0x9e, 0x8b, 0x30, 0xd7, 0x46, 0xea, 0x36, 0x0d, 0x6c, 0xf8, 0x75, 0xd1, 0x0a, 0x67, 0xa5, 0x7f, 0x4b, 0x5d, 0xf4, 0x12, 0x1d, 0x72, 0x97, 0xa4, 0xbd, 0xce, 0x12, 0x8c, 0xb5 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 9.10", + /* Message to be signed */ + 253, + { 0x20, 0xe6, 0xa3, 0xfe, 0x16, 0xb5, 0x21, 0xb3, 0xc1, 0xe6, 0xae, 0x99, 0x3e, 0xc6, 0xe8, 0x49, 0xa9, 0xc1, 0x1f, 0x20, 0x42, 0xa2, 0xd4, 0xce, 0x89, 0xcf, 0x0f, 0x99, 0xe1, 0xb4, 0xb9, 0x47, 0x1d, 0xa9, 0xa1, 0x73, 0x0d, 0xa8, 0x85, 0x1f, 0xc5, 0xab, 0x3c, 0x09, 0x22, 0x05, 0x5f, 0x00, 0x37, 0x58, 0xb2, 0x35, 0xc2, 0x8d, 0xe4, 0x08, 0x80, 0x66, 0x3f, 0xcd, 0x80, 0x14, 0x07, 0x18, 0x15, 0xdd, 0x06, 0x49, 0x4a, 0x54, 0x7c, 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129, + { 0x01, 0xf0, 0x2b, 0x3f, 0x83, 0x91, 0x23, 0xaf, 0xf2, 0xa3, 0xf4, 0x3d, 0xa5, 0xaa, 0xa0, 0xb6, 0xbb, 0xb6, 0x0c, 0x04, 0x37, 0x82, 0xf4, 0x96, 0x2a, 0x7b, 0x9f, 0x02, 0x5c, 0x94, 0x8e, 0x34, 0x32, 0x2e, 0x98, 0xde, 0x37, 0x03, 0xe3, 0xbb, 0x45, 0xa7, 0x06, 0xa2, 0xbb, 0x05, 0x09, 0xbe, 0xd9, 0xf4, 0x10, 0x52, 0x8c, 0x88, 0x1a, 0xb9, 0xa1, 0xdc, 0x01, 0x97, 0x06, 0x8c, 0x37, 0x28, 0xc3, 0x71, 0x6d, 0x83, 0x81, 0xd9, 0xf8, 0x67, 0x80, 0xfe, 0x78, 0xa6, 0x43, 0x4b, 0x72, 0xf5, 0x1e, 0x69, 0xcd, 0x32, 0xa7, 0x21, 0x3c, 0xce, 0xa7, 0x43, 0xb3, 0x3c, 0x3c, 0x96, 0xeb, 0x00, 0x42, 0xfb, 0x98, 0xa7, 0x0c, 0x2e, 0x52, 0xfc, 0x17, 0x8a, 0xb2, 0xcb, 0x9f, 0xf8, 0xbd, 0xdd, 0xc1, 0x04, 0x6b, 0x08, 0xe0, 0x47, 0xba, 0xdd, 0xd6, 0x5a, 0x45, 0xa4, 0xe6, 0x53, 0x39, 0xd7, 0x25 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 9.11", + /* Message to be signed */ + 159, + { 0x6e, 0xb4, 0x9f, 0x8a, 0xbc, 0x5b, 0x49, 0x48, 0x72, 0x0a, 0x7f, 0x42, 0xf7, 0x40, 0x84, 0x78, 0x00, 0x22, 0xe0, 0xe9, 0xf9, 0xf6, 0x88, 0x86, 0xd9, 0xf3, 0x4e, 0x7f, 0x7f, 0x8a, 0xc1, 0x54, 0xdb, 0xe1, 0x9c, 0x91, 0xb8, 0xed, 0x38, 0xec, 0x03, 0x6b, 0x61, 0x42, 0x12, 0xca, 0x35, 0xf7, 0x9e, 0xd8, 0x74, 0x57, 0x9e, 0x24, 0x85, 0xda, 0xc8, 0x20, 0x5d, 0x0e, 0x56, 0xb4, 0xb4, 0xc0, 0x00, 0x0a, 0x8a, 0x75, 0xa6, 0xd4, 0x97, 0xfc, 0x51, 0x19, 0x11, 0x1a, 0x40, 0xdb, 0x51, 0x3d, 0xf6, 0x61, 0x96, 0x55, 0xb5, 0x8a, 0x11, 0x6f, 0xab, 0xee, 0x08, 0x2b, 0xfa, 0x79, 0x37, 0x3d, 0x91, 0x76, 0x56, 0x87, 0x10, 0x11, 0x24, 0x18, 0x87, 0xf4, 0x42, 0x60, 0x8b, 0xd1, 0xeb, 0x1d, 0x95, 0xd1, 0x76, 0x80, 0x65, 0xfa, 0x63, 0x32, 0x4f, 0xab, 0x27, 0x36, 0xf9, 0x22, 0x70, 0x5c, 0xf2, 0x89, 0xfd, 0xe9, 0x26, 0x74, 0x33, 0x85, 0x92, 0x07, 0xa8, 0xbc, 0xf1, 0x2d, 0x17, 0x86, 0x1c, 0xfd, 0x06, 0x2b, 0x88, 0xdf, 0x78, 0x87, 0x0d, 0x5a, 0x5e, 0x91, 0x13, 0x1b, 0x63 } +, + /* Signature */ + 129, + { 0x02, 0xa2, 0xfa, 0x32, 0x71, 0x77, 0x96, 0x71, 0x0b, 0x52, 0xb0, 0x51, 0x90, 0x6c, 0xdb, 0x98, 0x15, 0xb2, 0xd0, 0x36, 0x6c, 0x07, 0x0a, 0x78, 0xff, 0x72, 0xd4, 0x59, 0x42, 0xd7, 0xad, 0xde, 0xae, 0x7e, 0xdc, 0x73, 0xca, 0x93, 0x01, 0xf1, 0xf9, 0xfa, 0xe6, 0x8a, 0x0b, 0xd4, 0xb1, 0xdf, 0x05, 0xa9, 0xa6, 0x71, 0xf8, 0xa5, 0xb7, 0xd4, 0x5c, 0xd1, 0x1f, 0xdc, 0x0f, 0x0b, 0xa0, 0x9d, 0x25, 0xce, 0xc3, 0xb6, 0x30, 0x3d, 0x9a, 0x66, 0x6c, 0x76, 0x32, 0x64, 0x96, 0xea, 0x31, 0xae, 0x38, 0x86, 0xa0, 0xc3, 0xb7, 0xd2, 0x27, 0x62, 0xee, 0xa2, 0x78, 0x93, 0x4b, 0x96, 0xa4, 0xf9, 0x0a, 0x50, 0x1a, 0xd3, 0x08, 0x8f, 0x70, 0x2e, 0x14, 0x76, 0x3c, 0xe3, 0x38, 0x46, 0xe2, 0xfd, 0xbe, 0x6d, 0x66, 0x1c, 0xb8, 0x2e, 0x6d, 0x98, 0x9d, 0xf3, 0xc5, 0xac, 0x8f, 0xe4, 0x0a, 0x85, 0x62 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 9.12", + /* Message to be signed */ + 76, + { 0x45, 0xcf, 0xec, 0x13, 0x2e, 0xe5, 0x93, 0xf0, 0xc3, 0xf3, 0x81, 0x3d, 0x3c, 0xb4, 0x49, 0xe6, 0xe5, 0xe6, 0x1d, 0x13, 0xde, 0x52, 0x9a, 0xe3, 0xe7, 0x1c, 0x99, 0x8e, 0xa4, 0x56, 0x35, 0x9c, 0xe6, 0x6b, 0x82, 0x04, 0x5b, 0x7a, 0xc7, 0x97, 0xfe, 0x96, 0x98, 0x5d, 0xea, 0xbc, 0x51, 0x22, 0x53, 0x0b, 0x2e, 0x29, 0xef, 0xc9, 0x75, 0xee, 0x96, 0x03, 0xb4, 0xf9, 0x6f, 0x3f, 0xf4, 0xe5, 0x9b, 0x0e, 0x35, 0xa9, 0xad, 0x92, 0xf2, 0xb8, 0x67, 0x79, 0x4d, 0x8e } +, + /* Signature */ + 129, + { 0x03, 0x9b, 0xe4, 0x8f, 0x13, 0x3a, 0xe7, 0xf0, 0xb1, 0x9e, 0xdd, 0xb2, 0x13, 0x56, 0x09, 0x73, 0xa3, 0xe2, 0xa1, 0x14, 0x6c, 0x79, 0x42, 0xf8, 0x26, 0x4b, 0xba, 0x5a, 0xd0, 0x08, 0x69, 0x2d, 0x11, 0x38, 0x01, 0xfc, 0x27, 0x78, 0xa7, 0xe3, 0x3a, 0x9e, 0x11, 0x5e, 0xa6, 0x32, 0xe5, 0x01, 0x88, 0xc8, 0x7b, 0x69, 0xe8, 0xd4, 0xd8, 0xcc, 0xa4, 0x8a, 0xbf, 0x9f, 0x25, 0x1e, 0xfc, 0x00, 0x17, 0xb9, 0x9e, 0xde, 0xe5, 0x66, 0xdc, 0xdc, 0x0b, 0xc5, 0x8d, 0xbf, 0x6d, 0x67, 0xbf, 0x86, 0x3d, 0xb8, 0xa8, 0x9a, 0xbd, 0xf1, 0x2a, 0x77, 0xf1, 0xb7, 0x0d, 0xe4, 0x39, 0xd1, 0x76, 0xf2, 0xea, 0xad, 0xa5, 0x46, 0x4c, 0x79, 0xa5, 0x84, 0x27, 0x0c, 0xa5, 0x14, 0xf4, 0x8f, 0x1d, 0xae, 0x86, 0x78, 0xec, 0xf1, 0xac, 0x29, 0x6d, 0x07, 0xc4, 0x68, 0x98, 0xba, 0xd4, 0x1a, 0xcb, 0x19, 0x9d } + +} +, +{ + "PKCS#1 v1.5 Signature Example 9.13", + /* Message to be signed */ + 26, + { 0x22, 0x51, 0x29, 0x87, 0x15, 0x7c, 0xf9, 0xb9, 0xab, 0x4e, 0x53, 0x37, 0xb0, 0x98, 0x91, 0xd6, 0x3c, 0xec, 0x37, 0x43, 0xc0, 0xf7, 0xbc, 0x9d, 0x18, 0x2e } +, + /* Signature */ + 129, + { 0x02, 0xc7, 0x75, 0x7f, 0x99, 0x93, 0xef, 0x8c, 0x6d, 0x60, 0xa3, 0xf5, 0xab, 0xed, 0xce, 0xa5, 0x35, 0xdf, 0xf5, 0x5a, 0xb9, 0xf4, 0xf6, 0x2d, 0x12, 0x54, 0xbf, 0x26, 0x1d, 0xd6, 0xa2, 0xee, 0x52, 0xda, 0x63, 0x49, 0xf4, 0x7b, 0x9b, 0x28, 0x9f, 0x1d, 0x0e, 0xa3, 0xe0, 0xff, 0x08, 0xf4, 0x55, 0xfa, 0x54, 0x85, 0x65, 0x8e, 0x42, 0x17, 0xf4, 0x40, 0xc0, 0x8b, 0x90, 0xae, 0x4c, 0x6c, 0xc2, 0x56, 0x97, 0xcb, 0x83, 0x35, 0x31, 0xdb, 0xb4, 0x74, 0x03, 0x25, 0x43, 0x10, 0x0b, 0x5f, 0x92, 0xb6, 0x78, 0x19, 0x5d, 0xdb, 0xfb, 0x1b, 0x59, 0xc5, 0x9b, 0xe7, 0xc8, 0x3d, 0xd8, 0x17, 0x45, 0xcd, 0x4e, 0x70, 0x9a, 0x0e, 0x3f, 0x79, 0x8e, 0xad, 0x5b, 0xf8, 0x66, 0x2d, 0xa6, 0x5c, 0x10, 0x57, 0xcc, 0x08, 0x2d, 0x90, 0x50, 0x50, 0xc4, 0x65, 0x95, 0x8b, 0x55, 0x5d, 0x77, 0xb8, 0xb1 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 9.14", + /* Message to be signed */ + 245, + { 0xae, 0x48, 0xcd, 0x83, 0xf4, 0xa1, 0xf9, 0x4e, 0x17, 0x19, 0x21, 0x96, 0x90, 0xc8, 0xc6, 0xf6, 0x73, 0x7a, 0xbd, 0x15, 0xe0, 0xd0, 0x8e, 0x7f, 0xc2, 0xea, 0x0d, 0x31, 0x5b, 0x45, 0xbe, 0xc2, 0x46, 0xe8, 0x45, 0xbf, 0x17, 0x60, 0xc8, 0x6c, 0x3f, 0x82, 0xd8, 0x4b, 0x1e, 0x9d, 0x68, 0xdc, 0xcc, 0x01, 0xd9, 0xa7, 0xd0, 0x7e, 0xcc, 0x6b, 0xfb, 0xee, 0xd8, 0x3d, 0x7a, 0xd0, 0x3a, 0x6d, 0x56, 0x6a, 0x89, 0xbc, 0x64, 0x42, 0x1e, 0x7e, 0xb4, 0x7e, 0x52, 0xc0, 0x23, 0x86, 0x58, 0xd5, 0xe4, 0xc5, 0x59, 0x7f, 0x12, 0x5a, 0xfc, 0x6c, 0x83, 0x3c, 0x63, 0xcd, 0x6f, 0x97, 0xf9, 0xdd, 0x5c, 0xce, 0x8a, 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0x05, 0xd7, 0x17, 0xf2, 0xd6, 0x3d, 0xae, 0x65, 0xc2, 0x4b, 0x37, 0xdb, 0x1d, 0xc3, 0xe9, 0xf6, 0x17, 0x43, 0xaf, 0x1c, 0xe6, 0xde, 0x24, 0x67, 0xd1, 0x85, 0xae, 0xf0, 0x8d, 0x2b, 0xf8, 0x65, 0xf0, 0x75, 0xba, 0xa6, 0xa2, 0x9c, 0x58, 0x06, 0x61, 0xdc, 0xd4, 0xa4, 0x8f, 0x21, 0xff, 0x4e, 0x7b, 0x03, 0x9e, 0xef, 0x1e, 0x1e, 0x20, 0xba, 0x80, 0xcf, 0x20, 0xea, 0xb6, 0xec, 0xde, 0x60, 0xfa, 0x5d, 0x37, 0x67, 0xa3, 0x0e, 0x6a, 0xd4, 0x14, 0x47, 0x13, 0xca, 0x49, 0xfc, 0x03, 0x80, 0x99, 0xaf, 0x53, 0x6c, 0x0d, 0x5f, 0x55, 0xc4, 0xcb, 0x15, 0x33, 0x53, 0x81, 0xbe, 0xa0 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 9.15", + /* Message to be signed */ + 238, + { 0x2c, 0x8a, 0x00, 0x7b, 0x60, 0x30, 0x56, 0xd3, 0x31, 0x87, 0xbf, 0x52, 0xce, 0xf6, 0x16, 0x1a, 0xa5, 0xf5, 0xf5, 0x33, 0x7f, 0xc3, 0x59, 0xd4, 0x63, 0x44, 0x72, 0x1d, 0x94, 0x5f, 0xbc, 0x4d, 0x24, 0x0d, 0x30, 0x62, 0x0b, 0x29, 0x6c, 0x39, 0x77, 0xcf, 0x45, 0xc2, 0x47, 0xeb, 0x2c, 0x36, 0x39, 0x40, 0x79, 0x98, 0x3f, 0x03, 0xad, 0x82, 0x39, 0x9c, 0x4b, 0x28, 0x6c, 0x48, 0x16, 0x59, 0x10, 0xb3, 0x48, 0xb9, 0x5e, 0xf3, 0x9c, 0x43, 0xbf, 0xbe, 0xb3, 0x56, 0x6d, 0x1d, 0x1e, 0xea, 0x5a, 0x42, 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 0xcd, 0xd0, 0x1e, 0xed, 0xd2, 0x01, 0xc8, 0x0e, 0x0f, 0xbf, 0x7c, 0x5b, 0xef, 0x52, 0xa7, 0xaa, 0x99, 0x00, 0xa8, 0x59, 0x39, 0x4b, 0x47, 0xe8, 0x3d, 0x08, 0xb5, 0xe1, 0xda, 0x03, 0xa3, 0x35, 0x54, 0x00, 0x0c, 0xce, 0x17, 0xc1, 0xd8, 0x62, 0x29, 0xa3, 0xa2, 0x03, 0x50, 0xd1, 0x16, 0x43, 0xa7, 0x58, 0xc1, 0x16, 0xb8, 0xfb, 0xf7, 0x26, 0x60, 0xdf, 0x4c, 0x86, 0xef, 0x8c, 0x1f, 0xc4, 0x54, 0x4c, 0x3a, 0xe1, 0xd1, 0xfc, 0x3c, 0xe9, 0xf2, 0x63, 0xf6, 0x2e, 0x80, 0x07, 0xcd, 0x7f, 0xf7, 0xea, 0x8d, 0x50, 0xa0, 0x82, 0x83, 0x89, 0xff, 0x43, 0x1f, 0xc5, 0xc5, 0x62, 0x81, 0x6d, 0x3d, 0x24, 0xb6, 0x07, 0x21, 0x1d, 0x29 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 9.16", + /* Message to be signed */ + 211, + { 0x7b, 0x15, 0xd1, 0xa7, 0x9c, 0x7a, 0xd2, 0xd1, 0x2f, 0x75, 0xda, 0x57, 0xd1, 0x4a, 0x8e, 0xb7, 0x1f, 0xdd, 0x4c, 0x4e, 0xff, 0x52, 0x43, 0x74, 0x1a, 0xcd, 0xe2, 0x3c, 0xe6, 0xda, 0xd3, 0x08, 0xc8, 0x1d, 0x5d, 0x58, 0x0f, 0xf9, 0xc3, 0xf8, 0x93, 0xff, 0x12, 0x4f, 0xe4, 0x58, 0xb3, 0x18, 0x84, 0xda, 0xf7, 0xfc, 0x44, 0x66, 0xd7, 0x00, 0xdc, 0x49, 0x3f, 0x1c, 0x7a, 0x7d, 0xbf, 0x62, 0x24, 0x1b, 0x17, 0xe7, 0x36, 0x23, 0xfa, 0x17, 0x81, 0x4a, 0xb4, 0xd2, 0xc9, 0x24, 0x5b, 0xe8, 0x3b, 0xb3, 0xcc, 0x5f, 0x94, 0x44, 0xb1, 0x52, 0x17, 0xb2, 0x44, 0x1f, 0x45, 0x9c, 0x00, 0xb8, 0x2e, 0x58, 0x68, 0x9a, 0x11, 0xdd, 0x5c, 0x59, 0xfa, 0x39, 0x5d, 0x1a, 0x6f, 0x9b, 0x2c, 0x25, 0xcc, 0x84, 0x99, 0x92, 0x7a, 0xb9, 0xa4, 0x98, 0x28, 0x53, 0x36, 0x52, 0xce, 0xe2, 0x32, 0x32, 0x97, 0x2d, 0x65, 0x69, 0xee, 0x56, 0x44, 0x78, 0x66, 0xf1, 0x0e, 0xba, 0xd5, 0x4e, 0xa3, 0xf0, 0x61, 0x32, 0x0c, 0x6d, 0x3f, 0xef, 0xce, 0x34, 0x55, 0x2b, 0x62, 0x66, 0x96, 0x7b, 0x05, 0x78, 0xd6, 0xc4, 0x55, 0xb9, 0xac, 0x24, 0x66, 0x36, 0x17, 0x12, 0xe7, 0xd0, 0x5b, 0xd3, 0x33, 0x2e, 0xc1, 0x30, 0xd4, 0x5c, 0x6a, 0x49, 0x76, 0x16, 0x2c, 0x79, 0x7a, 0xd1, 0x36, 0x3f, 0x49, 0x69, 0xe4, 0xae, 0x3d, 0xed, 0x6e, 0x36, 0xea, 0x2c, 0xd7, 0xfb, 0x35, 0x66, 0x09, 0xbe, 0x03, 0x1a, 0x79, 0xb2, 0x94 } +, + /* Signature */ + 129, + { 0x03, 0x02, 0x52, 0x90, 0xb4, 0x46, 0x2f, 0x9a, 0xb7, 0x9f, 0xdf, 0xaa, 0x7b, 0x1d, 0x53, 0xa4, 0xd1, 0x27, 0x96, 0xc8, 0x5a, 0xac, 0x28, 0xde, 0xac, 0x21, 0x27, 0xc8, 0x25, 0x2c, 0x2a, 0x62, 0x39, 0x5a, 0x8b, 0x81, 0x9d, 0xfc, 0xee, 0xbf, 0x68, 0xdd, 0x4d, 0xbf, 0xc8, 0x7c, 0x1c, 0xf3, 0xd0, 0x17, 0xa5, 0x3a, 0x26, 0x40, 0x92, 0x50, 0x6b, 0xb6, 0xfc, 0x95, 0x28, 0xe6, 0xf8, 0x76, 0x78, 0x73, 0x6c, 0xa5, 0x6a, 0x14, 0xa1, 0xaa, 0x26, 0x77, 0xa8, 0xb8, 0x4f, 0x5e, 0x03, 0xfa, 0x2c, 0x0c, 0xe4, 0x78, 0x5b, 0x26, 0xba, 0x92, 0xe7, 0x5f, 0xbd, 0xc1, 0x6d, 0x8d, 0x4c, 0x7f, 0xb0, 0xbc, 0x39, 0xa8, 0x8e, 0x13, 0x2e, 0x1e, 0x05, 0xad, 0x00, 0xf1, 0x2f, 0x07, 0x27, 0x06, 0x34, 0x3f, 0x5e, 0xb3, 0xda, 0xb5, 0x11, 0x2e, 0x3b, 0xbe, 0x76, 0xed, 0x0b, 0xbc, 0x7b, 0xdf, 0xcf } + +} +, +{ + "PKCS#1 v1.5 Signature Example 9.17", + /* Message to be signed */ + 104, + { 0x7a, 0x76, 0x44, 0x00, 0x1f, 0x80, 0x13, 0xc5, 0x0f, 0xd7, 0x17, 0xb2, 0x44, 0x65, 0x47, 0x7a, 0xbc, 0x34, 0xba, 0x9c, 0x1e, 0x53, 0xad, 0x76, 0x32, 0x64, 0x5a, 0x6e, 0xf7, 0xc8, 0xe6, 0x4e, 0x8e, 0xcb, 0x7b, 0xca, 0x5b, 0x4f, 0x09, 0xb5, 0x2f, 0x4d, 0xd4, 0x8f, 0x8b, 0xb3, 0xdd, 0x33, 0x8c, 0x78, 0x18, 0x2c, 0xe8, 0x6e, 0x8b, 0xfb, 0x1c, 0x68, 0xa8, 0x76, 0xf7, 0x32, 0x16, 0x63, 0x06, 0xa8, 0xea, 0x8c, 0x0d, 0x7c, 0x21, 0xff, 0x26, 0xfa, 0xaf, 0x4a, 0xb4, 0x55, 0x10, 0x36, 0x19, 0x50, 0xc7, 0x6f, 0x95, 0xc2, 0x73, 0x0b, 0x9d, 0x3e, 0x4d, 0x6d, 0x85, 0xea, 0x25, 0x58, 0x4a, 0xc9, 0x67, 0xa0, 0x2b, 0x1e, 0x0a, 0x26 } +, + /* Signature */ + 129, + { 0x03, 0xb2, 0xac, 0xcf, 0xef, 0xf0, 0x63, 0xbd, 0x17, 0x5e, 0xf8, 0xae, 0x0c, 0xb8, 0x5b, 0xdb, 0x80, 0x0d, 0xdc, 0x27, 0x77, 0x6f, 0x8d, 0x3d, 0xc7, 0xe2, 0x1d, 0x19, 0x9b, 0xb8, 0xd6, 0x5f, 0x5b, 0x24, 0x2e, 0x79, 0xd4, 0x5e, 0xcd, 0xcf, 0xf0, 0x2e, 0x80, 0x3f, 0x56, 0x81, 0xff, 0x04, 0x4a, 0x43, 0xb5, 0x5a, 0x9a, 0xac, 0xb1, 0xea, 0xf1, 0x67, 0x84, 0x83, 0x8b, 0x1d, 0x5a, 0x2b, 0x7c, 0x1a, 0x36, 0x4d, 0xc4, 0x05, 0x31, 0x1a, 0x65, 0x55, 0x05, 0x7e, 0xc7, 0x3f, 0x0a, 0x8f, 0x4e, 0x0f, 0xfc, 0xa4, 0x23, 0x02, 0x2c, 0xa6, 0xad, 0x74, 0x46, 0x9b, 0xbd, 0x55, 0x57, 0xbf, 0xa1, 0xcf, 0x4b, 0x95, 0x63, 0x6f, 0x53, 0x45, 0x37, 0xef, 0xf2, 0xfb, 0x16, 0xaf, 0x5e, 0x64, 0x71, 0x82, 0x4a, 0xfe, 0x21, 0x67, 0x91, 0x8c, 0x89, 0xad, 0xe0, 0x1d, 0x52, 0xae, 0xa7, 0x39, 0x9d } + +} +, +{ + "PKCS#1 v1.5 Signature Example 9.18", + /* Message to be signed */ + 22, + { 0x12, 0xd2, 0x24, 0xfc, 0x10, 0xa0, 0xfc, 0x40, 0x95, 0x3a, 0xb6, 0xd7, 0x01, 0xc4, 0x16, 0xc3, 0xa8, 0x23, 0x77, 0x2b, 0xea, 0xfa } +, + /* Signature */ + 129, + { 0x03, 0x2c, 0xb5, 0xc8, 0xd6, 0x12, 0x90, 0xb7, 0x66, 0xe6, 0x49, 0x8a, 0xa6, 0x01, 0x49, 0x4d, 0x9f, 0x06, 0x6f, 0x27, 0xa4, 0x7a, 0x28, 0x70, 0xf3, 0x67, 0x89, 0x43, 0x29, 0x1a, 0xb2, 0x2d, 0x3c, 0x45, 0xc0, 0x76, 0xe5, 0x60, 0x81, 0x9d, 0x33, 0xf8, 0x89, 0xf8, 0xcf, 0xab, 0x2d, 0xf6, 0xc6, 0x3c, 0x0c, 0xe1, 0xed, 0x5c, 0xeb, 0x51, 0x54, 0x70, 0x77, 0xc0, 0x82, 0x78, 0x18, 0x7a, 0x82, 0x72, 0xfe, 0xc7, 0xde, 0x95, 0x54, 0xcd, 0xc9, 0x16, 0xca, 0x72, 0xf2, 0xc4, 0x51, 0x43, 0xf2, 0xcf, 0x32, 0x43, 0xc4, 0xbd, 0x20, 0x0c, 0x6e, 0x99, 0x3f, 0x0d, 0xb5, 0xb7, 0x1d, 0x4f, 0x63, 0x77, 0x1e, 0x24, 0x9b, 0x19, 0xb9, 0x97, 0xa6, 0xe5, 0xa9, 0x19, 0xca, 0x10, 0x0c, 0x90, 0xfe, 0xa6, 0xa2, 0xd4, 0xdc, 0x68, 0x81, 0xc3, 0xa0, 0xe1, 0xc1, 0x35, 0x53, 0x83, 0xcf, 0xbb, 0x4b } + +} +, +{ + "PKCS#1 v1.5 Signature Example 9.19", + /* Message to be signed */ + 200, + { 0xe0, 0xd4, 0xe2, 0xa5, 0xe9, 0x8a, 0x51, 0x23, 0x7d, 0xa5, 0x08, 0x5d, 0xcf, 0x09, 0x8a, 0xe2, 0xc0, 0x5b, 0x4e, 0x16, 0x92, 0x54, 0xee, 0x6d, 0xda, 0x16, 0x21, 0x0e, 0x4a, 0x3f, 0xe8, 0x1c, 0x72, 0x56, 0xea, 0xef, 0xf2, 0x8c, 0x0c, 0x63, 0xd8, 0x54, 0xb7, 0x84, 0x1a, 0x13, 0x6c, 0x43, 0x60, 0xb2, 0x15, 0xdc, 0xa0, 0x58, 0x74, 0x8a, 0x4b, 0xfa, 0x82, 0x58, 0x68, 0x04, 0x28, 0x21, 0x99, 0x2a, 0x4e, 0xd5, 0xa7, 0xd5, 0x8f, 0x80, 0x12, 0x20, 0x75, 0x49, 0xbe, 0x8c, 0xc9, 0xce, 0xcc, 0x85, 0x01, 0xb9, 0xf8, 0x02, 0x83, 0x0f, 0x86, 0x58, 0x45, 0xce, 0x2e, 0x33, 0x9b, 0xec, 0x28, 0x05, 0x96, 0x11, 0xa1, 0xa0, 0x0b, 0x55, 0x35, 0xc3, 0xc6, 0x15, 0xe9, 0xd2, 0xa1, 0x39, 0x59, 0xf1, 0x01, 0x5c, 0x8b, 0xad, 0x2d, 0x75, 0x3a, 0x59, 0xa6, 0x14, 0x3b, 0x3a, 0x30, 0x58, 0xef, 0x72, 0x25, 0x60, 0xff, 0xe1, 0xc1, 0x84, 0x87, 0xc7, 0x41, 0xda, 0xd6, 0x1f, 0x07, 0xa1, 0x56, 0x42, 0xe7, 0x26, 0xad, 0x18, 0xa9, 0x84, 0x87, 0x5e, 0x68, 0xc6, 0x2e, 0xeb, 0xed, 0xcf, 0x94, 0x6f, 0x13, 0xb8, 0x93, 0xb2, 0x80, 0x8f, 0x78, 0xf9, 0x29, 0x48, 0x07, 0xd7, 0x74, 0x68, 0x54, 0x94, 0xe6, 0xb8, 0x90, 0x40, 0xee, 0xe6, 0xde, 0x1b, 0xa7, 0x18, 0xba, 0x2e, 0x08, 0x2c, 0x3d, 0x5e, 0xf1, 0x7c, 0x10, 0x28, 0xcd, 0x66 } +, + /* Signature */ + 129, + { 0x03, 0xe7, 0x83, 0xbb, 0x53, 0xdb, 0xb6, 0x7c, 0xf2, 0x19, 0x5f, 0xc1, 0xa5, 0x7f, 0x4b, 0x74, 0xc9, 0x82, 0x03, 0xb1, 0xf3, 0xd6, 0x15, 0xfe, 0xb9, 0x20, 0xe4, 0xab, 0xe8, 0x37, 0x58, 0x34, 0x67, 0x2f, 0x4b, 0x8f, 0x55, 0xfe, 0xf2, 0xac, 0xa8, 0xb5, 0xd4, 0x0a, 0xef, 0xe4, 0xef, 0xbd, 0xaa, 0xc3, 0xe8, 0x21, 0x08, 0xd0, 0x7f, 0x2f, 0x1c, 0xf8, 0xc0, 0xd4, 0xdf, 0xf8, 0x1b, 0x39, 0x66, 0xec, 0x69, 0xbe, 0x51, 0x17, 0xac, 0x1a, 0xa6, 0x11, 0x8e, 0x46, 0x0b, 0x92, 0xd8, 0x8f, 0xcd, 0xd9, 0x4d, 0x08, 0xeb, 0xaa, 0x53, 0x62, 0xe5, 0x9d, 0x52, 0x00, 0x4b, 0x43, 0x36, 0x95, 0x14, 0x37, 0xda, 0x0f, 0x51, 0xd6, 0x3e, 0x50, 0x56, 0x15, 0xb4, 0xb7, 0x55, 0x54, 0x08, 0x0b, 0x94, 0x89, 0x7f, 0xef, 0x29, 0x3a, 0x34, 0xc4, 0x04, 0x00, 0xc4, 0xf9, 0x9a, 0xa1, 0xde, 0xfe, 0x35 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 9.20", + /* Message to be signed */ + 111, + { 0x64, 0xb3, 0xba, 0x40, 0x98, 0x03, 0xc9, 0xb9, 0x60, 0xc1, 0xc4, 0x96, 0x2f, 0x51, 0x27, 0x1b, 0xc8, 0x9a, 0x40, 0xbd, 0x40, 0x5c, 0xe5, 0xbc, 0xdc, 0x88, 0x51, 0xd9, 0x7c, 0x9b, 0xe5, 0xe5, 0xb7, 0x46, 0x4e, 0x50, 0xd9, 0x9b, 0x6c, 0xf8, 0xad, 0xf8, 0xff, 0x83, 0x2b, 0x73, 0x7d, 0xe8, 0xb6, 0xff, 0x1a, 0xbe, 0xb8, 0x9d, 0xba, 0xe9, 0x3a, 0x90, 0x63, 0x94, 0x87, 0x80, 0x6b, 0x05, 0x96, 0xcd, 0x31, 0x68, 0x60, 0xf6, 0x8f, 0x00, 0x27, 0xa3, 0x50, 0x3e, 0x15, 0x89, 0x67, 0xaf, 0xdf, 0xf4, 0x69, 0x07, 0x68, 0x17, 0xfc, 0x7d, 0xa3, 0x22, 0x3c, 0xca, 0x1e, 0x6c, 0x48, 0x97, 0x3b, 0x57, 0x0e, 0x0b, 0xf7, 0x4b, 0xb8, 0xb3, 0x96, 0x54, 0x37, 0x2b, 0x7a, 0x1d, 0x6f } +, + /* Signature */ + 129, + { 0x00, 0xd2, 0x00, 0xeb, 0xa0, 0xb6, 0x52, 0x2a, 0xfb, 0x42, 0x0e, 0xbf, 0x16, 0x48, 0x8c, 0x53, 0x03, 0x52, 0xc4, 0x2d, 0xde, 0x81, 0xe7, 0x64, 0xc0, 0xca, 0xdb, 0x43, 0x82, 0x8c, 0xb9, 0x98, 0xd0, 0xa6, 0x0b, 0x23, 0xb5, 0xb6, 0x95, 0x8a, 0x00, 0xfc, 0x25, 0x53, 0xe2, 0x35, 0xe8, 0x57, 0x4e, 0x4d, 0x4f, 0xec, 0x9e, 0x66, 0x8d, 0xba, 0x40, 0xde, 0x66, 0x61, 0xab, 0xe1, 0x3f, 0xcb, 0x84, 0xc1, 0xad, 0x15, 0xc4, 0xb0, 0xcc, 0x0c, 0x6f, 0x4f, 0x0f, 0x83, 0x77, 0x87, 0xc4, 0x32, 0x5f, 0x04, 0x5d, 0x61, 0xee, 0x2c, 0x99, 0x72, 0xb0, 0x1f, 0x32, 0x12, 0x65, 0x4e, 0xc4, 0x26, 0x62, 0x56, 0x7f, 0xaa, 0xc4, 0x0e, 0x9c, 0x0a, 0x28, 0x15, 0x8a, 0x2a, 0x6c, 0x31, 0xf0, 0x1a, 0x84, 0x91, 0x26, 0xdf, 0x9e, 0x96, 0xcb, 0x82, 0x09, 0xbe, 0xb5, 0x81, 0xd6, 0x84, 0x6b, 0xb5, 0xab } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 10: A 1028-bit RSA key pair", +{ + /* Modulus */ + 129, + { 0x0d, 0x5f, 0xb9, 0x9f, 0xde, 0xdf, 0x42, 0x56, 0xe2, 0x8d, 0x4b, 0x41, 0xd7, 0x07, 0xfc, 0x27, 0x63, 0x3e, 0x89, 0x95, 0x15, 0xf4, 0xda, 0xbf, 0x6b, 0x46, 0x27, 0x10, 0xac, 0x11, 0x25, 0x81, 0xfa, 0x73, 0xfa, 0x83, 0x69, 0x58, 0x2c, 0x9f, 0xd4, 0x52, 0x5a, 0x70, 0x16, 0x18, 0x99, 0xdf, 0x63, 0x25, 0x84, 0x9e, 0x5c, 0x43, 0x49, 0x3e, 0x13, 0x35, 0x4e, 0x27, 0x09, 0x55, 0xa4, 0x3e, 0x38, 0x35, 0xb5, 0x99, 0x8e, 0xd4, 0x2a, 0x57, 0x5b, 0xbf, 0x68, 0x8d, 0x69, 0xec, 0x36, 0x6d, 0x2b, 0xa6, 0xf0, 0x50, 0x4c, 0x1e, 0xe1, 0x7d, 0xc5, 0x9b, 0x7e, 0xa0, 0xb4, 0x64, 0x0c, 0xbe, 0xcd, 0x8b, 0xd7, 0x96, 0x2b, 0xe8, 0x56, 0x6f, 0x0e, 0xbd, 0x65, 0x57, 0x43, 0x65, 0x6a, 0x29, 0x12, 0x85, 0xe0, 0x37, 0xbb, 0xfa, 0x86, 0x55, 0x80, 0x1b, 0xd0, 0x31, 0x4f, 0x46, 0x4c, 0x56, 0x91 } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 128, + { 0xe7, 0x6f, 0x42, 0xb4, 0x74, 0x02, 0xd5, 0xe0, 0xf9, 0x64, 0x64, 0x92, 0x5a, 0xb4, 0xb3, 0xbc, 0x68, 0x94, 0x30, 0x0e, 0xe4, 0x86, 0xfb, 0x70, 0xce, 0xd4, 0x91, 0xf2, 0xd1, 0xb3, 0x67, 0x80, 0x84, 0xc1, 0xc2, 0xcb, 0x96, 0x95, 0x68, 0xa5, 0xf7, 0x7d, 0xab, 0xcd, 0x40, 0x93, 0x39, 0x37, 0xa8, 0x67, 0xf9, 0x34, 0xfb, 0x2a, 0xea, 0xae, 0x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, 0x93, 0xd1, 0x43, 0x4a, 0xfb, 0x4a, 0x04, 0xa0, 0x4a, 0xed, 0xd3, 0xbb, 0xc4, 0xb3, 0x87, 0x77, 0xa5, 0x5f, 0xe6, 0x50, 0x5b, 0x8c, 0x15, 0x79 } +, + /* Prime exponent 1 */ + 65, + { 0x02, 0x8e, 0x91, 0xd5, 0xab, 0xba, 0x69, 0xdc, 0x50, 0x56, 0x38, 0xe9, 0xf5, 0xc6, 0x9c, 0x06, 0xf8, 0xd5, 0x5a, 0xf5, 0xc7, 0x4d, 0xc8, 0xe7, 0x8b, 0x6c, 0x09, 0x4e, 0x85, 0xa8, 0x27, 0xf7, 0xd2, 0xab, 0x69, 0x11, 0xb6, 0x8c, 0x6b, 0xb2, 0xb4, 0x54, 0x61, 0xd9, 0xa3, 0x1e, 0xb9, 0x62, 0xb4, 0x8b, 0x12, 0x06, 0xc6, 0x8d, 0x18, 0xae, 0x90, 0x92, 0xd6, 0xe5, 0xc2, 0x2b, 0x39, 0xa4, 0x31 } +, + /* Prime exponent 2 */ + 65, + { 0x02, 0x98, 0x04, 0xe1, 0x32, 0xfa, 0x3a, 0xaa, 0x4b, 0x15, 0x26, 0xbb, 0x50, 0x3a, 0xb4, 0xd4, 0x71, 0xf7, 0x6f, 0x69, 0x65, 0x42, 0x11, 0xa6, 0x89, 0x3b, 0x0c, 0x13, 0x74, 0x29, 0x87, 0x9f, 0xcc, 0xf7, 0x23, 0x41, 0x30, 0x82, 0x54, 0x76, 0xac, 0x20, 0xd7, 0xfb, 0xd3, 0x8c, 0x3e, 0x24, 0x86, 0x58, 0x76, 0x48, 0x6e, 0xe8, 0xa7, 0xbf, 0x99, 0x58, 0x45, 0x9e, 0xee, 0x95, 0x81, 0x78, 0x29 } +, + /* Coefficient */ + 65, + { 0x02, 0x11, 0x97, 0x5e, 0x88, 0x56, 0xd4, 0xea, 0x9d, 0x1d, 0xdf, 0x87, 0xb8, 0x7d, 0x39, 0x79, 0x2f, 0x1c, 0xf7, 0xe2, 0xf1, 0x82, 0xf4, 0xa4, 0xe6, 0x91, 0xe5, 0x00, 0x2b, 0x10, 0xa0, 0x8a, 0x46, 0xdc, 0xa1, 0xa4, 0xf4, 0x83, 0x00, 0x85, 0xd8, 0xd4, 0x0b, 0xea, 0x1d, 0xff, 0x11, 0xb0, 0xc0, 0xdf, 0x20, 0x22, 0x43, 0xeb, 0x99, 0x3e, 0x58, 0x0a, 0x94, 0x49, 0x9b, 0x9c, 0xed, 0xd2, 0xbe } + +} +, +{{ + "PKCS#1 v1.5 Signature Example 10.1", + /* Message to be signed */ + 157, + { 0xb2, 0xd5, 0x88, 0x50, 0x9c, 0x2e, 0xac, 0xda, 0x28, 0x1e, 0x76, 0x71, 0xcb, 0xa2, 0xfc, 0xa9, 0x14, 0xef, 0x73, 0xa3, 0xae, 0xa9, 0x20, 0x20, 0x43, 0xea, 0xd6, 0xb7, 0x21, 0x25, 0xc1, 0xb0, 0xd5, 0xcc, 0x15, 0x41, 0x46, 0x20, 0xd5, 0x73, 0xd7, 0xab, 0x0b, 0x3a, 0x8a, 0xb6, 0x6a, 0x92, 0xdf, 0x87, 0x0b, 0x75, 0xb1, 0xc4, 0xd6, 0x8e, 0xa7, 0x05, 0x6b, 0xe0, 0x41, 0x9e, 0xa2, 0x53, 0xe6, 0xb0, 0x8b, 0x12, 0x9e, 0x0f, 0x64, 0xf1, 0x0a, 0xbf, 0x82, 0xe1, 0x67, 0xf8, 0xe3, 0xe9, 0x28, 0x2e, 0x7b, 0xf7, 0x1b, 0x04, 0x3b, 0xaa, 0x2b, 0xa2, 0xd8, 0x75, 0x6d, 0x46, 0xb6, 0xd3, 0x6e, 0x97, 0x34, 0x15, 0xf4, 0xf8, 0xc0, 0xeb, 0x43, 0xfc, 0x60, 0x4c, 0xed, 0x49, 0x3d, 0xc0, 0x46, 0xa2, 0x5a, 0x11, 0x9b, 0xd1, 0x58, 0x1d, 0xbb, 0x59, 0x7c, 0x3e, 0x67, 0xc2, 0xfd, 0xdc, 0x39, 0x6d, 0xf5, 0xd2, 0x3b, 0x7b, 0xa8, 0x0b, 0xd2, 0xe3, 0x12, 0x90, 0xbf, 0xc2, 0x62, 0x25, 0xe0, 0x09, 0x55, 0xa9, 0x8d, 0x91, 0x19, 0x11, 0xa3, 0x99, 0x67, 0x6f, 0xbb } +, + /* Signature */ + 129, + { 0x07, 0x9a, 0x7b, 0x91, 0x6f, 0x67, 0x41, 0x17, 0xf1, 0xd8, 0x77, 0xf4, 0x93, 0x43, 0x25, 0x68, 0x41, 0x48, 0xd5, 0xd0, 0xb0, 0xd5, 0xc2, 0xc6, 0x15, 0x6a, 0x11, 0x15, 0x9b, 0xc0, 0xbd, 0x30, 0xd0, 0xa7, 0x35, 0x34, 0xdc, 0x94, 0x45, 0xeb, 0xe2, 0x06, 0xd6, 0x07, 0x5e, 0xb4, 0xea, 0x7a, 0x7c, 0x04, 0x32, 0xbd, 0x44, 0xb8, 0x3c, 0xfa, 0xe4, 0x68, 0x5a, 0x9e, 0xb9, 0xa9, 0x7c, 0xbb, 0xfa, 0x4e, 0x82, 0xf7, 0x1d, 0xb5, 0x1a, 0xfa, 0x0d, 0x27, 0xcf, 0x27, 0xf0, 0x60, 0x9b, 0xb3, 0xf8, 0x80, 0x64, 0x13, 0x24, 0x7d, 0x5d, 0x49, 0x54, 0xf7, 0x89, 0xa1, 0x01, 0xbf, 0x39, 0x21, 0x72, 0x8b, 0x48, 0x7e, 0x85, 0xfa, 0x3f, 0xd4, 0xdc, 0xd7, 0x2d, 0x04, 0x44, 0x8e, 0x42, 0xd3, 0xec, 0x05, 0xcc, 0x47, 0x5d, 0x74, 0xcb, 0xf7, 0x65, 0xc3, 0x4e, 0x3e, 0xc1, 0x4c, 0xca, 0x50, 0x40 } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Signature Example 10.2", + /* Message to be signed */ + 148, + { 0xca, 0x25, 0x18, 0xa5, 0xa2, 0x24, 0xb2, 0x3d, 0x42, 0x05, 0xd8, 0xdd, 0x7e, 0xb0, 0x4c, 0xbd, 0xcd, 0x0c, 0xcb, 0x82, 0xbc, 0x87, 0x96, 0x1d, 0x85, 0x9d, 0x66, 0x00, 0xb1, 0xac, 0x3e, 0x25, 0xa9, 0x40, 0x7b, 0x6c, 0x06, 0x50, 0x27, 0xc0, 0x40, 0x81, 0xf4, 0x45, 0xa2, 0x30, 0xab, 0x93, 0x08, 0xe7, 0x55, 0xf3, 0x3a, 0x75, 0x97, 0x73, 0xbe, 0x6b, 0x96, 0x9e, 0x0e, 0xa7, 0x74, 0xaa, 0x6e, 0x33, 0x4f, 0xb6, 0x04, 0x18, 0x42, 0x75, 0xf3, 0x6a, 0x03, 0x1d, 0xae, 0xa6, 0x51, 0x86, 0x97, 0x79, 0x5b, 0xd6, 0xa7, 0xd6, 0x69, 0x7b, 0x40, 0x6d, 0xa2, 0xce, 0xce, 0x15, 0xdc, 0x11, 0x3d, 0x85, 0x44, 0x98, 0x85, 0x61, 0x13, 0x1d, 0x4f, 0xc6, 0xf6, 0xe3, 0xc5, 0x80, 0xd8, 0x06, 0x80, 0x7d, 0xf2, 0xc6, 0x85, 0x65, 0x09, 0x54, 0x2e, 0x4e, 0xd3, 0x9d, 0x34, 0x6e, 0xba, 0x15, 0x97, 0x6a, 0x8f, 0xd0, 0x1d, 0x79, 0x41, 0xb0, 0x16, 0x56, 0x06, 0xc7, 0x61, 0x76, 0x64, 0x9a, 0x16, 0x10, 0x05, 0xa0 } +, + /* Signature */ + 129, + { 0x00, 0xbe, 0xb9, 0x21, 0xce, 0x74, 0x89, 0x81, 0x9d, 0x2f, 0x85, 0xc7, 0x88, 0x39, 0xa2, 0x7d, 0x7e, 0x19, 0xea, 0x0a, 0x76, 0x4a, 0xc5, 0x31, 0x01, 0xe8, 0x6f, 0x31, 0x70, 0xa7, 0x6e, 0x31, 0x8a, 0x7e, 0xe8, 0x9b, 0x1f, 0x5e, 0x23, 0xe7, 0xe2, 0xdb, 0x96, 0x66, 0xeb, 0x43, 0x91, 0xb2, 0x79, 0x2a, 0x57, 0x67, 0xee, 0x35, 0x9b, 0x5c, 0x71, 0xe2, 0x74, 0x79, 0x10, 0xc8, 0x2c, 0x60, 0x83, 0xd6, 0xd3, 0x48, 0x29, 0xb9, 0x6f, 0xa5, 0xa2, 0xec, 0x0f, 0x62, 0xf1, 0xbc, 0xda, 0x5d, 0x78, 0xf8, 0xdc, 0x3c, 0x65, 0x0b, 0x94, 0xe3, 0x2b, 0x38, 0x60, 0xda, 0x5f, 0xc5, 0xb1, 0x7f, 0xbf, 0x68, 0x7e, 0xc0, 0x07, 0x5a, 0x9c, 0x73, 0xdc, 0x1e, 0x98, 0xd1, 0xf3, 0x6a, 0xae, 0xc4, 0x49, 0x3f, 0x78, 0x91, 0xe3, 0xab, 0x08, 0xe2, 0x04, 0x2d, 0x8b, 0x1e, 0x46, 0x2e, 0x8c, 0x4c, 0x33 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 10.3", + /* Message to be signed */ + 131, + { 0xd4, 0x33, 0xd1, 0x5b, 0x2d, 0x61, 0xb8, 0x6a, 0xc8, 0xec, 0x0d, 0xae, 0xba, 0x65, 0xe1, 0x1d, 0xed, 0x3c, 0x38, 0x84, 0x25, 0x25, 0xe4, 0xb7, 0xc8, 0xe4, 0x53, 0xb0, 0xf5, 0x53, 0xcb, 0x4e, 0xb8, 0x75, 0xa6, 0x9d, 0x78, 0x16, 0xf5, 0x4c, 0x87, 0x79, 0x3e, 0x3a, 0xbb, 0x79, 0xfc, 0x55, 0x11, 0x35, 0x37, 0xb4, 0x76, 0x29, 0x65, 0xcf, 0xee, 0x58, 0x6e, 0x0a, 0x17, 0x99, 0x78, 0x51, 0xe3, 0xdc, 0x9e, 0xaf, 0x6f, 0x1c, 0x9c, 0x2e, 0x98, 0xc9, 0x61, 0x3e, 0x3b, 0xbe, 0xa0, 0x13, 0xff, 0x58, 0x61, 0x6b, 0x2a, 0xb0, 0x5a, 0xb3, 0x24, 0xa9, 0xc5, 0xff, 0x4c, 0x5e, 0xfd, 0xd9, 0x90, 0xdd, 0x97, 0xd9, 0x16, 0x93, 0xc1, 0xeb, 0xd4, 0xc0, 0x9c, 0x73, 0x21, 0x16, 0xc8, 0xdf, 0xc3, 0xec, 0x51, 0x5c, 0x20, 0x53, 0x2c, 0xba, 0x7e, 0x47, 0x58, 0xc6, 0x8a, 0x69, 0xcf, 0xa0, 0xac, 0x31, 0x86 } +, + /* Signature */ + 129, + { 0x03, 0xae, 0x3b, 0xe1, 0xc7, 0x44, 0x6a, 0xd3, 0xef, 0xd8, 0xba, 0xe6, 0x1b, 0x3d, 0x32, 0xd3, 0xef, 0x15, 0x24, 0x82, 0xb1, 0xbf, 0xee, 0x31, 0x2f, 0xe9, 0xe6, 0xbe, 0xee, 0xab, 0x8c, 0xbd, 0x08, 0xf4, 0xc8, 0xf9, 0xcf, 0x06, 0x7d, 0xea, 0xb6, 0xba, 0xc7, 0xc0, 0xfe, 0xcd, 0x87, 0xbb, 0xab, 0xc7, 0xf6, 0x79, 0x8c, 0x77, 0xef, 0x1c, 0x3f, 0xd8, 0xbc, 0xa2, 0x8c, 0xf9, 0xec, 0xe6, 0x56, 0x79, 0x5f, 0x60, 0xb3, 0x78, 0x75, 0xea, 0xbe, 0xf8, 0x21, 0x53, 0xa1, 0x2b, 0xc7, 0xfd, 0xe3, 0xfb, 0xc9, 0xe5, 0xe1, 0x48, 0xf4, 0xe1, 0x6c, 0xb7, 0x2a, 0x77, 0x3d, 0x9d, 0xd0, 0x23, 0x17, 0xf7, 0x0b, 0x33, 0x91, 0x40, 0x08, 0x05, 0xe8, 0x5e, 0x7a, 0x23, 0x56, 0x7b, 0x34, 0xaa, 0x65, 0xa3, 0x5f, 0x74, 0x41, 0x70, 0xaf, 0xfc, 0xb3, 0x23, 0x37, 0x1a, 0xd2, 0xab, 0x9f, 0x1e, 0x4d } + +} +, +{ + "PKCS#1 v1.5 Signature Example 10.4", + /* Message to be signed */ + 52, + { 0x7d, 0x0f, 0x5b, 0xd7, 0x90, 0x0f, 0x1e, 0x65, 0x65, 0x4e, 0x6c, 0x7e, 0xeb, 0x06, 0x4c, 0xb8, 0x28, 0xf3, 0x55, 0xd6, 0xde, 0x9b, 0xf0, 0xd3, 0x47, 0x83, 0xff, 0xcb, 0xe8, 0x0a, 0xb1, 0xb8, 0xae, 0x07, 0xb7, 0xf1, 0xe3, 0xf5, 0xa3, 0x20, 0xdd, 0x9b, 0x8b, 0x76, 0xbe, 0x0e, 0x97, 0x72, 0xde, 0x19, 0xa8, 0xd3 } +, + /* Signature */ + 129, + { 0x09, 0xe7, 0xa5, 0x30, 0x41, 0x71, 0xda, 0x63, 0x8b, 0xe7, 0x60, 0x1f, 0xbf, 0xf6, 0xe4, 0x95, 0x36, 0xf3, 0x36, 0x60, 0x82, 0x25, 0x3a, 0xbc, 0x1d, 0xb5, 0xd1, 0xb6, 0x54, 0x93, 0xda, 0x59, 0x5e, 0xc9, 0x3c, 0x37, 0xf5, 0x89, 0x0b, 0x5f, 0x47, 0x15, 0xbd, 0x5e, 0x80, 0xc0, 0xbb, 0xc5, 0xc6, 0x3b, 0x74, 0xaf, 0x2e, 0x60, 0x43, 0x91, 0x32, 0xd2, 0x52, 0x13, 0x75, 0x0b, 0xc1, 0xde, 0x30, 0x2e, 0x3e, 0x8b, 0x83, 0xda, 0xd2, 0xde, 0x0d, 0xff, 0xc4, 0xfa, 0xab, 0x40, 0x56, 0xdd, 0x7c, 0x40, 0x5e, 0x04, 0xd5, 0x94, 0x24, 0x53, 0x65, 0x9d, 0x49, 0x0f, 0x3c, 0x3d, 0xaa, 0x7d, 0x3f, 0x11, 0x70, 0x11, 0x81, 0x6b, 0x56, 0x59, 0x01, 0x04, 0xde, 0x7f, 0x9c, 0x05, 0x23, 0x73, 0xe2, 0xdd, 0xe4, 0x14, 0x49, 0x04, 0x27, 0xa5, 0x89, 0x64, 0x49, 0x3f, 0xf4, 0x5f, 0x08, 0xa6, 0xe8 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 10.5", + /* Message to be signed */ + 14, + { 0xd9, 0x6a, 0xa0, 0x91, 0xc1, 0x60, 0xb5, 0x52, 0xb1, 0x6d, 0xf0, 0x65, 0x8f, 0xa8 } +, + /* Signature */ + 129, + { 0x0b, 0x69, 0x75, 0x4e, 0xd6, 0xd7, 0xa7, 0xd2, 0xd8, 0x5b, 0x2c, 0x7a, 0x30, 0x6c, 0x78, 0xd6, 0x3d, 0x0f, 0xfa, 0x43, 0x8f, 0x43, 0xbe, 0xec, 0x3a, 0x02, 0x86, 0xce, 0x57, 0xe7, 0xe0, 0xf8, 0x5c, 0xa4, 0x30, 0xe6, 0x39, 0x08, 0xc0, 0xfa, 0x58, 0x4b, 0xa2, 0x50, 0x5f, 0x8c, 0x94, 0x65, 0x6e, 0xc0, 0x24, 0x94, 0xbb, 0x03, 0x2f, 0x92, 0x0c, 0x4b, 0x6b, 0x8c, 0x94, 0x3e, 0x6b, 0xe9, 0x2f, 0x57, 0x8a, 0xa8, 0xcc, 0xdf, 0xaa, 0xc0, 0xa5, 0x4b, 0x8a, 0x9c, 0x0d, 0xf5, 0x48, 0x27, 0x1f, 0x89, 0x73, 0xc9, 0xff, 0xa2, 0xa2, 0x0c, 0x84, 0x76, 0x2e, 0x90, 0x17, 0xe7, 0x45, 0x2e, 0x5d, 0x74, 0xda, 0x69, 0x0f, 0x75, 0xc0, 0x99, 0xab, 0x91, 0xe2, 0xa7, 0x96, 0x3b, 0xc5, 0x37, 0xf9, 0xc2, 0x4c, 0xcc, 0x3c, 0x41, 0x8c, 0x6e, 0x98, 0x58, 0x61, 0xd9, 0x3d, 0xaa, 0xb2, 0xe6, 0x13 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 10.6", + /* Message to be signed */ + 215, + { 0x56, 0xf0, 0x48, 0x64, 0x5a, 0x49, 0xfa, 0x01, 0x41, 0xf4, 0xd6, 0x74, 0xaa, 0xfc, 0xf2, 0xff, 0xfa, 0x83, 0xf9, 0xb4, 0x52, 0xf1, 0x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 0x4f, 0x68, 0x8e, 0x49, 0x2c, 0x3c, 0x64, 0x0d } +, + /* Signature */ + 129, + { 0x06, 0x66, 0xef, 0x71, 0xe2, 0xc8, 0xa1, 0xeb, 0x1c, 0x46, 0x40, 0x3f, 0xd2, 0x3e, 0x52, 0x18, 0x83, 0xad, 0xa1, 0xb9, 0xbc, 0x5f, 0xbd, 0x35, 0x3b, 0xbb, 0x3c, 0x3d, 0xfb, 0x57, 0x0a, 0xc1, 0xc7, 0x21, 0xfa, 0xf3, 0xf5, 0x97, 0x32, 0xf2, 0x13, 0x37, 0x73, 0x80, 0x39, 0x79, 0x48, 0x46, 0x2f, 0xd2, 0x0a, 0x3f, 0x0e, 0x5e, 0x08, 0x91, 0xa6, 0xb0, 0x7c, 0x31, 0xb3, 0x60, 0xaa, 0xa9, 0x65, 0xe2, 0xf0, 0x93, 0x0e, 0xb3, 0x41, 0xee, 0x77, 0xec, 0x43, 0x90, 0x65, 0xc0, 0xaa, 0xd9, 0x17, 0x87, 0xab, 0x6d, 0x2e, 0x6c, 0xde, 0xdd, 0xf5, 0x54, 0x81, 0x65, 0x1a, 0xeb, 0xbf, 0x9d, 0x11, 0xd5, 0x4b, 0xc1, 0x13, 0x26, 0x18, 0x3e, 0xbf, 0xf4, 0x9b, 0xd4, 0x0b, 0xdf, 0x76, 0xd7, 0xef, 0x69, 0xb6, 0x7e, 0xa3, 0x96, 0x8f, 0xa8, 0x49, 0x03, 0x2f, 0xb8, 0x24, 0xb6, 0xdd, 0x6a, 0xe3 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 10.7", + /* Message to be signed */ + 165, + { 0x79, 0xda, 0x89, 0xe3, 0x55, 0xd5, 0x51, 0xa0, 0xe0, 0x31, 0xf4, 0xfb, 0x71, 0xab, 0x6f, 0x41, 0x44, 0xc4, 0x76, 0x2e, 0x07, 0xd0, 0x64, 0x14, 0x33, 0xcb, 0x5e, 0xc8, 0x61, 0x34, 0x96, 0x3f, 0x7d, 0x2c, 0x4d, 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, 0x67, 0x78, 0xb8, 0xc0, 0x93, 0x38, 0xe3, 0x5b, 0x9b, 0x6f, 0x59, 0xc0, 0x64, 0xce, 0xb3, 0xeb, 0x20, 0xce, 0x90, 0x9a, 0x5c, 0x6c, 0xea, 0xae, 0xbb, 0xe9, 0x3e, 0x86, 0xc7, 0xc5, 0xff, 0x4a, 0x39, 0x17, 0xf1, 0x26, 0x81, 0x96, 0x32, 0xcf, 0x96, 0xfa, 0xb1, 0xd3, 0x91, 0x73, 0xa7, 0xae, 0x7f, 0xc2, 0xff, 0x5c, 0x0f, 0xb4, 0x09, 0x05, 0x35, 0xda, 0xdb, 0x58, 0xd8, 0x7d, 0x0d, 0xa3, 0xdb, 0x32, 0xec, 0xec, 0x13, 0x71, 0x8b, 0x3a, 0xc5, 0xc3, 0x0b, 0xa8, 0x02, 0xe3, 0x8b } + +} +, +{ + "PKCS#1 v1.5 Signature Example 10.8", + /* Message to be signed */ + 92, + { 0xe6, 0x9a, 0xc9, 0x43, 0x3e, 0x6c, 0x28, 0xac, 0x53, 0xf8, 0x03, 0x4a, 0x86, 0x8d, 0xa9, 0x88, 0x3e, 0x31, 0x9e, 0x82, 0xe6, 0xbc, 0x2e, 0x49, 0x45, 0x5e, 0x6e, 0x4f, 0x09, 0x8b, 0x53, 0xf2, 0x87, 0xa8, 0x58, 0xda, 0x1d, 0x87, 0x6a, 0x9a, 0x5a, 0x6a, 0x9f, 0xc1, 0x4f, 0xd2, 0x42, 0x38, 0xcd, 0x4e, 0x4b, 0x57, 0x31, 0x07, 0x7a, 0x4d, 0xbd, 0xd5, 0x03, 0x8a, 0x9b, 0xc1, 0xf5, 0xde, 0xf4, 0x3f, 0xec, 0x77, 0xf6, 0x7e, 0xb0, 0x62, 0xfa, 0xef, 0xef, 0x7d, 0x04, 0x29, 0x23, 0x8b, 0x25, 0xd0, 0x31, 0x85, 0x78, 0x96, 0x62, 0x3a, 0x3f, 0x1d, 0x37, 0xbf } +, + /* Signature */ + 129, + { 0x08, 0xa0, 0x20, 0xe4, 0x20, 0x98, 0x78, 0xf1, 0xe6, 0x37, 0xad, 0x59, 0xda, 0xaf, 0x83, 0x5d, 0xaf, 0x4c, 0xa6, 0x64, 0x84, 0x47, 0x94, 0xc1, 0xc6, 0x48, 0xf0, 0xe2, 0x23, 0x3d, 0xba, 0x75, 0x48, 0xbd, 0x16, 0x1f, 0x0c, 0x0a, 0x18, 0x24, 0xd7, 0x62, 0x03, 0x1a, 0x41, 0x75, 0x72, 0x84, 0x2f, 0x8e, 0x64, 0x4a, 0xa9, 0x3f, 0x9d, 0x91, 0xdd, 0x77, 0x09, 0xe1, 0x6a, 0x42, 0x9c, 0xc1, 0x43, 0x90, 0x3e, 0xf4, 0xf8, 0x37, 0xa4, 0x58, 0x39, 0x6b, 0xca, 0xc2, 0x40, 0x92, 0xb0, 0x17, 0x24, 0xc6, 0xfe, 0x3d, 0xd1, 0xad, 0x24, 0x3f, 0x3f, 0x70, 0xb5, 0xae, 0x6f, 0xaa, 0x09, 0xf3, 0x70, 0xca, 0xa5, 0x12, 0x10, 0x4b, 0x91, 0x76, 0x06, 0x0d, 0xf2, 0xbf, 0x12, 0x1c, 0xbc, 0xe9, 0x19, 0x8e, 0xc2, 0xfe, 0x45, 0xa5, 0x9e, 0xbd, 0xdc, 0x46, 0x75, 0x32, 0xb5, 0xaf, 0xb9, 0xb2, 0x35 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 10.9", + /* Message to be signed */ + 152, + { 0x45, 0xe0, 0x90, 0x56, 0xa2, 0x8e, 0x4b, 0x2e, 0x7c, 0x11, 0xf6, 0x5e, 0x68, 0x8a, 0x1e, 0x3c, 0x33, 0xf0, 0xe5, 0x2c, 0x9a, 0x03, 0x6c, 0x09, 0xd8, 0x1d, 0xe5, 0xa6, 0xda, 0xb5, 0x8d, 0x4d, 0x55, 0xcf, 0x41, 0x1b, 0x53, 0xad, 0x64, 0x6e, 0x83, 0xa3, 0x4b, 0x0c, 0x08, 0xc2, 0x21, 0xae, 0x03, 0x76, 0xab, 0x76, 0xa7, 0x9d, 0x1f, 0xee, 0x67, 0x1a, 0x58, 0x44, 0x20, 0x56, 0x4f, 0x8e, 0x85, 0x2e, 0xb6, 0xf2, 0xd4, 0x27, 0xae, 0xe0, 0xa0, 0x96, 0xdd, 0x72, 0xdb, 0xe8, 0x50, 0x7c, 0x67, 0x7f, 0x8a, 0xa0, 0x0e, 0xb7, 0xc2, 0x5d, 0xfb, 0x0a, 0x49, 0xdd, 0x88, 0xa6, 0xc7, 0x84, 0x76, 0xb8, 0x00, 0x11, 0xb6, 0x82, 0x8b, 0x3a, 0xaf, 0x46, 0x47, 0x79, 0x44, 0x22, 0xba, 0x6b, 0xd6, 0x3b, 0x7a, 0xb0, 0xe7, 0xda, 0xfb, 0xd3, 0x6f, 0x6c, 0x41, 0xde, 0xa0, 0x3d, 0x73, 0x22, 0x35, 0x64, 0x96, 0x94, 0x60, 0xd9, 0x28, 0x54, 0x0b, 0x73, 0x92, 0x57, 0xe7, 0x0b, 0xb6, 0x8d, 0x5c, 0x65, 0x3c, 0x37, 0x96, 0x94, 0x58, 0x95 } +, + /* Signature */ + 129, + { 0x08, 0x71, 0x7d, 0x50, 0x86, 0xa6, 0x45, 0x3b, 0xde, 0xff, 0x77, 0xd4, 0xc2, 0xb8, 0x56, 0xe3, 0xba, 0x99, 0x0b, 0xab, 0xf6, 0x97, 0x01, 0xdf, 0x6c, 0xa0, 0xa3, 0xb3, 0xa8, 0x1b, 0x55, 0x69, 0x7d, 0x31, 0x88, 0x9d, 0x10, 0x0d, 0x68, 0x95, 0xc9, 0x7f, 0x0a, 0x56, 0xb4, 0x71, 0x68, 0xc9, 0x8d, 0xa6, 0x2e, 0x59, 0xec, 0x79, 0xd7, 0xae, 0xab, 0x2f, 0x9a, 0x57, 0x07, 0x46, 0x98, 0x8a, 0x26, 0xf4, 0x23, 0x57, 0x6c, 0x70, 0x3f, 0xd8, 0x41, 0xae, 0x51, 0xc9, 0xc2, 0x29, 0xa2, 0xe9, 0xc2, 0x5f, 0xe9, 0x4c, 0x5b, 0x6c, 0xe2, 0xfa, 0x64, 0x54, 0x12, 0xbe, 0xe6, 0x59, 0xfa, 0xf6, 0x09, 0xa3, 0x2e, 0xb2, 0xc0, 0x5b, 0xee, 0xab, 0xaa, 0x4f, 0x58, 0xca, 0xac, 0x31, 0x33, 0xe5, 0xea, 0xaa, 0x27, 0x34, 0x4d, 0x30, 0xee, 0xca, 0x22, 0xc6, 0xeb, 0xd8, 0xd9, 0xe3, 0x44, 0x41, 0x0e } + +} +, +{ + "PKCS#1 v1.5 Signature Example 10.10", + /* Message to be signed */ + 141, + { 0xb8, 0x1c, 0x8b, 0xc4, 0xac, 0x1f, 0xd9, 0x71, 0xb2, 0x1f, 0x02, 0x7e, 0x06, 0xf4, 0xd8, 0x7b, 0x34, 0xd5, 0x76, 0x9d, 0x23, 0xc8, 0x59, 0x9d, 0x1f, 0x15, 0x7b, 0x08, 0xa7, 0xf9, 0x2e, 0x34, 0x19, 0xfe, 0xc4, 0xc8, 0xc1, 0xb3, 0x4c, 0xa4, 0x63, 0xc7, 0x68, 0xb7, 0x2e, 0x07, 0xf9, 0xda, 0xbc, 0x3c, 0xbb, 0xdd, 0x8b, 0x56, 0x17, 0xcc, 0x25, 0x28, 0x75, 0x00, 0x2a, 0x1a, 0x13, 0x92, 0xaf, 0x0f, 0xaf, 0xc0, 0x8c, 0x72, 0x11, 0x75, 0x8f, 0x3c, 0x04, 0x20, 0x50, 0xad, 0x73, 0x1b, 0x63, 0x6c, 0x0e, 0x83, 0x19, 0x1a, 0x79, 0xde, 0x5a, 0xa2, 0xcb, 0x94, 0xdc, 0x8b, 0x0b, 0xdd, 0xe7, 0x5d, 0xb7, 0xd0, 0xc8, 0xba, 0xfb, 0x42, 0x23, 0xd3, 0x47, 0xb0, 0x24, 0xb3, 0xd9, 0xc6, 0xb2, 0x39, 0x61, 0x9b, 0x5d, 0x8b, 0x63, 0x46, 0xea, 0x86, 0xfb, 0x8f, 0x24, 0xc5, 0x84, 0xdc, 0x1a, 0x47, 0x79, 0x1c, 0xb7, 0xc8, 0xc7, 0xeb, 0xf1, 0xed, 0x43, 0x8b, 0x88 } +, + /* Signature */ + 129, + { 0x01, 0xb9, 0xf4, 0x33, 0x94, 0xc7, 0xcb, 0x88, 0x5b, 0xfd, 0xcc, 0x3c, 0x84, 0x96, 0x22, 0x23, 0xe8, 0xaa, 0xa9, 0x4c, 0x6c, 0x9b, 0x79, 0x05, 0x40, 0x1d, 0x24, 0xf0, 0xdc, 0x44, 0x3b, 0x2e, 0x8d, 0x84, 0x0e, 0x28, 0xa9, 0x5f, 0xa2, 0x2e, 0x1a, 0xe3, 0x6f, 0xfe, 0x08, 0x96, 0x6f, 0x38, 0xd3, 0x87, 0x14, 0xcf, 0x68, 0xda, 0x8d, 0xb2, 0x37, 0x64, 0xb8, 0x8c, 0x4b, 0xb2, 0xbe, 0x4f, 0xd3, 0xda, 0x9c, 0xcd, 0x1b, 0x50, 0x69, 0x42, 0xaa, 0x9d, 0x73, 0xfc, 0x09, 0x38, 0x2d, 0xc3, 0x30, 0x83, 0x14, 0x70, 0x6e, 0x6c, 0xe2, 0x7f, 0x00, 0x76, 0x1f, 0x3c, 0x9b, 0xd5, 0x4f, 0xa0, 0xe3, 0x1c, 0x96, 0x71, 0x9a, 0xfb, 0xf0, 0x76, 0x3e, 0x35, 0xca, 0xd8, 0x89, 0xb7, 0x2e, 0x13, 0xbd, 0x12, 0xb7, 0x6d, 0x6f, 0x20, 0x20, 0xfa, 0xf6, 0x1d, 0xd3, 0xd7, 0x08, 0x22, 0x8d, 0xf0, 0x6d } + +} +, +{ + "PKCS#1 v1.5 Signature Example 10.11", + /* Message to be signed */ + 31, + { 0xd0, 0x32, 0x28, 0x83, 0xe5, 0x98, 0x16, 0x3d, 0x72, 0x20, 0x36, 0xda, 0x3e, 0x63, 0x2a, 0xa6, 0x55, 0x97, 0xac, 0xbc, 0xd1, 0xf4, 0x76, 0x03, 0x10, 0x96, 0x96, 0xf9, 0xb3, 0x9f, 0xdc } +, + /* Signature */ + 129, + { 0x07, 0x8d, 0x17, 0xab, 0x8e, 0x6f, 0xf0, 0xbe, 0x50, 0xb3, 0x53, 0x9e, 0xb0, 0x3a, 0xe8, 0xf0, 0x90, 0x3b, 0x7a, 0x07, 0x74, 0x81, 0x78, 0x1f, 0xb0, 0xb1, 0xf0, 0x9e, 0xdc, 0xf7, 0x78, 0x86, 0x31, 0x2a, 0xd6, 0xc0, 0x60, 0x27, 0x4f, 0x0c, 0x38, 0x9c, 0x16, 0x31, 0x40, 0x40, 0xc8, 0xd7, 0xd9, 0x90, 0x9c, 0xb7, 0x5d, 0xf1, 0x8c, 0x82, 0xd6, 0x2d, 0xd3, 0x4e, 0xb5, 0x9c, 0x6a, 0x87, 0xd3, 0xc4, 0x6a, 0x7e, 0xf7, 0x47, 0x4a, 0x5e, 0x44, 0x7f, 0x77, 0x44, 0xa6, 0xa9, 0x2f, 0x59, 0x90, 0xea, 0xec, 0x7b, 0xfb, 0x00, 0x84, 0x4d, 0x68, 0x4d, 0x30, 0x7d, 0xdb, 0x49, 0x81, 0x89, 0x41, 0x49, 0xe7, 0x52, 0xbf, 0xbe, 0x2e, 0x77, 0x05, 0x7d, 0xa7, 0x60, 0x54, 0x69, 0xaf, 0x7f, 0xfb, 0x67, 0x27, 0xa9, 0x98, 0x1b, 0x94, 0x39, 0xca, 0xa5, 0xd8, 0x0e, 0x6a, 0xe3, 0xb3, 0xd6, 0x51 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 10.12", + /* Message to be signed */ + 20, + { 0xe8, 0x74, 0x2f, 0x04, 0xb5, 0x65, 0x4d, 0x92, 0x88, 0xb2, 0x31, 0xa4, 0x7a, 0x36, 0x58, 0x39, 0xbb, 0x01, 0xbe, 0x87 } +, + /* Signature */ + 129, + { 0x09, 0xb7, 0x53, 0x06, 0xa7, 0x21, 0x2e, 0xa6, 0xf4, 0x7e, 0xb0, 0xcc, 0xf4, 0xe2, 0xe0, 0xd6, 0xf8, 0xf3, 0xab, 0xdb, 0x9c, 0xdc, 0xfa, 0xad, 0xbe, 0x51, 0x92, 0x2f, 0x92, 0xea, 0x62, 0x62, 0x3c, 0x58, 0xea, 0x74, 0xea, 0x1a, 0x24, 0x7c, 0x9d, 0x73, 0x1f, 0x2c, 0x03, 0x35, 0x36, 0xb3, 0x52, 0x73, 0xc7, 0x17, 0x49, 0x5f, 0x32, 0x5a, 0x60, 0x40, 0x5b, 0xd5, 0xf5, 0xe4, 0x05, 0xb6, 0x80, 0x27, 0x9e, 0x75, 0x21, 0x60, 0x47, 0x87, 0x40, 0x45, 0x72, 0x16, 0xdc, 0x92, 0x9d, 0xdd, 0x65, 0xde, 0xa5, 0x05, 0x53, 0x55, 0x46, 0xe4, 0x77, 0x0f, 0x82, 0x11, 0xb8, 0x49, 0xc3, 0x65, 0x21, 0x8e, 0x56, 0x6e, 0x5b, 0xb4, 0x1b, 0xfc, 0x36, 0x1b, 0x65, 0xcd, 0xcc, 0xb0, 0xe6, 0x04, 0xc9, 0xed, 0xb9, 0x70, 0xee, 0x6a, 0x28, 0x6a, 0x1f, 0xce, 0xc0, 0xae, 0x9d, 0x92, 0x55, 0x8e, 0xab } + +} +, +{ + "PKCS#1 v1.5 Signature Example 10.13", + /* Message to be signed */ + 249, + { 0xa0, 0x3c, 0x2b, 0x85, 0xfd, 0xe4, 0x64, 0x68, 0xd1, 0xc5, 0x06, 0x37, 0xb0, 0x0a, 0x72, 0xdc, 0xfc, 0x32, 0xc4, 0x16, 0x31, 0x73, 0x9c, 0x06, 0x02, 0x45, 0xf5, 0x3e, 0x57, 0xc6, 0x6c, 0x51, 0x76, 0x6f, 0x24, 0xea, 0xfd, 0x93, 0xe6, 0xc6, 0x67, 0x43, 0x48, 0x05, 0x91, 0xbf, 0x14, 0x44, 0x6e, 0x04, 0x0b, 0x67, 0xa4, 0xf8, 0x46, 0x99, 0x57, 0x6c, 0x2e, 0x14, 0x63, 0xca, 0xcc, 0xbc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7, 0xb2, 0x46 } +, + /* Signature */ + 129, + { 0x05, 0x8d, 0xa5, 0x49, 0x4c, 0x4e, 0x98, 0xaa, 0x12, 0x1f, 0x67, 0xf6, 0x5a, 0x2c, 0x86, 0x54, 0x25, 0xa9, 0xe6, 0x00, 0x2b, 0x22, 0x3f, 0x03, 0x88, 0x80, 0x97, 0x53, 0x57, 0x3b, 0x4f, 0x33, 0x4d, 0xe4, 0x5d, 0x8f, 0x00, 0x07, 0x25, 0x5d, 0x11, 0x2d, 0xdc, 0x84, 0xdb, 0x26, 0x67, 0x00, 0xe4, 0x40, 0xb5, 0xa8, 0x69, 0x00, 0xc3, 0xd3, 0xd3, 0x5b, 0x02, 0x4c, 0x18, 0xd8, 0xa2, 0x5a, 0x58, 0x00, 0x22, 0x6d, 0x0a, 0x56, 0xd8, 0x38, 0xd8, 0x91, 0x9e, 0x6d, 0x5a, 0x87, 0x30, 0xd6, 0x19, 0x49, 0x90, 0x15, 0xec, 0x46, 0x65, 0xc6, 0x3d, 0x77, 0x80, 0x83, 0xa0, 0x42, 0xdd, 0x4f, 0x05, 0x2a, 0x1b, 0xbb, 0x5f, 0x40, 0x80, 0xcb, 0xbb, 0x41, 0xfa, 0x94, 0x5b, 0xad, 0x6a, 0x74, 0x77, 0x9f, 0x68, 0x07, 0x25, 0xe4, 0x7a, 0x08, 0xa0, 0x51, 0x4f, 0x35, 0x0f, 0xa5, 0xad, 0xf9, 0x0a } + +} +, +{ + "PKCS#1 v1.5 Signature Example 10.14", + /* Message to be signed */ + 47, + { 0xc4, 0x0c, 0x70, 0xf2, 0x6d, 0xa5, 0x69, 0x48, 0x6b, 0xac, 0xe7, 0x85, 0xda, 0x32, 0xe3, 0x37, 0xa0, 0xeb, 0x94, 0xfb, 0x3a, 0x0a, 0xa4, 0x09, 0xc5, 0x77, 0x01, 0x75, 0xc8, 0xe8, 0xcb, 0x2b, 0xaa, 0x8d, 0x2a, 0x1b, 0x98, 0x46, 0xc3, 0x7d, 0xf7, 0xd6, 0x71, 0x03, 0x6d, 0x5e, 0x91 } +, + /* Signature */ + 129, + { 0x05, 0x25, 0x61, 0x28, 0xaf, 0xba, 0x1f, 0x55, 0xd8, 0x1f, 0x79, 0xea, 0x33, 0x87, 0x91, 0x47, 0xa2, 0x4a, 0xd7, 0x77, 0x93, 0x46, 0xee, 0x79, 0x8b, 0x21, 0x1c, 0x24, 0x71, 0x53, 0xea, 0x38, 0xd2, 0x6b, 0x21, 0x70, 0x65, 0xf6, 0x1e, 0x01, 0x10, 0xb5, 0x3d, 0x72, 0xcb, 0x64, 0x93, 0x4d, 0x9b, 0x1a, 0xd1, 0xb3, 0xde, 0xc3, 0x32, 0x09, 0x2d, 0x25, 0x8f, 0x0c, 0xaf, 0x1c, 0x4a, 0xee, 0x8b, 0x23, 0xe0, 0x9b, 0xab, 0x0f, 0x0c, 0x27, 0x88, 0x58, 0xb4, 0x41, 0xd0, 0x8c, 0xa3, 0xae, 0x9f, 0x00, 0xaa, 0x9a, 0x3f, 0x01, 0x8f, 0x7d, 0x9f, 0xa9, 0x8a, 0x18, 0xdf, 0x0d, 0x24, 0x84, 0x7e, 0x56, 0x7a, 0x47, 0xf5, 0x77, 0x9b, 0xd1, 0x79, 0x3a, 0x4b, 0x02, 0x52, 0xf2, 0xba, 0xd4, 0x0c, 0x9c, 0x4a, 0x81, 0x30, 0x1c, 0xc2, 0x8c, 0x26, 0x09, 0xd7, 0xbb, 0x33, 0x37, 0xe9, 0x7f, 0x14 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 10.15", + /* Message to be signed */ + 83, + { 0x9e, 0x6d, 0xcb, 0x11, 0xe0, 0xe8, 0x47, 0x71, 0x39, 0xfa, 0xf0, 0x41, 0xa7, 0x4e, 0x2b, 0xed, 0x64, 0x3a, 0x62, 0xad, 0xed, 0xac, 0x7c, 0xbe, 0xf3, 0x65, 0xec, 0xc4, 0x3a, 0xe4, 0xe5, 0x82, 0x60, 0xbc, 0x72, 0x46, 0x23, 0xbd, 0x63, 0x42, 0xdc, 0x66, 0x0d, 0x66, 0x14, 0x2e, 0xa6, 0x36, 0x80, 0x71, 0x5f, 0x52, 0x2f, 0xf3, 0xcd, 0x4b, 0x63, 0x6f, 0x84, 0xaa, 0x9d, 0x75, 0xfb, 0xfb, 0xc3, 0x84, 0x10, 0x7e, 0x43, 0x00, 0x4d, 0x98, 0x6f, 0xbc, 0xe1, 0xa2, 0x7f, 0x7e, 0xcc, 0x7d, 0x02, 0x39, 0x2c } +, + /* Signature */ + 129, + { 0x0c, 0xcf, 0x23, 0x4e, 0xb4, 0x80, 0x08, 0x5d, 0x92, 0x0d, 0x37, 0xd6, 0x87, 0x96, 0x5d, 0x2f, 0xd2, 0xe4, 0xa4, 0xf3, 0xbd, 0x3b, 0xf7, 0xdd, 0xc1, 0x6b, 0x5d, 0x62, 0xa6, 0x90, 0x32, 0x74, 0x20, 0x7c, 0x6f, 0x90, 0x83, 0x6e, 0x29, 0xff, 0xc6, 0x3a, 0x57, 0xf9, 0x81, 0x30, 0xc5, 0x25, 0x23, 0x25, 0x19, 0xc7, 0x08, 0xf0, 0xdc, 0x8a, 0x12, 0x55, 0xab, 0x55, 0xdb, 0x1a, 0x2b, 0x9a, 0xbc, 0x11, 0x06, 0x16, 0x02, 0x07, 0x5f, 0xf6, 0xf9, 0x7f, 0x90, 0x92, 0x79, 0x6b, 0x98, 0x87, 0x1a, 0x6c, 0xd5, 0xd2, 0x61, 0x7d, 0xdc, 0x9d, 0x25, 0x5a, 0x73, 0x00, 0xc9, 0x10, 0xfd, 0x21, 0x0b, 0x14, 0xa9, 0x81, 0xe5, 0xa0, 0xe0, 0xc6, 0xbb, 0x2b, 0x04, 0x5f, 0xa9, 0x75, 0x68, 0x98, 0xb9, 0x3b, 0x8a, 0x63, 0x45, 0x44, 0xd7, 0x7a, 0xfd, 0xb1, 0xcf, 0x0e, 0x79, 0x58, 0xf1, 0x1a, 0x43 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 10.16", + /* Message to be signed */ +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0x42, 0x66, 0x06, 0x6b, 0xbb, 0x81, 0x9a, 0x2a, 0x38, 0x05, 0xa8, 0x9c, 0xff, 0x46, 0x18, 0x75, 0xc0, 0x95, 0xf4, 0xf3, 0x89, 0x82, 0xd1, 0xaf, 0xc2, 0xad, 0x2f, 0x14, 0x24, 0x50, 0xb8, 0xa7, 0x52, 0x94, 0x7f, 0x03, 0x1c, 0xce, 0x2c, 0x9c, 0x34, 0x0c, 0x8a, 0xc9, 0xf9, 0xf7, 0xa5, 0x48, 0xb7, 0xcc, 0x17, 0xe4, 0xcc, 0x52, 0x56, 0x96, 0xea, 0x0c, 0x87, 0x53, 0xa1, 0xe1, 0x5b, 0xcb, 0x98, 0x5d, 0xea, 0xec, 0x77, 0x6f, 0xb9, 0xe7, 0xd9, 0xf7, 0x58, 0x62, 0xf8, 0x98, 0x35, 0x23, 0xd9, 0xf8, 0x71, 0xc6, 0x3f, 0xb7, 0x56, 0x1a, 0xc7, 0x1c, 0x37, 0x6b, 0xf4, 0x95, 0xd4, 0x32, 0x38, 0x59, 0xbd, 0x14, 0x18, 0x8f, 0xcd, 0xfb, 0x4b, 0x37, 0xab, 0xcb, 0x5d, 0xc1, 0xa5, 0x8e, 0xed, 0xea, 0x7e, 0x0f, 0xe6, 0x2a, 0xc1, 0x6e, 0x20, 0x8a, 0xab, 0x4c, 0xee, 0x26 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 10.17", + /* Message to be signed */ + 232, + { 0x92, 0xda, 0x26, 0x0b, 0xc2, 0x13, 0xb7, 0x2b, 0x48, 0xa0, 0x57, 0x53, 0x50, 0x3d, 0x00, 0xa1, 0xdb, 0xfd, 0x02, 0xac, 0x7b, 0x9f, 0xd4, 0x4d, 0x24, 0x01, 0xea, 0x7a, 0xd5, 0x8a, 0xd1, 0x86, 0x1f, 0xda, 0x53, 0x63, 0x29, 0xae, 0x41, 0x73, 0xc9, 0x16, 0x80, 0x05, 0xb9, 0x66, 0x2c, 0x05, 0xcb, 0xea, 0x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0x03, 0xe2, 0x3f, 0x86, 0x52, 0x37, 0x4d, 0x48, 0xd3, 0x81, 0xc3, 0x78, 0x35, 0x3e, 0xb4, 0x7d, 0x90, 0x64, 0xcd, 0x70, 0x8e, 0x1b, 0x9b, 0xf6, 0x88, 0x70, 0x4c, 0x04, 0xc0, 0x09, 0x00, 0x88, 0x46, 0xe6, 0xa4, 0x7e, 0x0b, 0xd2, 0xe3, 0x0c, 0x33, 0x40, 0xf5, 0xd4, 0xe1, 0x9d, 0x2d, 0xc5, 0xd8, 0x89, 0x0c, 0x8f, 0x01, 0x04, 0xdd, 0x6f, 0x5d, 0xd6, 0xca, 0xd9, 0xc4, 0xd9, 0x94, 0x84, 0x09, 0xc3, 0xcc, 0x0b, 0xe6, 0x70, 0x71, 0x9d, 0xd0, 0x48, 0x41, 0x80, 0x89, 0x1c, 0x93, 0x5b, 0x99, 0x79, 0xdb, 0x8e, 0xb4, 0x68, 0xa2, 0x3e, 0x4e, 0xf4, 0x60, 0x29, 0xf3, 0xaf, 0x14, 0x57, 0x4b, 0xd1, 0x0b, 0x47, 0x3e, 0xdd, 0x9b, 0x12, 0x7a, 0x30, 0x6e, 0x51, 0x24, 0xad, 0xa4, 0x02, 0xc1, 0x48, 0xf5, 0x1b, 0x52, 0xe7, 0xe6, 0x28, 0xbf, 0xac, 0xec, 0x3f, 0xc2, 0x54, 0x3a, 0x0f, 0x92 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 10.18", + /* Message to be signed */ + 113, + { 0x86, 0x03, 0xa5, 0x62, 0x2a, 0x2d, 0xbb, 0xbc, 0xbb, 0xe5, 0x33, 0x30, 0xe9, 0x08, 0xd5, 0xa2, 0x5f, 0x6e, 0x67, 0xa5, 0x1e, 0x07, 0x68, 0xd7, 0xc3, 0xc3, 0xfb, 0xe8, 0xb9, 0x2e, 0x8b, 0x1b, 0x36, 0xdc, 0x00, 0x74, 0x3c, 0xe3, 0x3d, 0xa0, 0xf1, 0xc8, 0xcf, 0xb0, 0x0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, 0xd3, 0x5c, 0x8e, 0xf8, 0x58, 0x1b, 0x41, 0xf8, 0xdd, 0xab, 0x26, 0x18, 0x26, 0x2e, 0x3d, 0xff } + +} +, +{ + "PKCS#1 v1.5 Signature Example 10.19", + /* Message to be signed */ + 43, + { 0x06, 0x7d, 0x4b, 0xec, 0xb0, 0x3e, 0x1e, 0xb2, 0x75, 0xae, 0x22, 0x50, 0x7a, 0x77, 0xa5, 0x39, 0x6e, 0x71, 0x9b, 0x5f, 0x00, 0xb1, 0x05, 0x95, 0x0b, 0xc7, 0x99, 0x8e, 0x08, 0x03, 0xda, 0x57, 0xa4, 0xde, 0x08, 0xa4, 0x07, 0x8b, 0x9a, 0x00, 0xd2, 0xd4, 0x6f } +, + /* Signature */ + 129, + { 0x09, 0x10, 0x8d, 0x44, 0x57, 0x5f, 0x61, 0x4a, 0x68, 0x3e, 0xe4, 0xd7, 0x8b, 0xce, 0x1c, 0x58, 0xf5, 0x24, 0x36, 0x87, 0xcb, 0xe9, 0xc5, 0x48, 0x34, 0x60, 0xb6, 0x5d, 0xf2, 0x36, 0x92, 0x7d, 0xbc, 0x78, 0xc0, 0x64, 0x39, 0xce, 0x1c, 0x7c, 0x51, 0x97, 0x39, 0xc8, 0xf8, 0x95, 0x00, 0x82, 0xd9, 0x56, 0xd6, 0x0f, 0xc3, 0x64, 0x5b, 0xa7, 0xaf, 0x8e, 0x78, 0x89, 0x54, 0x70, 0x63, 0x1b, 0xb4, 0xda, 0x00, 0xc0, 0x1b, 0x98, 0x2c, 0xc1, 0x1c, 0x68, 0xd2, 0x65, 0x0c, 0x7c, 0xae, 0xa4, 0xa2, 0x6e, 0x21, 0x0f, 0xf4, 0xb1, 0xca, 0xe1, 0xdb, 0x50, 0x5f, 0xce, 0xa9, 0x29, 0x34, 0x87, 0xb2, 0x07, 0x31, 0x78, 0xca, 0x24, 0x5c, 0xf0, 0xca, 0x23, 0x56, 0xba, 0xf8, 0x65, 0x54, 0x6b, 0x54, 0xaf, 0x95, 0x35, 0xba, 0xb1, 0x8d, 0xb6, 0x79, 0xef, 0x56, 0x27, 0x09, 0x29, 0x79, 0xc0, 0xa8 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 10.20", + /* Message to be signed */ + 238, + { 0x88, 0x4f, 0xc5, 0x02, 0xc8, 0x82, 0x48, 0x49, 0x47, 0x8b, 0x2e, 0xac, 0x1e, 0x7e, 0xbb, 0xb7, 0xca, 0xf2, 0x8e, 0xeb, 0x48, 0x89, 0x45, 0x86, 0x02, 0xec, 0x70, 0x35, 0x81, 0xd0, 0x5e, 0xf9, 0xb1, 0xa4, 0x22, 0x0b, 0xd2, 0xf9, 0x22, 0xf2, 0x5e, 0x46, 0x4c, 0x88, 0x07, 0x01, 0xc8, 0xa4, 0x5b, 0x1d, 0x1f, 0xab, 0xc8, 0x66, 0x2e, 0xb2, 0x49, 0x40, 0x04, 0x26, 0xc2, 0x22, 0x62, 0x38, 0xeb, 0x8a, 0xd0, 0xf9, 0x06, 0x9c, 0x90, 0xf0, 0x01, 0x82, 0x77, 0x44, 0x80, 0x25, 0xa6, 0x41, 0x80, 0xed, 0x55, 0xd1, 0xaf, 0xd2, 0x7a, 0xff, 0x4f, 0x00, 0x70, 0x2f, 0x71, 0x5d, 0x29, 0x10, 0x00, 0x0d, 0xf3, 0x92, 0x5c, 0x70, 0x10, 0xff, 0x11, 0x7f, 0x6d, 0x8d, 0x2a, 0x81, 0x67, 0x09, 0x48, 0x9e, 0xfd, 0x29, 0xa4, 0x5c, 0x59, 0x23, 0x17, 0x7b, 0xf9, 0x2c, 0xd0, 0xbf, 0x6b, 0x94, 0x74, 0x5d, 0x34, 0x8a, 0x14, 0x4e, 0x98, 0x74, 0x0f, 0x72, 0x22, 0x6a, 0x3e, 0x2a, 0x9d, 0x41, 0x7b, 0x7c, 0x1f, 0xd8, 0xf8, 0x95, 0xf5, 0x15, 0xc5, 0xc6, 0xd4, 0x06, 0xa7, 0x2b, 0xdc, 0xcd, 0x39, 0x15, 0x2c,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 0x11, 0xbd, 0x45, 0x22, 0xdd, 0x14, 0x1a, 0x00, 0x15, 0x7d, 0xc3, 0xfc, 0xaf, 0xc4, 0x15, 0x4c, 0xaf, 0x05, 0x93, 0xca, 0x62, 0x10, 0x2e } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 11: A 1029-bit RSA key pair", +{ + /* Modulus */ + 129, + { 0x1e, 0xd7, 0xee, 0xa9, 0x40, 0x5f, 0x50, 0x7f, 0x94, 0x16, 0x23, 0xa1, 0x7b, 0xea, 0x71, 0x7b, 0x86, 0x0d, 0xe4, 0x4c, 0xb7, 0x76, 0x87, 0xb8, 0xb8, 0x5a, 0x6d, 0x7d, 0x1e, 0xf4, 0xf8, 0x62, 0x8d, 0x25, 0x7c, 0xb9, 0x42, 0x38, 0xc6, 0x25, 0xba, 0x25, 0xd4, 0x6a, 0xae, 0x59, 0x39, 0x60, 0xaf, 0x79, 0xf7, 0x5e, 0x28, 0xab, 0x63, 0xac, 0x3c, 0xac, 0x48, 0x20, 0xb8, 0x2d, 0xa1, 0xcf, 0x75, 0x0d, 0x6c, 0x93, 0x0d, 0x6b, 0x82, 0x78, 0x54, 0xaa, 0xf6, 0xca, 0xc0, 0xc1, 0x7b, 0x80, 0xb0, 0x29, 0xf5, 0xd3, 0x19, 0xcc, 0xca, 0x66, 0x5c, 0x56, 0x94, 0xf5, 0x4b, 0xa5, 0xf0, 0x96, 0xf4, 0x54, 0x34, 0x13, 0xec, 0x4c, 0x5e, 0x97, 0xcc, 0x1d, 0xda, 0x89, 0xd2, 0xaf, 0xd4, 0x28, 0x57, 0x87, 0x59, 0x03, 0x2a, 0xdf, 0x92, 0x89, 0x50, 0x65, 0xba, 0xaf, 0xe8, 0x8d, 0x2d, 0x8b, 0x61 } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 129, + { 0x0d, 0x93, 0x80, 0x72, 0xb1, 0x6a, 0x02, 0xf5, 0xd5, 0x0a, 0x15, 0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, 0x21, 0x15, 0x24, 0x5f } +, + /* Prime 2 */ + 65, + { 0x05, 0x8a, 0xdd, 0x02, 0x9b, 0xc9, 0x7e, 0xcf, 0xd1, 0xd0, 0xdb, 0x26, 0xbe, 0x45, 0xee, 0x8d, 0x3e, 0x54, 0xbf, 0xe6, 0x36, 0xfc, 0x4d, 0xa6, 0x66, 0xdc, 0xf2, 0x50, 0xab, 0x2c, 0x2e, 0x96, 0x56, 0x62, 0x16, 0xb8, 0xa5, 0x17, 0xf1, 0x0f, 0x75, 0xb9, 0x8f, 0xde, 0x6c, 0xcd, 0x8a, 0x58, 0xe8, 0xfc, 0x58, 0x2e, 0x78, 0x74, 0x90, 0xe1, 0x95, 0x8f, 0x7a, 0x0f, 0xda, 0x82, 0xad, 0x68, 0x3f } +, + /* Prime exponent 1 */ + 65, + { 0x01, 0x80, 0xee, 0xfd, 0xa3, 0xf9, 0x06, 0x9a, 0xfa, 0xf9, 0x37, 0xa6, 0x72, 0xd4, 0xa2, 0xa4, 0x18, 0x17, 0x73, 0x01, 0x47, 0xda, 0xe9, 0xde, 0xbf, 0xc7, 0x24, 0x44, 0x42, 0xa0, 0xcf, 0x2b, 0xae, 0x4f, 0xef, 0x64, 0xc9, 0xda, 0x0b, 0x8a, 0xb3, 0xeb, 0x9d, 0xc7, 0x27, 0x2c, 0xe1, 0x2a, 0x08, 0x5f, 0x90, 0x98, 0x23, 0x55, 0x96, 0xe1, 0x15, 0xc4, 0x2c, 0x9a, 0x49, 0xcc, 0x46, 0x96, 0x29 } +, + /* Prime exponent 2 */ + 65, + { 0x05, 0x12, 0xe1, 0x4e, 0x11, 0x05, 0x7d, 0x84, 0x8c, 0x23, 0xf1, 0x6b, 0x5f, 0x46, 0x2f, 0xa2, 0xb7, 0x8b, 0xe7, 0xfc, 0xbd, 0x1b, 0x6d, 0x8e, 0x46, 0x9e, 0x3f, 0x69, 0x9f, 0xb9, 0x9b, 0x90, 0x5e, 0xd5, 0xfe, 0xcc, 0xdb, 0xbd, 0xb6, 0x1d, 0x1b, 0xfd, 0x5a, 0x7a, 0x19, 0x0a, 0x74, 0x7a, 0xfe, 0x16, 0x7c, 0x37, 0x56, 0x68, 0x07, 0x75, 0xab, 0x6f, 0xa4, 0x23, 0x3d, 0x3a, 0xe1, 0xba, 0x0b } +, + /* Coefficient */ + 64, + { 0x26, 0x2e, 0x28, 0x23, 0x16, 0x98, 0xbe, 0x32, 0x87, 0xa9, 0xc7, 0x06, 0xf3, 0x94, 0x7b, 0x7d, 0x5c, 0x2f, 0x5f, 0xd2, 0xb9, 0x14, 0x46, 0xf5, 0xe9, 0xa3, 0x15, 0x44, 0xd9, 0xaf, 0xf4, 0x55, 0xa3, 0xec, 0xc6, 0xb5, 0x43, 0x14, 0x82, 0x0c, 0x2a, 0x48, 0x82, 0x61, 0xd9, 0xf9, 0x8d, 0x34, 0x8d, 0x9c, 0x3d, 0x10, 0x02, 0xe4, 0xe8, 0x28, 0x7a, 0x15, 0x2c, 0x12, 0x87, 0x09, 0x65, 0x60 } + +} +, +{{ + "PKCS#1 v1.5 Signature Example 11.1", + /* Message to be signed */ + 218, + { 0x84, 0x55, 0x19, 0xdd, 0x45, 0xd2, 0xdd, 0xcb, 0xc8, 0xdb, 0xe0, 0xb8, 0x29, 0x54, 0xc4, 0x58, 0xc3, 0x66, 0x4d, 0x88, 0x27, 0x4e, 0x50, 0x2d, 0x27, 0x91, 0x46, 0xb1, 0x8f, 0x6a, 0x81, 0x67, 0x50, 0xe9, 0x4b, 0x4e, 0xcd, 0xee, 0x68, 0x32, 0xcb, 0x35, 0xdf, 0xcb, 0xdb, 0xdd, 0x3e, 0x5d, 0xc0, 0x64, 0x04, 0xd5, 0xf0, 0xc7, 0x0e, 0x7c, 0x7c, 0xd0, 0xe1, 0x9f, 0x38, 0xbc, 0x5a, 0xe3, 0x2c, 0x7c, 0xd9, 0x1f, 0x94, 0xd8, 0xf5, 0x67, 0x82, 0x39, 0x7b, 0xc7, 0x4e, 0x6b, 0x06, 0x98,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4, 0x7e, 0x57, 0x07, 0x87, 0x1c, 0x39, 0xc3, 0x8d, 0xbb, 0xc9, 0x6b, 0x46, 0xc8, 0xf9, 0xaf, 0xeb, 0xd3, 0xdd, 0xac, 0x87, 0x16, 0x90, 0x98, 0xe1, 0xa7, 0x67, 0x18, 0xd3, 0x54, 0xcd, 0x09, 0x1c, 0xa3, 0x52, 0x96, 0xa7, 0x7c, 0x21, 0xd2, 0x51, 0x2f, 0xfe, 0x65, 0xe3, 0xb7, 0x1b, 0x90, 0x22, 0xe9, 0xcd, 0x1f, 0x7c, 0x35, 0xce, 0x13, 0x65, 0xfd, 0x1f, 0x2c, 0x2c, 0xb9, 0x67, 0xff, 0x4c, 0x8f, 0x90, 0xf0, 0xc8, 0xea, 0xef, 0x0d, 0xb7, 0x3f, 0xed, 0x00, 0xe9, 0x8c, 0xfc, 0x83, 0xf8, 0x0c, 0x67, 0xb3, 0xbe, 0x1d, 0x33 } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Signature Example 11.2", + /* Message to be signed */ + 40, + { 0x86, 0x8e, 0x7c, 0x4f, 0xc6, 0x34, 0x0b, 0x6b, 0xbe, 0xb7, 0xb8, 0x6e, 0xa8, 0x9e, 0xe7, 0x26, 0x5f, 0x32, 0x31, 0xf4, 0x8b, 0xaa, 0x92, 0xe4, 0xa2, 0xe8, 0xce, 0x0f, 0xa1, 0xc1, 0xa8, 0xc0, 0xfb, 0x0a, 0xca, 0x94, 0x4c, 0x74, 0xbc, 0xcd } +, + /* Signature */ + 129, + { 0x10, 0xcb, 0xf8, 0x71, 0x7f, 0x76, 0x27, 0x8f, 0xcc, 0x8f, 0xc0, 0xaa, 0xb4, 0x6e, 0x90, 0xa3, 0xd1, 0x80, 0xc3, 0xc9, 0x2a, 0x4a, 0x83, 0xeb, 0x93, 0xc8, 0x92, 0x0a, 0xf8, 0x8b, 0xd6, 0x50, 0x6b, 0x40, 0x73, 0x45, 0x3f, 0x0b, 0xef, 0xf3, 0xe6, 0x1e, 0xdb, 0xb4, 0xdb, 0xc9, 0xc9, 0x47, 0xc6, 0x9d, 0xeb, 0x69, 0xa1, 0xac, 0x92, 0x9e, 0xfc, 0x15, 0x62, 0x5b, 0x9e, 0xd7, 0xcf, 0x1b, 0xc4, 0x23, 0xa8, 0x87, 0x5f, 0x37, 0x80, 0xdd, 0xda, 0x9e, 0xb2, 0xfc, 0xcd, 0x9f, 0xa0, 0x14, 0x62, 0x6a, 0x7f, 0xcf, 0x99, 0x86, 0x49, 0xbc, 0xfa, 0x59, 0x53, 0xa3, 0xc4, 0x3e, 0xfb, 0xcc, 0x38, 0x70, 0x4d, 0x02, 0x49, 0x19, 0xdf, 0x2f, 0xc4, 0xad, 0xea, 0x39, 0xe3, 0x4c, 0xd1, 0x5c, 0xd4, 0xf8, 0x6a, 0xd3, 0xf5, 0x01, 0x01, 0x2f, 0x6b, 0xd2, 0x8a, 0xa5, 0x00, 0x2c, 0x3b, 0x41, 0xba } + +} +, +{ + "PKCS#1 v1.5 Signature Example 11.3", + /* Message to be signed */ + 78, + { 0x92, 0xcf, 0x88, 0x0d, 0xa5, 0x89, 0x15, 0xe3, 0xaa, 0x95, 0x08, 0x93, 0x53, 0xe4, 0x61, 0x84, 0xc9, 0x15, 0x94, 0x5c, 0x57, 0x67, 0x9c, 0x1e, 0x4b, 0xd3, 0x82, 0x5e, 0xd9, 0x19, 0xa3, 0x20, 0x52, 0xe9, 0x78, 0x6e, 0x23, 0xb9, 0x42, 0x53, 0x9b, 0x93, 0x15, 0xf5, 0x81, 0xda, 0xf0, 0xb4, 0x1f, 0xa3, 0x26, 0x1b, 0x96, 0x7d, 0xe4, 0x0c, 0xd5, 0xd9, 0x2a, 0x48, 0x24, 0xf3, 0x64, 0xbd, 0x1e, 0x1f, 0x51, 0x84, 0x4b, 0x10, 0x9b, 0x14, 0x54, 0x13, 0x4a, 0xdf, 0x23, 0x4e } +, + /* Signature */ + 129, + { 0x08, 0x82, 0x89, 0x66, 0xac, 0x58, 0x36, 0xc5, 0x13, 0xda, 0x4f, 0xfb, 0x87, 0x61, 0x87, 0x97, 0x94, 0x3c, 0x61, 0x2e, 0xde, 0x7e, 0x12, 0xb3, 0x10, 0x03, 0xef, 0x17, 0x10, 0x65, 0xb4, 0xce, 0xdc, 0x6a, 0x80, 0xb1, 0x45, 0x6c, 0x21, 0xb6, 0x74, 0xb3, 0x77, 0x9a, 0xd3, 0x5f, 0x70, 0x17, 0x7a, 0xa9, 0x2c, 0x6e, 0xac, 0x0b, 0x83, 0x3a, 0x96, 0x7d, 0x7e, 0x98, 0x99, 0x0b, 0x48, 0x24, 0x42, 0x05, 0xdb, 0xf2, 0x6f, 0x5c, 0xd5, 0x7e, 0xf8, 0x7d, 0xc6, 0xfe, 0x5e, 0xd9, 0x99, 0xcf, 0x8c, 0xa7, 0x5d, 0xc8, 0xe6, 0x26, 0xfd, 0x6e, 0xb2, 0x81, 0xc4, 0x99, 0xaf, 0xf7, 0x29, 0x89, 0xed, 0xf5, 0x2e, 0xc6, 0xf3, 0xbc, 0xaf, 0x81, 0xec, 0x5f, 0x8e, 0x82, 0x30, 0xb8, 0x7e, 0xde, 0xdc, 0xf7, 0xb7, 0x78, 0x14, 0x3e, 0xd6, 0xc8, 0xce, 0xbb, 0xac, 0x9d, 0xe5, 0x41, 0x09, 0xdc, 0xf7 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 11.4", + /* Message to be signed */ + 68, + { 0x87, 0x3c, 0x47, 0x15, 0x90, 0x2f, 0xf1, 0x9d, 0xe0, 0x8b, 0xcc, 0xb0, 0xcf, 0x26, 0x37, 0x63, 0xfa, 0xb0, 0x16, 0xd0, 0x22, 0x0f, 0x03, 0x27, 0xb4, 0x75, 0x5e, 0x35, 0x4e, 0xb2, 0x47, 0xf5, 0xdb, 0xc2, 0xd3, 0x96, 0x98, 0x9b, 0xbd, 0x36, 0xd3, 0x1f, 0x61, 0x98, 0x93, 0x90, 0xca, 0xc1, 0x66, 0x43, 0x12, 0x5e, 0x63, 0xe1, 0xa1, 0xae, 0x1f, 0x1b, 0xc9, 0xbb, 0xed, 0xac, 0xce, 0x67, 0xfc, 0x1b, 0x51, 0xa7 } +, + /* Signature */ + 129, + { 0x05, 0x25, 0x9c, 0x48, 0x15, 0x93, 0xea, 0x86, 0xd1, 0xf0, 0x02, 0xca, 0x58, 0xaa, 0xee, 0x93, 0x29, 0xfa, 0xfe, 0x21, 0x8f, 0x67, 0x50, 0xf0, 0xe5, 0x88, 0xf3, 0x3b, 0x64, 0xe7, 0x08, 0xfb, 0x27, 0xa6, 0xfe, 0x81, 0xeb, 0xca, 0x8a, 0xda, 0xec, 0x75, 0x7a, 0x14, 0xff, 0x55, 0xa0, 0xc8, 0x8a, 0xda, 0x2c, 0x3b, 0x43, 0xe3, 0x9e, 0x8d, 0xfb, 0xe6, 0x76, 0x89, 0x43, 0x65, 0xa2, 0x21, 0x0c, 0x2a, 0xa8, 0x1f, 0x42, 0x4d, 0x85, 0x29, 0xc2, 0x07, 0x6b, 0x00, 0xc9, 0x2d, 0xd8, 0xc8, 0xae, 0x3b, 0x78, 0x0d, 0x87, 0xdb, 0xa7, 0x29, 0xdd, 0xfd, 0xef, 0x7d, 0x40, 0x7f, 0x85, 0x4a, 0x71, 0xcb, 0x68, 0x8b, 0x9f, 0x03, 0xc7, 0x1f, 0x3b, 0xaa, 0x24, 0xa2, 0xa6, 0xe1, 0xcb, 0x41, 0x07, 0x74, 0x30, 0x9e, 0x40, 0xc1, 0x3c, 0x2b, 0x26, 0x47, 0x38, 0xe5, 0x69, 0x7c, 0xfd, 0xde, 0xf3 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 11.5", + /* Message to be signed */ + 54, + { 0x14, 0xb2, 0x76, 0x02, 0xec, 0xe8, 0xf0, 0x67, 0xb5, 0x84, 0x83, 0xaf, 0x17, 0x77, 0xc4, 0xed, 0x10, 0xb8, 0xb6, 0x4e, 0x64, 0xc6, 0x9f, 0x57, 0xef, 0x88, 0x9a, 0x1c, 0xa5, 0xd5, 0xb5, 0xd6, 0x51, 0xc6, 0x08, 0xdb, 0x23, 0x9d, 0xee, 0xa1, 0x50, 0xff, 0x12, 0xcf, 0x50, 0xc8, 0x67, 0x96, 0x12, 0xf9, 0x7e, 0xcb, 0x09, 0xf7 } +, + /* Signature */ + 129, + { 0x15, 0xc4, 0xb3, 0xf0, 0x81, 0xa2, 0xe5, 0x8a, 0xf5, 0x94, 0xe4, 0x2f, 0xd6, 0xac, 0xcf, 0x1d, 0x0d, 0x61, 0xd9, 0x3a, 0x5e, 0x3a, 0x84, 0xcf, 0x90, 0x4b, 0x98, 0xd9, 0xad, 0x71, 0x33, 0x61, 0xb7, 0x84, 0xb2, 0x4d, 0x92, 0x95, 0xe4, 0x3c, 0x23, 0xbe, 0x93, 0xef, 0x36, 0x51, 0x4a, 0x9b, 0xac, 0x2c, 0x1b, 0xdf, 0x4e, 0xe7, 0x32, 0x34, 0x36, 0x76, 0x3a, 0x20, 0x66, 0x2f, 0x2d, 0xb3, 0x41, 0xd9, 0xe3, 0x8b, 0xed, 0x5f, 0x12, 0xc7, 0xdd, 0x18, 0xbc, 0x3b, 0xb0, 0xfc, 0xba, 0x5c, 0x00, 0x50, 0xbd, 0x1a, 0x2a, 0x44, 0x03, 0x71, 0x97, 0xb8, 0xc9, 0xfc, 0x2a, 0xa5, 0x99, 0xeb, 0x43, 0xc3, 0xd9, 0x67, 0x92, 0x42, 0xc9, 0x9b, 0xbc, 0x49, 0xb0, 0x3b, 0x98, 0xea, 0xca, 0x83, 0x46, 0x28, 0x72, 0x59, 0xe6, 0xea, 0x2e, 0x89, 0x15, 0x5d, 0x0d, 0xd2, 0xb4, 0x77, 0x80, 0x35, 0x75 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 11.6", + /* Message to be signed */ + 106, + { 0xe5, 0x66, 0xe5, 0xfa, 0x55, 0x6c, 0x76, 0x5b, 0x62, 0xbd, 0x6e, 0x37, 0x45, 0x21, 0xf5, 0x08, 0xfe, 0x44,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0x8a, 0xd8, 0x80, 0xdd, 0x16, 0x4c, 0x11, 0xac, 0x4a, 0x57, 0xf9, 0x6a, 0x0e, 0x48, 0x4b, 0xa1, 0x6a, 0xbf, 0x1c, 0xbe, 0x8a, 0xac, 0x09, 0x0a, 0xdb, 0x6a, 0x71, 0x79, 0x7e, 0x13, 0x35, 0xee, 0xfe, 0x2a, 0xc9, 0x98, 0x0d } + +} +, +{ + "PKCS#1 v1.5 Signature Example 11.7", + /* Message to be signed */ + 9, + { 0xb4, 0x43, 0xc3, 0x43, 0x52, 0x7b, 0x30, 0xd5, 0xff } +, + /* Signature */ + 129, + { 0x0b, 0x3f, 0x13, 0xc2, 0x72, 0x24, 0xd1, 0x61, 0x01, 0xb9, 0xc8, 0x20, 0x1f, 0x1b, 0x4f, 0x85, 0x37, 0xdb, 0x3c, 0x11, 0x6f, 0x3c, 0xe1, 0x30, 0xbe, 0x0d, 0xe0, 0xdc, 0x0d, 0xd2, 0x0f, 0x77, 0x3c, 0xdf, 0x7b, 0x7f, 0x37, 0x23, 0x87, 0xc4, 0xb6, 0x53, 0xe5, 0xdd, 0x44, 0x21, 0x84, 0x45, 0x74, 0x11, 0xa8, 0x2f, 0x8e, 0xd0, 0x03, 0x66, 0xec, 0xc0, 0x77, 0xa4, 0x26, 0x7c, 0x9d, 0x7e, 0x56, 0x54, 0x96, 0x63, 0x23, 0x9b, 0x43, 0x19, 0xfe, 0x49, 0x9a, 0xa7, 0x89, 0x54, 0x04, 0x9c, 0x74, 0x3b, 0xbf, 0x09, 0xd7, 0x7b, 0x30, 0x29, 0xd9, 0x18, 0xbb, 0x7b, 0x9a, 0x6a, 0xe8, 0x0b, 0x12, 0x9e, 0x41, 0xbb, 0x56, 0xda, 0xd2, 0xb8, 0xa4, 0xb6, 0xf3, 0x19, 0x33, 0x74, 0xc8, 0x29, 0x2f, 0xe0, 0x17, 0xd0, 0x63, 0x34, 0x7e, 0x91, 0xcb, 0xf4, 0xdd, 0x39, 0x39, 0xc2, 0x37, 0xf8, 0x3c } + +} +, +{ + "PKCS#1 v1.5 Signature Example 11.8", + /* Message to be signed */ + 230, + { 0xdb, 0x90, 0x04, 0x7f, 0x61, 0x5a, 0xd7, 0x19, 0x72, 0xba, 0xed, 0x0c, 0x10, 0x62, 0x6e, 0xc8, 0xcb, 0x18, 0xc6, 0xd7, 0x5e, 0xaa, 0xe0, 0x58, 0x21, 0x9f, 0xd6, 0x19, 0x54, 0x26, 0xd4, 0x4d, 0x5c, 0x54, 0x3b, 0xef, 0x3c, 0x4c, 0x14, 0x98, 0xe8, 0x77, 0xd7, 0xc8, 0x53, 0xe5, 0x31, 0x21, 0xeb, 0x31, 0x57, 0x00, 0x81, 0xd5, 0xde, 0x48, 0x85, 0xcb, 0xc9, 0x25, 0xa6, 0xc2, 0x23, 0x21, 0xcc, 0xc9, 0xc3, 0x78, 0x4e, 0xb2, 0x19, 0xe4, 0x2b, 0x7e, 0xdb, 0x92, 0x88, 0x77, 0x60, 0x73, 0x29, 0x79, 0x8d, 0x55, 0x73, 0x9c, 0x89, 0xd6, 0xd6, 0xb3, 0xf0, 0xd4, 0x30, 0xbb, 0xbc, 0x47, 0x22, 0xea, 0xfa, 0x67, 0xde, 0xfc, 0x86, 0xab, 0xa6, 0xe6, 0x34, 0x83, 0xfd, 0x64, 0x99, 0xb0, 0x3f, 0xab, 0xdc, 0x84, 0x65, 0xd9, 0x8b, 0xbb, 0xe4, 0x40, 0x2b, 0x02, 0x31, 0x13, 0x5c, 0x21, 0x24, 0x3d, 0x7e, 0x02, 0xad, 0x5f, 0x7e, 0x9e, 0x8b, 0x94, 0x60, 0xc1, 0x2d, 0xde, 0x2a, 0x39, 0x5b, 0x45, 0x69, 0x61, 0xcc, 0x3d, 0xfd, 0x9a, 0x12, 0xf5, 0xd9, 0x35, 0x9e, 0x0b, 0x3a, 0x6b, 0xd7, 0x7f, 0x44, 0x65, 0x5b, 0x60, 0x3b, 0x02, 0x55, 0xdb, 0xba, 0xff, 0x8b, 0xc8, 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0x5b, 0xb4, 0x7d, 0x2e, 0xec } + +} +, +{ + "PKCS#1 v1.5 Signature Example 11.9", + /* Message to be signed */ + 160, + { 0x2b, 0xe0, 0x06, 0x7b, 0x95, 0x18, 0x5b, 0xad, 0xe1, 0x18, 0xdc, 0xe9, 0x5c, 0x57, 0x02, 0x9b, 0x55, 0x4b, 0x25, 0xe1, 0xc3, 0x95, 0x19, 0xf8, 0xf8, 0x90, 0x73, 0xb9, 0xa0, 0x4b, 0x7e, 0x91, 0x29, 0x9c, 0xdb, 0x87, 0xb0, 0xbd, 0x17, 0xc9, 0xf1, 0x51, 0x92, 0x5c, 0x75, 0x6e, 0xb9, 0xb6, 0x45, 0x07, 0x25, 0x61, 0x26, 0x41, 0x07, 0x88, 0x21, 0x38, 0x85, 0x4a, 0xe7, 0xd5, 0x07, 0xe1, 0x5f, 0xcf, 0xe8, 0x47, 0x09, 0x45, 0x40, 0xe7, 0x1a, 0x54, 0x7f, 0x63, 0xb5, 0x90, 0x46, 0x7f, 0xad, 0xff, 0x64, 0x7f, 0x64, 0x3e, 0x1c, 0xec, 0x11, 0x24, 0x65, 0x29, 0x06, 0x2c, 0x9e, 0x40, 0x88, 0x92, 0xf2, 0xa2, 0x0c, 0xcc, 0xc0, 0xae, 0x45, 0xca, 0x97, 0xa4, 0x7f, 0xca, 0xdc, 0x8f, 0xed, 0xe2, 0x1a, 0x24, 0x71, 0x11, 0x67, 0x70, 0x6c, 0xc4, 0xb5, 0xd6, 0x94, 0x77, 0xe5, 0xa8, 0xa1, 0x46, 0xb9, 0x60, 0xcd, 0x4b, 0x17, 0x27, 0x42, 0x7b, 0x16, 0x51, 0x7b, 0x63, 0xeb, 0xfb, 0xcf, 0x84, 0xd0, 0xb1, 0xac, 0x8e, 0x7e, 0x70, 0xf0, 0x44, 0x35, 0x75, 0x22, 0xb1, 0xd0, 0xcb } +, + /* Signature */ + 129, + { 0x09, 0x76, 0x81, 0x12, 0x17, 0x71, 0x45, 0x44, 0x41, 0x01, 0x33, 0x24, 0x3b, 0xeb, 0xa9, 0xa2, 0x1a, 0x6f, 0x72, 0x12, 0xc6, 0x87, 0x91, 0x5c, 0x72, 0x02, 0x7b, 0xba, 0x31, 0x12, 0xf6, 0x97, 0x05, 0x42, 0x5c, 0xb9, 0x94, 0xcb, 0xb6, 0xd3, 0x59, 0xc1, 0x46, 0xb9, 0x5d, 0xb1, 0x44, 0x64, 0x35, 0xd4, 0xcf, 0x96, 0x1d, 0xfd, 0x5c, 0x49, 0x87, 0x39, 0xbf, 0xd4, 0xbe, 0x6e, 0xf1, 0xad, 0xd7, 0x4b, 0x81, 0xb2, 0x89, 0x8a, 0x4c, 0xe4, 0x3d, 0xc3, 0x7c, 0xb0, 0xe9, 0xed, 0x77, 0x44, 0xcf, 0x40, 0x9b, 0xab, 0xff, 0x71, 0x78, 0x85, 0x42, 0xff, 0xd2, 0x86, 0xeb, 0xe5, 0x25, 0x5d, 0x63, 0xdd, 0x7b, 0xd5, 0x5b, 0xa4, 0x3f, 0x51, 0x84, 0xe2, 0x48, 0xd3, 0xa6, 0x69, 0x33, 0xcd, 0xb0, 0x69, 0x91, 0xec, 0xc9, 0x0e, 0xb3, 0x9e, 0xe7, 0x1d, 0x65, 0xc8, 0x8e, 0xd2, 0x4d, 0x94, 0x4c } + +} +, +{ + "PKCS#1 v1.5 Signature Example 11.10", + /* Message to be signed */ + 222, + { 0xa7, 0x90, 0xe6, 0xac, 0x5d, 0x55, 0x6f, 0xb7, 0xcf, 0x44, 0x46, 0x0c, 0x7b, 0x9b, 0xe5, 0xeb, 0x7f, 0x24, 0xf9, 0x87, 0xff, 0x89, 0x0d, 0xcb, 0x78, 0x40, 0x24, 0x1d, 0x45, 0x54, 0x5b, 0x71, 0x05, 0x63, 0x5a, 0x1a, 0xaf, 0x44, 0x57, 0xe6, 0x41, 0x0c, 0x65, 0xae, 0xce, 0x50, 0x11, 0xe2, 0x77, 0x5e, 0xc8, 0x53, 0x0a, 0x64, 0xa1, 0x88, 0x39, 0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xaa, 0x6e, 0xda, 0x58, 0xdc, 0x32, 0xeb, 0x98, 0xf7, 0x8e, 0x7f, 0xb9, 0xbc, 0x25, 0xde, 0x3e, 0x6b, 0x09, 0xab, 0x8c, 0xae, 0x3b, 0x20, 0x26, 0xb6, 0x18, 0x7f, 0xf6, 0x36, 0x72, 0xe5, 0x7d, 0xa4, 0xac, 0x28, 0x96, 0x24, 0x45, 0xd1, 0xfe, 0x95, 0x1d, 0x27, 0xbe, 0x6a, 0x6c, 0xe7, 0xa5, 0x80, 0x7e, 0x13, 0x76, 0x13, 0x94, 0x46, 0xe8, 0x54, 0x9d, 0x48, 0xaa, 0x59, 0xfc, 0x22, 0x33, 0x54, 0xd1, 0x21, 0xfd, 0xcc, 0x38, 0xf1, 0xd0, 0x27, 0x5e, 0x41, 0x86, 0x92, 0x27, 0x00, 0xad, 0xc6, 0x1d, 0xae, 0x1e, 0x4b, 0xe8, 0x05, 0x22, 0x2a, 0x1c, 0xf0, 0x7f, 0x11, 0x0a, 0x61, 0x58, 0xa2, 0xa2, 0x62, 0x58, 0xf1, 0x9c, 0x65, 0x7a, 0x11, 0x0c, 0x0d, 0x9a, 0xd2, 0x91, 0x68, 0x0c, 0x75, 0x96 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 11.11", + /* Message to be signed */ + 256, + { 0x32, 0xaf, 0xd1, 0x3e, 0x60, 0x7d, 0x87, 0xb2, 0x5f, 0xf4, 0x0a, 0x88, 0x5b, 0x25, 0x09, 0xf5, 0x21, 0xf2, 0xa0, 0xa7, 0x72, 0xa9, 0x6a, 0x39, 0xfb, 0x3f, 0x71, 0xc9, 0x63, 0x84, 0xb3, 0xd7, 0x57, 0x8f, 0x48, 0xfc, 0xea, 0x97, 0x39, 0x56, 0x0a, 0x65, 0xbf, 0xb4, 0x83, 0xd9, 0x60, 0x8d, 0x20, 0x25, 0x55, 0xf6, 0x6d, 0x61, 0x2d, 0x16, 0xb9, 0x25, 0x53, 0x87, 0xb4, 0xe1, 0x12,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 0x45, 0xb8, 0x5e, 0x2a, 0xe2, 0x4f, 0xfd, 0xfe, 0x51 } +, + /* Signature */ + 129, + { 0x01, 0xa9, 0x37, 0xb3, 0xcc, 0x82, 0x54, 0xd5, 0x15, 0x08, 0x70, 0x9e, 0x4a, 0x4d, 0xe7, 0xb1, 0x81, 0xde, 0xd9, 0xa4, 0x47, 0xb3, 0xec, 0x8d, 0xad, 0x49, 0x2c, 0x39, 0x79, 0x52, 0xdf, 0x7c, 0x55, 0x0e, 0x4b, 0x26, 0xc9, 0x50, 0x17, 0x29, 0x9d, 0x8d, 0x45, 0x5f, 0xf7, 0x97, 0x1c, 0x33, 0x8c, 0xd0, 0x14, 0xdf, 0x78, 0xe2, 0xa8, 0xaa, 0x5e, 0xbe, 0xe2, 0x58, 0xf4, 0x92, 0x53, 0xd5, 0x1a, 0xce, 0x9a, 0x49, 0x31, 0x9f, 0xfc, 0x80, 0x7a, 0xd7, 0x0b, 0x2d, 0xf2, 0xc9, 0x6d, 0xcd, 0xb7, 0x3b, 0x48, 0xac, 0xbc, 0x4f, 0x6c, 0x3c, 0x2a, 0x70, 0x1e, 0x7c, 0x15, 0x4b, 0x27, 0x9b, 0x07, 0x05, 0xbd, 0xf2, 0x54, 0x8c, 0x8b, 0x36, 0x11, 0xb9, 0x7d, 0xa1, 0xac, 0x09, 0xcd, 0x12, 0x12, 0x50, 0x99, 0x54, 0x0b, 0xf7, 0xba, 0x99, 0xb0, 0x8c, 0x2f, 0x3d, 0x5f, 0x6a, 0xea, 0x7d, 0x40 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 11.12", + /* Message to be signed */ + 162, + { 0x5b, 0x00, 0xb8, 0xb7, 0x94, 0xa1, 0x0d, 0x21, 0xf1, 0xb4, 0x5e, 0xca, 0xa2, 0x0d, 0xf7, 0xc5, 0xb3, 0x52, 0x2c, 0x1b, 0x1d, 0xb4, 0xb0, 0x84, 0xb9, 0x59, 0xaa, 0x4e, 0x56, 0x58, 0xac, 0x54, 0x68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f, 0x46, 0x9f, 0x4f, 0x39, 0x9d, 0xbc, 0x18, 0x9c, 0x23, 0xea, 0x74, 0x65, 0x98, 0x28, 0x13, 0x32, 0x33, 0x05, 0xed, 0x6c, 0x35, 0xff, 0x9c, 0xc1, 0x09, 0xd0, 0xa2, 0x30, 0x3f, 0xe7, 0xd3, 0x29, 0xca, 0x31, 0x7e, 0xc4, 0xb1, 0x8e, 0xdd, 0x19, 0xc6, 0x2c, 0x60, 0xa3, 0xc8, 0xc3, 0x10, 0x6f, 0x86, 0xdb, 0xd0, 0x72, 0xe3, 0xe1, 0xeb, 0x87, 0x85, 0x28, 0x8c, 0x21, 0xab, 0xca, 0xc2, 0x2e, 0x0c, 0x0d, 0x41, 0xf4, 0xe2, 0x3e, 0x7f, 0x39, 0x4d, 0x46, 0x82, 0xf6, 0xce, 0x87 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 11.13", + /* Message to be signed */ + 26, + { 0xb7, 0x50, 0xae, 0x6d, 0x4d, 0x2c, 0xeb, 0x92, 0x14, 0x05, 0x34, 0x64, 0x8d, 0x36, 0xef, 0x25, 0xe4, 0x51, 0x55, 0xf5, 0x2b, 0xde, 0x1b, 0xf2, 0x6a, 0xb7 } +, + /* Signature */ + 129, + { 0x16, 0xaa, 0xde, 0xdc, 0xa0, 0x9e, 0x06, 0x25, 0x60, 0xc6, 0x61, 0xd2, 0xa4, 0x9b, 0x0e, 0xe4, 0xd9, 0xce, 0x23, 0x90, 0x7c, 0x69, 0xd1, 0x00, 0x04, 0xf1, 0x49, 0xd1, 0x03, 0xc5, 0x9c, 0x16, 0xfe, 0x7d, 0x43, 0x73, 0x59, 0x7d, 0xb9, 0xff, 0xd8, 0x92, 0x3a, 0x77, 0xa6, 0xb9, 0x43, 0xb1, 0x88, 0xc4, 0x74, 0x25, 0xe2, 0xa9, 0xe5, 0x30, 0x41, 0x3e, 0xfd, 0xb6, 0x84, 0x8d, 0xd3, 0x42, 0x0b, 0xa5, 0x3e, 0xf8, 0x1c, 0x25, 0xc5, 0x78, 0xf8, 0xd9, 0x51, 0x4d, 0x93, 0xfc, 0xc9, 0xcb, 0x1f, 0xb5, 0x2f, 0x58, 0xd8, 0x8a, 0x57, 0xd1, 0xfd, 0x3f, 0xe2, 0x2d, 0xa3, 0x10, 0xec, 0xea, 0x9e, 0xce, 0x55, 0xe9, 0x60, 0x8d, 0x63, 0xae, 0x21, 0xdb, 0xae, 0xa6, 0x57, 0x1b, 0x78, 0xfc, 0xfd, 0xd2, 0x71, 0xbb, 0x65, 0x92, 0x57, 0x47, 0x6b, 0x59, 0x95, 0x68, 0x7a, 0x02, 0xbb, 0xe7, 0x89 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 11.14", + /* Message to be signed */ + 183, + { 0x47, 0xbe, 0x01, 0x02, 0x0e, 0xb7, 0xe7, 0x87, 0x5b, 0xd4, 0xfc, 0xc0, 0x05, 0xa8, 0x2b, 0x36, 0xfd, 0xf2, 0x14, 0x5e, 0xf1, 0x32, 0xe2, 0xed, 0x16, 0x2f, 0xf6, 0x94, 0xbc, 0x71, 0x58, 0x9c, 0x7d, 0xc6, 0xd5, 0xa3, 0xf8, 0x9d, 0x59, 0x7f, 0x2d, 0x2a, 0xa3, 0x43, 0x33, 0x51, 0x18, 0xf6, 0xfd, 0xbd, 0xee, 0xf2, 0x3e, 0x61, 0x3c, 0xba, 0xcc, 0xde, 0x41, 0x95, 0xe6, 0x64, 0xa0, 0x09, 0x4b, 0x07, 0xfc, 0x0a, 0x32, 0x84, 0x8d, 0x61, 0x39, 0x03, 0x1c, 0xf5, 0x72, 0xa1, 0xe3, 0x23, 0xc5, 0xa7, 0x07, 0xb6, 0xfa, 0x2a, 0xee, 0xf2, 0xdc, 0x87, 0x2d, 0xd5, 0xa3, 0xe7, 0x6b, 0x13, 0xf8, 0xef, 0x94, 0xad, 0xeb, 0xd4, 0xe2, 0x05, 0x74, 0x8e, 0x48, 0x5b, 0x40, 0x01, 0xd5, 0xd2, 0xa0, 0x90, 0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 0xdd, 0x55, 0x7d, 0x3e, 0x5a, 0x16, 0x29, 0x17, 0x85, 0x33, 0x15, 0xde, 0x68, 0x09, 0x00, 0xa8 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 11.15", + /* Message to be signed */ + 238, + { 0x4b, 0x9c, 0x09, 0x64, 0x48, 0x10, 0xd4, 0xb3, 0x06, 0x55, 0xed, 0x83, 0x38, 0xbb, 0x27, 0x6b, 0x62, 0x4c, 0x68, 0x01, 0x98, 0x22, 0xd1, 0xfc, 0x8f, 0x78, 0x86, 0x1e, 0x13, 0xe2, 0x2a, 0xc1, 0x71, 0x82, 0x1c, 0xfd, 0xbd, 0x3f, 0x8f, 0x5b, 0x8d, 0xc9, 0xc0, 0xde, 0x73, 0x2b, 0x74, 0x6e, 0x1d, 0x13, 0x2e, 0x5f, 0x3f, 0x14, 0x9a, 0x5a, 0x86, 0x7c, 0x2e, 0xe4, 0x78, 0xe8, 0xf1, 0x4a, 0xd4, 0xb9, 0xdd, 0xeb, 0xd3, 0xae, 0x78, 0x17, 0xe8, 0x49, 0x55, 0xb3, 0x40, 0x4b, 0x09, 0x43, 0x93, 0xe6, 0x1c, 0xa0, 0x18, 0x9d, 0x05, 0x53, 0x69, 0xb4, 0x24, 0x30, 0x09, 0xa0, 0xf5, 0x40, 0x3f, 0x41, 0xc1, 0x00, 0x23, 0x08, 0xc0, 0x0c, 0xe6, 0x99, 0x67, 0x19, 0x37, 0xba, 0xf1, 0x3c, 0x78, 0x93, 0xd6, 0x63, 0xc9, 0x47, 0xfc, 0x7f, 0x84, 0x07, 0x1a, 0x67, 0x2e, 0x5e, 0x07, 0x37, 0x8a, 0xac, 0x08, 0xb3, 0xfa, 0xf0, 0xfc, 0xcf, 0x5b, 0xf2, 0x83, 0x09, 0x25, 0x85, 0xeb, 0xe2, 0x40, 0xa3, 0x00, 0x46, 0x20, 0xb6, 0xf3, 0xae, 0xb6, 0x73, 0x2b, 0x7b, 0x9d, 0x8d, 0x3b, 0xea, 0xf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0b, 0xba, 0x0d, 0xcb, 0x88, 0xbf, 0x7b, 0xb9, 0x97, 0x2d, 0x67, 0x00, 0x8f, 0xf4, 0x98, 0x54, 0x7d, 0x80, 0xfc, 0xa6, 0x58, 0xef, 0xe7, 0x64, 0xa5 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 11.16", + /* Message to be signed */ + 216, + { 0xec, 0x9f, 0xf1, 0x4b, 0x9f, 0x19, 0x7a, 0x2b, 0x4f, 0x24, 0x94, 0x8c, 0x29, 0xd2, 0xf6, 0x4a, 0x64, 0x62, 0x52, 0x23, 0xdd, 0xb8, 0x53, 0x46, 0x37, 0x8c, 0x2c, 0x25, 0x34, 0x3f, 0xcb, 0xef, 0x58, 0x5a, 0x99, 0xe1, 0xec, 0x0b, 0xef, 0x0e, 0xf9, 0xd0, 0x9e, 0xad, 0x85, 0xbe, 0xe1, 0xc4, 0xbf, 0xb3, 0x5e, 0x48, 0xfb, 0x26, 0x41, 0x1b, 0xdf, 0x18, 0x0d, 0xc5, 0xcf, 0x31, 0x7b, 0x3a, 0x34, 0x83, 0x71, 0xc7, 0xc5, 0xf4, 0xaa, 0x6d, 0x59, 0x08, 0xfc, 0xfc, 0x1e, 0xa3, 0x90, 0x18, 0xcf, 0x04, 0x49, 0xe5, 0x5f, 0x4e, 0xf9, 0x94, 0xbf, 0xda, 0x40, 0x4f, 0x1c, 0x18, 0x9f, 0xdb, 0x8a, 0x0a, 0x5b, 0x09, 0x06, 0xc3, 0xd4, 0x0d, 0xe1, 0xe7, 0x87, 0xc2, 0xdb, 0x4d, 0x88, 0xdb, 0xc2, 0x10, 0xb9, 0xf8, 0x01, 0xf4, 0xcd, 0x9c, 0x97, 0x22, 0x7e, 0x9b, 0x2f, 0xbc, 0x28, 0x11, 0xe3, 0x8c, 0xed, 0xd9, 0xe9, 0xf0, 0x35, 0x60, 0x03, 0x1d, 0x4c, 0x95, 0x8a, 0x76, 0x81, 0xba, 0x9d, 0x7e, 0xa5, 0xe7, 0x8e, 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 0x85, 0xcf, 0xb1, 0x0d, 0x66, 0x58, 0x15, 0x39, 0xf7, 0x8d, 0x03, 0x68, 0xed, 0x4f, 0x93, 0x01 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 11.17", + /* Message to be signed */ + 209, + { 0x41, 0x4c, 0xea, 0x8e, 0xec, 0x6d, 0xa3, 0xc6, 0x6f, 0xfc, 0x84, 0x70, 0xf7, 0xe1, 0x47, 0x60, 0xf7, 0x4b, 0xf6, 0xe7, 0x5b, 0x84, 0xdc, 0x98, 0xfc, 0x80, 0x60, 0xdd, 0x3c, 0x21, 0x9e, 0x76, 0x77, 0x7d, 0xfa, 0xba, 0xa6, 0xe6, 0xb9, 0x29, 0x55, 0x37, 0x9f, 0x3e, 0xca, 0xaf, 0x5f, 0xcb, 0x8a, 0xa5, 0x54, 0x9e, 0xc9, 0xcd, 0xd1, 0xf5, 0xd5, 0x77, 0x20, 0x1b, 0x8e, 0x32, 0x9f, 0x72, 0xfa, 0xa2, 0xbc, 0xad, 0xea, 0xee, 0x38, 0x8d, 0xaf, 0x7d, 0x40, 0x8a, 0xfd, 0xe6, 0x55, 0x3d, 0x24, 0x17, 0x86, 0x0f, 0x3c, 0x8e, 0x25, 0x30, 0x5d, 0xff, 0x76, 0xdb, 0xbd, 0x95, 0x16, 0xb6, 0x86, 0x8e, 0xe4, 0x56, 0xfc, 0x1f, 0x7b, 0x58, 0xd9, 0xed, 0x18, 0xa4, 0x6e, 0x4f, 0xc1, 0xe3, 0x53, 0xe8, 0xd0, 0x76, 0xbe, 0xa3, 0x0b, 0xf2, 0x47, 0xc6, 0x0e, 0x6f, 0x68, 0x58, 0x01, 0xa6, 0xd3, 0xf6, 0x30, 0xae, 0xa6, 0xab, 0xb4, 0x12, 0xa9, 0x41, 0xff, 0xa6, 0xf6, 0x07, 0xf6, 0xbf, 0xb1, 0x3d, 0x90, 0x01, 0x27, 0xbb, 0xec, 0xee, 0x4f, 0x98, 0xa7, 0xac, 0xa6, 0x92, 0x08, 0x11, 0x57, 0x50, 0x53, 0xab, 0x2d, 0x42, 0x70, 0x13, 0x80, 0x1d, 0x8c, 0xfb, 0xc3, 0x88, 0x0f, 0x14, 0x75, 0x43, 0x15, 0x55, 0xa0, 0x86, 0xfa, 0x55, 0x60, 0xc6, 0xe2, 0x20, 0x6d, 0x9e, 0xe9, 0x38, 0x13, 0x44, 0xb8, 0x24, 0x1c, 0x1d, 0xd1, 0xd8, 0x64, 0x48, 0x75, 0x3a, 0xf4, 0x4b, 0x00, 0xa0, 0xc9 } +, + /* Signature */ + 129, + { 0x16, 0x97, 0xbb, 0x23, 0xe2, 0x91, 0x52, 0x5f, 0x4a, 0x0e, 0x79, 0x26, 0x2f, 0x34, 0x06, 0x63, 0x0d, 0x0d, 0x6d, 0xf3, 0x32, 0x49, 0x69, 0x26, 0xc4, 0xe5, 0xae, 0xf9, 0x6e, 0x41, 0xd9, 0x55, 0x14, 0x86, 0x47, 0xea, 0xf7, 0x90, 0x69, 0x6a, 0xf6, 0x8c, 0x78, 0xeb, 0x2a, 0xb6, 0x2f, 0xf7, 0x19, 0x62, 0x96, 0xe1, 0xea, 0x88, 0x6d, 0xf0, 0x91, 0x73, 0x66, 0x09, 0x0b, 0x63, 0x0a, 0xa3, 0x18, 0x58, 0xb5, 0x16, 0x15, 0x87, 0x3f, 0xa6, 0xbc, 0x8f, 0xf0, 0x88, 0x5c, 0x57, 0xb2, 0xe7, 0x7a, 0x04, 0x90, 0x88, 0x93, 0xcc, 0xef, 0xb1, 0x41, 0x24, 0x03, 0x99, 0x1d, 0x0d, 0x23, 0xc5, 0x57, 0xd2, 0x22, 0x29, 0x1c, 0xb8, 0x51, 0x7b, 0x43, 0x28, 0x6e, 0xe0, 0x05, 0x67, 0x58, 0xd9, 0xc1, 0x0b, 0xcd, 0x69, 0xbd, 0x68, 0xb8, 0x4a, 0x2d, 0x1f, 0x53, 0x79, 0x05, 0xb8, 0xa4, 0x65, 0xe9 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 11.18", + /* Message to be signed */ + 169, + { 0x17, 0x89, 0xb8, 0x08, 0xb1, 0x0d, 0xe8, 0xd1, 0x77, 0x8a, 0xa4, 0x3f, 0x94, 0x10, 0x1c, 0xb8, 0x9f, 0x56, 0x34, 0x30, 0x61, 0xa1, 0xa9, 0x43, 0xbb, 0x8d, 0xa5, 0x5e, 0xe6, 0xb9, 0x79, 0xe2, 0x7a, 0xfe, 0xab, 0x0e, 0xd8, 0xee, 0x37, 0x14, 0xfb, 0xe7, 0x0b, 0x3b, 0xe8, 0x20, 0x60, 0x3e, 0x5c, 0xea, 0xde, 0xc4, 0xb2, 0x2f, 0x95, 0x87, 0x73, 0x22, 0x5d, 0xf3, 0xaa, 0xd4, 0x87, 0xb2, 0x80, 0x57, 0xeb, 0xfe, 0xbe, 0x2c, 0x87, 0x93, 0xda, 0x38, 0x46, 0xbd, 0xb1, 0x59, 0x03, 0xac, 0x71, 0xe9, 0xc9, 0x3b, 0x20, 0x16, 0x66, 0x8b, 0xd9, 0x06, 0x30, 0x1a, 0x0a, 0x7d, 0x50, 0xdc, 0x60, 0xb2, 0xfa, 0xd8, 0x75, 0x9d, 0x18, 0xdb, 0x14, 0x7f, 0x20, 0x66, 0x86, 0x5f, 0xd9, 0x09, 0x50, 0xa1, 0x88, 0x74, 0x7d, 0x9b, 0x69, 0x68, 0x53, 0x48, 0x6d, 0xea, 0xab, 0x8e, 0x44, 0x3f, 0xad, 0x29, 0x92, 0xfc, 0x8a, 0x56, 0x5b, 0xdc, 0xba, 0xda, 0xb0, 0xb9, 0x33, 0x3a, 0xb7, 0xfc, 0xdb, 0x9c, 0x3d, 0x0b, 0xcf, 0xde, 0x50, 0xa5, 0x8d, 0x2a, 0xea, 0xf1, 0xce, 0xfb, 0x0c, 0x95, 0xf9, 0x07, 0x73, 0xb2, 0xfa, 0xc1, 0x37, 0xcd, 0xbc } +, + /* Signature */ + 129, + { 0x02, 0xf9, 0x97, 0x51, 0xc8, 0x44, 0x38, 0xea, 0xc7, 0xf9, 0x96, 0x32, 0x50, 0xd9, 0xee, 0x22, 0xfd, 0xa7, 0x29, 0x7b, 0x6e, 0x86, 0xe2, 0xa8, 0xbc, 0xc7, 0xa9, 0xb5, 0xac, 0x01, 0xf7, 0x90, 0xe0, 0x99, 0x11, 0x70, 0x46, 0x60, 0x85, 0x8e, 0xa5, 0xc1, 0x62, 0x72, 0xc3, 0x81, 0x33, 0xfa, 0xda, 0xde, 0xfa, 0x23, 0xc1, 0x02, 0x90, 0x8e, 0x41, 0x9d, 0xe2, 0xeb, 0xe9, 0xac, 0x27, 0x19, 0x45, 0x72, 0x87, 0x8e, 0x2a, 0x97, 0x1f, 0x88, 0x31, 0xc8, 0xf9, 0x17, 0xe8, 0x52, 0xe8, 0x51, 0xdf, 0x99, 0xd4, 0xdf, 0x01, 0x8f, 0xdd, 0xb2, 0xce, 0xa3, 0x1a, 0xc3, 0xa7, 0xb6, 0x89, 0x75, 0xe8, 0x0a, 0x99, 0x7c, 0xb7, 0xdd, 0x4d, 0x4d, 0xf7, 0x57, 0xbb, 0x8c, 0x3e, 0xcd, 0x91, 0x0b, 0xcb, 0x06, 0x03, 0x35, 0x52, 0x12, 0x7a, 0xc3, 0x08, 0x11, 0x77, 0x39, 0xa0, 0x2c, 0x20, 0x17, 0x17 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 11.19", + /* Message to be signed */ + 151, + { 0xff, 0x87, 0x5c, 0xca, 0x0e, 0xfc, 0x3d, 0x90, 0xf5, 0x6e, 0x31, 0xf4, 0xbb, 0x66, 0x84, 0x14, 0x89, 0x4d, 0x09, 0xde, 0x90, 0x12, 0x7f, 0x84, 0x66, 0x32, 0x43, 0x10, 0xe1, 0x13, 0x69, 0xa3, 0xf2, 0xf6, 0x49, 0x3c, 0x1c, 0x78, 0xa3, 0x62, 0xb2, 0xa1, 0x4f, 0xb5, 0x48, 0x8c, 0xb5, 0x6c, 0xe0, 0x22, 0x73, 0x9e, 0x43, 0xaa, 0x76, 0x3d, 0x9c, 0x1c, 0x97, 0xb6, 0x21, 0xcc, 0x53, 0x68, 0xc9, 0xc0, 0x0e, 0x81, 0x60, 0x67, 0x92, 0x69, 0x5f, 0x9a, 0xf9, 0xab, 0x63, 0x3e, 0xf2, 0x39, 0xea, 0xb3, 0x44, 0x9d, 0xda, 0x9e, 0x66, 0x07, 0x08, 0x9c, 0x37, 0x51, 0x90, 0x35, 0x4f, 0x7a, 0x59, 0xa4, 0xb3, 0xef, 0x75, 0x22, 0x9d, 0x1c, 0x47, 0xec, 0xda, 0xe3, 0x3b, 0x27, 0x69, 0xff, 0x55, 0x42, 0x65, 0x5e, 0x78, 0x10, 0x22, 0xd0, 0xc4, 0x3b, 0x42, 0x1a, 0x99, 0x84, 0x3c, 0x3d, 0xe1, 0x04, 0x22, 0xad, 0x2f, 0xd8, 0x9d, 0xfe, 0x44, 0x66, 0x15, 0xf5, 0x19, 0x2e, 0x75, 0x79, 0xd4, 0x37, 0x43, 0x79, 0xbb, 0xff, 0xb9 } +, + /* Signature */ + 129, + { 0x02, 0x68, 0x91, 0x7f, 0x8b, 0xda, 0xac, 0x9e, 0xbe, 0x32, 0xb0, 0xdc, 0x6c, 0xd9, 0xd3, 0x9e, 0xfd, 0x3f, 0x88, 0xd8, 0x17, 0xd6, 0x6c, 0xb6, 0x39, 0x0d, 0x7b, 0x55, 0xc6, 0x92, 0x12, 0x21, 0x84, 0x4a, 0xb8, 0xc0, 0x89, 0x86, 0xd3, 0xf2, 0xea, 0x49, 0xbc, 0x6e, 0x3a, 0x10, 0x02, 0x08, 0x6c, 0x0b, 0x6d, 0xf1, 0x63, 0xf7, 0x9d, 0x16, 0x11, 0x6a, 0x93, 0xc4, 0xa2, 0xcc, 0x04, 0x22, 0xc9, 0x48, 0x41, 0xe1, 0xe3, 0xb9, 0x45, 0xab, 0x1d, 0x25, 0x3a, 0xb8, 0xd7, 0xd1, 0x39, 0xc9, 0x18, 0x8b, 0xa8, 0x30, 0x27, 0xc5, 0x93, 0xf8, 0x3a, 0x6f, 0x38, 0x37, 0x0e, 0x7f, 0x03, 0x79, 0xff, 0xdd, 0xf1, 0x42, 0x7d, 0x6f, 0xcc, 0xcf, 0x60, 0x83, 0x31, 0x3f, 0x18, 0x15, 0xb5, 0xde, 0xd6, 0x73, 0x74, 0x30, 0xbb, 0x4a, 0x70, 0xba, 0x81, 0x48, 0x48, 0x34, 0xd8, 0xd1, 0xd2, 0x9a, 0x5e } + +} +, +{ + "PKCS#1 v1.5 Signature Example 11.20", + /* Message to be signed */ + 86, + { 0xe0, 0x7e, 0xcf, 0x00, 0xe2, 0x40, 0x1a, 0xc9, 0x8b, 0x2d, 0x5a, 0xe0, 0xc9, 0xb8, 0x3f, 0x21, 0x9a, 0xb0, 0x27, 0xa6, 0x51, 0x99, 0xfd, 0xb6, 0x34, 0x59, 0x6e, 0x23, 0x44, 0x62, 0x41, 0x38, 0x72, 0x95, 0x32, 0x49, 0x53, 0x28, 0xf9, 0x3f, 0xb3, 0xa3, 0x32, 0x55, 0x27, 0x8f, 0x3e, 0xc2, 0x60, 0x65, 0xce, 0x54, 0x99, 0x5d, 0x42, 0x41, 0x93, 0xbc, 0xb7, 0x58, 0x1b, 0xfe, 0x1a, 0xb8, 0x95, 0x7d, 0x0b, 0x96, 0x1c, 0x30, 0x30, 0xb8, 0x20, 0xd0, 0x9c, 0x9e, 0x32, 0x6c, 0xc3, 0x0c, 0x0a, 0xf6, 0x42, 0x66, 0x61, 0x54 } +, + /* Signature */ + 129, + { 0x00, 0xc4, 0x6d, 0xb4, 0x1b, 0x65, 0xdd, 0xc7, 0x1f, 0xbb, 0xfc, 0x12, 0x5a, 0x4f, 0x9b, 0xab, 0x88, 0x0a, 0x2f, 0x0c, 0x1f, 0x04, 0x1c, 0x41, 0x1d, 0xf7, 0xd4, 0x5d, 0x1e, 0x19, 0x99, 0x7b, 0x34, 0x8e, 0xab, 0xba, 0x19, 0xbf, 0x79, 0xb2, 0x21, 0x77, 0xb2, 0xa0, 0xd7, 0x3f, 0xef, 0xa5, 0x00, 0x83, 0x62, 0xce, 0x59, 0x60, 0xd7, 0xef, 0x58, 0xa5, 0x89, 0x93, 0xe7, 0x46, 0x03, 0xd4, 0xd9, 0xd0, 0xb3, 0xda, 0xd4, 0xb2, 0x0c, 0x82, 0x9d, 0x36, 0xef, 0xca, 0xf5, 0x7f, 0x0c, 0x4f, 0x0c, 0xef, 0x89, 0x01, 0x5a, 0x48, 0x45, 0x02, 0x42, 0xbd, 0x02, 0x0d, 0x5f, 0x52, 0xd8, 0xb5, 0x0e, 0xa1, 0x3e, 0x56, 0xa1, 0xaa, 0xd6, 0x01, 0x91, 0x5d, 0x60, 0xec, 0x9a, 0xbf, 0xc3, 0x07, 0xf1, 0x8a, 0xf2, 0x06, 0x72, 0x38, 0x4d, 0xcc, 0x12, 0xf9, 0x82, 0x27, 0x31, 0x36, 0x99, 0x71, 0x40 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 12: A 1030-bit RSA key pair", +{ + /* Modulus */ + 129, + { 0x36, 0x98, 0x1a, 0x95, 0xae, 0x24, 0x18, 0x14, 0x52, 0xda, 0x25, 0x7c, 0x03, 0x8f, 0x05, 0x82, 0x14, 0x12, 0xd8, 0x4e, 0xb4, 0x7a, 0x43, 0xfc, 0xc7, 0xef, 0x12, 0x17, 0x95, 0x9b, 0xa6, 0x77, 0x02, 0x7f, 0x70, 0x86, 0xd3, 0xa8, 0x5c, 0xdd, 0x34, 0x9f, 0x92, 0x0f, 0x03, 0x4c, 0x02, 0x78, 0x79, 0x2d, 0xc8, 0xa8, 0xcf, 0x0c, 0x00, 0x80, 0xe5, 0xc6, 0x1f, 0x47, 0x48, 0x83, 0xc6, 0x87, 0x9f, 0x4d, 0xee, 0x0a, 0xe9, 0x52, 0x47, 0x8a, 0x5e, 0xe2, 0xce, 0x4e, 0x39, 0x18, 0x64, 0x1e, 0x81, 0x3c, 0xb3, 0x74, 0xf7, 0xb2, 0x83, 0x2b, 0xcd, 0x6a, 0xea, 0x80, 0x9d, 0x25, 0x4f, 0xc2, 0xca, 0x9a, 0xc5, 0xa3, 0x32, 0x42, 0x4a, 0xb6, 0x5c, 0x2a, 0x26, 0x12, 0x75, 0xd1, 0x9a, 0x41, 0x4b, 0x61, 0x65, 0x00, 0xd5, 0xe3, 0x73, 0x70, 0x63, 0x15, 0xf0, 0x63, 0xdc, 0x88, 0x5d, 0x7f, 0xb9 } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 129, + { 0x09, 0xad, 0x03, 0x17, 0x30, 0xb6, 0x32, 0x73, 0x55, 0xac, 0xd6, 0x94, 0x68, 0x70, 0x0e, 0x7e, 0x9b, 0xae, 0xac, 0x5a, 0x24, 0xa7, 0xff, 0xc9, 0x3b, 0x29, 0x2e, 0xb8, 0x71, 0xda, 0x54, 0x92, 0x46, 0xa5, 0xce, 0x0c, 0x83, 0x52, 0x55, 0x65, 0x1a, 0x28, 0xc6, 0xe2, 0xf4, 0xc7, 0x61, 0xaf, 0xb6, 0xf0, 0x6b, 0x9e, 0x29, 0x95, 0xfb, 0xb7, 0xdc, 0xa1, 0x74, 0xd5, 0x36, 0x2f, 0xae, 0xbd, 0xc3, 0x9a, 0x72, 0xc5, 0x79, 0x5d, 0x1f, 0x33, 0x92, 0xec, 0x08, 0x8b, 0x5d, 0xc2, 0xa7, 0x85, 0xb2, 0xc9, 0xc4, 0xc6, 0xe6, 0x69, 0xe7, 0x23, 0xb5, 0xdd, 0x0c, 0xe4, 0x43, 0x25, 0x55, 0x12, 0x67, 0xdd, 0x62, 0xe0, 0xf7, 0x8d, 0x24, 0x24, 0xad, 0xae, 0x48, 0xe2, 0x49, 0x44, 0x3a, 0xef, 0x4a, 0x37, 0x04, 0x10, 0xdb, 0x9e, 0x70, 0x93, 0x99, 0xac, 0x37, 0xcc, 0x48, 0x1b, 0x59, 0x00, 0xc5 } +, + /* Prime 1 */ + 65, + { 0x07, 0x72, 0x0f, 0x21, 0xcd, 0xdb, 0x92, 0x27, 0x45, 0xb7, 0x1c, 0xf8, 0x11, 0x6a, 0x83, 0x66, 0x9a, 0x0d, 0xdb, 0x89, 0xe8, 0xf3, 0xf0, 0x6c, 0x34, 0x7c, 0xa7, 0x87, 0xcf, 0x10, 0xef, 0x16, 0x93, 0xbd, 0xfe, 0x3a, 0x0c, 0x36, 0x4c, 0x7a, 0x7e, 0x89, 0x04, 0x17, 0xf2, 0xaf, 0x49, 0x47, 0x5c, 0x7d, 0x07, 0x6f, 0x9c, 0xee, 0xaa, 0xe7, 0x6d, 0xbd, 0x4e, 0x92, 0x15, 0xaf, 0x45, 0x69, 0x4d } +, + /* Prime 2 */ + 65, + { 0x07, 0x55, 0x1c, 0x27, 0xe9, 0xaa, 0xf1, 0x1f, 0x47, 0x4f, 0x1c, 0x9a, 0x14, 0xbf, 0x14, 0x4c, 0xfa, 0xef, 0xe2, 0x7f, 0xca, 0x4f, 0x20, 0x79, 0x5d, 0xec, 0x85, 0x34, 0xc9, 0x37, 0xbb, 0x00, 0xfe, 0x16, 0x23, 0x5e, 0xcd, 0x69, 0x1f, 0xd2, 0x3e, 0x32, 0xcd, 0xfb, 0x8b, 0x78, 0x66, 0x6b, 0xb7, 0x82, 0x84, 0xae, 0x15, 0xd5, 0x9b, 0xe5, 0xca, 0x74, 0x73, 0xe6, 0x2d, 0x46, 0xa9, 0xda, 0x1d } +, + /* Prime exponent 1 */ + 65, + { 0x02, 0xe2, 0x2c, 0x74, 0x16, 0x0a, 0x94, 0x36, 0xbb, 0x6c, 0x28, 0x3e, 0xf6, 0x57, 0xbe, 0xdd, 0xec, 0x89, 0xb3, 0x5d, 0x5c, 0xa7, 0xa4, 0x93, 0xf3, 0x5b, 0xd7, 0x71, 0xe4, 0x42, 0x95, 0xa5, 0xb3, 0xc0, 0x20, 0x06, 0x11, 0x16, 0xb2, 0x55, 0xba, 0x4d, 0x8c, 0x15, 0x4e, 0x3a, 0x8e, 0x71, 0xa1, 0xa3, 0x16, 0x4f, 0x26, 0x82, 0xd4, 0x13, 0x5e, 0xcf, 0xb2, 0xef, 0x26, 0x90, 0xc3, 0x9b, 0xfd } +, + /* Prime exponent 2 */ + 65, + { 0x01, 0xd2, 0xbf, 0xf5, 0x8c, 0xbc, 0xdc, 0xc8, 0x12, 0x4b, 0x31, 0xa9, 0x7e, 0x8f, 0x24, 0xd5, 0x1f, 0x70, 0x96, 0xb9, 0x7f, 0xec, 0xbc, 0xfe, 0x70, 0xc4, 0x67, 0x3b, 0x00, 0xed, 0xc2, 0xaa, 0x34, 0x83, 0xfc, 0xb7, 0x8e, 0x0c, 0x1d, 0xc5, 0x81, 0x81, 0xd0, 0x86, 0x43, 0xdf, 0xe4, 0x57, 0xd4, 0x81, 0xb7, 0xcc, 0x31, 0xd1, 0xb3, 0xba, 0x27, 0xe5, 0x5d, 0x0c, 0x57, 0x25, 0xc3, 0x06, 0x61 } +, + /* Coefficient */ + 65, + { 0x06, 0xd2, 0x27, 0x72, 0x57, 0x42, 0xef, 0x03, 0x46, 0x2d, 0x1c, 0xf6, 0x12, 0x67, 0x4a, 0x78, 0x83, 0x1d, 0x61, 0x9d, 0xa3, 0xd6, 0x40, 0xeb, 0x7c, 0x71, 0xc8, 0x7b, 0x53, 0x28, 0x69, 0x72, 0x73, 0xc5, 0xf7, 0x51, 0xe1, 0x4d, 0x7b, 0x81, 0xc1, 0x2b, 0x6d, 0xeb, 0x44, 0x75, 0x1a, 0x92, 0x95, 0xcb, 0x67, 0x1e, 0x81, 0x48, 0x4d, 0xea, 0xa8, 0x3b, 0x4d, 0xf1, 0xfd, 0x37, 0xe2, 0xff, 0x3c } + +} +, +{{ + "PKCS#1 v1.5 Signature Example 12.1", + /* Message to be signed */ + 9, + { 0xe4, 0xb2, 0xd6, 0x0e, 0x3b, 0xdd, 0x27, 0x81, 0x6f } +, + /* Signature */ + 129, + { 0x13, 0xfd, 0x4a, 0xc1, 0xac, 0x68, 0x48, 0x17, 0x37, 0x80, 0x96, 0x5a, 0xff, 0x5e, 0x61, 0xc5, 0x96, 0x89, 0x2b, 0xc1, 0x47, 0x76, 0x0d, 0x43, 0x07, 0x9b, 0x5d, 0x71, 0x77, 0xe4, 0x23, 0xd4, 0x86, 0xf5, 0xa7, 0x3e, 0x1a, 0x16, 0xb3, 0xce, 0x9b, 0x5e, 0xda, 0xc1, 0x61, 0xea, 0x6d, 0x4f, 0x6c, 0x23, 0xfc, 0xfc, 0x3e, 0x62, 0x19, 0xca, 0xc5, 0x56, 0x06, 0x7f, 0xfa, 0xed, 0x4a, 0xda, 0xc0, 0xa9, 0x50, 0x05, 0x09, 0x0b, 0x89, 0x84, 0x4c, 0x54, 0x35, 0x4d, 0xb2, 0x2a, 0xaf, 0xf9, 0xee, 0xff, 0x9d, 0xa5, 0xaa, 0xa5, 0x49, 0x04, 0x25, 0xe1, 0x35, 0xcc, 0x0f, 0x64, 0x58, 0x4c, 0x7f, 0x05, 0xfe, 0x33, 0x6e, 0x44, 0x40, 0xbb, 0x86, 0x92, 0x86, 0xd4, 0x4a, 0xf1, 0x57, 0x88, 0x0e, 0x3a, 0x40, 0xfb, 0x06, 0x72, 0x5d, 0x09, 0xde, 0xb3, 0x7f, 0x1e, 0xbb, 0x18, 0x1c, 0x8f, 0x5c } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Signature Example 12.2", + /* Message to be signed */ + 164, + { 0x78, 0x86, 0x85, 0xfc, 0x58, 0x05, 0xd6, 0x27, 0xb1, 0x3f, 0x2f, 0xe7, 0xfe, 0x6f, 0x7c, 0x9a, 0xb2, 0xca, 0x49, 0x44, 0xab, 0xf3, 0x08, 0xb8, 0x6d, 0x1a, 0x0f, 0x58, 0x3d, 0x17, 0xb5, 0x76, 0x02, 0x43, 0x9e, 0x1f, 0x2c, 0x6e, 0x0c, 0x5b, 0xf7, 0x81, 0x70, 0x50, 0x13, 0x38, 0xb4, 0xc4, 0x47, 0xe9, 0x19, 0x7b, 0x65, 0x03, 0xfb, 0x73, 0xeb, 0xab, 0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0x81, 0xb7, 0x29, 0x18, 0x43, 0xab, 0x97, 0x69, 0x73, 0x7f, 0x3c, 0x69, 0x31, 0x52, 0xf1, 0x7b, 0xf2, 0xd8, 0xbf, 0xc7, 0x82, 0xbd, 0xb3, 0xfa, 0x0a, 0xea, 0xdf, 0x0d, 0x44, 0x1e, 0x1e, 0x52, 0xde, 0xa5, 0x4b, 0x75, 0xcf, 0x16, 0x5e, 0x35, 0xc3, 0x82, 0xd3, 0x11, 0x74, 0xf6, 0x67, 0x9d, 0x2f, 0x21, 0xb9, 0x81, 0xf4, 0x13, 0x58 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 12.3", + /* Message to be signed */ + 126, + { 0x4e, 0xc7, 0x39, 0x3f, 0xdc, 0x4b, 0x90, 0xaf, 0x8f, 0xff, 0xca, 0xf3, 0x4e, 0x84, 0x5a, 0x09, 0x65, 0x6a, 0xef, 0x9d, 0xda, 0x12, 0xb0, 0x34, 0x2c, 0x46, 0xeb, 0x04, 0x91, 0x74, 0xaa, 0x51, 0x1b, 0x43, 0xc9, 0x4d, 0x75, 0xc0, 0xe2, 0x90, 0x70, 0xaf, 0xf5, 0xb4, 0x14, 0x23, 0xa1, 0x70, 0xd9, 0xb3, 0xe8, 0xb2, 0x12, 0x24, 0xaa, 0xbc, 0x53, 0x1d, 0x88, 0x88, 0x6e, 0x26, 0x46, 0xd6, 0x78, 0x8f, 0x1b, 0xaa, 0xd4, 0xef, 0x4b, 0x0b, 0x4b, 0xde, 0x4b, 0x12, 0xce, 0x90, 0x52, 0x08, 0x2e, 0x2d, 0xdd, 0x0e, 0x3e, 0x6c, 0xaa, 0xbb, 0x0a, 0x14, 0x34, 0x4b, 0x0a, 0x58, 0x3f, 0x40, 0x4c, 0x1b, 0x6a, 0x3c, 0x7b, 0xca, 0x8a, 0x58, 0x85, 0xd5, 0xf2, 0x24, 0xaf, 0x1f, 0xca, 0xc3, 0xfa, 0xd9, 0x37, 0x0e, 0x9b, 0x29, 0x74, 0xe8, 0xca, 0x62, 0xe2, 0x2a, 0xce, 0xb9 } +, + /* Signature */ + 129, + { 0x21, 0xa6, 0x6a, 0xf6, 0x27, 0xee, 0x0d, 0xd0, 0x5f, 0xe7, 0x56, 0x3c, 0xc1, 0xd2, 0x9c, 0xcf, 0x6f, 0x87, 0x31, 0xb4, 0x1e, 0x3d, 0xb3, 0x95, 0x97, 0x89, 0x3b, 0xa1, 0xcf, 0x37, 0x5f, 0x78, 0x17, 0x88, 0xfd, 0xf0, 0x73, 0xb0, 0xb5, 0x93, 0xc7, 0x6d, 0xf2, 0x81, 0x6e, 0xc6, 0xde, 0xfc, 0x22, 0x42, 0x21, 0xac, 0x19, 0xf5, 0xbe, 0xe4, 0x4f, 0xc0, 0xe5, 0xd4, 0x09, 0x3d, 0x34, 0x68, 0x27, 0x8f, 0xb4, 0x2d, 0x40, 0x5a, 0x07, 0x04, 0x46, 0x53, 0x22, 0xda, 0x4d, 0x3a, 0x7c, 0xa9, 0xc3, 0xda, 0x73, 0xc3, 0xd0, 0x82, 0xae, 0xe5, 0x67, 0xb7, 0x70, 0x83, 0x32, 0x3e, 0x75, 0xbb, 0x35, 0xed, 0x77, 0xe8, 0xdb, 0x9c, 0x01, 0xb4, 0x96, 0xa0, 0x4c, 0xc4, 0xa8, 0x99, 0xdf, 0x35, 0x9d, 0xa4, 0xa2, 0x28, 0x7c, 0xaf, 0xff, 0xe1, 0xed, 0x63, 0xcd, 0xde, 0xad, 0x87, 0x6c, 0x94, 0x07 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 12.4", + /* Message to be signed */ + 250, + { 0x90, 0x77, 0x60, 0xdb, 0x32, 0x96, 0x9b, 0x09, 0x7d, 0xc1, 0x24, 0xef, 0x89, 0x75, 0x15, 0x11, 0xa5, 0xd2, 0x30, 0x59, 0x6d, 0x2f, 0xd8, 0xa8, 0x91, 0xff, 0x00, 0xf0, 0x5f, 0xba, 0xd4, 0x5f, 0x72, 0xa4, 0x5d, 0x46, 0x56, 0x24, 0xa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0x54, 0x4e, 0x7f, 0xb2, 0x94, 0xd3, 0x44, 0xa4, 0xf2, 0x05, 0xef, 0x9a, 0x34, 0x97, 0xb5, 0x67, 0x54, 0x7c, 0xbd, 0x1a, 0x63, 0x3e, 0x2b, 0x79, 0xd3, 0x34, 0x90, 0x95 } +, + /* Signature */ + 129, + { 0x0e, 0xc9, 0x38, 0xa0, 0xd4, 0xb2, 0xa4, 0xed, 0xd2, 0x78, 0xd6, 0x3d, 0xe7, 0x61, 0xc1, 0x02, 0xe2, 0x59, 0x21, 0x02, 0xee, 0x05, 0xdb, 0x1b, 0x59, 0x1e, 0x0d, 0x85, 0x7b, 0xf6, 0x66, 0x84, 0x9e, 0x74, 0xcc, 0x19, 0xb7, 0xe4, 0xe9, 0xcc, 0x39, 0x2d, 0xe5, 0x39, 0xf7, 0x90, 0xfc, 0x68, 0xe3, 0xb5, 0x21, 0xdb, 0x3a, 0x1a, 0x26, 0x7e, 0x5a, 0x4e, 0x12, 0x19, 0x75, 0x2e, 0x01, 0x99, 0xe7, 0x01, 0x9a, 0x24, 0x85, 0x54, 0xc5, 0xba, 0xe3, 0x11, 0x2b, 0xee, 0xa4, 0x0c, 0xf3, 0xe6, 0x4f, 0x8a, 0xaf, 0x9b, 0xb1, 0xe9, 0xd1, 0xc1, 0xd8, 0x83, 0x3c, 0x2b, 0xfa, 0x31, 0xb9, 0xd5, 0x45, 0x0f, 0xa2, 0x49, 0x29, 0x7f, 0xe2, 0xe4, 0x6a, 0xb0, 0x3e, 0x99, 0xb1, 0xf9, 0xc6, 0x51, 0xd5, 0x39, 0xeb, 0x53, 0xce, 0x09, 0x61, 0xce, 0x60, 0x23, 0xc1, 0x7d, 0xd7, 0x38, 0x3d, 0xd1, 0x2b } + +} +, +{ + "PKCS#1 v1.5 Signature Example 12.5", + /* Message to be signed */ + 124, + { 0xbd, 0xa5, 0x54, 0x95, 0x47, 0x32, 0xd1, 0xd5, 0xf3, 0x94, 0x75, 0x55, 0xc6, 0x1f, 0xf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e, 0xe5, 0xe5, 0x24, 0x5c, 0xfe, 0x6b, 0x61, 0x6e, 0x30, 0xa9, 0x00, 0xbf, 0x83, 0xbb, 0x76, 0x3d, 0x20, 0xb3, 0x30, 0x37, 0x01, 0xca, 0xbe, 0x94, 0x33, 0x41, 0x48, 0x88, 0x2a, 0xe4, 0xef, 0x14, 0xe6, 0xd9, 0xe6, 0xc7, 0x52, 0xbc, 0xe2, 0x53, 0xbd, 0xda, 0x57, 0x39, 0xe3, 0x3b, 0xdc, 0x32, 0xeb, 0x08, 0x28, 0x28, 0xc1, 0xc3, 0x99, 0xc2, 0x2f, 0xea } + +} +, +{ + "PKCS#1 v1.5 Signature Example 12.6", + /* Message to be signed */ + 73, + { 0x51, 0x76, 0xad, 0x7c, 0x99, 0xbe, 0x4c, 0xdb, 0xbb, 0x5d, 0x79, 0xba, 0x5f, 0x49, 0x6c, 0xad, 0x9f, 0x42, 0xdc, 0x25, 0xd5, 0x27, 0xa5, 0xd5, 0xe8, 0xe3, 0x35, 0x91, 0x79, 0x22, 0x5e, 0x6b, 0x0e, 0x43, 0x66, 0x6d, 0x3d, 0x82, 0xab, 0x5b, 0xaf, 0x42, 0x4c, 0x85, 0xc3, 0x31, 0x21, 0x60, 0x6e, 0xb7, 0x9a, 0xda, 0x6b, 0xaf, 0xca, 0xb5, 0xc1, 0xe2, 0x54, 0x6c, 0xab, 0xf6, 0xa3, 0x60, 0x03, 0x84, 0x05, 0xca, 0x18, 0xc0, 0x08, 0x36, 0x67 } +, + /* Signature */ + 129, + { 0x06, 0x27, 0x23, 0x8b, 0x0b, 0x93, 0xe4, 0xcf, 0x98, 0x57, 0x13, 0xd2, 0x91, 0x29, 0x6c, 0xed, 0xe3, 0x45, 0xe8, 0x8e, 0x17, 0x82, 0x45, 0x25, 0x53, 0x59, 0x39, 0xb3, 0xf3, 0xd5, 0xff, 0x4e, 0xbc, 0x40, 0x74, 0x00, 0x11, 0x49, 0x00, 0x25, 0xdf, 0xea, 0xae, 0xe9, 0x06, 0x38, 0xc5, 0x39, 0x1e, 0xb4, 0x4e, 0x9f, 0xf3, 0x70, 0x45, 0x7b, 0x60, 0xd5, 0xde, 0x80, 0xc1, 0x65, 0x38, 0xcb, 0x38, 0x60, 0x55, 0x95, 0x85, 0xca, 0xf5, 0xe3, 0x33, 0x2c, 0x7b, 0x1f, 0xdd, 0x8f, 0x45, 0xfb, 0x6e, 0x35, 0x57, 0xf2, 0xc7, 0xa6, 0x0d, 0x09, 0x9e, 0x94, 0xf8, 0xe9, 0x6b, 0xaa, 0x1e, 0x03, 0x19, 0x9a, 0xc8, 0x3c, 0xec, 0x8f, 0x9c, 0x16, 0xbb, 0x49, 0x15, 0x1a, 0x88, 0x72, 0xcb, 0xfe, 0x70, 0xf0, 0x02, 0xcf, 0x3b, 0x53, 0xb6, 0x11, 0xd6, 0xcb, 0xb6, 0x65, 0x89, 0x7c, 0xeb, 0xf5, 0x99 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 12.7", + /* Message to be signed */ + 20, + { 0xe1, 0x74, 0x71, 0x93, 0x64, 0xf7, 0xbd, 0xc8, 0x6e, 0x2f, 0x0c, 0x61, 0x26, 0x5b, 0xf8, 0x05, 0x7d, 0x64, 0x9c, 0xca } +, + /* Signature */ + 129, + { 0x09, 0x77, 0x19, 0x54, 0xfc, 0x8a, 0x1f, 0xee, 0xe9, 0x0f, 0x60, 0xc4, 0xb8, 0xa5, 0xbb, 0xd4, 0x62, 0xc6, 0x34, 0x37, 0x9a, 0xb3, 0xda, 0x19, 0xff, 0xeb, 0xa6, 0xe0, 0x31, 0xb4, 0x24, 0x3a, 0x83, 0x50, 0x9c, 0xee, 0xed, 0x6e, 0x01, 0x2a, 0x91, 0x63, 0xc6, 0x14, 0x5c, 0xf7, 0x05, 0x02, 0xa9, 0xfb, 0x0c, 0x21, 0xdb, 0x31, 0xfa, 0xd5, 0xad, 0x14, 0x69, 0x5d, 0xe0, 0x02, 0x62, 0xe4, 0xe5, 0x67, 0x09, 0x5e, 0x16, 0x11, 0x0c, 0x6e, 0x65, 0xd6, 0xbc, 0xb9, 0xcc, 0x02, 0xe9, 0x19, 0xf9, 0x0d, 0x19, 0xe7, 0x30, 0x7f, 0x44, 0x34, 0x50, 0x3f, 0x9f, 0xe0, 0x2c, 0x12, 0xc1, 0xd3, 0xf5, 0x0c, 0xc1, 0x60, 0x08, 0x6f, 0xe4, 0x60, 0x29, 0x8c, 0x88, 0x12, 0x25, 0xbf, 0xf2, 0xe9, 0xe3, 0x13, 0xda, 0x38, 0x44, 0x44, 0xbe, 0xc7, 0x2a, 0x67, 0xac, 0x34, 0x44, 0x67, 0xe8, 0x2b, 0x66 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 12.8", + /* Message to be signed */ + 232, + { 0x98, 0xcb, 0xc9, 0x1f, 0xd4, 0x9b, 0x50, 0x7c, 0x88, 0x7e, 0x97, 0xc3, 0xcf, 0xa9, 0xb5, 0x9c, 0x26, 0x00, 0x1f, 0xca, 0xc1, 0x64, 0x87, 0xf6, 0x00, 0x4f, 0x0b, 0x68, 0x74, 0x54, 0x63, 0x20, 0x02, 0xd5, 0x49, 0xb5, 0x46, 0x1f, 0xf1, 0x53, 0x0c, 0x0f, 0x5f, 0xc0, 0x9a, 0xac, 0xc4, 0x6a, 0xda, 0xda, 0x7d, 0xc9, 0xd7, 0xb3, 0xe2, 0x0f, 0xed, 0xfe, 0xec, 0xd8, 0xf2, 0xf1, 0x68, 0x41, 0x77, 0x32, 0x68, 0x54, 0x2e, 0x86, 0x43, 0x1c, 0x7f, 0xb4, 0xd1, 0x63, 0xf3, 0x1e, 0x8e, 0x31, 0x72, 0x20, 0x34, 0x26, 0xbc, 0x0d, 0x88, 0xa2, 0x3b, 0x13, 0x76, 0x34, 0xbf, 0xc7, 0x14, 0x01, 0x72, 0x20, 0xfb, 0xfb, 0xec, 0x88, 0x8e, 0x01, 0xe3, 0xef, 0xf7, 0xbb, 0xbd, 0xf9, 0x3f, 0x08, 0x3b, 0x88, 0xf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 0x67, 0xaa, 0xe5, 0x7a, 0x31, 0x9f, 0x49, 0x1c, 0x85, 0xc2, 0x1c, 0xd7, 0xf9, 0xc5, 0x99, 0x81, 0x3c, 0xeb, 0x9d, 0xf8, 0x47, 0x78, 0xad, 0xc8, 0x2a, 0x33, 0xc4, 0xe7, 0x67, 0x4d, 0x7f, 0xbe, 0x13, 0x48, 0xdc, 0x20, 0x75, 0x51, 0x10, 0x4f, 0x54, 0x42, 0xac, 0xd6, 0x84, 0x86, 0x9a, 0xc2, 0x2c, 0xac, 0x51, 0x6c, 0xc9, 0x88, 0x7f, 0xd1, 0xd0, 0x21, 0xef, 0xcc, 0x54, 0xab, 0xda, 0xf2, 0xb6 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 12.9", + /* Message to be signed */ + 139, + { 0x3e, 0xed, 0x6b, 0xf1, 0x16, 0xcb, 0x31, 0xe0, 0xfd, 0xd4, 0xc5, 0xc9, 0x33, 0x58, 0xba, 0xb6, 0x8f, 0xbf, 0xa8, 0xb5, 0xc5, 0x15, 0xbc, 0xab, 0xf9, 0x05, 0x1c, 0xdf, 0x95, 0xa2, 0x43, 0xe5, 0xee, 0x68, 0x15, 0x15, 0x4e, 0xeb, 0x4a, 0xc1, 0x0f, 0x52, 0x31, 0xd0, 0x49, 0x38, 0x13, 0xe2, 0x81, 0x49, 0xe9, 0x68, 0x2b, 0xb1, 0xc8, 0xb7, 0x7a, 0x6e, 0x13, 0x60, 0xb2, 0xb2, 0xc0, 0xf9, 0xc3, 0x16, 0x1e, 0x41, 0x7e, 0xf6, 0xcb, 0x3d, 0x9a, 0xbb, 0xdc, 0x74, 0x2c, 0xe0, 0x25, 0xfa, 0xfc, 0xd5, 0x38, 0xc7, 0x7c, 0x4d, 0x07, 0x16, 0x49, 0x1d, 0xa5, 0x4b, 0xcd, 0xf1, 0x67, 0xb4, 0x7a, 0x61, 0xa0, 0x35, 0x27, 0xc9, 0x6e, 0x4b, 0x42, 0xbf, 0xdc, 0x98, 0x5b, 0x17, 0x87, 0x81, 0xb6, 0x92, 0x0f, 0x60, 0xf1, 0x1c, 0xd5, 0xfa, 0x76, 0x66, 0x3f, 0x56, 0xf3, 0x19, 0xf4, 0x50, 0xcc, 0x2a, 0x7f, 0x13, 0xbc, 0xce, 0x59, 0xe4, 0x1c, 0xb6, 0x66 } +, + /* Signature */ + 129, + { 0x07, 0x67, 0x3f, 0xa6, 0x83, 0xe0, 0x98, 0xbf, 0xa2, 0xb9, 0x55, 0xb6, 0xc3, 0x4e, 0x9c, 0xe8, 0xec, 0xcc, 0x5a, 0xb0, 0xab, 0x4c, 0x2c, 0xf7, 0x9b, 0x9b, 0xe1, 0xe6, 0x64, 0x42, 0x5a, 0x7c, 0x17, 0x7a, 0x47, 0xd5, 0x32, 0x0c, 0xd5, 0x70, 0x86, 0xf9, 0x51, 0x89, 0x18, 0x45, 0x09, 0x4b, 0x1f, 0xbb, 0xc9, 0xde, 0xe5, 0xf9, 0xb5, 0x56, 0xdf, 0x3e, 0x61, 0xe7, 0xe6, 0x69, 0x73, 0xd6, 0x3e, 0x69, 0xc9, 0xda, 0x17, 0x29, 0x6f, 0xe6, 0x15, 0xd6, 0x33, 0xc8, 0x62, 0x18, 0xdc, 0xa3, 0x99, 0x25, 0x8c, 0x04, 0xf8, 0x05, 0xbd, 0x04, 0xd9, 0xdc, 0x97, 0xa2, 0x9f, 0x39, 0xd6, 0x06, 0xff, 0x8e, 0x9c, 0x0a, 0x13, 0x71, 0xaa, 0xee, 0xc0, 0x03, 0xea, 0x27, 0x48, 0x95, 0xff, 0x7b, 0xa1, 0x50, 0x2b, 0x28, 0xf8, 0x17, 0x63, 0x02, 0xc2, 0x4e, 0xec, 0xe5, 0xb5, 0x28, 0xd6, 0x71, 0x00 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 12.10", + /* Message to be signed */ + 146, + { 0x08, 0x4e, 0xc2, 0x87, 0x86, 0x5e, 0x8f, 0xe6, 0x88, 0x04, 0x72, 0x37, 0x20, 0x97, 0xad, 0x5b, 0x96, 0x4c, 0x40, 0xa9, 0x35, 0xee, 0xd1, 0xbe, 0xa5, 0x1a, 0xb1, 0xb5, 0xbc, 0x75, 0xc8, 0x46, 0xbb, 0xcb, 0xd9, 0x54, 0x88, 0xe9, 0xec, 0xc3, 0x63, 0xcf, 0x07, 0x3a, 0x90, 0xb2, 0x0b, 0xe8, 0xb6, 0x79, 0x36, 0x46, 0x22, 0xf3, 0x45, 0xe1, 0x22, 0xd0, 0x56, 0x6a, 0xcd, 0x34, 0xa4, 0xae, 0x11, 0x24, 0x45, 0x25, 0xa3, 0x8f, 0x47, 0xdc, 0x1f, 0x92, 0xb1, 0x7f, 0x89, 0xed, 0xe0, 0x6d, 0x83, 0x6b, 0x44, 0x26, 0xec, 0xbb, 0xea, 0x79, 0x33, 0xac, 0x0e, 0x84, 0x7e, 0x55, 0x10, 0x33, 0xb5, 0xf7, 0xea, 0x4e, 0xaf, 0x1f, 0x63, 0xf3, 0x47, 0x9d, 0xb7, 0xea, 0xf8, 0x02, 0xc9, 0x96, 0xde, 0x92, 0x33, 0x86, 0xcd, 0x15, 0xb1, 0x22, 0xde, 0x5a, 0x23, 0x98, 0xd3, 0xf3, 0x97, 0x02, 0xc3, 0xe9, 0x06, 0x5c, 0x32, 0x73, 0x95, 0xb9, 0xa9, 0x95, 0xfa, 0x25, 0x4d, 0xe9, 0xc7, 0xad, 0xb4, 0x51 } +, + /* Signature */ + 129, + { 0x13, 0xa7, 0xf0, 0x04, 0xc0, 0xa8, 0x8d, 0x51, 0x3e, 0x2f, 0x1a, 0xae, 0xab, 0x41, 0x7f, 0xa0, 0xb2, 0x70, 0x2f, 0xb9, 0x3b, 0x82, 0x87, 0x20, 0xcc, 0xd8, 0x00, 0xcb, 0xb0, 0xaf, 0x5a, 0x19, 0x65, 0x72, 0x5b, 0x6e, 0xe0, 0x58, 0x71, 0x17, 0xcb, 0xcb, 0x81, 0xa4, 0x63, 0x18, 0x52, 0x1c, 0x95, 0x0d, 0xd8, 0x46, 0x9b, 0xd8, 0x55, 0x73, 0xf5, 0xd2, 0x9d, 0x86, 0x53, 0x03, 0xeb, 0xac, 0x45, 0xc7, 0xf6, 0x03, 0x1c, 0x6f, 0x93, 0x78, 0xeb, 0x12, 0xb4, 0x2f, 0x05, 0x09, 0x44, 0x31, 0x6f, 0x0b, 0x93, 0xdb, 0x89, 0x9b, 0xec, 0x93, 0x7d, 0x5d, 0x0f, 0x58, 0xed, 0x40, 0x70, 0x04, 0x01, 0xcd, 0x32, 0x65, 0xa6, 0xa4, 0x4b, 0x09, 0xbb, 0x11, 0xa4, 0x38, 0xee, 0xa0, 0x77, 0x15, 0xef, 0xe4, 0x2d, 0xe4, 0xe8, 0x80, 0x8f, 0x88, 0x24, 0x02, 0x61, 0x14, 0x8e, 0x8d, 0xe2, 0x93, 0xed } + +} +, +{ + "PKCS#1 v1.5 Signature Example 12.11", + /* Message to be signed */ + 154, + { 0x61, 0x07, 0x00, 0x00, 0x7c, 0x3c, 0x6c, 0xb0, 0x96, 0xc9, 0x94, 0xd6, 0x5d, 0x95, 0xc9, 0xb9, 0xa1, 0x47, 0xc3, 0x46, 0x14, 0xcd, 0x72, 0x2f, 0x29, 0xeb, 0xc5, 0xe0, 0x93, 0x78, 0x6f, 0x79, 0x09, 0x48, 0x02, 0x14, 0x1a, 0x31, 0x08, 0xd2, 0xec, 0x8a, 0x87, 0x4c, 0x53, 0x18, 0x7e, 0xb0, 0xd6, 0xee, 0x2a, 0x85, 0x91, 0x38, 0xcf, 0xbc, 0x29, 0x22, 0x15, 0x06, 0xd0, 0xbd, 0x89, 0xb0, 0xf3, 0xdb, 0xef, 0x50, 0x6b, 0xd1, 0xba, 0x40, 0x36, 0xb0, 0xf1, 0xec, 0x00, 0x73, 0x32, 0x70, 0x60, 0x75, 0x2b, 0x42, 0x8c, 0xfa, 0x12, 0xdb, 0x28, 0x0c, 0x53, 0xaa, 0xe5, 0xf3, 0xe3, 0x57, 0x0e, 0x91, 0x8c, 0xb0,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8a, 0x8c, 0x34 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 12.12", + /* Message to be signed */ + 6, + { 0xda, 0x31, 0xf9, 0xbe, 0x26, 0x09 } +, + /* Signature */ + 129, + { 0x1d, 0x2b, 0xba, 0xfc, 0xa4, 0x1c, 0xa0, 0x6c, 0x4b, 0x81, 0x1c, 0xb9, 0xd8, 0x36, 0x96, 0x87, 0x16, 0x6d, 0x14, 0xd9, 0xf9, 0x2c, 0x5b, 0x98, 0xfc, 0x7c, 0x77, 0x2f, 0x2d, 0x75, 0xd3, 0x5a, 0x5f, 0x9a, 0xcc, 0xe5, 0x9b, 0x99, 0xef, 0xb2, 0xdc, 0xb9, 0x7d, 0xcc, 0xbb, 0xc8, 0x6d, 0x7f, 0xd6, 0xb4, 0xae, 0x8b, 0xea, 0xb1, 0xe9, 0x81, 0xe6, 0xc7, 0x74, 0x5a, 0x1b, 0xfb, 0x4c, 0x1f, 0x44, 0xa4, 0x72, 0xb2, 0xad, 0x07, 0xd4, 0x1c, 0xc1, 0x75, 0x15, 0xb7, 0xb1, 0x4a, 0x49, 0x99, 0x0b, 0x24, 0x34, 0x42, 0xff, 0x2c, 0x8f, 0xe5, 0x05, 0xb1, 0x84, 0x9f, 0xa9, 0x91, 0xca, 0xcf, 0x68, 0x09, 0xa2, 0x0e, 0x55, 0xf2, 0xaf, 0x77, 0x98, 0x87, 0x0d, 0x65, 0x77, 0x6f, 0x1f, 0x9e, 0xe4, 0x87, 0x97, 0xe3, 0x13, 0xaa, 0x66, 0xa4, 0x7e, 0x69, 0x5f, 0x3e, 0x73, 0x1b, 0x2c, 0x7f, 0x30 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 12.13", + /* Message to be signed */ + 9, + { 0xf9, 0x8b, 0xe5, 0x2d, 0x9a, 0x5e, 0x55, 0xad, 0x92 } +, + /* Signature */ + 129, + { 0x29, 0x2e, 0xa3, 0x4d, 0x3e, 0x61, 0x18, 0xbf, 0x8c, 0xd0, 0x54, 0xe2, 0x15, 0x17, 0xe8, 0x63, 0xce, 0x7c, 0xb7, 0xdd, 0x72, 0x73, 0x30, 0x8f, 0x7e, 0xcf, 0xea, 0xcf, 0x9b, 0x45, 0x75, 0x83, 0xd9, 0xb9, 0xb9, 0x7c, 0x54, 0xab, 0xf7, 0x4e, 0x5a, 0x5c, 0xa3, 0x6a, 0x87, 0x06, 0x7e, 0x47, 0xd6, 0x7a, 0xa0, 0x47, 0xa1, 0xc2, 0xed, 0x7a, 0x23, 0xd0, 0x55, 0xab, 0x4f, 0x09, 0x4a, 0x83, 0xc4, 0x39, 0xef, 0x8d, 0xd2, 0xd0, 0x20, 0x35, 0xef, 0x05, 0x62, 0xd9, 0x67, 0x31, 0x3d, 0x81, 0x10, 0x2f, 0xc6, 0x8b, 0x74, 0x52, 0x5b, 0xb0, 0xe1, 0xd7, 0x96, 0x2e, 0xb2, 0x75, 0x8e, 0xc5, 0xe5, 0xae, 0xab, 0x65, 0xa9, 0x3d, 0x2e, 0xc8, 0xe6, 0x55, 0x40, 0x5a, 0xf8, 0x8c, 0x00, 0xfa, 0x35, 0xf5, 0x9d, 0xe9, 0xd0, 0xcd, 0x80, 0x45, 0xab, 0xd3, 0x71, 0x73, 0xb9, 0xfc, 0x6c, 0x51, 0xd8 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 12.14", + /* Message to be signed */ + 215, + { 0xf4, 0x38, 0xef, 0xf8, 0x4c, 0x37, 0x3f, 0xc1, 0x27, 0x44, 0xa3, 0x84, 0x15, 0x82, 0x43, 0xdd, 0x97, 0xf4, 0x36, 0x5e, 0x87, 0xd7, 0x1e, 0x8b, 0x56, 0xb2, 0x97, 0x91, 0xdf, 0x44, 0xad, 0xf3, 0x49, 0xe7, 0x62, 0x60, 0x04, 0xa2, 0xc5, 0x33, 0x35, 0xec, 0x63, 0x52, 0xcc, 0xe2, 0xed, 0xd9, 0x63, 0x94, 0x7f, 0xd2, 0x39, 0x38, 0x93, 0xc2, 0x48, 0xba, 0x1b, 0x84, 0x08, 0x42, 0xca, 0x77, 0x6c, 0x31, 0x72, 0x9f, 0x70, 0x7a, 0xf5, 0x04, 0x11, 0x00, 0x1c, 0x28, 0x7f, 0xba, 0x8f, 0xe7, 0x25, 0x02, 0x32, 0x0c, 0x44, 0x5b, 0xb1, 0x43, 0xfb, 0x7b, 0xf5, 0x39, 0x4e, 0xc1, 0xfb, 0x2c, 0xd5, 0x01, 0x59, 0x24, 0x32, 0x15, 0x40, 0x91, 0xde, 0x5a, 0x23, 0x65, 0xd6, 0x78, 0xf3, 0x57, 0x82, 0xfe, 0xa8, 0xb4, 0x7f, 0x64, 0xd6, 0x09, 0x19, 0xf0, 0xf1, 0xd5, 0xaf, 0xa7, 0x62, 0x6c, 0x40, 0xd1, 0x6c, 0xec, 0x19, 0xbf, 0xe0, 0x25, 0xd1, 0x16, 0xf4, 0x2d, 0x22, 0xe2, 0x0a, 0xdb, 0x56, 0x37, 0x5a, 0xd7, 0x70, 0x89, 0xf9, 0xa9, 0x33, 0x81, 0xfd, 0x78, 0xb7, 0xb1, 0x51, 0x1c, 0xb4, 0xe4, 0x98, 0x4d, 0x2d, 0xdc, 0x7c, 0x9d, 0x75, 0xb3, 0x10, 0xf2, 0x95, 0x42, 0x25, 0x60, 0xd6, 0x6e, 0x36, 0x02, 0xa8, 0x71, 0x20, 0x96, 0x16, 0x13, 0x1a, 0x84, 0x71, 0x43, 0xdd, 0x07, 0x8f, 0x23, 0x58, 0x7d, 0xb5, 0x02, 0xdd, 0xa0, 0x3e, 0x18, 0x60, 0x64, 0x82, 0xdb, 0xbe, 0x01, 0x4e, 0xa0, 0x83, 0xb7, 0xec, 0x16, 0x1b } +, + /* Signature */ + 129, + { 0x0e, 0xaf, 0xeb, 0xf1, 0x5d, 0x84, 0xee, 0x4a, 0x13, 0xf1, 0xa8, 0x2b, 0x84, 0x05, 0x11, 0x86, 0x41, 0xe2, 0x2e, 0x51, 0xda, 0x94, 0xd8, 0x58, 0x87, 0xfc, 0x4a, 0x3b, 0x11, 0xf0, 0x32, 0x49, 0xcc, 0x39, 0xa0, 0x37, 0x45, 0x01, 0x07, 0x1c, 0x7e, 0xef, 0x4a, 0xba, 0xa1, 0x14, 0x08, 0xd0, 0x2f, 0xae, 0x17, 0x86, 0xde, 0xa3, 0x75, 0x88, 0x47, 0x9c, 0x90, 0xd6, 0x27, 0x69, 0x85, 0x91, 0xc3, 0xba, 0xe1, 0xfe, 0xfd, 0x6e, 0x8c, 0x40, 0xe3, 0xff, 0x4b, 0x9f, 0x60, 0x61, 0xe0, 0x6c, 0x12, 0xfd, 0xd2, 0x1c, 0x7f, 0x45, 0xdd, 0xc5, 0xb7, 0x8d, 0x1c, 0xbc, 0x41, 0xc1, 0x57, 0x06, 0xfa, 0x20, 0xba, 0x92, 0xf9, 0x9f, 0x58, 0xb2, 0x2b, 0xe2, 0x76, 0x75, 0xbe, 0xe0, 0x81, 0xa0, 0x60, 0x67, 0xee, 0xd1, 0x58, 0xf8, 0xe2, 0x0b, 0xf0, 0x4a, 0x6e, 0x96, 0x8f, 0x71, 0x9a, 0x32, 0x34 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 12.15", + /* Message to be signed */ + 89, + { 0xfa, 0x1c, 0x0f, 0x7b, 0x10, 0x15, 0xa8, 0x95, 0xb1, 0xa5, 0x65, 0xf3, 0x29, 0x96, 0xb2, 0xb8, 0xcc, 0xfd, 0x86, 0x4b, 0x95, 0x54, 0x4d, 0xbb, 0x9c, 0xf4, 0xf6, 0xe1, 0xa8, 0x41, 0xde, 0x92, 0x06, 0xd5, 0x57, 0x26, 0xfd, 0xf7, 0xee, 0xa2, 0xbf, 0x33, 0x6a, 0x82, 0x9f, 0xd2, 0xbc, 0x12, 0x09, 0xbd, 0x21, 0x5a, 0xab, 0xb9, 0x77, 0xd2, 0x3a, 0x08, 0x3f, 0x10, 0xae, 0x69, 0xdb, 0x43, 0x7c, 0xa3, 0x2d, 0x7b, 0xfe, 0x4c, 0x88, 0x25, 0xb9, 0x34, 0x88, 0xf0, 0x1a, 0xfd, 0xf7, 0x84, 0x45, 0x8c, 0xef, 0x5c, 0xdd, 0x8d, 0xff, 0xdd, 0x17 } +, + /* Signature */ + 129, + { 0x25, 0xe2, 0x2e, 0x6d, 0xf7, 0xfc, 0x6b, 0xd4, 0xe0, 0xf6, 0x1e, 0xbc, 0x8d, 0xa0, 0x63, 0xfe, 0x47, 0x8a, 0x3e, 0xd7, 0x4d, 0x68, 0xf7, 0x76, 0x34, 0x35, 0xe0, 0xe3, 0x74, 0xf6, 0x52, 0x62, 0xa5, 0xd7, 0x61, 0x2e, 0x86, 0x78, 0x59, 0x61, 0x22, 0xc0, 0xe5, 0xb8, 0xfa, 0x0c, 0x0b, 0x12, 0x81, 0x2b, 0xa9, 0x65, 0x3a, 0x0f, 0x27, 0x38, 0x83, 0xc6, 0x26, 0x4c, 0x6d, 0xfb, 0x74, 0xbb, 0x34, 0x40, 0x5d, 0x2a, 0x04, 0x30, 0x43, 0xfb, 0xb0, 0xab, 0xf2, 0xaf, 0x7a, 0x12, 0x3d, 0x2d, 0xdb, 0xf1, 0x69, 0x92, 0xe0, 0x9b, 0xaa, 0x37, 0xd7, 0x31, 0xd7, 0x2e, 0xf1, 0x99, 0x62, 0x65, 0x8a, 0x8f, 0xb0, 0x10, 0xa1, 0x0f, 0x7d, 0x55, 0x62, 0xad, 0x54, 0x33, 0x47, 0x90, 0x01, 0xaf, 0x36, 0xd3, 0xd3, 0x26, 0xea, 0xdb, 0x2e, 0x9a, 0xbe, 0xc7, 0xb5, 0x55, 0x70, 0x9d, 0x5d, 0x47, 0xe9 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 12.16", + /* Message to be signed */ + 223, + { 0x82, 0x8e, 0xbe, 0x2f, 0x51, 0xe5, 0x88, 0x29, 0xcf, 0xa6, 0x15, 0x26, 0xdd, 0xed, 0x7e, 0x1f, 0x1b, 0xa3, 0x11, 0xdb, 0xf1, 0x06, 0x4c, 0x08, 0xac, 0x0b, 0xb5, 0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xfd, 0x4a, 0xfc, 0x28, 0xb5, 0x11, 0x73, 0xaf, 0xbb, 0x25, 0xc4, 0xc7 } +, + /* Signature */ + 129, + { 0x16, 0x17, 0x55, 0x9e, 0x43, 0xba, 0x18, 0x2e, 0x95, 0x34, 0x86, 0x43, 0x6f, 0x15, 0xb6, 0x02, 0x83, 0x1e, 0x42, 0xee, 0xd2, 0x03, 0xc2, 0x69, 0xf6, 0x53, 0xbf, 0x63, 0x9c, 0x2b, 0x76, 0x0b, 0x0d, 0x49, 0xfb, 0x53, 0x2c, 0xa8, 0xad, 0x01, 0xe7, 0xb4, 0xaf, 0x83, 0x72, 0x92, 0x55, 0xdb, 0x55, 0x9b, 0xcf, 0x55, 0xfa, 0xb3, 0x65, 0x9c, 0xeb, 0xec, 0xd5, 0x37, 0x69, 0x4f, 0xef, 0x2d, 0xef, 0x9c, 0x9e, 0x76, 0x2d, 0x05, 0xd2, 0x32, 0x1e, 0xd6, 0x88, 0xc3, 0xf7, 0xe2, 0xc0, 0x57, 0x33, 0xab, 0x4f, 0xa8, 0x1b, 0x08, 0xcf, 0x79, 0xfa, 0xcb, 0x75, 0xc3, 0x20, 0x0b, 0x7a, 0x48, 0x3a, 0xf0, 0x8c, 0xb1, 0x83, 0xc5, 0x09, 0x27, 0xcc, 0x61, 0x69, 0xe4, 0x32, 0xf7, 0xfc, 0x9b, 0x11, 0x78, 0x0d, 0xbf, 0x4d, 0x3b, 0x72, 0xd2, 0xd0, 0xb8, 0x55, 0x93, 0xd8, 0xb5, 0xb0, 0x18, 0x2a } + +} +, +{ + "PKCS#1 v1.5 Signature Example 12.17", + /* Message to be signed */ + 47, + { 0xbb, 0x4a, 0x6e, 0xcc, 0xbd, 0xd6, 0xde, 0x0a, 0xc5, 0xc3, 0xb7, 0xf9, 0x97, 0x98, 0x10, 0x4a, 0x58, 0x69, 0xc1, 0xcf, 0x1a, 0x1f, 0xac, 0x7f, 0x85, 0x9f, 0xe9, 0x51, 0x49, 0x29, 0x7e, 0xb7, 0x79, 0x11, 0x00, 0x59, 0xe2, 0x69, 0xf1, 0x27, 0x56, 0xf0, 0x8a, 0x54, 0x8b, 0x66, 0xaf } +, + /* Signature */ + 129, + { 0x27, 0x7b, 0xae, 0x63, 0xe6, 0xe3, 0x25, 0x3a, 0x0e, 0x20, 0x4f, 0x4e, 0x6c, 0x9f, 0xe8, 0x4b, 0x04, 0x0b, 0x86, 0x4f, 0x21, 0xed, 0xd4, 0x42, 0x6d, 0x82, 0xbe, 0x8f, 0x1b, 0x91, 0x1b, 0x0b, 0xd2, 0x81, 0xcf, 0x11, 0x49, 0x53, 0xd4, 0x02, 0x09, 0xda, 0x2e, 0x9a, 0xae, 0x13, 0x3b, 0xcd, 0x18, 0x55, 0xef, 0x0a, 0x99, 0x69, 0x3a, 0x94, 0x43, 0xc9, 0x3f, 0x6d, 0xd2, 0x75, 0xf0, 0x58, 0xfd, 0x1b, 0xb6, 0x95, 0x32, 0xb6, 0x4a, 0x1d, 0xd7, 0xe1, 0xd0, 0xe7, 0x80, 0xd7, 0x52, 0x04, 0xfa, 0x8c, 0x61, 0xc2, 0xeb, 0x5d, 0xe8, 0x82, 0x72, 0xcb, 0x93, 0xae, 0xf0, 0x80, 0xf7, 0x02, 0xbb, 0x78, 0x88, 0x94, 0x25, 0xa5, 0xf1, 0x66, 0xf6, 0x3b, 0x5b, 0x1a, 0x31, 0xec, 0x5c, 0x1c, 0x26, 0xa5, 0x99, 0xfa, 0xfe, 0x58, 0x77, 0x42, 0x98, 0xb9, 0x7d, 0xb3, 0x14, 0xfc, 0x81, 0xd0, 0x92 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 12.18", + /* Message to be signed */ + 256, + { 0xf1, 0xd1, 0x11, 0xad, 0x08, 0xe0, 0x38, 0xca, 0x3a, 0xb4, 0xe5, 0x2e, 0x5e, 0xab, 0x71, 0x01, 0x87, 0x6c, 0xa9, 0xbe, 0x62, 0x6a, 0x13, 0x59, 0x17, 0xf4, 0x5b, 0x1f, 0x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0x10, 0x0d, 0x6b, 0xfc, 0x0e, 0xd5, 0xee, 0x77, 0x69, 0x4f, 0xf1, 0xa2, 0x4e, 0x16, 0xa5, 0x44, 0xde, 0x71, 0x46, 0x52, 0x90, 0xdd, 0xdd, 0x18, 0x9f, 0x01, 0x67, 0x03, 0x59, 0xf8, 0xc6, 0xb5, 0xd4, 0xc6, 0xb6, 0xb9, 0xf5, 0xc5, 0x7a, 0xa5, 0xa3, 0x8f, 0x07, 0x99 } +, + /* Signature */ + 129, + { 0x0d, 0xe9, 0x42, 0x31, 0xc0, 0x6a, 0xb1, 0x87, 0xb0, 0x0d, 0xda, 0x2b, 0x34, 0xe2, 0xb4, 0xcb, 0xac, 0x41, 0xf6, 0x08, 0xc4, 0x8c, 0x72, 0x27, 0xa6, 0x28, 0x2a, 0x17, 0x9e, 0x58, 0xc3, 0x2e, 0xf5, 0xdd, 0xc9, 0x76, 0x4f, 0xa2, 0xdf, 0xc3, 0xfb, 0xe0, 0x21, 0xdd, 0xb4, 0x81, 0x56, 0xa6, 0x37, 0x3c, 0xd6, 0x9b, 0x85, 0xd3, 0x64, 0xd8, 0x9b, 0x5a, 0x32, 0xfa, 0xbb, 0x2d, 0x46, 0x5d, 0x05, 0x62, 0xd4, 0xa1, 0xdd, 0x6f, 0xca, 0x64, 0x78, 0x0b, 0x06, 0x2a, 0x94, 0x71, 0x24, 0xa7, 0xfc, 0x0b, 0x82, 0xe4, 0xfe, 0xd1, 0x2b, 0x8b, 0x4f, 0x72, 0x6a, 0x0c, 0x85, 0x39, 0xc6, 0xcd, 0xe2, 0x1a, 0xf6, 0x55, 0xac, 0xc8, 0xde, 0x1e, 0x7b, 0xa9, 0xd6, 0x7b, 0x87, 0xb8, 0xe7, 0x77, 0xd4, 0x8a, 0xcd, 0x86, 0x8a, 0x80, 0xdb, 0x15, 0x31, 0x4f, 0x35, 0x55, 0x60, 0x10, 0x35, 0x77, 0xeb } + +} +, +{ + "PKCS#1 v1.5 Signature Example 12.19", + /* Message to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, 0x21, 0x0e, 0xaa, 0x8f, 0xe7, 0x3c, 0xa7, 0x6f, 0x1b, 0x5b } +, + /* Signature */ + 129, + { 0x18, 0x53, 0xc2, 0x1a, 0x4a, 0x18, 0x54, 0x7d, 0x86, 0x7b, 0x3c, 0xed, 0x02, 0xda, 0xf0, 0xb2, 0x2c, 0xe8, 0xd4, 0xd5, 0xaf, 0x2b, 0x8e, 0xf5, 0xf7, 0xc8, 0xfd, 0x38, 0x5b, 0x81, 0x53, 0x64, 0x8d, 0x81, 0x83, 0x1d, 0x6a, 0xcb, 0x5d, 0xa8, 0x30, 0xf6, 0x77, 0x40, 0x25, 0x9f, 0xfb, 0x33, 0x9f, 0x7b, 0x90, 0xaf, 0x48, 0x83, 0x81, 0x9c, 0x47, 0x15, 0xe0, 0x8c, 0x28, 0x99, 0xd4, 0xc7, 0x24, 0x6e, 0x07, 0xe5, 0xbc, 0x6e, 0xf3, 0xcf, 0xd9, 0xa0, 0x4d, 0xa0, 0x6c, 0x43, 0xe9, 0x5c, 0x77, 0x2b, 0xe2, 0x21, 0xcf, 0xaa, 0xf6, 0x95, 0x4e, 0xf9, 0x33, 0x31, 0xe5, 0x95, 0xff, 0x48, 0x92, 0x1f, 0x05, 0xfc, 0xe8, 0xfa, 0x0d, 0x42, 0x9e, 0x0c, 0x99, 0x56, 0x2a, 0x9c, 0x2f, 0x68, 0xeb, 0xf3, 0x2c, 0xf1, 0xc6, 0xc6, 0xbb, 0x8b, 0x27, 0x4a, 0x2e, 0x42, 0xd6, 0x71, 0x59, 0x12, 0xff } + +} +, +{ + "PKCS#1 v1.5 Signature Example 12.20", + /* Message to be signed */ + 146, + { 0xc3, 0x81, 0xe6, 0x03, 0x99, 0x86, 0x51, 0x66, 0xd2, 0xba, 0xa0, 0x31, 0x45, 0x26, 0x83, 0x34, 0x18, 0x40, 0x39, 0xe0, 0x53, 0x35, 0xa3, 0x00, 0xc2, 0x80, 0x4e, 0x2b, 0xfe, 0xf5, 0xa7, 0xd1, 0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 0x2e, 0x4f, 0xd8, 0x64, 0xc5, 0xfa, 0x93, 0x3a, 0x4d, 0xfc, 0x60, 0x0e, 0x10, 0x83, 0x00, 0x8a, 0x38, 0x6f, 0x4d, 0x02, 0x2c, 0x20, 0x24, 0xff, 0x7e, 0x0b, 0x37, 0x22, 0xea, 0xfe, 0xa0, 0x5a, 0x1e, 0x02, 0xc7, 0xa6, 0x3e, 0xeb, 0x40, 0xf4, 0xf4, 0xc4, 0xf6, 0x60, 0xc3, 0x24, 0x72, 0xa0, 0xa7, 0x89, 0x23, 0xe3, 0x86, 0x3a, 0x99, 0x44, 0x5e, 0x7c, 0xfe, 0x27, 0x00, 0x60 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 13: A 1031-bit RSA key pair", +{ + /* Modulus */ + 129, + { 0x70, 0xe9, 0x23, 0xa5, 0xa0, 0xcd, 0x8e, 0xcd, 0xf9, 0x9b, 0xbe, 0x93, 0xd7, 0xd0, 0x28, 0x82, 0x95, 0x5d, 0x91, 0xb6, 0xef, 0xe3, 0xce, 0xc8, 0x6c, 0x93, 0xd2, 0x1c, 0x0a, 0xc3, 0x01, 0xb8, 0x29, 0x3e, 0x51, 0x43, 0x5b, 0x87, 0x8b, 0xc6, 0xb3, 0x4b, 0xed, 0x41, 0x11, 0x59, 0x0e, 0x76, 0x46, 0x76, 0x58, 0x8b, 0x11, 0x6c, 0x2a, 0x36, 0xa4, 0xc7, 0x7e, 0xd9, 0xc9, 0x0a, 0x13, 0xc1, 0x4d, 0x23, 0xe1, 0x99, 0x47, 0x87, 0xfc, 0xdb, 0x8f, 0x5c, 0x97, 0x41, 0x0f, 0xca, 0xd4, 0x04, 0x5b, 0x85, 0x85, 0x70, 0x2c, 0xce, 0x29, 0xda, 0x11, 0xf9, 0x7e, 0x79, 0xa9, 0x7c, 0x2e, 0x5f, 0x6a, 0x5f, 0xc0, 0xbb, 0x8c, 0xe7, 0x6d, 0x15, 0x54, 0xa8, 0xbc, 0x47, 0x96, 0x17, 0x20, 0xd3, 0x64, 0x05, 0x0b, 0xf2, 0x74, 0x19, 0xbf, 0xf1, 0x68, 0xc0, 0xa7, 0xec, 0xc8, 0x73, 0x4c, 0xb5, 0xa5 } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 129, + { 0x02, 0x9e, 0x10, 0xf6, 0xbb, 0xb7, 0xd0, 0x2d, 0xeb, 0xb1, 0xa5, 0xd5, 0x19, 0x0d, 0x69, 0x06, 0xff, 0xed, 0xeb, 0x9d, 0x15, 0x4a, 0x0f, 0x66, 0xdb, 0x87, 0x80, 0xb9, 0x28, 0x31, 0xb5, 0x96, 0x3e, 0x94, 0x84, 0x7f, 0x3e, 0x7d, 0xb1, 0xaa, 0x91, 0x48, 0xfb, 0x0e, 0xc5, 0x57, 0x6e, 0x6b, 0xa4, 0xfe, 0x04, 0xd6, 0xf2, 0x78, 0x32, 0xb1, 0x52, 0x18, 0x12, 0xd3, 0x7b, 0x22, 0xd9, 0xea, 0xe2, 0x80, 0x08, 0xe0, 0x92, 0xc6, 0x7e, 0x72, 0x32, 0x42, 0x67, 0xe1, 0xb1, 0xee, 0x45, 0x43, 0x55, 0x74, 0x1d, 0x8d, 0xe1, 0xd2, 0xa6, 0xa0, 0x50, 0x74, 0xbb, 0x1c, 0xe5, 0x81, 0x8b, 0x41, 0xbd, 0x19, 0xdc, 0x6b, 0x58, 0xc8, 0x93, 0x7d, 0x8a, 0xd6, 0x40, 0xd7, 0x04, 0x3f, 0xa1, 0x1f, 0x46, 0x8d, 0x6c, 0xcb, 0xec, 0x4a, 0xde, 0x52, 0x0a, 0x9e, 0x15, 0x9d, 0x60, 0x5d, 0x09, 0x28, 0x29 } +, + /* Prime 1 */ + 65, + { 0x0a, 0xb4, 0x64, 0xfd, 0x6f, 0xe3, 0x3c, 0x45, 0x9a, 0xb2, 0xdc, 0xce, 0x5f, 0x78, 0xa4, 0xd7, 0x4f, 0x92, 0xb9, 0x97, 0xd4, 0xbf, 0x54, 0x2e, 0x2d, 0x85, 0x4e, 0x76, 0x2c, 0x85, 0x86, 0xfc, 0x43, 0x57, 0xcc, 0x58, 0xcb, 0x33, 0x36, 0x33, 0xb0, 0x95, 0xa5, 0xee, 0x04, 0xa0, 0x32, 0x48, 0x53, 0x64, 0xd7, 0x0f, 0x67, 0xa3, 0xaa, 0x04, 0x85, 0x4c, 0x7a, 0x87, 0xa6, 0x9c, 0xf4, 0xc2, 0xad } +, + /* Prime 2 */ + 65, + { 0x0a, 0x8c, 0x3c, 0xc5, 0x04, 0x13, 0x40, 0xf4, 0x32, 0xfe, 0x0a, 0x78, 0x73, 0x13, 0x57, 0x79, 0x16, 0xfe, 0x76, 0xc0, 0x39, 0xf9, 0x71, 0x75, 0x9e, 0xc5, 0x0e, 0xd6, 0xc5, 0xb9, 0xa7, 0x36, 0x9b, 0x68, 0x96, 0x9e, 0xcb, 0x52, 0x59, 0xfe, 0x9c, 0x50, 0xd0, 0x75, 0x9b, 0xf8, 0xb3, 0xaa, 0xc1, 0xa5, 0xd5, 0xb5, 0x28, 0x8d, 0x67, 0x89, 0xe7, 0x18, 0xfa, 0x37, 0xef, 0x42, 0x39, 0x95, 0xd9 } +, + /* Prime exponent 1 */ + 64, + { 0xbb, 0x29, 0x5a, 0x95, 0xd5, 0xb3, 0x3c, 0x1d, 0xc0, 0xb1, 0x8b, 0xf6, 0xc1, 0x4a, 0xa0, 0xd9, 0xf2, 0x6f, 0x72, 0x8b, 0x39, 0x36, 0x0a, 0xa1, 0x59, 0x45, 0x6e, 0x94, 0xc3, 0xd9, 0xe0, 0x48, 0xc9, 0x2a, 0x4f, 0xb6, 0x31, 0x1d, 0x36, 0x92, 0x8c, 0xe5, 0xf4, 0x47, 0xa4, 0x99, 0x4a, 0x8f, 0x47, 0x87, 0xd8, 0xa9, 0x7f, 0x68, 0x11, 0x3e, 0xf9, 0x66, 0x34, 0xf5, 0x90, 0x2a, 0xb7, 0x51 } +, + /* Prime exponent 2 */ + 65, + { 0x02, 0xfa, 0x11, 0x2c, 0x89, 0x39, 0xe5, 0xdb, 0x05, 0x89, 0x2c, 0xeb, 0x51, 0x8e, 0xe3, 0xe1, 0x08, 0xdc, 0x48, 0x27, 0x78, 0x35, 0x2e, 0x10, 0x43, 0xfe, 0xd9, 0x71, 0x43, 0xdc, 0x61, 0x94, 0xc7, 0xc7, 0x7c, 0xba, 0xd4, 0x27, 0x29, 0xbe, 0xf1, 0xde, 0xdc, 0xf6, 0x54, 0x4e, 0x9c, 0x66, 0x54, 0xc0, 0xb8, 0xcf, 0xa7, 0xe2, 0x40, 0x96, 0x6a, 0xe2, 0x61, 0xbb, 0xe7, 0x8a, 0x89, 0x36, 0x01 } +, + /* Coefficient */ + 64, + { 0xa8, 0x8b, 0xf3, 0xff, 0xe9, 0x3f, 0x40, 0x4e, 0x06, 0x82, 0x1c, 0x97, 0x71, 0xea, 0xe6, 0x08, 0x15, 0x71, 0x2d, 0x6f, 0x94, 0x52, 0x71, 0xf6, 0xf3, 0x6f, 0x03, 0x69, 0xd9, 0x66, 0xc9, 0x20, 0xc7, 0xf8, 0xcb, 0xc7, 0x84, 0x25, 0xac, 0xbb, 0x9c, 0xe0, 0xfa, 0x1a, 0x03, 0x22, 0xf5, 0x0c, 0x97, 0xb8, 0x11, 0x5b, 0xd1, 0x51, 0x91, 0xf2, 0x24, 0xb5, 0x68, 0xd1, 0xd6, 0xec, 0xa6, 0xdb } + +} +, +{{ + "PKCS#1 v1.5 Signature Example 13.1", + /* Message to be signed */ + 36, + { 0xb5, 0xe8, 0x6c, 0x8b, 0xa3, 0x98, 0x5a, 0xa5, 0x54, 0x1d, 0xf9, 0x5e, 0x51, 0x3c, 0xff, 0x67, 0x61, 0x2e, 0xaf, 0x2e, 0x16, 0x68, 0x85, 0x76, 0xf7, 0xd6, 0x73, 0xf6, 0xf1, 0x89, 0x1f, 0xb7, 0x5c, 0x9d, 0xd2, 0xcd } +, + /* Signature */ + 129, + { 0x6b, 0x42, 0xfd, 0x51, 0x63, 0x09, 0x19, 0x7f, 0x8a, 0xf3, 0xc7, 0x3e, 0x39, 0x62, 0x4d, 0x8e, 0xba, 0xbe, 0xcd, 0xa3, 0xec, 0x3c, 0xe6, 0x57, 0xb1, 0x11, 0x7f, 0x43, 0xe9, 0x83, 0x87, 0x7a, 0x1b, 0xa1, 0xaa, 0xf8, 0xe9, 0x5c, 0xc3, 0x99, 0x91, 0xd9, 0x2e, 0x35, 0xe2, 0xdb, 0x1e, 0x41, 0x30, 0x90, 0x14, 0x3d, 0x16, 0x46, 0x71, 0x98, 0xb9, 0xb9, 0xa9, 0x90, 0xd7, 0x74, 0xc2, 0x7a, 0xd3, 0xbb, 0xb4, 0x35, 0x2d, 0x3f, 0x07, 0x5d, 0x61, 0x73, 0x2c, 0x6b, 0x58, 0xec, 0x0f, 0x66, 0xe4, 0x92, 0xa3, 0xf7, 0xac, 0x4b, 0xbc, 0xf0, 0x12, 0xed, 0x6b, 0x40, 0x1f, 0xeb, 0x4f, 0xf3, 0x95, 0xcb, 0x8b, 0x21, 0x8a, 0x81, 0xd6, 0x17, 0x31, 0xee, 0xce, 0x37, 0x6f, 0x68, 0x8e, 0x66, 0xae, 0xa6, 0x98, 0xb4, 0xa8, 0x86, 0x2f, 0x58, 0xc9, 0x1d, 0x87, 0x60, 0x85, 0x49, 0x6f, 0xd0, 0x14 } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Signature Example 13.2", + /* Message to be signed */ + 253, + { 0x95, 0x46, 0x34, 0x6c, 0xf2, 0x21, 0x94, 0xc7, 0x87, 0x88, 0x81, 0x70, 0xa4, 0x82, 0xf7, 0xf4, 0x92, 0x17, 0xc3, 0x94, 0x0d, 0xc6, 0x21, 0x0c, 0xe3, 0x9e, 0x45, 0x50, 0xa3, 0x9b, 0x45, 0x28, 0x22, 0x41, 0x9a, 0xea, 0xc2, 0x4b, 0xec, 0x19, 0x8b, 0xb3, 0x59, 0xd0, 0x8b, 0xe8, 0x19, 0x6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, 0xc2, 0x57, 0xec, 0x39, 0xee, 0x2f, 0x87, 0x62, 0x98, 0xda, 0x90, 0xf7, 0x44, 0x0a, 0xd4, 0xc6, 0xc9, 0x3f, 0xc1, 0x14, 0xdf, 0x05 } +, + /* Signature */ + 129, + { 0x67, 0xe4, 0x14, 0x99, 0x3f, 0x98, 0x7a, 0x22, 0x64, 0x3d, 0xd0, 0x39, 0xe7, 0xf9, 0xfe, 0x1c, 0xae, 0x74, 0x4a, 0x7a, 0xe4, 0x1d, 0x4c, 0x04, 0x4f, 0xa4, 0xed, 0x8d, 0xc9, 0xe3, 0x40, 0xce, 0xbb, 0x1e, 0x2a, 0xfb, 0x19, 0x8e, 0x84, 0x7a, 0xef, 0x4b, 0xc0, 0x61, 0xfd, 0x80, 0x0d, 0x81, 0xd4, 0xd3, 0x67, 0xb0, 0xfc, 0x2f, 0x73, 0x09, 0x33, 0xc1, 0x9b, 0x88, 0xd4, 0xdd, 0xf0, 0x5e, 0xd9, 0x8a, 0x58, 0x56, 0xde, 0x5e, 0xb4, 0x5b, 0x11, 0x6b, 0x7d, 0x24, 0xfe, 0xb4, 0x56, 0x77, 0x84, 0x9d, 0xab, 0x76, 0xe9, 0xe0, 0xcc, 0xb4, 0x5b, 0xa6, 0xb6, 0xf6, 0x14, 0x1f, 0x37, 0xbb, 0xad, 0x7c, 0x19, 0x1c, 0x37, 0x77, 0x11, 0x3b, 0xc7, 0x38, 0x8e, 0x4e, 0x46, 0x44, 0xec, 0xa9, 0x47, 0x03, 0xa7, 0x2b, 0xdd, 0xcc, 0x6f, 0x50, 0xcf, 0x98, 0x0e, 0x3f, 0x6d, 0xe3, 0x9d, 0x73, 0x12 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 13.3", + /* Message to be signed */ + 121, + { 0x56, 0x52, 0xb4, 0xc5, 0x75, 0x20, 0xb2, 0x55, 0xfb, 0x96, 0xf7, 0x0a, 0x30, 0xab, 0x92, 0xee, 0xc1, 0x93, 0x99, 0x56, 0xb6,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 0x3c, 0x14, 0x1c, 0x57, 0x6c, 0x8d, 0x10, 0xb6, 0x36, 0xfc, 0x4d, 0xdc, 0x1e, 0x67, 0x14, 0xf1, 0x7f, 0xfc, 0xce, 0x10, 0x6d, 0x22, 0x1b, 0x4f, 0xd7, 0xd6, 0xfe, 0x1e, 0x7c, 0xbd, 0x3f, 0x3b, 0x08, 0xf5, 0x54, 0x6b, 0x44, 0xd1, 0xfe, 0xb7, 0x18, 0xfb, 0xc1, 0x33, 0x70, 0xc7, 0xfa, 0x2c } + +} +, +{ + "PKCS#1 v1.5 Signature Example 13.4", + /* Message to be signed */ + 211, + { 0x6d, 0x57, 0xf0, 0x79, 0xa3, 0xe8, 0xad, 0xcb, 0x47, 0xcf, 0x2e, 0x3c, 0xa9, 0x76, 0xe0, 0x3b, 0x09, 0xc7, 0x7d, 0x1d, 0x9d, 0x9d, 0x84, 0x84, 0x35, 0x7e, 0x91, 0x23, 0x09, 0xe8, 0xf4, 0xa8, 0x3c, 0xb5, 0x0c, 0xb6, 0xa7, 0x38, 0x8c, 0x41, 0x4a, 0xec, 0x84, 0x46, 0x71, 0xff, 0x81, 0x06, 0x51, 0xe8, 0x28, 0x10, 0x3a, 0x1f, 0x6a, 0x19, 0x9b, 0xe2, 0x60, 0xf7, 0x46, 0x00, 0x02, 0x8c, 0x6a, 0x7b, 0x7b, 0xb9, 0x41, 0x6c, 0xe7, 0xb6, 0x35, 0x0a, 0x3a, 0x68, 0x05, 0x62, 0x0c, 0xf5, 0xe6, 0xb0, 0x09, 0x5d, 0xfa, 0x22, 0xb5, 0x46, 0x01, 0xf6, 0x19, 0xaf, 0xd1, 0x0d, 0xa2, 0x03, 0xd2, 0x81, 0x90, 0xcf, 0x9b, 0x0d, 0xb5, 0x98, 0x6d, 0x29, 0x30, 0x33, 0x69, 0x1e, 0xc5, 0xbb, 0xba, 0x6d, 0x73, 0xea, 0x32, 0x47, 0x2e, 0xfa, 0x3f, 0x16, 0x0f, 0xd2, 0xb1, 0xb5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x64, 0x5d, 0xe8, 0x2d, 0xf7, 0xc6, 0x15, 0x50, 0x3f, 0xa8, 0x3b, 0x4e, 0xdb, 0xa2, 0x05, 0x81, 0x81, 0x2e, 0x09, 0x7f, 0x65, 0x05, 0x6e, 0xd4, 0x17, 0xf6, 0xf2, 0x48, 0x03, 0x53, 0x0c, 0xf8, 0x18, 0x58 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 13.5", + /* Message to be signed */ + 241, + { 0xbb, 0x75, 0x44, 0x6f, 0x78, 0x78, 0x23, 0xdd, 0xa2, 0x42, 0x2b, 0x1a, 0xdc, 0x7d, 0x7f, 0xef, 0xd0, 0x6a, 0x6e, 0x9a, 0xf5, 0xc0, 0x49, 0x01, 0xac, 0x5b, 0x99, 0x91, 0x3a, 0xd6, 0x29, 0x8c, 0x9d, 0x1a, 0x33, 0x22, 0xe8, 0xb2, 0x17, 0xe4, 0xe0, 0x99, 0x4c, 0x42, 0x20, 0x42, 0x80, 0xd4, 0x04, 0xd0, 0x1e, 0xce, 0xb5, 0xec, 0x53, 0xfb, 0x86, 0xf7, 0x61, 0xa3, 0x96, 0xb2, 0x3a, 0xe1, 0x9d, 0x46, 0x79, 0x05, 0xa0, 0xfe, 0x80, 0x50, 0xb8, 0x95, 0xd8, 0xba, 0x37, 0x46, 0x68, 0x5c, 0x47, 0x43, 0x9f, 0x90, 0xc3, 0x66, 0x9c, 0x70, 0xff, 0xb8, 0x19, 0x94, 0x56, 0x5c, 0x4d, 0xf2, 0xa3, 0x1e, 0xb2, 0xa4, 0x52, 0xbc, 0x3c, 0xb3, 0x12, 0xb8, 0x14, 0x7c, 0xec, 0x19, 0x10, 0x32, 0xf3, 0x8f, 0x3b, 0x3d, 0x89, 0xd7, 0x58, 0x2b, 0xf1, 0x8e, 0x7b, 0x72, 0x75, 0xfb, 0x4f, 0x16, 0xee, 0x89, 0x56, 0x7e, 0x2a, 0x56, 0xbc, 0x73, 0xb3, 0xe2, 0xe1, 0x09, 0xf9, 0x94, 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0x8d, 0xf2, 0x12, 0x96, 0xb4, 0xc6, 0x7b, 0x52, 0x68, 0x35, 0xf7, 0x57, 0xf2, 0xc2, 0x6c, 0x1d, 0x30, 0x9d, 0x7c, 0xdd, 0x5a, 0xd5, 0xfd, 0x8f, 0x61, 0xf8, 0x51, 0xed, 0x23, 0xc4, 0xbe, 0x2a, 0xbb, 0x62, 0x7d, 0xfd, 0x81, 0x7f, 0x84, 0x77, 0xdc, 0x04, 0x2b, 0x6a, 0x2e, 0x40, 0x69, 0x40 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 13.6", + /* Message to be signed */ + 245, + { 0x88, 0x39, 0x39, 0xd1, 0x49, 0xa5, 0x44, 0xe6, 0x2e, 0xf0, 0x4c, 0x61, 0x03, 0x51, 0xa2, 0xdf, 0xa2, 0x52, 0xeb, 0x9a, 0x9d, 0x1e, 0x11, 0xae, 0x54, 0xc9, 0xb0, 0x7e, 0xbc, 0xf1, 0xfd, 0xc4, 0x7e, 0xc1, 0xd9, 0x47, 0x03, 0x41, 0x1d, 0xa4, 0x15, 0xf5, 0x9f, 0xb3, 0xe5, 0x04, 0x1e, 0xd9, 0x47, 0x0e, 0x7b, 0xcc, 0x81, 0x9b, 0x5a, 0xfe, 0xaf, 0x86, 0x0c, 0x01, 0x6e, 0xf1, 0x25, 0xbd, 0x08, 0xa6, 0xcb, 0x8b, 0xcd, 0xf3, 0xb9, 0x3a, 0x51, 0xdc, 0xad, 0xb2, 0xf6, 0x8c, 0x8c, 0xc3, 0x77, 0x55, 0x14, 0x28, 0x2a, 0xff, 0x75, 0x67, 0xec, 0x65, 0xf2, 0x70, 0xd0, 0x2b, 0xeb, 0x95, 0xfb, 0x8f, 0xac, 0x24, 0x09, 0x5e, 0x17, 0x06, 0xe4, 0x8b, 0x52, 0x48, 0x65, 0xbc, 0x14, 0x46, 0x1d, 0x3e, 0xce, 0x8c, 0x50, 0x1c, 0x3d, 0x80, 0x2a, 0xde, 0x98, 0x5a, 0xe9, 0x5c, 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x99, 0x65, 0x4a, 0xe8, 0xd2, 0xf7, 0x52, 0x2e, 0x17, 0xed, 0xbc, 0x2f, 0x51, 0xce, 0x15, 0xcb, 0xcd, 0x36, 0x6f, 0x49, 0x39, 0xcb, 0x53, 0xc3, 0xb7, 0x70, 0x81, 0xf4, 0xa7, 0x37, 0x50, 0x05, 0x4e, 0x00, 0xb3, 0x0b, 0xa2, 0xfe, 0x58, 0xf6, 0xf0, 0x2e, 0x36, 0xa8, 0x62, 0x54, 0x23, 0x97, 0xdb, 0xa6, 0xa3, 0xcd, 0x22, 0x77, 0x70, 0x88, 0x19, 0xe7, 0x8a, 0x2d, 0x87, 0x6a, 0x23, 0xa5, 0xa2, 0x69, 0xd7, 0x75 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 13.7", + /* Message to be signed */ + 71, + { 0x40, 0x31, 0xe0, 0xde, 0xf4, 0xf3, 0xd1, 0xad, 0x9b, 0xc0, 0x82, 0x77, 0x0a, 0x88, 0xa1, 0xd9, 0xb4, 0xb7, 0x10, 0x75, 0x48, 0xcd, 0xf8, 0x46, 0x2b, 0x0b, 0xae, 0x3d, 0x99, 0x4d, 0x8e, 0xbc, 0x4d, 0xa0, 0x44, 0xb9, 0x05, 0xdd, 0x8e, 0xd9, 0x1a, 0x1d, 0xa6, 0x76, 0x72, 0x78, 0x22, 0x36, 0x0e, 0xe2, 0xb6, 0xd5, 0xe1, 0x2b, 0xb7, 0x03, 0x16, 0xd7, 0x9e, 0x8a, 0xbb, 0x82, 0xa6, 0x43, 0x44, 0xaf, 0xb3, 0xb2, 0x25, 0x88, 0x5c } +, + /* Signature */ + 129, + { 0x0b, 0xe5, 0xa6, 0xd0, 0x43, 0xbe, 0x5d, 0x27, 0xd1, 0xd5, 0x1d, 0x9e, 0x3a, 0xa6, 0x1d, 0x92, 0xc9, 0xd8, 0x43, 0x23, 0x11, 0x9b, 0x48, 0xc8, 0x4a, 0x80, 0x38, 0x97, 0x18, 0xd7, 0xa1, 0xaa, 0xf5, 0x7a, 0x9a, 0x0d, 0x21, 0x4f, 0x65, 0x06, 0x48, 0x48, 0x64, 0xdf, 0xae, 0x85, 0xdb, 0x7b, 0x84, 0x74, 0x07, 0x3a, 0x8f, 0x97, 0x7b, 0x42, 0xb5, 0x3b, 0x40, 0x7e, 0x44, 0xc7, 0xc6, 0x2b, 0x16, 0x8d, 0x1e, 0x77, 0x78, 0xf4, 0xf2, 0x78, 0x57, 0xbf, 0xba, 0x85, 0xdd, 0xdc, 0x8b, 0x0e, 0x9f, 0x0e, 0x9a, 0x5b, 0x6d, 0xe7, 0x1a, 0x04, 0x43, 0x72, 0x0e, 0x92, 0xbb, 0x88, 0xb0, 0x77, 0xcb, 0xa1, 0x5d, 0x3f, 0x6e, 0x2b, 0xe4, 0xd2, 0x7a, 0x7c, 0x50, 0x9c, 0x7d, 0xc0, 0x3f, 0x1f, 0xdd, 0x4f, 0xe3, 0x38, 0xa4, 0xe5, 0x45, 0xc4, 0x6c, 0x03, 0x45, 0x22, 0xcc, 0xc0, 0xd4, 0x5d, 0x4c } + +} +, +{ + "PKCS#1 v1.5 Signature Example 13.8", + /* Message to be signed */ + 64, + { 0x7f, 0xdc, 0x96, 0xa4, 0x56, 0x57, 0x74, 0x02, 0x9f, 0xff, 0xa9, 0x3b, 0x39, 0xf0, 0x5d, 0xee, 0x9f, 0x84, 0xfa, 0x89, 0x53, 0xfd, 0x0f, 0x63, 0x38, 0xc8, 0x1c, 0x9d, 0xec, 0x6c, 0xdd, 0x66, 0x1f, 0xfa, 0xb9, 0x6f, 0x0e, 0x08, 0xeb, 0x0b, 0x9b, 0xa9, 0xca, 0x5b, 0xe1, 0x7b, 0x57, 0xc4, 0xb4, 0x86, 0x8f, 0xd5, 0x34, 0x11, 0x54, 0xde, 0x50, 0x27, 0x71, 0x13, 0xc7, 0x18, 0x53, 0x41 } +, + /* Signature */ + 129, + { 0x1d, 0xd2, 0x1f, 0xa4, 0x95, 0xbe, 0x7c, 0x49, 0x0f, 0x98, 0x2f, 0x69, 0xea, 0xb1, 0x4e, 0x24, 0xda, 0xa0, 0x4b, 0xd1, 0x38, 0xb7, 0x14, 0x32, 0x49, 0xcd, 0xcc, 0xd7, 0x8c, 0xcf, 0xc9, 0x10, 0x6a, 0xca, 0xa0, 0x3e, 0xc8, 0x76, 0x69, 0x42, 0x32, 0x56, 0x6e, 0xc6, 0xca, 0xb9, 0x12, 0x28, 0x40, 0xf6, 0x69, 0xc8, 0x00, 0xf2, 0xee, 0x09, 0x2b, 0xb9, 0xb6, 0xcb, 0x2a, 0x45, 0x42, 0xa9, 0x0d, 0xe6, 0x04, 0xc4, 0xf1, 0x05, 0x00, 0x0a, 0x3a, 0x0d, 0xec, 0xcd, 0x3d, 0xd9, 0x7a, 0x32, 0x61, 0xfa, 0x38, 0x22, 0x7e, 0xb3, 0x81, 0xa1, 0xf8, 0xf2, 0x3b, 0x66, 0x65, 0xd2, 0x84, 0x80, 0xdf, 0xb7, 0x21, 0x17, 0x88, 0x2e, 0xd8, 0xdb, 0x25, 0xd7, 0x6d, 0xe4, 0x0d, 0xe2, 0xfb, 0xe7, 0x2d, 0xc3, 0x94, 0xec, 0x6f, 0xbd, 0xaa, 0x99, 0xc6, 0x4f, 0xad, 0xe7, 0x29, 0x78, 0xa5, 0x1f, 0xc4 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 13.9", + /* Message to be signed */ + 175, + { 0x63, 0x18, 0x32, 0xab, 0x19, 0x18, 0xcd, 0x02, 0x08, 0x28, 0xe4, 0x7a, 0xe2, 0xb4, 0x47, 0x6b, 0x14, 0x69, 0xf2, 0x72, 0xe3, 0x0e, 0x53, 0xe5, 0x96, 0xfb, 0xa2, 0x6b, 0x40, 0x29, 0x37, 0xdc, 0x44, 0xc2, 0xea, 0x57, 0x45, 0xc7, 0x9d, 0x2d, 0xc6, 0x4a, 0x10, 0xe1, 0x22, 0x5c, 0xa0, 0xb6, 0x92, 0x9d, 0x49, 0x54, 0xbc, 0x5d, 0x37, 0x40, 0x96,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0, 0x87, 0x32, 0x2d, 0x15, 0x36, 0xe4, 0x6b, 0x7d, 0xeb, 0xda, 0x80, 0x95, 0xf5, 0x5d, 0x1e, 0x12, 0xbc, 0x24, 0x42, 0xf4, 0x3b, 0x4d, 0x12, 0x8f, 0xee, 0x23, 0x1d, 0xcd, 0x6f, 0x8c, 0x37, 0xaa, 0x6b, 0xcf, 0x4f, 0xe7, 0xb5, 0xe0, 0xde, 0xa9, 0xc6, 0x70, 0x9d, 0x3d, 0x91, 0xf9, 0xe4, 0x2a, 0x53, 0x16, 0x8a, 0x16, 0xb6, 0xfe, 0x99, 0x7b, 0x5d, 0xfe, 0xba, 0xfb, 0x46, 0xed, 0x9a, 0xea, 0x5c, 0x66 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 13.10", + /* Message to be signed */ + 157, + { 0x8b, 0x04, 0x3d, 0x90, 0xda, 0xe3, 0x41, 0x66, 0x85, 0xd5, 0x3a, 0x5b, 0x4c, 0x3c, 0xc2, 0x54, 0xcd, 0xa0, 0xcb, 0xd2, 0x3b, 0x4e, 0x40, 0x8d, 0xe8, 0x20, 0xa4, 0xda, 0x7a, 0xde, 0x6d, 0xd9, 0x5d, 0x4e, 0x1a, 0x97, 0xe2, 0x31, 0x2c, 0x3e, 0x84, 0x26, 0x1e, 0xe0, 0xb6, 0xce, 0xfe, 0x60, 0xe6, 0xb0, 0x82, 0xfd, 0x59, 0x65, 0xef, 0xa1, 0x64, 0x8f, 0x4f, 0xae, 0x61, 0x60, 0x5f, 0xe3, 0x55, 0x33, 0x27, 0x00, 0x46, 0x96, 0x05, 0x26, 0x53, 0x47, 0xe6, 0x54, 0x7a, 0xea, 0x77, 0x5b, 0x85, 0x6e, 0x5a, 0x46, 0xc3, 0x41, 0xd2, 0x99, 0x52, 0xbb, 0xea, 0x92, 0x70, 0x49, 0x96, 0x3e, 0x37, 0x40, 0x20, 0x8c, 0xfb, 0x0b, 0x65, 0x28, 0x57, 0xb6, 0xf5, 0x2e, 0x36, 0x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1.5 Signature Example 13.11", + /* Message to be signed */ + 148, + { 0x3b, 0x28, 0xa6, 0x09, 0x2e, 0x47, 0x08, 0x98, 0xaf, 0x07, 0x0a, 0x08, 0x7c, 0x45, 0x53, 0x18, 0x8d, 0xe6, 0xc3, 0x44, 0xbb, 0x0b, 0x5f, 0xdc, 0x7f, 0x66, 0xfb, 0xc5, 0x2d, 0xc9, 0x3a, 0x8b, 0x92, 0xa3, 0x74, 0x11, 0x20, 0x37, 0xd6, 0xa4, 0x32, 0x86, 0x12, 0x8a, 0xce, 0xf9, 0x5a, 0x35, 0x05, 0xc0, 0xab, 0xb1, 0xaf, 0xa6, 0x2c, 0x48, 0xcb, 0x21, 0x36, 0x07, 0x7f, 0x8a, 0x0e, 0x0e, 0x0b, 0x5a, 0x4e, 0xe9, 0xb2, 0xc7, 0x7d, 0x7a, 0x0c, 0x0b, 0x53, 0xf3, 0x8a, 0x51, 0xcc, 0x3d, 0xb9, 0xb5, 0x83, 0xb3, 0xae, 0xc0, 0x7f, 0x1e, 0x22, 0x4f, 0xcb, 0x3f, 0x1d, 0xad, 0x19, 0x5e, 0x05, 0x86, 0x59, 0xa9, 0xd1, 0x1f, 0x8e, 0xdc, 0x74, 0x44, 0x99, 0x46, 0x86, 0xed, 0x62, 0xc9, 0x75, 0x66, 0xe9, 0xe0, 0x0c, 0xbf, 0x8f, 0x0d, 0xbc, 0x17, 0x16, 0xe6, 0xb7, 0xf0, 0xf8, 0x8f, 0xe8, 0x9a, 0x86, 0x7a, 0x41, 0xd6, 0x43, 0x13, 0x5a, 0xd8, 0xb1, 0x8a, 0xa1, 0x43, 0xe7, 0x37, 0x5d, 0xf1, 0x95, 0x29 } +, + /* Signature */ + 129, + { 0x32, 0x62, 0xfe, 0x17, 0xe4, 0x4e, 0x5e, 0xcc, 0x84, 0x31, 0x70, 0xd3, 0xae, 0x27, 0x51, 0xda, 0x1f, 0x48, 0xd6, 0xe9, 0x61, 0xd8, 0x1e, 0x93, 0x59, 0xb0, 0x98, 0x2c, 0x6d, 0x61, 0x30, 0x8e, 0xba, 0xcf, 0xe2, 0x60, 0x7c, 0x53, 0x8c, 0x17, 0x0c, 0xe0, 0xe7, 0x2a, 0x07, 0xbc, 0x01, 0x48, 0x7b, 0x29, 0x5c, 0x36, 0xb8, 0xe2, 0x2a, 0xfd, 0xf6, 0xe7, 0xfe, 0x39, 0xc0, 0x3a, 0x5c, 0x0c, 0x36, 0x61, 0x06, 0x1f, 0x23, 0xfb, 0xf5, 0x89, 0x0e, 0xad, 0x59, 0xf8, 0x72, 0xc9, 0x46, 0xcc, 0xe0, 0xf8, 0x16, 0xc9, 0xed, 0x3a, 0x2c, 0x1e, 0x11, 0xf8, 0xf7, 0x4d, 0xa1, 0xe9, 0x7a, 0x39, 0x0d, 0x53, 0x4d, 0x78, 0x55, 0x78, 0xa2, 0x45, 0x5f, 0xcd, 0x87, 0x47, 0x83, 0xf4, 0x57, 0x2a, 0x15, 0xf4, 0x93, 0x7d, 0xca, 0x98, 0x09, 0x3f, 0xd0, 0xe9, 0x99, 0x0a, 0xf0, 0x00, 0x52, 0x56, 0xbf } + +} +, +{ + "PKCS#1 v1.5 Signature Example 13.12", + /* Message to be signed */ + 52, + { 0x4f, 0xdd, 0x6a, 0x36, 0x31, 0xdd, 0xd4, 0xbc, 0x3c, 0x76, 0x07, 0x19, 0x02, 0xa2, 0x27, 0xfd, 0x5b, 0x36, 0x53, 0xb1, 0xf9, 0x70, 0xf2, 0xb7, 0x67, 0xef, 0x55, 0x4e, 0x1c, 0x75, 0xca, 0xde, 0x81, 0x9d, 0x8d, 0x1f, 0xca, 0x76, 0xbc, 0x10, 0x54, 0x1c, 0xbf, 0x8b, 0x1d, 0x8b, 0x0e, 0x72, 0x55, 0xf9, 0x57, 0x40 } +, + /* Signature */ + 129, + { 0x29, 0xcb, 0xa5, 0xb4, 0x3f, 0xa3, 0x56, 0x57, 0x75, 0x89, 0x34, 0x91, 0xb1, 0x18, 0x57, 0x8b, 0x14, 0xb5, 0xfa, 0x1e, 0xeb, 0xe0, 0xc8, 0x07, 0x59, 0xa6, 0xd1, 0x91, 0xe7, 0xc2, 0x13, 0x1e, 0xe1, 0x0a, 0xc5, 0xb9, 0xb8, 0xae, 0x1a, 0xa7, 0xd6, 0x96, 0xc9, 0x84, 0x88, 0xa3, 0x5c, 0xdf, 0xa2, 0xaa, 0x00, 0x6d, 0x91, 0xbf, 0x7e, 0x05, 0xa5, 0xc1, 0x90, 0x9e, 0xfb, 0x20, 0xda, 0xbc, 0x82, 0x13, 0x3b, 0x62, 0x64, 0xc0, 0x42, 0x18, 0x0c, 0x2c, 0xca, 0x65, 0x45, 0x9f, 0x66, 0xcc, 0x7e, 0xb1, 0xba, 0x75, 0xd1, 0x5d, 0x4f, 0x56, 0xc7, 0x52, 0x8a, 0xab, 0x28, 0x38, 0xe6, 0x79, 0x53, 0x7a, 0x4c, 0x8d, 0xcd, 0x37, 0xd4, 0xb4, 0xca, 0x82, 0x5c, 0xe1, 0x65, 0xfa, 0x4a, 0x97, 0x15, 0x82, 0x44, 0xdc, 0x87, 0xc0, 0x61, 0xfb, 0x12, 0x00, 0x1e, 0x55, 0x33, 0xfb, 0xd4, 0xcc, 0x62 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 13.13", + /* Message to be signed */ + 169, + { 0x59, 0x0c, 0xd2, 0x30, 0x50, 0xe5, 0x7b, 0x28, 0xd5, 0xc2, 0x18, 0x5e, 0xad, 0x60, 0xb1, 0xe9, 0x52, 0x9f, 0x2b, 0xd5, 0x26, 0x13, 0xeb, 0x03, 0xf6, 0xed, 0x1a, 0xef, 0xa4, 0xa6, 0x72, 0x88, 0xd5, 0xa3, 0xa3, 0x4f, 0xd9, 0x5c, 0xa6, 0x38, 0x94, 0xaf, 0x3a, 0x40, 0xcd, 0x68, 0x87, 0x3a, 0x1f, 0x37, 0xe3, 0x54, 0xd3, 0x04, 0x14, 0x29, 0x7b, 0x19, 0x25, 0x4b, 0xc6, 0xc1, 0xa3, 0xf7, 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, 0x6b, 0x39, 0x7c, 0x4c, 0x9c, 0x68, 0x00, 0x70, 0x5d, 0x2f, 0xc0, 0xc5, 0x48, 0x64, 0x5e, 0x11, 0xb9, 0xd8, 0xd5, 0x12, 0xb2, 0xdd, 0x9b, 0xf5, 0x9f, 0x3d, 0xc5, 0xd1, 0x1c, 0x3c, 0x77, 0x3d, 0x59, 0xcc, 0xbe, 0xd9, 0xe6, 0xbc, 0x14, 0x32, 0x09, 0x10, 0xcd, 0xf8, 0x3b, 0x46, 0x59, 0x01, 0xb7, 0x46, 0xb5, 0x96, 0x74 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 13.14", + /* Message to be signed */ + 66, + { 0x80, 0x8c, 0xb9, 0x76, 0x13, 0xfd, 0x87, 0x85, 0x35, 0x80, 0x1c, 0x80, 0x08, 0x79, 0x15, 0x10, 0xa5, 0xfe, 0x86, 0x6a, 0xd5, 0xb6, 0x84, 0x3a, 0x6e, 0x00, 0x19, 0xa0, 0xfc, 0xc2, 0x17, 0x76, 0x03, 0x54, 0xf6, 0x0c, 0xc6, 0x99, 0xfb, 0xbe, 0x1a, 0xdf, 0xe8, 0xb0, 0x0e, 0xcd, 0x6a, 0x36, 0xa2, 0xb5, 0xa5, 0xa1, 0xfa, 0xa2, 0x3d, 0x34, 0x38, 0x20, 0x02, 0x4e, 0x3a, 0x31, 0x97, 0xae, 0x67, 0x3c } +, + /* Signature */ + 129, + { 0x1c, 0x53, 0x96, 0x59, 0xf8, 0x72, 0x46, 0x99, 0x16, 0xfb, 0x00, 0x07, 0xef, 0x9e, 0x48, 0x57, 0x4e, 0x96, 0x4e, 0x4c, 0x0e, 0x6a, 0x2f, 0xa7, 0x4b, 0x13, 0x73, 0xfd, 0x60, 0xb6, 0x64, 0xa7, 0x98, 0xac, 0x81, 0x29, 0xc0, 0x8c, 0x12, 0xcd, 0xbf, 0x37, 0x49, 0x75, 0x0b, 0xe1, 0x25, 0x60, 0x2a, 0x71, 0x54, 0x32, 0x67, 0x67, 0x32, 0x7e, 0x92, 0xba, 0x57, 0xb5, 0xe2, 0x89, 0xb5, 0xac, 0x9d, 0x77, 0x71, 0xb4, 0x52, 0x0a, 0x7a, 0x2c, 0xe6, 0x6c, 0x5e, 0xaf, 0x70, 0x4a, 0xfc, 0x5a, 0x19, 0x0f, 0xa6, 0x0b, 0xe1, 0x37, 0x6f, 0x94, 0x3d, 0x2b, 0xaf, 0x70, 0x52, 0x3e, 0x47, 0xc3, 0xde, 0xfc, 0x0a, 0x25, 0xa6, 0x00, 0x18, 0x31, 0xa3, 0x7a, 0xab, 0x0c, 0xf1, 0xf6, 0x48, 0x7b, 0xe3, 0x7f, 0x0e, 0x31, 0xca, 0x7d, 0xb5, 0xac, 0x41, 0xb5, 0x63, 0x09, 0x57, 0x55, 0x93, 0x69, 0xff } + +} +, +{ + "PKCS#1 v1.5 Signature Example 13.15", + /* Message to be signed */ + 202, + { 0x57, 0xed, 0xaa, 0x05, 0x66, 0x25, 0x16, 0x86, 0xf6, 0x52, 0x05, 0xef, 0xc6, 0x26, 0x60, 0xe2, 0xc2, 0xe0, 0x4f, 0xa5, 0xea, 0xa3, 0x30, 0x2d, 0xe8, 0x7a, 0x3f, 0x6b, 0x49, 0x1f, 0x7f, 0xa3, 0xac, 0x72, 0x70, 0xcc, 0x76, 0x75, 0x1a, 0x43, 0x69, 0x42, 0xac, 0x76, 0x5e, 0xf5, 0xf4, 0x74, 0x91, 0x62, 0xd7, 0xe7, 0x97, 0x12, 0x6b, 0xcb, 0x8f, 0xda, 0xc1, 0x9c, 0xf1, 0x8d, 0xcc, 0x6e, 0xff, 0x48, 0x59, 0x3c, 0x05, 0xc8, 0x89, 0x3b, 0x59, 0x1a, 0x51, 0x33, 0x2f, 0xa2, 0x6a, 0xb8, 0x63, 0xc5, 0xea, 0xa4, 0xd7, 0x51, 0xe8, 0xd1, 0xb1, 0x9c, 0x58, 0x26, 0x90, 0xb5, 0x41, 0x5e, 0x6a, 0x89, 0xe0, 0x5f, 0x23, 0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xb3, 0xea, 0x79, 0x12, 0x4a, 0xad, 0x78, 0x97, 0xe3, 0xa4, 0x34, 0xde, 0xe7, 0x92, 0x63, 0x71, 0xde, 0x2d, 0x6d, 0x23, 0x7e, 0x89, 0xb0, 0x3b, 0x8d, 0xd7, 0x09, 0x60, 0x58, 0xe2, 0xa4, 0xb3, 0x2c, 0xb5, 0x57, 0xc7, 0xad, 0xa2, 0x98, 0xa7, 0xe2, 0xed, 0xd3, 0xa3, 0xa3, 0xb5, 0x29, 0xb4, 0xd2 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 13.16", + /* Message to be signed */ + 99, + { 0x08, 0x33, 0x76, 0xbb, 0x82, 0x21, 0x2b, 0xf8, 0x80, 0xbe, 0x12, 0x85, 0x65, 0x3a, 0xf2, 0xca, 0xd6, 0x25, 0xc5, 0x2e, 0x94, 0xe3, 0x21, 0x43, 0x68, 0x77, 0xf7, 0x25, 0xa8, 0x3b, 0xbd, 0x43, 0xf4, 0x48, 0x6d, 0x89, 0x6c, 0xf6, 0x7e, 0x31, 0x39, 0x1b, 0x87, 0x06, 0xf8, 0xc0, 0xf8, 0xf4, 0xbb, 0x1d, 0xdb, 0xa9, 0x5c, 0x33, 0x2f, 0x03, 0x4f, 0x39, 0x09, 0x11, 0x3f, 0x65, 0x56, 0x92, 0x60, 0xa2, 0xe4, 0xf1, 0x04, 0x06, 0x65, 0x7c, 0x99, 0xfa, 0xff, 0x00, 0x1f, 0xe1, 0x6e, 0xbb, 0x89, 0x6e, 0x9e, 0x18, 0x11, 0x5a, 0xf1, 0xd4, 0x98, 0x6c, 0x85, 0x79, 0xab, 0x56, 0x52, 0xcc, 0xca, 0x47, 0x74 } +, + /* Signature */ + 129, + { 0x2a, 0xf4, 0x6c, 0x00, 0xd1, 0xd9, 0x15, 0x94, 0x1e, 0x21, 0x2a, 0x7b, 0x8d, 0x81, 0x05, 0xee, 0x0f, 0x0e, 0xc4, 0x80, 0xff, 0xfb, 0xb4, 0xf1, 0x3b, 0xf2, 0x8d, 0x73, 0xe2, 0xb3, 0x19, 0xb9, 0x84, 0xa7, 0xb7, 0xc8, 0x36, 0x7a, 0xdc, 0xa7, 0xab, 0x12, 0xaa, 0xf5, 0x3a, 0xcb, 0x98, 0xd0, 0xcb, 0x54, 0xee, 0x34, 0x20, 0x4c, 0x90, 0x8e, 0x60, 0xc7, 0xc7, 0x9e, 0xfb, 0x42, 0xc3, 0x11, 0x4a, 0x02, 0x58, 0x9e, 0x1a, 0xe6, 0xaf, 0xb5, 0x97, 0x53, 0x54, 0x57, 0x8c, 0x14, 0x35, 0xec, 0xc8, 0x9c, 0x11, 0x6e, 0x90, 0x26, 0xb6, 0xbc, 0x88, 0x9e, 0xe2, 0x88, 0xae, 0x4d, 0xaf, 0x03, 0x47, 0xcc, 0xce, 0xfc, 0x5d, 0xfd, 0x1e, 0xf8, 0x3c, 0xb8, 0x68, 0x52, 0xee, 0xff, 0xd8, 0x40, 0x98, 0x59, 0x9b, 0x72, 0x5b, 0xf6, 0x02, 0xee, 0x62, 0x0b, 0xdf, 0x44, 0xaf, 0xbd, 0x84, 0xc0, 0xcd } + +} +, +{ + "PKCS#1 v1.5 Signature Example 13.17", + /* Message to be signed */ + 17, + { 0x8c, 0x87, 0x4c, 0xd0, 0xce, 0x33, 0x51, 0x39, 0xc0, 0x8d, 0x76, 0x0b, 0x82, 0x5e, 0xb9, 0x90, 0x5d } +, + /* Signature */ + 129, + { 0x66, 0x9a, 0x8a, 0xd7, 0xcb, 0x81, 0xef, 0x21, 0x87, 0xf5, 0xa8, 0x56, 0x47, 0x68, 0x4b, 0x72, 0x48, 0x4a, 0xff, 0x27, 0x9f, 0x0a, 0xf3, 0x54, 0x35, 0x86, 0x7c, 0xc2, 0xb0, 0x43, 0x33, 0xa1, 0x96, 0xec, 0xa6, 0xcf, 0x44, 0xa9, 0x7a, 0x1b, 0xd3, 0x9d, 0x0f, 0x6a, 0x0f, 0xf9, 0x59, 0x57, 0x02, 0x83, 0x5b, 0xc8, 0x0a, 0x72, 0xd7, 0x14, 0x04, 0xef, 0x3f, 0x46, 0xfa, 0x3b, 0x0d, 0x20, 0xe8, 0x6d, 0x7a, 0x1d, 0x5f, 0x7e, 0xfc, 0x3f, 0x3b, 0x8e, 0x8a, 0x7e, 0x37, 0xe8, 0x7e, 0x27, 0xa9, 0x9f, 0xeb, 0xa9, 0x6a, 0xd8, 0x13, 0x20, 0xbe, 0x8f, 0xff, 0x78, 0x55, 0x7d, 0x07, 0xbf, 0xba, 0xe2, 0x16, 0x03, 0xa1, 0x36, 0x8c, 0xaf, 0xa5, 0xae, 0x1d, 0x1b, 0x63, 0x0a, 0xa2, 0x1f, 0xf2, 0x0e, 0x45, 0x85, 0x65, 0x0a, 0x77, 0x3d, 0x7e, 0x2f, 0x5e, 0x7f, 0x51, 0x72, 0x97, 0x19, 0x3c } + +} +, +{ + "PKCS#1 v1.5 Signature Example 13.18", + /* Message to be signed */ + 102, + { 0xcb, 0x3e, 0x61, 0x21, 0xd3, 0x8b, 0x7d, 0x97, 0xe1, 0x8b, 0xa1, 0x5c, 0x49, 0x3d, 0x1a, 0xc3, 0x2e, 0x9d, 0x2e, 0xf4, 0xe3, 0xbd, 0x16, 0xdf, 0x9c, 0x67, 0xe4, 0xa1, 0x96, 0xe9, 0x24, 0x7a, 0x8d, 0x0c, 0x24, 0xb2, 0x1c, 0x4a, 0xb2, 0x3e, 0x77, 0xd6, 0xdb, 0x11, 0x7d, 0x59, 0x11, 0x95, 0xbb, 0xaf, 0x44, 0x66, 0x82, 0x5f, 0x63, 0x97, 0x8f, 0x11, 0x40, 0x85, 0x28, 0x1b, 0x79, 0xae, 0xa3, 0x7e, 0x32, 0xc6, 0xb3, 0x6c, 0x1e, 0x9d, 0xdd, 0x4a, 0xd1, 0x23, 0x6e, 0x97, 0xfd, 0x42, 0x7b, 0x4d, 0x97, 0x6e, 0x07, 0x64, 0x9d, 0xca, 0x4f, 0x33, 0xa8, 0x9c, 0x46, 0xfb, 0x8c, 0x00, 0xb4, 0x26, 0x7b, 0x14, 0x47, 0x04 } +, + /* Signature */ + 129, + { 0x56, 0x84, 0x17, 0x80, 0x3a, 0x40, 0x0e, 0x9d, 0x05, 0x0a, 0x43, 0x20, 0xae, 0x7b, 0x7d, 0x8d, 0x24, 0x8e, 0x16, 0x36, 0x50, 0x86, 0x9d, 0x9f, 0xdd, 0x10, 0x0c, 0xc1, 0xa6, 0xb9, 0xbc, 0x29, 0x1c, 0x3f, 0x23, 0xf1, 0x25, 0x60, 0x03, 0x16, 0x4f, 0x61, 0x9d, 0xbc, 0x78, 0x63, 0x5e, 0xbd, 0xf0, 0x89, 0x49, 0x0a, 0xfa, 0x5a, 0xa0, 0x0b, 0x6f, 0x97, 0xeb, 0x06, 0x36, 0xc3, 0xbb, 0xa8, 0x9d, 0x86, 0x36, 0x0a, 0xfe, 0x26, 0x00, 0x43, 0xd8, 0x61, 0xa7, 0x4f, 0x64, 0xc7, 0x1d, 0x9c, 0xbd, 0x31, 0xea, 0xe2, 0x39, 0x3a, 0x1a, 0xf1, 0x56, 0x1f, 0x1a, 0xb9, 0x2c, 0xaa, 0x76, 0xdd, 0x1e, 0x76, 0xab, 0x23, 0x33, 0x09, 0x8c, 0x83, 0xc2, 0xd9, 0x9f, 0xae, 0x82, 0x73, 0x98, 0x75, 0x80, 0x05, 0xc1, 0x76, 0xcb, 0xc4, 0xa2, 0xe2, 0x2e, 0xfa, 0x0e, 0x6c, 0x12, 0xf4, 0xe3, 0x42, 0x81 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 13.19", + /* Message to be signed */ + 81, + { 0x21, 0x9a, 0x2f, 0x8d, 0x0b, 0x00, 0x0a, 0xed, 0xb5, 0xf1, 0x85, 0x45, 0x5e, 0xd3, 0xea, 0x09, 0x4c, 0x45, 0x42, 0x6b, 0x28, 0x5b, 0xab, 0x4a, 0x07, 0xcf, 0x3d, 0x0a, 0x29, 0x06, 0xf3, 0xe2, 0x03, 0x18, 0x4c, 0x2d, 0x3d, 0x81, 0xa8, 0x09, 0xb8, 0x9c, 0x9f, 0xc4, 0x8b, 0xc9, 0xaf, 0x9a, 0xb3, 0x2f, 0x84, 0xf1, 0x5d, 0x81, 0x38, 0x9c, 0x4e, 0xdb, 0x0a, 0xc6, 0x8a, 0xd0, 0x95, 0x02, 0xe3, 0xf3, 0x0c, 0x7c, 0xf6, 0x45, 0x10, 0x29, 0x54, 0xb2, 0x97, 0xc8, 0x66, 0x14, 0x66, 0xfc, 0x10 } +, + /* Signature */ + 129, + { 0x03, 0x83, 0x5d, 0x90, 0x57, 0xe2, 0xb8, 0x21, 0xdc, 0x4c, 0x6e, 0xac, 0xa3, 0xf4, 0x15, 0x6a, 0x56, 0x55, 0x0b, 0x6f, 0x9d, 0x74, 0x00, 0xfc, 0x5c, 0x51, 0x95, 0xa4, 0xae, 0xe4, 0x71, 0x7d, 0xf3, 0x29, 0x29, 0x12, 0x2b, 0x43, 0x27, 0x3a, 0x07, 0x9a, 0x24, 0xf9, 0x9d, 0xd9, 0xe7, 0xc3, 0x40, 0x56, 0xae, 0xa4, 0xfc, 0x4e, 0x45, 0x7d, 0x83, 0x14, 0xef, 0x34, 0x42, 0x7f, 0x8e, 0x20, 0x4b, 0x81, 0xbb, 0x49, 0x03, 0xfb, 0x3e, 0x77, 0x9e, 0x38, 0x9e, 0x41, 0x33, 0x90, 0x68, 0xc1, 0x57, 0xd9, 0xb0, 0x9f, 0x2c, 0x5e, 0x99, 0xcc, 0x54, 0xe6, 0xef, 0x86, 0xee, 0xac, 0x0e, 0x19, 0xf4, 0x4e, 0x33, 0xe7, 0x07, 0xc4, 0x26, 0x1a, 0x0a, 0x83, 0xce, 0xb4, 0x22, 0xf2, 0xe0, 0x6b, 0xcc, 0xae, 0x3b, 0x8b, 0xba, 0x42, 0x8d, 0x75, 0x57, 0x15, 0x2f, 0x40, 0x84, 0x6e, 0xc0, 0x11, 0x34 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 13.20", + /* Message to be signed */ + 97, + { 0xe3,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, 0xa8, 0x29, 0x79, 0x68, 0xd4, 0x0b, 0xc7, 0x06, 0x82, 0xeb, 0xae, 0xa4, 0x48, 0x52, 0x5d, 0xbe, 0xe1, 0x6b, 0x03, 0xbd, 0x0b, 0x65, 0x26, 0xd0, 0x98, 0xd0, 0x9b, 0x6b, 0xad, 0x9a, 0xba, 0x03, 0x93, 0x05, 0xe2, 0xab, 0x79, 0x69, 0x02, 0x08, 0x65, 0x80, 0xcc, 0xf0 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 14: A 1536-bit RSA key pair", +{ + /* Modulus */ + 192, + { 0xd8, 0x70, 0xa7, 0x76, 0xcd, 0x13, 0xed, 0x44, 0x3d, 0xf3, 0x99, 0x08, 0xbe, 0xe2, 0xca, 0xd7, 0x3c, 0x48, 0x5f, 0xd9, 0xbf, 0x06, 0x32, 0x13, 0x22, 0x88, 0x7f, 0xbe, 0x65, 0x5c, 0x08, 0xcb, 0xe4, 0xc8, 0xf6, 0x3e, 0x25, 0x4f, 0xc9, 0x1c, 0x75, 0xf0, 0x55, 0x7d, 0x90, 0x1d, 0x43, 0x5b, 0x0e, 0x8d, 0xed, 0x82, 0xd4, 0x91, 0x73, 0x41, 0x4d, 0x29, 0x86, 0x03, 0x24, 0xe4, 0x6c, 0x1b, 0x03, 0x0d, 0xfe, 0xaa, 0x29, 0xd8, 0x0f, 0x98, 0x98, 0xc2, 0xc5, 0xe1, 0x01, 0xcb, 0xf6, 0xda, 0xa0, 0x62, 0x89, 0x78, 0xd4, 0x15, 0xb5, 0x02, 0xde, 0xa2, 0x6d, 0xe6, 0x56, 0x1c, 0x79, 0xab, 0x06, 0x5c, 0x6d, 0xca, 0x6a, 0xbc, 0x4d, 0x4d, 0x4d, 0x5e, 0x9f, 0x5c, 0x74, 0xcb, 0x3e, 0x6a, 0x5a, 0xf7, 0x1d, 0x1f, 0x90, 0xfa, 0x5e, 0xaa, 0x1b, 0xe0, 0xca, 0x94, 0x7a, 0x70, 0xa3, 0x9e, 0xfd, 0x31, 0x5c, 0x4d, 0xf2, 0x1a, 0x1a, 0x82, 0x1c, 0xaa, 0xff, 0x8d, 0xcb, 0xad, 0x13, 0xb2, 0x9c, 0x7e, 0x82, 0xaa, 0xd5, 0x3c, 0x64, 0xf5, 0x82, 0xec, 0x9e, 0xc3, 0x1e, 0x6b, 0xde, 0x82, 0xea, 0x5a, 0x5f, 0x4c, 0xcc, 0xf0, 0xc4, 0x57, 0xb8, 0x88, 0xf1, 0x55, 0x0c, 0x4f, 0xf8, 0xe1, 0xc1, 0x78, 0xa7, 0x6a, 0x46, 0xc1, 0x96, 0xf4, 0xbe, 0xf5, 0x9e, 0x61, 0xdd, 0x94, 0x4e, 0x47 } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 192, + { 0x05, 0x88, 0x8f, 0xc7, 0x7a, 0x43, 0xbd, 0xa7, 0xa6, 0x7b, 0xd1, 0x58, 0x47, 0x65, 0x0d, 0xf1, 0x85, 0xc1, 0x85, 0xed, 0xcf, 0xb3, 0xed, 0x58, 0xce, 0xe3, 0xb5, 0x7c, 0x5d, 0x24, 0x06, 0xb7, 0x8b, 0xc0, 0x55, 0x87, 0x4e, 0x35, 0xe5, 0x7a, 0xdc, 0x4b, 0x0a, 0x2c, 0x7d, 0x20, 0x3a, 0x66, 0x1c, 0x0f, 0xa5, 0xd8, 0x57, 0xed, 0xe6, 0x07, 0xef, 0xdc, 0x95, 0x68, 0x04, 0x2b, 0xf0, 0xd5, 0x99, 0xf4, 0xe4, 0x23, 0x5e, 0x91, 0x7f, 0x08, 0x94, 0x33, 0x3a, 0x92, 0xdf, 0x94, 0x62, 0xd9, 0xc1, 0x0a, 0xf3, 0xdf, 0xca, 0x70, 0x49, 0xa1, 0xea, 0xa6, 0x35, 0x70, 0x13, 0x98, 0x83, 0xc5, 0xbe, 0xfe, 0xbe, 0xe4, 0xe2, 0x21, 0x89, 0x43, 0xd3, 0x0f, 0xc6, 0x45, 0xff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b0, 0x8d } +, + /* Prime 2 */ + 96, + { 0xd8, 0xd0, 0x67, 0x64, 0xc1, 0xf7, 0x64, 0x54, 0xc6, 0x8a, 0x3a, 0x08, 0x1e, 0x95, 0xd7, 0x47, 0xc2, 0x94, 0x11, 0xad, 0xc4, 0x03, 0xa7, 0xcb, 0x71, 0xb4, 0x3a, 0xf5, 0x05, 0xca, 0xbe, 0x41, 0xb4, 0x9c, 0x97, 0x1c, 0x13, 0xad, 0x65, 0x63, 0xb8, 0xc9, 0x0b, 0x93, 0xb5, 0x89, 0x79, 0xbb, 0x74, 0xf8, 0x20, 0xef, 0xb8, 0xde, 0xd8, 0x1f, 0x46, 0x30, 0x54, 0xa7, 0x7f, 0xb3, 0x0b, 0xb0, 0x99, 0x98, 0x51, 0xa4, 0x3c, 0xcd, 0x01, 0x69, 0x18, 0x51, 0x31, 0xf7, 0x43, 0x1b, 0x02, 0xe9, 0xc6, 0xb9, 0xf8, 0x38, 0x71, 0xd9, 0xcd, 0x5e, 0x0c, 0x3c, 0x58, 0x70, 0xcf, 0x97, 0x97, 0x23 } +, + /* Prime exponent 1 */ + 96, + { 0xe8, 0xd6, 0x15, 0xf4, 0x04, 0x7a, 0xaa, 0x51, 0xaa, 0xb8, 0x8e, 0x27, 0x94, 0xa3, 0x0b, 0xd3, 0x3d, 0x71, 0xd0, 0x4d, 0x9e, 0x4e, 0x43, 0xd2, 0x7f, 0x25, 0x45, 0x8d, 0x2a, 0x79, 0xb5, 0x4f, 0xc2, 0x8f, 0x95, 0xa9, 0x14, 0xe3, 0x1e, 0xa3, 0xee, 0xb3, 0x11, 0x42, 0x60, 0x40, 0x32, 0x7b, 0xa3, 0x5c, 0xc4, 0x94, 0x45, 0x47, 0x52, 0x51, 0xdc, 0x53, 0x78, 0xc3, 0x6d, 0x3b, 0x57, 0xf5, 0x10, 0x1c, 0xd0, 0x3e, 0xb1, 0x5a, 0xfb, 0x75, 0x06, 0x90, 0x3f, 0x25, 0x40, 0xb3, 0x55, 0x04, 0x6b, 0x74, 0x06, 0xca, 0x09, 0x40, 0x41, 0x56, 0x49, 0x45, 0xf3, 0xbe, 0xbf, 0x7d, 0x2d, 0xe9 } +, + /* Prime exponent 2 */ + 96, + { 0x73, 0x5d, 0xb1, 0x26, 0x73, 0xef, 0x67, 0x7b, 0x94, 0x89, 0x48, 0x87, 0xb9, 0x7e, 0x91, 0xa6, 0xa5, 0x6a, 0x94, 0x5d, 0x99, 0xc7, 0x38, 0x29, 0x90, 0xbf, 0x0e, 0x00, 0x02, 0xac, 0xf6, 0xbf, 0x8f, 0x93, 0x22, 0xf4, 0xd5, 0xa3, 0x96, 0x27, 0x91, 0xd3, 0xa8, 0x4d, 0x58, 0x73, 0x66, 0x4a, 0xd0, 0xda, 0x96, 0xeb, 0xf7, 0xba, 0xdb, 0xd5, 0x08, 0x4b, 0xff, 0x3f, 0x81, 0x3b, 0x8c, 0x24, 0xd4, 0x15, 0xb0, 0x9b, 0x6b, 0x9e, 0xc9, 0xf9, 0x59, 0xef, 0x1a, 0x5f, 0x2f, 0x5d, 0xd8, 0x16, 0xfc, 0x9f, 0x47, 0xed, 0x00, 0xe7, 0x9b, 0xd7, 0x47, 0x3b, 0x74, 0xf3, 0xd2, 0x02, 0x1f, 0x71 } +, + /* Coefficient */ + 96, + { 0x10, 0x62, 0x18, 0xaf, 0x97, 0x1d, 0x92, 0x95, 0x91, 0x59, 0x90, 0xa4, 0xed, 0x3e, 0x09, 0xd3, 0x63, 0xdb, 0x33, 0x06, 0xb0, 0x90, 0xa1, 0x33, 0xeb, 0xd7, 0x54, 0xe2, 0xbd, 0x77, 0x6b, 0x25, 0x85, 0x99, 0x9d, 0x4f, 0x88, 0x43, 0x03, 0x0a, 0xc7, 0x0c, 0x0f, 0xf5, 0xde, 0x52, 0x12, 0x67, 0x22, 0x34, 0xc0, 0x07, 0xce, 0x74, 0x56, 0x4c, 0x79, 0x1e, 0xdc, 0xd5, 0x76, 0xf9, 0x68, 0x44, 0x04, 0x8c, 0xfa, 0x66, 0x36, 0x46, 0xb8, 0xfd, 0x80, 0xc7, 0x51, 0x26, 0xb2, 0x26, 0x6e, 0x48, 0xf1, 0xfa, 0xa7, 0x05, 0x44, 0xad, 0x42, 0x04, 0xfd, 0x61, 0x56, 0x29, 0x2e, 0x51, 0x6e, 0x13 } + +} +, +{{ + "PKCS#1 v1.5 Signature Example 14.1", + /* Message to be signed */ + 135, + { 0xf7, 0xa3, 0xc6, 0x7e, 0x92, 0xa7, 0x87, 0xf3, 0x5d, 0xcc, 0x47, 0xae, 0xd7, 0xd6, 0xb6, 0x19, 0x29, 0x67, 0xbd, 0xfd, 0x00, 0xa6, 0xac, 0xbf, 0x6f, 0x7e, 0xfe, 0x46, 0xd3, 0xac, 0xae, 0xd9, 0x78, 0x8a, 0xa4, 0xf1, 0xdb, 0x18, 0x44, 0x02, 0x24, 0x9f, 0x9a, 0xce, 0xfc, 0x1c, 0x7d, 0xfb, 0x1e, 0x69, 0x0d, 0x24, 0x73, 0x8d, 0xe8, 0x6f, 0xa5, 0xb5, 0x25, 0x0f, 0x97, 0x9e, 0xbd, 0x8f, 0x77, 0x8e, 0xec, 0x0d, 0x7f, 0xcf, 0x73, 0x1f, 0xa2, 0x25, 0x08, 0x6c, 0x86, 0x65, 0x64, 0xed, 0x3e, 0xb1, 0x54, 0xdd, 0x45, 0x8d, 0x05, 0x00, 0x28, 0x2f, 0x86, 0x80, 0x48, 0x87, 0xd4, 0x43, 0x5e, 0xda, 0x9a, 0x44, 0x36, 0xa8, 0xe9, 0x23, 0xa2, 0x0c, 0xb4, 0xb4, 0xd0, 0xe8, 0x1c, 0x91, 0x11, 0x4b, 0xdc, 0x06, 0x82, 0x27, 0x8e, 0xc2, 0x58, 0x86, 0x07, 0x99, 0xb5, 0x9c, 0x94, 0x36, 0xf4, 0x3a, 0x53, 0xca, 0xb4, 0xc4, 0xcd } +, + /* Signature */ + 192, + { 0x09, 0xd1, 0x43, 0x5b, 0xf5, 0xa9, 0xc1, 0x72, 0x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, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Signature Example 14.2", + /* Message to be signed */ + 131, + { 0x2a, 0x13, 0x30, 0x03, 0xab, 0x67, 0xcd, 0xd2, 0xe8, 0x3b, 0x44, 0xe9, 0xe9, 0xdc, 0x77, 0x7d, 0xe0, 0x1f, 0x4d, 0x23, 0x3d, 0x22, 0xe7, 0xd2, 0xb4, 0x46, 0x7f, 0x04, 0x81, 0x2a, 0x3a, 0xeb, 0xff, 0xb1, 0x0a, 0x09, 0x24, 0x54, 0xe3, 0x3b, 0x9e, 0x70, 0x28, 0x24, 0x93, 0x28, 0x74, 0x7e, 0xa1, 0x4a, 0x11, 0xc7, 0x98, 0xac, 0x2e, 0x14, 0x6e, 0x4e, 0x49, 0x65, 0x9b, 0xa8, 0x60, 0x67, 0xdb, 0x64, 0xe9, 0xbd, 0x80, 0xa7, 0x02, 0x1a, 0xab, 0xcc, 0x22, 0x85, 0x6e, 0x81, 0x01, 0x40, 0xc2, 0x0f, 0xd8, 0xc6, 0x52, 0x7b, 0xad, 0xbb, 0xd9, 0xfa, 0x59, 0x53, 0xfa, 0x77, 0xe6, 0x85, 0x87, 0x00, 0xbe, 0xb6, 0xc7, 0x4d, 0x5a, 0x46, 0x3c, 0x9d, 0xa8, 0x61, 0x13, 0x3b, 0xaa, 0x5b, 0xd6, 0xa5, 0x99, 0x80, 0x7a, 0xe9, 0x16, 0x2e, 0x3a, 0xf3, 0xa3, 0x48, 0xd0, 0x4a, 0x4e, 0xdd, 0x2f, 0xfb, 0xab } +, + /* Signature */ + 192, + { 0x35, 0xe6, 0x66, 0xcf, 0xb8, 0x7c, 0x04, 0x88, 0xa8, 0x6f, 0xdf, 0xed, 0x5f, 0x9d, 0xea, 0xed, 0xbc, 0x46, 0x74, 0x17, 0x1c, 0x31, 0x84, 0x59, 0xac, 0xaa, 0xaa, 0x20, 0xe1, 0xca, 0xd7, 0xc5, 0x86, 0x04, 0x14, 0x0a, 0x80, 0xff, 0x7f, 0x56, 0x5b, 0xfb, 0xc8, 0x6e, 0x90, 0x32, 0x8d, 0x4c, 0x72, 0x9b, 0x91, 0xbf, 0x72, 0xa9, 0x8d, 0xb7, 0x01, 0xc1, 0xbe, 0x63, 0x8a, 0x6e, 0x8f, 0x2e, 0x46, 0x8f, 0x20, 0x39, 0x24, 0x70, 0xc7, 0xc5, 0xc3, 0x44, 0x42, 0xd5, 0x1b, 0x1b, 0x15, 0x5f, 0xb4, 0x64, 0xb8, 0xa5, 0x56, 0xf4, 0xa1, 0x70, 0xc0, 0x23, 0x01, 0xfe, 0xd0, 0xd1, 0xaa, 0x92, 0xaa, 0xfd, 0xeb, 0xc3, 0xf1, 0x8e, 0xa8, 0xb4, 0xd7, 0x1e, 0x24, 0x5c, 0x25, 0x26, 0xf6, 0xfe, 0x66, 0x5d, 0xe4, 0x83, 0x85, 0xf4, 0x6c, 0xe1, 0xbf, 0x33, 0x12, 0xfa, 0x89, 0x28, 0x09, 0x8e, 0xd3, 0x31, 0x2b, 0x61, 0x11, 0x6c, 0xa7, 0xe4, 0x23, 0x20, 0x4e, 0xf0, 0x8b, 0xd2, 0xdf, 0x3a, 0xd7, 0xbb, 0xc8, 0x50, 0x09, 0x8c, 0xb0, 0x26, 0x83, 0x26, 0x66, 0x25, 0xbb, 0xd9, 0x59, 0x82, 0x51, 0x35, 0xa4, 0x5f, 0x03, 0x82, 0x9d, 0x09, 0x6f, 0xed, 0x18, 0xb2, 0x0b, 0xaa, 0x3f, 0x9d, 0x44, 0xb0, 0x07, 0xaa, 0x24, 0x1f, 0x92, 0xf8, 0x88, 0x60, 0x55, 0xd9, 0x8e, 0x0e, 0x07, 0x04 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 14.3", + /* Message to be signed */ + 42, + { 0x58, 0x62, 0x7f, 0xfa, 0xaa, 0x8e, 0x80, 0x0a, 0x8b, 0xe9, 0x8e, 0x42, 0xf5, 0x1a, 0x83, 0x61, 0x1c, 0xfa, 0xb7, 0xee, 0x37, 0x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xe4, 0xdd, 0x1a, 0xe7, 0x59, 0xda, 0xd6, 0xb9, 0xb9, 0x08, 0xb7, 0xfc, 0x8b, 0x97, 0xef, 0x5f, 0x4c, 0x82, 0x92, 0x32, 0x0a, 0xc3, 0x87, 0xc3, 0x50, 0x8b, 0x54, 0xcf, 0xb8, 0x5d, 0x34, 0xf6, 0xad, 0x39 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 14.4", + /* Message to be signed */ + 173, + { 0x0f, 0x0f, 0x8d, 0x3c, 0x0e, 0x4d, 0x26, 0x08, 0xaf, 0xad, 0x5a, 0x88, 0x8e, 0xa1, 0x4b, 0x3f, 0x6b, 0x2b, 0x27, 0x89, 0xdd, 0x22, 0x12, 0xb8, 0x59, 0x09, 0xe6, 0x4b, 0xfb, 0x10, 0x4d, 0x0f, 0x7d, 0xe4, 0x27, 0xd1, 0x4a, 0x9f, 0xfa, 0x85, 0x5e, 0x2d, 0x4c, 0xa2, 0x44, 0x23, 0x36, 0xe5, 0x59, 0x56, 0x8b, 0x28, 0x41, 0x5d, 0x60, 0xcf, 0x80, 0x63, 0xde, 0x55, 0x92, 0x17, 0x1b, 0x26, 0x9b, 0x3d, 0x76, 0x33, 0x51, 0xc7, 0xf7, 0xd9, 0xd2, 0x58, 0x09, 0xe7, 0x02, 0x20, 0xee, 0x30, 0xfe, 0x8a, 0x00, 0xb9, 0x5d, 0x4c, 0x20, 0x20, 0x26, 0x89, 0x7e, 0xd2, 0xc6, 0x1d, 0x7a, 0xd4, 0x3a, 0xed, 0xdf, 0x36, 0xb5, 0xc2, 0xcb, 0xe2, 0x1e, 0x00, 0x86, 0xdb, 0xd0, 0xfd, 0xfd, 0x19, 0xe4, 0x3f, 0x02, 0x77, 0xf3, 0xbc, 0x95, 0xed, 0x55, 0xa3, 0x4a, 0xf9, 0x30, 0x91, 0x66, 0x02, 0x19, 0x3c, 0xfe, 0x04, 0x51, 0x4b, 0xd2, 0x6a, 0x05, 0x7e, 0x56, 0x2a, 0x11, 0x90, 0xc2, 0x7e, 0xaa, 0xb6, 0xc3, 0x22, 0xfc, 0xfa, 0xf4, 0xbb, 0xcc, 0x7f, 0x20, 0xc3, 0x77, 0x9c, 0x63, 0x8d, 0x7b, 0xbc, 0x07, 0x08, 0x6c, 0xf7, 0x5b, 0xf8, 0x39, 0x96, 0xdb, 0x44, 0x63 } +, + /* Signature */ + 192, + { 0x50, 0x90, 0x45, 0x12, 0x36, 0x10, 0x50, 0x87, 0x2e, 0xae, 0x80, 0x10, 0x26, 0x28, 0xb6, 0x3d, 0x02, 0x16, 0x8d, 0xca, 0x52, 0xf0, 0xab, 0xd8, 0x77, 0x20, 0xea, 0x48, 0x05, 0x0d, 0x2c, 0x62, 0x06, 0x1a, 0xa2, 0x15, 0x32, 0x68, 0xbe, 0xf8, 0xef, 0xb3, 0x4e, 0xed, 0x46, 0x17, 0x1a, 0x62, 0x88, 0xe5, 0x04, 0xd4, 0x20, 0xf6, 0xfc, 0x14, 0x51, 0x38, 0x61, 0x1e, 0x75, 0xed, 0x3c, 0xf7, 0x9b, 0x4d, 0x10, 0x26, 0x64, 0xd8, 0x64, 0x4f, 0xf3, 0xe9, 0xe5, 0xdb, 0xfd, 0x71, 0xcd, 0xc2, 0x7a, 0x21, 0x0e, 0xfb, 0x10, 0xbe, 0x90, 0x27, 0x56, 0x04, 0xf8, 0xd4, 0x49, 0x14, 0x8b, 0x3f, 0x86, 0x09, 0x90, 0x39, 0xc3, 0x3a, 0xef, 0x90, 0xbf, 0x19, 0x1b, 0x35, 0x18, 0xeb, 0x45, 0x9d, 0xa3, 0xba, 0x14, 0xfd, 0x0c, 0x72, 0x22, 0x9d, 0xea, 0x5f, 0xac, 0x2f, 0x7d, 0xad, 0xe1, 0x08, 0x5c, 0x8a, 0x23, 0x70, 0xbb, 0xfc, 0xfa, 0x2e, 0x3a, 0x9e, 0x63, 0xca, 0x22, 0x4f, 0x6d, 0xe8, 0xc8, 0xd2, 0x97, 0xa3, 0xb1, 0xf0, 0x6f, 0x1f, 0xc9, 0x49, 0x78, 0x90, 0xfd, 0x0e, 0x0e, 0x13, 0x88, 0x7f, 0xac, 0xb1, 0x52, 0xd1, 0x2d, 0x96, 0x39, 0x25, 0x28, 0xef, 0x28, 0xd0, 0x72, 0x43, 0x31, 0xff, 0x41, 0x40, 0x30, 0xc7, 0xa6, 0x38, 0x55, 0x81, 0x3c, 0xcd, 0x89, 0xfb, 0xdb, 0x1b } + +} +, +{ + "PKCS#1 v1.5 Signature Example 14.5", + /* Message to be signed */ + 13, + { 0x26, 0x65, 0xcb, 0x5e, 0xe3, 0x6a, 0xa9, 0xbb, 0x1a, 0x5c, 0xde, 0x7c, 0xe8 } +, + /* Signature */ + 192, + { 0x4f, 0x38, 0xc2, 0xba, 0x84, 0xc5, 0x0d, 0x46, 0xdf, 0x53, 0x10, 0x91, 0xb6, 0x27, 0x12, 0x14, 0x9c, 0x1f, 0x42, 0xdb, 0xd7, 0x7e, 0x03, 0xd1, 0x85, 0xea, 0x96, 0xed, 0xa8, 0x02, 0x33, 0x7c, 0x22, 0xc1, 0x13, 0x0b, 0xc3, 0xbe, 0xce, 0xbf, 0x15, 0x39, 0xfd, 0x11, 0x89, 0x38, 0x51, 0xda, 0xe3, 0xcc, 0x15, 0x67, 0xcb, 0x6c, 0x73, 0xa7, 0x2f, 0xa1, 0xc9, 0x69, 0x48, 0x68, 0x21, 0x12, 0x7e, 0x7c, 0xfe, 0xa1, 0x36, 0x3e, 0xee, 0x95, 0x2b, 0x7c, 0x6e, 0xb5, 0x9e, 0x10, 0x2c, 0x66, 0x57, 0xc0, 0x80, 0x35, 0x27, 0x2c, 0xdf, 0x4a, 0xb5, 0xe5, 0x83, 0xed, 0x73, 0x7a, 0xd0, 0x28, 0xac, 0x1c, 0xfa, 0xfe, 0xdd, 0xc9, 0x07, 0x3d, 0xfb, 0xd7, 0xd3, 0xba, 0x3d, 0xa9, 0xe8, 0xdc, 0xd8, 0x46, 0xfa, 0x36, 0x5c, 0x9c, 0xcd, 0x8e, 0x9b, 0x39, 0x48, 0x3d, 0x37, 0x07, 0x3c, 0x1a, 0x7b, 0x78, 0x2e, 0xe7, 0x12, 0x1b, 0xb1, 0xa2, 0xad, 0x8b, 0xf5, 0xf8, 0xed, 0x6e, 0x65, 0x3e, 0x92, 0x4d, 0xeb, 0xad, 0x87, 0x1b, 0x74, 0x43, 0x39, 0xe5, 0xae, 0x7e, 0x96, 0xf6, 0x0d, 0xcc, 0x45, 0xea, 0x5d, 0x69, 0x7d, 0x3b, 0x1c, 0xc7, 0xc5, 0xe8, 0xda, 0x04, 0xe9, 0x2b, 0xe0, 0x6c, 0xad, 0x2e, 0x61, 0x4e, 0xac, 0x31, 0x8a, 0xec, 0xaf, 0x12, 0xd5, 0xa7, 0x62, 0x34, 0xc2, 0xc0 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 14.6", + /* Message to be signed */ + 125, + { 0x7b, 0x7b, 0x61, 0x61, 0x02, 0x0f, 0xaf, 0xb4, 0x88, 0x71, 0x63, 0x21, 0x34, 0x0d, 0xaf, 0x2c, 0x06, 0xac, 0x43, 0xce, 0x21, 0x32, 0x86, 0x86, 0x84, 0xaa, 0xaf, 0xab, 0x13, 0x99, 0x65, 0x3d, 0x35, 0x3b, 0x26, 0x93, 0xad, 0x73, 0xcb, 0x55, 0xb7, 0x1d, 0x66, 0xac, 0xd0, 0x1a, 0x16, 0x0c, 0xbf, 0x74, 0x37, 0x67, 0xbd, 0x96, 0xe7, 0xfd, 0x1c, 0x7a, 0x13, 0x32, 0x06, 0x65, 0xbb, 0xad, 0x1c, 0x4a, 0x0c, 0xed, 0x26, 0x59, 0x3c, 0xe8, 0x9c, 0xd8, 0x2f, 0x54, 0x6b, 0xd4, 0xd1, 0xb1, 0xbc, 0xd8, 0x2c, 0x65, 0xa4, 0x66, 0xf9, 0x9d, 0xa0, 0x12, 0xa4, 0x1e, 0x8c, 0x41, 0x20, 0x69, 0x81, 0x09, 0x58, 0x47, 0x5b, 0x4d, 0x9c, 0x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, 0x27, 0x83, 0x96, 0xff, 0x9a, 0x8a, 0x91, 0x30, 0x6a, 0x54, 0xea, 0x76, 0x60, 0x7c, 0x81, 0x3f, 0x80, 0x1f, 0x38, 0x76, 0x0c, 0x3a, 0x81, 0x4b, 0x93, 0x96, 0x95, 0x9c, 0x29, 0xdb, 0xff, 0x9d } + +} +, +{ + "PKCS#1 v1.5 Signature Example 14.7", + /* Message to be signed */ + 12, + { 0x2b, 0x0a, 0xd6, 0x13, 0x82, 0x28, 0x78, 0xa5, 0x72, 0xe1, 0x42, 0x80 } +, + /* Signature */ + 192, + { 0x89, 0xc8, 0x10, 0x84, 0xda, 0xa8, 0xf9, 0x14, 0xb7, 0xe2, 0x44, 0x55, 0x10, 0x74, 0x17, 0xca, 0x62, 0x1c, 0x91, 0x02, 0xd5, 0x01, 0xee, 0xb4, 0x3d, 0x17, 0x4c, 0x7b, 0xad, 0x38, 0x1d, 0xb1, 0x8d, 0x95, 0x33, 0xc3, 0x41, 0x1a, 0xec, 0x60, 0x57, 0xca, 0x5a, 0x4d, 0xfd, 0xc3, 0xf1, 0x31, 0xc8, 0x88, 0xb8, 0x8f, 0x01, 0x30, 0x03, 0xd6, 0x17, 0xe0, 0x6d, 0x64, 0x47, 0x95, 0x02, 0xae, 0x7e, 0x42, 0x4a, 0x5d, 0xd6, 0x37, 0xb0, 0x33, 0x56, 0x40, 0x4d, 0x26, 0x0f, 0x5e, 0xd6, 0xb8, 0xcb, 0x16, 0xd2, 0x57, 0x85, 0x28, 0xcc, 0x3e, 0x85, 0x00, 0x34, 0x6e, 0xb7, 0x90, 0xbd, 0xad, 0x41, 0xb2, 0xe3, 0x6c, 0xa6, 0xf1, 0x98, 0x85, 0xe3, 0xf6, 0xf5, 0x10, 0x86, 0xbf, 0xfb, 0x6a, 0xbb, 0x9c, 0x66, 0x33, 0x6b, 0x49, 0x47, 0x34, 0x64, 0xc5, 0xd7, 0xed, 0x8e, 0x9f, 0xf8, 0x5e, 0x11, 0xae, 0xff, 0x40, 0x90, 0x67, 0xba, 0xb0, 0xa0, 0x5c, 0x41, 0xe8, 0x15, 0x1b, 0x8b, 0xe9, 0x87, 0xf3, 0xf5, 0x95, 0x8e, 0x3e, 0x6f, 0x26, 0x51, 0x5d, 0x96, 0xbf, 0x23, 0x4b, 0x22, 0xab, 0x91, 0xc0, 0x85, 0x7b, 0x6c, 0x08, 0xa4, 0x6b, 0x03, 0x05, 0xfe, 0x04, 0x4c, 0xa9, 0xaa, 0xa0, 0xd7, 0x0a, 0x27, 0x58, 0xa1, 0xce, 0x43, 0x16, 0x64, 0xa8, 0xdd, 0x79, 0x40, 0x8c, 0x16, 0xba } + +} +, +{ + "PKCS#1 v1.5 Signature Example 14.8", + /* Message to be signed */ + 76, + { 0x36, 0x93, 0x8c, 0x8c, 0x7c, 0x6f, 0x7e, 0x35, 0x52, 0x34, 0xdb, 0x5a, 0x32, 0xa6, 0x48, 0x10, 0xdb, 0x50, 0x2b, 0x67, 0xc6, 0xf5, 0x92, 0x54, 0x4f, 0xfb, 0x27, 0xeb, 0x1f, 0x22, 0xe0, 0x6f, 0x2d, 0x63, 0x8b, 0x56, 0xd5, 0xd2, 0xf7, 0xd1, 0x9e, 0x9e, 0x27, 0x1f, 0x2c, 0xc9, 0x0c, 0xc0, 0xdd, 0x36, 0xd6, 0xcc, 0x2c, 0x06, 0x17, 0x8b, 0xcc, 0x70, 0x6a, 0xef, 0x20, 0xe5, 0x6a, 0x35, 0x8e, 0x52, 0x4f, 0x63, 0x16, 0x76, 0x9c, 0x54, 0xb6, 0xde, 0x2d, 0xd5 } +, + /* Signature */ + 192, + { 0xa0, 0x37, 0x53, 0xa5, 0xfb, 0x54, 0xaa, 0x51, 0xf6, 0xdd, 0x8d, 0xab, 0x91, 0xf1, 0x9c, 0xb8, 0x65, 0x56, 0x84, 0x85, 0xf8, 0x55, 0x8f, 0x0d, 0x10, 0x3f, 0x0d, 0x2b, 0x6d, 0x78, 0x53, 0x6e, 0x79, 0xc8, 0x15, 0xc4, 0xa0, 0x37, 0xbc, 0xaf, 0x11, 0xb6, 0x9d, 0x4c, 0xdb, 0xab, 0x03, 0x5a, 0xbe, 0x21, 0x6f, 0x71, 0x52, 0xf6, 0x30, 0xff, 0xc7, 0x9f, 0x84, 0x9d, 0x8d, 0xcd, 0x46, 0x3a, 0xae, 0x6a, 0xe9, 0x7d, 0x3d, 0xf1, 0x5a, 0x9e, 0x73, 0xd2, 0x3f, 0x18, 0x78, 0xfa, 0xc7, 0x54, 0xcb, 0xdd, 0x57, 0x1a, 0xfe, 0xa5, 0xd2, 0x53, 0x57, 0xd4, 0xb8, 0x83, 0x45, 0xf4, 0x89, 0xbe, 0x0d, 0x67, 0xb9, 0xbf, 0xad, 0xf0, 0x23, 0xf2, 0x6e, 0x67, 0x31, 0x5e, 0xd5, 0xfb, 0xf3, 0x91, 0x91, 0x0a, 0xf4, 0x96, 0x9b, 0x72, 0x4b, 0xf0, 0xca, 0x31, 0xc1, 0x05, 0x9f, 0x8a, 0x39, 0x13, 0xb4, 0x8a, 0x13, 0x81, 0x9c, 0x23, 0x6c, 0x9b, 0xe8, 0xe8, 0x24, 0xca, 0x4c, 0xb6, 0x19, 0xfb, 0x7d, 0x78, 0x4c, 0xd5, 0xf9, 0x52, 0x6b, 0x39, 0x7c, 0x76, 0xc5, 0xd0, 0xc6, 0x0c, 0xf7, 0xf4, 0x8d, 0x11, 0x19, 0x6e, 0x54, 0xf7, 0x2a, 0x08, 0xbb, 0x42, 0xf7, 0x5a, 0xef, 0xe3, 0x8f, 0x0b, 0x91, 0xb4, 0x2b, 0xb8, 0x06, 0xde, 0x4b, 0x87, 0xc9, 0x08, 0x2f, 0x72, 0x1a, 0x68, 0x80, 0xca } + +} +, +{ + "PKCS#1 v1.5 Signature Example 14.9", + /* Message to be signed */ + 95, + { 0x60, 0x83, 0x0c, 0x01, 0xcf, 0xa8, 0x6f, 0xf2, 0xdc, 0xac, 0x7a, 0xf9, 0x32, 0x1e, 0xe5, 0xfe, 0x50, 0x2e, 0x0e, 0x7a, 0x6f, 0xac, 0xb7, 0x3e, 0x3f, 0x6b, 0xc9, 0x02, 0x64, 0x0a, 0x61, 0x09, 0x5f, 0x64, 0x6f, 0xd0, 0x3e, 0x80, 0xd5, 0x81, 0x82, 0x46, 0x53, 0x31, 0xe7, 0x5d, 0x66, 0x11, 0xa0, 0x97, 0x76, 0x81, 0x62, 0x70, 0x86, 0x24, 0x17, 0x29, 0xde, 0x9f, 0x44, 0xab, 0x43, 0x94, 0x9d, 0xac, 0x19, 0x36, 0x73, 0xbd, 0x6c, 0xf8, 0x7f, 0x5d, 0x65, 0x77, 0x1e, 0xf8, 0x72, 0x81, 0x63, 0x3f, 0xdd, 0x07, 0xba, 0xc4, 0x09, 0xa6, 0xe2, 0x32, 0xb6, 0x01, 0xae, 0xce, 0x2d } +, + /* Signature */ + 192, + { 0x40, 0x58, 0xf6, 0xe0, 0x24, 0x0d, 0x85, 0x1d, 0x61, 0x93, 0x95, 0xa7, 0x52, 0x87, 0xa8, 0x8f, 0xaf, 0xd8, 0xdc, 0x56, 0x00, 0xb0, 0x69, 0xbf, 0x19, 0xdc, 0x3e, 0x19, 0x21, 0xe1, 0x17, 0xb4, 0x97, 0xb8, 0x2b, 0x3c, 0x52, 0x02, 0x69, 0xb1, 0xd1, 0x12, 0x81, 0x64, 0xfc, 0xd8, 0x8d, 0xd2, 0xb4, 0x6d, 0xc8, 0x5c, 0x42, 0xec, 0xf6, 0x7d, 0xeb, 0xad, 0x21, 0xa3, 0xb9, 0xa1, 0x55, 0x42, 0xfe, 0xa2, 0x26, 0x06, 0xea, 0xb5, 0x82, 0xfc, 0x32, 0x97, 0x11, 0xff, 0xc0, 0x7f, 0x4e, 0xef, 0x1f, 0x3b, 0xbf, 0xe0, 0x88, 0x8c, 0xbc, 0xa4, 0x85, 0xba, 0xfc, 0x11, 0x88, 0xb0, 0xaf, 0xe8, 0x09, 0xc9, 0xaa, 0xf8, 0xfa, 0x36, 0x66, 0xb9, 0xc9, 0x05, 0x85, 0x39, 0xdb, 0x1e, 0xc6, 0xa1, 0x8e, 0x5b, 0xe0, 0xb8, 0x01, 0x44, 0xd2, 0xc3, 0x7c, 0xa6, 0x14, 0xc0, 0x90, 0xb4, 0xa7, 0xf1, 0x34, 0x58, 0xe0, 0xd3, 0xa4, 0xcb, 0x0c, 0xb7, 0x3d, 0xcc, 0x4d, 0x90, 0x80, 0x6f, 0x61, 0x08, 0x58, 0x89, 0xeb, 0x5c, 0x9b, 0x14, 0x09, 0xde, 0xf3, 0x60, 0xfd, 0x1c, 0x2e, 0x49, 0x43, 0x8d, 0x7c, 0x67, 0xd7, 0x9d, 0xbd, 0x9a, 0x59, 0x2a, 0xb5, 0x04, 0xc4, 0x71, 0x5f, 0x65, 0xb2, 0x9d, 0x84, 0x65, 0x09, 0x95, 0x15, 0x69, 0xa8, 0xc3, 0x79, 0x09, 0xf5, 0xd5, 0x50, 0xee, 0xff, 0xfa } + +} +, +{ + "PKCS#1 v1.5 Signature Example 14.10", + /* Message to be signed */ + 153, + { 0x63, 0x5d, 0x22, 0x03, 0xed, 0x9d, 0x5b, 0x91, 0x20, 0xe3, 0x1b, 0xf6, 0x9d, 0x30, 0x5b, 0xe6, 0x06, 0x86, 0x97, 0xe3, 0x5c, 0xe5, 0x9c, 0x55, 0x3e, 0x50, 0x8d, 0xc7, 0x7b, 0x07, 0x3f, 0xfa, 0x3a, 0xaa, 0x59, 0xf9, 0x96, 0xc3, 0x0b, 0x2e, 0x68, 0x63, 0x23, 0x81, 0x9f, 0xde, 0x22, 0xbe, 0x6c, 0x8d, 0x53, 0x86, 0x84, 0x14, 0xb3, 0x54, 0x5a, 0xbf, 0x43, 0x57, 0x68, 0xa6, 0x11, 0xf0, 0xc1, 0xa4, 0x79, 0xa0, 0xc7, 0x66, 0x0d, 0x53, 0x5e, 0x80, 0x5b, 0x5f, 0xed, 0xc3, 0x77, 0x9c, 0xf0, 0xc5, 0x2c, 0x3c, 0xd0, 0x40, 0xab, 0x65, 0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0xcb, 0xd9, 0xc0, 0xfe, 0x0a, 0xc0, 0xbe, 0x64, 0xfe, 0xf2, 0xe0, 0x13, 0x92, 0x05, 0xb1, 0x0b, 0xca, 0xbf, 0xe5, 0xa3, 0xa7, 0xa8, 0x90, 0xfc, 0x0f, 0xe7, 0x8d, 0xab, 0xe1, 0xad, 0xb5, 0xbd, 0x11, 0x44, 0x85, 0x03, 0xcb, 0x0d, 0xcd, 0x0b, 0x68, 0xf1, 0x60, 0x19, 0x6e, 0x96, 0x13, 0xe2, 0x9f, 0xbe, 0x9a, 0x3f, 0x94, 0x06, 0xec, 0x20, 0xc0, 0x30, 0xe8, 0x1e, 0xc3, 0x09, 0x65, 0xea, 0x01, 0x9c, 0x17, 0xaa, 0x97, 0x11, 0x01, 0xc2, 0xe5, 0x30, 0x59 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 14.11", + /* Message to be signed */ + 182, + { 0x87, 0xfb, 0xa9, 0x89, 0xf3, 0xcc, 0x15, 0xaf, 0x7e, 0xe7, 0x61, 0xc0, 0x88, 0x26, 0x4a, 0xb7, 0x71, 0x52, 0x39, 0xe0, 0xb8, 0xc8, 0xa9, 0xe4, 0x8e, 0x11, 0xdb, 0x68, 0x03, 0x31, 0x39, 0xc2, 0xa2, 0x89, 0xea, 0x42, 0x6e, 0xbe, 0x26, 0x9f, 0x5f, 0xb7, 0x07, 0x09, 0x0a, 0xfb, 0x89, 0x1a, 0x49, 0xca, 0x05, 0xc0, 0x55, 0x0d, 0x72, 0x9b, 0xf4, 0xd3, 0x7c, 0x8f, 0x1d, 0xa7, 0xa3, 0xca, 0x2f, 0x43, 0x87, 0xa4, 0x0b, 0x5f, 0x79, 0x13, 0xa3, 0x85, 0xf5, 0x5b, 0x81, 0x41, 0xaf, 0x36, 0xbe, 0x8f, 0x57, 0x16, 0x65, 0xf8, 0x57, 0xe7, 0x7a, 0x5c, 0x9c, 0xcc, 0xe6, 0xba, 0x8f, 0x2b, 0xe4, 0x63, 0x23, 0xcc, 0x56, 0x91, 0x56, 0x6f, 0xf4, 0xb6, 0xd7, 0x85, 0x43, 0x04, 0xb9, 0x3b, 0xba, 0x1a, 0x17, 0x59, 0xdf, 0xb1, 0x44, 0xc9, 0x54, 0x7c, 0xf2, 0xbc, 0x8e, 0xaa, 0xed, 0xaa, 0x4f, 0x1d, 0xd2, 0x52, 0x82, 0x3b, 0x72, 0x87, 0xca, 0x55, 0x5d, 0x21, 0x06, 0x08, 0x9a, 0x24, 0x3e, 0x5d, 0xfe, 0x8f, 0xc3, 0x1d, 0x3f, 0x46, 0x22, 0x2a, 0x68, 0xab, 0xaf, 0x31, 0x81, 0x5a, 0x94, 0x7e, 0x58, 0x57, 0xcf, 0x6a, 0x33, 0x17, 0x0e, 0xcc, 0xb6, 0xa5, 0xe0, 0x6d, 0x23, 0xcc, 0x9d, 0x48, 0xea, 0xf6, 0xcd, 0xbc } +, + /* Signature */ + 192, + { 0x0b, 0x5f, 0x1c, 0xfc, 0x25, 0x3b, 0xaa, 0xd4, 0xb9, 0x83, 0xf8, 0xfe, 0x05, 0x0d, 0x4a, 0x01, 0x7c, 0xc4, 0x66, 0x98, 0x0e, 0xbd, 0x23, 0xc9, 0xd5, 0x53, 0x43, 0xf5, 0x10, 0x7e, 0x04, 0x1e, 0xb6, 0x54, 0x78, 0x10, 0xfd, 0xba, 0x46, 0x86, 0xe6, 0x10, 0x83, 0x2f, 0x92, 0x82, 0xed, 0xf0, 0x66, 0x04, 0xb0, 0xab, 0xfe, 0xea, 0x38, 0x01, 0x32, 0x79, 0x17, 0x79, 0x40, 0x99, 0x7b, 0x28, 0x90, 0x2b, 0x14, 0xdb, 0x37, 0x9e, 0xeb, 0x4f, 0x44, 0x00, 0x5d, 0xfc, 0xb0, 0x03, 0x68, 0x03, 0xc9, 0xf1, 0x25, 0xbc, 0xe1, 0xf2, 0xa8, 0x2c, 0x4d, 0x30, 0x07, 0xae, 0x96, 0xb8, 0x48, 0xb8, 0x13, 0xec, 0x8c, 0x97, 0xca, 0x3f, 0x71, 0x0a, 0x9a, 0xe0, 0xdb, 0xc2, 0x8a, 0x55, 0xe0, 0x58, 0x81, 0xb8, 0x58, 0xdb, 0x55, 0x71, 0x20, 0xf3, 0x3c, 0x59, 0xcd, 0x43, 0x60, 0xf9, 0x20, 0x8c, 0x74, 0xb2, 0x7e, 0xc6, 0x5d, 0x11, 0xea, 0x41, 0xfa, 0x6a, 0x9e, 0xac, 0xf2, 0xa6, 0x11, 0x68, 0xad, 0x07, 0xc2, 0x09, 0x94, 0x8f, 0x35, 0xa1, 0x61, 0xf4, 0x1f, 0x87, 0x54, 0x0e, 0xa1, 0x82, 0x84, 0xaa, 0xb8, 0xd8, 0xf9, 0x78, 0x61, 0x31, 0xf0, 0x43, 0x90, 0x2b, 0x89, 0xc1, 0x7a, 0x56, 0x0d, 0x90, 0x94, 0x64, 0x47, 0x5a, 0x0d, 0xfc, 0xe5, 0x89, 0x09, 0x18, 0x7c, 0xd6, 0xe4, 0x46 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 14.12", + /* Message to be signed */ + 100, + { 0x4b, 0x5e, 0x80, 0x30, 0x5c, 0xbe, 0xa9, 0x0d, 0x63, 0x7f, 0xdb, 0x23, 0x47, 0xc6, 0xfe, 0xb6, 0x78, 0x42, 0xeb, 0xac, 0x6f, 0x90, 0x3d, 0xb5, 0xa7, 0x1e, 0xba, 0xab, 0x8a, 0x1c, 0x2d, 0xf1, 0x12, 0x60, 0xa1, 0xec, 0x90, 0x7b, 0x8b, 0x63, 0x4d, 0x37, 0xd3, 0x6e, 0xd8, 0xde, 0x7d, 0x0d, 0xa1, 0x03, 0xbc, 0x4a, 0x9e, 0x93, 0x3f, 0xb7, 0xbf, 0xee, 0x59, 0x1c, 0xc9, 0x33, 0x29, 0x9f, 0xee, 0x46, 0x0f, 0x35, 0x42, 0xc9, 0x78, 0xf3, 0x07, 0xae, 0x05, 0x24, 0x64, 0xf3, 0x06, 0x20, 0xce, 0xbf, 0x3c, 0x9a, 0x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16, 0x19, 0x70, 0x46, 0x0d, 0x6a, 0x7c, 0xa7, 0x70, 0xf8, 0xde, 0x8b, 0xa9, 0x3c, 0xea, 0xf3, 0x97, 0xdd, 0xf1, 0xfb, 0xce, 0xe2, 0x82, 0xa1, 0x53, 0x7d } + +} +, +{ + "PKCS#1 v1.5 Signature Example 14.13", + /* Message to be signed */ + 86, + { 0xe5, 0xad, 0x62, 0x7f, 0x24, 0xf4, 0x11, 0x7a, 0x0a, 0x6b, 0xe4, 0xa5, 0x5f, 0xdb, 0x88, 0x3d, 0x75, 0xa6, 0x73, 0x12, 0x15, 0x4a, 0x71, 0x89, 0x23, 0xd0, 0xe8, 0xf5, 0x73, 0x0a, 0x54, 0xd8, 0xca, 0x7c, 0x97, 0x4e, 0x4d, 0x59, 0x33, 0x8b, 0xb5, 0x71, 0x30, 0x5c, 0xce, 0x99, 0x0c, 0xbb, 0xcf, 0xa9, 0x1e, 0xa9, 0xb7, 0x73, 0xb8, 0x3d, 0x7a, 0x1f, 0x0f, 0xfe, 0xc4, 0xc6, 0xb1, 0x43, 0xfe, 0x05, 0x05, 0x8b, 0xc9, 0x0c, 0xe1, 0x46, 0xf3, 0x69, 0xcb, 0xae, 0x3b, 0x3d, 0x99, 0x70, 0x5e, 0xf4, 0x3d, 0x07, 0x21, 0xb8 } +, + /* Signature */ + 192, + { 0x73, 0x29, 0x86, 0xd4, 0xed, 0xdb, 0x8a, 0x7e, 0x9b, 0x65, 0xdc, 0x01, 0x6d, 0xd5, 0x71, 0xef, 0xab, 0xeb, 0x84, 0x49, 0x0e, 0x88, 0xe3, 0xe7, 0x3b, 0x63, 0xe8, 0x0d, 0x1c, 0xc8, 0x6a, 0x45, 0x2d, 0xec, 0x29, 0xfc, 0x81, 0x7e, 0x8a, 0xd4, 0xee, 0xbd, 0xdc, 0xd9, 0x7c, 0x74, 0x5b, 0xc4, 0x79, 0x7e, 0x54, 0xfe, 0xc6, 0xac, 0xe2, 0x91, 0xb1, 0x96, 0xdc, 0x24, 0x65, 0xf0, 0x8c, 0xf1, 0xdd, 0xd2, 0x17, 0xe7, 0x7a, 0xaf, 0x7d, 0x50, 0x98, 0x77, 0x91, 0xde, 0x81, 0xb0, 0x41, 0x10, 0xd1, 0x1a, 0xb8, 0x55, 0x89, 0x06, 0x60, 0x4e, 0xb9, 0xd9, 0x2b, 0x35, 0xf9, 0x00, 0x75, 0xaf, 0x42, 0x28, 0x01, 0x45, 0xb0, 0x88, 0xe8, 0x75, 0x3d, 0x0d, 0xb7, 0x3c, 0xd3, 0xa3, 0x2b, 0xd1, 0x9c, 0xea, 0x35, 0x38, 0xee, 0x4f, 0x09, 0x27, 0x3e, 0xf6, 0x6d, 0x07, 0x05, 0xd4, 0x5e, 0xe7, 0x10, 0x9f, 0xe5, 0x95, 0xdf, 0x55, 0x76, 0x7b, 0x3d, 0x10, 0x81, 0x72, 0x27, 0xbb, 0x6b, 0xa3, 0x95, 0x75, 0xb8, 0x5d, 0x6a, 0x35, 0xa2, 0xff, 0xb8, 0x8c, 0xb2, 0x67, 0xdb, 0xfc, 0x28, 0x2b, 0xb8, 0xa3, 0xde, 0xe0, 0x2e, 0xc7, 0x7b, 0x0c, 0xb8, 0x13, 0x55, 0x70, 0xf8, 0xa7, 0xd7, 0xad, 0x04, 0x34, 0x1a, 0x08, 0x64, 0xe6, 0x7f, 0xf6, 0xfa, 0x02, 0x59, 0xa1, 0x69, 0x74, 0xc8, 0x6a } + +} +, +{ + "PKCS#1 v1.5 Signature Example 14.14", + /* Message to be signed */ + 75, + { 0x03, 0xe3, 0x9b, 0xa7, 0xa8, 0x0c, 0x77, 0x14, 0x16, 0xd8, 0x52, 0x63, 0xe4, 0xd4, 0x3c, 0x63, 0x93, 0xdf, 0xe7, 0x96, 0x52, 0x3b, 0x89, 0xe0, 0xa4, 0x61, 0x62, 0x88, 0x80, 0x80, 0x0d, 0x8f, 0xc2, 0x43, 0x1b, 0x66, 0x30, 0x54, 0x09, 0xe0, 0x6c, 0x95, 0xae, 0x7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x92, 0xe5, 0x96, 0x62, 0x95, 0xb3, 0xa5, 0x57, 0x12, 0x19, 0x58, 0xdf, 0xe7, 0x9c, 0xa4, 0x72, 0xf7, 0x9e, 0xfb, 0xda, 0x1d, 0xcf, 0xba, 0x9d, 0xbd, 0x0f, 0x97, 0x67, 0x32, 0xc0, 0x93, 0xb9, 0x8f, 0xf1, 0x93, 0xc9, 0x02, 0x98, 0x7a, 0x42, 0x6c, 0x0f } + +} +, +{ + "PKCS#1 v1.5 Signature Example 14.15", + /* Message to be signed */ + 243, + { 0xd4, 0xc2, 0x35, 0x96, 0x7d, 0x4e, 0x87, 0xb6, 0x71, 0x1e, 0x32, 0xac, 0x70, 0x37, 0xa3, 0x97, 0xf9, 0x9b, 0x1c, 0xad, 0x95, 0xa1, 0x88, 0x94, 0x6a, 0x48, 0x64, 0x0e, 0xb6, 0xb7, 0xb0, 0x03, 0xc3, 0x2f, 0x85, 0xa1, 0x21, 0xb0, 0x9c, 0xa4, 0xc8, 0xbe, 0xc0, 0xb8, 0x27, 0x44, 0xaa, 0xf2, 0x7d, 0x16, 0x6c, 0xef, 0xc7, 0xa9, 0x70, 0x2a, 0xd3, 0x1d, 0xbd, 0x15, 0xea, 0x2a, 0x18, 0x5f, 0x5b, 0x9b, 0xa6, 0x42, 0xf9, 0x49, 0x07, 0x8b, 0xc6, 0x09, 0xb9, 0xa8, 0xa3, 0x36, 0x92, 0xd7, 0x18, 0x49, 0x39, 0xd1, 0xf9, 0xeb, 0x42, 0x6a, 0x6d, 0xb7, 0x40, 0xea, 0xd9, 0x4c, 0xfe, 0xa1, 0x7f, 0xeb, 0x06, 0x18, 0xd7, 0x4d, 0x9a, 0x65, 0x16, 0x88, 0xe9, 0x0b, 0x9b, 0xb7, 0x05, 0x24, 0x30, 0x5d, 0x61, 0x8c, 0x88, 0xa5, 0x5f, 0x45, 0x44, 0x50, 0xe0, 0xc5, 0x85, 0xd3, 0xa8, 0xd9, 0x81, 0x65, 0x81, 0x8f, 0x36, 0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x75, 0x55, 0x21, 0x4c, 0xd9, 0x4a, 0x18, 0xfc, 0xce, 0x5c, 0x2f, 0x53, 0xb1, 0x9d, 0x1f, 0x3c, 0x73, 0xd0, 0x9f, 0x7b, 0xe1, 0x80, 0x97, 0x38, 0xb0, 0x3c, 0xe7, 0x69, 0xe4, 0x54, 0xed, 0x4c, 0xbe, 0xdc, 0xaf, 0x43, 0xc4, 0x8b, 0xd3, 0x9d, 0xf2, 0xf8, 0xbb, 0x63, 0xb8, 0xfc, 0x4d, 0x0d, 0x4d, 0x5b, 0x20, 0x4f, 0xc2, 0x20, 0x01, 0x3a, 0x66, 0x8c, 0x19, 0xf9, 0x75, 0x02, 0x93, 0xa4, 0x71, 0x15, 0x83, 0x88, 0x26, 0x45, 0xdb, 0xf3, 0xac, 0x4f, 0x83, 0x9b, 0x6f, 0xd1, 0xcf, 0x3b, 0x5e, 0xe8, 0xd7, 0x34, 0xe1, 0xda, 0x37, 0x4d, 0x91, 0xd8, 0x9e, 0xa3, 0x18, 0xe9, 0x18, 0x34, 0x83, 0xf4, 0xa0, 0x9a, 0x93, 0x51, 0x4a, 0xf5, 0x4f, 0x75, 0xd0, 0xa3, 0x56, 0x51, 0xb2, 0x40, 0xf7, 0x9f, 0x20, 0xa2, 0x97, 0x7d, 0x14, 0x57, 0x8c } + +} +, +{ + "PKCS#1 v1.5 Signature Example 14.16", + /* Message to be signed */ + 119, + { 0xd0, 0x6a, 0xdc, 0xa4, 0xc2, 0x0f, 0x0d, 0x9f, 0x7b, 0xe6, 0x5a, 0x20, 0x32, 0x7c, 0x29, 0x47, 0x56, 0xe3, 0xed, 0xd9, 0xe1, 0xd3, 0x9d, 0x0f, 0x95, 0xc7, 0x9d, 0xf1, 0xba, 0xc3, 0x34, 0x35, 0x9f, 0xab, 0x94, 0x3d, 0x85, 0x45, 0xa3, 0xba, 0xa3, 0x7a, 0x59, 0x29, 0x5c, 0x58, 0xb2, 0x37, 0x75, 0x2b, 0x8d, 0xe7, 0xd4, 0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b, 0xf7, 0x5d, 0x6b, 0xfc, 0x45, 0x5a, 0xde, 0x6a, 0x01, 0xf9, 0x60, 0x50, 0x1b, 0x79, 0xf5, 0xfb, 0xe3, 0xb3, 0x8f, 0xca, 0x03, 0x46, 0x4e, 0x43, 0xd4, 0x96, 0x63, 0xc7, 0x9f, 0xf6, 0x4d, 0x32, 0x98, 0x1e, 0x44, 0x80, 0xcd, 0xf4, 0x2d, 0x8a, 0xf8, 0xda, 0xa7, 0xf1, 0x2b, 0x81, 0xa5, 0xaa, 0x96, 0x5f, 0xad, 0xaa, 0x3c, 0x03, 0xb7, 0xff, 0x22, 0xd3, 0xcf, 0xdf, 0xfe, 0x3c, 0xad, 0xf4, 0xd5, 0x98, 0x9e, 0xd1, 0x4c, 0x96, 0x9a, 0x6e, 0x8c, 0x9a, 0x1e, 0x04 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 14.17", + /* Message to be signed */ + 209, + { 0x3a, 0x63, 0x02, 0xd7, 0x9e, 0x26, 0xb5, 0x55, 0xc7, 0x7d, 0xe9, 0x2a, 0x91, 0xe0, 0x78, 0x57, 0x1e, 0xd1, 0x57, 0x2f, 0xfc, 0x3e, 0x4f, 0xc9, 0x05, 0xce, 0x53, 0xf1, 0x04, 0xb3, 0x22, 0x00, 0x95, 0x7e, 0xb2, 0xb5, 0xe5, 0xf3, 0xe3, 0xfc, 0xbb, 0xc1, 0x62, 0xf9, 0xe5, 0x25, 0xc7, 0x06, 0xf1, 0xdd, 0x04, 0xfc, 0xab, 0x51, 0x6b, 0xc1, 0x8a, 0x8e, 0x4f, 0x88, 0xa9, 0x38, 0xa5, 0xb2, 0x56, 0x85, 0xd7, 0x8d, 0xdc, 0x9f, 0x10, 0x4e, 0x49, 0xbf, 0x5c, 0xa0, 0xb6, 0x5a, 0x4b, 0x96, 0x57, 0xe0, 0x4a, 0x71, 0xfb, 0x50, 0xeb, 0x4a, 0xac, 0x22, 0xc0, 0xbb, 0x93, 0xf6, 0x0c, 0xac, 0x94, 0x83, 0xf1, 0x77, 0x13, 0x55, 0x3d, 0xca, 0x4b, 0x31, 0xe2, 0x72, 0x7b, 0x32, 0xe3, 0x50, 0xfe, 0x20, 0x4c, 0xec, 0xd9, 0xa7, 0xcd, 0xa4, 0xda, 0xda, 0x2e, 0x87, 0xff, 0x6f, 0x2b, 0x73, 0xe7, 0xb0, 0x78, 0x1e, 0x21, 0x2f, 0x34, 0xfe, 0x36, 0x36, 0x10, 0xf0, 0x18, 0xa7, 0x99, 0x37, 0x37, 0x55, 0xab, 0x46, 0x66, 0x7b, 0xb6, 0x52, 0x5d, 0x7d, 0xc7, 0xa0, 0xe8, 0x28, 0x90, 0x17, 0xf5, 0x48, 0x7f, 0xa6, 0x92, 0xef, 0x2f, 0xdd, 0xce, 0x38, 0xad, 0x3f, 0x45, 0x30, 0xde, 0x7e, 0xe5, 0x05, 0x66, 0x70, 0xa7, 0x35, 0xd3, 0x78, 0xd1, 0xef, 0xc9, 0x94, 0x81, 0xf8, 0xc9, 0xfb, 0xee, 0xa9, 0x9f, 0x56, 0x6a, 0x0b, 0x6e, 0x28, 0x46, 0x26, 0x44, 0xa6, 0xd9, 0xc6, 0xcc, 0x88, 0xfb } +, + /* Signature */ + 192, + { 0xb7, 0x57, 0xfa, 0x74, 0x7c, 0x5c, 0x87, 0x67, 0x66, 0xf3, 0x58, 0xac, 0xbf, 0xc7, 0xe7, 0xb8, 0x05, 0x96, 0x36, 0x8d, 0x0d, 0x86, 0x29, 0x50, 0xe5, 0x55, 0xf4, 0x71, 0x64, 0x6f, 0x64, 0x0e, 0x85, 0x1d, 0x61, 0x2a, 0x55, 0x6f, 0x55, 0xa7, 0x4a, 0x32, 0x92, 0x42, 0x9e, 0x4c, 0x14, 0xf7, 0x8b, 0xa3, 0xeb, 0xbd, 0x96, 0x87, 0xf3, 0x08, 0xde, 0xdb, 0x3c, 0xfe, 0xd7, 0x1f, 0x4a, 0x9d, 0xd2, 0x6f, 0xa5, 0x12, 0x2f, 0x7f, 0x71, 0x94, 0xae, 0xb6, 0x3b, 0xc8, 0xb7, 0x5c, 0x34, 0x31, 0x87, 0x11, 0x5a, 0x1d, 0xbd, 0x35, 0x95, 0x90, 0xf7, 0xff, 0x38, 0x62, 0xb7, 0x08, 0x85, 0xaf, 0x1c, 0xa9, 0x34, 0xb8, 0xce, 0xbc, 0x2c, 0xc9, 0xe6, 0x47, 0x25, 0x3f, 0xd1, 0x32, 0x7a, 0x2e, 0xd4, 0x24, 0x4d, 0xc8, 0xf5, 0x85, 0x55, 0xa6, 0x89, 0x7c, 0xa3, 0x22, 0x9c, 0x80, 0x1e, 0x7b, 0xf6, 0x28, 0xf5, 0x25, 0xe6, 0xc9, 0x48, 0x80, 0x4d, 0x0b, 0x1b, 0x6d, 0xbc, 0xd7, 0x90, 0x2a, 0xcd, 0xe7, 0xa2, 0x5b, 0xa5, 0x91, 0xd8, 0x86, 0xe2, 0x8d, 0xaa, 0x8d, 0xed, 0x5e, 0xe4, 0x01, 0xe3, 0x4e, 0x64, 0x12, 0xf1, 0xe6, 0x44, 0xee, 0xc1, 0x2a, 0xe9, 0x42, 0x61, 0x90, 0x6a, 0x17, 0x26, 0x11, 0xdd, 0x5a, 0x98, 0x67, 0x78, 0x9c, 0x41, 0x90, 0x34, 0x68, 0x84, 0x29, 0xe9, 0x06 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 14.18", + /* Message to be signed */ + 93, + { 0x9d, 0xc7, 0xce, 0x1d, 0x02, 0xca, 0xdc, 0xf1, 0x0d, 0xf1, 0x11, 0x04, 0x56, 0xb8, 0xa7, 0xa5, 0xea, 0x43, 0x76, 0xb2, 0x7e, 0x8b, 0xf8, 0xcc, 0x8d, 0xb8, 0x10, 0x49, 0xfd, 0xa3, 0xfb, 0xd0, 0xdb, 0x8a, 0x3d, 0x0f, 0x6b, 0xd7, 0x48, 0x6b, 0x8d, 0x84, 0xbf, 0x9f, 0xfd, 0x4b, 0x64, 0x17, 0x52, 0xdf, 0x7e, 0xdf, 0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, 0xb1, 0xf8, 0x1b, 0xbc, 0x0a, 0xe7, 0x31, 0xc6, 0xc0, 0xd9, 0xcf, 0xdd, 0x06, 0xc3, 0x31, 0xed, 0x89, 0xd7, 0xde, 0x1d, 0xe1, 0xdf, 0x46, 0xcf, 0x09, 0xce, 0x53, 0xdf, 0x15, 0x97, 0xfb, 0x69, 0x94, 0x68, 0x1c, 0x7f, 0xbe, 0x94, 0xc9, 0xb0, 0x8e, 0x50, 0xaa, 0x1b, 0x12, 0x41, 0x96, 0x02, 0x98, 0x7f, 0x37, 0xdd } + +} +, +{ + "PKCS#1 v1.5 Signature Example 14.19", + /* Message to be signed */ + 253, + { 0x87, 0xa6, 0x45, 0x61, 0x1b, 0xb1, 0x91, 0x85, 0x3f, 0x4f, 0xd9, 0xb7, 0x40, 0xb2, 0xde, 0x4c, 0x16, 0x3e, 0x75, 0x62, 0xb1, 0x17, 0x62, 0x63, 0x3e, 0x72, 0xdf, 0xb6, 0xf6, 0xbe, 0x7e, 0xfb, 0x90, 0x41, 0xa9, 0x65, 0x82, 0x94, 0x3a, 0xb2, 0x01, 0x83, 0x91, 0xc0, 0x5a, 0xdf, 0xab, 0x46, 0x4d, 0xd6, 0xe3, 0x3f, 0x96, 0x0d, 0xdb, 0xf3, 0xb1, 0x7a, 0xc6, 0x2b, 0xb7, 0x8a, 0xfc, 0x1c, 0x6a, 0x45, 0x39, 0x6c, 0x09, 0x08, 0x70, 0x7c, 0x62, 0x36, 0x12, 0x55, 0xcb, 0xf0, 0x9b, 0xad, 0x95, 0x9b, 0x31, 0x33, 0xda, 0x48, 0xd5, 0x32, 0xba, 0x7e, 0xf1, 0xd2, 0x0f, 0xb6, 0x57, 0x2a, 0x1f, 0x0e, 0xd6, 0xf2, 0xc6, 0xe1, 0xbe, 0xc1, 0xb1, 0x7c, 0xc3, 0x19, 0xba, 0xf7, 0x2a, 0x19, 0x8a, 0xa0, 0x01, 0xb8, 0x3d, 0x4e, 0x98, 0x69, 0xc3, 0x40, 0x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 0x62, 0x35, 0x36, 0x10, 0x13, 0x42, 0x69, 0x0d, 0xeb, 0x5f, 0xad, 0x90, 0x23, 0x78, 0x2f, 0x6d, 0xbe, 0x16, 0x43, 0xa4, 0x56, 0x18, 0x57, 0x4f, 0x16, 0x72, 0x81, 0x12, 0xa7, 0xe0, 0xef, 0x9f, 0x58, 0x65, 0x6f, 0x6a, 0xdb, 0xf4, 0x00, 0x40, 0x9f, 0x4a, 0xa5, 0x01, 0x3c, 0x15, 0x9a, 0x36, 0x8c, 0xa5, 0x9b, 0xde, 0x6b, 0x39, 0x18, 0xdf, 0xe1, 0xd8, 0x02, 0xfa, 0x6c, 0xfa, 0x06, 0xc9, 0xca, 0x31, 0xac, 0xa7, 0x8c, 0xb2, 0x63, 0xc8, 0xed, 0x91, 0x7a, 0xf9, 0xa9, 0xa7, 0x95, 0xd5, 0xe2, 0xc4, 0x01, 0xe7, 0x29, 0x96, 0x4c, 0xf7, 0xac, 0x28, 0xcc, 0xdb, 0x36, 0xd9, 0x59, 0xed, 0x7f, 0xd9, 0xaf, 0x1c, 0x47, 0x09, 0x7b, 0x62, 0x55, 0xc6, 0x4e, 0x1b, 0x16, 0xf2, 0x1d, 0x86, 0x87, 0x04, 0x55, 0xd5, 0xf0, 0xbf, 0x90, 0x1f, 0xcc, 0x68, 0xc3, 0x4b, 0x72, 0xc1, 0xbe, 0xe7, 0x2e, 0x6b, 0x8c, 0x4e, 0x36, 0xae, 0x33, 0x99, 0x6c, 0x7a, 0x59, 0xd0, 0x9a } + +} +, +{ + "PKCS#1 v1.5 Signature Example 14.20", + /* Message to be signed */ + 41, + { 0x03, 0x2e, 0x28, 0x3e, 0x59, 0x6e, 0x87, 0xfa, 0xa6, 0xcf, 0xcf, 0xb8, 0xfa, 0x04, 0xdf, 0x6a, 0x61, 0xe6, 0x11, 0xdf, 0xe7, 0x3b, 0xbf, 0x66, 0x8e, 0xe6, 0x7b, 0x49, 0x6b, 0xfb, 0x0f, 0xfb, 0x7f, 0x9d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f, 0x38, 0x1d, 0x71, 0x10, 0x09, 0x34, 0xfa, 0xda, 0x61, 0xc7, 0xcc, 0x22, 0xb8, 0xd2, 0xff, 0x8e, 0xb3, 0x5a } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 15: A 2048-bit RSA key pair", +{ + /* Modulus */ + 256, + { 0xdf, 0x27, 0x1f, 0xd2, 0x5f, 0x86, 0x44, 0x49, 0x6b, 0x0c, 0x81, 0xbe, 0x4b, 0xd5, 0x02, 0x97, 0xef, 0x09, 0x9b, 0x00, 0x2a, 0x6f, 0xd6, 0x77, 0x27, 0xeb, 0x44, 0x9c, 0xea, 0x56, 0x6e, 0xd6, 0xa3, 0x98, 0x1a, 0x71, 0x31, 0x2a, 0x14, 0x1c, 0xab, 0xc9, 0x81, 0x5c, 0x12, 0x09, 0xe3, 0x20, 0xa2, 0x5b, 0x32, 0x46, 0x4e, 0x99, 0x99, 0xf1, 0x8c, 0xa1, 0x3a, 0x9f, 0xd3, 0x89, 0x25, 0x58, 0xf9, 0xe0, 0xad, 0xef, 0xdd, 0x36, 0x50, 0xdd, 0x23, 0xa3, 0xf0, 0x36, 0xd6, 0x0f, 0xe3, 0x98, 0x84, 0x37, 0x06, 0xa4, 0x0b, 0x0b, 0x84, 0x62, 0xc8, 0xbe, 0xe3, 0xbc, 0xe1, 0x2f, 0x1f, 0x28, 0x60, 0xc2, 0x44, 0x4c, 0xdc, 0x6a, 0x44, 0x47, 0x6a, 0x75, 0xff, 0x4a, 0xa2, 0x42, 0x73, 0xcc, 0xbe, 0x3b, 0xf8, 0x02, 0x48, 0x46, 0x5f, 0x8f, 0xf8, 0xc3, 0xa7, 0xf3, 0x36, 0x7d, 0xfc, 0x0d, 0xf5, 0xb6, 0x50, 0x9a, 0x4f, 0x82, 0x81, 0x1c, 0xed, 0xd8, 0x1c, 0xda, 0xaa, 0x73, 0xc4, 0x91, 0xda, 0x41, 0x21, 0x70, 0xd5, 0x44, 0xd4, 0xba, 0x96, 0xb9, 0x7f, 0x0a, 0xfc, 0x80, 0x65, 0x49, 0x8d, 0x3a, 0x49, 0xfd, 0x91, 0x09, 0x92, 0xa1, 0xf0, 0x72, 0x5b, 0xe2, 0x4f, 0x46, 0x5c, 0xfe, 0x7e, 0x0e, 0xab, 0xf6, 0x78, 0x99, 0x6c, 0x50, 0xbc, 0x5e, 0x75, 0x24, 0xab, 0xf7, 0x3f, 0x15, 0xe5, 0xbe, 0xf7, 0xd5, 0x18, 0x39, 0x4e, 0x31, 0x38, 0xce, 0x49, 0x44, 0x50, 0x6a, 0xaa, 0xaf, 0x3f, 0x9b, 0x23, 0x6d, 0xca, 0xb8, 0xfc, 0x00, 0xf8, 0x7a, 0xf5, 0x96, 0xfd, 0xc3, 0xd9, 0xd6, 0xc7, 0x5c, 0xd5, 0x08, 0x36, 0x2f, 0xae, 0x2c, 0xbe, 0xdd, 0xcc, 0x4c, 0x74, 0x50, 0xb1, 0x7b, 0x77, 0x6c, 0x07, 0x9e, 0xcc, 0xa1, 0xf2, 0x56, 0x35, 0x1a, 0x43, 0xb9, 0x7d, 0xbe, 0x21, 0x53 } +, + /* Public exponent */ + 3, + { 0x01, 0x00, 0x01 } +, + /* Exponent */ + 256, + { 0x5b, 0xd9, 0x10, 0x25, 0x78, 0x30, 0xdc, 0xe1, 0x75, 0x20, 0xb0, 0x34, 0x41, 0xa5, 0x1a, 0x8c, 0xab, 0x94, 0x02, 0x0a, 0xc6, 0xec, 0xc2, 0x52, 0xc8, 0x08, 0xf3, 0x74, 0x3c, 0x95, 0xb7, 0xc8, 0x3b, 0x8c, 0x8a, 0xf1, 0xa5, 0x01, 0x43, 0x46, 0xeb, 0xc4, 0x24, 0x2c, 0xdf, 0xb5, 0xd7, 0x18, 0xe3, 0x0a, 0x73, 0x3e, 0x71, 0xf2, 0x91, 0xe4, 0xd4, 0x73, 0xb6, 0x1b, 0xfb, 0xa6, 0xda, 0xca, 0xed, 0x0a, 0x77, 0xbd, 0x1f, 0x09, 0x50, 0xae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, 0x33, 0xb0, 0x09, 0x7a, 0xec, 0x67, 0xc6, 0xdc, 0xb8, 0x00, 0xfc, 0x1a, 0x67, 0xf9, 0xbb, 0x05, 0x63, 0x61, 0x0f, 0x08, 0xeb, 0xc8, 0x74, 0x6a, 0xd1, 0x29, 0x77, 0x21, 0x36, 0xeb, 0x1d, 0xda, 0xf4, 0x64, 0x36, 0x45, 0x0d, 0x31, 0x83, 0x32, 0xa8, 0x49, 0x82, 0xfe, 0x5d, 0x28, 0xdb, 0xe5, 0xb3, 0xe9, 0x12, 0x40, 0x7c, 0x3e, 0x0e, 0x03, 0x10, 0x0d, 0x87, 0xd4, 0x36, 0xee, 0x40, 0x9e, 0xec, 0x1c, 0xf8, 0x5e, 0x80, 0xab, 0xa0, 0x79, 0xb2, 0xe6, 0x10, 0x6b, 0x97, 0xbc, 0xed } +, + /* Prime exponent 1 */ + 128, + { 0xed, 0x10, 0x2a, 0xcd, 0xb2, 0x68, 0x71, 0x53, 0x4d, 0x1c, 0x41, 0x4e, 0xca, 0xd9, 0xa4, 0xd7, 0x32, 0xfe, 0x95, 0xb1, 0x0e, 0xea, 0x37, 0x0d, 0xa6, 0x2f, 0x05, 0xde, 0x2c, 0x39, 0x3b, 0x1a, 0x63, 0x33, 0x03, 0xea, 0x74, 0x1b, 0x6b, 0x32, 0x69, 0xc9, 0x7f, 0x70, 0x4b, 0x35, 0x27, 0x02, 0xc9, 0xae, 0x79, 0x92, 0x2f, 0x7b, 0xe8, 0xd1, 0x0d, 0xb6, 0x7f, 0x02, 0x6a, 0x81, 0x45, 0xde, 0x41, 0xb3, 0x0c, 0x0a, 0x42, 0xbf, 0x92, 0x3b, 0xac, 0x5f, 0x75, 0x04, 0xc2, 0x48, 0x60, 0x4b, 0x9f, 0xaa, 0x57, 0xed, 0x6b, 0x32, 0x46, 0xc6, 0xba, 0x15, 0x8e, 0x36, 0xc6, 0x44, 0xf8, 0xb9, 0x54, 0x8f, 0xcf, 0x4f, 0x07, 0xe0, 0x54, 0xa5, 0x6f, 0x76, 0x86, 0x74, 0x05, 0x44, 0x40, 0xbc, 0x0d, 0xcb, 0xbc, 0x9b, 0x52, 0x8f, 0x64, 0xa0, 0x17, 0x06, 0xe0, 0x5b, 0x0b, 0x91, 0x10, 0x6f } +, + /* Prime exponent 2 */ + 128, + { 0x68, 0x27, 0x92, 0x4a, 0x85, 0xe8, 0x8b, 0x55, 0xba, 0x00, 0xf8, 0x21, 0x91, 0x28, 0xbd, 0x37, 0x24, 0xc6, 0xb7, 0xd1, 0xdf, 0xe5, 0x62, 0x9e, 0xf1, 0x97, 0x92, 0x5f, 0xec, 0xaf, 0xf5, 0xed, 0xb9, 0xcd, 0xf3, 0xa7, 0xbe, 0xfd, 0x8e, 0xa2, 0xe8, 0xdd, 0x37, 0x07, 0x13, 0x8b, 0x3f, 0xf8, 0x7c, 0x3c, 0x39, 0xc5, 0x7f, 0x43, 0x9e, 0x56, 0x2e, 0x2a, 0xa8, 0x05, 0xa3, 0x9d, 0x7c, 0xd7, 0x99, 0x66, 0xd2, 0xec, 0xe7, 0x84, 0x5f, 0x1d, 0xbc, 0x16, 0xbe, 0xe9, 0x99, 0x99, 0xe4, 0xd0, 0xbf, 0x9e, 0xec, 0xa4, 0x5f, 0xcd, 0xa8, 0xa8, 0x50, 0x00, 0x35, 0xfe, 0x6b, 0x5f, 0x03, 0xbc, 0x2f, 0x6d, 0x1b, 0xfc, 0x4d, 0x4d, 0x0a, 0x37, 0x23, 0x96, 0x1a, 0xf0, 0xcd, 0xce, 0x4a, 0x01, 0xee, 0xc8, 0x2d, 0x7f, 0x54, 0x58, 0xec, 0x19, 0xe7, 0x1b, 0x90, 0xee, 0xef, 0x7d, 0xff, 0x61 } +, + /* Coefficient */ + 128, + { 0x57, 0xb7, 0x38, 0x88, 0xd1, 0x83, 0xa9, 0x9a, 0x63, 0x07, 0x42, 0x22, 0x77, 0x55, 0x1a, 0x3d, 0x9e, 0x18, 0xad, 0xf0, 0x6a, 0x91, 0xe8, 0xb5, 0x5c, 0xef, 0xfe, 0xf9, 0x07, 0x7c, 0x84, 0x96, 0x94, 0x8e, 0xcb, 0x3b, 0x16, 0xb7, 0x81, 0x55, 0xcb, 0x2a, 0x3a, 0x57, 0xc1, 0x19, 0xd3, 0x79, 0x95, 0x1c, 0x01, 0x0a, 0xa6, 0x35, 0xed, 0xcf, 0x62, 0xd8, 0x4c, 0x5a, 0x12, 0x2a, 0x8d, 0x67, 0xab, 0x5f, 0xa9, 0xe5, 0xa4, 0xa8, 0x77, 0x2a, 0x1e, 0x94, 0x3b, 0xaf, 0xc7, 0x0a, 0xe3, 0xa4, 0xc1, 0xf0, 0xf3, 0xa4, 0xdd, 0xff, 0xae, 0xfd, 0x18, 0x92, 0xc8, 0xcb, 0x33, 0xbb, 0x0d, 0x0b, 0x95, 0x90, 0xe9, 0x63, 0xa6, 0x91, 0x10, 0xfb, 0x34, 0xdb, 0x7b, 0x90, 0x6f, 0xc4, 0xba, 0x28, 0x36, 0x99, 0x5a, 0xac, 0x7e, 0x52, 0x74, 0x90, 0xac, 0x95, 0x2a, 0x02, 0x26, 0x8a, 0x4f, 0x18 } + +} +, +{{ + "PKCS#1 v1.5 Signature Example 15.1", + /* Message to be signed */ + 229, + { 0xf4, 0x5d, 0x55, 0xf3, 0x55, 0x51, 0xe9, 0x75, 0xd6, 0xa8, 0xdc, 0x7e, 0xa9, 0xf4, 0x88, 0x59, 0x39, 0x40, 0xcc, 0x75, 0x69, 0x4a, 0x27, 0x8f, 0x27, 0xe5, 0x78, 0xa1, 0x63, 0xd8, 0x39, 0xb3, 0x40, 0x40, 0x84, 0x18, 0x08, 0xcf, 0x9c, 0x58, 0xc9, 0xb8, 0x72, 0x8b, 0xf5, 0xf9, 0xce, 0x8e, 0xe8, 0x11, 0xea, 0x91, 0x71, 0x4f, 0x47, 0xba, 0xb9, 0x2d, 0x0f, 0x6d, 0x5a, 0x26, 0xfc, 0xfe, 0xea, 0x6c, 0xd9, 0x3b, 0x91, 0x0c, 0x0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6, 0x21, 0x3a, 0xbe, 0x0a, 0xb5, 0x62, 0x5f, 0x87, 0xd1, 0x90, 0x25, 0xf0, 0x8d, 0x81, 0xda, 0xc7, 0xbd, 0x45, 0x86, 0xbc, 0x93, 0x82, 0x19, 0x1f, 0x6d, 0x28, 0x80, 0xf6, 0x22, 0x7e, 0x5d, 0xf3, 0xee, 0xd2, 0x1e, 0x77, 0x92, 0xd2, 0x49, 0x48, 0x04, 0x87, 0xf3, 0x65, 0x52, 0x61 } + +} +, +#ifdef LTC_TEST_EXT +{ + "PKCS#1 v1.5 Signature Example 15.2", + /* Message to be signed */ + 153, + { 0xc1, 0x4b, 0x4c, 0x60, 0x75, 0xb2, 0xf9, 0xaa, 0xd6, 0x61, 0xde, 0xf4, 0xec, 0xfd, 0x3c, 0xb9, 0x33, 0xc6, 0x23, 0xf4, 0xe6, 0x3b, 0xf5, 0x34, 0x10, 0xd2, 0xf0, 0x16, 0xd1, 0xab, 0x98, 0xe2, 0x72, 0x9e, 0xcc, 0xf8, 0x00, 0x6c, 0xd8, 0xe0, 0x80, 0x50, 0x73, 0x7d, 0x95, 0xfd, 0xbf, 0x29, 0x6b, 0x66, 0xf5, 0xb9, 0x79, 0x2a, 0x90, 0x29, 0x36, 0xc4, 0xf7, 0xac, 0x69, 0xf5, 0x14, 0x53, 0xce, 0x43, 0x69, 0x45, 0x2d, 0xc2, 0x2d, 0x96, 0xf0, 0x37, 0x74, 0x81, 0x14, 0x66, 0x20, 0x00, 0xdd, 0x9c, 0xd3, 0xa5, 0xe1, 0x79, 0xf4, 0xe0, 0xf8, 0x1f, 0xa6, 0xa0, 0x31, 0x1c, 0xa1, 0xae, 0xe6, 0x51, 0x9a, 0x0f, 0x63, 0xce, 0xc7, 0x8d, 0x27, 0xbb, 0x72, 0x63, 0x93, 0xfb, 0x7f, 0x1f, 0x88, 0xcd, 0xe7, 0xc9, 0x7f, 0x8a, 0x66, 0xcd, 0x66, 0x30, 0x12, 0x81, 0xda, 0xc3, 0xf3, 0xa4, 0x33, 0x24, 0x8c, 0x75, 0xd6, 0xc2, 0xdc, 0xd7, 0x08, 0xb6, 0xa9, 0x7b, 0x0a, 0x3f, 0x32, 0x5e, 0x0b, 0x29, 0x64, 0xf8, 0xa5, 0x81, 0x9e, 0x47, 0x9b } +, + /* Signature */ + 256, + { 0xaf, 0xa7, 0x34, 0x34, 0x62, 0xbe, 0xa1, 0x22, 0xcc, 0x14, 0x9f, 0xca, 0x70, 0xab, 0xda, 0xe7, 0x94, 0x46, 0x67, 0x7d, 0xb5, 0x37, 0x36, 0x66, 0xaf, 0x7d, 0xc3, 0x13, 0x01, 0x5f, 0x4d, 0xe7, 0x86, 0xe6, 0xe3, 0x94, 0x94, 0x6f, 0xad, 0x3c, 0xc0, 0xe2, 0xb0, 0x2b, 0xed, 0xba, 0x50, 0x47, 0xfe, 0x9e, 0x2d, 0x7d, 0x09, 0x97, 0x05, 0xe4, 0xa3, 0x9f, 0x28, 0x68, 0x32, 0x79, 0xcf, 0x0a, 0xc8, 0x5c, 0x15, 0x30, 0x41, 0x22, 0x42, 0xc0, 0xe9, 0x18, 0x95, 0x3b, 0xe0, 0x00, 0xe9, 0x39, 0xcf, 0x3b, 0xf1, 0x82, 0x52, 0x5e, 0x19, 0x93, 0x70, 0xfa, 0x79, 0x07, 0xeb, 0xa6, 0x9d, 0x5d, 0xb4, 0x63, 0x10, 0x17, 0xc0, 0xe3, 0x6d, 0xf7, 0x03, 0x79, 0xb5, 0xdb, 0x8d, 0x4c, 0x69, 0x5a, 0x97, 0x9a, 0x8e, 0x61, 0x73, 0x22, 0x40, 0x65, 0xd7, 0xdc, 0x15, 0x13, 0x2e, 0xf2, 0x8c, 0xd8, 0x22, 0x79, 0x51, 0x63, 0x06, 0x3b, 0x54, 0xc6, 0x51, 0x14, 0x1b, 0xe8, 0x6d, 0x36, 0xe3, 0x67, 0x35, 0xbc, 0x61, 0xf3, 0x1f, 0xca, 0x57, 0x4e, 0x53, 0x09, 0xf3, 0xa3, 0xbb, 0xdf, 0x91, 0xef, 0xf1, 0x2b, 0x99, 0xe9, 0xcc, 0x17, 0x44, 0xf1, 0xee, 0x9a, 0x1b, 0xd2, 0x2c, 0x5b, 0xad, 0x96, 0xad, 0x48, 0x19, 0x29, 0x25, 0x1f, 0x03, 0x43, 0xfd, 0x36, 0xbc, 0xf0, 0xac, 0xde, 0x7f, 0x11, 0xe5, 0xad, 0x60, 0x97, 0x77, 0x21, 0x20, 0x27, 0x96, 0xfe, 0x06, 0x1f, 0x9a, 0xda, 0x1f, 0xc4, 0xc8, 0xe0, 0x0d, 0x60, 0x22, 0xa8, 0x35, 0x75, 0x85, 0xff, 0xe9, 0xfd, 0xd5, 0x93, 0x31, 0xa2, 0x8c, 0x4a, 0xa3, 0x12, 0x15, 0x88, 0xfb, 0x6c, 0xf6, 0x83, 0x96, 0xd8, 0xac, 0x05, 0x46, 0x59, 0x95, 0x00, 0xc9, 0x70, 0x85, 0x00, 0xa5, 0x97, 0x2b, 0xd5, 0x4f, 0x72, 0xcf, 0x8d, 0xb0, 0xc8 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 15.3", + /* Message to be signed */ + 243, + { 0xd0, 0x23, 0x71, 0xad, 0x7e, 0xe4, 0x8b, 0xbf, 0xdb, 0x27, 0x63, 0xde, 0x7a, 0x84, 0x3b, 0x94, 0x08, 0xce, 0x5e, 0xb5, 0xab, 0xf8, 0x47, 0xca, 0x3d, 0x73, 0x59, 0x86, 0xdf, 0x84, 0xe9, 0x06, 0x0b, 0xdb, 0xcd, 0xd3, 0xa5, 0x5b, 0xa5, 0x5d, 0xde, 0x20, 0xd4, 0x76, 0x1e, 0x1a, 0x21, 0xd2, 0x25, 0xc1, 0xa1, 0x86, 0xf4, 0xac, 0x4b, 0x30, 0x19, 0xd3, 0xad, 0xf7, 0x8f, 0xe6, 0x33, 0x46, 0x67, 0xf5, 0x6f, 0x70, 0xc9, 0x01, 0xa0, 0xa2, 0x70, 0x0c, 0x6f, 0x0d, 0x56, 0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, 0x39, 0x7b, 0x1a, 0x1b, 0x9d, 0x3b, 0xf7, 0x61, 0x2c, 0xcb, 0xe5, 0xba, 0xcd, 0x2b, 0x38, 0xf0, 0xa9, 0x83, 0x97, 0xb2, 0x4c, 0x83, 0x65, 0x8f, 0xb6, 0xc0, 0xb4, 0x14, 0x0e, 0xf1, 0x19, 0x70, 0xc4, 0x63, 0x0d, 0x44, 0x34, 0x4e, 0x76, 0xea, 0xed, 0x74, 0xdc, 0xbe, 0xe8, 0x11, 0xdb, 0xf6, 0x57, 0x59, 0x41, 0xf0, 0x8a, 0x65, 0x23, 0xb8 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 15.4", + /* Message to be signed */ + 58, + { 0x29, 0x03, 0x55, 0x84, 0xab, 0x7e, 0x02, 0x26, 0xa9, 0xec, 0x4b, 0x02, 0xe8, 0xdc, 0xf1, 0x27, 0x2d, 0xc9, 0xa4, 0x1d, 0x73, 0xe2, 0x82, 0x00, 0x07, 0xb0, 0xf6, 0xe2, 0x1f, 0xec, 0xcd, 0x5b, 0xd9, 0xdb, 0xb9, 0xef, 0x88, 0xcd, 0x67, 0x58, 0x76, 0x9e, 0xe1, 0xf9, 0x56, 0xda, 0x7a, 0xd1, 0x84, 0x41, 0xde, 0x6f, 0xab, 0x83, 0x86, 0xdb, 0xc6, 0x93 } +, + /* Signature */ + 256, + { 0x28, 0xd8, 0xe3, 0xfc, 0xd5, 0xdd, 0xdb, 0x21, 0xff, 0xbd, 0x8d, 0xf1, 0x63, 0x0d, 0x73, 0x77, 0xaa, 0x26, 0x51, 0xe1, 0x4c, 0xad, 0x1c, 0x0e, 0x43, 0xcc, 0xc5, 0x2f, 0x90, 0x7f, 0x94, 0x6d, 0x66, 0xde, 0x72, 0x54, 0xe2, 0x7a, 0x6c, 0x19, 0x0e, 0xb0, 0x22, 0xee, 0x89, 0xec, 0xf6, 0x22, 0x4b, 0x09, 0x7b, 0x71, 0x06, 0x8c, 0xd6, 0x07, 0x28, 0xa1, 0xae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, 0x40, 0xde, 0x01, 0x63, 0x55, 0x45, 0x3d, 0x6c, 0x95, 0xae, 0x72 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 15.5", + /* Message to be signed */ + 14, + { 0xbd, 0xa3, 0xa1, 0xc7, 0x90, 0x59, 0xea, 0xe5, 0x98, 0x30, 0x8d, 0x3d, 0xf6, 0x09 } +, + /* Signature */ + 256, + { 0xa1, 0x56, 0x17, 0x6c, 0xb9, 0x67, 0x77, 0xc7, 0xfb, 0x96, 0x10, 0x5d, 0xbd, 0x91, 0x3b, 0xc4, 0xf7, 0x40, 0x54, 0xf6, 0x80, 0x7c, 0x60, 0x08, 0xa1, 0xa9, 0x56, 0xea, 0x92, 0xc1, 0xf8, 0x1c, 0xb8, 0x97, 0xdc, 0x4b, 0x92, 0xef, 0x9f, 0x4e, 0x40, 0x66, 0x8d, 0xc7, 0xc5, 0x56, 0x90, 0x1a, 0xcb, 0x6c, 0xf2, 0x69, 0xfe, 0x61, 0x5b, 0x0f, 0xb7, 0x2b, 0x30, 0xa5, 0x13, 0x38, 0x69, 0x23, 0x14, 0xb0, 0xe5, 0x87, 0x8a, 0x88, 0xc2, 0xc7, 0x77, 0x4b, 0xd1, 0x69, 0x39, 0xb5, 0xab, 0xd8, 0x2b, 0x44, 0x29, 0xd6, 0x7b, 0xd7, 0xac, 0x8e, 0x5e, 0xa7, 0xfe, 0x92, 0x4e, 0x20, 0xa6, 0xec, 0x66, 0x22, 0x91, 0xf2, 0x54, 0x8d, 0x73, 0x4f, 0x66, 0x34, 0x86, 0x8b, 0x03, 0x9a, 0xa5, 0xf9, 0xd4, 0xd9, 0x06, 0xb2, 0xd0, 0xcb, 0x85, 0x85, 0xbf, 0x42, 0x85, 0x47, 0xaf, 0xc9, 0x1c, 0x6e, 0x20, 0x52, 0xdd, 0xcd, 0x00, 0x1c, 0x3e, 0xf8, 0xc8, 0xee, 0xfc, 0x3b, 0x6b, 0x2a, 0x82, 0xb6, 0xf9, 0xc8, 0x8c, 0x56, 0xf2, 0xe2, 0xc3, 0xcb, 0x0b, 0xe4, 0xb8, 0x0d, 0xa9, 0x5e, 0xba, 0x37, 0x1d, 0x8b, 0x5f, 0x60, 0xf9, 0x25, 0x38, 0x74, 0x3d, 0xdb, 0xb5, 0xda, 0x29, 0x72, 0xc7, 0x1f, 0xe7, 0xb9, 0xf1, 0xb7, 0x90, 0x26, 0x8a, 0x0e, 0x77, 0x0f, 0xc5, 0xeb, 0x4d, 0x5d, 0xd8, 0x52, 0x47, 0xd4, 0x8a, 0xe2, 0xec, 0x3f, 0x26, 0x25, 0x5a, 0x39, 0x85, 0x52, 0x02, 0x06, 0xa1, 0xf2, 0x68, 0xe4, 0x83, 0xe9, 0xdb, 0xb1, 0xd5, 0xca, 0xb1, 0x90, 0x91, 0x76, 0x06, 0xde, 0x31, 0xe7, 0xc5, 0x18, 0x2d, 0x8f, 0x15, 0x1b, 0xf4, 0x1d, 0xfe, 0xcc, 0xae, 0xd7, 0xcd, 0xe6, 0x90, 0xb2, 0x16, 0x47, 0x10, 0x6b, 0x49, 0x0c, 0x72, 0x9d, 0x54, 0xa8, 0xfe, 0x28, 0x02, 0xa6, 0xd1, 0x26 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 15.6", + /* Message to be signed */ + 97, + { 0xc1, 0x87, 0x91, 0x5e, 0x4e, 0x87, 0xda, 0x81, 0xc0, 0x8e, 0xd4, 0x35, 0x6a, 0x0c, 0xce, 0xac, 0x1c, 0x4f, 0xb5, 0xc0, 0x46, 0xb4, 0x52, 0x81, 0xb3, 0x87, 0xec, 0x28, 0xf1, 0xab, 0xfd, 0x56, 0x7e, 0x54, 0x6b, 0x23, 0x6b, 0x37, 0xd0, 0x1a, 0xe7, 0x1d, 0x3b, 0x28, 0x34, 0x36, 0x5d, 0x3d, 0xf3, 0x80, 0xb7, 0x50, 0x61, 0xb7, 0x36, 0xb0, 0x13, 0x0b, 0x07, 0x0b, 0xe5, 0x8a, 0xe8, 0xa4, 0x6d, 0x12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 0x85, 0x95, 0x71, 0x24, 0xdf, 0x80, 0x80, 0xfe, 0xe1, 0xe1, 0x49, 0xaf, 0x93, 0x99, 0x89, 0xe8, 0x6b, 0x26, 0xc8, 0x5a, 0x58, 0x81, 0xfa, 0xe8, 0x67, 0x3d, 0x9f, 0xd4, 0x08, 0x00, 0xdd, 0x13, 0x4e, 0xb9, 0xbd, 0xb6, 0x41, 0x0f, 0x42, 0x0b, 0x0a, 0xa9, 0x7b, 0x20, 0xef, 0xcf, 0x2e, 0xb0, 0xc8, 0x07, 0xfa, 0xeb, 0x83, 0xa3, 0xcc, 0xd9, 0xb5, 0x1d, 0x45, 0x53, 0xe4, 0x1d, 0xfc, 0x0d, 0xf6, 0xca, 0x80, 0xa1, 0xe8, 0x1d, 0xc2, 0x34, 0xbb, 0x83, 0x89, 0xdd, 0x19, 0x5a, 0x38, 0xb4, 0x2d, 0xe4, 0xed, 0xc4, 0x9d, 0x34, 0x64, 0x78, 0xb9, 0xf1, 0x1f, 0x05, 0x57, 0x20, 0x5f, 0x5b, 0x0b, 0xd7, 0xff, 0xe9, 0xc8, 0x50, 0xf3, 0x96, 0xd7, 0xc4 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 15.7", + /* Message to be signed */ + 121, + { 0xab, 0xfa, 0x2e, 0xcb, 0x7d, 0x29, 0xbd, 0x5b, 0xcb, 0x99, 0x31, 0xce, 0x2b, 0xad, 0x2f, 0x74, 0x38, 0x3e, 0x95, 0x68, 0x3c, 0xee, 0x11, 0x02, 0x2f, 0x08, 0xe8, 0xe7, 0xd0, 0xb8, 0xfa, 0x05, 0x8b, 0xf9, 0xeb, 0x7e, 0xb5, 0xf9, 0x88, 0x68, 0xb5, 0xbb, 0x1f, 0xb5, 0xc3, 0x1c, 0xed, 0xa3, 0xa6, 0x4f, 0x1a, 0x12, 0xcd, 0xf2, 0x0f, 0xcd, 0x0e, 0x5a, 0x24, 0x6d, 0x7a, 0x17, 0x73, 0xd8, 0xdb, 0xa0, 0xe3,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x75, 0x4b, 0x13, 0x44, 0x85, 0x84, 0x2f, 0xe7, 0x09, 0xd3, 0x78, 0x44, 0x4d, 0x8e, 0x36, 0xb1, 0x72, 0x4a, 0x4f, 0xda, 0x21, 0xca, 0xfe, 0xe6, 0x53, 0xab, 0x80, 0x74, 0x7f, 0x79, 0x52, 0xee, 0x80, 0x4d, 0xea, 0xb1, 0x03, 0x9d, 0x84, 0x13, 0x99, 0x45, 0xbb, 0xf4, 0xbe, 0x82, 0x00, 0x87, 0x53, 0xf3, 0xc5, 0x4c, 0x78, 0x21, 0xa1, 0xd2, 0x41, 0xf4, 0x21, 0x79, 0xc7, 0x94, 0xef, 0x70, 0x42, 0xbb, 0xf9, 0x95, 0x56, 0x56, 0x22, 0x2e, 0x45, 0xc3, 0x43, 0x69, 0xa3, 0x84, 0x69, 0x7b, 0x6a, 0xe7, 0x42, 0xe1, 0x8f, 0xa5, 0xca, 0x7a, 0xba, 0xd2, 0x7d, 0x9f, 0xe7, 0x10, 0x52, 0xe3, 0x31, 0x0d, 0x0f, 0x52, 0xc8, 0xd1, 0x2e, 0xa3, 0x3b, 0xf0, 0x53, 0xa3, 0x00, 0xf4, 0xaf, 0xc4, 0xf0, 0x98, 0xdf, 0x4e, 0x6d, 0x88, 0x67, 0x79, 0xd6, 0x45, 0x94, 0xd3, 0x69, 0x15, 0x8f, 0xdb, 0xc1, 0xf6, 0x94 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 15.8", + /* Message to be signed */ + 224, + { 0xdf, 0x40, 0x44, 0xa8, 0x9a, 0x83, 0xe9, 0xfc, 0xbf, 0x12, 0x62, 0x54, 0x0a, 0xe3, 0x03, 0x8b, 0xbc, 0x90, 0xf2, 0xb2, 0x62, 0x8b, 0xf2, 0xa4, 0x46, 0x7a, 0xc6, 0x77, 0x22, 0xd8, 0x54, 0x6b, 0x3a, 0x71, 0xcb, 0x0e, 0xa4, 0x16, 0x69, 0xd5, 0xb4, 0xd6, 0x18, 0x59, 0xc1, 0xb4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0xe5, 0x9d, 0x6f, 0xe4, 0xb8, 0xff, 0x6e, 0x80, 0x48, 0xcc, 0xc0, 0xf3, 0x8f, 0x28, 0x36, 0xfd, 0x3d, 0xfe, 0x91, 0xbf, 0x4a, 0x38, 0x6e, 0x1e, 0xcc, 0x2c, 0x32, 0x83, 0x9f, 0x0c, 0xa4, 0xd1, 0xb2, 0x7a, 0x56, 0x8f, 0xa9, 0x40, 0xdd, 0x64, 0xad, 0x16, 0xbd, 0x01, 0x25, 0xd0, 0x34, 0x8e, 0x38, 0x30, 0x85, 0xf0, 0x88, 0x94, 0x86, 0x1c, 0xa1, 0x89, 0x87, 0x22, 0x7d, 0x37, 0xb4, 0x2b, 0x58, 0x4a, 0x83, 0x57, 0xcb, 0x04 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 15.9", + /* Message to be signed */ + 183, + { 0xea, 0x94, 0x1f, 0xf0, 0x6f, 0x86, 0xc2, 0x26, 0x92, 0x7f, 0xcf, 0x0e, 0x3b, 0x11, 0xb0, 0x87, 0x26, 0x76, 0x17, 0x0c, 0x1b, 0xfc, 0x33, 0xbd, 0xa8, 0xe2, 0x65, 0xc7, 0x77, 0x71, 0xf9, 0xd0, 0x85, 0x01, 0x64, 0xa5, 0xee, 0xcb, 0xcc, 0x5c, 0xe8, 0x27, 0xfb, 0xfa, 0x07, 0xc8, 0x52, 0x14, 0x79, 0x6d, 0x81, 0x27, 0xe8, 0xca, 0xa8, 0x18, 0x94, 0xea, 0x61, 0xce, 0xb1, 0x44, 0x9e, 0x72, 0xfe, 0xa0, 0xa4, 0xc9, 0x43, 0xb2, 0xda, 0x6d, 0x9b, 0x10, 0x5f, 0xe0, 0x53, 0xb9, 0x03, 0x9a, 0x9c, 0xc5, 0x3d, 0x42, 0x0b, 0x75, 0x39, 0xfa, 0xb2, 0x23, 0x9c, 0x6b, 0x51, 0xd1, 0x7e, 0x69, 0x4c, 0x95, 0x7d, 0x4b, 0x0f, 0x09, 0x84, 0x46, 0x18, 0x79,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, 0xe3, 0x4e, 0xd6, 0x5a, 0xb6, 0x05, 0xb8, 0xde, 0x4f, 0xcf, 0xa6, 0x40, 0x47, 0x4a, 0x54, 0xa8, 0x25, 0x1b, 0xbb, 0x73, 0x26, 0xa4, 0x2d, 0x08, 0x58, 0x5c, 0xfc, 0xfc, 0x95, 0x67, 0x69, 0xb1, 0x5b, 0x6d, 0x7f, 0xdf, 0x7d, 0xa8, 0x4f, 0x81, 0x97, 0x6e, 0xaa, 0x41, 0xd6, 0x92, 0x38, 0x0f, 0xf1, 0x0e, 0xae, 0xcf, 0xe0, 0xa5, 0x79, 0x68, 0x29, 0x09, 0xb5, 0x52, 0x1f, 0xad, 0xe8, 0x54, 0xd7, 0x97, 0xb8, 0xa0, 0x34, 0x5b, 0x9a, 0x86, 0x4e, 0x05, 0x88, 0xf6, 0xca, 0xdd, 0xbf, 0x65, 0xf1, 0x77, 0x99, 0x8e, 0x18, 0x0d, 0x1f, 0x10, 0x24, 0x43, 0xe6, 0xdc, 0xa5, 0x3a, 0x94, 0x82, 0x3c, 0xaa, 0x9c, 0x3b, 0x35, 0xf3, 0x22, 0x58, 0x3c, 0x70, 0x3a, 0xf6, 0x74, 0x76, 0x15, 0x9e, 0xc7, 0xec, 0x93, 0xd1, 0x76, 0x9b, 0x30, 0x0a, 0xf0, 0xe7, 0x15, 0x7d, 0xc2, 0x98, 0xc6, 0xcd, 0x2d, 0xee, 0x22, 0x62, 0xf8, 0xcd, 0xdc, 0x10, 0xf1, 0x1e, 0x01, 0x74, 0x14, 0x71, 0xbb, 0xfd, 0x65, 0x18, 0xa1, 0x75, 0x73, 0x45, 0x75 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 15.10", + /* Message to be signed */ + 65, + { 0xd8, 0xb8, 0x16, 0x45, 0xc1, 0x3c, 0xd7, 0xec, 0xf5, 0xd0, 0x0e, 0xd2, 0xc9, 0x1b, 0x9a, 0xcd, 0x46, 0xc1, 0x55, 0x68, 0xe5, 0x30, 0x3c, 0x4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xb9, 0x26, 0x0b, 0x91, 0xb1, 0xa3, 0x8e, 0x47, 0x24, 0x20, 0x01, 0xff, 0x45, 0x2f, 0x8d, 0xe1, 0x0c, 0xa6, 0xea, 0xea, 0xdc, 0xaf, 0x9e, 0xdc, 0x28, 0x95, 0x6f, 0x28, 0xa7, 0x11, 0x29, 0x1f, 0xc9, 0xa8, 0x08, 0x78, 0xb8, 0xba, 0x4c, 0xfe, 0x25, 0xb8, 0x28, 0x1c, 0xb8, 0x0b, 0xc9, 0xcd, 0x6d, 0x2b, 0xd1, 0x82, 0x52, 0x46, 0xee, 0xbe, 0x25, 0x2d, 0x99, 0x57, 0xef, 0x93, 0x70, 0x73, 0x52, 0x08, 0x4e, 0x6d, 0x36, 0xd4, 0x23, 0x55, 0x1b, 0xf2, 0x66, 0xa8, 0x53, 0x40, 0xfb, 0x4a, 0x6a, 0xf3, 0x70, 0x88, 0x0a, 0xab, 0x07, 0x15, 0x3d, 0x01, 0xf4, 0x8d, 0x08, 0x6d, 0xf0, 0xbf, 0xbe, 0xc0, 0x5e, 0x7b, 0x44, 0x3b, 0x97, 0xe7, 0x17, 0x18, 0x97, 0x0e, 0x2f, 0x4b, 0xf6, 0x20, 0x23, 0xe9, 0x5b, 0x67 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 15.11", + /* Message to be signed */ + 130, + { 0xe5, 0x73, 0x9b, 0x6c, 0x14, 0xc9, 0x2d, 0x51, 0x0d, 0x95, 0xb8, 0x26, 0x93, 0x33, 0x37, 0xff, 0x0d, 0x24, 0xef, 0x72, 0x1a, 0xc4, 0xef, 0x64, 0xc2, 0xba, 0xd2, 0x64, 0xbe, 0x8b, 0x44, 0xef, 0xa1, 0x51, 0x6e, 0x08, 0xa2, 0x7e, 0xb6, 0xb6, 0x11, 0xd3, 0x30, 0x1d, 0xf0, 0x06, 0x2d, 0xae, 0xfc, 0x73, 0xa8, 0xc0, 0xd9, 0x2e, 0x2c, 0x52, 0x1f, 0xac, 0xbc, 0x7b, 0x26, 0x47, 0x38, 0x76, 0x7e, 0xa6, 0xfc, 0x97, 0xd5, 0x88, 0xa0, 0xba, 0xf6, 0xce, 0x50, 0xad, 0xf7, 0x9e, 0x60, 0x0b, 0xd2, 0x9e, 0x34, 0x5f, 0xcb, 0x1d, 0xba, 0x71, 0xac, 0x5c, 0x02, 0x89, 0x02, 0x3f, 0xe4, 0xa8, 0x2b, 0x46, 0xa5, 0x40, 0x77, 0x19, 0x19, 0x7d, 0x2e, 0x95, 0x8e, 0x35, 0x31, 0xfd, 0x54, 0xae, 0xf9, 0x03, 0xaa, 0xbb, 0x43, 0x55, 0xf8, 0x83, 0x18, 0x99, 0x4e, 0xd3, 0xc3, 0xdd, 0x62, 0xf4, 0x20, 0xa7 } +, + /* Signature */ + 256, + { 0xbe, 0x40, 0xa5, 0xfb, 0x94, 0xf1, 0x13, 0xe1, 0xb3, 0xef, 0xf6, 0xb6, 0xa3, 0x39, 0x86, 0xf2, 0x02, 0xe3, 0x63, 0xf0, 0x74, 0x83, 0xb7, 0x92, 0xe6, 0x8d, 0xfa, 0x55, 0x54, 0xdf, 0x04, 0x66, 0xcc, 0x32, 0x15, 0x09, 0x50, 0x78, 0x3b, 0x4d, 0x96, 0x8b, 0x63, 0x9a, 0x04, 0xfd, 0x2f, 0xb9, 0x7f, 0x6e, 0xb9, 0x67, 0x02, 0x1f, 0x5a, 0xdc, 0xcb, 0x9f, 0xca, 0x95, 0xac, 0xc8, 0xf2, 0xcd, 0x88, 0x5a, 0x38, 0x0b, 0x0a, 0x4e, 0x82, 0xbc, 0x76, 0x07, 0x64, 0xdb, 0xab, 0x88, 0xc1, 0xe6, 0xc0, 0x25, 0x5c, 0xaa, 0x94, 0xf2, 0x32, 0x19, 0x9d, 0x6f, 0x59, 0x7c, 0xc9, 0x14, 0x5b, 0x00, 0xe3, 0xd4, 0xba, 0x34, 0x6b, 0x55, 0x9a, 0x88, 0x33, 0xad, 0x15, 0x16, 0xad, 0x51, 0x63, 0xf0, 0x16, 0xaf, 0x6a, 0x59, 0x83, 0x1c, 0x82, 0xea, 0x13, 0xc8, 0x22, 0x4d, 0x84, 0xd0, 0x76, 0x5a, 0x9d, 0x12, 0x38, 0x4d, 0xa4, 0x60, 0xa8, 0x53, 0x1b, 0x4c, 0x40, 0x7e, 0x04, 0xf4, 0xf3, 0x50, 0x70, 0x9e, 0xb9, 0xf0, 0x8f, 0x5b, 0x22, 0x0f, 0xfb, 0x45, 0xab, 0xf6, 0xb7, 0x5d, 0x15, 0x79, 0xfd, 0x3f, 0x1e, 0xb5, 0x5f, 0xc7, 0x5b, 0x00, 0xaf, 0x8b, 0xa3, 0xb0, 0x87, 0x82, 0x7f, 0xe9, 0xae, 0x9f, 0xb4, 0xf6, 0xc5, 0xfa, 0x63, 0x03, 0x1f, 0xe5, 0x82, 0x85, 0x2f, 0xe2, 0x83, 0x4f, 0x9c, 0x89, 0xbf, 0xf5, 0x3e, 0x25, 0x52, 0x21, 0x6b, 0xc7, 0xc1, 0xd4, 0xa3, 0xd5, 0xdc, 0x2b, 0xa6, 0x95, 0x5c, 0xd9, 0xb1, 0x7d, 0x13, 0x63, 0xe7, 0xfe, 0xe8, 0xed, 0x76, 0x29, 0x75, 0x3f, 0xf3, 0x12, 0x5e, 0xdd, 0x48, 0x52, 0x1a, 0xe3, 0xb9, 0xb0, 0x32, 0x17, 0xf4, 0x49, 0x6d, 0x0d, 0x8e, 0xde, 0x57, 0xac, 0xbc, 0x5b, 0xd4, 0xde, 0xae, 0x74, 0xa5, 0x6f, 0x86, 0x67, 0x1d, 0xe2 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 15.12", + /* Message to be signed */ + 256, + { 0x7a, 0xf4, 0x28, 0x35, 0x91, 0x7a, 0x88, 0xd6, 0xb3, 0xc6, 0x71, 0x6b, 0xa2, 0xf5, 0xb0, 0xd5, 0xb2, 0x0b, 0xd4, 0xe2, 0xe6, 0xe5, 0x74, 0xe0, 0x6a, 0xf1, 0xee, 0xf7, 0xc8, 0x11,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0x7b, 0x07, 0x95, 0xf5, 0xc6, 0x55, 0xe9, 0xac, 0xc4, 0xe3, 0xec, 0x18, 0x51, 0x40, 0xd1, 0x0c, 0xef, 0x05, 0x34, 0x64, 0xab, 0x17, 0x5c, 0x83, 0xbd, 0x83, 0x93, 0x5e, 0x3d, 0xab, 0xaf, 0x34, 0x62, 0xee, 0xbe, 0x63, 0xd1, 0x5f, 0x57, 0x3d, 0x26, 0x9a } +, + /* Signature */ + 256, + { 0x4e, 0x78, 0xc5, 0x90, 0x2b, 0x80, 0x79, 0x14, 0xd1, 0x2f, 0xa5, 0x37, 0xae, 0x68, 0x71, 0xc8, 0x6d, 0xb8, 0x02, 0x1e, 0x55, 0xd1, 0xad, 0xb8, 0xeb, 0x0c, 0xcf, 0x1b, 0x8f, 0x36, 0xab, 0x7d, 0xad, 0x1f, 0x68, 0x2e, 0x94, 0x7a, 0x62, 0x70, 0x72, 0xf0, 0x3e, 0x62, 0x73, 0x71, 0x78, 0x1d, 0x33, 0x22, 0x1d, 0x17, 0x4a, 0xbe, 0x46, 0x0d, 0xbd, 0x88, 0x56, 0x0c, 0x22, 0xf6, 0x90, 0x11, 0x6e, 0x2f, 0xbb, 0xe6, 0xe9, 0x64, 0x36, 0x3a, 0x3e, 0x52, 0x83, 0xbb, 0x5d, 0x94, 0x6e, 0xf1, 0xc0, 0x04, 0x7e, 0xba, 0x03, 0x8c, 0x75, 0x6c, 0x40, 0xbe, 0x79, 0x23, 0x05, 0x58, 0x09, 0xb0, 0xe9, 0xf3, 0x4a, 0x03, 0xa5, 0x88, 0x15, 0xeb, 0xdd, 0xe7, 0x67, 0x93, 0x1f, 0x01, 0x8f, 0x6f, 0x18, 0x78, 0xf2, 0xef, 0x4f, 0x47, 0xdd, 0x37, 0x40, 0x51, 0xdd, 0x48, 0x68, 0x5d, 0xed, 0x6e, 0xfb, 0x3e, 0xa8, 0x02, 0x1f, 0x44, 0xbe, 0x1d, 0x7d, 0x14, 0x93, 0x98, 0xf9, 0x8e, 0xa9, 0xc0, 0x8d, 0x62, 0x88, 0x8e, 0xbb, 0x56, 0x19, 0x2d, 0x17, 0x74, 0x7b, 0x6b, 0x8e, 0x17, 0x09, 0x54, 0x31, 0xf1, 0x25, 0xa8, 0xa8, 0xe9, 0x96, 0x2a, 0xa3, 0x1c, 0x28, 0x52, 0x64, 0xe0, 0x8f, 0xb2, 0x1a, 0xac, 0x33, 0x6c, 0xe6, 0xc3, 0x8a, 0xa3, 0x75, 0xe4, 0x2b, 0xc9, 0x2a, 0xb0, 0xab, 0x91, 0x03, 0x84, 0x31, 0xe1, 0xf9, 0x2c, 0x39, 0xd2, 0xaf, 0x5d, 0xed, 0x7e, 0x43, 0xbc, 0x15, 0x1e, 0x6e, 0xbe, 0xa4, 0xc3, 0xe2, 0x58, 0x3a, 0xf3, 0x43, 0x7e, 0x82, 0xc4, 0x3c, 0x5e, 0x3b, 0x5b, 0x07, 0xcf, 0x03, 0x59, 0x68, 0x3d, 0x22, 0x98, 0xe3, 0x59, 0x48, 0xed, 0x80, 0x6c, 0x06, 0x3c, 0x60, 0x6e, 0xa1, 0x78, 0x15, 0x0b, 0x1e, 0xfc, 0x15, 0x85, 0x69, 0x34, 0xc7, 0x25, 0x5c, 0xfe } + +} +, +{ + "PKCS#1 v1.5 Signature Example 15.13", + /* Message to be signed */ + 59, + { 0xeb, 0xae, 0xf3, 0xf9, 0xf2, 0x3b, 0xdf, 0xe5, 0xfa, 0x6b, 0x8a, 0xf4, 0xc2, 0x08, 0xc1, 0x89, 0xf2, 0x25, 0x1b, 0xf3, 0x2f, 0x5f, 0x13, 0x7b, 0x9d, 0xe4, 0x40, 0x63, 0x78, 0x68, 0x6b, 0x3f, 0x07, 0x21, 0xf6, 0x2d, 0x24, 0xcb, 0x86, 0x88, 0xd6, 0xfc, 0x41, 0xa2, 0x7c, 0xba, 0xe2, 0x1d, 0x30, 0xe4, 0x29, 0xfe, 0xac, 0xc7, 0x11, 0x19, 0x41, 0xc2, 0x77 } +, + /*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 0xef, 0x52, 0x0d, 0xbb, 0x40, 0x5f, 0x42, 0xce, 0xe9, 0x54, 0x25, 0xc3, 0x73, 0xa9, 0x75, 0xe1, 0xcd, 0xd0, 0x32, 0xc4, 0x96, 0x22, 0xc8, 0x50, 0x79, 0xb0, 0x9e, 0x88, 0xda, 0xb2, 0xb1, 0x39, 0x69, 0xef, 0x7a, 0x72, 0x39, 0x73, 0x78, 0x10, 0x40, 0x45, 0x9f, 0x57, 0xd5, 0x01, 0x36, 0x38, 0x48, 0x3d, 0xe2, 0xd9, 0x1c, 0xb3, 0xc4, 0x90, 0xda, 0x81, 0xc4, 0x6d, 0xe6, 0xcd, 0x76, 0xea, 0x8a, 0x0c, 0x8f, 0x6f, 0xe3, 0x31, 0x71, 0x2d, 0x24 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 15.14", + /* Message to be signed */ + 169, + { 0xc5, 0xa2, 0x71, 0x12, 0x78, 0x76, 0x1d, 0xfc, 0xdd, 0x4f, 0x0c, 0x99, 0xe6, 0xf5, 0x61, 0x9d, 0x6c, 0x48, 0xb5, 0xd4, 0xc1, 0xa8, 0x09, 0x82, 0xfa, 0xa6, 0xb4, 0xcf, 0x1c, 0xf7, 0xa6, 0x0f, 0xf3, 0x27, 0xab, 0xef, 0x93, 0xc8, 0x01, 0x42, 0x9e, 0xfd, 0xe0, 0x86, 0x40, 0x85, 0x81, 0x46, 0x10, 0x56, 0xac, 0xc3, 0x3f, 0x3d, 0x04, 0xf5, 0xad, 0xa2, 0x12, 0x16, 0xca, 0xcd, 0x5f, 0xd1, 0xf9, 0xed, 0x83, 0x20, 0x3e, 0x0e, 0x2f, 0xe6, 0x13, 0x8e, 0x3e, 0xae, 0x84, 0x24, 0xe5, 0x91, 0x5a, 0x08, 0x3f, 0x3f, 0x7a, 0xb7, 0x60, 0x52, 0xc8, 0xbe, 0x55, 0xae, 0x88, 0x2d, 0x6e, 0xc1, 0x48, 0x2b, 0x1e, 0x45, 0xc5, 0xda, 0xe9, 0xf4, 0x10, 0x15, 0x40, 0x53, 0x27, 0x02, 0x2e, 0xc3, 0x2f, 0x0e, 0xa2, 0x42, 0x97, 0x63, 0xb2, 0x55, 0x04, 0x3b, 0x19, 0x58, 0xee, 0x3c, 0xf6, 0xd6, 0x39, 0x83, 0x59, 0x6e, 0xb3, 0x85, 0x84, 0x4f, 0x85, 0x28, 0xcc, 0x9a, 0x98, 0x65, 0x83, 0x5d, 0xc5, 0x11, 0x3c, 0x02, 0xb8, 0x0d, 0x0f, 0xca, 0x68, 0xaa, 0x25, 0xe7, 0x2b, 0xca, 0xae, 0xb3, 0xcf, 0x9d, 0x79, 0xd8, 0x4f, 0x98, 0x4f, 0xd4, 0x17 } +, + /* Signature */ + 256, + { 0x6b, 0xd5, 0x25, 0x7a, 0xa0, 0x66, 0x11, 0xfb, 0x46, 0x60, 0x08, 0x7c, 0xb4, 0xbc, 0x4a, 0x9e, 0x44, 0x91, 0x59, 0xd3, 0x16, 0x52, 0xbd, 0x98, 0x08, 0x44, 0xda, 0xf3, 0xb1, 0xc7, 0xb3, 0x53, 0xf8, 0xe5, 0x61, 0x42, 0xf7, 0xea, 0x98, 0x57, 0x43, 0x3b, 0x18, 0x57, 0x3b, 0x4d, 0xee, 0xde, 0x81, 0x8a, 0x93, 0xb0, 0x29, 0x02, 0x97, 0x78, 0x3f, 0x1a, 0x2f, 0x23, 0xcb, 0xc7, 0x27, 0x97, 0xa6, 0x72, 0x53, 0x7f, 0x01, 0xf6, 0x24, 0x84, 0xcd, 0x41, 0x62, 0xc3, 0x21, 0x4b, 0x9a, 0xc6, 0x28, 0x22, 0x4c, 0x5d, 0xe0, 0x1f, 0x32, 0xbb, 0x9b, 0x76, 0xb2, 0x73, 0x54, 0xf2, 0xb1, 0x51, 0xd0, 0xe8, 0xc4, 0x21, 0x3e, 0x46, 0x15, 0xad, 0x0b, 0xc7, 0x1f, 0x51, 0x5e, 0x30, 0x0d, 0x6a, 0x64, 0xc6, 0x74, 0x34, 0x11, 0xff, 0xfd, 0xe8, 0xe5, 0xff, 0x19, 0x0e, 0x54, 0x92, 0x30, 0x43, 0x12, 0x6e, 0xcf, 0xc4, 0xc4, 0x53, 0x90, 0x22, 0x66, 0x8f, 0xb6, 0x75, 0xf2, 0x5c, 0x07, 0xe2, 0x00, 0x99, 0xee, 0x31, 0x5b, 0x98, 0xd6, 0xaf, 0xec, 0x4b, 0x1a, 0x9a, 0x93, 0xdc, 0x33, 0x49, 0x6a, 0x15, 0xbd, 0x6f, 0xde, 0x16, 0x63, 0xa7, 0xd4, 0x9b, 0x9f, 0x1e, 0x63, 0x9d, 0x38, 0x66, 0x4b, 0x37, 0xa0, 0x10, 0xb1, 0xf3, 0x5e, 0x65, 0x86, 0x82, 0xd9, 0xcd, 0x63, 0xe5, 0x7d, 0xe0, 0xf1, 0x5e, 0x8b, 0xdd, 0x09, 0x65, 0x58, 0xf0, 0x7e, 0xc0, 0xca, 0xa2, 0x18, 0xa8, 0xc0, 0x6f, 0x47, 0x88, 0x45, 0x39, 0x40, 0x28, 0x7c, 0x9d, 0x34, 0xb6, 0xd4, 0x0a, 0x3f, 0x09, 0xbf, 0x77, 0x99, 0xfe, 0x98, 0xae, 0x4e, 0xb4, 0x9f, 0x3f, 0xf4, 0x1c, 0x50, 0x40, 0xa5, 0x0c, 0xef, 0xc9, 0xbd, 0xf2, 0x39, 0x4b, 0x74, 0x9c, 0xf1, 0x64, 0x48, 0x0d, 0xf1, 0xab, 0x68, 0x80, 0x27, 0x3b } + +} +, +{ + "PKCS#1 v1.5 Signature Example 15.15", + /* Message to be signed */ + 215, + { 0x9b, 0xf8, 0xaa, 0x25, 0x3b, 0x87, 0x2e, 0xa7, 0x7a, 0x7e, 0x23, 0x47, 0x6b, 0xe2, 0x6b, 0x23, 0x29, 0x57, 0x8c, 0xf6, 0xac, 0x9e, 0xa2, 0x80, 0x5b, 0x35, 0x7f, 0x6f, 0xc3, 0xad, 0x13, 0x0d, 0xba, 0xeb, 0x3d, 0x86, 0x9a, 0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0x8f, 0x7f, 0xc8, 0x8b, 0x76, 0xad, 0xc8, 0x29, 0x0f, 0x87, 0xda, 0xf2, 0xa7, 0xbe, 0x10, 0xae, 0x40, 0x85, 0x21, 0x39, 0x5d, 0x54, 0xed, 0x25, 0x56, 0xfb, 0x76, 0x61, 0x85, 0x4a, 0x73, 0x0c, 0xe3, 0xd8, 0x2c, 0x71, 0xa8, 0xd4, 0x93, 0xec, 0x49, 0xa3, 0x78, 0xac, 0x8a, 0x3c, 0x74, 0x43, 0x9f, 0x7c, 0xc5, 0x55, 0xba, 0x13, 0xf8, 0x59, 0x07, 0x08, 0x90, 0xee, 0x18, 0xff, 0x65, 0x8f, 0xa4, 0xd7, 0x41, 0x96, 0x9d, 0x70, 0xa5 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 15.16", + /* Message to be signed */ + 247, + { 0x32, 0x47, 0x48, 0x30, 0xe2, 0x20, 0x37, 0x54, 0xc8, 0xbf, 0x06, 0x81, 0xdc, 0x4f, 0x84, 0x2a, 0xfe, 0x36, 0x09, 0x30, 0x37, 0x86, 0x16, 0xc1, 0x08, 0xe8, 0x33, 0x65, 0x6e, 0x56, 0x40, 0xc8, 0x68, 0x56, 0x88, 0x5b, 0xb0, 0x5d, 0x1e, 0xb9, 0x43, 0x8e, 0xfe, 0xde, 0x67, 0x92, 0x63, 0xde, 0x07, 0xcb, 0x39, 0x55, 0x3f, 0x6a, 0x25, 0xe0, 0x06, 0xb0, 0xa5, 0x23, 0x11, 0xa0, 0x63, 0xca, 0x08, 0x82, 0x66, 0xd2, 0x56, 0x4f, 0xf6, 0x49, 0x0c, 0x46, 0xb5, 0x60, 0x98, 0x18, 0x54, 0x8f, 0x88, 0x76, 0x4d, 0xad, 0x34, 0xa2, 0x5e, 0x3a, 0x85, 0xd5, 0x75, 0x02, 0x3f, 0x0b, 0x9e, 0x66, 0x50, 0x48, 0xa0, 0x3c, 0x35, 0x05, 0x79, 0xa9, 0xd3, 0x24, 0x46, 0xc7, 0xbb,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b, 0x86, 0xe1, 0x0c, 0x19, 0x97, 0x15, 0xfa, 0x0b, 0x6f, 0x42, 0x50, 0xb5, 0x33, 0x73, 0x2d, 0x0b, 0xef, 0xe1, 0x54, 0x51, 0x50, 0xfc, 0x47, 0xb8, 0x76, 0xde, 0x09, 0xb0, 0x0a, 0x94 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 15.17", + /* Message to be signed */ + 61, + { 0x00, 0x8e, 0x59, 0x50, 0x5e, 0xaf, 0xb5, 0x50, 0xaa, 0xe5, 0xe8, 0x45, 0x58, 0x4c, 0xeb, 0xb0, 0x0b, 0x6d, 0xe1, 0x73, 0x3e, 0x9f, 0x95, 0xd4, 0x2c, 0x88, 0x2a, 0x5b, 0xbe, 0xb5, 0xce, 0x1c, 0x57, 0xe1, 0x19, 0xe7, 0xc0, 0xd4, 0xda, 0xca, 0x9f, 0x1f, 0xf7, 0x87, 0x02, 0x17, 0xf7, 0xcf, 0xd8, 0xa6, 0xb3, 0x73, 0x97, 0x7c, 0xac, 0x9c, 0xab, 0x8e, 0x71, 0xe4, 0x20 } +, + /* Signature */ + 256, + { 0x92, 0x25, 0x03, 0xb6, 0x73, 0xee, 0x5f, 0x3e, 0x69, 0x1e, 0x1c, 0xa8, 0x5e, 0x9f, 0xf4, 0x17, 0x3c, 0xf7, 0x2b, 0x05, 0xac, 0x2c, 0x13, 0x1d, 0xa5, 0x60, 0x35, 0x93, 0xe3, 0xbc, 0x25, 0x9c, 0x94, 0xc1, 0xf7, 0xd3, 0xa0, 0x6a, 0x5b, 0x98, 0x91, 0xbf, 0x11, 0x3f, 0xa3, 0x9e, 0x59, 0xff, 0x7c, 0x1e, 0xd6, 0x46, 0x5e, 0x90, 0x80, 0x49, 0xcb, 0x89, 0xe4, 0xe1, 0x25, 0xcd, 0x37, 0xd2, 0xff, 0xd9, 0x22, 0x7a, 0x41, 0xb4, 0xa0, 0xa1, 0x9c, 0x0a, 0x44, 0xfb, 0xbf, 0x3d, 0xe5, 0x5b, 0xab, 0x80, 0x20, 0x87, 0xa3, 0xbb, 0x8d, 0x4f, 0xf6, 0x68, 0xee, 0x6b, 0xbb, 0x8a, 0xd8, 0x9e, 0x68, 0x57, 0xa7, 0x9a, 0x9c, 0x72, 0x78, 0x19, 0x90, 0xdf, 0xcf, 0x92, 0xcd, 0x51, 0x94, 0x04, 0xc9, 0x50, 0xf1, 0x3d, 0x11, 0x43, 0xc3, 0x18, 0x4f, 0x1d, 0x25, 0x0c, 0x90, 0xe1, 0x7a, 0xc6, 0xce, 0x36, 0x16, 0x3b, 0x98, 0x95, 0x62, 0x7a, 0xd6, 0xff, 0xec, 0x14, 0x22, 0x44, 0x1f, 0x55, 0xe4, 0x49, 0x9d, 0xba, 0x9b, 0xe8, 0x95, 0x46, 0xae, 0x8b, 0xc6, 0x3c, 0xca, 0x01, 0xdd, 0x08, 0x46, 0x3a, 0xe7, 0xf1, 0xfc, 0xe3, 0xd8, 0x93, 0x99, 0x69, 0x38, 0x77, 0x8c, 0x18, 0x12, 0xe6, 0x74, 0xad, 0x9c, 0x30, 0x9c, 0x5a, 0xcc, 0xa3, 0xfd, 0xe4, 0x4e, 0x7d, 0xd8, 0x69, 0x59, 0x93, 0xe9, 0xc1, 0xfa, 0x87, 0xac, 0xda, 0x99, 0xec, 0xe5, 0xc8, 0x49, 0x9e, 0x46, 0x89, 0x57, 0xad, 0x66, 0x35, 0x9b, 0xf1, 0x2a, 0x51, 0xad, 0xbe, 0x78, 0xd3, 0xa2, 0x13, 0xb4, 0x49, 0xbf, 0x0b, 0x5f, 0x8d, 0x4d, 0x49, 0x6a, 0xcf, 0x03, 0xd3, 0x03, 0x3b, 0x7c, 0xcd, 0x19, 0x6b, 0xc2, 0x2f, 0x68, 0xfb, 0x7b, 0xef, 0x4f, 0x69, 0x7c, 0x5e, 0xa2, 0xb3, 0x50, 0x62, 0xf4, 0x8a, 0x36, 0xdd } + +} +, +{ + "PKCS#1 v1.5 Signature Example 15.18", + /* Message to be signed */ + 69, + { 0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 0x2f, 0xe7, 0x8c, 0x57, 0x4e, 0xd5, 0xda, 0xcf, 0xc8, 0x31, 0xf3, 0xcf, 0x2b, 0x05, 0x02, 0xc0, 0xb2, 0x98, 0xf2, 0x5c, 0xcf, 0x11, 0xf9, 0x73, 0xb3, 0x1f, 0x85, 0xe4, 0x74, 0x42, 0x19, 0x85, 0xf3, 0xcf, 0xf7, 0x02, 0xdf, 0x39, 0x46, 0xef, 0x0a, 0x66, 0x05, 0x68, 0x21, 0x11, 0xb2, 0xf5, 0x5b, 0x1f, 0x8a, 0xb0, 0xd2, 0xea, 0x3a, 0x68, 0x3c, 0x69, 0x98, 0x5e, 0xad, 0x93, 0xed, 0x44, 0x9e, 0xa4, 0x8f, 0x03, 0x58, 0xdd, 0xf7, 0x08, 0x02, 0xcb, 0x41, 0xde, 0x2f, 0xd8, 0x3f, 0x3c, 0x80, 0x80, 0x82, 0xd8, 0x49, 0x36, 0x94, 0x8e, 0x0c, 0x84, 0xa1, 0x31, 0xb4, 0x92, 0x78, 0x27, 0x46, 0x05, 0x27, 0xbb, 0x5c, 0xd2, 0x4b, 0xfa, 0xb7, 0xb4, 0x8e, 0x07, 0x1b, 0x24, 0x17, 0x19, 0x30, 0xf9, 0x97, 0x63, 0x27, 0x2f, 0x97, 0x97, 0xbc, 0xb7, 0x6f, 0x1d, 0x24, 0x81, 0x57, 0x55, 0x58, 0xfc, 0xf2, 0x60, 0xb1, 0xf0, 0xe5, 0x54, 0xeb, 0xb3, 0xdf, 0x3c, 0xfc, 0xb9, 0x58 } + +} +, +{ + "PKCS#1 v1.5 Signature Example 15.19", + /* Message to be signed */ + 177, + { 0xaf, 0x2d, 0x78, 0x15, 0x2c, 0xf1, 0x0e, 0xfe, 0x01, 0xd2, 0x74, 0xf2, 0x17, 0xb1, 0x77, 0xf6, 0xb0, 0x1b, 0x5e, 0x74, 0x9f, 0x15, 0x67, 0x71, 0x5d, 0xa3, 0x24, 0x85, 0x9c, 0xd3, 0xdd, 0x88, 0xdb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0xf3, 0x22, 0x9d, 0x9e, 0xf2, 0xb1, 0xb3, 0x80, 0x7e, 0x32, 0x10, 0x18, 0x92, 0x0a, 0xd3, 0xe5, 0x3d, 0xae, 0x47, 0xe6, 0xd9, 0x39, 0x5c, 0x18, 0x4b, 0x93, 0xa3, 0x74, 0xc6, 0x71, 0xfa, 0xa2, 0xce } + +} +, +{ + "PKCS#1 v1.5 Signature Example 15.20", + /* Message to be signed */ + 179, + { 0x40, 0xee, 0x99, 0x24, 0x58, 0xd6, 0xf6, 0x14, 0x86, 0xd2, 0x56, 0x76, 0xa9, 0x6d, 0xd2, 0xcb, 0x93, 0xa3, 0x7f, 0x04, 0xb1, 0x78, 0x48, 0x2f, 0x2b, 0x18, 0x6c, 0xf8, 0x82, 0x15, 0x27, 0x0d, 0xba, 0x29, 0xd7, 0x86, 0xd7, 0x74, 0xb0, 0xc5, 0xe7, 0x8c, 0x7f, 0x6e, 0x56, 0xa9, 0x56, 0xe7, 0xf7, 0x39, 0x50, 0xa2, 0xb0, 0xc0, 0xc1, 0x0a, 0x08, 0xdb, 0xcd, 0x67, 0xe5, 0xb2, 0x10, 0xbb, 0x21, 0xc5, 0x8e, 0x27, 0x67, 0xd4, 0x4f, 0x7d, 0xd4, 0x01, 0x4e, 0x39, 0x66, 0x14, 0x3b, 0xf7, 0xe3, 0xd6, 0x6f, 0xf0, 0xc0, 0x9b, 0xe4, 0xc5, 0x5f, 0x93, 0xb3, 0x99, 0x94, 0xb8, 0x51, 0x8d, 0x9c, 0x1d, 0x76, 0xd5, 0xb4, 0x73, 0x74, 0xde, 0xa0, 0x8f, 0x15, 0x7d, 0x57, 0xd7, 0x06, 0x34, 0x97, 0x8f, 0x38, 0x56, 0xe0, 0xe5, 0xb4, 0x81, 0xaf, 0xbb, 0xdb, 0x5a, 0x3a, 0xc4, 0x8d, 0x48, 0x4b, 0xe9, 0x2c, 0x93, 0xde, 0x22, 0x91, 0x78, 0x35, 0x4c, 0x2d, 0xe5, 0x26, 0xe9, 0xc6, 0x5a, 0x31, 0xed, 0xe1, 0xef, 0x68, 0xcb, 0x63, 0x98, 0xd7, 0x91, 0x16, 0x84, 0xfe, 0xc0, 0xba, 0xbc, 0x3a, 0x78, 0x1a, 0x66, 0x66, 0x07, 0x83, 0x50, 0x69, 0x74, 0xd0, 0xe1, 0x48, 0x25, 0x10, 0x1c, 0x3b, 0xfa, 0xea } +, + /* Signature */ + 256, + { 0x92, 0x75, 0x02, 0xb8, 0x24, 0xaf, 0xc4, 0x25, 0x13, 0xca, 0x65, 0x70, 0xde, 0x33, 0x8b, 0x8a, 0x64, 0xc3, 0xa8, 0x5e, 0xb8, 0x28, 0xd3, 0x19, 0x36, 0x24, 0xf2, 0x7e, 0x8b, 0x10, 0x29, 0xc5, 0x5c, 0x11, 0x9c, 0x97, 0x33, 0xb1, 0x8f, 0x58, 0x49, 0xb3, 0x50, 0x09, 0x18, 0xbc, 0xc0, 0x05, 0x51, 0xd9, 0xa8, 0xfd, 0xf5, 0x3a, 0x97, 0x74, 0x9f, 0xa8, 0xdc, 0x48, 0x0d, 0x6f, 0xe9, 0x74, 0x2a, 0x58, 0x71, 0xf9, 0x73, 0x92, 0x65, 0x28, 0x97, 0x2a, 0x1a, 0xf4, 0x9e, 0x39, 0x25, 0xb0, 0xad, 0xf1, 0x4a, 0x84, 0x27, 0x19, 0xb4, 0xa5, 0xa2, 0xd8, 0x9f, 0xa9, 0xc0, 0xb6, 0x60, 0x5d, 0x21, 0x2b, 0xed, 0x1e, 0x67, 0x23, 0xb9, 0x34, 0x06, 0xad, 0x30, 0xe8, 0x68, 0x29, 0xa5, 0xc7, 0x19, 0xb8, 0x90, 0xb3, 0x89, 0x30, 0x6d, 0xc5, 0x50, 0x64, 0x86, 0xee, 0x2f, 0x36, 0xa8, 0xdf, 0xe0, 0xa9, 0x6a, 0xf6, 0x78, 0xc9, 0xcb, 0xd6, 0xaf, 0xf3, 0x97, 0xca, 0x20, 0x0e, 0x3e, 0xdc, 0x1e, 0x36, 0xbd, 0x2f, 0x08, 0xb3, 0x1d, 0x54, 0x0c, 0x0c, 0xb2, 0x82, 0xa9, 0x55, 0x9e, 0x4a, 0xdd, 0x4f, 0xc9, 0xe6, 0x49, 0x2e, 0xed, 0x0c, 0xcb, 0xd3, 0xa6, 0x98, 0x2e, 0x5f, 0xaa, 0x2d, 0xdd, 0x17, 0xbe, 0x47, 0x41, 0x7c, 0x80, 0xb4, 0xe5, 0x45, 0x2d, 0x31, 0xf7, 0x24, 0x01, 0xa0, 0x42, 0x32, 0x51, 0x09, 0x54, 0x4d, 0x95, 0x4c, 0x01, 0x93, 0x90, 0x79, 0xd4, 0x09, 0xa5, 0xc3, 0x78, 0xd7, 0x51, 0x2d, 0xfc, 0x2d, 0x2a, 0x71, 0xef, 0xcc, 0x34, 0x32, 0xa7, 0x65, 0xd1, 0xc6, 0xa5, 0x2c, 0xfc, 0xe8, 0x99, 0xcd, 0x79, 0xb1, 0x5b, 0x4f, 0xc3, 0x72, 0x36, 0x41, 0xef, 0x6b, 0xd0, 0x0a, 0xcc, 0x10, 0x40, 0x7e, 0x5d, 0xf5, 0x8d, 0xd1, 0xc3, 0xc5, 0xc5, 0x59, 0xa5, 0x06 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +}; + diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/rsa-testvectors/pkcs1v15sign-vectors.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/notes/rsa-testvectors/pkcs1v15sign-vectors.txt Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,9049 @@ +Test vectors for RSA PKCS#1 v1.5 Signature +========================================== + +This file contains test vectors for the PKCS#1 v1.5 signature +scheme with appendix. 15 RSA keys of different sizes have +been generated. For each key, 20 random messages of length +between 1 and 256 octets have been PKCS#1 v1.5 signed. +As specified in PKCS#1, the block type for this operation +is 1. The digest algorithm is SHA-1; i.e. the given message +must be hashed and the SHA-1 hash must be encapsulated in a +DigestInfo structure as specified in PKCS#1 v1.5. + +Key lengths: + +Key 1: 1024 bits +Key 2: 1024 bits +Key 3: 1024 bits +Key 4: 1024 bits +Key 5: 1024 bits +Key 6: 1024 bits +Key 7: 1025 bits +Key 8: 1026 bits +Key 9: 1027 bits +Key 10: 1028 bits +Key 11: 1029 bits +Key 12: 1030 bits +Key 13: 1031 bits +Key 14: 1536 bits +Key 15: 2048 bits + +These test vectors have been derived from the PSS test vectors. +============================================================================ +# Thirteen RSA keys with bit sizes between 1024 and 1031, one 1536-bit key, +# and one 2048-bit key are generated. + +# For each key, 20 random messages are PKCS#1 v1.5 signed. + +# Example 1: A 1024-bit RSA key pair +# ----------------------------------- + + +# Public key +# ---------- + +# Modulus: +a5 6e 4a 0e 70 10 17 58 9a 51 87 dc 7e a8 41 d1 +56 f2 ec 0e 36 ad 52 a4 4d fe b1 e6 1f 7a d9 91 +d8 c5 10 56 ff ed b1 62 b4 c0 f2 83 a1 2a 88 a3 +94 df f5 26 ab 72 91 cb b3 07 ce ab fc e0 b1 df +d5 cd 95 08 09 6d 5b 2b 8b 6d f5 d6 71 ef 63 77 +c0 92 1c b2 3c 27 0a 70 e2 59 8e 6f f8 9d 19 f1 +05 ac c2 d3 f0 cb 35 f2 92 80 e1 38 6b 6f 64 c4 +ef 22 e1 e1 f2 0d 0c e8 cf fb 22 49 bd 9a 21 37 + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +a5 6e 4a 0e 70 10 17 58 9a 51 87 dc 7e a8 41 d1 +56 f2 ec 0e 36 ad 52 a4 4d fe b1 e6 1f 7a d9 91 +d8 c5 10 56 ff ed b1 62 b4 c0 f2 83 a1 2a 88 a3 +94 df f5 26 ab 72 91 cb b3 07 ce ab fc e0 b1 df +d5 cd 95 08 09 6d 5b 2b 8b 6d f5 d6 71 ef 63 77 +c0 92 1c b2 3c 27 0a 70 e2 59 8e 6f f8 9d 19 f1 +05 ac c2 d3 f0 cb 35 f2 92 80 e1 38 6b 6f 64 c4 +ef 22 e1 e1 f2 0d 0c e8 cf fb 22 49 bd 9a 21 37 + +# Public exponent: +01 00 01 + +# Exponent: +33 a5 04 2a 90 b2 7d 4f 54 51 ca 9b bb d0 b4 47 +71 a1 01 af 88 43 40 ae f9 88 5f 2a 4b be 92 e8 +94 a7 24 ac 3c 56 8c 8f 97 85 3a d0 7c 02 66 c8 +c6 a3 ca 09 29 f1 e8 f1 12 31 88 44 29 fc 4d 9a +e5 5f ee 89 6a 10 ce 70 7c 3e d7 e7 34 e4 47 27 +a3 95 74 50 1a 53 26 83 10 9c 2a ba ca ba 28 3c +31 b4 bd 2f 53 c3 ee 37 e3 52 ce e3 4f 9e 50 3b +d8 0c 06 22 ad 79 c6 dc ee 88 35 47 c6 a3 b3 25 + +# Prime 1: +e7 e8 94 27 20 a8 77 51 72 73 a3 56 05 3e a2 a1 +bc 0c 94 aa 72 d5 5c 6e 86 29 6b 2d fc 96 79 48 +c0 a7 2c bc cc a7 ea cb 35 70 6e 09 a1 df 55 a1 +53 5b d9 b3 cc 34 16 0b 3b 6d cd 3e da 8e 64 43 + +# Prime 2: +b6 9d ca 1c f7 d4 d7 ec 81 e7 5b 90 fc ca 87 4a +bc de 12 3f d2 70 01 80 aa 90 47 9b 6e 48 de 8d +67 ed 24 f9 f1 9d 85 ba 27 58 74 f5 42 cd 20 dc +72 3e 69 63 36 4a 1f 94 25 45 2b 26 9a 67 99 fd + +# Prime exponent 1: +28 fa 13 93 86 55 be 1f 8a 15 9c ba ca 5a 72 ea +19 0c 30 08 9e 19 cd 27 4a 55 6f 36 c4 f6 e1 9f +55 4b 34 c0 77 79 04 27 bb dd 8d d3 ed e2 44 83 +28 f3 85 d8 1b 30 e8 e4 3b 2f ff a0 27 86 19 79 + +# Prime exponent 2: +1a 8b 38 f3 98 fa 71 20 49 89 8d 7f b7 9e e0 a7 +76 68 79 12 99 cd fa 09 ef c0 e5 07 ac b2 1e d7 +43 01 ef 5b fd 48 be 45 5e ae b6 e1 67 82 55 82 +75 80 a8 e4 e8 e1 41 51 d1 51 0a 82 a3 f2 e7 29 + +# Coefficient: +27 15 6a ba 41 26 d2 4a 81 f3 a5 28 cb fb 27 f5 +68 86 f8 40 a9 f6 e8 6e 17 a4 4b 94 fe 93 19 58 +4b 8e 22 fd de 1e 5a 2e 3b d8 aa 5b a8 d8 58 41 +94 eb 21 90 ac f8 32 b8 47 f1 3a 3d 24 a7 9f 4d + +# PKCS#1 v1.5 signing of 20 random messages +# ------------------------------------------------------- + +# PKCS#1 v1.5 Signature Example 1.1 + +# ----------------- + +# Message to be signed: +cd c8 7d a2 23 d7 86 df 3b 45 e0 bb bc 72 13 26 +d1 ee 2a f8 06 cc 31 54 75 cc 6f 0d 9c 66 e1 b6 +23 71 d4 5c e2 39 2e 1a c9 28 44 c3 10 10 2f 15 +6a 0d 8d 52 c1 f4 c4 0b a3 aa 65 09 57 86 cb 76 +97 57 a6 56 3b a9 58 fe d0 bc c9 84 e8 b5 17 a3 +d5 f5 15 b2 3b 8a 41 e7 4a a8 67 69 3f 90 df b0 +61 a6 e8 6d fa ae e6 44 72 c0 0e 5f 20 94 57 29 +cb eb e7 7f 06 ce 78 e0 8f 40 98 fb a4 1f 9d 61 +93 c0 31 7e 8b 60 d4 b6 08 4a cb 42 d2 9e 38 08 +a3 bc 37 2d 85 e3 31 17 0f cb f7 cc 72 d0 b7 1c +29 66 48 b3 a4 d1 0f 41 62 95 d0 80 7a a6 25 ca +b2 74 4f d9 ea 8f d2 23 c4 25 37 02 98 28 bd 16 +be 02 54 6f 13 0f d2 e3 3b 93 6d 26 76 e0 8a ed +1b 73 31 8b 75 0a 01 67 d0 + +# Signature: +6b c3 a0 66 56 84 29 30 a2 47 e3 0d 58 64 b4 d8 +19 23 6b a7 c6 89 65 86 2a d7 db c4 e2 4a f2 8e +86 bb 53 1f 03 35 8b e5 fb 74 77 7c 60 86 f8 50 +ca ef 89 3f 0d 6f cc 2d 0c 91 ec 01 36 93 b4 ea +00 b8 0c d4 9a ac 4e cb 5f 89 11 af e5 39 ad a4 +a8 f3 82 3d 1d 13 e4 72 d1 49 05 47 c6 59 c7 61 +7f 3d 24 08 7d db 6f 2b 72 09 61 67 fc 09 7c ab +18 e9 a4 58 fc b6 34 cd ce 8e e3 58 94 c4 84 d7 + +# PKCS#1 v1.5 Signature Example 1.2 + +# ----------------- + +# Message to be signed: +85 13 84 cd fe 81 9c 22 ed 6c 4c cb 30 da eb 5c +f0 59 bc 8e 11 66 b7 e3 53 0c 4c 23 3e 2b 5f 8f +71 a1 cc a5 82 d4 3e cc 72 b1 bc a1 6d fc 70 13 +22 6b 9e + +# Signature: +84 fd 2c e7 34 ec 1d a8 28 d0 f1 5b f4 9a 87 07 +c1 5d 05 94 81 36 de 53 7a 3d b4 21 38 41 67 c8 +6f ae 02 25 87 ee 9e 13 7d ae e7 54 73 82 62 93 +2d 27 1c 74 4c 6d 3a 18 9a d4 31 1b db 02 04 92 +e3 22 fb dd c4 04 06 ea 86 0d 4e 8e a2 a4 08 4a +a9 8b 96 22 a4 46 75 6f db 74 0d db 3d 91 db 76 +70 e2 11 66 1b bf 87 09 b1 1c 08 a7 07 71 42 2d +1a 12 de f2 9f 06 88 a1 92 ae bd 89 e0 f8 96 f8 + +# PKCS#1 v1.5 Signature Example 1.3 + +# ----------------- + +# Message to be signed: +a4 b1 59 94 17 61 c4 0c 6a 82 f2 b8 0d 1b 94 f5 +aa 26 54 fd 17 e1 2d 58 88 64 67 9b 54 cd 04 ef +8b d0 30 12 be 8d c3 7f 4b 83 af 79 63 fa ff 0d +fa 22 54 77 43 7c 48 01 7f f2 be 81 91 cf 39 55 +fc 07 35 6e ab 3f 32 2f 7f 62 0e 21 d2 54 e5 db +43 24 27 9f e0 67 e0 91 0e 2e 81 ca 2c ab 31 c7 +45 e6 7a 54 05 8e b5 0d 99 3c db 9e d0 b4 d0 29 +c0 6d 21 a9 4c a6 61 c3 ce 27 fa e1 d6 cb 20 f4 +56 4d 66 ce 47 67 58 3d 0e 5f 06 02 15 b5 90 17 +be 85 ea 84 89 39 12 7b d8 c9 c4 d4 7b 51 05 6c +03 1c f3 36 f1 7c 99 80 f3 b8 f5 b9 b6 87 8e 8b +79 7a a4 3b 88 26 84 33 3e 17 89 3f e9 ca a6 aa +29 9f 7e d1 a1 8e e2 c5 48 64 b7 b2 b9 9b 72 61 +8f b0 25 74 d1 39 ef 50 f0 19 c9 ee f4 16 97 13 +38 e7 d4 70 + +# Signature: +0b 1f 2e 51 80 e5 c7 b4 b5 e6 72 92 9f 66 4c 48 +96 e5 0c 35 13 4b 6d e4 d5 a9 34 25 2a 3a 24 5f +f4 83 40 92 0e 10 34 b7 d5 a5 b5 24 eb 0e 1c f1 +2b ef ef 49 b2 7b 73 2d 2c 19 e1 c4 32 17 d6 e1 +41 73 81 11 1a 1d 36 de 63 75 cf 45 5b 3c 98 12 +63 9d bc 27 60 0c 75 19 94 fb 61 79 9e cf 7d a6 +bc f5 15 40 af d0 17 4d b4 03 31 88 55 66 75 b1 +d7 63 36 0a f4 6f ee ca 5b 60 f8 82 82 9e e7 b2 + +# PKCS#1 v1.5 Signature Example 1.4 + +# ----------------- + +# Message to be signed: +bc 65 67 47 fa 9e af b3 f0 + +# Signature: +45 60 7a d6 11 cf 57 47 a4 1a c9 4d 0f fe c8 78 +bd af 63 f6 b5 7a 4b 08 8b f3 6e 34 e1 09 f8 40 +f2 4b 74 2a da 16 10 2d ab f9 51 cb c4 4f 89 82 +e9 4e d4 cd 09 44 8d 20 ec 0e fa 73 54 5f 80 b6 +54 06 be d6 19 4a 61 c3 40 b4 ad 15 68 cb b7 58 +51 04 9f 11 af 17 34 96 40 76 e0 20 29 ae e2 00 +e4 0e 80 be 0f 43 61 f6 98 41 c4 f9 2a 44 50 a2 +28 6d 43 28 9b 40 55 54 c5 4d 25 c6 ec b5 84 f4 + +# PKCS#1 v1.5 Signature Example 1.5 + +# ----------------- + +# Message to be signed: +b4 55 81 54 7e 54 27 77 0c 76 8e 8b 82 b7 55 64 +e0 ea 4e 9c 32 59 4d 6b ff 70 65 44 de 0a 87 76 +c7 a8 0b 45 76 55 0e ee 1b 2a ca bc 7e 8b 7d 3e +f7 bb 5b 03 e4 62 c1 10 47 ea dd 00 62 9a e5 75 +48 0a c1 47 0f e0 46 f1 3a 2b f5 af 17 92 1d c4 +b0 aa 8b 02 be e6 33 49 11 65 1d 7f 85 25 d1 0f +32 b5 1d 33 be 52 0d 3d df 5a 70 99 55 a3 df e7 +82 83 b9 e0 ab 54 04 6d 15 0c 17 7f 03 7f dc cc +5b e4 ea 5f 68 b5 e5 a3 8c 9d 7e dc cc c4 97 5f +45 5a 69 09 b4 + +# Signature: +54 be 9d 90 87 75 15 f4 50 27 9c 15 b5 f6 1a d6 +f1 5e cc 95 f1 8c be d8 2b 65 b1 66 7a 57 58 09 +58 79 94 66 80 44 f3 bc 2a e7 f8 84 50 1f 64 f0 +b4 3f 58 8c fa 20 5a 6a b7 04 32 8c 2d 4a b9 2a +7a e1 34 40 61 4d 3e 08 5f 40 1d a9 ad 28 e2 10 +5e 4a 0e db 68 1a 64 24 df 04 73 88 ce 05 1e e9 +df 7b c2 16 3f e3 47 52 0a d5 1c cd 51 80 64 38 +3e 74 1a ca d3 cb dc 2c b5 a7 c6 8e 86 84 64 c2 + +# PKCS#1 v1.5 Signature Example 1.6 + +# ----------------- + +# Message to be signed: +10 aa e9 a0 ab 0b 59 5d 08 41 20 7b 70 0d 48 d7 +5f ae dd e3 b7 75 cd 6b 4c c8 8a e0 6e 46 94 ec +74 ba 18 f8 52 0d 4f 5e a6 9c bb e7 cc 2b eb a4 +3e fd c1 02 15 ac 4e b3 2d c3 02 a1 f5 3d c6 c4 +35 22 67 e7 93 6c fe bf 7c 8d 67 03 57 84 a3 90 +9f a8 59 c7 b7 b5 9b 8e 39 c5 c2 34 9f 18 86 b7 +05 a3 02 67 d4 02 f7 48 6a b4 f5 8c ad 5d 69 ad +b1 7a b8 cd 0c e1 ca f5 02 5a f4 ae 24 b1 fb 87 +94 c6 07 0c c0 9a 51 e2 f9 91 13 11 e3 87 7d 00 +44 c7 1c 57 a9 93 39 50 08 80 6b 72 3a c3 83 73 +d3 95 48 18 18 52 8c 1e 70 53 73 92 82 05 35 29 +51 0e 93 5c d0 fa 77 b8 fa 53 cc 2d 47 4b d4 fb +3c c5 c6 72 d6 ff dc 90 a0 0f 98 48 71 2c 4b cf +e4 6c 60 57 36 59 b1 1e 64 57 e8 61 f0 f6 04 b6 +13 8d 14 4f 8c e4 e2 da 73 + +# Signature: +0e 6f f6 3a 85 6b 9c bd 5d be 42 31 83 12 20 47 +dd 39 d6 f7 6d 1b 23 10 e5 46 fe 9e e7 3b 33 ef +a7 c7 8f 94 74 45 5c 9e 5b 88 cb 38 3a af c3 69 +86 68 e7 b7 a5 9a 9c bb 5b 08 97 b6 c5 af b7 f8 +ba c4 b9 24 e9 8d 76 0a 15 fc 43 d2 81 4a b2 d5 +18 7f 79 be d9 91 5a 93 39 7e bc 22 a7 67 75 06 +a0 2e 07 6d 3f fd c0 44 1d bd 4d b0 04 53 dc 28 +d8 30 e0 57 3f 77 b8 17 b5 05 c3 8b 4a 4b b5 d0 + +# PKCS#1 v1.5 Signature Example 1.7 + +# ----------------- + +# Message to be signed: +ef b5 da 1b 4d 1e 6d 9a 5d ff 92 d0 18 4d a7 e3 +1f 87 7d 12 81 dd da 62 56 64 86 9e 83 79 e6 7a +d3 b7 5e ae 74 a5 80 e9 82 7a bd 6e b7 a0 02 cb +54 11 f5 26 67 97 76 8f b8 e9 5a e4 0e 3e 8b 34 +66 f5 ab 15 d6 95 53 95 29 39 ec 23 e6 1d 58 49 +7f ac 76 aa 1c 0b b5 a3 cb 4a 54 38 35 87 c7 bb +78 d1 3e ef da 20 54 43 e6 ce 43 65 80 2d f5 5c +64 71 34 97 98 4e 7c a9 67 22 b3 ed f8 4d 56 + +# Signature: +83 85 d5 85 33 a9 95 f7 2d f2 62 b7 0f 40 b3 91 +dd f5 15 f4 64 b9 d2 cc 2d 66 39 8f c0 56 89 d8 +11 63 29 46 d6 2e ab dc a7 a3 1f cf 6c d6 c9 81 +d2 8b bc 29 08 3e 4a 6d 5b 2b 37 8c a4 e5 40 f0 +60 b9 6d 53 ad 26 93 f8 21 78 b9 4e 2e 2f 86 b9 +ac cf a0 20 25 10 7e 06 2a b7 08 01 75 68 45 01 +02 8f 67 64 61 d8 1c 00 8f e4 75 06 71 64 99 70 +87 8f c1 75 cf 98 e9 6b 2e cb f6 87 4d 77 da cb + +# PKCS#1 v1.5 Signature Example 1.8 + +# ----------------- + +# Message to be signed: +53 bb 58 ce 42 f1 98 49 40 55 26 57 23 3b 14 96 +9a f3 65 c0 a5 61 a4 13 2a f1 8a f3 94 32 28 0e +3e 43 70 82 43 4b 19 23 18 37 18 4f 02 cf 2b 2e +72 6b eb f7 4d 7a e3 25 6d 8b 72 f3 ea fd b1 34 +d3 3d e0 6f 29 91 d2 99 d5 9f 54 68 d4 3b 99 58 +d6 a9 68 f5 96 9e db bc 6e 71 85 cb c7 16 c7 c9 +45 da fa 9c c7 1d df aa a0 10 94 a4 52 dd f5 e2 +40 73 20 40 0b f0 5e a9 72 9c af bf 06 00 e7 88 +07 ef 94 62 e3 fd e3 2e d7 d9 81 a5 6f 47 51 ef +64 fb 45 49 91 0e cc 91 1d 72 80 53 b3 99 43 00 +47 40 e6 f5 82 1f e8 d7 5c 06 17 bf 2c 6b 24 bb +fc 34 01 3f c9 5f 0d ed f5 ba 29 7f 50 4f b8 33 +da 2a 43 6d 1d 8f f1 cc 51 93 e2 a6 43 89 fc ed +91 8e 7f eb 67 16 33 0f 66 80 1d b9 49 75 49 cf +1d 3b d9 7c f1 bc 62 55 + +# Signature: +8e 1f 3d 26 ec 7c 6b bb 8c 54 c5 d2 5f 31 20 58 +78 03 af 6d 3c 2b 99 a3 7c ed 6a 36 57 d4 ae 54 +26 6f 63 ff fd e6 60 c8 66 d6 5d 0a b0 58 9e 1d +12 d9 ce 60 54 b0 5c 86 68 ae 12 71 71 cc aa e7 +f1 cd 40 96 77 f5 21 57 b6 12 3a b2 27 f2 7a 00 +96 6d 14 39 b4 2a 32 16 9d 10 70 39 40 26 fc 8b +c9 35 45 b1 ac 25 2d 0f 7d a7 51 c0 2e 33 a4 78 +31 fb d7 15 14 c2 bb bd 3a db 67 40 c0 fd 68 ad + +# PKCS#1 v1.5 Signature Example 1.9 + +# ----------------- + +# Message to be signed: +27 ca dc 69 84 50 94 5f 20 4e c3 cf 8c 6c bd 8c +eb 4c c0 cb e3 12 27 4f a9 6b 04 de ac 85 51 60 +c0 e0 4e 4a c5 d3 82 10 c2 7c + +# Signature: +7b 63 f9 22 33 56 f3 5f 61 17 f6 8c 8f 82 20 03 +4f c2 38 4a b5 dc 69 04 14 1f 13 93 14 d6 ee 89 +f5 4e c6 ff d1 8c 41 3a 23 c5 93 1c 7f bb 13 c5 +55 cc fd 59 0e 0e aa 85 3c 8c 94 d2 52 0c d4 25 +0d 9a 05 a1 93 b6 5d c7 49 b8 24 78 af 01 56 ee +1d e5 5d da d3 3e c1 f0 09 9c ad 6c 89 1a 36 17 +c7 39 3d 05 fb fb bb 00 52 8a 00 1d f0 b2 04 eb +df 1a 34 10 90 de a8 9f 87 0a 87 74 58 42 7f 7b + +# PKCS#1 v1.5 Signature Example 1.10 + +# ----------------- + +# Message to be signed: +71 64 07 e9 01 b9 ef 92 d7 61 b0 13 fd 13 eb 7a +d7 2a ed + +# Signature: +2a 22 db e3 77 4d 5b 29 72 01 b5 5a 0f 17 f4 2d +ce 63 b7 84 5c b3 25 cf e9 51 d0 ba db 5c 5a 14 +47 21 43 d8 96 c8 6c c3 39 f8 36 71 16 42 15 ab +c9 78 62 f2 15 16 54 e7 5a 3b 35 7c 37 31 1b 3d +72 68 ca b5 40 20 2e 23 be e5 27 36 f2 cd 86 cc +e0 c7 db de 95 e1 c6 00 a4 73 95 dc 5e b0 a4 72 +15 3f bc 4f b2 1b 64 3e 0c 04 ae 14 dd 37 e9 7e +61 7a 75 67 c8 96 52 21 97 81 00 1b a6 f8 32 98 + +# PKCS#1 v1.5 Signature Example 1.11 + +# ----------------- + +# Message to be signed: +46 c2 4e 41 03 00 16 29 c7 12 dd 4c e8 d7 47 ee +59 5d 6c 74 4c cc 4f 71 34 7d 9b 8a bf 49 d1 b8 +fb 2e f9 1b 95 dc 89 9d 4c 0e 3d 29 97 e6 38 f4 +cf 3f 68 e0 49 8d e5 aa bd 13 f0 df e0 2f f2 6b +a4 37 91 04 e7 8f fa 95 ff bd 15 06 7e f8 cb d7 +eb 78 60 fe cc 71 ab e1 3d 5c 72 0a 66 85 1f 2d +ef d4 e7 95 05 4d 7b ec 02 4b b4 22 a4 6a 73 68 +b5 6d 95 b4 7a eb af be ad d6 12 81 25 93 a7 0d +b9 f9 6d 45 1e e1 5e db 29 93 08 d7 77 f4 bb 68 +ed 33 77 c3 21 56 b4 1b 7a 9c 92 a1 4c 8b 81 14 +43 99 c5 6a 5a 43 2f 4f 77 0a a9 7d a8 41 5d 0b +da 2e 81 32 06 03 1e 70 62 00 31 c8 81 d6 16 bf +fd 5f 03 bf 14 7c 1e 73 76 6c 26 24 62 08 + +# Signature: +12 23 5b 0b 40 61 26 d9 d2 60 d4 47 e9 23 a1 10 +51 fb 24 30 79 f4 46 fd 73 a7 01 81 d5 36 34 d7 +a0 96 8e 4e e2 77 77 ed a6 3f 6e 4a 3a 91 ad 59 +85 99 8a 48 48 da 59 ce 69 7b 24 bb 33 2f a2 ad +9c e4 62 ca 4a ff dc 21 da b9 08 e8 ce 15 af 6e +b9 10 5b 1a bc f3 91 42 aa 17 b3 4c 4c 09 23 86 +a7 ab bf e0 28 af db eb c1 4f 2c e2 6f be e5 ed +ec a1 15 02 d3 9a 6b 74 03 15 48 43 d9 8a 62 a7 + +# PKCS#1 v1.5 Signature Example 1.12 + +# ----------------- + +# Message to be signed: +bc 99 a9 32 aa 16 d6 22 bf ff 79 c5 0b 4c 42 35 +86 73 26 11 29 e2 8d 6a 91 8f f1 b0 f1 c4 f4 6a +d8 af a9 8b 0c a0 f5 6f 96 79 75 b0 a2 9b e8 82 +e9 3b 6c d3 fc 33 e1 fa ef 72 e5 2b 2a e0 a3 f1 +20 24 50 6e 25 69 0e 90 2e 78 29 82 14 55 56 53 +22 84 cf 50 57 89 73 8f 4d a3 1f a1 33 3d 3a f8 +62 b2 ba 6b 6c e7 ab 4c ce 6a ba + +# Signature: +87 2e c5 ad 4f 18 46 25 6f 17 e9 93 6a c5 0e 43 +e9 96 3e a8 c1 e7 6f 15 87 9b 78 74 d7 7d 12 2a +60 9d c8 c5 61 14 5b 94 bf 4f fd ff de b1 7e 6e +76 ff c6 c1 0c 07 47 f5 e3 7a 9f 43 4f 56 09 e7 +9d a5 25 02 15 a4 57 af df 12 c6 50 7c c1 55 1f +54 a2 80 10 59 58 26 a2 c9 b9 7f a0 aa 85 1c c6 +8b 70 5d 7a 06 d7 20 ba 02 7e 4a 1c 0b 01 95 00 +fb 63 b7 80 71 68 4d cf a9 77 27 00 b9 82 dc 66 + +# PKCS#1 v1.5 Signature Example 1.13 + +# ----------------- + +# Message to be signed: +73 1e 17 2a c0 63 99 2c 5b 11 ba 17 0d fb 23 bb +00 0d 47 ba 19 53 29 cf 27 80 61 03 73 81 51 4c +14 60 64 c5 28 5d b1 30 dd 5b ae 98 b7 72 22 59 +50 ea b0 5d 3e a9 96 f6 ff fb 9a 8c 86 22 91 3f +27 99 14 c8 9a da 4f 3d d7 76 66 a8 68 bf cb ff +2b 95 b7 da f4 53 d4 e2 c9 d7 5b ee e7 f8 e7 09 +05 e4 06 6a 4f 73 ae cc 67 f9 56 aa 5a 32 92 b8 +48 8c 91 7d 31 7c fd c8 62 53 e6 90 38 1e 15 ab + +# Signature: +76 20 4e ac c1 d6 3e c1 d6 ad 5b d0 69 2e 1a 2f +68 6d f6 e6 4c a9 45 c7 7a 82 4d e2 12 ef a6 d9 +78 2d 81 b4 59 14 03 ff 40 20 62 02 98 c0 7e bd +3a 8a 61 c5 bf 4d ad 62 cb fc 4a e6 a0 39 37 be +4b 49 a2 16 d5 70 fc 6e 81 87 29 37 87 6e 27 bd +19 cf 60 1e ff c3 0d dc a5 73 c9 d5 6c d4 56 9b +db 48 51 c4 50 c4 2c b2 1e 73 8c dd 61 02 7b 8b +e5 e9 b4 10 fc 46 aa 3f 29 e4 be 9e 64 45 13 46 + +# PKCS#1 v1.5 Signature Example 1.14 + +# ----------------- + +# Message to be signed: +02 11 38 26 83 a7 4d 8d 2a 2c b6 a0 65 50 56 3b +e1 c2 6c a6 28 21 e4 ff 16 3b 72 04 64 fc 3a 28 +d9 1b ed dd c6 27 49 a5 53 8e af 41 fb e0 c8 2a +77 e0 6a d9 93 83 c9 e9 85 ff b8 a9 3f d4 d7 c5 +8d b5 1a d9 1b a4 61 d6 9a 8f d7 dd ab e2 49 67 +57 a0 c4 91 22 c1 a7 9a 85 cc 05 53 e8 21 4d 03 +6d fe 01 85 ef a0 d0 58 60 c6 12 fa 08 82 c8 2d +24 6e 58 30 a6 73 55 df f1 8a 2c 36 b7 32 f9 88 +cf ed c5 62 26 4c 62 54 b4 0f ca bb 97 b7 60 94 +75 68 dc d6 a1 7c da 6e e8 85 5b dd ba b9 37 02 +47 1a a0 cf b1 be d2 e1 31 18 eb a1 17 5b 73 c9 +62 53 c1 08 d0 b2 ab a0 5a b8 e1 7e 84 39 2e 20 +08 5f 47 40 4d 83 65 52 7d c3 fb 8f 2b b4 8a 50 +03 8e 71 36 1c cf 97 34 07 + +# Signature: +52 55 00 91 83 31 f1 04 2e ae 0c 5c 20 54 aa 7f +92 de b2 69 91 b5 79 66 34 f2 29 da f9 b4 9e b2 +05 4d 87 31 9f 3c fa 9b 46 6b d0 75 ef 66 99 ae +a4 bd 4a 19 5a 1c 52 96 8b 5e 2b 75 e0 92 d8 46 +ea 1b 5c c2 79 05 a8 e1 d5 e5 de 0e df db 21 39 +1e bb 95 18 64 eb d9 f0 b0 ec 35 b6 54 28 71 36 +0a 31 7b 7e f1 3a e0 6a f6 84 e3 8e 21 b1 e1 9b +c7 29 8e 5d 6f e0 01 3a 16 4b fa 25 d3 e7 31 3d + +# PKCS#1 v1.5 Signature Example 1.15 + +# ----------------- + +# Message to be signed: +fc 6b 70 0d 22 58 33 88 ab 2f 8d af ca f1 a0 56 +20 69 80 20 da 4b ae 44 da fb d0 87 7b 50 12 50 +6d c3 18 1d 5c 66 bf 02 3f 34 8b 41 fd 9f 94 79 +5a b9 64 52 a4 21 9f 2d 39 d7 2a f3 59 cf 19 56 +51 c7 + +# Signature: +44 52 a6 cc 26 26 b0 1e 95 ab 30 6d f0 d0 cc 74 +84 fb ab 3c 22 e9 70 32 83 56 7f 66 ea dc 24 8d +bd a5 8f ce 7d d0 c7 0c ce 3f 15 0f ca 4b 36 9d +ff 3b 62 37 e2 b1 62 81 ab 55 b5 3f b1 30 89 c8 +5c d2 65 05 6b 3d 62 a8 8b fc 21 35 b1 67 91 f7 +fb ca b9 fd 2d c3 3b ec b6 17 be 41 9d 2c 04 61 +42 a4 d4 7b 33 83 14 55 2e dd 4b 6f e9 ce 11 04 +ec ec 4a 99 58 d7 33 1e 93 0f c0 9b f0 8a 6e 64 + +# PKCS#1 v1.5 Signature Example 1.16 + +# ----------------- + +# Message to be signed: +13 ba 08 6d 70 9c fa 5f ed aa 55 7a 89 18 1a 61 +40 f2 30 0e d6 d7 c3 fe bb 6c f6 8a be bc bc 67 +8f 2b ca 3d c2 33 02 95 ee c4 5b b1 c4 07 5f 3a +da 98 7e ae 88 b3 9c 51 60 6c b8 04 29 e6 49 d9 +8a cc 84 41 b1 f8 89 7d b8 6c 5a 4c e0 ab f2 8b +1b 81 dc a3 66 76 97 b8 50 69 6b 74 a5 eb d8 5d +ec 56 c9 0f 8a be 51 3e fa 85 78 53 72 0b e3 19 +60 79 21 bc a9 47 52 2c d8 fa c8 ca ce 5b 82 7c +3e 5a 12 9e 7e e5 7f 6b 84 93 2f 14 14 1a c4 27 +4e 8c bb 46 e6 91 2b 0d 3e 21 77 d4 99 d1 84 0c +d4 7d 4d 7a e0 b4 cd c4 d3 + +# Signature: +1f 3b 5a 87 db 72 a2 c9 7b b3 ef f2 a6 5a 30 12 +68 ea cd 89 f4 2a bc 10 98 c1 f2 de 77 b0 83 2a +65 d7 81 5f eb 35 07 00 63 f2 21 bb 34 53 bd 43 +43 86 c9 a3 fd e1 8e 3c a1 68 7f b6 49 e8 6c 51 +d6 58 61 9d de 5d eb b8 6f e1 54 91 ff 77 ab 74 +83 73 f1 be 50 88 80 d6 6e a8 1e 87 0e 91 cd f1 +70 48 75 c1 7f 0b 10 10 31 88 bc 64 ee f5 a3 55 +1b 41 4c 73 36 70 21 5b 1a 22 70 25 62 58 1a b1 + +# PKCS#1 v1.5 Signature Example 1.17 + +# ----------------- + +# Message to be signed: +eb 1e 59 35 + +# Signature: +37 0c b9 83 9a e6 07 4f 84 b2 ac d6 e6 f6 b7 92 +1b 4b 52 34 63 75 7f 64 46 71 61 40 c4 e6 c0 e7 +5b ec 6a d0 19 7e bf a8 6b f4 6d 09 4f 5f 6c d3 +6d ca 3a 5c c7 3c 8b bb 70 e2 c7 c9 ab 5d 96 4e +c8 e3 df de 48 1b 4a 1b ef fd 01 b4 ad 15 b3 1a +e7 ae bb 9b 70 34 4a 94 11 08 31 65 fd f9 c3 75 +4b bb 8b 94 dd 34 bd 48 13 df ad a1 f6 93 7d e4 +26 7d 55 97 ca 09 a3 1e 83 d7 f1 a7 9d d1 9b 5e + +# PKCS#1 v1.5 Signature Example 1.18 + +# ----------------- + +# Message to be signed: +63 46 b1 53 e8 89 c8 22 82 09 63 00 71 c8 a5 77 +83 f3 68 76 0b 8e b9 08 cf c2 b2 76 + +# Signature: +24 79 c9 75 c5 b1 ae 4c 4e 94 0f 47 3a 90 45 b8 +bf 5b 0b fc a7 8e c2 9a 38 df be dc 8a 74 9b 7a +26 92 f7 c5 2d 5b c7 c8 31 c7 23 23 72 a0 0f ed +3b 6b 49 e7 60 ec 99 e0 74 ff 2e ea d5 13 4e 83 +05 72 5d fa 39 21 2b 84 bd 4b 8d 80 bc 8b c1 7a +51 28 23 a3 be b1 8f c0 8e 45 ed 19 c2 6c 81 77 +07 d6 7f b0 58 32 ef 1f 12 a3 3e 90 cd 93 b8 a7 +80 31 9e 29 63 ca 25 a2 af 7b 09 ad 8f 59 5c 21 + +# PKCS#1 v1.5 Signature Example 1.19 + +# ----------------- + +# Message to be signed: +64 70 2d b9 f8 25 a0 f3 ab c3 61 97 46 59 f5 e9 +d3 0c 3a a4 f5 6f ea c6 90 50 c7 29 05 e7 7f e0 +c2 2f 88 a3 78 c2 1f cf 45 fe 8a 5c 71 73 02 09 +39 29 + +# Signature: +15 2f 34 51 c8 58 d6 95 94 e6 56 7d fb 31 29 1c +1e e7 86 0b 9d 15 eb d5 a5 ed d2 76 ac 3e 6f 7a +8d 14 80 e4 2b 33 81 d2 be 02 3a cf 7e bb db 28 +de 3d 21 63 ae 44 25 9c 6d f9 8c 33 5d 04 5b 61 +da c9 db a9 db bb 4e 6a b4 a0 83 cd 76 b5 80 cb +e4 72 20 6a 1a 9f d6 06 80 ce ea 1a 57 0a 29 b0 +88 1c 77 5e ae f5 52 5d 6d 2f 34 4c 28 83 7d 0a +ca 42 2b bb 0f 1a ba 8f 68 61 ae 18 bd 73 fe 44 + +# PKCS#1 v1.5 Signature Example 1.20 + +# ----------------- + +# Message to be signed: +94 19 21 de 4a 1c 9c 16 18 d6 f3 ca 3c 17 9f 6e +29 ba e6 dd f9 a6 a5 64 f9 29 e3 ce 82 cf 32 65 +d7 83 7d 5e 69 2b e8 dc c9 e8 6c + +# Signature: +70 76 c2 87 fc 6f ff 2b 20 53 74 35 e5 a3 10 7c +e4 da 10 71 61 86 d0 15 39 41 3e 60 9d 27 d1 da +6f d9 52 c6 1f 4b ab 91 c0 45 fa 4f 86 83 ec c4 +f8 dd e7 42 27 f7 73 cf f3 d9 6d b8 47 18 c4 94 +4b 06 af fe ba 94 b7 25 f1 b0 7d 39 28 b2 49 0a +85 c2 f1 ab f4 92 a9 17 7a 7c d2 ea 0c 96 68 75 +6f 82 5b be c9 00 fa 8a c3 82 4e 11 43 87 ef 57 +37 80 ca 33 48 82 38 7b 94 e5 aa d7 a2 7a 28 dc + +# ============================================= + +# Example 2: A 1024-bit RSA key pair +# ----------------------------------- + + +# Public key +# ---------- + +# Modulus: +ac 13 d9 fd ae 7b 73 35 b6 9c d9 85 67 e9 64 7d +99 bf 37 3a 9e 05 ce 34 35 d6 64 65 f3 28 b7 f7 +33 4b 79 2a ee 7e fa 04 4e bc 4c 7a 30 b2 1a 5d +7a 89 cd b3 a3 0d fc d9 fe e9 99 5e 09 41 5e dc +0b f9 e5 b4 c3 f7 4f f5 3f b4 d2 94 41 bf 1b 7e +d6 cb dd 4a 47 f9 25 22 69 e1 64 6f 6c 1a ee 05 +14 e9 3f 6c b9 df 71 d0 6c 06 0a 21 04 b4 7b 72 +60 ac 37 c1 06 86 1d c7 8c a5 a2 5f aa 9c b2 e3 + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +ac 13 d9 fd ae 7b 73 35 b6 9c d9 85 67 e9 64 7d +99 bf 37 3a 9e 05 ce 34 35 d6 64 65 f3 28 b7 f7 +33 4b 79 2a ee 7e fa 04 4e bc 4c 7a 30 b2 1a 5d +7a 89 cd b3 a3 0d fc d9 fe e9 99 5e 09 41 5e dc +0b f9 e5 b4 c3 f7 4f f5 3f b4 d2 94 41 bf 1b 7e +d6 cb dd 4a 47 f9 25 22 69 e1 64 6f 6c 1a ee 05 +14 e9 3f 6c b9 df 71 d0 6c 06 0a 21 04 b4 7b 72 +60 ac 37 c1 06 86 1d c7 8c a5 a2 5f aa 9c b2 e3 + +# Public exponent: +01 00 01 + +# Exponent: +04 84 cc ef ad 7a 4e 6f 35 a9 6e c8 e3 0e ac f5 +e3 68 b3 11 95 fe bf 08 7d f5 70 53 81 0c 2b b0 +91 27 45 3a 4c 63 07 3b bf b9 90 24 91 4c cc 06 +72 66 56 01 86 a1 a2 67 33 1b 7d 4c 8b df ac 96 +fd a9 f3 f7 0b ec 4e ea bc e7 cd 52 19 34 3c 2e +49 1c ce 82 7e 44 ee 23 0e 4f 69 58 9e 57 5a e9 +06 30 30 44 2a 31 c8 2c de 30 dc 9c 79 cf 64 e7 +a0 97 5e 75 e1 6e a4 58 15 48 8b 45 52 56 ee b1 + +# Prime 1: +df 85 f4 a0 b4 33 bd 37 43 3c d7 97 8c 9b 37 f9 +e4 17 29 d8 3a 26 2b 98 46 53 8e 50 39 e6 59 68 +b5 95 a4 62 72 bd 5f 4a 2c 3a bf 89 0a 35 50 8a +5b cb 4c 29 ef bd 91 02 85 03 83 4c fa b2 c0 f9 + +# Prime 2: +c5 14 59 a6 72 ed 8b 72 4c 6a 8f 28 5c bb 8e a7 +6a 23 93 91 79 28 be 56 c0 dc df c9 43 c3 0b da +3c ee fb 86 dc c8 c4 55 67 8c fe 88 25 f3 88 77 +a3 72 8a 1f 10 29 1f 54 7b 1e 8b 16 04 83 e5 bb + +# Prime exponent 1: +b6 ba 83 a9 7c a7 6f 5f e6 0f af 0f ad 5a 97 00 +2a 7e e5 2e 67 1b 1d 38 77 05 87 a9 fe 2b 59 9c +48 15 f5 34 a6 28 39 e6 21 12 45 d2 7a 0d eb b1 +b0 29 1a 32 8e 52 a2 61 34 ec 12 42 b4 0f bd c1 + +# Prime exponent 2: +b9 b1 c6 13 2e e1 22 6e 6d 10 4e 99 72 5f 0b 38 +35 ab 15 e5 91 6a d1 85 be ad 9f 72 ed 95 3f 7a +bf c5 52 5c ad 75 c2 80 d2 54 28 94 b2 65 b8 65 +3a 2d b7 75 33 6d fb e6 47 27 ed 57 ae a3 74 f7 + +# Coefficient: +7b 8d 15 a5 dd 28 90 a6 7d 1b 54 9c 93 5f 58 5a +38 da 56 f7 c8 15 5a 51 9d c8 f1 f6 ad e5 53 d6 +37 93 c7 8a 0e ce 8d 53 72 4e 62 ae 50 3a d5 25 +bf af 10 cf 61 6a 47 73 ce 7c cd 5c 1b 31 51 bd + +# PKCS#1 v1.5 signing of 20 random messages +# ------------------------------------------------------- + +# PKCS#1 v1.5 Signature Example 2.1 + +# ----------------- + +# Message to be signed: +e1 c0 f9 8d 53 f8 f8 b1 41 90 57 d5 b9 b1 0b 07 +fe ea ec 32 c0 46 3a 4d 68 38 2f 53 1b a1 d6 cf +e4 ed 38 a2 69 4a 34 b9 c8 05 ad f0 72 ff bc eb +e2 1d 8d 4b 5c 0e 8c 33 45 2d d8 f9 c9 bf 45 d1 +e6 33 75 11 33 58 82 29 d2 93 c6 49 6b 7c 98 3c +2c 72 bd 21 d3 39 27 2d 78 28 b0 d0 9d 01 0b ba +d3 18 d9 98 f7 04 79 67 33 8a ce fd 01 e8 74 ac +e5 f8 6d 2a 60 f3 b3 ca e1 3f c5 c6 65 08 cf b7 +23 78 fd d6 c8 de 24 97 65 10 3c e8 fe 7c d3 3a +d0 ef 16 86 fe b2 5e 6a 35 fb 64 e0 96 a4 + +# Signature: +64 ac 09 39 71 f8 f0 96 a4 c1 d4 a5 43 66 2a 2e +5a 12 81 c9 50 98 7d e8 98 70 7f 02 9c 15 9b d8 +32 ca c5 5d 91 36 e0 e9 b4 a8 0b f6 f2 1b 68 cf +97 70 a6 34 9a e5 1e 7f 09 db da 9d 59 c4 58 37 +37 47 2d 4d 65 32 c7 17 7e e9 81 08 d2 cf 42 cd +08 5a bb 49 22 eb 29 d9 6f 3d 0f 6b 1d 0d 43 c7 +39 cc f1 ba 65 16 75 e1 96 8b 50 7d 51 90 2f 38 +cd ec 0b 61 32 72 90 45 32 5f c1 fb 8f d5 58 e8 + +# PKCS#1 v1.5 Signature Example 2.2 + +# ----------------- + +# Message to be signed: +c1 11 46 4e 00 2e 4e c6 18 a8 e2 63 db cc a9 1f +b1 8a 00 a1 8b 44 0c 4b 55 97 be e7 db 2a ed a8 +31 e6 21 fc ac 8d d8 1c ee 35 03 24 2b 33 b0 da +a9 87 fe 2f 54 93 ad 2d 06 a1 50 07 59 00 40 ce +3c 22 77 64 2f d2 7f 3f 25 5e 3d 98 d8 9d fa eb +86 be 34 e0 b8 fb b9 35 fb 92 85 60 fa 29 2d 26 +34 62 5a 50 7d d5 80 a8 91 24 b9 21 29 3e 8d fe +dd c2 81 d7 9e b3 a5 69 d5 9e 0d b8 01 3e 53 f7 +d4 c2 f9 6e 5f 2e c2 7f d8 dd b0 18 25 d1 7f ca +40 6d aa 62 24 c7 60 6d 2c 91 52 82 09 6a 78 05 +5a 49 62 15 37 b4 f0 25 a6 e5 b2 12 9b c8 c1 a4 +07 + +# Signature: +6e 7e aa d8 04 94 5e b0 46 70 dd 86 76 b7 05 7d +03 ac 3e 22 64 65 b1 fb 84 03 e6 ae 79 83 e0 a4 +6a 89 a4 eb 32 bd c8 e7 ae 5a 53 d4 8a a6 4b c9 +c3 db c8 cf 9c d6 dc 6a 68 fc ea e9 e2 9f 47 45 +fa 49 e1 8d 18 4d c5 d2 6c 4f eb 35 1f b4 b2 28 +c4 c1 8c ab db de 86 01 72 4a e3 80 3d b3 05 f2 +a0 76 fa 8a 57 f4 61 0b 8a 6e 0e d4 35 75 be 5d +5b fc 16 30 47 9d f3 bc bc 51 51 77 af e4 99 4a + +# PKCS#1 v1.5 Signature Example 2.3 + +# ----------------- + +# Message to be signed: +29 b8 5b 14 b2 da 94 7a 4c 3a d1 e5 93 7d a1 92 +c6 05 08 65 af 95 04 a5 44 53 70 e4 3d 3a 8d a5 +d3 55 fd 58 76 6b 25 43 ac 6f 93 10 87 83 c1 3f +f2 8b 2b e5 60 83 f0 29 82 39 e0 ee 96 81 ee 47 +c6 + +# Signature: +80 b3 8c e7 35 12 6c 85 45 d9 1d 18 ec 90 37 65 +4d 46 e4 f3 c5 1a 6b 86 18 e1 5f 72 cd 20 75 00 +a4 70 01 75 77 d0 a8 c5 5a 2b a3 34 38 3f 1f 8d +99 fc e2 46 0b 32 97 bc 03 7e f6 4a c4 a3 09 8c +6a aa 24 a4 d0 14 4a f1 02 d0 dd a1 7e 07 dc 69 +59 23 93 2e 56 8a da 00 dc 4f 7d bf bc de c4 3c +c9 08 38 80 17 d2 ee f0 4e 60 df e4 d5 73 40 fa +b9 16 e2 b8 11 24 4c b1 e4 a5 52 38 6f e3 ed 4c + +# PKCS#1 v1.5 Signature Example 2.4 + +# ----------------- + +# Message to be signed: +d3 b7 aa d3 7a 48 90 e0 36 5b 86 c7 da 94 91 e7 +3c df 55 5d 1b 02 b4 51 81 6d c5 2f 96 30 d5 90 +de 83 a5 c9 39 61 01 25 22 df f6 db bb 9c db 0e +71 ae 51 40 19 64 af 18 90 e8 93 25 db d6 26 f2 +da 01 34 58 e3 9e ec a5 83 e8 9e 4c 08 e5 d4 12 +be 49 84 95 88 6e 05 51 cf e7 42 b8 b5 + +# Signature: +9d 8a 88 89 a3 11 b4 86 cb e2 22 57 03 f5 d4 ae +2a 54 c2 bc aa ad 06 fe 76 48 b9 e2 d8 5e dd a1 +a0 7d 85 6d 6a e9 bd 5c c1 e5 15 32 66 ec 7f 1e +1d f3 d9 29 cc 44 70 0f ac 92 64 58 41 4c 28 41 +da 83 32 8e 81 e0 b9 d6 c3 88 5e 76 73 70 ad 5c +f1 f5 76 d9 dc e3 48 ca ec 5e 64 43 e0 ae b7 c3 +f7 2b 7d d2 53 66 70 23 b9 a4 77 ab 34 df 8f 20 +67 e2 25 ad cb 73 ee 11 e1 59 eb 64 91 47 d6 02 + +# PKCS#1 v1.5 Signature Example 2.5 + +# ----------------- + +# Message to be signed: +f6 58 18 8c 8f 9d e6 0b 5e 99 a2 9f 52 d3 b8 89 +20 1b 30 d4 64 c3 b7 27 92 a3 02 09 5d c1 e7 7d +45 e9 4f 5d ab 73 db b3 13 54 38 57 ff 91 db f4 +73 df c1 45 d7 3b d5 06 20 75 d1 92 a3 fb f4 a1 +33 e7 e5 68 df 20 b8 cf f7 7b 3a f6 87 aa 22 55 +9e c1 + +# Signature: +0a 95 a4 4f 62 74 e7 4c ec 45 17 96 af 56 88 d4 +be 01 08 93 fa ae 27 d4 90 f4 77 1b 00 3f 70 46 +cc cd 41 9f c8 19 d7 33 19 55 f4 1e ac 93 39 f5 +46 c5 84 a8 b4 2a 5a c6 32 90 58 3f f3 eb 6b 29 +ca dc 75 4a e5 8d 5a 56 37 b6 60 97 96 e8 05 51 +73 ff 20 a9 cc e4 92 fd 78 37 46 86 15 e8 41 08 +87 f0 b4 a5 9f f2 52 a8 25 97 76 c8 ff da a6 7c +87 df f8 98 3a e6 79 d1 de 22 ea 15 8d 48 f6 8b + +# PKCS#1 v1.5 Signature Example 2.6 + +# ----------------- + +# Message to be signed: +31 ae 5f 83 a0 fb 3a c9 25 5f fa 43 5f 70 e2 ab +65 55 66 e5 fb 8b 78 b8 02 c1 87 cf f1 c5 e4 0f +ed 06 97 8c 5d 59 76 eb 4c a7 75 80 63 99 a6 fc +4d b5 0c 1f 88 66 1b a6 8a bc 21 fb 2c cd 53 7f +50 18 f3 6e d1 f7 d4 53 83 fd 46 9e 77 ba b3 e8 +a9 5d fa 1b 94 1e 43 0d de c5 52 dc d8 2f 5d 10 +d2 9c d1 0a 22 d1 7c e2 42 59 28 ff 5d 07 10 dc +e7 d9 f8 3b 12 e0 4c 1a 01 59 c2 71 76 e0 4a cc + +# Signature: +3f 11 ea 73 9f 32 9c 9d 40 04 60 34 b6 c0 cf ce +b4 9b c3 20 1a 5f 25 ea f5 01 5a ed ed 02 18 9c +e0 b0 cf de 19 12 5b d2 88 b7 d0 c0 62 32 1a 5b +dc 2c fa 42 26 f5 10 4a 1f ba eb be 7f 72 f5 f7 +92 7e 1e ae 26 fd c5 ba 92 f2 d3 f8 69 eb c3 2d +90 18 dd 04 ed e8 6d e5 c4 54 f1 f7 a1 b2 e2 d1 +94 0a ac ae 27 79 63 55 fe 18 ac 80 97 53 53 92 +9a c6 a8 38 45 8b 5d 9d c7 57 6e 38 87 ee 7b ca + +# PKCS#1 v1.5 Signature Example 2.7 + +# ----------------- + +# Message to be signed: +96 ff 99 f1 50 60 c9 73 a6 5b 69 a8 b5 b6 3a db +33 25 32 0d a9 37 29 75 84 ad 4f ad 5c 3c 74 69 +01 9e 9c f7 2a cb 31 5f 1e 49 19 27 bb a1 94 87 +55 82 3e b0 7e 3f 20 ac df 78 65 3c ae 45 0e 47 +bc 54 ba f8 ca 11 67 a5 05 08 44 e0 22 22 0e e6 +65 8a 8d dd 95 63 2e 9a dc 1a 6c 14 37 9c 1c 5a +e5 a0 ce 5d c4 02 08 09 62 2a fd ec f8 1f 18 a5 +1e 28 66 6d 02 b1 dc da 0a 27 b8 c3 d2 c2 7b 2c +07 b3 80 22 00 01 7a 7c 12 4a 43 37 cc 4b 6e a2 +ae a7 5c 68 b4 40 e3 79 47 e3 61 9b cf ee 05 5b +b2 ed ab c4 24 49 07 e0 48 3d d3 a1 7d 8e df f3 +a6 50 29 3f d4 ab f5 c4 5d 1a 5b 6c 54 02 ba 2b +81 b7 b0 e0 c9 5e e9 49 b2 a2 38 c1 99 56 20 6c +12 4e 0c d9 c2 46 20 b3 6a 83 bf 93 b9 6e f2 04 +bd e5 31 6c 1f 53 27 c0 a6 21 ec ce 20 93 c0 65 +2d df 32 17 68 d7 45 02 f1 90 85 29 62 9b ab 68 + +# Signature: +18 3f 85 3d 0d 03 62 18 70 e3 ba 58 68 50 c5 ea +59 fc 4e 9a cf 37 94 b9 ad 59 a1 bb 80 18 1e 77 +b1 11 d6 64 86 47 e1 39 a3 9e c0 4f 86 18 74 91 +e7 7b 4d 75 c0 60 79 5b f7 27 08 46 d3 96 e0 bf +ea 83 15 79 5e 79 d7 6a 91 9e a7 6b 06 ee c1 3b +af 4c e8 af e1 e3 4b c2 24 57 d7 b7 99 2e 08 42 +ef ad e1 79 b0 ae da cc fb e2 d2 3d 3e b3 14 e1 +de 91 c8 71 b9 db 5a bf fb 17 47 7f ba 23 3a 06 + +# PKCS#1 v1.5 Signature Example 2.8 + +# ----------------- + +# Message to be signed: +3a 17 6c 79 3a 54 6e 2d 27 6f b8 ff c3 28 16 3b +49 49 97 a5 30 2a ae 2e 50 45 a2 a2 06 87 ea 6d +1f 18 1c 6a bf e6 09 0c 8d c4 02 56 db 3d e0 83 +22 64 7f b7 95 bb a1 71 3f b5 7e 33 d5 3e 0e 13 +be da c6 a6 58 ad 4a b4 91 22 38 81 19 8d f2 93 +67 fa ad e8 be 9f ca a4 e4 83 f7 b7 f3 dc 7c bb +f9 7a 17 aa d8 8c 26 cf c6 41 0f 94 5b 54 fc 53 +db 55 ac 80 3d 8b 73 69 1b 14 84 84 7d 7f 3b 7e +93 94 e5 5f 0a 51 fe 61 ae 84 52 3c 94 b2 2e 82 +39 6d b6 cf ac b7 2e 0e e4 94 aa 0f 1f a5 93 12 +54 43 ae 15 55 a6 a9 33 fa ce 00 74 79 1d c2 c2 +92 42 eb + +# Signature: +41 3c 92 23 a2 e9 b1 22 cd 87 25 77 e5 2f 31 3d +41 da c7 9a 26 cb 10 33 da 0b 6f cc 4b 48 21 07 +74 4b f4 90 fa 79 8d cc d0 cb d1 18 ef 39 c0 f5 +59 d8 7b 89 33 5d b0 9b e7 70 0f b0 9f db d3 40 +40 a0 0b e5 ca 42 88 34 77 b0 6e 4e 10 a7 cb 11 +76 8f cb 02 c3 4f b1 06 e5 22 86 0d 10 69 39 06 +26 0f 43 d9 06 12 99 03 93 a8 ff ac 9f d7 0c a3 +78 29 11 1e eb a6 f3 de e5 4e f1 c1 62 68 b3 3e + +# PKCS#1 v1.5 Signature Example 2.9 + +# ----------------- + +# Message to be signed: +06 8a 99 1b 32 b6 76 c6 4b 89 8c 67 e1 13 72 82 +b4 37 11 b0 d0 67 1c 24 7d 9f 7c 48 f5 04 3e 4f +c2 06 dc 65 af 89 06 f2 52 f0 24 52 05 ea 08 43 +23 d4 27 6b e5 aa 0f c5 af 9c 3f 34 b2 fd 66 34 +df 57 2f c3 13 d2 73 b5 3e 9e 36 b9 46 e7 e6 72 +f9 8d 85 7d 7e dd d3 dd 04 39 31 32 f4 61 f2 2c +99 00 26 16 6f 38 5b e1 59 5c 7f 23 f8 9f f5 7e +05 a7 be 28 5d 10 56 15 48 5f 35 6a ba b1 ff 2a +b9 27 d6 09 95 2a 62 7e 46 8c a7 59 0a cb 52 13 +f4 31 39 f8 e2 c9 d4 d1 7c 6b d7 91 4e 53 f0 2f +d1 9a 13 1f f4 9c d2 5e de 8f 41 8a 88 53 0a 82 +39 88 7f 0f c7 97 ed b5 04 64 79 64 bf 31 ca af +08 0d 58 17 a0 + +# Signature: +57 5d a9 e9 be fc a1 82 95 46 e8 29 38 15 00 11 +32 03 0e 74 9c a5 10 88 f1 68 bd 15 0b 13 94 c7 +ac d5 97 8b ca 03 f7 b9 d9 2a 29 b8 e2 85 6b 0d +a0 7f 0b b1 5c 0b 33 e0 54 87 99 1a d9 7a 81 2d +c9 04 aa f0 fd 1e 38 7e f1 c2 70 c6 86 8d 3e e1 +c6 11 57 7b c4 d0 7f f4 56 b2 43 98 32 90 8a 3d +cc 4f c0 99 04 72 fd a3 cc 61 11 93 0b 99 79 5d +60 c0 e3 78 88 e8 7c e0 0b bf 3c 1c f3 07 f9 e1 + +# PKCS#1 v1.5 Signature Example 2.10 + +# ----------------- + +# Message to be signed: +d6 83 9e e6 d0 74 50 32 7e 09 a0 3e 1e c2 80 e1 +c8 d1 15 00 dc 39 0a 49 a9 c9 82 87 49 c3 e9 a4 +be e2 ba 57 6f 6d 12 17 a8 e7 85 4a 90 7e eb 93 +df ff 92 30 8a d0 d9 4e 2b 38 1f 92 b0 e8 4a 47 +1b f1 f3 7a 68 e9 65 f6 58 59 d1 fd fd 6f ea 84 +40 79 c4 03 70 dc ea e2 + +# Signature: +a7 c5 f6 d0 de 9c f8 f4 17 37 f2 3a e3 e8 cf 60 +9a eb cf 22 d5 de 12 13 d9 57 3c b9 44 03 f8 9c +0f 70 88 ff fc 61 10 6f a6 09 c7 37 1a 8d 7e 1b +cd 22 1b c1 ad 94 91 2f ab f2 ff c0 2f 84 84 56 +4c 22 5c 06 9b fc 6d a9 f3 f9 f4 97 4e 08 e1 fe +56 f7 48 ff 79 05 97 90 6a 95 4e 38 37 43 a3 7e +57 5f ef 07 4f 06 0f 3d d1 5b 5e e0 f9 4d ba 69 +d8 6c 99 22 3f a9 c3 a6 1a 8c b2 af 2f ab 1e 04 + +# PKCS#1 v1.5 Signature Example 2.11 + +# ----------------- + +# Message to be signed: +33 84 9c 67 df 9a 6f fa c3 da 90 a8 cd 31 73 1a +02 97 b9 d6 01 0a 03 32 0f 88 45 03 5f c3 43 09 +ad + +# Signature: +1b 87 05 1f 15 91 c8 ae 7e e3 cb 24 26 70 39 a7 +28 40 5d bf 23 1c af 21 f3 24 7f 05 85 8b 2a 51 +65 0b 81 bc 53 77 86 5e 4c 1e 8f d0 36 41 52 a1 +6b c5 8f 7d 2a c0 1c a6 79 cc 49 dd 04 89 03 d5 +5a d0 5f 10 2c 74 b3 60 1f 25 ad 30 62 40 25 c3 +0b 6f 0f 79 11 fc 22 45 8e 5d 43 5f 38 8e 3f bc +49 5f a0 c6 10 c1 29 8f 82 1d a5 38 40 3a 93 36 +4d 2e ab f1 e3 b3 2f 81 10 a7 e0 3e 37 2e cb c5 + +# PKCS#1 v1.5 Signature Example 2.12 + +# ----------------- + +# Message to be signed: +b3 da ba ca 20 59 a7 0e 25 cb dd f4 aa 59 25 99 +57 54 ac e4 3c 5d 60 36 40 48 9a f4 8f ea 6e dc +4e 19 cb ee a2 c0 db 62 ae 0a 10 4c 72 e4 cd 56 +cb 53 2f 4f e5 77 b3 6a 81 98 b4 87 9d 7f f8 04 +26 90 f6 62 77 3f 3d 63 93 f2 58 98 d2 + +# Signature: +26 f1 37 70 26 3f c5 bd be ad f8 8f b4 dd 30 7a +38 95 9b 16 f3 df 94 6a de 86 4b 1e 7e 91 4d 36 +4e bf 9a df d8 6a 70 02 2d c6 1b 43 fb 1f df 86 +96 97 8e 2d 1f 6a 2d ef ee 75 ad aa 69 a3 95 32 +07 40 50 be 70 8e af 03 1d 5f ae 0f fe 24 5b a4 +ff 3c 5e 34 0a f5 df ec 6a 4c ce 0e 18 87 6c fc +13 66 ee ed df ce 0f 83 5b 38 e8 18 81 b1 fc 58 +32 93 0f c7 9b 08 f1 fb 34 fb 22 42 33 f4 c4 68 + +# PKCS#1 v1.5 Signature Example 2.13 + +# ----------------- + +# Message to be signed: +09 91 12 fa e7 40 88 8c ea ac 70 54 d5 97 35 1d +79 e1 59 a9 58 d8 12 15 78 e5 2c 83 7d b3 54 3c +fa 6f 8e 7f 1d bd 2a 61 97 86 45 a4 d3 85 b9 bb +1c 60 bf b1 1b b3 c8 75 2a e3 1f 99 6d bb 52 62 +8f 93 d5 26 94 f1 82 e6 90 35 a5 e5 57 ec 71 82 +62 f4 03 df 52 11 f7 3c 6d e0 d5 5a 0b a7 + +# Signature: +8d 8c 8f 3a 86 f4 9e db d1 25 c8 3e bf 6d 52 e7 +65 16 15 01 48 21 54 59 8c 28 3a be 94 02 77 87 +2b 00 d0 77 7c 2e 69 7b 78 83 cc 32 1e 15 1c 80 +11 6f 9f cd 17 7a c4 c7 de dd f0 3c a1 b2 c5 93 +31 dc 1c 8e 94 7f 1e b2 aa ee 8c c9 41 dd c5 f3 +74 a6 3d 6c 99 38 ec d8 e8 8c bc ec 58 92 9c ff +dd ef 0b a2 17 58 85 a8 0d c4 cd 92 d6 b7 9d 9c +6a 81 69 6e 16 f9 a8 3a 10 ca 8e fa f1 97 5f 55 + +# PKCS#1 v1.5 Signature Example 2.14 + +# ----------------- + +# Message to be signed: +aa 17 e6 bb d6 db 19 e5 4b ee 1a 7f 0e dc ca ce +ab 63 5d 76 28 fc aa 18 ec fa fc 40 1c b3 fe b5 +1f 9a 37 31 f3 80 2c be a8 1c 73 30 28 c9 58 4b +6b 78 e2 05 59 54 cf 91 04 da a6 77 aa 40 be 9b +7c 65 b0 7a c4 a8 bf 25 c1 14 9e 05 47 35 cf 3c +e3 32 d4 29 bc 73 80 24 45 df b3 68 8b b8 19 48 +b5 7e 27 6a f3 24 62 f7 ad 80 4d 50 c9 3b c7 e9 +ef 75 37 69 5a 27 1a f7 2e 4b d4 7c e5 fa 9d 62 +f2 da c0 33 36 23 f4 9e b9 d6 d7 80 34 ed 1d f6 +e1 2b fd 04 26 1b be 5c e0 40 e0 3e be 25 8d 2d +05 2a 12 ad 4e 3b f2 53 04 23 01 c7 64 58 ed 91 +0c 5f fa 70 5c 74 7a d8 ca 0c 1c 62 28 da 2c 97 +e1 38 + +# Signature: +64 4e a0 76 21 4d bd dd 30 05 5d 7c 56 18 92 27 +9b 46 ba b1 e1 22 53 42 4c 28 f4 49 e1 72 64 6a +f3 49 8c 7a fc bf f7 68 e0 46 a7 c2 e3 d9 c0 e7 +12 8f 87 7b 92 19 5a a2 bb 9f 1c fb df d1 5b b6 +5f bd 23 ef b2 94 fb b1 1a 3c 66 05 6d 60 63 85 +3b b2 3c 27 46 65 a1 3e f4 f3 c1 2f 59 21 a4 19 +e9 49 b3 0c 0b c0 d7 7d 6b 28 69 1d 23 64 d9 5b +f6 8b e8 d5 97 8e f1 bc 98 52 a4 f0 66 04 47 4a + +# PKCS#1 v1.5 Signature Example 2.15 + +# ----------------- + +# Message to be signed: +28 24 9c 38 7a 06 14 40 e9 86 38 e1 ed 78 a4 86 +51 30 e5 75 33 d7 89 10 8c 63 e1 5f d8 01 9b ad +2c d1 a7 55 2b d8 af d2 06 d9 78 eb 1f 2c f3 f2 +3a fc 4b 34 e6 dd 7f 69 c1 fd f4 fe c2 52 68 d1 +86 55 51 94 49 22 90 6d ce 6d c4 41 f9 4a 46 6b +f8 39 1a d8 2b f5 94 0e 44 71 10 f1 d1 5d e1 29 +31 29 fb 44 24 a1 71 75 19 d6 d4 28 d6 6b 7a 10 +91 42 ac c9 15 f1 ea c9 6d ef 2c 32 90 b0 1d 05 +99 0b f8 02 3a 6a 64 71 2f 63 13 7a 8e + +# Signature: +57 02 06 06 69 ed 47 bb ca 11 b9 16 68 28 9e a3 +f5 e7 46 ad 2e 38 6d d1 bc 2a 8b ab 17 46 ba 2a +64 bf 15 b3 fc 2e c8 b0 cc 99 d8 54 fa 32 11 c9 +55 c4 55 d7 ff 2e 1e e2 39 f5 4f 38 6a 42 bb 25 +40 a8 75 8f 32 97 e5 52 de 1e be 8e ac 70 f3 54 +87 94 2b ba da d5 bd 95 73 90 ff 17 93 af 3d 30 +d9 36 b6 f7 9b 44 a9 b6 3c ee 62 d5 58 4d a3 a1 +fc ff a5 b6 fe ee c1 1c d6 3b 18 0f 0b fc 5b 6b + +# PKCS#1 v1.5 Signature Example 2.16 + +# ----------------- + +# Message to be signed: +e4 91 a1 56 fd ba 31 6a 2a 20 a1 2e ea 50 be 77 +4e c9 aa be b1 c3 98 e9 08 be a3 29 68 21 7e a4 +1e 96 6d b7 27 2f 0e fa 37 c9 0a e4 e9 f3 86 21 +a6 27 a9 d1 2c 8b 4e 80 60 c5 45 c5 60 59 e9 e4 +8a 7f 16 81 36 72 47 33 58 19 ba 12 7e 65 93 1e +1d 9f b7 0d fd df 4c 99 56 a5 b0 4c 52 bc f8 cb +df cd f2 29 19 64 da fa ca 7e e7 0e 80 a2 75 9c +ec 73 5d 01 ac a8 ff 89 4b 68 9b 93 78 3d a8 93 +9c 62 09 dd 68 3c 60 + +# Signature: +9f 20 5b a9 0d f2 d4 01 49 26 48 1f 9b 3f 45 a8 +9d 23 ec d8 4f 5f 16 e6 73 34 c4 ca f3 f3 b9 c2 +01 a7 98 d4 ee c5 62 76 59 88 23 18 0e 07 8d 0a +ef 4f 8f ba 0b 25 c1 fd a3 e3 36 54 c4 74 a9 c1 +1a 23 b0 87 10 91 3d ff 76 56 f0 e7 ee 22 cc 44 +c9 99 c0 95 a6 51 4a 9d 2f c0 ca 4e f2 08 de 0d +92 93 b0 c5 60 8b ae d1 07 4a 0c fd 57 b9 9e f8 +ce ab fd 34 72 b7 db 3a b9 60 6d 13 f9 bb 43 9a + +# PKCS#1 v1.5 Signature Example 2.17 + +# ----------------- + +# Message to be signed: +06 ad d7 5a b6 89 de 06 77 44 e6 9a 2e bd 4b 90 +fa 93 83 00 3c d0 5f f5 36 cb f2 94 cd 21 5f 09 +23 b7 fc 90 04 f0 aa 18 52 71 a1 d0 06 1f d0 e9 +77 7a d1 ec 0c 71 59 1f 57 8b f7 b8 e5 a1 + +# Signature: +45 14 21 0e 54 1d 5b ad 7d d6 0a e5 49 b9 43 ac +c4 4f 21 39 0d f5 b6 13 18 45 5a 17 61 0d f5 b7 +4d 84 ae d2 32 f1 7e 59 d9 1d d2 65 99 22 f8 12 +db d4 96 81 69 03 84 b9 54 e9 ad fb 9b 1a 96 8c +0c bf f7 63 ec ee d6 27 50 c5 91 64 b5 e0 80 a8 +fe f3 d5 5b fe 2a cf ad 27 52 a6 a8 45 9f a1 fa +b4 9a d3 78 c6 96 4b 23 ee 97 fd 10 34 61 0c 5c +c1 4c 61 e0 eb fb 17 11 f8 ad e9 6f e6 55 7b 38 + +# PKCS#1 v1.5 Signature Example 2.18 + +# ----------------- + +# Message to be signed: +31 1c 88 80 05 35 d1 b4 e9 bc 78 65 18 31 a3 e9 +67 e7 4b 58 28 e0 14 11 5f be 5f 60 9c e8 65 fe +d2 41 97 0f 87 2e c8 f2 3d c2 bf 61 6b 80 20 e4 +45 64 f9 34 dc bf 72 38 61 70 07 4d 92 0b a8 95 +d3 3d df 27 93 69 f2 36 a1 9a cd 4f eb 2b + +# Signature: +89 46 63 e6 3e c1 9f 56 20 3f 4a 44 6b 5e 2b 51 +74 c8 14 a5 4c be a2 c8 e2 98 f9 9b 34 c4 bb c2 +c8 b1 77 ba 98 57 d8 1c 85 44 36 bd 99 af 58 c0 +9d de 5a ca d2 d6 41 50 43 fb 40 e7 84 75 ef 74 +01 2e 4d 4f 75 b2 e9 58 85 c8 51 a2 3b 4a 25 54 +93 f3 0c 17 2e ae 01 d4 79 10 fa bd 26 9f 57 94 +0b a4 43 50 6c 05 22 bf 72 8a 25 7a c1 07 3b df +99 b4 29 56 db 00 2a 30 a5 4d bd af 28 4d 8f 69 + +# PKCS#1 v1.5 Signature Example 2.19 + +# ----------------- + +# Message to be signed: +b2 65 a9 77 7f aa f1 58 a8 08 aa e7 08 5a 83 e7 +07 9c ef 80 d5 fc 9d 7c dc 96 3e c9 + +# Signature: +28 1e 88 ce 19 0e 98 62 90 34 36 a8 6b a4 37 27 +16 44 9c c0 ce 8d 55 4f 70 2d 72 52 a0 67 60 af +42 12 1d d0 9b f6 ea 13 f0 eb 25 2e cc 76 42 10 +61 f5 74 4b d8 e3 2c 5a 8c 4f c1 f9 52 1b 3f 5c +29 14 6d d0 59 12 91 ac bd c5 b6 3b 55 1d 22 8a +e5 38 95 b1 97 e6 e2 7a 70 68 aa 31 03 b7 0c fb +30 f4 15 84 5c 7e 52 87 f1 11 4e 4c df b4 01 ed +51 98 64 cf 61 bc 46 9c 66 69 9b 29 60 a0 af f2 + +# PKCS#1 v1.5 Signature Example 2.20 + +# ----------------- + +# Message to be signed: +7c 43 9e 7a b9 90 cd ef 95 6c 42 39 47 9b 49 da +84 2f 8b 76 76 5a 7a d4 89 7b c1 6c 61 ed 3d 09 +80 5d 76 e8 a5 be 8b 57 8b 95 1f 45 45 df 92 a8 +a5 37 ba 3e 2c 13 dc e0 a0 03 e7 b6 24 9e 32 be +94 1f 21 cd a7 25 b8 04 07 be 1e 28 bb 9e 39 37 +38 32 53 56 ec 21 74 1d 5c 86 f3 c2 b4 f7 b9 47 +af d5 6b 2d 3a ec + +# Signature: +6a fa d7 7a 05 6d 07 29 05 86 e9 13 80 9a 04 37 +d3 9a b3 07 32 45 12 b2 f5 bc 2b af 58 0b f4 55 +43 eb 04 ff 83 e9 63 a6 d7 f3 3e 9d ff c1 fc f4 +24 48 c5 fc fa 47 27 19 c6 51 f8 1f 3c 62 22 98 +3d 38 91 7e 29 b4 84 85 87 9c eb b0 a6 1d 38 9e +23 8c 9c 71 c3 68 ed e4 08 3a 94 62 97 f7 19 0b +4c ef 86 7e 9c cd a8 f9 ff c6 19 84 fc f0 5d 4f +ba fe 10 7d ac f5 b1 dc 8e 2b 14 95 b2 44 f8 e7 + +# ============================================= + +# Example 3: A 1024-bit RSA key pair +# ----------------------------------- + + +# Public key +# ---------- + +# Modulus: +b5 d7 07 b7 92 e0 56 f7 2f d7 6d 8d a8 89 a5 3c +e4 d8 eb aa 08 2a ee b2 30 32 e3 c5 d8 eb c4 c1 +55 61 31 9b e8 df e1 88 99 1a 89 51 d4 b2 3a 51 +e8 a9 38 2c 80 5e 4c fd 49 0e bb ce aa 20 80 2a +d6 83 b0 5a 10 0f 29 98 5f 01 1c 3c 8a 44 26 25 +52 d8 3d 9a 1b 7c 27 31 5e 14 4a d8 df 5c be 8b +c6 40 0f d9 cb e7 6b 74 21 d7 08 aa 64 f0 40 ba +e0 7b 7b d6 f9 22 18 f9 a7 29 28 4c c5 98 cd d1 + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +b5 d7 07 b7 92 e0 56 f7 2f d7 6d 8d a8 89 a5 3c +e4 d8 eb aa 08 2a ee b2 30 32 e3 c5 d8 eb c4 c1 +55 61 31 9b e8 df e1 88 99 1a 89 51 d4 b2 3a 51 +e8 a9 38 2c 80 5e 4c fd 49 0e bb ce aa 20 80 2a +d6 83 b0 5a 10 0f 29 98 5f 01 1c 3c 8a 44 26 25 +52 d8 3d 9a 1b 7c 27 31 5e 14 4a d8 df 5c be 8b +c6 40 0f d9 cb e7 6b 74 21 d7 08 aa 64 f0 40 ba +e0 7b 7b d6 f9 22 18 f9 a7 29 28 4c c5 98 cd d1 + +# Public exponent: +01 00 01 + +# Exponent: +45 17 92 b5 94 47 cc 93 78 a8 a4 d6 45 fb 22 ff +4b bf 06 70 61 51 1a c8 36 db 27 43 a6 24 13 6b +18 6b 69 43 a1 cc eb 6f 91 29 0d 93 3b bb 8a c0 +53 a4 74 95 28 23 6c a2 72 cf 77 d9 d3 37 ad 2a +b3 6a 87 a9 15 3c 5e 16 71 6e 09 ba 0b ea a6 4b +31 25 26 d4 a8 c2 dc 68 fe 09 e3 7e 50 74 a0 90 +9d 3f 04 ab 73 90 8a 98 0d ec 1d a7 eb 45 05 a4 +8b ca d3 b6 0d 01 60 84 58 64 a6 51 1f f5 59 a7 + +# Prime 1: +ff a9 f8 e8 b0 82 17 0b 63 73 f0 0d 73 c4 23 86 +d4 02 f2 80 8b 39 3b 32 f7 8f 86 ea f6 4b 21 bf +dd 33 4f b9 aa d1 6b a6 d9 da db c8 94 3a 29 e6 +63 c8 b3 9c 09 59 69 02 5b b9 b2 d9 d6 fe 67 b7 + +# Prime 2: +b6 14 37 8d 5e 3d a5 a8 0a 6d 73 52 fc 66 a5 64 +59 7b 06 8f c9 d3 af 5d b0 e4 e7 35 be f8 81 dd +40 17 ee 70 82 96 19 0b 6f dc 84 04 f0 7b d9 dc +5c d5 d2 be 48 86 a7 cb bc b2 1d 8c 3d 64 a6 b7 + +# Prime exponent 1: +51 0e 68 96 0d 70 11 32 51 23 ae d5 f5 00 18 6b +64 c8 52 6e 22 b5 d0 69 06 48 00 f4 79 85 b4 7b +89 fb fc a8 d6 d9 72 92 01 bb fb b6 8a 18 2e b4 +96 aa 49 17 8d 77 45 6d b3 fb 1a 13 2a b0 99 dd + +# Prime exponent 2: +57 eb bf 3f 76 48 52 5b a8 5d 5d 98 ae e4 69 ec +e1 00 75 14 ad a2 98 45 a7 8b 80 d2 05 1b 3e aa +35 ae d8 a6 5f 88 57 23 9c aa 60 dd 79 ba 74 62 +e2 39 26 00 58 49 1d 71 55 f6 b4 29 e9 e3 56 55 + +# Coefficient: +ee 10 7d c7 ef ec e9 a6 5c 0e 87 78 9a f5 59 0c +93 83 9d fe 82 85 20 da 17 74 ff 80 f7 e5 14 55 +7f ff 10 bd 8c ae 18 46 ef ee 7c 10 d7 a1 2c 4a +05 5c c1 36 e4 a4 ef 25 fd 3e d9 d0 cd df 74 f9 + +# PKCS#1 v1.5 signing of 20 random messages +# ------------------------------------------------------- + +# PKCS#1 v1.5 Signature Example 3.1 + +# ----------------- + +# Message to be signed: +98 6e 7c 43 db b6 71 bd 41 b9 a7 f4 b6 af c8 0e +80 5f 24 23 48 8f b4 31 f5 ee 79 2b 6c 2a c7 db +53 cc 42 86 55 ae b3 2d 03 f4 e8 89 c5 c2 5d e6 +83 c4 61 b5 3a cf 89 f9 f8 d3 aa bd f6 b9 f0 c2 +a1 de 12 e1 5b 49 ed b3 91 9a 65 2f e9 49 1c 25 +a7 fc + +# Signature: +62 75 e8 73 97 e3 09 2a ab 36 98 bb 1b 5c f2 4b +8c d7 71 2b ec ac 35 e3 22 03 d5 43 14 e5 47 0e +a9 aa bc 86 57 f5 64 34 e5 af 9f ae 77 8f f6 04 +5c 20 e2 e1 ef 7c bd f8 8f 00 75 f3 3e a9 92 77 +7c b7 e9 2f 7d a1 8a 0f fd 00 aa 46 71 ed 63 91 +1f e9 e9 2f b4 a7 6e 77 dc 6e 0a 91 65 76 71 6c +15 ea ef 08 9a 71 a0 ae a3 5b ed 94 47 a6 c1 7f +2a ad b7 27 fd 42 f0 ac c8 24 62 38 1d 9f a2 ef + +# PKCS#1 v1.5 Signature Example 3.2 + +# ----------------- + +# Message to be signed: +4c 7b 98 12 0c 87 50 90 87 c4 78 + +# Signature: +59 e5 cb e7 33 1b 92 e0 cb 8f 68 9e ae bb 30 f2 +b3 34 a7 46 a6 57 05 59 12 ff 1c 92 76 0b 0b 85 +bc 42 82 f3 18 4b 9a 81 4f 44 37 f8 25 ae 07 d3 +56 ba c6 9e 54 0c 90 94 2c 7f 7e 6f f4 4f e5 74 +f1 21 25 0a d2 30 f4 b5 0c 78 31 1e 4f d3 c9 e2 +65 f5 17 ce 32 97 c3 e1 dd db 5c 86 9c 69 8f 44 +af 52 5e 73 64 01 a8 1b 45 9f 19 8a d1 80 8c cd +92 9d 49 04 74 ca f7 00 5f 91 0d ac de 21 b0 77 + +# PKCS#1 v1.5 Signature Example 3.3 + +# ----------------- + +# Message to be signed: +66 f7 07 54 22 c8 ec 42 16 a9 c4 ff 49 42 7d 48 +3c ae 10 c8 53 4a 41 b2 fd 15 fe e0 69 60 ec 6f +b3 f7 a7 e9 4a 2f 8a 2e 3e 43 dc 4a 40 57 6c 30 +97 ac 95 3b 1d e8 6f 0b 4e d3 6d 64 4f 23 ae 14 +42 55 29 62 24 64 ca 0c bf 0b 17 41 34 72 38 15 +7f ab 59 e4 de 55 24 09 6d 62 ba ec 63 ac 64 50 +32 7e fe c6 29 2f 98 01 9f c6 7a 2a 66 38 56 3e +9b 6e 2d 15 ef d2 37 bb 09 8a 44 3a ee b2 bf 6c +3f 8c 81 b8 c0 1b 7f cb 3f eb b0 de 3f c2 5b 65 +f5 af 96 b1 d5 cc 3b 27 d0 c6 05 30 87 b3 96 80 +e4 92 a4 ab 23 67 47 11 69 e5 28 38 94 5d ba 9d +d7 72 3f 4e 62 4a 05 f7 37 5b 92 7a 87 ab e6 a8 +93 a1 65 8f d4 9f 47 f6 c7 b0 fa 59 6c 65 fa 68 +a2 3f 0a b4 32 96 2d 18 d4 34 3b d6 fd 67 d0 0b +25 b8 1b 09 b5 62 03 85 64 + +# Signature: +59 9e 69 c1 54 e4 fe 66 b3 6a 69 04 92 fa eb b2 +bb e7 34 e0 41 5d 9f 3c f7 e3 78 28 f5 3e 61 13 +04 49 17 3a 33 46 0c 6b 4c 8d c7 d6 81 ca 6f 4d +af 1c b8 16 d4 0a a9 08 2e e1 93 7b e4 bc 6a 09 +c6 de 79 8c 82 86 fc d2 a2 b2 19 6c 59 99 4c 93 +7f 37 13 07 52 61 2c 6b ff 6d bb 53 e0 64 7f 88 +58 bc 38 38 64 02 1e 6d 56 68 19 20 24 92 97 82 +22 46 a0 f5 28 aa b3 ed 18 5e eb ce 91 9c f8 3e + +# PKCS#1 v1.5 Signature Example 3.4 + +# ----------------- + +# Message to be signed: +d9 34 44 28 fa 8a 58 f8 fa 7b 44 3e 51 fc 9b 51 +e3 7a 70 21 0d b8 bd 1d e7 f8 67 5d 84 79 ff 65 +7c a7 29 55 b2 3c 6f 4a 09 16 37 9a 4e de e1 f2 +6c 85 e0 52 90 21 1e eb 25 83 2b 09 cb e5 ea ed +3e 39 65 b0 5a 52 fb 5b 16 49 11 82 c5 91 3c b1 +82 57 48 e8 1a d0 14 f1 3d 29 6d c1 69 57 08 2b +1b 83 b4 be 50 a0 f9 59 c9 e7 f3 aa 80 77 97 2e +2b 93 c2 ef fd 9f 30 86 25 b8 ca 7f 54 d7 b6 96 +48 79 04 47 ac 91 f7 98 5e 51 0d f7 0d 6e bc 35 +72 c2 05 e6 + +# Signature: +2c 06 01 65 fc c5 65 5c 06 57 c8 fe 08 e0 5b dc +8c d7 7c 1f ec b6 d1 8b 89 38 11 c9 9d d0 91 e0 +d8 50 6d cc b4 9e 33 da af f6 da 96 7b 99 e3 44 +cb 17 fa 3c 96 31 29 9b 35 89 81 8b 37 ed 9d 5d +78 94 e4 a6 9d db 24 83 2e 1a 88 60 01 4e e5 e5 +eb 95 3e 8b 35 48 4b a4 fe c9 c3 03 3a e2 e1 18 +9a f7 94 a7 2e 42 67 21 5b fe 45 8f 0f ce 6b 37 +a5 54 9e f8 05 43 d0 d4 1a 87 b2 c6 e4 d8 4c b5 + +# PKCS#1 v1.5 Signature Example 3.5 + +# ----------------- + +# Message to be signed: +8c 67 02 da af 58 f6 a4 75 fa d2 c7 a4 bb 15 6a +57 06 42 55 77 d5 e3 0c 6a 6b d3 66 9f d0 30 af +d7 89 fa a3 d0 10 18 d4 5d b2 a0 47 f5 2c b4 f6 +3d ea 36 09 42 af e4 76 26 42 06 d9 83 ad 38 36 +e1 55 c5 6b 2e cc 08 76 3a fb 9f d5 1d 19 99 0e +fc 33 63 f6 57 e2 85 e0 35 21 e8 ca d0 1d 2c 93 +5a 18 3a e2 3f 0e e8 71 00 86 a8 5b 9f ad 4e 7f +2b 09 45 2e bc 40 3c e0 c0 e5 75 5a 7b 2f 33 f4 +de f0 db 71 c9 79 31 ff 90 4a 81 31 99 84 bd c5 +16 6f 6b 92 0c 97 ee 74 fb 7e 89 0f 49 0c 90 de +30 ca c9 76 b7 17 23 e2 f8 6e 9d e1 d5 03 a4 1b +c8 1d 53 cc be f8 ac 40 53 57 d9 df df 30 64 66 +b4 26 95 80 21 2e 9d 71 32 + +# Signature: +0d 89 fc f8 44 a9 dc 22 3d 5f 63 8d cc 3a 59 78 +71 6f 26 28 b8 a8 3a b3 3e 6e 25 5f f8 aa 01 57 +8c 14 e3 89 7d a4 5a ef d6 3f a8 7c f3 5e 24 4b +f4 82 8e cd 21 95 0f 30 85 a3 66 21 c9 da 1b be +7e a6 27 31 c6 8d 4d e0 a3 76 e2 2d ac 2f 54 8c +d4 ba 4a 54 2e 71 0f 55 ce 85 a9 c1 95 93 c0 8c +87 d2 96 d6 35 87 b3 fe 2c 5d 11 65 ee 27 74 4c +75 d8 f4 f1 43 71 63 7c 0c 0a 44 62 76 28 95 83 + +# PKCS#1 v1.5 Signature Example 3.6 + +# ----------------- + +# Message to be signed: +56 f4 ff d1 27 9d cf e5 62 a9 dd d4 1e cd f6 0a +3f f5 82 46 bf af 95 65 cf 67 4b 0b 90 75 f4 0e +ea c0 8f 0b 89 66 61 8a 19 6b 12 28 eb ce 93 fc +9d d7 9b d4 63 ea 7d 2c 97 4d 2c 2f 53 9e af b1 +b2 bc 1e a3 4d 74 f7 20 e1 19 34 2f f7 13 12 25 +aa 9a da 89 4b 76 b2 ec b1 2f 2f 40 28 44 b4 42 +5c f8 f1 a3 9b 0a 9c 83 b4 5b 03 cf c0 d1 5f d3 +14 d6 ab f5 32 b8 ed fc f2 36 51 4b 2e 45 86 97 +86 fe fe 27 f5 4d 66 6e e5 24 e4 b9 c0 53 be 39 +75 01 58 29 91 fa 2d 80 2c 7d 1b 17 8b 23 e9 b6 +ec e6 fd 2e f0 13 2c 06 01 a8 6f 07 68 ba dc 59 +c5 cc 33 f2 4d ed 55 4a e5 1a e3 ec 23 f9 dd 08 +9e 32 4a 68 21 f6 15 7f 12 84 42 ac 58 07 65 8a +d3 40 26 b8 fc fd a6 dc 7f 02 a9 3c 16 6e c9 45 +ee + +# Signature: +0d eb 39 7b f2 cf f9 79 d4 71 9c 64 8b 0a 35 25 +35 1f 5e 08 40 5c a2 61 4a 83 e5 6a ce 86 f5 52 +e4 1b b9 28 de 50 f0 bc 0f e3 1a 2e f2 ad 79 9f +d3 cf 47 42 b1 13 1a 37 bd 08 f2 a1 3c ac da 67 +f4 95 c9 f1 a9 ef 64 85 70 72 32 9f 00 cc 4c 01 +22 35 59 9a 83 fc 45 94 fe d9 23 03 49 01 ed c2 +7d 5f 05 79 98 34 93 5c ab e2 64 ff c1 96 63 71 +4d 8c 3d e8 e9 61 9f d2 84 2d 22 98 f7 a7 2c 99 + +# PKCS#1 v1.5 Signature Example 3.7 + +# ----------------- + +# Message to be signed: +0e 79 ac 9c 9c 03 96 d9 69 fb 3f 7c c9 94 7b 07 +8b ac 49 3b 03 52 c8 e0 cd e5 46 3e a5 c1 18 4f +d5 2a 1f b7 48 19 3c 14 7a 74 80 0d 24 f7 51 ba +93 5e 19 c9 11 5e df 07 22 88 33 0b f3 83 f4 95 +29 6b e1 aa 4a 50 95 b9 57 3b cb db 22 8a 43 13 +12 37 86 5d 26 df bf cf ef 07 8f 35 9f 9a 95 62 +e2 5b 69 63 85 e1 28 13 ff fb c8 d5 29 81 9a 91 +45 1d 33 a5 07 26 39 2e 4f ef 29 41 8c ca 2c 73 +a0 68 e6 0e ae 31 84 70 33 1a 0f 1d b4 bb b6 37 +17 3b e8 0f ea 03 c8 2c 15 d0 01 93 36 2d 3a 18 +ad 9e 2f 68 05 00 d7 26 5b 15 57 03 3a 52 09 77 +d8 10 fc + +# Signature: +73 3b 7f ea 12 0c a5 f0 35 9a 89 05 75 0c 49 c3 +63 d8 84 f5 6c 2b 7a 72 9f ad 7b ff 44 5a 1e 54 +79 89 41 74 53 93 e1 76 77 12 ac 4b 9d d2 68 38 +88 d9 e6 8b 90 5d ba b8 79 21 85 18 48 72 73 86 +02 ea f4 a8 0f 45 95 f7 8f d4 a4 61 0b f8 22 0b +86 a2 88 5f da 24 e1 99 64 28 cc d1 5f 20 08 e0 +68 51 b2 ee ad c3 dc 8e 03 01 2f 9b db 3c e0 57 +5d dc 3a dc 7c 59 08 49 8b 69 a7 97 ba 58 29 c7 + +# PKCS#1 v1.5 Signature Example 3.8 + +# ----------------- + +# Message to be signed: +22 eb 7d ba 73 30 7c 7c 52 a0 7c ed 89 db 8b c5 +39 4a ed 22 72 f7 e8 1a 74 f4 c0 2d 14 + +# Signature: +9e a4 60 0a 1a 65 49 fd 39 75 f6 49 8a 04 d6 9f +96 fa d0 e8 e6 fe bc fb e0 1c 2f 83 17 0b c7 4e +b9 1f 2e 33 53 38 d5 83 e8 85 aa c6 14 24 c9 b2 +66 c3 d2 d9 8e 79 77 ff e4 95 f9 c1 a6 ee 5e f4 +1a 4c c7 47 8c 24 b3 16 c7 d9 f6 db aa 65 a4 ca +de f1 81 ca 94 6f 9b 92 18 4f ae ca 8a 13 16 ae +ab 5c d3 87 8c 6d f0 74 f9 06 0b 9d b6 6d ec e9 +a9 36 7d 75 49 03 5a c6 bf 19 62 36 5e 1f d3 fc + +# PKCS#1 v1.5 Signature Example 3.9 + +# ----------------- + +# Message to be signed: +f6 80 + +# Signature: +51 63 90 61 fa 7b 7c d5 df 64 b3 0a 39 4c cf 7e +24 26 97 2a a1 dc f5 d4 5e b8 ec 2c d9 0b 9b 19 +68 92 be 5f a0 3c 43 f3 c3 72 3a e3 13 0d 61 51 +b3 3a 63 7c fc 50 ba 35 26 a7 39 6c f8 47 9c 50 +8c 18 11 81 0d 68 b3 88 0a f6 e6 4b 16 bd 70 79 +be 9c 00 39 29 51 22 61 89 8f a5 7c 06 ff 7e 1d +80 39 fa 99 3f d2 05 6a c7 01 9b 8d bc f2 53 0d +53 80 e6 01 a4 a1 87 1b 86 c2 0b c1 c4 89 c5 f3 + +# PKCS#1 v1.5 Signature Example 3.10 + +# ----------------- + +# Message to be signed: +65 0e 64 ed 1d a8 8b cf 8a e2 75 22 be 1d 5c 99 +19 f2 09 9d d6 32 45 5f 66 d9 af e8 ba f4 6c c8 +a1 98 40 9b 09 28 dd 87 22 62 84 d6 69 bf 01 bc +ec 44 37 6c b0 e9 bd c6 86 ac aa 8b 46 34 86 08 +59 94 ca fb 5a 8c fc 33 d4 9c ee f4 79 fc 6e 04 +f8 ee f6 37 eb 68 cb 57 81 8d 5f 97 70 ac 52 3e +d5 b0 16 38 36 7f f4 7f + +# Signature: +50 3e 05 66 1d 68 1e ca 57 4e 02 30 af 2d aa 87 +7b 90 51 6e 5e 19 72 8c 91 76 8d 6e ef ee 00 1b +35 41 9c 5f cb 56 11 d6 0e 7e cb e3 c9 5e 5c 88 +ba 93 46 07 04 f1 69 4a e8 04 44 eb 97 18 a0 8b +66 86 fa d8 6e 52 59 90 c3 c1 a6 6c 8c 53 aa 31 +ae d8 cb c4 0f d5 4f 5f f8 a1 34 74 9d 79 d3 8f +bb 0d 58 44 26 78 ff 2f 70 c6 c5 0f 25 47 2a 72 +d6 32 05 e7 82 42 3d f4 0b 6c 43 de 03 a1 8f 8b + +# PKCS#1 v1.5 Signature Example 3.11 + +# ----------------- + +# Message to be signed: +57 f8 ac 6a 9e 46 8b 7f 1f 74 5d ff e3 9e 9c bf +90 24 a0 ff 36 e0 22 83 92 be 6b 29 94 29 17 76 +b8 9c 0a 4b 1f a8 6b 2e c8 bb 7c 3e 64 f5 58 5a +fa 77 + +# Signature: +90 be 16 b4 08 b3 85 73 95 39 b3 b9 a2 9b 94 c7 +29 38 5f 79 dd 4a 79 81 1e 6f 67 c8 0e d3 59 e5 +f4 b2 a1 9c 22 2a 82 b3 d6 d6 2a 90 3f b1 80 c1 +f4 3c b3 fe 06 a2 50 bc b0 e7 c6 88 66 5c 83 68 +a1 1a b1 16 0a db 74 02 91 35 2b 38 38 b6 92 3a +4a 37 ad 06 04 0a 53 59 20 dc 0f 10 57 9e cf 48 +1c d4 41 37 17 d7 d4 d9 60 aa 75 1a 74 3e 2f 7c +61 6e 54 2e e6 5f bb fe 24 66 0e 10 1d aa 2b dd + +# PKCS#1 v1.5 Signature Example 3.12 + +# ----------------- + +# Message to be signed: +80 ef 01 aa cc 5b fb 0d b4 8c 6d e3 d8 14 95 b9 +c2 31 1a 38 93 89 f2 3b 70 c0 24 da 44 78 bf ab +2b fe 4e 54 6f 13 ff fd b9 63 89 4e c6 da db 3d +2b 0e e3 37 f1 16 31 05 8e ac 86 09 e5 a1 55 4a +f7 97 a9 f9 ab 47 8c 2d 5b 91 88 c8 25 + +# Signature: +44 c3 f5 1d cc 6f b2 b4 e7 0f 53 7f 54 64 c6 32 +0a d4 2e 21 28 fa df d9 a7 e9 37 cd 65 dc bf 35 +ac 66 cf fa fd 39 28 39 66 f2 f1 5d e5 27 72 35 +50 71 5a 31 04 29 45 e2 00 cc 5c 86 fa ba 5e c8 +ab af 50 9c 0c cd 64 d9 9d ed c7 6e 3c ea a8 c4 +47 17 93 37 f4 a0 77 7b 11 52 6e 47 2a cd 41 3b +4a c7 c3 03 cd cd 84 ca fc 02 52 43 ef 00 6f 79 +dd af 55 c1 5c c4 a8 f1 5e a2 c8 7f 05 77 38 14 + +# PKCS#1 v1.5 Signature Example 3.13 + +# ----------------- + +# Message to be signed: +ac 17 95 91 55 28 3b 0c 7c ff 51 5c 33 15 d8 9b +df e9 58 7c c0 01 20 d3 ab 31 bb 76 07 bd b3 01 +ca ea f5 e1 5f 5a 6f 58 c9 c5 68 ff b3 d2 34 02 +51 6f fe 23 0c 69 81 a8 1c 17 8a 8a 18 ca 33 0b +b8 ec af b4 81 b2 49 b4 66 a8 cf 78 b7 0d 9e 78 +a1 39 a8 8f 48 4c ce 7c 20 35 b2 e8 9d 49 3b de +88 5e 1c de 42 cb 1a 94 49 ff 57 0d cf 9e 33 c5 +cc 77 b2 59 be e2 83 05 39 68 02 ed c1 6f c5 a8 +e1 0b 56 da 2d a7 86 b5 fb 6c 81 2b 2e 17 5b 69 +6b 1a 9a 96 fc 72 2a 43 21 46 45 0f 07 a6 48 ef +3c cf 99 6e f3 08 1f a5 bb 42 21 c9 13 ba 22 28 +97 0c 9b 0e a5 26 6b ff + +# Signature: +48 45 8c 72 f0 67 dd 9a b7 20 ef 16 0c f3 18 4b +b9 80 1e 26 d6 14 a8 89 a8 35 84 41 07 ac 01 65 +0b 11 84 a0 0b ca a7 af 1f f7 de 3a 2e f2 e7 ce +b5 b2 5c 3b 5d 5b cb 29 86 59 34 32 47 48 c6 8f +07 de 17 4e 17 80 a7 0f a2 4d 6a 3a 9f 7a 41 b8 +19 37 c4 98 4b 2c be 06 b3 d7 b4 4c da e9 cb d4 +16 32 d0 09 43 c3 b5 73 b1 aa 29 12 75 0a 9a eb +07 f1 10 13 0b a3 61 dc f8 f5 36 79 0d 60 78 47 + +# PKCS#1 v1.5 Signature Example 3.14 + +# ----------------- + +# Message to be signed: +99 09 8f 77 f6 ed 35 c0 8f ab 3f a9 78 86 93 67 +1a 58 00 dc 30 3c 9c ce 42 46 16 fa 0c 7e e8 88 +86 87 67 4c a8 8a b2 2a 5f f2 d1 2e 2b 38 8b 09 +4f fd 7d bf 9a 09 27 a9 62 17 17 15 1e 08 ec b8 +ad e1 55 9f 4b 48 e2 3d 31 cf 57 cd 38 84 df e2 +b3 e4 b2 60 e8 96 02 94 07 96 94 96 02 6c 74 a2 +18 90 d9 a9 af d2 cb b8 f2 83 0a 56 6a ed 24 f0 +16 19 74 01 a8 cd 22 c8 2f b8 b2 28 91 84 58 24 +0a 23 d1 01 85 eb e7 72 dc 19 bc fe 3e 44 92 2f +e7 32 09 c1 ee 00 40 07 9f b0 3b 82 7c 82 17 d9 +ed 7c 98 c9 5f 30 97 4f be 4f bd dc f0 f2 8d 60 +21 c0 e9 1d a6 0c a2 ad 77 79 7e ce 86 de 5b f7 +68 75 0d db 5e d6 a3 11 6a d9 9b bd 17 ed f7 f7 +82 f0 db 1c d0 5b 0f 67 74 68 c5 ea 42 0d c1 16 +b1 0e 80 d1 10 de 2b 04 + +# Signature: +b4 6a e8 66 13 91 89 b6 b1 71 a7 62 05 fb 9c e0 +41 b4 02 98 e5 ba 92 c2 e9 cc 0b bf bb 4a 76 42 +5d e6 ce 13 02 1a e1 a4 a9 42 29 9f 98 ff 89 f5 +52 f4 3a 90 73 de 64 f4 9c 2c a3 62 0d 09 d7 e6 +e3 fe 28 22 1e 93 68 98 7e 11 0c d6 06 71 06 c4 +db 31 a0 38 90 23 67 96 c8 42 52 f5 6c 95 03 4a +01 c5 fe 98 1e 81 b6 54 85 5a af 27 47 50 11 55 +72 0c 21 93 f3 a1 d1 0f 49 fe e9 0c 52 fe e9 e4 + +# PKCS#1 v1.5 Signature Example 3.15 + +# ----------------- + +# Message to be signed: +ff 79 06 42 30 5b f3 02 00 38 92 e5 4d f9 f6 67 +50 9d c5 39 20 df 58 3f 50 a3 dd 61 ab b6 fa b7 +5d + +# Signature: +07 56 32 47 73 4f 3c 3d 7a 31 02 bc b4 5b b5 68 +15 68 ed 10 f2 ec 45 9e 46 9e 1a 9e 34 09 a1 39 +fb 15 1b 98 d3 f3 b6 2d aa ac 8b 8f 89 16 df 85 +d6 df a9 ab 76 0d f1 e1 5a c8 90 44 e5 79 cf 47 +a1 af 6c d6 ec 70 4c ed 9b 03 4c 6a aa 90 d0 e7 +0e 08 52 14 0e 75 41 f2 ef be 2c f1 90 b9 58 94 +1e c8 b5 97 4f 9c 44 4d 26 c3 43 16 c9 21 6b 65 +95 e6 56 bc 6c 78 44 fa c1 6c 51 52 60 92 8e 78 + +# PKCS#1 v1.5 Signature Example 3.16 + +# ----------------- + +# Message to be signed: +e9 9f cb f8 59 2d be 2d 7e 27 45 3c b4 4d e0 71 +00 eb b1 a2 a1 98 11 a4 78 ad be ab 27 0f 94 e8 +fe 36 9d 90 b3 ca 61 2f 9f 22 d7 1d 54 36 3a 42 +17 aa 55 11 3f 05 9b 33 84 e3 e5 7e 44 52 28 80 +62 af c0 8f cd b7 c5 f8 65 0b 29 83 73 00 46 1d +d5 67 6c 17 a2 0a 3c 8f b5 14 89 + +# Signature: +22 74 64 36 16 4e 63 93 78 71 c1 d4 7d 8e 3e 70 +c9 e5 2d 11 17 31 6b b1 54 cd 55 2e 83 6f 2a 3f +be 6d 89 d6 07 4b 51 b0 15 9c 26 c2 8d f7 5e 3d +7c fb 7c f0 02 f6 5d 1e e5 21 ed c2 c3 a6 5c 52 +6c 98 c7 c0 25 fa 8b b6 31 47 09 16 d3 01 b8 f7 +80 9d dd 91 9d ed 31 a0 d4 66 83 ec 5b b4 41 70 +61 6e ab cd 97 02 05 ed 76 02 02 d0 d8 7a 65 79 +59 08 b2 8d 32 6f 93 62 13 f2 9f eb 59 77 34 91 + +# PKCS#1 v1.5 Signature Example 3.17 + +# ----------------- + +# Message to be signed: +6a 6a 0c 9b 5b 15 bc da 19 6a 9d 0c 76 b1 19 d5 +34 d8 5a bd 12 39 62 d5 83 b7 6c e9 d1 80 bc e1 +ca 4a f8 70 fb c6 51 60 12 ca 91 6c 70 ba 86 2a +c7 e8 24 36 17 30 6f 4f 9a b9 50 11 99 ce f5 5c +6c f4 08 fe 7b 36 c5 57 c4 9d 42 0a 47 63 d2 46 +3c 8a d4 4b 3c fc 5b e2 74 2c 0e 7d 9b 0f 66 08 +f0 8c 7f 47 b6 93 ee 40 d2 e1 80 fa e1 ea c4 39 +c1 90 b5 6c 2c 0e 14 dd f9 a2 26 ba e1 7d 20 38 +5d 50 19 55 82 3c 3f 66 62 54 c1 d3 dd 36 ad 51 +68 b8 f1 8d 28 6f dc f6 7a 7d ad 94 09 70 85 fa +b7 ed 86 fe 21 42 a2 87 71 71 79 97 ef 1a 7a 08 +88 4e fc 39 35 6d 76 07 7a af 82 45 9a 7f ad 45 +84 88 75 f2 81 9b 09 89 37 fe 92 3b cc 9d c4 42 +d7 2d 75 4d 81 20 25 09 0c 9b c0 3d b3 08 0c 13 + +# Signature: +41 93 22 fa ca ce 76 f2 d5 e2 fb c1 9a ab 86 c7 +18 a2 80 64 f1 d7 b4 c6 62 f0 47 4a 87 77 a9 59 +bd 65 69 53 8c 16 08 1c 0f 52 69 8b 2f 00 17 30 +c0 3b 9a 3d 26 94 73 74 c9 61 fd ed a1 15 b6 b7 +da f6 65 18 f1 fe 82 0f 67 c3 ff 12 f0 bc 3f 11 +01 e3 91 1c 43 90 6b 0a 12 7e 50 be 01 40 c5 ef +c4 35 e2 95 7b 44 2e 60 ad 52 5a d7 0a c9 ef 61 +c3 d6 4f 0e 56 6c bc 1f 9d 51 ba e1 d4 72 71 da + +# PKCS#1 v1.5 Signature Example 3.18 + +# ----------------- + +# Message to be signed: +3b 93 ef 4a 55 50 96 69 19 15 dc 23 c0 0e 95 4c +de b2 0a 47 cd 55 d1 6c 3d 86 81 d4 6e d7 f2 ed +5e a4 27 95 be 17 ba ed 25 f0 f4 d1 13 b3 63 6a +dd d5 85 f1 6a 8b 5a ec + +# Signature: +ae 21 1f 4f 77 da 1b e6 af 9c 9e a7 04 db ac 4b +3f 3e 27 0d 2f ac f3 65 1d 78 7d 0e bf 59 a7 9a +39 61 2d a1 2d 57 c4 ac 8a bc 72 8e 1d a3 f0 1a +15 20 fc 9b 32 cb 0f fe 00 8c 80 69 92 8f 83 e1 +35 90 a7 8b 81 7e 81 9f bf 2f d0 58 93 ec e5 b1 +41 86 d9 01 c7 68 e3 42 dc 54 72 23 45 ae 8a a8 +73 8d 4d 59 70 c5 08 54 72 bd 98 99 fa 00 42 cf +14 bc ed ff db c0 ef 50 81 90 75 84 2f c3 6b b8 + +# PKCS#1 v1.5 Signature Example 3.19 + +# ----------------- + +# Message to be signed: +49 ff d5 6b f7 ef c1 13 04 a5 af bc 19 d4 79 24 +90 18 fd f4 e0 9f 61 87 26 44 04 95 de 11 dd ee +e3 88 72 d7 75 fc ea 74 a2 38 96 b5 34 3c 9c 38 +d4 6a f0 db a2 24 d0 47 58 0c c6 0a 65 e9 + +# Signature: +68 fb 0b d5 19 bf 6f 96 e0 76 af 29 01 2f 3c 3a +11 37 c0 98 8d e7 b6 fc ed f4 f5 1b df ee 64 5b +89 7f 17 70 9e 05 ca a0 b1 13 50 0d 90 4d c0 60 +0d 17 a9 ff 8e b0 2e 1e fc 9c 46 7a 24 00 3e f8 +1e 72 74 67 c4 7d d6 56 35 6d 70 37 2a 15 ea 88 +41 21 63 4b 01 5d 29 51 1f 28 95 55 77 99 07 9d +03 c6 d4 de 25 9b 3b 36 2b 80 49 2d 81 bc 9f e8 +54 44 63 ec 03 0b b5 c9 c7 3c 32 74 e3 ed 12 22 + +# PKCS#1 v1.5 Signature Example 3.20 + +# ----------------- + +# Message to be signed: +bc 25 5a f8 9a 6a 19 9b ca 4a 39 1e ad bc 3a 24 +90 3c 0b d6 67 36 8f 6b e7 8e 3f ea bf b4 ff d4 +63 12 27 63 74 0f fb be fe ab 9a 25 56 4b c5 d1 +c2 4c 93 e4 22 f7 50 73 e2 ad 72 bf 45 b1 0d f0 +0b 52 a1 47 12 8e 73 fe e3 3f a3 f0 57 7d 77 f8 +0f bc 2d f1 be d3 13 29 0c 12 77 7f 50 a3 34 db +6f ae bf 11 08 1a 04 f8 7c 2d 62 1c de c7 93 0b +9b 18 3a 99 04 75 dc bb 9c c7 f3 45 a3 b5 58 03 +03 0c f0 36 1a 5d 80 81 + +# Signature: +41 f6 52 df 79 fd d2 6d e9 5c 7a 98 fa 85 87 13 +fb 56 6d 8b 39 92 8e 71 76 4b 2b eb 19 84 03 e0 +3b 7e 06 dc 96 0c 50 51 57 bd f4 05 92 c4 d7 75 +03 fb 72 a4 e0 05 5f 97 4f e9 39 44 8d a3 68 f5 +3b d2 ef e2 6e 6f 9a 25 4b 3e 87 32 aa d8 16 87 +b3 61 e2 1a 40 cf 3e 5e 92 38 9a 2b 48 9c 05 c5 +97 f0 e1 64 e2 67 70 93 72 00 43 27 16 35 62 dd +8a 0a db bd fe 3b c6 16 bd 08 42 96 84 c2 0c 69 + +# ============================================= + +# Example 4: A 1024-bit RSA key pair +# ----------------------------------- + + +# Public key +# ---------- + +# Modulus: +d1 31 e0 92 43 37 0d d2 cd 54 25 c8 d0 30 f9 9a +db 10 5b 14 7b 8a 3d 00 67 c6 16 44 3b 7d 4b 96 +82 38 e0 6d bb 5f 20 28 e8 53 57 4b 7c 14 be 10 +83 c1 e5 7e 13 2c 1d f4 a3 a2 71 32 63 fa de 12 +f7 11 4f 43 69 bb f0 56 20 55 48 41 33 1e d8 11 +00 50 52 19 25 72 ce b4 8d 66 24 07 fd 30 81 cf +ab 8b 48 c7 e9 2d 3c 4a 26 a9 64 5a 38 e6 de e8 +8b b0 07 59 75 a4 da d9 64 6b 21 60 38 40 af 5f + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +d1 31 e0 92 43 37 0d d2 cd 54 25 c8 d0 30 f9 9a +db 10 5b 14 7b 8a 3d 00 67 c6 16 44 3b 7d 4b 96 +82 38 e0 6d bb 5f 20 28 e8 53 57 4b 7c 14 be 10 +83 c1 e5 7e 13 2c 1d f4 a3 a2 71 32 63 fa de 12 +f7 11 4f 43 69 bb f0 56 20 55 48 41 33 1e d8 11 +00 50 52 19 25 72 ce b4 8d 66 24 07 fd 30 81 cf +ab 8b 48 c7 e9 2d 3c 4a 26 a9 64 5a 38 e6 de e8 +8b b0 07 59 75 a4 da d9 64 6b 21 60 38 40 af 5f + +# Public exponent: +01 00 01 + +# Exponent: +56 b5 31 bb ee 18 37 a6 94 6c b8 6c 8f be 7c f6 +ee ad cc d2 a4 92 1b ce bb 34 a3 ae 0c 6a 56 96 +3f cb 8b 5a 70 3b 71 7d 03 2e e8 13 e5 8e 43 69 +5c f3 55 47 f8 72 64 c8 2d ba fa e8 44 00 8b 62 +d9 12 2e 9d e8 95 85 60 c8 db b0 07 72 7e 71 39 +e0 a9 82 e0 75 88 14 11 3d e5 4b a0 a4 55 17 51 +fc a0 fc b1 2d 8d e3 0d 78 b8 b1 12 98 a7 f7 8f +0b 08 8f 16 87 05 3c 84 a5 76 2f 62 a4 bd 05 c1 + +# Prime 1: +ee 22 a4 24 62 f7 71 8d fe cf 02 4b 17 c9 26 76 +78 05 91 71 33 9c c0 07 06 52 60 d3 04 7e 5f 89 +fe d9 10 34 28 43 37 8c 22 68 5d 53 2e 84 d2 59 +3a 7c 8c 02 6a 87 66 c5 a2 b2 ed 55 8e 88 23 19 + +# Prime 2: +e0 e3 70 0c 99 a3 e8 15 d7 4b 75 2a 84 fb 42 ec +20 e5 20 3c a7 c1 af 97 fb f3 97 b9 5d 11 05 37 +6c f5 d6 3e 3c 57 bf a6 58 55 e5 08 14 6c 86 db +aa b2 89 c9 5b c0 45 5a 58 2d d8 f5 3f fb ed 37 + +# Prime exponent 1: +d1 f1 34 68 e7 df 62 fb 5e b3 be 3f d9 de 7a cc +63 0f f5 a3 a9 6e fe 54 b3 1c 19 44 b0 67 81 6f +35 80 c4 aa 56 fc bb 92 0e 1b 98 7b 67 3d ad fd +00 75 21 32 58 1c bb 5c 6e 0d f4 f3 42 cf 7e b1 + +# Prime exponent 2: +ac d0 da 38 34 90 ea 36 6e 7d c4 09 ea ab 13 20 +55 9e fd 88 de f9 4e 30 a3 22 ec 03 3b eb 6a 70 +cf 40 93 64 bc 06 4a 76 50 07 a1 ba f5 c6 f8 53 +31 f7 85 3e c1 4d 1d 7e 71 a8 b9 c2 ad 6a b1 3d + +# Coefficient: +1e da 83 d4 a6 d0 99 b6 0b 2b 2b 84 c6 ae 41 65 +c7 22 50 3e bd 37 3c 83 6f 97 35 ca 3b 20 a3 eb +08 1b 31 e7 83 04 13 20 df c6 dd f9 05 14 ca b6 +ec 4b 80 ae 0c 05 2d d1 e7 ce 34 18 ae ee 24 a4 + +# PKCS#1 v1.5 signing of 20 random messages +# ------------------------------------------------------- + +# PKCS#1 v1.5 Signature Example 4.1 + +# ----------------- + +# Message to be signed: +2c 93 6b f6 13 3a 96 93 f1 46 ee 5a 1a 91 c2 f1 +69 b2 e6 44 a5 18 e8 5a 75 f6 e4 3b 56 0d 4a 72 +f3 8c 64 f8 4c 05 24 0e 8b 4e 55 78 61 63 e7 27 +62 65 ba 21 3b a9 3d ee 1b 2e 10 21 35 a9 89 b6 +24 8e 88 32 7e 30 03 61 a7 4f 2e 9b c4 1f 2a 37 +68 3f 1a 1a 15 f9 dd 47 2e 11 8e 1c 4b 3e de 58 +dd 70 f3 ba cc 25 2e 0c 65 4b 0f 7a 6e 41 a9 28 +75 10 ef a0 3b c9 2e 80 5e 5b 2c 91 3f 51 e2 5c +7f 85 86 40 ca fa c9 d3 c9 17 68 65 07 fa 94 f8 +86 6f 86 9a 4e 5a 6a 3d 4f 9d 97 ed 81 37 f4 14 +d1 44 7a 86 ee f9 e1 49 69 94 ad 2d a5 97 + +# Signature: +9e 93 f7 ac c5 0f b3 a0 b1 24 3d c3 38 c8 cc b1 +2b ca b4 aa 45 04 40 b6 30 6c 81 b5 0b 8f 95 a9 +36 dd 16 63 30 c6 99 b2 85 80 da 1b e2 75 61 64 +02 da 85 bf d8 ee fc d6 99 35 87 e6 09 28 65 d8 +25 3b 04 08 1d 57 2f 26 27 59 f5 56 df b9 11 e8 +d9 4e 92 e5 5a f6 d5 89 80 18 ff 33 e5 f6 b1 f9 +90 19 96 e9 2f af 33 6e 2d cc e3 ab 0a 93 db 93 +2e 94 2c c6 47 8d 6c c2 fb 66 08 11 91 0c cd 17 + +# PKCS#1 v1.5 Signature Example 4.2 + +# ----------------- + +# Message to be signed: +94 32 3f 7c 38 b9 95 cc 6b d8 5d 47 9f 8d e2 de +c1 ef 2e 84 b1 fe ef ec f3 91 50 b5 d9 f2 cb 15 +85 ac 0d 71 9a b3 48 bd c9 75 0d db 8e 32 76 db +89 81 87 35 bd 62 31 41 3c bc a2 de 94 1b 55 e8 +cf a1 ab 13 2c c7 8a a4 f2 b5 1f d6 57 8e e2 e0 +32 e9 0e 34 08 0f 0f 8e 3d b1 4d 1b 56 f3 d0 77 +f2 9d bc 02 16 a4 13 44 99 8c 0f e1 ab 41 22 47 +df 21 e7 4e c2 2f 5d b0 14 8e ca f4 73 ee ec cc +14 ff 9e 45 d5 8c 2e 62 b5 fe 6a 50 1a b9 6f d7 +c5 ed de f1 4a a8 92 66 69 2e + +# Signature: +09 40 2a 43 56 be 73 44 9b 46 9e 36 31 e1 b0 23 +07 c5 ca c2 ce 15 28 d7 84 fa b9 26 df f5 1f 86 +24 1b 9d 66 f7 9d 6d 8e ee eb 24 9d 76 fa 9f 16 +6f f9 a8 c6 a3 9e 83 2d 5d 14 b9 d7 ec 5a 3d c2 +8f 01 eb b0 6e 39 d5 9e 84 61 b9 55 b2 a7 f5 b1 +f2 04 b0 4c c6 cc 62 64 61 61 ac 1c 2b f5 ba b5 +0f 06 8c 90 8d 28 de 5e ae f7 e8 eb fc ab b0 9b +7d 75 d8 35 40 dd 4b 35 4d 13 1d 86 f0 77 07 17 + +# PKCS#1 v1.5 Signature Example 4.3 + +# ----------------- + +# Message to be signed: +0e 23 3b 25 49 bd d2 1b a5 14 80 da 8e 3d ce f4 +db 20 e0 dc c0 5e e2 37 35 1e db c9 a5 3c 52 f6 +74 d1 05 fe c0 93 9d 36 99 64 7e fc 1e 25 cb 4e +9b 1a b7 52 ab 6f e2 88 69 ff 73 f2 3e 01 ee f8 +67 4c 53 5c 4c 93 35 f7 98 f1 de ec d4 89 d0 6d +c8 8f d6 bc 1d 49 96 ef f7 2b 43 9e 3c 01 4d d1 +4c bf 17 71 5c 15 89 43 de 2e 6f 97 1c 34 99 87 +a1 b3 95 d6 82 c3 b0 c1 7b 66 cd 3c a4 10 60 b5 +71 11 e2 28 31 4b 2d 34 b5 e4 4e 55 f1 c1 1c 31 +a6 eb 80 b5 f8 2d 96 bd 4a 17 + +# Signature: +d0 75 be 06 cb d6 22 3e 87 1b 0f 33 62 a7 97 de +28 2d a5 c4 03 23 f3 7c 2c c3 74 65 a1 a8 63 68 +dd cf a6 da a1 35 86 6c 32 03 d0 47 22 60 b2 9c +3c 9b 1b 88 94 08 5d 54 7c 5e b9 31 42 4f 24 14 +0a 5c ba 15 3b de d4 b9 ce 7d ae dc 64 5d 39 80 +c5 f5 83 f7 67 11 c6 7b 19 3a 52 12 f2 a9 35 4a +67 96 af 09 08 20 91 31 34 ec f3 05 be fb 65 32 +cd 48 d4 11 3a 0e c4 86 9a 0a 56 55 db dc 72 59 + +# PKCS#1 v1.5 Signature Example 4.4 + +# ----------------- + +# Message to be signed: +d4 7c 0f 5c 92 2e 4f 80 9e 9c ee d2 07 f1 24 a5 +ac de 37 fa 14 63 8e 8f bd 0a 72 fe 45 26 21 95 +8e 37 68 2c 6f f2 83 f3 d5 1d a1 52 aa 1f 63 74 +cd 27 d2 a4 a5 33 05 39 16 df f1 c0 7b a9 36 31 +74 81 69 63 60 69 04 58 d8 d1 e5 d6 6c 35 f9 c9 +9a 50 55 d9 f7 cf e7 60 5c ca 57 ea c3 35 ad e2 +ef f6 b5 aa 62 7d 5b + +# Signature: +11 86 0b f4 d7 45 19 ff 8c fc ce 3d 33 e3 aa bd +f7 71 40 a1 56 36 b2 67 8d f9 67 31 44 c2 41 b0 +a9 9a 0a 37 f2 92 ca d5 1d f0 b6 3b 14 f8 ab 17 +e3 fa 15 58 77 90 fb 06 2b 5f 26 6c 16 6b 2c a7 +51 57 a0 f9 e1 a5 c8 ec 26 b9 19 9d 07 18 77 99 +80 6a 1d e9 87 15 fb e5 27 57 a7 03 77 3c 91 8a +00 0c 21 1a 78 22 85 25 cb 52 eb 44 1b 26 9b 3f +33 05 0e d1 93 5a c0 e8 59 63 19 ae 80 c7 5b 84 + +# PKCS#1 v1.5 Signature Example 4.5 + +# ----------------- + +# Message to be signed: +be bd 9d de a3 ab f9 f8 eb 58 55 97 66 f8 b3 ab +83 53 52 38 c4 3d cd 81 a2 94 93 03 a9 5f 05 5a +83 40 ce ee 16 15 e5 8d f1 e0 14 c7 55 2d 76 9f +88 41 ba 09 97 5c ef e7 e4 8d fc 6a 26 49 e8 20 +03 e7 bf 42 0e 70 10 1b 32 7d 91 70 f7 3e 8d 88 +7c d2 98 f5 3d c1 bf c8 82 cf 0e fc fa d6 e8 6a +0e 7f 90 94 c4 f2 6c 46 92 1e 09 + +# Signature: +84 a2 6f be 67 01 0a a1 ef 2d 6c 79 26 32 39 b9 +78 f4 e8 93 dd 1e c6 f0 7d 23 17 f1 51 a2 a1 b3 +23 e5 05 f9 45 0c 37 df 6b 1b f3 e2 4f 38 b6 36 +bf 77 4e 96 74 1f fa a7 69 cf d7 a8 a6 b3 a5 ef +ab a2 3a ab 3a 43 7a 22 5b d9 41 86 e9 1d 39 2b +ed 2e ad 8a 78 f3 81 f4 09 49 cf 1f 3d 27 24 58 +1f 25 70 4b df 66 08 dd 11 9e 36 d8 7d 03 55 e6 +70 6c 8a 52 59 fd 60 c8 df 13 bc 62 aa 9f d5 7a + +# PKCS#1 v1.5 Signature Example 4.6 + +# ----------------- + +# Message to be signed: +9d 19 8e 2c 6e 12 f7 4a 9a 08 1b cf 70 fc 04 16 +8a 49 e0 9c 5f aa a0 11 e9 a0 9e 2c 43 ee 2c d3 +9b b2 f7 e5 68 2d ea b1 fa 11 1e 41 a3 19 4a 20 +a8 6d a5 51 01 82 4d 3d 78 a7 e3 2d b2 b6 0a a7 +73 77 0b 57 39 07 b4 09 a2 59 2c 83 f3 47 fe bb +2d 5c 85 e9 25 5d 6d c1 2a aa 33 5a df bb 5d c8 +62 d7 86 19 53 e2 68 7d 53 03 b6 86 ff f9 63 4e +e4 d1 5c bc c2 9f 7a 35 05 a7 3d eb 6f 9e 38 8e +96 85 ff f4 d5 45 0f 1e 32 75 35 9a 2b 99 44 0c +67 39 f5 b9 1e bd 14 ef 78 ae 73 c1 a6 19 11 f5 +ae 3a 2b 91 49 67 49 17 27 81 80 65 ee 01 0d f4 +9d 5a 16 ed 8d ce e8 48 ae 09 48 a2 52 4e ac 7c +4f f9 09 6c ed 61 35 76 42 c5 e0 f8 06 80 af ff +ce 0b a7 eb 59 58 99 49 52 6f f5 12 35 cd c7 2d +47 a2 7b 39 b8 d4 ac 84 9c 3b c0 4f a8 36 cf 18 +4b ae 0c 83 41 59 56 + +# Signature: +38 ef 24 5b 94 0d 93 97 0a 50 3b f4 3e 28 e1 7b +8a ff 08 3c cb e1 e9 c4 8e 4d 80 f5 16 c2 7d 08 +5c a2 a4 e5 73 23 6a 24 94 d9 b9 97 f8 12 48 48 +12 f6 65 25 d0 6c 0a 0b b2 13 0c 15 d6 ce 18 b2 +2f 3c ee 57 09 7f c0 d5 58 af d9 af 27 f1 51 f8 +43 6f bc 87 d6 be 61 42 64 7a 17 e0 4d f6 de c7 +0a 95 c7 da a8 4e de 94 cc b4 3e 1d 2c 37 b9 45 +81 73 10 d1 4a 22 b5 b9 ae 61 14 48 ee 41 bc 70 + +# PKCS#1 v1.5 Signature Example 4.7 + +# ----------------- + +# Message to be signed: +8e 8b a8 43 6f e3 10 4b 7c e2 a4 ef c3 6c 85 7d +49 e8 49 c0 08 5f c6 57 ba a0 33 17 93 b3 f3 6c +7c e7 38 b6 13 0b fa c7 5e 50 11 f3 2a a3 d1 + +# Signature: +78 44 69 9f 1c 4f 29 6e 50 26 1f 15 26 e0 dd 84 +f0 1c 82 cb 85 fa 24 60 9e b0 33 58 75 2c 6c f5 +99 94 d8 4e 12 f4 6a 72 00 cf 5a d9 7c 08 dd 4f +fc 44 65 7d b5 72 14 cd 1f 4e ed 6b 77 d2 39 fb +58 21 69 88 c5 e5 bc 73 5a 4f df f4 08 eb 9f 12 +79 d6 5b ba f6 a6 81 92 44 18 34 9e 62 ff 5e 58 +15 ea ea 59 2d 90 d1 ee f5 56 fc d4 d5 b4 b8 9c +6c 70 73 9d 6f 0d 3d 0b d1 6a 50 f1 e0 02 4e 98 + +# PKCS#1 v1.5 Signature Example 4.8 + +# ----------------- + +# Message to be signed: +58 5f a6 a7 f7 7a 4b 6e ba 56 90 e7 3e 71 28 b7 +2e 67 7c db 3a aa 86 29 ed 61 f2 ee 63 af 1a 71 +ba 87 13 6a 52 db 1a 33 21 fc fe b2 48 bf 2e 5c +f5 c6 39 57 1d 58 95 ad f1 fb 06 17 ed 14 0a 2a +0d 98 37 c3 c1 d8 45 0c 28 9d 33 bc 96 23 79 d7 +3e 30 87 f2 b7 ee 6e ad d6 65 01 48 c0 42 b6 ff +04 48 21 96 c7 18 fd c0 ce 57 9c eb 62 a8 1e 58 +43 73 eb 93 75 40 c4 26 b5 56 6a 9f 40 7c fc cf +bc 4b 75 36 94 af 0d f4 cd 6a a9 f1 65 46 a6 33 +94 a0 f6 57 73 71 34 3f fd db 65 1a 62 a3 a5 8e +dd ec 67 a2 9c ca e8 96 56 3c 63 e3 c9 0d 54 d9 +13 58 ad f1 94 e6 aa b1 f9 + +# Signature: +68 93 35 1c 73 91 5f ac 47 c9 62 cc 60 17 ca 74 +a5 b5 ee 4c b1 bb 5a 10 ad a2 a4 31 58 a2 26 1e +b2 7b 86 6d b3 9d 35 90 b4 f8 d2 0e e6 7c b1 a5 +78 94 63 15 0d 83 93 43 23 25 43 c8 26 50 51 01 +e1 d2 57 04 26 ab 9f ef d6 5b a8 4f aa ec 73 1f +27 37 4a b1 01 91 c9 60 83 16 93 f2 9a 85 4c 38 +12 85 99 f7 28 77 49 b0 b4 8b f7 e9 df da ed c8 +4e ec e0 71 40 45 84 73 0c ec ce 0d 5c f0 05 cc + +# PKCS#1 v1.5 Signature Example 4.9 + +# ----------------- + +# Message to be signed: +78 3c 18 b1 1f + +# Signature: +13 2f df b8 41 93 df b7 9f df e6 ba bc 2e fd 39 +b2 6a a2 09 68 a0 7c 0e 41 56 0e e4 df cd 4f ca +79 17 49 0f 24 e8 df 84 f4 e0 11 5a 3e 63 27 3e +7a 3b 12 8a bb bd 17 b8 aa 5a 06 ba 15 5e cb 23 +0f e7 97 26 04 79 95 70 10 e4 4b a5 75 29 2e c3 +f1 51 ab f4 8e 91 03 e5 51 42 ec 67 a4 13 4d d8 +f3 8e c6 59 f9 a7 89 fd 03 41 ce f2 bb cf 9f 52 +9b 93 21 8f c3 e4 3a 76 69 69 d1 bf 87 88 48 07 + +# PKCS#1 v1.5 Signature Example 4.10 + +# ----------------- + +# Message to be signed: +96 dc 98 b0 eb 84 f5 59 48 30 7a dd ec cb e7 64 +39 ca 36 58 bc 36 35 96 24 c8 fe 2f a0 9c 52 e4 +7a cd c3 2a 15 6d 90 76 82 41 0a 85 67 ab ca fd +c6 d8 bb 53 25 35 9e c7 5f fd b7 3e e0 a9 51 5a +4d df 9a 31 e5 d5 19 46 03 74 28 0a da 30 de 7d +d5 34 de aa 57 + +# Signature: +8f b4 3d c8 f0 6f 2b a4 8f 19 be 5b 1a 09 31 21 +3a 99 0a ed 9c 9f ed 1d e5 d6 f3 5a 2a 78 2f 0a +19 8f f6 38 8d 96 e9 d5 9b 88 e9 78 22 f3 49 ff +41 64 ee a5 0a 62 93 5c 61 cb c7 6e 3d f7 5f 68 +4d 96 24 75 e5 63 59 64 96 c9 88 0a 48 ed 97 8a +63 15 a3 45 57 17 91 cb 2d dc 88 da be 41 87 98 +a6 a4 41 c4 7a fb b1 cd 15 21 3e ca 3b 11 15 ec +8f 58 f8 77 be 8f bd 38 f4 fd ae f9 39 f5 26 40 + +# PKCS#1 v1.5 Signature Example 4.11 + +# ----------------- + +# Message to be signed: +37 20 01 59 9d 99 30 c7 d5 57 45 8b 43 6d ec fd +c1 4d 06 cb 7b 96 b0 67 18 c4 8d 7d e5 74 82 a8 +68 ae 7f 06 58 70 a6 21 65 06 d1 1b 77 93 23 df +df 04 6c f5 77 51 29 13 4b 4d 56 89 e4 d9 c0 ce +1e 12 d7 d4 b0 6c b5 fc 58 20 de cf a4 1b af 59 +bf 25 7b 32 f0 25 b7 67 9b 44 5b 94 99 c9 25 55 +14 58 85 99 2f 1b 76 f8 48 91 ee 4d 3b e0 f5 15 +0f d5 90 + +# Signature: +a8 97 c7 f9 72 e1 17 49 e1 e7 c1 55 ce 94 62 aa +7e 1c c0 a9 79 c1 27 29 79 51 26 cb 8c 0e a5 02 +21 c4 26 f1 bb 06 c1 ca f7 c5 1a c2 fb d9 4d 68 +8d a6 7d df 3e f6 66 06 e9 89 a1 6d e1 f9 2b 17 +70 6f 88 e8 7d 9f 14 69 a0 05 c9 fd 76 78 8e e8 +c4 a7 f0 12 09 e2 8b 86 f6 74 88 1a f5 7d b6 c3 +42 9b 6f b4 56 98 bf 5d 30 07 f6 1c 7d 44 11 78 +ad 12 43 a4 9b 2a a6 02 9b fe 90 2d 26 e4 23 75 + +# PKCS#1 v1.5 Signature Example 4.12 + +# ----------------- + +# Message to be signed: +bf bf d0 73 21 f0 f1 d5 fa 9f df 00 14 c2 fc b0 +35 8a ad 0e 35 4b 0d 29 08 1b 23 3b 43 56 77 50 +bd 6e 78 + +# Signature: +c2 4d 31 04 94 09 aa 16 d3 f9 72 ef 8b 75 95 ea +a0 07 83 3e 2b cd c7 50 48 52 f2 50 5f ba 1f c1 +5f 19 a0 ea dd e8 33 5c 73 06 fc 3f 51 66 1d a5 +20 ec c8 db 7f 47 38 85 ca bd e9 3f 0c eb f1 df +9e 8a 82 37 0b 00 a0 43 ad 63 2c dc c7 8f 3f ac +1d 8a 37 57 fc 8e 52 41 bf ed 55 c4 96 04 ac 19 +ab da c0 c9 c4 0d a3 73 c1 5f 3c 1b cc 97 3f fb +4f 8b 7b 5b 55 3a e0 75 e1 b1 bd dd d2 3d 7d 2a + +# PKCS#1 v1.5 Signature Example 4.13 + +# ----------------- + +# Message to be signed: +c6 97 39 d2 2a c8 96 6b f1 1c 11 6f 61 4b 16 67 +40 e9 6b 90 65 3e 57 50 94 5f cf 77 21 86 c0 37 +90 a0 7f da 32 3e 1a 61 91 6b 06 ee 21 57 db 3d +ff 80 d6 7d 5e 39 a5 3a e2 68 c8 f0 9e d9 9a 73 +20 05 b0 bc 6a 04 af 4e 08 d5 7a 00 e7 20 1b 30 +60 ef aa db 73 11 3b fc 08 7f d8 37 09 3a a2 52 +35 b8 c1 49 f5 62 15 f0 31 c2 4a + +# Signature: +d0 6d 32 26 0d a2 db 48 10 4f bd c2 4e 16 a6 5b +48 73 7d 43 ce 24 37 04 04 2a ad 6c 03 fd e5 a3 +dc 0f 2c c6 e3 ad 68 c3 c6 2e ab fa 1f 7b 1c ab +00 9d 11 75 af f7 7b e5 8f b1 2a 4e 58 12 7f ed +63 ea 3d f4 41 81 bd a3 8c 77 3c 83 b9 e8 04 bb +3d b7 96 32 63 df 30 e9 2c 4c 27 19 56 e7 e8 10 +45 2c 15 e0 6e 93 96 66 df 0c 83 34 03 30 96 c0 +7d ea 05 b4 4e bb 14 24 92 e7 66 91 31 eb cf 2c + +# PKCS#1 v1.5 Signature Example 4.14 + +# ----------------- + +# Message to be signed: +73 30 47 f3 36 f9 15 47 38 67 45 47 db 02 a9 f4 + +# Signature: +c1 13 c0 46 5c 84 cb fb 0f a1 bd bc 54 c3 e1 06 +8c a2 3e 69 b8 39 19 09 c3 90 0f e5 b4 e7 e3 f0 +34 c9 a9 88 a3 dd c3 c3 81 75 6a 1e 1a 27 c1 ec +fb 3a 70 e1 ee 0e 92 04 18 ac 4a b6 d9 53 2b 8d +09 59 a6 53 b4 c5 08 67 06 63 46 2b 2e 13 58 16 +b6 94 a6 b9 b4 68 a2 9f 38 de 53 bf cd df 97 e0 +3d 8d d2 4f 97 26 33 a4 9c f3 ea ae 1d 69 62 94 +38 60 dd 25 43 40 08 6b 10 35 7b 80 c1 cf bf 31 + +# PKCS#1 v1.5 Signature Example 4.15 + +# ----------------- + +# Message to be signed: +a9 74 0b 9a a0 d3 40 58 fd 3b 90 6e 4f 78 59 df +b0 7d 71 73 e5 e6 f6 35 0a da c2 1f 27 b2 30 74 +69 bd 0c e1 95 49 d0 70 01 20 cb e5 10 77 db bb +b0 0a 8d 8b 09 de 8d 83 96 e3 65 07 fe 1e f6 a1 +90 17 54 8e 0c 71 66 74 c2 fe c2 33 ad b2 f7 75 +66 5e c4 1f 2b d0 ba 39 6b 06 1a 9d aa 7e 86 6f +7c 23 fd 35 31 95 43 00 a3 42 f9 24 53 5e a1 49 +8c 48 f6 c8 79 93 28 + +# Signature: +4f bd 4f b2 37 04 f4 14 9a da 32 7f a5 33 88 52 +6a 07 dd 43 d9 15 fc bd a9 a1 3b b2 a3 73 8f 4a +db 1c 3d b2 6a b6 90 48 80 5a 80 c8 16 05 c9 6d +68 f8 41 80 2f 5a bb 02 05 7b 61 1f e2 f3 94 71 +62 65 e5 45 25 2c 23 0c e4 74 af f0 bb d4 ff 1f +38 08 49 60 36 a4 94 8c a7 a1 10 ff 26 c6 38 c5 +0f 32 15 b2 8a 09 f2 3a f6 f8 4c dc 89 78 98 d0 +fd 22 3b 13 48 1f e8 92 b1 a5 8b a2 e4 b3 68 5b + +# PKCS#1 v1.5 Signature Example 4.16 + +# ----------------- + +# Message to be signed: +af 8f 08 87 c2 19 00 4d 2a bd 89 4e a9 25 59 ee +31 98 af 3a 73 4f e9 b9 63 8c 26 3a 72 8a d9 5a +5a e8 ce 3e b1 58 39 f3 aa 78 52 bb 39 07 06 e7 +76 0e 43 + +# Signature: +32 7e c9 d0 be 7a ab 7b c9 59 d4 02 27 e1 d0 04 +81 fc 04 01 1f e0 8f d5 44 9b 90 c0 f0 54 e0 d6 +59 b9 26 cc 81 29 21 c2 0a 56 3c 4a be 4f 82 5d +6b 5e ef 57 b3 e2 d6 5d 20 a8 01 3a 50 dd 5c 93 +23 8c f0 49 f2 ff 0c 7e be b8 e8 ca f7 2e 46 e7 +cf 8a 0c 3f 49 25 61 6b 1b c1 82 6f fc b0 bd a6 +0b be be df d4 c6 0f 27 88 d1 66 6f b8 45 11 85 +36 46 c2 dd 46 68 51 fa c8 5b e0 ed 5a ce 5f e2 + +# PKCS#1 v1.5 Signature Example 4.17 + +# ----------------- + +# Message to be signed: +38 df 86 55 7f 37 5d 09 cc d8 bd 15 d8 cc f6 1f +5d 78 ca 5c 7f 5c de 78 2e 6b f5 d0 05 70 56 d4 +ba d9 8b 3d 2f 95 75 e8 24 ab 7a 33 ff 57 b0 ac +10 0a b0 d6 ea d7 aa 0b 50 f6 e4 d3 e5 ec 0b 96 +6b 81 57 79 a9 1b 3a 8b d0 49 bf 2a eb 92 01 42 +77 22 22 c9 ca 0c 32 8c 65 9e 0a 64 37 43 3c ce +b7 3c 14 9a ec 4a 74 80 d5 bb c4 29 20 d7 ca 23 +5d b6 74 + +# Signature: +30 46 05 5c 2b 8e f7 fa 92 c8 a9 e3 95 98 5b d4 +60 fb 6b 47 98 65 53 94 4d 21 04 51 19 f7 e7 61 +7e 03 fe 80 87 0a c6 aa bf 63 b0 96 ca d5 cc e7 +f5 06 95 3a 7f 69 3f e1 37 ad fb 97 cd 45 81 28 +ae 95 c4 7c a9 48 da cf 24 03 6a de aa 48 f2 9a +46 9f b5 13 19 1e 05 ac f7 9e 67 a7 93 a3 af 5e +4f 9c 6d 0d 01 fd d0 e0 cd 42 96 ad 3d a2 ca 89 +a5 0e ed cd 9f 7b 87 7d 2a e1 d5 8d 98 dc d7 8f + +# PKCS#1 v1.5 Signature Example 4.18 + +# ----------------- + +# Message to be signed: +cb 34 ed d5 ab 65 40 41 b6 14 30 56 + +# Signature: +1d df 48 ba 53 51 be d0 79 5f 55 b3 06 aa 1c 6e +d8 36 f5 92 ba 93 cf 0c 46 b7 c2 73 70 9d 36 b8 +df f0 2a bd b1 a7 68 d1 c7 11 4a 86 a4 57 49 6d +a5 79 e4 d8 19 f7 2a 19 2e 29 8b e2 15 2f 7c f3 +9d 1e 30 82 7d 02 82 cc f3 4d c8 88 9f 1c 2f 59 +70 93 0d 97 35 04 2f 8a 5a 71 22 63 16 5d 6e 6c +50 35 e2 e4 a5 0e 86 3c 06 79 9e 3c 89 cc b5 cb +0e 70 b3 c9 9c 08 40 30 67 7a 7c 97 90 7a 17 24 + +# PKCS#1 v1.5 Signature Example 4.19 + +# ----------------- + +# Message to be signed: +5b 09 ec 88 b1 52 71 78 fa 04 32 63 f3 06 7d 9f +fe 97 30 32 a9 9f 4c b0 8a d2 c7 e0 a2 45 6c dd +57 a7 df 56 fe 60 53 52 7a 5a eb 67 d7 e5 52 06 +3c 1c a9 7b 1b ef fa 7b 39 e9 97 ca f2 78 78 ea +0f 62 cb eb c8 c2 1d f4 c8 89 a2 02 85 1e 94 90 +88 49 0c 24 9b 6e 9a cf 1d 80 63 f5 be 23 43 98 +9b f9 5c 4d a0 1a 2b e7 8b 4a b6 b3 78 01 5b c3 +79 57 f7 69 48 b5 e5 8e 44 0c 28 45 3d 40 d7 cf +d5 7e 7d 69 06 00 47 4a b5 e7 59 73 b1 ea 0c 5f +1e 45 d1 41 90 af e2 f4 eb 6d 3b df 71 f1 d2 f8 +bb 15 6a 1c 29 5d 04 aa eb 9d 68 9d ce 79 ed 62 +bc 44 3e e2 0c + +# Signature: +af 56 fc 32 97 39 e2 f7 75 4b 6c a2 51 64 a6 fa +58 f6 85 dd b7 42 b4 84 1d 73 a5 e2 c4 c4 53 43 +b7 4d fd 2f 0d 37 0e dd dd 36 a0 17 56 4a 8d 3a +d4 02 e2 a3 41 c9 72 06 2c 23 81 4a 00 13 1e 17 +b1 de c7 b4 c5 7c 5b f1 d4 fa 79 22 29 37 a4 dc +5c 00 23 5f 85 3d d2 3d c9 75 7f 33 5c 85 c2 07 +eb 07 4d 4b cc 24 3e da a7 83 1b 83 13 56 55 e2 +27 7e f2 9e 7a eb f3 4a 0f 7b 23 4a 28 65 0a 30 + +# PKCS#1 v1.5 Signature Example 4.20 + +# ----------------- + +# Message to be signed: +3c 33 0c 1e f7 18 c1 41 e4 7b 8f a8 59 be 4d 5b +96 + +# Signature: +0b 10 22 dc 38 e2 17 fd 3b 0e 7e f1 9d fc b4 b4 +56 36 62 40 98 30 95 f6 db 96 58 31 a7 0f 0f 8e +20 e2 dd 2a c2 31 cc 37 90 45 c2 73 65 e7 3a 53 +71 9b b6 f0 11 c3 f8 63 6b 64 99 4c a4 80 60 2f +b3 b4 f0 e2 27 4b 58 b3 63 e0 d3 08 b5 28 e1 58 +59 a9 1d cf 99 bf fe fb c8 05 22 41 b9 74 19 2e +63 62 18 f3 98 33 2d af e8 25 9c a5 f5 cc fa 54 +c9 b3 2b 27 35 af 07 24 f4 0b 5a 5d 61 21 a4 0d + +# ============================================= + +# Example 5: A 1024-bit RSA key pair +# ----------------------------------- + + +# Public key +# ---------- + +# Modulus: +c5 5f fb dd 6a 27 53 bc 02 af 20 ae 18 ea 0d af +23 0b b6 f8 79 5d 05 ef ec c8 15 ba ec e2 2b 38 +79 99 5f 6d 97 64 c1 df 8f 97 85 13 81 68 62 66 +b8 09 2f b6 01 18 98 a7 67 07 a4 d1 d5 bd a0 8d +24 6c 68 7a 8b ba fa 63 98 ac 9e a2 72 68 23 71 +4a 0c 39 34 ca 6e 5f 8c e3 39 87 b5 34 85 7e a9 +f8 5c c4 e1 9a 1d 21 83 e0 e4 c8 aa 55 cb 22 7b +0e 56 ce b2 b6 2b 30 ef c7 88 64 b2 f9 fb 92 49 + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +c5 5f fb dd 6a 27 53 bc 02 af 20 ae 18 ea 0d af +23 0b b6 f8 79 5d 05 ef ec c8 15 ba ec e2 2b 38 +79 99 5f 6d 97 64 c1 df 8f 97 85 13 81 68 62 66 +b8 09 2f b6 01 18 98 a7 67 07 a4 d1 d5 bd a0 8d +24 6c 68 7a 8b ba fa 63 98 ac 9e a2 72 68 23 71 +4a 0c 39 34 ca 6e 5f 8c e3 39 87 b5 34 85 7e a9 +f8 5c c4 e1 9a 1d 21 83 e0 e4 c8 aa 55 cb 22 7b +0e 56 ce b2 b6 2b 30 ef c7 88 64 b2 f9 fb 92 49 + +# Public exponent: +01 00 01 + +# Exponent: +07 e3 fa 71 b3 98 b6 e4 41 47 37 0b 3e bb bc a8 +4f c2 5c 22 3a d7 d9 30 ea 4a 65 73 ff 9c 5b 15 +fa e6 82 c6 22 d3 48 5c e3 a4 af 11 44 8f 23 bf +ef 83 8e 80 bc 32 7b 87 d5 ba 9c 80 37 07 49 af +c8 c1 c0 17 54 6f c6 b6 59 31 b7 59 ca 43 41 fa +5e 5e 10 b2 40 87 e6 e2 c0 f4 db b7 90 69 52 99 +9c bd 90 d2 43 5f ca cc 9c 82 e4 8f df 24 e4 95 +cf f3 0a d4 19 e7 12 3e 3a c9 42 27 2e 1a ba b1 + +# Prime 1: +f7 f7 c0 02 f0 19 6e cd d7 1b a5 ad 74 2b 69 48 +27 d2 88 af 1b 1b b6 9c 5e d7 fb 22 9d ee 4b 7a +32 f2 f7 56 8a 6f ca f3 83 d8 9a da 9f c1 4a 7b +a5 d0 a4 a4 6c 2c 54 3e ec 17 75 49 c8 a0 48 b7 + +# Prime 2: +cb c4 b2 86 04 76 a2 d3 e8 a4 da 21 00 16 ca ce +d0 e3 67 cb 86 77 10 a4 b5 aa 2d f2 b8 e5 da f5 +fd c6 47 80 7d 4d 5e bb 6c 56 b9 76 3c cd ae 4d +ea 33 08 eb 0a c2 a8 95 01 cb 20 9d 26 39 fc ff + +# Prime exponent 1: +6c 76 27 bc a1 3c de a4 96 a4 77 31 89 90 bb 7a +5e 40 ce 9c 99 24 e4 19 3d bb 07 14 3b 34 52 3b +5f 31 bb 52 55 37 54 f4 73 05 39 a6 cb 1e 06 f0 +52 b5 12 6f 01 09 da c7 b3 09 07 ba 80 50 eb bd + +# Prime exponent 2: +40 92 74 80 43 a9 d4 af 92 69 ab 36 09 f1 2f 13 +9a de 75 65 e9 96 91 8f a0 81 ed 4d 9d 8a 39 78 +fa 92 7a d6 1c df 07 c6 1c ee de 96 b9 6d f4 6e +7c 68 ef ca 8b fe 63 ad d4 83 aa 32 22 8a fd c1 + +# Coefficient: +2a 61 94 ca 29 70 72 38 45 ff f3 8c a1 a9 a3 b5 +66 b4 24 5d e2 f9 01 34 b8 e6 ae c8 ae 07 f3 bb +7c 5e 5a e6 e1 83 34 85 e5 5d 8c a6 0c e1 64 2f +72 75 96 8e 66 12 38 35 52 11 c6 38 48 94 0f 3c + +# PKCS#1 v1.5 signing of 20 random messages +# ------------------------------------------------------- + +# PKCS#1 v1.5 Signature Example 5.1 + +# ----------------- + +# Message to be signed: +ea e9 a4 0b ff 18 3f 41 14 73 2e 7b 3b a5 56 f4 +ce 28 8d aa 83 e3 ff 23 61 12 44 a7 a0 90 1f 11 +7d 86 c0 9c 33 a5 23 2b d3 20 fa 37 a2 38 a8 aa +62 dd 21 ab bf ac db 93 fa 1c 44 cc 55 ac 61 be +a2 4a 6a 34 cc 64 76 75 38 37 e1 6f ac d8 2e b4 +9e 1c 57 c9 58 fb bf f5 68 88 7c f8 2e eb e9 61 +e5 80 e0 64 db 9c be c3 b5 3d f1 f2 71 99 e4 9a +04 cb e5 9c 69 a2 65 cf ac 8c e4 f9 1c a9 5d 52 +b1 14 5c 8b 9f 44 40 b3 9c 18 50 94 be 18 48 74 +da 59 71 d7 d7 63 fe 07 ce 16 e5 7f 1e 50 d2 28 +65 04 b4 81 e2 c6 85 bc 9d 9c 01 49 3f d3 a6 d8 +bb 9b 2e 96 bf de b6 c9 29 14 ca + +# Signature: +44 ce b4 42 24 2b ae 08 59 94 ea d0 7b 70 95 43 +ea 23 95 a6 e8 d4 64 73 d7 0d f3 4a 95 55 aa 56 +7f 4d a1 38 e9 63 fe 92 86 a8 4f b7 c5 cf 82 00 +03 59 04 b5 0c 32 40 3c ae 51 7b fa 7f ca 8a 66 +fc fd 63 2a f7 47 c4 9c df b0 b9 ae e3 52 28 b7 +dc 4c 21 00 39 69 b0 a0 13 ed e1 29 2b 65 d1 0a +50 c9 02 63 fb 0b f4 f4 b8 37 66 41 b0 3e 1f af +b8 83 f0 38 f4 32 3d fe 5b ea c4 68 de ea 99 c3 + +# PKCS#1 v1.5 Signature Example 5.2 + +# ----------------- + +# Message to be signed: +9d e5 ca 46 74 85 61 a0 b9 28 b2 60 a9 5a 3e d9 +20 ad c8 d5 ee b9 27 1d c7 1b c1 4f 69 cc d6 31 +1d 18 6a 77 9f 5e b8 db 17 c6 90 d6 86 7c f3 36 +9b bf f1 5f ab b3 cd 2c fd d6 f7 d7 52 86 ff 2d +24 99 c5 ab b4 8e d5 4f d4 d8 49 a9 18 0e 11 0e +0a 53 a7 21 39 82 92 11 0f e8 be 26 + +# Signature: +44 5f f5 b6 87 9f 8c e7 53 95 01 6f 04 95 f1 31 +35 b1 79 e7 3a 3c ae b3 30 e3 cd a7 f3 1f 1d cb +a7 aa 82 e2 68 c9 35 e9 d7 01 4e 0b 0d ce a6 9c +7b 96 8a db 17 42 4a 64 df d1 e2 bc 57 07 f9 20 +fc 0c 83 cc 63 df c7 4b 96 3e 68 2b 46 a2 2a c2 +56 ac 6b e5 70 9c 07 cf cc 3d 4e ba 3a 1d 61 ab +15 f1 ba db 0a 49 fb 5c f0 9a 1f 74 81 a3 aa ea +f7 c2 57 54 03 77 ae a7 b5 44 17 a6 09 c7 6f 4c + +# PKCS#1 v1.5 Signature Example 5.3 + +# ----------------- + +# Message to be signed: +18 3b a1 a3 81 1d 62 5c a9 da 1b ba ae dc 76 19 +20 12 fc b6 74 bb 9e 77 d8 f3 77 08 d2 40 d3 49 +e0 57 97 41 6f eb 24 e3 01 8c 7a 20 5d 05 9d e8 +e0 ae 05 a8 d7 e0 9e af ee b9 f0 6d e5 d4 28 7a +bb ef 05 9b c5 86 b2 1c 82 d6 4a ec e8 d7 42 8a +fc d7 b2 2f c5 d1 68 bc 07 6b 61 5f 02 73 3c b6 +31 25 c8 f3 6d 5c b8 09 ce 80 65 08 23 98 b3 88 +5a 89 19 57 0c 47 8a 07 2f 59 66 15 d7 8f 01 36 +d1 1b e3 2b 3f e0 f4 fb e3 c7 da 5d 81 34 19 10 +17 7e 48 b1 bb ac 27 6c 12 ee 81 54 65 dc 67 d4 +53 24 f9 05 aa ca 48 38 d8 1f 74 31 46 3e 89 eb +8b 95 36 58 69 36 af b4 2c b4 7b d8 c3 18 29 d3 +1e c1 ee 29 f9 1c cc 6d f9 cd 1b 0b 9b 86 46 b6 +02 67 fd 7e ce ae 92 c0 ae 9e 0c e5 ff 6f 7e 0b +f7 56 a9 b8 ff c9 c6 16 + +# Signature: +ab 4b 78 96 4c 2a 35 d3 28 55 e0 ef ce d3 4b f8 +02 19 b5 8c 48 8e a3 75 b1 f3 27 16 6a 51 35 e5 +da 99 45 c2 87 29 7a 3d 93 2e 57 27 46 f0 22 74 +8b 85 58 5a 0a bd 91 86 f4 ac 35 ed c8 50 d2 fd +88 05 b9 e9 f5 1a 5a dc b9 5e 1a c1 72 9e 57 b8 +53 31 c1 ed 15 c3 d0 cf ae 33 f6 1c 11 9b 55 c9 +5e 34 4b 72 f2 b4 f8 e7 e8 fa c7 a3 3e 5b 8b 27 +6a 60 88 a7 fa bf 4f a1 72 35 7f b6 e3 f4 4a 94 + +# PKCS#1 v1.5 Signature Example 5.4 + +# ----------------- + +# Message to be signed: +87 07 dc db 49 d2 83 a2 3a 9b d6 ff 87 af f8 34 +f0 6f f7 f4 7b 0e 5f 57 ff 1a 0d 99 5b ba 9c dd +5e a0 1b 42 b2 5d 6f f1 7a 0d c1 06 05 cf 45 2a +ca 73 be 54 ed 5e 0c e2 15 66 af cc 17 91 2a be +18 df ac d1 bc 03 e3 e2 88 2a 4b b3 a4 f3 9e ea +f9 63 d7 c3 5e 6b a8 58 b1 37 6a 07 51 60 c6 cf +ae d5 e8 c5 2e 45 11 32 34 72 19 bd 88 89 3e eb +e3 56 59 a0 ee 4d 94 f9 4d 03 5b 7a 86 86 ff b4 +16 eb 99 fb 2a aa 81 23 6b 05 ac 46 45 92 5f 2c +2b c1 9e be 89 a6 3f 2f 45 1d 0b 13 b2 fe f0 61 +e5 30 a3 49 ba f3 b2 35 64 22 b0 95 fd 9f 19 29 +93 ab 99 c9 f9 22 6e f9 a7 b3 cf b3 65 82 08 59 +29 c8 76 b5 e9 d7 c6 ac ac 7b b0 27 52 34 e4 1e +d3 51 c8 38 b7 a3 1a + +# Signature: +17 53 98 8b 39 dc 74 5d f9 69 1a f9 ee 69 ca da +73 a9 87 7c ca 12 f6 d4 06 27 dc ed 76 22 14 7e +c9 01 a5 b4 63 e7 ef 9b 37 fb d6 92 78 5a a2 2a +46 5d f4 03 af 92 a2 9f 79 5d 40 a8 3f a9 64 b8 +5a 7e c0 5a 3c da e3 f8 bc 8a 61 a7 9d c8 42 e1 +d3 77 bc 5e 1d 46 ad aa a8 66 be 28 2c 6e 23 88 +17 36 44 f4 06 27 bc f8 a0 97 4a 4b e8 fc c4 8a +ee 7e 82 59 f8 68 a2 bd 78 9a 90 89 92 05 6e 55 + +# PKCS#1 v1.5 Signature Example 5.5 + +# ----------------- + +# Message to be signed: +ac 9f a3 f6 3d f0 68 e9 0d 69 2e cc fa 7d 87 96 +49 1a ca 79 5b 98 58 a4 55 18 62 32 29 af 28 b1 +3a 50 2d 8c b3 b9 50 92 50 58 82 eb 99 4d e7 46 +59 62 56 98 a0 05 04 17 94 0d 8b fa 28 a3 f9 3d +14 9f f8 b0 bb 39 26 f6 18 ef 91 96 6f 4d 39 bd +ba 5a 05 17 dd eb b1 6d 2b c4 b4 e3 3a 7d 61 9c +95 a3 3c f5 f5 72 db e0 7f ab 4a a6 7f b3 f3 9a +a2 98 1a 3d c0 ca ee 64 75 8e a8 98 eb ce 10 bf +3a a4 fc 84 49 e8 e0 cf 7e 88 b1 88 23 8c 20 68 +ef ac eb fe ef 40 73 a6 54 a5 8a 30 99 d0 36 ae +ee 2d 81 82 98 d4 ab 39 23 8e dc 45 9a 9f d3 57 +7e 9f 5b fc 03 68 aa 65 7a ee da 1e eb 8a e7 f5 +ac 1e af 3b 1c 95 81 7d de 2e c1 a5 9f cb 5e f2 +7c c3 4f b7 53 31 da 7a 49 96 92 5a c3 ad 17 bb +c3 da fe 6a 9c 64 4e 30 98 ef fe f8 fe a5 cc 0d +5f 0c 04 8e 10 88 + +# Signature: +11 e1 a8 28 f0 0a 98 7e 03 d6 2e 2a 53 6c 29 7d +da c0 22 e0 63 ee 0d e4 e4 69 5d ed 1f db 22 09 +00 a3 ac 3f 87 d1 be 75 f9 59 c2 8b 57 8a 43 b2 +56 64 3c df ff 92 15 95 fd fb ea f4 10 c2 ae d9 +e5 e4 7e 1d 15 1a e2 8c 76 99 ae e2 25 a6 45 bc +42 b3 be b5 2f 08 38 7e c5 54 d0 20 4d 28 3c 3b +cc bc ca 21 6e da d9 4e c6 4f 9c 20 b3 40 6a b7 +8a 6c 4a 4d ae 3f a6 17 a0 0c 6a b2 f8 e2 47 62 + +# PKCS#1 v1.5 Signature Example 5.6 + +# ----------------- + +# Message to be signed: +15 74 69 73 44 e9 86 85 cd 6e 65 e4 67 83 f0 b5 + +# Signature: +3b 7d 67 d1 3c d3 c0 fd 30 5a d4 04 d8 a3 dc de +4a 45 17 9c 2d 0b 87 11 5d 6d 06 0c 24 9b 87 f3 +9e 46 3b 76 4b 42 07 c4 8a 74 cf ce 25 31 e8 18 +3d 3d 01 25 85 ce 57 39 d1 62 c4 ea 22 32 44 02 +ea 2e 6e af b8 a5 73 fc ff 40 15 c9 5c 45 e4 ca +7a c5 1a e3 a0 6f 42 1e 60 6d 68 3f 5e 12 2b 55 +79 14 8a 9c 46 6a de b0 24 28 f4 89 6a 86 df 63 +be 58 7d dd 7a 6a 8d e7 17 6b e4 e7 ff 4a aa 99 + +# PKCS#1 v1.5 Signature Example 5.7 + +# ----------------- + +# Message to be signed: +be 46 be 8b dd 85 43 d3 70 bb b7 ac 83 9f 5e 64 +53 f3 0c d8 75 2a 4b 92 67 32 c5 9e 61 09 04 4b +e3 a0 75 6c 70 25 a2 32 80 df 2e d7 66 ba 39 ab +b2 0b 94 4c 06 5f e1 48 7d ea 31 b4 70 8a 68 9a +50 b2 8d 54 29 94 cb bb 3a 5b b9 46 0e e7 a9 c1 +53 8b da 75 1a 52 8b 76 70 f9 15 78 d6 67 3e 08 +ab cc df 5f 4d 8c 1e be cf ca c7 5c c4 2d bb b8 +cd e3 c1 b4 74 b5 56 b3 2b b8 48 fc 32 7b a6 e3 +cf 5f 77 b1 eb c0 4a 19 f3 c8 c3 9b 6b 84 77 84 +ea a3 25 a2 b6 f3 + +# Signature: +91 de 2f 90 32 47 b2 d1 3a be 93 dd d9 6d fa ef +1b 4d 17 2b 09 09 58 f0 cc 34 fa 92 83 5a d6 0c +44 b4 27 fe 03 1c ad bf 92 ff 1c d0 38 41 44 c9 +b5 f2 8f 64 5c 63 e8 d7 16 bc ec 2e 04 3b c3 96 +56 64 17 85 c2 6b a3 6b a2 a1 09 e3 64 4e bf d9 +62 d7 a3 16 91 6b 3f 13 66 20 13 cc 0f 37 ad 8f +9e 0d 9e c8 b4 c8 ad 5c 75 32 cf a0 44 ae dc 73 +78 77 94 c2 98 79 7c 8a 7e 14 49 ea d6 15 0d ed + +# PKCS#1 v1.5 Signature Example 5.8 + +# ----------------- + +# Message to be signed: +0b 7e 06 63 e7 15 ea 38 bc 93 0e c9 d8 e2 a0 29 +aa 1a 4c 95 e7 b2 00 47 ae 15 44 d5 b2 d8 47 6f +c8 05 53 9f b0 ef ab 7d 5f f1 2c 36 d7 6a 79 7b +75 c0 b5 3f a9 26 54 73 da b6 80 c2 55 d5 7e 99 +b6 d9 fe 08 cf 1a 57 34 91 e2 19 78 fa e9 53 9c +c0 58 84 63 3a 1d d5 cb 21 53 6f d4 2d dd 73 1c +a7 6c 34 57 81 3c e1 bb 59 c2 1d d3 1b f2 ae 3b +fd 7d 20 c6 c7 12 a9 dd 43 95 1f 1b 19 8d ea f7 +41 08 ea d2 29 26 d2 b0 19 1e 59 d5 f6 79 ad 97 +c7 1e dc 69 de 97 98 7e 54 3e 87 a9 6a 9f ee 77 +e3 f0 ea 95 7b d4 6a + +# Signature: +48 51 09 8a 85 e7 0d a3 33 92 a9 e9 0b 34 76 a4 +8b a0 e3 2c d6 ad 3d c1 dd 91 da 57 e8 8d fb c7 +b6 57 4b 08 e8 71 60 80 e1 5d f4 05 79 c5 70 5d +5b ef 58 4b 08 b2 63 db c4 f0 d1 59 56 ff 11 25 +c4 8f 89 59 1e bc 94 1d 9f e8 f9 a7 80 c8 2e a3 +2b f3 ef a1 6c ab be e5 80 fd 6b 95 74 08 0f 69 +07 fe af f8 1d 48 c4 9a 6d e2 24 84 80 f1 d8 52 +39 e9 a4 18 dd 53 10 de f7 76 e0 8f 50 9a 14 78 + +# PKCS#1 v1.5 Signature Example 5.9 + +# ----------------- + +# Message to be signed: +13 42 33 ba cf a1 6d c8 4d 8f a4 bd bb 47 93 d1 +da c0 7d 60 54 bd 08 39 61 da 68 67 9c a3 75 33 +4f 09 20 b9 df b8 a6 8e d7 7f 27 fd 92 19 28 13 +61 e0 9f a6 08 4f 96 e6 98 85 b4 7e a7 75 af 06 +77 2d 66 12 d4 d1 6f 4a 5c c4 cd 0d 1e b2 3b 7a +1f 09 56 4b 84 2e a0 7c bd de 60 45 3a 2a a4 ab +69 dd fe b5 b1 3e 9f 08 cd 07 2e 5b 71 ce d3 34 +ea 70 4c 74 9f f4 72 7e be 12 c0 29 0e 00 a8 41 +d7 4b 06 55 cf d8 06 5d 28 20 fd f8 fd c1 bd 45 +58 81 80 8b ff 0e c7 27 60 74 75 bf 0b 2b c8 93 +59 58 32 9b 77 8e fc e5 60 fc 26 c3 bb 6e 2d c9 +ae f1 8f 96 9f ba 64 74 5e d4 d8 5b 14 75 7b b8 +33 ea db 9c 5c b0 ea ed 08 d3 0b 95 15 00 5a 3e +88 09 1f c5 cd 2f 36 ad 95 5b 7c 6f 2b 19 bb a3 +74 fd + +# Signature: +3e 37 b4 2d be c1 29 db 81 c5 e2 a2 22 f3 1e 81 +b9 37 ff 02 24 95 18 18 37 30 37 8b 4c 09 2a a7 +f3 b2 34 59 61 1a 82 4f c5 27 54 42 1a 27 cc e9 +18 b6 2a a7 b4 46 38 a0 c0 82 79 80 52 a5 88 46 +68 82 51 06 90 ac 77 30 23 28 02 46 c8 90 ff 1f +62 27 04 9e 66 8b c9 d6 e4 89 b6 94 4a 34 e8 f9 +30 02 bb b0 0d 75 2b 57 7c e3 52 53 00 82 be cd +30 9b 0d ac cd 1d 68 d0 6e 1d f7 12 21 c6 22 69 + +# PKCS#1 v1.5 Signature Example 5.10 + +# ----------------- + +# Message to be signed: +35 da 3d 02 34 bd 74 fc d7 6e 8e 69 52 8f 65 1b +88 27 1c bf 16 28 69 38 c2 c4 a3 7d 41 1d e8 f6 +75 78 eb 8b 3d 20 a8 fd 7d cd e7 b6 56 fe 96 a6 +80 87 32 28 ed 0f 9a 62 0f 15 05 44 23 72 f9 b2 +b4 16 84 98 72 34 90 f8 11 f3 11 1f 5f 77 38 63 +47 b4 82 2e d9 d6 b5 53 83 92 21 5c b6 c4 86 5b +b7 b5 b7 e2 84 2e ea 0e 90 01 ca 0c df 5d 6b + +# Signature: +12 ff 2a b5 fc 83 d6 49 59 7c 47 bf f3 29 b7 f4 +61 db bb da 01 fb 6b ad 26 54 3e 4d bc d6 0c 5e +2c de bf b1 12 78 4a 96 4e 27 f2 a2 e7 fd 07 ec +39 0a ab 14 94 37 03 58 a7 5b 5e 1f a4 f1 ad 52 +02 e6 d5 46 c0 f3 15 e8 6f af f1 d2 5b 94 72 82 +da 32 ea b5 6c 22 f0 6c 8a 9d 32 ae f2 81 d6 f0 +aa 55 d7 ad 3b cd fd b2 09 a1 6e f4 5c c6 f9 68 +2e ae 96 3c bb 21 3a db 7f ad 1b ef 49 c0 70 4f + +# PKCS#1 v1.5 Signature Example 5.11 + +# ----------------- + +# Message to be signed: +75 fd b0 72 73 f7 54 d1 11 6f 99 7a f2 d1 1a 51 +2b 94 e9 e0 48 01 b3 fc 73 91 30 b7 47 b4 be 87 +44 d7 e7 f8 a2 97 a0 89 d9 05 0c 5f 54 f8 a3 9a +a3 f2 + +# Signature: +07 ff c1 b7 a1 0d da ba 96 05 f0 a3 d9 3c 8a 5e +4c 0b 77 58 61 39 05 07 31 d9 cc 9b 3c 83 d2 b7 +3f af 9a 4e 24 d1 c8 bb 0d 62 3d f1 0f c8 40 7d +15 14 48 fa 43 ee 65 81 e7 b0 ac 80 d1 4a df a4 +f6 d2 7a 76 67 50 b2 31 cb c1 c5 cf d6 2d f1 b9 +72 7d 8b 87 41 46 9f 68 e5 0a 9b 3b c7 ad e1 37 +db 06 74 76 03 74 28 56 d5 e7 dd b4 e1 6a 5b 49 +d7 36 5d b2 76 3b f5 fd ea 08 3d 81 fa c9 2d 87 + +# PKCS#1 v1.5 Signature Example 5.12 + +# ----------------- + +# Message to be signed: +96 c9 fa ce fb a2 ed 33 ed 8b 7b 3d 8b 6d f2 8f +2f ab 0d cd d7 a3 cd 7a 7d ed a2 54 5e d4 47 0e +d2 5b 46 d2 16 6e eb b7 e1 47 10 17 83 b6 45 ba +c6 26 64 b8 72 70 09 f3 5d 1e a5 fd a5 e7 c2 8d +6a f6 fe 92 04 6c a7 24 ca b8 42 5a 52 a0 85 f9 +ac 90 83 d4 d6 90 bb dd df d0 a8 2d 94 8f 70 d6 +85 e2 6b b9 f5 27 40 8a bc 84 7b ff 12 02 de df +6d 2f ac 6c f3 68 2a 51 6b a7 2f 4f e9 7b 90 46 +6a f6 e5 43 12 31 65 b8 a6 83 ca ba 2f a2 3a 86 +ac 06 21 30 65 e1 ed 9b 4f 49 af 4f ff 6d 46 b3 +6d 13 3d 8d a2 dd 29 d5 5f 9f 32 2c 40 78 5d dc +21 c4 26 c5 e0 a6 7d 41 4f 5a b9 71 c4 46 0f f9 +b1 14 30 5a 8a e7 e7 b9 5c 73 03 4e 8e 93 c0 35 +29 dd 50 c9 4f 07 62 79 77 5a 5a 3a 80 c5 d2 48 +6a 2d 51 08 48 bd c9 b8 52 ac 1d 32 ce b7 c0 41 +a0 8f 2f 8e 62 + +# Signature: +46 d0 3f ae c4 a7 23 18 62 1e f4 d0 c1 bc a7 1a +2a ee a7 a8 1d f8 fe bb 8b a3 fb 35 40 d7 2d 15 +34 b9 82 69 16 e8 9f 27 d3 25 67 6c cf 5a 0a a1 +61 12 db 2d 93 03 e0 eb ce 4b 85 58 7c 55 ac a0 +68 50 de 84 de c2 13 d1 13 74 04 a5 de e6 ca 88 +d9 1a e2 8b 7b 53 6c 90 20 2b c7 72 6d a5 04 2a +85 08 d3 b1 3c fb aa dc ee 12 78 d3 5d 30 3a cf +ee 6e 07 41 90 49 11 a5 f1 88 10 ad d3 e7 b8 f6 + +# PKCS#1 v1.5 Signature Example 5.13 + +# ----------------- + +# Message to be signed: +c4 b4 c9 96 6e 56 f4 0a ff 47 08 13 1c d3 71 44 +21 34 3e de 70 c4 d4 6d b6 ef be 1b 19 a9 e3 c2 +e5 81 06 00 8a 98 38 59 cf 94 2a 31 97 74 69 5a +0c 98 a9 63 e2 fe 9d 93 79 bc + +# Signature: +b1 6b 10 f2 bd 7e a0 f7 6a 9e d2 ff cf 3e c1 0e +dc b8 24 60 fe 55 82 a7 76 4c 0c 50 56 ec fb 09 +72 06 48 d5 f1 9b 3d ea f2 ac c9 86 46 0e 71 14 +26 15 83 a5 f4 a9 90 e9 22 fe b5 b4 78 97 34 fd +cc e1 5d dc 87 ca c3 f6 c7 c9 e9 e2 19 23 15 f0 +84 1f 43 ea 86 de a9 a9 38 05 08 b0 6c 9c a5 e9 +d4 a6 51 d0 12 16 62 7c 46 6b f0 d6 ae 74 4b f3 +0f d7 91 a8 21 03 39 f5 05 7f f8 5c eb 84 f1 96 + +# PKCS#1 v1.5 Signature Example 5.14 + +# ----------------- + +# Message to be signed: +b8 38 a5 d8 88 95 0f 1b 8e 4d 94 7b ba 51 af f9 +bb 60 b8 3d 09 ed 9d 97 96 7a 76 95 5e d1 dd f0 +48 15 20 bc f4 f0 8b eb bf 89 9c c7 c3 ef 0c 04 +d5 00 1b 1e 2e 84 5f af c5 83 30 0c 98 ac a7 a0 +3e 90 a4 34 de 77 fe f7 20 da 36 63 f2 19 98 20 +8a 94 f8 94 76 7d 3e d8 13 96 b7 ef b2 86 e0 ff +7d b6 ea 8f db 4e 72 83 46 00 fe 5f 7f 15 0a 01 +b1 d4 a0 8b 5e c9 ee 1f bc 10 01 d1 2d 52 36 db +f0 72 7e 7e a3 60 78 f3 eb ac 50 46 b7 65 b4 e2 +3c dc ef d1 15 d6 2a 50 34 4d bb d7 42 8d 48 ff +c9 4b 11 e2 1c + +# Signature: +b1 56 81 ee f2 96 a6 6b 9f cd 66 30 f8 9c 55 82 +6a 38 9e 0c 2d 3d 47 6a 0f 8a 1e 08 cb ca cc 66 +02 c7 14 43 8f 32 f3 4e 02 c3 6e 5c 0f 16 8a b0 +28 91 7e 90 50 fb c8 50 f0 cf 65 d5 ee db 3b 54 +be 54 95 bb f0 fa ee b3 2b be 5a 8f 87 bb ac dd +25 85 fb 90 7b 13 18 5b 02 61 56 63 d2 01 1e f2 +3d 0a b0 4d ad 1f fa 67 9b 53 15 2c 9c 42 b8 46 +39 68 4e ae af 64 4e 4f c6 ff 2e c7 d4 7b a5 ac + +# PKCS#1 v1.5 Signature Example 5.15 + +# ----------------- + +# Message to be signed: +9f d5 39 c8 ad 86 49 24 ee c1 d6 55 c0 7d 1f 28 +27 0c db 32 6b 57 2c 46 67 ec a6 48 8c 03 36 57 +ff 29 25 4b 91 f3 21 6e 1c ac 97 97 53 f2 23 b1 +79 ea 5f 9e fc 23 6d 40 1d 1b 9a 3c 20 eb 2a fc +9b fc fd 07 92 ac c5 b0 0c 98 28 a6 45 + +# Signature: +38 bf df d3 27 2e 48 cf ee 68 ce b9 13 04 eb 91 +ee 25 e4 83 40 1f 30 fe 12 d5 e4 35 18 e4 b7 71 +14 a1 2c 8c 79 92 ae e7 d2 e7 74 ff f9 1d 8f d1 +cb 7c 6a 2a df 79 b7 c8 ab 93 e8 37 4d b7 4c 26 +90 9c 65 9a 97 c7 6a 22 2d f4 fc 8c 7e f5 19 90 +80 ea ae 2d 03 1c a7 51 c5 01 32 89 db 4e ad 77 +b2 8b 76 a4 c4 96 ad 0e b4 22 fc a8 8f c6 84 e4 +2a ea 88 fd 33 c2 56 75 1b a0 66 83 4e 77 a1 e2 + +# PKCS#1 v1.5 Signature Example 5.16 + +# ----------------- + +# Message to be signed: +1d e8 07 40 9d 0a 61 b0 32 2d fe d4 99 e8 c3 32 +41 ec 89 cd 7d 9f c5 + +# Signature: +8b 66 64 f8 69 d7 55 c5 d3 e6 df 99 22 e2 27 c1 +10 91 8a 6f bd 88 c1 a2 e1 28 95 23 ad bb d8 aa +43 1d 07 86 85 3a b5 96 dd 5b 00 12 43 b5 4a 2c +b1 0c 31 66 bf 00 23 38 fc a2 03 45 ae de 1b 22 +ea 1f a3 d2 41 c8 6c 76 bf c0 2f 4f ce ae 12 c8 +a9 d7 e4 4a d6 17 16 65 e8 8f 12 85 22 dd 53 5a +9d 65 00 8f 6a 73 2d 40 af 20 4e 22 0f 1f ac d9 +42 e0 9d 15 09 9f dc 51 b3 a1 42 6c b2 dd 32 93 + +# PKCS#1 v1.5 Signature Example 5.17 + +# ----------------- + +# Message to be signed: +4b 2b cb 26 79 a1 4c 3c 4c 06 9e d0 89 a6 5a ba +29 f2 2b 61 78 c0 + +# Signature: +1c 47 82 8e a5 3f b6 43 6e 95 96 b0 ce 47 d9 f3 +8b 5d eb 0b 19 7c 1b c4 74 e2 e8 22 65 70 cc 1b +72 f2 39 31 2a e7 c3 c6 38 2e 1d 8c da 7d 4f 12 +fe ba d7 0a fa e5 ac bf 24 28 ab c0 44 21 bb 4e +1e 59 90 11 1b 9a c8 3c 62 43 5c 21 aa 25 fd 9b +49 07 58 54 11 d2 53 ba 9b 87 78 f6 24 05 3d 46 +fe 95 d7 e2 2c a3 93 81 c7 79 2e ff 46 43 8f bc +16 5e d7 62 9c 2f c1 ce f1 b3 4d 77 76 8a 20 55 + +# PKCS#1 v1.5 Signature Example 5.18 + +# ----------------- + +# Message to be signed: +ef 46 ae 51 e0 15 8c d0 ef 9c 78 d7 1e 00 15 67 +d6 6a e3 c5 e9 a6 4f 24 57 15 c7 c2 ad 8e ea 0f +9d 32 00 23 07 2f db 0f b8 6a 45 21 7f d7 12 cc +80 e5 b9 41 47 c4 5f e0 0b 69 2c cd a1 10 25 98 +41 b2 c7 e5 c3 dc ff 59 56 f2 a5 96 cd a6 8e b7 +7f 4c 85 90 d7 36 b8 fd 60 66 77 3e f6 f9 5a 38 +cd 38 4e 94 83 a8 9d c2 b6 c2 e8 74 5c 95 c1 2f +a6 72 a1 be cf b6 3e ac 9b 55 3e da 8d 29 37 54 +ec 39 47 ea c0 22 8d e2 63 14 b5 9b 66 99 4c c6 +0e 83 60 e7 5d 38 76 29 8f 8f 8a 7d 14 1d a0 64 +e5 ca 02 6a 97 3e 28 f2 54 73 8c ee 66 9c 72 1b +03 4c b5 f8 e2 44 da dd 7c d1 e1 59 d4 51 d4 bf +65 80 f3 e6 9c dc 02 71 38 2e 8d c1 4b c7 33 af +38 99 2c 1c d8 82 c7 b1 50 d2 3a 06 7b 9b cf 3c +cd ab 6b 0f ba 13 2b 4c 14 47 c8 7c 39 3f + +# Signature: +8c 1d e1 5a b8 6c bf 5b d9 31 7c e2 b8 fc 82 f5 +72 2d b6 96 1c 9f 55 51 40 f7 8e bd a2 4e 3f 51 +fd 73 01 c1 e4 fe 12 b6 95 7c 30 14 4f a1 e1 27 +27 46 03 dc 02 05 11 30 b2 53 85 fc 86 46 ee 96 +a7 45 50 d2 d6 3f 85 81 85 bb 98 46 52 a3 43 1d +53 3d a6 01 46 22 a6 4e 06 91 66 2a 4f 7c 9d 58 +31 9b a3 f8 5f 19 18 24 75 e1 50 9b bf 21 3a f0 +10 10 b4 b9 f8 2e 64 75 11 fc 97 c6 b7 c9 7e 8d + +# PKCS#1 v1.5 Signature Example 5.19 + +# ----------------- + +# Message to be signed: +f8 7b b1 2d aa ad 62 c8 64 ac 3d 44 4d 51 4e ec +6e 59 b6 7c d0 82 0d fc bd f8 51 ea 73 89 1f 58 +a8 be 6e 84 3e e8 77 3e 4d c1 c7 d7 42 da 82 ff +16 c1 01 1b 99 56 6b 9f 3f d1 7d 68 d5 ac 99 ce +f5 a3 a0 f7 53 18 76 9d c0 13 bb 05 5b e1 30 56 +df 49 a8 39 b8 39 52 51 39 9b 27 a0 bb 31 c5 54 +ae df 3d 9c 74 82 b6 62 0c 5d 7c 69 14 a5 64 db +04 a0 00 04 56 99 ee 1e 50 88 a5 b6 8d 81 4e fe +9d 13 0d c3 4e 2b d9 78 51 13 9c 73 46 07 65 b1 +f2 65 46 86 fe de 9c 9b 3e 92 40 9d b2 d4 2a 32 +ba 9e 20 bc ae b2 c4 f9 ff 9b 0e 83 4b 74 92 a2 +b1 d8 c6 5c 8b a4 98 34 2a e7 d1 d9 fe 74 05 c2 + +# Signature: +20 7a 34 8c df 68 4a a8 e1 a4 af 7b 7c 25 27 07 +ce 6f 1f 9d b2 29 1f 2a 95 a0 71 5d 9c 7f c5 1a +a2 30 11 0b 5b 51 8a 9c 8f 95 8d d2 0c 75 24 d5 +b6 51 06 d7 42 1b a9 fc fb 78 91 78 41 2c 36 40 +f5 40 b8 1b b3 18 97 d2 64 5e c7 9d 8e 59 75 04 +8e 45 22 61 a1 c2 00 9c fe ee 07 15 a0 1b ee fd +75 e7 04 b2 a6 f0 f0 ae 7e a3 6c 53 cf e3 6f 57 +f0 34 e3 85 44 8f ca ab 08 dc ff 47 7d 36 ff 15 + +# PKCS#1 v1.5 Signature Example 5.20 + +# ----------------- + +# Message to be signed: +4c 4b + +# Signature: +1c b6 88 12 83 dc d1 86 3b a7 9d fb 22 35 1b c9 +a8 e0 35 8b 2f 8a 1d e3 f9 06 5d 8c a8 59 31 4a +e1 12 13 a2 cc 87 b2 f6 32 ef a6 7d 21 03 f3 82 +00 b9 19 3e b8 d4 99 82 09 9a fc 74 42 8f 4b 41 +31 6f 48 78 b3 f6 00 bc 2f b3 04 58 cc 9c 2a 03 +4a 06 8e 98 d5 7a e7 9c e3 e2 fc 84 b6 a7 45 f0 +37 a5 de a2 b9 da 4e 8d b4 ad a6 9f b8 2d 20 a4 +1b b8 43 07 93 ee f9 2a 4f d6 18 6d 17 96 63 cb + +# ============================================= + +# Example 6: A 1024-bit RSA key pair +# ----------------------------------- + + +# Public key +# ---------- + +# Modulus: +d6 31 14 57 e1 ca f1 22 44 36 69 79 83 c8 6d d3 +38 20 58 62 d2 a1 05 ba f7 10 34 28 fd 83 53 a1 +9b 7b a4 22 8f 78 b4 7f 79 07 35 70 34 c5 2d 85 +97 da 2b 5d 13 dc 53 5b 83 6c 74 13 0a 36 48 91 +8d 4a 7a 83 99 0c 2e 28 81 6a ec 0f ca 01 d1 05 +c6 c6 52 ec 57 33 d0 1f 00 58 b2 df 5a e6 73 33 +40 5a 3a 5b 12 20 a2 6a c3 d1 42 f2 b4 d8 37 eb +73 86 a4 0a 74 cc 3d 1e 4f bc 64 fd 7d a6 3c 41 + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +d6 31 14 57 e1 ca f1 22 44 36 69 79 83 c8 6d d3 +38 20 58 62 d2 a1 05 ba f7 10 34 28 fd 83 53 a1 +9b 7b a4 22 8f 78 b4 7f 79 07 35 70 34 c5 2d 85 +97 da 2b 5d 13 dc 53 5b 83 6c 74 13 0a 36 48 91 +8d 4a 7a 83 99 0c 2e 28 81 6a ec 0f ca 01 d1 05 +c6 c6 52 ec 57 33 d0 1f 00 58 b2 df 5a e6 73 33 +40 5a 3a 5b 12 20 a2 6a c3 d1 42 f2 b4 d8 37 eb +73 86 a4 0a 74 cc 3d 1e 4f bc 64 fd 7d a6 3c 41 + +# Public exponent: +01 00 01 + +# Exponent: +5e a6 11 77 44 2f 89 9e ba c5 d0 96 01 c5 ef c2 +06 6b 44 a3 66 b0 00 f8 3d 74 cb 97 d1 6e d6 e5 +f2 ef 0f f8 b5 ad 81 15 53 45 fc 37 39 1a 68 a3 +40 17 08 52 79 14 43 41 8d 31 bf 99 2a 4a 12 86 +6f e9 ff cc de bb bb a6 37 ee 88 7b 71 6c aa 92 +e2 49 ce d6 57 ee d7 1f 5c cd d9 16 3f 32 69 52 +5d 78 9f 4b 33 c4 8a 95 76 44 36 ec 32 5e 86 89 +69 1c 27 2d 90 bd 88 88 98 51 37 2f b8 dc b9 + +# Prime 1: +f3 d4 b8 51 ad 7a c7 78 be cd dd ae 71 b6 13 f6 +59 7c 70 75 c4 d2 8d db ae 1e fa cf 03 59 71 ab +63 ee 90 db bd fb da 43 25 a1 5f bf 84 5e ea 54 +bb cd 05 57 4b 1c d6 01 dc ad ba 12 06 28 05 b9 + +# Prime 2: +e0 e1 ad 57 d6 8f 30 13 28 8c 14 83 e8 c5 b1 2e +fe b6 ec 14 5a e4 18 8e 1b 3b 39 04 87 90 0a d2 +c3 25 d2 32 80 6a 62 17 34 2a 65 75 95 14 f2 26 +8f ca 72 c4 c5 bb a0 32 81 89 dc fa e2 06 ae c9 + +# Prime exponent 1: +3b b6 d2 d5 1d f9 3d b4 b2 75 d4 5e 8e 76 9a f8 +ef fd 6b c5 4b c8 8c f9 49 f1 48 57 3e 68 bf 4f +cc 0f 76 e6 79 e6 9e 13 67 b9 d7 ab 1d 8d e9 31 +8b 34 b0 a4 2a 3f 0b a2 35 1b 4e c0 6f 45 89 f1 + +# Prime exponent 2: +71 f4 aa 5c 8a 93 80 af 14 aa f7 72 68 b0 55 3b +15 44 28 99 9f fd 5a 1c 18 dc 87 e6 2d b3 e6 68 +2b 0f ad 56 7e 10 6a a8 8b 7c b8 71 3f 1c a0 20 +be 58 be 93 cc 07 6a 04 6d f4 28 90 d1 9c c5 51 + +# Coefficient: +23 1a b8 dd 9a 56 99 d7 97 59 11 ef 0e f8 7c 28 +dd b9 2e 24 6e c3 4c 5f ac 33 83 22 dd ec 89 8d +56 68 67 45 3d e6 d7 8a 45 c3 16 b1 45 a2 86 18 +94 0e 1a cd 11 58 c3 af 92 fa ab fd c3 97 84 32 + +# PKCS#1 v1.5 signing of 20 random messages +# ------------------------------------------------------- + +# PKCS#1 v1.5 Signature Example 6.1 + +# ----------------- + +# Message to be signed: +8f 75 0e 65 95 1b 5d e7 58 14 b0 b7 66 30 dc 9f +1c 62 53 a0 59 0e ac b5 51 2a 8a 4e 1a 8b e8 52 +5d 36 94 1f a9 d0 92 f6 bb 44 22 aa 8c 0a d6 42 +3e a2 8c 10 ca a6 e9 54 b7 95 69 d4 4c 86 0f 1c +65 81 eb 17 a7 54 3e 7b f7 fe + +# Signature: +b1 8b 5e c8 8d 4e 24 c9 14 b6 65 ff 9a 2c 75 f4 +e9 19 37 df 8c 19 95 59 43 e4 51 ad df 34 84 e4 +97 97 8d 26 da 23 1a f1 4d 9c 29 27 ed 21 0a fb +f9 de e3 32 67 aa 45 68 46 49 e8 6f b2 25 a0 53 +b5 45 52 90 c3 20 e3 f6 40 62 3c 75 ca 42 37 21 +f2 80 b8 87 44 24 97 f3 2a 90 d7 8f 64 44 04 77 +ad 09 27 c7 ba 01 c4 4d a9 d5 c2 83 a4 38 be 0d +c5 80 a0 05 28 fc 65 e2 04 d4 2a 2d 4e 29 13 c1 + +# PKCS#1 v1.5 Signature Example 6.2 + +# ----------------- + +# Message to be signed: +bd bf 3b 36 40 73 fe 04 8f ba e5 5e 3c de 66 8e +84 f7 53 ab fc 71 0b 8c db 7b 6c 0c f8 2d d5 b6 +74 d2 1e 2b 3e 36 b1 b0 36 0d f8 bf 7e 62 27 c9 +2e 15 f3 d7 84 + +# Signature: +66 ac f0 43 bc 6a ae 81 a4 d5 2b 4e 8c 40 12 8b +25 c6 d1 0a 8c 69 8c 83 ae d7 1e 8f 35 83 89 8b +e8 f4 c9 be a4 b6 31 90 e2 15 26 ca f8 3a b1 4a +4f 8b eb e8 13 a5 ab eb 95 95 67 bb 2f 06 c5 f1 +1e 46 4b 5c df 7b 2a 13 2d 42 6d db ec f5 85 90 +0a 0d 80 92 ca 52 b6 dc 0a bc 35 f1 40 94 69 89 +46 e1 cd 0e cd 6b d4 1e 2c 6f 96 3e e8 9c 82 19 +3e cc 5f d4 76 30 d3 4a d1 6c a2 47 9e af 06 2d + +# PKCS#1 v1.5 Signature Example 6.3 + +# ----------------- + +# Message to be signed: +3c 5c 74 bc 8f ae 80 7a e5 8b d2 13 e6 27 2a a3 +85 79 31 57 5c 2a a2 be 4b ca e4 d7 9a e0 87 b6 +b8 6f 91 5d f8 c0 96 c1 22 ed fb dc 79 7f 9d 70 +b9 76 13 97 fc e3 d3 e0 b8 a6 f2 56 db c6 60 5b +a9 48 d5 fb e6 f5 24 5c 02 95 ce 5d d7 3b f7 43 +65 17 f7 c4 22 2d 2c fd 85 42 e7 a1 00 cf 05 13 +04 a1 ab 6f e0 05 da 07 7b 62 87 8f d0 b7 41 e6 +27 1e 0d 34 6b 20 72 3b 7e 00 b3 b8 19 4e 1a 46 +0c 6b f2 56 00 76 82 90 c1 dc aa 2f 41 b9 41 a6 +4f d9 02 14 d5 16 6d 78 aa bb af 7e 41 d2 4f f6 +36 c9 76 2f d8 92 19 9d 2c fd 9d ed a5 00 51 e0 +01 b9 fd 3e 5e 22 27 ae cb 15 c1 b3 13 71 b3 5a +78 b3 b8 b7 63 63 76 f1 34 56 2b 4e 52 f4 51 b7 +41 a1 9a c9 32 56 9f f3 04 1f af 12 27 9f 90 + +# Signature: +5e 89 7f 87 9b a4 6f 67 11 2c d7 c7 c6 fb 27 37 +ad 79 3a 87 28 79 05 2a 88 45 7a f5 e9 d5 99 59 +a8 48 13 4a 68 24 de 3a 67 4f 72 a9 06 87 9e 95 +be 0e d8 7e a9 f9 74 a7 a0 7b a9 ad be c2 fb fa +02 94 37 8b 14 e7 35 f5 5f 40 3c a0 53 08 4f 51 +d3 d3 42 d8 af 9c 64 b4 d1 54 ad 9a a3 c6 bc aa +ce 1f 1b be 62 ee b5 d0 e6 c4 c0 30 93 c2 af 0f +07 88 8b 8b be fa 79 40 03 23 13 3f 77 6a 32 13 + +# PKCS#1 v1.5 Signature Example 6.4 + +# ----------------- + +# Message to be signed: +42 56 46 65 0d 6b 37 9e 16 e1 5b f3 85 3d dc 9d +44 4f 44 53 5c 49 3a 37 03 b0 01 63 af 34 76 df +37 2a 5b 28 f3 34 c0 86 03 13 e8 13 6d e6 08 29 +1b 33 78 38 1b 9e 21 eb ef 24 82 5d 12 + +# Signature: +a6 a0 cb 02 48 1a f2 48 ab ae 89 cd f4 16 1f 67 +76 d4 71 08 f1 8e c6 e8 43 7c 22 4a 14 f4 52 ad +a1 36 52 0f 0f e0 10 a7 34 5a f1 97 1a 02 e4 bc +f8 c9 8b 26 c5 b8 c6 00 3d e4 d2 b4 07 2d 8d ef +1e 19 23 d9 cc e0 a6 75 14 1d 37 87 3e 59 48 ea +6c 8a 78 0e d2 a5 ec c2 ba 9a 81 20 6c 7e cc c8 +0e ac 02 6d b7 d7 60 22 3a a2 38 7a 18 2e 98 d6 +6f 1e 23 df ea f3 51 5c ee 4f a1 ab d4 64 b7 68 + +# PKCS#1 v1.5 Signature Example 6.5 + +# ----------------- + +# Message to be signed: +f4 7d 87 bf d4 88 af 5b 24 db 34 ad 0c 13 1e fc +a1 0c dd 1a ae ff be 6e 36 48 47 22 ed 68 09 b1 +d5 7a 18 3b a0 3d 5e 40 5d 12 56 b2 50 5e cb 84 +db 35 df a9 4d e8 5d c2 a1 58 8b 6e 83 12 4c f8 +6c 5e 91 66 86 0d 4d d4 71 70 43 2b 08 ae 6a 6e +30 87 10 86 fa + +# Signature: +6c 00 8f f0 e1 28 fc ec 26 5f 37 9e b0 83 db 50 +62 4a 27 98 f9 33 67 c6 d1 6e 5d 95 a9 89 f4 f1 +ee d0 cc 4c d8 61 c6 a5 24 f2 b9 fa 30 e8 86 f1 +47 77 41 d7 ea 8a 60 df 14 0a ec f3 a6 cc f0 04 +3d ab 92 cb e7 29 53 cb 1c 18 41 e0 59 18 ec ed +5b 0f 69 4a f9 a9 8e c7 f4 e2 28 6d 23 3d fd 35 +13 2a 0b 58 4b f0 e0 dc bf 05 11 9c e2 e3 a4 d8 +13 cf 02 8f ec 48 c3 4a 18 81 eb b5 31 ca 48 9b + +# PKCS#1 v1.5 Signature Example 6.6 + +# ----------------- + +# Message to be signed: +03 18 78 d5 88 ee + +# Signature: +cc 15 4e 1a f7 13 f2 f9 5e 16 f4 11 17 5d 98 36 +ad 6d 8b bd c8 f9 8c f0 5c fa 00 58 23 5d 1f dd +e0 40 82 76 4c 29 dc dc c5 9e be 26 57 8b f9 e8 +ad 6a 5a a8 6b 9d 62 91 4b 4c f6 96 a8 ec 2d a8 +79 f8 fa 42 31 46 31 32 ea d7 bb 3b e7 50 ae 0c +56 28 a3 96 b7 0a df a2 7b 40 34 23 b1 00 18 f9 +d2 4f ea 33 70 30 14 7f bf aa 15 d4 75 32 c9 25 +7c 2c 7f 54 1b 5b 97 4d 15 dd 1e 3f d2 e2 0a 69 + +# PKCS#1 v1.5 Signature Example 6.7 + +# ----------------- + +# Message to be signed: +27 26 38 52 ea a9 60 bf 76 71 87 6f c7 90 0f 89 +8e a8 2e b2 b0 fc 41 85 65 fd ae 62 f7 d9 ec 4c +e2 21 7b 97 99 0d d2 72 db 15 7f 99 f6 3c 0d cb +b9 fb ac db d4 c4 da db 6d f6 77 56 35 8c a4 40 +11 5d 3e 5b 3d eb 1b a1 bd 90 ca 12 86 fd 10 0c +af 9b e4 85 a4 4a 38 45 00 57 18 10 4b bd fc 5e +78 1a 9e 37 d6 7a ff e5 56 dc a1 0f 8e fa 39 f9 +cb 63 92 a7 2e 3f 28 25 81 1a 2c 05 af 84 af 9b +e7 f3 71 db d4 10 6d 9f + +# Signature: +94 79 8d 17 94 78 bf e0 6d 96 a3 4a c9 9b c9 d5 +de 35 dc 46 97 ac 3f 70 e9 b3 4c 95 e2 2b 1c 30 +d1 42 6b e3 50 8e 62 2c 1a 18 ab 3c 46 72 fe 3d +e3 40 eb 51 0f b9 87 b5 3a e9 3a 59 af 6b 00 bb +ae e0 e8 27 08 e6 c6 ae 82 c8 45 53 24 01 78 36 +db 17 66 0d 06 9d 80 27 1e 1e a9 98 11 63 b1 4b +66 87 6d fd 12 8f 09 cd 2e 3d 6a 36 b7 3c 3b 40 +ad 8e 13 24 84 90 29 c8 b8 e3 c8 89 4e bf a1 94 + +# PKCS#1 v1.5 Signature Example 6.8 + +# ----------------- + +# Message to be signed: +a4 fb 21 03 d0 be 29 0e 99 60 16 a4 39 46 2e 6b +bd b0 72 4d 86 cd 51 85 91 33 ca 3d 39 da b7 7d +a2 06 9d 82 83 58 96 38 7c cf 3d f5 cd d7 a5 79 +3f 22 3f 3d 92 3e a4 63 51 35 31 ad a6 67 ab fe +f7 53 98 c7 a4 bc 6e fa dd 4e de ef 35 ab 8f 54 +01 e0 da f7 c2 fc a1 cd bb ee d3 bc dd 09 33 ff +3e e4 c5 e2 88 ab df 21 9e 36 a3 ee 6f 21 08 41 +a0 3c 9e 3e 4d ac 18 12 24 82 ef 85 f4 9f da cd +c5 02 d2 79 f1 57 7b e7 7a 4e 00 b7 c7 f1 7b a5 +da 6b 28 c0 1a 07 a8 63 df b2 1c 15 6d a3 20 01 +f5 3d 7e a3 fc b8 c9 55 4f 07 54 59 a6 7c c3 c4 +e6 9a 6a 37 17 87 87 46 3c eb ca ed a6 49 0a 8f +80 b3 92 de f9 f2 2a 4f + +# Signature: +72 66 70 c9 51 0b 58 35 4c 8a f3 2b 41 db 8f 69 +21 07 c0 c8 76 e5 52 73 a8 20 a0 c3 0d 39 24 46 +0f a5 bc 33 df e1 9d 72 e5 63 49 28 2a 80 fb 12 +a8 fa 9e a4 a5 da 69 c5 82 d7 c6 41 22 a8 a7 91 +b3 21 2c 39 e0 28 26 5b 84 54 df 71 5b a3 0b 00 +3d 12 91 69 cf 12 51 1c 0d 3e 7a ae ce f3 79 2c +f1 85 64 4c f8 0e 44 81 47 b1 a7 96 1a f3 84 41 +7d 18 2c 6f 85 52 46 da d5 b8 93 d9 a7 68 0e bc + +# PKCS#1 v1.5 Signature Example 6.9 + +# ----------------- + +# Message to be signed: +e5 50 6e 04 b1 91 84 10 76 85 87 25 a9 fd d8 f9 +74 5f 24 2e 99 49 4a 42 3f 80 36 74 74 27 1d ce +95 a9 9a 2f 71 13 4f 39 fb 3f 2e 47 c6 a0 b2 fb +6f 61 5b 0d ee 6d f3 3b 28 f8 b0 d4 1e 92 d1 42 +b1 46 e8 cd e9 b1 1d 6e c1 d3 7d 71 fd 82 b7 19 +ce 1a dd b8 21 ca 4c af bd 2a a4 f1 e6 11 a2 59 +e5 f0 5b 53 1f a1 1e 3b 67 1b 7a 5b 10 b4 c8 15 +6c 25 b0 a5 9e c6 e1 58 f6 d3 46 d8 48 04 fc f9 +2a 72 76 8f 4e bc 93 5e ee 5c fe c7 f6 e6 e8 3c +be 15 8a 13 27 5e 84 18 3a 94 d7 24 b0 e9 66 96 + +# Signature: +34 22 0e da fd 4a c8 84 b9 d0 0f bb fb 71 a4 a6 +c4 d4 b7 1c 19 84 22 05 07 99 d0 c0 fd 54 e9 09 +a4 ca d2 29 8f aa b3 34 7a 0a f0 d2 7d 53 01 a8 +86 00 9c f5 c6 f1 25 df c1 13 1a ce 38 8b b2 14 +c2 84 44 20 c0 23 db c8 b4 a9 66 11 b3 b3 93 ac +c3 83 94 90 fc 4e e2 d3 69 b8 c3 c8 76 57 22 83 +ef 34 d7 0c 64 03 ef 9e 2e 87 a2 76 b2 35 72 ed +82 e2 40 22 67 c2 73 7f 75 bb 4a 27 d3 cf 16 d2 + +# PKCS#1 v1.5 Signature Example 6.10 + +# ----------------- + +# Message to be signed: +8f c9 cf a7 21 df a0 9b a0 72 9e f9 18 9e 54 27 +b3 e7 38 c5 ae 38 a2 65 7f 7c 7e 31 4a 49 ca eb +a0 fc 9d 45 40 f5 f8 d6 c0 47 53 60 0e f6 b9 c3 +39 65 40 f8 6c 11 75 b6 0b f4 0e 3d 8c 84 51 35 +5e 13 74 f4 30 43 c0 c6 aa 41 d3 79 6b d8 27 9b +3c 30 62 b3 74 99 6b 7e ae dd 4d b0 ae e8 c9 4b +93 b1 71 fc 41 1d 4d fc 37 28 d0 23 15 58 cf c8 +fa 45 f9 51 b3 5c 9d 46 12 18 a6 50 c7 02 ce a9 +3b b3 fa 14 36 ed 44 5c 95 24 9d c2 20 54 71 01 +b9 a9 3e b0 14 cd 84 3f f3 9c e4 c9 6f 82 a3 9f +86 3a 4c 2e 1f a9 + +# Signature: +a2 6e 7d bd 5d fe 08 c7 2b d8 0d 5e 26 68 d5 d7 +2a bb 1a 0c 04 20 ff 0e a8 6a 9c 76 08 c4 70 e1 +c3 f7 2e bf 44 5d 12 18 71 81 41 55 58 dd 03 eb +e4 07 aa 06 b5 16 47 ba fe 0c 85 f3 d3 b8 dc e9 +0c eb f0 a0 ee cb ac 12 28 e7 85 82 0c 4f 90 9d +2e f3 92 f0 31 17 56 1e c3 8e b0 d8 8b 02 32 72 +a4 28 63 51 62 0f 21 04 3c ca f7 50 36 84 00 29 +57 ef 79 bc ff 9d 1c 20 1c 42 e0 96 0b d9 69 79 + +# PKCS#1 v1.5 Signature Example 6.11 + +# ----------------- + +# Message to be signed: +96 1f e3 4a 21 2c b0 e6 f6 dc de cf 1a 4c b7 b2 +14 39 0a 77 f4 4d 3a 3b 3e e2 b1 2f 1f 0e e3 14 +2e 9e af 70 89 55 ec 83 7e a1 d0 d2 95 4e 6c e9 +50 f3 4c 87 30 54 8f 2e 09 5d 5d bb 93 8b 19 0b +73 8b ff 81 71 93 02 b6 79 8b 76 8b 0b bd d2 e2 +b9 67 2d 89 14 05 c7 71 a7 79 02 fd 54 27 42 5a +f0 4e 21 b9 1c 5f 39 37 20 41 e4 94 d9 be 62 de +ce 31 bd 8a 26 2f 6d db 84 9f 06 8a a9 9f 7d 62 +62 e1 84 ab 9c b1 62 24 47 d6 2f f6 71 09 20 30 +70 71 c2 72 be 0b b3 7f 0e ef 64 5f 99 ea b5 1b +0b cb bb 64 87 d8 d2 b4 9f 3f 23 e0 aa 91 8c 89 +ac 85 56 53 e1 cc c0 05 91 58 0e 0c e1 e3 87 79 +c0 4b e7 df 1c 66 63 ac d9 93 7e 47 2b 3e b6 d4 +b7 0a 08 0d e8 e0 35 48 f5 12 45 be 7c e0 b8 6d +ee c1 76 e0 0e 54 bd 63 bd 5b b0 2f c9 54 + +# Signature: +98 ac 47 73 59 15 9e 93 e1 b3 36 ee 05 60 6d 42 +b7 e1 25 0d 12 95 60 c0 d0 95 f8 f8 ea 3c 04 74 +32 a9 9c 1e c4 bc 88 7d 7f 07 f6 1d f1 6f 0c 09 +f7 15 b7 05 38 8b b8 a6 11 87 34 6e 8d 7b 07 ea +b2 fc 05 db 89 e0 30 09 44 ae 37 73 e4 4c b9 2c +5c f0 f4 fb e0 1a 05 ad 79 bf aa 24 7f 83 ed 1e +da 48 ba af d1 e1 80 07 8c a8 d3 21 d5 0b 42 57 +87 f0 12 43 a4 93 37 4e 84 f5 cd 56 b7 53 d7 ac + +# PKCS#1 v1.5 Signature Example 6.12 + +# ----------------- + +# Message to be signed: +96 ff 0a 5e ca c9 51 16 bd 73 43 79 5a f8 3c 87 +ed 9f 83 45 d0 3f 6f 32 2f 29 54 93 f4 0b 19 ba +8f fe 2c 89 8c 7b 20 66 21 f7 2e 02 c7 f0 f0 0f +9f 1c 52 3d 73 d3 35 a2 6c ed dc 73 98 b7 ca 20 +09 ca cb b1 82 83 b7 6b 28 15 d1 e9 01 00 09 6e +95 b8 85 30 f1 c4 8c 39 61 c4 35 bc e0 28 9f f6 +2e 21 bf 4d 3e c8 99 c8 7e 14 c8 ea d7 92 2e 79 +5e 3e 6f 41 80 c0 89 9e a0 + +# Signature: +7c 7b 01 57 f6 a5 09 09 51 09 63 28 2f 00 11 1e +ea 70 19 37 54 e4 27 a0 2b 34 6f eb 68 2f 4c 71 +87 bb 38 1d 31 d2 3b 94 76 88 43 24 5a ad 53 61 +fc a4 2d 8b 28 4c 8d 92 e6 fb 99 2f a7 71 2f a5 +a9 31 55 df 02 0d 30 0a 3b f8 98 86 66 8c f3 7b +d1 3b 55 0a db 2d 2a 86 c6 9d aa ac dc 50 30 dc +84 34 3c 8b 49 34 f0 3c dc 0e ef 0f 6c 1e a7 ec +09 62 00 79 03 b4 48 21 7d e9 3b 75 07 54 9b 2e + +# PKCS#1 v1.5 Signature Example 6.13 + +# ----------------- + +# Message to be signed: +32 a1 2e 0c 67 0e d2 15 ae 54 49 a0 91 7a e9 5e +23 db 80 3a d2 8a 18 42 ed fa 90 bc 40 5d d8 9a +1b 46 8a ce bd 08 fe 9c 69 3d 8f b1 05 e8 22 2e +b5 7f 79 e4 b2 27 00 e0 7f 27 6d 4a ec c7 a1 5f +b7 47 33 06 56 27 b8 79 b0 16 ee d4 ab 4a 1c + +# Signature: +85 b9 0e b8 26 51 4a 0e c0 fc 1b dc 34 86 a8 dc +8b 0f 26 3e fe 57 cf 17 50 a4 2a 6b 5b 99 72 64 +fa 61 78 64 83 7e 63 9f 45 d9 20 58 41 cd c1 34 +ab ea cf 6e e0 ec da 09 b9 8d 76 9f 51 f3 94 7a +33 58 7f f0 c8 dd 01 b7 f6 b2 4a 2f bf 29 c9 ff +f7 37 ee e5 6a da 2c eb 74 6b 02 5d 95 65 22 d9 +20 d1 2d dd 13 db a0 8b 20 e1 ee e1 3a 8b 25 80 +e5 92 c3 4e 39 33 37 66 11 5a 23 b9 d0 0e 2a 42 + +# PKCS#1 v1.5 Signature Example 6.14 + +# ----------------- + +# Message to be signed: +bb da 73 cb e2 bf f7 ff 53 62 eb e9 32 c0 a0 dd +68 ac 84 ee 99 8f bf 59 a2 a9 26 55 20 32 31 63 +b3 0d 9e 70 08 b9 4b 0c 0e bc 5f 6c 4c 97 3c 13 +ff 15 3d 31 69 0c 3c 95 ab 23 1f 0c 9e c9 98 fb +fc ad c2 8b 2d 7f 06 50 7e 17 d2 1e 82 da + +# Signature: +26 f9 52 b6 57 fd b9 a1 1d c8 43 79 0c 9d 2a 6a +51 c9 76 10 1e fb 82 d0 53 60 67 62 ab a3 3a f6 +28 0b de 38 15 e0 87 4d 60 78 75 38 42 e5 b1 c9 +0c f7 99 12 20 fc fa 62 28 49 43 69 0c 30 1e 9f +c6 e4 79 af 68 b9 69 47 85 be 40 d4 69 86 a6 2a +12 1a a9 ad 0d e9 69 52 1f 1c b8 e7 c4 bd 70 c7 +c8 cd 7a 9d 13 54 e7 d0 aa 0d 85 d6 d7 aa 00 e4 +64 90 26 d6 f0 70 f8 b3 c2 7c 98 55 6b ea a4 c0 + +# PKCS#1 v1.5 Signature Example 6.15 + +# ----------------- + +# Message to be signed: +2c 32 5d da f6 52 6a 1e a3 51 8e e5 e5 40 7f 03 +90 e0 eb aa a5 f4 72 a1 e9 ab 46 f7 46 d7 1b a2 +e2 17 fa a8 17 99 bf 35 8f 95 e9 83 08 27 0b 18 +a0 01 99 29 a2 88 d0 c9 56 e0 bf 17 c5 19 8c eb +2c d9 fe 40 d7 02 a4 4e 56 45 ec a5 b4 39 ab ca +7b 2c 6f 95 ac c3 c2 c3 65 19 5c 79 5e 91 d6 3b +3c 09 33 24 4f f1 25 63 af 66 22 a4 0c 74 15 db +60 a7 8d ca 02 60 25 14 39 53 8d 38 aa 38 28 9d +92 88 86 ab 12 87 36 a6 a8 73 9c 14 55 c4 84 9f +2d 54 56 45 37 93 + +# Signature: +6d 1f 20 3d c3 ff a7 a3 34 d3 1b 9a 75 e0 12 58 +1b 8d 62 b2 bf 73 80 0b e5 1d 02 65 33 99 83 18 +c0 ca c9 2a 02 d4 6d 75 9b f8 0a 41 da a0 a6 a2 +9f 4f a0 bb 60 66 4c ac ad e2 4a 65 cb 47 65 11 +09 be ec 82 31 91 95 25 d1 47 32 68 74 55 78 db +9e 30 64 10 8a e4 6a 48 70 f1 80 66 78 9b 03 66 +a7 d0 ce 37 e0 30 b5 89 46 ec 8c 1a 14 11 54 db +0e 26 1b ef 8b af 2e 9f 65 fc d1 6b 7d 57 97 b6 + +# PKCS#1 v1.5 Signature Example 6.16 + +# ----------------- + +# Message to be signed: +29 85 e8 b5 50 81 2f b6 6c 18 f8 0e 6f 09 2a 94 +5d 09 15 83 86 1b 62 5d 1e + +# Signature: +2e 84 30 13 cd 5e 79 5e 21 66 c8 e9 1b 06 c3 13 +1d c3 a5 e1 21 36 d7 16 0f fd 11 bb ef cf 6a b6 +40 e0 5d 76 e0 c6 1e d3 06 f6 08 6b bb 56 7c a8 +7e 40 c6 92 4d 5c 84 a6 ce 28 a8 39 50 bd 4b 84 +e2 7f c5 06 9f d0 62 4d 50 ea c2 4a 94 11 b5 f7 +67 85 d9 db 5d a3 0f 42 56 95 b0 19 b8 4c db b8 +25 bd 46 e7 35 2e 08 f1 14 c8 7b 06 6f e4 3d 10 +56 a2 c6 10 ce a7 e3 d3 dc 98 bf 44 97 eb 4f 13 + +# PKCS#1 v1.5 Signature Example 6.17 + +# ----------------- + +# Message to be signed: +77 78 8e 83 8b 83 4e 8f 4d 04 5a a8 94 b9 0a bb +85 94 0c fc 58 d7 72 5e 7f 37 3d a5 54 71 37 c6 +0b ea 75 1e 01 42 bf 9a 6f 46 49 ae b5 46 ed 56 +0c c4 ea 15 62 d4 a5 fa 3e b1 b1 14 77 a3 05 1e +24 c6 06 b8 a7 1c 1a 77 4b dc f1 a5 31 0f ed 55 +59 23 73 0f a8 af 4c 15 80 0d 36 2b 37 ad f1 4f +7a fc e7 8e fa 6b d8 93 56 3e fe 0b 3b 82 8e bd +49 9f 12 a2 fe 33 2b fe 46 dc bb 31 4b bd bf 69 +08 7e 2a 66 5d f1 10 83 5d e5 5d 61 e5 c2 02 5f +d8 db + +# Signature: +8e 5f 33 53 c4 9c bb b2 ea 69 6a bb 57 40 ba e0 +15 ef fd 95 0d 56 07 13 76 05 a1 00 c4 a5 3f 1b +95 17 6c af 34 9f 4f d5 88 ae dd dc f5 06 0c cb +72 47 8c fb 09 85 62 f3 4d 8f 8e ba 44 6a 38 47 +56 5a 7b 89 55 ad 9e 0c 6e b6 70 99 e1 a4 6c 3e +b2 d4 9d 90 90 ae 5f 63 e8 a0 8b 6e 8f 21 f0 03 +e4 51 d2 50 ff c5 a7 90 d6 6a 0e 2e 3e 28 a6 33 +9f e9 1d 11 29 21 f5 5d 12 30 30 6f ad 5c 01 90 + +# PKCS#1 v1.5 Signature Example 6.18 + +# ----------------- + +# Message to be signed: +1d 59 9d 76 2c d5 4d f7 0f 1a 09 83 bc 3e a2 bb +ca 6f cb bd 16 26 03 ba 81 56 10 77 fd 92 84 92 +5c f1 f1 b0 8b ea 1e 70 bc 59 5d f0 b3 43 b8 3b +9c f3 d6 34 f9 5e 37 e8 d1 c5 85 fa b1 99 + +# Signature: +71 74 97 a4 e6 0d bf fa 19 6e ff 75 8e 90 1c e1 +fe 6e 2b c7 e1 d5 3a 3d cf 62 25 67 1a f1 46 c5 +de e2 00 a8 14 f4 89 8d 16 a9 b5 f5 08 dc 9f de +4d 64 07 0e 55 ae 3b 1f df 79 19 f4 2b 7c ff b7 +e9 28 c4 ca eb 55 2d c6 fd 08 18 34 b2 dc 2f ed +07 e7 e6 27 d3 4b 39 10 ca 71 3b f4 15 4e ff 99 +96 57 36 15 18 fc e5 a8 f6 42 dc 9a 18 a6 6e de +22 19 0f 60 aa f9 58 d6 24 6b 00 a0 32 c3 98 41 + +# PKCS#1 v1.5 Signature Example 6.19 + +# ----------------- + +# Message to be signed: +da 51 00 86 60 b6 3b 87 67 e6 5f 12 c6 30 8e c1 +8e d9 57 5a 42 6b c5 fb e6 60 10 ec 3f 01 17 5f +fa 57 41 ea cc dd b0 2f ce 7b 2e f7 78 44 40 d7 +2d 37 52 20 3f 53 4e 52 fc f6 26 a8 c5 96 51 3f +41 90 64 bb ba fd e7 f8 d6 5f 30 d7 ca 68 71 89 +70 de 71 fc 8c 0e ed 4d a0 0a 4e 1a b5 41 02 d9 +d1 65 bd 7c 54 af 5c 31 c1 5c 05 bc a5 5b 6f dd +19 10 86 a5 3e 52 96 f4 84 c3 47 d8 fb 94 5a 10 +c4 94 49 75 27 32 f6 2f 34 c3 25 15 58 86 51 13 +79 19 28 5a 2c 8e f7 b4 aa 0e 69 0b 0b 65 43 7f +f8 d5 6f c9 5d cb c3 e7 8d + +# Signature: +32 67 72 28 ff 08 c6 6f d0 3b b3 1f 0d fe 89 01 +53 b3 44 6b 57 eb 84 ef 39 56 20 8f 72 a0 7c 87 +67 e6 bf 09 f0 38 bc f7 f7 35 ee 24 a1 f6 40 a1 +89 8d 40 9e b5 3a bd b6 93 94 27 34 56 9a f7 1a +4c d9 9a 65 20 ba ca 5d 42 86 b1 99 cc 67 62 8e +2f ca d2 96 a3 0e ca 49 9e b8 80 50 7f 6a 37 44 +0b 61 c1 28 4c 40 3c 41 32 1b 99 05 3f 5d 69 72 +8d 5b 97 35 76 cf 04 74 83 33 d8 08 d5 e6 8a 8f + +# PKCS#1 v1.5 Signature Example 6.20 + +# ----------------- + +# Message to be signed: +8c d2 da d2 a5 d5 f9 fa a0 7e 24 a9 6e 86 f9 b0 +ac 8b 40 22 2a c9 fb 8a 8a 15 72 7c f2 f5 3e 68 +4a f4 ab dc 98 68 a7 25 3b 25 b0 96 bd 70 1f 46 +a9 43 + +# Signature: +8f 03 22 eb 2c 54 05 24 85 a6 45 49 ad ff 2a 36 +31 db 65 76 fc 0c af b5 51 69 7d c5 35 6f 02 e0 +93 cb 69 17 3a 7e 83 55 a0 da de bf a5 3c b2 90 +7f 00 2d b3 a3 e3 87 da 05 7b 7c 73 55 16 43 84 +3e f5 74 48 1f 80 74 15 17 7e 4b 34 c2 5b d5 5f +4c 02 fa 0a de a3 a9 58 04 65 f3 58 c0 05 96 b5 +cc 06 2d 58 92 30 3e 1a cc 11 3c 3b 4b c7 4d 42 +e8 58 02 90 78 48 2a 1b 23 4a 62 5b 04 28 44 06 + +# ============================================= + +# Example 7: A 1025-bit RSA key pair +# ----------------------------------- + + +# Public key +# ---------- + +# Modulus: +01 69 34 cd ff 48 50 b6 00 2c c0 f0 f4 01 0a 32 +c6 55 e5 cf 6e 7c 89 93 7f d7 55 ef 6a be 37 9d +ad de 70 cc 21 77 51 f1 4c ba 6d 90 fe 52 dc 0a +f5 8b 25 2f 26 bf 72 da 57 9f da f5 7d dd 6c d6 +02 18 79 94 9a 02 76 b4 43 3f f0 1e fc cc f3 5a +11 e7 c7 7b 38 c1 8c ca 94 ae 01 2d 0f 37 04 21 +49 1c 52 ad 15 ac 76 b1 2e cd 21 8f 52 e7 57 86 +6e 08 9d d8 ad bb 48 e9 ba 89 43 36 c5 75 c4 06 +55 + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +01 69 34 cd ff 48 50 b6 00 2c c0 f0 f4 01 0a 32 +c6 55 e5 cf 6e 7c 89 93 7f d7 55 ef 6a be 37 9d +ad de 70 cc 21 77 51 f1 4c ba 6d 90 fe 52 dc 0a +f5 8b 25 2f 26 bf 72 da 57 9f da f5 7d dd 6c d6 +02 18 79 94 9a 02 76 b4 43 3f f0 1e fc cc f3 5a +11 e7 c7 7b 38 c1 8c ca 94 ae 01 2d 0f 37 04 21 +49 1c 52 ad 15 ac 76 b1 2e cd 21 8f 52 e7 57 86 +6e 08 9d d8 ad bb 48 e9 ba 89 43 36 c5 75 c4 06 +55 + +# Public exponent: +01 00 01 + +# Exponent: +0d 17 19 e5 bd 47 6d 87 c7 ec c3 1e b8 ab 42 5d +4f e4 c8 f5 c7 ae 23 0a 10 47 55 3f fb 53 9f d3 +85 5a f5 a4 3b 2d dd 4e 95 a2 b3 0d 40 7a a8 81 +59 bb ad 2a 87 3d 80 93 b4 8a 4b ce 20 ad 99 26 +25 3e d3 39 ac 3b 54 3f c7 42 96 95 33 8d b0 bc +1d c3 68 6c fd 13 9b b5 b2 87 36 bc 16 60 a9 53 +48 fc 91 c3 25 d0 3a 7f b2 16 d2 d9 cd 93 64 de +4e e7 d2 11 9c 3b 0f bb a8 a7 1f 0d 3f 5a b9 b9 + +# Prime 1: +01 58 c0 24 6c d1 69 fc 59 3b 25 8b bf 45 23 ab +2b 55 c4 60 73 3a 7f b4 69 10 90 77 b3 0e 4d 35 +f2 1a 35 b1 f4 1e 42 04 e8 1d 2e 4c 46 3c 24 11 +39 34 09 8b 45 2d ab 4b e1 59 97 20 ef 68 72 83 +3d + +# Prime 2: +01 0c 38 2d ea 5e 7d 79 29 8c 64 1f b2 e4 fa 09 +f2 4f 6a 7a 45 9a 88 2c 87 a8 03 49 5f 05 6e cc +3b 43 c5 37 73 1f 85 ef c8 fb 53 87 ad 67 31 a6 +43 53 32 15 de cc 38 7d 96 76 12 2c 17 0e 91 e0 +f9 + +# Prime exponent 1: +d5 78 dc d5 38 f2 fc dc 30 00 b6 c0 f0 49 fe e2 +ad 90 14 fd 24 fb 10 b6 82 18 42 d6 70 03 a5 64 +cd 8f f4 2a 2a 56 4c fd 81 9c 3a 84 bf 16 c2 47 +7e 8e 6e 5b 9e c4 d4 0e ad 50 24 87 ba 50 36 2d + +# Prime exponent 2: +88 88 dc 8e ae 94 ee a5 80 ca c2 fc 1c e5 4f 44 +e2 ba 50 0d b8 71 53 41 a6 fc 2d 50 4a 82 b1 42 +05 e8 91 a6 6f c8 8d 5c 60 db 8f 78 6c cc 70 57 +5b 35 66 be a8 74 a5 31 7f 5f 16 c4 91 ed 1e 79 + +# Coefficient: +17 b0 d6 23 36 19 1e 63 bc a1 59 93 4d 06 16 cb +89 97 40 9c bf ca 37 05 69 5b 14 fb 64 a0 81 c1 +c9 f5 86 19 3e 52 3a bd 0b eb 8d 72 0c fe 53 7d +fa 1e de c4 a6 64 37 d2 41 19 6b 7a 2c e5 56 c4 + +# PKCS#1 v1.5 signing of 20 random messages +# ------------------------------------------------------- + +# PKCS#1 v1.5 Signature Example 7.1 + +# ----------------- + +# Message to be signed: +35 39 99 7a e7 09 fe 32 c1 03 6a 13 27 57 f2 a1 +66 7a 91 cc 83 be 73 3a ad a1 bd d2 17 92 4c 9a +2c 9f ed 1f ec f6 1d 1c f7 9d ae 9a 83 f8 ae 3f +4d 05 1b 34 fb b5 59 cb fd a4 92 f1 d8 3b 8b eb +a0 45 d4 ae 1c 8f ea 15 b7 57 7a 1b 8a 3f 55 ba +c1 72 7e dc a7 f8 f5 2c b4 ba 61 ca f1 fa 8f 8f +d9 aa c7 79 09 5c a8 4c 79 91 52 9f b8 06 99 d0 +d4 68 8d fd b1 42 ed 61 a9 5b 89 ce 33 06 bf 97 +80 e1 b9 1b 84 8c 8d 20 03 97 0e 52 70 2a 1f 61 +2e 2f 40 17 cf e0 a9 1d b9 e4 6d b9 dc + +# Signature: +00 08 0f 77 0a 2d 1f 6a bf 5f 22 1f 62 e1 66 ab +d7 9d 06 c7 b9 a8 78 d6 1b 80 fc 4d 5b a2 90 b2 +3a ba ab 51 8f 09 44 7e 45 ae e6 f3 bd 06 10 24 +44 36 a4 73 01 60 e6 a6 72 11 0c 01 ae b5 62 4b +71 8d c7 c0 86 1e 58 6b a8 b6 0a 29 d6 a5 75 5c +d2 cc 50 85 99 c6 e2 8d 73 55 b2 7e 40 b7 40 c6 +fb bb b1 a9 18 23 b1 c1 24 2b a6 93 d4 52 69 51 +47 db b2 3e a8 9c bf 11 eb 8b 07 ec 3a 02 7b 0f +17 + +# PKCS#1 v1.5 Signature Example 7.2 + +# ----------------- + +# Message to be signed: +31 80 08 87 3c 4c fe a7 12 5e a6 fd 52 15 df d9 +8d 5c 5e 73 32 3f 03 f2 15 c6 9c 8f 2b b1 98 3b +59 df a6 e9 9a dd 30 69 66 f3 11 0c 16 1c a2 26 +24 b8 80 70 26 5b 8f 3f 9d 5d f7 29 91 e7 9e 5b +18 9a a3 d9 cd 9b 20 47 cf a6 1d 01 23 4b 23 3d +36 ac 4b 96 ed 08 16 48 87 74 90 fa 4a 80 ec 4c +bb d9 d2 e0 06 2c 39 e1 85 3a 0c 38 34 4b a8 58 +bd 1d 99 5f 6c aa 28 bf 90 40 26 26 8a 99 72 11 +43 c8 6a 43 43 ba f8 9b 6d 55 07 64 25 1f b0 7d +16 7b 4c 4b 1b 70 f9 9e f5 fe 50 e6 2e 54 13 fc +ce 0f 99 59 c2 a3 78 c4 1d 6f 42 36 17 8b 14 b8 +91 9d b1 d0 + +# Signature: +00 6d 54 7d a4 ed cb 10 33 15 cb 8e 4b 66 9b ee +96 aa 21 56 23 5c a5 c3 e3 1b 24 a1 5a 13 92 e4 +94 04 7f ed cb 70 81 90 7c 56 17 a8 aa 18 d1 01 +b0 53 2a 36 32 45 19 23 c4 8a 75 b0 ec 21 76 cb +98 e5 ce 51 58 8b cf 86 8e 29 d5 d9 69 4f 00 ae +2c 92 4e 73 d2 e6 dd 14 4d 24 fa 45 d0 12 06 a3 +f5 d9 36 41 3c cb b7 4b 0e 2d 04 7d 82 b6 00 b8 +9d 51 59 4f ce 7d e6 bb d9 5b 97 fc fe c5 98 c4 +eb + +# PKCS#1 v1.5 Signature Example 7.3 + +# ----------------- + +# Message to be signed: +7f 83 b3 e0 54 c0 24 82 50 78 dd 9f 04 0e 1d 09 +05 82 00 c9 75 7b 76 fb 37 2b 8b 52 66 b9 dc 26 +9e c7 56 9d 00 + +# Signature: +01 34 ee 21 51 51 e5 32 50 f5 a0 01 6a cc e3 70 +1e 2a 58 dd aa d6 cc 36 9d f0 dc d9 34 6a 2b 53 +0f e3 71 5a fe ff 1e 9b cb 72 08 31 c1 25 58 97 +0a 9e 03 89 60 04 f2 87 ad b8 21 f3 17 cf 63 93 +00 ca e6 e9 09 e9 1e d2 a3 ea cb 99 52 a7 cc 54 +94 76 52 64 24 79 51 d2 8c 16 af 03 e2 4b 80 ee +32 b0 b6 2e df 10 d7 00 91 92 71 35 f0 5a 88 9f +2f 60 56 b9 5c dd ac e4 7c 69 f9 73 08 c0 df 2e +ba + +# PKCS#1 v1.5 Signature Example 7.4 + +# ----------------- + +# Message to be signed: +17 eb c1 50 07 bb 5e 4a f9 17 20 1c 3b a3 84 92 +65 89 c3 15 9a 89 d1 ab d4 c2 c9 86 fb a0 37 9e +8a f1 29 75 c5 d0 31 d1 bf c1 5c a9 17 36 f0 7b +17 66 d8 b8 a7 2d b1 0c 26 8c 98 fd 7a a1 1e 29 +99 f0 6d 86 12 7c c8 89 cf 15 0d cc 73 8f 6a b8 +ba ae 94 3c c6 06 dd 4d 9e ce 70 1a 4a 7b 10 1e +35 1d ee 20 b1 5e bc 55 25 6d b3 ce 46 a6 bd 50 +61 12 5b 62 b9 95 e9 70 d1 6f 7c 9a 8f c1 57 ff +68 ce c7 e6 0f 60 8f 66 26 dd 39 52 8b 24 09 aa +2f f9 32 fc 11 9b 2a 7a 81 77 2a 57 6b 3d 50 a0 +d2 87 a7 fa 2d b8 7d 2b 92 e1 c9 61 a7 0c aa 44 +d8 81 37 b9 50 e1 00 71 1a 98 54 ad fa fb 49 4d +34 e2 86 06 a2 7c + +# Signature: +01 05 da dc 99 c5 9b 5e 3a c5 54 b1 b5 e7 48 0e +5c 0a 62 c7 ab ae fd ac f4 42 6e cc fe 68 6b 8a +aa 1c a4 f5 1e ba bf fa 77 d9 98 03 e7 ee 8d 20 +d1 20 4a ad 8c 67 38 5d 07 44 c8 54 de 2f 99 7a +56 aa ae 04 ce cc 65 65 35 c1 6b b2 14 5d 18 01 +81 25 94 a8 01 3b 0e b5 4e 7b f6 5d 38 42 00 54 +ec 46 da c7 1a 12 52 08 b3 02 21 4a 7c 9b 3a 92 +ca 9b f7 37 39 c7 66 30 9a f8 03 ed de 7c 54 d2 +46 + +# PKCS#1 v1.5 Signature Example 7.5 + +# ----------------- + +# Message to be signed: +6a 52 ba 19 0e 44 ca 0f 10 70 02 10 48 76 2f 3e +79 ed 51 c9 4f 6d c1 a9 f1 ed 78 35 2e f3 79 aa +49 b3 a9 38 7e 3c a7 a1 96 f1 05 dc ab 18 50 6f +29 4a 69 + +# Signature: +00 0b 70 e6 01 c5 ec 58 68 4e 09 18 ba 7a 53 9e +9d 2d d2 9b 01 a3 f4 53 ca d4 a9 a4 0e 50 f5 db +df 72 c1 10 52 f2 0b e4 4a 5d 38 51 b0 1f d0 9d +9c 92 08 47 0f 0a 4a 95 03 5e 98 9e ed 7d 6b 06 +2e 13 f4 99 5b f0 93 0b 4a 3d 9b 8a 9e d7 5e 33 +88 6e 4b 19 4a b5 cc d6 b4 12 95 9c b4 f5 49 8b +d3 2f 66 85 46 be 2c 00 7a e8 de 5d 98 97 7b 94 +b1 7e 12 63 88 4b 54 e7 84 b3 8f c1 12 b8 cb dd +56 + +# PKCS#1 v1.5 Signature Example 7.6 + +# ----------------- + +# Message to be signed: +bb e0 b9 de 2b 5e 9d cd 31 67 42 94 3f 92 19 b2 +4f 66 a3 8f 9d e7 09 46 4f a5 49 5d 79 4a 63 7b +9e bc 06 77 62 da 7a 6e ef f0 98 fa 44 f3 cc 36 +f2 cc ef 67 fd 46 c5 9e 24 73 8c 81 0c 69 ed dc +d9 0c c7 d7 1a 4c 3e 69 3b ca a2 8a 53 3d 90 4b +41 ce d3 39 9b 4c 76 47 e5 ec 4b 3a d9 03 87 0f +5b 5f 8d 6a 8d 81 28 ae 23 81 ce c8 6c 4d 85 b7 +8a 45 1e 1e a9 7e 33 93 ff e9 97 e5 46 b0 9c 8c +f8 22 52 b3 3f 74 5f ee d4 13 32 06 51 8e 2b 88 +03 19 dc df 91 06 71 8a fb 01 6c 51 4b 38 05 32 +65 bc 98 79 10 0e 47 b0 3e ba 03 68 f0 9e 29 23 +ac 6f 40 a0 4b 75 05 4c d5 05 bb c8 96 5d 64 9a +1b ae 7b b6 64 3c b7 41 95 e9 1c 51 f4 18 3d b2 +d7 38 ce 60 35 50 d6 34 e6 dd 4f 27 f4 da ac 61 +56 cf a7 e2 46 8b 5d 6a eb 78 29 09 + +# Signature: +00 c2 e0 74 df bc d0 e7 3a c0 02 1a eb 99 33 10 +6b 20 1b 93 c1 7a 7b f9 33 56 d2 91 fb 4a ae b3 +d1 31 63 00 a8 de 7b 07 e3 d7 79 bc c2 99 e5 2b +6c b0 30 88 01 6d ae b8 41 38 2e b3 43 5f 2e 03 +eb f2 2d c0 86 fb 20 eb e5 3a c5 45 90 24 97 63 +a2 65 5a a7 eb 0e 7d 38 64 93 6b 34 00 6a 6c 4f +a0 2d 9c a1 04 ad ad a6 aa 01 b9 77 b6 de f2 75 +06 08 a7 8f 3e d8 3a d7 12 a7 a1 b0 fb de 7c 7c +8d + +# PKCS#1 v1.5 Signature Example 7.7 + +# ----------------- + +# Message to be signed: +83 a4 8b ff 88 6d 1d 68 f2 92 0a 0e cf f2 98 32 +1a 96 f5 ca dc df d8 be 16 b5 0d 34 d6 7d 94 cd +b1 a1 bf a0 ea e2 46 99 b6 63 c7 ba 3a 08 a3 90 +f7 22 58 84 85 67 94 d1 80 c5 46 ca c0 6e 41 18 + +# Signature: +01 2e 81 bd 38 63 50 65 bf 65 54 33 6b 00 d1 06 +18 33 05 53 e0 e8 08 78 aa d3 55 f0 0d 59 40 d8 +ba 45 01 c5 c4 9f 10 16 d5 f0 e6 a7 3a 4d 9f 87 +40 d2 cf c2 5e a2 48 df 3f 7b 1a e8 fc d2 6b d5 +62 e0 f6 eb 77 7f 46 d7 57 30 69 db 89 07 c0 21 +b6 45 d3 b2 40 58 47 51 99 a9 1b 55 72 d8 ac 87 +f8 3e e6 af 5c f9 e1 71 a8 58 f6 0d 2b 81 40 f5 +2d ae d6 84 42 22 8b 4f ff d8 de 40 07 8d 3d e8 +cb + +# PKCS#1 v1.5 Signature Example 7.8 + +# ----------------- + +# Message to be signed: +18 + +# Signature: +00 f2 c2 99 02 4a b7 bd 25 2c 69 46 be a1 0d c0 +53 97 38 98 bd 5f 0e 3c 94 60 e6 fe 09 d7 d1 91 +e7 1b f7 9d 43 6c aa 84 e9 86 be 3f c0 98 19 c0 +80 e5 6a 08 5c f4 24 41 4a f3 fc 70 07 cf 1a c3 +6f 1c f8 63 57 80 b5 56 8d 73 4a d6 d8 1a 2b a8 +eb 18 8b 29 46 69 d8 71 ca 40 e6 08 f0 ed 33 d5 +69 0c c6 15 70 c5 b8 47 eb db dc dc 4f a7 8f 42 +9e fc e1 3c 67 47 e5 4d 6f 26 1b 04 55 d6 dd 65 +c2 + +# PKCS#1 v1.5 Signature Example 7.9 + +# ----------------- + +# Message to be signed: +04 a6 e2 4b 93 c2 e5 f6 b4 bb e0 5f 5f b0 af a0 +42 d2 04 fe 33 78 d3 65 c2 f2 88 b6 a8 da d7 ef +e4 5d 15 3e ef 40 ca cc + +# Signature: +00 ec c8 95 fb d9 47 e2 df c4 7c 03 ba 2e 99 3d +1a 14 3a 7a 6a d6 3a 91 6e d5 44 83 ce 26 38 9f +89 d5 80 f4 ed bd d0 b3 7e 08 ca aa 5a 0c 1e 52 +6e 1e 9a 1a 8c 0d c9 cf 50 ed 77 de 26 76 46 0d +28 8d ce 56 5f 12 8a 26 6e a2 9b 4e cc 32 9a 94 +cc 25 23 96 dc 50 d5 c0 a1 3d 80 93 81 fa d8 8a +07 89 ad 4f 56 aa 77 e5 44 ec 25 70 af 99 18 b7 +f7 41 b4 86 ca 50 b3 38 4a d1 12 40 60 59 16 85 +a1 + +# PKCS#1 v1.5 Signature Example 7.10 + +# ----------------- + +# Message to be signed: +99 65 bd a5 5c bf 0e fe d8 d6 55 3b 40 27 f2 d8 +62 08 a6 e6 b4 89 c1 76 12 80 92 d6 29 e4 9d 16 +9f 16 fe 51 c4 c0 8a 64 94 b5 00 73 62 20 91 a3 +82 2e a5 7c 32 8b d9 b6 9d 24 65 a2 12 2a f1 78 +bf 6b 1b e3 07 ee 4c 31 47 9f fd 9f 4d 11 f3 3e +a2 0b 7a ec e8 12 ca b4 ee dd 46 99 31 51 d5 68 +ff 64 a1 67 04 a5 5d 95 0a b7 79 1a a2 3b 26 a0 +a8 af 88 0f 6f 80 56 bd d2 06 83 8b 44 c6 07 b6 +61 b4 f1 dc 36 21 06 5f de d3 db 6f 9e 3f 2d c8 +f4 00 ef e3 c2 af a6 c0 27 99 40 57 6b b0 5e 39 +80 4b d3 50 5f 4b d2 82 52 91 8b 28 e7 4e 05 8f +24 f2 7e f0 db 3d 0d cf 9e b2 9d 41 ff c1 10 07 +ce 86 b9 82 e8 9c 03 75 bd 99 76 a5 af 13 1a 61 +4d 28 08 ba 25 07 9d 97 7f 0b 23 97 96 ba 6b 1b +cd 5e 85 5d 96 + +# Signature: +01 56 62 e3 0e 79 0e 37 86 83 81 b4 f6 77 a2 ae +d6 b2 ac c5 64 49 17 31 82 49 10 ed 80 ad c4 77 +15 9c 88 61 8c c7 d0 be b0 49 b1 aa e7 4b 17 21 +e9 0b a7 f7 b0 ea 26 bf 33 ad 04 f8 6f f3 14 38 +97 bf 0d 4e b4 5e b7 de b5 44 11 ba 96 80 aa b1 +3a db fc f1 8a f4 6b 87 fc b1 46 1c 26 20 6a 95 +3b c3 cd bb 31 e2 96 ea 09 02 4b c5 c7 b6 2d e6 +c6 9c 14 bf cf eb 56 39 1a 9e f5 8c d8 05 eb 63 +1f + +# PKCS#1 v1.5 Signature Example 7.11 + +# ----------------- + +# Message to be signed: +71 c7 b1 8b 4a a8 ea 53 89 ad 78 49 23 28 65 be +2a 93 e3 47 a1 68 d2 5c 6c 6e a2 43 9c 1c c8 0b +b0 b7 22 3b e9 c8 93 71 22 84 5b b0 a3 9c 02 5c +43 75 9d ef e6 e4 e8 eb 3b aa b4 f1 eb dc a2 c8 +ad 12 a4 65 a3 0f 8a 65 25 b1 20 ef 6a ae c9 bd +db 45 cd 42 c0 15 0c 40 7b 04 8e df 65 19 94 92 +f2 07 ca 01 aa a5 54 3a f3 8e e9 8d 53 bd 10 d8 +ee bc 3b 64 97 7e 75 75 1d 74 50 dd b1 c0 e1 fc +24 da 17 18 81 1f be 9b 0a bf c3 ca 31 e6 99 5f +c7 34 90 73 e2 17 b3 7e 23 c5 f1 7a 8b 7a 3f 00 +48 6a 37 02 b9 51 0d 6f 05 1b 27 61 71 6e 32 c6 +2b b5 93 9b 2f b1 1a cb 1c 83 + +# Signature: +01 3a b6 3a b1 83 35 3a 23 5f b8 93 ab 4c 35 d6 +40 9c 21 84 9d cf cd a3 bf da 14 29 fe e7 42 a7 +d8 16 0f d3 c8 3b 38 53 a3 33 f9 51 53 9b b5 77 +1f 4d 0f e1 3a de b6 4e 40 30 b9 2e 8b 08 13 eb +52 b1 aa 33 bd 94 c5 b8 bc 1b bc cd f6 c1 df 0b +a6 70 71 7c 0c f6 fd 48 5b e2 fe 9e 16 81 3b e8 +cd d5 80 e6 10 86 67 5e 31 83 1c 92 4a 41 d4 67 +1a 95 d8 35 e3 fc a4 95 e8 86 58 d1 e5 70 e6 28 +c7 + +# PKCS#1 v1.5 Signature Example 7.12 + +# ----------------- + +# Message to be signed: +0b eb 19 b5 62 92 8c 27 1b b7 06 18 9e 43 cf a5 +7b e7 6b 2f 7a 83 e0 2a a2 cc b0 37 c0 f4 f7 f7 +31 62 d6 c2 6f 70 de 97 18 21 e7 b9 66 5c b9 31 +bb 0e ac 82 0b f8 59 98 4d b4 be ef ef 4a b8 8e +91 63 1c 0c d3 1d b7 f9 35 8a 5a a1 df f2 40 6b +45 f9 bd cb ef 20 d5 5c 28 2b ae 5c fb 61 06 02 +3b 56 33 c0 51 af 17 e7 29 bb 07 c9 af 6d d2 + +# Signature: +00 d6 3d a4 d5 d3 e2 28 4a 19 2a 6a 9d a3 f1 a7 +d3 fc c1 64 b9 fc 3d fd 74 52 b0 2f ed 6e f1 be +5a d2 a7 69 ec 9c 36 05 9b 71 91 1c cf 7a b7 1c +e3 09 87 ec 47 bb f5 5e 6d 46 30 d6 23 42 b3 15 +50 48 ee 0b f4 3d 24 fe 69 ab da c1 2f 79 4b 67 +98 bd 1a 7c b4 89 a6 4c e0 82 25 4c 3d 92 f4 75 +56 6b 56 40 0d 96 20 cd fd 63 fc 17 c1 93 c4 25 +d7 ed e9 41 f7 6d a1 e3 45 af 0e 2a 8b 88 44 c7 +40 + +# PKCS#1 v1.5 Signature Example 7.13 + +# ----------------- + +# Message to be signed: +02 87 ab e2 67 0a 45 f8 77 90 48 f5 + +# Signature: +00 42 f4 14 78 2d f6 5d 93 47 bf 1c ad 53 48 53 +74 6c c0 b8 53 c1 c5 26 f9 17 14 45 fc fa a4 99 +1a 70 f5 a8 44 5b cf 41 14 f0 7f c8 35 4c 84 a9 +3b 94 37 33 d3 93 7a 59 88 3b 89 6c e6 5f db 16 +5b 1e 30 55 37 4c e2 42 e1 26 8c 16 41 cc 44 3b +b9 e7 da 7f 71 f3 e7 f6 31 3f 23 9e 62 00 e7 9a +1b e3 ea d6 c3 6e 94 1f 24 46 0b aa 57 df 63 9e +57 da b3 ef f9 e7 7b 87 af 35 5b 83 da e7 7c be +06 + +# PKCS#1 v1.5 Signature Example 7.14 + +# ----------------- + +# Message to be signed: +3f 49 54 2c 0e 9f 50 93 2c 0d 45 3d c9 53 20 af +21 dd 2b d1 72 9c 29 f4 f0 8c 70 94 4c 2c c7 5d +e9 16 6b 4f d2 30 aa 93 70 2c 5f 2c 3d 9c 29 9a +35 91 02 57 00 33 54 0e b8 28 ca d7 5a 57 76 d2 +e8 cb 45 61 41 a6 fa 97 bc 4e 6e 62 d3 df 08 29 +82 a4 d9 8c 2d e4 41 e5 9e 93 12 + +# Signature: +01 5c 39 93 ce eb d8 db a4 5a 36 8d d4 05 af 8a +53 b9 3e 82 70 19 f9 94 e4 ed 78 2c 39 11 b9 b5 +80 d5 42 24 26 9b 79 97 f1 74 96 30 e5 2f 22 1f +af ab 96 41 c7 81 e7 04 4d 32 56 e2 e4 4e 14 37 +91 72 32 69 45 18 ba 9e 71 38 da 47 fe 53 43 29 +b8 c9 68 9e 27 85 c0 2b 60 3d d1 60 d3 73 36 a2 +b0 5b e0 47 82 65 9a c0 e9 67 1f e9 32 ea 80 91 +d6 13 18 b2 b2 01 bd a7 9a f6 c0 c4 44 69 38 e3 +f6 + +# PKCS#1 v1.5 Signature Example 7.15 + +# ----------------- + +# Message to be signed: +d0 db c9 6c f9 bf b1 e3 cd 6d e2 ea a0 8d 6d 79 +5b ed 81 87 ce b0 85 65 80 e4 b1 42 b9 ae 60 a0 +98 cd 42 98 4e 8d bf 1d 05 a0 c0 ab 83 51 54 8f +0a 13 64 6f 33 39 0b 2b b0 c8 64 b3 97 cf 13 37 +1f 8b 2f 67 5a 82 e4 6b f1 6c 4a fc 60 5e e3 e5 +a1 46 9c ac 51 fa 73 4b 44 65 d4 c1 3d 5b 2d d1 +2e ed a5 4e 7d 08 1c d9 e3 ea af 9e 57 db 42 20 +20 a0 b5 a5 ec 28 ca 43 97 7a 5d 67 6f fa b6 2f +78 10 71 93 59 41 59 ce bf bd 86 26 98 19 a0 f3 +41 a0 f4 12 84 dd 0a 73 ca 80 14 d2 e0 b8 01 79 +c6 38 0b 40 3a fb b1 1b 42 db 34 9b af d7 57 0f +be cb d1 4b d0 c2 1a d6 41 68 7a 6a c3 29 25 f7 +03 1a 24 a6 56 8a b9 e2 87 eb 80 75 41 10 df ba +68 8a 59 63 25 bc ac 4a 39 ce 8b 84 a4 + +# Signature: +00 8c c8 2d 64 55 9d e0 04 0f 55 41 19 9a ef f3 +99 9f e2 f0 86 f1 57 ff 51 f2 22 0d b3 45 51 9a +a1 14 b0 17 62 e7 0b c9 65 83 bb 38 b2 2b 3f 87 +be ab 32 e2 3a 3d eb db 8a 59 54 29 ff 12 fa d4 +95 d7 4e 22 0e 4f 7d ca 22 27 28 43 89 9e 81 04 +c6 9a 59 64 2f 6f a8 25 89 0f e8 13 2a 0f 79 94 +02 53 e5 00 7f b1 17 7a 5b f4 18 06 7e dd c8 d3 +2c 5e 59 35 bf 33 8f 1c 69 0e fc 80 11 dc 8c 84 +2e + +# PKCS#1 v1.5 Signature Example 7.16 + +# ----------------- + +# Message to be signed: +7d f0 23 6e 87 1a 71 c3 17 90 eb 5f 01 1c 91 1c +27 c6 03 73 b8 dc 9e bb 13 ac 85 ac cb 3b cb d3 +b4 74 f9 78 86 2d d8 42 02 ab 20 b3 34 73 94 25 +e1 b7 9e 0b b8 b4 bc 47 dc 71 53 f5 7a da 04 12 +44 7b f5 a5 e6 67 34 19 ba ad 65 3e 5f 5c 39 e2 +ef 7c fe 7e f4 77 8a b9 98 ca f9 7c e1 6c 58 33 +27 72 dd df 82 6f 1e ec 1a f3 db 80 e3 13 75 d6 +68 0a a2 54 b4 ab 6e f9 a3 ec 0e 04 03 e4 b5 83 +d3 71 dd d9 6d d5 7b 2c 61 a6 e4 01 25 1a 1a 63 +0d 1d dc dd 84 d9 0d 82 fa f5 a0 18 d2 a8 8e 26 +58 55 e9 d7 ca 36 c6 87 95 f0 b3 1b 59 1c d6 58 +7c 71 d0 60 a0 b3 f7 f3 ea ef 43 79 59 22 02 8b +c2 b6 ad 46 7c fc 2d 7f 65 9c 53 85 aa 70 ba 36 +72 cd de 4c fe 49 70 cc 79 04 60 1b 27 88 72 bf +51 32 1c 4a 97 2f + +# Signature: +01 45 5e 3b b2 9c bc a8 83 9b 9f 54 4d 51 47 2e +bc fd 25 c2 92 27 c4 65 5d 5f 7e bb d8 3c 48 e7 +64 3e 7b 59 4d 6f 7c d5 f6 bf 9a 40 b0 5c 4a 05 +cb ee 1f d6 59 d3 ce de 3e 7c ad 61 e6 fd f8 f0 +e4 fd ef 08 12 a8 53 90 8f 0f 99 ca 7e 38 8e bc +19 e8 74 76 5b 11 64 0f 1e e1 e9 8f 54 95 3d e6 +17 6f 15 82 03 70 17 c8 38 60 9a 57 a1 2a cb af +a6 a5 65 47 f5 7d 62 db e8 76 69 ed c0 fe 3b aa +da + +# PKCS#1 v1.5 Signature Example 7.17 + +# ----------------- + +# Message to be signed: +12 88 c0 3f 95 00 6e a3 2f 56 2d 40 d5 2a f9 fe +b3 2f 0f a0 6d b6 5b 58 8a 23 7b 34 e5 92 d5 5c +f9 79 f9 03 a6 42 ef 64 d2 ed 54 2a a8 c7 7d c1 +dd 76 2f 45 a5 93 03 ed 75 e5 41 ca 27 1e 2b 60 +ca 70 9e 44 fa 06 61 13 1e 8d 5d 41 63 fd 8d 39 +85 66 ce 26 de 87 30 e7 2f 9c ca 73 76 41 c2 44 +15 94 20 63 70 28 df 0a 18 07 9d 62 08 ea 8b 47 +11 a2 c7 50 f5 c0 a4 25 31 3d f8 d7 56 4b d2 43 +4d 31 15 23 d5 25 7e ed 80 6a c8 c9 c6 af 04 ac + +# Signature: +00 6b eb b9 6f 0e 28 2f 1b 4d 03 e6 c5 65 05 b9 +37 78 da 9f 49 36 50 e8 aa eb 65 cf e6 28 50 04 +2f 75 ab e6 e6 ea fe b9 a7 0a bd 21 eb 5d ba 73 +cb b8 7c 12 98 0a ac df 16 71 6b 19 98 c9 49 9c +e4 39 c5 4a ab 4d 19 ce 72 7b 78 75 a4 1a 3d 30 +81 4e 50 8d aa 26 eb 70 aa bb d0 dc ae cc 4d 4b +51 69 80 71 51 1e b3 1b 21 0e 66 dc bc 7f c0 b8 +c6 23 14 da ea 69 d4 7a e2 78 10 0d eb 51 40 92 +00 + +# PKCS#1 v1.5 Signature Example 7.18 + +# ----------------- + +# Message to be signed: +54 13 99 3c 26 58 bc 1d 98 85 + +# Signature: +00 bb eb 2c a0 bd 64 cb 89 60 37 5b 08 a9 48 0e +69 c0 9f d3 82 de a2 f9 40 89 b1 53 3a 08 51 fa +0c bd 0e ad ef ca 8c 70 b7 70 79 7a d0 89 e8 40 +d2 fe 1a 8f b8 54 9f 32 90 58 3b bb 81 d3 ee 2b +1c 48 f1 ea 75 1b f3 2f 95 90 be 3a fd b7 74 5e +16 6e 0b 32 2c 08 31 24 e6 45 83 94 82 d0 81 26 +22 d3 1a b1 87 7a 9b b4 1b 8d aa d8 68 f3 0e 75 +07 83 2a c3 41 01 12 13 3a a1 7b 2d 47 6d 47 6d +89 + +# PKCS#1 v1.5 Signature Example 7.19 + +# ----------------- + +# Message to be signed: +9c 84 c1 48 6b c1 2b 3f a6 c5 98 71 b6 82 7c 8c +e2 53 ca 5f ef a8 a8 c6 90 bf 32 6e 8e 37 cd b9 +6d 90 a8 2e ba b6 9f 86 35 0e 18 22 e8 bd 53 6a +2e b3 07 c4 3b 48 50 a8 da c2 f1 5f 32 e3 78 39 +ef 8c 5c 0e 91 dd 0a fa d4 2c cd 4f c6 06 54 a5 +50 02 d2 28 f5 2a 4a 5f e0 3b 8b bb 08 ca 82 da +ca 55 8b 44 db e1 26 6e 50 c0 e7 45 a3 6d 9d 29 +04 e3 40 8a bc d1 fd 56 99 94 06 3f 4a 75 cc 72 +f2 fe e2 a0 cd 89 3a 43 af 1c 5b 8b 48 7d f0 a7 +16 10 02 4e 4f 6d df 9f 28 ad 08 13 c1 aa b9 1b +cb 3c 90 64 d5 ff 74 2d ef fe a6 57 09 41 39 36 +9e 5e a6 f4 a9 63 19 a5 cc 82 24 14 5b 54 50 62 +75 8f ef d1 fe 34 09 ae 16 92 59 c6 cd fd 6b 5f +29 58 e3 14 fa ec be 69 d2 ca ce 58 ee 55 17 9a +b9 b3 e6 d1 ec c1 4a 55 + +# Signature: +00 e6 be 96 e1 8d ce bf 83 88 ba 82 ec 6f 27 10 +5b c2 78 71 59 5e 01 70 5a 2b 97 a1 f4 d7 88 38 +35 2b 0e 7c 0a 2c 62 7a 6f f3 7d b1 69 a9 a4 64 +8a d2 7a f0 65 33 a4 f0 41 d4 c8 20 ab f4 fb 52 +64 64 08 14 34 df 36 78 85 03 c6 5a f7 62 aa 21 +9f b7 6a 91 cb b4 0e 14 92 a9 cb 77 36 9b b4 cc +a1 93 4e 38 53 de 6c 86 a5 dc 11 48 ed ee b3 b0 +03 04 14 fe 30 83 ad 72 fe 29 5c 29 b5 ea 9b 66 +60 + +# PKCS#1 v1.5 Signature Example 7.20 + +# ----------------- + +# Message to be signed: +94 0c da b4 a3 e9 20 09 cc d4 2e 1e 94 7b 13 14 +e3 22 38 a2 de ce 7d 23 a8 9b 5b 30 c7 51 fd 0a +4a 43 0d 2c 54 85 94 9a 2b 00 7e 80 97 8b bb 19 +2c 35 4e b7 da 9a ed fc 74 db f5 f7 1d fd 43 b4 +6c 93 db 82 62 9b da e2 bd 0a 12 b8 82 ea 04 c3 +b4 65 f5 cf 93 02 3f 01 05 96 26 db be 99 f2 6b +b1 be 94 9d dd d1 6d c7 f3 de bb 19 a1 94 62 7f +0b 22 44 34 df 7d 87 00 e9 e9 8b 06 e3 60 c1 2f +db e3 d1 9f 51 c9 68 4e b9 08 9e cb b0 a2 f0 45 +03 99 d3 f5 9e ac 72 94 08 5d 04 4f 53 93 c6 ce +73 74 23 d8 b8 + +# Signature: +00 80 e2 c3 4f d4 ab 4d 1d 70 1e a3 f0 85 76 3a +ca ff c9 fd 3e d9 18 d0 4b ff ee 19 31 62 48 98 +c7 8f 89 41 bd 2a 59 ce b5 b8 40 f0 11 45 16 ce +41 1f ae 75 2b 1b 8a 22 1f fc a7 a6 87 66 c6 97 +c5 0a 3d 88 d8 d0 2f fc 12 41 d8 4b b7 a7 22 7f +3d 05 14 9e 15 11 12 77 a1 36 a5 b8 dd 96 dd 4b +22 5c 5f 49 cd f6 07 1d bf 71 93 5c 7a 6f 1e 2e +9a f3 02 1c 0d 58 a9 b8 1c 9b de 61 fa 47 2c 07 +a6 + +# ============================================= + +# Example 8: A 1026-bit RSA key pair +# ----------------------------------- + + +# Public key +# ---------- + +# Modulus: +03 33 12 64 88 f7 a2 91 51 32 e3 0d 5e 97 f6 ed +7b bb 67 b6 19 85 00 8e ae a2 a5 da fb 96 a4 48 +ab 75 ce 3d 6e 68 a6 26 5e 7c 24 56 84 99 93 24 +c8 1e 0b a6 38 98 63 fe b4 88 b3 f2 55 d0 d6 19 +c1 90 40 b7 4c 18 9f 0c 9a f4 b0 d5 a5 5a 54 4c +09 0c d6 15 2c 90 a6 f2 55 0d 7d 2a 6b 6d 34 7d +5b 1b 9d fb 1d e4 40 3c 79 66 23 d7 03 bf 9d b4 +43 bf 67 02 68 3b 8d 2a 9c 61 e9 36 8a c4 25 a5 +81 + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +03 33 12 64 88 f7 a2 91 51 32 e3 0d 5e 97 f6 ed +7b bb 67 b6 19 85 00 8e ae a2 a5 da fb 96 a4 48 +ab 75 ce 3d 6e 68 a6 26 5e 7c 24 56 84 99 93 24 +c8 1e 0b a6 38 98 63 fe b4 88 b3 f2 55 d0 d6 19 +c1 90 40 b7 4c 18 9f 0c 9a f4 b0 d5 a5 5a 54 4c +09 0c d6 15 2c 90 a6 f2 55 0d 7d 2a 6b 6d 34 7d +5b 1b 9d fb 1d e4 40 3c 79 66 23 d7 03 bf 9d b4 +43 bf 67 02 68 3b 8d 2a 9c 61 e9 36 8a c4 25 a5 +81 + +# Public exponent: +01 00 01 + +# Exponent: +01 4a 2b 15 df a8 83 1d b4 ef a0 5b 19 50 84 b7 +42 73 4e e1 36 f4 48 3f 3b e2 50 9d 2f 61 90 23 +c3 0a 1f f2 df 78 cb d1 17 b1 4f 2c 99 13 17 1f +72 93 b9 fa 6d 41 f0 bd 11 a5 31 74 74 67 54 86 +d7 f0 ae c0 a7 78 ba 92 0e 81 f5 64 d1 59 30 cd +de e7 e2 b0 6a d8 ad b6 12 75 1f 4e 38 4d 6f 3f +a0 a6 63 9f d6 2e df 86 f5 2c 9f e0 77 62 91 83 +21 83 d3 59 b7 34 32 60 c9 4e 12 5f 4a b8 bf 43 +69 + +# Prime 1: +01 d6 e7 bd 8e 39 5b be f2 10 46 49 c0 12 78 cc +1c 51 c9 68 7d ef b4 59 1f 03 b6 78 52 a4 bc b5 +30 75 0c f9 bf ca d0 72 8c 53 99 d8 70 35 01 06 +cb a3 ec 41 6a 31 e4 2d 0b 59 75 10 ff 1c 9d 53 +bb + +# Prime 2: +01 bd 46 6f 43 a4 d4 61 3e 42 64 f0 1b 2d ac 2e +5a a4 20 43 f8 fb 5f 69 fa 87 1d 14 fb 27 3e 76 +7a 53 1c 40 f0 2f 34 3b c2 fb 45 a0 c7 e0 f6 be +25 61 92 3a 77 21 1d 66 a6 e2 db b4 3c 36 63 51 +f3 + +# Prime exponent 1: +fb 66 85 00 65 06 e2 0e 01 3a 45 2d 51 af 43 e8 +ea 91 08 44 13 b0 c8 d3 91 fb dc 88 e2 82 0c 89 +6e 34 1b 31 95 69 6b 7e 17 33 cf 25 38 66 ef e5 +d0 01 d5 7a 88 60 34 dc 16 4a 35 64 bd 36 10 f9 + +# Prime exponent 2: +be 4e 9e 3b 40 f5 6c 62 59 aa 1e 5c df 56 59 b1 +6f b8 42 94 e5 8a d0 16 bd 2c 96 cd 08 e6 cf 68 +54 a1 1c b8 0a d4 be 3e 05 7a aa cf 02 bd 32 63 +73 a2 35 ce b8 9e 82 43 0d 6e 6d 47 d6 ce f8 35 + +# Coefficient: +c0 23 5c 89 73 cf bf 30 bf 1d d3 c8 39 f0 2c 94 +c6 9d c5 34 cb fc 98 88 05 d6 fc 46 2a db d3 77 +d1 75 b9 a9 64 60 18 d7 fa b7 5c 1d 1f 7d 61 b7 +7f a7 95 59 b8 6f fa 9e c6 e2 11 33 fa 7f 1a 45 + +# PKCS#1 v1.5 signing of 20 random messages +# ------------------------------------------------------- + +# PKCS#1 v1.5 Signature Example 8.1 + +# ----------------- + +# Message to be signed: +9a 28 20 f3 b9 02 9a bc 18 65 eb 06 fe 61 b8 d3 +97 b6 55 72 d6 00 61 ca a7 4e 63 56 93 1e 25 6b +89 71 2d 18 66 84 b4 de 1e 14 c9 eb fe f1 6e 40 +d9 9d 10 94 39 6c 56 1c 88 31 77 e5 12 6b 9b e2 +d9 a9 68 03 27 d5 37 0c 6f 26 86 1f 58 20 c4 3d +a6 7a 3a d6 09 04 e2 15 ee 6f f9 34 b9 da 70 d7 +73 0c 87 34 ab fc ec de 89 7f dd 67 0a 01 46 58 +68 ad c9 3f 26 13 19 57 a5 0c 52 fb 77 7c db aa +30 89 2c 9e 12 36 11 64 ec 13 97 9d 43 04 81 18 +e4 44 5d b8 7b ee 58 dd 98 7b 34 25 d0 20 71 d8 +db ae 80 70 8b 03 9d bb 64 db d1 de 56 57 d9 fe +d0 c1 18 a5 41 + +# Signature: +03 22 d0 0f c1 d9 66 94 f3 6e ae d2 30 90 56 f3 +ea 1c 1c c2 2b 13 b6 5e 79 11 8d 20 2c 42 d1 61 +30 99 38 05 09 da 74 35 bb 57 92 16 fd 57 65 06 +68 42 e3 56 a6 41 6f c8 42 a2 4a 9e a1 bc 6a 90 +98 05 23 b4 28 e3 99 bb d6 fc dc 2c b7 71 da f0 +03 7a 2d e8 c7 64 9b d5 33 17 de 0e 37 c3 14 ba +b0 c4 37 bb d7 98 df b9 65 50 6c 34 8b 74 2f 13 +8e f1 d1 a2 03 e0 51 e3 4b dd 3a 30 e0 fc e1 ac +43 + +# PKCS#1 v1.5 Signature Example 8.2 + +# ----------------- + +# Message to be signed: +ea 9a 1a 04 b7 cf 47 8a 89 7a 70 8f d9 88 f4 8e +80 1e db 0b 70 39 df 8c 23 bb 3c 56 f4 e8 21 ac +8b 2b dd 4b 40 fa f5 45 c7 78 dd f9 bc 1a 49 cb +57 f9 b7 1b 6d 48 b2 b6 a5 7a 63 c8 4c ea 85 9d +65 c6 68 28 4b 08 d9 6b dc aa be 25 2d b0 e4 a9 +6c b1 ba c6 01 93 41 db 6f be fb 8d 10 6b 0e 90 +ed a6 bc c6 c6 26 2f 37 e7 ea 9c 7e 5d 22 6b d7 +df 85 ec 5e 71 ef + +# Signature: +02 68 44 09 39 99 6a e5 cb da fd bc a8 6a 7c 42 +8a 04 b5 78 fe 2d be 51 26 a8 2f af 2b ec ff 09 +9a c6 0c b8 1b 11 7f 1e bf 42 04 fe 43 70 54 8d +5d 2c 46 80 63 68 2d a8 7d c8 01 79 bb 3b ba 85 +a1 48 ae 2d e7 dc b4 94 f4 76 22 1d f8 21 9d 4a +ae 1e 45 af 65 de 33 4a 1a 6d c1 45 52 86 ae 09 +cf 26 72 58 85 e7 74 80 99 72 d7 81 98 05 ff f5 +a8 c8 9d 37 37 64 50 73 92 49 f5 7e b1 51 b7 1d +c0 + +# PKCS#1 v1.5 Signature Example 8.3 + +# ----------------- + +# Message to be signed: +07 df 58 6b 90 5b 23 b9 1a f1 3d a1 23 04 bf 83 +ec a8 a7 3e 87 1f f9 + +# Signature: +01 bf d9 15 ff 77 80 f1 4c cc 55 bd 03 06 b3 ae +da 5b 5b 59 55 a8 26 d4 52 6b 0b c7 66 15 4f a8 +da 59 56 05 78 cc d4 88 2f e9 70 92 fb c7 36 fd +a7 3c ee fd 10 38 94 06 3e 93 e2 2a 7b 5c 44 f7 +a8 5e 3b db 96 71 9a 09 37 43 03 c9 1e d7 e2 27 +49 fe 3c 4d 6b 96 69 9d 50 7c 50 ad cf bd fc 13 +1d 6b 5f 2c f1 83 0e 31 ea be 39 ae b5 17 96 9c +94 a8 1c fe fe 67 31 aa 2c df fe 28 c8 af 71 40 +f4 + +# PKCS#1 v1.5 Signature Example 8.4 + +# ----------------- + +# Message to be signed: +50 0b 87 77 c7 f8 39 ba f0 a6 4b bb db c5 ce 79 +75 5c 57 a2 05 b8 45 c1 74 e2 d2 e9 05 46 a0 89 +c4 e6 ec 8a df fa 23 a7 ea 97 ba e6 b6 5d 78 2b +82 db 5d 2b 5a 56 d2 2a 29 a0 5e 7c 44 33 e2 b8 +2a 62 1a bb a9 0a dd 05 ce 39 3f c4 8a 84 05 42 +45 1a c7 cd 69 8d 84 b6 51 28 d8 83 5e 3a 8b 1e +b0 e0 1c b5 41 ec 50 f1 03 6e 00 8e 71 e9 64 da +dc 92 19 ed + +# Signature: +00 7a e0 cf d7 f4 c6 ad 1f f8 4b 4a 60 6b a1 c4 +79 8c 2e 49 9b 04 5b 56 7d 32 63 4f d9 55 f2 68 +26 0a b6 59 bf 5b e9 9e 08 26 eb 38 70 e8 f6 2f +5a 3c e7 58 e6 d1 56 c3 29 9b 43 1c d9 df c6 58 +37 ee 94 22 0d 95 23 51 14 87 99 be 9f ca f9 be +26 4d ae be ba 2b e8 66 05 20 1e f9 a0 d9 8f 58 +ec 63 8a bf c4 f2 78 48 f5 d4 79 d3 34 ac c2 a9 +7f dd 2d 32 7e c4 c7 dd c5 a8 ab d5 66 de 35 d1 +4f + +# PKCS#1 v1.5 Signature Example 8.5 + +# ----------------- + +# Message to be signed: +6b 3f 6a 63 d4 e7 78 59 24 3c 9c cc dc 98 01 65 +23 ab b0 24 83 b3 55 91 c3 3a ad 81 21 3b b7 c7 +bb 1a 47 0a ab c1 0d 44 25 6c 4d 45 59 d9 16 ef +a8 bf f9 62 12 b2 f4 a3 f3 71 a1 0d 57 41 52 65 +5f 5d fb a2 25 f1 08 95 a8 77 16 c1 37 45 0b b9 +51 9d fa a1 f2 07 fa a9 42 ea 88 ab f7 1e 9c 17 +98 00 85 b5 55 ae ba b7 62 64 ae 2a 3a b9 3c 2d +12 98 11 91 dd ac 6f b5 94 9e b3 6a ee 3c 5d a9 +40 f0 07 52 c9 16 d9 46 08 fa 7d 97 ba 6a 29 15 +b6 88 f2 03 23 d4 e9 d9 68 01 d8 9a 72 ab 58 92 +dc 21 17 c0 74 34 fc f9 72 e0 58 cf 8c 41 ca 4b +4f f5 54 f7 d5 06 8a d3 15 5f ce d0 f3 12 5b c0 +4f 91 93 37 8a 8f 5c 4c 3b 8c b4 dd 6d 1c c6 9d +30 ec ca 6e aa 51 e3 6a 05 73 0e 9e 34 2e 85 5b +af 09 9d ef b8 af d7 ad 8b 15 23 70 36 46 + +# Signature: +01 92 1f 22 f4 71 a0 8a f8 19 a9 52 e1 83 68 ce +15 f9 b0 64 eb 1d 00 b1 28 99 78 02 44 fe 8c 44 +24 b2 1f 64 35 0b 92 26 fe 95 ff 54 f1 14 39 83 +9b fb 54 f9 39 c9 14 95 e4 f0 27 90 18 97 27 3c +fa 29 5a 57 15 1f 4e 91 1d c1 02 a7 7d 95 8b 62 +27 24 c0 fd 3a 34 b3 b7 be fb 8b 8c d0 66 6e 81 +5d 0c 07 f2 ec b7 c4 dd 2f 42 b7 f4 09 13 12 e3 +d7 b2 df 26 78 87 e0 ac a7 0b 54 1c 4c 1e ea 16 +b5 + +# PKCS#1 v1.5 Signature Example 8.6 + +# ----------------- + +# Message to be signed: +93 29 a5 80 90 de 8b e5 7c 42 + +# Signature: +01 5c e2 4a 6f 2b 37 3a 19 99 7b b2 0c 18 ac 65 +9f 1e dc 0f 25 c9 e5 bf 76 d5 69 99 65 20 c2 80 +ef dc f1 5e 2d 63 ca af f6 c7 7a e0 38 97 03 7a +06 15 f9 83 8c 52 10 4e 97 25 18 e2 90 fa c3 8f +63 24 75 30 b4 cf 61 c6 ec e3 42 9b 53 07 81 cf +34 96 4f 32 ae 50 f1 09 34 63 83 86 d3 b4 df 76 +1c 59 7d 4a a7 fe ca 26 6c 27 f8 ce 66 ad e1 be +26 59 ce 14 2b a5 f9 35 88 3c 7e 8c 9b 89 57 ab +f2 + +# PKCS#1 v1.5 Signature Example 8.7 + +# ----------------- + +# Message to be signed: +6a ce 0f 1e 1d c6 3e 39 4a 06 1f 52 2a 54 2f be +71 20 25 4e 36 e9 f6 5d 19 57 c9 56 28 78 2c b0 +36 8f 3c 13 da d6 56 71 79 c1 ea 24 fe 83 5a 26 +63 85 e4 68 83 17 b8 2b 0c 3f e6 3c f2 d5 2f 04 +ae 8a 38 a5 75 59 bb 95 d9 eb d5 fe 8a 9a fe 14 +79 90 9e b9 9e 0d 3e f3 f3 12 e0 a4 ab b7 66 c7 +e2 13 1a 5f fb 48 31 83 fb b4 22 34 d3 2e 58 1f +59 50 65 c4 89 82 61 ec d0 ae 57 2c 22 1c 25 8d +e9 50 a4 08 01 ef 79 6d 4d d0 04 06 45 fc 53 4d +8e 78 58 23 48 38 ed 12 c6 87 40 c1 4e 37 16 13 +f0 04 61 76 bb b0 f4 3d 99 75 19 c4 0c 67 14 96 +ff 35 0a 3f df 42 9c c2 2f 46 4f 43 5f 6b 29 e7 +e1 c3 0e bd 50 59 27 d4 a0 96 58 7f c3 8d 3d 64 +94 39 1e + +# Signature: +02 73 ba 2c 50 2b 3f 29 84 c5 48 d9 f7 d6 c9 b3 +d7 fd 46 08 78 c8 4d 6b e3 3b 28 10 6e 15 fc 22 +17 ef f7 41 cd c2 66 83 4b ea a8 6d a4 05 f3 ca +e6 06 cc 61 f2 54 7b b9 22 92 03 45 fe 8f bb 5e +7b 6a bf 91 ea e8 c4 26 60 64 50 25 cc 7f c0 7a +53 4b 76 d3 78 75 e3 f4 0d 52 70 c1 0e f4 6c 7f +e4 5a fa bc ff ae 2a 9c 94 11 bd 04 d6 1d 4c 0e +5f fc 02 2c b3 6a 64 b7 c3 a8 c8 9b fd e4 36 ba +fd + +# PKCS#1 v1.5 Signature Example 8.8 + +# ----------------- + +# Message to be signed: +fd cc 0f 1e 5d cb e5 01 6a 6b 0f 8c 28 f5 b3 31 +ff 58 28 37 13 8d bf 62 ef 7f f6 1b c1 a3 53 96 +c9 2e 3d 54 8d 39 9e 35 0a 3c 6b c2 fd b5 da 94 +b9 86 a4 ce 6d ee 10 4e 9f 27 4b 15 25 58 bf a7 +22 cc fd da 3b 26 b9 f8 e5 15 25 f3 81 03 4c 51 +fd c9 f7 91 2a c9 27 d1 a7 08 cc 2d bb cd 7b a6 +c0 31 b0 11 cb a8 e2 df 8f c9 b8 83 64 ee 96 5f +24 27 0e 43 48 62 32 53 cb 9e 59 d6 f7 94 09 09 +94 a7 a4 c9 30 02 70 b5 7f 24 39 eb bb a4 65 84 +67 af db 7f e8 6b 4f 1a ad 1d 3d 3b 2f + +# Signature: +00 a7 c4 50 b3 0b 2e cb 19 bb 70 9a 92 31 cb fa +9f 0d 61 69 7a 26 b9 0a 96 d9 1c 24 c4 da 70 d7 +b0 0b 59 23 c8 e1 2d 41 09 4b 70 5d 50 c7 78 bb +da ce c6 60 d5 c1 5d ff d3 a2 47 8f d9 33 70 80 +dc a1 6b 9c 13 e6 23 3b 82 92 b2 fd cc 29 e9 bf +3b 21 a7 18 78 f3 4e f5 eb 7c d5 0a d4 12 03 72 +5a 0f 1c 66 3f 73 42 ec 7c 3d f3 d5 aa 51 d0 58 +df cc ce 5f e6 9d 36 3b 42 84 32 08 79 e8 6d 58 +b5 + +# PKCS#1 v1.5 Signature Example 8.9 + +# ----------------- + +# Message to be signed: +2d 1f cd 17 66 f7 d4 5f 29 59 4f 9d 4f 74 39 41 +ae 91 2a 97 91 1f fc 3d 65 dc d9 65 60 10 77 3b +b0 22 4b a6 df 11 1b 1c 13 68 38 4f 24 92 fc 4f +a7 28 0c 06 65 14 ae 84 f7 61 45 63 d9 05 2c a9 +4e f4 46 a3 1b 46 3b d6 c2 50 56 80 50 88 c1 d3 +1a ba ff 52 15 f7 a8 f8 9e 7b 64 f2 + +# Signature: +02 c0 e0 71 e8 36 90 dc 14 d9 a3 7d 61 e0 af c2 +7d f9 78 03 9d a6 01 ca 2c ec 1d ec 8f 0d 17 d2 +ff c4 50 e6 78 38 0a 02 5a 41 c7 46 11 8f 58 36 +42 52 a1 22 53 9e cc bb b4 ab 3d 8d 37 7b db b9 +11 c5 8a 4c b9 46 2f 36 dc 38 92 48 50 1b d0 8f +48 e3 53 3b 82 59 1a 2a 20 cf 62 df 5f 5a 1f 84 +ea 30 0c b3 94 57 13 71 41 ad 8c d1 d1 85 ab b1 +7b a5 d0 3b e3 48 c0 67 97 b0 95 58 f0 33 1c 24 +b9 + +# PKCS#1 v1.5 Signature Example 8.10 + +# ----------------- + +# Message to be signed: +4f 46 9a b7 9c b8 93 a5 3c 0e e3 81 5a 8b c0 87 +eb 74 ea 36 61 5b dd c3 33 de e0 5f c7 26 65 aa +6d 0b d5 9e 47 22 98 29 83 4b 1f 91 c9 cd 81 ce +28 d6 8f 14 82 5a 34 5f 3a 4f 38 a0 1b 2d ae 59 +10 07 64 aa b9 90 a8 50 b1 1c 13 d5 df e4 19 f1 +d9 20 d0 0c f1 3b f4 30 e4 ca 82 87 98 9b ee be +da 3e 5d 40 36 02 8c 8e f9 54 6e 35 01 50 d1 96 +f0 05 60 ba e1 47 22 99 e7 f4 29 1d 54 46 29 c4 +f6 52 e3 5c de 4f 80 3e 1b 3c a3 38 09 51 5e f2 +3d 25 4b 8e 65 20 2a 14 a4 11 b1 bc 31 5c 5f fa +ec b8 21 11 97 80 9d cb 5c ed 68 2c 09 f6 7e 41 +d1 60 2c + +# Signature: +01 71 29 64 ea 9a b9 70 29 5b 81 b0 fb d8 35 7e +54 b9 36 ee 87 72 d8 ae 9c 96 12 71 6f cc 2f cb +78 4c a9 ab ee eb b8 fc b6 89 82 16 1c c7 4e 40 +c7 c0 22 47 c0 d0 0e 03 bc 8e 1a 70 51 b8 7c 90 +dd 7d 3d fc 95 e0 b3 c8 8e 7a 0f 37 f3 0e 1b d5 +fe 8b 6e ee 46 5a 0b 34 cb 59 c6 4e bd b5 7d 6f +5f df f2 e7 0b b1 9c 60 d9 88 ea 95 6c dc dd 1b +e5 62 f2 6f b3 7c 34 da 52 a9 f9 11 b9 97 43 81 +2c + +# PKCS#1 v1.5 Signature Example 8.11 + +# ----------------- + +# Message to be signed: +52 bb 76 c9 ea 26 5d 6f ad 10 83 72 ff ab 25 03 +bb 20 d3 8d 37 df 19 92 54 a2 f6 de 0c 4f ca 7a +73 03 36 + +# Signature: +01 0c 55 34 23 60 22 60 15 8a 17 13 3b 5d 30 ef +e9 8e 9a eb 35 3b ab 33 71 e4 91 cd be bd 35 0a +0a 47 0b 9d bf d1 89 33 51 1f 0d 0e 36 94 a8 ac +4b f3 f5 b6 eb 9b f7 1c 23 d9 4c 2e 64 be b7 b7 +c7 22 52 ca 82 7b d0 c0 56 7b a8 a1 0a 6d 3b 7e +18 7b 0f d8 e9 e9 5d 4f e4 80 f2 50 dc 7f 03 42 +29 0e 9a 7d 32 70 3a 72 13 c6 52 13 ad ed 45 57 +54 78 1f 3d b7 3e 79 e3 d1 ba 6a f7 f6 90 fe 81 +73 + +# PKCS#1 v1.5 Signature Example 8.12 + +# ----------------- + +# Message to be signed: +5f 59 7a 19 cb f5 14 30 d3 c6 a2 47 a5 23 54 07 +38 6c ae d0 a2 94 f3 f4 1f 3f 37 82 50 d4 c5 a2 +c9 92 75 f9 55 44 cc c1 d7 7e 5c 15 1a f1 3e d6 +0b e5 22 eb 8c ab ed 89 a9 b4 5b 09 65 46 00 f9 +fc 75 1e 8b 12 e6 7e 52 + +# Signature: +00 3b d4 aa 90 81 fe 7e 9f 69 a2 69 fe c8 c8 a7 +36 70 c0 37 e8 5a 1f 36 fc ad 74 e5 b5 2d 71 0a +5a 18 ba 09 5b 98 10 cc 69 37 bc 76 34 09 51 e7 +fe d7 5b 32 6d 0a 3b 0f 26 c2 9c d5 eb 64 15 bb +f7 e2 dd 60 ad f6 a0 e6 13 02 dc c6 60 cc e9 10 +40 8b 4f 99 a4 40 ae 2a d6 c3 07 72 c2 9a 9e 7b +32 80 e2 e2 93 9a ba 0b 54 ab 02 2a a3 29 50 22 +71 8c d3 b7 87 b1 13 79 90 fb eb ef ac ec 8c b7 +49 + +# PKCS#1 v1.5 Signature Example 8.13 + +# ----------------- + +# Message to be signed: +84 0c c9 00 cb 4b 2c b6 7a 30 4a 9b 02 82 6d b0 +d6 67 36 92 2e 78 70 13 d6 bf 21 4d f5 79 ff 0c +f4 82 1f 9b + +# Signature: +01 3b 6c 08 0f 68 93 95 05 e1 87 a4 94 82 c7 91 +27 8d a3 ad 4a 74 7c 4f 01 79 1b 92 48 05 b6 82 +f6 49 bb d8 0d ba 12 fb be 59 40 f1 7f 27 e7 5d +42 67 7c 4c cc df fd 00 48 77 2e 36 93 4c 69 12 +12 8f f9 03 af ea 5e 1c a8 fe 94 24 fc 97 9b 21 +87 98 76 98 a5 c5 a7 5e 7d 70 70 a2 a6 74 85 2b +d8 05 bf 13 bb d1 29 6b ff 13 10 a6 d6 ed 45 fd +f8 67 2d 52 41 e7 4c d4 c4 19 86 e4 36 25 50 0c +23 + +# PKCS#1 v1.5 Signature Example 8.14 + +# ----------------- + +# Message to be signed: +c6 41 71 94 13 3b 5f 8e a6 3d 95 58 1c 89 6f 5b +9e f3 d8 7c f6 6c 02 91 64 0f 35 0a 32 5b 49 11 +52 e9 d1 43 0d 68 70 34 6e 46 8e 71 99 45 d4 e3 +65 d0 01 07 5f a9 70 f2 a9 87 0a 1c 65 43 4b a1 +70 02 41 2a cc 4c c7 4d 28 b2 de e2 9b 36 e3 97 +b6 8c 5d 59 cf 67 7c 29 ae e7 93 a9 30 0b 7b f4 +c6 73 b3 e0 b6 03 a3 61 1c a9 02 44 ff 08 78 75 +c5 16 88 57 cb 92 a9 5a aa 61 df f3 c2 12 dc 62 +06 f1 71 47 c4 4b 95 07 d5 c8 90 75 8b b3 5b b7 +2a 2a 5e 9d 4d b2 65 e5 37 3a 5b 34 02 90 4f 0f +1a 12 05 d5 bc c5 90 25 d3 22 0a 5d e1 b1 82 a8 +4d 30 41 2b 84 26 d4 69 32 32 1b 57 ef 72 64 0a +dd 2c ee bf 5b e9 68 43 6b cd 12 16 90 78 84 82 +32 93 b0 10 ec 28 f0 d9 + +# Signature: +01 60 47 ca ad 6c 47 bf 27 d0 cc fa 03 41 01 7e +56 5e 02 8c f2 6c 8e 66 0f 79 e0 91 f3 50 ce b2 +aa cf 92 f7 d0 1d 37 3f 71 55 11 9c 07 29 17 f2 +4f 01 bf 74 7b e2 dc dc 41 d1 be 58 85 35 c2 d6 +ac 17 04 c5 fb 16 f6 e5 dc 4b bc 84 53 f5 21 db +73 1e ba 78 98 e6 e5 21 2b 80 ce 9d a0 f1 56 28 +18 99 98 31 35 03 df d4 4e 3d 69 de 9b a9 cb 5e +b3 2a c4 1c b8 e3 62 1b a1 d2 91 d0 c5 da 24 9f +15 + +# PKCS#1 v1.5 Signature Example 8.15 + +# ----------------- + +# Message to be signed: +a6 42 f0 f7 0b 4b d3 b5 4b e2 20 11 9a 7f 79 + +# Signature: +00 a0 33 6e 63 67 52 7b bf 13 b0 a9 33 b6 31 c7 +2c b3 3e ab bc 29 2a 0f 8f 75 55 0c 22 30 fe 82 +57 f2 af 76 d5 43 cc d1 07 dd 2c 87 78 d3 ac 8a +7b 5b b4 ac fa 57 f2 af 6a 23 14 95 23 5a 51 da +dd b0 83 e3 73 b7 77 a9 5c f9 c4 a9 b6 be 77 51 +b6 5f eb 62 3a b3 34 43 36 54 b1 21 0f 7f 78 2b +17 25 c6 ba 4f fd 20 d1 7e d4 b6 ec 4a 3a f6 4b +d2 73 47 55 b7 73 9e eb f4 18 f0 9d 3a ff 28 9d +13 + +# PKCS#1 v1.5 Signature Example 8.16 + +# ----------------- + +# Message to be signed: +ca 16 e4 3d 9c 82 d9 d3 0c 8f cb 40 22 93 3c ff +c7 d7 4c aa 0d f4 86 35 09 31 8e da ba 4e 0d 51 +99 77 9c 03 50 4a ff a2 7d 87 19 1b 6b f6 86 a8 +4d 97 9a 2f dd 5b 8a 4c 49 32 14 45 c6 f7 5d 25 +23 59 17 ad be e2 a5 cf f8 a9 7a ef 78 c0 09 22 +10 11 d8 3c 0f 9d 37 16 08 75 af 73 67 71 8b 10 +ee c3 b4 29 90 e6 43 f6 37 07 cf bb 30 a7 fa 74 +ab 16 a7 eb f1 c8 38 c3 b2 26 37 b6 3c cd cb 6e +b3 4c 62 eb a9 e9 48 c7 ac 90 30 f0 63 77 29 d3 +e2 78 0a e6 be 4d 2f af 34 6c 11 63 d3 f9 82 48 +19 3a 76 39 9f b7 84 ca cf 68 fb 33 c7 4b ab c9 +dd b6 27 52 0c 0c 61 12 34 64 68 cf 20 a8 e0 2c +c9 a9 bd 27 91 0e 83 29 7b 85 e8 57 32 4a 01 00 +f5 cd d5 93 1b 6a 6d e0 5f 94 83 3a a8 61 0a 3a +4b 08 a5 a3 93 53 + +# Signature: +02 48 59 23 3f b9 db 7c d1 41 f4 b8 77 6a 1d 83 +e1 03 db 3a c9 42 89 d3 6e f4 0f 5e 6e 63 c3 12 +12 af dd dd 16 88 c2 c1 c8 d4 db 04 71 9e 1c 6e +8d bf 7d 60 be 25 f1 d6 88 87 fd ad da 3d 11 2e +3d 0d 24 c0 cd d7 98 8a 55 c7 10 29 40 08 2d 1a +c3 1f b3 ef ab e7 c2 88 cb 4e e7 2a 99 2a c9 6d +1e dd 78 ec 72 82 73 97 0a 79 69 95 c3 e2 a3 85 +81 e2 28 03 25 8e b4 cd 9d a2 04 0f af 74 1c 54 +2a + +# PKCS#1 v1.5 Signature Example 8.17 + +# ----------------- + +# Message to be signed: +3b aa 7e 9a da 21 43 f8 48 82 5d 22 93 67 04 d1 +c9 97 b2 da 76 76 9c 98 6f a1 52 b8 98 ae b1 1c +10 b9 45 79 76 4f 9d c9 33 65 2a 81 03 67 04 76 +95 8d 59 86 7a b2 4a 97 12 84 05 6e 99 c6 48 b7 +7e 7a 65 36 44 87 0f e4 c7 ce f3 7f 90 01 60 48 +72 ad ed e1 6a ac ed 8a a5 df 42 05 33 04 e4 d1 +71 12 0d 7a b3 ce 81 a4 d1 a2 74 98 d1 38 01 8f +66 21 bd fc 1d 53 e7 f3 c1 a5 aa 5d 62 b0 9a 55 +4a 56 f1 ed 4f 38 5a 07 68 ea a2 da 0c 9f 56 37 +03 4c 2e ef 58 cc 35 17 8b c2 a6 27 2c f5 29 b6 +5a df + +# Signature: +01 e6 3b 86 d0 c1 59 99 09 3d 44 28 af 7c 6d e6 +48 07 45 d8 19 e4 29 62 3f 47 2b 45 de 61 aa 56 +7b 60 d9 94 79 2a 0d 11 65 80 55 98 f4 e2 1f e6 +13 99 9a 96 22 5d 0b ba 98 f9 cf be e8 3a f5 85 +fa 07 84 39 a7 42 51 5a e2 18 ec 31 f8 d5 08 f2 +9b 0e 58 75 fc a8 f0 4f 11 a1 c8 2f 2b b0 ae 52 +8f da d3 ca 50 75 bb 3f 41 bb 57 83 34 81 33 fb +a8 a0 b3 ad 95 1a 1a 64 9c a0 f9 75 8b 20 c8 70 +fd + +# PKCS#1 v1.5 Signature Example 8.18 + +# ----------------- + +# Message to be signed: +7e b3 c9 8e 46 fd 1b 5c 9f f1 b1 1b e1 61 9b 56 +60 57 f2 6c 55 e2 88 f4 84 4c cd 50 ba a9 1b 03 +8d 60 95 83 6f 77 1f c1 c4 25 fb 53 3e f2 b1 dc +4a 3e 94 9b b9 95 25 c2 8f e8 a3 e9 31 78 f3 a0 +ac 97 fd 5d aa 81 b5 92 86 18 8e 17 b4 4b 37 71 +bc a8 55 d8 5f 3c 4d 28 6f 10 68 10 f4 e5 22 ea +05 83 4f 11 a3 1e 89 c3 59 90 c5 1b 08 0c 03 a6 +61 e3 d4 a1 b9 7a 2c 27 94 0f 5b 2e 41 2b 69 9e +a6 10 e8 99 6a e6 71 5a b6 e2 09 69 b6 aa 54 cc +72 31 9d fe e6 3b d2 ca cf d0 60 8d 40 e2 b4 03 +95 fe 55 dd a5 be a3 b0 f9 b9 4b 5a ad c0 98 dd +56 8d a3 95 db 2d 44 e4 + +# Signature: +01 5c fa d9 6e 4b 57 d9 cb b5 78 c7 90 74 a2 ba +86 9c 06 02 88 68 c5 a3 fc f4 a5 e3 61 83 1b d8 +c0 2c 25 b1 2b 90 23 4c 8e a4 82 2f b6 5e 82 d0 +91 a9 0f 89 b6 c1 15 6e 4b 44 d7 8d 32 a6 47 37 +d6 15 87 c0 ce 3f 4b 34 3e 71 f8 f7 a8 4c 6f 8f +c8 ae f8 f4 64 c8 b3 59 e4 fb 18 ad c6 99 c5 a0 +76 45 37 55 93 0c 5f 6f a7 07 1f 8f ec b8 63 1a +a4 14 f5 08 35 03 8b e7 ab 05 a4 b0 50 f3 f5 6e +86 + +# PKCS#1 v1.5 Signature Example 8.19 + +# ----------------- + +# Message to be signed: +6a 45 ee 0b 7e a8 03 68 b2 c4 29 af 28 81 53 f4 +56 cc 66 32 17 a8 ff cd 2a a0 5c 5d 32 2d b7 57 +56 cd bc 0f 68 41 41 fe 6b ca e1 89 bf 24 de 1c +8e dd 5b 11 36 44 a4 50 0d 0d 4f f5 80 08 36 40 +e1 2a 2c 95 de 69 e9 59 6b fb 1d 44 36 57 86 e1 +67 d0 25 d8 9e a2 f8 d1 3a 0e 64 77 f1 3b 85 bb +dc f1 60 77 4b 18 25 8c a0 be c0 bd 7b f1 39 11 +b3 89 6b 48 89 fa 3d e0 4a b2 6b d6 82 b4 ab 43 +7c 0c 17 f3 53 a2 3a 43 e9 2e 20 e7 f8 20 69 4e +40 3a ab dd 5d 19 6e 93 89 5b 47 92 55 df 40 30 +ad 8c e3 a5 3d 15 73 be 22 6d 81 aa 18 e4 85 89 +57 a2 d0 a3 35 9c 2e 7a + +# Signature: +01 64 f0 db cd d9 52 11 86 a2 80 84 a3 f3 ae 6a +ac b6 59 6b 85 6e 8a ab 2e 72 a7 f2 33 d6 2d 2d +3e f1 96 d3 78 7e 4b 04 57 31 da 9c 61 50 ad 9d +5f 91 8c 6b 06 c9 2a 11 a0 bf d5 ef cc b7 b0 3a +01 07 24 14 39 d3 4d 31 3d 35 b3 6a 0d 8c a0 81 +3c 36 23 b2 bd 78 f2 e3 a9 71 99 64 8d a3 58 06 +ff c5 8e ed 33 ac 9f cf 79 53 8f a8 89 15 b1 a5 +75 85 78 b9 a2 db 01 38 04 bf 32 e7 a5 6d c7 24 +37 + +# PKCS#1 v1.5 Signature Example 8.20 + +# ----------------- + +# Message to be signed: +92 a4 b4 bc e3 da a0 a7 a6 4b 72 ad 87 1f 3a a8 +ea b5 ac 40 11 aa ae a2 ce eb a8 92 77 c6 43 29 +57 26 26 c9 56 88 4f 48 54 f8 61 3d 22 51 8b 14 +f0 38 fc af 9e 68 e1 30 02 fb 0a 00 a7 8c c2 ea +51 44 fc 13 11 76 d5 e5 d6 7e 10 6a 99 87 9c + +# Signature: +01 24 fd 8b 2a cf 22 37 fc 71 a2 ee 97 e2 6a 4d +ab 7d ea 82 9e 15 be b2 f8 a7 37 91 a0 ba 15 2d +a5 b0 6a df 34 1d 74 09 e8 d3 d3 17 5b 51 01 34 +32 5a 35 32 97 a8 d6 d6 6c 09 70 03 22 ee c5 e3 +3f 62 48 6a 21 11 30 d7 4c 70 dd 92 5d f8 60 2a +e3 c4 c6 cc af 93 cc 9a 97 0d 1e 85 32 60 ee c6 +94 81 c5 f1 33 7e 9d d3 ae da 88 d8 82 99 be 08 +09 5b 71 5a 5b 21 66 e6 17 c9 26 72 2c ed d6 ef +34 + +# ============================================= + +# Example 9: A 1027-bit RSA key pair +# ----------------------------------- + + +# Public key +# ---------- + +# Modulus: +05 f3 74 34 88 26 1c 6f 06 25 e4 32 fa 6e b8 7f +b1 2b 26 21 82 90 bf e3 96 ba 76 ea 42 61 32 2f +81 43 e4 b4 eb cd 5d 2a e1 9b 0f 9d 8d cd 2f c7 +e6 82 32 08 a7 51 83 3d 3b 4e 8e 38 7c 39 f8 ed +6b bc 9f da ec 32 d3 ea 9a bb ff 57 47 23 f3 f1 +22 99 90 96 3e a4 fd 9f b5 44 f6 42 90 aa 2e a7 +da 63 11 91 a2 0d bc 94 23 b4 61 23 3b 93 72 49 +f2 f4 ea 10 92 8f ae 2a 6f e6 64 f1 2c 09 23 ed +11 + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +05 f3 74 34 88 26 1c 6f 06 25 e4 32 fa 6e b8 7f +b1 2b 26 21 82 90 bf e3 96 ba 76 ea 42 61 32 2f +81 43 e4 b4 eb cd 5d 2a e1 9b 0f 9d 8d cd 2f c7 +e6 82 32 08 a7 51 83 3d 3b 4e 8e 38 7c 39 f8 ed +6b bc 9f da ec 32 d3 ea 9a bb ff 57 47 23 f3 f1 +22 99 90 96 3e a4 fd 9f b5 44 f6 42 90 aa 2e a7 +da 63 11 91 a2 0d bc 94 23 b4 61 23 3b 93 72 49 +f2 f4 ea 10 92 8f ae 2a 6f e6 64 f1 2c 09 23 ed +11 + +# Public exponent: +01 00 01 + +# Exponent: +01 4c c3 26 32 52 f8 c4 fb 77 cd 57 a1 42 0c 04 +c0 43 27 8a 0c 45 e7 d4 23 79 49 3e 34 0f 9c f1 +a9 6f 96 06 3a b7 59 d1 63 04 06 ae 28 6a 18 34 +b6 d1 db 71 ee 72 2c 93 74 5f dd 4a d3 3f aa 72 +d8 93 51 da 69 1a 7d 0a 71 d2 c5 5c 57 97 d2 cc +b3 b4 62 62 08 bc 5f 5c 84 fe 43 2f 66 4d c3 0e +de 09 63 e6 58 45 2b 2a d5 ef a4 93 5a 12 2f 46 +1d 1e ab 84 1c 8a e0 e6 e8 2f c1 fe e8 5d 18 1c +bd + +# Prime 1: +02 94 ea 0f a3 4e c3 13 72 33 44 20 2e 85 ec a2 +4b 5d f6 46 1a 1c 30 08 7d ca b5 d2 53 39 4a f5 +66 6f 03 5c 33 35 41 0d 8b b9 86 62 c9 78 f6 1d +37 db 4d 83 f0 b2 4c dc b6 3f ca db 79 c5 27 f5 +ab + +# Prime 2: +02 4e 19 16 52 f1 70 9f f4 74 37 40 85 81 88 8a +9d a1 09 17 c5 b5 ab af 91 46 10 9f da c6 94 76 +6f 4c 8f b0 57 96 8e 84 8d 99 58 6b 05 f8 a0 2f +ba 6c a1 eb 12 ba 08 df d4 9b 62 c2 7a 8f 15 f4 +33 + +# Prime exponent 1: +01 22 7f 36 dc 6b 14 27 89 fc aa a7 12 8b df 14 +fe d7 90 16 04 07 fb bc df bd a7 e9 88 97 18 31 +81 12 ae 81 6a 28 b0 2d 4a 0b 03 dc 8b fd d4 ff +c6 bb 67 f8 e4 65 1a 8f b0 b3 9d 70 96 b7 67 f6 +fd + +# Prime exponent 2: +02 25 ec 05 3c e8 da 6f 86 ad e3 6b d2 bf 43 93 +02 91 37 5b 1b 1a 51 d4 7d 0b 11 a5 17 8a 26 83 +34 f7 e1 94 92 1b b1 d7 5f ea 7f 56 c5 aa cd 05 +8d b3 7d 36 08 2e ac e4 83 4b 07 bf 7b dd ea b4 +b7 + +# Coefficient: +02 0b d0 f5 15 80 87 ed e3 8c b5 dc 66 e4 01 0a +e4 e4 8c c0 04 2e 15 2c d5 ee b0 51 c9 ec 45 ad +23 40 24 53 52 c0 1d 94 c6 a5 26 aa 5a 45 4c db +ae ac 85 95 34 9b be 6a 8d 55 19 a3 c9 b7 d0 7c +3a + +# PKCS#1 v1.5 signing of 20 random messages +# ------------------------------------------------------- + +# PKCS#1 v1.5 Signature Example 9.1 + +# ----------------- + +# Message to be signed: +82 e5 c5 aa e6 4e 60 8b 27 50 4b 91 db + +# Signature: +01 45 82 da e9 35 e6 b2 ae ff 7d 72 50 89 da b0 +58 c6 78 b2 ee 28 bc d4 44 a7 2b df ac 31 46 3e +18 e9 4d 7b 5e cc 84 a4 31 69 6a 1c dd 79 f9 c0 +8c 33 e1 d4 b3 22 dd 27 7b 50 3a e6 e4 f9 c3 15 +30 5b 43 72 fe 45 fe 4a 7e bb fc 4a e5 90 fa 3c +52 0b f8 28 15 8f 78 20 29 9f 09 b1 34 ed e1 17 +b6 72 a1 ea c2 f0 50 c0 44 b2 55 ca 8d 45 52 d4 +b5 f3 f5 7b 87 34 db 24 74 50 07 44 a5 33 75 00 +5e + +# PKCS#1 v1.5 Signature Example 9.2 + +# ----------------- + +# Message to be signed: +77 e0 fb dc d6 e0 49 8f c5 68 4f f1 3d 4c 9f 5b +78 0e 77 e2 46 46 37 ff 66 ea a2 d7 d9 c3 de fb +9b 0e 3a 38 37 73 db 97 a4 fb 49 1b eb 21 14 fd +ea 2c 2a 48 0f fc 21 9b 79 6a d8 05 d5 4f be c1 +7d cb 34 b1 da 17 96 cb 9c d5 f2 41 6a b5 e7 66 +f8 e0 06 91 8e be c1 82 29 98 a2 8f ff a6 23 0c +07 87 26 fb a2 e4 a7 b0 + +# Signature: +05 93 27 ce e7 26 ff b6 03 e8 a9 fc d5 74 ab a9 +cb df c3 6c 0a a6 6f cf e3 55 5c f2 ef 35 82 d3 +22 0d f9 d6 bf 8a 78 e3 ff f0 c1 29 b3 ab b3 dc +71 21 12 a2 05 6b ca 08 63 65 54 c1 ac 57 df 87 +f3 66 41 52 68 8c 6a c7 2e 6b 88 f5 63 7c d7 3f +16 69 89 c8 29 09 fb 67 bc 1f a2 e2 d5 23 e5 1c +91 8f 2b be c1 d7 52 02 af 24 0a 61 cd 2d cc 55 +5c ae ae 9a 68 57 0d 77 81 0c f1 df 81 23 ff 41 +c0 + +# PKCS#1 v1.5 Signature Example 9.3 + +# ----------------- + +# Message to be signed: +0d fa 5b aa 1c dd b8 34 70 7a 5f 8c c6 ec e5 71 +a7 a7 fc a5 67 63 62 d2 b2 37 41 a9 57 0a e2 63 +8f 6b 1c 23 89 85 36 75 cc c6 cc 1b 4c 6d ae 23 +cd a7 1a b9 6b 5a 2f 22 14 57 50 43 3e 2d 6b a4 +27 6a c1 ff 9a 48 af c9 f3 12 f4 13 37 85 ca 5a +f3 74 66 74 31 9a 67 57 a1 64 e3 4d 14 98 bd 55 +30 90 2e 32 18 55 e3 be d4 08 81 f0 05 42 25 6a +a2 1a 42 fc + +# Signature: +01 d1 95 41 69 af 58 99 3e 14 77 2a 94 f1 9b c4 +79 24 cc db 2e 90 ee 43 36 fb 6e 08 49 8a f4 da +26 51 a2 b7 83 6c 31 3a 57 c8 61 b5 51 84 ec 3b +15 fa c8 14 53 51 be c5 a7 27 0a 3a a8 69 4d b4 +e9 a9 2c b9 32 7b b7 a4 f7 b7 0d 24 4e af 9e bf +a9 ed fd 4d 54 78 2f 3f 97 26 26 95 b9 7d 41 6e +52 7b e4 ea 2d ef fe 6e b5 e0 6c da 6f 0a 7e 41 +66 77 ac 0f d6 f8 19 5d 4c e2 89 70 d2 ca 41 1a +2b + +# PKCS#1 v1.5 Signature Example 9.4 + +# ----------------- + +# Message to be signed: +16 7e 79 56 8c 77 36 69 0c 3b ed bb c8 d4 24 eb +53 6a 12 85 5a 60 cd b1 0f 94 ba 11 23 17 e9 17 +a1 b7 d6 fc fa a3 43 8d 68 ee 09 fd 47 + +# Signature: +02 9a 2b 90 86 14 ed 7a 5f ab 72 f2 a1 c8 e5 48 +b6 f8 b8 b4 5b 75 81 fd 24 51 fe 45 a6 22 fa 0f +08 dd 0b a2 e8 f3 c4 17 20 1e a0 27 79 10 18 4f +37 6d a8 03 fa 72 c5 0d 39 be 28 82 52 6d 1e 85 +df 9a b1 79 75 76 4a cf b2 07 36 6f 6c d2 c8 b1 +36 a9 99 da af 48 f1 c0 8a 9e a1 f0 84 25 c2 1b +65 41 80 da 4a df 10 9b 4b c5 b8 17 dd 67 bf 7d +aa b4 a3 84 03 4a b4 ad e6 94 89 8c fc 27 2a b6 +53 + +# PKCS#1 v1.5 Signature Example 9.5 + +# ----------------- + +# Message to be signed: +0d 03 f7 12 84 f2 e4 83 24 2d 92 3f d1 e1 53 bc +16 0f 0c dc 2c 0b 76 f1 bc 2c f7 d1 be 9c cc 7f +af a6 af c3 90 34 01 84 09 cc fd 16 28 a7 0b 35 +83 33 bd 96 ee d3 ad f3 14 2b 17 60 bf 8a 9b b1 +9e a2 47 3a 2e d8 5c 91 cd 5f 0a 5f 2d 46 32 d6 +17 64 19 fa 1d 8c c8 8b 67 08 47 77 11 ea 49 58 +a8 39 01 fe f2 84 f5 a6 c5 02 79 8c 8b d0 a3 50 +f2 ea 83 ed 18 1e b9 70 d3 0b 78 13 4c 8e 1d 64 +f0 d1 49 5b 70 17 24 5f a6 9b d5 74 27 f7 49 20 +ba 0e ed e9 cb a3 4e b2 22 76 b0 f2 74 13 ba 3f +0d a8 eb de db 9b 0c 80 0e 44 48 1d 01 e6 bb b0 +df eb f9 a1 5e f6 a7 02 0b 2c 55 ee 02 79 11 79 +6f 66 f4 3d d8 46 02 1f 8d 6f 7e 01 bb 80 2b ac +09 fd e9 b9 04 be cf 99 90 e6 84 e6 56 9a ca eb +3c c6 4d cf 5d + +# Signature: +04 22 79 1f e7 b4 3e 1f 31 9a e6 7d 91 8c 59 87 +e6 39 36 81 a1 86 1c 1e 71 dd 6f ce 19 23 71 0d +bc ed 43 01 fd cd 4a ad 8f 4f c2 7d fa 02 a9 4d +91 bd 96 20 0a ed 8b 3c 5a 96 ef ee 7d 11 af 90 +87 fb 81 90 5c 5d f2 c2 4e d7 ed 63 d5 fc 22 ba +bd 6b 9e 3b 57 cd 25 41 9a 78 17 e9 36 16 e9 34 +54 b9 58 53 fe 52 04 b5 8c 09 8b 46 de 0b 3f 01 +f5 82 76 32 48 c2 90 b9 e8 09 69 65 24 42 a4 d8 +e5 + +# PKCS#1 v1.5 Signature Example 9.6 + +# ----------------- + +# Message to be signed: +4a ca 96 3f 14 ac f6 a7 9c 51 08 1e f2 57 16 66 +71 e3 b4 5f ee 31 24 07 ba 3c f6 d7 11 ab a1 ae +25 a4 a8 ba 45 48 19 a3 91 2a 31 2e 99 0f 1f a7 +4c bc b7 27 77 f1 c7 c6 63 a2 d1 cd b2 c5 c0 07 +4d 45 16 f4 87 17 de 14 03 e8 ff 7d 0f 9d e7 c7 +c8 51 f3 e3 51 16 8b a6 c4 14 be d5 d4 2b ae 52 +7b 72 4c eb 83 4d 79 ba cf 70 2c 56 a6 23 c1 68 +80 87 dc 9d e9 53 8e a7 c7 c7 61 cd 2f d5 78 f0 +dc 3f 55 2f fb d4 af c7 f4 ec 71 22 fd ec 1a 3a +2b 10 4d 53 2d b8 1c b9 14 18 54 d5 7d cf 54 b7 +56 01 a9 05 fa ed a6 5c 2a 7a 7b c2 b0 29 ad 12 +dd 7a 6a d1 b4 0b e0 40 28 b4 b5 b6 37 30 ef 98 +44 73 f0 c4 82 14 89 93 c3 6b 44 e5 4b e9 a5 f2 +34 e7 43 29 2a 12 a3 4b f2 ff 73 b7 f7 98 + +# Signature: +04 26 43 c0 3a da 72 4e 2d bb 19 cc 07 ad 0e 75 +22 28 b9 d3 6f 65 3c 6a 9c 0c 29 35 6c f4 c3 f1 +ca 19 37 76 d5 fe f4 3f c5 54 17 71 66 69 de 9a +b2 ad dd 3e a8 8a 90 ae 93 9a 5e b1 10 13 e2 28 +ae 08 16 ee fa 4d d4 2c 6c 08 c8 78 bd 58 b4 90 +40 29 6a 86 3b fd 11 28 5f 8b bd 31 5b e1 6d 2d +65 d7 f5 e5 f2 6a a9 71 47 f9 5f 5e e3 6f 98 9a +a8 96 d7 f9 f1 b3 05 1f 82 42 44 f9 05 96 72 3d +11 + +# PKCS#1 v1.5 Signature Example 9.7 + +# ----------------- + +# Message to be signed: +a7 5a 45 80 + +# Signature: +00 4f e4 c5 d9 14 3c 85 1e 46 16 7c c1 81 57 5c +07 5e 69 b9 81 f9 c1 03 f9 d9 b0 11 ff 8b 29 ba +55 a4 31 87 ce 87 77 99 63 17 a0 3c 9d 90 af c1 +89 0a 9a de ec 8e ac 08 7f 99 b8 15 e6 eb 2b 87 +1d cd dc 80 92 24 9d 8f 51 3c 6c 56 09 fd ae 2c +fc 6b f0 1f cb 80 25 a4 f7 9b f1 2a a8 e1 09 82 +9a 0b b3 8a 09 d1 a3 93 65 e0 40 56 52 da e4 51 +e5 c3 29 8f 47 04 05 98 ec d7 0e 4b 40 33 89 bc +d5 + +# PKCS#1 v1.5 Signature Example 9.8 + +# ----------------- + +# Message to be signed: +7c fc 00 a6 43 ae 99 79 68 01 ee 3c eb e2 cb b1 +a6 be 1c ac 15 c6 48 d4 ba 33 01 29 38 71 a9 9f +7c b1 43 c1 28 c7 7f 96 31 1f e4 3a 39 01 df 2c +2a 5c 40 4b e8 31 46 97 e0 9b 2e 80 aa c6 ac 39 +97 1b be 0d bc 26 67 3f 31 95 9f 23 8e af d1 50 +12 e4 96 7d 33 55 18 92 a3 d3 65 1f e4 46 9b 2d +ba 45 57 df 89 3a b6 b9 4f 13 25 c3 a1 + +# Signature: +05 98 5a 4c ce d0 e8 fd c5 89 24 ed ba 9e 40 0e +67 48 21 4f 8d 0b 83 aa fa 20 35 0b bf 0e 68 76 +ca 5a 9a f3 97 0d d6 3b e6 84 f9 93 6d b2 82 ff +8b 53 cf 5f 1b b1 cb f4 47 33 01 f3 72 d9 94 8a +f9 39 1b 20 02 b2 be 3e 45 ff 24 a2 d8 99 ae 8b +52 b6 71 b0 4b ab 46 01 06 be dc fa c0 13 95 9a +48 18 95 98 42 7f b9 57 15 9a 6d 32 9c 19 f3 6c +a7 53 81 b9 35 0d 34 38 9c 16 e1 80 a8 51 e4 57 +cd + +# PKCS#1 v1.5 Signature Example 9.9 + +# ----------------- + +# Message to be signed: +3d 90 de 72 35 51 59 49 24 5f 49 03 68 c1 f4 93 +83 e4 4c 1d b5 1d d5 38 5b df f5 bd 34 45 0e 63 +ce 42 15 0b 44 1e f9 eb c7 29 a9 03 34 53 f0 a9 +39 9f f6 86 1f 50 65 b6 66 6d c2 0b 28 72 03 42 +8e 72 bd f4 cb 74 8a c8 d4 a5 5f 43 d2 23 5e 0a +b2 ec 2c f2 b0 6a 01 5f 41 e3 51 68 ac 7e 3c 56 +8f 2f 16 ef 57 28 b2 be 95 24 91 9d 36 76 d6 8f +53 7e fe f2 9a 05 af 97 cf ed 7c e9 ec 45 c1 2f +16 5e 4d 7a 4f e7 2b 99 ea bf 83 31 6c df 2b d1 +64 4b 82 fa 13 e4 ff c4 49 e7 6d 44 c3 87 69 63 +51 47 8b 1a 0f 85 96 15 da 90 5f 20 e6 8b 24 56 +5c 87 3f 83 4e 59 34 58 51 8a de 41 c1 42 81 74 +da 0c 47 66 3a 76 00 c6 50 25 01 5e 09 c1 + +# Signature: +00 98 13 b2 fd c5 1b ff 88 de db ec a3 b1 4a e5 +8b c7 e7 14 c1 d9 2d 74 26 e4 94 4e f9 3e f9 ce +6d 10 dc 98 9e af e7 34 8d 0a 95 f9 9f 56 94 8f +72 60 2a c5 e8 61 4f 6b 38 e6 8d a7 9f 48 e2 76 +8e da 58 64 cf f2 54 51 37 f3 cf 4d 81 a5 ae b8 +9b 21 07 26 74 ca eb a0 00 71 00 c0 7e f4 dc bb +d0 5a fb ad 9e 8b 30 d7 46 ea 36 0d 6c f8 75 d1 +0a 67 a5 7f 4b 5d f4 12 1d 72 97 a4 bd ce 12 8c +b5 + +# PKCS#1 v1.5 Signature Example 9.10 + +# ----------------- + +# Message to be signed: +20 e6 a3 fe 16 b5 21 b3 c1 e6 ae 99 3e c6 e8 49 +a9 c1 1f 20 42 a2 d4 ce 89 cf 0f 99 e1 b4 b9 47 +1d a9 a1 73 0d a8 85 1f c5 ab 3c 09 22 05 5f 00 +37 58 b2 35 c2 8d e4 08 80 66 3f cd 80 14 07 18 +15 dd 06 49 4a 54 7c ce c3 34 8e 12 d5 38 d5 df +b4 8f 80 7b 59 e9 b7 cd 81 f3 91 c0 2c 01 6c d9 +c1 a8 4f 9c 59 51 79 d8 f2 00 24 2a 56 68 18 2c +f2 cb a3 b9 fb 6e ad 45 1d 6d 27 d9 c7 36 15 25 +d6 88 b5 52 33 ff 45 29 1c c0 74 02 d2 92 de 0b +e8 3d 16 46 c4 3c 28 88 1f d4 55 49 b1 4d 12 61 +b1 2f 12 04 38 27 6c 6b 3f 98 f5 5b cf 17 80 bc +1a 91 eb 11 d0 22 9e 1d 78 68 d7 fe e4 9d 6b 91 +68 e2 4d e1 cb 4f 0f 22 e6 7c bb 15 69 20 41 13 +02 72 94 b3 7e c7 fa e5 8b c6 4e 82 5e aa 4d 56 +94 d0 05 8f 2c d4 c7 d2 14 18 da 3c 03 07 fa 2f +04 92 e8 b3 77 58 d3 ea 40 a4 e3 0f 60 + +# Signature: +01 f0 2b 3f 83 91 23 af f2 a3 f4 3d a5 aa a0 b6 +bb b6 0c 04 37 82 f4 96 2a 7b 9f 02 5c 94 8e 34 +32 2e 98 de 37 03 e3 bb 45 a7 06 a2 bb 05 09 be +d9 f4 10 52 8c 88 1a b9 a1 dc 01 97 06 8c 37 28 +c3 71 6d 83 81 d9 f8 67 80 fe 78 a6 43 4b 72 f5 +1e 69 cd 32 a7 21 3c ce a7 43 b3 3c 3c 96 eb 00 +42 fb 98 a7 0c 2e 52 fc 17 8a b2 cb 9f f8 bd dd +c1 04 6b 08 e0 47 ba dd d6 5a 45 a4 e6 53 39 d7 +25 + +# PKCS#1 v1.5 Signature Example 9.11 + +# ----------------- + +# Message to be signed: +6e b4 9f 8a bc 5b 49 48 72 0a 7f 42 f7 40 84 78 +00 22 e0 e9 f9 f6 88 86 d9 f3 4e 7f 7f 8a c1 54 +db e1 9c 91 b8 ed 38 ec 03 6b 61 42 12 ca 35 f7 +9e d8 74 57 9e 24 85 da c8 20 5d 0e 56 b4 b4 c0 +00 0a 8a 75 a6 d4 97 fc 51 19 11 1a 40 db 51 3d +f6 61 96 55 b5 8a 11 6f ab ee 08 2b fa 79 37 3d +91 76 56 87 10 11 24 18 87 f4 42 60 8b d1 eb 1d +95 d1 76 80 65 fa 63 32 4f ab 27 36 f9 22 70 5c +f2 89 fd e9 26 74 33 85 92 07 a8 bc f1 2d 17 86 +1c fd 06 2b 88 df 78 87 0d 5a 5e 91 13 1b 63 + +# Signature: +02 a2 fa 32 71 77 96 71 0b 52 b0 51 90 6c db 98 +15 b2 d0 36 6c 07 0a 78 ff 72 d4 59 42 d7 ad de +ae 7e dc 73 ca 93 01 f1 f9 fa e6 8a 0b d4 b1 df +05 a9 a6 71 f8 a5 b7 d4 5c d1 1f dc 0f 0b a0 9d +25 ce c3 b6 30 3d 9a 66 6c 76 32 64 96 ea 31 ae +38 86 a0 c3 b7 d2 27 62 ee a2 78 93 4b 96 a4 f9 +0a 50 1a d3 08 8f 70 2e 14 76 3c e3 38 46 e2 fd +be 6d 66 1c b8 2e 6d 98 9d f3 c5 ac 8f e4 0a 85 +62 + +# PKCS#1 v1.5 Signature Example 9.12 + +# ----------------- + +# Message to be signed: +45 cf ec 13 2e e5 93 f0 c3 f3 81 3d 3c b4 49 e6 +e5 e6 1d 13 de 52 9a e3 e7 1c 99 8e a4 56 35 9c +e6 6b 82 04 5b 7a c7 97 fe 96 98 5d ea bc 51 22 +53 0b 2e 29 ef c9 75 ee 96 03 b4 f9 6f 3f f4 e5 +9b 0e 35 a9 ad 92 f2 b8 67 79 4d 8e + +# Signature: +03 9b e4 8f 13 3a e7 f0 b1 9e dd b2 13 56 09 73 +a3 e2 a1 14 6c 79 42 f8 26 4b ba 5a d0 08 69 2d +11 38 01 fc 27 78 a7 e3 3a 9e 11 5e a6 32 e5 01 +88 c8 7b 69 e8 d4 d8 cc a4 8a bf 9f 25 1e fc 00 +17 b9 9e de e5 66 dc dc 0b c5 8d bf 6d 67 bf 86 +3d b8 a8 9a bd f1 2a 77 f1 b7 0d e4 39 d1 76 f2 +ea ad a5 46 4c 79 a5 84 27 0c a5 14 f4 8f 1d ae +86 78 ec f1 ac 29 6d 07 c4 68 98 ba d4 1a cb 19 +9d + +# PKCS#1 v1.5 Signature Example 9.13 + +# ----------------- + +# Message to be signed: +22 51 29 87 15 7c f9 b9 ab 4e 53 37 b0 98 91 d6 +3c ec 37 43 c0 f7 bc 9d 18 2e + +# Signature: +02 c7 75 7f 99 93 ef 8c 6d 60 a3 f5 ab ed ce a5 +35 df f5 5a b9 f4 f6 2d 12 54 bf 26 1d d6 a2 ee +52 da 63 49 f4 7b 9b 28 9f 1d 0e a3 e0 ff 08 f4 +55 fa 54 85 65 8e 42 17 f4 40 c0 8b 90 ae 4c 6c +c2 56 97 cb 83 35 31 db b4 74 03 25 43 10 0b 5f +92 b6 78 19 5d db fb 1b 59 c5 9b e7 c8 3d d8 17 +45 cd 4e 70 9a 0e 3f 79 8e ad 5b f8 66 2d a6 5c +10 57 cc 08 2d 90 50 50 c4 65 95 8b 55 5d 77 b8 +b1 + +# PKCS#1 v1.5 Signature Example 9.14 + +# ----------------- + +# Message to be signed: +ae 48 cd 83 f4 a1 f9 4e 17 19 21 96 90 c8 c6 f6 +73 7a bd 15 e0 d0 8e 7f c2 ea 0d 31 5b 45 be c2 +46 e8 45 bf 17 60 c8 6c 3f 82 d8 4b 1e 9d 68 dc +cc 01 d9 a7 d0 7e cc 6b fb ee d8 3d 7a d0 3a 6d +56 6a 89 bc 64 42 1e 7e b4 7e 52 c0 23 86 58 d5 +e4 c5 59 7f 12 5a fc 6c 83 3c 63 cd 6f 97 f9 dd +5c ce 8a 26 38 80 7c e8 a5 83 da 03 2b ec 81 a3 +8c d2 99 a9 c7 8e 82 54 f2 88 51 64 13 52 5f d9 +4a 9e 0a 95 c6 56 d7 3c d5 2a 4d cc 7d d0 94 7f +4a 00 5e ae dc cf d0 3b b1 71 5c 35 1c f0 59 cd +52 2c 7f 53 8c 16 28 e7 2a 05 64 4e 8f ff 50 92 +6f a8 68 2a 67 53 78 6f 2a a2 61 0a bf aa 95 bf +99 af 15 61 71 51 d0 bd 0f c4 6f c3 b2 9c be e1 +e6 63 b9 23 13 6b 5e 19 92 83 9f 0b a5 2e 44 fc +cb d9 f3 20 ed e2 0f 55 a4 23 77 0e 57 3a 9f b2 +b3 6d c8 f1 84 + +# Signature: +00 fb a9 f6 f9 59 b1 70 b0 94 6d cb db 98 dc 8e +84 79 c6 69 ad ba 6c 54 63 6a 2d c7 d7 f7 03 3d +35 04 05 d7 17 f2 d6 3d ae 65 c2 4b 37 db 1d c3 +e9 f6 17 43 af 1c e6 de 24 67 d1 85 ae f0 8d 2b +f8 65 f0 75 ba a6 a2 9c 58 06 61 dc d4 a4 8f 21 +ff 4e 7b 03 9e ef 1e 1e 20 ba 80 cf 20 ea b6 ec +de 60 fa 5d 37 67 a3 0e 6a d4 14 47 13 ca 49 fc +03 80 99 af 53 6c 0d 5f 55 c4 cb 15 33 53 81 be +a0 + +# PKCS#1 v1.5 Signature Example 9.15 + +# ----------------- + +# Message to be signed: +2c 8a 00 7b 60 30 56 d3 31 87 bf 52 ce f6 16 1a +a5 f5 f5 33 7f c3 59 d4 63 44 72 1d 94 5f bc 4d +24 0d 30 62 0b 29 6c 39 77 cf 45 c2 47 eb 2c 36 +39 40 79 98 3f 03 ad 82 39 9c 4b 28 6c 48 16 59 +10 b3 48 b9 5e f3 9c 43 bf be b3 56 6d 1d 1e ea +5a 42 7f 4c b1 68 1f 2a 7c 40 1f 3f 0d 6d 9e e7 +99 3b e5 ec 5d 34 a7 55 41 e9 f8 dc 7c 60 69 a8 +97 7c 9f 93 6e db e4 1a 4e f7 85 a3 ef 7b a0 51 +89 90 09 ed 61 2a 22 8f 90 31 67 a9 34 ee e6 9b +4f 87 36 c2 95 11 c6 bd c6 1e ee 96 08 a9 91 1b +ba 52 83 9b e9 9f 91 d2 ef 85 b8 cf 10 c1 d6 35 +08 08 29 ba 79 91 fe 2e f8 2e 2b ae 27 08 14 06 +e8 9b ab 75 c3 ed 19 e8 7a 4a db 72 ec 26 21 f3 +f2 58 5b 38 cb b3 6b 3c 0d 40 5f fc a7 a6 fb 02 +24 42 07 94 cb d8 d7 83 18 01 c8 81 e1 65 + +# Signature: +04 10 47 e2 42 b6 44 87 41 f2 8a 4c 8b 2d fe ca +cc 0f f6 61 9e 95 6a 6a 6b 10 cd d0 1e ed d2 01 +c8 0e 0f bf 7c 5b ef 52 a7 aa 99 00 a8 59 39 4b +47 e8 3d 08 b5 e1 da 03 a3 35 54 00 0c ce 17 c1 +d8 62 29 a3 a2 03 50 d1 16 43 a7 58 c1 16 b8 fb +f7 26 60 df 4c 86 ef 8c 1f c4 54 4c 3a e1 d1 fc +3c e9 f2 63 f6 2e 80 07 cd 7f f7 ea 8d 50 a0 82 +83 89 ff 43 1f c5 c5 62 81 6d 3d 24 b6 07 21 1d +29 + +# PKCS#1 v1.5 Signature Example 9.16 + +# ----------------- + +# Message to be signed: +7b 15 d1 a7 9c 7a d2 d1 2f 75 da 57 d1 4a 8e b7 +1f dd 4c 4e ff 52 43 74 1a cd e2 3c e6 da d3 08 +c8 1d 5d 58 0f f9 c3 f8 93 ff 12 4f e4 58 b3 18 +84 da f7 fc 44 66 d7 00 dc 49 3f 1c 7a 7d bf 62 +24 1b 17 e7 36 23 fa 17 81 4a b4 d2 c9 24 5b e8 +3b b3 cc 5f 94 44 b1 52 17 b2 44 1f 45 9c 00 b8 +2e 58 68 9a 11 dd 5c 59 fa 39 5d 1a 6f 9b 2c 25 +cc 84 99 92 7a b9 a4 98 28 53 36 52 ce e2 32 32 +97 2d 65 69 ee 56 44 78 66 f1 0e ba d5 4e a3 f0 +61 32 0c 6d 3f ef ce 34 55 2b 62 66 96 7b 05 78 +d6 c4 55 b9 ac 24 66 36 17 12 e7 d0 5b d3 33 2e +c1 30 d4 5c 6a 49 76 16 2c 79 7a d1 36 3f 49 69 +e4 ae 3d ed 6e 36 ea 2c d7 fb 35 66 09 be 03 1a +79 b2 94 + +# Signature: +03 02 52 90 b4 46 2f 9a b7 9f df aa 7b 1d 53 a4 +d1 27 96 c8 5a ac 28 de ac 21 27 c8 25 2c 2a 62 +39 5a 8b 81 9d fc ee bf 68 dd 4d bf c8 7c 1c f3 +d0 17 a5 3a 26 40 92 50 6b b6 fc 95 28 e6 f8 76 +78 73 6c a5 6a 14 a1 aa 26 77 a8 b8 4f 5e 03 fa +2c 0c e4 78 5b 26 ba 92 e7 5f bd c1 6d 8d 4c 7f +b0 bc 39 a8 8e 13 2e 1e 05 ad 00 f1 2f 07 27 06 +34 3f 5e b3 da b5 11 2e 3b be 76 ed 0b bc 7b df +cf + +# PKCS#1 v1.5 Signature Example 9.17 + +# ----------------- + +# Message to be signed: +7a 76 44 00 1f 80 13 c5 0f d7 17 b2 44 65 47 7a +bc 34 ba 9c 1e 53 ad 76 32 64 5a 6e f7 c8 e6 4e +8e cb 7b ca 5b 4f 09 b5 2f 4d d4 8f 8b b3 dd 33 +8c 78 18 2c e8 6e 8b fb 1c 68 a8 76 f7 32 16 63 +06 a8 ea 8c 0d 7c 21 ff 26 fa af 4a b4 55 10 36 +19 50 c7 6f 95 c2 73 0b 9d 3e 4d 6d 85 ea 25 58 +4a c9 67 a0 2b 1e 0a 26 + +# Signature: +03 b2 ac cf ef f0 63 bd 17 5e f8 ae 0c b8 5b db +80 0d dc 27 77 6f 8d 3d c7 e2 1d 19 9b b8 d6 5f +5b 24 2e 79 d4 5e cd cf f0 2e 80 3f 56 81 ff 04 +4a 43 b5 5a 9a ac b1 ea f1 67 84 83 8b 1d 5a 2b +7c 1a 36 4d c4 05 31 1a 65 55 05 7e c7 3f 0a 8f +4e 0f fc a4 23 02 2c a6 ad 74 46 9b bd 55 57 bf +a1 cf 4b 95 63 6f 53 45 37 ef f2 fb 16 af 5e 64 +71 82 4a fe 21 67 91 8c 89 ad e0 1d 52 ae a7 39 +9d + +# PKCS#1 v1.5 Signature Example 9.18 + +# ----------------- + +# Message to be signed: +12 d2 24 fc 10 a0 fc 40 95 3a b6 d7 01 c4 16 c3 +a8 23 77 2b ea fa + +# Signature: +03 2c b5 c8 d6 12 90 b7 66 e6 49 8a a6 01 49 4d +9f 06 6f 27 a4 7a 28 70 f3 67 89 43 29 1a b2 2d +3c 45 c0 76 e5 60 81 9d 33 f8 89 f8 cf ab 2d f6 +c6 3c 0c e1 ed 5c eb 51 54 70 77 c0 82 78 18 7a +82 72 fe c7 de 95 54 cd c9 16 ca 72 f2 c4 51 43 +f2 cf 32 43 c4 bd 20 0c 6e 99 3f 0d b5 b7 1d 4f +63 77 1e 24 9b 19 b9 97 a6 e5 a9 19 ca 10 0c 90 +fe a6 a2 d4 dc 68 81 c3 a0 e1 c1 35 53 83 cf bb +4b + +# PKCS#1 v1.5 Signature Example 9.19 + +# ----------------- + +# Message to be signed: +e0 d4 e2 a5 e9 8a 51 23 7d a5 08 5d cf 09 8a e2 +c0 5b 4e 16 92 54 ee 6d da 16 21 0e 4a 3f e8 1c +72 56 ea ef f2 8c 0c 63 d8 54 b7 84 1a 13 6c 43 +60 b2 15 dc a0 58 74 8a 4b fa 82 58 68 04 28 21 +99 2a 4e d5 a7 d5 8f 80 12 20 75 49 be 8c c9 ce +cc 85 01 b9 f8 02 83 0f 86 58 45 ce 2e 33 9b ec +28 05 96 11 a1 a0 0b 55 35 c3 c6 15 e9 d2 a1 39 +59 f1 01 5c 8b ad 2d 75 3a 59 a6 14 3b 3a 30 58 +ef 72 25 60 ff e1 c1 84 87 c7 41 da d6 1f 07 a1 +56 42 e7 26 ad 18 a9 84 87 5e 68 c6 2e eb ed cf +94 6f 13 b8 93 b2 80 8f 78 f9 29 48 07 d7 74 68 +54 94 e6 b8 90 40 ee e6 de 1b a7 18 ba 2e 08 2c +3d 5e f1 7c 10 28 cd 66 + +# Signature: +03 e7 83 bb 53 db b6 7c f2 19 5f c1 a5 7f 4b 74 +c9 82 03 b1 f3 d6 15 fe b9 20 e4 ab e8 37 58 34 +67 2f 4b 8f 55 fe f2 ac a8 b5 d4 0a ef e4 ef bd +aa c3 e8 21 08 d0 7f 2f 1c f8 c0 d4 df f8 1b 39 +66 ec 69 be 51 17 ac 1a a6 11 8e 46 0b 92 d8 8f +cd d9 4d 08 eb aa 53 62 e5 9d 52 00 4b 43 36 95 +14 37 da 0f 51 d6 3e 50 56 15 b4 b7 55 54 08 0b +94 89 7f ef 29 3a 34 c4 04 00 c4 f9 9a a1 de fe +35 + +# PKCS#1 v1.5 Signature Example 9.20 + +# ----------------- + +# Message to be signed: +64 b3 ba 40 98 03 c9 b9 60 c1 c4 96 2f 51 27 1b +c8 9a 40 bd 40 5c e5 bc dc 88 51 d9 7c 9b e5 e5 +b7 46 4e 50 d9 9b 6c f8 ad f8 ff 83 2b 73 7d e8 +b6 ff 1a be b8 9d ba e9 3a 90 63 94 87 80 6b 05 +96 cd 31 68 60 f6 8f 00 27 a3 50 3e 15 89 67 af +df f4 69 07 68 17 fc 7d a3 22 3c ca 1e 6c 48 97 +3b 57 0e 0b f7 4b b8 b3 96 54 37 2b 7a 1d 6f + +# Signature: +00 d2 00 eb a0 b6 52 2a fb 42 0e bf 16 48 8c 53 +03 52 c4 2d de 81 e7 64 c0 ca db 43 82 8c b9 98 +d0 a6 0b 23 b5 b6 95 8a 00 fc 25 53 e2 35 e8 57 +4e 4d 4f ec 9e 66 8d ba 40 de 66 61 ab e1 3f cb +84 c1 ad 15 c4 b0 cc 0c 6f 4f 0f 83 77 87 c4 32 +5f 04 5d 61 ee 2c 99 72 b0 1f 32 12 65 4e c4 26 +62 56 7f aa c4 0e 9c 0a 28 15 8a 2a 6c 31 f0 1a +84 91 26 df 9e 96 cb 82 09 be b5 81 d6 84 6b b5 +ab + +# ============================================= + +# Example 10: A 1028-bit RSA key pair +# ----------------------------------- + + +# Public key +# ---------- + +# Modulus: +0d 5f b9 9f de df 42 56 e2 8d 4b 41 d7 07 fc 27 +63 3e 89 95 15 f4 da bf 6b 46 27 10 ac 11 25 81 +fa 73 fa 83 69 58 2c 9f d4 52 5a 70 16 18 99 df +63 25 84 9e 5c 43 49 3e 13 35 4e 27 09 55 a4 3e +38 35 b5 99 8e d4 2a 57 5b bf 68 8d 69 ec 36 6d +2b a6 f0 50 4c 1e e1 7d c5 9b 7e a0 b4 64 0c be +cd 8b d7 96 2b e8 56 6f 0e bd 65 57 43 65 6a 29 +12 85 e0 37 bb fa 86 55 80 1b d0 31 4f 46 4c 56 +91 + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +0d 5f b9 9f de df 42 56 e2 8d 4b 41 d7 07 fc 27 +63 3e 89 95 15 f4 da bf 6b 46 27 10 ac 11 25 81 +fa 73 fa 83 69 58 2c 9f d4 52 5a 70 16 18 99 df +63 25 84 9e 5c 43 49 3e 13 35 4e 27 09 55 a4 3e +38 35 b5 99 8e d4 2a 57 5b bf 68 8d 69 ec 36 6d +2b a6 f0 50 4c 1e e1 7d c5 9b 7e a0 b4 64 0c be +cd 8b d7 96 2b e8 56 6f 0e bd 65 57 43 65 6a 29 +12 85 e0 37 bb fa 86 55 80 1b d0 31 4f 46 4c 56 +91 + +# Public exponent: +01 00 01 + +# Exponent: +e7 6f 42 b4 74 02 d5 e0 f9 64 64 92 5a b4 b3 bc +68 94 30 0e e4 86 fb 70 ce d4 91 f2 d1 b3 67 80 +84 c1 c2 cb 96 95 68 a5 f7 7d ab cd 40 93 39 37 +a8 67 f9 34 fb 2a ea ae 6d 78 67 98 e0 d0 4a 10 +6f 54 5e 41 a9 c9 38 33 d8 1f d4 d7 53 53 17 9c +b0 bc a4 5e 79 aa c9 41 34 64 b0 36 7f 31 ac 5a +ca 56 6f 22 14 bf 51 46 a9 48 4b 87 e4 2b da c2 +b0 1a 99 67 03 50 6b e0 77 49 aa 0f be b3 b2 29 + +# Prime 1: +03 ff af 4a 61 21 d7 42 0c fd a6 4c 41 71 2f 47 +c8 f2 d0 d2 5b 17 e9 5b 35 41 42 84 69 10 af ef +bd f2 1e 74 23 e8 b3 be 44 ae d9 af 5e 49 81 68 +5d 3b 9a 1d 59 c9 b9 47 fb 9c 33 9c 9a 31 e5 7b +d9 + +# Prime 2: +03 58 31 e3 b9 29 3b cd a4 51 be 9d b1 91 97 48 +6a a2 e2 2e 92 98 65 0f 2b 7f f4 25 69 eb ec 33 +d2 0a 34 98 44 a3 3b ea a0 93 d1 43 4a fb 4a 04 +a0 4a ed d3 bb c4 b3 87 77 a5 5f e6 50 5b 8c 15 +79 + +# Prime exponent 1: +02 8e 91 d5 ab ba 69 dc 50 56 38 e9 f5 c6 9c 06 +f8 d5 5a f5 c7 4d c8 e7 8b 6c 09 4e 85 a8 27 f7 +d2 ab 69 11 b6 8c 6b b2 b4 54 61 d9 a3 1e b9 62 +b4 8b 12 06 c6 8d 18 ae 90 92 d6 e5 c2 2b 39 a4 +31 + +# Prime exponent 2: +02 98 04 e1 32 fa 3a aa 4b 15 26 bb 50 3a b4 d4 +71 f7 6f 69 65 42 11 a6 89 3b 0c 13 74 29 87 9f +cc f7 23 41 30 82 54 76 ac 20 d7 fb d3 8c 3e 24 +86 58 76 48 6e e8 a7 bf 99 58 45 9e ee 95 81 78 +29 + +# Coefficient: +02 11 97 5e 88 56 d4 ea 9d 1d df 87 b8 7d 39 79 +2f 1c f7 e2 f1 82 f4 a4 e6 91 e5 00 2b 10 a0 8a +46 dc a1 a4 f4 83 00 85 d8 d4 0b ea 1d ff 11 b0 +c0 df 20 22 43 eb 99 3e 58 0a 94 49 9b 9c ed d2 +be + +# PKCS#1 v1.5 signing of 20 random messages +# ------------------------------------------------------- + +# PKCS#1 v1.5 Signature Example 10.1 + +# ----------------- + +# Message to be signed: +b2 d5 88 50 9c 2e ac da 28 1e 76 71 cb a2 fc a9 +14 ef 73 a3 ae a9 20 20 43 ea d6 b7 21 25 c1 b0 +d5 cc 15 41 46 20 d5 73 d7 ab 0b 3a 8a b6 6a 92 +df 87 0b 75 b1 c4 d6 8e a7 05 6b e0 41 9e a2 53 +e6 b0 8b 12 9e 0f 64 f1 0a bf 82 e1 67 f8 e3 e9 +28 2e 7b f7 1b 04 3b aa 2b a2 d8 75 6d 46 b6 d3 +6e 97 34 15 f4 f8 c0 eb 43 fc 60 4c ed 49 3d c0 +46 a2 5a 11 9b d1 58 1d bb 59 7c 3e 67 c2 fd dc +39 6d f5 d2 3b 7b a8 0b d2 e3 12 90 bf c2 62 25 +e0 09 55 a9 8d 91 19 11 a3 99 67 6f bb + +# Signature: +07 9a 7b 91 6f 67 41 17 f1 d8 77 f4 93 43 25 68 +41 48 d5 d0 b0 d5 c2 c6 15 6a 11 15 9b c0 bd 30 +d0 a7 35 34 dc 94 45 eb e2 06 d6 07 5e b4 ea 7a +7c 04 32 bd 44 b8 3c fa e4 68 5a 9e b9 a9 7c bb +fa 4e 82 f7 1d b5 1a fa 0d 27 cf 27 f0 60 9b b3 +f8 80 64 13 24 7d 5d 49 54 f7 89 a1 01 bf 39 21 +72 8b 48 7e 85 fa 3f d4 dc d7 2d 04 44 8e 42 d3 +ec 05 cc 47 5d 74 cb f7 65 c3 4e 3e c1 4c ca 50 +40 + +# PKCS#1 v1.5 Signature Example 10.2 + +# ----------------- + +# Message to be signed: +ca 25 18 a5 a2 24 b2 3d 42 05 d8 dd 7e b0 4c bd +cd 0c cb 82 bc 87 96 1d 85 9d 66 00 b1 ac 3e 25 +a9 40 7b 6c 06 50 27 c0 40 81 f4 45 a2 30 ab 93 +08 e7 55 f3 3a 75 97 73 be 6b 96 9e 0e a7 74 aa +6e 33 4f b6 04 18 42 75 f3 6a 03 1d ae a6 51 86 +97 79 5b d6 a7 d6 69 7b 40 6d a2 ce ce 15 dc 11 +3d 85 44 98 85 61 13 1d 4f c6 f6 e3 c5 80 d8 06 +80 7d f2 c6 85 65 09 54 2e 4e d3 9d 34 6e ba 15 +97 6a 8f d0 1d 79 41 b0 16 56 06 c7 61 76 64 9a +16 10 05 a0 + +# Signature: +00 be b9 21 ce 74 89 81 9d 2f 85 c7 88 39 a2 7d +7e 19 ea 0a 76 4a c5 31 01 e8 6f 31 70 a7 6e 31 +8a 7e e8 9b 1f 5e 23 e7 e2 db 96 66 eb 43 91 b2 +79 2a 57 67 ee 35 9b 5c 71 e2 74 79 10 c8 2c 60 +83 d6 d3 48 29 b9 6f a5 a2 ec 0f 62 f1 bc da 5d +78 f8 dc 3c 65 0b 94 e3 2b 38 60 da 5f c5 b1 7f +bf 68 7e c0 07 5a 9c 73 dc 1e 98 d1 f3 6a ae c4 +49 3f 78 91 e3 ab 08 e2 04 2d 8b 1e 46 2e 8c 4c +33 + +# PKCS#1 v1.5 Signature Example 10.3 + +# ----------------- + +# Message to be signed: +d4 33 d1 5b 2d 61 b8 6a c8 ec 0d ae ba 65 e1 1d +ed 3c 38 84 25 25 e4 b7 c8 e4 53 b0 f5 53 cb 4e +b8 75 a6 9d 78 16 f5 4c 87 79 3e 3a bb 79 fc 55 +11 35 37 b4 76 29 65 cf ee 58 6e 0a 17 99 78 51 +e3 dc 9e af 6f 1c 9c 2e 98 c9 61 3e 3b be a0 13 +ff 58 61 6b 2a b0 5a b3 24 a9 c5 ff 4c 5e fd d9 +90 dd 97 d9 16 93 c1 eb d4 c0 9c 73 21 16 c8 df +c3 ec 51 5c 20 53 2c ba 7e 47 58 c6 8a 69 cf a0 +ac 31 86 + +# Signature: +03 ae 3b e1 c7 44 6a d3 ef d8 ba e6 1b 3d 32 d3 +ef 15 24 82 b1 bf ee 31 2f e9 e6 be ee ab 8c bd +08 f4 c8 f9 cf 06 7d ea b6 ba c7 c0 fe cd 87 bb +ab c7 f6 79 8c 77 ef 1c 3f d8 bc a2 8c f9 ec e6 +56 79 5f 60 b3 78 75 ea be f8 21 53 a1 2b c7 fd +e3 fb c9 e5 e1 48 f4 e1 6c b7 2a 77 3d 9d d0 23 +17 f7 0b 33 91 40 08 05 e8 5e 7a 23 56 7b 34 aa +65 a3 5f 74 41 70 af fc b3 23 37 1a d2 ab 9f 1e +4d + +# PKCS#1 v1.5 Signature Example 10.4 + +# ----------------- + +# Message to be signed: +7d 0f 5b d7 90 0f 1e 65 65 4e 6c 7e eb 06 4c b8 +28 f3 55 d6 de 9b f0 d3 47 83 ff cb e8 0a b1 b8 +ae 07 b7 f1 e3 f5 a3 20 dd 9b 8b 76 be 0e 97 72 +de 19 a8 d3 + +# Signature: +09 e7 a5 30 41 71 da 63 8b e7 60 1f bf f6 e4 95 +36 f3 36 60 82 25 3a bc 1d b5 d1 b6 54 93 da 59 +5e c9 3c 37 f5 89 0b 5f 47 15 bd 5e 80 c0 bb c5 +c6 3b 74 af 2e 60 43 91 32 d2 52 13 75 0b c1 de +30 2e 3e 8b 83 da d2 de 0d ff c4 fa ab 40 56 dd +7c 40 5e 04 d5 94 24 53 65 9d 49 0f 3c 3d aa 7d +3f 11 70 11 81 6b 56 59 01 04 de 7f 9c 05 23 73 +e2 dd e4 14 49 04 27 a5 89 64 49 3f f4 5f 08 a6 +e8 + +# PKCS#1 v1.5 Signature Example 10.5 + +# ----------------- + +# Message to be signed: +d9 6a a0 91 c1 60 b5 52 b1 6d f0 65 8f a8 + +# Signature: +0b 69 75 4e d6 d7 a7 d2 d8 5b 2c 7a 30 6c 78 d6 +3d 0f fa 43 8f 43 be ec 3a 02 86 ce 57 e7 e0 f8 +5c a4 30 e6 39 08 c0 fa 58 4b a2 50 5f 8c 94 65 +6e c0 24 94 bb 03 2f 92 0c 4b 6b 8c 94 3e 6b e9 +2f 57 8a a8 cc df aa c0 a5 4b 8a 9c 0d f5 48 27 +1f 89 73 c9 ff a2 a2 0c 84 76 2e 90 17 e7 45 2e +5d 74 da 69 0f 75 c0 99 ab 91 e2 a7 96 3b c5 37 +f9 c2 4c cc 3c 41 8c 6e 98 58 61 d9 3d aa b2 e6 +13 + +# PKCS#1 v1.5 Signature Example 10.6 + +# ----------------- + +# Message to be signed: +56 f0 48 64 5a 49 fa 01 41 f4 d6 74 aa fc f2 ff +fa 83 f9 b4 52 f1 fe ed 43 05 7c ac 27 67 5e a1 +a1 41 d8 7f 92 f9 ce bf 6e e4 f7 8f 8e d4 c3 a2 +9d eb 72 97 47 b4 f9 8e 4c 75 90 aa a8 d5 6d bc +61 d3 8c b5 62 22 26 f6 8e 43 f9 c4 f4 c0 39 98 +ae e9 09 34 39 5b c8 40 c8 6d cc 88 74 77 6f 43 +03 9f 56 a8 9d 24 bd c4 b3 05 df 09 e5 ca 0c 05 +12 ad 6d 15 71 91 9a 3d b3 a6 bd 98 b7 82 0a da +08 69 d2 25 a4 04 02 7a cb 6d 76 7f c3 14 db 37 +7e 8d 1d b6 ef 0a f2 94 54 db 2b d4 c1 ce e0 13 +a5 97 43 48 6d 32 32 95 83 cf 80 11 3c da a1 0e +4f 2c ea 6c 4f 9f c6 e4 e2 71 6e de 85 72 7c 3a +fd 43 49 46 09 77 76 30 ee 33 63 7e a3 5c 9b 4f +68 8e 49 2c 3c 64 0d + +# Signature: +06 66 ef 71 e2 c8 a1 eb 1c 46 40 3f d2 3e 52 18 +83 ad a1 b9 bc 5f bd 35 3b bb 3c 3d fb 57 0a c1 +c7 21 fa f3 f5 97 32 f2 13 37 73 80 39 79 48 46 +2f d2 0a 3f 0e 5e 08 91 a6 b0 7c 31 b3 60 aa a9 +65 e2 f0 93 0e b3 41 ee 77 ec 43 90 65 c0 aa d9 +17 87 ab 6d 2e 6c de dd f5 54 81 65 1a eb bf 9d +11 d5 4b c1 13 26 18 3e bf f4 9b d4 0b df 76 d7 +ef 69 b6 7e a3 96 8f a8 49 03 2f b8 24 b6 dd 6a +e3 + +# PKCS#1 v1.5 Signature Example 10.7 + +# ----------------- + +# Message to be signed: +79 da 89 e3 55 d5 51 a0 e0 31 f4 fb 71 ab 6f 41 +44 c4 76 2e 07 d0 64 14 33 cb 5e c8 61 34 96 3f +7d 2c 4d c7 be b5 c6 d4 61 57 c6 c4 e1 4a 4b 9c +7a 2c 0d 46 0f 1f c0 62 ea 1b 4f 98 74 d5 b1 c2 +9a e2 f2 a5 b3 90 62 e4 12 12 e6 5c 85 c2 8e 76 +75 89 96 5d 17 10 ad 5b c7 6f a5 a6 72 9a 06 fd +49 6e 2e 09 97 e5 73 37 bd 51 6e 6b c7 9b e9 e0 +70 aa 7b 86 c2 dd f1 4f 94 98 5f e1 58 2a 29 2c +d1 39 34 b3 c3 8d fe 59 77 ed 1d 9f 8a d3 24 c0 +dc 07 e5 85 3c 7e 48 90 bf bd c1 a0 1e cd 72 c5 +ff 68 a0 2f 1e + +# Signature: +0a 06 82 f7 42 e7 43 e1 c7 da ba ac 61 8a 78 6f +28 ed 13 a6 58 7a df c3 3c 98 29 d7 52 c1 3e f2 +7a 00 c7 e6 d4 5e 27 17 1a 58 41 77 1d 78 69 8c +6c c6 67 78 b8 c0 93 38 e3 5b 9b 6f 59 c0 64 ce +b3 eb 20 ce 90 9a 5c 6c ea ae bb e9 3e 86 c7 c5 +ff 4a 39 17 f1 26 81 96 32 cf 96 fa b1 d3 91 73 +a7 ae 7f c2 ff 5c 0f b4 09 05 35 da db 58 d8 7d +0d a3 db 32 ec ec 13 71 8b 3a c5 c3 0b a8 02 e3 +8b + +# PKCS#1 v1.5 Signature Example 10.8 + +# ----------------- + +# Message to be signed: +e6 9a c9 43 3e 6c 28 ac 53 f8 03 4a 86 8d a9 88 +3e 31 9e 82 e6 bc 2e 49 45 5e 6e 4f 09 8b 53 f2 +87 a8 58 da 1d 87 6a 9a 5a 6a 9f c1 4f d2 42 38 +cd 4e 4b 57 31 07 7a 4d bd d5 03 8a 9b c1 f5 de +f4 3f ec 77 f6 7e b0 62 fa ef ef 7d 04 29 23 8b +25 d0 31 85 78 96 62 3a 3f 1d 37 bf + +# Signature: +08 a0 20 e4 20 98 78 f1 e6 37 ad 59 da af 83 5d +af 4c a6 64 84 47 94 c1 c6 48 f0 e2 23 3d ba 75 +48 bd 16 1f 0c 0a 18 24 d7 62 03 1a 41 75 72 84 +2f 8e 64 4a a9 3f 9d 91 dd 77 09 e1 6a 42 9c c1 +43 90 3e f4 f8 37 a4 58 39 6b ca c2 40 92 b0 17 +24 c6 fe 3d d1 ad 24 3f 3f 70 b5 ae 6f aa 09 f3 +70 ca a5 12 10 4b 91 76 06 0d f2 bf 12 1c bc e9 +19 8e c2 fe 45 a5 9e bd dc 46 75 32 b5 af b9 b2 +35 + +# PKCS#1 v1.5 Signature Example 10.9 + +# ----------------- + +# Message to be signed: +45 e0 90 56 a2 8e 4b 2e 7c 11 f6 5e 68 8a 1e 3c +33 f0 e5 2c 9a 03 6c 09 d8 1d e5 a6 da b5 8d 4d +55 cf 41 1b 53 ad 64 6e 83 a3 4b 0c 08 c2 21 ae +03 76 ab 76 a7 9d 1f ee 67 1a 58 44 20 56 4f 8e +85 2e b6 f2 d4 27 ae e0 a0 96 dd 72 db e8 50 7c +67 7f 8a a0 0e b7 c2 5d fb 0a 49 dd 88 a6 c7 84 +76 b8 00 11 b6 82 8b 3a af 46 47 79 44 22 ba 6b +d6 3b 7a b0 e7 da fb d3 6f 6c 41 de a0 3d 73 22 +35 64 96 94 60 d9 28 54 0b 73 92 57 e7 0b b6 8d +5c 65 3c 37 96 94 58 95 + +# Signature: +08 71 7d 50 86 a6 45 3b de ff 77 d4 c2 b8 56 e3 +ba 99 0b ab f6 97 01 df 6c a0 a3 b3 a8 1b 55 69 +7d 31 88 9d 10 0d 68 95 c9 7f 0a 56 b4 71 68 c9 +8d a6 2e 59 ec 79 d7 ae ab 2f 9a 57 07 46 98 8a +26 f4 23 57 6c 70 3f d8 41 ae 51 c9 c2 29 a2 e9 +c2 5f e9 4c 5b 6c e2 fa 64 54 12 be e6 59 fa f6 +09 a3 2e b2 c0 5b ee ab aa 4f 58 ca ac 31 33 e5 +ea aa 27 34 4d 30 ee ca 22 c6 eb d8 d9 e3 44 41 +0e + +# PKCS#1 v1.5 Signature Example 10.10 + +# ----------------- + +# Message to be signed: +b8 1c 8b c4 ac 1f d9 71 b2 1f 02 7e 06 f4 d8 7b +34 d5 76 9d 23 c8 59 9d 1f 15 7b 08 a7 f9 2e 34 +19 fe c4 c8 c1 b3 4c a4 63 c7 68 b7 2e 07 f9 da +bc 3c bb dd 8b 56 17 cc 25 28 75 00 2a 1a 13 92 +af 0f af c0 8c 72 11 75 8f 3c 04 20 50 ad 73 1b +63 6c 0e 83 19 1a 79 de 5a a2 cb 94 dc 8b 0b dd +e7 5d b7 d0 c8 ba fb 42 23 d3 47 b0 24 b3 d9 c6 +b2 39 61 9b 5d 8b 63 46 ea 86 fb 8f 24 c5 84 dc +1a 47 79 1c b7 c8 c7 eb f1 ed 43 8b 88 + +# Signature: +01 b9 f4 33 94 c7 cb 88 5b fd cc 3c 84 96 22 23 +e8 aa a9 4c 6c 9b 79 05 40 1d 24 f0 dc 44 3b 2e +8d 84 0e 28 a9 5f a2 2e 1a e3 6f fe 08 96 6f 38 +d3 87 14 cf 68 da 8d b2 37 64 b8 8c 4b b2 be 4f +d3 da 9c cd 1b 50 69 42 aa 9d 73 fc 09 38 2d c3 +30 83 14 70 6e 6c e2 7f 00 76 1f 3c 9b d5 4f a0 +e3 1c 96 71 9a fb f0 76 3e 35 ca d8 89 b7 2e 13 +bd 12 b7 6d 6f 20 20 fa f6 1d d3 d7 08 22 8d f0 +6d + +# PKCS#1 v1.5 Signature Example 10.11 + +# ----------------- + +# Message to be signed: +d0 32 28 83 e5 98 16 3d 72 20 36 da 3e 63 2a a6 +55 97 ac bc d1 f4 76 03 10 96 96 f9 b3 9f dc + +# Signature: +07 8d 17 ab 8e 6f f0 be 50 b3 53 9e b0 3a e8 f0 +90 3b 7a 07 74 81 78 1f b0 b1 f0 9e dc f7 78 86 +31 2a d6 c0 60 27 4f 0c 38 9c 16 31 40 40 c8 d7 +d9 90 9c b7 5d f1 8c 82 d6 2d d3 4e b5 9c 6a 87 +d3 c4 6a 7e f7 47 4a 5e 44 7f 77 44 a6 a9 2f 59 +90 ea ec 7b fb 00 84 4d 68 4d 30 7d db 49 81 89 +41 49 e7 52 bf be 2e 77 05 7d a7 60 54 69 af 7f +fb 67 27 a9 98 1b 94 39 ca a5 d8 0e 6a e3 b3 d6 +51 + +# PKCS#1 v1.5 Signature Example 10.12 + +# ----------------- + +# Message to be signed: +e8 74 2f 04 b5 65 4d 92 88 b2 31 a4 7a 36 58 39 +bb 01 be 87 + +# Signature: +09 b7 53 06 a7 21 2e a6 f4 7e b0 cc f4 e2 e0 d6 +f8 f3 ab db 9c dc fa ad be 51 92 2f 92 ea 62 62 +3c 58 ea 74 ea 1a 24 7c 9d 73 1f 2c 03 35 36 b3 +52 73 c7 17 49 5f 32 5a 60 40 5b d5 f5 e4 05 b6 +80 27 9e 75 21 60 47 87 40 45 72 16 dc 92 9d dd +65 de a5 05 53 55 46 e4 77 0f 82 11 b8 49 c3 65 +21 8e 56 6e 5b b4 1b fc 36 1b 65 cd cc b0 e6 04 +c9 ed b9 70 ee 6a 28 6a 1f ce c0 ae 9d 92 55 8e +ab + +# PKCS#1 v1.5 Signature Example 10.13 + +# ----------------- + +# Message to be signed: +a0 3c 2b 85 fd e4 64 68 d1 c5 06 37 b0 0a 72 dc +fc 32 c4 16 31 73 9c 06 02 45 f5 3e 57 c6 6c 51 +76 6f 24 ea fd 93 e6 c6 67 43 48 05 91 bf 14 44 +6e 04 0b 67 a4 f8 46 99 57 6c 2e 14 63 ca cc bc +b0 73 e4 b7 ec 6d a6 c8 cb 41 d4 a1 23 c7 48 cd +7e 83 d2 61 e5 4c 2f d2 bc 49 5b c4 c4 4a 78 f9 +82 00 34 03 09 2e c6 96 0c 08 8e 2b cd e3 48 a2 +e0 e5 5a 4b 4f 42 ea b2 29 b9 5c 38 3f 21 13 ed +6c d1 f3 f3 16 7d e3 d2 8d 36 2c 8d 78 b2 eb 6e +31 62 0e 34 b2 f0 f9 41 da cd f7 b4 b8 56 8c 6a +86 3a 55 1d 7b d4 a5 d7 09 3e da 69 e1 e2 80 56 +dc b1 eb 69 ae 03 ad 74 be 72 a7 5a e8 fb 56 a2 +71 25 ca 3d 2d b3 76 9d 13 d3 5d b1 08 e2 64 4a +7f 3b 37 93 8f ec 97 62 31 52 06 d3 0c cf d5 76 +ae 7d e0 76 98 69 e5 04 4d 07 64 6c f7 8c 64 a4 +86 48 0b 0f d4 2c c7 b2 46 + +# Signature: +05 8d a5 49 4c 4e 98 aa 12 1f 67 f6 5a 2c 86 54 +25 a9 e6 00 2b 22 3f 03 88 80 97 53 57 3b 4f 33 +4d e4 5d 8f 00 07 25 5d 11 2d dc 84 db 26 67 00 +e4 40 b5 a8 69 00 c3 d3 d3 5b 02 4c 18 d8 a2 5a +58 00 22 6d 0a 56 d8 38 d8 91 9e 6d 5a 87 30 d6 +19 49 90 15 ec 46 65 c6 3d 77 80 83 a0 42 dd 4f +05 2a 1b bb 5f 40 80 cb bb 41 fa 94 5b ad 6a 74 +77 9f 68 07 25 e4 7a 08 a0 51 4f 35 0f a5 ad f9 +0a + +# PKCS#1 v1.5 Signature Example 10.14 + +# ----------------- + +# Message to be signed: +c4 0c 70 f2 6d a5 69 48 6b ac e7 85 da 32 e3 37 +a0 eb 94 fb 3a 0a a4 09 c5 77 01 75 c8 e8 cb 2b +aa 8d 2a 1b 98 46 c3 7d f7 d6 71 03 6d 5e 91 + +# Signature: +05 25 61 28 af ba 1f 55 d8 1f 79 ea 33 87 91 47 +a2 4a d7 77 93 46 ee 79 8b 21 1c 24 71 53 ea 38 +d2 6b 21 70 65 f6 1e 01 10 b5 3d 72 cb 64 93 4d +9b 1a d1 b3 de c3 32 09 2d 25 8f 0c af 1c 4a ee +8b 23 e0 9b ab 0f 0c 27 88 58 b4 41 d0 8c a3 ae +9f 00 aa 9a 3f 01 8f 7d 9f a9 8a 18 df 0d 24 84 +7e 56 7a 47 f5 77 9b d1 79 3a 4b 02 52 f2 ba d4 +0c 9c 4a 81 30 1c c2 8c 26 09 d7 bb 33 37 e9 7f +14 + +# PKCS#1 v1.5 Signature Example 10.15 + +# ----------------- + +# Message to be signed: +9e 6d cb 11 e0 e8 47 71 39 fa f0 41 a7 4e 2b ed +64 3a 62 ad ed ac 7c be f3 65 ec c4 3a e4 e5 82 +60 bc 72 46 23 bd 63 42 dc 66 0d 66 14 2e a6 36 +80 71 5f 52 2f f3 cd 4b 63 6f 84 aa 9d 75 fb fb +c3 84 10 7e 43 00 4d 98 6f bc e1 a2 7f 7e cc 7d +02 39 2c + +# Signature: +0c cf 23 4e b4 80 08 5d 92 0d 37 d6 87 96 5d 2f +d2 e4 a4 f3 bd 3b f7 dd c1 6b 5d 62 a6 90 32 74 +20 7c 6f 90 83 6e 29 ff c6 3a 57 f9 81 30 c5 25 +23 25 19 c7 08 f0 dc 8a 12 55 ab 55 db 1a 2b 9a +bc 11 06 16 02 07 5f f6 f9 7f 90 92 79 6b 98 87 +1a 6c d5 d2 61 7d dc 9d 25 5a 73 00 c9 10 fd 21 +0b 14 a9 81 e5 a0 e0 c6 bb 2b 04 5f a9 75 68 98 +b9 3b 8a 63 45 44 d7 7a fd b1 cf 0e 79 58 f1 1a +43 + +# PKCS#1 v1.5 Signature Example 10.16 + +# ----------------- + +# Message to be signed: +20 bc 46 3b 5e 12 20 a3 9c 84 e8 9f e6 71 6e ec +ab 55 55 f8 bf ce 60 cf b8 37 93 cc 40 a4 da 1d +22 c0 ab 4e aa 93 1f b7 47 be 35 f1 cf 6f b1 46 +5b ef 1d f2 76 0f cb 3f 70 d3 e2 96 e7 b2 70 45 +0d ff e2 d5 88 c4 39 6a 5f 6f 1e 63 87 aa 86 97 +1f b0 ad 24 df 55 04 43 dd 12 2b db 2c f3 c9 ed +61 25 fe 55 ce c9 91 cb ae 8e e1 56 2a 8c 0f 4f +36 4f 8f 0a 80 cb 30 fd 99 44 0b f6 55 f0 80 4f +92 96 8c a2 e0 1c 0d 5a bb 4e e2 67 63 6d d4 f5 +11 a8 d3 29 41 16 21 6b ed c1 08 86 45 e4 65 d8 +e1 98 b8 af e1 cd 54 24 b4 2a 53 3c ed 19 8a d5 +97 + +# Signature: +05 1b 71 42 66 06 6b bb 81 9a 2a 38 05 a8 9c ff +46 18 75 c0 95 f4 f3 89 82 d1 af c2 ad 2f 14 24 +50 b8 a7 52 94 7f 03 1c ce 2c 9c 34 0c 8a c9 f9 +f7 a5 48 b7 cc 17 e4 cc 52 56 96 ea 0c 87 53 a1 +e1 5b cb 98 5d ea ec 77 6f b9 e7 d9 f7 58 62 f8 +98 35 23 d9 f8 71 c6 3f b7 56 1a c7 1c 37 6b f4 +95 d4 32 38 59 bd 14 18 8f cd fb 4b 37 ab cb 5d +c1 a5 8e ed ea 7e 0f e6 2a c1 6e 20 8a ab 4c ee +26 + +# PKCS#1 v1.5 Signature Example 10.17 + +# ----------------- + +# Message to be signed: +92 da 26 0b c2 13 b7 2b 48 a0 57 53 50 3d 00 a1 +db fd 02 ac 7b 9f d4 4d 24 01 ea 7a d5 8a d1 86 +1f da 53 63 29 ae 41 73 c9 16 80 05 b9 66 2c 05 +cb ea 47 ad 86 4a f7 cb 16 60 2d 3d 18 34 71 bc +98 bc c6 2c 6d 00 d3 34 bf f5 b9 0c fe 7d 7e 12 +d0 7f e7 d4 cb d9 dc d3 c4 c2 34 90 be 8c ba dc +08 c9 17 79 80 37 3c 79 eb 4e ea 6d 81 a6 be e2 +27 0b f4 20 f9 19 79 ad 3f 27 1f d6 8d d4 28 3b +e8 14 10 92 8c a4 5b 9d eb 58 d3 ae 98 b2 f4 fc +a6 21 25 95 0b 5e e1 28 db a1 05 c3 5c c3 98 d1 +5e 74 2b ba 92 69 7b 5c 62 b2 67 ce 01 14 1c ec +ef 80 75 07 de 29 c4 85 30 5d 0a 99 09 43 23 0d +8d 9b 72 52 ee 0b 19 56 de 84 5f 2f bb 28 38 78 +5b 47 0a 7c 20 53 db 39 6b 31 5a 30 d8 a7 f9 1c +ff fd 03 e8 a3 9b a8 bc + +# Signature: +03 e2 3f 86 52 37 4d 48 d3 81 c3 78 35 3e b4 7d +90 64 cd 70 8e 1b 9b f6 88 70 4c 04 c0 09 00 88 +46 e6 a4 7e 0b d2 e3 0c 33 40 f5 d4 e1 9d 2d c5 +d8 89 0c 8f 01 04 dd 6f 5d d6 ca d9 c4 d9 94 84 +09 c3 cc 0b e6 70 71 9d d0 48 41 80 89 1c 93 5b +99 79 db 8e b4 68 a2 3e 4e f4 60 29 f3 af 14 57 +4b d1 0b 47 3e dd 9b 12 7a 30 6e 51 24 ad a4 02 +c1 48 f5 1b 52 e7 e6 28 bf ac ec 3f c2 54 3a 0f +92 + +# PKCS#1 v1.5 Signature Example 10.18 + +# ----------------- + +# Message to be signed: +86 03 a5 62 2a 2d bb bc bb e5 33 30 e9 08 d5 a2 +5f 6e 67 a5 1e 07 68 d7 c3 c3 fb e8 b9 2e 8b 1b +36 dc 00 74 3c e3 3d a0 f1 c8 cf b0 0d 63 ed d6 +b2 25 2f b6 72 13 97 d2 50 4b 30 ed 1d 29 3a 82 +e2 44 c9 51 bb fc 24 29 8a 42 ff ee 26 e4 56 a7 +be 10 5c b5 e3 7b 3d 25 de 28 bf c0 10 42 c4 a8 +2c e8 70 45 54 87 e5 b3 0e 26 f8 d5 39 8c 86 12 +6e + +# Signature: +08 22 fc 22 a9 cd 87 7c 09 b6 f9 2e 80 17 cc c0 +28 d5 37 99 67 c7 d0 4e f3 2f 86 9c 7e f6 7d 59 +3c 77 45 f6 29 d9 3d f2 60 03 8c d3 33 ea ee 92 +35 9f db bf 84 62 3b 7b 55 14 23 5b 83 06 27 2f +4e fd 13 a6 70 0b e9 28 9a d5 4e 57 d5 2d 1f eb +b4 6a 37 af d6 95 94 2c 4c bc fd 37 68 f2 82 1e +88 8e fa 0e 2c 5f d3 c9 c4 2c c3 55 50 d7 95 5c +db d3 5c 8e f8 58 1b 41 f8 dd ab 26 18 26 2e 3d +ff + +# PKCS#1 v1.5 Signature Example 10.19 + +# ----------------- + +# Message to be signed: +06 7d 4b ec b0 3e 1e b2 75 ae 22 50 7a 77 a5 39 +6e 71 9b 5f 00 b1 05 95 0b c7 99 8e 08 03 da 57 +a4 de 08 a4 07 8b 9a 00 d2 d4 6f + +# Signature: +09 10 8d 44 57 5f 61 4a 68 3e e4 d7 8b ce 1c 58 +f5 24 36 87 cb e9 c5 48 34 60 b6 5d f2 36 92 7d +bc 78 c0 64 39 ce 1c 7c 51 97 39 c8 f8 95 00 82 +d9 56 d6 0f c3 64 5b a7 af 8e 78 89 54 70 63 1b +b4 da 00 c0 1b 98 2c c1 1c 68 d2 65 0c 7c ae a4 +a2 6e 21 0f f4 b1 ca e1 db 50 5f ce a9 29 34 87 +b2 07 31 78 ca 24 5c f0 ca 23 56 ba f8 65 54 6b +54 af 95 35 ba b1 8d b6 79 ef 56 27 09 29 79 c0 +a8 + +# PKCS#1 v1.5 Signature Example 10.20 + +# ----------------- + +# Message to be signed: +88 4f c5 02 c8 82 48 49 47 8b 2e ac 1e 7e bb b7 +ca f2 8e eb 48 89 45 86 02 ec 70 35 81 d0 5e f9 +b1 a4 22 0b d2 f9 22 f2 5e 46 4c 88 07 01 c8 a4 +5b 1d 1f ab c8 66 2e b2 49 40 04 26 c2 22 62 38 +eb 8a d0 f9 06 9c 90 f0 01 82 77 44 80 25 a6 41 +80 ed 55 d1 af d2 7a ff 4f 00 70 2f 71 5d 29 10 +00 0d f3 92 5c 70 10 ff 11 7f 6d 8d 2a 81 67 09 +48 9e fd 29 a4 5c 59 23 17 7b f9 2c d0 bf 6b 94 +74 5d 34 8a 14 4e 98 74 0f 72 22 6a 3e 2a 9d 41 +7b 7c 1f d8 f8 95 f5 15 c5 c6 d4 06 a7 2b dc cd +39 15 2c 30 fd bd da 0e 62 82 3e e9 df ab 34 32 +e6 64 2e ec b6 98 7b 90 46 e0 40 a4 78 a4 df 64 +8d ef b3 01 6a a4 43 d0 67 a1 fa 41 55 55 53 74 +f8 ba 32 5a 8b 55 e4 d6 b5 fa 09 0e eb ae c9 c9 +2e 26 1c c0 4c ea a4 8b 3b ed 7b 3f 87 d3 + +# Signature: +0b 41 b4 12 19 71 26 15 9e 9b da 1a 24 62 c8 a4 +fd 3d ff dc 6e 98 e4 db fc 06 cf cc f1 6f 74 fc +b5 23 38 af 14 ed 39 36 e0 2c 1d 7e 77 23 6c c6 +a4 89 f0 0f 08 98 52 de 5c c4 25 b4 50 94 a0 42 +e3 85 46 4b 64 c3 b2 ff d0 1f 19 a0 1c 2c 03 81 +f7 58 a6 73 65 d1 e6 5a 70 7b 13 4e 3f 8a 93 16 +b4 aa cb 7e 85 1a 5e ab 3c d8 11 bd 45 22 dd 14 +1a 00 15 7d c3 fc af c4 15 4c af 05 93 ca 62 10 +2e + +# ============================================= + +# Example 11: A 1029-bit RSA key pair +# ----------------------------------- + + +# Public key +# ---------- + +# Modulus: +1e d7 ee a9 40 5f 50 7f 94 16 23 a1 7b ea 71 7b +86 0d e4 4c b7 76 87 b8 b8 5a 6d 7d 1e f4 f8 62 +8d 25 7c b9 42 38 c6 25 ba 25 d4 6a ae 59 39 60 +af 79 f7 5e 28 ab 63 ac 3c ac 48 20 b8 2d a1 cf +75 0d 6c 93 0d 6b 82 78 54 aa f6 ca c0 c1 7b 80 +b0 29 f5 d3 19 cc ca 66 5c 56 94 f5 4b a5 f0 96 +f4 54 34 13 ec 4c 5e 97 cc 1d da 89 d2 af d4 28 +57 87 59 03 2a df 92 89 50 65 ba af e8 8d 2d 8b +61 + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +1e d7 ee a9 40 5f 50 7f 94 16 23 a1 7b ea 71 7b +86 0d e4 4c b7 76 87 b8 b8 5a 6d 7d 1e f4 f8 62 +8d 25 7c b9 42 38 c6 25 ba 25 d4 6a ae 59 39 60 +af 79 f7 5e 28 ab 63 ac 3c ac 48 20 b8 2d a1 cf +75 0d 6c 93 0d 6b 82 78 54 aa f6 ca c0 c1 7b 80 +b0 29 f5 d3 19 cc ca 66 5c 56 94 f5 4b a5 f0 96 +f4 54 34 13 ec 4c 5e 97 cc 1d da 89 d2 af d4 28 +57 87 59 03 2a df 92 89 50 65 ba af e8 8d 2d 8b +61 + +# Public exponent: +01 00 01 + +# Exponent: +0d 93 80 72 b1 6a 02 f5 d5 0a 15 ae eb eb 5a fe +43 18 74 48 2c 6d 18 fa 7e f3 16 c4 7f 4e d6 d2 +12 4c d0 e4 7e b8 9c c7 58 73 74 57 6c dc cb 3b +ba a1 95 f7 b5 31 13 93 69 b5 6f 9e 2f 53 ae a8 +ac 7a 97 e1 d7 45 8f 52 6c f7 d7 10 c4 90 2a ae +df 99 7c 11 94 b8 7b 62 cc d8 da b8 ff 5b 67 d4 +0f e8 3d e1 b8 2b 91 60 9a 7c 5c f3 92 29 eb 3a +1b 2f 0e bf 0b 12 5c b8 00 91 a0 7e bc 77 9c e7 +fd + +# Prime 1: +05 90 a1 e5 18 71 07 fa ef 1e 0c d5 2f a2 dc ad +a2 d5 8a bc c9 e0 73 8f f4 85 0f 7d 2d ee 19 82 +3f 6e 3e 2c a9 11 b7 17 4b e7 0b 15 c1 b8 87 e0 +ae 15 10 21 22 42 2f a1 58 b9 8b 0d 38 21 15 24 +5f + +# Prime 2: +05 8a dd 02 9b c9 7e cf d1 d0 db 26 be 45 ee 8d +3e 54 bf e6 36 fc 4d a6 66 dc f2 50 ab 2c 2e 96 +56 62 16 b8 a5 17 f1 0f 75 b9 8f de 6c cd 8a 58 +e8 fc 58 2e 78 74 90 e1 95 8f 7a 0f da 82 ad 68 +3f + +# Prime exponent 1: +01 80 ee fd a3 f9 06 9a fa f9 37 a6 72 d4 a2 a4 +18 17 73 01 47 da e9 de bf c7 24 44 42 a0 cf 2b +ae 4f ef 64 c9 da 0b 8a b3 eb 9d c7 27 2c e1 2a +08 5f 90 98 23 55 96 e1 15 c4 2c 9a 49 cc 46 96 +29 + +# Prime exponent 2: +05 12 e1 4e 11 05 7d 84 8c 23 f1 6b 5f 46 2f a2 +b7 8b e7 fc bd 1b 6d 8e 46 9e 3f 69 9f b9 9b 90 +5e d5 fe cc db bd b6 1d 1b fd 5a 7a 19 0a 74 7a +fe 16 7c 37 56 68 07 75 ab 6f a4 23 3d 3a e1 ba +0b + +# Coefficient: +26 2e 28 23 16 98 be 32 87 a9 c7 06 f3 94 7b 7d +5c 2f 5f d2 b9 14 46 f5 e9 a3 15 44 d9 af f4 55 +a3 ec c6 b5 43 14 82 0c 2a 48 82 61 d9 f9 8d 34 +8d 9c 3d 10 02 e4 e8 28 7a 15 2c 12 87 09 65 60 + +# PKCS#1 v1.5 signing of 20 random messages +# ------------------------------------------------------- + +# PKCS#1 v1.5 Signature Example 11.1 + +# ----------------- + +# Message to be signed: +84 55 19 dd 45 d2 dd cb c8 db e0 b8 29 54 c4 58 +c3 66 4d 88 27 4e 50 2d 27 91 46 b1 8f 6a 81 67 +50 e9 4b 4e cd ee 68 32 cb 35 df cb db dd 3e 5d +c0 64 04 d5 f0 c7 0e 7c 7c d0 e1 9f 38 bc 5a e3 +2c 7c d9 1f 94 d8 f5 67 82 39 7b c7 4e 6b 06 98 +27 ec 27 30 17 37 40 ce 4a 10 e6 48 c7 88 97 af +1a 89 e8 33 31 d0 f4 61 37 8d 06 05 28 73 f1 7d +9f fc e4 6a 32 47 26 07 fe 73 e4 a5 61 87 9e 61 +9e 7c 1a e8 14 e4 5e 1d 2b db 12 19 46 b2 ae b8 +56 39 16 c5 43 eb fd c2 c0 90 fe b5 56 65 00 a8 +ce 74 af a4 53 72 bd e0 c6 67 3a 7f 6a cc b0 ee +9d 57 bd e9 3c 36 dd c5 7b 84 90 aa 2d 68 58 5a +3d b7 29 7a da 6d 9b 3f 35 6d bc 74 d3 15 c5 fa +1a bf 7d e6 ce bc a8 3c 9d f7 + +# Signature: +08 63 a6 26 dc 42 ba f3 e1 61 c3 5b 3d e3 b1 ab +c1 aa 5a df 54 16 46 5d 4c 7b 6b 01 ae 2d ad 73 +f9 f1 58 eb 21 3d bc 36 0b e4 d4 7e 57 07 87 1c +39 c3 8d bb c9 6b 46 c8 f9 af eb d3 dd ac 87 16 +90 98 e1 a7 67 18 d3 54 cd 09 1c a3 52 96 a7 7c +21 d2 51 2f fe 65 e3 b7 1b 90 22 e9 cd 1f 7c 35 +ce 13 65 fd 1f 2c 2c b9 67 ff 4c 8f 90 f0 c8 ea +ef 0d b7 3f ed 00 e9 8c fc 83 f8 0c 67 b3 be 1d +33 + +# PKCS#1 v1.5 Signature Example 11.2 + +# ----------------- + +# Message to be signed: +86 8e 7c 4f c6 34 0b 6b be b7 b8 6e a8 9e e7 26 +5f 32 31 f4 8b aa 92 e4 a2 e8 ce 0f a1 c1 a8 c0 +fb 0a ca 94 4c 74 bc cd + +# Signature: +10 cb f8 71 7f 76 27 8f cc 8f c0 aa b4 6e 90 a3 +d1 80 c3 c9 2a 4a 83 eb 93 c8 92 0a f8 8b d6 50 +6b 40 73 45 3f 0b ef f3 e6 1e db b4 db c9 c9 47 +c6 9d eb 69 a1 ac 92 9e fc 15 62 5b 9e d7 cf 1b +c4 23 a8 87 5f 37 80 dd da 9e b2 fc cd 9f a0 14 +62 6a 7f cf 99 86 49 bc fa 59 53 a3 c4 3e fb cc +38 70 4d 02 49 19 df 2f c4 ad ea 39 e3 4c d1 5c +d4 f8 6a d3 f5 01 01 2f 6b d2 8a a5 00 2c 3b 41 +ba + +# PKCS#1 v1.5 Signature Example 11.3 + +# ----------------- + +# Message to be signed: +92 cf 88 0d a5 89 15 e3 aa 95 08 93 53 e4 61 84 +c9 15 94 5c 57 67 9c 1e 4b d3 82 5e d9 19 a3 20 +52 e9 78 6e 23 b9 42 53 9b 93 15 f5 81 da f0 b4 +1f a3 26 1b 96 7d e4 0c d5 d9 2a 48 24 f3 64 bd +1e 1f 51 84 4b 10 9b 14 54 13 4a df 23 4e + +# Signature: +08 82 89 66 ac 58 36 c5 13 da 4f fb 87 61 87 97 +94 3c 61 2e de 7e 12 b3 10 03 ef 17 10 65 b4 ce +dc 6a 80 b1 45 6c 21 b6 74 b3 77 9a d3 5f 70 17 +7a a9 2c 6e ac 0b 83 3a 96 7d 7e 98 99 0b 48 24 +42 05 db f2 6f 5c d5 7e f8 7d c6 fe 5e d9 99 cf +8c a7 5d c8 e6 26 fd 6e b2 81 c4 99 af f7 29 89 +ed f5 2e c6 f3 bc af 81 ec 5f 8e 82 30 b8 7e de +dc f7 b7 78 14 3e d6 c8 ce bb ac 9d e5 41 09 dc +f7 + +# PKCS#1 v1.5 Signature Example 11.4 + +# ----------------- + +# Message to be signed: +87 3c 47 15 90 2f f1 9d e0 8b cc b0 cf 26 37 63 +fa b0 16 d0 22 0f 03 27 b4 75 5e 35 4e b2 47 f5 +db c2 d3 96 98 9b bd 36 d3 1f 61 98 93 90 ca c1 +66 43 12 5e 63 e1 a1 ae 1f 1b c9 bb ed ac ce 67 +fc 1b 51 a7 + +# Signature: +05 25 9c 48 15 93 ea 86 d1 f0 02 ca 58 aa ee 93 +29 fa fe 21 8f 67 50 f0 e5 88 f3 3b 64 e7 08 fb +27 a6 fe 81 eb ca 8a da ec 75 7a 14 ff 55 a0 c8 +8a da 2c 3b 43 e3 9e 8d fb e6 76 89 43 65 a2 21 +0c 2a a8 1f 42 4d 85 29 c2 07 6b 00 c9 2d d8 c8 +ae 3b 78 0d 87 db a7 29 dd fd ef 7d 40 7f 85 4a +71 cb 68 8b 9f 03 c7 1f 3b aa 24 a2 a6 e1 cb 41 +07 74 30 9e 40 c1 3c 2b 26 47 38 e5 69 7c fd de +f3 + +# PKCS#1 v1.5 Signature Example 11.5 + +# ----------------- + +# Message to be signed: +14 b2 76 02 ec e8 f0 67 b5 84 83 af 17 77 c4 ed +10 b8 b6 4e 64 c6 9f 57 ef 88 9a 1c a5 d5 b5 d6 +51 c6 08 db 23 9d ee a1 50 ff 12 cf 50 c8 67 96 +12 f9 7e cb 09 f7 + +# Signature: +15 c4 b3 f0 81 a2 e5 8a f5 94 e4 2f d6 ac cf 1d +0d 61 d9 3a 5e 3a 84 cf 90 4b 98 d9 ad 71 33 61 +b7 84 b2 4d 92 95 e4 3c 23 be 93 ef 36 51 4a 9b +ac 2c 1b df 4e e7 32 34 36 76 3a 20 66 2f 2d b3 +41 d9 e3 8b ed 5f 12 c7 dd 18 bc 3b b0 fc ba 5c +00 50 bd 1a 2a 44 03 71 97 b8 c9 fc 2a a5 99 eb +43 c3 d9 67 92 42 c9 9b bc 49 b0 3b 98 ea ca 83 +46 28 72 59 e6 ea 2e 89 15 5d 0d d2 b4 77 80 35 +75 + +# PKCS#1 v1.5 Signature Example 11.6 + +# ----------------- + +# Message to be signed: +e5 66 e5 fa 55 6c 76 5b 62 bd 6e 37 45 21 f5 08 +fe 44 66 68 c6 47 4b ef 04 6c c6 89 4a 87 32 2e +19 31 e8 0d 9e d9 ea 80 6b 16 7a 3a f7 7f c0 49 +38 b5 54 8e fb c0 68 d4 f1 96 6a 99 76 25 af 31 +a4 00 7f 06 98 a8 46 9a b6 81 f4 d5 08 b4 a4 8c +8f e7 20 cb 5a 94 a7 f4 43 dd 5a 58 03 04 97 da +a9 59 a3 aa f6 e3 41 84 39 7a + +# Signature: +07 e7 c9 44 26 24 bd 26 6c c1 cd 1a f3 b8 f0 62 +94 dd a1 c0 77 67 fe 19 bc ed 6c 9e d7 c4 b1 ed +7f 26 e2 03 db 7f 3a 1b fa 57 da ba 6f 3a a0 60 +03 bc dc 1e 00 c2 d3 d7 6b 9c bf f9 68 49 b1 af +f5 42 d0 d7 af c6 e4 22 49 2e ab 0a b7 f8 e1 d1 +ae 0b 27 9b 85 19 45 b7 65 85 1b 9f 8a d8 80 dd +16 4c 11 ac 4a 57 f9 6a 0e 48 4b a1 6a bf 1c be +8a ac 09 0a db 6a 71 79 7e 13 35 ee fe 2a c9 98 +0d + +# PKCS#1 v1.5 Signature Example 11.7 + +# ----------------- + +# Message to be signed: +b4 43 c3 43 52 7b 30 d5 ff + +# Signature: +0b 3f 13 c2 72 24 d1 61 01 b9 c8 20 1f 1b 4f 85 +37 db 3c 11 6f 3c e1 30 be 0d e0 dc 0d d2 0f 77 +3c df 7b 7f 37 23 87 c4 b6 53 e5 dd 44 21 84 45 +74 11 a8 2f 8e d0 03 66 ec c0 77 a4 26 7c 9d 7e +56 54 96 63 23 9b 43 19 fe 49 9a a7 89 54 04 9c +74 3b bf 09 d7 7b 30 29 d9 18 bb 7b 9a 6a e8 0b +12 9e 41 bb 56 da d2 b8 a4 b6 f3 19 33 74 c8 29 +2f e0 17 d0 63 34 7e 91 cb f4 dd 39 39 c2 37 f8 +3c + +# PKCS#1 v1.5 Signature Example 11.8 + +# ----------------- + +# Message to be signed: +db 90 04 7f 61 5a d7 19 72 ba ed 0c 10 62 6e c8 +cb 18 c6 d7 5e aa e0 58 21 9f d6 19 54 26 d4 4d +5c 54 3b ef 3c 4c 14 98 e8 77 d7 c8 53 e5 31 21 +eb 31 57 00 81 d5 de 48 85 cb c9 25 a6 c2 23 21 +cc c9 c3 78 4e b2 19 e4 2b 7e db 92 88 77 60 73 +29 79 8d 55 73 9c 89 d6 d6 b3 f0 d4 30 bb bc 47 +22 ea fa 67 de fc 86 ab a6 e6 34 83 fd 64 99 b0 +3f ab dc 84 65 d9 8b bb e4 40 2b 02 31 13 5c 21 +24 3d 7e 02 ad 5f 7e 9e 8b 94 60 c1 2d de 2a 39 +5b 45 69 61 cc 3d fd 9a 12 f5 d9 35 9e 0b 3a 6b +d7 7f 44 65 5b 60 3b 02 55 db ba ff 8b c8 40 75 +9a 34 62 fe ce 0d 8d b6 e4 5e 2f e2 bb f8 b6 e9 +7b 3f ea c0 79 86 73 82 57 ab 9f 8c fa 79 5a 20 +19 2b 5e 2c ea 11 8c a7 62 25 2a f6 c6 eb 00 ec +5c 68 20 bc c7 c7 + +# Signature: +00 aa b0 67 d3 a8 63 3d 0b eb d5 91 ed 34 d0 67 +f4 71 8c d7 f9 b1 e3 5a aa 40 5d a1 22 2a b9 40 +38 66 92 1f bd 05 74 33 40 7a 4a ae 7e 26 c5 cf +a0 bc 9c 11 57 05 7b 1d a1 cf 36 28 51 87 19 a6 +03 f6 c3 c4 de a3 0b f4 9d b9 b0 68 af ec 69 81 +21 dc e5 d6 0d 93 a6 f5 63 3f c6 af 9d f4 c5 dc +cc 13 8c 29 4e dd 42 9d 4a fe 3b 33 78 86 82 55 +cc 53 78 8c f2 b4 77 45 d6 4a cd 88 5b b4 7d 2e +ec + +# PKCS#1 v1.5 Signature Example 11.9 + +# ----------------- + +# Message to be signed: +2b e0 06 7b 95 18 5b ad e1 18 dc e9 5c 57 02 9b +55 4b 25 e1 c3 95 19 f8 f8 90 73 b9 a0 4b 7e 91 +29 9c db 87 b0 bd 17 c9 f1 51 92 5c 75 6e b9 b6 +45 07 25 61 26 41 07 88 21 38 85 4a e7 d5 07 e1 +5f cf e8 47 09 45 40 e7 1a 54 7f 63 b5 90 46 7f +ad ff 64 7f 64 3e 1c ec 11 24 65 29 06 2c 9e 40 +88 92 f2 a2 0c cc c0 ae 45 ca 97 a4 7f ca dc 8f +ed e2 1a 24 71 11 67 70 6c c4 b5 d6 94 77 e5 a8 +a1 46 b9 60 cd 4b 17 27 42 7b 16 51 7b 63 eb fb +cf 84 d0 b1 ac 8e 7e 70 f0 44 35 75 22 b1 d0 cb + +# Signature: +09 76 81 12 17 71 45 44 41 01 33 24 3b eb a9 a2 +1a 6f 72 12 c6 87 91 5c 72 02 7b ba 31 12 f6 97 +05 42 5c b9 94 cb b6 d3 59 c1 46 b9 5d b1 44 64 +35 d4 cf 96 1d fd 5c 49 87 39 bf d4 be 6e f1 ad +d7 4b 81 b2 89 8a 4c e4 3d c3 7c b0 e9 ed 77 44 +cf 40 9b ab ff 71 78 85 42 ff d2 86 eb e5 25 5d +63 dd 7b d5 5b a4 3f 51 84 e2 48 d3 a6 69 33 cd +b0 69 91 ec c9 0e b3 9e e7 1d 65 c8 8e d2 4d 94 +4c + +# PKCS#1 v1.5 Signature Example 11.10 + +# ----------------- + +# Message to be signed: +a7 90 e6 ac 5d 55 6f b7 cf 44 46 0c 7b 9b e5 eb +7f 24 f9 87 ff 89 0d cb 78 40 24 1d 45 54 5b 71 +05 63 5a 1a af 44 57 e6 41 0c 65 ae ce 50 11 e2 +77 5e c8 53 0a 64 a1 88 39 e9 c5 8a 7b 77 42 4f +74 29 3d cb 9e 9e a8 73 6d 6b a5 8b 1c 66 53 d5 +7b ea ab 98 73 5f 7a f7 32 47 7b 9a f6 a3 3f f0 +75 c7 e4 66 39 d7 48 55 08 20 ba 6a bd 4a 9d 48 +cb 49 03 f6 5b 76 f8 14 c6 cd c9 5e 8d 9e 87 0c +24 4a 02 9b 29 4a 8a 5c 82 6a b1 61 f6 f9 78 d9 +f1 c0 3f cd da ae fb fa db 8c aa e8 4b c2 dd 33 +2e b0 49 97 d6 1e fa 91 e9 24 1e 4c cd 97 64 c7 +26 e7 66 ed 3b 03 38 d0 86 f1 03 2c 15 33 ef 59 +3f 88 fd 56 03 37 91 b1 d0 62 5c 6c a5 1e ec 27 +9c fb 6a e3 f1 27 00 cf 5b ac 27 1e 65 67 + +# Signature: +0d 1b 11 1c e8 de 1d 7c 4f 7f ce ac 73 df 70 aa +6e da 58 dc 32 eb 98 f7 8e 7f b9 bc 25 de 3e 6b +09 ab 8c ae 3b 20 26 b6 18 7f f6 36 72 e5 7d a4 +ac 28 96 24 45 d1 fe 95 1d 27 be 6a 6c e7 a5 80 +7e 13 76 13 94 46 e8 54 9d 48 aa 59 fc 22 33 54 +d1 21 fd cc 38 f1 d0 27 5e 41 86 92 27 00 ad c6 +1d ae 1e 4b e8 05 22 2a 1c f0 7f 11 0a 61 58 a2 +a2 62 58 f1 9c 65 7a 11 0c 0d 9a d2 91 68 0c 75 +96 + +# PKCS#1 v1.5 Signature Example 11.11 + +# ----------------- + +# Message to be signed: +32 af d1 3e 60 7d 87 b2 5f f4 0a 88 5b 25 09 f5 +21 f2 a0 a7 72 a9 6a 39 fb 3f 71 c9 63 84 b3 d7 +57 8f 48 fc ea 97 39 56 0a 65 bf b4 83 d9 60 8d +20 25 55 f6 6d 61 2d 16 b9 25 53 87 b4 e1 12 41 +15 ed 48 bf ef 8b 89 d8 dd fc 21 9c cc e4 87 86 +c9 e6 42 6a 92 12 e7 b1 6d 97 1d 27 8a 11 18 f2 +f8 6b 9c 4b bf 75 c9 c2 d0 99 e3 f6 65 48 f1 f4 +a8 a8 21 d7 27 44 98 f7 cc e6 ec 5e 2b f2 bf ad +2c 6f c0 05 e8 0a 48 ca e4 69 92 fc 82 67 a6 48 +0a cb 89 4c cc 9b 62 09 5c ad 97 db 70 d8 82 a1 +3f b3 85 88 c4 8c a1 90 f1 80 cb 3e 61 ac b4 e2 +cf d9 cd bf 85 5c 53 99 21 f6 8e 11 49 d0 54 7e +f5 9a f5 37 92 dc 66 0d a5 ef 48 a7 ab 89 36 d3 +d3 6e d6 b6 46 9e b6 fd 95 e3 af 18 2c 87 68 fa +60 04 78 54 f1 8f 37 41 c1 88 3b b0 79 26 88 ca +db 9e 4d f3 91 d9 11 45 b8 5e 2a e2 4f fd fe 51 + +# Signature: +01 a9 37 b3 cc 82 54 d5 15 08 70 9e 4a 4d e7 b1 +81 de d9 a4 47 b3 ec 8d ad 49 2c 39 79 52 df 7c +55 0e 4b 26 c9 50 17 29 9d 8d 45 5f f7 97 1c 33 +8c d0 14 df 78 e2 a8 aa 5e be e2 58 f4 92 53 d5 +1a ce 9a 49 31 9f fc 80 7a d7 0b 2d f2 c9 6d cd +b7 3b 48 ac bc 4f 6c 3c 2a 70 1e 7c 15 4b 27 9b +07 05 bd f2 54 8c 8b 36 11 b9 7d a1 ac 09 cd 12 +12 50 99 54 0b f7 ba 99 b0 8c 2f 3d 5f 6a ea 7d +40 + +# PKCS#1 v1.5 Signature Example 11.12 + +# ----------------- + +# Message to be signed: +5b 00 b8 b7 94 a1 0d 21 f1 b4 5e ca a2 0d f7 c5 +b3 52 2c 1b 1d b4 b0 84 b9 59 aa 4e 56 58 ac 54 +68 f6 e8 fb 61 2f f9 9f 32 16 b5 d2 1c b4 ac c0 +bb 42 ee fd b8 e8 2d 75 4b 85 d0 97 45 89 4a 52 +3c 01 62 d0 8e cc e4 8b 99 dd 6c 38 e2 bd 3d 53 +1c 85 62 de ec fc 61 52 36 9a ac f5 80 ea f9 db +6c 68 b6 9d f2 fb f3 05 3f 60 1f 70 02 2c 9e 38 +1d fb c5 90 99 c3 7b de 5a d8 9a 8c c1 ef e4 c7 +b7 d7 8e 90 97 e0 81 21 ed a6 4a c4 5c 32 7e 5e +da f9 22 d3 c3 5f 88 b5 2c 93 d3 99 f4 c2 38 36 +2f e9 + +# Signature: +0f c6 ac 1d 42 94 79 38 cd 25 86 d0 e7 fc 3a 05 +42 b9 af 12 d3 6e eb f9 2b 5d 04 9c 79 65 b1 1b +a9 cc bf 47 00 f3 45 60 91 11 77 b9 d1 29 6f 1c +68 e3 af 46 9f 4f 39 9d bc 18 9c 23 ea 74 65 98 +28 13 32 33 05 ed 6c 35 ff 9c c1 09 d0 a2 30 3f +e7 d3 29 ca 31 7e c4 b1 8e dd 19 c6 2c 60 a3 c8 +c3 10 6f 86 db d0 72 e3 e1 eb 87 85 28 8c 21 ab +ca c2 2e 0c 0d 41 f4 e2 3e 7f 39 4d 46 82 f6 ce +87 + +# PKCS#1 v1.5 Signature Example 11.13 + +# ----------------- + +# Message to be signed: +b7 50 ae 6d 4d 2c eb 92 14 05 34 64 8d 36 ef 25 +e4 51 55 f5 2b de 1b f2 6a b7 + +# Signature: +16 aa de dc a0 9e 06 25 60 c6 61 d2 a4 9b 0e e4 +d9 ce 23 90 7c 69 d1 00 04 f1 49 d1 03 c5 9c 16 +fe 7d 43 73 59 7d b9 ff d8 92 3a 77 a6 b9 43 b1 +88 c4 74 25 e2 a9 e5 30 41 3e fd b6 84 8d d3 42 +0b a5 3e f8 1c 25 c5 78 f8 d9 51 4d 93 fc c9 cb +1f b5 2f 58 d8 8a 57 d1 fd 3f e2 2d a3 10 ec ea +9e ce 55 e9 60 8d 63 ae 21 db ae a6 57 1b 78 fc +fd d2 71 bb 65 92 57 47 6b 59 95 68 7a 02 bb e7 +89 + +# PKCS#1 v1.5 Signature Example 11.14 + +# ----------------- + +# Message to be signed: +47 be 01 02 0e b7 e7 87 5b d4 fc c0 05 a8 2b 36 +fd f2 14 5e f1 32 e2 ed 16 2f f6 94 bc 71 58 9c +7d c6 d5 a3 f8 9d 59 7f 2d 2a a3 43 33 51 18 f6 +fd bd ee f2 3e 61 3c ba cc de 41 95 e6 64 a0 09 +4b 07 fc 0a 32 84 8d 61 39 03 1c f5 72 a1 e3 23 +c5 a7 07 b6 fa 2a ee f2 dc 87 2d d5 a3 e7 6b 13 +f8 ef 94 ad eb d4 e2 05 74 8e 48 5b 40 01 d5 d2 +a0 90 b8 9b 2e 64 74 c4 79 e7 b0 0d 2d 57 f5 86 +ab 76 b8 0f 79 5b a8 99 62 88 29 2c 3f 2c a5 1a +44 e4 e8 41 c0 37 07 e4 80 25 af 4b fd 0a b6 ef +eb 83 62 ed d5 d2 34 05 ba 0e 23 1b 33 24 e1 ca +3c 5d 63 9d 2c 9d 82 + +# Signature: +06 39 17 92 9b bb 20 92 17 ff 48 ed 4f 55 d0 7a +03 f7 6d 6d 94 04 8b 6f 71 31 0b 2c 96 e2 14 ab +22 0d 4e 45 ac 01 c9 3d cc 8a 5c 26 a0 2d f6 1f +fd b3 17 54 96 65 61 0c 84 bd b8 94 5f c6 bb d3 +8b ae d7 fe e9 8e b0 56 d9 f0 39 a8 60 d4 52 b3 +ac ac 18 00 a9 32 a2 8c 88 28 6a bd a8 de 3c b6 +c0 d7 94 da ab 7a 8b a0 11 09 33 b4 d1 de d2 39 +cb dd 55 7d 3e 5a 16 29 17 85 33 15 de 68 09 00 +a8 + +# PKCS#1 v1.5 Signature Example 11.15 + +# ----------------- + +# Message to be signed: +4b 9c 09 64 48 10 d4 b3 06 55 ed 83 38 bb 27 6b +62 4c 68 01 98 22 d1 fc 8f 78 86 1e 13 e2 2a c1 +71 82 1c fd bd 3f 8f 5b 8d c9 c0 de 73 2b 74 6e +1d 13 2e 5f 3f 14 9a 5a 86 7c 2e e4 78 e8 f1 4a +d4 b9 dd eb d3 ae 78 17 e8 49 55 b3 40 4b 09 43 +93 e6 1c a0 18 9d 05 53 69 b4 24 30 09 a0 f5 40 +3f 41 c1 00 23 08 c0 0c e6 99 67 19 37 ba f1 3c +78 93 d6 63 c9 47 fc 7f 84 07 1a 67 2e 5e 07 37 +8a ac 08 b3 fa f0 fc cf 5b f2 83 09 25 85 eb e2 +40 a3 00 46 20 b6 f3 ae b6 73 2b 7b 9d 8d 3b ea +fc 84 67 d1 f1 f1 c7 da 66 b1 bf 5c cc 14 5b 32 +24 24 5f ae 31 df b4 03 f4 93 c0 75 53 57 ad d7 +cb 27 63 71 32 26 c5 4f 43 64 0f 7a 67 0e b7 b1 +f6 e9 e7 72 f2 e5 14 17 a7 05 cf c5 87 3f fb 88 +a5 db 07 ec c4 ee 89 f3 30 a6 69 0a 88 12 + +# Signature: +1a 0b 69 8c f3 a0 58 b4 49 19 af 73 c3 de 32 8e +86 ce 9a 5d 49 99 e0 12 2f 41 4b 94 f3 2b 2d 8a +b1 e6 55 0c c0 d4 8d c0 4b ef ac 2c 67 a4 d0 69 +a7 20 8f 14 2d c2 67 b3 e3 8f 63 38 a0 b1 83 9a +93 a8 36 80 7d 18 1e 3f 0c 7e 87 7f b2 42 16 02 +00 5b ca 25 a9 c3 72 26 6d 18 e6 d5 00 c5 c7 ab +13 38 52 83 d2 af 91 9d 0b ba 0d cb 88 bf 7b b9 +97 2d 67 00 8f f4 98 54 7d 80 fc a6 58 ef e7 64 +a5 + +# PKCS#1 v1.5 Signature Example 11.16 + +# ----------------- + +# Message to be signed: +ec 9f f1 4b 9f 19 7a 2b 4f 24 94 8c 29 d2 f6 4a +64 62 52 23 dd b8 53 46 37 8c 2c 25 34 3f cb ef +58 5a 99 e1 ec 0b ef 0e f9 d0 9e ad 85 be e1 c4 +bf b3 5e 48 fb 26 41 1b df 18 0d c5 cf 31 7b 3a +34 83 71 c7 c5 f4 aa 6d 59 08 fc fc 1e a3 90 18 +cf 04 49 e5 5f 4e f9 94 bf da 40 4f 1c 18 9f db +8a 0a 5b 09 06 c3 d4 0d e1 e7 87 c2 db 4d 88 db +c2 10 b9 f8 01 f4 cd 9c 97 22 7e 9b 2f bc 28 11 +e3 8c ed d9 e9 f0 35 60 03 1d 4c 95 8a 76 81 ba +9d 7e a5 e7 8e 9b d8 bd ed db 41 56 79 0e f2 1f +b7 4f bc 41 58 c2 93 9e 4e fc b8 2e fd c8 81 88 +6a 5b 67 13 a2 4b 9b 5f 2e e2 5c cf 72 1a 64 e0 +f6 40 77 8e cb 3d 35 b4 b8 ee a8 ec e3 12 32 63 +63 10 ae 3c c6 b8 2b 8a + +# Signature: +01 3b 42 05 78 20 c7 3e 3a cf c1 df 4d e1 44 0c +65 8e 01 80 43 6d a7 18 5a 9f ab d2 6e b3 26 74 +b5 54 de 35 4d 1f 4f 24 e8 77 73 26 7f ed 9d d0 +fd 82 93 ea ca 4a f3 d3 a9 dc 51 8c 8e 49 5a 14 +76 95 11 1d 3d c1 77 63 f1 f0 2e ec 1e e2 9f b1 +ab 74 9c f3 0c 78 86 da 8b 2f 64 69 69 59 8a a7 +0f 9a 92 fa 4f 93 5c 7c c7 7b fa b6 98 1f 0d f0 +d2 85 cf b1 0d 66 58 15 39 f7 8d 03 68 ed 4f 93 +01 + +# PKCS#1 v1.5 Signature Example 11.17 + +# ----------------- + +# Message to be signed: +41 4c ea 8e ec 6d a3 c6 6f fc 84 70 f7 e1 47 60 +f7 4b f6 e7 5b 84 dc 98 fc 80 60 dd 3c 21 9e 76 +77 7d fa ba a6 e6 b9 29 55 37 9f 3e ca af 5f cb +8a a5 54 9e c9 cd d1 f5 d5 77 20 1b 8e 32 9f 72 +fa a2 bc ad ea ee 38 8d af 7d 40 8a fd e6 55 3d +24 17 86 0f 3c 8e 25 30 5d ff 76 db bd 95 16 b6 +86 8e e4 56 fc 1f 7b 58 d9 ed 18 a4 6e 4f c1 e3 +53 e8 d0 76 be a3 0b f2 47 c6 0e 6f 68 58 01 a6 +d3 f6 30 ae a6 ab b4 12 a9 41 ff a6 f6 07 f6 bf +b1 3d 90 01 27 bb ec ee 4f 98 a7 ac a6 92 08 11 +57 50 53 ab 2d 42 70 13 80 1d 8c fb c3 88 0f 14 +75 43 15 55 a0 86 fa 55 60 c6 e2 20 6d 9e e9 38 +13 44 b8 24 1c 1d d1 d8 64 48 75 3a f4 4b 00 a0 +c9 + +# Signature: +16 97 bb 23 e2 91 52 5f 4a 0e 79 26 2f 34 06 63 +0d 0d 6d f3 32 49 69 26 c4 e5 ae f9 6e 41 d9 55 +14 86 47 ea f7 90 69 6a f6 8c 78 eb 2a b6 2f f7 +19 62 96 e1 ea 88 6d f0 91 73 66 09 0b 63 0a a3 +18 58 b5 16 15 87 3f a6 bc 8f f0 88 5c 57 b2 e7 +7a 04 90 88 93 cc ef b1 41 24 03 99 1d 0d 23 c5 +57 d2 22 29 1c b8 51 7b 43 28 6e e0 05 67 58 d9 +c1 0b cd 69 bd 68 b8 4a 2d 1f 53 79 05 b8 a4 65 +e9 + +# PKCS#1 v1.5 Signature Example 11.18 + +# ----------------- + +# Message to be signed: +17 89 b8 08 b1 0d e8 d1 77 8a a4 3f 94 10 1c b8 +9f 56 34 30 61 a1 a9 43 bb 8d a5 5e e6 b9 79 e2 +7a fe ab 0e d8 ee 37 14 fb e7 0b 3b e8 20 60 3e +5c ea de c4 b2 2f 95 87 73 22 5d f3 aa d4 87 b2 +80 57 eb fe be 2c 87 93 da 38 46 bd b1 59 03 ac +71 e9 c9 3b 20 16 66 8b d9 06 30 1a 0a 7d 50 dc +60 b2 fa d8 75 9d 18 db 14 7f 20 66 86 5f d9 09 +50 a1 88 74 7d 9b 69 68 53 48 6d ea ab 8e 44 3f +ad 29 92 fc 8a 56 5b dc ba da b0 b9 33 3a b7 fc +db 9c 3d 0b cf de 50 a5 8d 2a ea f1 ce fb 0c 95 +f9 07 73 b2 fa c1 37 cd bc + +# Signature: +02 f9 97 51 c8 44 38 ea c7 f9 96 32 50 d9 ee 22 +fd a7 29 7b 6e 86 e2 a8 bc c7 a9 b5 ac 01 f7 90 +e0 99 11 70 46 60 85 8e a5 c1 62 72 c3 81 33 fa +da de fa 23 c1 02 90 8e 41 9d e2 eb e9 ac 27 19 +45 72 87 8e 2a 97 1f 88 31 c8 f9 17 e8 52 e8 51 +df 99 d4 df 01 8f dd b2 ce a3 1a c3 a7 b6 89 75 +e8 0a 99 7c b7 dd 4d 4d f7 57 bb 8c 3e cd 91 0b +cb 06 03 35 52 12 7a c3 08 11 77 39 a0 2c 20 17 +17 + +# PKCS#1 v1.5 Signature Example 11.19 + +# ----------------- + +# Message to be signed: +ff 87 5c ca 0e fc 3d 90 f5 6e 31 f4 bb 66 84 14 +89 4d 09 de 90 12 7f 84 66 32 43 10 e1 13 69 a3 +f2 f6 49 3c 1c 78 a3 62 b2 a1 4f b5 48 8c b5 6c +e0 22 73 9e 43 aa 76 3d 9c 1c 97 b6 21 cc 53 68 +c9 c0 0e 81 60 67 92 69 5f 9a f9 ab 63 3e f2 39 +ea b3 44 9d da 9e 66 07 08 9c 37 51 90 35 4f 7a +59 a4 b3 ef 75 22 9d 1c 47 ec da e3 3b 27 69 ff +55 42 65 5e 78 10 22 d0 c4 3b 42 1a 99 84 3c 3d +e1 04 22 ad 2f d8 9d fe 44 66 15 f5 19 2e 75 79 +d4 37 43 79 bb ff b9 + +# Signature: +02 68 91 7f 8b da ac 9e be 32 b0 dc 6c d9 d3 9e +fd 3f 88 d8 17 d6 6c b6 39 0d 7b 55 c6 92 12 21 +84 4a b8 c0 89 86 d3 f2 ea 49 bc 6e 3a 10 02 08 +6c 0b 6d f1 63 f7 9d 16 11 6a 93 c4 a2 cc 04 22 +c9 48 41 e1 e3 b9 45 ab 1d 25 3a b8 d7 d1 39 c9 +18 8b a8 30 27 c5 93 f8 3a 6f 38 37 0e 7f 03 79 +ff dd f1 42 7d 6f cc cf 60 83 31 3f 18 15 b5 de +d6 73 74 30 bb 4a 70 ba 81 48 48 34 d8 d1 d2 9a +5e + +# PKCS#1 v1.5 Signature Example 11.20 + +# ----------------- + +# Message to be signed: +e0 7e cf 00 e2 40 1a c9 8b 2d 5a e0 c9 b8 3f 21 +9a b0 27 a6 51 99 fd b6 34 59 6e 23 44 62 41 38 +72 95 32 49 53 28 f9 3f b3 a3 32 55 27 8f 3e c2 +60 65 ce 54 99 5d 42 41 93 bc b7 58 1b fe 1a b8 +95 7d 0b 96 1c 30 30 b8 20 d0 9c 9e 32 6c c3 0c +0a f6 42 66 61 54 + +# Signature: +00 c4 6d b4 1b 65 dd c7 1f bb fc 12 5a 4f 9b ab +88 0a 2f 0c 1f 04 1c 41 1d f7 d4 5d 1e 19 99 7b +34 8e ab ba 19 bf 79 b2 21 77 b2 a0 d7 3f ef a5 +00 83 62 ce 59 60 d7 ef 58 a5 89 93 e7 46 03 d4 +d9 d0 b3 da d4 b2 0c 82 9d 36 ef ca f5 7f 0c 4f +0c ef 89 01 5a 48 45 02 42 bd 02 0d 5f 52 d8 b5 +0e a1 3e 56 a1 aa d6 01 91 5d 60 ec 9a bf c3 07 +f1 8a f2 06 72 38 4d cc 12 f9 82 27 31 36 99 71 +40 + +# ============================================= + +# Example 12: A 1030-bit RSA key pair +# ----------------------------------- + + +# Public key +# ---------- + +# Modulus: +36 98 1a 95 ae 24 18 14 52 da 25 7c 03 8f 05 82 +14 12 d8 4e b4 7a 43 fc c7 ef 12 17 95 9b a6 77 +02 7f 70 86 d3 a8 5c dd 34 9f 92 0f 03 4c 02 78 +79 2d c8 a8 cf 0c 00 80 e5 c6 1f 47 48 83 c6 87 +9f 4d ee 0a e9 52 47 8a 5e e2 ce 4e 39 18 64 1e +81 3c b3 74 f7 b2 83 2b cd 6a ea 80 9d 25 4f c2 +ca 9a c5 a3 32 42 4a b6 5c 2a 26 12 75 d1 9a 41 +4b 61 65 00 d5 e3 73 70 63 15 f0 63 dc 88 5d 7f +b9 + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +36 98 1a 95 ae 24 18 14 52 da 25 7c 03 8f 05 82 +14 12 d8 4e b4 7a 43 fc c7 ef 12 17 95 9b a6 77 +02 7f 70 86 d3 a8 5c dd 34 9f 92 0f 03 4c 02 78 +79 2d c8 a8 cf 0c 00 80 e5 c6 1f 47 48 83 c6 87 +9f 4d ee 0a e9 52 47 8a 5e e2 ce 4e 39 18 64 1e +81 3c b3 74 f7 b2 83 2b cd 6a ea 80 9d 25 4f c2 +ca 9a c5 a3 32 42 4a b6 5c 2a 26 12 75 d1 9a 41 +4b 61 65 00 d5 e3 73 70 63 15 f0 63 dc 88 5d 7f +b9 + +# Public exponent: +01 00 01 + +# Exponent: +09 ad 03 17 30 b6 32 73 55 ac d6 94 68 70 0e 7e +9b ae ac 5a 24 a7 ff c9 3b 29 2e b8 71 da 54 92 +46 a5 ce 0c 83 52 55 65 1a 28 c6 e2 f4 c7 61 af +b6 f0 6b 9e 29 95 fb b7 dc a1 74 d5 36 2f ae bd +c3 9a 72 c5 79 5d 1f 33 92 ec 08 8b 5d c2 a7 85 +b2 c9 c4 c6 e6 69 e7 23 b5 dd 0c e4 43 25 55 12 +67 dd 62 e0 f7 8d 24 24 ad ae 48 e2 49 44 3a ef +4a 37 04 10 db 9e 70 93 99 ac 37 cc 48 1b 59 00 +c5 + +# Prime 1: +07 72 0f 21 cd db 92 27 45 b7 1c f8 11 6a 83 66 +9a 0d db 89 e8 f3 f0 6c 34 7c a7 87 cf 10 ef 16 +93 bd fe 3a 0c 36 4c 7a 7e 89 04 17 f2 af 49 47 +5c 7d 07 6f 9c ee aa e7 6d bd 4e 92 15 af 45 69 +4d + +# Prime 2: +07 55 1c 27 e9 aa f1 1f 47 4f 1c 9a 14 bf 14 4c +fa ef e2 7f ca 4f 20 79 5d ec 85 34 c9 37 bb 00 +fe 16 23 5e cd 69 1f d2 3e 32 cd fb 8b 78 66 6b +b7 82 84 ae 15 d5 9b e5 ca 74 73 e6 2d 46 a9 da +1d + +# Prime exponent 1: +02 e2 2c 74 16 0a 94 36 bb 6c 28 3e f6 57 be dd +ec 89 b3 5d 5c a7 a4 93 f3 5b d7 71 e4 42 95 a5 +b3 c0 20 06 11 16 b2 55 ba 4d 8c 15 4e 3a 8e 71 +a1 a3 16 4f 26 82 d4 13 5e cf b2 ef 26 90 c3 9b +fd + +# Prime exponent 2: +01 d2 bf f5 8c bc dc c8 12 4b 31 a9 7e 8f 24 d5 +1f 70 96 b9 7f ec bc fe 70 c4 67 3b 00 ed c2 aa +34 83 fc b7 8e 0c 1d c5 81 81 d0 86 43 df e4 57 +d4 81 b7 cc 31 d1 b3 ba 27 e5 5d 0c 57 25 c3 06 +61 + +# Coefficient: +06 d2 27 72 57 42 ef 03 46 2d 1c f6 12 67 4a 78 +83 1d 61 9d a3 d6 40 eb 7c 71 c8 7b 53 28 69 72 +73 c5 f7 51 e1 4d 7b 81 c1 2b 6d eb 44 75 1a 92 +95 cb 67 1e 81 48 4d ea a8 3b 4d f1 fd 37 e2 ff +3c + +# PKCS#1 v1.5 signing of 20 random messages +# ------------------------------------------------------- + +# PKCS#1 v1.5 Signature Example 12.1 + +# ----------------- + +# Message to be signed: +e4 b2 d6 0e 3b dd 27 81 6f + +# Signature: +13 fd 4a c1 ac 68 48 17 37 80 96 5a ff 5e 61 c5 +96 89 2b c1 47 76 0d 43 07 9b 5d 71 77 e4 23 d4 +86 f5 a7 3e 1a 16 b3 ce 9b 5e da c1 61 ea 6d 4f +6c 23 fc fc 3e 62 19 ca c5 56 06 7f fa ed 4a da +c0 a9 50 05 09 0b 89 84 4c 54 35 4d b2 2a af f9 +ee ff 9d a5 aa a5 49 04 25 e1 35 cc 0f 64 58 4c +7f 05 fe 33 6e 44 40 bb 86 92 86 d4 4a f1 57 88 +0e 3a 40 fb 06 72 5d 09 de b3 7f 1e bb 18 1c 8f +5c + +# PKCS#1 v1.5 Signature Example 12.2 + +# ----------------- + +# Message to be signed: +78 86 85 fc 58 05 d6 27 b1 3f 2f e7 fe 6f 7c 9a +b2 ca 49 44 ab f3 08 b8 6d 1a 0f 58 3d 17 b5 76 +02 43 9e 1f 2c 6e 0c 5b f7 81 70 50 13 38 b4 c4 +47 e9 19 7b 65 03 fb 73 eb ab f7 76 de fa e3 3b +dc dc e7 7d e7 9b 82 be 14 85 a8 aa 9b 82 09 37 +db f4 28 a2 05 50 96 6a 86 b6 2a 17 2e 6c fb dc +fe 0d 6f c6 7a 4d b6 22 52 fd af 85 f1 e6 bc 14 +f8 ab 1c 53 32 6a a6 a7 bc 5e ec 88 e0 b1 1d 48 +d2 b5 61 f2 26 06 50 10 2f f2 7b 57 b7 00 72 bc +c1 21 e3 5e 70 f3 78 0c 83 33 b5 bf 6b 08 fa 12 +08 26 0f 33 + +# Signature: +09 04 cc 11 ac 66 a9 83 7b 74 56 8b e2 50 e5 3a +e4 be f7 8d c6 7f fe e5 09 e5 d9 b4 72 58 3e aa +a5 6d 4c 9e e7 0f 6e 82 dc 99 8b 53 ef f1 27 2b +f0 1f 09 e5 26 2b 15 5a 6e 56 d1 50 40 03 e4 c8 +a4 6e 65 02 55 32 78 23 0d 6e 81 b7 29 18 43 ab +97 69 73 7f 3c 69 31 52 f1 7b f2 d8 bf c7 82 bd +b3 fa 0a ea df 0d 44 1e 1e 52 de a5 4b 75 cf 16 +5e 35 c3 82 d3 11 74 f6 67 9d 2f 21 b9 81 f4 13 +58 + +# PKCS#1 v1.5 Signature Example 12.3 + +# ----------------- + +# Message to be signed: +4e c7 39 3f dc 4b 90 af 8f ff ca f3 4e 84 5a 09 +65 6a ef 9d da 12 b0 34 2c 46 eb 04 91 74 aa 51 +1b 43 c9 4d 75 c0 e2 90 70 af f5 b4 14 23 a1 70 +d9 b3 e8 b2 12 24 aa bc 53 1d 88 88 6e 26 46 d6 +78 8f 1b aa d4 ef 4b 0b 4b de 4b 12 ce 90 52 08 +2e 2d dd 0e 3e 6c aa bb 0a 14 34 4b 0a 58 3f 40 +4c 1b 6a 3c 7b ca 8a 58 85 d5 f2 24 af 1f ca c3 +fa d9 37 0e 9b 29 74 e8 ca 62 e2 2a ce b9 + +# Signature: +21 a6 6a f6 27 ee 0d d0 5f e7 56 3c c1 d2 9c cf +6f 87 31 b4 1e 3d b3 95 97 89 3b a1 cf 37 5f 78 +17 88 fd f0 73 b0 b5 93 c7 6d f2 81 6e c6 de fc +22 42 21 ac 19 f5 be e4 4f c0 e5 d4 09 3d 34 68 +27 8f b4 2d 40 5a 07 04 46 53 22 da 4d 3a 7c a9 +c3 da 73 c3 d0 82 ae e5 67 b7 70 83 32 3e 75 bb +35 ed 77 e8 db 9c 01 b4 96 a0 4c c4 a8 99 df 35 +9d a4 a2 28 7c af ff e1 ed 63 cd de ad 87 6c 94 +07 + +# PKCS#1 v1.5 Signature Example 12.4 + +# ----------------- + +# Message to be signed: +90 77 60 db 32 96 9b 09 7d c1 24 ef 89 75 15 11 +a5 d2 30 59 6d 2f d8 a8 91 ff 00 f0 5f ba d4 5f +72 a4 5d 46 56 24 a3 ab 67 af db b9 e5 f9 e6 5b +63 e3 0c 2e 57 fe 7f 32 f3 99 01 10 33 dc 05 29 +c0 97 1f be 06 4f c5 ed b0 1f 84 cd 57 28 3f bb +bd 2a a0 29 44 11 0b 6b 53 4f 74 08 2f 56 be 34 +6c c3 43 bd 4d 0b 34 80 91 c0 05 c6 19 9a 7e 3d +56 88 52 47 b0 c1 6a 36 b2 35 b8 f5 d4 f0 0a 6c +6b b6 fe ed e8 8f cd 78 8d 75 ca cf f7 d9 56 87 +99 65 71 55 9c 05 79 6a 55 71 1d 77 46 bb 92 d8 +52 89 3b a9 06 75 f9 8b 0f 54 08 48 1b f1 54 3f +39 de 3d 0c 0c 1f 53 49 5b d2 12 dd cd c6 d0 e5 +7d 7a 3d be 24 20 8c b2 4e d4 1d e0 3a 5f 05 2a +9b 58 12 70 0a 5c e0 5c 02 00 d4 71 9c 55 54 4e +7f b2 94 d3 44 a4 f2 05 ef 9a 34 97 b5 67 54 7c +bd 1a 63 3e 2b 79 d3 34 90 95 + +# Signature: +0e c9 38 a0 d4 b2 a4 ed d2 78 d6 3d e7 61 c1 02 +e2 59 21 02 ee 05 db 1b 59 1e 0d 85 7b f6 66 84 +9e 74 cc 19 b7 e4 e9 cc 39 2d e5 39 f7 90 fc 68 +e3 b5 21 db 3a 1a 26 7e 5a 4e 12 19 75 2e 01 99 +e7 01 9a 24 85 54 c5 ba e3 11 2b ee a4 0c f3 e6 +4f 8a af 9b b1 e9 d1 c1 d8 83 3c 2b fa 31 b9 d5 +45 0f a2 49 29 7f e2 e4 6a b0 3e 99 b1 f9 c6 51 +d5 39 eb 53 ce 09 61 ce 60 23 c1 7d d7 38 3d d1 +2b + +# PKCS#1 v1.5 Signature Example 12.5 + +# ----------------- + +# Message to be signed: +bd a5 54 95 47 32 d1 d5 f3 94 75 55 c6 1f fa b8 +01 db cd c8 12 1d c6 81 91 27 c2 f2 2a 43 6d 20 +62 2d 1f 4a 44 7c 3a 77 b6 58 57 31 af c0 3e 77 +ba eb 70 9c 1b fb 90 6a 1a a1 94 9a b6 76 3a 15 +c7 da 5a 12 a8 f3 95 10 1e 64 6a 83 71 73 14 1f +2a 0c f5 36 02 4b 36 91 8c f9 db 95 b1 cc 40 5a +ef e6 3a 3a 93 bc 4a da 60 a0 f4 e0 72 9f 4d b8 +b7 6f d6 4e fc bc b6 6f 0e 4a af f3 + +# Signature: +07 26 2f e1 f3 d7 b7 79 32 cd b7 cd 96 ac 19 8b +93 03 eb 44 46 0f 52 98 e8 e5 2f e6 70 52 99 bb +d6 18 ef d0 b3 63 31 56 2f 20 b2 0e 86 6d 99 c2 +d0 4a 01 49 f5 64 dd f6 6b a3 19 f3 b8 48 25 39 +6e a8 b8 93 ba 5b 3e e5 e5 24 5c fe 6b 61 6e 30 +a9 00 bf 83 bb 76 3d 20 b3 30 37 01 ca be 94 33 +41 48 88 2a e4 ef 14 e6 d9 e6 c7 52 bc e2 53 bd +da 57 39 e3 3b dc 32 eb 08 28 28 c1 c3 99 c2 2f +ea + +# PKCS#1 v1.5 Signature Example 12.6 + +# ----------------- + +# Message to be signed: +51 76 ad 7c 99 be 4c db bb 5d 79 ba 5f 49 6c ad +9f 42 dc 25 d5 27 a5 d5 e8 e3 35 91 79 22 5e 6b +0e 43 66 6d 3d 82 ab 5b af 42 4c 85 c3 31 21 60 +6e b7 9a da 6b af ca b5 c1 e2 54 6c ab f6 a3 60 +03 84 05 ca 18 c0 08 36 67 + +# Signature: +06 27 23 8b 0b 93 e4 cf 98 57 13 d2 91 29 6c ed +e3 45 e8 8e 17 82 45 25 53 59 39 b3 f3 d5 ff 4e +bc 40 74 00 11 49 00 25 df ea ae e9 06 38 c5 39 +1e b4 4e 9f f3 70 45 7b 60 d5 de 80 c1 65 38 cb +38 60 55 95 85 ca f5 e3 33 2c 7b 1f dd 8f 45 fb +6e 35 57 f2 c7 a6 0d 09 9e 94 f8 e9 6b aa 1e 03 +19 9a c8 3c ec 8f 9c 16 bb 49 15 1a 88 72 cb fe +70 f0 02 cf 3b 53 b6 11 d6 cb b6 65 89 7c eb f5 +99 + +# PKCS#1 v1.5 Signature Example 12.7 + +# ----------------- + +# Message to be signed: +e1 74 71 93 64 f7 bd c8 6e 2f 0c 61 26 5b f8 05 +7d 64 9c ca + +# Signature: +09 77 19 54 fc 8a 1f ee e9 0f 60 c4 b8 a5 bb d4 +62 c6 34 37 9a b3 da 19 ff eb a6 e0 31 b4 24 3a +83 50 9c ee ed 6e 01 2a 91 63 c6 14 5c f7 05 02 +a9 fb 0c 21 db 31 fa d5 ad 14 69 5d e0 02 62 e4 +e5 67 09 5e 16 11 0c 6e 65 d6 bc b9 cc 02 e9 19 +f9 0d 19 e7 30 7f 44 34 50 3f 9f e0 2c 12 c1 d3 +f5 0c c1 60 08 6f e4 60 29 8c 88 12 25 bf f2 e9 +e3 13 da 38 44 44 be c7 2a 67 ac 34 44 67 e8 2b +66 + +# PKCS#1 v1.5 Signature Example 12.8 + +# ----------------- + +# Message to be signed: +98 cb c9 1f d4 9b 50 7c 88 7e 97 c3 cf a9 b5 9c +26 00 1f ca c1 64 87 f6 00 4f 0b 68 74 54 63 20 +02 d5 49 b5 46 1f f1 53 0c 0f 5f c0 9a ac c4 6a +da da 7d c9 d7 b3 e2 0f ed fe ec d8 f2 f1 68 41 +77 32 68 54 2e 86 43 1c 7f b4 d1 63 f3 1e 8e 31 +72 20 34 26 bc 0d 88 a2 3b 13 76 34 bf c7 14 01 +72 20 fb fb ec 88 8e 01 e3 ef f7 bb bd f9 3f 08 +3b 88 fd d6 40 7d 98 9b cc 5e cb 15 3c 9c ee 34 +10 fd 00 6b cd f0 7a f2 28 79 0f d5 e0 4f 5c 0a +1b 63 64 8d 48 60 9b f1 63 c6 fd 65 60 20 75 7c +3c 06 38 e1 b8 2d 75 e2 b4 b9 08 b7 e0 a3 c8 d7 +26 6b 80 1f 60 fc 2b 4f 31 7e bb 8b f2 2a b9 e1 +cb 7b 77 84 39 5b d7 b4 24 32 9e 86 1d 47 86 61 +f6 dc 12 98 51 5f 48 56 4a 3f f9 97 35 bb 90 03 +38 75 a2 5b e8 b7 24 f3 + +# Signature: +0f 2d 7a 5e ab 83 58 45 03 d9 4e bf 7d de 9e ed +49 41 10 be 94 ed 64 8a f0 cf 6e 89 1b 06 2d 2c +9d ef 95 87 55 b1 a3 08 48 8d 16 70 74 29 51 ec +00 60 54 5d 2e c4 3f e8 4a ec 89 01 ad f4 fe 8d +67 aa e5 7a 31 9f 49 1c 85 c2 1c d7 f9 c5 99 81 +3c eb 9d f8 47 78 ad c8 2a 33 c4 e7 67 4d 7f be +13 48 dc 20 75 51 10 4f 54 42 ac d6 84 86 9a c2 +2c ac 51 6c c9 88 7f d1 d0 21 ef cc 54 ab da f2 +b6 + +# PKCS#1 v1.5 Signature Example 12.9 + +# ----------------- + +# Message to be signed: +3e ed 6b f1 16 cb 31 e0 fd d4 c5 c9 33 58 ba b6 +8f bf a8 b5 c5 15 bc ab f9 05 1c df 95 a2 43 e5 +ee 68 15 15 4e eb 4a c1 0f 52 31 d0 49 38 13 e2 +81 49 e9 68 2b b1 c8 b7 7a 6e 13 60 b2 b2 c0 f9 +c3 16 1e 41 7e f6 cb 3d 9a bb dc 74 2c e0 25 fa +fc d5 38 c7 7c 4d 07 16 49 1d a5 4b cd f1 67 b4 +7a 61 a0 35 27 c9 6e 4b 42 bf dc 98 5b 17 87 81 +b6 92 0f 60 f1 1c d5 fa 76 66 3f 56 f3 19 f4 50 +cc 2a 7f 13 bc ce 59 e4 1c b6 66 + +# Signature: +07 67 3f a6 83 e0 98 bf a2 b9 55 b6 c3 4e 9c e8 +ec cc 5a b0 ab 4c 2c f7 9b 9b e1 e6 64 42 5a 7c +17 7a 47 d5 32 0c d5 70 86 f9 51 89 18 45 09 4b +1f bb c9 de e5 f9 b5 56 df 3e 61 e7 e6 69 73 d6 +3e 69 c9 da 17 29 6f e6 15 d6 33 c8 62 18 dc a3 +99 25 8c 04 f8 05 bd 04 d9 dc 97 a2 9f 39 d6 06 +ff 8e 9c 0a 13 71 aa ee c0 03 ea 27 48 95 ff 7b +a1 50 2b 28 f8 17 63 02 c2 4e ec e5 b5 28 d6 71 +00 + +# PKCS#1 v1.5 Signature Example 12.10 + +# ----------------- + +# Message to be signed: +08 4e c2 87 86 5e 8f e6 88 04 72 37 20 97 ad 5b +96 4c 40 a9 35 ee d1 be a5 1a b1 b5 bc 75 c8 46 +bb cb d9 54 88 e9 ec c3 63 cf 07 3a 90 b2 0b e8 +b6 79 36 46 22 f3 45 e1 22 d0 56 6a cd 34 a4 ae +11 24 45 25 a3 8f 47 dc 1f 92 b1 7f 89 ed e0 6d +83 6b 44 26 ec bb ea 79 33 ac 0e 84 7e 55 10 33 +b5 f7 ea 4e af 1f 63 f3 47 9d b7 ea f8 02 c9 96 +de 92 33 86 cd 15 b1 22 de 5a 23 98 d3 f3 97 02 +c3 e9 06 5c 32 73 95 b9 a9 95 fa 25 4d e9 c7 ad +b4 51 + +# Signature: +13 a7 f0 04 c0 a8 8d 51 3e 2f 1a ae ab 41 7f a0 +b2 70 2f b9 3b 82 87 20 cc d8 00 cb b0 af 5a 19 +65 72 5b 6e e0 58 71 17 cb cb 81 a4 63 18 52 1c +95 0d d8 46 9b d8 55 73 f5 d2 9d 86 53 03 eb ac +45 c7 f6 03 1c 6f 93 78 eb 12 b4 2f 05 09 44 31 +6f 0b 93 db 89 9b ec 93 7d 5d 0f 58 ed 40 70 04 +01 cd 32 65 a6 a4 4b 09 bb 11 a4 38 ee a0 77 15 +ef e4 2d e4 e8 80 8f 88 24 02 61 14 8e 8d e2 93 +ed + +# PKCS#1 v1.5 Signature Example 12.11 + +# ----------------- + +# Message to be signed: +61 07 00 00 7c 3c 6c b0 96 c9 94 d6 5d 95 c9 b9 +a1 47 c3 46 14 cd 72 2f 29 eb c5 e0 93 78 6f 79 +09 48 02 14 1a 31 08 d2 ec 8a 87 4c 53 18 7e b0 +d6 ee 2a 85 91 38 cf bc 29 22 15 06 d0 bd 89 b0 +f3 db ef 50 6b d1 ba 40 36 b0 f1 ec 00 73 32 70 +60 75 2b 42 8c fa 12 db 28 0c 53 aa e5 f3 e3 57 +0e 91 8c b0 9b 90 e9 84 7f 1f 5c a4 48 7a 6b f3 +ed ad 42 5f 78 40 7e cb e3 f9 bc 7c ab 00 75 66 +58 79 43 1c 6c c3 9e 0c 7e 67 00 60 67 41 8b ee +8d 0d b5 e7 db e1 2d a7 16 ca + +# Signature: +1e be af 85 d1 8f 37 84 0e 8a 3e af 07 d6 9f 52 +4d 88 3f a4 2f 29 1e 20 07 db 59 5a d6 93 0e 8d +5a 75 b4 0b b9 5b eb 72 d7 ce d0 38 17 97 47 e9 +66 1d 08 38 40 d5 87 dc df 21 c3 ad c7 d4 7a 01 +f6 ec a9 c7 bf 9e 2a 98 87 75 1b 36 d1 ab af 25 +a3 13 fc 29 d7 f8 34 d2 a2 48 29 85 57 5e 1b e2 +4b c4 ef 43 a5 7e f4 b0 a6 83 69 93 e1 1b 67 07 +85 04 e3 b7 9c 72 17 75 f5 b9 9b fa cc c4 8a 8c +34 + +# PKCS#1 v1.5 Signature Example 12.12 + +# ----------------- + +# Message to be signed: +da 31 f9 be 26 09 + +# Signature: +1d 2b ba fc a4 1c a0 6c 4b 81 1c b9 d8 36 96 87 +16 6d 14 d9 f9 2c 5b 98 fc 7c 77 2f 2d 75 d3 5a +5f 9a cc e5 9b 99 ef b2 dc b9 7d cc bb c8 6d 7f +d6 b4 ae 8b ea b1 e9 81 e6 c7 74 5a 1b fb 4c 1f +44 a4 72 b2 ad 07 d4 1c c1 75 15 b7 b1 4a 49 99 +0b 24 34 42 ff 2c 8f e5 05 b1 84 9f a9 91 ca cf +68 09 a2 0e 55 f2 af 77 98 87 0d 65 77 6f 1f 9e +e4 87 97 e3 13 aa 66 a4 7e 69 5f 3e 73 1b 2c 7f +30 + +# PKCS#1 v1.5 Signature Example 12.13 + +# ----------------- + +# Message to be signed: +f9 8b e5 2d 9a 5e 55 ad 92 + +# Signature: +29 2e a3 4d 3e 61 18 bf 8c d0 54 e2 15 17 e8 63 +ce 7c b7 dd 72 73 30 8f 7e cf ea cf 9b 45 75 83 +d9 b9 b9 7c 54 ab f7 4e 5a 5c a3 6a 87 06 7e 47 +d6 7a a0 47 a1 c2 ed 7a 23 d0 55 ab 4f 09 4a 83 +c4 39 ef 8d d2 d0 20 35 ef 05 62 d9 67 31 3d 81 +10 2f c6 8b 74 52 5b b0 e1 d7 96 2e b2 75 8e c5 +e5 ae ab 65 a9 3d 2e c8 e6 55 40 5a f8 8c 00 fa +35 f5 9d e9 d0 cd 80 45 ab d3 71 73 b9 fc 6c 51 +d8 + +# PKCS#1 v1.5 Signature Example 12.14 + +# ----------------- + +# Message to be signed: +f4 38 ef f8 4c 37 3f c1 27 44 a3 84 15 82 43 dd +97 f4 36 5e 87 d7 1e 8b 56 b2 97 91 df 44 ad f3 +49 e7 62 60 04 a2 c5 33 35 ec 63 52 cc e2 ed d9 +63 94 7f d2 39 38 93 c2 48 ba 1b 84 08 42 ca 77 +6c 31 72 9f 70 7a f5 04 11 00 1c 28 7f ba 8f e7 +25 02 32 0c 44 5b b1 43 fb 7b f5 39 4e c1 fb 2c +d5 01 59 24 32 15 40 91 de 5a 23 65 d6 78 f3 57 +82 fe a8 b4 7f 64 d6 09 19 f0 f1 d5 af a7 62 6c +40 d1 6c ec 19 bf e0 25 d1 16 f4 2d 22 e2 0a db +56 37 5a d7 70 89 f9 a9 33 81 fd 78 b7 b1 51 1c +b4 e4 98 4d 2d dc 7c 9d 75 b3 10 f2 95 42 25 60 +d6 6e 36 02 a8 71 20 96 16 13 1a 84 71 43 dd 07 +8f 23 58 7d b5 02 dd a0 3e 18 60 64 82 db be 01 +4e a0 83 b7 ec 16 1b + +# Signature: +0e af eb f1 5d 84 ee 4a 13 f1 a8 2b 84 05 11 86 +41 e2 2e 51 da 94 d8 58 87 fc 4a 3b 11 f0 32 49 +cc 39 a0 37 45 01 07 1c 7e ef 4a ba a1 14 08 d0 +2f ae 17 86 de a3 75 88 47 9c 90 d6 27 69 85 91 +c3 ba e1 fe fd 6e 8c 40 e3 ff 4b 9f 60 61 e0 6c +12 fd d2 1c 7f 45 dd c5 b7 8d 1c bc 41 c1 57 06 +fa 20 ba 92 f9 9f 58 b2 2b e2 76 75 be e0 81 a0 +60 67 ee d1 58 f8 e2 0b f0 4a 6e 96 8f 71 9a 32 +34 + +# PKCS#1 v1.5 Signature Example 12.15 + +# ----------------- + +# Message to be signed: +fa 1c 0f 7b 10 15 a8 95 b1 a5 65 f3 29 96 b2 b8 +cc fd 86 4b 95 54 4d bb 9c f4 f6 e1 a8 41 de 92 +06 d5 57 26 fd f7 ee a2 bf 33 6a 82 9f d2 bc 12 +09 bd 21 5a ab b9 77 d2 3a 08 3f 10 ae 69 db 43 +7c a3 2d 7b fe 4c 88 25 b9 34 88 f0 1a fd f7 84 +45 8c ef 5c dd 8d ff dd 17 + +# Signature: +25 e2 2e 6d f7 fc 6b d4 e0 f6 1e bc 8d a0 63 fe +47 8a 3e d7 4d 68 f7 76 34 35 e0 e3 74 f6 52 62 +a5 d7 61 2e 86 78 59 61 22 c0 e5 b8 fa 0c 0b 12 +81 2b a9 65 3a 0f 27 38 83 c6 26 4c 6d fb 74 bb +34 40 5d 2a 04 30 43 fb b0 ab f2 af 7a 12 3d 2d +db f1 69 92 e0 9b aa 37 d7 31 d7 2e f1 99 62 65 +8a 8f b0 10 a1 0f 7d 55 62 ad 54 33 47 90 01 af +36 d3 d3 26 ea db 2e 9a be c7 b5 55 70 9d 5d 47 +e9 + +# PKCS#1 v1.5 Signature Example 12.16 + +# ----------------- + +# Message to be signed: +82 8e be 2f 51 e5 88 29 cf a6 15 26 dd ed 7e 1f +1b a3 11 db f1 06 4c 08 ac 0b b5 d6 71 6e ab 29 +8a 23 d6 3b 79 3f fd 9d 9c ea 60 22 95 98 82 3f +28 2f 10 7b 6e e8 8a 53 fd 93 e7 dd d4 8a 73 1a +21 09 ff ed c8 9a eb a2 c0 f1 6b cb 14 0a 0a 89 +dc 57 ee 8b 5d 00 0a 21 42 17 5b c7 07 bb 40 9a +ae 3a 03 9c 66 3d 01 9a 0b d9 13 c1 3f 7f f6 f6 +b9 1e 90 5a 58 9d 38 b1 50 48 5d 89 09 2d 18 a3 +a7 62 25 27 65 52 5d 98 45 66 42 5b 05 77 0d e9 +a8 be f4 43 ff 5f c1 48 33 af a4 cc ec e5 42 d4 +f2 ce f1 e7 96 f5 9f b3 a4 bf 37 cb 67 7a e4 22 +36 66 c8 2b 31 a1 6a 6c d7 01 a0 49 3c d9 96 86 +6c 84 bf cd df 85 2b 19 ff c8 9e 93 61 79 fc e8 +b9 9e 72 fd 4a fc 28 b5 11 73 af bb 25 c4 c7 + +# Signature: +16 17 55 9e 43 ba 18 2e 95 34 86 43 6f 15 b6 02 +83 1e 42 ee d2 03 c2 69 f6 53 bf 63 9c 2b 76 0b +0d 49 fb 53 2c a8 ad 01 e7 b4 af 83 72 92 55 db +55 9b cf 55 fa b3 65 9c eb ec d5 37 69 4f ef 2d +ef 9c 9e 76 2d 05 d2 32 1e d6 88 c3 f7 e2 c0 57 +33 ab 4f a8 1b 08 cf 79 fa cb 75 c3 20 0b 7a 48 +3a f0 8c b1 83 c5 09 27 cc 61 69 e4 32 f7 fc 9b +11 78 0d bf 4d 3b 72 d2 d0 b8 55 93 d8 b5 b0 18 +2a + +# PKCS#1 v1.5 Signature Example 12.17 + +# ----------------- + +# Message to be signed: +bb 4a 6e cc bd d6 de 0a c5 c3 b7 f9 97 98 10 4a +58 69 c1 cf 1a 1f ac 7f 85 9f e9 51 49 29 7e b7 +79 11 00 59 e2 69 f1 27 56 f0 8a 54 8b 66 af + +# Signature: +27 7b ae 63 e6 e3 25 3a 0e 20 4f 4e 6c 9f e8 4b +04 0b 86 4f 21 ed d4 42 6d 82 be 8f 1b 91 1b 0b +d2 81 cf 11 49 53 d4 02 09 da 2e 9a ae 13 3b cd +18 55 ef 0a 99 69 3a 94 43 c9 3f 6d d2 75 f0 58 +fd 1b b6 95 32 b6 4a 1d d7 e1 d0 e7 80 d7 52 04 +fa 8c 61 c2 eb 5d e8 82 72 cb 93 ae f0 80 f7 02 +bb 78 88 94 25 a5 f1 66 f6 3b 5b 1a 31 ec 5c 1c +26 a5 99 fa fe 58 77 42 98 b9 7d b3 14 fc 81 d0 +92 + +# PKCS#1 v1.5 Signature Example 12.18 + +# ----------------- + +# Message to be signed: +f1 d1 11 ad 08 e0 38 ca 3a b4 e5 2e 5e ab 71 01 +87 6c a9 be 62 6a 13 59 17 f4 5b 1f 9d 1b 32 ef +e4 ff 86 7a b8 a3 05 f9 49 c0 04 8b 25 f5 46 22 +61 b1 a3 49 3b 81 90 21 0f 5c fa 6b f7 e5 c3 00 +54 98 de ec c1 e1 c5 04 f3 a3 49 98 be 6a d6 ac +00 40 51 c4 e0 a3 db 2c 22 eb 5e 14 16 55 28 df +78 12 a2 0d 5c 7f 05 b9 40 ca 13 e9 38 3a e0 0d +6c d4 d0 f4 ae 3d ad 04 7a b9 c4 17 8d b6 6d 3b +80 96 0c af 0a 92 4d c9 4e b8 e0 77 09 bc db 34 +9e 90 fa 2e 10 c5 d5 26 d2 21 9c a7 6f 88 01 fd +c6 61 bd ca 6a 93 da 48 d0 45 ac 37 51 34 cc d6 +ff 7c 52 fd 15 c7 cd 3d 1f 31 af e5 04 bc e7 c0 +33 3a 89 79 e3 ce cc 53 c4 ea dd 7d 95 d4 6f a3 +b2 a9 f0 06 10 0d 6b fc 0e d5 ee 77 69 4f f1 a2 +4e 16 a5 44 de 71 46 52 90 dd dd 18 9f 01 67 03 +59 f8 c6 b5 d4 c6 b6 b9 f5 c5 7a a5 a3 8f 07 99 + +# Signature: +0d e9 42 31 c0 6a b1 87 b0 0d da 2b 34 e2 b4 cb +ac 41 f6 08 c4 8c 72 27 a6 28 2a 17 9e 58 c3 2e +f5 dd c9 76 4f a2 df c3 fb e0 21 dd b4 81 56 a6 +37 3c d6 9b 85 d3 64 d8 9b 5a 32 fa bb 2d 46 5d +05 62 d4 a1 dd 6f ca 64 78 0b 06 2a 94 71 24 a7 +fc 0b 82 e4 fe d1 2b 8b 4f 72 6a 0c 85 39 c6 cd +e2 1a f6 55 ac c8 de 1e 7b a9 d6 7b 87 b8 e7 77 +d4 8a cd 86 8a 80 db 15 31 4f 35 55 60 10 35 77 +eb + +# PKCS#1 v1.5 Signature Example 12.19 + +# ----------------- + +# Message to be signed: +9c 4e cc 4b 24 44 a4 01 bf b6 f4 b7 24 49 23 a5 +ad 33 86 c3 b8 41 67 8c f5 e6 44 7b 8a 3a 07 59 +86 c3 3f d0 01 b8 43 72 4d dd c4 21 2f f4 5a b3 +fe ca a9 0a 16 f6 b5 59 2c 51 5c c4 ee 54 ae a4 +59 34 32 16 70 96 67 8f 93 41 59 85 6d 14 c4 32 +e7 d6 d2 8d 71 b2 68 7f 54 ed 71 9e 5c 20 11 00 +68 8e 85 f2 0e 79 a9 ee 8a a4 b6 14 31 34 3d 1e +99 c2 14 35 c6 1e 8b c1 04 f2 ba d5 29 60 fc ee +e6 7b 85 03 3d 3a ee fa e4 13 ce 29 70 1e ff cb +02 b4 84 a0 31 e2 f3 19 ef 7e d0 d6 e6 9b 29 16 +ee b3 8c 4f 19 42 ba 23 c2 a1 79 0c e3 fe 09 d0 +1b 9b 9f e6 db a8 dc 21 0e aa 8f e7 3c a7 6f 1b +5b + +# Signature: +18 53 c2 1a 4a 18 54 7d 86 7b 3c ed 02 da f0 b2 +2c e8 d4 d5 af 2b 8e f5 f7 c8 fd 38 5b 81 53 64 +8d 81 83 1d 6a cb 5d a8 30 f6 77 40 25 9f fb 33 +9f 7b 90 af 48 83 81 9c 47 15 e0 8c 28 99 d4 c7 +24 6e 07 e5 bc 6e f3 cf d9 a0 4d a0 6c 43 e9 5c +77 2b e2 21 cf aa f6 95 4e f9 33 31 e5 95 ff 48 +92 1f 05 fc e8 fa 0d 42 9e 0c 99 56 2a 9c 2f 68 +eb f3 2c f1 c6 c6 bb 8b 27 4a 2e 42 d6 71 59 12 +ff + +# PKCS#1 v1.5 Signature Example 12.20 + +# ----------------- + +# Message to be signed: +c3 81 e6 03 99 86 51 66 d2 ba a0 31 45 26 83 34 +18 40 39 e0 53 35 a3 00 c2 80 4e 2b fe f5 a7 d1 +4c 44 3d 65 38 e1 6b df 9d a7 ad 1f ea 63 4e bf +e1 13 bc 82 1e 79 a4 49 b2 eb 2f 57 c2 1f ba 35 +ff cc 6a 7e 52 55 72 27 7e 8f 55 37 c7 b5 b9 79 +4d ef b3 9a ab 06 07 85 d1 99 40 02 dc f8 07 01 +2e 1d 17 91 da 94 3b 2b 75 9c 36 6b b4 24 e4 2c +9c 20 43 ce 78 8a 25 fb fe bb 87 e7 4c b0 20 b1 +1e 8e af 16 18 84 d6 67 2b be 9c 09 fb b3 b8 af +a0 61 + +# Signature: +19 90 69 57 37 53 01 8f 33 59 2a f1 5c 1d 31 31 +bf 5d 8a c4 f6 4c f6 14 d3 a0 1b f3 72 df 00 2e +b5 b5 fc 8f 82 ba 13 7f 83 dc 14 2e de 38 c5 81 +80 e7 bd a6 9c 4f 1b c7 bf 96 ec d3 fa 79 bc cb +dd b7 d9 2e 4f d8 64 c5 fa 93 3a 4d fc 60 0e 10 +83 00 8a 38 6f 4d 02 2c 20 24 ff 7e 0b 37 22 ea +fe a0 5a 1e 02 c7 a6 3e eb 40 f4 f4 c4 f6 60 c3 +24 72 a0 a7 89 23 e3 86 3a 99 44 5e 7c fe 27 00 +60 + +# ============================================= + +# Example 13: A 1031-bit RSA key pair +# ----------------------------------- + + +# Public key +# ---------- + +# Modulus: +70 e9 23 a5 a0 cd 8e cd f9 9b be 93 d7 d0 28 82 +95 5d 91 b6 ef e3 ce c8 6c 93 d2 1c 0a c3 01 b8 +29 3e 51 43 5b 87 8b c6 b3 4b ed 41 11 59 0e 76 +46 76 58 8b 11 6c 2a 36 a4 c7 7e d9 c9 0a 13 c1 +4d 23 e1 99 47 87 fc db 8f 5c 97 41 0f ca d4 04 +5b 85 85 70 2c ce 29 da 11 f9 7e 79 a9 7c 2e 5f +6a 5f c0 bb 8c e7 6d 15 54 a8 bc 47 96 17 20 d3 +64 05 0b f2 74 19 bf f1 68 c0 a7 ec c8 73 4c b5 +a5 + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +70 e9 23 a5 a0 cd 8e cd f9 9b be 93 d7 d0 28 82 +95 5d 91 b6 ef e3 ce c8 6c 93 d2 1c 0a c3 01 b8 +29 3e 51 43 5b 87 8b c6 b3 4b ed 41 11 59 0e 76 +46 76 58 8b 11 6c 2a 36 a4 c7 7e d9 c9 0a 13 c1 +4d 23 e1 99 47 87 fc db 8f 5c 97 41 0f ca d4 04 +5b 85 85 70 2c ce 29 da 11 f9 7e 79 a9 7c 2e 5f +6a 5f c0 bb 8c e7 6d 15 54 a8 bc 47 96 17 20 d3 +64 05 0b f2 74 19 bf f1 68 c0 a7 ec c8 73 4c b5 +a5 + +# Public exponent: +01 00 01 + +# Exponent: +02 9e 10 f6 bb b7 d0 2d eb b1 a5 d5 19 0d 69 06 +ff ed eb 9d 15 4a 0f 66 db 87 80 b9 28 31 b5 96 +3e 94 84 7f 3e 7d b1 aa 91 48 fb 0e c5 57 6e 6b +a4 fe 04 d6 f2 78 32 b1 52 18 12 d3 7b 22 d9 ea +e2 80 08 e0 92 c6 7e 72 32 42 67 e1 b1 ee 45 43 +55 74 1d 8d e1 d2 a6 a0 50 74 bb 1c e5 81 8b 41 +bd 19 dc 6b 58 c8 93 7d 8a d6 40 d7 04 3f a1 1f +46 8d 6c cb ec 4a de 52 0a 9e 15 9d 60 5d 09 28 +29 + +# Prime 1: +0a b4 64 fd 6f e3 3c 45 9a b2 dc ce 5f 78 a4 d7 +4f 92 b9 97 d4 bf 54 2e 2d 85 4e 76 2c 85 86 fc +43 57 cc 58 cb 33 36 33 b0 95 a5 ee 04 a0 32 48 +53 64 d7 0f 67 a3 aa 04 85 4c 7a 87 a6 9c f4 c2 +ad + +# Prime 2: +0a 8c 3c c5 04 13 40 f4 32 fe 0a 78 73 13 57 79 +16 fe 76 c0 39 f9 71 75 9e c5 0e d6 c5 b9 a7 36 +9b 68 96 9e cb 52 59 fe 9c 50 d0 75 9b f8 b3 aa +c1 a5 d5 b5 28 8d 67 89 e7 18 fa 37 ef 42 39 95 +d9 + +# Prime exponent 1: +bb 29 5a 95 d5 b3 3c 1d c0 b1 8b f6 c1 4a a0 d9 +f2 6f 72 8b 39 36 0a a1 59 45 6e 94 c3 d9 e0 48 +c9 2a 4f b6 31 1d 36 92 8c e5 f4 47 a4 99 4a 8f +47 87 d8 a9 7f 68 11 3e f9 66 34 f5 90 2a b7 51 + +# Prime exponent 2: +02 fa 11 2c 89 39 e5 db 05 89 2c eb 51 8e e3 e1 +08 dc 48 27 78 35 2e 10 43 fe d9 71 43 dc 61 94 +c7 c7 7c ba d4 27 29 be f1 de dc f6 54 4e 9c 66 +54 c0 b8 cf a7 e2 40 96 6a e2 61 bb e7 8a 89 36 +01 + +# Coefficient: +a8 8b f3 ff e9 3f 40 4e 06 82 1c 97 71 ea e6 08 +15 71 2d 6f 94 52 71 f6 f3 6f 03 69 d9 66 c9 20 +c7 f8 cb c7 84 25 ac bb 9c e0 fa 1a 03 22 f5 0c +97 b8 11 5b d1 51 91 f2 24 b5 68 d1 d6 ec a6 db + +# PKCS#1 v1.5 signing of 20 random messages +# ------------------------------------------------------- + +# PKCS#1 v1.5 Signature Example 13.1 + +# ----------------- + +# Message to be signed: +b5 e8 6c 8b a3 98 5a a5 54 1d f9 5e 51 3c ff 67 +61 2e af 2e 16 68 85 76 f7 d6 73 f6 f1 89 1f b7 +5c 9d d2 cd + +# Signature: +6b 42 fd 51 63 09 19 7f 8a f3 c7 3e 39 62 4d 8e +ba be cd a3 ec 3c e6 57 b1 11 7f 43 e9 83 87 7a +1b a1 aa f8 e9 5c c3 99 91 d9 2e 35 e2 db 1e 41 +30 90 14 3d 16 46 71 98 b9 b9 a9 90 d7 74 c2 7a +d3 bb b4 35 2d 3f 07 5d 61 73 2c 6b 58 ec 0f 66 +e4 92 a3 f7 ac 4b bc f0 12 ed 6b 40 1f eb 4f f3 +95 cb 8b 21 8a 81 d6 17 31 ee ce 37 6f 68 8e 66 +ae a6 98 b4 a8 86 2f 58 c9 1d 87 60 85 49 6f d0 +14 + +# PKCS#1 v1.5 Signature Example 13.2 + +# ----------------- + +# Message to be signed: +95 46 34 6c f2 21 94 c7 87 88 81 70 a4 82 f7 f4 +92 17 c3 94 0d c6 21 0c e3 9e 45 50 a3 9b 45 28 +22 41 9a ea c2 4b ec 19 8b b3 59 d0 8b e8 19 6d +f2 e7 57 76 61 96 c9 58 e2 b1 59 c7 4c 1c 30 23 +c2 db cc e9 ed 5d 0e f3 fb 51 45 0b ff 64 45 db +26 5e 60 6e 19 4b ee 06 4c a5 b3 21 d7 e1 55 14 +23 0c 2b 3b 55 d5 da 4c d0 40 52 2f 7b b8 6a 96 +2b 81 3f 9d a3 9e 51 38 9b c6 4f 56 e4 47 b2 a2 +bf 81 9d 7a 80 09 4e 2b 8d e2 7f 10 4b b6 eb 2f +2f b4 3a f1 d0 1e ad ca 23 a1 96 ba 12 5b 6a 78 +57 99 74 c0 ee c8 a5 49 67 71 f6 7d bd 50 69 f3 +36 e4 ef 1f 40 47 42 df c6 9c e3 25 aa 64 9f 8a +63 31 cf 40 35 55 e1 3f 08 10 a7 63 50 a7 e1 8d +29 92 fa b4 8f 39 7f 3b 93 c5 bd 5a 6f e1 d2 c4 +61 8b a1 f5 9f 00 2d c2 57 ec 39 ee 2f 87 62 98 +da 90 f7 44 0a d4 c6 c9 3f c1 14 df 05 + +# Signature: +67 e4 14 99 3f 98 7a 22 64 3d d0 39 e7 f9 fe 1c +ae 74 4a 7a e4 1d 4c 04 4f a4 ed 8d c9 e3 40 ce +bb 1e 2a fb 19 8e 84 7a ef 4b c0 61 fd 80 0d 81 +d4 d3 67 b0 fc 2f 73 09 33 c1 9b 88 d4 dd f0 5e +d9 8a 58 56 de 5e b4 5b 11 6b 7d 24 fe b4 56 77 +84 9d ab 76 e9 e0 cc b4 5b a6 b6 f6 14 1f 37 bb +ad 7c 19 1c 37 77 11 3b c7 38 8e 4e 46 44 ec a9 +47 03 a7 2b dd cc 6f 50 cf 98 0e 3f 6d e3 9d 73 +12 + +# PKCS#1 v1.5 Signature Example 13.3 + +# ----------------- + +# Message to be signed: +56 52 b4 c5 75 20 b2 55 fb 96 f7 0a 30 ab 92 ee +c1 93 99 56 b6 a9 43 c8 3e d0 98 6e 2e 6e e4 ef +bf 8a 52 28 78 67 28 12 03 a7 a6 d1 d8 86 b7 00 +59 52 b4 3b 77 85 44 ed a8 98 e0 df 2f a0 6f 68 +38 03 18 f1 4a 53 fe 55 d7 2f 8c fa 6a f2 1d 93 +bb fc 20 d3 58 c2 08 c5 62 d7 39 be 00 01 ce 07 +fd 8c d2 f4 6c 3b 44 c8 36 51 88 09 b7 6f 3a 70 +cf 69 26 be 06 9c 35 75 d5 + +# Signature: +01 64 11 a2 31 a7 38 94 4b 3e 44 f7 88 5c f8 1a +ca b7 32 d1 73 6d e3 4c 56 cf 40 f9 9a 6c e4 00 +70 a2 0a a9 4c 48 78 44 a9 3c ef 28 7a 58 bc 0e +a1 81 b2 cf 27 d9 14 f2 93 b9 29 77 9d 39 03 6c +4e 5a ae d3 5e ee 8a 7f d5 0e fd 09 6c 91 a8 f7 +2c 3c 14 1c 57 6c 8d 10 b6 36 fc 4d dc 1e 67 14 +f1 7f fc ce 10 6d 22 1b 4f d7 d6 fe 1e 7c bd 3f +3b 08 f5 54 6b 44 d1 fe b7 18 fb c1 33 70 c7 fa +2c + +# PKCS#1 v1.5 Signature Example 13.4 + +# ----------------- + +# Message to be signed: +6d 57 f0 79 a3 e8 ad cb 47 cf 2e 3c a9 76 e0 3b +09 c7 7d 1d 9d 9d 84 84 35 7e 91 23 09 e8 f4 a8 +3c b5 0c b6 a7 38 8c 41 4a ec 84 46 71 ff 81 06 +51 e8 28 10 3a 1f 6a 19 9b e2 60 f7 46 00 02 8c +6a 7b 7b b9 41 6c e7 b6 35 0a 3a 68 05 62 0c f5 +e6 b0 09 5d fa 22 b5 46 01 f6 19 af d1 0d a2 03 +d2 81 90 cf 9b 0d b5 98 6d 29 30 33 69 1e c5 bb +ba 6d 73 ea 32 47 2e fa 3f 16 0f d2 b1 b5 e4 3b +0b fa d3 16 77 30 5f ef 46 72 44 11 4e e1 0f 5c +b2 d6 7b 47 83 23 a7 11 04 1e 29 4c 46 b2 ed 39 +cc de 07 9c 87 7f e7 5c b8 75 14 4a c3 1e b0 31 +a7 38 a4 ce fe f9 1f 01 7b a7 15 23 f5 12 48 18 +cf 48 b9 72 bc 47 c8 f2 ed 35 6f 5b f6 91 fd 94 +67 0b b2 + +# Signature: +31 5c e4 17 d0 bb d7 3e 7c 43 56 79 7e 73 ed 7a +bf e9 fc ff f1 a5 34 28 99 a7 d1 1f b0 d0 54 2b +fc ab 66 de 2e 4e c0 7c 7d c2 be 7d 79 72 90 a3 +0d b8 c4 07 dd 16 37 65 88 a6 dc c1 a2 07 bf 7f +f3 11 54 0f aa 9d d6 f1 9a 73 ab 25 a7 49 6e 68 +2f a8 a7 05 40 81 07 6c 1a 02 15 7b e6 3e 7f 64 +5d e8 2d f7 c6 15 50 3f a8 3b 4e db a2 05 81 81 +2e 09 7f 65 05 6e d4 17 f6 f2 48 03 53 0c f8 18 +58 + +# PKCS#1 v1.5 Signature Example 13.5 + +# ----------------- + +# Message to be signed: +bb 75 44 6f 78 78 23 dd a2 42 2b 1a dc 7d 7f ef +d0 6a 6e 9a f5 c0 49 01 ac 5b 99 91 3a d6 29 8c +9d 1a 33 22 e8 b2 17 e4 e0 99 4c 42 20 42 80 d4 +04 d0 1e ce b5 ec 53 fb 86 f7 61 a3 96 b2 3a e1 +9d 46 79 05 a0 fe 80 50 b8 95 d8 ba 37 46 68 5c +47 43 9f 90 c3 66 9c 70 ff b8 19 94 56 5c 4d f2 +a3 1e b2 a4 52 bc 3c b3 12 b8 14 7c ec 19 10 32 +f3 8f 3b 3d 89 d7 58 2b f1 8e 7b 72 75 fb 4f 16 +ee 89 56 7e 2a 56 bc 73 b3 e2 e1 09 f9 94 0e bd +10 b9 df 2b 88 ac cf 0b a1 8e 5b 34 95 20 d2 c7 +f5 a3 1b d5 22 6d 12 ec 35 bf c9 e3 62 03 e1 35 +06 ba 12 b7 56 c8 ba 00 af 91 b8 5b 0b 4c 07 c7 +f4 84 ad c4 58 c9 26 aa eb 4f 08 2f ec 98 7d 9f +27 6b 89 49 59 7e c0 40 1b b7 1a 2f ea 9c 7b 74 +e0 df e6 aa 52 ac 8b 80 be ea d3 36 a4 9d b2 2f +b3 + +# Signature: +53 d0 d7 95 bb 08 2f 20 01 03 6f 47 2c 2e ce 6e +7d 2d b6 9f 29 2d a7 21 36 75 c7 cb ba 0d 33 b2 +32 12 f8 f4 3a 4a 8e 09 a6 a5 0e 01 9b bd d5 9a +58 89 8c c4 6c 58 a4 6e 42 ce 7b a0 93 fb 46 92 +f3 83 de 33 a9 a3 4f 47 c7 e6 19 38 bf 8a 6a da +a8 8d f2 12 96 b4 c6 7b 52 68 35 f7 57 f2 c2 6c +1d 30 9d 7c dd 5a d5 fd 8f 61 f8 51 ed 23 c4 be +2a bb 62 7d fd 81 7f 84 77 dc 04 2b 6a 2e 40 69 +40 + +# PKCS#1 v1.5 Signature Example 13.6 + +# ----------------- + +# Message to be signed: +88 39 39 d1 49 a5 44 e6 2e f0 4c 61 03 51 a2 df +a2 52 eb 9a 9d 1e 11 ae 54 c9 b0 7e bc f1 fd c4 +7e c1 d9 47 03 41 1d a4 15 f5 9f b3 e5 04 1e d9 +47 0e 7b cc 81 9b 5a fe af 86 0c 01 6e f1 25 bd +08 a6 cb 8b cd f3 b9 3a 51 dc ad b2 f6 8c 8c c3 +77 55 14 28 2a ff 75 67 ec 65 f2 70 d0 2b eb 95 +fb 8f ac 24 09 5e 17 06 e4 8b 52 48 65 bc 14 46 +1d 3e ce 8c 50 1c 3d 80 2a de 98 5a e9 5c fe 1a +b9 d6 b9 ab 0d 15 fc c8 86 6f 7f 25 9c 5e 41 c0 +2c d4 13 43 7e 7d 6b a7 f1 5b 0a 70 da fb d5 5c +0e db 6b 80 75 c2 7c ff 3b 28 9e 6c 99 e9 a8 84 +ff 7f 08 6d a9 f7 5d 6a 4c bb cc af 52 ba 25 c6 +34 2c 38 a7 6b 44 e1 01 15 5d f7 55 e3 9c 14 86 +2e 22 0c a3 6f fb cc 83 2a fe cb a8 7f 8a bd 96 +0a 57 7f 56 ca 6c d8 e9 91 26 65 8f 27 ac 6e 53 +c4 42 ed 47 66 + +# Signature: +1e c0 2a e6 a0 a3 f6 11 99 29 61 ca 27 cc bf 29 +6e 11 36 18 32 e1 ee 75 20 56 9a 9a ee 06 34 5c +da 22 b4 fa 48 fc 34 5e 47 78 bc 3c cd fe bd 2d +c5 a6 c9 d4 84 51 aa 44 1b ea 4b 95 11 99 65 4a +e8 d2 f7 52 2e 17 ed bc 2f 51 ce 15 cb cd 36 6f +49 39 cb 53 c3 b7 70 81 f4 a7 37 50 05 4e 00 b3 +0b a2 fe 58 f6 f0 2e 36 a8 62 54 23 97 db a6 a3 +cd 22 77 70 88 19 e7 8a 2d 87 6a 23 a5 a2 69 d7 +75 + +# PKCS#1 v1.5 Signature Example 13.7 + +# ----------------- + +# Message to be signed: +40 31 e0 de f4 f3 d1 ad 9b c0 82 77 0a 88 a1 d9 +b4 b7 10 75 48 cd f8 46 2b 0b ae 3d 99 4d 8e bc +4d a0 44 b9 05 dd 8e d9 1a 1d a6 76 72 78 22 36 +0e e2 b6 d5 e1 2b b7 03 16 d7 9e 8a bb 82 a6 43 +44 af b3 b2 25 88 5c + +# Signature: +0b e5 a6 d0 43 be 5d 27 d1 d5 1d 9e 3a a6 1d 92 +c9 d8 43 23 11 9b 48 c8 4a 80 38 97 18 d7 a1 aa +f5 7a 9a 0d 21 4f 65 06 48 48 64 df ae 85 db 7b +84 74 07 3a 8f 97 7b 42 b5 3b 40 7e 44 c7 c6 2b +16 8d 1e 77 78 f4 f2 78 57 bf ba 85 dd dc 8b 0e +9f 0e 9a 5b 6d e7 1a 04 43 72 0e 92 bb 88 b0 77 +cb a1 5d 3f 6e 2b e4 d2 7a 7c 50 9c 7d c0 3f 1f +dd 4f e3 38 a4 e5 45 c4 6c 03 45 22 cc c0 d4 5d +4c + +# PKCS#1 v1.5 Signature Example 13.8 + +# ----------------- + +# Message to be signed: +7f dc 96 a4 56 57 74 02 9f ff a9 3b 39 f0 5d ee +9f 84 fa 89 53 fd 0f 63 38 c8 1c 9d ec 6c dd 66 +1f fa b9 6f 0e 08 eb 0b 9b a9 ca 5b e1 7b 57 c4 +b4 86 8f d5 34 11 54 de 50 27 71 13 c7 18 53 41 + +# Signature: +1d d2 1f a4 95 be 7c 49 0f 98 2f 69 ea b1 4e 24 +da a0 4b d1 38 b7 14 32 49 cd cc d7 8c cf c9 10 +6a ca a0 3e c8 76 69 42 32 56 6e c6 ca b9 12 28 +40 f6 69 c8 00 f2 ee 09 2b b9 b6 cb 2a 45 42 a9 +0d e6 04 c4 f1 05 00 0a 3a 0d ec cd 3d d9 7a 32 +61 fa 38 22 7e b3 81 a1 f8 f2 3b 66 65 d2 84 80 +df b7 21 17 88 2e d8 db 25 d7 6d e4 0d e2 fb e7 +2d c3 94 ec 6f bd aa 99 c6 4f ad e7 29 78 a5 1f +c4 + +# PKCS#1 v1.5 Signature Example 13.9 + +# ----------------- + +# Message to be signed: +63 18 32 ab 19 18 cd 02 08 28 e4 7a e2 b4 47 6b +14 69 f2 72 e3 0e 53 e5 96 fb a2 6b 40 29 37 dc +44 c2 ea 57 45 c7 9d 2d c6 4a 10 e1 22 5c a0 b6 +92 9d 49 54 bc 5d 37 40 96 fd 87 8d d1 01 f7 66 +63 13 d9 a8 f8 26 bc 67 14 01 42 2c 1c fe 1a 6d +01 a4 d7 86 4a 14 c6 0c eb c2 f0 70 91 4c ee de +b1 78 2f e5 40 a0 a5 d2 57 84 44 f9 b3 60 34 ec +77 d6 b8 03 a0 c9 76 1b 32 75 92 aa 48 46 63 5c +56 3f 1c 6a 6d f6 8f aa bc e4 97 af 4d c9 a3 64 +2b 75 a4 a2 94 d3 08 56 8e 6d 73 c1 1d b5 67 24 +04 2b 55 c3 a2 4a 7b c7 a1 05 0e 4f 44 8b 6a + +# Signature: +45 d3 a6 ae 8f 48 35 5c 01 2b 50 10 79 ee 92 af +fe 3c 9e 60 2e 4a 08 0c fc 94 72 3a e9 6d ac 2a +66 e4 55 a4 0e 72 8b 2a 1b 27 e6 22 40 55 4e c7 +c5 c0 ad 6a a0 0c 09 22 e5 3d 7b 12 ed 42 c0 87 +32 2d 15 36 e4 6b 7d eb da 80 95 f5 5d 1e 12 bc +24 42 f4 3b 4d 12 8f ee 23 1d cd 6f 8c 37 aa 6b +cf 4f e7 b5 e0 de a9 c6 70 9d 3d 91 f9 e4 2a 53 +16 8a 16 b6 fe 99 7b 5d fe ba fb 46 ed 9a ea 5c +66 + +# PKCS#1 v1.5 Signature Example 13.10 + +# ----------------- + +# Message to be signed: +8b 04 3d 90 da e3 41 66 85 d5 3a 5b 4c 3c c2 54 +cd a0 cb d2 3b 4e 40 8d e8 20 a4 da 7a de 6d d9 +5d 4e 1a 97 e2 31 2c 3e 84 26 1e e0 b6 ce fe 60 +e6 b0 82 fd 59 65 ef a1 64 8f 4f ae 61 60 5f e3 +55 33 27 00 46 96 05 26 53 47 e6 54 7a ea 77 5b +85 6e 5a 46 c3 41 d2 99 52 bb ea 92 70 49 96 3e +37 40 20 8c fb 0b 65 28 57 b6 f5 2e 36 6a 17 0b +e3 4f 13 d3 58 46 bd e6 97 20 46 20 01 b0 9d d2 +68 b8 9b 09 00 31 8e 73 3d b2 00 9e fd 9b 51 77 +41 e5 10 d3 f3 94 f7 ad b5 45 59 b1 57 + +# Signature: +6b 27 8f 36 2c 29 2e ea 09 b9 0b f3 53 d1 43 f2 +ca 09 9f f8 79 57 34 79 df 2a ff 9b 25 0d 1c 91 +87 c6 a3 34 3e a1 4c 07 6f 2a 20 c1 a1 9d b2 6a +ad 35 48 ec 6f b3 b2 fa fc 75 1b 59 08 2d 8b 23 +c8 2c 8a 51 f7 fa f7 a4 d4 a8 23 98 bf be d4 49 +bd e4 ee 9d c8 68 01 60 66 6f d9 c7 74 c6 aa 57 +7b 4e c5 4c f0 d5 bd 9e 3d 1a fa 9c 3b 4b 91 46 +76 78 c9 d4 c4 fe 40 0a a8 57 a3 b0 54 5b df 84 +a6 + +# PKCS#1 v1.5 Signature Example 13.11 + +# ----------------- + +# Message to be signed: +3b 28 a6 09 2e 47 08 98 af 07 0a 08 7c 45 53 18 +8d e6 c3 44 bb 0b 5f dc 7f 66 fb c5 2d c9 3a 8b +92 a3 74 11 20 37 d6 a4 32 86 12 8a ce f9 5a 35 +05 c0 ab b1 af a6 2c 48 cb 21 36 07 7f 8a 0e 0e +0b 5a 4e e9 b2 c7 7d 7a 0c 0b 53 f3 8a 51 cc 3d +b9 b5 83 b3 ae c0 7f 1e 22 4f cb 3f 1d ad 19 5e +05 86 59 a9 d1 1f 8e dc 74 44 99 46 86 ed 62 c9 +75 66 e9 e0 0c bf 8f 0d bc 17 16 e6 b7 f0 f8 8f +e8 9a 86 7a 41 d6 43 13 5a d8 b1 8a a1 43 e7 37 +5d f1 95 29 + +# Signature: +32 62 fe 17 e4 4e 5e cc 84 31 70 d3 ae 27 51 da +1f 48 d6 e9 61 d8 1e 93 59 b0 98 2c 6d 61 30 8e +ba cf e2 60 7c 53 8c 17 0c e0 e7 2a 07 bc 01 48 +7b 29 5c 36 b8 e2 2a fd f6 e7 fe 39 c0 3a 5c 0c +36 61 06 1f 23 fb f5 89 0e ad 59 f8 72 c9 46 cc +e0 f8 16 c9 ed 3a 2c 1e 11 f8 f7 4d a1 e9 7a 39 +0d 53 4d 78 55 78 a2 45 5f cd 87 47 83 f4 57 2a +15 f4 93 7d ca 98 09 3f d0 e9 99 0a f0 00 52 56 +bf + +# PKCS#1 v1.5 Signature Example 13.12 + +# ----------------- + +# Message to be signed: +4f dd 6a 36 31 dd d4 bc 3c 76 07 19 02 a2 27 fd +5b 36 53 b1 f9 70 f2 b7 67 ef 55 4e 1c 75 ca de +81 9d 8d 1f ca 76 bc 10 54 1c bf 8b 1d 8b 0e 72 +55 f9 57 40 + +# Signature: +29 cb a5 b4 3f a3 56 57 75 89 34 91 b1 18 57 8b +14 b5 fa 1e eb e0 c8 07 59 a6 d1 91 e7 c2 13 1e +e1 0a c5 b9 b8 ae 1a a7 d6 96 c9 84 88 a3 5c df +a2 aa 00 6d 91 bf 7e 05 a5 c1 90 9e fb 20 da bc +82 13 3b 62 64 c0 42 18 0c 2c ca 65 45 9f 66 cc +7e b1 ba 75 d1 5d 4f 56 c7 52 8a ab 28 38 e6 79 +53 7a 4c 8d cd 37 d4 b4 ca 82 5c e1 65 fa 4a 97 +15 82 44 dc 87 c0 61 fb 12 00 1e 55 33 fb d4 cc +62 + +# PKCS#1 v1.5 Signature Example 13.13 + +# ----------------- + +# Message to be signed: +59 0c d2 30 50 e5 7b 28 d5 c2 18 5e ad 60 b1 e9 +52 9f 2b d5 26 13 eb 03 f6 ed 1a ef a4 a6 72 88 +d5 a3 a3 4f d9 5c a6 38 94 af 3a 40 cd 68 87 3a +1f 37 e3 54 d3 04 14 29 7b 19 25 4b c6 c1 a3 f7 +a4 75 20 ee a5 6e ff 77 db fd a6 bd 77 79 d0 2f +d8 16 fc 0e 99 91 9f e4 39 5e ae e5 b2 f5 f0 32 +cf c4 33 6f 9c f9 ac ef 74 db bf 4c 9a 09 18 da +65 58 b4 b4 e3 20 9b fc d7 1d dd 59 76 07 b6 e2 +8c 39 85 db f5 2c a7 d1 d7 51 cb 81 69 c0 b1 b1 +3f f8 b6 5b 73 1e 69 dd 2e ff e4 4c 63 6f 2b 69 +95 35 83 1a eb 5e 62 90 2f + +# Signature: +67 eb 89 57 ce 4c 06 f7 39 1d 00 c7 41 24 53 f4 +b6 8b 33 03 a1 29 25 54 e2 a5 fc 72 62 c5 2e 74 +be d7 0e c5 8c 89 50 cd c4 31 5a 8f b7 c6 80 15 +54 cd 35 78 1d 44 fb 5e 57 d6 8d 59 a0 0f 43 b8 +6d 53 b8 43 72 d5 56 e5 a4 15 3c be 6b 39 7c 4c +9c 68 00 70 5d 2f c0 c5 48 64 5e 11 b9 d8 d5 12 +b2 dd 9b f5 9f 3d c5 d1 1c 3c 77 3d 59 cc be d9 +e6 bc 14 32 09 10 cd f8 3b 46 59 01 b7 46 b5 96 +74 + +# PKCS#1 v1.5 Signature Example 13.14 + +# ----------------- + +# Message to be signed: +80 8c b9 76 13 fd 87 85 35 80 1c 80 08 79 15 10 +a5 fe 86 6a d5 b6 84 3a 6e 00 19 a0 fc c2 17 76 +03 54 f6 0c c6 99 fb be 1a df e8 b0 0e cd 6a 36 +a2 b5 a5 a1 fa a2 3d 34 38 20 02 4e 3a 31 97 ae +67 3c + +# Signature: +1c 53 96 59 f8 72 46 99 16 fb 00 07 ef 9e 48 57 +4e 96 4e 4c 0e 6a 2f a7 4b 13 73 fd 60 b6 64 a7 +98 ac 81 29 c0 8c 12 cd bf 37 49 75 0b e1 25 60 +2a 71 54 32 67 67 32 7e 92 ba 57 b5 e2 89 b5 ac +9d 77 71 b4 52 0a 7a 2c e6 6c 5e af 70 4a fc 5a +19 0f a6 0b e1 37 6f 94 3d 2b af 70 52 3e 47 c3 +de fc 0a 25 a6 00 18 31 a3 7a ab 0c f1 f6 48 7b +e3 7f 0e 31 ca 7d b5 ac 41 b5 63 09 57 55 93 69 +ff + +# PKCS#1 v1.5 Signature Example 13.15 + +# ----------------- + +# Message to be signed: +57 ed aa 05 66 25 16 86 f6 52 05 ef c6 26 60 e2 +c2 e0 4f a5 ea a3 30 2d e8 7a 3f 6b 49 1f 7f a3 +ac 72 70 cc 76 75 1a 43 69 42 ac 76 5e f5 f4 74 +91 62 d7 e7 97 12 6b cb 8f da c1 9c f1 8d cc 6e +ff 48 59 3c 05 c8 89 3b 59 1a 51 33 2f a2 6a b8 +63 c5 ea a4 d7 51 e8 d1 b1 9c 58 26 90 b5 41 5e +6a 89 e0 5f 23 1b 33 ac 38 c5 3f 95 a2 d5 f9 10 +51 c2 ec 6d db 2b 6d ba 78 9d 55 3a db 9f 10 c5 +83 59 70 36 d3 48 6f bb 32 17 2a 1c 11 07 9e 5f +09 aa 29 eb 46 74 c8 d7 bf 5b bd 6d 05 7e 6b 87 +a8 b3 aa f4 80 86 d7 21 cb bc 8e fa c6 24 4d 32 +39 ae 18 f1 66 23 fa 52 8e 2e 70 fa 25 65 6a 6a +4a 22 92 95 0f c9 28 ed b8 1c + +# Signature: +33 73 2f cc 23 34 2c 58 51 38 b2 5b 17 c8 12 ee +3e 9d 3d a4 1f 6f fb cc 16 17 a2 ee 75 cc 5b 25 +01 25 4f d1 97 6d 25 88 00 e9 05 d7 e4 4a 0a b6 +fb 4b 8a 88 bb 7b f9 31 73 95 30 3a b2 fc a4 31 +28 48 6a 2b ab 36 c7 5e f6 aa 5e b3 fc 5b d5 55 +b3 ea 79 12 4a ad 78 97 e3 a4 34 de e7 92 63 71 +de 2d 6d 23 7e 89 b0 3b 8d d7 09 60 58 e2 a4 b3 +2c b5 57 c7 ad a2 98 a7 e2 ed d3 a3 a3 b5 29 b4 +d2 + +# PKCS#1 v1.5 Signature Example 13.16 + +# ----------------- + +# Message to be signed: +08 33 76 bb 82 21 2b f8 80 be 12 85 65 3a f2 ca +d6 25 c5 2e 94 e3 21 43 68 77 f7 25 a8 3b bd 43 +f4 48 6d 89 6c f6 7e 31 39 1b 87 06 f8 c0 f8 f4 +bb 1d db a9 5c 33 2f 03 4f 39 09 11 3f 65 56 92 +60 a2 e4 f1 04 06 65 7c 99 fa ff 00 1f e1 6e bb +89 6e 9e 18 11 5a f1 d4 98 6c 85 79 ab 56 52 cc +ca 47 74 + +# Signature: +2a f4 6c 00 d1 d9 15 94 1e 21 2a 7b 8d 81 05 ee +0f 0e c4 80 ff fb b4 f1 3b f2 8d 73 e2 b3 19 b9 +84 a7 b7 c8 36 7a dc a7 ab 12 aa f5 3a cb 98 d0 +cb 54 ee 34 20 4c 90 8e 60 c7 c7 9e fb 42 c3 11 +4a 02 58 9e 1a e6 af b5 97 53 54 57 8c 14 35 ec +c8 9c 11 6e 90 26 b6 bc 88 9e e2 88 ae 4d af 03 +47 cc ce fc 5d fd 1e f8 3c b8 68 52 ee ff d8 40 +98 59 9b 72 5b f6 02 ee 62 0b df 44 af bd 84 c0 +cd + +# PKCS#1 v1.5 Signature Example 13.17 + +# ----------------- + +# Message to be signed: +8c 87 4c d0 ce 33 51 39 c0 8d 76 0b 82 5e b9 90 +5d + +# Signature: +66 9a 8a d7 cb 81 ef 21 87 f5 a8 56 47 68 4b 72 +48 4a ff 27 9f 0a f3 54 35 86 7c c2 b0 43 33 a1 +96 ec a6 cf 44 a9 7a 1b d3 9d 0f 6a 0f f9 59 57 +02 83 5b c8 0a 72 d7 14 04 ef 3f 46 fa 3b 0d 20 +e8 6d 7a 1d 5f 7e fc 3f 3b 8e 8a 7e 37 e8 7e 27 +a9 9f eb a9 6a d8 13 20 be 8f ff 78 55 7d 07 bf +ba e2 16 03 a1 36 8c af a5 ae 1d 1b 63 0a a2 1f +f2 0e 45 85 65 0a 77 3d 7e 2f 5e 7f 51 72 97 19 +3c + +# PKCS#1 v1.5 Signature Example 13.18 + +# ----------------- + +# Message to be signed: +cb 3e 61 21 d3 8b 7d 97 e1 8b a1 5c 49 3d 1a c3 +2e 9d 2e f4 e3 bd 16 df 9c 67 e4 a1 96 e9 24 7a +8d 0c 24 b2 1c 4a b2 3e 77 d6 db 11 7d 59 11 95 +bb af 44 66 82 5f 63 97 8f 11 40 85 28 1b 79 ae +a3 7e 32 c6 b3 6c 1e 9d dd 4a d1 23 6e 97 fd 42 +7b 4d 97 6e 07 64 9d ca 4f 33 a8 9c 46 fb 8c 00 +b4 26 7b 14 47 04 + +# Signature: +56 84 17 80 3a 40 0e 9d 05 0a 43 20 ae 7b 7d 8d +24 8e 16 36 50 86 9d 9f dd 10 0c c1 a6 b9 bc 29 +1c 3f 23 f1 25 60 03 16 4f 61 9d bc 78 63 5e bd +f0 89 49 0a fa 5a a0 0b 6f 97 eb 06 36 c3 bb a8 +9d 86 36 0a fe 26 00 43 d8 61 a7 4f 64 c7 1d 9c +bd 31 ea e2 39 3a 1a f1 56 1f 1a b9 2c aa 76 dd +1e 76 ab 23 33 09 8c 83 c2 d9 9f ae 82 73 98 75 +80 05 c1 76 cb c4 a2 e2 2e fa 0e 6c 12 f4 e3 42 +81 + +# PKCS#1 v1.5 Signature Example 13.19 + +# ----------------- + +# Message to be signed: +21 9a 2f 8d 0b 00 0a ed b5 f1 85 45 5e d3 ea 09 +4c 45 42 6b 28 5b ab 4a 07 cf 3d 0a 29 06 f3 e2 +03 18 4c 2d 3d 81 a8 09 b8 9c 9f c4 8b c9 af 9a +b3 2f 84 f1 5d 81 38 9c 4e db 0a c6 8a d0 95 02 +e3 f3 0c 7c f6 45 10 29 54 b2 97 c8 66 14 66 fc +10 + +# Signature: +03 83 5d 90 57 e2 b8 21 dc 4c 6e ac a3 f4 15 6a +56 55 0b 6f 9d 74 00 fc 5c 51 95 a4 ae e4 71 7d +f3 29 29 12 2b 43 27 3a 07 9a 24 f9 9d d9 e7 c3 +40 56 ae a4 fc 4e 45 7d 83 14 ef 34 42 7f 8e 20 +4b 81 bb 49 03 fb 3e 77 9e 38 9e 41 33 90 68 c1 +57 d9 b0 9f 2c 5e 99 cc 54 e6 ef 86 ee ac 0e 19 +f4 4e 33 e7 07 c4 26 1a 0a 83 ce b4 22 f2 e0 6b +cc ae 3b 8b ba 42 8d 75 57 15 2f 40 84 6e c0 11 +34 + +# PKCS#1 v1.5 Signature Example 13.20 + +# ----------------- + +# Message to be signed: +e3 9c a4 0d 2e 9d 03 ae 05 96 f6 0e b8 f6 09 99 +30 85 a5 db 15 6b 0d 50 98 fe 5f aa c5 5f 70 99 +3f e1 76 d2 d0 c0 38 b8 60 bb f9 a6 62 43 f5 e7 +8e 6c be 52 6e cf 25 12 8d ae 31 96 56 cc 32 1e +e8 0a 50 53 14 90 c9 a6 24 3f bd b0 c5 eb 4c d6 +42 d2 61 15 05 ae 10 84 97 57 38 ad 84 62 1d 67 +f5 + +# Signature: +4f cf a5 73 97 f2 7e e0 f8 ae 75 a0 a5 4d 54 b0 +c5 1b 95 7e e6 3b f7 90 1b 60 55 cc 39 87 c3 2d +f7 22 0e 16 6a 71 60 6a bc 78 f9 11 07 f9 74 df +f7 d6 25 7c 25 6d c6 ed 7a 69 c3 c9 9f 9f 89 ab +b5 8f e5 89 b7 ee 7c ad 0f 48 c1 60 10 d0 46 a9 +c4 e0 04 bb e1 a8 29 79 68 d4 0b c7 06 82 eb ae +a4 48 52 5d be e1 6b 03 bd 0b 65 26 d0 98 d0 9b +6b ad 9a ba 03 93 05 e2 ab 79 69 02 08 65 80 cc +f0 + +# ============================================= + +# Example 14: A 1536-bit RSA key pair +# ----------------------------------- + + +# Public key +# ---------- + +# Modulus: +d8 70 a7 76 cd 13 ed 44 3d f3 99 08 be e2 ca d7 +3c 48 5f d9 bf 06 32 13 22 88 7f be 65 5c 08 cb +e4 c8 f6 3e 25 4f c9 1c 75 f0 55 7d 90 1d 43 5b +0e 8d ed 82 d4 91 73 41 4d 29 86 03 24 e4 6c 1b +03 0d fe aa 29 d8 0f 98 98 c2 c5 e1 01 cb f6 da +a0 62 89 78 d4 15 b5 02 de a2 6d e6 56 1c 79 ab +06 5c 6d ca 6a bc 4d 4d 4d 5e 9f 5c 74 cb 3e 6a +5a f7 1d 1f 90 fa 5e aa 1b e0 ca 94 7a 70 a3 9e +fd 31 5c 4d f2 1a 1a 82 1c aa ff 8d cb ad 13 b2 +9c 7e 82 aa d5 3c 64 f5 82 ec 9e c3 1e 6b de 82 +ea 5a 5f 4c cc f0 c4 57 b8 88 f1 55 0c 4f f8 e1 +c1 78 a7 6a 46 c1 96 f4 be f5 9e 61 dd 94 4e 47 + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +d8 70 a7 76 cd 13 ed 44 3d f3 99 08 be e2 ca d7 +3c 48 5f d9 bf 06 32 13 22 88 7f be 65 5c 08 cb +e4 c8 f6 3e 25 4f c9 1c 75 f0 55 7d 90 1d 43 5b +0e 8d ed 82 d4 91 73 41 4d 29 86 03 24 e4 6c 1b +03 0d fe aa 29 d8 0f 98 98 c2 c5 e1 01 cb f6 da +a0 62 89 78 d4 15 b5 02 de a2 6d e6 56 1c 79 ab +06 5c 6d ca 6a bc 4d 4d 4d 5e 9f 5c 74 cb 3e 6a +5a f7 1d 1f 90 fa 5e aa 1b e0 ca 94 7a 70 a3 9e +fd 31 5c 4d f2 1a 1a 82 1c aa ff 8d cb ad 13 b2 +9c 7e 82 aa d5 3c 64 f5 82 ec 9e c3 1e 6b de 82 +ea 5a 5f 4c cc f0 c4 57 b8 88 f1 55 0c 4f f8 e1 +c1 78 a7 6a 46 c1 96 f4 be f5 9e 61 dd 94 4e 47 + +# Public exponent: +01 00 01 + +# Exponent: +05 88 8f c7 7a 43 bd a7 a6 7b d1 58 47 65 0d f1 +85 c1 85 ed cf b3 ed 58 ce e3 b5 7c 5d 24 06 b7 +8b c0 55 87 4e 35 e5 7a dc 4b 0a 2c 7d 20 3a 66 +1c 0f a5 d8 57 ed e6 07 ef dc 95 68 04 2b f0 d5 +99 f4 e4 23 5e 91 7f 08 94 33 3a 92 df 94 62 d9 +c1 0a f3 df ca 70 49 a1 ea a6 35 70 13 98 83 c5 +be fe be e4 e2 21 89 43 d3 0f c6 45 ff e8 b9 14 +d2 18 dd 58 96 0a ad c1 21 71 5b ce 5c cd de 4a +2c 73 a8 d9 d8 6a 4e b6 e4 55 dc 92 4f d7 4a 0b +1f 75 69 1c 28 1b ae 91 4d 69 9e e2 59 d8 5c 5f +b5 dd 99 9e be f9 b7 0a 4b d9 4a a4 fa fa e2 6c +a7 84 d3 2f d4 e0 77 db b6 ea 69 3b cd 6d 27 d5 + +# Prime 1: +ff 8e f1 e7 4c 44 5a 5c c8 97 3a 81 9c 75 45 49 +12 35 72 0c f9 eb 83 f1 81 13 3c 78 a1 4d cc 4c +e5 e7 75 be 3e 0c 46 ed 2f 21 9a b8 8d 87 77 ad +6e cb e4 0c f9 18 76 4d 7e 37 c6 68 35 91 e7 aa +a1 3b 24 4b 7f cc 0e b6 df d7 6a 11 5f 30 ed 2d +63 68 c8 ea 78 0a 21 1c 0a c9 c0 72 5d fa b0 8d + +# Prime 2: +d8 d0 67 64 c1 f7 64 54 c6 8a 3a 08 1e 95 d7 47 +c2 94 11 ad c4 03 a7 cb 71 b4 3a f5 05 ca be 41 +b4 9c 97 1c 13 ad 65 63 b8 c9 0b 93 b5 89 79 bb +74 f8 20 ef b8 de d8 1f 46 30 54 a7 7f b3 0b b0 +99 98 51 a4 3c cd 01 69 18 51 31 f7 43 1b 02 e9 +c6 b9 f8 38 71 d9 cd 5e 0c 3c 58 70 cf 97 97 23 + +# Prime exponent 1: +e8 d6 15 f4 04 7a aa 51 aa b8 8e 27 94 a3 0b d3 +3d 71 d0 4d 9e 4e 43 d2 7f 25 45 8d 2a 79 b5 4f +c2 8f 95 a9 14 e3 1e a3 ee b3 11 42 60 40 32 7b +a3 5c c4 94 45 47 52 51 dc 53 78 c3 6d 3b 57 f5 +10 1c d0 3e b1 5a fb 75 06 90 3f 25 40 b3 55 04 +6b 74 06 ca 09 40 41 56 49 45 f3 be bf 7d 2d e9 + +# Prime exponent 2: +73 5d b1 26 73 ef 67 7b 94 89 48 87 b9 7e 91 a6 +a5 6a 94 5d 99 c7 38 29 90 bf 0e 00 02 ac f6 bf +8f 93 22 f4 d5 a3 96 27 91 d3 a8 4d 58 73 66 4a +d0 da 96 eb f7 ba db d5 08 4b ff 3f 81 3b 8c 24 +d4 15 b0 9b 6b 9e c9 f9 59 ef 1a 5f 2f 5d d8 16 +fc 9f 47 ed 00 e7 9b d7 47 3b 74 f3 d2 02 1f 71 + +# Coefficient: +10 62 18 af 97 1d 92 95 91 59 90 a4 ed 3e 09 d3 +63 db 33 06 b0 90 a1 33 eb d7 54 e2 bd 77 6b 25 +85 99 9d 4f 88 43 03 0a c7 0c 0f f5 de 52 12 67 +22 34 c0 07 ce 74 56 4c 79 1e dc d5 76 f9 68 44 +04 8c fa 66 36 46 b8 fd 80 c7 51 26 b2 26 6e 48 +f1 fa a7 05 44 ad 42 04 fd 61 56 29 2e 51 6e 13 + +# PKCS#1 v1.5 signing of 20 random messages +# ------------------------------------------------------- + +# PKCS#1 v1.5 Signature Example 14.1 + +# ----------------- + +# Message to be signed: +f7 a3 c6 7e 92 a7 87 f3 5d cc 47 ae d7 d6 b6 19 +29 67 bd fd 00 a6 ac bf 6f 7e fe 46 d3 ac ae d9 +78 8a a4 f1 db 18 44 02 24 9f 9a ce fc 1c 7d fb +1e 69 0d 24 73 8d e8 6f a5 b5 25 0f 97 9e bd 8f +77 8e ec 0d 7f cf 73 1f a2 25 08 6c 86 65 64 ed +3e b1 54 dd 45 8d 05 00 28 2f 86 80 48 87 d4 43 +5e da 9a 44 36 a8 e9 23 a2 0c b4 b4 d0 e8 1c 91 +11 4b dc 06 82 27 8e c2 58 86 07 99 b5 9c 94 36 +f4 3a 53 ca b4 c4 cd + +# Signature: +09 d1 43 5b f5 a9 c1 72 03 d5 37 fe 57 df 98 7b +7a 51 f3 4b 2a 14 09 7e 06 a0 de 56 3b e7 d6 4b +4e a3 79 73 b4 fe 99 73 a6 6a 3f 31 ba 8e 07 e9 +11 7b 6a 1e e7 09 61 33 7b 4d 2b 0d f5 98 10 b6 +24 08 51 18 bd a7 0a c7 4a e4 3e 2f bc f8 92 27 +63 03 23 da 68 30 f5 b1 a2 b9 54 f1 b1 5a ea 07 +54 df 2c 51 18 57 95 16 e8 77 cc b0 b1 28 6c 57 +24 65 5e f8 d2 91 85 66 6f 6e 9b d3 2a 6b d9 ce +9e 1e f9 47 29 fc 67 d6 a3 0e 64 56 0e cf 78 bf +8e 1b 2b 40 e5 06 05 e2 5a e8 0c 38 67 64 ae d1 +1a 0e 71 44 90 49 c9 39 b2 96 2f 6c 24 17 a3 58 +cd c8 10 6b 12 b1 a5 58 76 39 43 8a f1 a6 8d 32 + +# PKCS#1 v1.5 Signature Example 14.2 + +# ----------------- + +# Message to be signed: +2a 13 30 03 ab 67 cd d2 e8 3b 44 e9 e9 dc 77 7d +e0 1f 4d 23 3d 22 e7 d2 b4 46 7f 04 81 2a 3a eb +ff b1 0a 09 24 54 e3 3b 9e 70 28 24 93 28 74 7e +a1 4a 11 c7 98 ac 2e 14 6e 4e 49 65 9b a8 60 67 +db 64 e9 bd 80 a7 02 1a ab cc 22 85 6e 81 01 40 +c2 0f d8 c6 52 7b ad bb d9 fa 59 53 fa 77 e6 85 +87 00 be b6 c7 4d 5a 46 3c 9d a8 61 13 3b aa 5b +d6 a5 99 80 7a e9 16 2e 3a f3 a3 48 d0 4a 4e dd +2f fb ab + +# Signature: +35 e6 66 cf b8 7c 04 88 a8 6f df ed 5f 9d ea ed +bc 46 74 17 1c 31 84 59 ac aa aa 20 e1 ca d7 c5 +86 04 14 0a 80 ff 7f 56 5b fb c8 6e 90 32 8d 4c +72 9b 91 bf 72 a9 8d b7 01 c1 be 63 8a 6e 8f 2e +46 8f 20 39 24 70 c7 c5 c3 44 42 d5 1b 1b 15 5f +b4 64 b8 a5 56 f4 a1 70 c0 23 01 fe d0 d1 aa 92 +aa fd eb c3 f1 8e a8 b4 d7 1e 24 5c 25 26 f6 fe +66 5d e4 83 85 f4 6c e1 bf 33 12 fa 89 28 09 8e +d3 31 2b 61 11 6c a7 e4 23 20 4e f0 8b d2 df 3a +d7 bb c8 50 09 8c b0 26 83 26 66 25 bb d9 59 82 +51 35 a4 5f 03 82 9d 09 6f ed 18 b2 0b aa 3f 9d +44 b0 07 aa 24 1f 92 f8 88 60 55 d9 8e 0e 07 04 + +# PKCS#1 v1.5 Signature Example 14.3 + +# ----------------- + +# Message to be signed: +58 62 7f fa aa 8e 80 0a 8b e9 8e 42 f5 1a 83 61 +1c fa b7 ee 37 6b 34 73 7b 3e 48 e1 bc 17 42 da +a7 7d e4 7e 1a 9b 29 33 77 aa + +# Signature: +3d 17 cb 38 6c 88 78 4d 35 9a d3 c3 8d be 88 8b +fa e8 31 bf b8 ed c9 d0 e8 01 e7 d6 9e 1d d4 c2 +44 1d 68 fd bb 35 12 6c 73 a4 ed ab bf f5 4e 74 +fa 51 09 da d8 b5 c3 13 d8 6a 79 e4 d4 12 76 60 +fc 2a 8e 1c 93 fa 8d 09 2a cc f0 1c c1 8a 60 6c +f0 7d e2 dc 3e 7b 55 33 11 52 db 01 b6 ca ea 1e +ce c9 09 31 99 be 62 c3 e1 23 e2 87 31 13 50 3b +22 03 0f 16 8d af c4 e6 bd 06 5a d2 f6 b1 de d0 +5b e0 c2 f9 b6 7b dc 1a 3b b1 8d a9 59 4c 95 7d +a4 e4 9f ac 3f e7 6e 07 66 f7 4e b0 d5 23 e4 dd +1a e7 59 da d6 b9 b9 08 b7 fc 8b 97 ef 5f 4c 82 +92 32 0a c3 87 c3 50 8b 54 cf b8 5d 34 f6 ad 39 + +# PKCS#1 v1.5 Signature Example 14.4 + +# ----------------- + +# Message to be signed: +0f 0f 8d 3c 0e 4d 26 08 af ad 5a 88 8e a1 4b 3f +6b 2b 27 89 dd 22 12 b8 59 09 e6 4b fb 10 4d 0f +7d e4 27 d1 4a 9f fa 85 5e 2d 4c a2 44 23 36 e5 +59 56 8b 28 41 5d 60 cf 80 63 de 55 92 17 1b 26 +9b 3d 76 33 51 c7 f7 d9 d2 58 09 e7 02 20 ee 30 +fe 8a 00 b9 5d 4c 20 20 26 89 7e d2 c6 1d 7a d4 +3a ed df 36 b5 c2 cb e2 1e 00 86 db d0 fd fd 19 +e4 3f 02 77 f3 bc 95 ed 55 a3 4a f9 30 91 66 02 +19 3c fe 04 51 4b d2 6a 05 7e 56 2a 11 90 c2 7e +aa b6 c3 22 fc fa f4 bb cc 7f 20 c3 77 9c 63 8d +7b bc 07 08 6c f7 5b f8 39 96 db 44 63 + +# Signature: +50 90 45 12 36 10 50 87 2e ae 80 10 26 28 b6 3d +02 16 8d ca 52 f0 ab d8 77 20 ea 48 05 0d 2c 62 +06 1a a2 15 32 68 be f8 ef b3 4e ed 46 17 1a 62 +88 e5 04 d4 20 f6 fc 14 51 38 61 1e 75 ed 3c f7 +9b 4d 10 26 64 d8 64 4f f3 e9 e5 db fd 71 cd c2 +7a 21 0e fb 10 be 90 27 56 04 f8 d4 49 14 8b 3f +86 09 90 39 c3 3a ef 90 bf 19 1b 35 18 eb 45 9d +a3 ba 14 fd 0c 72 22 9d ea 5f ac 2f 7d ad e1 08 +5c 8a 23 70 bb fc fa 2e 3a 9e 63 ca 22 4f 6d e8 +c8 d2 97 a3 b1 f0 6f 1f c9 49 78 90 fd 0e 0e 13 +88 7f ac b1 52 d1 2d 96 39 25 28 ef 28 d0 72 43 +31 ff 41 40 30 c7 a6 38 55 81 3c cd 89 fb db 1b + +# PKCS#1 v1.5 Signature Example 14.5 + +# ----------------- + +# Message to be signed: +26 65 cb 5e e3 6a a9 bb 1a 5c de 7c e8 + +# Signature: +4f 38 c2 ba 84 c5 0d 46 df 53 10 91 b6 27 12 14 +9c 1f 42 db d7 7e 03 d1 85 ea 96 ed a8 02 33 7c +22 c1 13 0b c3 be ce bf 15 39 fd 11 89 38 51 da +e3 cc 15 67 cb 6c 73 a7 2f a1 c9 69 48 68 21 12 +7e 7c fe a1 36 3e ee 95 2b 7c 6e b5 9e 10 2c 66 +57 c0 80 35 27 2c df 4a b5 e5 83 ed 73 7a d0 28 +ac 1c fa fe dd c9 07 3d fb d7 d3 ba 3d a9 e8 dc +d8 46 fa 36 5c 9c cd 8e 9b 39 48 3d 37 07 3c 1a +7b 78 2e e7 12 1b b1 a2 ad 8b f5 f8 ed 6e 65 3e +92 4d eb ad 87 1b 74 43 39 e5 ae 7e 96 f6 0d cc +45 ea 5d 69 7d 3b 1c c7 c5 e8 da 04 e9 2b e0 6c +ad 2e 61 4e ac 31 8a ec af 12 d5 a7 62 34 c2 c0 + +# PKCS#1 v1.5 Signature Example 14.6 + +# ----------------- + +# Message to be signed: +7b 7b 61 61 02 0f af b4 88 71 63 21 34 0d af 2c +06 ac 43 ce 21 32 86 86 84 aa af ab 13 99 65 3d +35 3b 26 93 ad 73 cb 55 b7 1d 66 ac d0 1a 16 0c +bf 74 37 67 bd 96 e7 fd 1c 7a 13 32 06 65 bb ad +1c 4a 0c ed 26 59 3c e8 9c d8 2f 54 6b d4 d1 b1 +bc d8 2c 65 a4 66 f9 9d a0 12 a4 1e 8c 41 20 69 +81 09 58 47 5b 4d 9c 2f 80 d8 2d 06 41 4c 83 25 +eb 4f 2c 5a 11 66 f1 f1 d2 d1 07 d4 8c + +# Signature: +d5 cb b6 c7 ef f4 a6 3a d8 25 0d e9 4c c2 9f 7f +31 a0 d7 10 6d 5d 77 1b 71 5d f8 a6 75 fd 16 34 +d6 e8 ab 58 87 5c c4 c1 51 7b 2f ad f4 e8 5c 1c +b8 b8 53 60 e0 68 75 87 d1 48 08 9f 3f 48 b7 9d +98 d2 02 7c 50 77 0b 33 4f 12 52 ac 0c 3b 2f 03 +65 34 c3 c2 97 22 f6 08 7d 06 d7 06 ce c7 c4 bd +ce 1c d6 4f 7b 4e 07 99 a8 7a a0 73 ea 83 20 29 +2b 8e c8 27 17 40 6d 36 ef 91 25 e4 1f b5 d5 3b +cc dd 62 2d 38 8f cc ee 60 a3 85 ec 20 6a 71 5d +c5 4d 78 77 bd 72 85 d0 84 4c 25 d5 93 77 97 91 +27 83 96 ff 9a 8a 91 30 6a 54 ea 76 60 7c 81 3f +80 1f 38 76 0c 3a 81 4b 93 96 95 9c 29 db ff 9d + +# PKCS#1 v1.5 Signature Example 14.7 + +# ----------------- + +# Message to be signed: +2b 0a d6 13 82 28 78 a5 72 e1 42 80 + +# Signature: +89 c8 10 84 da a8 f9 14 b7 e2 44 55 10 74 17 ca +62 1c 91 02 d5 01 ee b4 3d 17 4c 7b ad 38 1d b1 +8d 95 33 c3 41 1a ec 60 57 ca 5a 4d fd c3 f1 31 +c8 88 b8 8f 01 30 03 d6 17 e0 6d 64 47 95 02 ae +7e 42 4a 5d d6 37 b0 33 56 40 4d 26 0f 5e d6 b8 +cb 16 d2 57 85 28 cc 3e 85 00 34 6e b7 90 bd ad +41 b2 e3 6c a6 f1 98 85 e3 f6 f5 10 86 bf fb 6a +bb 9c 66 33 6b 49 47 34 64 c5 d7 ed 8e 9f f8 5e +11 ae ff 40 90 67 ba b0 a0 5c 41 e8 15 1b 8b e9 +87 f3 f5 95 8e 3e 6f 26 51 5d 96 bf 23 4b 22 ab +91 c0 85 7b 6c 08 a4 6b 03 05 fe 04 4c a9 aa a0 +d7 0a 27 58 a1 ce 43 16 64 a8 dd 79 40 8c 16 ba + +# PKCS#1 v1.5 Signature Example 14.8 + +# ----------------- + +# Message to be signed: +36 93 8c 8c 7c 6f 7e 35 52 34 db 5a 32 a6 48 10 +db 50 2b 67 c6 f5 92 54 4f fb 27 eb 1f 22 e0 6f +2d 63 8b 56 d5 d2 f7 d1 9e 9e 27 1f 2c c9 0c c0 +dd 36 d6 cc 2c 06 17 8b cc 70 6a ef 20 e5 6a 35 +8e 52 4f 63 16 76 9c 54 b6 de 2d d5 + +# Signature: +a0 37 53 a5 fb 54 aa 51 f6 dd 8d ab 91 f1 9c b8 +65 56 84 85 f8 55 8f 0d 10 3f 0d 2b 6d 78 53 6e +79 c8 15 c4 a0 37 bc af 11 b6 9d 4c db ab 03 5a +be 21 6f 71 52 f6 30 ff c7 9f 84 9d 8d cd 46 3a +ae 6a e9 7d 3d f1 5a 9e 73 d2 3f 18 78 fa c7 54 +cb dd 57 1a fe a5 d2 53 57 d4 b8 83 45 f4 89 be +0d 67 b9 bf ad f0 23 f2 6e 67 31 5e d5 fb f3 91 +91 0a f4 96 9b 72 4b f0 ca 31 c1 05 9f 8a 39 13 +b4 8a 13 81 9c 23 6c 9b e8 e8 24 ca 4c b6 19 fb +7d 78 4c d5 f9 52 6b 39 7c 76 c5 d0 c6 0c f7 f4 +8d 11 19 6e 54 f7 2a 08 bb 42 f7 5a ef e3 8f 0b +91 b4 2b b8 06 de 4b 87 c9 08 2f 72 1a 68 80 ca + +# PKCS#1 v1.5 Signature Example 14.9 + +# ----------------- + +# Message to be signed: +60 83 0c 01 cf a8 6f f2 dc ac 7a f9 32 1e e5 fe +50 2e 0e 7a 6f ac b7 3e 3f 6b c9 02 64 0a 61 09 +5f 64 6f d0 3e 80 d5 81 82 46 53 31 e7 5d 66 11 +a0 97 76 81 62 70 86 24 17 29 de 9f 44 ab 43 94 +9d ac 19 36 73 bd 6c f8 7f 5d 65 77 1e f8 72 81 +63 3f dd 07 ba c4 09 a6 e2 32 b6 01 ae ce 2d + +# Signature: +40 58 f6 e0 24 0d 85 1d 61 93 95 a7 52 87 a8 8f +af d8 dc 56 00 b0 69 bf 19 dc 3e 19 21 e1 17 b4 +97 b8 2b 3c 52 02 69 b1 d1 12 81 64 fc d8 8d d2 +b4 6d c8 5c 42 ec f6 7d eb ad 21 a3 b9 a1 55 42 +fe a2 26 06 ea b5 82 fc 32 97 11 ff c0 7f 4e ef +1f 3b bf e0 88 8c bc a4 85 ba fc 11 88 b0 af e8 +09 c9 aa f8 fa 36 66 b9 c9 05 85 39 db 1e c6 a1 +8e 5b e0 b8 01 44 d2 c3 7c a6 14 c0 90 b4 a7 f1 +34 58 e0 d3 a4 cb 0c b7 3d cc 4d 90 80 6f 61 08 +58 89 eb 5c 9b 14 09 de f3 60 fd 1c 2e 49 43 8d +7c 67 d7 9d bd 9a 59 2a b5 04 c4 71 5f 65 b2 9d +84 65 09 95 15 69 a8 c3 79 09 f5 d5 50 ee ff fa + +# PKCS#1 v1.5 Signature Example 14.10 + +# ----------------- + +# Message to be signed: +63 5d 22 03 ed 9d 5b 91 20 e3 1b f6 9d 30 5b e6 +06 86 97 e3 5c e5 9c 55 3e 50 8d c7 7b 07 3f fa +3a aa 59 f9 96 c3 0b 2e 68 63 23 81 9f de 22 be +6c 8d 53 86 84 14 b3 54 5a bf 43 57 68 a6 11 f0 +c1 a4 79 a0 c7 66 0d 53 5e 80 5b 5f ed c3 77 9c +f0 c5 2c 3c d0 40 ab 65 14 c7 f8 13 3d 47 b0 ac +c6 91 4e 6d 4a d3 c4 73 7c f5 12 91 09 4e 85 94 +33 ba 30 66 e1 9d 6a a2 da 89 6d c9 d9 5e f9 e5 +63 6d ab 35 f7 29 87 05 c6 d8 76 17 54 12 f8 84 +25 19 ff e1 6c f7 43 62 ab + +# Signature: +94 61 a1 a8 41 42 3e d5 cf c6 08 9a 74 db fc 53 +73 11 03 bf 49 85 dd b1 50 b0 e9 38 0d 3f e0 cf +6d 45 7c 5c 68 a7 f2 55 04 02 2d 69 5f f8 42 11 +8e bf 61 02 2f ea 47 fa 45 f7 c1 cc 72 6e 1d e5 +0b d0 64 b3 bb 70 16 57 16 2b 88 c0 b9 10 fe b7 +2f 48 7a 5c 7f 4b 9e cf ee 24 e0 7a a2 d1 98 d1 +13 cb 84 5d 81 7b b5 9b b1 da 24 a8 2b 91 c2 fe +3f ba 89 51 83 cb d9 c0 fe 0a c0 be 64 fe f2 e0 +13 92 05 b1 0b ca bf e5 a3 a7 a8 90 fc 0f e7 8d +ab e1 ad b5 bd 11 44 85 03 cb 0d cd 0b 68 f1 60 +19 6e 96 13 e2 9f be 9a 3f 94 06 ec 20 c0 30 e8 +1e c3 09 65 ea 01 9c 17 aa 97 11 01 c2 e5 30 59 + +# PKCS#1 v1.5 Signature Example 14.11 + +# ----------------- + +# Message to be signed: +87 fb a9 89 f3 cc 15 af 7e e7 61 c0 88 26 4a b7 +71 52 39 e0 b8 c8 a9 e4 8e 11 db 68 03 31 39 c2 +a2 89 ea 42 6e be 26 9f 5f b7 07 09 0a fb 89 1a +49 ca 05 c0 55 0d 72 9b f4 d3 7c 8f 1d a7 a3 ca +2f 43 87 a4 0b 5f 79 13 a3 85 f5 5b 81 41 af 36 +be 8f 57 16 65 f8 57 e7 7a 5c 9c cc e6 ba 8f 2b +e4 63 23 cc 56 91 56 6f f4 b6 d7 85 43 04 b9 3b +ba 1a 17 59 df b1 44 c9 54 7c f2 bc 8e aa ed aa +4f 1d d2 52 82 3b 72 87 ca 55 5d 21 06 08 9a 24 +3e 5d fe 8f c3 1d 3f 46 22 2a 68 ab af 31 81 5a +94 7e 58 57 cf 6a 33 17 0e cc b6 a5 e0 6d 23 cc +9d 48 ea f6 cd bc + +# Signature: +0b 5f 1c fc 25 3b aa d4 b9 83 f8 fe 05 0d 4a 01 +7c c4 66 98 0e bd 23 c9 d5 53 43 f5 10 7e 04 1e +b6 54 78 10 fd ba 46 86 e6 10 83 2f 92 82 ed f0 +66 04 b0 ab fe ea 38 01 32 79 17 79 40 99 7b 28 +90 2b 14 db 37 9e eb 4f 44 00 5d fc b0 03 68 03 +c9 f1 25 bc e1 f2 a8 2c 4d 30 07 ae 96 b8 48 b8 +13 ec 8c 97 ca 3f 71 0a 9a e0 db c2 8a 55 e0 58 +81 b8 58 db 55 71 20 f3 3c 59 cd 43 60 f9 20 8c +74 b2 7e c6 5d 11 ea 41 fa 6a 9e ac f2 a6 11 68 +ad 07 c2 09 94 8f 35 a1 61 f4 1f 87 54 0e a1 82 +84 aa b8 d8 f9 78 61 31 f0 43 90 2b 89 c1 7a 56 +0d 90 94 64 47 5a 0d fc e5 89 09 18 7c d6 e4 46 + +# PKCS#1 v1.5 Signature Example 14.12 + +# ----------------- + +# Message to be signed: +4b 5e 80 30 5c be a9 0d 63 7f db 23 47 c6 fe b6 +78 42 eb ac 6f 90 3d b5 a7 1e ba ab 8a 1c 2d f1 +12 60 a1 ec 90 7b 8b 63 4d 37 d3 6e d8 de 7d 0d +a1 03 bc 4a 9e 93 3f b7 bf ee 59 1c c9 33 29 9f +ee 46 0f 35 42 c9 78 f3 07 ae 05 24 64 f3 06 20 +ce bf 3c 9a 9c b6 a9 01 53 0c 1d 56 13 df 07 74 +31 2d 4b 5f + +# Signature: +b6 f0 3d 35 33 50 07 a7 47 ae 68 67 60 f9 ed ad +08 89 d2 d4 ca 0c b8 8b 67 43 12 d3 2c 55 2b 7a +66 c5 a9 52 8c 01 4b 58 c8 49 f2 31 a2 e0 45 68 +2e 3b bb 14 c7 f9 5f f8 bd b6 58 7f 25 11 cc 6b +f9 24 39 60 08 11 03 d4 7e 77 69 a1 77 eb db 91 +f1 28 73 de cd 5d c0 67 e4 5c 2b 2a 04 4f fa 3f +bb 04 c2 0a 3d c2 01 38 40 3f f2 5c a0 eb ad 96 +e4 85 9f a4 a0 d7 32 85 2a f3 50 a2 75 69 9a 94 +aa 6e 47 f2 17 e3 83 ef 8f ce 8e b6 ee d7 82 6d +7c 61 58 fc 58 82 e4 61 35 45 fa 26 ee e0 c9 f9 +3d e7 a1 65 08 ea 16 19 70 46 0d 6a 7c a7 70 f8 +de 8b a9 3c ea f3 97 dd f1 fb ce e2 82 a1 53 7d + +# PKCS#1 v1.5 Signature Example 14.13 + +# ----------------- + +# Message to be signed: +e5 ad 62 7f 24 f4 11 7a 0a 6b e4 a5 5f db 88 3d +75 a6 73 12 15 4a 71 89 23 d0 e8 f5 73 0a 54 d8 +ca 7c 97 4e 4d 59 33 8b b5 71 30 5c ce 99 0c bb +cf a9 1e a9 b7 73 b8 3d 7a 1f 0f fe c4 c6 b1 43 +fe 05 05 8b c9 0c e1 46 f3 69 cb ae 3b 3d 99 70 +5e f4 3d 07 21 b8 + +# Signature: +73 29 86 d4 ed db 8a 7e 9b 65 dc 01 6d d5 71 ef +ab eb 84 49 0e 88 e3 e7 3b 63 e8 0d 1c c8 6a 45 +2d ec 29 fc 81 7e 8a d4 ee bd dc d9 7c 74 5b c4 +79 7e 54 fe c6 ac e2 91 b1 96 dc 24 65 f0 8c f1 +dd d2 17 e7 7a af 7d 50 98 77 91 de 81 b0 41 10 +d1 1a b8 55 89 06 60 4e b9 d9 2b 35 f9 00 75 af +42 28 01 45 b0 88 e8 75 3d 0d b7 3c d3 a3 2b d1 +9c ea 35 38 ee 4f 09 27 3e f6 6d 07 05 d4 5e e7 +10 9f e5 95 df 55 76 7b 3d 10 81 72 27 bb 6b a3 +95 75 b8 5d 6a 35 a2 ff b8 8c b2 67 db fc 28 2b +b8 a3 de e0 2e c7 7b 0c b8 13 55 70 f8 a7 d7 ad +04 34 1a 08 64 e6 7f f6 fa 02 59 a1 69 74 c8 6a + +# PKCS#1 v1.5 Signature Example 14.14 + +# ----------------- + +# Message to be signed: +03 e3 9b a7 a8 0c 77 14 16 d8 52 63 e4 d4 3c 63 +93 df e7 96 52 3b 89 e0 a4 61 62 88 80 80 0d 8f +c2 43 1b 66 30 54 09 e0 6c 95 ae 7a 17 d5 34 b1 +e8 4c 19 9d fe 73 1d a9 49 f1 64 57 1d ec c8 b1 +66 be b8 dc 08 7c b4 86 99 98 c2 + +# Signature: +60 76 3b ea f7 c3 e2 2b 3b 22 dc 44 d9 47 82 6e +23 fc f9 6b 01 b7 74 1b 24 b1 b9 d9 3c 07 f0 c6 +4d 39 67 98 bb 58 9b d4 25 29 53 69 bf b8 79 ad +d3 42 cd 76 28 0b 57 e6 35 4f 61 95 e8 42 fa 2a +95 f1 c4 6f 0b 70 78 6c 31 8d e9 a5 5a 8a c4 54 +5e e7 cf f3 99 c6 78 e5 78 f8 93 9e d4 9e 84 bb +a9 aa e5 7c 1a 36 fc c3 94 86 46 6e 40 12 f9 58 +87 a6 81 10 f1 a4 84 67 e4 c2 34 f5 81 c5 ec 47 +71 06 cc b3 ec 86 17 b4 be 21 93 37 44 8f e7 2e +25 de ab 53 ea cb 92 e5 96 62 95 b3 a5 57 12 19 +58 df e7 9c a4 72 f7 9e fb da 1d cf ba 9d bd 0f +97 67 32 c0 93 b9 8f f1 93 c9 02 98 7a 42 6c 0f + +# PKCS#1 v1.5 Signature Example 14.15 + +# ----------------- + +# Message to be signed: +d4 c2 35 96 7d 4e 87 b6 71 1e 32 ac 70 37 a3 97 +f9 9b 1c ad 95 a1 88 94 6a 48 64 0e b6 b7 b0 03 +c3 2f 85 a1 21 b0 9c a4 c8 be c0 b8 27 44 aa f2 +7d 16 6c ef c7 a9 70 2a d3 1d bd 15 ea 2a 18 5f +5b 9b a6 42 f9 49 07 8b c6 09 b9 a8 a3 36 92 d7 +18 49 39 d1 f9 eb 42 6a 6d b7 40 ea d9 4c fe a1 +7f eb 06 18 d7 4d 9a 65 16 88 e9 0b 9b b7 05 24 +30 5d 61 8c 88 a5 5f 45 44 50 e0 c5 85 d3 a8 d9 +81 65 81 8f 36 3b 20 a2 52 49 2e 15 12 58 58 90 +a8 c3 20 a7 18 71 58 ce 0d 4e 4b e1 c7 01 f8 af +dc 54 5c 4d ab 86 8d 41 d4 1c 21 c2 cb 1f 67 df +79 53 d5 f7 26 1c 50 92 bb c4 33 2a c5 57 5b 6e +0e 03 14 9c 04 0c 3e 20 1c 79 15 ac 20 22 88 4e +a0 e6 c2 14 03 f0 b4 4e 0f 71 34 3f c9 11 1a 7d +b2 f5 e9 e5 09 c2 d8 97 84 ef b2 2c 31 e8 16 5e +0e 93 6c + +# Signature: +46 9f 08 bd d0 3b 75 64 0e 8a 44 a0 7c a8 de 4b +ac f8 33 1f e3 9c 44 d2 3a a7 b5 81 dc 3f 00 f5 +42 1b 5c 17 2d 0f fc e9 14 97 d3 d4 b1 04 f5 6a +98 ec 94 f7 19 27 1e 58 b4 3e fb d8 76 e1 c1 31 +fa 97 82 07 28 a5 56 75 55 21 4c d9 4a 18 fc ce +5c 2f 53 b1 9d 1f 3c 73 d0 9f 7b e1 80 97 38 b0 +3c e7 69 e4 54 ed 4c be dc af 43 c4 8b d3 9d f2 +f8 bb 63 b8 fc 4d 0d 4d 5b 20 4f c2 20 01 3a 66 +8c 19 f9 75 02 93 a4 71 15 83 88 26 45 db f3 ac +4f 83 9b 6f d1 cf 3b 5e e8 d7 34 e1 da 37 4d 91 +d8 9e a3 18 e9 18 34 83 f4 a0 9a 93 51 4a f5 4f +75 d0 a3 56 51 b2 40 f7 9f 20 a2 97 7d 14 57 8c + +# PKCS#1 v1.5 Signature Example 14.16 + +# ----------------- + +# Message to be signed: +d0 6a dc a4 c2 0f 0d 9f 7b e6 5a 20 32 7c 29 47 +56 e3 ed d9 e1 d3 9d 0f 95 c7 9d f1 ba c3 34 35 +9f ab 94 3d 85 45 a3 ba a3 7a 59 29 5c 58 b2 37 +75 2b 8d e7 d4 32 3c 56 e9 d7 cb 0c 7f 83 1d 54 +9c b3 87 19 a0 81 d5 8b 60 57 ec b7 42 9e 2c a6 +07 cd 13 06 35 59 43 15 9d c9 24 ad 3e 9c b1 3d +0e 71 ea dc b0 05 e1 84 c0 c2 ce aa f9 d7 4a 1c +1d f6 fe c1 8c 97 a0 + +# Signature: +9f d9 52 5c 15 c8 43 b8 06 9c 15 f2 6d 3f 95 24 +6a f3 7a 8b 8e 6b 93 9d df 5b 38 28 cd b6 2c fa +37 3a 92 ec c4 13 84 a8 77 ca a0 90 aa 13 c8 47 +ef 28 29 dd ca 14 14 20 14 02 14 81 55 05 50 da +a2 9d e2 ab 70 01 b8 55 c9 34 2f 0c 90 bf a6 c3 +34 9b 2c 39 62 13 ef 70 cb d8 4b b4 ce 6e f5 8b +17 6e 9f 6f cc db 6e 46 ca c3 41 14 a1 b9 f9 8a +8a 32 75 7b f7 5d 6b fc 45 5a de 6a 01 f9 60 50 +1b 79 f5 fb e3 b3 8f ca 03 46 4e 43 d4 96 63 c7 +9f f6 4d 32 98 1e 44 80 cd f4 2d 8a f8 da a7 f1 +2b 81 a5 aa 96 5f ad aa 3c 03 b7 ff 22 d3 cf df +fe 3c ad f4 d5 98 9e d1 4c 96 9a 6e 8c 9a 1e 04 + +# PKCS#1 v1.5 Signature Example 14.17 + +# ----------------- + +# Message to be signed: +3a 63 02 d7 9e 26 b5 55 c7 7d e9 2a 91 e0 78 57 +1e d1 57 2f fc 3e 4f c9 05 ce 53 f1 04 b3 22 00 +95 7e b2 b5 e5 f3 e3 fc bb c1 62 f9 e5 25 c7 06 +f1 dd 04 fc ab 51 6b c1 8a 8e 4f 88 a9 38 a5 b2 +56 85 d7 8d dc 9f 10 4e 49 bf 5c a0 b6 5a 4b 96 +57 e0 4a 71 fb 50 eb 4a ac 22 c0 bb 93 f6 0c ac +94 83 f1 77 13 55 3d ca 4b 31 e2 72 7b 32 e3 50 +fe 20 4c ec d9 a7 cd a4 da da 2e 87 ff 6f 2b 73 +e7 b0 78 1e 21 2f 34 fe 36 36 10 f0 18 a7 99 37 +37 55 ab 46 66 7b b6 52 5d 7d c7 a0 e8 28 90 17 +f5 48 7f a6 92 ef 2f dd ce 38 ad 3f 45 30 de 7e +e5 05 66 70 a7 35 d3 78 d1 ef c9 94 81 f8 c9 fb +ee a9 9f 56 6a 0b 6e 28 46 26 44 a6 d9 c6 cc 88 +fb + +# Signature: +b7 57 fa 74 7c 5c 87 67 66 f3 58 ac bf c7 e7 b8 +05 96 36 8d 0d 86 29 50 e5 55 f4 71 64 6f 64 0e +85 1d 61 2a 55 6f 55 a7 4a 32 92 42 9e 4c 14 f7 +8b a3 eb bd 96 87 f3 08 de db 3c fe d7 1f 4a 9d +d2 6f a5 12 2f 7f 71 94 ae b6 3b c8 b7 5c 34 31 +87 11 5a 1d bd 35 95 90 f7 ff 38 62 b7 08 85 af +1c a9 34 b8 ce bc 2c c9 e6 47 25 3f d1 32 7a 2e +d4 24 4d c8 f5 85 55 a6 89 7c a3 22 9c 80 1e 7b +f6 28 f5 25 e6 c9 48 80 4d 0b 1b 6d bc d7 90 2a +cd e7 a2 5b a5 91 d8 86 e2 8d aa 8d ed 5e e4 01 +e3 4e 64 12 f1 e6 44 ee c1 2a e9 42 61 90 6a 17 +26 11 dd 5a 98 67 78 9c 41 90 34 68 84 29 e9 06 + +# PKCS#1 v1.5 Signature Example 14.18 + +# ----------------- + +# Message to be signed: +9d c7 ce 1d 02 ca dc f1 0d f1 11 04 56 b8 a7 a5 +ea 43 76 b2 7e 8b f8 cc 8d b8 10 49 fd a3 fb d0 +db 8a 3d 0f 6b d7 48 6b 8d 84 bf 9f fd 4b 64 17 +52 df 7e df 50 86 5e 8e 58 ad 49 f7 24 0e 47 d3 +fc 98 5e db 59 6d ab fe 01 72 2a 22 77 60 38 3c +e2 4d 4a 05 d8 b0 6e f5 b9 6f 11 7d 81 + +# Signature: +05 a9 5e 11 b5 bf b0 1d cf de 3e fa 9f 31 3d 81 +bb 0d fd 46 de 63 b0 65 80 56 c5 3a f7 ad 9e 89 +43 8b 7d e7 8f f8 ea 88 d0 72 b1 74 9a 52 9f 1c +c9 cf 2c f3 2e 5a b7 20 e0 69 b4 90 6d 28 2a 03 +dd 78 d1 b3 ca 2a 3f 92 5b f5 1c 74 91 b7 3b a0 +bf 54 d5 0d 97 1d e5 b2 77 26 d8 fb 3e e2 77 34 +97 df 35 49 51 7e ed cd 9d e6 8d 90 df 35 d3 f0 +50 81 15 1a da b5 39 73 85 ab ee a7 2b 69 bd 0d +e1 8d ce e9 a2 be 00 e9 1a 03 24 03 b1 f8 1b bc +0a e7 31 c6 c0 d9 cf dd 06 c3 31 ed 89 d7 de 1d +e1 df 46 cf 09 ce 53 df 15 97 fb 69 94 68 1c 7f +be 94 c9 b0 8e 50 aa 1b 12 41 96 02 98 7f 37 dd + +# PKCS#1 v1.5 Signature Example 14.19 + +# ----------------- + +# Message to be signed: +87 a6 45 61 1b b1 91 85 3f 4f d9 b7 40 b2 de 4c +16 3e 75 62 b1 17 62 63 3e 72 df b6 f6 be 7e fb +90 41 a9 65 82 94 3a b2 01 83 91 c0 5a df ab 46 +4d d6 e3 3f 96 0d db f3 b1 7a c6 2b b7 8a fc 1c +6a 45 39 6c 09 08 70 7c 62 36 12 55 cb f0 9b ad +95 9b 31 33 da 48 d5 32 ba 7e f1 d2 0f b6 57 2a +1f 0e d6 f2 c6 e1 be c1 b1 7c c3 19 ba f7 2a 19 +8a a0 01 b8 3d 4e 98 69 c3 40 90 f2 29 a9 c7 f1 +42 a7 4e 85 ab 3e d5 1c 69 ac 15 fa b4 ab e4 67 +15 73 cf 5a d2 b5 8e 78 a9 44 ed cc ea c5 ee 58 +bf ce 66 f4 0a ac 2a be 4e 5f a0 72 dd 0f 66 4f +ac 81 1a ef 08 42 10 e5 64 1b 9c d0 8c 87 24 f4 +b4 1e ed 1d 9d 4a 18 77 80 46 59 7b d1 a2 7b bb +c0 56 c1 5e 43 c0 38 ef 37 5b 43 5e 73 a7 d3 2f +01 50 16 b7 82 35 ce 75 a7 b7 62 04 99 68 e9 93 +22 53 e4 2c a9 76 c8 d8 dc a1 bb 2d bf + +# Signature: +b8 80 62 26 fb d3 d9 7b 79 f0 dd 1d 8c f9 a2 35 +e5 1b 94 b7 e2 23 ec 68 33 2d 68 6e d3 31 3e d1 +be f6 88 70 23 af 7a 5c 99 df 03 68 a3 49 c6 a5 +94 79 5b 62 35 36 10 13 42 69 0d eb 5f ad 90 23 +78 2f 6d be 16 43 a4 56 18 57 4f 16 72 81 12 a7 +e0 ef 9f 58 65 6f 6a db f4 00 40 9f 4a a5 01 3c +15 9a 36 8c a5 9b de 6b 39 18 df e1 d8 02 fa 6c +fa 06 c9 ca 31 ac a7 8c b2 63 c8 ed 91 7a f9 a9 +a7 95 d5 e2 c4 01 e7 29 96 4c f7 ac 28 cc db 36 +d9 59 ed 7f d9 af 1c 47 09 7b 62 55 c6 4e 1b 16 +f2 1d 86 87 04 55 d5 f0 bf 90 1f cc 68 c3 4b 72 +c1 be e7 2e 6b 8c 4e 36 ae 33 99 6c 7a 59 d0 9a + +# PKCS#1 v1.5 Signature Example 14.20 + +# ----------------- + +# Message to be signed: +03 2e 28 3e 59 6e 87 fa a6 cf cf b8 fa 04 df 6a +61 e6 11 df e7 3b bf 66 8e e6 7b 49 6b fb 0f fb +7f 9d c9 31 a9 8b ce db 25 + +# Signature: +b9 fd c0 3d c1 99 70 71 3c 4a 17 e8 7e 7e bb 5f +13 50 5d 59 cb b2 2b a7 2e 9f f1 6b df 8b 65 9c +33 30 a9 3d cc 09 2a 5d 38 5b 2d 5e 15 34 00 31 +46 c0 50 b7 dd c4 f7 56 56 9d a2 11 80 15 82 26 +61 19 f5 59 9b 1e 65 e8 eb ea 6b c9 64 42 ee 12 +ac b9 6c 6d ba 08 3e 92 10 94 da 9c 9e cf 5a fa +a5 4b 7f de 7a 0c ae 3f df e4 d2 51 93 3a 52 f0 +2d c2 3e 1b 32 14 c6 83 e1 9a f4 6e 18 c7 49 56 +dc 6a b3 50 2d 46 ca ac 3c b2 6b 70 7c dc 30 25 +b6 de 4e 83 54 3b 95 84 5b 4a 15 97 60 77 0a 4b +d0 9e 46 35 a0 4e 21 7d 66 5c 95 94 87 9f 38 1d +71 10 09 34 fa da 61 c7 cc 22 b8 d2 ff 8e b3 5a + +# ============================================= + +# Example 15: A 2048-bit RSA key pair +# ----------------------------------- + + +# Public key +# ---------- + +# Modulus: +df 27 1f d2 5f 86 44 49 6b 0c 81 be 4b d5 02 97 +ef 09 9b 00 2a 6f d6 77 27 eb 44 9c ea 56 6e d6 +a3 98 1a 71 31 2a 14 1c ab c9 81 5c 12 09 e3 20 +a2 5b 32 46 4e 99 99 f1 8c a1 3a 9f d3 89 25 58 +f9 e0 ad ef dd 36 50 dd 23 a3 f0 36 d6 0f e3 98 +84 37 06 a4 0b 0b 84 62 c8 be e3 bc e1 2f 1f 28 +60 c2 44 4c dc 6a 44 47 6a 75 ff 4a a2 42 73 cc +be 3b f8 02 48 46 5f 8f f8 c3 a7 f3 36 7d fc 0d +f5 b6 50 9a 4f 82 81 1c ed d8 1c da aa 73 c4 91 +da 41 21 70 d5 44 d4 ba 96 b9 7f 0a fc 80 65 49 +8d 3a 49 fd 91 09 92 a1 f0 72 5b e2 4f 46 5c fe +7e 0e ab f6 78 99 6c 50 bc 5e 75 24 ab f7 3f 15 +e5 be f7 d5 18 39 4e 31 38 ce 49 44 50 6a aa af +3f 9b 23 6d ca b8 fc 00 f8 7a f5 96 fd c3 d9 d6 +c7 5c d5 08 36 2f ae 2c be dd cc 4c 74 50 b1 7b +77 6c 07 9e cc a1 f2 56 35 1a 43 b9 7d be 21 53 + +# Exponent: +01 00 01 + +# Private key +# ----------- + +# Modulus: +df 27 1f d2 5f 86 44 49 6b 0c 81 be 4b d5 02 97 +ef 09 9b 00 2a 6f d6 77 27 eb 44 9c ea 56 6e d6 +a3 98 1a 71 31 2a 14 1c ab c9 81 5c 12 09 e3 20 +a2 5b 32 46 4e 99 99 f1 8c a1 3a 9f d3 89 25 58 +f9 e0 ad ef dd 36 50 dd 23 a3 f0 36 d6 0f e3 98 +84 37 06 a4 0b 0b 84 62 c8 be e3 bc e1 2f 1f 28 +60 c2 44 4c dc 6a 44 47 6a 75 ff 4a a2 42 73 cc +be 3b f8 02 48 46 5f 8f f8 c3 a7 f3 36 7d fc 0d +f5 b6 50 9a 4f 82 81 1c ed d8 1c da aa 73 c4 91 +da 41 21 70 d5 44 d4 ba 96 b9 7f 0a fc 80 65 49 +8d 3a 49 fd 91 09 92 a1 f0 72 5b e2 4f 46 5c fe +7e 0e ab f6 78 99 6c 50 bc 5e 75 24 ab f7 3f 15 +e5 be f7 d5 18 39 4e 31 38 ce 49 44 50 6a aa af +3f 9b 23 6d ca b8 fc 00 f8 7a f5 96 fd c3 d9 d6 +c7 5c d5 08 36 2f ae 2c be dd cc 4c 74 50 b1 7b +77 6c 07 9e cc a1 f2 56 35 1a 43 b9 7d be 21 53 + +# Public exponent: +01 00 01 + +# Exponent: +5b d9 10 25 78 30 dc e1 75 20 b0 34 41 a5 1a 8c +ab 94 02 0a c6 ec c2 52 c8 08 f3 74 3c 95 b7 c8 +3b 8c 8a f1 a5 01 43 46 eb c4 24 2c df b5 d7 18 +e3 0a 73 3e 71 f2 91 e4 d4 73 b6 1b fb a6 da ca +ed 0a 77 bd 1f 09 50 ae 3c 91 a8 f9 01 11 88 25 +89 e1 d6 27 65 ee 67 1e 7b ae ea 30 9f 64 d4 47 +bb cf a9 ea 12 dc e0 5e 9e a8 93 9b c5 fe 61 08 +58 12 79 c9 82 b3 08 79 4b 34 48 e7 f7 b9 52 29 +2d f8 8c 80 cb 40 14 2c 4b 5c f5 f8 dd aa 08 91 +67 8d 61 0e 58 2f cb 88 0f 0d 70 7c af 47 d0 9a +84 e1 4c a6 58 41 e5 a3 ab c5 e9 db a9 40 75 a9 +08 43 41 f0 ed ad 9b 68 e3 b8 e0 82 b8 0b 6e 6e +8a 05 47 b4 4f b5 06 1b 6a 91 31 60 3a 55 37 dd +ab d0 1d 8e 86 3d 89 22 e9 aa 3e 4b fa ea 0b 39 +d7 92 83 ad 2c bc 8a 59 cc e7 a6 ec f4 e4 c8 1e +d4 c6 59 1c 80 7d ef d7 1a b0 68 66 bb 5e 77 45 + +# Prime 1: +f4 4f 5e 42 46 39 1f 48 2b 2f 52 96 e3 60 2e b3 +4a a1 36 42 77 10 f7 c0 41 6d 40 3f d6 9d 4b 29 +13 0c fe be f3 4e 88 5a bd b1 a8 a0 a5 f0 e9 b5 +c3 3e 1f c3 bf c2 85 b1 ae 17 e4 0c c6 7a 19 13 +dd 56 37 19 81 5e ba f8 51 4c 2a 7a a0 01 8e 63 +b6 c6 31 dc 31 5a 46 23 57 16 42 3d 11 ff 58 03 +4e 61 06 45 70 36 06 91 9f 5c 7c e2 66 0c d1 48 +bd 9e fc 12 3d 9c 54 b6 70 55 90 d0 06 cf cf 3f + +# Prime 2: +e9 d4 98 41 e0 e0 a6 ad 0d 51 78 57 13 3e 36 dc +72 c1 bd d9 0f 91 74 b5 2e 26 57 0f 37 36 40 f1 +c1 85 e7 ea 8e 2e d7 f1 e4 eb b9 51 f7 0a 58 02 +36 33 b0 09 7a ec 67 c6 dc b8 00 fc 1a 67 f9 bb +05 63 61 0f 08 eb c8 74 6a d1 29 77 21 36 eb 1d +da f4 64 36 45 0d 31 83 32 a8 49 82 fe 5d 28 db +e5 b3 e9 12 40 7c 3e 0e 03 10 0d 87 d4 36 ee 40 +9e ec 1c f8 5e 80 ab a0 79 b2 e6 10 6b 97 bc ed + +# Prime exponent 1: +ed 10 2a cd b2 68 71 53 4d 1c 41 4e ca d9 a4 d7 +32 fe 95 b1 0e ea 37 0d a6 2f 05 de 2c 39 3b 1a +63 33 03 ea 74 1b 6b 32 69 c9 7f 70 4b 35 27 02 +c9 ae 79 92 2f 7b e8 d1 0d b6 7f 02 6a 81 45 de +41 b3 0c 0a 42 bf 92 3b ac 5f 75 04 c2 48 60 4b +9f aa 57 ed 6b 32 46 c6 ba 15 8e 36 c6 44 f8 b9 +54 8f cf 4f 07 e0 54 a5 6f 76 86 74 05 44 40 bc +0d cb bc 9b 52 8f 64 a0 17 06 e0 5b 0b 91 10 6f + +# Prime exponent 2: +68 27 92 4a 85 e8 8b 55 ba 00 f8 21 91 28 bd 37 +24 c6 b7 d1 df e5 62 9e f1 97 92 5f ec af f5 ed +b9 cd f3 a7 be fd 8e a2 e8 dd 37 07 13 8b 3f f8 +7c 3c 39 c5 7f 43 9e 56 2e 2a a8 05 a3 9d 7c d7 +99 66 d2 ec e7 84 5f 1d bc 16 be e9 99 99 e4 d0 +bf 9e ec a4 5f cd a8 a8 50 00 35 fe 6b 5f 03 bc +2f 6d 1b fc 4d 4d 0a 37 23 96 1a f0 cd ce 4a 01 +ee c8 2d 7f 54 58 ec 19 e7 1b 90 ee ef 7d ff 61 + +# Coefficient: +57 b7 38 88 d1 83 a9 9a 63 07 42 22 77 55 1a 3d +9e 18 ad f0 6a 91 e8 b5 5c ef fe f9 07 7c 84 96 +94 8e cb 3b 16 b7 81 55 cb 2a 3a 57 c1 19 d3 79 +95 1c 01 0a a6 35 ed cf 62 d8 4c 5a 12 2a 8d 67 +ab 5f a9 e5 a4 a8 77 2a 1e 94 3b af c7 0a e3 a4 +c1 f0 f3 a4 dd ff ae fd 18 92 c8 cb 33 bb 0d 0b +95 90 e9 63 a6 91 10 fb 34 db 7b 90 6f c4 ba 28 +36 99 5a ac 7e 52 74 90 ac 95 2a 02 26 8a 4f 18 + +# PKCS#1 v1.5 signing of 20 random messages +# ------------------------------------------------------- + +# PKCS#1 v1.5 Signature Example 15.1 + +# ----------------- + +# Message to be signed: +f4 5d 55 f3 55 51 e9 75 d6 a8 dc 7e a9 f4 88 59 +39 40 cc 75 69 4a 27 8f 27 e5 78 a1 63 d8 39 b3 +40 40 84 18 08 cf 9c 58 c9 b8 72 8b f5 f9 ce 8e +e8 11 ea 91 71 4f 47 ba b9 2d 0f 6d 5a 26 fc fe +ea 6c d9 3b 91 0c 0a 2c 96 3e 64 eb 18 23 f1 02 +75 3d 41 f0 33 59 10 ad 3a 97 71 04 f1 aa f6 c3 +74 27 16 a9 75 5d 11 b8 ee d6 90 47 7f 44 5c 5d +27 20 8b 2e 28 43 30 fa 3d 30 14 23 fa 7f 2d 08 +6e 0a d0 b8 92 b9 db 54 4e 45 6d 3f 0d ab 85 d9 +53 c1 2d 34 0a a8 73 ed a7 27 c8 a6 49 db 7f a6 +37 40 e2 5e 9a f1 53 3b 30 7e 61 32 99 93 11 0e +95 19 4e 03 93 99 c3 82 4d 24 c5 1f 22 b2 6b de +10 24 cd 39 59 58 a2 df eb 48 16 a6 e8 ad ed b5 +0b 1f 6b 56 d0 b3 06 0f f0 f1 c4 cb 0d 0e 00 1d +d5 9d 73 be 12 + +# Signature: +b7 5a 54 66 b6 5d 0f 30 0e f5 38 33 f2 17 5c 8a +34 7a 38 04 fc 63 45 1d c9 02 f0 b7 1f 90 83 45 +9e d3 7a 51 79 a3 b7 23 a5 3f 10 51 64 2d 77 37 +4c 4c 6c 8d bb 1c a2 05 25 f5 c9 f3 2d b7 76 95 +35 56 da 31 29 0e 22 19 74 82 ce b6 99 06 c4 6a +75 8f b0 e7 40 9b a8 01 07 7d 2a 0a 20 ea e7 d1 +d6 d3 92 ab 49 57 e8 6b 76 f0 65 2d 68 b8 39 88 +a7 8f 26 e1 11 72 ea 60 9b f8 49 fb bd 78 ad 7e +dc e2 1d e6 62 a0 81 36 8c 04 06 07 ce e2 9d b0 +62 72 27 f4 49 63 ad 17 1d 22 93 b6 33 a3 92 e3 +31 dc a5 4f e3 08 27 52 f4 3f 63 c1 61 b4 47 a4 +c6 5a 68 75 67 0d 5f 66 00 fc c8 60 a1 ca eb 0a +88 f8 fd ec 4e 56 43 98 a5 c4 6c 87 f6 8c e0 70 +01 f6 21 3a be 0a b5 62 5f 87 d1 90 25 f0 8d 81 +da c7 bd 45 86 bc 93 82 19 1f 6d 28 80 f6 22 7e +5d f3 ee d2 1e 77 92 d2 49 48 04 87 f3 65 52 61 + +# PKCS#1 v1.5 Signature Example 15.2 + +# ----------------- + +# Message to be signed: +c1 4b 4c 60 75 b2 f9 aa d6 61 de f4 ec fd 3c b9 +33 c6 23 f4 e6 3b f5 34 10 d2 f0 16 d1 ab 98 e2 +72 9e cc f8 00 6c d8 e0 80 50 73 7d 95 fd bf 29 +6b 66 f5 b9 79 2a 90 29 36 c4 f7 ac 69 f5 14 53 +ce 43 69 45 2d c2 2d 96 f0 37 74 81 14 66 20 00 +dd 9c d3 a5 e1 79 f4 e0 f8 1f a6 a0 31 1c a1 ae +e6 51 9a 0f 63 ce c7 8d 27 bb 72 63 93 fb 7f 1f +88 cd e7 c9 7f 8a 66 cd 66 30 12 81 da c3 f3 a4 +33 24 8c 75 d6 c2 dc d7 08 b6 a9 7b 0a 3f 32 5e +0b 29 64 f8 a5 81 9e 47 9b + +# Signature: +af a7 34 34 62 be a1 22 cc 14 9f ca 70 ab da e7 +94 46 67 7d b5 37 36 66 af 7d c3 13 01 5f 4d e7 +86 e6 e3 94 94 6f ad 3c c0 e2 b0 2b ed ba 50 47 +fe 9e 2d 7d 09 97 05 e4 a3 9f 28 68 32 79 cf 0a +c8 5c 15 30 41 22 42 c0 e9 18 95 3b e0 00 e9 39 +cf 3b f1 82 52 5e 19 93 70 fa 79 07 eb a6 9d 5d +b4 63 10 17 c0 e3 6d f7 03 79 b5 db 8d 4c 69 5a +97 9a 8e 61 73 22 40 65 d7 dc 15 13 2e f2 8c d8 +22 79 51 63 06 3b 54 c6 51 14 1b e8 6d 36 e3 67 +35 bc 61 f3 1f ca 57 4e 53 09 f3 a3 bb df 91 ef +f1 2b 99 e9 cc 17 44 f1 ee 9a 1b d2 2c 5b ad 96 +ad 48 19 29 25 1f 03 43 fd 36 bc f0 ac de 7f 11 +e5 ad 60 97 77 21 20 27 96 fe 06 1f 9a da 1f c4 +c8 e0 0d 60 22 a8 35 75 85 ff e9 fd d5 93 31 a2 +8c 4a a3 12 15 88 fb 6c f6 83 96 d8 ac 05 46 59 +95 00 c9 70 85 00 a5 97 2b d5 4f 72 cf 8d b0 c8 + +# PKCS#1 v1.5 Signature Example 15.3 + +# ----------------- + +# Message to be signed: +d0 23 71 ad 7e e4 8b bf db 27 63 de 7a 84 3b 94 +08 ce 5e b5 ab f8 47 ca 3d 73 59 86 df 84 e9 06 +0b db cd d3 a5 5b a5 5d de 20 d4 76 1e 1a 21 d2 +25 c1 a1 86 f4 ac 4b 30 19 d3 ad f7 8f e6 33 46 +67 f5 6f 70 c9 01 a0 a2 70 0c 6f 0d 56 ad d7 19 +59 2d c8 8f 6d 23 06 c7 00 9f 6e 7a 63 5b 4c b3 +a5 02 df e6 8d dc 58 d0 3b e1 0a 11 70 00 4f e7 +4d d3 e4 6b 82 59 1f f7 54 14 f0 c4 a0 3e 60 5e +20 52 4f 24 16 f1 2e ca 58 9f 11 1b 75 d6 39 c6 +1b aa 80 ca fd 05 cf 35 00 24 4a 21 9e d9 ce d9 +f0 b1 02 97 18 2b 65 3b 52 6f 40 0f 29 53 ba 21 +4d 5b cd 47 88 41 32 87 2a e9 0d 4d 6b 1f 42 15 +39 f9 f3 46 62 a5 6d c0 e7 b4 b9 23 b6 23 1e 30 +d2 67 67 97 81 7f 7c 33 7b 5a c8 24 ba 93 14 3b +33 81 fa 3d ce 0e 6a eb d3 8e 67 73 51 87 b1 eb +d9 5c 02 + +# Signature: +3b ac 63 f8 6e 3b 70 27 12 03 10 6b 9c 79 aa bd +9f 47 7c 56 e4 ee 58 a4 fc e5 ba f2 ca b4 96 0f +88 39 1c 9c 23 69 8b e7 5c 99 ae df 9e 1a bf 17 +05 be 1d ac 33 14 0a db 48 eb 31 f4 50 bb 9e fe +83 b7 b9 0d b7 f1 57 6d 33 f4 0c 1c ba 4b 8d 6b +1d 33 23 56 4b 0f 17 74 11 4f a7 c0 8e 6d 1e 20 +dd 8f bb a9 b6 ac 7a d4 1e 26 b4 56 8f 4a 8a ac +bf d1 78 a8 f8 d2 c9 d5 f5 b8 81 12 93 5a 8b c9 +ae 32 cd a4 0b 8d 20 37 55 10 73 50 96 53 68 18 +ce 2b 2d b7 1a 97 72 c9 b0 dd a0 9a e1 01 52 fa +11 46 62 18 d0 91 b5 3d 92 54 30 61 b7 29 4a 55 +be 82 ff 35 d5 c3 2f a2 33 f0 5a aa c7 58 50 30 +7e cf 81 38 3c 11 16 74 39 7b 1a 1b 9d 3b f7 61 +2c cb e5 ba cd 2b 38 f0 a9 83 97 b2 4c 83 65 8f +b6 c0 b4 14 0e f1 19 70 c4 63 0d 44 34 4e 76 ea +ed 74 dc be e8 11 db f6 57 59 41 f0 8a 65 23 b8 + +# PKCS#1 v1.5 Signature Example 15.4 + +# ----------------- + +# Message to be signed: +29 03 55 84 ab 7e 02 26 a9 ec 4b 02 e8 dc f1 27 +2d c9 a4 1d 73 e2 82 00 07 b0 f6 e2 1f ec cd 5b +d9 db b9 ef 88 cd 67 58 76 9e e1 f9 56 da 7a d1 +84 41 de 6f ab 83 86 db c6 93 + +# Signature: +28 d8 e3 fc d5 dd db 21 ff bd 8d f1 63 0d 73 77 +aa 26 51 e1 4c ad 1c 0e 43 cc c5 2f 90 7f 94 6d +66 de 72 54 e2 7a 6c 19 0e b0 22 ee 89 ec f6 22 +4b 09 7b 71 06 8c d6 07 28 a1 ae d6 4b 80 e5 45 +7b d3 10 6d d9 17 06 c9 37 c9 79 5f 2b 36 36 7f +f1 53 dc 25 19 a8 db 9b df 2c 80 74 30 c4 51 de +17 bb cd 0c e7 82 b3 e8 f1 02 4d 90 62 4d ea 7f +1e ed c7 42 0b 7e 7c aa 65 77 ce f4 31 41 a7 26 +42 06 58 0e 44 a1 67 df 5e 41 ee a0 e6 9a 80 54 +54 c4 0e ef c1 3f 48 e4 23 d7 a3 2d 02 ed 42 c0 +ab 03 d0 a7 cf 70 c5 86 0a c9 2e 03 ee 00 5b 60 +ff 35 03 42 4b 98 cc 89 45 68 c7 c5 6a 02 33 55 +1c eb e5 88 cf 8b 01 67 b7 df 13 ad ca d8 28 67 +68 10 49 9c 70 4d a7 ae 23 41 4d 69 e3 c0 d2 db +5d cb c2 61 3b c1 20 42 1f 9e 36 53 c5 a8 76 72 +97 64 3c 7e 07 40 de 01 63 55 45 3d 6c 95 ae 72 + +# PKCS#1 v1.5 Signature Example 15.5 + +# ----------------- + +# Message to be signed: +bd a3 a1 c7 90 59 ea e5 98 30 8d 3d f6 09 + +# Signature: +a1 56 17 6c b9 67 77 c7 fb 96 10 5d bd 91 3b c4 +f7 40 54 f6 80 7c 60 08 a1 a9 56 ea 92 c1 f8 1c +b8 97 dc 4b 92 ef 9f 4e 40 66 8d c7 c5 56 90 1a +cb 6c f2 69 fe 61 5b 0f b7 2b 30 a5 13 38 69 23 +14 b0 e5 87 8a 88 c2 c7 77 4b d1 69 39 b5 ab d8 +2b 44 29 d6 7b d7 ac 8e 5e a7 fe 92 4e 20 a6 ec +66 22 91 f2 54 8d 73 4f 66 34 86 8b 03 9a a5 f9 +d4 d9 06 b2 d0 cb 85 85 bf 42 85 47 af c9 1c 6e +20 52 dd cd 00 1c 3e f8 c8 ee fc 3b 6b 2a 82 b6 +f9 c8 8c 56 f2 e2 c3 cb 0b e4 b8 0d a9 5e ba 37 +1d 8b 5f 60 f9 25 38 74 3d db b5 da 29 72 c7 1f +e7 b9 f1 b7 90 26 8a 0e 77 0f c5 eb 4d 5d d8 52 +47 d4 8a e2 ec 3f 26 25 5a 39 85 52 02 06 a1 f2 +68 e4 83 e9 db b1 d5 ca b1 90 91 76 06 de 31 e7 +c5 18 2d 8f 15 1b f4 1d fe cc ae d7 cd e6 90 b2 +16 47 10 6b 49 0c 72 9d 54 a8 fe 28 02 a6 d1 26 + +# PKCS#1 v1.5 Signature Example 15.6 + +# ----------------- + +# Message to be signed: +c1 87 91 5e 4e 87 da 81 c0 8e d4 35 6a 0c ce ac +1c 4f b5 c0 46 b4 52 81 b3 87 ec 28 f1 ab fd 56 +7e 54 6b 23 6b 37 d0 1a e7 1d 3b 28 34 36 5d 3d +f3 80 b7 50 61 b7 36 b0 13 0b 07 0b e5 8a e8 a4 +6d 12 16 63 61 b6 13 db c4 7d fa eb 4c a7 46 45 +6c 2e 88 83 85 52 5c ca 9d d1 c3 c7 a9 ad a7 6d +6c + +# Signature: +9c ab 74 16 36 08 66 9f 75 55 a3 33 cf 19 6f e3 +a0 e9 e5 eb 1a 32 d3 4b b5 c8 5f f6 89 aa ab 0e +3e 65 66 8e d3 b1 15 3f 94 eb 3d 8b e3 79 b8 ee +f0 07 c4 a0 2c 70 71 ce 30 d8 bb 34 1e 58 c6 20 +f7 3d 37 b4 ec bf 48 be 29 4f 6c 9e 0e cb 5e 63 +fe c4 1f 12 0e 55 53 df a0 eb eb bb 72 64 0a 95 +37 ba dc b4 51 33 02 29 d9 f7 10 f6 2e 3e d8 ec +78 4e 50 ee 1d 92 62 b4 26 71 34 00 11 d7 d0 98 +c6 f2 55 7b 21 31 fa 9b d0 25 46 36 59 7e 88 ec +b3 5a 24 0e f0 fd 85 95 71 24 df 80 80 fe e1 e1 +49 af 93 99 89 e8 6b 26 c8 5a 58 81 fa e8 67 3d +9f d4 08 00 dd 13 4e b9 bd b6 41 0f 42 0b 0a a9 +7b 20 ef cf 2e b0 c8 07 fa eb 83 a3 cc d9 b5 1d +45 53 e4 1d fc 0d f6 ca 80 a1 e8 1d c2 34 bb 83 +89 dd 19 5a 38 b4 2d e4 ed c4 9d 34 64 78 b9 f1 +1f 05 57 20 5f 5b 0b d7 ff e9 c8 50 f3 96 d7 c4 + +# PKCS#1 v1.5 Signature Example 15.7 + +# ----------------- + +# Message to be signed: +ab fa 2e cb 7d 29 bd 5b cb 99 31 ce 2b ad 2f 74 +38 3e 95 68 3c ee 11 02 2f 08 e8 e7 d0 b8 fa 05 +8b f9 eb 7e b5 f9 88 68 b5 bb 1f b5 c3 1c ed a3 +a6 4f 1a 12 cd f2 0f cd 0e 5a 24 6d 7a 17 73 d8 +db a0 e3 b2 77 54 5b ab e5 8f 2b 96 e3 f4 ed c1 +8e ab f5 cd 2a 56 0f ca 75 fe 96 e0 7d 85 9d ef +b2 56 4f 3a 34 f1 6f 11 e9 1b 3a 71 7b 41 af 53 +f6 60 53 23 00 1a a4 06 c6 + +# Signature: +c4 b4 37 bc f7 03 f3 52 e1 fa f7 4e b9 62 20 39 +42 6b 56 72 ca f2 a7 b3 81 c6 c4 f0 19 1e 7e 4a +98 f0 ee bc d6 f4 17 84 c2 53 7f f0 f9 9e 74 98 +2c 87 20 1b fb c6 5e ae 83 2d b7 1d 16 da ca db +09 77 e5 c5 04 67 9e 40 be 0f 9d b0 6f fd 84 8d +d2 e5 c3 8a 7e c0 21 e7 f6 8c 47 df d3 8c c3 54 +49 3d 53 39 b4 59 5a 5b f3 1e 3f 8f 13 81 68 07 +37 3d f6 ad 0d c7 e7 31 e5 1a d1 9e b4 75 4b 13 +44 85 84 2f e7 09 d3 78 44 4d 8e 36 b1 72 4a 4f +da 21 ca fe e6 53 ab 80 74 7f 79 52 ee 80 4d ea +b1 03 9d 84 13 99 45 bb f4 be 82 00 87 53 f3 c5 +4c 78 21 a1 d2 41 f4 21 79 c7 94 ef 70 42 bb f9 +95 56 56 22 2e 45 c3 43 69 a3 84 69 7b 6a e7 42 +e1 8f a5 ca 7a ba d2 7d 9f e7 10 52 e3 31 0d 0f +52 c8 d1 2e a3 3b f0 53 a3 00 f4 af c4 f0 98 df +4e 6d 88 67 79 d6 45 94 d3 69 15 8f db c1 f6 94 + +# PKCS#1 v1.5 Signature Example 15.8 + +# ----------------- + +# Message to be signed: +df 40 44 a8 9a 83 e9 fc bf 12 62 54 0a e3 03 8b +bc 90 f2 b2 62 8b f2 a4 46 7a c6 77 22 d8 54 6b +3a 71 cb 0e a4 16 69 d5 b4 d6 18 59 c1 b4 e4 7c +ec c5 93 3f 75 7e c8 6d b0 64 4e 31 18 12 d0 0f +b8 02 f0 34 00 63 9c 0e 36 4d ae 5a eb c5 79 1b +c6 55 76 23 61 bc 43 c5 3d 3c 78 86 76 8f 79 68 +c1 c5 44 c6 f7 9f 7b e8 20 c7 e2 bd 2f 9d 73 e6 +2d ed 6d 2e 93 7e 6a 6d ae f9 0e e3 7a 1a 52 a5 +4f 00 e3 1a dd d6 48 94 cf 4c 02 e1 60 99 e2 9f +9e b7 f1 a7 bb 7f 84 c4 7a 2b 59 48 13 be 02 a1 +7b 7f c4 3b 34 c2 2c 91 92 52 64 12 6c 89 f8 6b +b4 d8 7f 3e f1 31 29 6c 53 a3 08 e0 33 1d ac 8b +af 3b 63 42 22 66 ec ef 2b 90 78 15 35 db da 41 +cb d0 cf 22 a8 cb fb 53 2e c6 8f c6 af b2 ac 06 + +# Signature: +14 14 b3 85 67 ae 6d 97 3e de 4a 06 84 2d cc 0e +05 59 b1 9e 65 a4 88 9b db ab d0 fd 02 80 68 29 +13 ba cd 5d c2 f0 1b 30 bb 19 eb 81 0b 7d 9d ed +32 b2 84 f1 47 bb e7 71 c9 30 c6 05 2a a7 34 13 +90 a8 49 f8 1d a9 cd 11 e5 ec cf 24 6d ba e9 5f +a9 58 28 e9 ae 0c a3 55 03 25 32 6d ee f9 f4 95 +30 ba 44 1b ed 4a c2 9c 02 9c 9a 27 36 b1 a4 19 +0b 85 08 4a d1 50 42 6b 46 d7 f8 5b d7 02 f4 8d +ac 5f 71 33 0b c4 23 a7 66 c6 5c c1 dc ab 20 d3 +d3 bb a7 2b 63 b3 ef 82 44 d4 2f 15 7c b7 e3 a8 +ba 5c 05 27 2c 64 cc 1a d2 1a 13 49 3c 39 11 f6 +0b 4e 9f 4e cc 99 00 eb 05 6e e5 9d 6f e4 b8 ff +6e 80 48 cc c0 f3 8f 28 36 fd 3d fe 91 bf 4a 38 +6e 1e cc 2c 32 83 9f 0c a4 d1 b2 7a 56 8f a9 40 +dd 64 ad 16 bd 01 25 d0 34 8e 38 30 85 f0 88 94 +86 1c a1 89 87 22 7d 37 b4 2b 58 4a 83 57 cb 04 + +# PKCS#1 v1.5 Signature Example 15.9 + +# ----------------- + +# Message to be signed: +ea 94 1f f0 6f 86 c2 26 92 7f cf 0e 3b 11 b0 87 +26 76 17 0c 1b fc 33 bd a8 e2 65 c7 77 71 f9 d0 +85 01 64 a5 ee cb cc 5c e8 27 fb fa 07 c8 52 14 +79 6d 81 27 e8 ca a8 18 94 ea 61 ce b1 44 9e 72 +fe a0 a4 c9 43 b2 da 6d 9b 10 5f e0 53 b9 03 9a +9c c5 3d 42 0b 75 39 fa b2 23 9c 6b 51 d1 7e 69 +4c 95 7d 4b 0f 09 84 46 18 79 a0 75 9c 44 01 be +ec d4 c6 06 a0 af bd 7a 07 6f 50 a2 df c2 80 7f +24 f1 91 9b aa 77 46 d3 a6 4e 26 8e d3 f5 f8 e6 +da 83 a2 a5 c9 15 2f 83 7c b0 78 12 bd 5b a7 d3 +a0 79 85 de 88 11 3c 17 96 e9 b4 66 ec 29 9c 5a +c1 05 9e 27 f0 94 15 + +# Signature: +ce eb 84 cc b4 e9 09 92 65 65 07 21 ee a0 e8 ec +89 ca 25 bd 35 4d 4f 64 56 49 67 be 9d 4b 08 b3 +f1 c0 18 53 9c 9d 37 1c f8 96 1f 22 91 fb e0 dc +2f 2f 95 fe a4 7b 63 9f 1e 12 f4 bc 38 1c ef 0c +2b 7a 7b 95 c3 ad f2 76 05 b7 f6 39 98 c3 cb ad +54 28 08 c3 82 2e 06 4d 4a d1 40 93 67 9e 6e 01 +41 8a 6d 5c 05 96 84 cd 56 e3 4e d6 5a b6 05 b8 +de 4f cf a6 40 47 4a 54 a8 25 1b bb 73 26 a4 2d +08 58 5c fc fc 95 67 69 b1 5b 6d 7f df 7d a8 4f +81 97 6e aa 41 d6 92 38 0f f1 0e ae cf e0 a5 79 +68 29 09 b5 52 1f ad e8 54 d7 97 b8 a0 34 5b 9a +86 4e 05 88 f6 ca dd bf 65 f1 77 99 8e 18 0d 1f +10 24 43 e6 dc a5 3a 94 82 3c aa 9c 3b 35 f3 22 +58 3c 70 3a f6 74 76 15 9e c7 ec 93 d1 76 9b 30 +0a f0 e7 15 7d c2 98 c6 cd 2d ee 22 62 f8 cd dc +10 f1 1e 01 74 14 71 bb fd 65 18 a1 75 73 45 75 + +# PKCS#1 v1.5 Signature Example 15.10 + +# ----------------- + +# Message to be signed: +d8 b8 16 45 c1 3c d7 ec f5 d0 0e d2 c9 1b 9a cd +46 c1 55 68 e5 30 3c 4a 97 75 ed e7 6b 48 40 3d +6b e5 6c 05 b6 b1 cf 77 c6 e7 5d e0 96 c5 cb 35 +51 cb 6f a9 64 f3 c8 79 cf 58 9d 28 e1 da 2f 9d +ec + +# Signature: +27 45 07 4c a9 71 75 d9 92 e2 b4 47 91 c3 23 c5 +71 67 16 5c dd 8d a5 79 cd ef 46 86 b9 bb 40 4b +d3 6a 56 50 4e b1 fd 77 0f 60 bf a1 88 a7 b2 4b +0c 91 e8 81 c2 4e 35 b0 4d c4 dd 4c e3 85 66 bc +c9 ce 54 f4 9a 17 5f c9 d0 b2 25 22 d9 57 90 47 +f9 ed 42 ec a8 3f 76 4a 10 16 39 97 94 7e 7d 2b +52 ff 08 98 0e 7e 7c 22 57 93 7b 23 f3 d2 79 d4 +cd 17 d6 f4 95 54 63 73 d9 83 d5 36 ef d7 d1 b6 +71 81 ca 2c b5 0a c6 16 c5 c7 ab fb b9 26 0b 91 +b1 a3 8e 47 24 20 01 ff 45 2f 8d e1 0c a6 ea ea +dc af 9e dc 28 95 6f 28 a7 11 29 1f c9 a8 08 78 +b8 ba 4c fe 25 b8 28 1c b8 0b c9 cd 6d 2b d1 82 +52 46 ee be 25 2d 99 57 ef 93 70 73 52 08 4e 6d +36 d4 23 55 1b f2 66 a8 53 40 fb 4a 6a f3 70 88 +0a ab 07 15 3d 01 f4 8d 08 6d f0 bf be c0 5e 7b +44 3b 97 e7 17 18 97 0e 2f 4b f6 20 23 e9 5b 67 + +# PKCS#1 v1.5 Signature Example 15.11 + +# ----------------- + +# Message to be signed: +e5 73 9b 6c 14 c9 2d 51 0d 95 b8 26 93 33 37 ff +0d 24 ef 72 1a c4 ef 64 c2 ba d2 64 be 8b 44 ef +a1 51 6e 08 a2 7e b6 b6 11 d3 30 1d f0 06 2d ae +fc 73 a8 c0 d9 2e 2c 52 1f ac bc 7b 26 47 38 76 +7e a6 fc 97 d5 88 a0 ba f6 ce 50 ad f7 9e 60 0b +d2 9e 34 5f cb 1d ba 71 ac 5c 02 89 02 3f e4 a8 +2b 46 a5 40 77 19 19 7d 2e 95 8e 35 31 fd 54 ae +f9 03 aa bb 43 55 f8 83 18 99 4e d3 c3 dd 62 f4 +20 a7 + +# Signature: +be 40 a5 fb 94 f1 13 e1 b3 ef f6 b6 a3 39 86 f2 +02 e3 63 f0 74 83 b7 92 e6 8d fa 55 54 df 04 66 +cc 32 15 09 50 78 3b 4d 96 8b 63 9a 04 fd 2f b9 +7f 6e b9 67 02 1f 5a dc cb 9f ca 95 ac c8 f2 cd +88 5a 38 0b 0a 4e 82 bc 76 07 64 db ab 88 c1 e6 +c0 25 5c aa 94 f2 32 19 9d 6f 59 7c c9 14 5b 00 +e3 d4 ba 34 6b 55 9a 88 33 ad 15 16 ad 51 63 f0 +16 af 6a 59 83 1c 82 ea 13 c8 22 4d 84 d0 76 5a +9d 12 38 4d a4 60 a8 53 1b 4c 40 7e 04 f4 f3 50 +70 9e b9 f0 8f 5b 22 0f fb 45 ab f6 b7 5d 15 79 +fd 3f 1e b5 5f c7 5b 00 af 8b a3 b0 87 82 7f e9 +ae 9f b4 f6 c5 fa 63 03 1f e5 82 85 2f e2 83 4f +9c 89 bf f5 3e 25 52 21 6b c7 c1 d4 a3 d5 dc 2b +a6 95 5c d9 b1 7d 13 63 e7 fe e8 ed 76 29 75 3f +f3 12 5e dd 48 52 1a e3 b9 b0 32 17 f4 49 6d 0d +8e de 57 ac bc 5b d4 de ae 74 a5 6f 86 67 1d e2 + +# PKCS#1 v1.5 Signature Example 15.12 + +# ----------------- + +# Message to be signed: +7a f4 28 35 91 7a 88 d6 b3 c6 71 6b a2 f5 b0 d5 +b2 0b d4 e2 e6 e5 74 e0 6a f1 ee f7 c8 11 31 be +22 bf 81 28 b9 cb c6 ec 00 27 5b a8 02 94 a5 d1 +17 2d 08 24 a7 9e 8f dd 83 01 83 e4 c0 0b 96 78 +28 67 b1 22 7f ea 24 9a ad 32 ff c5 fe 00 7b c5 +1f 21 79 2f 72 8d ed a8 b5 70 8a a9 9c ab ab 20 +a4 aa 78 3e d8 6f 0f 27 b5 d5 63 f4 2e 07 15 8c +ea 72 d0 97 aa 68 87 ec 41 1d d0 12 91 2a 5e 03 +2b bf a6 78 50 71 44 bc c9 5f 39 b5 8b e7 bf d1 +75 9a db 9a 91 fa 1d 6d 82 26 a8 34 3a 8b 84 9d +ae 76 f7 b9 82 24 d5 9e 28 f7 81 f1 3e ce 60 5f +84 f6 c9 0b ae 5f 8c f3 78 81 6f 40 20 a7 dd a1 +be d9 0c 92 a2 36 34 d2 03 fa c3 fc d8 6d 68 d3 +18 2a 7d 9c ca be 7b 07 95 f5 c6 55 e9 ac c4 e3 +ec 18 51 40 d1 0c ef 05 34 64 ab 17 5c 83 bd 83 +93 5e 3d ab af 34 62 ee be 63 d1 5f 57 3d 26 9a + +# Signature: +4e 78 c5 90 2b 80 79 14 d1 2f a5 37 ae 68 71 c8 +6d b8 02 1e 55 d1 ad b8 eb 0c cf 1b 8f 36 ab 7d +ad 1f 68 2e 94 7a 62 70 72 f0 3e 62 73 71 78 1d +33 22 1d 17 4a be 46 0d bd 88 56 0c 22 f6 90 11 +6e 2f bb e6 e9 64 36 3a 3e 52 83 bb 5d 94 6e f1 +c0 04 7e ba 03 8c 75 6c 40 be 79 23 05 58 09 b0 +e9 f3 4a 03 a5 88 15 eb dd e7 67 93 1f 01 8f 6f +18 78 f2 ef 4f 47 dd 37 40 51 dd 48 68 5d ed 6e +fb 3e a8 02 1f 44 be 1d 7d 14 93 98 f9 8e a9 c0 +8d 62 88 8e bb 56 19 2d 17 74 7b 6b 8e 17 09 54 +31 f1 25 a8 a8 e9 96 2a a3 1c 28 52 64 e0 8f b2 +1a ac 33 6c e6 c3 8a a3 75 e4 2b c9 2a b0 ab 91 +03 84 31 e1 f9 2c 39 d2 af 5d ed 7e 43 bc 15 1e +6e be a4 c3 e2 58 3a f3 43 7e 82 c4 3c 5e 3b 5b +07 cf 03 59 68 3d 22 98 e3 59 48 ed 80 6c 06 3c +60 6e a1 78 15 0b 1e fc 15 85 69 34 c7 25 5c fe + +# PKCS#1 v1.5 Signature Example 15.13 + +# ----------------- + +# Message to be signed: +eb ae f3 f9 f2 3b df e5 fa 6b 8a f4 c2 08 c1 89 +f2 25 1b f3 2f 5f 13 7b 9d e4 40 63 78 68 6b 3f +07 21 f6 2d 24 cb 86 88 d6 fc 41 a2 7c ba e2 1d +30 e4 29 fe ac c7 11 19 41 c2 77 + +# Signature: +c4 8d be f5 07 11 4f 03 c9 5f af be b4 df 1b fa +88 e0 18 4a 33 cc 4f 8a 9a 10 35 ff 7f 82 2a 5e +38 cd a1 87 23 91 5f f0 78 24 44 29 e0 f6 08 1c +14 fd 83 33 1f a6 5c 6b a7 bb 9a 12 db f6 62 23 +74 cd 0c a5 7d e3 77 4e 2b d7 ae 82 36 77 d0 61 +d5 3a e9 c4 04 0d 2d a7 ef 70 14 f3 bb dc 95 a3 +61 a4 38 55 c8 ce 9b 97 ec ab ce 17 4d 92 62 85 +14 2b 53 4a 30 87 f9 f4 ef 74 51 1e c7 42 b0 d5 +68 56 03 fa f4 03 b5 07 2b 98 5d f4 6a df 2d 25 +29 a0 2d 40 71 1e 21 90 91 70 52 37 1b 79 b7 49 +b8 3a bf 0a e2 94 86 c3 f2 f6 24 77 b2 bd 36 2b +03 9c 01 3c 0c 50 76 ef 52 0d bb 40 5f 42 ce e9 +54 25 c3 73 a9 75 e1 cd d0 32 c4 96 22 c8 50 79 +b0 9e 88 da b2 b1 39 69 ef 7a 72 39 73 78 10 40 +45 9f 57 d5 01 36 38 48 3d e2 d9 1c b3 c4 90 da +81 c4 6d e6 cd 76 ea 8a 0c 8f 6f e3 31 71 2d 24 + +# PKCS#1 v1.5 Signature Example 15.14 + +# ----------------- + +# Message to be signed: +c5 a2 71 12 78 76 1d fc dd 4f 0c 99 e6 f5 61 9d +6c 48 b5 d4 c1 a8 09 82 fa a6 b4 cf 1c f7 a6 0f +f3 27 ab ef 93 c8 01 42 9e fd e0 86 40 85 81 46 +10 56 ac c3 3f 3d 04 f5 ad a2 12 16 ca cd 5f d1 +f9 ed 83 20 3e 0e 2f e6 13 8e 3e ae 84 24 e5 91 +5a 08 3f 3f 7a b7 60 52 c8 be 55 ae 88 2d 6e c1 +48 2b 1e 45 c5 da e9 f4 10 15 40 53 27 02 2e c3 +2f 0e a2 42 97 63 b2 55 04 3b 19 58 ee 3c f6 d6 +39 83 59 6e b3 85 84 4f 85 28 cc 9a 98 65 83 5d +c5 11 3c 02 b8 0d 0f ca 68 aa 25 e7 2b ca ae b3 +cf 9d 79 d8 4f 98 4f d4 17 + +# Signature: +6b d5 25 7a a0 66 11 fb 46 60 08 7c b4 bc 4a 9e +44 91 59 d3 16 52 bd 98 08 44 da f3 b1 c7 b3 53 +f8 e5 61 42 f7 ea 98 57 43 3b 18 57 3b 4d ee de +81 8a 93 b0 29 02 97 78 3f 1a 2f 23 cb c7 27 97 +a6 72 53 7f 01 f6 24 84 cd 41 62 c3 21 4b 9a c6 +28 22 4c 5d e0 1f 32 bb 9b 76 b2 73 54 f2 b1 51 +d0 e8 c4 21 3e 46 15 ad 0b c7 1f 51 5e 30 0d 6a +64 c6 74 34 11 ff fd e8 e5 ff 19 0e 54 92 30 43 +12 6e cf c4 c4 53 90 22 66 8f b6 75 f2 5c 07 e2 +00 99 ee 31 5b 98 d6 af ec 4b 1a 9a 93 dc 33 49 +6a 15 bd 6f de 16 63 a7 d4 9b 9f 1e 63 9d 38 66 +4b 37 a0 10 b1 f3 5e 65 86 82 d9 cd 63 e5 7d e0 +f1 5e 8b dd 09 65 58 f0 7e c0 ca a2 18 a8 c0 6f +47 88 45 39 40 28 7c 9d 34 b6 d4 0a 3f 09 bf 77 +99 fe 98 ae 4e b4 9f 3f f4 1c 50 40 a5 0c ef c9 +bd f2 39 4b 74 9c f1 64 48 0d f1 ab 68 80 27 3b + +# PKCS#1 v1.5 Signature Example 15.15 + +# ----------------- + +# Message to be signed: +9b f8 aa 25 3b 87 2e a7 7a 7e 23 47 6b e2 6b 23 +29 57 8c f6 ac 9e a2 80 5b 35 7f 6f c3 ad 13 0d +ba eb 3d 86 9a 13 cc e7 a8 08 bb bb c9 69 85 7e +03 94 5c 7b b6 1d f1 b5 c2 58 9b 8e 04 6c 2a 5d +7e 40 57 b1 a7 4f 24 c7 11 21 63 64 28 85 29 ec +95 70 f2 51 97 21 3b e1 f5 c2 e5 96 f8 bf 8b 2c +f3 cb 38 aa 56 ff e5 e3 1d f7 39 58 20 e9 4e cf +3b 11 89 a9 65 dc f9 a9 cb 42 98 d3 c8 8b 29 23 +c1 9f c6 bc 34 aa ce ca d4 e0 93 1a 7c 4e 5d 73 +dc 86 df a7 98 a8 47 6d 82 46 3e ef aa 90 a8 a9 +19 2a b0 8b 23 08 8d d5 8e 12 80 f7 d7 2e 45 48 +39 6b aa c1 12 25 2d d5 c5 34 6a db 20 04 a2 f7 +10 1c cc 89 9c c7 fa fa e8 bb e2 95 73 88 96 a5 +b2 01 22 85 01 4e f6 + +# Signature: +27 f7 f4 da 9b d6 10 10 6e f5 7d 32 38 3a 44 8a +8a 62 45 c8 3d c1 30 9c 6d 77 0d 35 7b a8 9e 73 +f2 ad 08 32 06 2e b0 fe 0a c9 15 57 5b cd 6b 8b +ca db 4e 2b a6 fa 9d a7 3a 59 17 51 52 b2 d4 fe +72 b0 70 c9 b7 37 9e 50 00 0e 55 e6 c2 69 f6 65 +8c 93 79 72 79 7d 3a dd 69 f1 30 e3 4b 85 bd ec +9f 3a 9b 39 22 02 d6 f3 e4 30 d0 9c ac a8 22 77 +59 ab 82 5f 70 12 d2 ff 4b 5b 62 c8 50 4d ba d8 +55 c0 5e dd 5c ab 5a 4c cc dc 67 f0 1d d6 51 7c +7d 41 c4 3e 2a 49 57 af f1 9d b6 f1 8b 17 85 9a +f0 bc 84 ab 67 14 6e c1 a4 a6 0a 17 d7 e0 5f 8b +4f 9c ed 6a d1 09 08 d8 d7 8f 7f c8 8b 76 ad c8 +29 0f 87 da f2 a7 be 10 ae 40 85 21 39 5d 54 ed +25 56 fb 76 61 85 4a 73 0c e3 d8 2c 71 a8 d4 93 +ec 49 a3 78 ac 8a 3c 74 43 9f 7c c5 55 ba 13 f8 +59 07 08 90 ee 18 ff 65 8f a4 d7 41 96 9d 70 a5 + +# PKCS#1 v1.5 Signature Example 15.16 + +# ----------------- + +# Message to be signed: +32 47 48 30 e2 20 37 54 c8 bf 06 81 dc 4f 84 2a +fe 36 09 30 37 86 16 c1 08 e8 33 65 6e 56 40 c8 +68 56 88 5b b0 5d 1e b9 43 8e fe de 67 92 63 de +07 cb 39 55 3f 6a 25 e0 06 b0 a5 23 11 a0 63 ca +08 82 66 d2 56 4f f6 49 0c 46 b5 60 98 18 54 8f +88 76 4d ad 34 a2 5e 3a 85 d5 75 02 3f 0b 9e 66 +50 48 a0 3c 35 05 79 a9 d3 24 46 c7 bb 96 cc 92 +e0 65 ab 94 d3 c8 95 2e 8d f6 8e f0 d9 fa 45 6b +3a 06 bb 80 e3 bb c4 b2 8e 6a 94 b6 d0 ff 76 96 +a6 4e fe 05 e7 35 fe a0 25 d7 bd bc 41 39 f3 a3 +b5 46 07 5c ba 7e fa 94 73 74 d3 f0 ac 80 a6 8d +76 5f 5d f6 21 0b ca 06 9a 2d 88 64 7a f7 ea 04 +2d ac 69 0c b5 73 78 ec 07 77 61 4f b8 b6 5f f4 +53 ca 6b 7d ce 60 98 45 1a 2f 8c 0d a9 bf ec f1 +fd f3 91 bb aa 4e 2a 91 ca 18 a1 12 1a 75 23 a2 +ab d4 25 14 f4 89 e8 + +# Signature: +69 17 43 72 57 c2 2c cb 54 03 29 0c 3d ee 82 d9 +cf 75 50 b3 1b d3 1c 51 bd 57 bf d3 5d 45 2a b4 +db 7c 4b e6 b2 e2 5a c9 a5 9a 1d 2a 7f eb 62 7f +0a fd 49 76 b3 00 3c c9 cf fd 88 96 50 5e c3 82 +f2 65 10 4d 4c f8 c9 32 fa 9f e8 6e 00 87 07 95 +99 12 38 9d a4 b2 d6 b3 69 b3 6a 5e 72 e2 9d 24 +c9 a9 8c 9d 31 a3 ab 44 e6 43 e6 94 12 66 a4 7a +45 e3 44 6c e8 77 6a be 24 1a 8f 5f c6 42 3b 24 +b1 ff 25 0d c2 c3 a8 17 23 53 56 10 77 e8 50 a7 +69 b2 5f 03 25 da c8 89 65 a3 b9 b4 72 c4 94 e9 +5f 71 9b 4e ac 33 2c aa 7a 65 c7 df e4 6d 9a a7 +e6 e0 0f 52 5f 30 3d d6 3a b7 91 92 18 90 18 68 +f9 33 7f 8c d2 6a af e6 f3 3b 7f b2 c9 88 10 af +19 f7 fc b2 82 ba 15 77 91 2c 1d 36 89 75 fd 5d +44 0b 86 e1 0c 19 97 15 fa 0b 6f 42 50 b5 33 73 +2d 0b ef e1 54 51 50 fc 47 b8 76 de 09 b0 0a 94 + +# PKCS#1 v1.5 Signature Example 15.17 + +# ----------------- + +# Message to be signed: +00 8e 59 50 5e af b5 50 aa e5 e8 45 58 4c eb b0 +0b 6d e1 73 3e 9f 95 d4 2c 88 2a 5b be b5 ce 1c +57 e1 19 e7 c0 d4 da ca 9f 1f f7 87 02 17 f7 cf +d8 a6 b3 73 97 7c ac 9c ab 8e 71 e4 20 + +# Signature: +92 25 03 b6 73 ee 5f 3e 69 1e 1c a8 5e 9f f4 17 +3c f7 2b 05 ac 2c 13 1d a5 60 35 93 e3 bc 25 9c +94 c1 f7 d3 a0 6a 5b 98 91 bf 11 3f a3 9e 59 ff +7c 1e d6 46 5e 90 80 49 cb 89 e4 e1 25 cd 37 d2 +ff d9 22 7a 41 b4 a0 a1 9c 0a 44 fb bf 3d e5 5b +ab 80 20 87 a3 bb 8d 4f f6 68 ee 6b bb 8a d8 9e +68 57 a7 9a 9c 72 78 19 90 df cf 92 cd 51 94 04 +c9 50 f1 3d 11 43 c3 18 4f 1d 25 0c 90 e1 7a c6 +ce 36 16 3b 98 95 62 7a d6 ff ec 14 22 44 1f 55 +e4 49 9d ba 9b e8 95 46 ae 8b c6 3c ca 01 dd 08 +46 3a e7 f1 fc e3 d8 93 99 69 38 77 8c 18 12 e6 +74 ad 9c 30 9c 5a cc a3 fd e4 4e 7d d8 69 59 93 +e9 c1 fa 87 ac da 99 ec e5 c8 49 9e 46 89 57 ad +66 35 9b f1 2a 51 ad be 78 d3 a2 13 b4 49 bf 0b +5f 8d 4d 49 6a cf 03 d3 03 3b 7c cd 19 6b c2 2f +68 fb 7b ef 4f 69 7c 5e a2 b3 50 62 f4 8a 36 dd + +# PKCS#1 v1.5 Signature Example 15.18 + +# ----------------- + +# Message to be signed: +6a bc 54 cf 8d 1d ff 1f 53 b1 7d 81 60 36 88 78 +a8 78 8c c6 d2 2f a5 c2 25 8c 88 e6 60 b0 9a 89 +33 f9 f2 c0 50 4d da dc 21 f6 e7 5e 0b 83 3b eb +55 52 29 de e6 56 b9 04 7b 92 f6 2e 76 b8 ff cc +60 da b0 6b 80 + +# Signature: +0b 6d af 42 f7 a8 62 14 7e 41 74 93 c2 c4 01 ef +ae 32 63 6a b4 cb d4 41 92 bb f5 f1 95 b5 0a e0 +96 a4 75 a1 61 4f 0a 9f a8 f7 a0 26 cb 46 c6 50 +6e 51 8e 33 d8 3e 56 47 7a 87 5a ca 8c 7e 71 4c +e1 bd bd 61 ef 5d 53 52 39 b3 3f 2b fd d6 17 71 +ba b6 27 76 d7 81 71 a1 42 3c ea 87 31 f8 2e 60 +76 6d 64 54 26 56 20 b1 5f 5c 5a 58 4f 55 f9 5b +80 2f e7 8c 57 4e d5 da cf c8 31 f3 cf 2b 05 02 +c0 b2 98 f2 5c cf 11 f9 73 b3 1f 85 e4 74 42 19 +85 f3 cf f7 02 df 39 46 ef 0a 66 05 68 21 11 b2 +f5 5b 1f 8a b0 d2 ea 3a 68 3c 69 98 5e ad 93 ed +44 9e a4 8f 03 58 dd f7 08 02 cb 41 de 2f d8 3f +3c 80 80 82 d8 49 36 94 8e 0c 84 a1 31 b4 92 78 +27 46 05 27 bb 5c d2 4b fa b7 b4 8e 07 1b 24 17 +19 30 f9 97 63 27 2f 97 97 bc b7 6f 1d 24 81 57 +55 58 fc f2 60 b1 f0 e5 54 eb b3 df 3c fc b9 58 + +# PKCS#1 v1.5 Signature Example 15.19 + +# ----------------- + +# Message to be signed: +af 2d 78 15 2c f1 0e fe 01 d2 74 f2 17 b1 77 f6 +b0 1b 5e 74 9f 15 67 71 5d a3 24 85 9c d3 dd 88 +db 84 8e c7 9f 48 db ba 7b 6f 1d 33 11 1e f3 1b +64 89 9e 73 91 c2 bf fd 69 f4 90 25 cf 20 1f c5 +85 db d1 54 2c 1c 77 8a 2c e7 a7 ee 10 8a 30 9f +ec a2 6d 13 3a 5f fe dc 4e 86 9d cd 76 56 59 6a +c8 42 7e a3 ef 6e 3f d7 8f e9 9d 8d dc 71 d8 39 +f6 78 6e 0d a6 e7 86 bd 62 b3 a4 f1 9b 89 1a 56 +15 7a 55 4e c2 a2 b3 9e 25 a1 d7 c7 d3 73 21 c7 +a1 d9 46 cf 4f be 75 8d 92 76 f0 85 63 44 9d 67 +41 4a 2c 03 0f 42 51 cf e2 21 3d 04 a5 41 06 37 +87 + +# Signature: +20 9c 61 15 78 57 38 7b 71 e2 4b f3 dd 56 41 45 +50 50 3b ec 18 0f f5 3b dd 9b ac 06 2a 2d 49 95 +09 bf 99 12 81 b7 95 27 df 91 36 61 5b 7a 6d 9d +b3 a1 03 b5 35 e0 20 2a 2c ac a1 97 a7 b7 4e 53 +56 f3 dd 59 5b 49 ac fd 9d 30 04 9a 98 ca 88 f6 +25 bc a1 d5 f2 2a 39 2d 8a 74 9e fb 6e ed 9b 78 +21 d3 11 0a c0 d2 44 19 9e cb 4a a3 d7 35 a8 3a +2e 88 93 c6 bf 85 81 38 3c ca ee 83 46 35 b7 fa +1f af fa 45 b1 3d 15 c1 da 33 af 71 e8 93 03 d6 +80 90 ff 62 ee 61 5f df 5a 84 d1 20 71 1d a5 3c +28 89 19 8a b3 83 17 a9 73 4a b2 7d 67 92 4c ea +74 15 6f f9 9b ef 98 76 bb 5c 33 9e 93 74 52 83 +e1 b3 4e 07 22 26 b8 80 45 e0 17 e9 f0 5b 2a 8c +41 67 40 25 8e 22 3b 26 90 02 74 91 73 22 73 f3 +22 9d 9e f2 b1 b3 80 7e 32 10 18 92 0a d3 e5 3d +ae 47 e6 d9 39 5c 18 4b 93 a3 74 c6 71 fa a2 ce + +# PKCS#1 v1.5 Signature Example 15.20 + +# ----------------- + +# Message to be signed: +40 ee 99 24 58 d6 f6 14 86 d2 56 76 a9 6d d2 cb +93 a3 7f 04 b1 78 48 2f 2b 18 6c f8 82 15 27 0d +ba 29 d7 86 d7 74 b0 c5 e7 8c 7f 6e 56 a9 56 e7 +f7 39 50 a2 b0 c0 c1 0a 08 db cd 67 e5 b2 10 bb +21 c5 8e 27 67 d4 4f 7d d4 01 4e 39 66 14 3b f7 +e3 d6 6f f0 c0 9b e4 c5 5f 93 b3 99 94 b8 51 8d +9c 1d 76 d5 b4 73 74 de a0 8f 15 7d 57 d7 06 34 +97 8f 38 56 e0 e5 b4 81 af bb db 5a 3a c4 8d 48 +4b e9 2c 93 de 22 91 78 35 4c 2d e5 26 e9 c6 5a +31 ed e1 ef 68 cb 63 98 d7 91 16 84 fe c0 ba bc +3a 78 1a 66 66 07 83 50 69 74 d0 e1 48 25 10 1c +3b fa ea + +# Signature: +92 75 02 b8 24 af c4 25 13 ca 65 70 de 33 8b 8a +64 c3 a8 5e b8 28 d3 19 36 24 f2 7e 8b 10 29 c5 +5c 11 9c 97 33 b1 8f 58 49 b3 50 09 18 bc c0 05 +51 d9 a8 fd f5 3a 97 74 9f a8 dc 48 0d 6f e9 74 +2a 58 71 f9 73 92 65 28 97 2a 1a f4 9e 39 25 b0 +ad f1 4a 84 27 19 b4 a5 a2 d8 9f a9 c0 b6 60 5d +21 2b ed 1e 67 23 b9 34 06 ad 30 e8 68 29 a5 c7 +19 b8 90 b3 89 30 6d c5 50 64 86 ee 2f 36 a8 df +e0 a9 6a f6 78 c9 cb d6 af f3 97 ca 20 0e 3e dc +1e 36 bd 2f 08 b3 1d 54 0c 0c b2 82 a9 55 9e 4a +dd 4f c9 e6 49 2e ed 0c cb d3 a6 98 2e 5f aa 2d +dd 17 be 47 41 7c 80 b4 e5 45 2d 31 f7 24 01 a0 +42 32 51 09 54 4d 95 4c 01 93 90 79 d4 09 a5 c3 +78 d7 51 2d fc 2d 2a 71 ef cc 34 32 a7 65 d1 c6 +a5 2c fc e8 99 cd 79 b1 5b 4f c3 72 36 41 ef 6b +d0 0a cc 10 40 7e 5d f5 8d d1 c3 c5 c5 59 a5 06 + +# ============================================= diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/rsa-testvectors/pss-int.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/notes/rsa-testvectors/pss-int.txt Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,162 @@ +# ================================= +# WORKED-OUT EXAMPLE FOR RSASSA-PSS +# ================================= +# +# This file gives an example of the process of +# signing a message with RSASSA-PSS as +# specified in PKCS #1 v2.1. +# +# The message is an octet string of length 114, +# while the size of the modulus in the public +# key is 1024 bits. The message is signed via a +# random salt of length 20 octets +# +# The underlying hash function in the EMSA-PSS +# encoding method is SHA-1; the mask generation +# function is MGF1 with SHA-1 as specified in +# PKCS #1 v2.1. +# +# Integers are represented by strings of octets +# with the leftmost octet being the most +# significant octet. For example, +# +# 9,202,000 = (0x)8c 69 50. +# +# ============================================= + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +a2 ba 40 ee 07 e3 b2 bd 2f 02 ce 22 7f 36 a1 95 +02 44 86 e4 9c 19 cb 41 bb bd fb ba 98 b2 2b 0e +57 7c 2e ea ff a2 0d 88 3a 76 e6 5e 39 4c 69 d4 +b3 c0 5a 1e 8f ad da 27 ed b2 a4 2b c0 00 fe 88 +8b 9b 32 c2 2d 15 ad d0 cd 76 b3 e7 93 6e 19 95 +5b 22 0d d1 7d 4e a9 04 b1 ec 10 2b 2e 4d e7 75 +12 22 aa 99 15 10 24 c7 cb 41 cc 5e a2 1d 00 ee +b4 1f 7c 80 08 34 d2 c6 e0 6b ce 3b ce 7e a9 a5 + +# RSA public exponent e: +01 00 01 + +# Prime p: +d1 7f 65 5b f2 7c 8b 16 d3 54 62 c9 05 cc 04 a2 +6f 37 e2 a6 7f a9 c0 ce 0d ce d4 72 39 4a 0d f7 +43 fe 7f 92 9e 37 8e fd b3 68 ed df f4 53 cf 00 +7a f6 d9 48 e0 ad e7 57 37 1f 8a 71 1e 27 8f 6b + +# Prime q: +c6 d9 2b 6f ee 74 14 d1 35 8c e1 54 6f b6 29 87 +53 0b 90 bd 15 e0 f1 49 63 a5 e2 63 5a db 69 34 +7e c0 c0 1b 2a b1 76 3f d8 ac 1a 59 2f b2 27 57 +46 3a 98 24 25 bb 97 a3 a4 37 c5 bf 86 d0 3f 2f + +# p's CRT exponent dP: +9d 0d bf 83 e5 ce 9e 4b 17 54 dc d5 cd 05 bc b7 +b5 5f 15 08 33 0e a4 9f 14 d4 e8 89 55 0f 82 56 +cb 5f 80 6d ff 34 b1 7a da 44 20 88 53 57 7d 08 +e4 26 28 90 ac f7 52 46 1c ea 05 54 76 01 bc 4f + +# q's CRT exponent dQ: +12 91 a5 24 c6 b7 c0 59 e9 0e 46 dc 83 b2 17 1e +b3 fa 98 81 8f d1 79 b6 c8 bf 6c ec aa 47 63 03 +ab f2 83 fe 05 76 9c fc 49 57 88 fe 5b 1d df de +9e 88 4a 3c d5 e9 36 b7 e9 55 eb f9 7e b5 63 b1 + +# CRT coefficient qInv: +a6 3f 1d a3 8b 95 0c 9a d1 c6 7c e0 d6 77 ec 29 +14 cd 7d 40 06 2d f4 2a 67 eb 19 8a 17 6f 97 42 +aa c7 c5 fe a1 4f 22 97 66 2b 84 81 2c 4d ef c4 +9a 80 25 ab 43 82 28 6b e4 c0 37 88 dd 01 d6 9f + +# --------------------------------- +# Step-by-step RSASSA-PSS Signature +# --------------------------------- + +# Message M to be signed: +85 9e ef 2f d7 8a ca 00 30 8b dc 47 11 93 bf 55 +bf 9d 78 db 8f 8a 67 2b 48 46 34 f3 c9 c2 6e 64 +78 ae 10 26 0f e0 dd 8c 08 2e 53 a5 29 3a f2 17 +3c d5 0c 6d 5d 35 4f eb f7 8b 26 02 1c 25 c0 27 +12 e7 8c d4 69 4c 9f 46 97 77 e4 51 e7 f8 e9 e0 +4c d3 73 9c 6b bf ed ae 48 7f b5 56 44 e9 ca 74 +ff 77 a5 3c b7 29 80 2f 6e d4 a5 ff a8 ba 15 98 +90 fc + +# mHash = Hash(M) +# salt = random string of octets +# M' = Padding || mHash || salt +# H = Hash(M') +# DB = Padding || salt +# dbMask = MGF(H, length(DB)) +# maskedDB = DB xor dbMask (leftmost bit set to +# zero) +# EM = maskedDB || H || 0xbc + +# mHash: +37 b6 6a e0 44 58 43 35 3d 47 ec b0 b4 fd 14 c1 +10 e6 2d 6a + +# salt: +e3 b5 d5 d0 02 c1 bc e5 0c 2b 65 ef 88 a1 88 d8 +3b ce 7e 61 + +# M': +00 00 00 00 00 00 00 00 37 b6 6a e0 44 58 43 35 +3d 47 ec b0 b4 fd 14 c1 10 e6 2d 6a e3 b5 d5 d0 +02 c1 bc e5 0c 2b 65 ef 88 a1 88 d8 3b ce 7e 61 + +# H: +df 1a 89 6f 9d 8b c8 16 d9 7c d7 a2 c4 3b ad 54 +6f be 8c fe + +# DB: +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 01 e3 b5 d5 d0 02 c1 bc e5 0c +2b 65 ef 88 a1 88 d8 3b ce 7e 61 + +# dbMask: +66 e4 67 2e 83 6a d1 21 ba 24 4b ed 65 76 b8 67 +d9 a4 47 c2 8a 6e 66 a5 b8 7d ee 7f bc 7e 65 af +50 57 f8 6f ae 89 84 d9 ba 7f 96 9a d6 fe 02 a4 +d7 5f 74 45 fe fd d8 5b 6d 3a 47 7c 28 d2 4b a1 +e3 75 6f 79 2d d1 dc e8 ca 94 44 0e cb 52 79 ec +d3 18 3a 31 1f c8 97 39 a9 66 43 13 6e 8b 0f 46 +5e 87 a4 53 5c d4 c5 9b 10 02 8d + +# maskedDB: +66 e4 67 2e 83 6a d1 21 ba 24 4b ed 65 76 b8 67 +d9 a4 47 c2 8a 6e 66 a5 b8 7d ee 7f bc 7e 65 af +50 57 f8 6f ae 89 84 d9 ba 7f 96 9a d6 fe 02 a4 +d7 5f 74 45 fe fd d8 5b 6d 3a 47 7c 28 d2 4b a1 +e3 75 6f 79 2d d1 dc e8 ca 94 44 0e cb 52 79 ec +d3 18 3a 31 1f c8 96 da 1c b3 93 11 af 37 ea 4a +75 e2 4b db fd 5c 1d a0 de 7c ec + +# Encoded message EM: +66 e4 67 2e 83 6a d1 21 ba 24 4b ed 65 76 b8 67 +d9 a4 47 c2 8a 6e 66 a5 b8 7d ee 7f bc 7e 65 af +50 57 f8 6f ae 89 84 d9 ba 7f 96 9a d6 fe 02 a4 +d7 5f 74 45 fe fd d8 5b 6d 3a 47 7c 28 d2 4b a1 +e3 75 6f 79 2d d1 dc e8 ca 94 44 0e cb 52 79 ec +d3 18 3a 31 1f c8 96 da 1c b3 93 11 af 37 ea 4a +75 e2 4b db fd 5c 1d a0 de 7c ec df 1a 89 6f 9d +8b c8 16 d9 7c d7 a2 c4 3b ad 54 6f be 8c fe bc + +# Signature S, the RSA decryption of EM: +8d aa 62 7d 3d e7 59 5d 63 05 6c 7e c6 59 e5 44 +06 f1 06 10 12 8b aa e8 21 c8 b2 a0 f3 93 6d 54 +dc 3b dc e4 66 89 f6 b7 95 1b b1 8e 84 05 42 76 +97 18 d5 71 5d 21 0d 85 ef bb 59 61 92 03 2c 42 +be 4c 29 97 2c 85 62 75 eb 6d 5a 45 f0 5f 51 87 +6f c6 74 3d ed dd 28 ca ec 9b b3 0e a9 9e 02 c3 +48 82 69 60 4f e4 97 f7 4c cd 7c 7f ca 16 71 89 +71 23 cb d3 0d ef 5d 54 a2 b5 53 6a d9 0a 74 7e + +# ============================================= diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/rsa-testvectors/pss-vect.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/notes/rsa-testvectors/pss-vect.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,1418 @@ +/* Generated from file: pss-vect.txt + * with md5 hash: af66c6ca63a09d0443d5f78ff0e59c29 + */ + + +typedef struct rsaKey { + int n_l; + unsigned char n[256]; + int e_l; + unsigned char e[256]; + int d_l; + unsigned char d[256]; + int p_l; + unsigned char p[256]; + int q_l; + unsigned char q[256]; + int dP_l; + unsigned char dP[256]; + int dQ_l; + unsigned char dQ[256]; + int qInv_l; + unsigned char qInv[256]; +} rsaKey_t; + +typedef struct rsaData { + const char* name; + int o1_l; + unsigned char o1[256]; + int o2_l; + unsigned char o2[256]; + int o3_l; + unsigned char o3[256]; +} rsaData_t; + +typedef struct testcase { + const char* name; + rsaKey_t rsa; +#ifdef LTC_TEST_EXT + rsaData_t data[6]; +#else + rsaData_t data[1]; +#endif /* LTC_TEST_EXT */ +} testcase_t; + +testcase_t testcases_pss[] = + { +{ + "Example 1: A 1024-bit RSA Key Pair", +{ + /* RSA modulus n */ + 128, + { 0xa5, 0x6e, 0x4a, 0x0e, 0x70, 0x10, 0x17, 0x58, 0x9a, 0x51, 0x87, 0xdc, 0x7e, 0xa8, 0x41, 0xd1, 0x56, 0xf2, 0xec, 0x0e, 0x36, 0xad, 0x52, 0xa4, 0x4d, 0xfe, 0xb1, 0xe6, 0x1f, 0x7a, 0xd9, 0x91, 0xd8, 0xc5, 0x10, 0x56, 0xff, 0xed, 0xb1, 0x62, 0xb4, 0xc0, 0xf2, 0x83, 0xa1, 0x2a, 0x88, 0xa3, 0x94, 0xdf, 0xf5, 0x26, 0xab, 0x72, 0x91, 0xcb, 0xb3, 0x07, 0xce, 0xab, 0xfc, 0xe0, 0xb1, 0xdf, 0xd5, 0xcd, 0x95, 0x08, 0x09, 0x6d, 0x5b, 0x2b, 0x8b, 0x6d, 0xf5, 0xd6, 0x71, 0xef, 0x63, 0x77, 0xc0, 0x92, 0x1c, 0xb2, 0x3c, 0x27, 0x0a, 0x70, 0xe2, 0x59, 0x8e, 0x6f, 0xf8, 0x9d, 0x19, 0xf1, 0x05, 0xac, 0xc2, 0xd3, 0xf0, 0xcb, 0x35, 0xf2, 0x92, 0x80, 0xe1, 0x38, 0x6b, 0x6f, 0x64, 0xc4, 0xef, 0x22, 0xe1, 0xe1, 0xf2, 0x0d, 0x0c, 0xe8, 0xcf, 0xfb, 0x22, 0x49, 0xbd, 0x9a, 0x21, 0x37 } +, + /* RSA public exponent e */ + 3, + { 0x01, 0x00, 0x01 } +, + /* RSA private exponent d */ + 128, + { 0x33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x0b, 0x3b, 0x6d, 0xcd, 0x3e, 0xda, 0x8e, 0x64, 0x43 } +, + /* Prime q */ + 64, + { 0xb6, 0x9d, 0xca, 0x1c, 0xf7, 0xd4, 0xd7, 0xec, 0x81, 0xe7, 0x5b, 0x90, 0xfc, 0xca, 0x87, 0x4a, 0xbc, 0xde, 0x12, 0x3f, 0xd2, 0x70, 0x01, 0x80, 0xaa, 0x90, 0x47, 0x9b, 0x6e, 0x48, 0xde, 0x8d, 0x67, 0xed, 0x24, 0xf9, 0xf1, 0x9d, 0x85, 0xba, 0x27, 0x58, 0x74, 0xf5, 0x42, 0xcd, 0x20, 0xdc, 0x72, 0x3e, 0x69, 0x63, 0x36, 0x4a, 0x1f, 0x94, 0x25, 0x45, 0x2b, 0x26, 0x9a, 0x67, 0x99, 0xfd } +, + /* p's CRT exponent dP */ + 64, + { 0x28, 0xfa, 0x13, 0x93, 0x86, 0x55, 0xbe, 0x1f, 0x8a, 0x15, 0x9c, 0xba, 0xca, 0x5a, 0x72, 0xea, 0x19, 0x0c, 0x30, 0x08, 0x9e, 0x19, 0xcd, 0x27, 0x4a, 0x55, 0x6f, 0x36, 0xc4, 0xf6, 0xe1, 0x9f, 0x55, 0x4b, 0x34, 0xc0, 0x77, 0x79, 0x04, 0x27, 0xbb, 0xdd, 0x8d, 0xd3, 0xed, 0xe2, 0x44, 0x83, 0x28, 0xf3, 0x85, 0xd8, 0x1b, 0x30, 0xe8, 0xe4, 0x3b, 0x2f, 0xff, 0xa0, 0x27, 0x86, 0x19, 0x79 } +, + /* q's CRT exponent dQ */ + 64, + { 0x1a, 0x8b, 0x38, 0xf3, 0x98, 0xfa, 0x71, 0x20, 0x49, 0x89, 0x8d, 0x7f, 0xb7, 0x9e, 0xe0, 0xa7, 0x76, 0x68, 0x79, 0x12, 0x99, 0xcd, 0xfa, 0x09, 0xef, 0xc0, 0xe5, 0x07, 0xac, 0xb2, 0x1e, 0xd7, 0x43, 0x01, 0xef, 0x5b, 0xfd, 0x48, 0xbe, 0x45, 0x5e, 0xae, 0xb6, 0xe1, 0x67, 0x82, 0x55, 0x82, 0x75, 0x80, 0xa8, 0xe4, 0xe8, 0xe1, 0x41, 0x51, 0xd1, 0x51, 0x0a, 0x82, 0xa3, 0xf2, 0xe7, 0x29 } +, + /* CRT coefficient qInv */ + 64, + { 0x27, 0x15, 0x6a, 0xba, 0x41, 0x26, 0xd2, 0x4a, 0x81, 0xf3, 0xa5, 0x28, 0xcb, 0xfb, 0x27, 0xf5, 0x68, 0x86, 0xf8, 0x40, 0xa9, 0xf6, 0xe8, 0x6e, 0x17, 0xa4, 0x4b, 0x94, 0xfe, 0x93, 0x19, 0x58, 0x4b, 0x8e, 0x22, 0xfd, 0xde, 0x1e, 0x5a, 0x2e, 0x3b, 0xd8, 0xaa, 0x5b, 0xa8, 0xd8, 0x58, 0x41, 0x94, 0xeb, 0x21, 0x90, 0xac, 0xf8, 0x32, 0xb8, 0x47, 0xf1, 0x3a, 0x3d, 0x24, 0xa7, 0x9f, 0x4d } + +} +, +{{ + "RSASSA-PSS Signature Example 1.1", + /* Message to be signed */ + 217, + { 0xcd, 0xc8, 0x7d, 0xa2, 0x23, 0xd7, 0x86, 0xdf, 0x3b, 0x45, 0xe0, 0xbb, 0xbc, 0x72, 0x13, 0x26, 0xd1, 0xee, 0x2a, 0xf8, 0x06, 0xcc, 0x31, 0x54, 0x75, 0xcc, 0x6f, 0x0d, 0x9c, 0x66, 0xe1, 0xb6, 0x23, 0x71, 0xd4, 0x5c, 0xe2, 0x39, 0x2e, 0x1a, 0xc9, 0x28, 0x44, 0xc3, 0x10, 0x10, 0x2f, 0x15, 0x6a, 0x0d, 0x8d, 0x52, 0xc1, 0xf4, 0xc4, 0x0b, 0xa3, 0xaa, 0x65, 0x09, 0x57, 0x86, 0xcb, 0x76, 0x97, 0x57, 0xa6, 0x56, 0x3b, 0xa9, 0x58, 0xfe, 0xd0, 0xbc, 0xc9, 0x84, 0xe8, 0xb5, 0x17, 0xa3, 0xd5, 0xf5, 0x15, 0xb2, 0x3b, 0x8a, 0x41, 0xe7, 0x4a, 0xa8, 0x67, 0x69, 0x3f, 0x90, 0xdf, 0xb0, 0x61, 0xa6, 0xe8, 0x6d, 0xfa, 0xae, 0xe6, 0x44, 0x72, 0xc0, 0x0e, 0x5f, 0x20, 0x94, 0x57, 0x29, 0xcb, 0xeb, 0xe7, 0x7f, 0x06, 0xce, 0x78, 0xe0, 0x8f, 0x40, 0x98, 0xfb, 0xa4, 0x1f, 0x9d, 0x61, 0x93, 0xc0, 0x31, 0x7e, 0x8b, 0x60, 0xd4, 0xb6, 0x08, 0x4a, 0xcb, 0x42, 0xd2, 0x9e, 0x38, 0x08, 0xa3, 0xbc, 0x37, 0x2d, 0x85, 0xe3, 0x31, 0x17, 0x0f, 0xcb, 0xf7, 0xcc, 0x72, 0xd0, 0xb7, 0x1c, 0x29, 0x66, 0x48, 0xb3, 0xa4, 0xd1, 0x0f, 0x41, 0x62, 0x95, 0xd0, 0x80, 0x7a, 0xa6, 0x25, 0xca, 0xb2, 0x74, 0x4f, 0xd9, 0xea, 0x8f, 0xd2, 0x23, 0xc4, 0x25, 0x37, 0x02, 0x98, 0x28, 0xbd, 0x16, 0xbe, 0x02, 0x54, 0x6f, 0x13, 0x0f, 0xd2, 0xe3, 0x3b, 0x93, 0x6d, 0x26, 0x76, 0xe0, 0x8a, 0xed, 0x1b, 0x73, 0x31, 0x8b, 0x75, 0x0a, 0x01, 0x67, 0xd0 } +, + /* Salt */ + 20, + { 0xde, 0xe9, 0x59, 0xc7, 0xe0, 0x64, 0x11, 0x36, 0x14, 0x20, 0xff, 0x80, 0x18, 0x5e, 0xd5, 0x7f, 0x3e, 0x67, 0x76, 0xaf } +, + /* Signature */ + 128, + { 0x90, 0x74, 0x30, 0x8f, 0xb5, 0x98, 0xe9, 0x70, 0x1b, 0x22, 0x94, 0x38, 0x8e, 0x52, 0xf9, 0x71, 0xfa, 0xac, 0x2b, 0x60, 0xa5, 0x14, 0x5a, 0xf1, 0x85, 0xdf, 0x52, 0x87, 0xb5, 0xed, 0x28, 0x87, 0xe5, 0x7c, 0xe7, 0xfd, 0x44, 0xdc, 0x86, 0x34, 0xe4, 0x07, 0xc8, 0xe0, 0xe4, 0x36, 0x0b, 0xc2, 0x26, 0xf3, 0xec, 0x22, 0x7f, 0x9d, 0x9e, 0x54, 0x63, 0x8e, 0x8d, 0x31, 0xf5, 0x05, 0x12, 0x15, 0xdf, 0x6e, 0xbb, 0x9c, 0x2f, 0x95, 0x79, 0xaa, 0x77, 0x59, 0x8a, 0x38, 0xf9, 0x14, 0xb5, 0xb9, 0xc1, 0xbd, 0x83, 0xc4, 0xe2, 0xf9, 0xf3, 0x82, 0xa0, 0xd0, 0xaa, 0x35, 0x42, 0xff, 0xee, 0x65, 0x98, 0x4a, 0x60, 0x1b, 0xc6, 0x9e, 0xb2, 0x8d, 0xeb, 0x27, 0xdc, 0xa1, 0x2c, 0x82, 0xc2, 0xd4, 0xc3, 0xf6, 0x6c, 0xd5, 0x00, 0xf1, 0xff, 0x2b, 0x99, 0x4d, 0x8a, 0x4e, 0x30, 0xcb, 0xb3, 0x3c } + +} +, +#ifdef LTC_TEST_EXT +{ + "RSASSA-PSS Signature Example 1.2", + /* Message to be signed */ + 51, + { 0x85, 0x13, 0x84, 0xcd, 0xfe, 0x81, 0x9c, 0x22, 0xed, 0x6c, 0x4c, 0xcb, 0x30, 0xda, 0xeb, 0x5c, 0xf0, 0x59, 0xbc, 0x8e, 0x11, 0x66, 0xb7, 0xe3, 0x53, 0x0c, 0x4c, 0x23, 0x3e, 0x2b, 0x5f, 0x8f, 0x71, 0xa1, 0xcc, 0xa5, 0x82, 0xd4, 0x3e, 0xcc, 0x72, 0xb1, 0xbc, 0xa1, 0x6d, 0xfc, 0x70, 0x13, 0x22, 0x6b, 0x9e } +, + /* Salt */ + 20, + { 0xef, 0x28, 0x69, 0xfa, 0x40, 0xc3, 0x46, 0xcb, 0x18, 0x3d, 0xab, 0x3d, 0x7b, 0xff, 0xc9, 0x8f, 0xd5, 0x6d, 0xf4, 0x2d } +, + /* Signature */ + 128, + { 0x3e, 0xf7, 0xf4, 0x6e, 0x83, 0x1b, 0xf9, 0x2b, 0x32, 0x27, 0x41, 0x42, 0xa5, 0x85, 0xff, 0xce, 0xfb, 0xdc, 0xa7, 0xb3, 0x2a, 0xe9, 0x0d, 0x10, 0xfb, 0x0f, 0x0c, 0x72, 0x99, 0x84, 0xf0, 0x4e, 0xf2, 0x9a, 0x9d, 0xf0, 0x78, 0x07, 0x75, 0xce, 0x43, 0x73, 0x9b, 0x97, 0x83, 0x83, 0x90, 0xdb, 0x0a, 0x55, 0x05, 0xe6, 0x3d, 0xe9, 0x27, 0x02, 0x8d, 0x9d, 0x29, 0xb2, 0x19, 0xca, 0x2c, 0x45, 0x17, 0x83, 0x25, 0x58, 0xa5, 0x5d, 0x69, 0x4a, 0x6d, 0x25, 0xb9, 0xda, 0xb6, 0x60, 0x03, 0xc4, 0xcc, 0xcd, 0x90, 0x78, 0x02, 0x19, 0x3b, 0xe5, 0x17, 0x0d, 0x26, 0x14, 0x7d, 0x37, 0xb9, 0x35, 0x90, 0x24, 0x1b, 0xe5, 0x1c, 0x25, 0x05, 0x5f, 0x47, 0xef, 0x62, 0x75, 0x2c, 0xfb, 0xe2, 0x14, 0x18, 0xfa, 0xfe, 0x98, 0xc2, 0x2c, 0x4d, 0x4d, 0x47, 0x72, 0x4f, 0xdb, 0x56, 0x69, 0xe8, 0x43 } + +} +, +{ + "RSASSA-PSS Signature Example 1.3", + /* Message to be signed */ + 228, + { 0xa4, 0xb1, 0x59, 0x94, 0x17, 0x61, 0xc4, 0x0c, 0x6a, 0x82, 0xf2, 0xb8, 0x0d, 0x1b, 0x94, 0xf5, 0xaa, 0x26, 0x54, 0xfd, 0x17, 0xe1, 0x2d, 0x58, 0x88, 0x64, 0x67, 0x9b, 0x54, 0xcd, 0x04, 0xef, 0x8b, 0xd0, 0x30, 0x12, 0xbe, 0x8d, 0xc3, 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x38, 0xe7, 0xd4, 0x70 } +, + /* Salt */ + 20, + { 0x71, 0x0b, 0x9c, 0x47, 0x47, 0xd8, 0x00, 0xd4, 0xde, 0x87, 0xf1, 0x2a, 0xfd, 0xce, 0x6d, 0xf1, 0x81, 0x07, 0xcc, 0x77 } +, + /* Signature */ + 128, + { 0x66, 0x60, 0x26, 0xfb, 0xa7, 0x1b, 0xd3, 0xe7, 0xcf, 0x13, 0x15, 0x7c, 0xc2, 0xc5, 0x1a, 0x8e, 0x4a, 0xa6, 0x84, 0xaf, 0x97, 0x78, 0xf9, 0x18, 0x49, 0xf3, 0x43, 0x35, 0xd1, 0x41, 0xc0, 0x01, 0x54, 0xc4, 0x19, 0x76, 0x21, 0xf9, 0x62, 0x4a, 0x67, 0x5b, 0x5a, 0xbc, 0x22, 0xee, 0x7d, 0x5b, 0xaa, 0xff, 0xaa, 0xe1, 0xc9, 0xba, 0xca, 0x2c, 0xc3, 0x73, 0xb3, 0xf3, 0x3e, 0x78, 0xe6, 0x14, 0x3c, 0x39, 0x5a, 0x91, 0xaa, 0x7f, 0xac, 0xa6, 0x64, 0xeb, 0x73, 0x3a, 0xfd, 0x14, 0xd8, 0x82, 0x72, 0x59, 0xd9, 0x9a, 0x75, 0x50, 0xfa, 0xca, 0x50, 0x1e, 0xf2, 0xb0, 0x4e, 0x33, 0xc2, 0x3a, 0xa5, 0x1f, 0x4b, 0x9e, 0x82, 0x82, 0xef, 0xdb, 0x72, 0x8c, 0xc0, 0xab, 0x09, 0x40, 0x5a, 0x91, 0x60, 0x7c, 0x63, 0x69, 0x96, 0x1b, 0xc8, 0x27, 0x0d, 0x2d, 0x4f, 0x39, 0xfc, 0xe6, 0x12, 0xb1 } + +} +, +{ + "RSASSA-PSS Signature Example 1.4", + /* Message to be signed */ + 9, + { 0xbc, 0x65, 0x67, 0x47, 0xfa, 0x9e, 0xaf, 0xb3, 0xf0 } +, + /* Salt */ + 20, + { 0x05, 0x6f, 0x00, 0x98, 0x5d, 0xe1, 0x4d, 0x8e, 0xf5, 0xce, 0xa9, 0xe8, 0x2f, 0x8c, 0x27, 0xbe, 0xf7, 0x20, 0x33, 0x5e } +, + /* Signature */ + 128, + { 0x46, 0x09, 0x79, 0x3b, 0x23, 0xe9, 0xd0, 0x93, 0x62, 0xdc, 0x21, 0xbb, 0x47, 0xda, 0x0b, 0x4f, 0x3a, 0x76, 0x22, 0x64, 0x9a, 0x47, 0xd4, 0x64, 0x01, 0x9b, 0x9a, 0xea, 0xfe, 0x53, 0x35, 0x9c, 0x17, 0x8c, 0x91, 0xcd, 0x58, 0xba, 0x6b, 0xcb, 0x78, 0xbe, 0x03, 0x46, 0xa7, 0xbc, 0x63, 0x7f, 0x4b, 0x87, 0x3d, 0x4b, 0xab, 0x38, 0xee, 0x66, 0x1f, 0x19, 0x96, 0x34, 0xc5, 0x47, 0xa1, 0xad, 0x84, 0x42, 0xe0, 0x3d, 0xa0, 0x15, 0xb1, 0x36, 0xe5, 0x43, 0xf7, 0xab, 0x07, 0xc0, 0xc1, 0x3e, 0x42, 0x25, 0xb8, 0xde, 0x8c, 0xce, 0x25, 0xd4, 0xf6, 0xeb, 0x84, 0x00, 0xf8, 0x1f, 0x7e, 0x18, 0x33, 0xb7, 0xee, 0x6e, 0x33, 0x4d, 0x37, 0x09, 0x64, 0xca, 0x79, 0xfd, 0xb8, 0x72, 0xb4, 0xd7, 0x52, 0x23, 0xb5, 0xee, 0xb0, 0x81, 0x01, 0x59, 0x1f, 0xb5, 0x32, 0xd1, 0x55, 0xa6, 0xde, 0x87 } + +} +, +{ + "RSASSA-PSS Signature Example 1.5", + /* Message to be signed */ + 149, + { 0xb4, 0x55, 0x81, 0x54, 0x7e, 0x54, 0x27, 0x77, 0x0c, 0x76, 0x8e, 0x8b, 0x82, 0xb7, 0x55, 0x64, 0xe0, 0xea, 0x4e, 0x9c, 0x32, 0x59, 0x4d, 0x6b, 0xff, 0x70, 0x65, 0x44, 0xde, 0x0a, 0x87, 0x76, 0xc7, 0xa8,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xa0, 0x18, 0x37, 0x76, 0x15, 0xb1, 0x6c, 0xb9, 0xb1, 0x3b, 0x3e, 0x09, 0xd6, 0x71, 0xeb, 0x71, 0xe3, 0x87, 0xb8, 0x54, 0x5c, 0x59, 0x60, 0xda, 0x5a, 0x64, 0x77, 0x6e, 0x76, 0x8e, 0x82, 0xb2, 0xc9, 0x35, 0x83, 0xbf, 0x10, 0x4c, 0x3f, 0xdb, 0x23, 0x51, 0x2b, 0x7b, 0x4e, 0x89, 0xf6, 0x33, 0xdd, 0x00, 0x63, 0xa5, 0x30, 0xdb, 0x45, 0x24, 0xb0, 0x1c, 0x3f, 0x38, 0x4c, 0x09, 0x31, 0x0e, 0x31, 0x5a, 0x79, 0xdc, 0xd3, 0xd6, 0x84, 0x02, 0x2a, 0x7f, 0x31, 0xc8, 0x65, 0xa6, 0x64, 0xe3, 0x16, 0x97, 0x8b, 0x75, 0x9f, 0xad } + +} +, +{ + "RSASSA-PSS Signature Example 1.6", + /* Message to be signed */ + 233, + { 0x10, 0xaa, 0xe9, 0xa0, 0xab, 0x0b, 0x59, 0x5d, 0x08, 0x41, 0x20, 0x7b, 0x70, 0x0d, 0x48, 0xd7, 0x5f, 0xae, 0xdd, 0xe3, 0xb7, 0x75, 0xcd, 0x6b, 0x4c, 0xc8, 0x8a, 0xe0, 0x6e, 0x46, 0x94, 0xec, 0x74, 0xba, 0x18, 0xf8, 0x52, 0x0d, 0x4f, 0x5e, 0xa6, 0x9c, 0xbb, 0xe7, 0xcc, 0x2b, 0xeb, 0xa4, 0x3e, 0xfd, 0xc1, 0x02, 0x15, 0xac, 0x4e, 0xb3, 0x2d, 0xc3, 0x02, 0xa1, 0xf5, 0x3d, 0xc6, 0xc4, 0x35, 0x22, 0x67, 0xe7, 0x93, 0x6c, 0xfe, 0xbf, 0x7c, 0x8d, 0x67, 0x03, 0x57, 0x84, 0xa3, 0x90, 0x9f, 0xa8, 0x59, 0xc7, 0xb7, 0xb5, 0x9b, 0x8e, 0x39, 0xc5, 0xc2, 0x34, 0x9f, 0x18, 0x86, 0xb7, 0x05, 0xa3, 0x02, 0x67, 0xd4, 0x02, 0xf7, 0x48, 0x6a, 0xb4, 0xf5, 0x8c, 0xad, 0x5d, 0x69, 0xad, 0xb1, 0x7a, 0xb8, 0xcd, 0x0c, 0xe1, 0xca, 0xf5, 0x02, 0x5a, 0xf4, 0xae, 0x24, 0xb1, 0xfb, 0x87, 0x94, 0xc6, 0x07, 0x0c, 0xc0, 0x9a, 0x51, 0xe2, 0xf9, 0x91, 0x13, 0x11, 0xe3, 0x87, 0x7d, 0x00, 0x44, 0xc7, 0x1c, 0x57, 0xa9, 0x93, 0x39, 0x50, 0x08, 0x80, 0x6b, 0x72, 0x3a, 0xc3, 0x83, 0x73, 0xd3, 0x95, 0x48, 0x18, 0x18, 0x52, 0x8c, 0x1e, 0x70, 0x53, 0x73, 0x92, 0x82, 0x05, 0x35, 0x29, 0x51, 0x0e, 0x93, 0x5c, 0xd0, 0xfa, 0x77, 0xb8, 0xfa, 0x53, 0xcc, 0x2d, 0x47, 0x4b, 0xd4, 0xfb, 0x3c, 0xc5, 0xc6, 0x72, 0xd6, 0xff, 0xdc, 0x90, 0xa0, 0x0f, 0x98, 0x48, 0x71, 0x2c, 0x4b, 0xcf, 0xe4, 0x6c, 0x60, 0x57, 0x36, 0x59, 0xb1, 0x1e, 0x64, 0x57, 0xe8, 0x61, 0xf0, 0xf6, 0x04, 0xb6, 0x13, 0x8d, 0x14, 0x4f, 0x8c, 0xe4, 0xe2, 0xda, 0x73 } +, + /* Salt */ + 20, + { 0xa8, 0xab, 0x69, 0xdd, 0x80, 0x1f, 0x00, 0x74, 0xc2, 0xa1, 0xfc, 0x60, 0x64, 0x98, 0x36, 0xc6, 0x16, 0xd9, 0x96, 0x81 } +, + /* Signature */ + 128, + { 0x2a, 0x34, 0xf6, 0x12, 0x5e, 0x1f, 0x6b, 0x0b, 0xf9, 0x71, 0xe8, 0x4f, 0xbd, 0x41, 0xc6, 0x32, 0xbe, 0x8f, 0x2c, 0x2a, 0xce, 0x7d, 0xe8, 0xb6, 0x92, 0x6e, 0x31, 0xff, 0x93, 0xe9, 0xaf, 0x98, 0x7f, 0xbc, 0x06, 0xe5, 0x1e, 0x9b, 0xe1, 0x4f, 0x51, 0x98, 0xf9, 0x1f, 0x3f, 0x95, 0x3b, 0xd6, 0x7d, 0xa6, 0x0a, 0x9d, 0xf5, 0x97, 0x64, 0xc3, 0xdc, 0x0f, 0xe0, 0x8e, 0x1c, 0xbe, 0xf0, 0xb7, 0x5f, 0x86, 0x8d, 0x10, 0xad, 0x3f, 0xba, 0x74, 0x9f, 0xef, 0x59, 0xfb, 0x6d, 0xac, 0x46, 0xa0, 0xd6, 0xe5, 0x04, 0x36, 0x93, 0x31, 0x58, 0x6f, 0x58, 0xe4, 0x62, 0x8f, 0x39, 0xaa, 0x27, 0x89, 0x82, 0x54, 0x3b, 0xc0, 0xee, 0xb5, 0x37, 0xdc, 0x61, 0x95, 0x80, 0x19, 0xb3, 0x94, 0xfb, 0x27, 0x3f, 0x21, 0x58, 0x58, 0xa0, 0xa0, 0x1a, 0xc4, 0xd6, 0x50, 0xb9, 0x55, 0xc6, 0x7f, 0x4c, 0x58 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 2: A 1025-bit RSA Key Pair", +{ + /* RSA modulus n */ + 129, + { 0x01, 0xd4, 0x0c, 0x1b, 0xcf, 0x97, 0xa6, 0x8a, 0xe7, 0xcd, 0xbd, 0x8a, 0x7b, 0xf3, 0xe3, 0x4f, 0xa1, 0x9d, 0xcc, 0xa4, 0xef, 0x75, 0xa4, 0x74, 0x54, 0x37, 0x5f, 0x94, 0x51, 0x4d, 0x88, 0xfe, 0xd0, 0x06, 0xfb, 0x82, 0x9f, 0x84, 0x19, 0xff, 0x87, 0xd6, 0x31, 0x5d, 0xa6, 0x8a, 0x1f, 0xf3, 0xa0, 0x93, 0x8e, 0x9a, 0xbb, 0x34, 0x64, 0x01, 0x1c, 0x30, 0x3a, 0xd9, 0x91, 0x99, 0xcf, 0x0c, 0x7c, 0x7a, 0x8b, 0x47, 0x7d, 0xce, 0x82, 0x9e, 0x88, 0x44, 0xf6, 0x25, 0xb1, 0x15, 0xe5, 0xe9, 0xc4, 0xa5, 0x9c, 0xf8, 0xf8, 0x11, 0x3b, 0x68, 0x34, 0x33, 0x6a, 0x2f, 0xd2, 0x68, 0x9b, 0x47, 0x2c, 0xbb, 0x5e, 0x5c, 0xab, 0xe6, 0x74, 0x35, 0x0c, 0x59, 0xb6, 0xc1, 0x7e, 0x17, 0x68, 0x74, 0xfb, 0x42, 0xf8, 0xfc, 0x3d, 0x17, 0x6a, 0x01, 0x7e, 0xdc, 0x61, 0xfd, 0x32, 0x6c, 0x4b, 0x33, 0xc9 } +, + /* RSA public exponent e */ + 3, + { 0x01, 0x00, 0x01 } +, + /* RSA private exponent d */ + 128, + { 0x02, 0x7d, 0x14, 0x7e, 0x46, 0x73, 0x05, 0x73, 0x77, 0xfd, 0x1e, 0xa2, 0x01, 0x56, 0x57, 0x72, 0x17, 0x6a, 0x7d, 0xc3, 0x83, 0x58, 0xd3, 0x76, 0x04, 0x56, 0x85, 0xa2, 0xe7, 0x87, 0xc2, 0x3c, 0x15, 0x57, 0x6b, 0xc1, 0x6b, 0x9f, 0x44, 0x44, 0x02, 0xd6, 0xbf, 0xc5, 0xd9, 0x8a, 0x3e, 0x88, 0xea, 0x13, 0xef, 0x67, 0xc3, 0x53, 0xec, 0xa0, 0xc0, 0xdd, 0xba, 0x92, 0x55, 0xbd, 0x7b, 0x8b, 0xb5, 0x0a, 0x64, 0x4a, 0xfd, 0xfd, 0x1d, 0xd5, 0x16, 0x95, 0xb2, 0x52, 0xd2, 0x2e, 0x73, 0x18, 0xd1, 0xb6, 0x68, 0x7a, 0x1c, 0x10, 0xff, 0x75, 0x54, 0x5f, 0x3d, 0xb0, 0xfe, 0x60, 0x2d, 0x5f, 0x2b, 0x7f, 0x29, 0x4e, 0x36, 0x01, 0xea, 0xb7, 0xb9, 0xd1, 0xce, 0xcd, 0x76, 0x7f, 0x64, 0x69, 0x2e, 0x3e, 0x53, 0x6c, 0xa2, 0x84, 0x6c, 0xb0, 0xc2, 0xdd, 0x48, 0x6a, 0x39, 0xfa, 0x75, 0xb1 } +, + /* Prime p */ + 65, + { 0x01, 0x66, 0x01, 0xe9, 0x26, 0xa0, 0xf8, 0xc9, 0xe2, 0x6e, 0xca, 0xb7, 0x69, 0xea, 0x65, 0xa5, 0xe7, 0xc5, 0x2c, 0xc9, 0xe0, 0x80, 0xef, 0x51, 0x94, 0x57, 0xc6, 0x44, 0xda, 0x68, 0x91, 0xc5, 0xa1, 0x04, 0xd3, 0xea, 0x79, 0x55, 0x92, 0x9a, 0x22, 0xe7, 0xc6, 0x8a, 0x7a, 0xf9, 0xfc, 0xad, 0x77, 0x7c, 0x3c, 0xcc, 0x2b, 0x9e, 0x3d, 0x36, 0x50, 0xbc, 0xe4, 0x04, 0x39, 0x9b, 0x7e, 0x59, 0xd1 } +, + /* Prime q */ + 65, + { 0x01, 0x4e, 0xaf, 0xa1, 0xd4, 0xd0, 0x18, 0x4d, 0xa7, 0xe3, 0x1f, 0x87, 0x7d, 0x12, 0x81, 0xdd, 0xda, 0x62, 0x56, 0x64, 0x86, 0x9e, 0x83, 0x79, 0xe6, 0x7a, 0xd3, 0xb7, 0x5e, 0xae, 0x74, 0xa5, 0x80, 0xe9, 0x82, 0x7a, 0xbd, 0x6e, 0xb7, 0xa0, 0x02, 0xcb, 0x54, 0x11, 0xf5, 0x26, 0x67, 0x97, 0x76, 0x8f, 0xb8, 0xe9, 0x5a, 0xe4, 0x0e, 0x3e, 0x8a, 0x01, 0xf3, 0x5f, 0xf8, 0x9e, 0x56, 0xc0, 0x79 } +, + /* p's CRT exponent dP */ + 64, + { 0xe2, 0x47, 0xcc, 0xe5, 0x04, 0x93, 0x9b, 0x8f, 0x0a, 0x36, 0x09, 0x0d, 0xe2, 0x00, 0x93, 0x87, 0x55, 0xe2, 0x44, 0x4b, 0x29, 0x53, 0x9a, 0x7d, 0xa7, 0xa9, 0x02, 0xf6, 0x05, 0x68, 0x35, 0xc0, 0xdb, 0x7b, 0x52, 0x55, 0x94, 0x97, 0xcf, 0xe2, 0xc6, 0x1a, 0x80, 0x86, 0xd0, 0x21, 0x3c, 0x47, 0x2c, 0x78, 0x85, 0x18, 0x00, 0xb1, 0x71, 0xf6, 0x40, 0x1d, 0xe2, 0xe9, 0xc2, 0x75, 0x6f, 0x31 } +, + /* q's CRT exponent dQ */ + 64, + { 0xb1, 0x2f, 0xba, 0x75, 0x78, 0x55, 0xe5, 0x86, 0xe4, 0x6f, 0x64, 0xc3, 0x8a, 0x70, 0xc6, 0x8b, 0x3f, 0x54, 0x8d, 0x93, 0xd7, 0x87, 0xb3, 0x99, 0x99, 0x9d, 0x4c, 0x8f, 0x0b, 0xbd, 0x25, 0x81, 0xc2, 0x1e, 0x19, 0xed, 0x00, 0x18, 0xa6, 0xd5, 0xd3, 0xdf, 0x86, 0x42, 0x4b, 0x3a, 0xbc, 0xad, 0x40, 0x19, 0x9d, 0x31, 0x49, 0x5b, 0x61, 0x30, 0x9f, 0x27, 0xc1, 0xbf, 0x55, 0xd4, 0x87, 0xc1 } +, + /* CRT coefficient qInv */ + 64, + { 0x56, 0x4b, 0x1e, 0x1f, 0xa0, 0x03, 0xbd, 0xa9, 0x1e, 0x89, 0x09, 0x04, 0x25, 0xaa, 0xc0, 0x5b, 0x91, 0xda, 0x9e, 0xe2, 0x50, 0x61, 0xe7, 0x62, 0x8d, 0x5f, 0x51, 0x30, 0x4a, 0x84, 0x99, 0x2f, 0xdc, 0x33, 0x76, 0x2b, 0xd3, 0x78, 0xa5, 0x9f, 0x03, 0x0a, 0x33, 0x4d, 0x53, 0x2b, 0xd0, 0xda, 0xe8, 0xf2, 0x98, 0xea, 0x9e, 0xd8, 0x44, 0x63, 0x6a, 0xd5, 0xfb, 0x8c, 0xbd, 0xc0, 0x3c, 0xad } + +} +, +{{ + "RSASSA-PSS Signature Example 2.1", + /* Message to be signed */ + 61, + { 0xda, 0xba, 0x03, 0x20, 0x66, 0x26, 0x3f, 0xae, 0xdb, 0x65, 0x98, 0x48, 0x11, 0x52, 0x78, 0xa5, 0x2c, 0x44, 0xfa, 0xa3, 0xa7, 0x6f, 0x37, 0x51, 0x5e, 0xd3, 0x36, 0x32, 0x10, 0x72, 0xc4, 0x0a, 0x9d, 0x9b, 0x53, 0xbc, 0x05, 0x01, 0x40, 0x78, 0xad, 0xf5, 0x20, 0x87, 0x51, 0x46, 0xaa, 0xe7, 0x0f, 0xf0, 0x60, 0x22, 0x6d, 0xcb, 0x7b, 0x1f, 0x1f, 0xc2, 0x7e, 0x93, 0x60 } +, + /* Salt */ + 20, + { 0x57, 0xbf, 0x16, 0x0b, 0xcb, 0x02, 0xbb, 0x1d, 0xc7, 0x28, 0x0c, 0xf0, 0x45, 0x85, 0x30, 0xb7, 0xd2, 0x83, 0x2f, 0xf7 } +, + /* Signature */ + 129, + { 0x01, 0x4c, 0x5b, 0xa5, 0x33, 0x83, 0x28, 0xcc, 0xc6, 0xe7, 0xa9, 0x0b, 0xf1, 0xc0, 0xab, 0x3f, 0xd6, 0x06, 0xff, 0x47, 0x96, 0xd3, 0xc1, 0x2e, 0x4b, 0x63, 0x9e, 0xd9, 0x13, 0x6a, 0x5f, 0xec, 0x6c, 0x16, 0xd8, 0x88, 0x4b, 0xdd, 0x99, 0xcf, 0xdc, 0x52, 0x14, 0x56, 0xb0, 0x74, 0x2b, 0x73, 0x68, 0x68, 0xcf, 0x90, 0xde, 0x09, 0x9a, 0xdb, 0x8d, 0x5f, 0xfd, 0x1d, 0xef, 0xf3, 0x9b, 0xa4, 0x00, 0x7a, 0xb7, 0x46, 0xce, 0xfd, 0xb2, 0x2d, 0x7d, 0xf0, 0xe2, 0x25, 0xf5, 0x46, 0x27, 0xdc, 0x65, 0x46, 0x61, 0x31, 0x72, 0x1b, 0x90, 0xaf, 0x44, 0x53, 0x63, 0xa8, 0x35, 0x8b, 0x9f, 0x60, 0x76, 0x42, 0xf7, 0x8f, 0xab, 0x0a, 0xb0, 0xf4, 0x3b, 0x71, 0x68, 0xd6, 0x4b, 0xae, 0x70, 0xd8, 0x82, 0x78, 0x48, 0xd8, 0xef, 0x1e, 0x42, 0x1c, 0x57, 0x54, 0xdd, 0xf4, 0x2c, 0x25, 0x89, 0xb5, 0xb3 } + +} +, +#ifdef LTC_TEST_EXT +{ + "RSASSA-PSS Signature Example 2.2", + /* Message to be signed */ + 234, + { 0xe4, 0xf8, 0x60, 0x1a, 0x8a, 0x6d, 0xa1, 0xbe, 0x34, 0x44, 0x7c, 0x09, 0x59, 0xc0, 0x58, 0x57, 0x0c, 0x36, 0x68, 0xcf, 0xd5, 0x1d, 0xd5, 0xf9, 0xcc, 0xd6, 0xad, 0x44, 0x11, 0xfe, 0x82, 0x13, 0x48, 0x6d, 0x78, 0xa6, 0xc4, 0x9f, 0x93, 0xef, 0xc2, 0xca, 0x22, 0x88, 0xce, 0xbc, 0x2b, 0x9b, 0x60, 0xbd, 0x04, 0xb1, 0xe2, 0x20, 0xd8, 0x6e, 0x3d, 0x48, 0x48, 0xd7, 0x09, 0xd0, 0x32, 0xd1, 0xe8, 0xc6, 0xa0, 0x70, 0xc6, 0xaf, 0x9a, 0x49, 0x9f, 0xcf, 0x95, 0x35, 0x4b, 0x14, 0xba, 0x61, 0x27, 0xc7, 0x39, 0xde, 0x1b, 0xb0, 0xfd, 0x16, 0x43, 0x1e, 0x46, 0x93, 0x8a, 0xec, 0x0c, 0xf8, 0xad, 0x9e, 0xb7, 0x2e, 0x83, 0x2a, 0x70, 0x35, 0xde, 0x9b, 0x78, 0x07, 0xbd, 0xc0, 0xed, 0x8b, 0x68, 0xeb, 0x0f, 0x5a, 0xc2, 0x21, 0x6b, 0xe4, 0x0c, 0xe9, 0x20, 0xc0, 0xdb, 0x0e, 0xdd, 0xd3, 0x86, 0x0e, 0xd7, 0x88, 0xef, 0xac, 0xca, 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83, 0xf2, 0x94, 0x4d, 0x60, 0x81, 0xb1, 0xaa, 0x7c, 0x75, 0x9b, 0x25, 0x4b, 0x2c, 0x34, 0xb6, 0x91, 0xda, 0x67, 0xcc, 0x02, 0x26, 0xe2, 0x0b, 0x2f, 0x18, 0xb4, 0x22, 0x12, 0x76, 0x1d, 0xcd, 0x4b, 0x90, 0x8a, 0x62, 0xb3, 0x71, 0xb5, 0x91, 0x8c, 0x57, 0x42, 0xaf, 0x4b, 0x53, 0x7e, 0x29, 0x69, 0x17, 0x67, 0x4f, 0xb9, 0x14, 0x19, 0x47, 0x61, 0x62, 0x1c, 0xc1, 0x9a, 0x41, 0xf6, 0xfb, 0x95, 0x3f, 0xbc, 0xbb, 0x64, 0x9d, 0xea } + +} +, +{ + "RSASSA-PSS Signature Example 2.3", + /* Message to be signed */ + 102, + { 0x52, 0xa1, 0xd9, 0x6c, 0x8a, 0xc3, 0x9e, 0x41, 0xe4, 0x55, 0x80, 0x98, 0x01, 0xb9, 0x27, 0xa5, 0xb4, 0x45, 0xc1, 0x0d, 0x90, 0x2a, 0x0d, 0xcd, 0x38, 0x50, 0xd2, 0x2a, 0x66, 0xd2, 0xbb, 0x07, 0x03, 0xe6, 0x7d, 0x58, 0x67, 0x11, 0x45, 0x95, 0xaa, 0xbf, 0x5a, 0x7a, 0xeb, 0x5a, 0x8f, 0x87, 0x03, 0x4b, 0xbb, 0x30, 0xe1, 0x3c, 0xfd, 0x48, 0x17, 0xa9, 0xbe, 0x76, 0x23, 0x00, 0x23, 0x60, 0x6d, 0x02, 0x86, 0xa3, 0xfa, 0xf8, 0xa4, 0xd2, 0x2b, 0x72, 0x8e, 0xc5, 0x18, 0x07, 0x9f, 0x9e, 0x64, 0x52, 0x6e, 0x3a, 0x0c, 0xc7, 0x94, 0x1a, 0xa3, 0x38, 0xc4, 0x37, 0x99, 0x7c, 0x68, 0x0c, 0xca, 0xc6, 0x7c, 0x66, 0xbf, 0xa1 } +, + /* Salt */ + 20, + { 0xfc, 0xa8, 0x62, 0x06, 0x8b, 0xce, 0x22, 0x46, 0x72, 0x4b, 0x70, 0x8a, 0x05, 0x19, 0xda, 0x17, 0xe6, 0x48, 0x68, 0x8c } +, + /* Signature */ + 129, + { 0x00, 0x7f, 0x00, 0x30, 0x01, 0x8f, 0x53, 0xcd, 0xc7, 0x1f, 0x23, 0xd0, 0x36, 0x59, 0xfd, 0xe5, 0x4d, 0x42, 0x41, 0xf7, 0x58, 0xa7, 0x50, 0xb4, 0x2f, 0x18, 0x5f, 0x87, 0x57, 0x85, 0x20, 0xc3, 0x07, 0x42, 0xaf, 0xd8, 0x43, 0x59, 0xb6, 0xe6, 0xe8, 0xd3, 0xed, 0x95, 0x9d, 0xc6, 0xfe, 0x48, 0x6b, 0xed, 0xc8, 0xe2, 0xcf, 0x00, 0x1f, 0x63, 0xa7, 0xab, 0xe1, 0x62, 0x56, 0xa1, 0xb8, 0x4d, 0xf0, 0xd2, 0x49, 0xfc, 0x05, 0xd3, 0x19, 0x4c, 0xe5, 0xf0, 0x91, 0x27, 0x42, 0xdb, 0xbf, 0x80, 0xdd, 0x17, 0x4f, 0x6c, 0x51, 0xf6, 0xba, 0xd7, 0xf1, 0x6c, 0xf3, 0x36, 0x4e, 0xba, 0x09, 0x5a, 0x06, 0x26, 0x7d, 0xc3, 0x79, 0x38, 0x03, 0xac, 0x75, 0x26, 0xae, 0xbe, 0x0a, 0x47, 0x5d, 0x38, 0xb8, 0xc2, 0x24, 0x7a, 0xb5, 0x1c, 0x48, 0x98, 0xdf, 0x70, 0x47, 0xdc, 0x6a, 0xdf, 0x52, 0xc6, 0xc4 } + +} +, +{ + "RSASSA-PSS Signature Example 2.4", + /* Message to be signed */ + 30, + { 0xa7, 0x18, 0x2c, 0x83, 0xac, 0x18, 0xbe, 0x65, 0x70, 0xa1, 0x06, 0xaa, 0x9d, 0x5c, 0x4e, 0x3d, 0xbb, 0xd4, 0xaf, 0xae, 0xb0, 0xc6, 0x0c, 0x4a, 0x23, 0xe1, 0x96, 0x9d, 0x79, 0xff } +, + /* Salt */ + 20, + { 0x80, 0x70, 0xef, 0x2d, 0xe9, 0x45, 0xc0, 0x23, 0x87, 0x68, 0x4b, 0xa0, 0xd3, 0x30, 0x96, 0x73, 0x22, 0x35, 0xd4, 0x40 } +, + /* Signature */ + 129, + { 0x00, 0x9c, 0xd2, 0xf4, 0xed, 0xbe, 0x23, 0xe1, 0x23, 0x46, 0xae, 0x8c, 0x76, 0xdd, 0x9a, 0xd3, 0x23, 0x0a, 0x62, 0x07, 0x61, 0x41, 0xf1, 0x6c, 0x15, 0x2b, 0xa1, 0x85, 0x13, 0xa4, 0x8e, 0xf6, 0xf0, 0x10, 0xe0, 0xe3, 0x7f, 0xd3, 0xdf, 0x10, 0xa1, 0xec, 0x62, 0x9a, 0x0c, 0xb5, 0xa3, 0xb5, 0xd2, 0x89, 0x30, 0x07, 0x29, 0x8c, 0x30, 0x93, 0x6a, 0x95, 0x90, 0x3b, 0x6b, 0xa8, 0x55, 0x55, 0xd9, 0xec, 0x36, 0x73, 0xa0, 0x61, 0x08, 0xfd, 0x62, 0xa2, 0xfd, 0xa5, 0x6d, 0x1c, 0xe2, 0xe8, 0x5c, 0x4d, 0xb6, 0xb2, 0x4a, 0x81, 0xca, 0x3b, 0x49, 0x6c, 0x36, 0xd4, 0xfd, 0x06, 0xeb, 0x7c, 0x91, 0x66, 0xd8, 0xe9, 0x48, 0x77, 0xc4, 0x2b, 0xea, 0x62, 0x2b, 0x3b, 0xfe, 0x92, 0x51, 0xfd, 0xc2, 0x1d, 0x8d, 0x53, 0x71, 0xba, 0xda, 0xd7, 0x8a, 0x48, 0x82, 0x14, 0x79, 0x63, 0x35, 0xb4, 0x0b } + +} +, +{ + "RSASSA-PSS Signature Example 2.5", + /* Message to be signed */ + 56, + { 0x86, 0xa8, 0x3d, 0x4a, 0x72, 0xee, 0x93, 0x2a, 0x4f, 0x56, 0x30, 0xaf, 0x65, 0x79, 0xa3, 0x86, 0xb7, 0x8f, 0xe8, 0x89, 0x99, 0xe0, 0xab, 0xd2, 0xd4, 0x90, 0x34, 0xa4, 0xbf, 0xc8, 0x54, 0xdd, 0x94, 0xf1, 0x09, 0x4e, 0x2e, 0x8c, 0xd7, 0xa1, 0x79, 0xd1, 0x95, 0x88, 0xe4, 0xae, 0xfc, 0x1b, 0x1b, 0xd2, 0x5e, 0x95, 0xe3, 0xdd, 0x46, 0x1f } +, + /* Salt */ + 20, + { 0x17, 0x63, 0x9a, 0x4e, 0x88, 0xd7, 0x22, 0xc4, 0xfc, 0xa2, 0x4d, 0x07, 0x9a, 0x8b, 0x29, 0xc3, 0x24, 0x33, 0xb0, 0xc9 } +, + /* Signature */ + 129, + { 0x00, 0xec, 0x43, 0x08, 0x24, 0x93, 0x1e, 0xbd, 0x3b, 0xaa, 0x43, 0x03, 0x4d, 0xae, 0x98, 0xba, 0x64, 0x6b, 0x8c, 0x36, 0x01, 0x3d, 0x16, 0x71, 0xc3, 0xcf, 0x1c, 0xf8, 0x26, 0x0c, 0x37, 0x4b, 0x19, 0xf8, 0xe1, 0xcc, 0x8d, 0x96, 0x50, 0x12, 0x40, 0x5e, 0x7e, 0x9b, 0xf7, 0x37, 0x86, 0x12, 0xdf, 0xcc, 0x85, 0xfc, 0xe1, 0x2c, 0xda, 0x11, 0xf9, 0x50, 0xbd, 0x0b, 0xa8, 0x87, 0x67, 0x40, 0x43, 0x6c, 0x1d, 0x25, 0x95, 0xa6, 0x4a, 0x1b, 0x32, 0xef, 0xcf, 0xb7, 0x4a, 0x21, 0xc8, 0x73, 0xb3, 0xcc, 0x33, 0xaa, 0xf4, 0xe3, 0xdc, 0x39, 0x53, 0xde, 0x67, 0xf0, 0x67, 0x4c, 0x04, 0x53, 0xb4, 0xfd, 0x9f, 0x60, 0x44, 0x06, 0xd4, 0x41, 0xb8, 0x16, 0x09, 0x8c, 0xb1, 0x06, 0xfe, 0x34, 0x72, 0xbc, 0x25, 0x1f, 0x81, 0x5f, 0x59, 0xdb, 0x2e, 0x43, 0x78, 0xa3, 0xad, 0xdc, 0x18, 0x1e, 0xcf } + +} +, +{ + "RSASSA-PSS Signature Example 2.6", + /* Message to be signed */ + 26, + { 0x04, 0x9f, 0x91, 0x54, 0xd8, 0x71, 0xac, 0x4a, 0x7c, 0x7a, 0xb4, 0x53, 0x25, 0xba, 0x75, 0x45, 0xa1, 0xed, 0x08, 0xf7, 0x05, 0x25, 0xb2, 0x66, 0x7c, 0xf1 } +, + /* Salt */ + 20, + { 0x37, 0x81, 0x0d, 0xef, 0x10, 0x55, 0xed, 0x92, 0x2b, 0x06, 0x3d, 0xf7, 0x98, 0xde, 0x5d, 0x0a, 0xab, 0xf8, 0x86, 0xee } +, + /* Signature */ + 129, + { 0x00, 0x47, 0x5b, 0x16, 0x48, 0xf8, 0x14, 0xa8, 0xdc, 0x0a, 0xbd, 0xc3, 0x7b, 0x55, 0x27, 0xf5, 0x43, 0xb6, 0x66, 0xbb, 0x6e, 0x39, 0xd3, 0x0e, 0x5b, 0x49, 0xd3, 0xb8, 0x76, 0xdc, 0xcc, 0x58, 0xea, 0xc1, 0x4e, 0x32, 0xa2, 0xd5, 0x5c, 0x26, 0x16, 0x01, 0x44, 0x56, 0xad, 0x2f, 0x24, 0x6f, 0xc8, 0xe3, 0xd5, 0x60, 0xda, 0x3d, 0xdf, 0x37, 0x9a, 0x1c, 0x0b, 0xd2, 0x00, 0xf1, 0x02, 0x21, 0xdf, 0x07, 0x8c, 0x21, 0x9a, 0x15, 0x1b, 0xc8, 0xd4, 0xec, 0x9d, 0x2f, 0xc2, 0x56, 0x44, 0x67, 0x81, 0x10, 0x14, 0xef, 0x15, 0xd8, 0xea, 0x01, 0xc2, 0xeb, 0xbf, 0xf8, 0xc2, 0xc8, 0xef, 0xab, 0x38, 0x09, 0x6e, 0x55, 0xfc, 0xbe, 0x32, 0x85, 0xc7, 0xaa, 0x55, 0x88, 0x51, 0x25, 0x4f, 0xaf, 0xfa, 0x92, 0xc1, 0xc7, 0x2b, 0x78, 0x75, 0x86, 0x63, 0xef, 0x45, 0x82, 0x84, 0x31, 0x39, 0xd7, 0xa6 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 3: A 1026-bit RSA Key Pair", +{ + /* RSA modulus n */ + 129, + { 0x02, 0xf2, 0x46, 0xef, 0x45, 0x1e, 0xd3, 0xee, 0xbb, 0x9a, 0x31, 0x02, 0x00, 0xcc, 0x25, 0x85, 0x9c, 0x04, 0x8e, 0x4b, 0xe7, 0x98, 0x30, 0x29, 0x91, 0x11, 0x2e, 0xb6, 0x8c, 0xe6, 0xdb, 0x67, 0x4e, 0x28, 0x0d, 0xa2, 0x1f, 0xed, 0xed, 0x1a, 0xe7, 0x48, 0x80, 0xca, 0x52, 0x2b, 0x18, 0xdb, 0x24, 0x93, 0x85, 0x01, 0x28, 0x27, 0xc5, 0x15, 0xf0, 0xe4, 0x66, 0xa1, 0xff, 0xa6, 0x91, 0xd9, 0x81, 0x70, 0x57, 0x4e, 0x9d, 0x0e, 0xad, 0xb0, 0x87, 0x58, 0x6c, 0xa4, 0x89, 0x33, 0xda, 0x3c, 0xc9, 0x53, 0xd9, 0x5b, 0xd0, 0xed, 0x50, 0xde, 0x10, 0xdd, 0xcb, 0x67, 0x36, 0x10, 0x7d, 0x6c, 0x83, 0x1c, 0x7f, 0x66, 0x3e, 0x83, 0x3c, 0xa4, 0xc0, 0x97, 0xe7, 0x00, 0xce, 0x0f, 0xb9, 0x45, 0xf8, 0x8f, 0xb8, 0x5f, 0xe8, 0xe5, 0xa7, 0x73, 0x17, 0x25, 0x65, 0xb9, 0x14, 0xa4, 0x71, 0xa4, 0x43 } +, + /* RSA public exponent e */ + 3, + { 0x01, 0x00, 0x01 } +, + /* RSA private exponent d */ + 128, + { 0x65, 0x14, 0x51, 0x73, 0x3b, 0x56, 0xde, 0x5a, 0xc0, 0xa6, 0x89, 0xa4, 0xae, 0xb6, 0xe6, 0x89, 0x4a, 0x69, 0x01, 0x4e, 0x07, 0x6c, 0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 0xe1, 0x9d, 0x5d, 0xc8, 0x62, 0x92, 0xb3, 0xa1, 0x92, 0xfd, 0xf6, 0xe0, 0xdd, 0x37, 0x87, 0x7b, 0xad, 0x14, 0x82, 0x2f, 0xa0, 0x01, 0x90, 0xca, 0xb2, 0x65, 0xf9, 0x0d, 0x3f, 0x02, 0x05, 0x7b, 0x6f, 0x54, 0xd6, 0xec, 0xb1, 0x44, 0x91, 0xe5, 0xad, 0xea, 0xce, 0xbc, 0x48, 0xbf, 0x0e, 0xbd, 0x2a, 0x2a, 0xd2, 0x6d, 0x40, 0x2e, 0x54, 0xf6, 0x16, 0x51 } +, + /* p's CRT exponent dP */ + 64, + { 0x1f, 0x27, 0x79, 0xfd, 0x2e, 0x3e, 0x5e, 0x6b, 0xae, 0x05, 0x53, 0x95, 0x18, 0xfb, 0xa0, 0xcd, 0x0e, 0xad, 0x1a, 0xa4, 0x51, 0x3a, 0x7c, 0xba, 0x18, 0xf1, 0xcf, 0x10, 0xe3, 0xf6, 0x81, 0x95, 0x69, 0x3d, 0x27, 0x8a, 0x0f, 0x0e, 0xe7, 0x2f, 0x89, 0xf9, 0xbc, 0x76, 0x0d, 0x80, 0xe2, 0xf9, 0xd0, 0x26, 0x1d, 0x51, 0x65, 0x01, 0xc6, 0xae, 0x39, 0xf1, 0x4a, 0x47, 0x6c, 0xe2, 0xcc, 0xf5 } +, + /* q's CRT exponent dQ */ + 65, + { 0x01, 0x1a, 0x0d, 0x36, 0x79, 0x4b, 0x04, 0xa8, 0x54, 0xaa, 0xb4, 0xb2, 0x46, 0x2d, 0x43, 0x9a, 0x50, 0x46, 0xc9, 0x1d, 0x94, 0x0b, 0x2b, 0xc6, 0xf7, 0x5b, 0x62, 0x95, 0x6f, 0xef, 0x35, 0xa2, 0xa6, 0xe6, 0x3c, 0x53, 0x09, 0x81, 0x7f, 0x30, 0x7b, 0xbf, 0xf9, 0xd5, 0x9e, 0x7e, 0x33, 0x1b, 0xd3, 0x63, 0xf6, 0xd6, 0x68, 0x49, 0xb1, 0x83, 0x46, 0xad, 0xea, 0x16, 0x9f, 0x0a, 0xe9, 0xae, 0xc1 } +, + /* CRT coefficient qInv */ + 64, + { 0x0b, 0x30, 0xf0, 0xec, 0xf5, 0x58, 0x75, 0x2f, 0xb3, 0xa6, 0xce, 0x4b, 0xa2, 0xb8, 0xc6, 0x75, 0xf6, 0x59, 0xeb, 0xa6, 0xc3, 0x76, 0x58, 0x5a, 0x1b, 0x39, 0x71, 0x2d, 0x03, 0x8a, 0xe3, 0xd2, 0xb4, 0x6f, 0xcb, 0x41, 0x8a, 0xe1, 0x5d, 0x09, 0x05, 0xda, 0x64, 0x40, 0xe1, 0x51, 0x3a, 0x30, 0xb9, 0xb7, 0xd6, 0x66, 0x8f, 0xbc, 0x5e, 0x88, 0xe5, 0xab, 0x7a, 0x17, 0x5e, 0x73, 0xba, 0x35 } + +} +, +{{ + "RSASSA-PSS Signature Example 3.1", + /* Message to be signed */ + 30, + { 0x59, 0x4b, 0x37, 0x33, 0x3b, 0xbb, 0x2c, 0x84, 0x52, 0x4a, 0x87, 0xc1, 0xa0, 0x1f, 0x75, 0xfc, 0xec, 0x0e, 0x32, 0x56, 0xf1, 0x08, 0xe3, 0x8d, 0xca, 0x36, 0xd7, 0x0d, 0x00, 0x57 } +, + /* Salt */ + 20, + { 0xf3, 0x1a, 0xd6, 0xc8, 0xcf, 0x89, 0xdf, 0x78, 0xed, 0x77, 0xfe, 0xac, 0xbc, 0xc2, 0xf8, 0xb0, 0xa8, 0xe4, 0xcf, 0xaa } +, + /* Signature */ + 129, + { 0x00, 0x88, 0xb1, 0x35, 0xfb, 0x17, 0x94, 0xb6, 0xb9, 0x6c, 0x4a, 0x3e, 0x67, 0x81, 0x97, 0xf8, 0xca, 0xc5, 0x2b, 0x64, 0xb2, 0xfe, 0x90, 0x7d, 0x6f, 0x27, 0xde, 0x76, 0x11, 0x24, 0x96, 0x4a, 0x99, 0xa0, 0x1a, 0x88, 0x27, 0x40, 0xec, 0xfa, 0xed, 0x6c, 0x01, 0xa4, 0x74, 0x64, 0xbb, 0x05, 0x18, 0x23, 0x13, 0xc0, 0x13, 0x38, 0xa8, 0xcd, 0x09, 0x72, 0x14, 0xcd, 0x68, 0xca, 0x10, 0x3b, 0xd5, 0x7d, 0x3b, 0xc9, 0xe8, 0x16, 0x21, 0x3e, 0x61, 0xd7, 0x84, 0xf1, 0x82, 0x46, 0x7a, 0xbf, 0x8a, 0x01, 0xcf, 0x25, 0x3e, 0x99, 0xa1, 0x56, 0xea, 0xa8, 0xe3, 0xe1, 0xf9, 0x0e, 0x3c, 0x6e, 0x4e, 0x3a, 0xa2, 0xd8, 0x3e, 0xd0, 0x34, 0x5b, 0x89, 0xfa, 0xfc, 0x9c, 0x26, 0x07, 0x7c, 0x14, 0xb6, 0xac, 0x51, 0x45, 0x4f, 0xa2, 0x6e, 0x44, 0x6e, 0x3a, 0x2f, 0x15, 0x3b, 0x2b, 0x16, 0x79, 0x7f } + +} +, +#ifdef LTC_TEST_EXT +{ + "RSASSA-PSS Signature Example 3.2", + /* Message to be signed */ + 29, + { 0x8b, 0x76, 0x95, 0x28, 0x88, 0x4a, 0x0d, 0x1f, 0xfd, 0x09, 0x0c, 0xf1, 0x02, 0x99, 0x3e, 0x79, 0x6d, 0xad, 0xcf, 0xbd, 0xdd, 0x38, 0xe4, 0x4f, 0xf6, 0x32, 0x4c, 0xa4, 0x51 } +, + /* Salt */ + 20, + { 0xfc, 0xf9, 0xf0, 0xe1, 0xf1, 0x99, 0xa3, 0xd1, 0xd0, 0xda, 0x68, 0x1c, 0x5b, 0x86, 0x06, 0xfc, 0x64, 0x29, 0x39, 0xf7 } +, + /* Signature */ + 129, + { 0x02, 0xa5, 0xf0, 0xa8, 0x58, 0xa0, 0x86, 0x4a, 0x4f, 0x65, 0x01, 0x7a, 0x7d, 0x69, 0x45, 0x4f, 0x3f, 0x97, 0x3a, 0x29, 0x99, 0x83, 0x9b, 0x7b, 0xbc, 0x48, 0xbf, 0x78, 0x64, 0x11, 0x69, 0x17, 0x95, 0x56, 0xf5, 0x95, 0xfa, 0x41, 0xf6, 0xff, 0x18, 0xe2, 0x86, 0xc2, 0x78, 0x30, 0x79, 0xbc, 0x09, 0x10, 0xee, 0x9c, 0xc3, 0x4f, 0x49, 0xba, 0x68, 0x11, 0x24, 0xf9, 0x23, 0xdf, 0xa8, 0x8f, 0x42, 0x61, 0x41, 0xa3, 0x68, 0xa5, 0xf5, 0xa9, 0x30, 0xc6, 0x28, 0xc2, 0xc3, 0xc2, 0x00, 0xe1, 0x8a, 0x76, 0x44, 0x72, 0x1a, 0x0c, 0xbe, 0xc6, 0xdd, 0x3f, 0x62, 0x79, 0xbd, 0xe3, 0xe8, 0xf2, 0xbe, 0x5e, 0x2d, 0x4e, 0xe5, 0x6f, 0x97, 0xe7, 0xce, 0xaf, 0x33, 0x05, 0x4b, 0xe7, 0x04, 0x2b, 0xd9, 0x1a, 0x63, 0xbb, 0x09, 0xf8, 0x97, 0xbd, 0x41, 0xe8, 0x11, 0x97, 0xde, 0xe9, 0x9b, 0x11, 0xaf } + +} +, +{ + "RSASSA-PSS Signature Example 3.3", + /* Message to be signed */ + 167, + { 0x1a, 0xbd, 0xba, 0x48, 0x9c, 0x5a, 0xda, 0x2f, 0x99, 0x5e, 0xd1, 0x6f, 0x19, 0xd5, 0xa9, 0x4d, 0x9e, 0x6e, 0xc3, 0x4a, 0x8d, 0x84, 0xf8, 0x45, 0x57, 0xd2, 0x6e, 0x5e, 0xf9, 0xb0, 0x2b, 0x22, 0x88, 0x7e, 0x3f, 0x9a, 0x4b, 0x69, 0x0a, 0xd1, 0x14, 0x92, 0x09, 0xc2, 0x0c, 0x61, 0x43, 0x1f, 0x0c, 0x01, 0x7c, 0x36, 0xc2, 0x65, 0x7b, 0x35, 0xd7, 0xb0, 0x7d, 0x3f, 0x5a, 0xd8, 0x70, 0x85, 0x07, 0xa9, 0xc1, 0xb8, 0x31, 0xdf, 0x83, 0x5a, 0x56, 0xf8, 0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, 0x8e, 0xa4, 0xec, 0xad, 0x2c, 0x29, 0xdd, 0x9f, 0x95, 0xbc, 0x07, 0xfe, 0x91, 0xec, 0xf8, 0xbe, 0xe2, 0x55, 0xbf, 0xe8, 0x76, 0x2f, 0xd7, 0x69, 0x0a, 0xa9, 0xbf, 0xa4, 0xfa, 0x08, 0x49, 0xef, 0x72, 0x8c, 0x2c, 0x42, 0xc4, 0x53, 0x23, 0x64, 0x52, 0x2d, 0xf2, 0xab, 0x7f, 0x9f, 0x8a, 0x03, 0xb6, 0x3f, 0x7a, 0x49, 0x91, 0x75, 0x82, 0x86, 0x68, 0xf5, 0xef, 0x5a, 0x29, 0xe3, 0x80, 0x2c } + +} +, +{ + "RSASSA-PSS Signature Example 3.4", + /* Message to be signed */ + 73, + { 0x8f, 0xb4, 0x31, 0xf5, 0xee, 0x79, 0x2b, 0x6c, 0x2a, 0xc7, 0xdb, 0x53, 0xcc, 0x42, 0x86, 0x55, 0xae, 0xb3, 0x2d, 0x03, 0xf4, 0xe8, 0x89, 0xc5, 0xc2, 0x5d, 0xe6, 0x83, 0xc4, 0x61, 0xb5, 0x3a, 0xcf, 0x89, 0xf9, 0xf8, 0xd3, 0xaa, 0xbd, 0xf6, 0xb9, 0xf0, 0xc2, 0xa1, 0xde, 0x12, 0xe1, 0x5b, 0x49, 0xed, 0xb3, 0x91, 0x9a, 0x65, 0x2f, 0xe9, 0x49, 0x1c, 0x25, 0xa7, 0xfc, 0xe1, 0xf7, 0x22, 0xc2, 0x54, 0x36, 0x08, 0xb6, 0x9d, 0xc3, 0x75, 0xec } +, + /* Salt */ + 20, + { 0xf8, 0x31, 0x2d, 0x9c, 0x8e, 0xea, 0x13, 0xec, 0x0a, 0x4c, 0x7b, 0x98, 0x12, 0x0c, 0x87, 0x50, 0x90, 0x87, 0xc4, 0x78 } +, + /* Signature */ + 129, + { 0x01, 0x96, 0xf1, 0x2a, 0x00, 0x5b, 0x98, 0x12, 0x9c, 0x8d, 0xf1, 0x3c, 0x4c, 0xb1, 0x6f, 0x8a, 0xa8, 0x87, 0xd3, 0xc4, 0x0d, 0x96, 0xdf, 0x3a, 0x88, 0xe7, 0x53, 0x2e, 0xf3, 0x9c, 0xd9, 0x92, 0xf2, 0x73, 0xab, 0xc3, 0x70, 0xbc, 0x1b, 0xe6, 0xf0, 0x97, 0xcf, 0xeb, 0xbf, 0x01, 0x18, 0xfd, 0x9e, 0xf4, 0xb9, 0x27, 0x15, 0x5f, 0x3d, 0xf2, 0x2b, 0x90, 0x4d, 0x90, 0x70, 0x2d, 0x1f, 0x7b, 0xa7, 0xa5, 0x2b, 0xed, 0x8b, 0x89, 0x42, 0xf4, 0x12, 0xcd, 0x7b, 0xd6, 0x76, 0xc9, 0xd1, 0x8e, 0x17, 0x03, 0x91, 0xdc, 0xd3, 0x45, 0xc0, 0x6a, 0x73, 0x09, 0x64, 0xb3, 0xf3, 0x0b, 0xcc, 0xe0, 0xbb, 0x20, 0xba, 0x10, 0x6f, 0x9a, 0xb0, 0xee, 0xb3, 0x9c, 0xf8, 0xa6, 0x60, 0x7f, 0x75, 0xc0, 0x34, 0x7f, 0x0a, 0xf7, 0x9f, 0x16, 0xaf, 0xa0, 0x81, 0xd2, 0xc9, 0x2d, 0x1e, 0xe6, 0xf8, 0x36, 0xb8 } + +} +, +{ + "RSASSA-PSS Signature Example 3.5", + /* Message to be signed */ + 115, + { 0xfe, 0xf4, 0x16, 0x1d, 0xfa, 0xaf, 0x9c, 0x52, 0x95, 0x05, 0x1d, 0xfc, 0x1f, 0xf3, 0x81, 0x0c, 0x8c, 0x9e, 0xc2, 0xe8, 0x66, 0xf7, 0x07, 0x54, 0x22, 0xc8, 0xec, 0x42, 0x16, 0xa9, 0xc4, 0xff, 0x49, 0x42, 0x7d, 0x48, 0x3c, 0xae, 0x10, 0xc8, 0x53, 0x4a, 0x41, 0xb2, 0xfd, 0x15, 0xfe, 0xe0, 0x69, 0x60, 0xec, 0x6f, 0xb3, 0xf7, 0xa7, 0xe9, 0x4a, 0x2f, 0x8a, 0x2e, 0x3e, 0x43, 0xdc, 0x4a, 0x40, 0x57, 0x6c, 0x30, 0x97, 0xac, 0x95, 0x3b, 0x1d, 0xe8, 0x6f, 0x0b, 0x4e, 0xd3, 0x6d, 0x64, 0x4f, 0x23, 0xae, 0x14, 0x42, 0x55, 0x29, 0x62, 0x24, 0x64, 0xca, 0x0c, 0xbf, 0x0b, 0x17, 0x41, 0x34, 0x72, 0x38, 0x15, 0x7f, 0xab, 0x59, 0xe4, 0xde, 0x55, 0x24, 0x09, 0x6d, 0x62, 0xba, 0xec, 0x63, 0xac, 0x64 } +, + /* Salt */ + 20, + { 0x50, 0x32, 0x7e, 0xfe, 0xc6, 0x29, 0x2f, 0x98, 0x01, 0x9f, 0xc6, 0x7a, 0x2a, 0x66, 0x38, 0x56, 0x3e, 0x9b, 0x6e, 0x2d } +, + /* Signature */ + 129, + { 0x02, 0x1e, 0xca, 0x3a, 0xb4, 0x89, 0x22, 0x64, 0xec, 0x22, 0x41, 0x1a, 0x75, 0x2d, 0x92, 0x22, 0x10, 0x76, 0xd4, 0xe0, 0x1c, 0x0e, 0x6f, 0x0d, 0xde, 0x9a, 0xfd, 0x26, 0xba, 0x5a, 0xcf, 0x6d, 0x73, 0x9e, 0xf9, 0x87, 0x54, 0x5d, 0x16, 0x68, 0x3e, 0x56, 0x74, 0xc9, 0xe7, 0x0f, 0x1d, 0xe6, 0x49, 0xd7, 0xe6, 0x1d, 0x48, 0xd0, 0xca, 0xeb, 0x4f, 0xb4, 0xd8, 0xb2, 0x4f, 0xba, 0x84, 0xa6, 0xe3, 0x10, 0x8f, 0xee, 0x7d, 0x07, 0x05, 0x97, 0x32, 0x66, 0xac, 0x52, 0x4b, 0x4a, 0xd2, 0x80, 0xf7, 0xae, 0x17, 0xdc, 0x59, 0xd9, 0x6d, 0x33, 0x51, 0x58, 0x6b, 0x5a, 0x3b, 0xdb, 0x89, 0x5d, 0x1e, 0x1f, 0x78, 0x20, 0xac, 0x61, 0x35, 0xd8, 0x75, 0x34, 0x80, 0x99, 0x83, 0x82, 0xba, 0x32, 0xb7, 0x34, 0x95, 0x59, 0x60, 0x8c, 0x38, 0x74, 0x52, 0x90, 0xa8, 0x5e, 0xf4, 0xe9, 0xf9, 0xbd, 0x83 } + +} +, +{ + "RSASSA-PSS Signature Example 3.6", + /* Message to be signed */ + 22, + { 0xef, 0xd2, 0x37, 0xbb, 0x09, 0x8a, 0x44, 0x3a, 0xee, 0xb2, 0xbf, 0x6c, 0x3f, 0x8c, 0x81, 0xb8, 0xc0, 0x1b, 0x7f, 0xcb, 0x3f, 0xeb } +, + /* Salt */ + 20, + { 0xb0, 0xde, 0x3f, 0xc2, 0x5b, 0x65, 0xf5, 0xaf, 0x96, 0xb1, 0xd5, 0xcc, 0x3b, 0x27, 0xd0, 0xc6, 0x05, 0x30, 0x87, 0xb3 } +, + /* Signature */ + 129, + { 0x01, 0x2f, 0xaf, 0xec, 0x86, 0x2f, 0x56, 0xe9, 0xe9, 0x2f, 0x60, 0xab, 0x0c, 0x77, 0x82, 0x4f, 0x42, 0x99, 0xa0, 0xca, 0x73, 0x4e, 0xd2, 0x6e, 0x06, 0x44, 0xd5, 0xd2, 0x22, 0xc7, 0xf0, 0xbd, 0xe0, 0x39, 0x64, 0xf8, 0xe7, 0x0a, 0x5c, 0xb6, 0x5e, 0xd4, 0x4e, 0x44, 0xd5, 0x6a, 0xe0, 0xed, 0xf1, 0xff, 0x86, 0xca, 0x03, 0x2c, 0xc5, 0xdd, 0x44, 0x04, 0xdb, 0xb7, 0x6a, 0xb8, 0x54, 0x58, 0x6c, 0x44, 0xee, 0xd8, 0x33, 0x6d, 0x08, 0xd4, 0x57, 0xce, 0x6c, 0x03, 0x69, 0x3b, 0x45, 0xc0, 0xf1, 0xef, 0xef, 0x93, 0x62, 0x4b, 0x95, 0xb8, 0xec, 0x16, 0x9c, 0x61, 0x6d, 0x20, 0xe5, 0x53, 0x8e, 0xbc, 0x0b, 0x67, 0x37, 0xa6, 0xf8, 0x2b, 0x4b, 0xc0, 0x57, 0x09, 0x24, 0xfc, 0x6b, 0x35, 0x75, 0x9a, 0x33, 0x48, 0x42, 0x62, 0x79, 0xf8, 0xb3, 0xd7, 0x74, 0x4e, 0x2d, 0x22, 0x24, 0x26, 0xce } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 4: A 1027-bit RSA Key Pair", +{ + /* RSA modulus n */ + 129, + { 0x05, 0x4a, 0xdb, 0x78, 0x86, 0x44, 0x7e, 0xfe, 0x6f, 0x57, 0xe0, 0x36, 0x8f, 0x06, 0xcf, 0x52, 0xb0, 0xa3, 0x37, 0x07, 0x60, 0xd1, 0x61, 0xce, 0xf1, 0x26, 0xb9, 0x1b, 0xe7, 0xf8, 0x9c, 0x42, 0x1b, 0x62, 0xa6, 0xec, 0x1d, 0xa3, 0xc3, 0x11, 0xd7, 0x5e, 0xd5, 0x0e, 0x0a, 0xb5, 0xff, 0xf3, 0xfd, 0x33, 0x8a, 0xcc, 0x3a, 0xa8, 0xa4, 0xe7, 0x7e, 0xe2, 0x63, 0x69, 0xac, 0xb8, 0x1b, 0xa9, 0x00, 0xfa, 0x83, 0xf5, 0x30, 0x0c, 0xf9, 0xbb, 0x6c, 0x53, 0xad, 0x1d, 0xc8, 0xa1, 0x78, 0xb8, 0x15, 0xdb, 0x42, 0x35, 0xa9, 0xa9, 0xda, 0x0c, 0x06, 0xde, 0x4e, 0x61, 0x5e, 0xa1, 0x27, 0x7c, 0xe5, 0x59, 0xe9, 0xc1, 0x08, 0xde, 0x58, 0xc1, 0x4a, 0x81, 0xaa, 0x77, 0xf5, 0xa6, 0xf8, 0xd1, 0x33, 0x54, 0x94, 0x49, 0x88, 0x48, 0xc8, 0xb9, 0x59, 0x40, 0x74, 0x0b, 0xe7, 0xbf, 0x7c, 0x37, 0x05 } +, + /* RSA public exponent e */ + 3, + { 0x01, 0x00, 0x01 } +, + /* RSA private exponent d */ + 128, + { 0xfa, 0x04, 0x1f, 0x8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 0x1a, 0x5e, 0xa8, 0xd1, 0x48, 0x41, 0x39, 0x95 } +, + /* Prime q */ + 65, + { 0x02, 0x0e, 0xf5, 0xef, 0xe7, 0xc5, 0x39, 0x4a, 0xed, 0x22, 0x72, 0xf7, 0xe8, 0x1a, 0x74, 0xf4, 0xc0, 0x2d, 0x14, 0x58, 0x94, 0xcb, 0x1b, 0x3c, 0xab, 0x23, 0xa9, 0xa0, 0x71, 0x0a, 0x2a, 0xfc, 0x7e, 0x33, 0x29, 0xac, 0xbb, 0x74, 0x3d, 0x01, 0xf6, 0x80, 0xc4, 0xd0, 0x2a, 0xfb, 0x4c, 0x8f, 0xde, 0x7e, 0x20, 0x93, 0x08, 0x11, 0xbb, 0x2b, 0x99, 0x57, 0x88, 0xb5, 0xe8, 0x72, 0xc2, 0x0b, 0xb1 } +, + /* p's CRT exponent dP */ + 65, + { 0x02, 0x6e, 0x7e, 0x28, 0x01, 0x0e, 0xcf, 0x24, 0x12, 0xd9, 0x52, 0x3a, 0xd7, 0x04, 0x64, 0x7f, 0xb4, 0xfe, 0x9b, 0x66, 0xb1, 0xa6, 0x81, 0x58, 0x1b, 0x0e, 0x15, 0x55, 0x3a, 0x89, 0xb1, 0x54, 0x28, 0x28, 0x89, 0x8f, 0x27, 0x24, 0x3e, 0xba, 0xb4, 0x5f, 0xf5, 0xe1, 0xac, 0xb9, 0xd4, 0xdf, 0x1b, 0x05, 0x1f, 0xbc, 0x62, 0x82, 0x4d, 0xbc, 0x6f, 0x6c, 0x93, 0x26, 0x1a, 0x78, 0xb9, 0xa7, 0x59 } +, + /* q's CRT exponent dQ */ + 65, + { 0x01, 0x2d, 0xdc, 0xc8, 0x6e, 0xf6, 0x55, 0x99, 0x8c, 0x39, 0xdd, 0xae, 0x11, 0x71, 0x86, 0x69, 0xe5, 0xe4, 0x6c, 0xf1, 0x49, 0x5b, 0x07, 0xe1, 0x3b, 0x10, 0x14, 0xcd, 0x69, 0xb3, 0xaf, 0x68, 0x30, 0x4a, 0xd2, 0xa6, 0xb6, 0x43, 0x21, 0xe7, 0x8b, 0xf3, 0xbb, 0xca, 0x9b, 0xb4, 0x94, 0xe9, 0x1d, 0x45, 0x17, 0x17, 0xe2, 0xd9, 0x75, 0x64, 0xc6, 0x54, 0x94, 0x65, 0xd0, 0x20, 0x5c, 0xf4, 0x21 } +, + /* CRT coefficient qInv */ + 65, + { 0x01, 0x06, 0x00, 0xc4, 0xc2, 0x18, 0x47, 0x45, 0x9f, 0xe5, 0x76, 0x70, 0x3e, 0x2e, 0xbe, 0xca, 0xe8, 0xa5, 0x09, 0x4e, 0xe6, 0x3f, 0x53, 0x6b, 0xf4, 0xac, 0x68, 0xd3, 0xc1, 0x3e, 0x5e, 0x4f, 0x12, 0xac, 0x5c, 0xc1, 0x0a, 0xb6, 0xa2, 0xd0, 0x5a, 0x19, 0x92, 0x14, 0xd1, 0x82, 0x47, 0x47, 0xd5, 0x51, 0x90, 0x96, 0x36, 0xb7, 0x74, 0xc2, 0x2c, 0xac, 0x0b, 0x83, 0x75, 0x99, 0xab, 0xcc, 0x75 } + +} +, +{{ + "RSASSA-PSS Signature Example 4.1", + /* Message to be signed */ + 8, + { 0x9f, 0xb0, 0x3b, 0x82, 0x7c, 0x82, 0x17, 0xd9 } +, + /* Salt */ + 20, + { 0xed, 0x7c, 0x98, 0xc9, 0x5f, 0x30, 0x97, 0x4f, 0xbe, 0x4f, 0xbd, 0xdc, 0xf0, 0xf2, 0x8d, 0x60, 0x21, 0xc0, 0xe9, 0x1d } +, + /* Signature */ + 129, + { 0x03, 0x23, 0xd5, 0xb7, 0xbf, 0x20, 0xba, 0x45, 0x39, 0x28, 0x9a, 0xe4, 0x52, 0xae, 0x42, 0x97, 0x08, 0x0f, 0xef, 0xf4, 0x51, 0x84, 0x23, 0xff, 0x48, 0x11, 0xa8, 0x17, 0x83, 0x7e, 0x7d, 0x82, 0xf1, 0x83, 0x6c, 0xdf, 0xab, 0x54, 0x51, 0x4f, 0xf0, 0x88, 0x7b, 0xdd, 0xee, 0xbf, 0x40, 0xbf, 0x99, 0xb0, 0x47, 0xab, 0xc3, 0xec, 0xfa, 0x6a, 0x37, 0xa3, 0xef, 0x00, 0xf4, 0xa0, 0xc4, 0xa8, 0x8a, 0xae, 0x09, 0x04, 0xb7, 0x45, 0xc8, 0x46, 0xc4, 0x10, 0x7e, 0x87, 0x97, 0x72, 0x3e, 0x8a, 0xc8, 0x10, 0xd9, 0xe3, 0xd9, 0x5d, 0xfa, 0x30, 0xff, 0x49, 0x66, 0xf4, 0xd7, 0x5d, 0x13, 0x76, 0x8d, 0x20, 0x85, 0x7f, 0x2b, 0x14, 0x06, 0xf2, 0x64, 0xcf, 0xe7, 0x5e, 0x27, 0xd7, 0x65, 0x2f, 0x4b, 0x5e, 0xd3, 0x57, 0x5f, 0x28, 0xa7, 0x02, 0xf8, 0xc4, 0xed, 0x9c, 0xf9, 0xb2, 0xd4, 0x49, 0x48 } + +} +, +#ifdef LTC_TEST_EXT +{ + "RSASSA-PSS Signature Example 4.2", + /* Message to be signed */ + 167, + { 0x0c, 0xa2, 0xad, 0x77, 0x79, 0x7e, 0xce, 0x86, 0xde, 0x5b, 0xf7, 0x68, 0x75, 0x0d, 0xdb, 0x5e, 0xd6, 0xa3, 0x11, 0x6a, 0xd9, 0x9b, 0xbd, 0x17, 0xed, 0xf7, 0xf7, 0x82, 0xf0, 0xdb, 0x1c, 0xd0, 0x5b, 0x0f, 0x67, 0x74, 0x68, 0xc5, 0xea, 0x42, 0x0d, 0xc1, 0x16, 0xb1, 0x0e, 0x80, 0xd1, 0x10, 0xde, 0x2b, 0x04, 0x61, 0xea, 0x14, 0xa3, 0x8b, 0xe6, 0x86, 0x20, 0x39, 0x2e, 0x7e, 0x89, 0x3c, 0xb4, 0xea, 0x93, 0x93, 0xfb, 0x88, 0x6c, 0x20, 0xff, 0x79, 0x06, 0x42, 0x30, 0x5b, 0xf3, 0x02, 0x00, 0x38, 0x92, 0xe5, 0x4d, 0xf9, 0xf6, 0x67, 0x50, 0x9d, 0xc5, 0x39, 0x20, 0xdf, 0x58, 0x3f, 0x50, 0xa3, 0xdd, 0x61, 0xab, 0xb6, 0xfa, 0xb7, 0x5d, 0x60, 0x03, 0x77, 0xe3, 0x83, 0xe6, 0xac, 0xa6, 0x71, 0x0e, 0xee, 0xa2, 0x71, 0x56, 0xe0, 0x67, 0x52, 0xc9, 0x4c, 0xe2, 0x5a, 0xe9, 0x9f, 0xcb, 0xf8, 0x59, 0x2d, 0xbe, 0x2d, 0x7e, 0x27, 0x45, 0x3c, 0xb4, 0x4d, 0xe0, 0x71, 0x00, 0xeb, 0xb1, 0xa2, 0xa1, 0x98, 0x11, 0xa4, 0x78, 0xad, 0xbe, 0xab, 0x27, 0x0f, 0x94, 0xe8, 0xfe, 0x36, 0x9d, 0x90, 0xb3, 0xca, 0x61, 0x2f, 0x9f } +, + /* Salt */ + 20, + { 0x22, 0xd7, 0x1d, 0x54, 0x36, 0x3a, 0x42, 0x17, 0xaa, 0x55, 0x11, 0x3f, 0x05, 0x9b, 0x33, 0x84, 0xe3, 0xe5, 0x7e, 0x44 } +, + /* Signature */ + 129, + { 0x04, 0x9d, 0x01, 0x85, 0x84, 0x5a, 0x26, 0x4d, 0x28, 0xfe, 0xb1, 0xe6, 0x9e, 0xda, 0xec, 0x09, 0x06, 0x09, 0xe8, 0xe4, 0x6d, 0x93, 0xab, 0xb3, 0x83, 0x71, 0xce, 0x51, 0xf4, 0xaa, 0x65, 0xa5, 0x99, 0xbd, 0xaa, 0xa8, 0x1d, 0x24, 0xfb, 0xa6, 0x6a, 0x08, 0xa1, 0x16, 0xcb, 0x64, 0x4f, 0x3f, 0x1e, 0x65, 0x3d, 0x95, 0xc8, 0x9d, 0xb8, 0xbb, 0xd5, 0xda, 0xac, 0x27, 0x09, 0xc8, 0x98, 0x40, 0x00, 0x17, 0x84, 0x10, 0xa7, 0xc6, 0xaa, 0x86, 0x67, 0xdd, 0xc3, 0x8c, 0x74, 0x1f, 0x71, 0x0e, 0xc8, 0x66, 0x5a, 0xa9, 0x05, 0x2b, 0xe9, 0x29, 0xd4, 0xe3, 0xb1, 0x67, 0x82, 0xc1, 0x66, 0x21, 0x14, 0xc5, 0x41, 0x4b, 0xb0, 0x35, 0x34, 0x55, 0xc3, 0x92, 0xfc, 0x28, 0xf3, 0xdb, 0x59, 0x05, 0x4b, 0x5f, 0x36, 0x5c, 0x49, 0xe1, 0xd1, 0x56, 0xf8, 0x76, 0xee, 0x10, 0xcb, 0x4f, 0xd7, 0x05, 0x98 } + +} +, +{ + "RSASSA-PSS Signature Example 4.3", + /* Message to be signed */ + 83, + { 0x28, 0x80, 0x62, 0xaf, 0xc0, 0x8f, 0xcd, 0xb7, 0xc5, 0xf8, 0x65, 0x0b, 0x29, 0x83, 0x73, 0x00, 0x46, 0x1d, 0xd5, 0x67, 0x6c, 0x17, 0xa2, 0x0a, 0x3c, 0x8f, 0xb5, 0x14, 0x89, 0x49, 0xe3, 0xf7, 0x3d, 0x66, 0xb3, 0xae, 0x82, 0xc7, 0x24, 0x0e, 0x27, 0xc5, 0xb3, 0xec, 0x43, 0x28, 0xee, 0x7d, 0x6d, 0xdf, 0x6a, 0x6a, 0x0c, 0x9b, 0x5b, 0x15, 0xbc, 0xda, 0x19, 0x6a, 0x9d, 0x0c, 0x76, 0xb1, 0x19, 0xd5, 0x34, 0xd8, 0x5a, 0xbd, 0x12, 0x39, 0x62, 0xd5, 0x83, 0xb7, 0x6c, 0xe9, 0xd1, 0x80, 0xbc, 0xe1, 0xca } +, + /* Salt */ + 20, + { 0x4a, 0xf8, 0x70, 0xfb, 0xc6, 0x51, 0x60, 0x12, 0xca, 0x91, 0x6c, 0x70, 0xba, 0x86, 0x2a, 0xc7, 0xe8, 0x24, 0x36, 0x17 } +, + /* Signature */ + 129, + { 0x03, 0xfb, 0xc4, 0x10, 0xa2, 0xce, 0xd5, 0x95, 0x00, 0xfb, 0x99, 0xf9, 0xe2, 0xaf, 0x27, 0x81, 0xad, 0xa7, 0x4e, 0x13, 0x14, 0x56, 0x24, 0x60, 0x27, 0x82, 0xe2, 0x99, 0x48, 0x13, 0xee, 0xfc, 0xa0, 0x51, 0x9e, 0xcd, 0x25, 0x3b, 0x85, 0x5f, 0xb6, 0x26, 0xa9, 0x0d, 0x77, 0x1e, 0xae, 0x02, 0x8b, 0x0c, 0x47, 0xa1, 0x99, 0xcb, 0xd9, 0xf8, 0xe3, 0x26, 0x97, 0x34, 0xaf, 0x41, 0x63, 0x59, 0x90, 0x90, 0x71, 0x3a, 0x3f, 0xa9, 0x10, 0xfa, 0x09, 0x60, 0x65, 0x27, 0x21, 0x43, 0x2b, 0x97, 0x10, 0x36, 0xa7, 0x18, 0x1a, 0x2b, 0xc0, 0xca, 0xb4, 0x3b, 0x0b, 0x59, 0x8b, 0xc6, 0x21, 0x74, 0x61, 0xd7, 0xdb, 0x30, 0x5f, 0xf7, 0xe9, 0x54, 0xc5, 0xb5, 0xbb, 0x23, 0x1c, 0x39, 0xe7, 0x91, 0xaf, 0x6b, 0xcf, 0xa7, 0x6b, 0x14, 0x7b, 0x08, 0x13, 0x21, 0xf7, 0x26, 0x41, 0x48, 0x2a, 0x2a, 0xad } + +} +, +{ + "RSASSA-PSS Signature Example 4.4", + /* Message to be signed */ + 49, + { 0x6f, 0x4f, 0x9a, 0xb9, 0x50, 0x11, 0x99, 0xce, 0xf5, 0x5c, 0x6c, 0xf4, 0x08, 0xfe, 0x7b, 0x36, 0xc5, 0x57, 0xc4, 0x9d, 0x42, 0x0a, 0x47, 0x63, 0xd2, 0x46, 0x3c, 0x8a, 0xd4, 0x4b, 0x3c, 0xfc, 0x5b, 0xe2, 0x74, 0x2c, 0x0e, 0x7d, 0x9b, 0x0f, 0x66, 0x08, 0xf0, 0x8c, 0x7f, 0x47, 0xb6, 0x93, 0xee } +, + /* Salt */ + 20, + { 0x40, 0xd2, 0xe1, 0x80, 0xfa, 0xe1, 0xea, 0xc4, 0x39, 0xc1, 0x90, 0xb5, 0x6c, 0x2c, 0x0e, 0x14, 0xdd, 0xf9, 0xa2, 0x26 } +, + /* Signature */ + 129, + { 0x04, 0x86, 0x64, 0x4b, 0xc6, 0x6b, 0xf7, 0x5d, 0x28, 0x33, 0x5a, 0x61, 0x79, 0xb1, 0x08, 0x51, 0xf4, 0x3f, 0x09, 0xbd, 0xed, 0x9f, 0xac, 0x1a, 0xf3, 0x32, 0x52, 0xbb, 0x99, 0x53, 0xba, 0x42, 0x98, 0xcd, 0x64, 0x66, 0xb2, 0x75, 0x39, 0xa7, 0x0a, 0xda, 0xa3, 0xf8, 0x9b, 0x3d, 0xb3, 0xc7, 0x4a, 0xb6, 0x35, 0xd1, 0x22, 0xf4, 0xee, 0x7c, 0xe5, 0x57, 0xa6, 0x1e, 0x59, 0xb8, 0x2f, 0xfb, 0x78, 0x66, 0x30, 0xe5, 0xf9, 0xdb, 0x53, 0xc7, 0x7d, 0x9a, 0x0c, 0x12, 0xfa, 0xb5, 0x95, 0x8d, 0x4c, 0x2c, 0xe7, 0xda, 0xa8, 0x07, 0xcd, 0x89, 0xba, 0x2c, 0xc7, 0xfc, 0xd0, 0x2f, 0xf4, 0x70, 0xca, 0x67, 0xb2, 0x29, 0xfc, 0xce, 0x81, 0x4c, 0x85, 0x2c, 0x73, 0xcc, 0x93, 0xbe, 0xa3, 0x5b, 0xe6, 0x84, 0x59, 0xce, 0x47, 0x8e, 0x9d, 0x46, 0x55, 0xd1, 0x21, 0xc8, 0x47, 0x2f, 0x37, 0x1d, 0x4f } + +} +, +{ + "RSASSA-PSS Signature Example 4.5", + /* Message to be signed */ + 187, + { 0xe1, 0x7d, 0x20, 0x38, 0x5d, 0x50, 0x19, 0x55, 0x82, 0x3c, 0x3f, 0x66, 0x62, 0x54, 0xc1, 0xd3, 0xdd, 0x36, 0xad, 0x51, 0x68, 0xb8, 0xf1, 0x8d, 0x28, 0x6f, 0xdc, 0xf6, 0x7a, 0x7d, 0xad, 0x94, 0x09, 0x70, 0x85, 0xfa, 0xb7, 0xed, 0x86, 0xfe, 0x21, 0x42, 0xa2, 0x87, 0x71, 0x71, 0x79, 0x97, 0xef, 0x1a, 0x7a, 0x08, 0x88, 0x4e, 0xfc, 0x39, 0x35, 0x6d, 0x76, 0x07, 0x7a, 0xaf, 0x82, 0x45, 0x9a, 0x7f, 0xad, 0x45, 0x84, 0x88, 0x75, 0xf2, 0x81, 0x9b, 0x09, 0x89, 0x37, 0xfe, 0x92, 0x3b, 0xcc, 0x9d, 0xc4, 0x42, 0xd7, 0x2d, 0x75, 0x4d, 0x81, 0x20, 0x25, 0x09, 0x0c, 0x9b, 0xc0, 0x3d, 0xb3, 0x08, 0x0c, 0x13, 0x8d, 0xd6, 0x3b, 0x35, 0x5d, 0x0b, 0x4b, 0x85, 0xd6, 0x68, 0x8a, 0xc1, 0x9f, 0x4d, 0xe1, 0x50, 0x84, 0xa0, 0xba, 0x4e, 0x37, 0x3b, 0x93, 0xef, 0x4a, 0x55, 0x50, 0x96, 0x69, 0x19, 0x15, 0xdc, 0x23, 0xc0, 0x0e, 0x95, 0x4c, 0xde, 0xb2, 0x0a, 0x47, 0xcd, 0x55, 0xd1, 0x6c, 0x3d, 0x86, 0x81, 0xd4, 0x6e, 0xd7, 0xf2, 0xed, 0x5e, 0xa4, 0x27, 0x95, 0xbe, 0x17, 0xba, 0xed, 0x25, 0xf0, 0xf4, 0xd1, 0x13, 0xb3, 0x63, 0x6a, 0xdd, 0xd5, 0x85, 0xf1, 0x6a, 0x8b, 0x5a, 0xec, 0x0c, 0x8f, 0xa9, 0xc5, 0xf0, 0x3c, 0xbf, 0x3b, 0x9b, 0x73 } +, + /* Salt */ + 20, + { 0x24, 0x97, 0xdc, 0x2b, 0x46, 0x15, 0xdf, 0xae, 0x5a, 0x66, 0x3d, 0x49, 0xff, 0xd5, 0x6b, 0xf7, 0xef, 0xc1, 0x13, 0x04 } +, + /* Signature */ + 129, + { 0x02, 0x2a, 0x80, 0x04, 0x53, 0x53, 0x90, 0x4c, 0xb3, 0x0c, 0xbb, 0x54, 0x2d, 0x7d, 0x49, 0x90, 0x42, 0x1a, 0x6e, 0xec, 0x16, 0xa8, 0x02, 0x9a, 0x84, 0x22, 0xad, 0xfd, 0x22, 0xd6, 0xaf, 0xf8, 0xc4, 0xcc, 0x02, 0x94, 0xaf, 0x11, 0x0a, 0x0c, 0x06, 0x7e, 0xc8, 0x6a, 0x7d, 0x36, 0x41, 0x34, 0x45, 0x9b, 0xb1, 0xae, 0x8f, 0xf8, 0x36, 0xd5, 0xa8, 0xa2, 0x57, 0x98, 0x40, 0x99, 0x6b, 0x32, 0x0b, 0x19, 0xf1, 0x3a, 0x13, 0xfa, 0xd3, 0x78, 0xd9, 0x31, 0xa6, 0x56, 0x25, 0xda, 0xe2, 0x73, 0x9f, 0x0c, 0x53, 0x67, 0x0b, 0x35, 0xd9, 0xd3, 0xcb, 0xac, 0x08, 0xe7, 0x33, 0xe4, 0xec, 0x2b, 0x83, 0xaf, 0x4b, 0x91, 0x96, 0xd6, 0x3e, 0x7c, 0x4f, 0xf1, 0xdd, 0xea, 0xe2, 0xa1, 0x22, 0x79, 0x1a, 0x12, 0x5b, 0xfe, 0xa8, 0xde, 0xb0, 0xde, 0x8c, 0xcf, 0x1f, 0x4f, 0xfa, 0xf6, 0xe6, 0xfb, 0x0a } + +} +, +{ + "RSASSA-PSS Signature Example 4.6", + /* Message to be signed */ + 166, + { 0xaf, 0xbc, 0x19, 0xd4, 0x79, 0x24, 0x90, 0x18, 0xfd, 0xf4, 0xe0, 0x9f, 0x61, 0x87, 0x26, 0x44, 0x04, 0x95, 0xde, 0x11, 0xdd, 0xee, 0xe3, 0x88, 0x72, 0xd7, 0x75, 0xfc, 0xea, 0x74, 0xa2, 0x38, 0x96, 0xb5, 0x34, 0x3c, 0x9c, 0x38, 0xd4, 0x6a, 0xf0, 0xdb, 0xa2, 0x24, 0xd0, 0x47, 0x58, 0x0c, 0xc6, 0x0a, 0x65, 0xe9, 0x39, 0x1c, 0xf9, 0xb5, 0x9b, 0x36, 0xa8, 0x60, 0x59, 0x8d, 0x4e, 0x82, 0x16, 0x72, 0x2f, 0x99, 0x3b, 0x91, 0xcf, 0xae, 0x87, 0xbc, 0x25, 0x5a, 0xf8, 0x9a, 0x6a, 0x19, 0x9b, 0xca, 0x4a, 0x39, 0x1e, 0xad, 0xbc, 0x3a, 0x24, 0x90, 0x3c, 0x0b, 0xd6, 0x67, 0x36, 0x8f, 0x6b, 0xe7, 0x8e, 0x3f, 0xea, 0xbf, 0xb4, 0xff, 0xd4, 0x63, 0x12, 0x27, 0x63, 0x74, 0x0f, 0xfb, 0xbe, 0xfe, 0xab, 0x9a, 0x25, 0x56, 0x4b, 0xc5, 0xd1, 0xc2, 0x4c, 0x93, 0xe4, 0x22, 0xf7, 0x50, 0x73, 0xe2, 0xad, 0x72, 0xbf, 0x45, 0xb1, 0x0d, 0xf0, 0x0b, 0x52, 0xa1, 0x47, 0x12, 0x8e, 0x73, 0xfe, 0xe3, 0x3f, 0xa3, 0xf0, 0x57, 0x7d, 0x77, 0xf8, 0x0f, 0xbc, 0x2d, 0xf1, 0xbe, 0xd3, 0x13, 0x29, 0x0c, 0x12, 0x77, 0x7f, 0x50 } +, + /* Salt */ + 20, + { 0xa3, 0x34, 0xdb, 0x6f, 0xae, 0xbf, 0x11, 0x08, 0x1a, 0x04, 0xf8, 0x7c, 0x2d, 0x62, 0x1c, 0xde, 0xc7, 0x93, 0x0b, 0x9b } +, + /* Signature */ + 129, + { 0x00, 0x93, 0x8d, 0xcb, 0x6d, 0x58, 0x30, 0x46, 0x06, 0x5f, 0x69, 0xc7, 0x8d, 0xa7, 0xa1, 0xf1, 0x75, 0x70, 0x66, 0xa7, 0xfa, 0x75, 0x12, 0x5a, 0x9d, 0x29, 0x29, 0xf0, 0xb7, 0x9a, 0x60, 0xb6, 0x27, 0xb0, 0x82, 0xf1, 0x1f, 0x5b, 0x19, 0x6f, 0x28, 0xeb, 0x9d, 0xaa, 0x6f, 0x21, 0xc0, 0x5e, 0x51, 0x40, 0xf6, 0xae, 0xf1, 0x73, 0x7d, 0x20, 0x23, 0x07, 0x5c, 0x05, 0xec, 0xf0, 0x4a, 0x02, 0x8c, 0x68, 0x6a, 0x2a, 0xb3, 0xe7, 0xd5, 0xa0, 0x66, 0x4f, 0x29, 0x5c, 0xe1, 0x29, 0x95, 0xe8, 0x90, 0x90, 0x8b, 0x6a, 0xd2, 0x1f, 0x08, 0x39, 0xeb, 0x65, 0xb7, 0x03, 0x93, 0xa7, 0xb5, 0xaf, 0xd9, 0x87, 0x1d, 0xe0, 0xca, 0xa0, 0xce, 0xde, 0xc5, 0xb8, 0x19, 0x62, 0x67, 0x56, 0x20, 0x9d, 0x13, 0xab, 0x1e, 0x7b, 0xb9, 0x54, 0x6a, 0x26, 0xff, 0x37, 0xe9, 0xa5, 0x1a, 0xf9, 0xfd, 0x56, 0x2e } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 5: A 1028-bit RSA Key Pair", +{ + /* RSA modulus n */ + 129, + { 0x0d, 0x10, 0xf6, 0x61, 0xf2, 0x99, 0x40, 0xf5, 0xed, 0x39, 0xaa, 0x26, 0x09, 0x66, 0xde, 0xb4, 0x78, 0x43, 0x67, 0x9d, 0x2b, 0x6f, 0xb2, 0x5b, 0x3d, 0xe3, 0x70, 0xf3, 0xac, 0x7c, 0x19, 0x91, 0x63, 0x91, 0xfd, 0x25, 0xfb, 0x52, 0x7e, 0xbf, 0xa6, 0xa4, 0xb4, 0xdf, 0x45, 0xa1, 0x75, 0x9d, 0x99, 0x6c, 0x4b, 0xb4, 0xeb, 0xd1, 0x88, 0x28, 0xc4, 0x4f, 0xc5, 0x2d, 0x01, 0x91, 0x87, 0x17, 0x40, 0x52, 0x5f, 0x47, 0xa4, 0xb0, 0xcc, 0x8d, 0xa3, 0x25, 0xed, 0x8a, 0xa6, 0x76, 0xb0, 0xd0, 0xf6, 0x26, 0xe0, 0xa7, 0x7f, 0x07, 0x69, 0x21, 0x70, 0xac, 0xac, 0x80, 0x82, 0xf4, 0x2f, 0xaa, 0x7d, 0xc7, 0xcd, 0x12, 0x3e, 0x73, 0x0e, 0x31, 0xa8, 0x79, 0x85, 0x20, 0x4c, 0xab, 0xcb, 0xe6, 0x67, 0x0d, 0x43, 0xa2, 0xdd, 0x2b, 0x2d, 0xde, 0xf5, 0xe0, 0x53, 0x92, 0xfc, 0x21, 0x3b, 0xc5, 0x07 } +, + /* RSA public exponent e */ + 3, + { 0x01, 0x00, 0x01 } +, + /* RSA private exponent d */ + 129, + { 0x03, 0xce, 0x08, 0xb1, 0x04, 0xff, 0xf3, 0x96, 0xa9, 0x79, 0xbd, 0x3e, 0x4e, 0x46, 0x92, 0x5b, 0x63, 0x19, 0xdd, 0xb6, 0x3a, 0xcb, 0xcf, 0xd8, 0x19, 0xf1, 0x7d, 0x16, 0xb8, 0x07, 0x7b, 0x3a, 0x87, 0x10, 0x1f, 0xf3, 0x4b, 0x77, 0xfe, 0x48, 0xb8, 0xb2, 0x05, 0xa9, 0x6e, 0x91, 0x51, 0xba, 0x8e, 0xce, 0xa6, 0x4d, 0x0c, 0xce, 0x7b, 0x23, 0xc3, 0xe6, 0xa6, 0xb8, 0x30, 0x58, 0xbc, 0x49, 0xda, 0xe8, 0x16, 0xae, 0x73, 0x6d, 0xb5, 0xa4, 0x70, 0x8e, 0x2a, 0xd4, 0x35, 0x23, 0x2b, 0x56, 0x7f, 0x90, 0x96, 0xce, 0x59, 0xff, 0x28, 0x06, 0x1e, 0x79, 0xab, 0x1c, 0x02, 0xd7, 0x17, 0xe6, 0xb2, 0x3c, 0xea, 0x6d, 0xb8, 0xeb, 0x51, 0x92, 0xfa, 0x7c, 0x1e, 0xab, 0x22, 0x7d, 0xba, 0x74, 0x62, 0x1c, 0x45, 0x60, 0x18, 0x96, 0xee, 0xf1, 0x37, 0x92, 0xc8, 0x44, 0x0b, 0xeb, 0x15, 0xaa, 0xc1 } +, + /* Prime p */ + 65, + { 0x03, 0xf2, 0xf3, 0x31, 0xf4, 0x14, 0x2d, 0x4f, 0x24, 0xb4, 0x3a, 0xa1, 0x02, 0x79, 0xa8, 0x96, 0x52, 0xd4, 0xe7, 0x53, 0x72, 0x21, 0xa1, 0xa7, 0xb2, 0xa2, 0x5d, 0xeb, 0x55, 0x1e, 0x5d, 0xe9, 0xac, 0x49, 0x74, 0x11, 0xc2, 0x27, 0xa9, 0x4e, 0x45, 0xf9, 0x1c, 0x2d, 0x1c, 0x13, 0xcc, 0x04, 0x6c, 0xf4, 0xce, 0x14, 0xe3, 0x2d, 0x05, 0x87, 0x34, 0x21, 0x0d, 0x44, 0xa8, 0x7e, 0xe1, 0xb7, 0x3f } +, + /* Prime q */ + 65, + { 0x03, 0x4f, 0x09, 0x0d, 0x73, 0xb5, 0x58, 0x03, 0x03, 0x0c, 0xf0, 0x36, 0x1a, 0x5d, 0x80, 0x81, 0xbf, 0xb7, 0x9f, 0x85, 0x15, 0x23, 0xfe, 0xac, 0x0a, 0x21, 0x24, 0xd0, 0x8d, 0x40, 0x13, 0xff, 0x08, 0x48, 0x77, 0x71, 0xa8, 0x70, 0xd0, 0x47, 0x9d, 0xc0, 0x68, 0x6c, 0x62, 0xf7, 0x71, 0x8d, 0xfe, 0xcf, 0x02, 0x4b, 0x17, 0xc9, 0x26, 0x76, 0x78, 0x05, 0x91, 0x71, 0x33, 0x9c, 0xc0, 0x08, 0x39 } +, + /* p's CRT exponent dP */ + 65, + { 0x02, 0xaa, 0x66, 0x3a, 0xdb, 0xf5, 0x1a, 0xb8, 0x87, 0xa0, 0x18, 0xcb, 0x42, 0x6e, 0x78, 0xbc, 0x2f, 0xe1, 0x82, 0xdc, 0xb2, 0xf7, 0xbc, 0xb5, 0x04, 0x41, 0xd1, 0x7f, 0xdf, 0x0f, 0x06, 0x79, 0x8b, 0x50, 0x71, 0xc6, 0xe2, 0xf5, 0xfe, 0xb4, 0xd5, 0x4a, 0xd8, 0x18, 0x23, 0x11, 0xc1, 0xef, 0x62, 0xd4, 0xc4, 0x9f, 0x18, 0xd1, 0xf5, 0x1f, 0x54, 0xb2, 0xd2, 0xcf, 0xfb, 0xa4, 0xda, 0x1b, 0xe5 } +, + /* q's CRT exponent dQ */ + 65, + { 0x02, 0xbb, 0xe7, 0x06, 0x07, 0x8b, 0x5c, 0x0b, 0x39, 0x15, 0x12, 0xd4, 0x11, 0xdb, 0x1b, 0x19, 0x9b, 0x5a, 0x56, 0x64, 0xb8, 0x40, 0x42, 0xea, 0xd3, 0x7f, 0xe9, 0x94, 0xae, 0x72, 0xb9, 0x53, 0x2d, 0xfb, 0xfb, 0x3e, 0x9e, 0x69, 0x81, 0xa0, 0xfb, 0xb8, 0x06, 0x51, 0x31, 0x41, 0xb7, 0xc2, 0x16, 0x3f, 0xe5, 0x6c, 0x39, 0x5e, 0x4b, 0xfa, 0xee, 0x57, 0xe3, 0x83, 0x3f, 0x9b, 0x91, 0x8d, 0xf9 } +, + /* CRT coefficient qInv */ + 64, + { 0x02, 0x42, 0xb6, 0xcd, 0x00, 0xd3, 0x0a, 0x76, 0x7a, 0xee, 0x9a, 0x89, 0x8e, 0xad, 0x45, 0x3c, 0x8e, 0xae, 0xa6, 0x3d, 0x50, 0x0b, 0x7d, 0x1e, 0x00, 0x71, 0x3e, 0xda, 0xe5, 0x1c, 0xe3, 0x6b, 0x23, 0xb6, 0x64, 0xdf, 0x26, 0xe6, 0x3e, 0x26, 0x6e, 0xc8, 0xf7, 0x6e, 0x6e, 0x63, 0xed, 0x1b, 0xa4, 0x1e, 0xb0, 0x33, 0xb1, 0x20, 0xf7, 0xea, 0x52, 0x12, 0xae, 0x21, 0xa9, 0x8f, 0xbc, 0x16 } + +} +, +{{ + "RSASSA-PSS Signature Example 5.1", + /* Message to be signed */ + 154, + { 0x30, 0xc7, 0xd5, 0x57, 0x45, 0x8b, 0x43, 0x6d, 0xec, 0xfd, 0xc1, 0x4d, 0x06, 0xcb, 0x7b, 0x96, 0xb0, 0x67, 0x18, 0xc4, 0x8d, 0x7d, 0xe5, 0x74, 0x82, 0xa8, 0x68, 0xae, 0x7f, 0x06, 0x58, 0x70, 0xa6, 0x21, 0x65, 0x06, 0xd1, 0x1b, 0x77, 0x93, 0x23, 0xdf, 0xdf, 0x04, 0x6c, 0xf5, 0x77, 0x51, 0x29, 0x13, 0x4b, 0x4d, 0x56, 0x89, 0xe4, 0xd9, 0xc0, 0xce, 0x1e, 0x12, 0xd7, 0xd4, 0xb0, 0x6c, 0xb5, 0xfc, 0x58, 0x20, 0xde, 0xcf, 0xa4, 0x1b, 0xaf, 0x59, 0xbf, 0x25, 0x7b, 0x32, 0xf0, 0x25, 0xb7, 0x67, 0x9b, 0x44, 0x5b, 0x94, 0x99, 0xc9, 0x25, 0x55, 0x14, 0x58, 0x85, 0x99, 0x2f, 0x1b, 0x76, 0xf8, 0x48, 0x91, 0xee, 0x4d, 0x3b, 0xe0, 0xf5, 0x15, 0x0f, 0xd5, 0x90, 0x1e, 0x3a, 0x4c, 0x8e, 0xd4, 0x3f, 0xd3, 0x6b, 0x61, 0xd0, 0x22, 0xe6, 0x5a, 0xd5, 0x00, 0x8d, 0xbf, 0x33, 0x29, 0x3c, 0x22, 0xbf, 0xbf, 0xd0, 0x73, 0x21, 0xf0, 0xf1, 0xd5, 0xfa, 0x9f, 0xdf, 0x00, 0x14, 0xc2, 0xfc, 0xb0, 0x35, 0x8a, 0xad, 0x0e, 0x35, 0x4b, 0x0d, 0x29 } +, + /* Salt */ + 20, + { 0x08, 0x1b, 0x23, 0x3b, 0x43, 0x56, 0x77, 0x50, 0xbd, 0x6e, 0x78, 0xf3, 0x96, 0xa8, 0x8b, 0x9f, 0x6a, 0x44, 0x51, 0x51 } +, + /* Signature */ + 129, + { 0x0b, 0xa3, 0x73, 0xf7, 0x6e, 0x09, 0x21, 0xb7, 0x0a, 0x8f, 0xbf, 0xe6, 0x22, 0xf0, 0xbf, 0x77, 0xb2, 0x8a, 0x3d, 0xb9, 0x8e, 0x36, 0x10, 0x51, 0xc3, 0xd7, 0xcb, 0x92, 0xad, 0x04, 0x52, 0x91, 0x5a, 0x4d, 0xe9, 0xc0, 0x17, 0x22, 0xf6, 0x82, 0x3e, 0xeb, 0x6a, 0xdf, 0x7e, 0x0c, 0xa8, 0x29, 0x0f, 0x5d, 0xe3, 0xe5, 0x49, 0x89, 0x0a, 0xc2, 0xa3, 0xc5, 0x95, 0x0a, 0xb2, 0x17, 0xba, 0x58, 0x59, 0x08, 0x94, 0x95, 0x2d, 0xe9, 0x6f, 0x8d, 0xf1, 0x11, 0xb2, 0x57, 0x52, 0x15, 0xda, 0x6c, 0x16, 0x15, 0x90, 0xc7, 0x45, 0xbe, 0x61, 0x24, 0x76, 0xee, 0x57, 0x8e, 0xd3, 0x84, 0xab, 0x33, 0xe3, 0xec, 0xe9, 0x74, 0x81, 0xa2, 0x52, 0xf5, 0xc7, 0x9a, 0x98, 0xb5, 0x53, 0x2a, 0xe0, 0x0c, 0xdd, 0x62, 0xf2, 0xec, 0xc0, 0xcd, 0x1b, 0xae, 0xfe, 0x80, 0xd8, 0x0b, 0x96, 0x21, 0x93, 0xec, 0x1d } + +} +, +#ifdef LTC_TEST_EXT +{ + "RSASSA-PSS Signature Example 5.2", + /* Message to be signed */ + 209, + { 0xe7, 0xb3, 0x2e, 0x15, 0x56, 0xea, 0x1b, 0x27, 0x95, 0x04, 0x6a, 0xc6, 0x97, 0x39, 0xd2, 0x2a, 0xc8, 0x96, 0x6b, 0xf1, 0x1c, 0x11, 0x6f, 0x61, 0x4b, 0x16, 0x67, 0x40, 0xe9, 0x6b, 0x90, 0x65, 0x3e, 0x57, 0x50, 0x94, 0x5f, 0xcf, 0x77, 0x21, 0x86, 0xc0, 0x37, 0x90, 0xa0, 0x7f, 0xda, 0x32, 0x3e, 0x1a, 0x61, 0x91, 0x6b, 0x06, 0xee, 0x21, 0x57, 0xdb, 0x3d, 0xff, 0x80, 0xd6, 0x7d, 0x5e, 0x39, 0xa5, 0x3a, 0xe2, 0x68, 0xc8, 0xf0, 0x9e, 0xd9, 0x9a, 0x73, 0x20, 0x05, 0xb0, 0xbc, 0x6a, 0x04, 0xaf, 0x4e, 0x08, 0xd5, 0x7a, 0x00, 0xe7, 0x20, 0x1b, 0x30, 0x60, 0xef, 0xaa, 0xdb, 0x73, 0x11, 0x3b, 0xfc, 0x08, 0x7f, 0xd8, 0x37, 0x09, 0x3a, 0xa2, 0x52, 0x35, 0xb8, 0xc1, 0x49, 0xf5, 0x62, 0x15, 0xf0, 0x31, 0xc2, 0x4a, 0xd5, 0xbd, 0xe7, 0xf2, 0x99, 0x60, 0xdf, 0x7d, 0x52, 0x40, 0x70, 0xf7, 0x44, 0x9c, 0x6f, 0x78, 0x50, 0x84, 0xbe, 0x1a, 0x0f, 0x73, 0x30, 0x47, 0xf3, 0x36, 0xf9, 0x15, 0x47, 0x38, 0x67, 0x45, 0x47, 0xdb, 0x02, 0xa9, 0xf4, 0x4d, 0xfc, 0x6e, 0x60, 0x30, 0x10, 0x81, 0xe1, 0xce, 0x99, 0x84, 0x7f, 0x3b, 0x5b, 0x60, 0x1f, 0xf0, 0x6b, 0x4d, 0x57, 0x76, 0xa9, 0x74, 0x0b, 0x9a, 0xa0, 0xd3, 0x40, 0x58, 0xfd, 0x3b, 0x90, 0x6e, 0x4f, 0x78, 0x59, 0xdf, 0xb0, 0x7d, 0x71, 0x73, 0xe5, 0xe6, 0xf6, 0x35, 0x0a, 0xda, 0xc2, 0x1f, 0x27, 0xb2, 0x30, 0x74, 0x69 } +, + /* Salt */ + 20, + { 0xbd, 0x0c, 0xe1, 0x95, 0x49, 0xd0, 0x70, 0x01, 0x20, 0xcb, 0xe5, 0x10, 0x77, 0xdb, 0xbb, 0xb0, 0x0a, 0x8d, 0x8b, 0x09 } +, + /* Signature */ + 129, + { 0x08, 0x18, 0x0d, 0xe8, 0x25, 0xe4, 0xb8, 0xb0, 0x14, 0xa3, 0x2d, 0xa8, 0xba, 0x76, 0x15, 0x55, 0x92, 0x12, 0x04, 0xf2, 0xf9, 0x0d, 0x5f, 0x24, 0xb7, 0x12, 0x90, 0x8f, 0xf8, 0x4f, 0x3e, 0x22, 0x0a, 0xd1, 0x79, 0x97, 0xc0, 0xdd, 0x6e, 0x70, 0x66, 0x30, 0xba, 0x3e, 0x84, 0xad, 0xd4, 0xd5, 0xe7, 0xab, 0x00, 0x4e, 0x58, 0x07, 0x4b, 0x54, 0x97, 0x09, 0x56, 0x5d, 0x43, 0xad, 0x9e, 0x97, 0xb5, 0xa7, 0xa1, 0xa2, 0x9e, 0x85, 0xb9, 0xf9, 0x0f, 0x4a, 0xaf, 0xcd, 0xf5, 0x83, 0x21, 0xde, 0x8c, 0x59, 0x74, 0xef, 0x9a, 0xbf, 0x2d, 0x52, 0x6f, 0x33, 0xc0, 0xf2, 0xf8, 0x2e, 0x95, 0xd1, 0x58, 0xea, 0x6b, 0x81, 0xf1, 0x73, 0x6d, 0xb8, 0xd1, 0xaf, 0x3d, 0x6a, 0xc6, 0xa8, 0x3b, 0x32, 0xd1, 0x8b, 0xae, 0x0f, 0xf1, 0xb2, 0xfe, 0x27, 0xde, 0x4c, 0x76, 0xed, 0x8c, 0x79, 0x80, 0xa3, 0x4e } + +} +, +{ + "RSASSA-PSS Signature Example 5.3", + /* Message to be signed */ + 223, + { 0x8d, 0x83, 0x96, 0xe3, 0x65, 0x07, 0xfe, 0x1e, 0xf6, 0xa1, 0x90, 0x17, 0x54, 0x8e, 0x0c, 0x71, 0x66, 0x74, 0xc2, 0xfe, 0xc2, 0x33, 0xad, 0xb2, 0xf7, 0x75, 0x66, 0x5e, 0xc4, 0x1f, 0x2b, 0xd0, 0xba, 0x39, 0x6b, 0x06, 0x1a, 0x9d, 0xaa, 0x7e, 0x86, 0x6f, 0x7c, 0x23, 0xfd, 0x35, 0x31, 0x95, 0x43, 0x00, 0xa3, 0x42, 0xf9, 0x24, 0x53, 0x5e, 0xa1, 0x49, 0x8c, 0x48, 0xf6, 0xc8, 0x79, 0x93, 0x28, 0x65, 0xfc, 0x02, 0x00, 0x0c, 0x52, 0x87, 0x23, 0xb7, 0xad, 0x03, 0x35, 0x74, 0x5b, 0x51, 0x20, 0x9a, 0x0a, 0xfe, 0xd9, 0x32, 0xaf, 0x8f, 0x08, 0x87, 0xc2, 0x19, 0x00, 0x4d, 0x2a, 0xbd, 0x89, 0x4e, 0xa9, 0x25, 0x59, 0xee, 0x31, 0x98, 0xaf, 0x3a, 0x73, 0x4f, 0xe9, 0xb9, 0x63, 0x8c, 0x26, 0x3a, 0x72, 0x8a, 0xd9, 0x5a, 0x5a, 0xe8, 0xce, 0x3e, 0xb1, 0x58, 0x39, 0xf3, 0xaa, 0x78, 0x52, 0xbb, 0x39, 0x07, 0x06, 0xe7, 0x76, 0x0e, 0x43, 0xa7, 0x12, 0x91, 0xa2, 0xe3, 0xf8, 0x27, 0x23, 0x7d, 0xed, 0xa8, 0x51, 0x87, 0x4c, 0x51, 0x76, 0x65, 0xf5, 0x45, 0xf2, 0x72, 0x38, 0xdf, 0x86, 0x55, 0x7f, 0x37, 0x5d, 0x09, 0xcc, 0xd8, 0xbd, 0x15, 0xd8, 0xcc, 0xf6, 0x1f, 0x5d, 0x78, 0xca, 0x5c, 0x7f, 0x5c, 0xde, 0x78, 0x2e, 0x6b, 0xf5, 0xd0, 0x05, 0x70, 0x56, 0xd4, 0xba, 0xd9, 0x8b, 0x3d, 0x2f, 0x95, 0x75, 0xe8, 0x24, 0xab, 0x7a, 0x33, 0xff, 0x57, 0xb0, 0xac, 0x10, 0x0a, 0xb0, 0xd6, 0xea, 0xd7, 0xaa, 0x0b, 0x50, 0xf6, 0xe4, 0xd3, 0xe5, 0xec, 0x0b, 0x96, 0x6b } +, + /* Salt */ + 20, + { 0x81, 0x57, 0x79, 0xa9, 0x1b, 0x3a, 0x8b, 0xd0, 0x49, 0xbf, 0x2a, 0xeb, 0x92, 0x01, 0x42, 0x77, 0x22, 0x22, 0xc9, 0xca } +, + /* Signature */ + 129, + { 0x05, 0xe0, 0xfd, 0xbd, 0xf6, 0xf7, 0x56, 0xef, 0x73, 0x31, 0x85, 0xcc, 0xfa, 0x8c, 0xed, 0x2e, 0xb6, 0xd0, 0x29, 0xd9, 0xd5, 0x6e, 0x35, 0x56, 0x1b, 0x5d, 0xb8, 0xe7, 0x02, 0x57, 0xee, 0x6f, 0xd0, 0x19, 0xd2, 0xf0, 0xbb, 0xf6, 0x69, 0xfe, 0x9b, 0x98, 0x21, 0xe7, 0x8d, 0xf6, 0xd4, 0x1e, 0x31, 0x60, 0x8d, 0x58, 0x28, 0x0f, 0x31, 0x8e, 0xe3, 0x4f, 0x55, 0x99, 0x41, 0xc8, 0xdf, 0x13, 0x28, 0x75, 0x74, 0xba, 0xc0, 0x00, 0xb7, 0xe5, 0x8d, 0xc4, 0xf4, 0x14, 0xba, 0x49, 0xfb, 0x12, 0x7f, 0x9d, 0x0f, 0x89, 0x36, 0x63, 0x8c, 0x76, 0xe8, 0x53, 0x56, 0xc9, 0x94, 0xf7, 0x97, 0x50, 0xf7, 0xfa, 0x3c, 0xf4, 0xfd, 0x48, 0x2d, 0xf7, 0x5e, 0x3f, 0xb9, 0x97, 0x8c, 0xd0, 0x61, 0xf7, 0xab, 0xb1, 0x75, 0x72, 0xe6, 0xe6, 0x3e, 0x0b, 0xde, 0x12, 0xcb, 0xdc, 0xf1, 0x8c, 0x68, 0xb9, 0x79 } + +} +, +{ + "RSASSA-PSS Signature Example 5.4", + /* Message to be signed */ + 13, + { 0x32, 0x8c, 0x65, 0x9e, 0x0a, 0x64, 0x37, 0x43, 0x3c, 0xce, 0xb7, 0x3c, 0x14 } +, + /* Salt */ + 20, + { 0x9a, 0xec, 0x4a, 0x74, 0x80, 0xd5, 0xbb, 0xc4, 0x29, 0x20, 0xd7, 0xca, 0x23, 0x5d, 0xb6, 0x74, 0x98, 0x9c, 0x9a, 0xac } +, + /* Signature */ + 129, + { 0x0b, 0xc9, 0x89, 0x85, 0x3b, 0xc2, 0xea, 0x86, 0x87, 0x32, 0x71, 0xce, 0x18, 0x3a, 0x92, 0x3a, 0xb6, 0x5e, 0x8a, 0x53, 0x10, 0x0e, 0x6d, 0xf5, 0xd8, 0x7a, 0x24, 0xc4, 0x19, 0x4e, 0xb7, 0x97, 0x81, 0x3e, 0xe2, 0xa1, 0x87, 0xc0, 0x97, 0xdd, 0x87, 0x2d, 0x59, 0x1d, 0xa6, 0x0c, 0x56, 0x86, 0x05, 0xdd, 0x7e, 0x74, 0x2d, 0x5a, 0xf4, 0xe3, 0x3b, 0x11, 0x67, 0x8c, 0xcb, 0x63, 0x90, 0x32, 0x04, 0xa3, 0xd0, 0x80, 0xb0, 0x90, 0x2c, 0x89, 0xab, 0xa8, 0x86, 0x8f, 0x00, 0x9c, 0x0f, 0x1c, 0x0c, 0xb8, 0x58, 0x10, 0xbb, 0xdd, 0x29, 0x12, 0x1a, 0xbb, 0x84, 0x71, 0xff, 0x2d, 0x39, 0xe4, 0x9f, 0xd9, 0x2d, 0x56, 0xc6, 0x55, 0xc8, 0xe0, 0x37, 0xad, 0x18, 0xfa, 0xfb, 0xdc, 0x92, 0xc9, 0x58, 0x63, 0xf7, 0xf6, 0x1e, 0xa9, 0xef, 0xa2, 0x8f, 0xea, 0x40, 0x13, 0x69, 0xd1, 0x9d, 0xae, 0xa1 } + +} +, +{ + "RSASSA-PSS Signature Example 5.5", + /* Message to be signed */ + 228, + { 0xf3, 0x7b, 0x96, 0x23, 0x79, 0xa4, 0x7d, 0x41, 0x5a, 0x37, 0x6e, 0xec, 0x89, 0x73, 0x15, 0x0b, 0xcb, 0x34, 0xed, 0xd5, 0xab, 0x65, 0x40, 0x41, 0xb6, 0x14, 0x30, 0x56, 0x0c, 0x21, 0x44, 0x58, 0x2b, 0xa1, 0x33, 0xc8, 0x67, 0xd8, 0x52, 0xd6, 0xb8, 0xe2, 0x33, 0x21, 0x90, 0x13, 0x02, 0xec, 0xb4, 0x5b, 0x09, 0xec, 0x88, 0xb1, 0x52, 0x71, 0x78, 0xfa, 0x04, 0x32, 0x63, 0xf3, 0x06, 0x7d, 0x9f, 0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x64, 0xf3, 0x1d } +, + /* Signature */ + 129, + { 0x0a, 0xef, 0xa9, 0x43, 0xb6, 0x98, 0xb9, 0x60, 0x9e, 0xdf, 0x89, 0x8a, 0xd2, 0x27, 0x44, 0xac, 0x28, 0xdc, 0x23, 0x94, 0x97, 0xce, 0xa3, 0x69, 0xcb, 0xbd, 0x84, 0xf6, 0x5c, 0x95, 0xc0, 0xad, 0x77, 0x6b, 0x59, 0x47, 0x40, 0x16, 0x4b, 0x59, 0xa7, 0x39, 0xc6, 0xff, 0x7c, 0x2f, 0x07, 0xc7, 0xc0, 0x77, 0xa8, 0x6d, 0x95, 0x23, 0x8f, 0xe5, 0x1e, 0x1f, 0xcf, 0x33, 0x57, 0x4a, 0x4a, 0xe0, 0x68, 0x4b, 0x42, 0xa3, 0xf6, 0xbf, 0x67, 0x7d, 0x91, 0x82, 0x0c, 0xa8, 0x98, 0x74, 0x46, 0x7b, 0x2c, 0x23, 0xad, 0xd7, 0x79, 0x69, 0xc8, 0x07, 0x17, 0x43, 0x0d, 0x0e, 0xfc, 0x1d, 0x36, 0x95, 0x89, 0x2c, 0xe8, 0x55, 0xcb, 0x7f, 0x70, 0x11, 0x63, 0x0f, 0x4d, 0xf2, 0x6d, 0xef, 0x8d, 0xdf, 0x36, 0xfc, 0x23, 0x90, 0x5f, 0x57, 0xfa, 0x62, 0x43, 0xa4, 0x85, 0xc7, 0x70, 0xd5, 0x68, 0x1f, 0xcd } + +} +, +{ + "RSASSA-PSS Signature Example 5.6", + /* Message to be signed */ + 138, + { 0xc6, 0x10, 0x3c, 0x33, 0x0c, 0x1e, 0xf7, 0x18, 0xc1, 0x41, 0xe4, 0x7b, 0x8f, 0xa8, 0x59, 0xbe, 0x4d, 0x5b, 0x96, 0x25, 0x9e, 0x7d, 0x14, 0x20, 0x70, 0xec, 0xd4, 0x85, 0x83, 0x9d, 0xba, 0x5a, 0x83, 0x69, 0xc1, 0x7c, 0x11, 0x14, 0x03, 0x5e, 0x53, 0x2d, 0x19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f, 0x28, 0xf2, 0x44, 0xa8, 0xed, 0x89, 0xed, 0xba, 0xfb, 0xb6, 0x86, 0x27, 0x7c, 0xfa, 0x8a, 0xe9, 0x09, 0x71, 0x4d, 0x6b, 0x28, 0xf4, 0xbf, 0x8e, 0x29, 0x3a, 0xa0, 0x4c, 0x41, 0xef, 0xe7, 0xc0, 0xa8, 0x12, 0x66, 0xd5, 0xc0, 0x61, 0xe2, 0x57, 0x5b, 0xe0, 0x32, 0xaa, 0x46, 0x46, 0x74, 0xff, 0x71, 0x62, 0x62, 0x19, 0xbd, 0x74, 0xcc, 0x45, 0xf0, 0xe7, 0xed, 0x4e, 0x3f, 0xf9, 0x6e, 0xee, 0x75, 0x8e, 0x8f } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 6: A 1029-bit RSA Key Pair", +{ + /* RSA modulus n */ + 129, + { 0x16, 0x4c, 0xa3, 0x1c, 0xff, 0x60, 0x9f, 0x3a, 0x0e, 0x71, 0x01, 0xb0, 0x39, 0xf2, 0xe4, 0xfe, 0x6d, 0xd3, 0x75, 0x19, 0xab, 0x98, 0x59, 0x8d, 0x17, 0x9e, 0x17, 0x49, 0x96, 0x59, 0x80, 0x71, 0xf4, 0x7d, 0x3a, 0x04, 0x55, 0x91, 0x58, 0xd7, 0xbe, 0x37, 0x3c, 0xf1, 0xaa, 0x53, 0xf0, 0xaa, 0x6e, 0xf0, 0x90, 0x39, 0xe5, 0x67, 0x8c, 0x2a, 0x4c, 0x63, 0x90, 0x05, 0x14, 0xc8, 0xc4, 0xf8, 0xaa, 0xed, 0x5d, 0xe1, 0x2a, 0x5f, 0x10, 0xb0, 0x9c, 0x31, 0x1a, 0xf8, 0xc0, 0xff, 0xb5, 0xb7, 0xa2, 0x97, 0xf2, 0xef, 0xc6, 0x3b, 0x8d, 0x6b, 0x05, 0x10, 0x93, 0x1f, 0x0b, 0x98, 0xe4, 0x8b, 0xf5, 0xfc, 0x6e, 0xc4, 0xe7, 0xb8, 0xdb, 0x1f, 0xfa, 0xeb, 0x08, 0xc3, 0x8e, 0x02, 0xad, 0xb8, 0xf0, 0x3a, 0x48, 0x22, 0x9c, 0x99, 0xe9, 0x69, 0x43, 0x1f, 0x61, 0xcb, 0x8c, 0x4d, 0xc6, 0x98, 0xd1 } +, + /* RSA public exponent e */ + 3, + { 0x01, 0x00, 0x01 } +, + /* RSA private exponent d */ + 129, + { 0x03, 0xb6, 0x64, 0xee, 0x3b, 0x75, 0x66, 0x72, 0x3f, 0xc6, 0xea, 0xf2, 0x8a, 0xbb, 0x43, 0x0a, 0x39, 0x80, 0xf1, 0x12, 0x6c, 0x81, 0xde, 0x8a, 0xd7, 0x09, 0xea, 0xb3, 0x9a, 0xc9, 0xdc, 0xd0, 0xb1, 0x55, 0x0b, 0x37, 0x29, 0xd8, 0x70, 0x68, 0xe9, 0x52, 0x00, 0x9d, 0xf5, 0x44, 0x53, 0x4c, 0x1f, 0x50, 0x82, 0x9a, 0x78, 0xf4, 0x59, 0x1e, 0xb8, 0xfd, 0x57, 0x14, 0x04, 0x26, 0xa6, 0xbb, 0x04, 0x05, 0xb6, 0xa6, 0xf5, 0x1a, 0x57, 0xd9, 0x26, 0x7b, 0x7b, 0xbc, 0x65, 0x33, 0x91, 0xa6, 0x99, 0xa2, 0xa9, 0x0d, 0xac, 0x8a, 0xe2, 0x26, 0xbc, 0xc6, 0x0f, 0xa8, 0xcd, 0x93, 0x4c, 0x73, 0xc7, 0xb0, 0x3b, 0x1f, 0x6b, 0x81, 0x81, 0x58, 0x63, 0x18, 0x38, 0xa8, 0x61, 0x2e, 0x6e, 0x6e, 0xa9, 0x2b, 0xe2, 0x4f, 0x83, 0x24, 0xfa, 0xf5, 0xb1, 0xfd, 0x85, 0x87, 0x22, 0x52, 0x67, 0xba, 0x6f } +, + /* Prime p */ + 65, + { 0x04, 0xf0, 0x54, 0x8c, 0x96, 0x26, 0xab, 0x1e, 0xbf, 0x12, 0x44, 0x93, 0x47, 0x41, 0xd9, 0x9a, 0x06, 0x22, 0x0e, 0xfa, 0x2a, 0x58, 0x56, 0xaa, 0x0e, 0x75, 0x73, 0x0b, 0x2e, 0xc9, 0x6a, 0xdc, 0x86, 0xbe, 0x89, 0x4f, 0xa2, 0x80, 0x3b, 0x53, 0xa5, 0xe8, 0x5d, 0x27, 0x6a, 0xcb, 0xd2, 0x9a, 0xb8, 0x23, 0xf8, 0x0a, 0x73, 0x91, 0xbb, 0x54, 0xa5, 0x05, 0x16, 0x72, 0xfb, 0x04, 0xee, 0xb5, 0x43 } +, + /* Prime q */ + 65, + { 0x04, 0x83, 0xe0, 0xae, 0x47, 0x91, 0x55, 0x87, 0x74, 0x3f, 0xf3, 0x45, 0x36, 0x2b, 0x55, 0x5d, 0x39, 0x62, 0xd9, 0x8b, 0xb6, 0xf1, 0x5f, 0x84, 0x8b, 0x4c, 0x92, 0xb1, 0x77, 0x1c, 0xa8, 0xed, 0x10, 0x7d, 0x8d, 0x3e, 0xe6, 0x5e, 0xc4, 0x45, 0x17, 0xdd, 0x0f, 0xaa, 0x48, 0x1a, 0x38, 0x7e, 0x90, 0x2f, 0x7a, 0x2e, 0x74, 0x7c, 0x26, 0x9e, 0x7e, 0xa4, 0x44, 0x80, 0xbc, 0x53, 0x8b, 0x8e, 0x5b } +, + /* p's CRT exponent dP */ + 65, + { 0x03, 0xa8, 0xe8, 0xae, 0xa9, 0x92, 0x0c, 0x1a, 0xa3, 0xb2, 0xf0, 0xd8, 0x46, 0xe4, 0xb8, 0x50, 0xd8, 0x1c, 0xa3, 0x06, 0xa5, 0x1c, 0x83, 0x54, 0x4f, 0x94, 0x9f, 0x64, 0xf9, 0x0d, 0xcf, 0x3f, 0x8e, 0x26, 0x61, 0xf0, 0x7e, 0x56, 0x12, 0x20, 0xa1, 0x80, 0x38, 0x8f, 0xbe, 0x27, 0x3e, 0x70, 0xe2, 0xe5, 0xdc, 0xa8, 0x3a, 0x0e, 0x13, 0x48, 0xdd, 0x64, 0x90, 0xc7, 0x31, 0xd6, 0xec, 0xe1, 0xab } +, + /* q's CRT exponent dQ */ + 65, + { 0x01, 0x35, 0xbd, 0xcd, 0xb6, 0x0b, 0xf2, 0x19, 0x7c, 0x43, 0x6e, 0xd3, 0x4b, 0x32, 0xcd, 0x8b, 0x4f, 0xc7, 0x77, 0x78, 0x83, 0x2b, 0xa7, 0x67, 0x03, 0x55, 0x1f, 0xb2, 0x42, 0xb3, 0x01, 0x69, 0x95, 0x93, 0xaf, 0x77, 0xfd, 0x8f, 0xc3, 0x94, 0xa8, 0x52, 0x6a, 0xd2, 0x3c, 0xc4, 0x1a, 0x03, 0x80, 0x6b, 0xd8, 0x97, 0xfe, 0x4b, 0x0e, 0xa6, 0x46, 0x55, 0x8a, 0xad, 0xdc, 0xc9, 0x9e, 0x8a, 0x25 } +, + /* CRT coefficient qInv */ + 65, + { 0x03, 0x04, 0xc0, 0x3d, 0x9c, 0x73, 0x65, 0x03, 0xa9, 0x84, 0xab, 0xbd, 0x9b, 0xa2, 0x23, 0x01, 0x40, 0x7c, 0x4a, 0x2a, 0xb1, 0xdd, 0x85, 0x76, 0x64, 0x81, 0xb6, 0x0d, 0x45, 0x40, 0x11, 0x52, 0xe6, 0x92, 0xbe, 0x14, 0xf4, 0x12, 0x1d, 0x9a, 0xa3, 0xfd, 0x6e, 0x0b, 0x4d, 0x1d, 0x3a, 0x97, 0x35, 0x38, 0xa3, 0x1d, 0x42, 0xee, 0x6e, 0x1e, 0x5e, 0xf6, 0x20, 0x23, 0x1a, 0x2b, 0xba, 0xf3, 0x5f } + +} +, +{{ + "RSASSA-PSS Signature Example 6.1", + /* Message to be signed */ + 109, + { 0x0a, 0x20, 0xb7, 0x74, 0xad, 0xdc, 0x2f, 0xa5, 0x12, 0x45, 0xed, 0x7c, 0xb9, 0xda, 0x60, 0x9e, 0x50, 0xca, 0xc6, 0x63, 0x6a, 0x52, 0x54, 0x3f, 0x97, 0x45, 0x8e, 0xed, 0x73, 0x40, 0xf8, 0xd5, 0x3f, 0xfc, 0x64, 0x91, 0x8f, 0x94, 0x90, 0x78, 0xee, 0x03, 0xef, 0x60, 0xd4, 0x2b, 0x5f, 0xec, 0x24, 0x60, 0x50, 0xbd, 0x55, 0x05, 0xcd, 0x8c, 0xb5, 0x97, 0xba, 0xd3, 0xc4, 0xe7, 0x13, 0xb0, 0xef, 0x30, 0x64, 0x4e, 0x76, 0xad, 0xab, 0xb0, 0xde, 0x01, 0xa1, 0x56, 0x1e, 0xfb, 0x25, 0x51, 0x58, 0xc7, 0x4f, 0xc8, 0x01, 0xe6, 0xe9, 0x19, 0xe5, 0x81, 0xb4, 0x6f, 0x0f, 0x0d, 0xdd, 0x08, 0xe4, 0xf3, 0x4c, 0x78, 0x10, 0xb5, 0xed, 0x83, 0x18, 0xf9, 0x1d, 0x7c, 0x8c } +, + /* Salt */ + 20, + { 0x5b, 0x4e, 0xa2, 0xef, 0x62, 0x9c, 0xc2, 0x2f, 0x3b, 0x53, 0x8e, 0x01, 0x69, 0x04, 0xb4, 0x7b, 0x1e, 0x40, 0xbf, 0xd5 } +, + /* Signature */ + 129, + { 0x04, 0xc0, 0xcf, 0xac, 0xec, 0x04, 0xe5, 0xba, 0xdb, 0xec, 0xe1, 0x59, 0xa5, 0xa1, 0x10, 0x3f, 0x69, 0xb3, 0xf3, 0x2b, 0xa5, 0x93, 0xcb, 0x4c, 0xc4, 0xb1, 0xb7, 0xab, 0x45, 0x59, 0x16, 0xa9, 0x6a, 0x27, 0xcd, 0x26, 0x78, 0xea, 0x0f, 0x46, 0xba, 0x37, 0xf7, 0xfc, 0x9c, 0x86, 0x32, 0x5f, 0x29, 0x73, 0x3b, 0x38, 0x9f, 0x1d, 0x97, 0xf4, 0x3e, 0x72, 0x01, 0xc0, 0xf3, 0x48, 0xfc, 0x45, 0xfe, 0x42, 0x89, 0x23, 0x35, 0x36, 0x2e, 0xee, 0x01, 0x8b, 0x5b, 0x16, 0x1f, 0x2f, 0x93, 0x93, 0x03, 0x12, 0x25, 0xc7, 0x13, 0x01, 0x2a, 0x57, 0x6b, 0xc8, 0x8e, 0x23, 0x05, 0x24, 0x89, 0x86, 0x8d, 0x90, 0x10, 0xcb, 0xf0, 0x33, 0xec, 0xc5, 0x68, 0xe8, 0xbc, 0x15, 0x2b, 0xdc, 0x59, 0xd5, 0x60, 0xe4, 0x12, 0x91, 0x91, 0x5d, 0x28, 0x56, 0x52, 0x08, 0xe2, 0x2a, 0xee, 0xc9, 0xef, 0x85, 0xd1 } + +} +, +#ifdef LTC_TEST_EXT +{ + "RSASSA-PSS Signature Example 6.2", + /* Message to be signed */ + 199, + { 0x2a, 0xaf, 0xf6, 0x63, 0x1f, 0x62, 0x1c, 0xe6, 0x15, 0x76, 0x0a, 0x9e, 0xbc, 0xe9, 0x4b, 0xb3, 0x33, 0x07, 0x7a, 0xd8, 0x64, 0x88, 0xc8, 0x61, 0xd4, 0xb7, 0x6d, 0x29, 0xc1, 0xf4, 0x87, 0x46, 0xc6, 0x11, 0xae, 0x1e, 0x03, 0xce, 0xd4, 0x44, 0x5d, 0x7c, 0xfa, 0x1f, 0xe5, 0xf6, 0x2e, 0x1b, 0x3f, 0x08, 0x45, 0x2b, 0xde, 0x3b, 0x6e, 0xf8, 0x19, 0x73, 0xba, 0xfb, 0xb5, 0x7f, 0x97, 0xbc, 0xee, 0xf8, 0x73, 0x98, 0x53, 0x95, 0xb8, 0x26, 0x05, 0x89, 0xaa, 0x88, 0xcb, 0x7d, 0xb5, 0x0a, 0xb4, 0x69, 0x26, 0x2e, 0x55, 0x1b, 0xdc, 0xd9, 0xa5, 0x6f, 0x27, 0x5a, 0x0a, 0xc4, 0xfe, 0x48, 0x47, 0x00, 0xc3, 0x5f, 0x3d, 0xbf, 0x2b, 0x46, 0x9e, 0xde, 0x86, 0x47, 0x41, 0xb8, 0x6f, 0xa5, 0x91, 0x72, 0xa3, 0x60, 0xba, 0x95, 0xa0, 0x2e, 0x13, 0x9b, 0xe5, 0x0d, 0xdf, 0xb7, 0xcf, 0x0b, 0x42, 0x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d6, 0x47, 0x07, 0xbd, 0x29, 0x0c, 0xfd, 0x6a, 0x9f, 0x39, 0x3a, 0xd0, 0x8e, 0xc1, 0xe3, 0xbd, 0x71, 0xbb, 0x57, 0x92, 0x61, 0x50, 0x35, 0xcd, 0xaf, 0x2d, 0x89, 0x29, 0xae, 0xd3, 0xbe, 0x09, 0x83, 0x79, 0x37, 0x7e, 0x77, 0x7c, 0xe7, 0x9a, 0xaa, 0x47, 0x73 } + +} +, +{ + "RSASSA-PSS Signature Example 6.3", + /* Message to be signed */ + 62, + { 0x0f, 0x61, 0x95, 0xd0, 0x4a, 0x6e, 0x6f, 0xc7, 0xe2, 0xc9, 0x60, 0x0d, 0xbf, 0x84, 0x0c, 0x39, 0xea, 0x8d, 0x4d, 0x62, 0x4f, 0xd5, 0x35, 0x07, 0x01, 0x6b, 0x0e, 0x26, 0x85, 0x8a, 0x5e, 0x0a, 0xec, 0xd7, 0xad, 0xa5, 0x43, 0xae, 0x5c, 0x0a, 0xb3, 0xa6, 0x25, 0x99, 0xcb, 0xa0, 0xa5, 0x4e, 0x6b, 0xf4, 0x46, 0xe2, 0x62, 0xf9, 0x89, 0x97, 0x8f, 0x9d, 0xdf, 0x5e, 0x9a, 0x41 } +, + /* Salt */ + 20, + { 0xa8, 0x7b, 0x8a, 0xed, 0x07, 0xd7, 0xb8, 0xe2, 0xda, 0xf1, 0x4d, 0xdc, 0xa4, 0xac, 0x68, 0xc4, 0xd0, 0xaa, 0xbf, 0xf8 } +, + /* Signature */ + 129, + { 0x08, 0x6d, 0xf6, 0xb5, 0x00, 0x09, 0x8c, 0x12, 0x0f, 0x24, 0xff, 0x84, 0x23, 0xf7, 0x27, 0xd9, 0xc6, 0x1a, 0x5c, 0x90, 0x07, 0xd3, 0xb6, 0xa3, 0x1c, 0xe7, 0xcf, 0x8f, 0x3c, 0xbe, 0xc1, 0xa2, 0x6b, 0xb2, 0x0e, 0x2b, 0xd4, 0xa0, 0x46, 0x79, 0x32, 0x99, 0xe0, 0x3e, 0x37, 0xa2, 0x1b, 0x40, 0x19, 0x4f, 0xb0, 0x45, 0xf9, 0x0b, 0x18, 0xbf, 0x20, 0xa4, 0x79, 0x92, 0xcc, 0xd7, 0x99, 0xcf, 0x9c, 0x05, 0x9c, 0x29, 0x9c, 0x05, 0x26, 0x85, 0x49, 0x54, 0xaa, 0xde, 0x8a, 0x6a, 0xd9, 0xd9, 0x7e, 0xc9, 0x1a, 0x11, 0x45, 0x38, 0x3f, 0x42, 0x46, 0x8b, 0x23, 0x1f, 0x4d, 0x72, 0xf2, 0x37, 0x06, 0xd9, 0x85, 0x3c, 0x3f, 0xa4, 0x3c, 0xe8, 0xac, 0xe8, 0xbf, 0xe7, 0x48, 0x49, 0x87, 0xa1, 0xec, 0x6a, 0x16, 0xc8, 0xda, 0xf8, 0x1f, 0x7c, 0x8b, 0xf4, 0x27, 0x74, 0x70, 0x7a, 0x9d, 0xf4, 0x56 } + +} +, +{ + "RSASSA-PSS Signature Example 6.4", + /* Message to be signed */ + 112, + { 0x33, 0x7d, 0x25, 0xfe, 0x98, 0x10, 0xeb, 0xca, 0x0d, 0xe4, 0xd4, 0x65, 0x8d, 0x3c, 0xeb, 0x8e, 0x0f, 0xe4, 0xc0, 0x66, 0xab, 0xa3, 0xbc, 0xc4, 0x8b, 0x10, 0x5d, 0x3b, 0xf7, 0xe0, 0x25, 0x7d, 0x44, 0xfe, 0xce, 0xa6, 0x59, 0x6f, 0x4d, 0x0c, 0x59, 0xa0, 0x84, 0x02, 0x83, 0x36, 0x78, 0xf7, 0x06, 0x20, 0xf9, 0x13, 0x8d, 0xfe, 0xb7, 0xde, 0xd9, 0x05, 0xe4, 0xa6, 0xd5, 0xf0, 0x5c, 0x47, 0x3d, 0x55, 0x93, 0x66, 0x52, 0xe2, 0xa5, 0xdf, 0x43, 0xc0, 0xcf, 0xda, 0x7b, 0xac, 0xaf, 0x30, 0x87, 0xf4, 0x52, 0x4b, 0x06, 0xcf, 0x42, 0x15, 0x7d, 0x01, 0x53, 0x97, 0x39, 0xf7, 0xfd, 0xde, 0xc9, 0xd5, 0x81, 0x25, 0xdf, 0x31, 0xa3, 0x2e, 0xab, 0x06, 0xc1, 0x9b, 0x71, 0xf1, 0xd5, 0xbf } +, + /* Salt */ + 20, + { 0xa3, 0x79, 0x32, 0xf8, 0xa7, 0x49, 0x4a, 0x94, 0x2d, 0x6f, 0x76, 0x74, 0x38, 0xe7, 0x24, 0xd6, 0xd0, 0xc0, 0xef, 0x18 } +, + /* Signature */ + 129, + { 0x0b, 0x5b, 0x11, 0xad, 0x54, 0x98, 0x63, 0xff, 0xa9, 0xc5, 0x1a, 0x14, 0xa1, 0x10, 0x6c, 0x2a, 0x72, 0xcc, 0x8b, 0x64, 0x6e, 0x5c, 0x72, 0x62, 0x50, 0x97, 0x86, 0x10, 0x5a, 0x98, 0x47, 0x76, 0x53, 0x4c, 0xa9, 0xb5, 0x4c, 0x1c, 0xc6, 0x4b, 0xf2, 0xd5, 0xa4, 0x4f, 0xd7, 0xe8, 0xa6, 0x9d, 0xb6, 0x99, 0xd5, 0xea, 0x52, 0x08, 0x7a, 0x47, 0x48, 0xfd, 0x2a, 0xbc, 0x1a, 0xfe, 0xd1, 0xe5, 0xd6, 0xf7, 0xc8, 0x90, 0x25, 0x53, 0x0b, 0xda, 0xa2, 0x21, 0x3d, 0x7e, 0x03, 0x0f, 0xa5, 0x5d, 0xf6, 0xf3, 0x4b, 0xcf, 0x1c, 0xe4, 0x6d, 0x2e, 0xdf, 0x4e, 0x3a, 0xe4, 0xf3, 0xb0, 0x18, 0x91, 0xa0, 0x68, 0xc9, 0xe3, 0xa4, 0x4b, 0xbc, 0x43, 0x13, 0x3e, 0xda, 0xd6, 0xec, 0xb9, 0xf3, 0x54, 0x00, 0xc4, 0x25, 0x2a, 0x57, 0x62, 0xd6, 0x57, 0x44, 0xb9, 0x9c, 0xb9, 0xf4, 0xc5, 0x59, 0x32, 0x9f } + +} +, +{ + "RSASSA-PSS Signature Example 6.5", + /* Message to be signed */ + 176, + { 0x84, 0xec, 0x50, 0x2b, 0x07, 0x2e, 0x82, 0x87, 0x78, 0x9d, 0x8f, 0x92, 0x35, 0x82, 0x9e, 0xa3, 0xb1, 0x87, 0xaf, 0xd4, 0xd4, 0xc7, 0x85, 0x61, 0x1b, 0xda, 0x5f, 0x9e, 0xb3, 0xcb, 0x96, 0x71, 0x7e, 0xfa, 0x70, 0x07, 0x22, 0x7f, 0x1c, 0x08, 0xcb, 0xcb, 0x97, 0x2e, 0x66, 0x72, 0x35, 0xe0, 0xfb, 0x7d, 0x43, 0x1a, 0x65, 0x70, 0x32, 0x6d, 0x2e, 0xcc, 0xe3, 0x5a, 0xdb, 0x37, 0x3d, 0xc7, 0x53, 0xb3, 0xbe, 0x5f, 0x82, 0x9b, 0x89, 0x17, 0x54, 0x93, 0x19, 0x3f, 0xab, 0x16, 0xba, 0xdb, 0x41, 0x37, 0x1b, 0x3a, 0xac, 0x0a, 0xe6, 0x70, 0x07, 0x6f, 0x24, 0xbe, 0xf4, 0x20, 0xc1, 0x35, 0xad, 0xd7, 0xce, 0xe8, 0xd3, 0x5f, 0xbc, 0x94, 0x4d, 0x79, 0xfa, 0xfb, 0x9e, 0x30, 0x7a, 0x13, 0xb0, 0xf5, 0x56, 0xcb, 0x65, 0x4a, 0x06, 0xf9, 0x73, 0xed, 0x22, 0x67, 0x23, 0x30, 0x19, 0x7e, 0xf5, 0xa7, 0x48, 0xbf, 0x82, 0x6a, 0x5d, 0xb2, 0x38, 0x3a, 0x25, 0x36, 0x4b, 0x68, 0x6b, 0x93, 0x72, 0xbb, 0x23, 0x39, 0xae, 0xb1, 0xac, 0x9e, 0x98, 0x89, 0x32, 0x7d, 0x01, 0x6f, 0x16, 0x70, 0x77, 0x6d, 0xb0, 0x62, 0x01, 0xad, 0xbd, 0xca, 0xf8, 0xa5, 0xe3, 0xb7, 0x4e, 0x10, 0x8b, 0x73 } +, + /* Salt */ + 20, + { 0x7b, 0x79, 0x0c, 0x1d, 0x62, 0xf7, 0xb8, 0x4e, 0x94, 0xdf, 0x6a, 0xf2, 0x89, 0x17, 0xcf, 0x57, 0x10, 0x18, 0x11, 0x0e } +, + /* Signature */ + 129, + { 0x02, 0xd7, 0x1f, 0xa9, 0xb5, 0x3e, 0x46, 0x54, 0xfe, 0xfb, 0x7f, 0x08, 0x38, 0x5c, 0xf6, 0xb0, 0xae, 0x3a, 0x81, 0x79, 0x42, 0xeb, 0xf6, 0x6c, 0x35, 0xac, 0x67, 0xf0, 0xb0, 0x69, 0x95, 0x2a, 0x3c, 0xe9, 0xc7, 0xe1, 0xf1, 0xb0, 0x2e, 0x48, 0x0a, 0x95, 0x00, 0x83, 0x6d, 0xe5, 0xd6, 0x4c, 0xdb, 0x7e, 0xcd, 0xe0, 0x45, 0x42, 0xf7, 0xa7, 0x99, 0x88, 0x78, 0x7e, 0x24, 0xc2, 0xba, 0x05, 0xf5, 0xfd, 0x48, 0x2c, 0x02, 0x3e, 0xd5, 0xc3, 0x0e, 0x04, 0x83, 0x9d, 0xc4, 0x4b, 0xed, 0x2a, 0x3a, 0x3a, 0x4f, 0xee, 0x01, 0x11, 0x3c, 0x89, 0x1a, 0x47, 0xd3, 0x2e, 0xb8, 0x02, 0x5c, 0x28, 0xcb, 0x05, 0x0b, 0x5c, 0xdb, 0x57, 0x6c, 0x70, 0xfe, 0x76, 0xef, 0x52, 0x34, 0x05, 0xc0, 0x84, 0x17, 0xfa, 0xf3, 0x50, 0xb0, 0x37, 0xa4, 0x3c, 0x37, 0x93, 0x39, 0xfc, 0xb1, 0x8d, 0x3a, 0x35, 0x6b } + +} +, +{ + "RSASSA-PSS Signature Example 6.6", + /* Message to be signed */ + 139, + { 0x99, 0x06, 0xd8, 0x9f, 0x97, 0xa9, 0xfd, 0xed, 0xd3, 0xcc, 0xd8, 0x24, 0xdb, 0x68, 0x73, 0x26, 0xf3, 0x0f, 0x00, 0xaa, 0x25, 0xa7, 0xfc, 0xa2, 0xaf, 0xcb, 0x3b, 0x0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x30, 0x18, 0x91, 0xe2, 0x45, 0x60, 0x55, 0x0f, 0xcc, 0x2a, 0x26, 0xb5, 0x5f, 0x4c, 0xcb, 0x26, 0xd8, 0x37, 0xd3, 0x50, 0xa1, 0x54, 0xbc, 0xac, 0xa8, 0x39, 0x2d, 0x98, 0xfa, 0x67, 0x95, 0x9e, 0x97, 0x27, 0xb7, 0x8c, 0xad, 0x03, 0x26, 0x9f, 0x56, 0x96, 0x8f, 0xc5, 0x6b, 0x68, 0xbd, 0x67, 0x99, 0x26, 0xd8, 0x3c, 0xc9, 0xcb, 0x21, 0x55, 0x50, 0x64, 0x5c, 0xcd, 0xa3, 0x1c, 0x76, 0x0f, 0xf3, 0x58, 0x88, 0x94, 0x3d, 0x2d, 0x8a, 0x1d, 0x35, 0x1e, 0x81, 0xe5, 0xd0, 0x7b, 0x86, 0x18, 0x2e, 0x75, 0x10, 0x81, 0xef } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 7: A 1030-bit RSA Key Pair", +{ + /* RSA modulus n */ + 129, + { 0x37, 0xc9, 0xda, 0x4a, 0x66, 0xc8, 0xc4, 0x08, 0xb8, 0xda, 0x27, 0xd0, 0xc9, 0xd7, 0x9f, 0x8c, 0xcb, 0x1e, 0xaf, 0xc1, 0xd2, 0xfe, 0x48, 0x74, 0x6d, 0x94, 0x0b, 0x7c, 0x4e, 0xf5, 0xde, 0xe1, 0x8a, 0xd1, 0x26, 0x47, 0xce, 0xfa, 0xa0, 0xc4, 0xb3, 0x18, 0x8b, 0x22, 0x1c, 0x51, 0x53, 0x86, 0x75, 0x9b, 0x93, 0xf0, 0x20, 0x24, 0xb2, 0x5a, 0xb9, 0x24, 0x2f, 0x83, 0x57, 0xd8, 0xf3, 0xfd, 0x49, 0x64, 0x0e, 0xe5, 0xe6, 0x43, 0xea, 0xf6, 0xc6, 0x4d, 0xee, 0xfa, 0x70, 0x89, 0x72, 0x7c, 0x8f, 0xf0, 0x39, 0x93, 0x33, 0x39, 0x15, 0xc6, 0xef, 0x21, 0xbf, 0x59, 0x75, 0xb6, 0xe5, 0x0d, 0x11, 0x8b, 0x51, 0x00, 0x8e, 0xc3, 0x3e, 0x9f, 0x01, 0xa0, 0xa5, 0x45, 0xa1, 0x0a, 0x83, 0x6a, 0x43, 0xdd, 0xbc, 0xa9, 0xd8, 0xb5, 0xc5, 0xd3, 0x54, 0x80, 0x22, 0xd7, 0x06, 0x4e, 0xa2, 0x9a, 0xb3 } +, + /* RSA public exponent e */ + 3, + { 0x01, 0x00, 0x01 } +, + /* RSA private exponent d */ + 128, + { 0x3b, 0xed, 0x99, 0x90, 0x52, 0xd9, 0x57, 0xbc, 0x06, 0xd6, 0x51, 0xee, 0xf6, 0xe3, 0xa9, 0x80, 0x94, 0xb1, 0x62, 0x1b, 0xd3, 0x8b, 0x54, 0x49, 0xbd, 0x6c, 0x4a, 0xea, 0x3d, 0xe7, 0xe0, 0x84, 0x67, 0x9a, 0x44, 0x84, 0xde, 0xd2, 0x5b, 0xe0, 0xf0, 0x82, 0x6c, 0xf3, 0x37, 0x78, 0x25, 0x41, 0x4b, 0x14, 0xd4, 0xd6, 0x1d, 0xb1, 0x4d, 0xe6, 0x26, 0xfb, 0xb8, 0x0e, 0x5f, 0x4f, 0xae, 0xc9, 0x56, 0xf9, 0xa0, 0xa2, 0xd2, 0x4f, 0x99, 0x57, 0x63, 0x80, 0xf0, 0x84, 0xeb, 0x62, 0xe4, 0x6a, 0x57, 0xd5, 0x54, 0x27, 0x8b, 0x53, 0x56, 0x26, 0x19, 0x3c, 0xe0, 0x20, 0x60, 0x57, 0x5e, 0xb6, 0x6c, 0x57, 0x98, 0xd3, 0x6f, 0x6c, 0x5d, 0x40, 0xfb, 0x00, 0xd8, 0x09, 0xb4, 0x2a, 0x73, 0x10, 0x2c, 0x1c, 0x74, 0xee, 0x95, 0xbd, 0x71, 0x42, 0x0f, 0xff, 0xef, 0x63, 0x18, 0xb5, 0x2c, 0x29 } +, + /* Prime p */ + 65, + { 0x07, 0xee, 0xfb, 0x42, 0x4b, 0x0e, 0x3a, 0x40, 0xe4, 0x20, 0x8e, 0xe5, 0xaf, 0xb2, 0x80, 0xb2, 0x23, 0x17, 0x30, 0x81, 0x14, 0xdd, 0xe0, 0xb4, 0xb6, 0x4f, 0x73, 0x01, 0x84, 0xec, 0x68, 0xda, 0x6c, 0xe2, 0x86, 0x7a, 0x9f, 0x48, 0xed, 0x77, 0x26, 0xd5, 0xe2, 0x61, 0x4e, 0xd0, 0x4a, 0x54, 0x10, 0x73, 0x6c, 0x8c, 0x71, 0x4e, 0xe7, 0x02, 0x47, 0x42, 0x98, 0xc6, 0x29, 0x2a, 0xf0, 0x75, 0x35 } +, + /* Prime q */ + 65, + { 0x07, 0x08, 0x30, 0xdb, 0xf9, 0x47, 0xea, 0xc0, 0x22, 0x8d, 0xe2, 0x63, 0x14, 0xb5, 0x9b, 0x66, 0x99, 0x4c, 0xc6, 0x0e, 0x83, 0x60, 0xe7, 0x5d, 0x38, 0x76, 0x29, 0x8f, 0x8f, 0x8a, 0x7d, 0x14, 0x1d, 0xa0, 0x64, 0xe5, 0xca, 0x02, 0x6a, 0x97, 0x3e, 0x28, 0xf2, 0x54, 0x73, 0x8c, 0xee, 0x66, 0x9c, 0x72, 0x1b, 0x03, 0x4c, 0xb5, 0xf8, 0xe2, 0x44, 0xda, 0xdd, 0x7c, 0xd1, 0xe1, 0x59, 0xd5, 0x47 } +, + /* p's CRT exponent dP */ + 65, + { 0x05, 0x24, 0xd2, 0x0c, 0x3d, 0x95, 0xcf, 0xf7, 0x5a, 0xf2, 0x31, 0x34, 0x83, 0x22, 0x7d, 0x87, 0x02, 0x71, 0x7a, 0xa5, 0x76, 0xde, 0x15, 0x5f, 0x96, 0x05, 0x15, 0x50, 0x1a, 0xdb, 0x1d, 0x70, 0xe1, 0xc0, 0x4d, 0xe9, 0x1b, 0x75, 0xb1, 0x61, 0xdb, 0xf0, 0x39, 0x83, 0x56, 0x12, 0x7e, 0xde, 0xda, 0x7b, 0xbc, 0x19, 0xa3, 0x2d, 0xc1, 0x62, 0x1c, 0xc9, 0xf5, 0x3c, 0x26, 0x5d, 0x0c, 0xe3, 0x31 } +, + /* q's CRT exponent dQ */ + 65, + { 0x05, 0xf9, 0x84, 0xa1, 0xf2, 0x3c, 0x93, 0x8d, 0x6a, 0x0e, 0x89, 0x72, 0x4b, 0xcf, 0x3d, 0xd9, 0x3f, 0x99, 0x46, 0x92, 0x60, 0x37, 0xfe, 0x7c, 0x6b, 0x13, 0xa2, 0x9e, 0x52, 0x84, 0x85, 0x5f, 0x89, 0x08, 0x95, 0x91, 0xd4, 0x40, 0x97, 0x56, 0x27, 0xbf, 0x5c, 0x9e, 0x3a, 0x8b, 0x5c, 0xa7, 0x9c, 0x77, 0x2a, 0xd2, 0x73, 0xe4, 0x0d, 0x32, 0x1a, 0xf4, 0xa6, 0xc9, 0x7d, 0xfd, 0xed, 0x78, 0xd3 } +, + /* CRT coefficient qInv */ + 64, + { 0xdd, 0xd9, 0x18, 0xad, 0xad, 0xa2, 0x9d, 0xca, 0xb9, 0x81, 0xff, 0x9a, 0xcb, 0xa4, 0x25, 0x70, 0x23, 0xc0, 0x9a, 0x38, 0x01, 0xcc, 0xce, 0x09, 0x8c, 0xe2, 0x68, 0xf8, 0x55, 0xd0, 0xdf, 0x57, 0x0c, 0xd6, 0xe7, 0xb9, 0xb1, 0x4b, 0xd9, 0xa5, 0xa9, 0x25, 0x4c, 0xbc, 0x31, 0x5b, 0xe6, 0xf8, 0xba, 0x1e, 0x25, 0x46, 0xdd, 0xd5, 0x69, 0xc5, 0xea, 0x19, 0xee, 0xd8, 0x35, 0x3b, 0xde, 0x5e } + +} +, +{{ + "RSASSA-PSS Signature Example 7.1", + /* Message to be signed */ + 255, + { 0x9e, 0xad, 0x0e, 0x01, 0x94, 0x56, 0x40, 0x67, 0x4e, 0xb4, 0x1c, 0xad, 0x43, 0x5e, 0x23, 0x74, 0xea, 0xef, 0xa8, 0xad, 0x71, 0x97,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b, 0x7a, 0xc7, 0xa0, 0xa2, 0x01, 0xea, 0x0f, 0x1b, 0xee, 0x9a, 0x2c, 0x57, 0x79, 0x20, 0xca, 0x02, 0xc0, 0x1b, 0x9d, 0x83, 0x20, 0xe9, 0x74, 0xa5, 0x6f, 0x4e, 0xfb, 0x57, 0x63, 0xb9, 0x62, 0x55, 0xab, 0xbf, 0x80, 0x37, 0xbf, 0x18, 0x02, 0xcf, 0x01, 0x8f, 0x56, 0x37, 0x94, 0x93, 0xe5, 0x69, 0xa9 } +, + /* Salt */ + 20, + { 0xb7, 0x86, 0x7a, 0x59, 0x95, 0x8c, 0xb5, 0x43, 0x28, 0xf8, 0x77, 0x5e, 0x65, 0x46, 0xec, 0x06, 0xd2, 0x7e, 0xaa, 0x50 } +, + /* Signature */ + 129, + { 0x18, 0x7f, 0x39, 0x07, 0x23, 0xc8, 0x90, 0x25, 0x91, 0xf0, 0x15, 0x4b, 0xae, 0x6d, 0x4e, 0xcb, 0xff, 0xe0, 0x67, 0xf0, 0xe8, 0xb7, 0x95, 0x47, 0x6e, 0xa4, 0xf4, 0xd5, 0x1c, 0xcc, 0x81, 0x05, 0x20, 0xbb, 0x3c, 0xa9, 0xbc, 0xa7, 0xd0, 0xb1, 0xf2, 0xea, 0x8a, 0x17, 0xd8, 0x73, 0xfa, 0x27, 0x57, 0x0a, 0xcd, 0x64, 0x2e, 0x38, 0x08, 0x56, 0x1c, 0xb9, 0xe9, 0x75, 0xcc, 0xfd, 0x80, 0xb2, 0x3d, 0xc5, 0x77, 0x1c, 0xdb, 0x33, 0x06, 0xa5, 0xf2, 0x31, 0x59, 0xda, 0xcb, 0xd3, 0xaa, 0x2d, 0xb9, 0x3d, 0x46, 0xd7, 0x66, 0xe0, 0x9e, 0xd1, 0x5d, 0x90, 0x0a, 0xd8, 0x97, 0xa8, 0xd2, 0x74, 0xdc, 0x26, 0xb4, 0x7e, 0x99, 0x4a, 0x27, 0xe9, 0x7e, 0x22, 0x68, 0xa7, 0x66, 0x53, 0x3a, 0xe4, 0xb5, 0xe4, 0x2a, 0x2f, 0xca, 0xf7, 0x55, 0xc1, 0xc4, 0x79, 0x4b, 0x29, 0x4c, 0x60, 0x55, 0x58, 0x23 } + +} +, +#ifdef LTC_TEST_EXT +{ + "RSASSA-PSS Signature Example 7.2", + /* Message to be signed */ + 57, + { 0x8d, 0x80, 0xd2, 0xd0, 0x8d, 0xbd, 0x19, 0xc1, 0x54, 0xdf, 0x3f, 0x14, 0x67, 0x3a, 0x14, 0xbd, 0x03, 0x73, 0x52, 0x31, 0xf2, 0x4e, 0x86, 0xbf, 0x15, 0x3d, 0x0e, 0x69, 0xe7, 0x4c, 0xbf, 0xf7, 0xb1, 0x83, 0x6e, 0x66, 0x4d, 0xe8, 0x3f, 0x68, 0x01, 0x24, 0x37, 0x0f, 0xc0, 0xf9, 0x6c, 0x9b, 0x65, 0xc0, 0x7a, 0x36, 0x6b, 0x64, 0x4c, 0x4a, 0xb3 } +, + /* Salt */ + 20, + { 0x0c, 0x09, 0x58, 0x22, 0x66, 0xdf, 0x08, 0x63, 0x10, 0x82, 0x1b, 0xa7, 0xe1, 0x8d, 0xf6, 0x4d, 0xfe, 0xe6, 0xde, 0x09 } +, + /* Signature */ + 129, + { 0x10, 0xfd, 0x89, 0x76, 0x8a, 0x60, 0xa6, 0x77, 0x88, 0xab, 0xb5, 0x85, 0x6a, 0x78, 0x7c, 0x85, 0x61, 0xf3, 0xed, 0xcf, 0x9a, 0x83, 0xe8, 0x98, 0xf7, 0xdc, 0x87, 0xab, 0x8c, 0xce, 0x79, 0x42, 0x9b, 0x43, 0xe5, 0x69, 0x06, 0x94, 0x1a, 0x88, 0x61, 0x94, 0xf1, 0x37, 0xe5, 0x91, 0xfe, 0x7c, 0x33, 0x95, 0x55, 0x36, 0x1f, 0xbb, 0xe1, 0xf2, 0x4f, 0xeb, 0x2d, 0x4b, 0xcd, 0xb8, 0x06, 0x01, 0xf3, 0x09, 0x6b, 0xc9, 0x13, 0x2d, 0xee, 0xa6, 0x0a, 0xe1, 0x30, 0x82, 0xf4, 0x4f, 0x9a, 0xd4, 0x1c, 0xd6, 0x28, 0x93, 0x6a, 0x4d, 0x51, 0x17, 0x6e, 0x42, 0xfc, 0x59, 0xcb, 0x76, 0xdb, 0x81, 0x5c, 0xe5, 0xab, 0x4d, 0xb9, 0x9a, 0x10, 0x4a, 0xaf, 0xea, 0x68, 0xf5, 0xd3, 0x30, 0x32, 0x9e, 0xbf, 0x25, 0x8d, 0x4e, 0xde, 0x16, 0x06, 0x4b, 0xd1, 0xd0, 0x03, 0x93, 0xd5, 0xe1, 0x57, 0x0e, 0xb8 } + +} +, +{ + "RSASSA-PSS Signature Example 7.3", + /* Message to be signed */ + 92, + { 0x80, 0x84, 0x05, 0xcd, 0xfc, 0x1a, 0x58, 0xb9, 0xbb, 0x03, 0x97, 0xc7, 0x20, 0x72, 0x2a, 0x81, 0xff, 0xfb, 0x76, 0x27, 0x8f, 0x33, 0x59, 0x17, 0xef, 0x9c, 0x47, 0x38, 0x14, 0xb3, 0xe0, 0x16, 0xba, 0x29, 0x73, 0xcd, 0x27, 0x65, 0xf8, 0xf3, 0xf8, 0x2d, 0x6c, 0xc3, 0x8a, 0xa7, 0xf8, 0x55, 0x18, 0x27, 0xfe, 0x8d, 0x1e, 0x38, 0x84, 0xb7, 0xe6, 0x1c, 0x94, 0x68, 0x3b, 0x8f, 0x82, 0xf1, 0x84, 0x3b, 0xda, 0xe2, 0x25, 0x7e, 0xee, 0xc9, 0x81, 0x2a, 0xd4, 0xc2, 0xcf, 0x28, 0x3c, 0x34, 0xe0, 0xb0, 0xae, 0x0f, 0xe3, 0xcb, 0x99, 0x0c, 0xf8, 0x8f, 0x2e, 0xf9 } +, + /* Salt */ + 20, + { 0x28, 0x03, 0x9d, 0xcf, 0xe1, 0x06, 0xd3, 0xb8, 0x29, 0x66, 0x11, 0x25, 0x8c, 0x4a, 0x56, 0x65, 0x1c, 0x9e, 0x92, 0xdd } +, + /* Signature */ + 129, + { 0x2b, 0x31, 0xfd, 0xe9, 0x98, 0x59, 0xb9, 0x77, 0xaa, 0x09, 0x58, 0x6d, 0x8e, 0x27, 0x46, 0x62, 0xb2, 0x5a, 0x2a, 0x64, 0x06, 0x40, 0xb4, 0x57, 0xf5, 0x94, 0x05, 0x1c, 0xb1, 0xe7, 0xf7, 0xa9, 0x11, 0x86, 0x54, 0x55, 0x24, 0x29, 0x26, 0xcf, 0x88, 0xfe, 0x80, 0xdf, 0xa3, 0xa7, 0x5b, 0xa9, 0x68, 0x98, 0x44, 0xa1, 0x1e, 0x63, 0x4a, 0x82, 0xb0, 0x75, 0xaf, 0xbd, 0x69, 0xc1, 0x2a, 0x0d, 0xf9, 0xd2, 0x5f, 0x84, 0xad, 0x49, 0x45, 0xdf, 0x3d, 0xc8, 0xfe, 0x90, 0xc3, 0xce, 0xfd, 0xf2, 0x6e, 0x95, 0xf0, 0x53, 0x43, 0x04, 0xb5, 0xbd, 0xba, 0x20, 0xd3, 0xe5, 0x64, 0x0a, 0x2e, 0xbf, 0xb8, 0x98, 0xaa, 0xc3, 0x5a, 0xe4, 0x0f, 0x26, 0xfc, 0xe5, 0x56, 0x3c, 0x2f, 0x9f, 0x24, 0xf3, 0x04, 0x2a, 0xf7, 0x6f, 0x3c, 0x70, 0x72, 0xd6, 0x87, 0xbb, 0xfb, 0x95, 0x9a, 0x88, 0x46, 0x0a, 0xf1 } + +} +, +{ + "RSASSA-PSS Signature Example 7.4", + /* Message to be signed */ + 231, + { 0xf3, 0x37, 0xb9, 0xba, 0xd9, 0x37, 0xde, 0x22, 0xa1, 0xa0, 0x52, 0xdf, 0xf1, 0x11, 0x34, 0xa8, 0xce, 0x26, 0x97, 0x62, 0x02, 0x98, 0x19, 0x39, 0xb9, 0x1e, 0x07, 0x15, 0xae, 0x5e, 0x60, 0x96, 0x49, 0xda, 0x1a, 0xdf, 0xce, 0xf3, 0xf4, 0xcc, 0xa5, 0x9b, 0x23, 0x83, 0x60, 0xe7, 0xd1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+ /* Salt */ + 20, + { 0xa7, 0x78, 0x21, 0xeb, 0xbb, 0xef, 0x24, 0x62, 0x8e, 0x4e, 0x12, 0xe1, 0xd0, 0xea, 0x96, 0xde, 0x39, 0x8f, 0x7b, 0x0f } +, + /* Signature */ + 129, + { 0x32, 0xc7, 0xca, 0x38, 0xff, 0x26, 0x94, 0x9a, 0x15, 0x00, 0x0c, 0x4b, 0xa0, 0x4b, 0x2b, 0x13, 0xb3, 0x5a, 0x38, 0x10, 0xe5, 0x68, 0x18, 0x4d, 0x7e, 0xca, 0xba, 0xa1, 0x66, 0xb7, 0xff, 0xab, 0xdd, 0xf2, 0xb6, 0xcf, 0x4b, 0xa0, 0x71, 0x24, 0x92, 0x37, 0x90, 0xf2, 0xe5, 0xb1, 0xa5, 0xbe, 0x04, 0x0a, 0xea, 0x36, 0xfe, 0x13, 0x2e, 0xc1, 0x30, 0xe1, 0xf1, 0x05, 0x67, 0x98, 0x2d, 0x17, 0xac, 0x3e, 0x89, 0xb8, 0xd2, 0x6c, 0x30, 0x94, 0x03, 0x4e, 0x76, 0x2d, 0x2e, 0x03, 0x12, 0x64, 0xf0, 0x11, 0x70, 0xbe, 0xec, 0xb3, 0xd1, 0x43, 0x9e, 0x05, 0x84, 0x6f, 0x25, 0x45, 0x83, 0x67, 0xa7, 0xd9, 0xc0, 0x20, 0x60, 0x44, 0x46, 0x72, 0x67, 0x1e, 0x64, 0xe8, 0x77, 0x86, 0x45, 0x59, 0xca, 0x19, 0xb2, 0x07, 0x4d, 0x58, 0x8a, 0x28, 0x1b, 0x58, 0x04, 0xd2, 0x37, 0x72, 0xfb, 0xbe, 0x19 } + +} +, +{ + "RSASSA-PSS Signature Example 7.5", + /* Message to be signed */ + 51, + { 0x45, 0x01, 0x3c, 0xeb, 0xaf, 0xd9, 0x60, 0xb2, 0x55, 0x47, 0x6a, 0x8e, 0x25, 0x98, 0xb9, 0xaa, 0x32, 0xef, 0xbe, 0x6d, 0xc1, 0xf3, 0x4f, 0x4a, 0x49, 0x8d, 0x8c, 0xf5, 0xa2, 0xb4, 0x54, 0x8d, 0x08, 0xc5, 0x5d, 0x5f, 0x95, 0xf7, 0xbc, 0xc9, 0x61, 0x91, 0x63, 0x05, 0x6f, 0x2d, 0x58, 0xb5, 0x2f, 0xa0, 0x32 } +, + /* Salt */ + 20, + { 0x9d, 0x5a, 0xd8, 0xeb, 0x45, 0x21, 0x34, 0xb6, 0x5d, 0xc3, 0xa9, 0x8b, 0x6a, 0x73, 0xb5, 0xf7, 0x41, 0x60, 0x9c, 0xd6 } +, + /* Signature */ + 129, + { 0x07, 0xeb, 0x65, 0x1d, 0x75, 0xf1, 0xb5, 0x2b, 0xc2, 0x63, 0xb2, 0xe1, 0x98, 0x33, 0x6e, 0x99, 0xfb, 0xeb, 0xc4, 0xf3, 0x32, 0x04, 0x9a, 0x92, 0x2a, 0x10, 0x81, 0x56, 0x07, 0xee, 0x2d, 0x98, 0x9d, 0xb3, 0xa4, 0x49, 0x5b, 0x7d, 0xcc, 0xd3, 0x8f, 0x58, 0xa2, 0x11, 0xfb, 0x7e, 0x19, 0x31, 0x71, 0xa3, 0xd8, 0x91, 0x13, 0x24, 0x37, 0xeb, 0xca, 0x44, 0xf3, 0x18, 0xb2, 0x80, 0x50, 0x9e, 0x52, 0xb5, 0xfa, 0x98, 0xfc, 0xce, 0x82, 0x05, 0xd9, 0x69, 0x7c, 0x8e, 0xe4, 0xb7, 0xff, 0x59, 0xd4, 0xc5, 0x9c, 0x79, 0x03, 0x8a, 0x19, 0x70, 0xbd, 0x2a, 0x0d, 0x45, 0x1e, 0xcd, 0xc5, 0xef, 0x11, 0xd9, 0x97, 0x9c, 0x9d, 0x35, 0xf8, 0xc7, 0x0a, 0x61, 0x63, 0x71, 0x76, 0x07, 0x89, 0x0d, 0x58, 0x6a, 0x7c, 0x6d, 0xc0, 0x1c, 0x79, 0xf8, 0x6a, 0x8f, 0x28, 0xe8, 0x52, 0x35, 0xf8, 0xc2, 0xf1 } + +} +, +{ + "RSASSA-PSS Signature Example 7.6", + /* Message to be signed */ + 184, + { 0x23, 0x58, 0x09, 0x70, 0x86, 0xc8, 0x99, 0x32, 0x3e, 0x75, 0xd9, 0xc9, 0x0d, 0x0c, 0x09, 0xf1, 0x2d, 0x9d, 0x54, 0xed, 0xfb, 0xdf, 0x70, 0xa9, 0xc2, 0xeb, 0x5a, 0x04, 0xd8, 0xf3, 0x6b, 0x9b, 0x2b, 0xdf, 0x2a, 0xab, 0xe0, 0xa5, 0xbd, 0xa1, 0x96, 0x89, 0x37, 0xf9, 0xd6, 0xeb, 0xd3, 0xb6, 0xb2, 0x57, 0xef, 0xb3, 0x13, 0x6d, 0x41, 0x31, 0xf9, 0xac, 0xb5, 0x9b, 0x85, 0xe2, 0x60, 0x2c, 0x2a, 0x3f, 0xcd, 0xc8, 0x35, 0x49, 0x4a, 0x1f, 0x4e, 0x5e, 0xc1, 0x8b, 0x22, 0x6c, 0x80, 0x23, 0x2b, 0x36, 0xa7, 0x5a, 0x45, 0xfd, 0xf0, 0x9a, 0x7e, 0xa9, 0xe9, 0x8e, 0xfb, 0xde, 0x14, 0x50, 0xd1, 0x19, 0x4b, 0xf1, 0x2e, 0x15, 0xa4, 0xc5, 0xf9, 0xeb, 0x5c, 0x0b, 0xce, 0x52, 0x69, 0xe0, 0xc3, 0xb2, 0x8c, 0xfa, 0xb6, 0x55, 0xd8, 0x1a, 0x61, 0xa2, 0x0b, 0x4b, 0xe2, 0xf5, 0x44, 0x59, 0xbb, 0x25, 0xa0, 0xdb, 0x94, 0xc5, 0x22, 0x18, 0xbe, 0x10, 0x9a, 0x74, 0x26, 0xde, 0x83, 0x01, 0x44, 0x24, 0x78, 0x9a, 0xaa, 0x90, 0xe5, 0x05, 0x6e, 0x63, 0x2a, 0x69, 0x81, 0x15, 0xe2, 0x82, 0xc1, 0xa5, 0x64, 0x10, 0xf2, 0x6c, 0x20, 0x72, 0xf1, 0x93, 0x48, 0x1a, 0x9d, 0xcd, 0x88, 0x05, 0x72, 0x00, 0x5e, 0x64, 0xf4, 0x08, 0x2e, 0xcf } +, + /* Salt */ + 20, + { 0x3f, 0x2e, 0xfc, 0x59, 0x58, 0x80, 0xa7, 0xd4, 0x7f, 0xcf, 0x3c, 0xba, 0x04, 0x98, 0x3e, 0xa5, 0x4c, 0x4b, 0x73, 0xfb } +, + /* Signature */ + 129, + { 0x18, 0xda, 0x3c, 0xdc, 0xfe, 0x79, 0xbf, 0xb7, 0x7f, 0xd9, 0xc3, 0x2f, 0x37, 0x7a, 0xd3, 0x99, 0x14, 0x6f, 0x0a, 0x8e, 0x81, 0x06, 0x20, 0x23, 0x32, 0x71, 0xa6, 0xe3, 0xed, 0x32, 0x48, 0x90, 0x3f, 0x5c, 0xdc, 0x92, 0xdc, 0x79, 0xb5, 0x5d, 0x3e, 0x11, 0x61, 0x5a, 0xa0, 0x56, 0xa7, 0x95, 0x85, 0x37, 0x92, 0xa3, 0x99, 0x8c, 0x34, 0x9c, 0xa5, 0xc4, 0x57, 0xe8, 0xca, 0x7d, 0x29, 0xd7, 0x96, 0xaa, 0x24, 0xf8, 0x34, 0x91, 0x70, 0x9b, 0xef, 0xcf, 0xb1, 0x51, 0x0e, 0xa5, 0x13, 0xc9, 0x28, 0x29, 0xa3, 0xf0, 0x0b, 0x10, 0x4f, 0x65, 0x56, 0x34, 0xf3, 0x20, 0x75, 0x2e, 0x13, 0x0e, 0xc0, 0xcc, 0xf6, 0x75, 0x4f, 0xf8, 0x93, 0xdb, 0x30, 0x29, 0x32, 0xbb, 0x02, 0x5e, 0xb6, 0x0e, 0x87, 0x82, 0x25, 0x98, 0xfc, 0x61, 0x9e, 0x0e, 0x98, 0x17, 0x37, 0xa9, 0xa4, 0xc4, 0x15, 0x2d, 0x33 } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 8: A 1031-bit RSA Key Pair", +{ + /* RSA modulus n */ + 129, + { 0x49, 0x53, 0x70, 0xa1, 0xfb, 0x18, 0x54, 0x3c, 0x16, 0xd3, 0x63, 0x1e, 0x31, 0x63, 0x25, 0x5d, 0xf6, 0x2b, 0xe6, 0xee, 0xe8, 0x90, 0xd5, 0xf2, 0x55, 0x09, 0xe4, 0xf7, 0x78, 0xa8, 0xea, 0x6f, 0xbb, 0xbc, 0xdf, 0x85, 0xdf, 0xf6, 0x4e, 0x0d, 0x97, 0x20, 0x03, 0xab, 0x36, 0x81, 0xfb, 0xba, 0x6d, 0xd4, 0x1f, 0xd5, 0x41, 0x82, 0x9b, 0x2e, 0x58, 0x2d, 0xe9, 0xf2, 0xa4, 0xa4, 0xe0, 0xa2, 0xd0, 0x90, 0x0b, 0xef, 0x47, 0x53, 0xdb, 0x3c, 0xee, 0x0e, 0xe0, 0x6c, 0x7d, 0xfa, 0xe8, 0xb1, 0xd5, 0x3b, 0x59, 0x53, 0x21, 0x8f, 0x9c, 0xce, 0xea, 0x69, 0x5b, 0x08, 0x66, 0x8e, 0xde, 0xaa, 0xdc, 0xed, 0x94, 0x63, 0xb1, 0xd7, 0x90, 0xd5, 0xeb, 0xf2, 0x7e, 0x91, 0x15, 0xb4, 0x6c, 0xad, 0x4d, 0x9a, 0x2b, 0x8e, 0xfa, 0xb0, 0x56, 0x1b, 0x08, 0x10, 0x34, 0x47, 0x39, 0xad, 0xa0, 0x73, 0x3f } +, + /* RSA public exponent e */ + 3, + { 0x01, 0x00, 0x01 } +, + /* RSA private exponent d */ + 128, + { 0x6c, 0x66, 0xff, 0xe9, 0x89, 0x80, 0xc3, 0x8f, 0xcd, 0xea, 0xb5, 0x15, 0x98, 0x98, 0x83, 0x61, 0x65, 0xf4, 0xb4, 0xb8, 0x17, 0xc4, 0xf6, 0xa8, 0xd4, 0x86, 0xee, 0x4e, 0xa9, 0x13, 0x0f, 0xe9, 0xb9, 0x09, 0x2b, 0xd1, 0x36, 0xd1, 0x84, 0xf9, 0x5f, 0x50, 0x4a, 0x60, 0x7e, 0xac, 0x56, 0x58, 0x46, 0xd2, 0xfd, 0xd6, 0x59, 0x7a, 0x89, 0x67, 0xc7, 0x39, 0x6e, 0xf9, 0x5a, 0x6e, 0xee, 0xbb, 0x45, 0x78, 0xa6, 0x43, 0x96, 0x6d, 0xca, 0x4d, 0x8e, 0xe3, 0xde, 0x84, 0x2d, 0xe6, 0x32, 0x79, 0xc6, 0x18, 0x15, 0x9c, 0x1a, 0xb5, 0x4a, 0x89, 0x43, 0x7b, 0x6a, 0x61, 0x20, 0xe4, 0x93, 0x0a, 0xfb, 0x52, 0xa4, 0xba, 0x6c, 0xed, 0x8a, 0x49, 0x47, 0xac, 0x64, 0xb3, 0x0a, 0x34, 0x97, 0xcb, 0xe7, 0x01, 0xc2, 0xd6, 0x26, 0x6d, 0x51, 0x72, 0x19, 0xad, 0x0e, 0xc6, 0xd3, 0x47, 0xdb, 0xe9 } +, + /* Prime p */ + 65, + { 0x08, 0xda, 0xd7, 0xf1, 0x13, 0x63, 0xfa, 0xa6, 0x23, 0xd5, 0xd6, 0xd5, 0xe8, 0xa3, 0x19, 0x32, 0x8d, 0x82, 0x19, 0x0d, 0x71, 0x27, 0xd2, 0x84, 0x6c, 0x43, 0x9b, 0x0a, 0xb7, 0x26, 0x19, 0xb0, 0xa4, 0x3a, 0x95, 0x32, 0x0e, 0x4e, 0xc3, 0x4f, 0xc3, 0xa9, 0xce, 0xa8, 0x76, 0x42, 0x23, 0x05, 0xbd, 0x76, 0xc5, 0xba, 0x7b, 0xe9, 0xe2, 0xf4, 0x10, 0xc8, 0x06, 0x06, 0x45, 0xa1, 0xd2, 0x9e, 0xdb } +, + /* Prime q */ + 65, + { 0x08, 0x47, 0xe7, 0x32, 0x37, 0x6f, 0xc7, 0x90, 0x0f, 0x89, 0x8e, 0xa8, 0x2e, 0xb2, 0xb0, 0xfc, 0x41, 0x85, 0x65, 0xfd, 0xae, 0x62, 0xf7, 0xd9, 0xec, 0x4c, 0xe2, 0x21, 0x7b, 0x97, 0x99, 0x0d, 0xd2, 0x72, 0xdb, 0x15, 0x7f, 0x99, 0xf6, 0x3c, 0x0d, 0xcb, 0xb9, 0xfb, 0xac, 0xdb, 0xd4, 0xc4, 0xda, 0xdb, 0x6d, 0xf6, 0x77, 0x56, 0x35, 0x8c, 0xa4, 0x17, 0x48, 0x25, 0xb4, 0x8f, 0x49, 0x70, 0x6d } +, + /* p's CRT exponent dP */ + 65, + { 0x05, 0xc2, 0xa8, 0x3c, 0x12, 0x4b, 0x36, 0x21, 0xa2, 0xaa, 0x57, 0xea, 0x2c, 0x3e, 0xfe, 0x03, 0x5e, 0xff, 0x45, 0x60, 0xf3, 0x3d, 0xde, 0xbb, 0x7a, 0xda, 0xb8, 0x1f, 0xce, 0x69, 0xa0, 0xc8, 0xc2, 0xed, 0xc1, 0x65, 0x20, 0xdd, 0xa8, 0x3d, 0x59, 0xa2, 0x3b, 0xe8, 0x67, 0x96, 0x3a, 0xc6, 0x5f, 0x2c, 0xc7, 0x10, 0xbb, 0xcf, 0xb9, 0x6e, 0xe1, 0x03, 0xde, 0xb7, 0x71, 0xd1, 0x05, 0xfd, 0x85 } +, + /* q's CRT exponent dQ */ + 65, + { 0x04, 0xca, 0xe8, 0xaa, 0x0d, 0x9f, 0xaa, 0x16, 0x5c, 0x87, 0xb6, 0x82, 0xec, 0x14, 0x0b, 0x8e, 0xd3, 0xb5, 0x0b, 0x24, 0x59, 0x4b, 0x7a, 0x3b, 0x2c, 0x22, 0x0b, 0x36, 0x69, 0xbb, 0x81, 0x9f, 0x98, 0x4f, 0x55, 0x31, 0x0a, 0x1a, 0xe7, 0x82, 0x36, 0x51, 0xd4, 0xa0, 0x2e, 0x99, 0x44, 0x79, 0x72, 0x59, 0x51, 0x39, 0x36, 0x34, 0x34, 0xe5, 0xe3, 0x0a, 0x7e, 0x7d, 0x24, 0x15, 0x51, 0xe1, 0xb9 } +, + /* CRT coefficient qInv */ + 65, + { 0x07, 0xd3, 0xe4, 0x7b, 0xf6, 0x86, 0x60, 0x0b, 0x11, 0xac, 0x28, 0x3c, 0xe8, 0x8d, 0xbb, 0x3f, 0x60, 0x51, 0xe8, 0xef, 0xd0, 0x46, 0x80, 0xe4, 0x4c, 0x17, 0x1e, 0xf5, 0x31, 0xb8, 0x0b, 0x2b, 0x7c, 0x39, 0xfc, 0x76, 0x63, 0x20, 0xe2, 0xcf, 0x15, 0xd8, 0xd9, 0x98, 0x20, 0xe9, 0x6f, 0xf3, 0x0d, 0xc6, 0x96, 0x91, 0x83, 0x9c, 0x4b, 0x40, 0xd7, 0xb0, 0x6e, 0x45, 0x30, 0x7d, 0xc9, 0x1f, 0x3f } + +} +, +{{ + "RSASSA-PSS Signature Example 8.1", + /* Message to be signed */ + 172, + { 0x81, 0x33, 0x2f, 0x4b, 0xe6, 0x29, 0x48, 0x41, 0x5e, 0xa1, 0xd8, 0x99, 0x79, 0x2e, 0xea, 0xcf, 0x6c, 0x6e, 0x1d, 0xb1, 0xda, 0x8b, 0xe1, 0x3b, 0x5c, 0xea, 0x41, 0xdb, 0x2f, 0xed, 0x46, 0x70, 0x92, 0xe1, 0xff, 0x39, 0x89, 0x14, 0xc7, 0x14, 0x25, 0x97, 0x75, 0xf5, 0x95, 0xf8, 0x54, 0x7f, 0x73, 0x56, 0x92, 0xa5, 0x75, 0xe6, 0x92, 0x3a, 0xf7, 0x8f, 0x22, 0xc6, 0x99, 0x7d, 0xdb, 0x90, 0xfb, 0x6f, 0x72, 0xd7, 0xbb, 0x0d, 0xd5, 0x74, 0x4a, 0x31, 0xde, 0xcd, 0x3d, 0xc3, 0x68, 0x58, 0x49, 0x83, 0x6e, 0xd3, 0x4a, 0xec, 0x59, 0x63, 0x04, 0xad, 0x11, 0x84, 0x3c, 0x4f, 0x88, 0x48, 0x9f, 0x20, 0x97, 0x35, 0xf5, 0xfb, 0x7f, 0xda, 0xf7, 0xce, 0xc8, 0xad, 0xdc, 0x58, 0x18, 0x16, 0x8f, 0x88, 0x0a, 0xcb, 0xf4, 0x90, 0xd5, 0x10, 0x05, 0xb7, 0xa8, 0xe8, 0x4e, 0x43, 0xe5, 0x42, 0x87, 0x97, 0x75, 0x71, 0xdd, 0x99, 0xee, 0xa4, 0xb1, 0x61, 0xeb, 0x2d, 0xf1, 0xf5, 0x10, 0x8f, 0x12, 0xa4, 0x14, 0x2a, 0x83, 0x32, 0x2e, 0xdb, 0x05, 0xa7, 0x54, 0x87, 0xa3, 0x43, 0x5c, 0x9a, 0x78, 0xce, 0x53, 0xed, 0x93, 0xbc, 0x55, 0x08, 0x57, 0xd7, 0xa9, 0xfb } +, + /* Salt */ + 20, + { 0x1d, 0x65, 0x49, 0x1d, 0x79, 0xc8, 0x64, 0xb3, 0x73, 0x00, 0x9b, 0xe6, 0xf6, 0xf2, 0x46, 0x7b, 0xac, 0x4c, 0x78, 0xfa } +, + /* Signature */ + 129, + { 0x02, 0x62, 0xac, 0x25, 0x4b, 0xfa, 0x77, 0xf3, 0xc1, 0xac, 0xa2, 0x2c, 0x51, 0x79, 0xf8, 0xf0, 0x40, 0x42, 0x2b, 0x3c, 0x5b, 0xaf, 0xd4, 0x0a, 0x8f, 0x21, 0xcf, 0x0f, 0xa5, 0xa6, 0x67, 0xcc, 0xd5, 0x99, 0x3d, 0x42, 0xdb, 0xaf, 0xb4, 0x09, 0xc5, 0x20, 0xe2, 0x5f, 0xce, 0x2b, 0x1e, 0xe1, 0xe7, 0x16, 0x57, 0x7f, 0x1e, 0xfa, 0x17, 0xf3, 0xda, 0x28, 0x05, 0x2f, 0x40, 0xf0, 0x41, 0x9b, 0x23, 0x10, 0x6d, 0x78, 0x45, 0xaa, 0xf0, 0x11, 0x25, 0xb6, 0x98, 0xe7, 0xa4, 0xdf, 0xe9, 0x2d, 0x39, 0x67, 0xbb, 0x00, 0xc4, 0xd0, 0xd3, 0x5b, 0xa3, 0x55, 0x2a, 0xb9, 0xa8, 0xb3, 0xee, 0xf0, 0x7c, 0x7f, 0xec, 0xdb, 0xc5, 0x42, 0x4a, 0xc4, 0xdb, 0x1e, 0x20, 0xcb, 0x37, 0xd0, 0xb2, 0x74, 0x47, 0x69, 0x94, 0x0e, 0xa9, 0x07, 0xe1, 0x7f, 0xbb, 0xca, 0x67, 0x3b, 0x20, 0x52, 0x23, 0x80, 0xc5 } + +} +, +#ifdef LTC_TEST_EXT +{ + "RSASSA-PSS Signature Example 8.2", + /* Message to be signed */ + 38, + { 0xe2, 0xf9, 0x6e, 0xaf, 0x0e, 0x05, 0xe7, 0xba, 0x32, 0x6e, 0xcc, 0xa0, 0xba, 0x7f, 0xd2, 0xf7, 0xc0, 0x23, 0x56, 0xf3, 0xce, 0xde, 0x9d, 0x0f, 0xaa, 0xbf, 0x4f, 0xcc, 0x8e, 0x60, 0xa9, 0x73, 0xe5, 0x59, 0x5f, 0xd9, 0xea, 0x08 } +, + /* Salt */ + 20, + { 0x43, 0x5c, 0x09, 0x8a, 0xa9, 0x90, 0x9e, 0xb2, 0x37, 0x7f, 0x12, 0x48, 0xb0, 0x91, 0xb6, 0x89, 0x87, 0xff, 0x18, 0x38 } +, + /* Signature */ + 129, + { 0x27, 0x07, 0xb9, 0xad, 0x51, 0x15, 0xc5, 0x8c, 0x94, 0xe9, 0x32, 0xe8, 0xec, 0x0a, 0x28, 0x0f, 0x56, 0x33, 0x9e, 0x44, 0xa1, 0xb5, 0x8d, 0x4d, 0xdc, 0xff, 0x2f, 0x31, 0x2e, 0x5f, 0x34, 0xdc, 0xfe, 0x39, 0xe8, 0x9c, 0x6a, 0x94, 0xdc, 0xee, 0x86, 0xdb, 0xbd, 0xae, 0x5b, 0x79, 0xba, 0x4e, 0x08, 0x19, 0xa9, 0xe7, 0xbf, 0xd9, 0xd9, 0x82, 0xe7, 0xee, 0x6c, 0x86, 0xee, 0x68, 0x39, 0x6e, 0x8b, 0x3a, 0x14, 0xc9, 0xc8, 0xf3, 0x4b, 0x17, 0x8e, 0xb7, 0x41, 0xf9, 0xd3, 0xf1, 0x21, 0x10, 0x9b, 0xf5, 0xc8, 0x17, 0x2f, 0xad, 0xa2, 0xe7, 0x68, 0xf9, 0xea, 0x14, 0x33, 0x03, 0x2c, 0x00, 0x4a, 0x8a, 0xa0, 0x7e, 0xb9, 0x90, 0x00, 0x0a, 0x48, 0xdc, 0x94, 0xc8, 0xba, 0xc8, 0xaa, 0xbe, 0x2b, 0x09, 0xb1, 0xaa, 0x46, 0xc0, 0xa2, 0xaa, 0x0e, 0x12, 0xf6, 0x3f, 0xbb, 0xa7, 0x75, 0xba, 0x7e } + +} +, +{ + "RSASSA-PSS Signature Example 8.3", + /* Message to be signed */ + 151, + { 0xe3, 0x5c, 0x6e, 0xd9, 0x8f, 0x64, 0xa6, 0xd5, 0xa6, 0x48, 0xfc, 0xab, 0x8a, 0xdb, 0x16, 0x33, 0x1d, 0xb3, 0x2e, 0x5d, 0x15, 0xc7, 0x4a, 0x40, 0xed, 0xf9, 0x4c, 0x3d, 0xc4, 0xa4, 0xde, 0x79, 0x2d, 0x19, 0x08, 0x89, 0xf2, 0x0f, 0x1e, 0x24, 0xed, 0x12, 0x05, 0x4a, 0x6b, 0x28, 0x79, 0x8f, 0xcb, 0x42, 0xd1, 0xc5, 0x48, 0x76, 0x9b, 0x73, 0x4c, 0x96, 0x37, 0x31, 0x42, 0x09, 0x2a, 0xed, 0x27, 0x76, 0x03, 0xf4, 0x73, 0x8d, 0xf4, 0xdc, 0x14, 0x46, 0x58, 0x6d, 0x0e, 0xc6, 0x4d, 0xa4, 0xfb, 0x60, 0x53, 0x6d, 0xb2, 0xae, 0x17, 0xfc, 0x7e, 0x3c, 0x04, 0xbb, 0xfb, 0xbb, 0xd9, 0x07, 0xbf, 0x11, 0x7c, 0x08, 0x63, 0x6f, 0xa1, 0x6f, 0x95, 0xf5, 0x1a, 0x62, 0x16, 0x93, 0x4d, 0x3e, 0x34, 0xf8, 0x50, 0x30, 0xf1, 0x7b, 0xbb, 0xc5, 0xba, 0x69, 0x14, 0x40, 0x58, 0xaf, 0xf0, 0x81, 0xe0, 0xb1, 0x9c, 0xf0, 0x3c, 0x17, 0x19, 0x5c, 0x5e, 0x88, 0x8b, 0xa5, 0x8f, 0x6f, 0xe0, 0xa0, 0x2e, 0x5c, 0x3b, 0xda, 0x97, 0x19, 0xa7 } +, + /* Salt */ + 20, + { 0xc6, 0xeb, 0xbe, 0x76, 0xdf, 0x0c, 0x4a, 0xea, 0x32, 0xc4, 0x74, 0x17, 0x5b, 0x2f, 0x13, 0x68, 0x62, 0xd0, 0x45, 0x29 } +, + /* Signature */ + 129, + { 0x2a, 0xd2, 0x05, 0x09, 0xd7, 0x8c, 0xf2, 0x6d, 0x1b, 0x6c, 0x40, 0x61, 0x46, 0x08, 0x6e, 0x4b, 0x0c, 0x91, 0xa9, 0x1c, 0x2b, 0xd1, 0x64, 0xc8, 0x7b, 0x96, 0x6b, 0x8f, 0xaa, 0x42, 0xaa, 0x0c, 0xa4, 0x46, 0x02, 0x23, 0x23, 0xba, 0x4b, 0x1a, 0x1b, 0x89, 0x70, 0x6d, 0x7f, 0x4c, 0x3b, 0xe5, 0x7d, 0x7b, 0x69, 0x70, 0x2d, 0x16, 0x8a, 0xb5, 0x95, 0x5e, 0xe2, 0x90, 0x35, 0x6b, 0x8c, 0x4a, 0x29, 0xed, 0x46, 0x7d, 0x54, 0x7e, 0xc2, 0x3c, 0xba, 0xdf, 0x28, 0x6c, 0xcb, 0x58, 0x63, 0xc6, 0x67, 0x9d, 0xa4, 0x67, 0xfc, 0x93, 0x24, 0xa1, 0x51, 0xc7, 0xec, 0x55, 0xaa, 0xc6, 0xdb, 0x40, 0x84, 0xf8, 0x27, 0x26, 0x82, 0x5c, 0xfe, 0x1a, 0xa4, 0x21, 0xbc, 0x64, 0x04, 0x9f, 0xb4, 0x2f, 0x23, 0x14, 0x8f, 0x9c, 0x25, 0xb2, 0xdc, 0x30, 0x04, 0x37, 0xc3, 0x8d, 0x42, 0x8a, 0xa7, 0x5f, 0x96 } + +} +, +{ + "RSASSA-PSS Signature Example 8.4", + /* Message to be signed */ + 204, + { 0xdb, 0xc5, 0xf7, 0x50, 0xa7, 0xa1, 0x4b, 0xe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4, 0x8e, 0x34, 0xac, 0xe9, 0xc9, 0x12, 0x4e, 0x59, 0x59, 0x7a, 0xc7, 0xeb, 0xf8 } +, + /* Salt */ + 20, + { 0x02, 0x1f, 0xdc, 0xc6, 0xeb, 0xb5, 0xe1, 0x9b, 0x1c, 0xb1, 0x6e, 0x9c, 0x67, 0xf2, 0x76, 0x81, 0x65, 0x7f, 0xe2, 0x0a } +, + /* Signature */ + 129, + { 0x1e, 0x24, 0xe6, 0xe5, 0x86, 0x28, 0xe5, 0x17, 0x50, 0x44, 0xa9, 0xeb, 0x6d, 0x83, 0x7d, 0x48, 0xaf, 0x12, 0x60, 0xb0, 0x52, 0x0e, 0x87, 0x32, 0x7d, 0xe7, 0x89, 0x7e, 0xe4, 0xd5, 0xb9, 0xf0, 0xdf, 0x0b, 0xe3, 0xe0, 0x9e, 0xd4, 0xde, 0xa8, 0xc1, 0x45, 0x4f, 0xf3, 0x42, 0x3b, 0xb0, 0x8e, 0x17, 0x93, 0x24, 0x5a, 0x9d, 0xf8, 0xbf, 0x6a, 0xb3, 0x96, 0x8c, 0x8e, 0xdd, 0xc3, 0xb5, 0x32, 0x85, 0x71, 0xc7, 0x7f, 0x09, 0x1c, 0xc5, 0x78, 0x57, 0x69, 0x12, 0xdf, 0xeb, 0xd1, 0x64, 0xb9, 0xde, 0x54, 0x54, 0xfe, 0x0b, 0xe1, 0xc1, 0xf6, 0x38, 0x5b, 0x32, 0x83, 0x60, 0xce, 0x67, 0xec, 0x7a, 0x05, 0xf6, 0xe3, 0x0e, 0xb4, 0x5c, 0x17, 0xc4, 0x8a, 0xc7, 0x00, 0x41, 0xd2, 0xca, 0xb6, 0x7f, 0x0a, 0x2a, 0xe7, 0xaa, 0xfd, 0xcc, 0x8d, 0x24, 0x5e, 0xa3, 0x44, 0x2a, 0x63, 0x00, 0xcc, 0xc7 } + +} +, +{ + "RSASSA-PSS Signature Example 8.5", + /* Message to be signed */ + 101, + { 0x04, 0xdc, 0x25, 0x1b, 0xe7, 0x2e, 0x88, 0xe5, 0x72, 0x34, 0x85, 0xb6, 0x38, 0x3a, 0x63, 0x7e, 0x2f, 0xef, 0xe0, 0x76, 0x60, 0xc5, 0x19, 0xa5, 0x60, 0xb8, 0xbc, 0x18, 0xbd, 0xed, 0xb8, 0x6e, 0xae, 0x23, 0x64, 0xea, 0x53, 0xba, 0x9d, 0xca, 0x6e, 0xb3, 0xd2, 0xe7, 0xd6, 0xb8, 0x06, 0xaf, 0x42, 0xb3, 0xe8, 0x7f, 0x29, 0x1b, 0x4a, 0x88, 0x81, 0xd5, 0xbf, 0x57, 0x2c, 0xc9, 0xa8, 0x5e, 0x19, 0xc8, 0x6a, 0xcb, 0x28, 0xf0, 0x98, 0xf9, 0xda, 0x03, 0x83, 0xc5, 0x66, 0xd3, 0xc0, 0xf5, 0x8c, 0xfd, 0x8f, 0x39, 0x5d, 0xcf, 0x60, 0x2e, 0x5c, 0xd4, 0x0e, 0x8c, 0x71, 0x83, 0xf7, 0x14, 0x99, 0x6e, 0x22, 0x97, 0xef } +, + /* Salt */ + 20, + { 0xc5, 0x58, 0xd7, 0x16, 0x7c, 0xbb, 0x45, 0x08, 0xad, 0xa0, 0x42, 0x97, 0x1e, 0x71, 0xb1, 0x37, 0x7e, 0xea, 0x42, 0x69 } +, + /* Signature */ + 129, + { 0x33, 0x34, 0x1b, 0xa3, 0x57, 0x6a, 0x13, 0x0a, 0x50, 0xe2, 0xa5, 0xcf, 0x86, 0x79, 0x22, 0x43, 0x88, 0xd5, 0x69, 0x3f, 0x5a, 0xcc, 0xc2, 0x35, 0xac, 0x95, 0xad, 0xd6, 0x8e, 0x5e, 0xb1, 0xee, 0xc3, 0x16, 0x66, 0xd0, 0xca, 0x7a, 0x1c, 0xda, 0x6f, 0x70, 0xa1, 0xaa, 0x76, 0x2c, 0x05, 0x75, 0x2a, 0x51, 0x95, 0x0c, 0xdb, 0x8a, 0xf3, 0xc5, 0x37, 0x9f, 0x18, 0xcf, 0xe6, 0xb5, 0xbc, 0x55, 0xa4, 0x64, 0x82, 0x26, 0xa1, 0x5e, 0x91, 0x2e, 0xf1, 0x9a, 0xd7, 0x7a, 0xde, 0xea, 0x91, 0x1d, 0x67, 0xcf, 0xef, 0xd6, 0x9b, 0xa4, 0x3f, 0xa4, 0x11, 0x91, 0x35, 0xff, 0x64, 0x21, 0x17, 0xba, 0x98, 0x5a, 0x7e, 0x01, 0x00, 0x32, 0x5e, 0x95, 0x19, 0xf1, 0xca, 0x6a, 0x92, 0x16, 0xbd, 0xa0, 0x55, 0xb5, 0x78, 0x50, 0x15, 0x29, 0x11, 0x25, 0xe9, 0x0d, 0xcd, 0x07, 0xa2, 0xca, 0x96, 0x73, 0xee } + +} +, +{ + "RSASSA-PSS Signature Example 8.6", + /* Message to be signed */ + 132, + { 0x0e, 0xa3, 0x7d, 0xf9, 0xa6, 0xfe, 0xa4, 0xa8, 0xb6, 0x10, 0x37, 0x3c, 0x24, 0xcf, 0x39, 0x0c, 0x20, 0xfa, 0x6e, 0x21, 0x35, 0xc4, 0x00, 0xc8, 0xa3, 0x4f, 0x5c, 0x18, 0x3a, 0x7e, 0x8e, 0xa4, 0xc9, 0xae, 0x09, 0x0e, 0xd3, 0x17, 0x59, 0xf4, 0x2d, 0xc7, 0x77, 0x19, 0xcc, 0xa4, 0x00, 0xec, 0xdc, 0xc5, 0x17, 0xac, 0xfc, 0x7a, 0xc6, 0x90, 0x26, 0x75, 0xb2, 0xef, 0x30, 0xc5, 0x09, 0x66, 0x5f, 0x33, 0x21, 0x48, 0x2f, 0xc6, 0x9a, 0x9f, 0xb5, 0x70, 0xd1, 0x5e, 0x01, 0xc8, 0x45, 0xd0, 0xd8, 0xe5, 0x0d, 0x2a, 0x24, 0xcb, 0xf1, 0xcf, 0x0e, 0x71, 0x49, 0x75, 0xa5, 0xdb, 0x7b, 0x18, 0xd9, 0xe9, 0xe9, 0xcb, 0x91, 0xb5, 0xcb, 0x16, 0x86, 0x90, 0x60, 0xed, 0x18, 0xb7, 0xb5, 0x62, 0x45, 0x50, 0x3f, 0x0c, 0xaf, 0x90, 0x35, 0x2b, 0x8d, 0xe8, 0x1c, 0xb5, 0xa1, 0xd9, 0xc6, 0x33, 0x60, 0x92, 0xf0, 0xcd } +, + /* Salt */ + 20, + { 0x76, 0xfd, 0x4e, 0x64, 0xfd, 0xc9, 0x8e, 0xb9, 0x27, 0xa0, 0x40, 0x3e, 0x35, 0xa0, 0x84, 0xe7, 0x6b, 0xa9, 0xf9, 0x2a } +, + /* Signature */ + 129, + { 0x1e, 0xd1, 0xd8, 0x48, 0xfb, 0x1e, 0xdb, 0x44, 0x12, 0x9b, 0xd9, 0xb3, 0x54, 0x79, 0x5a, 0xf9, 0x7a, 0x06, 0x9a, 0x7a, 0x00, 0xd0, 0x15, 0x10, 0x48, 0x59, 0x3e, 0x0c, 0x72, 0xc3, 0x51, 0x7f, 0xf9, 0xff, 0x2a, 0x41, 0xd0, 0xcb, 0x5a, 0x0a, 0xc8, 0x60, 0xd7, 0x36, 0xa1, 0x99, 0x70, 0x4f, 0x7c, 0xb6, 0xa5, 0x39, 0x86, 0xa8, 0x8b, 0xbd, 0x8a, 0xbc, 0xc0, 0x07, 0x6a, 0x2c, 0xe8, 0x47, 0x88, 0x00, 0x31, 0x52, 0x5d, 0x44, 0x9d, 0xa2, 0xac, 0x78, 0x35, 0x63, 0x74, 0xc5, 0x36, 0xe3, 0x43, 0xfa, 0xa7, 0xcb, 0xa4, 0x2a, 0x5a, 0xaa, 0x65, 0x06, 0x08, 0x77, 0x91, 0xc0, 0x6a, 0x8e, 0x98, 0x93, 0x35, 0xae, 0xd1, 0x9b, 0xfa, 0xb2, 0xd5, 0xe6, 0x7e, 0x27, 0xfb, 0x0c, 0x28, 0x75, 0xaf, 0x89, 0x6c, 0x21, 0xb6, 0xe8, 0xe7, 0x30, 0x9d, 0x04, 0xe4, 0xf6, 0x72, 0x7e, 0x69, 0x46, 0x3e } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 9: A 1536-bit RSA Key Pair", +{ + /* RSA modulus n */ + 192, + { 0xe6, 0xbd, 0x69, 0x2a, 0xc9, 0x66, 0x45, 0x79, 0x04, 0x03, 0xfd, 0xd0, 0xf5, 0xbe, 0xb8, 0xb9, 0xbf, 0x92, 0xed, 0x10, 0x00, 0x7f, 0xc3, 0x65, 0x04, 0x64, 0x19, 0xdd, 0x06, 0xc0, 0x5c, 0x5b, 0x5b, 0x2f, 0x48, 0xec, 0xf9, 0x89, 0xe4, 0xce, 0x26, 0x91, 0x09, 0x97, 0x9c, 0xbb, 0x40, 0xb4, 0xa0, 0xad, 0x24, 0xd2, 0x24, 0x83, 0xd1, 0xee, 0x31, 0x5a, 0xd4, 0xcc, 0xb1, 0x53, 0x42, 0x68, 0x35, 0x26, 0x91, 0xc5, 0x24, 0xf6, 0xdd, 0x8e, 0x6c, 0x29, 0xd2, 0x24, 0xcf, 0x24, 0x69, 0x73, 0xae, 0xc8, 0x6c, 0x5b, 0xf6, 0xb1, 0x40, 0x1a, 0x85, 0x0d, 0x1b, 0x9a, 0xd1, 0xbb, 0x8c, 0xbc, 0xec, 0x47, 0xb0, 0x6f, 0x0f, 0x8c, 0x7f, 0x45, 0xd3, 0xfc, 0x8f, 0x31, 0x92, 0x99, 0xc5, 0x43, 0x3d, 0xdb, 0xc2, 0xb3, 0x05, 0x3b, 0x47, 0xde, 0xd2, 0xec, 0xd4, 0xa4, 0xca, 0xef, 0xd6, 0x14, 0x83, 0x3d, 0xc8, 0xbb, 0x62, 0x2f, 0x31, 0x7e, 0xd0, 0x76, 0xb8, 0x05, 0x7f, 0xe8, 0xde, 0x3f, 0x84, 0x48, 0x0a, 0xd5, 0xe8, 0x3e, 0x4a, 0x61, 0x90, 0x4a, 0x4f, 0x24, 0x8f, 0xb3, 0x97, 0x02, 0x73, 0x57, 0xe1, 0xd3, 0x0e, 0x46, 0x31, 0x39, 0x81, 0x5c, 0x6f, 0xd4, 0xfd, 0x5a, 0xc5, 0xb8, 0x17, 0x2a, 0x45, 0x23, 0x0e, 0xcb, 0x63, 0x18, 0xa0, 0x4f, 0x14, 0x55, 0xd8, 0x4e, 0x5a, 0x8b } +, + /* RSA public exponent e */ + 3, + { 0x01, 0x00, 0x01 } +, + /* RSA private exponent d */ + 192, + { 0x6a, 0x7f, 0xd8, 0x4f, 0xb8, 0x5f, 0xad, 0x07, 0x3b, 0x34, 0x40, 0x6d, 0xb7, 0x4f, 0x8d, 0x61, 0xa6, 0xab, 0xc1, 0x21, 0x96, 0xa9, 0x61, 0xdd, 0x79, 0x56, 0x5e, 0x9d, 0xa6, 0xe5, 0x18, 0x7b, 0xce, 0x2d, 0x98, 0x02, 0x50, 0xf7, 0x35, 0x95, 0x75, 0x35, 0x92, 0x70, 0xd9, 0x15, 0x90, 0xbb, 0x0e, 0x42, 0x7c, 0x71, 0x46, 0x0b, 0x55, 0xd5, 0x14, 0x10, 0xb1, 0x91, 0xbc, 0xf3, 0x09, 0xfe, 0xa1, 0x31, 0xa9, 0x2c, 0x8e, 0x70, 0x27, 0x38, 0xfa, 0x71, 0x9f, 0x1e, 0x00, 0x41, 0xf5, 0x2e, 0x40, 0xe9, 0x1f, 0x22, 0x9f, 0x4d, 0x96, 0xa1, 0xe6, 0xf1, 0x72, 0xe1, 0x55, 0x96, 0xb4, 0x51, 0x0a, 0x6d, 0xae, 0xc2, 0x61, 0x05, 0xf2, 0xbe, 0xbc, 0x53, 0x31, 0x6b, 0x87, 0xbd, 0xf2, 0x13, 0x11, 0x66, 0x60, 0x70, 0xe8, 0xdf, 0xee, 0x69, 0xd5, 0x2c, 0x71, 0xa9, 0x76, 0xca, 0xae, 0x79, 0xc7, 0x2b, 0x68, 0xd2, 0x85, 0x80, 0xdc, 0x68, 0x6d, 0x9f, 0x51, 0x29, 0xd2, 0x25, 0xf8, 0x2b, 0x3d, 0x61, 0x55, 0x13, 0xa8, 0x82, 0xb3, 0xdb, 0x91, 0x41, 0x6b, 0x48, 0xce, 0x08, 0x88, 0x82, 0x13, 0x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x08, 0x99, 0x4b, 0x94, 0xa5, 0xe4, 0x72, 0x8c, 0xd9, 0xc9, 0x63, 0x37, 0x5a, 0xe4, 0x99, 0x65, 0xbd, 0xa5, 0x5c, 0xbf, 0x0e, 0xfe, 0xd8, 0xd6, 0x55, 0x3b, 0x40, 0x27, 0xf2, 0xd8, 0x62, 0x08, 0xa6, 0xe6, 0xb4, 0x89, 0xc1, 0x76, 0x12, 0x80, 0x92, 0xd6, 0x29, 0xe4, 0x9d, 0x3d } +, + /* p's CRT exponent dP */ + 96, + { 0x2b, 0xb6, 0x8b, 0xdd, 0xfb, 0x0c, 0x4f, 0x56, 0xc8, 0x55, 0x8b, 0xff, 0xaf, 0x89, 0x2d, 0x80, 0x43, 0x03, 0x78, 0x41, 0xe7, 0xfa, 0x81, 0xcf, 0xa6, 0x1a, 0x38, 0xc5, 0xe3, 0x9b, 0x90, 0x1c, 0x8e, 0xe7, 0x11, 0x22, 0xa5, 0xda, 0x22, 0x27, 0xbd, 0x6c, 0xde, 0xeb, 0x48, 0x14, 0x52, 0xc1, 0x2a, 0xd3, 0xd6, 0x1d, 0x5e, 0x4f, 0x77, 0x6a, 0x0a, 0xb5, 0x56, 0x59, 0x1b, 0xef, 0xe3, 0xe5, 0x9e, 0x5a, 0x7f, 0xdd, 0xb8, 0x34, 0x5e, 0x1f, 0x2f, 0x35, 0xb9, 0xf4, 0xce, 0xe5, 0x7c, 0x32, 0x41, 0x4c, 0x08, 0x6a, 0xec, 0x99, 0x3e, 0x93, 0x53, 0xe4, 0x80, 0xd9, 0xee, 0xc6, 0x28, 0x9f } +, + /* q's CRT exponent dQ */ + 96, + { 0x4f, 0xf8, 0x97, 0x70, 0x9f, 0xad, 0x07, 0x97, 0x46, 0x49, 0x45, 0x78, 0xe7, 0x0f, 0xd8, 0x54, 0x61, 0x30, 0xee, 0xab, 0x56, 0x27, 0xc4, 0x9b, 0x08, 0x0f, 0x05, 0xee, 0x4a, 0xd9, 0xf3, 0xe4, 0xb7, 0xcb, 0xa9, 0xd6, 0xa5, 0xdf, 0xf1, 0x13, 0xa4, 0x1c, 0x34, 0x09, 0x33, 0x68, 0x33, 0xf1, 0x90, 0x81, 0x6d, 0x8a, 0x6b, 0xc4, 0x2e, 0x9b, 0xec, 0x56, 0xb7, 0x56, 0x7d, 0x0f, 0x3c, 0x9c, 0x69, 0x6d, 0xb6, 0x19, 0xb2, 0x45, 0xd9, 0x01, 0xdd, 0x85, 0x6d, 0xb7, 0xc8, 0x09, 0x2e, 0x77, 0xe9, 0xa1, 0xcc, 0xcd, 0x56, 0xee, 0x4d, 0xba, 0x42, 0xc5, 0xfd, 0xb6, 0x1a, 0xec, 0x26, 0x69 } +, + /* CRT coefficient qInv */ + 96, + { 0x77, 0xb9, 0xd1, 0x13, 0x7b, 0x50, 0x40, 0x4a, 0x98, 0x27, 0x29, 0x31, 0x6e, 0xfa, 0xfc, 0x7d, 0xfe, 0x66, 0xd3, 0x4e, 0x5a, 0x18, 0x26, 0x00, 0xd5, 0xf3, 0x0a, 0x0a, 0x85, 0x12, 0x05, 0x1c, 0x56, 0x0d, 0x08, 0x1d, 0x4d, 0x0a, 0x18, 0x35, 0xec, 0x3d, 0x25, 0xa6, 0x0f, 0x4e, 0x4d, 0x6a, 0xa9, 0x48, 0xb2, 0xbf, 0x3d, 0xbb, 0x5b, 0x12, 0x4c, 0xbb, 0xc3, 0x48, 0x92, 0x55, 0xa3, 0xa9, 0x48, 0x37, 0x2f, 0x69, 0x78, 0x49, 0x67, 0x45, 0xf9, 0x43, 0xe1, 0xdb, 0x4f, 0x18, 0x38, 0x2c, 0xea, 0xa5, 0x05, 0xdf, 0xc6, 0x57, 0x57, 0xbb, 0x3f, 0x85, 0x7a, 0x58, 0xdc, 0xe5, 0x21, 0x56 } + +} +, +{{ + "RSASSA-PSS Signature Example 9.1", + /* Message to be signed */ + 211, + { 0xa8, 0x8e, 0x26, 0x58, 0x55, 0xe9, 0xd7, 0xca, 0x36, 0xc6, 0x87, 0x95, 0xf0, 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 0x9d, 0x62, 0x08, 0xea, 0x8b, 0x47, 0x11, 0xa2, 0xc7, 0x50, 0xf5 } +, + /* Salt */ + 20, + { 0xc0, 0xa4, 0x25, 0x31, 0x3d, 0xf8, 0xd7, 0x56, 0x4b, 0xd2, 0x43, 0x4d, 0x31, 0x15, 0x23, 0xd5, 0x25, 0x7e, 0xed, 0x80 } +, + /* Signature */ + 192, + { 0x58, 0x61, 0x07, 0x22, 0x6c, 0x3c, 0xe0, 0x13, 0xa7, 0xc8, 0xf0, 0x4d, 0x1a, 0x6a, 0x29, 0x59, 0xbb, 0x4b, 0x8e, 0x20, 0x5b, 0xa4, 0x3a, 0x27, 0xb5, 0x0f, 0x12, 0x41, 0x11, 0xbc, 0x35, 0xef, 0x58, 0x9b, 0x03, 0x9f, 0x59, 0x32, 0x18, 0x7c, 0xb6, 0x96, 0xd7, 0xd9, 0xa3, 0x2c, 0x0c, 0x38, 0x30, 0x0a, 0x5c, 0xdd, 0xa4, 0x83, 0x4b, 0x62, 0xd2, 0xeb, 0x24, 0x0a, 0xf3, 0x3f, 0x79, 0xd1, 0x3d, 0xfb, 0xf0, 0x95, 0xbf, 0x59, 0x9e, 0x0d, 0x96, 0x86, 0x94, 0x8c, 0x19, 0x64, 0x74, 0x7b, 0x67, 0xe8, 0x9c, 0x9a, 0xba, 0x5c, 0xd8, 0x50, 0x16, 0x23, 0x6f, 0x56, 0x6c, 0xc5, 0x80, 0x2c, 0xb1, 0x3e, 0xad, 0x51, 0xbc, 0x7c, 0xa6, 0xbe, 0xf3, 0xb9, 0x4d, 0xcb, 0xdb, 0xb1, 0xd5, 0x70, 0x46, 0x97, 0x71, 0xdf, 0x0e, 0x00, 0xb1, 0xa8, 0xa0, 0x67, 0x77, 0x47, 0x2d, 0x23, 0x16, 0x27, 0x9e, 0xda, 0xe8, 0x64, 0x74, 0x66, 0x8d, 0x4e, 0x1e, 0xff, 0xf9, 0x5f, 0x1d, 0xe6, 0x1c, 0x60, 0x20, 0xda, 0x32, 0xae, 0x92, 0xbb, 0xf1, 0x65, 0x20, 0xfe, 0xf3, 0xcf, 0x4d, 0x88, 0xf6, 0x11, 0x21, 0xf2, 0x4b, 0xbd, 0x9f, 0xe9, 0x1b, 0x59, 0xca, 0xf1, 0x23, 0x5b, 0x2a, 0x93, 0xff, 0x81, 0xfc, 0x40, 0x3a, 0xdd, 0xf4, 0xeb, 0xde, 0xa8, 0x49, 0x34, 0xa9, 0xcd, 0xaf, 0x8e, 0x1a, 0x9e } + +} +, +#ifdef LTC_TEST_EXT +{ + "RSASSA-PSS Signature Example 9.2", + /* Message to be signed */ + 107, + { 0xc8, 0xc9, 0xc6, 0xaf, 0x04, 0xac, 0xda, 0x41, 0x4d, 0x22, 0x7e, 0xf2, 0x3e, 0x08, 0x20, 0xc3, 0x73, 0x2c, 0x50, 0x0d, 0xc8, 0x72, 0x75, 0xe9, 0x5b, 0x0d, 0x09, 0x54, 0x13, 0x99, 0x3c, 0x26, 0x58, 0xbc, 0x1d, 0x98, 0x85, 0x81, 0xba, 0x87, 0x9c, 0x2d, 0x20, 0x1f, 0x14, 0xcb, 0x88, 0xce, 0xd1, 0x53, 0xa0, 0x19, 0x69, 0xa7, 0xbf, 0x0a, 0x7b, 0xe7, 0x9c, 0x84, 0xc1, 0x48, 0x6b, 0xc1, 0x2b, 0x3f, 0xa6, 0xc5, 0x98, 0x71, 0xb6, 0x82, 0x7c, 0x8c, 0xe2, 0x53, 0xca, 0x5f, 0xef, 0xa8, 0xa8, 0xc6, 0x90, 0xbf, 0x32, 0x6e, 0x8e, 0x37, 0xcd, 0xb9, 0x6d, 0x90, 0xa8, 0x2e, 0xba, 0xb6, 0x9f, 0x86, 0x35, 0x0e, 0x18, 0x22, 0xe8, 0xbd, 0x53, 0x6a, 0x2e } +, + /* Salt */ + 20, + { 0xb3, 0x07, 0xc4, 0x3b, 0x48, 0x50, 0xa8, 0xda, 0xc2, 0xf1, 0x5f, 0x32, 0xe3, 0x78, 0x39, 0xef, 0x8c, 0x5c, 0x0e, 0x91 } +, + /* Signature */ + 192, + { 0x80, 0xb6, 0xd6, 0x43, 0x25, 0x52, 0x09, 0xf0, 0xa4, 0x56, 0x76, 0x38, 0x97, 0xac, 0x9e, 0xd2, 0x59, 0xd4, 0x59, 0xb4, 0x9c, 0x28, 0x87, 0xe5, 0x88, 0x2e, 0xcb, 0x44, 0x34, 0xcf, 0xd6, 0x6d, 0xd7, 0xe1, 0x69, 0x93, 0x75, 0x38, 0x1e, 0x51, 0xcd, 0x7f, 0x55, 0x4f, 0x2c, 0x27, 0x17, 0x04, 0xb3, 0x99, 0xd4, 0x2b, 0x4b, 0xe2, 0x54, 0x0a, 0x0e, 0xca, 0x61, 0x95, 0x1f, 0x55, 0x26, 0x7f, 0x7c, 0x28, 0x78, 0xc1, 0x22, 0x84, 0x2d, 0xad, 0xb2, 0x8b, 0x01, 0xbd, 0x5f, 0x8c, 0x02, 0x5f, 0x7e, 0x22, 0x84, 0x18, 0xa6, 0x73, 0xc0, 0x3d, 0x6b, 0xc0, 0xc7, 0x36, 0xd0, 0xa2, 0x95, 0x46, 0xbd, 0x67, 0xf7, 0x86, 0xd9, 0xd6, 0x92, 0xcc, 0xea, 0x77, 0x8d, 0x71, 0xd9, 0x8c, 0x20, 0x63, 0xb7, 0xa7, 0x10, 0x92, 0x18, 0x7a, 0x4d, 0x35, 0xaf, 0x10, 0x81, 0x11, 0xd8, 0x3e, 0x83, 0xea, 0xe4, 0x6c, 0x46, 0xaa, 0x34, 0x27, 0x7e, 0x06, 0x04, 0x45, 0x89, 0x90, 0x37, 0x88, 0xf1, 0xd5, 0xe7, 0xce, 0xe2, 0x5f, 0xb4, 0x85, 0xe9, 0x29, 0x49, 0x11, 0x88, 0x14, 0xd6, 0xf2, 0xc3, 0xee, 0x36, 0x14, 0x89, 0x01, 0x6f, 0x32, 0x7f, 0xb5, 0xbc, 0x51, 0x7e, 0xb5, 0x04, 0x70, 0xbf, 0xfa, 0x1a, 0xfa, 0x5f, 0x4c, 0xe9, 0xaa, 0x0c, 0xe5, 0xb8, 0xee, 0x19, 0xbf, 0x55, 0x01, 0xb9, 0x58 } + +} +, +{ + "RSASSA-PSS Signature Example 9.3", + /* Message to be signed */ + 222, + { 0x0a, 0xfa, 0xd4, 0x2c, 0xcd, 0x4f, 0xc6, 0x06, 0x54, 0xa5, 0x50, 0x02, 0xd2, 0x28, 0xf5, 0x2a, 0x4a, 0x5f, 0xe0, 0x3b, 0x8b, 0xbb, 0x08, 0xca, 0x82, 0xda, 0xca, 0x55, 0x8b, 0x44, 0xdb, 0xe1, 0x26, 0x6e, 0x50, 0xc0, 0xe7, 0x45, 0xa3, 0x6d, 0x9d, 0x29, 0x04, 0xe3, 0x40, 0x8a, 0xbc, 0xd1, 0xfd, 0x56, 0x99, 0x94, 0x06, 0x3f, 0x4a, 0x75, 0xcc, 0x72, 0xf2, 0xfe, 0xe2, 0xa0, 0xcd, 0x89, 0x3a, 0x43, 0xaf, 0x1c, 0x5b, 0x8b, 0x48, 0x7d, 0xf0, 0xa7, 0x16, 0x10, 0x02, 0x4e, 0x4f, 0x6d, 0xdf, 0x9f, 0x28, 0xad, 0x08, 0x13, 0xc1, 0xaa, 0xb9, 0x1b, 0xcb, 0x3c, 0x90, 0x64, 0xd5, 0xff, 0x74, 0x2d, 0xef, 0xfe, 0xa6, 0x57, 0x09, 0x41, 0x39, 0x36, 0x9e, 0x5e, 0xa6, 0xf4, 0xa9, 0x63, 0x19, 0xa5, 0xcc, 0x82, 0x24, 0x14, 0x5b, 0x54, 0x50, 0x62, 0x75, 0x8f, 0xef, 0xd1, 0xfe, 0x34, 0x09, 0xae, 0x16, 0x92, 0x59, 0xc6, 0xcd, 0xfd, 0x6b, 0x5f, 0x29, 0x58, 0xe3, 0x14, 0xfa, 0xec, 0xbe, 0x69, 0xd2, 0xca, 0xce, 0x58, 0xee, 0x55, 0x17, 0x9a, 0xb9, 0xb3, 0xe6, 0xd1, 0xec, 0xc1, 0x4a, 0x55, 0x7c, 0x5f, 0xeb, 0xe9, 0x88, 0x59, 0x52, 0x64, 0xfc, 0x5d, 0xa1, 0xc5, 0x71, 0x46, 0x2e, 0xca, 0x79, 0x8a, 0x18, 0xa1, 0xa4, 0x94, 0x0c, 0xda, 0xb4, 0xa3, 0xe9, 0x20, 0x09, 0xcc, 0xd4, 0x2e, 0x1e, 0x94, 0x7b, 0x13, 0x14, 0xe3, 0x22, 0x38, 0xa2, 0xde, 0xce, 0x7d, 0x23, 0xa8, 0x9b, 0x5b, 0x30, 0xc7, 0x51, 0xfd, 0x0a, 0x4a, 0x43, 0x0d, 0x2c, 0x54, 0x85, 0x94 } +, + /* Salt */ + 20, + { 0x9a, 0x2b, 0x00, 0x7e, 0x80, 0x97, 0x8b, 0xbb, 0x19, 0x2c, 0x35, 0x4e, 0xb7, 0xda, 0x9a, 0xed, 0xfc, 0x74, 0xdb, 0xf5 } +, + /* Signature */ + 192, + { 0x48, 0x44, 0x08, 0xf3, 0x89, 0x8c, 0xd5, 0xf5, 0x34, 0x83, 0xf8, 0x08, 0x19, 0xef, 0xbf, 0x27, 0x08, 0xc3, 0x4d, 0x27, 0xa8, 0xb2, 0xa6, 0xfa, 0xe8, 0xb3, 0x22, 0xf9, 0x24, 0x02, 0x37, 0xf9, 0x81, 0x81, 0x7a, 0xca, 0x18, 0x46, 0xf1, 0x08, 0x4d, 0xaa, 0x6d, 0x7c, 0x07, 0x95, 0xf6, 0xe5, 0xbf, 0x1a, 0xf5, 0x9c, 0x38, 0xe1, 0x85, 0x84, 0x37, 0xce, 0x1f, 0x7e, 0xc4, 0x19, 0xb9, 0x8c, 0x87, 0x36, 0xad, 0xf6, 0xdd, 0x9a, 0x00, 0xb1, 0x80, 0x6d, 0x2b, 0xd3, 0xad, 0x0a, 0x73, 0x77, 0x5e, 0x05, 0xf5, 0x2d, 0xfe, 0xf3, 0xa5, 0x9a, 0xb4, 0xb0, 0x81, 0x43, 0xf0, 0xdf, 0x05, 0xcd, 0x1a, 0xd9, 0xd0, 0x4b, 0xec, 0xec, 0xa6, 0xda, 0xa4, 0xa2, 0x12, 0x98, 0x03, 0xe2, 0x00, 0xcb, 0xc7, 0x77, 0x87, 0xca, 0xf4, 0xc1, 0xd0, 0x66, 0x3a, 0x6c, 0x59, 0x87, 0xb6, 0x05, 0x95, 0x20, 0x19, 0x78, 0x2c, 0xaf, 0x2e, 0xc1, 0x42, 0x6d, 0x68, 0xfb, 0x94, 0xed, 0x1d, 0x4b, 0xe8, 0x16, 0xa7, 0xed, 0x08, 0x1b, 0x77, 0xe6, 0xab, 0x33, 0x0b, 0x3f, 0xfc, 0x07, 0x38, 0x20, 0xfe, 0xcd, 0xe3, 0x72, 0x7f, 0xcb, 0xe2, 0x95, 0xee, 0x61, 0xa0, 0x50, 0xa3, 0x43, 0x65, 0x86, 0x37, 0xc3, 0xfd, 0x65, 0x9c, 0xfb, 0x63, 0x73, 0x6d, 0xe3, 0x2d, 0x9f, 0x90, 0xd3, 0xc2, 0xf6, 0x3e, 0xca } + +} +, +{ + "RSASSA-PSS Signature Example 9.4", + /* Message to be signed */ + 248, + { 0x1d, 0xfd, 0x43, 0xb4, 0x6c, 0x93, 0xdb, 0x82, 0x62, 0x9b, 0xda, 0xe2, 0xbd, 0x0a, 0x12, 0xb8, 0x82, 0xea, 0x04, 0xc3, 0xb4, 0x65, 0xf5, 0xcf, 0x93, 0x02, 0x3f, 0x01, 0x05, 0x96, 0x26, 0xdb, 0xbe, 0x99, 0xf2, 0x6b, 0xb1, 0xbe, 0x94, 0x9d, 0xdd, 0xd1, 0x6d, 0xc7, 0xf3, 0xde, 0xbb, 0x19, 0xa1, 0x94, 0x62, 0x7f, 0x0b, 0x22, 0x44, 0x34, 0xdf, 0x7d, 0x87, 0x00, 0xe9, 0xe9, 0x8b, 0x06, 0xe3, 0x60, 0xc1, 0x2f, 0xdb, 0xe3, 0xd1, 0x9f, 0x51, 0xc9, 0x68, 0x4e, 0xb9, 0x08, 0x9e, 0xcb, 0xb0, 0xa2, 0xf0, 0x45, 0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xb8, 0x40, 0x45 } +, + /* Signature */ + 192, + { 0x84, 0xeb, 0xeb, 0x48, 0x1b, 0xe5, 0x98, 0x45, 0xb4, 0x64, 0x68, 0xba, 0xfb, 0x47, 0x1c, 0x01, 0x12, 0xe0, 0x2b, 0x23, 0x5d, 0x84, 0xb5, 0xd9, 0x11, 0xcb, 0xd1, 0x92, 0x6e, 0xe5, 0x07, 0x4a, 0xe0, 0x42, 0x44, 0x95, 0xcb, 0x20, 0xe8, 0x23, 0x08, 0xb8, 0xeb, 0xb6, 0x5f, 0x41, 0x9a, 0x03, 0xfb, 0x40, 0xe7, 0x2b, 0x78, 0x98, 0x1d, 0x88, 0xaa, 0xd1, 0x43, 0x05, 0x36, 0x85, 0x17, 0x2c, 0x97, 0xb2, 0x9c, 0x8b, 0x7b, 0xf0, 0xae, 0x73, 0xb5, 0xb2, 0x26, 0x3c, 0x40, 0x3d, 0xa0, 0xed, 0x2f, 0x80, 0xff, 0x74, 0x50, 0xaf, 0x78, 0x28, 0xeb, 0x8b, 0x86, 0xf0, 0x02, 0x8b, 0xd2, 0xa8, 0xb1, 0x76, 0xa4, 0xd2, 0x28, 0xcc, 0xce, 0xa1, 0x83, 0x94, 0xf2, 0x38, 0xb0, 0x9f, 0xf7, 0x58, 0xcc, 0x00, 0xbc, 0x04, 0x30, 0x11, 0x52, 0x35, 0x57, 0x42, 0xf2, 0x82, 0xb5, 0x4e, 0x66, 0x3a, 0x91, 0x9e, 0x70, 0x9d, 0x8d, 0xa2, 0x4a, 0xde, 0x55, 0x00, 0xa7, 0xb9, 0xaa, 0x50, 0x22, 0x6e, 0x0c, 0xa5, 0x29, 0x23, 0xe6, 0xc2, 0xd8, 0x60, 0xec, 0x50, 0xff, 0x48, 0x0f, 0xa5, 0x74, 0x77, 0xe8, 0x2b, 0x05, 0x65, 0xf4, 0x37, 0x9f, 0x79, 0xc7, 0x72, 0xd5, 0xc2, 0xda, 0x80, 0xaf, 0x9f, 0xbf, 0x32, 0x5e, 0xce, 0x6f, 0xc2, 0x0b, 0x00, 0x96, 0x16, 0x14, 0xbe, 0xe8, 0x9a, 0x18, 0x3e } + +} +, +{ + "RSASSA-PSS Signature Example 9.5", + /* Message to be signed */ + 234, + { 0x1b, 0xdc, 0x6e, 0x7c, 0x98, 0xfb, 0x8c, 0xf5, 0x4e, 0x9b, 0x09, 0x7b, 0x66, 0xa8, 0x31, 0xe9, 0xcf, 0xe5, 0x2d, 0x9d, 0x48, 0x88, 0x44, 0x8e, 0xe4, 0xb0, 0x97, 0x80, 0x93, 0xba, 0x1d, 0x7d, 0x73, 0xae, 0x78, 0xb3, 0xa6, 0x2b, 0xa4, 0xad, 0x95, 0xcd, 0x28, 0x9c, 0xcb, 0x9e, 0x00, 0x52, 0x26, 0xbb, 0x3d, 0x17, 0x8b, 0xcc, 0xaa, 0x82, 0x1f, 0xb0, 0x44, 0xa4, 0xe2, 0x1e, 0xe9, 0x76, 0x96, 0xc1, 0x4d, 0x06, 0x78, 0xc9, 0x4c, 0x2d, 0xae, 0x93, 0xb0, 0xad, 0x73, 0x92, 0x22, 0x18, 0x55, 0x3d, 0xaa, 0x7e, 0x44, 0xeb, 0xe5, 0x77, 0x25, 0xa7, 0xa4, 0x5c, 0xc7, 0x2b, 0x9b, 0x21, 0x38, 0xa6, 0xb1, 0x7c, 0x8d, 0xb4, 0x11, 0xce, 0x82, 0x79, 0xee, 0x12, 0x41, 0xaf, 0xf0, 0xa8, 0xbe, 0xc6, 0xf7, 0x7f, 0x87, 0xed, 0xb0, 0xc6, 0x9c, 0xb2, 0x72, 0x36, 0xe3, 0x43, 0x5a, 0x80, 0x0b, 0x19, 0x2e, 0x4f, 0x11, 0xe5, 0x19, 0xe3, 0xfe, 0x30, 0xfc, 0x30, 0xea, 0xcc, 0xca, 0x4f, 0xbb, 0x41, 0x76, 0x90, 0x29, 0xbf, 0x70, 0x8e, 0x81, 0x7a, 0x9e, 0x68, 0x38, 0x05, 0xbe, 0x67, 0xfa, 0x10, 0x09, 0x84, 0x68, 0x3b, 0x74, 0x83, 0x8e, 0x3b, 0xcf, 0xfa, 0x79, 0x36, 0x6e, 0xed, 0x1d, 0x48, 0x1c, 0x76, 0x72, 0x91, 0x18, 0x83, 0x8f, 0x31, 0xba, 0x8a, 0x04, 0x8a, 0x93, 0xc1, 0xbe, 0x44, 0x24, 0x59, 0x8e, 0x8d, 0xf6, 0x32, 0x8b, 0x7a, 0x77, 0x88, 0x0a, 0x3f, 0x9c, 0x7e, 0x2e, 0x8d, 0xfc, 0xa8, 0xeb, 0x5a, 0x26, 0xfb, 0x86, 0xbd, 0xc5, 0x56, 0xd4, 0x2b, 0xbe, 0x01, 0xd9, 0xfa, 0x6e, 0xd8, 0x06, 0x46, 0x49, 0x1c, 0x93, 0x41 } +, + /* Salt */ + 20, + { 0xd6, 0x89, 0x25, 0x7a, 0x86, 0xef, 0xfa, 0x68, 0x21, 0x2c, 0x5e, 0x0c, 0x61, 0x9e, 0xca, 0x29, 0x5f, 0xb9, 0x1b, 0x67 } +, + /* Signature */ + 192, + { 0x82, 0x10, 0x2d, 0xf8, 0xcb, 0x91, 0xe7, 0x17, 0x99, 0x19, 0xa0, 0x4d, 0x26, 0xd3, 0x35, 0xd6, 0x4f, 0xbc, 0x2f, 0x87, 0x2c, 0x44, 0x83, 0x39, 0x43, 0x24, 0x1d, 0xe8, 0x45, 0x48, 0x10, 0x27, 0x4c, 0xdf, 0x3d, 0xb5, 0xf4, 0x2d, 0x42, 0x3d, 0xb1, 0x52, 0xaf, 0x71, 0x35, 0xf7, 0x01, 0x42, 0x0e, 0x39, 0xb4, 0x94, 0xa6, 0x7c, 0xbf, 0xd1, 0x9f, 0x91, 0x19, 0xda, 0x23, 0x3a, 0x23, 0xda, 0x5c, 0x64, 0x39, 0xb5, 0xba, 0x0d, 0x2b, 0xc3, 0x73, 0xee, 0xe3, 0x50, 0x70, 0x01, 0x37, 0x8d, 0x4a, 0x40, 0x73, 0x85, 0x6b, 0x7f, 0xe2, 0xab, 0xa0, 0xb5, 0xee, 0x93, 0xb2, 0x7f, 0x4a, 0xfe, 0xc7, 0xd4, 0xd1, 0x20, 0x92, 0x1c, 0x83, 0xf6, 0x06, 0x76, 0x5b, 0x02, 0xc1, 0x9e, 0x4d, 0x6a, 0x1a, 0x3b, 0x95, 0xfa, 0x4c, 0x42, 0x29, 0x51, 0xbe, 0x4f, 0x52, 0x13, 0x10, 0x77, 0xef, 0x17, 0x17, 0x97, 0x29, 0xcd, 0xdf, 0xbd, 0xb5, 0x69, 0x50, 0xdb, 0xac, 0xee, 0xfe, 0x78, 0xcb, 0x16, 0x64, 0x0a, 0x09, 0x9e, 0xa5, 0x6d, 0x24, 0x38, 0x9e, 0xef, 0x10, 0xf8, 0xfe, 0xcb, 0x31, 0xba, 0x3e, 0xa3, 0xb2, 0x27, 0xc0, 0xa8, 0x66, 0x98, 0xbb, 0x89, 0xe3, 0xe9, 0x36, 0x39, 0x05, 0xbf, 0x22, 0x77, 0x7b, 0x2a, 0x3a, 0xa5, 0x21, 0xb6, 0x5b, 0x4c, 0xef, 0x76, 0xd8, 0x3b, 0xde, 0x4c } + +} +, +{ + "RSASSA-PSS Signature Example 9.6", + /* Message to be signed */ + 165, + { 0x88, 0xc7, 0xa9, 0xf1, 0x36, 0x04, 0x01, 0xd9, 0x0e, 0x53, 0xb1, 0x01, 0xb6, 0x1c, 0x53, 0x25, 0xc3, 0xc7, 0x5d, 0xb1, 0xb4, 0x11, 0xfb, 0xeb, 0x8e, 0x83, 0x0b, 0x75, 0xe9, 0x6b, 0x56, 0x67, 0x0a, 0xd2, 0x45, 0x40, 0x4e, 0x16, 0x79, 0x35, 0x44, 0xee, 0x35, 0x4b, 0xc6, 0x13, 0xa9, 0x0c, 0xc9, 0x84, 0x87, 0x15, 0xa7, 0x3d, 0xb5, 0x89, 0x3e, 0x7f, 0x6d, 0x27, 0x98, 0x15, 0xc0, 0xc1, 0xde, 0x83, 0xef, 0x8e, 0x29, 0x56, 0xe3, 0xa5, 0x6e, 0xd2, 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b, 0x81, 0x70, 0x51, 0x15, 0x74, 0x08, 0x02, 0x48, 0x79, 0x92, 0xff, 0xd5, 0x11, 0xd4, 0xaf, 0xc6, 0xb8, 0x54, 0x49, 0x1e, 0xb3, 0xf0, 0xdd, 0x52, 0x31, 0x39, 0x54, 0x2f, 0xf1, 0x5c, 0x31, 0x01, 0xee, 0x85, 0x54, 0x35, 0x17, 0xc6, 0xa3, 0xc7, 0x94, 0x17, 0xc6, 0x7e, 0x2d, 0xd9, 0xaa, 0x74, 0x1e, 0x9a, 0x29, 0xb0, 0x6d, 0xcb, 0x59, 0x3c, 0x23, 0x36, 0xb3, 0x67, 0x0a, 0xe3, 0xaf, 0xba, 0xc7, 0xc3, 0xe7, 0x6e, 0x21, 0x54, 0x73, 0xe8, 0x66, 0xe3, 0x38, 0xca, 0x24, 0x4d, 0xe0, 0x0b, 0x62, 0x62, 0x4d, 0x6b, 0x94, 0x26, 0x82, 0x2c, 0xea, 0xe9, 0xf8, 0xcc, 0x46, 0x08, 0x95, 0xf4, 0x12, 0x50, 0x07, 0x3f, 0xd4, 0x5c, 0x5a, 0x1e, 0x7b, 0x42, 0x5c, 0x20, 0x4a, 0x42, 0x3a, 0x69, 0x91, 0x59, 0xf6, 0x90, 0x3e, 0x71, 0x0b, 0x37, 0xa7, 0xbb, 0x2b, 0xc8, 0x04, 0x9f } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +{ + "Example 10: A 2048-bit RSA Key Pair", +{ + /* RSA modulus n */ + 256, + { 0xa5, 0xdd, 0x86, 0x7a, 0xc4, 0xcb, 0x02, 0xf9, 0x0b, 0x94, 0x57, 0xd4, 0x8c, 0x14, 0xa7, 0x70, 0xef, 0x99, 0x1c, 0x56, 0xc3, 0x9c, 0x0e, 0xc6, 0x5f, 0xd1, 0x1a, 0xfa, 0x89, 0x37, 0xce, 0xa5, 0x7b, 0x9b, 0xe7, 0xac, 0x73, 0xb4, 0x5c, 0x00, 0x17, 0x61, 0x5b, 0x82, 0xd6, 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xcf, 0x55, 0xa1, 0x3b, 0x75, 0x45, 0x39, 0x90, 0x65, 0x82, 0xec, 0x8b, 0x17, 0x4b, 0xd5, 0x8d, 0x5d, 0x1f, 0x3d, 0x76, 0x7c, 0x61, 0x37, 0x21, 0xae, 0x05 } +, + /* RSA public exponent e */ + 3, + { 0x01, 0x00, 0x01 } +, + /* RSA private exponent d */ + 256, + { 0x2d, 0x2f, 0xf5, 0x67, 0xb3, 0xfe, 0x74, 0xe0, 0x61, 0x91, 0xb7, 0xfd, 0xed, 0x6d, 0xe1, 0x12, 0x29, 0x0c, 0x67, 0x06, 0x92, 0x43, 0x0d, 0x59, 0x69, 0x18, 0x40, 0x47, 0xda, 0x23, 0x4c, 0x96, 0x93, 0xde, 0xed, 0x16, 0x73, 0xed, 0x42, 0x95, 0x39, 0xc9, 0x69, 0xd3, 0x72, 0xc0, 0x4d, 0x6b, 0x47, 0xe0, 0xf5, 0xb8, 0xce, 0xe0, 0x84, 0x3e, 0x5c, 0x22, 0x83, 0x5d, 0xbd, 0x3b, 0x05, 0xa0, 0x99, 0x79, 0x84, 0xae, 0x60, 0x58, 0xb1, 0x1b, 0xc4, 0x90, 0x7c, 0xbf, 0x67, 0xed, 0x84, 0xfa, 0x9a, 0xe2, 0x52, 0xdf, 0xb0, 0xd0, 0xcd, 0x49, 0xe6, 0x18, 0xe3, 0x5d, 0xfd, 0xfe, 0x59, 0xbc, 0xa3, 0xdd, 0xd6, 0x6c, 0x33, 0xce, 0xbb, 0xc7, 0x7a, 0xd4, 0x41, 0xaa, 0x69, 0x5e, 0x13, 0xe3, 0x24, 0xb5, 0x18, 0xf0, 0x1c, 0x60, 0xf5, 0xa8, 0x5c, 0x99, 0x4a, 0xd1, 0x79, 0xf2, 0xa6, 0xb5, 0xfb, 0xe9, 0x34, 0x02, 0xb1, 0x17, 0x67, 0xbe, 0x01, 0xbf, 0x07, 0x34, 0x44, 0xd6, 0xba, 0x1d, 0xd2, 0xbc, 0xa5, 0xbd, 0x07, 0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57, 0xe3, 0xdd, 0xa6, 0xcf, 0xcf, 0x22, 0x66, 0xb1, 0x06, 0x01, 0x3a, 0xc4, 0x68, 0x08, 0xd3, 0xb3, 0x88, 0x7b, 0x3b, 0x00, 0x34, 0x4b, 0xaa, 0xc9, 0x53, 0x0b, 0x4c, 0xe7, 0x08, 0xfc, 0x32, 0xb6 } + +} +, +{{ + "RSASSA-PSS Signature Example 10.1", + /* Message to be signed */ + 29, + { 0x88, 0x31, 0x77, 0xe5, 0x12, 0x6b, 0x9b, 0xe2, 0xd9, 0xa9, 0x68, 0x03, 0x27, 0xd5, 0x37, 0x0c, 0x6f, 0x26, 0x86, 0x1f, 0x58, 0x20, 0xc4, 0x3d, 0xa6, 0x7a, 0x3a, 0xd6, 0x09 } +, + /* Salt */ + 20, + { 0x04, 0xe2, 0x15, 0xee, 0x6f, 0xf9, 0x34, 0xb9, 0xda, 0x70, 0xd7, 0x73, 0x0c, 0x87, 0x34, 0xab, 0xfc, 0xec, 0xde, 0x89 } +, + /* Signature */ + 256, + { 0x82, 0xc2, 0xb1, 0x60, 0x09, 0x3b, 0x8a, 0xa3, 0xc0, 0xf7, 0x52, 0x2b, 0x19, 0xf8, 0x73, 0x54, 0x06, 0x6c, 0x77, 0x84, 0x7a, 0xbf, 0x2a, 0x9f, 0xce, 0x54, 0x2d, 0x0e, 0x84, 0xe9, 0x20, 0xc5, 0xaf, 0xb4, 0x9f, 0xfd, 0xfd, 0xac, 0xe1, 0x65, 0x60, 0xee, 0x94, 0xa1, 0x36, 0x96, 0x01, 0x14, 0x8e, 0xba, 0xd7, 0xa0, 0xe1, 0x51, 0xcf, 0x16, 0x33, 0x17, 0x91, 0xa5, 0x72, 0x7d, 0x05, 0xf2, 0x1e, 0x74, 0xe7, 0xeb, 0x81, 0x14, 0x40, 0x20, 0x69, 0x35, 0xd7, 0x44, 0x76, 0x5a, 0x15, 0xe7, 0x9f, 0x01, 0x5c, 0xb6, 0x6c, 0x53, 0x2c, 0x87, 0xa6, 0xa0, 0x59, 0x61, 0xc8, 0xbf, 0xad, 0x74, 0x1a, 0x9a, 0x66, 0x57, 0x02, 0x28, 0x94, 0x39, 0x3e, 0x72, 0x23, 0x73, 0x97, 0x96, 0xc0, 0x2a, 0x77, 0x45, 0x5d, 0x0f, 0x55, 0x5b, 0x0e, 0xc0, 0x1d, 0xdf, 0x25, 0x9b, 0x62, 0x07, 0xfd, 0x0f, 0xd5, 0x76, 0x14, 0xce, 0xf1, 0xa5, 0x57, 0x3b, 0xaa, 0xff, 0x4e, 0xc0, 0x00, 0x69, 0x95, 0x16, 0x59, 0xb8, 0x5f, 0x24, 0x30, 0x0a, 0x25, 0x16, 0x0c, 0xa8, 0x52, 0x2d, 0xc6, 0xe6, 0x72, 0x7e, 0x57, 0xd0, 0x19, 0xd7, 0xe6, 0x36, 0x29, 0xb8, 0xfe, 0x5e, 0x89, 0xe2, 0x5c, 0xc1, 0x5b, 0xeb, 0x3a, 0x64, 0x75, 0x77, 0x55, 0x92, 0x99, 0x28, 0x0b, 0x9b, 0x28, 0xf7, 0x9b, 0x04, 0x09, 0x00, 0x0b, 0xe2, 0x5b, 0xbd, 0x96, 0x40, 0x8b, 0xa3, 0xb4, 0x3c, 0xc4, 0x86, 0x18, 0x4d, 0xd1, 0xc8, 0xe6, 0x25, 0x53, 0xfa, 0x1a, 0xf4, 0x04, 0x0f, 0x60, 0x66, 0x3d, 0xe7, 0xf5, 0xe4, 0x9c, 0x04, 0x38, 0x8e, 0x25, 0x7f, 0x1c, 0xe8, 0x9c, 0x95, 0xda, 0xb4, 0x8a, 0x31, 0x5d, 0x9b, 0x66, 0xb1, 0xb7, 0x62, 0x82, 0x33, 0x87, 0x6f, 0xf2, 0x38, 0x52, 0x30, 0xd0, 0x70, 0xd0, 0x7e, 0x16, 0x66 } + +} +, +#ifdef LTC_TEST_EXT +{ + "RSASSA-PSS Signature Example 10.2", + /* Message to be signed */ + 128, + { 0xdd, 0x67, 0x0a, 0x01, 0x46, 0x58, 0x68, 0xad, 0xc9, 0x3f, 0x26, 0x13, 0x19, 0x57, 0xa5, 0x0c, 0x52, 0xfb, 0x77, 0x7c, 0xdb, 0xaa, 0x30, 0x89, 0x2c, 0x9e, 0x12, 0x36, 0x11, 0x64, 0xec, 0x13, 0x97, 0x9d, 0x43, 0x04, 0x81, 0x18, 0xe4, 0x44, 0x5d, 0xb8, 0x7b, 0xee, 0x58, 0xdd, 0x98, 0x7b, 0x34, 0x25, 0xd0, 0x20, 0x71, 0xd8, 0xdb, 0xae, 0x80, 0x70, 0x8b, 0x03, 0x9d, 0xbb, 0x64, 0xdb, 0xd1, 0xde, 0x56, 0x57, 0xd9, 0xfe, 0xd0, 0xc1, 0x18, 0xa5, 0x41, 0x43, 0x74, 0x2e, 0x0f, 0xf3, 0xc8, 0x7f, 0x74, 0xe4, 0x58, 0x57, 0x64, 0x7a, 0xf3, 0xf7, 0x9e, 0xb0, 0xa1, 0x4c, 0x9d, 0x75, 0xea, 0x9a, 0x1a, 0x04, 0xb7, 0xcf, 0x47, 0x8a, 0x89, 0x7a, 0x70, 0x8f, 0xd9, 0x88, 0xf4, 0x8e, 0x80, 0x1e, 0xdb, 0x0b, 0x70, 0x39, 0xdf, 0x8c, 0x23, 0xbb, 0x3c, 0x56, 0xf4, 0xe8, 0x21, 0xac } +, + /* Salt */ + 20, + { 0x8b, 0x2b, 0xdd, 0x4b, 0x40, 0xfa, 0xf5, 0x45, 0xc7, 0x78, 0xdd, 0xf9, 0xbc, 0x1a, 0x49, 0xcb, 0x57, 0xf9, 0xb7, 0x1b } +, + /* Signature */ + 256, + { 0x14, 0xae, 0x35, 0xd9, 0xdd, 0x06, 0xba, 0x92, 0xf7, 0xf3, 0xb8, 0x97, 0x97, 0x8a, 0xed, 0x7c, 0xd4, 0xbf, 0x5f, 0xf0, 0xb5, 0x85, 0xa4, 0x0b, 0xd4, 0x6c, 0xe1, 0xb4, 0x2c, 0xd2, 0x70, 0x30, 0x53, 0xbb, 0x90, 0x44, 0xd6, 0x4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, 0xf4, 0x3b, 0xaa, 0xfa, 0x18, 0xbf, 0xa9, 0x2a, 0x50, 0x4c, 0xbd, 0x35, 0x69, 0x9e, 0x26, 0xd1, 0xdc, 0xc5, 0xa2, 0x88, 0x73, 0x85, 0xf3, 0xc6, 0x32, 0x32, 0xf0, 0x6f, 0x32, 0x44, 0xc3 } + +} +, +{ + "RSASSA-PSS Signature Example 10.3", + /* Message to be signed */ + 110, + { 0x48, 0xb2, 0xb6, 0xa5, 0x7a, 0x63, 0xc8, 0x4c, 0xea, 0x85, 0x9d, 0x65, 0xc6, 0x68, 0x28, 0x4b, 0x08, 0xd9, 0x6b, 0xdc, 0xaa, 0xbe, 0x25, 0x2d, 0xb0, 0xe4, 0xa9, 0x6c, 0xb1, 0xba, 0xc6, 0x01, 0x93, 0x41, 0xdb, 0x6f, 0xbe, 0xfb, 0x8d, 0x10, 0x6b, 0x0e, 0x90, 0xed, 0xa6, 0xbc, 0xc6, 0xc6, 0x26, 0x2f, 0x37, 0xe7, 0xea, 0x9c, 0x7e, 0x5d, 0x22, 0x6b, 0xd7, 0xdf, 0x85, 0xec, 0x5e, 0x71, 0xef, 0xff, 0x2f, 0x54, 0xc5, 0xdb, 0x57, 0x7f, 0xf7, 0x29, 0xff, 0x91, 0xb8, 0x42, 0x49, 0x1d, 0xe2, 0x74, 0x1d, 0x0c, 0x63, 0x16, 0x07, 0xdf, 0x58, 0x6b, 0x90, 0x5b, 0x23, 0xb9, 0x1a, 0xf1, 0x3d, 0xa1, 0x23, 0x04, 0xbf, 0x83, 0xec, 0xa8, 0xa7, 0x3e, 0x87, 0x1f, 0xf9, 0xdb } +, + /* Salt */ + 20, + { 0x4e, 0x96, 0xfc, 0x1b, 0x39, 0x8f, 0x92, 0xb4, 0x46, 0x71, 0x01, 0x0c, 0x0d, 0xc3, 0xef, 0xd6, 0xe2, 0x0c, 0x2d, 0x73 } +, + /* Signature */ + 256, + { 0x6e, 0x3e, 0x4d, 0x7b, 0x6b, 0x15, 0xd2,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55, 0x53, 0x1c, 0x77, 0x32, 0x7b, 0x89, 0x82, 0x1b, 0xde, 0xdf, 0x88, 0x01, 0x61, 0xc7, 0x8c, 0xd4, 0x19, 0x6b, 0x54, 0x19, 0xf7, 0xac, 0xc3, 0xf1, 0x3e, 0x5e, 0xbf, 0x16, 0x1b, 0x6e, 0x7c, 0x67, 0x24, 0x71, 0x6c, 0xa3, 0x3b, 0x85, 0xc2, 0xe2, 0x56, 0x40, 0x19, 0x2a, 0xc2, 0x85, 0x96, 0x51, 0xd5, 0x0b, 0xde, 0x7e, 0xb9, 0x76, 0xe5, 0x1c, 0xec, 0x82, 0x8b, 0x98, 0xb6, 0x56, 0x3b, 0x86, 0xbb } + +} +, +{ + "RSASSA-PSS Signature Example 10.4", + /* Message to be signed */ + 81, + { 0x0b, 0x87, 0x77, 0xc7, 0xf8, 0x39, 0xba, 0xf0, 0xa6, 0x4b, 0xbb, 0xdb, 0xc5, 0xce, 0x79, 0x75, 0x5c, 0x57, 0xa2, 0x05, 0xb8, 0x45, 0xc1, 0x74, 0xe2, 0xd2, 0xe9, 0x05, 0x46, 0xa0, 0x89, 0xc4, 0xe6, 0xec, 0x8a, 0xdf, 0xfa, 0x23, 0xa7, 0xea, 0x97, 0xba, 0xe6, 0xb6, 0x5d, 0x78, 0x2b, 0x82, 0xdb, 0x5d, 0x2b, 0x5a, 0x56, 0xd2, 0x2a, 0x29, 0xa0, 0x5e, 0x7c, 0x44, 0x33, 0xe2, 0xb8, 0x2a, 0x62, 0x1a, 0xbb, 0xa9, 0x0a, 0xdd, 0x05, 0xce, 0x39, 0x3f, 0xc4, 0x8a, 0x84, 0x05, 0x42, 0x45, 0x1a } +, + /* Salt */ + 20, + { 0xc7, 0xcd, 0x69, 0x8d, 0x84, 0xb6, 0x51, 0x28, 0xd8, 0x83, 0x5e, 0x3a, 0x8b, 0x1e, 0xb0, 0xe0, 0x1c, 0xb5, 0x41, 0xec } +, + /* Signature */ + 256, + { 0x34, 0x04, 0x7f, 0x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be, 0x5f, 0x69, 0x50, 0x4a, 0x9f, 0x01, 0xab, 0xb3, 0xcb, 0x46, 0x7b, 0x26, 0x0e, 0x2b, 0xce, 0x86, 0x0b, 0xe8, 0xd9, 0x5b, 0xf9, 0x2c, 0x0c, 0x8e, 0x14, 0x96, 0xed, 0x1e, 0x52, 0x85, 0x93, 0xa4, 0xab, 0xb6, 0xdf, 0x46, 0x2d, 0xde, 0x8a, 0x09, 0x68, 0xdf, 0xfe, 0x46, 0x83, 0x11, 0x68, 0x57, 0xa2, 0x32, 0xf5, 0xeb, 0xf6, 0xc8, 0x5b, 0xe2, 0x38, 0x74, 0x5a, 0xd0, 0xf3, 0x8f, 0x76, 0x7a, 0x5f, 0xdb, 0xf4, 0x86, 0xfb } + +} +, +{ + "RSASSA-PSS Signature Example 10.5", + /* Message to be signed */ + 81, + { 0xf1, 0x03, 0x6e, 0x00, 0x8e, 0x71, 0xe9, 0x64, 0xda, 0xdc, 0x92, 0x19, 0xed, 0x30, 0xe1, 0x7f, 0x06, 0xb4, 0xb6, 0x8a, 0x95, 0x5c, 0x16, 0xb3, 0x12, 0xb1, 0xed, 0xdf, 0x02, 0x8b, 0x74, 0x97, 0x6b, 0xed, 0x6b, 0x3f, 0x6a, 0x63, 0xd4, 0xe7, 0x78, 0x59, 0x24, 0x3c, 0x9c, 0xcc, 0xdc, 0x98, 0x01, 0x65, 0x23, 0xab, 0xb0, 0x24, 0x83, 0xb3, 0x55, 0x91, 0xc3, 0x3a, 0xad, 0x81, 0x21, 0x3b, 0xb7, 0xc7, 0xbb, 0x1a, 0x47, 0x0a, 0xab, 0xc1, 0x0d, 0x44, 0x25, 0x6c, 0x4d, 0x45, 0x59, 0xd9, 0x16 } +, + /* Salt */ + 20, + { 0xef, 0xa8, 0xbf, 0xf9, 0x62, 0x12, 0xb2, 0xf4, 0xa3, 0xf3, 0x71, 0xa1, 0x0d, 0x57, 0x41, 0x52, 0x65, 0x5f, 0x5d, 0xfb } +, + /* Signature */ + 256, + {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0x93, 0xdb, 0x37, 0x99, 0x25, 0x5a, 0x0c, 0xb9, 0x21, 0x5d, 0x2d, 0x1c, 0xd4, 0x90, 0x59, 0x0e, 0x95, 0x2e, 0x8c, 0x87, 0x86, 0xaa, 0x00, 0x11, 0x26, 0x52, 0x52, 0x47, 0x0c, 0x04, 0x1d, 0xfb, 0xc3, 0xee, 0xc7, 0xc3, 0xcb, 0xf7, 0x1c, 0x24, 0x86, 0x9d, 0x11, 0x5c, 0x0c, 0xb4, 0xa9, 0x56, 0xf5, 0x6d, 0x53, 0x0b, 0x80, 0xab, 0x58, 0x9a, 0xcf, 0xef, 0xc6, 0x90, 0x75, 0x1d, 0xdf, 0x36, 0xe8, 0xd3, 0x83, 0xf8, 0x3c, 0xed, 0xd2, 0xcc } + +} +, +{ + "RSASSA-PSS Signature Example 10.6", + /* Message to be signed */ + 163, + { 0x25, 0xf1, 0x08, 0x95, 0xa8, 0x77, 0x16, 0xc1, 0x37, 0x45, 0x0b, 0xb9, 0x51, 0x9d, 0xfa, 0xa1, 0xf2, 0x07, 0xfa, 0xa9, 0x42, 0xea, 0x88, 0xab, 0xf7, 0x1e, 0x9c, 0x17, 0x98, 0x00, 0x85, 0xb5, 0x55, 0xae, 0xba, 0xb7, 0x62, 0x64, 0xae, 0x2a, 0x3a, 0xb9, 0x3c, 0x2d, 0x12, 0x98, 0x11, 0x91, 0xdd, 0xac, 0x6f, 0xb5, 0x94, 0x9e, 0xb3, 0x6a, 0xee, 0x3c, 0x5d, 0xa9, 0x40, 0xf0, 0x07, 0x52, 0xc9, 0x16, 0xd9, 0x46, 0x08, 0xfa, 0x7d, 0x97, 0xba, 0x6a, 0x29, 0x15, 0xb6, 0x88, 0xf2, 0x03, 0x23, 0xd4, 0xe9, 0xd9, 0x68, 0x01, 0xd8, 0x9a, 0x72, 0xab, 0x58, 0x92, 0xdc, 0x21, 0x17, 0xc0, 0x74, 0x34, 0xfc, 0xf9, 0x72, 0xe0, 0x58, 0xcf, 0x8c, 0x41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 0xe7, 0x3c, 0x94, 0x0f, 0xf0, 0x41, 0x0e, 0x8f, 0x11, 0x4e, 0xed, 0x46, 0xbb, 0xd0, 0xfa, 0xe1, 0x65, 0xe4, 0x2b, 0xe2, 0x52, 0x8a, 0x40, 0x1c, 0x3b, 0x28, 0xfd, 0x81, 0x8e, 0xf3, 0x23, 0x2d, 0xca, 0x9f, 0x4d, 0x2a, 0x0f, 0x51, 0x66, 0xec, 0x59, 0xc4, 0x23, 0x96, 0xd6, 0xc1, 0x1d, 0xbc, 0x12, 0x15, 0xa5, 0x6f, 0xa1, 0x71, 0x69, 0xdb, 0x95, 0x75, 0x34, 0x3e, 0xf3, 0x4f, 0x9d, 0xe3, 0x2a, 0x49, 0xcd, 0xc3, 0x17, 0x49, 0x22, 0xf2, 0x29, 0xc2, 0x3e, 0x18, 0xe4, 0x5d, 0xf9, 0x35, 0x31, 0x19, 0xec, 0x43, 0x19, 0xce, 0xdc, 0xe7, 0xa1, 0x7c, 0x64, 0x08, 0x8c, 0x1f, 0x6f, 0x52, 0xbe, 0x29, 0x63, 0x41, 0x00, 0xb3, 0x91, 0x9d, 0x38, 0xf3, 0xd1, 0xed, 0x94, 0xe6, 0x89, 0x1e, 0x66, 0xa7, 0x3b, 0x8f, 0xb8, 0x49, 0xf5, 0x87, 0x4d, 0xf5, 0x94, 0x59, 0xe2, 0x98, 0xc7, 0xbb, 0xce, 0x2e, 0xee, 0x78, 0x2a, 0x19, 0x5a, 0xa6, 0x6f, 0xe2, 0xd0, 0x73, 0x2b, 0x25, 0xe5, 0x95, 0xf5, 0x7d, 0x3e, 0x06, 0x1b, 0x1f, 0xc3, 0xe4, 0x06, 0x3b, 0xf9, 0x8f } + +} +, +#endif /* LTC_TEST_EXT */ +} +}, +}; + diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/rsa-testvectors/pss-vect.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/notes/rsa-testvectors/pss-vect.txt Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,2581 @@ +# =========================== +# TEST VECTORS FOR RSASSA-PSS +# =========================== +# +# This file contains test vectors for the +# RSASSA-PSS signature scheme with appendix as +# defined in PKCS #1 v2.1. 10 RSA keys of +# different sizes have been generated. For each +# key, 6 random messages of length between 1 +# and 256 octets have been RSASSA-PSS signed +# via a random salt of length 20 octets. +# +# The underlying hash function in the EMSA-PSS +# encoding method is SHA-1; the mask generation +# function is MGF1 with SHA-1 as specified in +# PKCS #1 v2.1. +# +# Integers are represented by strings of octets +# with the leftmost octet being the most +# significant octet. For example, +# +# 9,202,000 = (0x)8c 69 50. +# +# Key lengths: +# +# Key 1: 1024 bits +# Key 2: 1025 bits +# Key 3: 1026 bits +# Key 4: 1027 bits +# Key 5: 1028 bits +# Key 6: 1029 bits +# Key 7: 1030 bits +# Key 8: 1031 bits +# Key 9: 1536 bits +# Key 10: 2048 bits +# +# ============================================= + +# ================================== +# Example 1: A 1024-bit RSA Key Pair +# ================================== + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +a5 6e 4a 0e 70 10 17 58 9a 51 87 dc 7e a8 41 d1 +56 f2 ec 0e 36 ad 52 a4 4d fe b1 e6 1f 7a d9 91 +d8 c5 10 56 ff ed b1 62 b4 c0 f2 83 a1 2a 88 a3 +94 df f5 26 ab 72 91 cb b3 07 ce ab fc e0 b1 df +d5 cd 95 08 09 6d 5b 2b 8b 6d f5 d6 71 ef 63 77 +c0 92 1c b2 3c 27 0a 70 e2 59 8e 6f f8 9d 19 f1 +05 ac c2 d3 f0 cb 35 f2 92 80 e1 38 6b 6f 64 c4 +ef 22 e1 e1 f2 0d 0c e8 cf fb 22 49 bd 9a 21 37 + +# RSA public exponent e: +01 00 01 + +# RSA private exponent d: +33 a5 04 2a 90 b2 7d 4f 54 51 ca 9b bb d0 b4 47 +71 a1 01 af 88 43 40 ae f9 88 5f 2a 4b be 92 e8 +94 a7 24 ac 3c 56 8c 8f 97 85 3a d0 7c 02 66 c8 +c6 a3 ca 09 29 f1 e8 f1 12 31 88 44 29 fc 4d 9a +e5 5f ee 89 6a 10 ce 70 7c 3e d7 e7 34 e4 47 27 +a3 95 74 50 1a 53 26 83 10 9c 2a ba ca ba 28 3c +31 b4 bd 2f 53 c3 ee 37 e3 52 ce e3 4f 9e 50 3b +d8 0c 06 22 ad 79 c6 dc ee 88 35 47 c6 a3 b3 25 + +# Prime p: +e7 e8 94 27 20 a8 77 51 72 73 a3 56 05 3e a2 a1 +bc 0c 94 aa 72 d5 5c 6e 86 29 6b 2d fc 96 79 48 +c0 a7 2c bc cc a7 ea cb 35 70 6e 09 a1 df 55 a1 +53 5b d9 b3 cc 34 16 0b 3b 6d cd 3e da 8e 64 43 + +# Prime q: +b6 9d ca 1c f7 d4 d7 ec 81 e7 5b 90 fc ca 87 4a +bc de 12 3f d2 70 01 80 aa 90 47 9b 6e 48 de 8d +67 ed 24 f9 f1 9d 85 ba 27 58 74 f5 42 cd 20 dc +72 3e 69 63 36 4a 1f 94 25 45 2b 26 9a 67 99 fd + +# p's CRT exponent dP: +28 fa 13 93 86 55 be 1f 8a 15 9c ba ca 5a 72 ea +19 0c 30 08 9e 19 cd 27 4a 55 6f 36 c4 f6 e1 9f +55 4b 34 c0 77 79 04 27 bb dd 8d d3 ed e2 44 83 +28 f3 85 d8 1b 30 e8 e4 3b 2f ff a0 27 86 19 79 + +# q's CRT exponent dQ: +1a 8b 38 f3 98 fa 71 20 49 89 8d 7f b7 9e e0 a7 +76 68 79 12 99 cd fa 09 ef c0 e5 07 ac b2 1e d7 +43 01 ef 5b fd 48 be 45 5e ae b6 e1 67 82 55 82 +75 80 a8 e4 e8 e1 41 51 d1 51 0a 82 a3 f2 e7 29 + +# CRT coefficient qInv: +27 15 6a ba 41 26 d2 4a 81 f3 a5 28 cb fb 27 f5 +68 86 f8 40 a9 f6 e8 6e 17 a4 4b 94 fe 93 19 58 +4b 8e 22 fd de 1e 5a 2e 3b d8 aa 5b a8 d8 58 41 +94 eb 21 90 ac f8 32 b8 47 f1 3a 3d 24 a7 9f 4d + +# -------------------------------- +# RSASSA-PSS Signature Example 1.1 +# -------------------------------- + +# Message to be signed: +cd c8 7d a2 23 d7 86 df 3b 45 e0 bb bc 72 13 26 +d1 ee 2a f8 06 cc 31 54 75 cc 6f 0d 9c 66 e1 b6 +23 71 d4 5c e2 39 2e 1a c9 28 44 c3 10 10 2f 15 +6a 0d 8d 52 c1 f4 c4 0b a3 aa 65 09 57 86 cb 76 +97 57 a6 56 3b a9 58 fe d0 bc c9 84 e8 b5 17 a3 +d5 f5 15 b2 3b 8a 41 e7 4a a8 67 69 3f 90 df b0 +61 a6 e8 6d fa ae e6 44 72 c0 0e 5f 20 94 57 29 +cb eb e7 7f 06 ce 78 e0 8f 40 98 fb a4 1f 9d 61 +93 c0 31 7e 8b 60 d4 b6 08 4a cb 42 d2 9e 38 08 +a3 bc 37 2d 85 e3 31 17 0f cb f7 cc 72 d0 b7 1c +29 66 48 b3 a4 d1 0f 41 62 95 d0 80 7a a6 25 ca +b2 74 4f d9 ea 8f d2 23 c4 25 37 02 98 28 bd 16 +be 02 54 6f 13 0f d2 e3 3b 93 6d 26 76 e0 8a ed +1b 73 31 8b 75 0a 01 67 d0 + +# Salt: +de e9 59 c7 e0 64 11 36 14 20 ff 80 18 5e d5 7f +3e 67 76 af + +# Signature: +90 74 30 8f b5 98 e9 70 1b 22 94 38 8e 52 f9 71 +fa ac 2b 60 a5 14 5a f1 85 df 52 87 b5 ed 28 87 +e5 7c e7 fd 44 dc 86 34 e4 07 c8 e0 e4 36 0b c2 +26 f3 ec 22 7f 9d 9e 54 63 8e 8d 31 f5 05 12 15 +df 6e bb 9c 2f 95 79 aa 77 59 8a 38 f9 14 b5 b9 +c1 bd 83 c4 e2 f9 f3 82 a0 d0 aa 35 42 ff ee 65 +98 4a 60 1b c6 9e b2 8d eb 27 dc a1 2c 82 c2 d4 +c3 f6 6c d5 00 f1 ff 2b 99 4d 8a 4e 30 cb b3 3c + +# -------------------------------- +# RSASSA-PSS Signature Example 1.2 +# -------------------------------- + +# Message to be signed: +85 13 84 cd fe 81 9c 22 ed 6c 4c cb 30 da eb 5c +f0 59 bc 8e 11 66 b7 e3 53 0c 4c 23 3e 2b 5f 8f +71 a1 cc a5 82 d4 3e cc 72 b1 bc a1 6d fc 70 13 +22 6b 9e + +# Salt: +ef 28 69 fa 40 c3 46 cb 18 3d ab 3d 7b ff c9 8f +d5 6d f4 2d + +# Signature: +3e f7 f4 6e 83 1b f9 2b 32 27 41 42 a5 85 ff ce +fb dc a7 b3 2a e9 0d 10 fb 0f 0c 72 99 84 f0 4e +f2 9a 9d f0 78 07 75 ce 43 73 9b 97 83 83 90 db +0a 55 05 e6 3d e9 27 02 8d 9d 29 b2 19 ca 2c 45 +17 83 25 58 a5 5d 69 4a 6d 25 b9 da b6 60 03 c4 +cc cd 90 78 02 19 3b e5 17 0d 26 14 7d 37 b9 35 +90 24 1b e5 1c 25 05 5f 47 ef 62 75 2c fb e2 14 +18 fa fe 98 c2 2c 4d 4d 47 72 4f db 56 69 e8 43 + +# -------------------------------- +# RSASSA-PSS Signature Example 1.3 +# -------------------------------- + +# Message to be signed: +a4 b1 59 94 17 61 c4 0c 6a 82 f2 b8 0d 1b 94 f5 +aa 26 54 fd 17 e1 2d 58 88 64 67 9b 54 cd 04 ef +8b d0 30 12 be 8d c3 7f 4b 83 af 79 63 fa ff 0d +fa 22 54 77 43 7c 48 01 7f f2 be 81 91 cf 39 55 +fc 07 35 6e ab 3f 32 2f 7f 62 0e 21 d2 54 e5 db +43 24 27 9f e0 67 e0 91 0e 2e 81 ca 2c ab 31 c7 +45 e6 7a 54 05 8e b5 0d 99 3c db 9e d0 b4 d0 29 +c0 6d 21 a9 4c a6 61 c3 ce 27 fa e1 d6 cb 20 f4 +56 4d 66 ce 47 67 58 3d 0e 5f 06 02 15 b5 90 17 +be 85 ea 84 89 39 12 7b d8 c9 c4 d4 7b 51 05 6c +03 1c f3 36 f1 7c 99 80 f3 b8 f5 b9 b6 87 8e 8b +79 7a a4 3b 88 26 84 33 3e 17 89 3f e9 ca a6 aa +29 9f 7e d1 a1 8e e2 c5 48 64 b7 b2 b9 9b 72 61 +8f b0 25 74 d1 39 ef 50 f0 19 c9 ee f4 16 97 13 +38 e7 d4 70 + +# Salt: +71 0b 9c 47 47 d8 00 d4 de 87 f1 2a fd ce 6d f1 +81 07 cc 77 + +# Signature: +66 60 26 fb a7 1b d3 e7 cf 13 15 7c c2 c5 1a 8e +4a a6 84 af 97 78 f9 18 49 f3 43 35 d1 41 c0 01 +54 c4 19 76 21 f9 62 4a 67 5b 5a bc 22 ee 7d 5b +aa ff aa e1 c9 ba ca 2c c3 73 b3 f3 3e 78 e6 14 +3c 39 5a 91 aa 7f ac a6 64 eb 73 3a fd 14 d8 82 +72 59 d9 9a 75 50 fa ca 50 1e f2 b0 4e 33 c2 3a +a5 1f 4b 9e 82 82 ef db 72 8c c0 ab 09 40 5a 91 +60 7c 63 69 96 1b c8 27 0d 2d 4f 39 fc e6 12 b1 + +# -------------------------------- +# RSASSA-PSS Signature Example 1.4 +# -------------------------------- + +# Message to be signed: +bc 65 67 47 fa 9e af b3 f0 + +# Salt: +05 6f 00 98 5d e1 4d 8e f5 ce a9 e8 2f 8c 27 be +f7 20 33 5e + +# Signature: +46 09 79 3b 23 e9 d0 93 62 dc 21 bb 47 da 0b 4f +3a 76 22 64 9a 47 d4 64 01 9b 9a ea fe 53 35 9c +17 8c 91 cd 58 ba 6b cb 78 be 03 46 a7 bc 63 7f +4b 87 3d 4b ab 38 ee 66 1f 19 96 34 c5 47 a1 ad +84 42 e0 3d a0 15 b1 36 e5 43 f7 ab 07 c0 c1 3e +42 25 b8 de 8c ce 25 d4 f6 eb 84 00 f8 1f 7e 18 +33 b7 ee 6e 33 4d 37 09 64 ca 79 fd b8 72 b4 d7 +52 23 b5 ee b0 81 01 59 1f b5 32 d1 55 a6 de 87 + +# -------------------------------- +# RSASSA-PSS Signature Example 1.5 +# -------------------------------- + +# Message to be signed: +b4 55 81 54 7e 54 27 77 0c 76 8e 8b 82 b7 55 64 +e0 ea 4e 9c 32 59 4d 6b ff 70 65 44 de 0a 87 76 +c7 a8 0b 45 76 55 0e ee 1b 2a ca bc 7e 8b 7d 3e +f7 bb 5b 03 e4 62 c1 10 47 ea dd 00 62 9a e5 75 +48 0a c1 47 0f e0 46 f1 3a 2b f5 af 17 92 1d c4 +b0 aa 8b 02 be e6 33 49 11 65 1d 7f 85 25 d1 0f +32 b5 1d 33 be 52 0d 3d df 5a 70 99 55 a3 df e7 +82 83 b9 e0 ab 54 04 6d 15 0c 17 7f 03 7f dc cc +5b e4 ea 5f 68 b5 e5 a3 8c 9d 7e dc cc c4 97 5f +45 5a 69 09 b4 + +# Salt: +80 e7 0f f8 6a 08 de 3e c6 09 72 b3 9b 4f bf dc +ea 67 ae 8e + +# Signature: +1d 2a ad 22 1c a4 d3 1d df 13 50 92 39 01 93 98 +e3 d1 4b 32 dc 34 dc 5a f4 ae ae a3 c0 95 af 73 +47 9c f0 a4 5e 56 29 63 5a 53 a0 18 37 76 15 b1 +6c b9 b1 3b 3e 09 d6 71 eb 71 e3 87 b8 54 5c 59 +60 da 5a 64 77 6e 76 8e 82 b2 c9 35 83 bf 10 4c +3f db 23 51 2b 7b 4e 89 f6 33 dd 00 63 a5 30 db +45 24 b0 1c 3f 38 4c 09 31 0e 31 5a 79 dc d3 d6 +84 02 2a 7f 31 c8 65 a6 64 e3 16 97 8b 75 9f ad + +# -------------------------------- +# RSASSA-PSS Signature Example 1.6 +# -------------------------------- + +# Message to be signed: +10 aa e9 a0 ab 0b 59 5d 08 41 20 7b 70 0d 48 d7 +5f ae dd e3 b7 75 cd 6b 4c c8 8a e0 6e 46 94 ec +74 ba 18 f8 52 0d 4f 5e a6 9c bb e7 cc 2b eb a4 +3e fd c1 02 15 ac 4e b3 2d c3 02 a1 f5 3d c6 c4 +35 22 67 e7 93 6c fe bf 7c 8d 67 03 57 84 a3 90 +9f a8 59 c7 b7 b5 9b 8e 39 c5 c2 34 9f 18 86 b7 +05 a3 02 67 d4 02 f7 48 6a b4 f5 8c ad 5d 69 ad +b1 7a b8 cd 0c e1 ca f5 02 5a f4 ae 24 b1 fb 87 +94 c6 07 0c c0 9a 51 e2 f9 91 13 11 e3 87 7d 00 +44 c7 1c 57 a9 93 39 50 08 80 6b 72 3a c3 83 73 +d3 95 48 18 18 52 8c 1e 70 53 73 92 82 05 35 29 +51 0e 93 5c d0 fa 77 b8 fa 53 cc 2d 47 4b d4 fb +3c c5 c6 72 d6 ff dc 90 a0 0f 98 48 71 2c 4b cf +e4 6c 60 57 36 59 b1 1e 64 57 e8 61 f0 f6 04 b6 +13 8d 14 4f 8c e4 e2 da 73 + +# Salt: +a8 ab 69 dd 80 1f 00 74 c2 a1 fc 60 64 98 36 c6 +16 d9 96 81 + +# Signature: +2a 34 f6 12 5e 1f 6b 0b f9 71 e8 4f bd 41 c6 32 +be 8f 2c 2a ce 7d e8 b6 92 6e 31 ff 93 e9 af 98 +7f bc 06 e5 1e 9b e1 4f 51 98 f9 1f 3f 95 3b d6 +7d a6 0a 9d f5 97 64 c3 dc 0f e0 8e 1c be f0 b7 +5f 86 8d 10 ad 3f ba 74 9f ef 59 fb 6d ac 46 a0 +d6 e5 04 36 93 31 58 6f 58 e4 62 8f 39 aa 27 89 +82 54 3b c0 ee b5 37 dc 61 95 80 19 b3 94 fb 27 +3f 21 58 58 a0 a0 1a c4 d6 50 b9 55 c6 7f 4c 58 + +# ============================================= + +# ================================== +# Example 2: A 1025-bit RSA Key Pair +# ================================== + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +01 d4 0c 1b cf 97 a6 8a e7 cd bd 8a 7b f3 e3 4f +a1 9d cc a4 ef 75 a4 74 54 37 5f 94 51 4d 88 fe +d0 06 fb 82 9f 84 19 ff 87 d6 31 5d a6 8a 1f f3 +a0 93 8e 9a bb 34 64 01 1c 30 3a d9 91 99 cf 0c +7c 7a 8b 47 7d ce 82 9e 88 44 f6 25 b1 15 e5 e9 +c4 a5 9c f8 f8 11 3b 68 34 33 6a 2f d2 68 9b 47 +2c bb 5e 5c ab e6 74 35 0c 59 b6 c1 7e 17 68 74 +fb 42 f8 fc 3d 17 6a 01 7e dc 61 fd 32 6c 4b 33 +c9 + +# RSA public exponent e: +01 00 01 + +# RSA private exponent d: +02 7d 14 7e 46 73 05 73 77 fd 1e a2 01 56 57 72 +17 6a 7d c3 83 58 d3 76 04 56 85 a2 e7 87 c2 3c +15 57 6b c1 6b 9f 44 44 02 d6 bf c5 d9 8a 3e 88 +ea 13 ef 67 c3 53 ec a0 c0 dd ba 92 55 bd 7b 8b +b5 0a 64 4a fd fd 1d d5 16 95 b2 52 d2 2e 73 18 +d1 b6 68 7a 1c 10 ff 75 54 5f 3d b0 fe 60 2d 5f +2b 7f 29 4e 36 01 ea b7 b9 d1 ce cd 76 7f 64 69 +2e 3e 53 6c a2 84 6c b0 c2 dd 48 6a 39 fa 75 b1 + +# Prime p: +01 66 01 e9 26 a0 f8 c9 e2 6e ca b7 69 ea 65 a5 +e7 c5 2c c9 e0 80 ef 51 94 57 c6 44 da 68 91 c5 +a1 04 d3 ea 79 55 92 9a 22 e7 c6 8a 7a f9 fc ad +77 7c 3c cc 2b 9e 3d 36 50 bc e4 04 39 9b 7e 59 +d1 + +# Prime q: +01 4e af a1 d4 d0 18 4d a7 e3 1f 87 7d 12 81 dd +da 62 56 64 86 9e 83 79 e6 7a d3 b7 5e ae 74 a5 +80 e9 82 7a bd 6e b7 a0 02 cb 54 11 f5 26 67 97 +76 8f b8 e9 5a e4 0e 3e 8a 01 f3 5f f8 9e 56 c0 +79 + +# p's CRT exponent dP: +e2 47 cc e5 04 93 9b 8f 0a 36 09 0d e2 00 93 87 +55 e2 44 4b 29 53 9a 7d a7 a9 02 f6 05 68 35 c0 +db 7b 52 55 94 97 cf e2 c6 1a 80 86 d0 21 3c 47 +2c 78 85 18 00 b1 71 f6 40 1d e2 e9 c2 75 6f 31 + +# q's CRT exponent dQ: +b1 2f ba 75 78 55 e5 86 e4 6f 64 c3 8a 70 c6 8b +3f 54 8d 93 d7 87 b3 99 99 9d 4c 8f 0b bd 25 81 +c2 1e 19 ed 00 18 a6 d5 d3 df 86 42 4b 3a bc ad +40 19 9d 31 49 5b 61 30 9f 27 c1 bf 55 d4 87 c1 + +# CRT coefficient qInv: +56 4b 1e 1f a0 03 bd a9 1e 89 09 04 25 aa c0 5b +91 da 9e e2 50 61 e7 62 8d 5f 51 30 4a 84 99 2f +dc 33 76 2b d3 78 a5 9f 03 0a 33 4d 53 2b d0 da +e8 f2 98 ea 9e d8 44 63 6a d5 fb 8c bd c0 3c ad + +# -------------------------------- +# RSASSA-PSS Signature Example 2.1 +# -------------------------------- + +# Message to be signed: +da ba 03 20 66 26 3f ae db 65 98 48 11 52 78 a5 +2c 44 fa a3 a7 6f 37 51 5e d3 36 32 10 72 c4 0a +9d 9b 53 bc 05 01 40 78 ad f5 20 87 51 46 aa e7 +0f f0 60 22 6d cb 7b 1f 1f c2 7e 93 60 + +# Salt: +57 bf 16 0b cb 02 bb 1d c7 28 0c f0 45 85 30 b7 +d2 83 2f f7 + +# Signature: +01 4c 5b a5 33 83 28 cc c6 e7 a9 0b f1 c0 ab 3f +d6 06 ff 47 96 d3 c1 2e 4b 63 9e d9 13 6a 5f ec +6c 16 d8 88 4b dd 99 cf dc 52 14 56 b0 74 2b 73 +68 68 cf 90 de 09 9a db 8d 5f fd 1d ef f3 9b a4 +00 7a b7 46 ce fd b2 2d 7d f0 e2 25 f5 46 27 dc +65 46 61 31 72 1b 90 af 44 53 63 a8 35 8b 9f 60 +76 42 f7 8f ab 0a b0 f4 3b 71 68 d6 4b ae 70 d8 +82 78 48 d8 ef 1e 42 1c 57 54 dd f4 2c 25 89 b5 +b3 + +# -------------------------------- +# RSASSA-PSS Signature Example 2.2 +# -------------------------------- + +# Message to be signed: +e4 f8 60 1a 8a 6d a1 be 34 44 7c 09 59 c0 58 57 +0c 36 68 cf d5 1d d5 f9 cc d6 ad 44 11 fe 82 13 +48 6d 78 a6 c4 9f 93 ef c2 ca 22 88 ce bc 2b 9b +60 bd 04 b1 e2 20 d8 6e 3d 48 48 d7 09 d0 32 d1 +e8 c6 a0 70 c6 af 9a 49 9f cf 95 35 4b 14 ba 61 +27 c7 39 de 1b b0 fd 16 43 1e 46 93 8a ec 0c f8 +ad 9e b7 2e 83 2a 70 35 de 9b 78 07 bd c0 ed 8b +68 eb 0f 5a c2 21 6b e4 0c e9 20 c0 db 0e dd d3 +86 0e d7 88 ef ac ca ca 50 2d 8f 2b d6 d1 a7 c1 +f4 1f f4 6f 16 81 c8 f1 f8 18 e9 c4 f6 d9 1a 0c +78 03 cc c6 3d 76 a6 54 4d 84 3e 08 4e 36 3b 8a +cc 55 aa 53 17 33 ed b5 de e5 b5 19 6e 9f 03 e8 +b7 31 b3 77 64 28 d9 e4 57 fe 3f bc b3 db 72 74 +44 2d 78 58 90 e9 cb 08 54 b6 44 4d ac e7 91 d7 +27 3d e1 88 97 19 33 8a 77 fe + +# Salt: +7f 6d d3 59 e6 04 e6 08 70 e8 98 e4 7b 19 bf 2e +5a 7b 2a 90 + +# Signature: +01 09 91 65 6c ca 18 2b 7f 29 d2 db c0 07 e7 ae +0f ec 15 8e b6 75 9c b9 c4 5c 5f f8 7c 76 35 dd +46 d1 50 88 2f 4d e1 e9 ae 65 e7 f7 d9 01 8f 68 +36 95 4a 47 c0 a8 1a 8a 6b 6f 83 f2 94 4d 60 81 +b1 aa 7c 75 9b 25 4b 2c 34 b6 91 da 67 cc 02 26 +e2 0b 2f 18 b4 22 12 76 1d cd 4b 90 8a 62 b3 71 +b5 91 8c 57 42 af 4b 53 7e 29 69 17 67 4f b9 14 +19 47 61 62 1c c1 9a 41 f6 fb 95 3f bc bb 64 9d +ea + +# -------------------------------- +# RSASSA-PSS Signature Example 2.3 +# -------------------------------- + +# Message to be signed: +52 a1 d9 6c 8a c3 9e 41 e4 55 80 98 01 b9 27 a5 +b4 45 c1 0d 90 2a 0d cd 38 50 d2 2a 66 d2 bb 07 +03 e6 7d 58 67 11 45 95 aa bf 5a 7a eb 5a 8f 87 +03 4b bb 30 e1 3c fd 48 17 a9 be 76 23 00 23 60 +6d 02 86 a3 fa f8 a4 d2 2b 72 8e c5 18 07 9f 9e +64 52 6e 3a 0c c7 94 1a a3 38 c4 37 99 7c 68 0c +ca c6 7c 66 bf a1 + +# Salt: +fc a8 62 06 8b ce 22 46 72 4b 70 8a 05 19 da 17 +e6 48 68 8c + +# Signature: +00 7f 00 30 01 8f 53 cd c7 1f 23 d0 36 59 fd e5 +4d 42 41 f7 58 a7 50 b4 2f 18 5f 87 57 85 20 c3 +07 42 af d8 43 59 b6 e6 e8 d3 ed 95 9d c6 fe 48 +6b ed c8 e2 cf 00 1f 63 a7 ab e1 62 56 a1 b8 4d +f0 d2 49 fc 05 d3 19 4c e5 f0 91 27 42 db bf 80 +dd 17 4f 6c 51 f6 ba d7 f1 6c f3 36 4e ba 09 5a +06 26 7d c3 79 38 03 ac 75 26 ae be 0a 47 5d 38 +b8 c2 24 7a b5 1c 48 98 df 70 47 dc 6a df 52 c6 +c4 + +# -------------------------------- +# RSASSA-PSS Signature Example 2.4 +# -------------------------------- + +# Message to be signed: +a7 18 2c 83 ac 18 be 65 70 a1 06 aa 9d 5c 4e 3d +bb d4 af ae b0 c6 0c 4a 23 e1 96 9d 79 ff + +# Salt: +80 70 ef 2d e9 45 c0 23 87 68 4b a0 d3 30 96 73 +22 35 d4 40 + +# Signature: +00 9c d2 f4 ed be 23 e1 23 46 ae 8c 76 dd 9a d3 +23 0a 62 07 61 41 f1 6c 15 2b a1 85 13 a4 8e f6 +f0 10 e0 e3 7f d3 df 10 a1 ec 62 9a 0c b5 a3 b5 +d2 89 30 07 29 8c 30 93 6a 95 90 3b 6b a8 55 55 +d9 ec 36 73 a0 61 08 fd 62 a2 fd a5 6d 1c e2 e8 +5c 4d b6 b2 4a 81 ca 3b 49 6c 36 d4 fd 06 eb 7c +91 66 d8 e9 48 77 c4 2b ea 62 2b 3b fe 92 51 fd +c2 1d 8d 53 71 ba da d7 8a 48 82 14 79 63 35 b4 +0b + +# -------------------------------- +# RSASSA-PSS Signature Example 2.5 +# -------------------------------- + +# Message to be signed: +86 a8 3d 4a 72 ee 93 2a 4f 56 30 af 65 79 a3 86 +b7 8f e8 89 99 e0 ab d2 d4 90 34 a4 bf c8 54 dd +94 f1 09 4e 2e 8c d7 a1 79 d1 95 88 e4 ae fc 1b +1b d2 5e 95 e3 dd 46 1f + +# Salt: +17 63 9a 4e 88 d7 22 c4 fc a2 4d 07 9a 8b 29 c3 +24 33 b0 c9 + +# Signature: +00 ec 43 08 24 93 1e bd 3b aa 43 03 4d ae 98 ba +64 6b 8c 36 01 3d 16 71 c3 cf 1c f8 26 0c 37 4b +19 f8 e1 cc 8d 96 50 12 40 5e 7e 9b f7 37 86 12 +df cc 85 fc e1 2c da 11 f9 50 bd 0b a8 87 67 40 +43 6c 1d 25 95 a6 4a 1b 32 ef cf b7 4a 21 c8 73 +b3 cc 33 aa f4 e3 dc 39 53 de 67 f0 67 4c 04 53 +b4 fd 9f 60 44 06 d4 41 b8 16 09 8c b1 06 fe 34 +72 bc 25 1f 81 5f 59 db 2e 43 78 a3 ad dc 18 1e +cf + +# -------------------------------- +# RSASSA-PSS Signature Example 2.6 +# -------------------------------- + +# Message to be signed: +04 9f 91 54 d8 71 ac 4a 7c 7a b4 53 25 ba 75 45 +a1 ed 08 f7 05 25 b2 66 7c f1 + +# Salt: +37 81 0d ef 10 55 ed 92 2b 06 3d f7 98 de 5d 0a +ab f8 86 ee + +# Signature: +00 47 5b 16 48 f8 14 a8 dc 0a bd c3 7b 55 27 f5 +43 b6 66 bb 6e 39 d3 0e 5b 49 d3 b8 76 dc cc 58 +ea c1 4e 32 a2 d5 5c 26 16 01 44 56 ad 2f 24 6f +c8 e3 d5 60 da 3d df 37 9a 1c 0b d2 00 f1 02 21 +df 07 8c 21 9a 15 1b c8 d4 ec 9d 2f c2 56 44 67 +81 10 14 ef 15 d8 ea 01 c2 eb bf f8 c2 c8 ef ab +38 09 6e 55 fc be 32 85 c7 aa 55 88 51 25 4f af +fa 92 c1 c7 2b 78 75 86 63 ef 45 82 84 31 39 d7 +a6 + +# ============================================= + +# ================================== +# Example 3: A 1026-bit RSA Key Pair +# ================================== + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +02 f2 46 ef 45 1e d3 ee bb 9a 31 02 00 cc 25 85 +9c 04 8e 4b e7 98 30 29 91 11 2e b6 8c e6 db 67 +4e 28 0d a2 1f ed ed 1a e7 48 80 ca 52 2b 18 db +24 93 85 01 28 27 c5 15 f0 e4 66 a1 ff a6 91 d9 +81 70 57 4e 9d 0e ad b0 87 58 6c a4 89 33 da 3c +c9 53 d9 5b d0 ed 50 de 10 dd cb 67 36 10 7d 6c +83 1c 7f 66 3e 83 3c a4 c0 97 e7 00 ce 0f b9 45 +f8 8f b8 5f e8 e5 a7 73 17 25 65 b9 14 a4 71 a4 +43 + +# RSA public exponent e: +01 00 01 + +# RSA private exponent d: +65 14 51 73 3b 56 de 5a c0 a6 89 a4 ae b6 e6 89 +4a 69 01 4e 07 6c 88 dd 7a 66 7e ab 32 32 bb cc +d2 fc 44 ba 2f a9 c3 1d b4 6f 21 ed d1 fd b2 3c +5c 12 8a 5d a5 ba b9 1e 7f 95 2b 67 75 9c 7c ff +70 54 15 ac 9f a0 90 7c 7c a6 17 8f 66 8f b9 48 +d8 69 da 4c c3 b7 35 6f 40 08 df d5 44 9d 32 ee +02 d9 a4 77 eb 69 fc 29 26 6e 5d 90 70 51 23 75 +a5 0f bb cc 27 e2 38 ad 98 42 5f 6e bb f8 89 91 + +# Prime p: +01 bd 36 e1 8e ce 4b 0f db 2e 9c 9d 54 8b d1 a7 +d6 e2 c2 1c 6f dc 35 07 4a 1d 05 b1 c6 c8 b3 d5 +58 ea 26 39 c9 a9 a4 21 68 01 69 31 72 52 55 8b +d1 48 ad 21 5a ac 55 0e 2d cf 12 a8 2d 0e bf e8 +53 + +# Prime q: +01 b1 b6 56 ad 86 d8 e1 9d 5d c8 62 92 b3 a1 92 +fd f6 e0 dd 37 87 7b ad 14 82 2f a0 01 90 ca b2 +65 f9 0d 3f 02 05 7b 6f 54 d6 ec b1 44 91 e5 ad +ea ce bc 48 bf 0e bd 2a 2a d2 6d 40 2e 54 f6 16 +51 + +# p's CRT exponent dP: +1f 27 79 fd 2e 3e 5e 6b ae 05 53 95 18 fb a0 cd +0e ad 1a a4 51 3a 7c ba 18 f1 cf 10 e3 f6 81 95 +69 3d 27 8a 0f 0e e7 2f 89 f9 bc 76 0d 80 e2 f9 +d0 26 1d 51 65 01 c6 ae 39 f1 4a 47 6c e2 cc f5 + +# q's CRT exponent dQ: +01 1a 0d 36 79 4b 04 a8 54 aa b4 b2 46 2d 43 9a +50 46 c9 1d 94 0b 2b c6 f7 5b 62 95 6f ef 35 a2 +a6 e6 3c 53 09 81 7f 30 7b bf f9 d5 9e 7e 33 1b +d3 63 f6 d6 68 49 b1 83 46 ad ea 16 9f 0a e9 ae +c1 + +# CRT coefficient qInv: +0b 30 f0 ec f5 58 75 2f b3 a6 ce 4b a2 b8 c6 75 +f6 59 eb a6 c3 76 58 5a 1b 39 71 2d 03 8a e3 d2 +b4 6f cb 41 8a e1 5d 09 05 da 64 40 e1 51 3a 30 +b9 b7 d6 66 8f bc 5e 88 e5 ab 7a 17 5e 73 ba 35 + +# -------------------------------- +# RSASSA-PSS Signature Example 3.1 +# -------------------------------- + +# Message to be signed: +59 4b 37 33 3b bb 2c 84 52 4a 87 c1 a0 1f 75 fc +ec 0e 32 56 f1 08 e3 8d ca 36 d7 0d 00 57 + +# Salt: +f3 1a d6 c8 cf 89 df 78 ed 77 fe ac bc c2 f8 b0 +a8 e4 cf aa + +# Signature: +00 88 b1 35 fb 17 94 b6 b9 6c 4a 3e 67 81 97 f8 +ca c5 2b 64 b2 fe 90 7d 6f 27 de 76 11 24 96 4a +99 a0 1a 88 27 40 ec fa ed 6c 01 a4 74 64 bb 05 +18 23 13 c0 13 38 a8 cd 09 72 14 cd 68 ca 10 3b +d5 7d 3b c9 e8 16 21 3e 61 d7 84 f1 82 46 7a bf +8a 01 cf 25 3e 99 a1 56 ea a8 e3 e1 f9 0e 3c 6e +4e 3a a2 d8 3e d0 34 5b 89 fa fc 9c 26 07 7c 14 +b6 ac 51 45 4f a2 6e 44 6e 3a 2f 15 3b 2b 16 79 +7f + +# -------------------------------- +# RSASSA-PSS Signature Example 3.2 +# -------------------------------- + +# Message to be signed: +8b 76 95 28 88 4a 0d 1f fd 09 0c f1 02 99 3e 79 +6d ad cf bd dd 38 e4 4f f6 32 4c a4 51 + +# Salt: +fc f9 f0 e1 f1 99 a3 d1 d0 da 68 1c 5b 86 06 fc +64 29 39 f7 + +# Signature: +02 a5 f0 a8 58 a0 86 4a 4f 65 01 7a 7d 69 45 4f +3f 97 3a 29 99 83 9b 7b bc 48 bf 78 64 11 69 17 +95 56 f5 95 fa 41 f6 ff 18 e2 86 c2 78 30 79 bc +09 10 ee 9c c3 4f 49 ba 68 11 24 f9 23 df a8 8f +42 61 41 a3 68 a5 f5 a9 30 c6 28 c2 c3 c2 00 e1 +8a 76 44 72 1a 0c be c6 dd 3f 62 79 bd e3 e8 f2 +be 5e 2d 4e e5 6f 97 e7 ce af 33 05 4b e7 04 2b +d9 1a 63 bb 09 f8 97 bd 41 e8 11 97 de e9 9b 11 +af + +# -------------------------------- +# RSASSA-PSS Signature Example 3.3 +# -------------------------------- + +# Message to be signed: +1a bd ba 48 9c 5a da 2f 99 5e d1 6f 19 d5 a9 4d +9e 6e c3 4a 8d 84 f8 45 57 d2 6e 5e f9 b0 2b 22 +88 7e 3f 9a 4b 69 0a d1 14 92 09 c2 0c 61 43 1f +0c 01 7c 36 c2 65 7b 35 d7 b0 7d 3f 5a d8 70 85 +07 a9 c1 b8 31 df 83 5a 56 f8 31 07 18 14 ea 5d +3d 8d 8f 6a de 40 cb a3 8b 42 db 7a 2d 3d 7a 29 +c8 f0 a7 9a 78 38 cf 58 a9 75 7f a2 fe 4c 40 df +9b aa 19 3b fc 6f 92 b1 23 ad 57 b0 7a ce 3e 6a +c0 68 c9 f1 06 af d9 ee b0 3b 4f 37 c2 5d bf bc +fb 30 71 f6 f9 77 17 66 d0 72 f3 bb 07 0a f6 60 +55 32 97 3a e2 50 51 + +# Salt: +98 6e 7c 43 db b6 71 bd 41 b9 a7 f4 b6 af c8 0e +80 5f 24 23 + +# Signature: +02 44 bc d1 c8 c1 69 55 73 6c 80 3b e4 01 27 2e +18 cb 99 08 11 b1 4f 72 db 96 41 24 d5 fa 76 06 +49 cb b5 7a fb 87 55 db b6 2b f5 1f 46 6c f2 3a +0a 16 07 57 6e 98 3d 77 8f ce ff a9 2d f7 54 8a +ea 8e a4 ec ad 2c 29 dd 9f 95 bc 07 fe 91 ec f8 +be e2 55 bf e8 76 2f d7 69 0a a9 bf a4 fa 08 49 +ef 72 8c 2c 42 c4 53 23 64 52 2d f2 ab 7f 9f 8a +03 b6 3f 7a 49 91 75 82 86 68 f5 ef 5a 29 e3 80 +2c + +# -------------------------------- +# RSASSA-PSS Signature Example 3.4 +# -------------------------------- + +# Message to be signed: +8f b4 31 f5 ee 79 2b 6c 2a c7 db 53 cc 42 86 55 +ae b3 2d 03 f4 e8 89 c5 c2 5d e6 83 c4 61 b5 3a +cf 89 f9 f8 d3 aa bd f6 b9 f0 c2 a1 de 12 e1 5b +49 ed b3 91 9a 65 2f e9 49 1c 25 a7 fc e1 f7 22 +c2 54 36 08 b6 9d c3 75 ec + +# Salt: +f8 31 2d 9c 8e ea 13 ec 0a 4c 7b 98 12 0c 87 50 +90 87 c4 78 + +# Signature: +01 96 f1 2a 00 5b 98 12 9c 8d f1 3c 4c b1 6f 8a +a8 87 d3 c4 0d 96 df 3a 88 e7 53 2e f3 9c d9 92 +f2 73 ab c3 70 bc 1b e6 f0 97 cf eb bf 01 18 fd +9e f4 b9 27 15 5f 3d f2 2b 90 4d 90 70 2d 1f 7b +a7 a5 2b ed 8b 89 42 f4 12 cd 7b d6 76 c9 d1 8e +17 03 91 dc d3 45 c0 6a 73 09 64 b3 f3 0b cc e0 +bb 20 ba 10 6f 9a b0 ee b3 9c f8 a6 60 7f 75 c0 +34 7f 0a f7 9f 16 af a0 81 d2 c9 2d 1e e6 f8 36 +b8 + +# -------------------------------- +# RSASSA-PSS Signature Example 3.5 +# -------------------------------- + +# Message to be signed: +fe f4 16 1d fa af 9c 52 95 05 1d fc 1f f3 81 0c +8c 9e c2 e8 66 f7 07 54 22 c8 ec 42 16 a9 c4 ff +49 42 7d 48 3c ae 10 c8 53 4a 41 b2 fd 15 fe e0 +69 60 ec 6f b3 f7 a7 e9 4a 2f 8a 2e 3e 43 dc 4a +40 57 6c 30 97 ac 95 3b 1d e8 6f 0b 4e d3 6d 64 +4f 23 ae 14 42 55 29 62 24 64 ca 0c bf 0b 17 41 +34 72 38 15 7f ab 59 e4 de 55 24 09 6d 62 ba ec +63 ac 64 + +# Salt: +50 32 7e fe c6 29 2f 98 01 9f c6 7a 2a 66 38 56 +3e 9b 6e 2d + +# Signature: +02 1e ca 3a b4 89 22 64 ec 22 41 1a 75 2d 92 22 +10 76 d4 e0 1c 0e 6f 0d de 9a fd 26 ba 5a cf 6d +73 9e f9 87 54 5d 16 68 3e 56 74 c9 e7 0f 1d e6 +49 d7 e6 1d 48 d0 ca eb 4f b4 d8 b2 4f ba 84 a6 +e3 10 8f ee 7d 07 05 97 32 66 ac 52 4b 4a d2 80 +f7 ae 17 dc 59 d9 6d 33 51 58 6b 5a 3b db 89 5d +1e 1f 78 20 ac 61 35 d8 75 34 80 99 83 82 ba 32 +b7 34 95 59 60 8c 38 74 52 90 a8 5e f4 e9 f9 bd +83 + +# -------------------------------- +# RSASSA-PSS Signature Example 3.6 +# -------------------------------- + +# Message to be signed: +ef d2 37 bb 09 8a 44 3a ee b2 bf 6c 3f 8c 81 b8 +c0 1b 7f cb 3f eb + +# Salt: +b0 de 3f c2 5b 65 f5 af 96 b1 d5 cc 3b 27 d0 c6 +05 30 87 b3 + +# Signature: +01 2f af ec 86 2f 56 e9 e9 2f 60 ab 0c 77 82 4f +42 99 a0 ca 73 4e d2 6e 06 44 d5 d2 22 c7 f0 bd +e0 39 64 f8 e7 0a 5c b6 5e d4 4e 44 d5 6a e0 ed +f1 ff 86 ca 03 2c c5 dd 44 04 db b7 6a b8 54 58 +6c 44 ee d8 33 6d 08 d4 57 ce 6c 03 69 3b 45 c0 +f1 ef ef 93 62 4b 95 b8 ec 16 9c 61 6d 20 e5 53 +8e bc 0b 67 37 a6 f8 2b 4b c0 57 09 24 fc 6b 35 +75 9a 33 48 42 62 79 f8 b3 d7 74 4e 2d 22 24 26 +ce + +# ============================================= + +# ================================== +# Example 4: A 1027-bit RSA Key Pair +# ================================== + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +05 4a db 78 86 44 7e fe 6f 57 e0 36 8f 06 cf 52 +b0 a3 37 07 60 d1 61 ce f1 26 b9 1b e7 f8 9c 42 +1b 62 a6 ec 1d a3 c3 11 d7 5e d5 0e 0a b5 ff f3 +fd 33 8a cc 3a a8 a4 e7 7e e2 63 69 ac b8 1b a9 +00 fa 83 f5 30 0c f9 bb 6c 53 ad 1d c8 a1 78 b8 +15 db 42 35 a9 a9 da 0c 06 de 4e 61 5e a1 27 7c +e5 59 e9 c1 08 de 58 c1 4a 81 aa 77 f5 a6 f8 d1 +33 54 94 49 88 48 c8 b9 59 40 74 0b e7 bf 7c 37 +05 + +# RSA public exponent e: +01 00 01 + +# RSA private exponent d: +fa 04 1f 8c d9 69 7c ee d3 8e c8 ca a2 75 52 3b +4d d7 2b 09 a3 01 d3 54 1d 72 f5 d3 1c 05 cb ce +2d 69 83 b3 61 83 af 10 69 0b d4 6c 46 13 1e 35 +78 94 31 a5 56 77 1d d0 04 9b 57 46 1b f0 60 c1 +f6 84 72 e8 a6 7c 25 f3 57 e5 b6 b4 73 8f a5 41 +a7 30 34 6b 4a 07 64 9a 2d fa 80 6a 69 c9 75 b6 +ab a6 46 78 ac c7 f5 91 3e 89 c6 22 f2 d8 ab b1 +e3 e3 25 54 e3 9d f9 4b a6 0c 00 2e 38 7d 90 11 + +# Prime p: +02 92 32 33 6d 28 38 94 5d ba 9d d7 72 3f 4e 62 +4a 05 f7 37 5b 92 7a 87 ab e6 a8 93 a1 65 8f d4 +9f 47 f6 c7 b0 fa 59 6c 65 fa 68 a2 3f 0a b4 32 +96 2d 18 d4 34 3b d6 fd 67 1a 5e a8 d1 48 41 39 +95 + +# Prime q: +02 0e f5 ef e7 c5 39 4a ed 22 72 f7 e8 1a 74 f4 +c0 2d 14 58 94 cb 1b 3c ab 23 a9 a0 71 0a 2a fc +7e 33 29 ac bb 74 3d 01 f6 80 c4 d0 2a fb 4c 8f +de 7e 20 93 08 11 bb 2b 99 57 88 b5 e8 72 c2 0b +b1 + +# p's CRT exponent dP: +02 6e 7e 28 01 0e cf 24 12 d9 52 3a d7 04 64 7f +b4 fe 9b 66 b1 a6 81 58 1b 0e 15 55 3a 89 b1 54 +28 28 89 8f 27 24 3e ba b4 5f f5 e1 ac b9 d4 df +1b 05 1f bc 62 82 4d bc 6f 6c 93 26 1a 78 b9 a7 +59 + +# q's CRT exponent dQ: +01 2d dc c8 6e f6 55 99 8c 39 dd ae 11 71 86 69 +e5 e4 6c f1 49 5b 07 e1 3b 10 14 cd 69 b3 af 68 +30 4a d2 a6 b6 43 21 e7 8b f3 bb ca 9b b4 94 e9 +1d 45 17 17 e2 d9 75 64 c6 54 94 65 d0 20 5c f4 +21 + +# CRT coefficient qInv: +01 06 00 c4 c2 18 47 45 9f e5 76 70 3e 2e be ca +e8 a5 09 4e e6 3f 53 6b f4 ac 68 d3 c1 3e 5e 4f +12 ac 5c c1 0a b6 a2 d0 5a 19 92 14 d1 82 47 47 +d5 51 90 96 36 b7 74 c2 2c ac 0b 83 75 99 ab cc +75 + +# -------------------------------- +# RSASSA-PSS Signature Example 4.1 +# -------------------------------- + +# Message to be signed: +9f b0 3b 82 7c 82 17 d9 + +# Salt: +ed 7c 98 c9 5f 30 97 4f be 4f bd dc f0 f2 8d 60 +21 c0 e9 1d + +# Signature: +03 23 d5 b7 bf 20 ba 45 39 28 9a e4 52 ae 42 97 +08 0f ef f4 51 84 23 ff 48 11 a8 17 83 7e 7d 82 +f1 83 6c df ab 54 51 4f f0 88 7b dd ee bf 40 bf +99 b0 47 ab c3 ec fa 6a 37 a3 ef 00 f4 a0 c4 a8 +8a ae 09 04 b7 45 c8 46 c4 10 7e 87 97 72 3e 8a +c8 10 d9 e3 d9 5d fa 30 ff 49 66 f4 d7 5d 13 76 +8d 20 85 7f 2b 14 06 f2 64 cf e7 5e 27 d7 65 2f +4b 5e d3 57 5f 28 a7 02 f8 c4 ed 9c f9 b2 d4 49 +48 + +# -------------------------------- +# RSASSA-PSS Signature Example 4.2 +# -------------------------------- + +# Message to be signed: +0c a2 ad 77 79 7e ce 86 de 5b f7 68 75 0d db 5e +d6 a3 11 6a d9 9b bd 17 ed f7 f7 82 f0 db 1c d0 +5b 0f 67 74 68 c5 ea 42 0d c1 16 b1 0e 80 d1 10 +de 2b 04 61 ea 14 a3 8b e6 86 20 39 2e 7e 89 3c +b4 ea 93 93 fb 88 6c 20 ff 79 06 42 30 5b f3 02 +00 38 92 e5 4d f9 f6 67 50 9d c5 39 20 df 58 3f +50 a3 dd 61 ab b6 fa b7 5d 60 03 77 e3 83 e6 ac +a6 71 0e ee a2 71 56 e0 67 52 c9 4c e2 5a e9 9f +cb f8 59 2d be 2d 7e 27 45 3c b4 4d e0 71 00 eb +b1 a2 a1 98 11 a4 78 ad be ab 27 0f 94 e8 fe 36 +9d 90 b3 ca 61 2f 9f + +# Salt: +22 d7 1d 54 36 3a 42 17 aa 55 11 3f 05 9b 33 84 +e3 e5 7e 44 + +# Signature: +04 9d 01 85 84 5a 26 4d 28 fe b1 e6 9e da ec 09 +06 09 e8 e4 6d 93 ab b3 83 71 ce 51 f4 aa 65 a5 +99 bd aa a8 1d 24 fb a6 6a 08 a1 16 cb 64 4f 3f +1e 65 3d 95 c8 9d b8 bb d5 da ac 27 09 c8 98 40 +00 17 84 10 a7 c6 aa 86 67 dd c3 8c 74 1f 71 0e +c8 66 5a a9 05 2b e9 29 d4 e3 b1 67 82 c1 66 21 +14 c5 41 4b b0 35 34 55 c3 92 fc 28 f3 db 59 05 +4b 5f 36 5c 49 e1 d1 56 f8 76 ee 10 cb 4f d7 05 +98 + +# -------------------------------- +# RSASSA-PSS Signature Example 4.3 +# -------------------------------- + +# Message to be signed: +28 80 62 af c0 8f cd b7 c5 f8 65 0b 29 83 73 00 +46 1d d5 67 6c 17 a2 0a 3c 8f b5 14 89 49 e3 f7 +3d 66 b3 ae 82 c7 24 0e 27 c5 b3 ec 43 28 ee 7d +6d df 6a 6a 0c 9b 5b 15 bc da 19 6a 9d 0c 76 b1 +19 d5 34 d8 5a bd 12 39 62 d5 83 b7 6c e9 d1 80 +bc e1 ca + +# Salt: +4a f8 70 fb c6 51 60 12 ca 91 6c 70 ba 86 2a c7 +e8 24 36 17 + +# Signature: +03 fb c4 10 a2 ce d5 95 00 fb 99 f9 e2 af 27 81 +ad a7 4e 13 14 56 24 60 27 82 e2 99 48 13 ee fc +a0 51 9e cd 25 3b 85 5f b6 26 a9 0d 77 1e ae 02 +8b 0c 47 a1 99 cb d9 f8 e3 26 97 34 af 41 63 59 +90 90 71 3a 3f a9 10 fa 09 60 65 27 21 43 2b 97 +10 36 a7 18 1a 2b c0 ca b4 3b 0b 59 8b c6 21 74 +61 d7 db 30 5f f7 e9 54 c5 b5 bb 23 1c 39 e7 91 +af 6b cf a7 6b 14 7b 08 13 21 f7 26 41 48 2a 2a +ad + +# -------------------------------- +# RSASSA-PSS Signature Example 4.4 +# -------------------------------- + +# Message to be signed: +6f 4f 9a b9 50 11 99 ce f5 5c 6c f4 08 fe 7b 36 +c5 57 c4 9d 42 0a 47 63 d2 46 3c 8a d4 4b 3c fc +5b e2 74 2c 0e 7d 9b 0f 66 08 f0 8c 7f 47 b6 93 +ee + +# Salt: +40 d2 e1 80 fa e1 ea c4 39 c1 90 b5 6c 2c 0e 14 +dd f9 a2 26 + +# Signature: +04 86 64 4b c6 6b f7 5d 28 33 5a 61 79 b1 08 51 +f4 3f 09 bd ed 9f ac 1a f3 32 52 bb 99 53 ba 42 +98 cd 64 66 b2 75 39 a7 0a da a3 f8 9b 3d b3 c7 +4a b6 35 d1 22 f4 ee 7c e5 57 a6 1e 59 b8 2f fb +78 66 30 e5 f9 db 53 c7 7d 9a 0c 12 fa b5 95 8d +4c 2c e7 da a8 07 cd 89 ba 2c c7 fc d0 2f f4 70 +ca 67 b2 29 fc ce 81 4c 85 2c 73 cc 93 be a3 5b +e6 84 59 ce 47 8e 9d 46 55 d1 21 c8 47 2f 37 1d +4f + +# -------------------------------- +# RSASSA-PSS Signature Example 4.5 +# -------------------------------- + +# Message to be signed: +e1 7d 20 38 5d 50 19 55 82 3c 3f 66 62 54 c1 d3 +dd 36 ad 51 68 b8 f1 8d 28 6f dc f6 7a 7d ad 94 +09 70 85 fa b7 ed 86 fe 21 42 a2 87 71 71 79 97 +ef 1a 7a 08 88 4e fc 39 35 6d 76 07 7a af 82 45 +9a 7f ad 45 84 88 75 f2 81 9b 09 89 37 fe 92 3b +cc 9d c4 42 d7 2d 75 4d 81 20 25 09 0c 9b c0 3d +b3 08 0c 13 8d d6 3b 35 5d 0b 4b 85 d6 68 8a c1 +9f 4d e1 50 84 a0 ba 4e 37 3b 93 ef 4a 55 50 96 +69 19 15 dc 23 c0 0e 95 4c de b2 0a 47 cd 55 d1 +6c 3d 86 81 d4 6e d7 f2 ed 5e a4 27 95 be 17 ba +ed 25 f0 f4 d1 13 b3 63 6a dd d5 85 f1 6a 8b 5a +ec 0c 8f a9 c5 f0 3c bf 3b 9b 73 + +# Salt: +24 97 dc 2b 46 15 df ae 5a 66 3d 49 ff d5 6b f7 +ef c1 13 04 + +# Signature: +02 2a 80 04 53 53 90 4c b3 0c bb 54 2d 7d 49 90 +42 1a 6e ec 16 a8 02 9a 84 22 ad fd 22 d6 af f8 +c4 cc 02 94 af 11 0a 0c 06 7e c8 6a 7d 36 41 34 +45 9b b1 ae 8f f8 36 d5 a8 a2 57 98 40 99 6b 32 +0b 19 f1 3a 13 fa d3 78 d9 31 a6 56 25 da e2 73 +9f 0c 53 67 0b 35 d9 d3 cb ac 08 e7 33 e4 ec 2b +83 af 4b 91 96 d6 3e 7c 4f f1 dd ea e2 a1 22 79 +1a 12 5b fe a8 de b0 de 8c cf 1f 4f fa f6 e6 fb +0a + +# -------------------------------- +# RSASSA-PSS Signature Example 4.6 +# -------------------------------- + +# Message to be signed: +af bc 19 d4 79 24 90 18 fd f4 e0 9f 61 87 26 44 +04 95 de 11 dd ee e3 88 72 d7 75 fc ea 74 a2 38 +96 b5 34 3c 9c 38 d4 6a f0 db a2 24 d0 47 58 0c +c6 0a 65 e9 39 1c f9 b5 9b 36 a8 60 59 8d 4e 82 +16 72 2f 99 3b 91 cf ae 87 bc 25 5a f8 9a 6a 19 +9b ca 4a 39 1e ad bc 3a 24 90 3c 0b d6 67 36 8f +6b e7 8e 3f ea bf b4 ff d4 63 12 27 63 74 0f fb +be fe ab 9a 25 56 4b c5 d1 c2 4c 93 e4 22 f7 50 +73 e2 ad 72 bf 45 b1 0d f0 0b 52 a1 47 12 8e 73 +fe e3 3f a3 f0 57 7d 77 f8 0f bc 2d f1 be d3 13 +29 0c 12 77 7f 50 + +# Salt: +a3 34 db 6f ae bf 11 08 1a 04 f8 7c 2d 62 1c de +c7 93 0b 9b + +# Signature: +00 93 8d cb 6d 58 30 46 06 5f 69 c7 8d a7 a1 f1 +75 70 66 a7 fa 75 12 5a 9d 29 29 f0 b7 9a 60 b6 +27 b0 82 f1 1f 5b 19 6f 28 eb 9d aa 6f 21 c0 5e +51 40 f6 ae f1 73 7d 20 23 07 5c 05 ec f0 4a 02 +8c 68 6a 2a b3 e7 d5 a0 66 4f 29 5c e1 29 95 e8 +90 90 8b 6a d2 1f 08 39 eb 65 b7 03 93 a7 b5 af +d9 87 1d e0 ca a0 ce de c5 b8 19 62 67 56 20 9d +13 ab 1e 7b b9 54 6a 26 ff 37 e9 a5 1a f9 fd 56 +2e + +# ============================================= + +# ================================== +# Example 5: A 1028-bit RSA Key Pair +# ================================== + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +0d 10 f6 61 f2 99 40 f5 ed 39 aa 26 09 66 de b4 +78 43 67 9d 2b 6f b2 5b 3d e3 70 f3 ac 7c 19 91 +63 91 fd 25 fb 52 7e bf a6 a4 b4 df 45 a1 75 9d +99 6c 4b b4 eb d1 88 28 c4 4f c5 2d 01 91 87 17 +40 52 5f 47 a4 b0 cc 8d a3 25 ed 8a a6 76 b0 d0 +f6 26 e0 a7 7f 07 69 21 70 ac ac 80 82 f4 2f aa +7d c7 cd 12 3e 73 0e 31 a8 79 85 20 4c ab cb e6 +67 0d 43 a2 dd 2b 2d de f5 e0 53 92 fc 21 3b c5 +07 + +# RSA public exponent e: +01 00 01 + +# RSA private exponent d: +03 ce 08 b1 04 ff f3 96 a9 79 bd 3e 4e 46 92 5b +63 19 dd b6 3a cb cf d8 19 f1 7d 16 b8 07 7b 3a +87 10 1f f3 4b 77 fe 48 b8 b2 05 a9 6e 91 51 ba +8e ce a6 4d 0c ce 7b 23 c3 e6 a6 b8 30 58 bc 49 +da e8 16 ae 73 6d b5 a4 70 8e 2a d4 35 23 2b 56 +7f 90 96 ce 59 ff 28 06 1e 79 ab 1c 02 d7 17 e6 +b2 3c ea 6d b8 eb 51 92 fa 7c 1e ab 22 7d ba 74 +62 1c 45 60 18 96 ee f1 37 92 c8 44 0b eb 15 aa +c1 + +# Prime p: +03 f2 f3 31 f4 14 2d 4f 24 b4 3a a1 02 79 a8 96 +52 d4 e7 53 72 21 a1 a7 b2 a2 5d eb 55 1e 5d e9 +ac 49 74 11 c2 27 a9 4e 45 f9 1c 2d 1c 13 cc 04 +6c f4 ce 14 e3 2d 05 87 34 21 0d 44 a8 7e e1 b7 +3f + +# Prime q: +03 4f 09 0d 73 b5 58 03 03 0c f0 36 1a 5d 80 81 +bf b7 9f 85 15 23 fe ac 0a 21 24 d0 8d 40 13 ff +08 48 77 71 a8 70 d0 47 9d c0 68 6c 62 f7 71 8d +fe cf 02 4b 17 c9 26 76 78 05 91 71 33 9c c0 08 +39 + +# p's CRT exponent dP: +02 aa 66 3a db f5 1a b8 87 a0 18 cb 42 6e 78 bc +2f e1 82 dc b2 f7 bc b5 04 41 d1 7f df 0f 06 79 +8b 50 71 c6 e2 f5 fe b4 d5 4a d8 18 23 11 c1 ef +62 d4 c4 9f 18 d1 f5 1f 54 b2 d2 cf fb a4 da 1b +e5 + +# q's CRT exponent dQ: +02 bb e7 06 07 8b 5c 0b 39 15 12 d4 11 db 1b 19 +9b 5a 56 64 b8 40 42 ea d3 7f e9 94 ae 72 b9 53 +2d fb fb 3e 9e 69 81 a0 fb b8 06 51 31 41 b7 c2 +16 3f e5 6c 39 5e 4b fa ee 57 e3 83 3f 9b 91 8d +f9 + +# CRT coefficient qInv: +02 42 b6 cd 00 d3 0a 76 7a ee 9a 89 8e ad 45 3c +8e ae a6 3d 50 0b 7d 1e 00 71 3e da e5 1c e3 6b +23 b6 64 df 26 e6 3e 26 6e c8 f7 6e 6e 63 ed 1b +a4 1e b0 33 b1 20 f7 ea 52 12 ae 21 a9 8f bc 16 + +# -------------------------------- +# RSASSA-PSS Signature Example 5.1 +# -------------------------------- + +# Message to be signed: +30 c7 d5 57 45 8b 43 6d ec fd c1 4d 06 cb 7b 96 +b0 67 18 c4 8d 7d e5 74 82 a8 68 ae 7f 06 58 70 +a6 21 65 06 d1 1b 77 93 23 df df 04 6c f5 77 51 +29 13 4b 4d 56 89 e4 d9 c0 ce 1e 12 d7 d4 b0 6c +b5 fc 58 20 de cf a4 1b af 59 bf 25 7b 32 f0 25 +b7 67 9b 44 5b 94 99 c9 25 55 14 58 85 99 2f 1b +76 f8 48 91 ee 4d 3b e0 f5 15 0f d5 90 1e 3a 4c +8e d4 3f d3 6b 61 d0 22 e6 5a d5 00 8d bf 33 29 +3c 22 bf bf d0 73 21 f0 f1 d5 fa 9f df 00 14 c2 +fc b0 35 8a ad 0e 35 4b 0d 29 + +# Salt: +08 1b 23 3b 43 56 77 50 bd 6e 78 f3 96 a8 8b 9f +6a 44 51 51 + +# Signature: +0b a3 73 f7 6e 09 21 b7 0a 8f bf e6 22 f0 bf 77 +b2 8a 3d b9 8e 36 10 51 c3 d7 cb 92 ad 04 52 91 +5a 4d e9 c0 17 22 f6 82 3e eb 6a df 7e 0c a8 29 +0f 5d e3 e5 49 89 0a c2 a3 c5 95 0a b2 17 ba 58 +59 08 94 95 2d e9 6f 8d f1 11 b2 57 52 15 da 6c +16 15 90 c7 45 be 61 24 76 ee 57 8e d3 84 ab 33 +e3 ec e9 74 81 a2 52 f5 c7 9a 98 b5 53 2a e0 0c +dd 62 f2 ec c0 cd 1b ae fe 80 d8 0b 96 21 93 ec +1d + +# -------------------------------- +# RSASSA-PSS Signature Example 5.2 +# -------------------------------- + +# Message to be signed: +e7 b3 2e 15 56 ea 1b 27 95 04 6a c6 97 39 d2 2a +c8 96 6b f1 1c 11 6f 61 4b 16 67 40 e9 6b 90 65 +3e 57 50 94 5f cf 77 21 86 c0 37 90 a0 7f da 32 +3e 1a 61 91 6b 06 ee 21 57 db 3d ff 80 d6 7d 5e +39 a5 3a e2 68 c8 f0 9e d9 9a 73 20 05 b0 bc 6a +04 af 4e 08 d5 7a 00 e7 20 1b 30 60 ef aa db 73 +11 3b fc 08 7f d8 37 09 3a a2 52 35 b8 c1 49 f5 +62 15 f0 31 c2 4a d5 bd e7 f2 99 60 df 7d 52 40 +70 f7 44 9c 6f 78 50 84 be 1a 0f 73 30 47 f3 36 +f9 15 47 38 67 45 47 db 02 a9 f4 4d fc 6e 60 30 +10 81 e1 ce 99 84 7f 3b 5b 60 1f f0 6b 4d 57 76 +a9 74 0b 9a a0 d3 40 58 fd 3b 90 6e 4f 78 59 df +b0 7d 71 73 e5 e6 f6 35 0a da c2 1f 27 b2 30 74 +69 + +# Salt: +bd 0c e1 95 49 d0 70 01 20 cb e5 10 77 db bb b0 +0a 8d 8b 09 + +# Signature: +08 18 0d e8 25 e4 b8 b0 14 a3 2d a8 ba 76 15 55 +92 12 04 f2 f9 0d 5f 24 b7 12 90 8f f8 4f 3e 22 +0a d1 79 97 c0 dd 6e 70 66 30 ba 3e 84 ad d4 d5 +e7 ab 00 4e 58 07 4b 54 97 09 56 5d 43 ad 9e 97 +b5 a7 a1 a2 9e 85 b9 f9 0f 4a af cd f5 83 21 de +8c 59 74 ef 9a bf 2d 52 6f 33 c0 f2 f8 2e 95 d1 +58 ea 6b 81 f1 73 6d b8 d1 af 3d 6a c6 a8 3b 32 +d1 8b ae 0f f1 b2 fe 27 de 4c 76 ed 8c 79 80 a3 +4e + +# -------------------------------- +# RSASSA-PSS Signature Example 5.3 +# -------------------------------- + +# Message to be signed: +8d 83 96 e3 65 07 fe 1e f6 a1 90 17 54 8e 0c 71 +66 74 c2 fe c2 33 ad b2 f7 75 66 5e c4 1f 2b d0 +ba 39 6b 06 1a 9d aa 7e 86 6f 7c 23 fd 35 31 95 +43 00 a3 42 f9 24 53 5e a1 49 8c 48 f6 c8 79 93 +28 65 fc 02 00 0c 52 87 23 b7 ad 03 35 74 5b 51 +20 9a 0a fe d9 32 af 8f 08 87 c2 19 00 4d 2a bd +89 4e a9 25 59 ee 31 98 af 3a 73 4f e9 b9 63 8c +26 3a 72 8a d9 5a 5a e8 ce 3e b1 58 39 f3 aa 78 +52 bb 39 07 06 e7 76 0e 43 a7 12 91 a2 e3 f8 27 +23 7d ed a8 51 87 4c 51 76 65 f5 45 f2 72 38 df +86 55 7f 37 5d 09 cc d8 bd 15 d8 cc f6 1f 5d 78 +ca 5c 7f 5c de 78 2e 6b f5 d0 05 70 56 d4 ba d9 +8b 3d 2f 95 75 e8 24 ab 7a 33 ff 57 b0 ac 10 0a +b0 d6 ea d7 aa 0b 50 f6 e4 d3 e5 ec 0b 96 6b + +# Salt: +81 57 79 a9 1b 3a 8b d0 49 bf 2a eb 92 01 42 77 +22 22 c9 ca + +# Signature: +05 e0 fd bd f6 f7 56 ef 73 31 85 cc fa 8c ed 2e +b6 d0 29 d9 d5 6e 35 56 1b 5d b8 e7 02 57 ee 6f +d0 19 d2 f0 bb f6 69 fe 9b 98 21 e7 8d f6 d4 1e +31 60 8d 58 28 0f 31 8e e3 4f 55 99 41 c8 df 13 +28 75 74 ba c0 00 b7 e5 8d c4 f4 14 ba 49 fb 12 +7f 9d 0f 89 36 63 8c 76 e8 53 56 c9 94 f7 97 50 +f7 fa 3c f4 fd 48 2d f7 5e 3f b9 97 8c d0 61 f7 +ab b1 75 72 e6 e6 3e 0b de 12 cb dc f1 8c 68 b9 +79 + +# -------------------------------- +# RSASSA-PSS Signature Example 5.4 +# -------------------------------- + +# Message to be signed: +32 8c 65 9e 0a 64 37 43 3c ce b7 3c 14 + +# Salt: +9a ec 4a 74 80 d5 bb c4 29 20 d7 ca 23 5d b6 74 +98 9c 9a ac + +# Signature: +0b c9 89 85 3b c2 ea 86 87 32 71 ce 18 3a 92 3a +b6 5e 8a 53 10 0e 6d f5 d8 7a 24 c4 19 4e b7 97 +81 3e e2 a1 87 c0 97 dd 87 2d 59 1d a6 0c 56 86 +05 dd 7e 74 2d 5a f4 e3 3b 11 67 8c cb 63 90 32 +04 a3 d0 80 b0 90 2c 89 ab a8 86 8f 00 9c 0f 1c +0c b8 58 10 bb dd 29 12 1a bb 84 71 ff 2d 39 e4 +9f d9 2d 56 c6 55 c8 e0 37 ad 18 fa fb dc 92 c9 +58 63 f7 f6 1e a9 ef a2 8f ea 40 13 69 d1 9d ae +a1 + +# -------------------------------- +# RSASSA-PSS Signature Example 5.5 +# -------------------------------- + +# Message to be signed: +f3 7b 96 23 79 a4 7d 41 5a 37 6e ec 89 73 15 0b +cb 34 ed d5 ab 65 40 41 b6 14 30 56 0c 21 44 58 +2b a1 33 c8 67 d8 52 d6 b8 e2 33 21 90 13 02 ec +b4 5b 09 ec 88 b1 52 71 78 fa 04 32 63 f3 06 7d +9f fe 97 30 32 a9 9f 4c b0 8a d2 c7 e0 a2 45 6c +dd 57 a7 df 56 fe 60 53 52 7a 5a eb 67 d7 e5 52 +06 3c 1c a9 7b 1b ef fa 7b 39 e9 97 ca f2 78 78 +ea 0f 62 cb eb c8 c2 1d f4 c8 89 a2 02 85 1e 94 +90 88 49 0c 24 9b 6e 9a cf 1d 80 63 f5 be 23 43 +98 9b f9 5c 4d a0 1a 2b e7 8b 4a b6 b3 78 01 5b +c3 79 57 f7 69 48 b5 e5 8e 44 0c 28 45 3d 40 d7 +cf d5 7e 7d 69 06 00 47 4a b5 e7 59 73 b1 ea 0c +5f 1e 45 d1 41 90 af e2 f4 eb 6d 3b df 71 f1 d2 +f8 bb 15 6a 1c 29 5d 04 aa eb 9d 68 9d ce 79 ed +62 bc 44 3e + +# Salt: +e2 0c 1e 98 78 51 2c 39 97 0f 58 37 5e 15 49 a6 +8b 64 f3 1d + +# Signature: +0a ef a9 43 b6 98 b9 60 9e df 89 8a d2 27 44 ac +28 dc 23 94 97 ce a3 69 cb bd 84 f6 5c 95 c0 ad +77 6b 59 47 40 16 4b 59 a7 39 c6 ff 7c 2f 07 c7 +c0 77 a8 6d 95 23 8f e5 1e 1f cf 33 57 4a 4a e0 +68 4b 42 a3 f6 bf 67 7d 91 82 0c a8 98 74 46 7b +2c 23 ad d7 79 69 c8 07 17 43 0d 0e fc 1d 36 95 +89 2c e8 55 cb 7f 70 11 63 0f 4d f2 6d ef 8d df +36 fc 23 90 5f 57 fa 62 43 a4 85 c7 70 d5 68 1f +cd + +# -------------------------------- +# RSASSA-PSS Signature Example 5.6 +# -------------------------------- + +# Message to be signed: +c6 10 3c 33 0c 1e f7 18 c1 41 e4 7b 8f a8 59 be +4d 5b 96 25 9e 7d 14 20 70 ec d4 85 83 9d ba 5a +83 69 c1 7c 11 14 03 5e 53 2d 19 5c 74 f4 4a 04 +76 a2 d3 e8 a4 da 21 00 16 ca ce d0 e3 67 cb 86 +77 10 a4 b5 aa 2d f2 b8 e5 da f5 fd c6 47 80 7d +4d 5e bb 6c 56 b9 76 3c cd ae 4d ea 33 08 eb 0a +c2 a8 95 01 cb 20 9d 26 39 fa 5b f8 7c e7 90 74 +7d 3c b2 d2 95 e8 45 64 f2 f6 37 82 4f 0c 13 02 +81 29 b0 aa 4a 42 2d 16 22 82 + +# Salt: +23 29 1e 4a 33 07 e8 bb b7 76 62 3a b3 4e 4a 5f +4c c8 a8 db + +# Signature: +02 80 2d cc fa 8d fa f5 27 9b f0 b4 a2 9b a1 b1 +57 61 1f ae aa f4 19 b8 91 9d 15 94 19 00 c1 33 +9e 7e 92 e6 fa e5 62 c5 3e 6c c8 e8 41 04 b1 10 +bc e0 3a d1 85 25 e3 c4 9a 0e ad ad 5d 3f 28 f2 +44 a8 ed 89 ed ba fb b6 86 27 7c fa 8a e9 09 71 +4d 6b 28 f4 bf 8e 29 3a a0 4c 41 ef e7 c0 a8 12 +66 d5 c0 61 e2 57 5b e0 32 aa 46 46 74 ff 71 62 +62 19 bd 74 cc 45 f0 e7 ed 4e 3f f9 6e ee 75 8e +8f + +# ============================================= + +# ================================== +# Example 6: A 1029-bit RSA Key Pair +# ================================== + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +16 4c a3 1c ff 60 9f 3a 0e 71 01 b0 39 f2 e4 fe +6d d3 75 19 ab 98 59 8d 17 9e 17 49 96 59 80 71 +f4 7d 3a 04 55 91 58 d7 be 37 3c f1 aa 53 f0 aa +6e f0 90 39 e5 67 8c 2a 4c 63 90 05 14 c8 c4 f8 +aa ed 5d e1 2a 5f 10 b0 9c 31 1a f8 c0 ff b5 b7 +a2 97 f2 ef c6 3b 8d 6b 05 10 93 1f 0b 98 e4 8b +f5 fc 6e c4 e7 b8 db 1f fa eb 08 c3 8e 02 ad b8 +f0 3a 48 22 9c 99 e9 69 43 1f 61 cb 8c 4d c6 98 +d1 + +# RSA public exponent e: +01 00 01 + +# RSA private exponent d: +03 b6 64 ee 3b 75 66 72 3f c6 ea f2 8a bb 43 0a +39 80 f1 12 6c 81 de 8a d7 09 ea b3 9a c9 dc d0 +b1 55 0b 37 29 d8 70 68 e9 52 00 9d f5 44 53 4c +1f 50 82 9a 78 f4 59 1e b8 fd 57 14 04 26 a6 bb +04 05 b6 a6 f5 1a 57 d9 26 7b 7b bc 65 33 91 a6 +99 a2 a9 0d ac 8a e2 26 bc c6 0f a8 cd 93 4c 73 +c7 b0 3b 1f 6b 81 81 58 63 18 38 a8 61 2e 6e 6e +a9 2b e2 4f 83 24 fa f5 b1 fd 85 87 22 52 67 ba +6f + +# Prime p: +04 f0 54 8c 96 26 ab 1e bf 12 44 93 47 41 d9 9a +06 22 0e fa 2a 58 56 aa 0e 75 73 0b 2e c9 6a dc +86 be 89 4f a2 80 3b 53 a5 e8 5d 27 6a cb d2 9a +b8 23 f8 0a 73 91 bb 54 a5 05 16 72 fb 04 ee b5 +43 + +# Prime q: +04 83 e0 ae 47 91 55 87 74 3f f3 45 36 2b 55 5d +39 62 d9 8b b6 f1 5f 84 8b 4c 92 b1 77 1c a8 ed +10 7d 8d 3e e6 5e c4 45 17 dd 0f aa 48 1a 38 7e +90 2f 7a 2e 74 7c 26 9e 7e a4 44 80 bc 53 8b 8e +5b + +# p's CRT exponent dP: +03 a8 e8 ae a9 92 0c 1a a3 b2 f0 d8 46 e4 b8 50 +d8 1c a3 06 a5 1c 83 54 4f 94 9f 64 f9 0d cf 3f +8e 26 61 f0 7e 56 12 20 a1 80 38 8f be 27 3e 70 +e2 e5 dc a8 3a 0e 13 48 dd 64 90 c7 31 d6 ec e1 +ab + +# q's CRT exponent dQ: +01 35 bd cd b6 0b f2 19 7c 43 6e d3 4b 32 cd 8b +4f c7 77 78 83 2b a7 67 03 55 1f b2 42 b3 01 69 +95 93 af 77 fd 8f c3 94 a8 52 6a d2 3c c4 1a 03 +80 6b d8 97 fe 4b 0e a6 46 55 8a ad dc c9 9e 8a +25 + +# CRT coefficient qInv: +03 04 c0 3d 9c 73 65 03 a9 84 ab bd 9b a2 23 01 +40 7c 4a 2a b1 dd 85 76 64 81 b6 0d 45 40 11 52 +e6 92 be 14 f4 12 1d 9a a3 fd 6e 0b 4d 1d 3a 97 +35 38 a3 1d 42 ee 6e 1e 5e f6 20 23 1a 2b ba f3 +5f + +# -------------------------------- +# RSASSA-PSS Signature Example 6.1 +# -------------------------------- + +# Message to be signed: +0a 20 b7 74 ad dc 2f a5 12 45 ed 7c b9 da 60 9e +50 ca c6 63 6a 52 54 3f 97 45 8e ed 73 40 f8 d5 +3f fc 64 91 8f 94 90 78 ee 03 ef 60 d4 2b 5f ec +24 60 50 bd 55 05 cd 8c b5 97 ba d3 c4 e7 13 b0 +ef 30 64 4e 76 ad ab b0 de 01 a1 56 1e fb 25 51 +58 c7 4f c8 01 e6 e9 19 e5 81 b4 6f 0f 0d dd 08 +e4 f3 4c 78 10 b5 ed 83 18 f9 1d 7c 8c + +# Salt: +5b 4e a2 ef 62 9c c2 2f 3b 53 8e 01 69 04 b4 7b +1e 40 bf d5 + +# Signature: +04 c0 cf ac ec 04 e5 ba db ec e1 59 a5 a1 10 3f +69 b3 f3 2b a5 93 cb 4c c4 b1 b7 ab 45 59 16 a9 +6a 27 cd 26 78 ea 0f 46 ba 37 f7 fc 9c 86 32 5f +29 73 3b 38 9f 1d 97 f4 3e 72 01 c0 f3 48 fc 45 +fe 42 89 23 35 36 2e ee 01 8b 5b 16 1f 2f 93 93 +03 12 25 c7 13 01 2a 57 6b c8 8e 23 05 24 89 86 +8d 90 10 cb f0 33 ec c5 68 e8 bc 15 2b dc 59 d5 +60 e4 12 91 91 5d 28 56 52 08 e2 2a ee c9 ef 85 +d1 + +# -------------------------------- +# RSASSA-PSS Signature Example 6.2 +# -------------------------------- + +# Message to be signed: +2a af f6 63 1f 62 1c e6 15 76 0a 9e bc e9 4b b3 +33 07 7a d8 64 88 c8 61 d4 b7 6d 29 c1 f4 87 46 +c6 11 ae 1e 03 ce d4 44 5d 7c fa 1f e5 f6 2e 1b +3f 08 45 2b de 3b 6e f8 19 73 ba fb b5 7f 97 bc +ee f8 73 98 53 95 b8 26 05 89 aa 88 cb 7d b5 0a +b4 69 26 2e 55 1b dc d9 a5 6f 27 5a 0a c4 fe 48 +47 00 c3 5f 3d bf 2b 46 9e de 86 47 41 b8 6f a5 +91 72 a3 60 ba 95 a0 2e 13 9b e5 0d df b7 cf 0b +42 fa ea bb fb ba a8 6a 44 97 69 9c 4f 2d fd 5b +08 40 6a f7 e1 41 44 42 7c 25 3e c0 ef a2 0e af +9a 8b e8 cd 49 ce 1f 1b c4 e9 3e 61 9c f2 aa 8e +d4 fb 39 bc 85 90 d0 f7 b9 64 88 f7 31 7a c9 ab +f7 be e4 e3 a0 e7 15 + +# Salt: +83 14 6a 9e 78 27 22 c2 8b 01 4f 98 b4 26 7b da +2a c9 50 4f + +# Signature: +0a 23 14 25 0c f5 2b 6e 4e 90 8d e5 b3 56 46 bc +aa 24 36 1d a8 16 0f b0 f9 25 75 90 ab 3a ce 42 +b0 dc 3e 77 ad 2d b7 c2 03 a2 0b d9 52 fb b5 6b +15 67 04 6e cf aa 93 3d 7b 10 00 c3 de 9f f0 5b +7d 98 9b a4 6f d4 3b c4 c2 d0 a3 98 6b 7f fa 13 +47 1d 37 eb 5b 47 d6 47 07 bd 29 0c fd 6a 9f 39 +3a d0 8e c1 e3 bd 71 bb 57 92 61 50 35 cd af 2d +89 29 ae d3 be 09 83 79 37 7e 77 7c e7 9a aa 47 +73 + +# -------------------------------- +# RSASSA-PSS Signature Example 6.3 +# -------------------------------- + +# Message to be signed: +0f 61 95 d0 4a 6e 6f c7 e2 c9 60 0d bf 84 0c 39 +ea 8d 4d 62 4f d5 35 07 01 6b 0e 26 85 8a 5e 0a +ec d7 ad a5 43 ae 5c 0a b3 a6 25 99 cb a0 a5 4e +6b f4 46 e2 62 f9 89 97 8f 9d df 5e 9a 41 + +# Salt: +a8 7b 8a ed 07 d7 b8 e2 da f1 4d dc a4 ac 68 c4 +d0 aa bf f8 + +# Signature: +08 6d f6 b5 00 09 8c 12 0f 24 ff 84 23 f7 27 d9 +c6 1a 5c 90 07 d3 b6 a3 1c e7 cf 8f 3c be c1 a2 +6b b2 0e 2b d4 a0 46 79 32 99 e0 3e 37 a2 1b 40 +19 4f b0 45 f9 0b 18 bf 20 a4 79 92 cc d7 99 cf +9c 05 9c 29 9c 05 26 85 49 54 aa de 8a 6a d9 d9 +7e c9 1a 11 45 38 3f 42 46 8b 23 1f 4d 72 f2 37 +06 d9 85 3c 3f a4 3c e8 ac e8 bf e7 48 49 87 a1 +ec 6a 16 c8 da f8 1f 7c 8b f4 27 74 70 7a 9d f4 +56 + +# -------------------------------- +# RSASSA-PSS Signature Example 6.4 +# -------------------------------- + +# Message to be signed: +33 7d 25 fe 98 10 eb ca 0d e4 d4 65 8d 3c eb 8e +0f e4 c0 66 ab a3 bc c4 8b 10 5d 3b f7 e0 25 7d +44 fe ce a6 59 6f 4d 0c 59 a0 84 02 83 36 78 f7 +06 20 f9 13 8d fe b7 de d9 05 e4 a6 d5 f0 5c 47 +3d 55 93 66 52 e2 a5 df 43 c0 cf da 7b ac af 30 +87 f4 52 4b 06 cf 42 15 7d 01 53 97 39 f7 fd de +c9 d5 81 25 df 31 a3 2e ab 06 c1 9b 71 f1 d5 bf + +# Salt: +a3 79 32 f8 a7 49 4a 94 2d 6f 76 74 38 e7 24 d6 +d0 c0 ef 18 + +# Signature: +0b 5b 11 ad 54 98 63 ff a9 c5 1a 14 a1 10 6c 2a +72 cc 8b 64 6e 5c 72 62 50 97 86 10 5a 98 47 76 +53 4c a9 b5 4c 1c c6 4b f2 d5 a4 4f d7 e8 a6 9d +b6 99 d5 ea 52 08 7a 47 48 fd 2a bc 1a fe d1 e5 +d6 f7 c8 90 25 53 0b da a2 21 3d 7e 03 0f a5 5d +f6 f3 4b cf 1c e4 6d 2e df 4e 3a e4 f3 b0 18 91 +a0 68 c9 e3 a4 4b bc 43 13 3e da d6 ec b9 f3 54 +00 c4 25 2a 57 62 d6 57 44 b9 9c b9 f4 c5 59 32 +9f + +# -------------------------------- +# RSASSA-PSS Signature Example 6.5 +# -------------------------------- + +# Message to be signed: +84 ec 50 2b 07 2e 82 87 78 9d 8f 92 35 82 9e a3 +b1 87 af d4 d4 c7 85 61 1b da 5f 9e b3 cb 96 71 +7e fa 70 07 22 7f 1c 08 cb cb 97 2e 66 72 35 e0 +fb 7d 43 1a 65 70 32 6d 2e cc e3 5a db 37 3d c7 +53 b3 be 5f 82 9b 89 17 54 93 19 3f ab 16 ba db +41 37 1b 3a ac 0a e6 70 07 6f 24 be f4 20 c1 35 +ad d7 ce e8 d3 5f bc 94 4d 79 fa fb 9e 30 7a 13 +b0 f5 56 cb 65 4a 06 f9 73 ed 22 67 23 30 19 7e +f5 a7 48 bf 82 6a 5d b2 38 3a 25 36 4b 68 6b 93 +72 bb 23 39 ae b1 ac 9e 98 89 32 7d 01 6f 16 70 +77 6d b0 62 01 ad bd ca f8 a5 e3 b7 4e 10 8b 73 + +# Salt: +7b 79 0c 1d 62 f7 b8 4e 94 df 6a f2 89 17 cf 57 +10 18 11 0e + +# Signature: +02 d7 1f a9 b5 3e 46 54 fe fb 7f 08 38 5c f6 b0 +ae 3a 81 79 42 eb f6 6c 35 ac 67 f0 b0 69 95 2a +3c e9 c7 e1 f1 b0 2e 48 0a 95 00 83 6d e5 d6 4c +db 7e cd e0 45 42 f7 a7 99 88 78 7e 24 c2 ba 05 +f5 fd 48 2c 02 3e d5 c3 0e 04 83 9d c4 4b ed 2a +3a 3a 4f ee 01 11 3c 89 1a 47 d3 2e b8 02 5c 28 +cb 05 0b 5c db 57 6c 70 fe 76 ef 52 34 05 c0 84 +17 fa f3 50 b0 37 a4 3c 37 93 39 fc b1 8d 3a 35 +6b + +# -------------------------------- +# RSASSA-PSS Signature Example 6.6 +# -------------------------------- + +# Message to be signed: +99 06 d8 9f 97 a9 fd ed d3 cc d8 24 db 68 73 26 +f3 0f 00 aa 25 a7 fc a2 af cb 3b 0f 86 cd 41 e7 +3f 0e 8f f7 d2 d8 3f 59 e2 8e d3 1a 5a 0d 55 15 +23 37 4d e2 2e 4c 7e 8f f5 68 b3 86 ee 3d c4 11 +63 f1 0b f6 7b b0 06 26 1c 90 82 f9 af 90 bf 1d +90 49 a6 b9 fa e7 1c 7f 84 fb e6 e5 5f 02 78 9d +e7 74 f2 30 f1 15 02 6a 4b 4e 96 c5 5b 04 a9 5d +a3 aa cb b2 ce ce 8f 81 76 4a 1f 1c 99 51 54 11 +08 7c f7 d3 4a ed ed 09 32 c1 83 + +# Salt: +fb be 05 90 25 b6 9b 89 fb 14 ae 22 89 e7 aa af +e6 0c 0f cd + +# Signature: +0a 40 a1 6e 2f e2 b3 8d 1d f9 05 46 16 7c f9 46 +9c 9e 3c 36 81 a3 44 2b 4b 2c 2f 58 1d eb 38 5c +e9 9f c6 18 8b b0 2a 84 1d 56 e7 6d 30 18 91 e2 +45 60 55 0f cc 2a 26 b5 5f 4c cb 26 d8 37 d3 50 +a1 54 bc ac a8 39 2d 98 fa 67 95 9e 97 27 b7 8c +ad 03 26 9f 56 96 8f c5 6b 68 bd 67 99 26 d8 3c +c9 cb 21 55 50 64 5c cd a3 1c 76 0f f3 58 88 94 +3d 2d 8a 1d 35 1e 81 e5 d0 7b 86 18 2e 75 10 81 +ef + +# ============================================= + +# ================================== +# Example 7: A 1030-bit RSA Key Pair +# ================================== + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +37 c9 da 4a 66 c8 c4 08 b8 da 27 d0 c9 d7 9f 8c +cb 1e af c1 d2 fe 48 74 6d 94 0b 7c 4e f5 de e1 +8a d1 26 47 ce fa a0 c4 b3 18 8b 22 1c 51 53 86 +75 9b 93 f0 20 24 b2 5a b9 24 2f 83 57 d8 f3 fd +49 64 0e e5 e6 43 ea f6 c6 4d ee fa 70 89 72 7c +8f f0 39 93 33 39 15 c6 ef 21 bf 59 75 b6 e5 0d +11 8b 51 00 8e c3 3e 9f 01 a0 a5 45 a1 0a 83 6a +43 dd bc a9 d8 b5 c5 d3 54 80 22 d7 06 4e a2 9a +b3 + +# RSA public exponent e: +01 00 01 + +# RSA private exponent d: +3b ed 99 90 52 d9 57 bc 06 d6 51 ee f6 e3 a9 80 +94 b1 62 1b d3 8b 54 49 bd 6c 4a ea 3d e7 e0 84 +67 9a 44 84 de d2 5b e0 f0 82 6c f3 37 78 25 41 +4b 14 d4 d6 1d b1 4d e6 26 fb b8 0e 5f 4f ae c9 +56 f9 a0 a2 d2 4f 99 57 63 80 f0 84 eb 62 e4 6a +57 d5 54 27 8b 53 56 26 19 3c e0 20 60 57 5e b6 +6c 57 98 d3 6f 6c 5d 40 fb 00 d8 09 b4 2a 73 10 +2c 1c 74 ee 95 bd 71 42 0f ff ef 63 18 b5 2c 29 + +# Prime p: +07 ee fb 42 4b 0e 3a 40 e4 20 8e e5 af b2 80 b2 +23 17 30 81 14 dd e0 b4 b6 4f 73 01 84 ec 68 da +6c e2 86 7a 9f 48 ed 77 26 d5 e2 61 4e d0 4a 54 +10 73 6c 8c 71 4e e7 02 47 42 98 c6 29 2a f0 75 +35 + +# Prime q: +07 08 30 db f9 47 ea c0 22 8d e2 63 14 b5 9b 66 +99 4c c6 0e 83 60 e7 5d 38 76 29 8f 8f 8a 7d 14 +1d a0 64 e5 ca 02 6a 97 3e 28 f2 54 73 8c ee 66 +9c 72 1b 03 4c b5 f8 e2 44 da dd 7c d1 e1 59 d5 +47 + +# p's CRT exponent dP: +05 24 d2 0c 3d 95 cf f7 5a f2 31 34 83 22 7d 87 +02 71 7a a5 76 de 15 5f 96 05 15 50 1a db 1d 70 +e1 c0 4d e9 1b 75 b1 61 db f0 39 83 56 12 7e de +da 7b bc 19 a3 2d c1 62 1c c9 f5 3c 26 5d 0c e3 +31 + +# q's CRT exponent dQ: +05 f9 84 a1 f2 3c 93 8d 6a 0e 89 72 4b cf 3d d9 +3f 99 46 92 60 37 fe 7c 6b 13 a2 9e 52 84 85 5f +89 08 95 91 d4 40 97 56 27 bf 5c 9e 3a 8b 5c a7 +9c 77 2a d2 73 e4 0d 32 1a f4 a6 c9 7d fd ed 78 +d3 + +# CRT coefficient qInv: +dd d9 18 ad ad a2 9d ca b9 81 ff 9a cb a4 25 70 +23 c0 9a 38 01 cc ce 09 8c e2 68 f8 55 d0 df 57 +0c d6 e7 b9 b1 4b d9 a5 a9 25 4c bc 31 5b e6 f8 +ba 1e 25 46 dd d5 69 c5 ea 19 ee d8 35 3b de 5e + +# -------------------------------- +# RSASSA-PSS Signature Example 7.1 +# -------------------------------- + +# Message to be signed: +9e ad 0e 01 94 56 40 67 4e b4 1c ad 43 5e 23 74 +ea ef a8 ad 71 97 d9 79 13 c4 49 57 d8 d8 3f 40 +d7 6e e6 0e 39 bf 9c 0f 9e af 30 21 42 1a 07 4d +1a de 96 2c 6e 9d 3d c3 bb 17 4f e4 df e6 52 b0 +91 15 49 5b 8f d2 79 41 74 02 0a 06 02 b5 ca 51 +84 8c fc 96 ce 5e b5 7f c0 a2 ad c1 dd a3 6a 7c +c4 52 64 1a 14 91 1b 37 e4 5b fa 11 da a5 c7 ec +db 74 f6 d0 10 0d 1d 3e 39 e7 52 80 0e 20 33 97 +de 02 33 07 7b 9a 88 85 55 37 fa e9 27 f9 24 38 +0d 78 0f 98 e1 8d cf f3 9c 5e a7 41 b1 7d 6f dd +18 85 bc 9d 58 14 82 d7 71 ce b5 62 d7 8a 8b f8 +8f 0c 75 b1 13 63 e5 e3 6c d4 79 ce b0 54 5f 9d +a8 42 03 e0 e6 e5 08 37 5c c9 e8 44 b8 8b 7a c7 +a0 a2 01 ea 0f 1b ee 9a 2c 57 79 20 ca 02 c0 1b +9d 83 20 e9 74 a5 6f 4e fb 57 63 b9 62 55 ab bf +80 37 bf 18 02 cf 01 8f 56 37 94 93 e5 69 a9 + +# Salt: +b7 86 7a 59 95 8c b5 43 28 f8 77 5e 65 46 ec 06 +d2 7e aa 50 + +# Signature: +18 7f 39 07 23 c8 90 25 91 f0 15 4b ae 6d 4e cb +ff e0 67 f0 e8 b7 95 47 6e a4 f4 d5 1c cc 81 05 +20 bb 3c a9 bc a7 d0 b1 f2 ea 8a 17 d8 73 fa 27 +57 0a cd 64 2e 38 08 56 1c b9 e9 75 cc fd 80 b2 +3d c5 77 1c db 33 06 a5 f2 31 59 da cb d3 aa 2d +b9 3d 46 d7 66 e0 9e d1 5d 90 0a d8 97 a8 d2 74 +dc 26 b4 7e 99 4a 27 e9 7e 22 68 a7 66 53 3a e4 +b5 e4 2a 2f ca f7 55 c1 c4 79 4b 29 4c 60 55 58 +23 + +# -------------------------------- +# RSASSA-PSS Signature Example 7.2 +# -------------------------------- + +# Message to be signed: +8d 80 d2 d0 8d bd 19 c1 54 df 3f 14 67 3a 14 bd +03 73 52 31 f2 4e 86 bf 15 3d 0e 69 e7 4c bf f7 +b1 83 6e 66 4d e8 3f 68 01 24 37 0f c0 f9 6c 9b +65 c0 7a 36 6b 64 4c 4a b3 + +# Salt: +0c 09 58 22 66 df 08 63 10 82 1b a7 e1 8d f6 4d +fe e6 de 09 + +# Signature: +10 fd 89 76 8a 60 a6 77 88 ab b5 85 6a 78 7c 85 +61 f3 ed cf 9a 83 e8 98 f7 dc 87 ab 8c ce 79 42 +9b 43 e5 69 06 94 1a 88 61 94 f1 37 e5 91 fe 7c +33 95 55 36 1f bb e1 f2 4f eb 2d 4b cd b8 06 01 +f3 09 6b c9 13 2d ee a6 0a e1 30 82 f4 4f 9a d4 +1c d6 28 93 6a 4d 51 17 6e 42 fc 59 cb 76 db 81 +5c e5 ab 4d b9 9a 10 4a af ea 68 f5 d3 30 32 9e +bf 25 8d 4e de 16 06 4b d1 d0 03 93 d5 e1 57 0e +b8 + +# -------------------------------- +# RSASSA-PSS Signature Example 7.3 +# -------------------------------- + +# Message to be signed: +80 84 05 cd fc 1a 58 b9 bb 03 97 c7 20 72 2a 81 +ff fb 76 27 8f 33 59 17 ef 9c 47 38 14 b3 e0 16 +ba 29 73 cd 27 65 f8 f3 f8 2d 6c c3 8a a7 f8 55 +18 27 fe 8d 1e 38 84 b7 e6 1c 94 68 3b 8f 82 f1 +84 3b da e2 25 7e ee c9 81 2a d4 c2 cf 28 3c 34 +e0 b0 ae 0f e3 cb 99 0c f8 8f 2e f9 + +# Salt: +28 03 9d cf e1 06 d3 b8 29 66 11 25 8c 4a 56 65 +1c 9e 92 dd + +# Signature: +2b 31 fd e9 98 59 b9 77 aa 09 58 6d 8e 27 46 62 +b2 5a 2a 64 06 40 b4 57 f5 94 05 1c b1 e7 f7 a9 +11 86 54 55 24 29 26 cf 88 fe 80 df a3 a7 5b a9 +68 98 44 a1 1e 63 4a 82 b0 75 af bd 69 c1 2a 0d +f9 d2 5f 84 ad 49 45 df 3d c8 fe 90 c3 ce fd f2 +6e 95 f0 53 43 04 b5 bd ba 20 d3 e5 64 0a 2e bf +b8 98 aa c3 5a e4 0f 26 fc e5 56 3c 2f 9f 24 f3 +04 2a f7 6f 3c 70 72 d6 87 bb fb 95 9a 88 46 0a +f1 + +# -------------------------------- +# RSASSA-PSS Signature Example 7.4 +# -------------------------------- + +# Message to be signed: +f3 37 b9 ba d9 37 de 22 a1 a0 52 df f1 11 34 a8 +ce 26 97 62 02 98 19 39 b9 1e 07 15 ae 5e 60 96 +49 da 1a df ce f3 f4 cc a5 9b 23 83 60 e7 d1 e4 +96 c7 bf 4b 20 4b 5a cf f9 bb d6 16 6a 1d 87 a3 +6e f2 24 73 73 75 10 39 f8 a8 00 b8 39 98 07 b3 +a8 5f 44 89 34 97 c0 d0 5f b7 01 7b 82 22 81 52 +de 6f 25 e6 11 6d cc 75 03 c7 86 c8 75 c2 8f 3a +a6 07 e9 4a b0 f1 98 63 ab 1b 50 73 77 0b 0c d5 +f5 33 ac de 30 c6 fb 95 3c f3 da 68 02 64 e3 0f +c1 1b ff 9a 19 bf fa b4 77 9b 62 23 c3 fb 3f e0 +f7 1a ba de 4e b7 c0 9c 41 e2 4c 22 d2 3f a1 48 +e6 a1 73 fe b6 39 84 d1 bc 6e e3 a0 2d 91 5b 75 +2c ea f9 2a 30 15 ec eb 38 ca 58 6c 68 01 b3 7c +34 ce fb 2c ff 25 ea 23 c0 86 62 dc ab 26 a7 a9 +3a 28 5d 05 d3 04 4c + +# Salt: +a7 78 21 eb bb ef 24 62 8e 4e 12 e1 d0 ea 96 de +39 8f 7b 0f + +# Signature: +32 c7 ca 38 ff 26 94 9a 15 00 0c 4b a0 4b 2b 13 +b3 5a 38 10 e5 68 18 4d 7e ca ba a1 66 b7 ff ab +dd f2 b6 cf 4b a0 71 24 92 37 90 f2 e5 b1 a5 be +04 0a ea 36 fe 13 2e c1 30 e1 f1 05 67 98 2d 17 +ac 3e 89 b8 d2 6c 30 94 03 4e 76 2d 2e 03 12 64 +f0 11 70 be ec b3 d1 43 9e 05 84 6f 25 45 83 67 +a7 d9 c0 20 60 44 46 72 67 1e 64 e8 77 86 45 59 +ca 19 b2 07 4d 58 8a 28 1b 58 04 d2 37 72 fb be +19 + +# -------------------------------- +# RSASSA-PSS Signature Example 7.5 +# -------------------------------- + +# Message to be signed: +45 01 3c eb af d9 60 b2 55 47 6a 8e 25 98 b9 aa +32 ef be 6d c1 f3 4f 4a 49 8d 8c f5 a2 b4 54 8d +08 c5 5d 5f 95 f7 bc c9 61 91 63 05 6f 2d 58 b5 +2f a0 32 + +# Salt: +9d 5a d8 eb 45 21 34 b6 5d c3 a9 8b 6a 73 b5 f7 +41 60 9c d6 + +# Signature: +07 eb 65 1d 75 f1 b5 2b c2 63 b2 e1 98 33 6e 99 +fb eb c4 f3 32 04 9a 92 2a 10 81 56 07 ee 2d 98 +9d b3 a4 49 5b 7d cc d3 8f 58 a2 11 fb 7e 19 31 +71 a3 d8 91 13 24 37 eb ca 44 f3 18 b2 80 50 9e +52 b5 fa 98 fc ce 82 05 d9 69 7c 8e e4 b7 ff 59 +d4 c5 9c 79 03 8a 19 70 bd 2a 0d 45 1e cd c5 ef +11 d9 97 9c 9d 35 f8 c7 0a 61 63 71 76 07 89 0d +58 6a 7c 6d c0 1c 79 f8 6a 8f 28 e8 52 35 f8 c2 +f1 + +# -------------------------------- +# RSASSA-PSS Signature Example 7.6 +# -------------------------------- + +# Message to be signed: +23 58 09 70 86 c8 99 32 3e 75 d9 c9 0d 0c 09 f1 +2d 9d 54 ed fb df 70 a9 c2 eb 5a 04 d8 f3 6b 9b +2b df 2a ab e0 a5 bd a1 96 89 37 f9 d6 eb d3 b6 +b2 57 ef b3 13 6d 41 31 f9 ac b5 9b 85 e2 60 2c +2a 3f cd c8 35 49 4a 1f 4e 5e c1 8b 22 6c 80 23 +2b 36 a7 5a 45 fd f0 9a 7e a9 e9 8e fb de 14 50 +d1 19 4b f1 2e 15 a4 c5 f9 eb 5c 0b ce 52 69 e0 +c3 b2 8c fa b6 55 d8 1a 61 a2 0b 4b e2 f5 44 59 +bb 25 a0 db 94 c5 22 18 be 10 9a 74 26 de 83 01 +44 24 78 9a aa 90 e5 05 6e 63 2a 69 81 15 e2 82 +c1 a5 64 10 f2 6c 20 72 f1 93 48 1a 9d cd 88 05 +72 00 5e 64 f4 08 2e cf + +# Salt: +3f 2e fc 59 58 80 a7 d4 7f cf 3c ba 04 98 3e a5 +4c 4b 73 fb + +# Signature: +18 da 3c dc fe 79 bf b7 7f d9 c3 2f 37 7a d3 99 +14 6f 0a 8e 81 06 20 23 32 71 a6 e3 ed 32 48 90 +3f 5c dc 92 dc 79 b5 5d 3e 11 61 5a a0 56 a7 95 +85 37 92 a3 99 8c 34 9c a5 c4 57 e8 ca 7d 29 d7 +96 aa 24 f8 34 91 70 9b ef cf b1 51 0e a5 13 c9 +28 29 a3 f0 0b 10 4f 65 56 34 f3 20 75 2e 13 0e +c0 cc f6 75 4f f8 93 db 30 29 32 bb 02 5e b6 0e +87 82 25 98 fc 61 9e 0e 98 17 37 a9 a4 c4 15 2d +33 + +# ============================================= + +# ================================== +# Example 8: A 1031-bit RSA Key Pair +# ================================== + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +49 53 70 a1 fb 18 54 3c 16 d3 63 1e 31 63 25 5d +f6 2b e6 ee e8 90 d5 f2 55 09 e4 f7 78 a8 ea 6f +bb bc df 85 df f6 4e 0d 97 20 03 ab 36 81 fb ba +6d d4 1f d5 41 82 9b 2e 58 2d e9 f2 a4 a4 e0 a2 +d0 90 0b ef 47 53 db 3c ee 0e e0 6c 7d fa e8 b1 +d5 3b 59 53 21 8f 9c ce ea 69 5b 08 66 8e de aa +dc ed 94 63 b1 d7 90 d5 eb f2 7e 91 15 b4 6c ad +4d 9a 2b 8e fa b0 56 1b 08 10 34 47 39 ad a0 73 +3f + +# RSA public exponent e: +01 00 01 + +# RSA private exponent d: +6c 66 ff e9 89 80 c3 8f cd ea b5 15 98 98 83 61 +65 f4 b4 b8 17 c4 f6 a8 d4 86 ee 4e a9 13 0f e9 +b9 09 2b d1 36 d1 84 f9 5f 50 4a 60 7e ac 56 58 +46 d2 fd d6 59 7a 89 67 c7 39 6e f9 5a 6e ee bb +45 78 a6 43 96 6d ca 4d 8e e3 de 84 2d e6 32 79 +c6 18 15 9c 1a b5 4a 89 43 7b 6a 61 20 e4 93 0a +fb 52 a4 ba 6c ed 8a 49 47 ac 64 b3 0a 34 97 cb +e7 01 c2 d6 26 6d 51 72 19 ad 0e c6 d3 47 db e9 + +# Prime p: +08 da d7 f1 13 63 fa a6 23 d5 d6 d5 e8 a3 19 32 +8d 82 19 0d 71 27 d2 84 6c 43 9b 0a b7 26 19 b0 +a4 3a 95 32 0e 4e c3 4f c3 a9 ce a8 76 42 23 05 +bd 76 c5 ba 7b e9 e2 f4 10 c8 06 06 45 a1 d2 9e +db + +# Prime q: +08 47 e7 32 37 6f c7 90 0f 89 8e a8 2e b2 b0 fc +41 85 65 fd ae 62 f7 d9 ec 4c e2 21 7b 97 99 0d +d2 72 db 15 7f 99 f6 3c 0d cb b9 fb ac db d4 c4 +da db 6d f6 77 56 35 8c a4 17 48 25 b4 8f 49 70 +6d + +# p's CRT exponent dP: +05 c2 a8 3c 12 4b 36 21 a2 aa 57 ea 2c 3e fe 03 +5e ff 45 60 f3 3d de bb 7a da b8 1f ce 69 a0 c8 +c2 ed c1 65 20 dd a8 3d 59 a2 3b e8 67 96 3a c6 +5f 2c c7 10 bb cf b9 6e e1 03 de b7 71 d1 05 fd +85 + +# q's CRT exponent dQ: +04 ca e8 aa 0d 9f aa 16 5c 87 b6 82 ec 14 0b 8e +d3 b5 0b 24 59 4b 7a 3b 2c 22 0b 36 69 bb 81 9f +98 4f 55 31 0a 1a e7 82 36 51 d4 a0 2e 99 44 79 +72 59 51 39 36 34 34 e5 e3 0a 7e 7d 24 15 51 e1 +b9 + +# CRT coefficient qInv: +07 d3 e4 7b f6 86 60 0b 11 ac 28 3c e8 8d bb 3f +60 51 e8 ef d0 46 80 e4 4c 17 1e f5 31 b8 0b 2b +7c 39 fc 76 63 20 e2 cf 15 d8 d9 98 20 e9 6f f3 +0d c6 96 91 83 9c 4b 40 d7 b0 6e 45 30 7d c9 1f +3f + +# -------------------------------- +# RSASSA-PSS Signature Example 8.1 +# -------------------------------- + +# Message to be signed: +81 33 2f 4b e6 29 48 41 5e a1 d8 99 79 2e ea cf +6c 6e 1d b1 da 8b e1 3b 5c ea 41 db 2f ed 46 70 +92 e1 ff 39 89 14 c7 14 25 97 75 f5 95 f8 54 7f +73 56 92 a5 75 e6 92 3a f7 8f 22 c6 99 7d db 90 +fb 6f 72 d7 bb 0d d5 74 4a 31 de cd 3d c3 68 58 +49 83 6e d3 4a ec 59 63 04 ad 11 84 3c 4f 88 48 +9f 20 97 35 f5 fb 7f da f7 ce c8 ad dc 58 18 16 +8f 88 0a cb f4 90 d5 10 05 b7 a8 e8 4e 43 e5 42 +87 97 75 71 dd 99 ee a4 b1 61 eb 2d f1 f5 10 8f +12 a4 14 2a 83 32 2e db 05 a7 54 87 a3 43 5c 9a +78 ce 53 ed 93 bc 55 08 57 d7 a9 fb + +# Salt: +1d 65 49 1d 79 c8 64 b3 73 00 9b e6 f6 f2 46 7b +ac 4c 78 fa + +# Signature: +02 62 ac 25 4b fa 77 f3 c1 ac a2 2c 51 79 f8 f0 +40 42 2b 3c 5b af d4 0a 8f 21 cf 0f a5 a6 67 cc +d5 99 3d 42 db af b4 09 c5 20 e2 5f ce 2b 1e e1 +e7 16 57 7f 1e fa 17 f3 da 28 05 2f 40 f0 41 9b +23 10 6d 78 45 aa f0 11 25 b6 98 e7 a4 df e9 2d +39 67 bb 00 c4 d0 d3 5b a3 55 2a b9 a8 b3 ee f0 +7c 7f ec db c5 42 4a c4 db 1e 20 cb 37 d0 b2 74 +47 69 94 0e a9 07 e1 7f bb ca 67 3b 20 52 23 80 +c5 + +# -------------------------------- +# RSASSA-PSS Signature Example 8.2 +# -------------------------------- + +# Message to be signed: +e2 f9 6e af 0e 05 e7 ba 32 6e cc a0 ba 7f d2 f7 +c0 23 56 f3 ce de 9d 0f aa bf 4f cc 8e 60 a9 73 +e5 59 5f d9 ea 08 + +# Salt: +43 5c 09 8a a9 90 9e b2 37 7f 12 48 b0 91 b6 89 +87 ff 18 38 + +# Signature: +27 07 b9 ad 51 15 c5 8c 94 e9 32 e8 ec 0a 28 0f +56 33 9e 44 a1 b5 8d 4d dc ff 2f 31 2e 5f 34 dc +fe 39 e8 9c 6a 94 dc ee 86 db bd ae 5b 79 ba 4e +08 19 a9 e7 bf d9 d9 82 e7 ee 6c 86 ee 68 39 6e +8b 3a 14 c9 c8 f3 4b 17 8e b7 41 f9 d3 f1 21 10 +9b f5 c8 17 2f ad a2 e7 68 f9 ea 14 33 03 2c 00 +4a 8a a0 7e b9 90 00 0a 48 dc 94 c8 ba c8 aa be +2b 09 b1 aa 46 c0 a2 aa 0e 12 f6 3f bb a7 75 ba +7e + +# -------------------------------- +# RSASSA-PSS Signature Example 8.3 +# -------------------------------- + +# Message to be signed: +e3 5c 6e d9 8f 64 a6 d5 a6 48 fc ab 8a db 16 33 +1d b3 2e 5d 15 c7 4a 40 ed f9 4c 3d c4 a4 de 79 +2d 19 08 89 f2 0f 1e 24 ed 12 05 4a 6b 28 79 8f +cb 42 d1 c5 48 76 9b 73 4c 96 37 31 42 09 2a ed +27 76 03 f4 73 8d f4 dc 14 46 58 6d 0e c6 4d a4 +fb 60 53 6d b2 ae 17 fc 7e 3c 04 bb fb bb d9 07 +bf 11 7c 08 63 6f a1 6f 95 f5 1a 62 16 93 4d 3e +34 f8 50 30 f1 7b bb c5 ba 69 14 40 58 af f0 81 +e0 b1 9c f0 3c 17 19 5c 5e 88 8b a5 8f 6f e0 a0 +2e 5c 3b da 97 19 a7 + +# Salt: +c6 eb be 76 df 0c 4a ea 32 c4 74 17 5b 2f 13 68 +62 d0 45 29 + +# Signature: +2a d2 05 09 d7 8c f2 6d 1b 6c 40 61 46 08 6e 4b +0c 91 a9 1c 2b d1 64 c8 7b 96 6b 8f aa 42 aa 0c +a4 46 02 23 23 ba 4b 1a 1b 89 70 6d 7f 4c 3b e5 +7d 7b 69 70 2d 16 8a b5 95 5e e2 90 35 6b 8c 4a +29 ed 46 7d 54 7e c2 3c ba df 28 6c cb 58 63 c6 +67 9d a4 67 fc 93 24 a1 51 c7 ec 55 aa c6 db 40 +84 f8 27 26 82 5c fe 1a a4 21 bc 64 04 9f b4 2f +23 14 8f 9c 25 b2 dc 30 04 37 c3 8d 42 8a a7 5f +96 + +# -------------------------------- +# RSASSA-PSS Signature Example 8.4 +# -------------------------------- + +# Message to be signed: +db c5 f7 50 a7 a1 4b e2 b9 3e 83 8d 18 d1 4a 86 +95 e5 2e 8a dd 9c 0a c7 33 b8 f5 6d 27 47 e5 29 +a0 cc a5 32 dd 49 b9 02 ae fe d5 14 44 7f 9e 81 +d1 61 95 c2 85 38 68 cb 9b 30 f7 d0 d4 95 c6 9d +01 b5 c5 d5 0b 27 04 5d b3 86 6c 23 24 a4 4a 11 +0b 17 17 74 6d e4 57 d1 c8 c4 5c 3c d2 a9 29 70 +c3 d5 96 32 05 5d 4c 98 a4 1d 6e 99 e2 a3 dd d5 +f7 f9 97 9a b3 cd 18 f3 75 05 d2 51 41 de 2a 1b +ff 17 b3 a7 dc e9 41 9e cc 38 5c f1 1d 72 84 0f +19 95 3f d0 50 92 51 f6 ca fd e2 89 3d 0e 75 c7 +81 ba 7a 50 12 ca 40 1a 4f a9 9e 04 b3 c3 24 9f +92 6d 5a fe 82 cc 87 da b2 2c 3c 1b 10 5d e4 8e +34 ac e9 c9 12 4e 59 59 7a c7 eb f8 + +# Salt: +02 1f dc c6 eb b5 e1 9b 1c b1 6e 9c 67 f2 76 81 +65 7f e2 0a + +# Signature: +1e 24 e6 e5 86 28 e5 17 50 44 a9 eb 6d 83 7d 48 +af 12 60 b0 52 0e 87 32 7d e7 89 7e e4 d5 b9 f0 +df 0b e3 e0 9e d4 de a8 c1 45 4f f3 42 3b b0 8e +17 93 24 5a 9d f8 bf 6a b3 96 8c 8e dd c3 b5 32 +85 71 c7 7f 09 1c c5 78 57 69 12 df eb d1 64 b9 +de 54 54 fe 0b e1 c1 f6 38 5b 32 83 60 ce 67 ec +7a 05 f6 e3 0e b4 5c 17 c4 8a c7 00 41 d2 ca b6 +7f 0a 2a e7 aa fd cc 8d 24 5e a3 44 2a 63 00 cc +c7 + +# -------------------------------- +# RSASSA-PSS Signature Example 8.5 +# -------------------------------- + +# Message to be signed: +04 dc 25 1b e7 2e 88 e5 72 34 85 b6 38 3a 63 7e +2f ef e0 76 60 c5 19 a5 60 b8 bc 18 bd ed b8 6e +ae 23 64 ea 53 ba 9d ca 6e b3 d2 e7 d6 b8 06 af +42 b3 e8 7f 29 1b 4a 88 81 d5 bf 57 2c c9 a8 5e +19 c8 6a cb 28 f0 98 f9 da 03 83 c5 66 d3 c0 f5 +8c fd 8f 39 5d cf 60 2e 5c d4 0e 8c 71 83 f7 14 +99 6e 22 97 ef + +# Salt: +c5 58 d7 16 7c bb 45 08 ad a0 42 97 1e 71 b1 37 +7e ea 42 69 + +# Signature: +33 34 1b a3 57 6a 13 0a 50 e2 a5 cf 86 79 22 43 +88 d5 69 3f 5a cc c2 35 ac 95 ad d6 8e 5e b1 ee +c3 16 66 d0 ca 7a 1c da 6f 70 a1 aa 76 2c 05 75 +2a 51 95 0c db 8a f3 c5 37 9f 18 cf e6 b5 bc 55 +a4 64 82 26 a1 5e 91 2e f1 9a d7 7a de ea 91 1d +67 cf ef d6 9b a4 3f a4 11 91 35 ff 64 21 17 ba +98 5a 7e 01 00 32 5e 95 19 f1 ca 6a 92 16 bd a0 +55 b5 78 50 15 29 11 25 e9 0d cd 07 a2 ca 96 73 +ee + +# -------------------------------- +# RSASSA-PSS Signature Example 8.6 +# -------------------------------- + +# Message to be signed: +0e a3 7d f9 a6 fe a4 a8 b6 10 37 3c 24 cf 39 0c +20 fa 6e 21 35 c4 00 c8 a3 4f 5c 18 3a 7e 8e a4 +c9 ae 09 0e d3 17 59 f4 2d c7 77 19 cc a4 00 ec +dc c5 17 ac fc 7a c6 90 26 75 b2 ef 30 c5 09 66 +5f 33 21 48 2f c6 9a 9f b5 70 d1 5e 01 c8 45 d0 +d8 e5 0d 2a 24 cb f1 cf 0e 71 49 75 a5 db 7b 18 +d9 e9 e9 cb 91 b5 cb 16 86 90 60 ed 18 b7 b5 62 +45 50 3f 0c af 90 35 2b 8d e8 1c b5 a1 d9 c6 33 +60 92 f0 cd + +# Salt: +76 fd 4e 64 fd c9 8e b9 27 a0 40 3e 35 a0 84 e7 +6b a9 f9 2a + +# Signature: +1e d1 d8 48 fb 1e db 44 12 9b d9 b3 54 79 5a f9 +7a 06 9a 7a 00 d0 15 10 48 59 3e 0c 72 c3 51 7f +f9 ff 2a 41 d0 cb 5a 0a c8 60 d7 36 a1 99 70 4f +7c b6 a5 39 86 a8 8b bd 8a bc c0 07 6a 2c e8 47 +88 00 31 52 5d 44 9d a2 ac 78 35 63 74 c5 36 e3 +43 fa a7 cb a4 2a 5a aa 65 06 08 77 91 c0 6a 8e +98 93 35 ae d1 9b fa b2 d5 e6 7e 27 fb 0c 28 75 +af 89 6c 21 b6 e8 e7 30 9d 04 e4 f6 72 7e 69 46 +3e + +# ============================================= + +# ================================== +# Example 9: A 1536-bit RSA Key Pair +# ================================== + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +e6 bd 69 2a c9 66 45 79 04 03 fd d0 f5 be b8 b9 +bf 92 ed 10 00 7f c3 65 04 64 19 dd 06 c0 5c 5b +5b 2f 48 ec f9 89 e4 ce 26 91 09 97 9c bb 40 b4 +a0 ad 24 d2 24 83 d1 ee 31 5a d4 cc b1 53 42 68 +35 26 91 c5 24 f6 dd 8e 6c 29 d2 24 cf 24 69 73 +ae c8 6c 5b f6 b1 40 1a 85 0d 1b 9a d1 bb 8c bc +ec 47 b0 6f 0f 8c 7f 45 d3 fc 8f 31 92 99 c5 43 +3d db c2 b3 05 3b 47 de d2 ec d4 a4 ca ef d6 14 +83 3d c8 bb 62 2f 31 7e d0 76 b8 05 7f e8 de 3f +84 48 0a d5 e8 3e 4a 61 90 4a 4f 24 8f b3 97 02 +73 57 e1 d3 0e 46 31 39 81 5c 6f d4 fd 5a c5 b8 +17 2a 45 23 0e cb 63 18 a0 4f 14 55 d8 4e 5a 8b + +# RSA public exponent e: +01 00 01 + +# RSA private exponent d: +6a 7f d8 4f b8 5f ad 07 3b 34 40 6d b7 4f 8d 61 +a6 ab c1 21 96 a9 61 dd 79 56 5e 9d a6 e5 18 7b +ce 2d 98 02 50 f7 35 95 75 35 92 70 d9 15 90 bb +0e 42 7c 71 46 0b 55 d5 14 10 b1 91 bc f3 09 fe +a1 31 a9 2c 8e 70 27 38 fa 71 9f 1e 00 41 f5 2e +40 e9 1f 22 9f 4d 96 a1 e6 f1 72 e1 55 96 b4 51 +0a 6d ae c2 61 05 f2 be bc 53 31 6b 87 bd f2 13 +11 66 60 70 e8 df ee 69 d5 2c 71 a9 76 ca ae 79 +c7 2b 68 d2 85 80 dc 68 6d 9f 51 29 d2 25 f8 2b +3d 61 55 13 a8 82 b3 db 91 41 6b 48 ce 08 88 82 +13 e3 7e eb 9a f8 00 d8 1c ab 32 8c e4 20 68 99 +03 c0 0c 7b 5f d3 1b 75 50 3a 6d 41 96 84 d6 29 + +# Prime p: +f8 eb 97 e9 8d f1 26 64 ee fd b7 61 59 6a 69 dd +cd 0e 76 da ec e6 ed 4b f5 a1 b5 0a c0 86 f7 92 +8a 4d 2f 87 26 a7 7e 51 5b 74 da 41 98 8f 22 0b +1c c8 7a a1 fc 81 0c e9 9a 82 f2 d1 ce 82 1e dc +ed 79 4c 69 41 f4 2c 7a 1a 0b 8c 4d 28 c7 5e c6 +0b 65 22 79 f6 15 4a 76 2a ed 16 5d 47 de e3 67 + +# Prime q: +ed 4d 71 d0 a6 e2 4b 93 c2 e5 f6 b4 bb e0 5f 5f +b0 af a0 42 d2 04 fe 33 78 d3 65 c2 f2 88 b6 a8 +da d7 ef e4 5d 15 3e ef 40 ca cc 7b 81 ff 93 40 +02 d1 08 99 4b 94 a5 e4 72 8c d9 c9 63 37 5a e4 +99 65 bd a5 5c bf 0e fe d8 d6 55 3b 40 27 f2 d8 +62 08 a6 e6 b4 89 c1 76 12 80 92 d6 29 e4 9d 3d + +# p's CRT exponent dP: +2b b6 8b dd fb 0c 4f 56 c8 55 8b ff af 89 2d 80 +43 03 78 41 e7 fa 81 cf a6 1a 38 c5 e3 9b 90 1c +8e e7 11 22 a5 da 22 27 bd 6c de eb 48 14 52 c1 +2a d3 d6 1d 5e 4f 77 6a 0a b5 56 59 1b ef e3 e5 +9e 5a 7f dd b8 34 5e 1f 2f 35 b9 f4 ce e5 7c 32 +41 4c 08 6a ec 99 3e 93 53 e4 80 d9 ee c6 28 9f + +# q's CRT exponent dQ: +4f f8 97 70 9f ad 07 97 46 49 45 78 e7 0f d8 54 +61 30 ee ab 56 27 c4 9b 08 0f 05 ee 4a d9 f3 e4 +b7 cb a9 d6 a5 df f1 13 a4 1c 34 09 33 68 33 f1 +90 81 6d 8a 6b c4 2e 9b ec 56 b7 56 7d 0f 3c 9c +69 6d b6 19 b2 45 d9 01 dd 85 6d b7 c8 09 2e 77 +e9 a1 cc cd 56 ee 4d ba 42 c5 fd b6 1a ec 26 69 + +# CRT coefficient qInv: +77 b9 d1 13 7b 50 40 4a 98 27 29 31 6e fa fc 7d +fe 66 d3 4e 5a 18 26 00 d5 f3 0a 0a 85 12 05 1c +56 0d 08 1d 4d 0a 18 35 ec 3d 25 a6 0f 4e 4d 6a +a9 48 b2 bf 3d bb 5b 12 4c bb c3 48 92 55 a3 a9 +48 37 2f 69 78 49 67 45 f9 43 e1 db 4f 18 38 2c +ea a5 05 df c6 57 57 bb 3f 85 7a 58 dc e5 21 56 + +# -------------------------------- +# RSASSA-PSS Signature Example 9.1 +# -------------------------------- + +# Message to be signed: +a8 8e 26 58 55 e9 d7 ca 36 c6 87 95 f0 b3 1b 59 +1c d6 58 7c 71 d0 60 a0 b3 f7 f3 ea ef 43 79 59 +22 02 8b c2 b6 ad 46 7c fc 2d 7f 65 9c 53 85 aa +70 ba 36 72 cd de 4c fe 49 70 cc 79 04 60 1b 27 +88 72 bf 51 32 1c 4a 97 2f 3c 95 57 0f 34 45 d4 +f5 79 80 e0 f2 0d f5 48 46 e6 a5 2c 66 8f 12 88 +c0 3f 95 00 6e a3 2f 56 2d 40 d5 2a f9 fe b3 2f +0f a0 6d b6 5b 58 8a 23 7b 34 e5 92 d5 5c f9 79 +f9 03 a6 42 ef 64 d2 ed 54 2a a8 c7 7d c1 dd 76 +2f 45 a5 93 03 ed 75 e5 41 ca 27 1e 2b 60 ca 70 +9e 44 fa 06 61 13 1e 8d 5d 41 63 fd 8d 39 85 66 +ce 26 de 87 30 e7 2f 9c ca 73 76 41 c2 44 15 94 +20 63 70 28 df 0a 18 07 9d 62 08 ea 8b 47 11 a2 +c7 50 f5 + +# Salt: +c0 a4 25 31 3d f8 d7 56 4b d2 43 4d 31 15 23 d5 +25 7e ed 80 + +# Signature: +58 61 07 22 6c 3c e0 13 a7 c8 f0 4d 1a 6a 29 59 +bb 4b 8e 20 5b a4 3a 27 b5 0f 12 41 11 bc 35 ef +58 9b 03 9f 59 32 18 7c b6 96 d7 d9 a3 2c 0c 38 +30 0a 5c dd a4 83 4b 62 d2 eb 24 0a f3 3f 79 d1 +3d fb f0 95 bf 59 9e 0d 96 86 94 8c 19 64 74 7b +67 e8 9c 9a ba 5c d8 50 16 23 6f 56 6c c5 80 2c +b1 3e ad 51 bc 7c a6 be f3 b9 4d cb db b1 d5 70 +46 97 71 df 0e 00 b1 a8 a0 67 77 47 2d 23 16 27 +9e da e8 64 74 66 8d 4e 1e ff f9 5f 1d e6 1c 60 +20 da 32 ae 92 bb f1 65 20 fe f3 cf 4d 88 f6 11 +21 f2 4b bd 9f e9 1b 59 ca f1 23 5b 2a 93 ff 81 +fc 40 3a dd f4 eb de a8 49 34 a9 cd af 8e 1a 9e + +# -------------------------------- +# RSASSA-PSS Signature Example 9.2 +# -------------------------------- + +# Message to be signed: +c8 c9 c6 af 04 ac da 41 4d 22 7e f2 3e 08 20 c3 +73 2c 50 0d c8 72 75 e9 5b 0d 09 54 13 99 3c 26 +58 bc 1d 98 85 81 ba 87 9c 2d 20 1f 14 cb 88 ce +d1 53 a0 19 69 a7 bf 0a 7b e7 9c 84 c1 48 6b c1 +2b 3f a6 c5 98 71 b6 82 7c 8c e2 53 ca 5f ef a8 +a8 c6 90 bf 32 6e 8e 37 cd b9 6d 90 a8 2e ba b6 +9f 86 35 0e 18 22 e8 bd 53 6a 2e + +# Salt: +b3 07 c4 3b 48 50 a8 da c2 f1 5f 32 e3 78 39 ef +8c 5c 0e 91 + +# Signature: +80 b6 d6 43 25 52 09 f0 a4 56 76 38 97 ac 9e d2 +59 d4 59 b4 9c 28 87 e5 88 2e cb 44 34 cf d6 6d +d7 e1 69 93 75 38 1e 51 cd 7f 55 4f 2c 27 17 04 +b3 99 d4 2b 4b e2 54 0a 0e ca 61 95 1f 55 26 7f +7c 28 78 c1 22 84 2d ad b2 8b 01 bd 5f 8c 02 5f +7e 22 84 18 a6 73 c0 3d 6b c0 c7 36 d0 a2 95 46 +bd 67 f7 86 d9 d6 92 cc ea 77 8d 71 d9 8c 20 63 +b7 a7 10 92 18 7a 4d 35 af 10 81 11 d8 3e 83 ea +e4 6c 46 aa 34 27 7e 06 04 45 89 90 37 88 f1 d5 +e7 ce e2 5f b4 85 e9 29 49 11 88 14 d6 f2 c3 ee +36 14 89 01 6f 32 7f b5 bc 51 7e b5 04 70 bf fa +1a fa 5f 4c e9 aa 0c e5 b8 ee 19 bf 55 01 b9 58 + +# -------------------------------- +# RSASSA-PSS Signature Example 9.3 +# -------------------------------- + +# Message to be signed: +0a fa d4 2c cd 4f c6 06 54 a5 50 02 d2 28 f5 2a +4a 5f e0 3b 8b bb 08 ca 82 da ca 55 8b 44 db e1 +26 6e 50 c0 e7 45 a3 6d 9d 29 04 e3 40 8a bc d1 +fd 56 99 94 06 3f 4a 75 cc 72 f2 fe e2 a0 cd 89 +3a 43 af 1c 5b 8b 48 7d f0 a7 16 10 02 4e 4f 6d +df 9f 28 ad 08 13 c1 aa b9 1b cb 3c 90 64 d5 ff +74 2d ef fe a6 57 09 41 39 36 9e 5e a6 f4 a9 63 +19 a5 cc 82 24 14 5b 54 50 62 75 8f ef d1 fe 34 +09 ae 16 92 59 c6 cd fd 6b 5f 29 58 e3 14 fa ec +be 69 d2 ca ce 58 ee 55 17 9a b9 b3 e6 d1 ec c1 +4a 55 7c 5f eb e9 88 59 52 64 fc 5d a1 c5 71 46 +2e ca 79 8a 18 a1 a4 94 0c da b4 a3 e9 20 09 cc +d4 2e 1e 94 7b 13 14 e3 22 38 a2 de ce 7d 23 a8 +9b 5b 30 c7 51 fd 0a 4a 43 0d 2c 54 85 94 + +# Salt: +9a 2b 00 7e 80 97 8b bb 19 2c 35 4e b7 da 9a ed +fc 74 db f5 + +# Signature: +48 44 08 f3 89 8c d5 f5 34 83 f8 08 19 ef bf 27 +08 c3 4d 27 a8 b2 a6 fa e8 b3 22 f9 24 02 37 f9 +81 81 7a ca 18 46 f1 08 4d aa 6d 7c 07 95 f6 e5 +bf 1a f5 9c 38 e1 85 84 37 ce 1f 7e c4 19 b9 8c +87 36 ad f6 dd 9a 00 b1 80 6d 2b d3 ad 0a 73 77 +5e 05 f5 2d fe f3 a5 9a b4 b0 81 43 f0 df 05 cd +1a d9 d0 4b ec ec a6 da a4 a2 12 98 03 e2 00 cb +c7 77 87 ca f4 c1 d0 66 3a 6c 59 87 b6 05 95 20 +19 78 2c af 2e c1 42 6d 68 fb 94 ed 1d 4b e8 16 +a7 ed 08 1b 77 e6 ab 33 0b 3f fc 07 38 20 fe cd +e3 72 7f cb e2 95 ee 61 a0 50 a3 43 65 86 37 c3 +fd 65 9c fb 63 73 6d e3 2d 9f 90 d3 c2 f6 3e ca + +# -------------------------------- +# RSASSA-PSS Signature Example 9.4 +# -------------------------------- + +# Message to be signed: +1d fd 43 b4 6c 93 db 82 62 9b da e2 bd 0a 12 b8 +82 ea 04 c3 b4 65 f5 cf 93 02 3f 01 05 96 26 db +be 99 f2 6b b1 be 94 9d dd d1 6d c7 f3 de bb 19 +a1 94 62 7f 0b 22 44 34 df 7d 87 00 e9 e9 8b 06 +e3 60 c1 2f db e3 d1 9f 51 c9 68 4e b9 08 9e cb +b0 a2 f0 45 03 99 d3 f5 9e ac 72 94 08 5d 04 4f +53 93 c6 ce 73 74 23 d8 b8 6c 41 53 70 d3 89 e3 +0b 9f 0a 3c 02 d2 5d 00 82 e8 ad 6f 3f 1e f2 4a +45 c3 cf 82 b3 83 36 70 63 a4 d4 61 3e 42 64 f0 +1b 2d ac 2e 5a a4 20 43 f8 fb 5f 69 fa 87 1d 14 +fb 27 3e 76 7a 53 1c 40 f0 2f 34 3b c2 fb 45 a0 +c7 e0 f6 be 25 61 92 3a 77 21 1d 66 a6 e2 db b4 +3c 36 63 50 be ae 22 da 3a c2 c1 f5 07 70 96 fc +b5 c4 bf 25 5f 75 74 35 1a e0 b1 e1 f0 36 32 81 +7c 08 56 d4 a8 ba 97 af bd c8 b8 58 55 40 2b c5 +69 26 fc ec 20 9f 9e a8 + +# Salt: +70 f3 82 bd df 4d 5d 2d d8 8b 3b c7 b7 30 8b e6 +32 b8 40 45 + +# Signature: +84 eb eb 48 1b e5 98 45 b4 64 68 ba fb 47 1c 01 +12 e0 2b 23 5d 84 b5 d9 11 cb d1 92 6e e5 07 4a +e0 42 44 95 cb 20 e8 23 08 b8 eb b6 5f 41 9a 03 +fb 40 e7 2b 78 98 1d 88 aa d1 43 05 36 85 17 2c +97 b2 9c 8b 7b f0 ae 73 b5 b2 26 3c 40 3d a0 ed +2f 80 ff 74 50 af 78 28 eb 8b 86 f0 02 8b d2 a8 +b1 76 a4 d2 28 cc ce a1 83 94 f2 38 b0 9f f7 58 +cc 00 bc 04 30 11 52 35 57 42 f2 82 b5 4e 66 3a +91 9e 70 9d 8d a2 4a de 55 00 a7 b9 aa 50 22 6e +0c a5 29 23 e6 c2 d8 60 ec 50 ff 48 0f a5 74 77 +e8 2b 05 65 f4 37 9f 79 c7 72 d5 c2 da 80 af 9f +bf 32 5e ce 6f c2 0b 00 96 16 14 be e8 9a 18 3e + +# -------------------------------- +# RSASSA-PSS Signature Example 9.5 +# -------------------------------- + +# Message to be signed: +1b dc 6e 7c 98 fb 8c f5 4e 9b 09 7b 66 a8 31 e9 +cf e5 2d 9d 48 88 44 8e e4 b0 97 80 93 ba 1d 7d +73 ae 78 b3 a6 2b a4 ad 95 cd 28 9c cb 9e 00 52 +26 bb 3d 17 8b cc aa 82 1f b0 44 a4 e2 1e e9 76 +96 c1 4d 06 78 c9 4c 2d ae 93 b0 ad 73 92 22 18 +55 3d aa 7e 44 eb e5 77 25 a7 a4 5c c7 2b 9b 21 +38 a6 b1 7c 8d b4 11 ce 82 79 ee 12 41 af f0 a8 +be c6 f7 7f 87 ed b0 c6 9c b2 72 36 e3 43 5a 80 +0b 19 2e 4f 11 e5 19 e3 fe 30 fc 30 ea cc ca 4f +bb 41 76 90 29 bf 70 8e 81 7a 9e 68 38 05 be 67 +fa 10 09 84 68 3b 74 83 8e 3b cf fa 79 36 6e ed +1d 48 1c 76 72 91 18 83 8f 31 ba 8a 04 8a 93 c1 +be 44 24 59 8e 8d f6 32 8b 7a 77 88 0a 3f 9c 7e +2e 8d fc a8 eb 5a 26 fb 86 bd c5 56 d4 2b be 01 +d9 fa 6e d8 06 46 49 1c 93 41 + +# Salt: +d6 89 25 7a 86 ef fa 68 21 2c 5e 0c 61 9e ca 29 +5f b9 1b 67 + +# Signature: +82 10 2d f8 cb 91 e7 17 99 19 a0 4d 26 d3 35 d6 +4f bc 2f 87 2c 44 83 39 43 24 1d e8 45 48 10 27 +4c df 3d b5 f4 2d 42 3d b1 52 af 71 35 f7 01 42 +0e 39 b4 94 a6 7c bf d1 9f 91 19 da 23 3a 23 da +5c 64 39 b5 ba 0d 2b c3 73 ee e3 50 70 01 37 8d +4a 40 73 85 6b 7f e2 ab a0 b5 ee 93 b2 7f 4a fe +c7 d4 d1 20 92 1c 83 f6 06 76 5b 02 c1 9e 4d 6a +1a 3b 95 fa 4c 42 29 51 be 4f 52 13 10 77 ef 17 +17 97 29 cd df bd b5 69 50 db ac ee fe 78 cb 16 +64 0a 09 9e a5 6d 24 38 9e ef 10 f8 fe cb 31 ba +3e a3 b2 27 c0 a8 66 98 bb 89 e3 e9 36 39 05 bf +22 77 7b 2a 3a a5 21 b6 5b 4c ef 76 d8 3b de 4c + +# -------------------------------- +# RSASSA-PSS Signature Example 9.6 +# -------------------------------- + +# Message to be signed: +88 c7 a9 f1 36 04 01 d9 0e 53 b1 01 b6 1c 53 25 +c3 c7 5d b1 b4 11 fb eb 8e 83 0b 75 e9 6b 56 67 +0a d2 45 40 4e 16 79 35 44 ee 35 4b c6 13 a9 0c +c9 84 87 15 a7 3d b5 89 3e 7f 6d 27 98 15 c0 c1 +de 83 ef 8e 29 56 e3 a5 6e d2 6a 88 8d 7a 9c dc +d0 42 f4 b1 6b 7f a5 1e f1 a0 57 36 62 d1 6a 30 +2d 0e c5 b2 85 d2 e0 3a d9 65 29 c8 7b 3d 37 4d +b3 72 d9 5b 24 43 d0 61 b6 b1 a3 50 ba 87 80 7e +d0 83 af d1 eb 05 c3 f5 2f 4e ba 5e d2 22 77 14 +fd b5 0b 9d 9d 9d d6 81 4f 62 f6 27 2f cd 5c db +ce 7a 9e f7 97 + +# Salt: +c2 5f 13 bf 67 d0 81 67 1a 04 81 a1 f1 82 0d 61 +3b ba 22 76 + +# Signature: +a7 fd b0 d2 59 16 5c a2 c8 8d 00 bb f1 02 8a 86 +7d 33 76 99 d0 61 19 3b 17 a9 64 8e 14 cc bb aa +de ac aa cd ec 81 5e 75 71 29 4e bb 8a 11 7a f2 +05 fa 07 8b 47 b0 71 2c 19 9e 3a d0 51 35 c5 04 +c2 4b 81 70 51 15 74 08 02 48 79 92 ff d5 11 d4 +af c6 b8 54 49 1e b3 f0 dd 52 31 39 54 2f f1 5c +31 01 ee 85 54 35 17 c6 a3 c7 94 17 c6 7e 2d d9 +aa 74 1e 9a 29 b0 6d cb 59 3c 23 36 b3 67 0a e3 +af ba c7 c3 e7 6e 21 54 73 e8 66 e3 38 ca 24 4d +e0 0b 62 62 4d 6b 94 26 82 2c ea e9 f8 cc 46 08 +95 f4 12 50 07 3f d4 5c 5a 1e 7b 42 5c 20 4a 42 +3a 69 91 59 f6 90 3e 71 0b 37 a7 bb 2b c8 04 9f + +# ============================================= + +# =================================== +# Example 10: A 2048-bit RSA Key Pair +# =================================== + +# ------------------------------ +# Components of the RSA Key Pair +# ------------------------------ + +# RSA modulus n: +a5 dd 86 7a c4 cb 02 f9 0b 94 57 d4 8c 14 a7 70 +ef 99 1c 56 c3 9c 0e c6 5f d1 1a fa 89 37 ce a5 +7b 9b e7 ac 73 b4 5c 00 17 61 5b 82 d6 22 e3 18 +75 3b 60 27 c0 fd 15 7b e1 2f 80 90 fe e2 a7 ad +cd 0e ef 75 9f 88 ba 49 97 c7 a4 2d 58 c9 aa 12 +cb 99 ae 00 1f e5 21 c1 3b b5 43 14 45 a8 d5 ae +4f 5e 4c 7e 94 8a c2 27 d3 60 40 71 f2 0e 57 7e +90 5f be b1 5d fa f0 6d 1d e5 ae 62 53 d6 3a 6a +21 20 b3 1a 5d a5 da bc 95 50 60 0e 20 f2 7d 37 +39 e2 62 79 25 fe a3 cc 50 9f 21 df f0 4e 6e ea +45 49 c5 40 d6 80 9f f9 30 7e ed e9 1f ff 58 73 +3d 83 85 a2 37 d6 d3 70 5a 33 e3 91 90 09 92 07 +0d f7 ad f1 35 7c f7 e3 70 0c e3 66 7d e8 3f 17 +b8 df 17 78 db 38 1d ce 09 cb 4a d0 58 a5 11 00 +1a 73 81 98 ee 27 cf 55 a1 3b 75 45 39 90 65 82 +ec 8b 17 4b d5 8d 5d 1f 3d 76 7c 61 37 21 ae 05 + +# RSA public exponent e: +01 00 01 + +# RSA private exponent d: +2d 2f f5 67 b3 fe 74 e0 61 91 b7 fd ed 6d e1 12 +29 0c 67 06 92 43 0d 59 69 18 40 47 da 23 4c 96 +93 de ed 16 73 ed 42 95 39 c9 69 d3 72 c0 4d 6b +47 e0 f5 b8 ce e0 84 3e 5c 22 83 5d bd 3b 05 a0 +99 79 84 ae 60 58 b1 1b c4 90 7c bf 67 ed 84 fa +9a e2 52 df b0 d0 cd 49 e6 18 e3 5d fd fe 59 bc +a3 dd d6 6c 33 ce bb c7 7a d4 41 aa 69 5e 13 e3 +24 b5 18 f0 1c 60 f5 a8 5c 99 4a d1 79 f2 a6 b5 +fb e9 34 02 b1 17 67 be 01 bf 07 34 44 d6 ba 1d +d2 bc a5 bd 07 4d 4a 5f ae 35 31 ad 13 03 d8 4b +30 d8 97 31 8c bb ba 04 e0 3c 2e 66 de 6d 91 f8 +2f 96 ea 1d 4b b5 4a 5a ae 10 2d 59 46 57 f5 c9 +78 95 53 51 2b 29 6d ea 29 d8 02 31 96 35 7e 3e +3a 6e 95 8f 39 e3 c2 34 40 38 ea 60 4b 31 ed c6 +f0 f7 ff 6e 71 81 a5 7c 92 82 6a 26 8f 86 76 8e +96 f8 78 56 2f c7 1d 85 d6 9e 44 86 12 f7 04 8f + +# Prime p: +cf d5 02 83 fe ee b9 7f 6f 08 d7 3c bc 7b 38 36 +f8 2b bc d4 99 47 9f 5e 6f 76 fd fc b8 b3 8c 4f +71 dc 9e 88 bd 6a 6f 76 37 1a fd 65 d2 af 18 62 +b3 2a fb 34 a9 5f 71 b8 b1 32 04 3f fe be 3a 95 +2b af 75 92 44 81 48 c0 3f 9c 69 b1 d6 8e 4c e5 +cf 32 c8 6b af 46 fe d3 01 ca 1a b4 03 06 9b 32 +f4 56 b9 1f 71 89 8a b0 81 cd 8c 42 52 ef 52 71 +91 5c 97 94 b8 f2 95 85 1d a7 51 0f 99 cb 73 eb + +# Prime q: +cc 4e 90 d2 a1 b3 a0 65 d3 b2 d1 f5 a8 fc e3 1b +54 44 75 66 4e ab 56 1d 29 71 b9 9f b7 be f8 44 +e8 ec 1f 36 0b 8c 2a c8 35 96 92 97 1e a6 a3 8f +72 3f cc 21 1f 5d bc b1 77 a0 fd ac 51 64 a1 d4 +ff 7f bb 4e 82 99 86 35 3c b9 83 65 9a 14 8c dd +42 0c 7d 31 ba 38 22 ea 90 a3 2b e4 6c 03 0e 8c +17 e1 fa 0a d3 78 59 e0 6b 0a a6 fa 3b 21 6d 9c +be 6c 0e 22 33 97 69 c0 a6 15 91 3e 5d a7 19 cf + +# p's CRT exponent dP: +1c 2d 1f c3 2f 6b c4 00 4f d8 5d fd e0 fb bf 9a +4c 38 f9 c7 c4 e4 1d ea 1a a8 82 34 a2 01 cd 92 +f3 b7 da 52 65 83 a9 8a d8 5b b3 60 fb 98 3b 71 +1e 23 44 9d 56 1d 17 78 d7 a5 15 48 6b cb f4 7b +46 c9 e9 e1 a3 a1 f7 70 00 ef be b0 9a 8a fe 47 +e5 b8 57 cd a9 9c b1 6d 7f ff 9b 71 2e 3b d6 0c +a9 6d 9c 79 73 d6 16 d4 69 34 a9 c0 50 28 1c 00 +43 99 ce ff 1d b7 dd a7 87 66 a8 a9 b9 cb 08 73 + +# q's CRT exponent dQ: +cb 3b 3c 04 ca a5 8c 60 be 7d 9b 2d eb b3 e3 96 +43 f4 f5 73 97 be 08 23 6a 1e 9e af aa 70 65 36 +e7 1c 3a cf e0 1c c6 51 f2 3c 9e 05 85 8f ee 13 +bb 6a 8a fc 47 df 4e dc 9a 4b a3 0b ce cb 73 d0 +15 78 52 32 7e e7 89 01 5c 2e 8d ee 7b 9f 05 a0 +f3 1a c9 4e b6 17 31 64 74 0c 5c 95 14 7c d5 f3 +b5 ae 2c b4 a8 37 87 f0 1d 8a b3 1f 27 c2 d0 ee +a2 dd 8a 11 ab 90 6a ba 20 7c 43 c6 ee 12 53 31 + +# CRT coefficient qInv: +12 f6 b2 cf 13 74 a7 36 fa d0 56 16 05 0f 96 ab +4b 61 d1 17 7c 7f 9d 52 5a 29 f3 d1 80 e7 76 67 +e9 9d 99 ab f0 52 5d 07 58 66 0f 37 52 65 5b 0f +25 b8 df 84 31 d9 a8 ff 77 c1 6c 12 a0 a5 12 2a +9f 0b f7 cf d5 a2 66 a3 5c 15 9f 99 12 08 b9 03 +16 ff 44 4f 3e 0b 6b d0 e9 3b 8a 7a 24 48 e9 57 +e3 dd a6 cf cf 22 66 b1 06 01 3a c4 68 08 d3 b3 +88 7b 3b 00 34 4b aa c9 53 0b 4c e7 08 fc 32 b6 + +# --------------------------------- +# RSASSA-PSS Signature Example 10.1 +# --------------------------------- + +# Message to be signed: +88 31 77 e5 12 6b 9b e2 d9 a9 68 03 27 d5 37 0c +6f 26 86 1f 58 20 c4 3d a6 7a 3a d6 09 + +# Salt: +04 e2 15 ee 6f f9 34 b9 da 70 d7 73 0c 87 34 ab +fc ec de 89 + +# Signature: +82 c2 b1 60 09 3b 8a a3 c0 f7 52 2b 19 f8 73 54 +06 6c 77 84 7a bf 2a 9f ce 54 2d 0e 84 e9 20 c5 +af b4 9f fd fd ac e1 65 60 ee 94 a1 36 96 01 14 +8e ba d7 a0 e1 51 cf 16 33 17 91 a5 72 7d 05 f2 +1e 74 e7 eb 81 14 40 20 69 35 d7 44 76 5a 15 e7 +9f 01 5c b6 6c 53 2c 87 a6 a0 59 61 c8 bf ad 74 +1a 9a 66 57 02 28 94 39 3e 72 23 73 97 96 c0 2a +77 45 5d 0f 55 5b 0e c0 1d df 25 9b 62 07 fd 0f +d5 76 14 ce f1 a5 57 3b aa ff 4e c0 00 69 95 16 +59 b8 5f 24 30 0a 25 16 0c a8 52 2d c6 e6 72 7e +57 d0 19 d7 e6 36 29 b8 fe 5e 89 e2 5c c1 5b eb +3a 64 75 77 55 92 99 28 0b 9b 28 f7 9b 04 09 00 +0b e2 5b bd 96 40 8b a3 b4 3c c4 86 18 4d d1 c8 +e6 25 53 fa 1a f4 04 0f 60 66 3d e7 f5 e4 9c 04 +38 8e 25 7f 1c e8 9c 95 da b4 8a 31 5d 9b 66 b1 +b7 62 82 33 87 6f f2 38 52 30 d0 70 d0 7e 16 66 + +# --------------------------------- +# RSASSA-PSS Signature Example 10.2 +# --------------------------------- + +# Message to be signed: +dd 67 0a 01 46 58 68 ad c9 3f 26 13 19 57 a5 0c +52 fb 77 7c db aa 30 89 2c 9e 12 36 11 64 ec 13 +97 9d 43 04 81 18 e4 44 5d b8 7b ee 58 dd 98 7b +34 25 d0 20 71 d8 db ae 80 70 8b 03 9d bb 64 db +d1 de 56 57 d9 fe d0 c1 18 a5 41 43 74 2e 0f f3 +c8 7f 74 e4 58 57 64 7a f3 f7 9e b0 a1 4c 9d 75 +ea 9a 1a 04 b7 cf 47 8a 89 7a 70 8f d9 88 f4 8e +80 1e db 0b 70 39 df 8c 23 bb 3c 56 f4 e8 21 ac + +# Salt: +8b 2b dd 4b 40 fa f5 45 c7 78 dd f9 bc 1a 49 cb +57 f9 b7 1b + +# Signature: +14 ae 35 d9 dd 06 ba 92 f7 f3 b8 97 97 8a ed 7c +d4 bf 5f f0 b5 85 a4 0b d4 6c e1 b4 2c d2 70 30 +53 bb 90 44 d6 4e 81 3d 8f 96 db 2d d7 00 7d 10 +11 8f 6f 8f 84 96 09 7a d7 5e 1f f6 92 34 1b 28 +92 ad 55 a6 33 a1 c5 5e 7f 0a 0a d5 9a 0e 20 3a +5b 82 78 ae c5 4d d8 62 2e 28 31 d8 71 74 f8 ca +ff 43 ee 6c 46 44 53 45 d8 4a 59 65 9b fb 92 ec +d4 c8 18 66 86 95 f3 47 06 f6 68 28 a8 99 59 63 +7f 2b f3 e3 25 1c 24 bd ba 4d 4b 76 49 da 00 22 +21 8b 11 9c 84 e7 9a 65 27 ec 5b 8a 5f 86 1c 15 +99 52 e2 3e c0 5e 1e 71 73 46 fa ef e8 b1 68 68 +25 bd 2b 26 2f b2 53 10 66 c0 de 09 ac de 2e 42 +31 69 07 28 b5 d8 5e 11 5a 2f 6b 92 b7 9c 25 ab +c9 bd 93 99 ff 8b cf 82 5a 52 ea 1f 56 ea 76 dd +26 f4 3b aa fa 18 bf a9 2a 50 4c bd 35 69 9e 26 +d1 dc c5 a2 88 73 85 f3 c6 32 32 f0 6f 32 44 c3 + +# --------------------------------- +# RSASSA-PSS Signature Example 10.3 +# --------------------------------- + +# Message to be signed: +48 b2 b6 a5 7a 63 c8 4c ea 85 9d 65 c6 68 28 4b +08 d9 6b dc aa be 25 2d b0 e4 a9 6c b1 ba c6 01 +93 41 db 6f be fb 8d 10 6b 0e 90 ed a6 bc c6 c6 +26 2f 37 e7 ea 9c 7e 5d 22 6b d7 df 85 ec 5e 71 +ef ff 2f 54 c5 db 57 7f f7 29 ff 91 b8 42 49 1d +e2 74 1d 0c 63 16 07 df 58 6b 90 5b 23 b9 1a f1 +3d a1 23 04 bf 83 ec a8 a7 3e 87 1f f9 db + +# Salt: +4e 96 fc 1b 39 8f 92 b4 46 71 01 0c 0d c3 ef d6 +e2 0c 2d 73 + +# Signature: +6e 3e 4d 7b 6b 15 d2 fb 46 01 3b 89 00 aa 5b bb +39 39 cf 2c 09 57 17 98 70 42 02 6e e6 2c 74 c5 +4c ff d5 d7 d5 7e fb bf 95 0a 0f 5c 57 4f a0 9d +3f c1 c9 f5 13 b0 5b 4f f5 0d d8 df 7e df a2 01 +02 85 4c 35 e5 92 18 01 19 a7 0c e5 b0 85 18 2a +a0 2d 9e a2 aa 90 d1 df 03 f2 da ae 88 5b a2 f5 +d0 5a fd ac 97 47 6f 06 b9 3b 5b c9 4a 1a 80 aa +91 16 c4 d6 15 f3 33 b0 98 89 2b 25 ff ac e2 66 +f5 db 5a 5a 3b cc 10 a8 24 ed 55 aa d3 5b 72 78 +34 fb 8c 07 da 28 fc f4 16 a5 d9 b2 22 4f 1f 8b +44 2b 36 f9 1e 45 6f de a2 d7 cf e3 36 72 68 de +03 07 a4 c7 4e 92 41 59 ed 33 39 3d 5e 06 55 53 +1c 77 32 7b 89 82 1b de df 88 01 61 c7 8c d4 19 +6b 54 19 f7 ac c3 f1 3e 5e bf 16 1b 6e 7c 67 24 +71 6c a3 3b 85 c2 e2 56 40 19 2a c2 85 96 51 d5 +0b de 7e b9 76 e5 1c ec 82 8b 98 b6 56 3b 86 bb + +# --------------------------------- +# RSASSA-PSS Signature Example 10.4 +# --------------------------------- + +# Message to be signed: +0b 87 77 c7 f8 39 ba f0 a6 4b bb db c5 ce 79 75 +5c 57 a2 05 b8 45 c1 74 e2 d2 e9 05 46 a0 89 c4 +e6 ec 8a df fa 23 a7 ea 97 ba e6 b6 5d 78 2b 82 +db 5d 2b 5a 56 d2 2a 29 a0 5e 7c 44 33 e2 b8 2a +62 1a bb a9 0a dd 05 ce 39 3f c4 8a 84 05 42 45 +1a + +# Salt: +c7 cd 69 8d 84 b6 51 28 d8 83 5e 3a 8b 1e b0 e0 +1c b5 41 ec + +# Signature: +34 04 7f f9 6c 4d c0 dc 90 b2 d4 ff 59 a1 a3 61 +a4 75 4b 25 5d 2e e0 af 7d 8b f8 7c 9b c9 e7 dd +ee de 33 93 4c 63 ca 1c 0e 3d 26 2c b1 45 ef 93 +2a 1f 2c 0a 99 7a a6 a3 4f 8e ae e7 47 7d 82 cc +f0 90 95 a6 b8 ac ad 38 d4 ee c9 fb 7e ab 7a d0 +2d a1 d1 1d 8e 54 c1 82 5e 55 bf 58 c2 a2 32 34 +b9 02 be 12 4f 9e 90 38 a8 f6 8f a4 5d ab 72 f6 +6e 09 45 bf 1d 8b ac c9 04 4c 6f 07 09 8c 9f ce +c5 8a 3a ab 10 0c 80 51 78 15 5f 03 0a 12 4c 45 +0e 5a cb da 47 d0 e4 f1 0b 80 a2 3f 80 3e 77 4d +02 3b 00 15 c2 0b 9f 9b be 7c 91 29 63 38 d5 ec +b4 71 ca fb 03 20 07 b6 7a 60 be 5f 69 50 4a 9f +01 ab b3 cb 46 7b 26 0e 2b ce 86 0b e8 d9 5b f9 +2c 0c 8e 14 96 ed 1e 52 85 93 a4 ab b6 df 46 2d +de 8a 09 68 df fe 46 83 11 68 57 a2 32 f5 eb f6 +c8 5b e2 38 74 5a d0 f3 8f 76 7a 5f db f4 86 fb + +# --------------------------------- +# RSASSA-PSS Signature Example 10.5 +# --------------------------------- + +# Message to be signed: +f1 03 6e 00 8e 71 e9 64 da dc 92 19 ed 30 e1 7f +06 b4 b6 8a 95 5c 16 b3 12 b1 ed df 02 8b 74 97 +6b ed 6b 3f 6a 63 d4 e7 78 59 24 3c 9c cc dc 98 +01 65 23 ab b0 24 83 b3 55 91 c3 3a ad 81 21 3b +b7 c7 bb 1a 47 0a ab c1 0d 44 25 6c 4d 45 59 d9 +16 + +# Salt: +ef a8 bf f9 62 12 b2 f4 a3 f3 71 a1 0d 57 41 52 +65 5f 5d fb + +# Signature: +7e 09 35 ea 18 f4 d6 c1 d1 7c e8 2e b2 b3 83 6c +55 b3 84 58 9c e1 9d fe 74 33 63 ac 99 48 d1 f3 +46 b7 bf dd fe 92 ef d7 8a db 21 fa ef c8 9a de +42 b1 0f 37 40 03 fe 12 2e 67 42 9a 1c b8 cb d1 +f8 d9 01 45 64 c4 4d 12 01 16 f4 99 0f 1a 6e 38 +77 4c 19 4b d1 b8 21 32 86 b0 77 b0 49 9d 2e 7b +3f 43 4a b1 22 89 c5 56 68 4d ee d7 81 31 93 4b +b3 dd 65 37 23 6f 7c 6f 3d cb 09 d4 76 be 07 72 +1e 37 e1 ce ed 9b 2f 7b 40 68 87 bd 53 15 73 05 +e1 c8 b4 f8 4d 73 3b c1 e1 86 fe 06 cc 59 b6 ed +b8 f4 bd 7f fe fd f4 f7 ba 9c fb 9d 57 06 89 b5 +a1 a4 10 9a 74 6a 69 08 93 db 37 99 25 5a 0c b9 +21 5d 2d 1c d4 90 59 0e 95 2e 8c 87 86 aa 00 11 +26 52 52 47 0c 04 1d fb c3 ee c7 c3 cb f7 1c 24 +86 9d 11 5c 0c b4 a9 56 f5 6d 53 0b 80 ab 58 9a +cf ef c6 90 75 1d df 36 e8 d3 83 f8 3c ed d2 cc + +# --------------------------------- +# RSASSA-PSS Signature Example 10.6 +# --------------------------------- + +# Message to be signed: +25 f1 08 95 a8 77 16 c1 37 45 0b b9 51 9d fa a1 +f2 07 fa a9 42 ea 88 ab f7 1e 9c 17 98 00 85 b5 +55 ae ba b7 62 64 ae 2a 3a b9 3c 2d 12 98 11 91 +dd ac 6f b5 94 9e b3 6a ee 3c 5d a9 40 f0 07 52 +c9 16 d9 46 08 fa 7d 97 ba 6a 29 15 b6 88 f2 03 +23 d4 e9 d9 68 01 d8 9a 72 ab 58 92 dc 21 17 c0 +74 34 fc f9 72 e0 58 cf 8c 41 ca 4b 4f f5 54 f7 +d5 06 8a d3 15 5f ce d0 f3 12 5b c0 4f 91 93 37 +8a 8f 5c 4c 3b 8c b4 dd 6d 1c c6 9d 30 ec ca 6e +aa 51 e3 6a 05 73 0e 9e 34 2e 85 5b af 09 9d ef +b8 af d7 + +# Salt: +ad 8b 15 23 70 36 46 22 4b 66 0b 55 08 85 91 7c +a2 d1 df 28 + +# Signature: +6d 3b 5b 87 f6 7e a6 57 af 21 f7 54 41 97 7d 21 +80 f9 1b 2c 5f 69 2d e8 29 55 69 6a 68 67 30 d9 +b9 77 8d 97 07 58 cc b2 60 71 c2 20 9f fb d6 12 +5b e2 e9 6e a8 1b 67 cb 9b 93 08 23 9f da 17 f7 +b2 b6 4e cd a0 96 b6 b9 35 64 0a 5a 1c b4 2a 91 +55 b1 c9 ef 7a 63 3a 02 c5 9f 0d 6e e5 9b 85 2c +43 b3 50 29 e7 3c 94 0f f0 41 0e 8f 11 4e ed 46 +bb d0 fa e1 65 e4 2b e2 52 8a 40 1c 3b 28 fd 81 +8e f3 23 2d ca 9f 4d 2a 0f 51 66 ec 59 c4 23 96 +d6 c1 1d bc 12 15 a5 6f a1 71 69 db 95 75 34 3e +f3 4f 9d e3 2a 49 cd c3 17 49 22 f2 29 c2 3e 18 +e4 5d f9 35 31 19 ec 43 19 ce dc e7 a1 7c 64 08 +8c 1f 6f 52 be 29 63 41 00 b3 91 9d 38 f3 d1 ed +94 e6 89 1e 66 a7 3b 8f b8 49 f5 87 4d f5 94 59 +e2 98 c7 bb ce 2e ee 78 2a 19 5a a6 6f e2 d0 73 +2b 25 e5 95 f5 7d 3e 06 1b 1f c3 e4 06 3b f9 8f + +# ============================================= diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/rsa-testvectors/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/notes/rsa-testvectors/readme.txt Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,22 @@ +==================== +pkcs-1v2-1-vec.zip +==================== + +This directory contains test vectors for RSAES-OAEP and +RSASSA-PSS as defined in PKCS #1 v2.1. + +The files: + +readme.txt This file. + +oaep-vect.txt Test vectors for RSAES-OAEP encryption. + +oaep-int.txt Intermediate values for RSAES-OAEP + encryption and RSA decryption with CRT. + Also, DER-encoded RSAPrivateKey and + RSAPublicKey types. + +pss-vect.txt Test vectors for RSASSA-PSS signing. + +pss-int.txt Intermediate values for RSASSA-PSS + signing. diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/rsa-testvectors/rt.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/notes/rsa-testvectors/rt.py Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,253 @@ +#!/usr/bin/env python + +import sys +import os +import hashlib + +def md5_for_file(path, block_size=256*128): + ''' + Block size directly depends on the block size of your filesystem + to avoid performances issues + Here I have blocks of 4096 octets (Default NTFS) + ''' + md5 = hashlib.md5() + with open(path,'rb') as f: + for chunk in iter(lambda: f.read(block_size), b''): + md5.update(chunk) + f.close() + return md5.hexdigest() + +def read_until_ends(f, s): + while True: + l = f.readline() + if l.strip().endswith(s): + break + return l + +def read_until_start(f, s): + while True: + l = f.readline() + if l.startswith(s): + break + return l + +def read_hex(f): + t = [] + while True: + l = f.readline() + if l.strip() == '': + break + t.extend(l.strip().split(' ')) + return t + +class NamedData(object): + def __init__(self, name, data): + self.name = name + self.data = data + + def __str__(self): + return " /* {0} */\n {1},\n {{ {2} }}\n".format(self.name, len(self.data), ', '.join('0x' + x for x in self.data)) + +def read_part(f, s): + name = read_until_start(f, s).strip().lstrip('# ').rstrip(':') + data = read_hex(f) + e = NamedData(name, data) + return e + +class RsaKey(object): + def __init__(self, n, e, d, p, q, dP, dQ, qInv): + self.n = n + self.e = e + self.d = d + self.p = p + self.q = q + self.dP = dP + self.dQ = dQ + self.qInv = qInv + + def __str__(self): + return "{{\n{0},\n{1},\n{2},\n{3},\n{4},\n{5},\n{6},\n{7}\n}}\n".format(self.n, self.e, self.d, self.p, self.q, self.dP, self.dQ, self.qInv) + +def read_key(f): + if ftype.version == 1: + read_until_start(f, '# Private key') + n = read_part(f, ftype.n) + e = read_part(f, ftype.e) + d = read_part(f, ftype.d) + p = read_part(f, ftype.p) + q = read_part(f, ftype.q) + dP = read_part(f, ftype.dP) + dQ = read_part(f, ftype.dQ) + qInv = read_part(f, ftype.qInv) + k = RsaKey(n, e, d, p, q, dP, dQ, qInv) + return k + +class Data(object): + def __init__(self, name, obj1, obj2, obj3): + self.name = name + self.obj1 = obj1 + self.obj2 = obj2 + self.obj3 = obj3 + + def __str__(self): + if self.obj3 == None: + return "{{\n \"{0}\",\n{1},\n{2}\n}}\n,".format(self.name, self.obj1, self.obj2) + else: + return "{{\n \"{0}\",\n{1},\n{2},\n{3}\n}}\n,".format(self.name, self.obj1, self.obj2, self.obj3) + +def read_data(f): + name = read_until_start(f, ftype.o).strip().lstrip('# ') + obj1 = read_part(f, ftype.o1) + obj2 = read_part(f, ftype.o2) + if ftype.name == 'emsa': + obj3 = None + else: + obj3 = read_part(f, ftype.o3) + s = Data(name, obj1, obj2, obj3) + return s + +class Example(object): + def __init__(self, name, key, data): + self.name = name + self.key = key + self.data = data + + def __str__(self): + res = "{{\n \"{0}\",\n{1},\n{{".format(self.name, str(self.key)) + for idx, d in enumerate(self.data, 1): + if idx == 2: + res += '#ifdef LTC_TEST_EXT\n' + res += str(d) + '\n' + if idx == ftype.numcases: + res += '#endif /* LTC_TEST_EXT */\n' + res += '}\n},' + return res + +def read_example(f): + name = read_until_start(f, '# Example').strip().lstrip('# ') + key = read_key(f) + l = read_until_start(f, ftype.sod) + d = [] + while l.strip().startswith(ftype.sod): + if ftype.version == 1: + f.seek(-len(l), os.SEEK_CUR) + data = read_data(f) + d.append(data) + l = read_until_start(f, '#') + + e = Example(name, key, d) + f.seek(-len(l), os.SEEK_CUR) + return e + + +class PkcsType(object): + def __init__(self, name): + if name == 'pss': + self.o = '# RSASSA-PSS Signature Example' + self.o1 = '# Message to be signed' + self.o2 = '# Salt' + self.o3 = '# Signature' + elif name == 'oaep': + self.o = '# RSAES-OAEP Encryption Example' + self.o1 = '# Message to be encrypted' + self.o2 = '# Seed' + self.o3 = '# Encryption' + elif name == 'emsa': + self.o = '# PKCS#1 v1.5 Signature Example' + self.o1 = '# Message to be signed' + self.o2 = '# Signature' + elif name == 'eme': + self.o = '# PKCS#1 v1.5 Encryption Example' + self.o1 = '# Message' + self.o2 = '# Seed' + self.o3 = '# Encryption' + else: + raise ValueError('Type unknown: ' + name) + + if name == 'pss' or name == 'oaep': + self.version = 2 + self.numcases = 6 + self.n = '# RSA modulus n' + self.e = '# RSA public exponent e' + self.d = '# RSA private exponent d' + self.p = '# Prime p' + self.q = '# Prime q' + self.dP = '# p\'s CRT exponent dP' + self.dQ = '# q\'s CRT exponent dQ' + self.qInv = '# CRT coefficient qInv' + self.sod = '# --------------------------------' + elif name == 'emsa' or name == 'eme': + self.version = 1 + self.numcases = 20 + self.n = '# Modulus' + self.e = '# Public exponent' + self.d = '# Exponent' + self.p = '# Prime 1' + self.q = '# Prime 2' + self.dP = '# Prime exponent 1' + self.dQ = '# Prime exponent 2' + self.qInv = '# Coefficient' + self.sod = self.o + self.name = name + +ftype = PkcsType(sys.argv[2]) + +print('/* Generated from file: %s\n * with md5 hash: %s\n */\n' % (sys.argv[1], md5_for_file(sys.argv[1]))) +print(''' +typedef struct rsaKey { + int n_l; + unsigned char n[256]; + int e_l; + unsigned char e[256]; + int d_l; + unsigned char d[256]; + int p_l; + unsigned char p[256]; + int q_l; + unsigned char q[256]; + int dP_l; + unsigned char dP[256]; + int dQ_l; + unsigned char dQ[256]; + int qInv_l; + unsigned char qInv[256]; +} rsaKey_t; + +typedef struct rsaData { + const char* name; + int o1_l; + unsigned char o1[256]; + int o2_l; + unsigned char o2[256];''') + +if ftype.name != 'emsa': + print(''' int o3_l; + unsigned char o3[256];''') + +print('''} rsaData_t; + +typedef struct testcase { + const char* name; + rsaKey_t rsa; +#ifdef LTC_TEST_EXT + rsaData_t data[%d]; +#else + rsaData_t data[1]; +#endif /* LTC_TEST_EXT */ +} testcase_t; + +testcase_t testcases_%s[] = + {''' % (ftype.numcases, sys.argv[2])) + +with open(sys.argv[1], 'rb') as f: + ex = [] + while read_until_ends(f, '============================================='): + if f.tell() == os.path.getsize(sys.argv[1]): + break + e = read_example(f) + ex.append(e) + + for i in ex: + print(i) +f.close() +print('};\n') diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/notes/tech0003.txt --- a/libtomcrypt/notes/tech0003.txt Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/notes/tech0003.txt Fri Feb 09 21:44:05 2018 +0800 @@ -47,6 +47,6 @@ fairly fast as well. You can easily accomplish this via the "config.pl" script. Simply answer "n" to all of the ciphers except the one you want -and then rebuild the library. [or you can hand edit mycrypt_custom.h] +and then rebuild the library. [or you can hand edit tomcrypt_custom.h] diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/printinfo.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/printinfo.sh Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,20 @@ +#!/bin/bash + +version=$(git describe --tags --always --dirty 2>/dev/null) +if [ ! -e ".git" ] || [ -z $version ] +then + version=$(grep "^VERSION=" makefile_include.mk | sed "s/.*=//") +fi +echo "Testing version:" $version +#grep "VERSION=" makefile | perl -e "@a = split('=', <>); print @a[1];"` + +# get uname +echo "uname="`uname -a` + +# get gcc name +if [ -z ${CC} ] +then + CC="gcc" +fi +echo "${CC}="`${CC} -dumpversion` +echo diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/run.sh --- a/libtomcrypt/run.sh Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/run.sh Fri Feb 09 21:44:05 2018 +0800 @@ -1,35 +1,49 @@ #!/bin/bash + +# output version +bash printinfo.sh + bash build.sh " $1" "$2 -O2" "$3 IGNORE_SPEED=1" "$4" "$5" if [ -a testok.txt ] && [ -f testok.txt ]; then echo else - echo - echo "Test failed" - exit 1 + echo + echo "Test failed" + exit 1 fi rm -f testok.txt -bash build.sh " $1" "$2 -Os" " $3 IGNORE_SPEED=1 LTC_SMALL=1" "$4" "$5" +bash build.sh " $1" "$2 -Os" "$3 IGNORE_SPEED=1 LTC_SMALL=1" "$4" "$5" if [ -a testok.txt ] && [ -f testok.txt ]; then echo else - echo - echo "Test failed" - exit 1 + echo + echo "Test failed" + exit 1 fi rm -f testok.txt -bash build.sh " $1" " $2" " $3 " "$4" "$5" +bash build.sh " $1" "$2" "$3 LTC_DEBUG=1" "$4" "$5" if [ -a testok.txt ] && [ -f testok.txt ]; then echo else - echo - echo "Test failed" - exit 1 + echo + echo "Test failed" + exit 1 +fi + +rm -f testok.txt +bash build.sh " $1" "$2" "$3" "$4" "$5" +if [ -a testok.txt ] && [ -f testok.txt ]; then + echo +else + echo + echo "Test failed" + exit 1 fi exit 0 -# $Source: /cvs/libtom/libtomcrypt/run.sh,v $ -# $Revision: 1.15 $ -# $Date: 2005/07/23 14:18:31 $ +# ref: $Format:%D$ +# git commit: $Format:%H$ +# commit time: $Format:%ai$ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/scan_build.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/scan_build.sh Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,19 @@ +#!/bin/bash +[ "$TRAVIS_CI" != "" ] && { [ -z "$(which scan-build)" ] && { echo "installing clang"; sudo apt-get install clang -y -qq; }; } || true + +if [ "$#" = "5" -a "$(echo $3 | grep -v 'makefile[.]')" = "" ]; then + echo "only run $0 for the regular makefile, early exit success" + exit 0 +fi + +# output version +bash printinfo.sh + +make clean > /dev/null + +scan_build=$(which scan-build) +[ -z "$scan_build" ] && scan_build=$(find /usr/bin/ -name 'scan-build-*' | sort -nr | head -n1) || true +[ -z "$scan_build" ] && { echo "couldn't find clang scan-build"; exit 1; } || echo "run $scan_build" +export CFLAGS="-DUSE_LTM -DLTM_DESC -I/usr/include" +export EXTRALIBS="-ltommath" +$scan_build --status-bugs make -f makefile.unix all CFLAGS="$CFLAGS" EXTRALIBS="$EXTRALIBS" diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/aes/aes.c --- a/libtomcrypt/src/ciphers/aes/aes.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/ciphers/aes/aes.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* AES implementation by Tom St Denis @@ -50,7 +48,7 @@ 6, 16, 32, 16, 10, SETUP, ECB_ENC, ECB_DEC, ECB_TEST, ECB_DONE, ECB_KS, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; #endif @@ -60,7 +58,7 @@ 6, 16, 32, 16, 10, SETUP, ECB_ENC, ECB_DEC, ECB_TEST, ECB_DONE, ECB_KS, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; #else @@ -76,7 +74,7 @@ 6, 16, 32, 16, 10, SETUP, ECB_ENC, NULL, NULL, ECB_DONE, ECB_KS, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; const struct ltc_cipher_descriptor aes_enc_desc = @@ -85,11 +83,12 @@ 6, 16, 32, 16, 10, SETUP, ECB_ENC, NULL, NULL, ECB_DONE, ECB_KS, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; #endif +#define __LTC_AES_TAB_C__ #include "aes_tab.c" static ulong32 setup_mix(ulong32 temp) @@ -149,9 +148,6 @@ LOAD32H(rk[2], key + 8); LOAD32H(rk[3], key + 12); if (keylen == 16) { - #ifndef ENCRYPT_ONLY - j = 44; - #endif for (;;) { temp = rk[3]; rk[4] = rk[0] ^ setup_mix(temp) ^ rcon[i]; @@ -164,9 +160,6 @@ rk += 4; } } else if (keylen == 24) { - #ifndef ENCRYPT_ONLY - j = 52; - #endif LOAD32H(rk[4], key + 16); LOAD32H(rk[5], key + 20); for (;;) { @@ -187,9 +180,6 @@ rk += 6; } } else if (keylen == 32) { - #ifndef ENCRYPT_ONLY - j = 60; - #endif LOAD32H(rk[4], key + 16); LOAD32H(rk[5], key + 20); LOAD32H(rk[6], key + 24); @@ -216,13 +206,14 @@ } } else { /* this can't happen */ + /* coverity[dead_error_line] */ return CRYPT_ERROR; } #ifndef ENCRYPT_ONLY /* setup the inverse key now */ rk = skey->rijndael.dK; - rrk = skey->rijndael.eK + j - 4; + rrk = skey->rijndael.eK + (28 + keylen) - 4; /* apply the inverse MixColumn transform to all round keys but the first and the last: */ /* copy first */ @@ -697,23 +688,8 @@ rijndael_ecb_encrypt(tests[i].pt, tmp[0], &key); rijndael_ecb_decrypt(tmp[0], tmp[1], &key); - if (XMEMCMP(tmp[0], tests[i].ct, 16) || XMEMCMP(tmp[1], tests[i].pt, 16)) { -#if 0 - printf("\n\nTest %d failed\n", i); - if (XMEMCMP(tmp[0], tests[i].ct, 16)) { - printf("CT: "); - for (i = 0; i < 16; i++) { - printf("%02x ", tmp[0][i]); - } - printf("\n"); - } else { - printf("PT: "); - for (i = 0; i < 16; i++) { - printf("%02x ", tmp[1][i]); - } - printf("\n"); - } -#endif + if (compare_testvector(tmp[0], 16, tests[i].ct, 16, "AES Encrypt", i) || + compare_testvector(tmp[1], 16, tests[i].pt, 16, "AES Decrypt", i)) { return CRYPT_FAIL_TESTVECTOR; } @@ -735,7 +711,7 @@ */ void ECB_DONE(symmetric_key *skey) { - (void)skey; + LTC_UNUSED_PARAM(skey); } @@ -765,6 +741,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/aes/aes_tab.c --- a/libtomcrypt/src/ciphers/aes/aes_tab.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/ciphers/aes/aes_tab.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* The precomputed tables for AES */ /* @@ -23,10 +21,12 @@ Td4[x] = Si[x].[01, 01, 01, 01]; */ +#ifdef __LTC_AES_TAB_C__ + /** @file aes_tab.c AES tables -*/ +*/ static const ulong32 TE0[256] = { 0xc66363a5UL, 0xf87c7c84UL, 0xee777799UL, 0xf67b7b8dUL, 0xfff2f20dUL, 0xd66b6bbdUL, 0xde6f6fb1UL, 0x91c5c554UL, @@ -532,142 +532,142 @@ #ifndef PELI_TAB static const ulong32 Te4_0[] = { -0x00000063UL, 0x0000007cUL, 0x00000077UL, 0x0000007bUL, 0x000000f2UL, 0x0000006bUL, 0x0000006fUL, 0x000000c5UL, -0x00000030UL, 0x00000001UL, 0x00000067UL, 0x0000002bUL, 0x000000feUL, 0x000000d7UL, 0x000000abUL, 0x00000076UL, -0x000000caUL, 0x00000082UL, 0x000000c9UL, 0x0000007dUL, 0x000000faUL, 0x00000059UL, 0x00000047UL, 0x000000f0UL, -0x000000adUL, 0x000000d4UL, 0x000000a2UL, 0x000000afUL, 0x0000009cUL, 0x000000a4UL, 0x00000072UL, 0x000000c0UL, -0x000000b7UL, 0x000000fdUL, 0x00000093UL, 0x00000026UL, 0x00000036UL, 0x0000003fUL, 0x000000f7UL, 0x000000ccUL, -0x00000034UL, 0x000000a5UL, 0x000000e5UL, 0x000000f1UL, 0x00000071UL, 0x000000d8UL, 0x00000031UL, 0x00000015UL, -0x00000004UL, 0x000000c7UL, 0x00000023UL, 0x000000c3UL, 0x00000018UL, 0x00000096UL, 0x00000005UL, 0x0000009aUL, -0x00000007UL, 0x00000012UL, 0x00000080UL, 0x000000e2UL, 0x000000ebUL, 0x00000027UL, 0x000000b2UL, 0x00000075UL, -0x00000009UL, 0x00000083UL, 0x0000002cUL, 0x0000001aUL, 0x0000001bUL, 0x0000006eUL, 0x0000005aUL, 0x000000a0UL, -0x00000052UL, 0x0000003bUL, 0x000000d6UL, 0x000000b3UL, 0x00000029UL, 0x000000e3UL, 0x0000002fUL, 0x00000084UL, -0x00000053UL, 0x000000d1UL, 0x00000000UL, 0x000000edUL, 0x00000020UL, 0x000000fcUL, 0x000000b1UL, 0x0000005bUL, -0x0000006aUL, 0x000000cbUL, 0x000000beUL, 0x00000039UL, 0x0000004aUL, 0x0000004cUL, 0x00000058UL, 0x000000cfUL, -0x000000d0UL, 0x000000efUL, 0x000000aaUL, 0x000000fbUL, 0x00000043UL, 0x0000004dUL, 0x00000033UL, 0x00000085UL, -0x00000045UL, 0x000000f9UL, 0x00000002UL, 0x0000007fUL, 0x00000050UL, 0x0000003cUL, 0x0000009fUL, 0x000000a8UL, -0x00000051UL, 0x000000a3UL, 0x00000040UL, 0x0000008fUL, 0x00000092UL, 0x0000009dUL, 0x00000038UL, 0x000000f5UL, -0x000000bcUL, 0x000000b6UL, 0x000000daUL, 0x00000021UL, 0x00000010UL, 0x000000ffUL, 0x000000f3UL, 0x000000d2UL, -0x000000cdUL, 0x0000000cUL, 0x00000013UL, 0x000000ecUL, 0x0000005fUL, 0x00000097UL, 0x00000044UL, 0x00000017UL, -0x000000c4UL, 0x000000a7UL, 0x0000007eUL, 0x0000003dUL, 0x00000064UL, 0x0000005dUL, 0x00000019UL, 0x00000073UL, -0x00000060UL, 0x00000081UL, 0x0000004fUL, 0x000000dcUL, 0x00000022UL, 0x0000002aUL, 0x00000090UL, 0x00000088UL, -0x00000046UL, 0x000000eeUL, 0x000000b8UL, 0x00000014UL, 0x000000deUL, 0x0000005eUL, 0x0000000bUL, 0x000000dbUL, -0x000000e0UL, 0x00000032UL, 0x0000003aUL, 0x0000000aUL, 0x00000049UL, 0x00000006UL, 0x00000024UL, 0x0000005cUL, -0x000000c2UL, 0x000000d3UL, 0x000000acUL, 0x00000062UL, 0x00000091UL, 0x00000095UL, 0x000000e4UL, 0x00000079UL, -0x000000e7UL, 0x000000c8UL, 0x00000037UL, 0x0000006dUL, 0x0000008dUL, 0x000000d5UL, 0x0000004eUL, 0x000000a9UL, -0x0000006cUL, 0x00000056UL, 0x000000f4UL, 0x000000eaUL, 0x00000065UL, 0x0000007aUL, 0x000000aeUL, 0x00000008UL, -0x000000baUL, 0x00000078UL, 0x00000025UL, 0x0000002eUL, 0x0000001cUL, 0x000000a6UL, 0x000000b4UL, 0x000000c6UL, -0x000000e8UL, 0x000000ddUL, 0x00000074UL, 0x0000001fUL, 0x0000004bUL, 0x000000bdUL, 0x0000008bUL, 0x0000008aUL, -0x00000070UL, 0x0000003eUL, 0x000000b5UL, 0x00000066UL, 0x00000048UL, 0x00000003UL, 0x000000f6UL, 0x0000000eUL, -0x00000061UL, 0x00000035UL, 0x00000057UL, 0x000000b9UL, 0x00000086UL, 0x000000c1UL, 0x0000001dUL, 0x0000009eUL, -0x000000e1UL, 0x000000f8UL, 0x00000098UL, 0x00000011UL, 0x00000069UL, 0x000000d9UL, 0x0000008eUL, 0x00000094UL, -0x0000009bUL, 0x0000001eUL, 0x00000087UL, 0x000000e9UL, 0x000000ceUL, 0x00000055UL, 0x00000028UL, 0x000000dfUL, -0x0000008cUL, 0x000000a1UL, 0x00000089UL, 0x0000000dUL, 0x000000bfUL, 0x000000e6UL, 0x00000042UL, 0x00000068UL, +0x00000063UL, 0x0000007cUL, 0x00000077UL, 0x0000007bUL, 0x000000f2UL, 0x0000006bUL, 0x0000006fUL, 0x000000c5UL, +0x00000030UL, 0x00000001UL, 0x00000067UL, 0x0000002bUL, 0x000000feUL, 0x000000d7UL, 0x000000abUL, 0x00000076UL, +0x000000caUL, 0x00000082UL, 0x000000c9UL, 0x0000007dUL, 0x000000faUL, 0x00000059UL, 0x00000047UL, 0x000000f0UL, +0x000000adUL, 0x000000d4UL, 0x000000a2UL, 0x000000afUL, 0x0000009cUL, 0x000000a4UL, 0x00000072UL, 0x000000c0UL, +0x000000b7UL, 0x000000fdUL, 0x00000093UL, 0x00000026UL, 0x00000036UL, 0x0000003fUL, 0x000000f7UL, 0x000000ccUL, +0x00000034UL, 0x000000a5UL, 0x000000e5UL, 0x000000f1UL, 0x00000071UL, 0x000000d8UL, 0x00000031UL, 0x00000015UL, +0x00000004UL, 0x000000c7UL, 0x00000023UL, 0x000000c3UL, 0x00000018UL, 0x00000096UL, 0x00000005UL, 0x0000009aUL, +0x00000007UL, 0x00000012UL, 0x00000080UL, 0x000000e2UL, 0x000000ebUL, 0x00000027UL, 0x000000b2UL, 0x00000075UL, +0x00000009UL, 0x00000083UL, 0x0000002cUL, 0x0000001aUL, 0x0000001bUL, 0x0000006eUL, 0x0000005aUL, 0x000000a0UL, +0x00000052UL, 0x0000003bUL, 0x000000d6UL, 0x000000b3UL, 0x00000029UL, 0x000000e3UL, 0x0000002fUL, 0x00000084UL, +0x00000053UL, 0x000000d1UL, 0x00000000UL, 0x000000edUL, 0x00000020UL, 0x000000fcUL, 0x000000b1UL, 0x0000005bUL, +0x0000006aUL, 0x000000cbUL, 0x000000beUL, 0x00000039UL, 0x0000004aUL, 0x0000004cUL, 0x00000058UL, 0x000000cfUL, +0x000000d0UL, 0x000000efUL, 0x000000aaUL, 0x000000fbUL, 0x00000043UL, 0x0000004dUL, 0x00000033UL, 0x00000085UL, +0x00000045UL, 0x000000f9UL, 0x00000002UL, 0x0000007fUL, 0x00000050UL, 0x0000003cUL, 0x0000009fUL, 0x000000a8UL, +0x00000051UL, 0x000000a3UL, 0x00000040UL, 0x0000008fUL, 0x00000092UL, 0x0000009dUL, 0x00000038UL, 0x000000f5UL, +0x000000bcUL, 0x000000b6UL, 0x000000daUL, 0x00000021UL, 0x00000010UL, 0x000000ffUL, 0x000000f3UL, 0x000000d2UL, +0x000000cdUL, 0x0000000cUL, 0x00000013UL, 0x000000ecUL, 0x0000005fUL, 0x00000097UL, 0x00000044UL, 0x00000017UL, +0x000000c4UL, 0x000000a7UL, 0x0000007eUL, 0x0000003dUL, 0x00000064UL, 0x0000005dUL, 0x00000019UL, 0x00000073UL, +0x00000060UL, 0x00000081UL, 0x0000004fUL, 0x000000dcUL, 0x00000022UL, 0x0000002aUL, 0x00000090UL, 0x00000088UL, +0x00000046UL, 0x000000eeUL, 0x000000b8UL, 0x00000014UL, 0x000000deUL, 0x0000005eUL, 0x0000000bUL, 0x000000dbUL, +0x000000e0UL, 0x00000032UL, 0x0000003aUL, 0x0000000aUL, 0x00000049UL, 0x00000006UL, 0x00000024UL, 0x0000005cUL, +0x000000c2UL, 0x000000d3UL, 0x000000acUL, 0x00000062UL, 0x00000091UL, 0x00000095UL, 0x000000e4UL, 0x00000079UL, +0x000000e7UL, 0x000000c8UL, 0x00000037UL, 0x0000006dUL, 0x0000008dUL, 0x000000d5UL, 0x0000004eUL, 0x000000a9UL, +0x0000006cUL, 0x00000056UL, 0x000000f4UL, 0x000000eaUL, 0x00000065UL, 0x0000007aUL, 0x000000aeUL, 0x00000008UL, +0x000000baUL, 0x00000078UL, 0x00000025UL, 0x0000002eUL, 0x0000001cUL, 0x000000a6UL, 0x000000b4UL, 0x000000c6UL, +0x000000e8UL, 0x000000ddUL, 0x00000074UL, 0x0000001fUL, 0x0000004bUL, 0x000000bdUL, 0x0000008bUL, 0x0000008aUL, +0x00000070UL, 0x0000003eUL, 0x000000b5UL, 0x00000066UL, 0x00000048UL, 0x00000003UL, 0x000000f6UL, 0x0000000eUL, +0x00000061UL, 0x00000035UL, 0x00000057UL, 0x000000b9UL, 0x00000086UL, 0x000000c1UL, 0x0000001dUL, 0x0000009eUL, +0x000000e1UL, 0x000000f8UL, 0x00000098UL, 0x00000011UL, 0x00000069UL, 0x000000d9UL, 0x0000008eUL, 0x00000094UL, +0x0000009bUL, 0x0000001eUL, 0x00000087UL, 0x000000e9UL, 0x000000ceUL, 0x00000055UL, 0x00000028UL, 0x000000dfUL, +0x0000008cUL, 0x000000a1UL, 0x00000089UL, 0x0000000dUL, 0x000000bfUL, 0x000000e6UL, 0x00000042UL, 0x00000068UL, 0x00000041UL, 0x00000099UL, 0x0000002dUL, 0x0000000fUL, 0x000000b0UL, 0x00000054UL, 0x000000bbUL, 0x00000016UL }; static const ulong32 Te4_1[] = { -0x00006300UL, 0x00007c00UL, 0x00007700UL, 0x00007b00UL, 0x0000f200UL, 0x00006b00UL, 0x00006f00UL, 0x0000c500UL, -0x00003000UL, 0x00000100UL, 0x00006700UL, 0x00002b00UL, 0x0000fe00UL, 0x0000d700UL, 0x0000ab00UL, 0x00007600UL, -0x0000ca00UL, 0x00008200UL, 0x0000c900UL, 0x00007d00UL, 0x0000fa00UL, 0x00005900UL, 0x00004700UL, 0x0000f000UL, -0x0000ad00UL, 0x0000d400UL, 0x0000a200UL, 0x0000af00UL, 0x00009c00UL, 0x0000a400UL, 0x00007200UL, 0x0000c000UL, -0x0000b700UL, 0x0000fd00UL, 0x00009300UL, 0x00002600UL, 0x00003600UL, 0x00003f00UL, 0x0000f700UL, 0x0000cc00UL, -0x00003400UL, 0x0000a500UL, 0x0000e500UL, 0x0000f100UL, 0x00007100UL, 0x0000d800UL, 0x00003100UL, 0x00001500UL, -0x00000400UL, 0x0000c700UL, 0x00002300UL, 0x0000c300UL, 0x00001800UL, 0x00009600UL, 0x00000500UL, 0x00009a00UL, -0x00000700UL, 0x00001200UL, 0x00008000UL, 0x0000e200UL, 0x0000eb00UL, 0x00002700UL, 0x0000b200UL, 0x00007500UL, -0x00000900UL, 0x00008300UL, 0x00002c00UL, 0x00001a00UL, 0x00001b00UL, 0x00006e00UL, 0x00005a00UL, 0x0000a000UL, -0x00005200UL, 0x00003b00UL, 0x0000d600UL, 0x0000b300UL, 0x00002900UL, 0x0000e300UL, 0x00002f00UL, 0x00008400UL, -0x00005300UL, 0x0000d100UL, 0x00000000UL, 0x0000ed00UL, 0x00002000UL, 0x0000fc00UL, 0x0000b100UL, 0x00005b00UL, -0x00006a00UL, 0x0000cb00UL, 0x0000be00UL, 0x00003900UL, 0x00004a00UL, 0x00004c00UL, 0x00005800UL, 0x0000cf00UL, -0x0000d000UL, 0x0000ef00UL, 0x0000aa00UL, 0x0000fb00UL, 0x00004300UL, 0x00004d00UL, 0x00003300UL, 0x00008500UL, -0x00004500UL, 0x0000f900UL, 0x00000200UL, 0x00007f00UL, 0x00005000UL, 0x00003c00UL, 0x00009f00UL, 0x0000a800UL, -0x00005100UL, 0x0000a300UL, 0x00004000UL, 0x00008f00UL, 0x00009200UL, 0x00009d00UL, 0x00003800UL, 0x0000f500UL, -0x0000bc00UL, 0x0000b600UL, 0x0000da00UL, 0x00002100UL, 0x00001000UL, 0x0000ff00UL, 0x0000f300UL, 0x0000d200UL, -0x0000cd00UL, 0x00000c00UL, 0x00001300UL, 0x0000ec00UL, 0x00005f00UL, 0x00009700UL, 0x00004400UL, 0x00001700UL, -0x0000c400UL, 0x0000a700UL, 0x00007e00UL, 0x00003d00UL, 0x00006400UL, 0x00005d00UL, 0x00001900UL, 0x00007300UL, -0x00006000UL, 0x00008100UL, 0x00004f00UL, 0x0000dc00UL, 0x00002200UL, 0x00002a00UL, 0x00009000UL, 0x00008800UL, -0x00004600UL, 0x0000ee00UL, 0x0000b800UL, 0x00001400UL, 0x0000de00UL, 0x00005e00UL, 0x00000b00UL, 0x0000db00UL, -0x0000e000UL, 0x00003200UL, 0x00003a00UL, 0x00000a00UL, 0x00004900UL, 0x00000600UL, 0x00002400UL, 0x00005c00UL, -0x0000c200UL, 0x0000d300UL, 0x0000ac00UL, 0x00006200UL, 0x00009100UL, 0x00009500UL, 0x0000e400UL, 0x00007900UL, -0x0000e700UL, 0x0000c800UL, 0x00003700UL, 0x00006d00UL, 0x00008d00UL, 0x0000d500UL, 0x00004e00UL, 0x0000a900UL, -0x00006c00UL, 0x00005600UL, 0x0000f400UL, 0x0000ea00UL, 0x00006500UL, 0x00007a00UL, 0x0000ae00UL, 0x00000800UL, -0x0000ba00UL, 0x00007800UL, 0x00002500UL, 0x00002e00UL, 0x00001c00UL, 0x0000a600UL, 0x0000b400UL, 0x0000c600UL, -0x0000e800UL, 0x0000dd00UL, 0x00007400UL, 0x00001f00UL, 0x00004b00UL, 0x0000bd00UL, 0x00008b00UL, 0x00008a00UL, -0x00007000UL, 0x00003e00UL, 0x0000b500UL, 0x00006600UL, 0x00004800UL, 0x00000300UL, 0x0000f600UL, 0x00000e00UL, -0x00006100UL, 0x00003500UL, 0x00005700UL, 0x0000b900UL, 0x00008600UL, 0x0000c100UL, 0x00001d00UL, 0x00009e00UL, -0x0000e100UL, 0x0000f800UL, 0x00009800UL, 0x00001100UL, 0x00006900UL, 0x0000d900UL, 0x00008e00UL, 0x00009400UL, -0x00009b00UL, 0x00001e00UL, 0x00008700UL, 0x0000e900UL, 0x0000ce00UL, 0x00005500UL, 0x00002800UL, 0x0000df00UL, -0x00008c00UL, 0x0000a100UL, 0x00008900UL, 0x00000d00UL, 0x0000bf00UL, 0x0000e600UL, 0x00004200UL, 0x00006800UL, +0x00006300UL, 0x00007c00UL, 0x00007700UL, 0x00007b00UL, 0x0000f200UL, 0x00006b00UL, 0x00006f00UL, 0x0000c500UL, +0x00003000UL, 0x00000100UL, 0x00006700UL, 0x00002b00UL, 0x0000fe00UL, 0x0000d700UL, 0x0000ab00UL, 0x00007600UL, +0x0000ca00UL, 0x00008200UL, 0x0000c900UL, 0x00007d00UL, 0x0000fa00UL, 0x00005900UL, 0x00004700UL, 0x0000f000UL, +0x0000ad00UL, 0x0000d400UL, 0x0000a200UL, 0x0000af00UL, 0x00009c00UL, 0x0000a400UL, 0x00007200UL, 0x0000c000UL, +0x0000b700UL, 0x0000fd00UL, 0x00009300UL, 0x00002600UL, 0x00003600UL, 0x00003f00UL, 0x0000f700UL, 0x0000cc00UL, +0x00003400UL, 0x0000a500UL, 0x0000e500UL, 0x0000f100UL, 0x00007100UL, 0x0000d800UL, 0x00003100UL, 0x00001500UL, +0x00000400UL, 0x0000c700UL, 0x00002300UL, 0x0000c300UL, 0x00001800UL, 0x00009600UL, 0x00000500UL, 0x00009a00UL, +0x00000700UL, 0x00001200UL, 0x00008000UL, 0x0000e200UL, 0x0000eb00UL, 0x00002700UL, 0x0000b200UL, 0x00007500UL, +0x00000900UL, 0x00008300UL, 0x00002c00UL, 0x00001a00UL, 0x00001b00UL, 0x00006e00UL, 0x00005a00UL, 0x0000a000UL, +0x00005200UL, 0x00003b00UL, 0x0000d600UL, 0x0000b300UL, 0x00002900UL, 0x0000e300UL, 0x00002f00UL, 0x00008400UL, +0x00005300UL, 0x0000d100UL, 0x00000000UL, 0x0000ed00UL, 0x00002000UL, 0x0000fc00UL, 0x0000b100UL, 0x00005b00UL, +0x00006a00UL, 0x0000cb00UL, 0x0000be00UL, 0x00003900UL, 0x00004a00UL, 0x00004c00UL, 0x00005800UL, 0x0000cf00UL, +0x0000d000UL, 0x0000ef00UL, 0x0000aa00UL, 0x0000fb00UL, 0x00004300UL, 0x00004d00UL, 0x00003300UL, 0x00008500UL, +0x00004500UL, 0x0000f900UL, 0x00000200UL, 0x00007f00UL, 0x00005000UL, 0x00003c00UL, 0x00009f00UL, 0x0000a800UL, +0x00005100UL, 0x0000a300UL, 0x00004000UL, 0x00008f00UL, 0x00009200UL, 0x00009d00UL, 0x00003800UL, 0x0000f500UL, +0x0000bc00UL, 0x0000b600UL, 0x0000da00UL, 0x00002100UL, 0x00001000UL, 0x0000ff00UL, 0x0000f300UL, 0x0000d200UL, +0x0000cd00UL, 0x00000c00UL, 0x00001300UL, 0x0000ec00UL, 0x00005f00UL, 0x00009700UL, 0x00004400UL, 0x00001700UL, +0x0000c400UL, 0x0000a700UL, 0x00007e00UL, 0x00003d00UL, 0x00006400UL, 0x00005d00UL, 0x00001900UL, 0x00007300UL, +0x00006000UL, 0x00008100UL, 0x00004f00UL, 0x0000dc00UL, 0x00002200UL, 0x00002a00UL, 0x00009000UL, 0x00008800UL, +0x00004600UL, 0x0000ee00UL, 0x0000b800UL, 0x00001400UL, 0x0000de00UL, 0x00005e00UL, 0x00000b00UL, 0x0000db00UL, +0x0000e000UL, 0x00003200UL, 0x00003a00UL, 0x00000a00UL, 0x00004900UL, 0x00000600UL, 0x00002400UL, 0x00005c00UL, +0x0000c200UL, 0x0000d300UL, 0x0000ac00UL, 0x00006200UL, 0x00009100UL, 0x00009500UL, 0x0000e400UL, 0x00007900UL, +0x0000e700UL, 0x0000c800UL, 0x00003700UL, 0x00006d00UL, 0x00008d00UL, 0x0000d500UL, 0x00004e00UL, 0x0000a900UL, +0x00006c00UL, 0x00005600UL, 0x0000f400UL, 0x0000ea00UL, 0x00006500UL, 0x00007a00UL, 0x0000ae00UL, 0x00000800UL, +0x0000ba00UL, 0x00007800UL, 0x00002500UL, 0x00002e00UL, 0x00001c00UL, 0x0000a600UL, 0x0000b400UL, 0x0000c600UL, +0x0000e800UL, 0x0000dd00UL, 0x00007400UL, 0x00001f00UL, 0x00004b00UL, 0x0000bd00UL, 0x00008b00UL, 0x00008a00UL, +0x00007000UL, 0x00003e00UL, 0x0000b500UL, 0x00006600UL, 0x00004800UL, 0x00000300UL, 0x0000f600UL, 0x00000e00UL, +0x00006100UL, 0x00003500UL, 0x00005700UL, 0x0000b900UL, 0x00008600UL, 0x0000c100UL, 0x00001d00UL, 0x00009e00UL, +0x0000e100UL, 0x0000f800UL, 0x00009800UL, 0x00001100UL, 0x00006900UL, 0x0000d900UL, 0x00008e00UL, 0x00009400UL, +0x00009b00UL, 0x00001e00UL, 0x00008700UL, 0x0000e900UL, 0x0000ce00UL, 0x00005500UL, 0x00002800UL, 0x0000df00UL, +0x00008c00UL, 0x0000a100UL, 0x00008900UL, 0x00000d00UL, 0x0000bf00UL, 0x0000e600UL, 0x00004200UL, 0x00006800UL, 0x00004100UL, 0x00009900UL, 0x00002d00UL, 0x00000f00UL, 0x0000b000UL, 0x00005400UL, 0x0000bb00UL, 0x00001600UL }; static const ulong32 Te4_2[] = { -0x00630000UL, 0x007c0000UL, 0x00770000UL, 0x007b0000UL, 0x00f20000UL, 0x006b0000UL, 0x006f0000UL, 0x00c50000UL, -0x00300000UL, 0x00010000UL, 0x00670000UL, 0x002b0000UL, 0x00fe0000UL, 0x00d70000UL, 0x00ab0000UL, 0x00760000UL, -0x00ca0000UL, 0x00820000UL, 0x00c90000UL, 0x007d0000UL, 0x00fa0000UL, 0x00590000UL, 0x00470000UL, 0x00f00000UL, -0x00ad0000UL, 0x00d40000UL, 0x00a20000UL, 0x00af0000UL, 0x009c0000UL, 0x00a40000UL, 0x00720000UL, 0x00c00000UL, -0x00b70000UL, 0x00fd0000UL, 0x00930000UL, 0x00260000UL, 0x00360000UL, 0x003f0000UL, 0x00f70000UL, 0x00cc0000UL, -0x00340000UL, 0x00a50000UL, 0x00e50000UL, 0x00f10000UL, 0x00710000UL, 0x00d80000UL, 0x00310000UL, 0x00150000UL, -0x00040000UL, 0x00c70000UL, 0x00230000UL, 0x00c30000UL, 0x00180000UL, 0x00960000UL, 0x00050000UL, 0x009a0000UL, -0x00070000UL, 0x00120000UL, 0x00800000UL, 0x00e20000UL, 0x00eb0000UL, 0x00270000UL, 0x00b20000UL, 0x00750000UL, -0x00090000UL, 0x00830000UL, 0x002c0000UL, 0x001a0000UL, 0x001b0000UL, 0x006e0000UL, 0x005a0000UL, 0x00a00000UL, -0x00520000UL, 0x003b0000UL, 0x00d60000UL, 0x00b30000UL, 0x00290000UL, 0x00e30000UL, 0x002f0000UL, 0x00840000UL, -0x00530000UL, 0x00d10000UL, 0x00000000UL, 0x00ed0000UL, 0x00200000UL, 0x00fc0000UL, 0x00b10000UL, 0x005b0000UL, -0x006a0000UL, 0x00cb0000UL, 0x00be0000UL, 0x00390000UL, 0x004a0000UL, 0x004c0000UL, 0x00580000UL, 0x00cf0000UL, -0x00d00000UL, 0x00ef0000UL, 0x00aa0000UL, 0x00fb0000UL, 0x00430000UL, 0x004d0000UL, 0x00330000UL, 0x00850000UL, -0x00450000UL, 0x00f90000UL, 0x00020000UL, 0x007f0000UL, 0x00500000UL, 0x003c0000UL, 0x009f0000UL, 0x00a80000UL, -0x00510000UL, 0x00a30000UL, 0x00400000UL, 0x008f0000UL, 0x00920000UL, 0x009d0000UL, 0x00380000UL, 0x00f50000UL, -0x00bc0000UL, 0x00b60000UL, 0x00da0000UL, 0x00210000UL, 0x00100000UL, 0x00ff0000UL, 0x00f30000UL, 0x00d20000UL, -0x00cd0000UL, 0x000c0000UL, 0x00130000UL, 0x00ec0000UL, 0x005f0000UL, 0x00970000UL, 0x00440000UL, 0x00170000UL, -0x00c40000UL, 0x00a70000UL, 0x007e0000UL, 0x003d0000UL, 0x00640000UL, 0x005d0000UL, 0x00190000UL, 0x00730000UL, -0x00600000UL, 0x00810000UL, 0x004f0000UL, 0x00dc0000UL, 0x00220000UL, 0x002a0000UL, 0x00900000UL, 0x00880000UL, -0x00460000UL, 0x00ee0000UL, 0x00b80000UL, 0x00140000UL, 0x00de0000UL, 0x005e0000UL, 0x000b0000UL, 0x00db0000UL, -0x00e00000UL, 0x00320000UL, 0x003a0000UL, 0x000a0000UL, 0x00490000UL, 0x00060000UL, 0x00240000UL, 0x005c0000UL, -0x00c20000UL, 0x00d30000UL, 0x00ac0000UL, 0x00620000UL, 0x00910000UL, 0x00950000UL, 0x00e40000UL, 0x00790000UL, -0x00e70000UL, 0x00c80000UL, 0x00370000UL, 0x006d0000UL, 0x008d0000UL, 0x00d50000UL, 0x004e0000UL, 0x00a90000UL, -0x006c0000UL, 0x00560000UL, 0x00f40000UL, 0x00ea0000UL, 0x00650000UL, 0x007a0000UL, 0x00ae0000UL, 0x00080000UL, -0x00ba0000UL, 0x00780000UL, 0x00250000UL, 0x002e0000UL, 0x001c0000UL, 0x00a60000UL, 0x00b40000UL, 0x00c60000UL, -0x00e80000UL, 0x00dd0000UL, 0x00740000UL, 0x001f0000UL, 0x004b0000UL, 0x00bd0000UL, 0x008b0000UL, 0x008a0000UL, -0x00700000UL, 0x003e0000UL, 0x00b50000UL, 0x00660000UL, 0x00480000UL, 0x00030000UL, 0x00f60000UL, 0x000e0000UL, -0x00610000UL, 0x00350000UL, 0x00570000UL, 0x00b90000UL, 0x00860000UL, 0x00c10000UL, 0x001d0000UL, 0x009e0000UL, -0x00e10000UL, 0x00f80000UL, 0x00980000UL, 0x00110000UL, 0x00690000UL, 0x00d90000UL, 0x008e0000UL, 0x00940000UL, -0x009b0000UL, 0x001e0000UL, 0x00870000UL, 0x00e90000UL, 0x00ce0000UL, 0x00550000UL, 0x00280000UL, 0x00df0000UL, -0x008c0000UL, 0x00a10000UL, 0x00890000UL, 0x000d0000UL, 0x00bf0000UL, 0x00e60000UL, 0x00420000UL, 0x00680000UL, +0x00630000UL, 0x007c0000UL, 0x00770000UL, 0x007b0000UL, 0x00f20000UL, 0x006b0000UL, 0x006f0000UL, 0x00c50000UL, +0x00300000UL, 0x00010000UL, 0x00670000UL, 0x002b0000UL, 0x00fe0000UL, 0x00d70000UL, 0x00ab0000UL, 0x00760000UL, +0x00ca0000UL, 0x00820000UL, 0x00c90000UL, 0x007d0000UL, 0x00fa0000UL, 0x00590000UL, 0x00470000UL, 0x00f00000UL, +0x00ad0000UL, 0x00d40000UL, 0x00a20000UL, 0x00af0000UL, 0x009c0000UL, 0x00a40000UL, 0x00720000UL, 0x00c00000UL, +0x00b70000UL, 0x00fd0000UL, 0x00930000UL, 0x00260000UL, 0x00360000UL, 0x003f0000UL, 0x00f70000UL, 0x00cc0000UL, +0x00340000UL, 0x00a50000UL, 0x00e50000UL, 0x00f10000UL, 0x00710000UL, 0x00d80000UL, 0x00310000UL, 0x00150000UL, +0x00040000UL, 0x00c70000UL, 0x00230000UL, 0x00c30000UL, 0x00180000UL, 0x00960000UL, 0x00050000UL, 0x009a0000UL, +0x00070000UL, 0x00120000UL, 0x00800000UL, 0x00e20000UL, 0x00eb0000UL, 0x00270000UL, 0x00b20000UL, 0x00750000UL, +0x00090000UL, 0x00830000UL, 0x002c0000UL, 0x001a0000UL, 0x001b0000UL, 0x006e0000UL, 0x005a0000UL, 0x00a00000UL, +0x00520000UL, 0x003b0000UL, 0x00d60000UL, 0x00b30000UL, 0x00290000UL, 0x00e30000UL, 0x002f0000UL, 0x00840000UL, +0x00530000UL, 0x00d10000UL, 0x00000000UL, 0x00ed0000UL, 0x00200000UL, 0x00fc0000UL, 0x00b10000UL, 0x005b0000UL, +0x006a0000UL, 0x00cb0000UL, 0x00be0000UL, 0x00390000UL, 0x004a0000UL, 0x004c0000UL, 0x00580000UL, 0x00cf0000UL, +0x00d00000UL, 0x00ef0000UL, 0x00aa0000UL, 0x00fb0000UL, 0x00430000UL, 0x004d0000UL, 0x00330000UL, 0x00850000UL, +0x00450000UL, 0x00f90000UL, 0x00020000UL, 0x007f0000UL, 0x00500000UL, 0x003c0000UL, 0x009f0000UL, 0x00a80000UL, +0x00510000UL, 0x00a30000UL, 0x00400000UL, 0x008f0000UL, 0x00920000UL, 0x009d0000UL, 0x00380000UL, 0x00f50000UL, +0x00bc0000UL, 0x00b60000UL, 0x00da0000UL, 0x00210000UL, 0x00100000UL, 0x00ff0000UL, 0x00f30000UL, 0x00d20000UL, +0x00cd0000UL, 0x000c0000UL, 0x00130000UL, 0x00ec0000UL, 0x005f0000UL, 0x00970000UL, 0x00440000UL, 0x00170000UL, +0x00c40000UL, 0x00a70000UL, 0x007e0000UL, 0x003d0000UL, 0x00640000UL, 0x005d0000UL, 0x00190000UL, 0x00730000UL, +0x00600000UL, 0x00810000UL, 0x004f0000UL, 0x00dc0000UL, 0x00220000UL, 0x002a0000UL, 0x00900000UL, 0x00880000UL, +0x00460000UL, 0x00ee0000UL, 0x00b80000UL, 0x00140000UL, 0x00de0000UL, 0x005e0000UL, 0x000b0000UL, 0x00db0000UL, +0x00e00000UL, 0x00320000UL, 0x003a0000UL, 0x000a0000UL, 0x00490000UL, 0x00060000UL, 0x00240000UL, 0x005c0000UL, +0x00c20000UL, 0x00d30000UL, 0x00ac0000UL, 0x00620000UL, 0x00910000UL, 0x00950000UL, 0x00e40000UL, 0x00790000UL, +0x00e70000UL, 0x00c80000UL, 0x00370000UL, 0x006d0000UL, 0x008d0000UL, 0x00d50000UL, 0x004e0000UL, 0x00a90000UL, +0x006c0000UL, 0x00560000UL, 0x00f40000UL, 0x00ea0000UL, 0x00650000UL, 0x007a0000UL, 0x00ae0000UL, 0x00080000UL, +0x00ba0000UL, 0x00780000UL, 0x00250000UL, 0x002e0000UL, 0x001c0000UL, 0x00a60000UL, 0x00b40000UL, 0x00c60000UL, +0x00e80000UL, 0x00dd0000UL, 0x00740000UL, 0x001f0000UL, 0x004b0000UL, 0x00bd0000UL, 0x008b0000UL, 0x008a0000UL, +0x00700000UL, 0x003e0000UL, 0x00b50000UL, 0x00660000UL, 0x00480000UL, 0x00030000UL, 0x00f60000UL, 0x000e0000UL, +0x00610000UL, 0x00350000UL, 0x00570000UL, 0x00b90000UL, 0x00860000UL, 0x00c10000UL, 0x001d0000UL, 0x009e0000UL, +0x00e10000UL, 0x00f80000UL, 0x00980000UL, 0x00110000UL, 0x00690000UL, 0x00d90000UL, 0x008e0000UL, 0x00940000UL, +0x009b0000UL, 0x001e0000UL, 0x00870000UL, 0x00e90000UL, 0x00ce0000UL, 0x00550000UL, 0x00280000UL, 0x00df0000UL, +0x008c0000UL, 0x00a10000UL, 0x00890000UL, 0x000d0000UL, 0x00bf0000UL, 0x00e60000UL, 0x00420000UL, 0x00680000UL, 0x00410000UL, 0x00990000UL, 0x002d0000UL, 0x000f0000UL, 0x00b00000UL, 0x00540000UL, 0x00bb0000UL, 0x00160000UL }; static const ulong32 Te4_3[] = { -0x63000000UL, 0x7c000000UL, 0x77000000UL, 0x7b000000UL, 0xf2000000UL, 0x6b000000UL, 0x6f000000UL, 0xc5000000UL, -0x30000000UL, 0x01000000UL, 0x67000000UL, 0x2b000000UL, 0xfe000000UL, 0xd7000000UL, 0xab000000UL, 0x76000000UL, -0xca000000UL, 0x82000000UL, 0xc9000000UL, 0x7d000000UL, 0xfa000000UL, 0x59000000UL, 0x47000000UL, 0xf0000000UL, -0xad000000UL, 0xd4000000UL, 0xa2000000UL, 0xaf000000UL, 0x9c000000UL, 0xa4000000UL, 0x72000000UL, 0xc0000000UL, -0xb7000000UL, 0xfd000000UL, 0x93000000UL, 0x26000000UL, 0x36000000UL, 0x3f000000UL, 0xf7000000UL, 0xcc000000UL, -0x34000000UL, 0xa5000000UL, 0xe5000000UL, 0xf1000000UL, 0x71000000UL, 0xd8000000UL, 0x31000000UL, 0x15000000UL, -0x04000000UL, 0xc7000000UL, 0x23000000UL, 0xc3000000UL, 0x18000000UL, 0x96000000UL, 0x05000000UL, 0x9a000000UL, -0x07000000UL, 0x12000000UL, 0x80000000UL, 0xe2000000UL, 0xeb000000UL, 0x27000000UL, 0xb2000000UL, 0x75000000UL, -0x09000000UL, 0x83000000UL, 0x2c000000UL, 0x1a000000UL, 0x1b000000UL, 0x6e000000UL, 0x5a000000UL, 0xa0000000UL, -0x52000000UL, 0x3b000000UL, 0xd6000000UL, 0xb3000000UL, 0x29000000UL, 0xe3000000UL, 0x2f000000UL, 0x84000000UL, -0x53000000UL, 0xd1000000UL, 0x00000000UL, 0xed000000UL, 0x20000000UL, 0xfc000000UL, 0xb1000000UL, 0x5b000000UL, -0x6a000000UL, 0xcb000000UL, 0xbe000000UL, 0x39000000UL, 0x4a000000UL, 0x4c000000UL, 0x58000000UL, 0xcf000000UL, -0xd0000000UL, 0xef000000UL, 0xaa000000UL, 0xfb000000UL, 0x43000000UL, 0x4d000000UL, 0x33000000UL, 0x85000000UL, -0x45000000UL, 0xf9000000UL, 0x02000000UL, 0x7f000000UL, 0x50000000UL, 0x3c000000UL, 0x9f000000UL, 0xa8000000UL, -0x51000000UL, 0xa3000000UL, 0x40000000UL, 0x8f000000UL, 0x92000000UL, 0x9d000000UL, 0x38000000UL, 0xf5000000UL, -0xbc000000UL, 0xb6000000UL, 0xda000000UL, 0x21000000UL, 0x10000000UL, 0xff000000UL, 0xf3000000UL, 0xd2000000UL, -0xcd000000UL, 0x0c000000UL, 0x13000000UL, 0xec000000UL, 0x5f000000UL, 0x97000000UL, 0x44000000UL, 0x17000000UL, -0xc4000000UL, 0xa7000000UL, 0x7e000000UL, 0x3d000000UL, 0x64000000UL, 0x5d000000UL, 0x19000000UL, 0x73000000UL, -0x60000000UL, 0x81000000UL, 0x4f000000UL, 0xdc000000UL, 0x22000000UL, 0x2a000000UL, 0x90000000UL, 0x88000000UL, -0x46000000UL, 0xee000000UL, 0xb8000000UL, 0x14000000UL, 0xde000000UL, 0x5e000000UL, 0x0b000000UL, 0xdb000000UL, -0xe0000000UL, 0x32000000UL, 0x3a000000UL, 0x0a000000UL, 0x49000000UL, 0x06000000UL, 0x24000000UL, 0x5c000000UL, -0xc2000000UL, 0xd3000000UL, 0xac000000UL, 0x62000000UL, 0x91000000UL, 0x95000000UL, 0xe4000000UL, 0x79000000UL, -0xe7000000UL, 0xc8000000UL, 0x37000000UL, 0x6d000000UL, 0x8d000000UL, 0xd5000000UL, 0x4e000000UL, 0xa9000000UL, -0x6c000000UL, 0x56000000UL, 0xf4000000UL, 0xea000000UL, 0x65000000UL, 0x7a000000UL, 0xae000000UL, 0x08000000UL, -0xba000000UL, 0x78000000UL, 0x25000000UL, 0x2e000000UL, 0x1c000000UL, 0xa6000000UL, 0xb4000000UL, 0xc6000000UL, -0xe8000000UL, 0xdd000000UL, 0x74000000UL, 0x1f000000UL, 0x4b000000UL, 0xbd000000UL, 0x8b000000UL, 0x8a000000UL, -0x70000000UL, 0x3e000000UL, 0xb5000000UL, 0x66000000UL, 0x48000000UL, 0x03000000UL, 0xf6000000UL, 0x0e000000UL, -0x61000000UL, 0x35000000UL, 0x57000000UL, 0xb9000000UL, 0x86000000UL, 0xc1000000UL, 0x1d000000UL, 0x9e000000UL, -0xe1000000UL, 0xf8000000UL, 0x98000000UL, 0x11000000UL, 0x69000000UL, 0xd9000000UL, 0x8e000000UL, 0x94000000UL, -0x9b000000UL, 0x1e000000UL, 0x87000000UL, 0xe9000000UL, 0xce000000UL, 0x55000000UL, 0x28000000UL, 0xdf000000UL, -0x8c000000UL, 0xa1000000UL, 0x89000000UL, 0x0d000000UL, 0xbf000000UL, 0xe6000000UL, 0x42000000UL, 0x68000000UL, +0x63000000UL, 0x7c000000UL, 0x77000000UL, 0x7b000000UL, 0xf2000000UL, 0x6b000000UL, 0x6f000000UL, 0xc5000000UL, +0x30000000UL, 0x01000000UL, 0x67000000UL, 0x2b000000UL, 0xfe000000UL, 0xd7000000UL, 0xab000000UL, 0x76000000UL, +0xca000000UL, 0x82000000UL, 0xc9000000UL, 0x7d000000UL, 0xfa000000UL, 0x59000000UL, 0x47000000UL, 0xf0000000UL, +0xad000000UL, 0xd4000000UL, 0xa2000000UL, 0xaf000000UL, 0x9c000000UL, 0xa4000000UL, 0x72000000UL, 0xc0000000UL, +0xb7000000UL, 0xfd000000UL, 0x93000000UL, 0x26000000UL, 0x36000000UL, 0x3f000000UL, 0xf7000000UL, 0xcc000000UL, +0x34000000UL, 0xa5000000UL, 0xe5000000UL, 0xf1000000UL, 0x71000000UL, 0xd8000000UL, 0x31000000UL, 0x15000000UL, +0x04000000UL, 0xc7000000UL, 0x23000000UL, 0xc3000000UL, 0x18000000UL, 0x96000000UL, 0x05000000UL, 0x9a000000UL, +0x07000000UL, 0x12000000UL, 0x80000000UL, 0xe2000000UL, 0xeb000000UL, 0x27000000UL, 0xb2000000UL, 0x75000000UL, +0x09000000UL, 0x83000000UL, 0x2c000000UL, 0x1a000000UL, 0x1b000000UL, 0x6e000000UL, 0x5a000000UL, 0xa0000000UL, +0x52000000UL, 0x3b000000UL, 0xd6000000UL, 0xb3000000UL, 0x29000000UL, 0xe3000000UL, 0x2f000000UL, 0x84000000UL, +0x53000000UL, 0xd1000000UL, 0x00000000UL, 0xed000000UL, 0x20000000UL, 0xfc000000UL, 0xb1000000UL, 0x5b000000UL, +0x6a000000UL, 0xcb000000UL, 0xbe000000UL, 0x39000000UL, 0x4a000000UL, 0x4c000000UL, 0x58000000UL, 0xcf000000UL, +0xd0000000UL, 0xef000000UL, 0xaa000000UL, 0xfb000000UL, 0x43000000UL, 0x4d000000UL, 0x33000000UL, 0x85000000UL, +0x45000000UL, 0xf9000000UL, 0x02000000UL, 0x7f000000UL, 0x50000000UL, 0x3c000000UL, 0x9f000000UL, 0xa8000000UL, +0x51000000UL, 0xa3000000UL, 0x40000000UL, 0x8f000000UL, 0x92000000UL, 0x9d000000UL, 0x38000000UL, 0xf5000000UL, +0xbc000000UL, 0xb6000000UL, 0xda000000UL, 0x21000000UL, 0x10000000UL, 0xff000000UL, 0xf3000000UL, 0xd2000000UL, +0xcd000000UL, 0x0c000000UL, 0x13000000UL, 0xec000000UL, 0x5f000000UL, 0x97000000UL, 0x44000000UL, 0x17000000UL, +0xc4000000UL, 0xa7000000UL, 0x7e000000UL, 0x3d000000UL, 0x64000000UL, 0x5d000000UL, 0x19000000UL, 0x73000000UL, +0x60000000UL, 0x81000000UL, 0x4f000000UL, 0xdc000000UL, 0x22000000UL, 0x2a000000UL, 0x90000000UL, 0x88000000UL, +0x46000000UL, 0xee000000UL, 0xb8000000UL, 0x14000000UL, 0xde000000UL, 0x5e000000UL, 0x0b000000UL, 0xdb000000UL, +0xe0000000UL, 0x32000000UL, 0x3a000000UL, 0x0a000000UL, 0x49000000UL, 0x06000000UL, 0x24000000UL, 0x5c000000UL, +0xc2000000UL, 0xd3000000UL, 0xac000000UL, 0x62000000UL, 0x91000000UL, 0x95000000UL, 0xe4000000UL, 0x79000000UL, +0xe7000000UL, 0xc8000000UL, 0x37000000UL, 0x6d000000UL, 0x8d000000UL, 0xd5000000UL, 0x4e000000UL, 0xa9000000UL, +0x6c000000UL, 0x56000000UL, 0xf4000000UL, 0xea000000UL, 0x65000000UL, 0x7a000000UL, 0xae000000UL, 0x08000000UL, +0xba000000UL, 0x78000000UL, 0x25000000UL, 0x2e000000UL, 0x1c000000UL, 0xa6000000UL, 0xb4000000UL, 0xc6000000UL, +0xe8000000UL, 0xdd000000UL, 0x74000000UL, 0x1f000000UL, 0x4b000000UL, 0xbd000000UL, 0x8b000000UL, 0x8a000000UL, +0x70000000UL, 0x3e000000UL, 0xb5000000UL, 0x66000000UL, 0x48000000UL, 0x03000000UL, 0xf6000000UL, 0x0e000000UL, +0x61000000UL, 0x35000000UL, 0x57000000UL, 0xb9000000UL, 0x86000000UL, 0xc1000000UL, 0x1d000000UL, 0x9e000000UL, +0xe1000000UL, 0xf8000000UL, 0x98000000UL, 0x11000000UL, 0x69000000UL, 0xd9000000UL, 0x8e000000UL, 0x94000000UL, +0x9b000000UL, 0x1e000000UL, 0x87000000UL, 0xe9000000UL, 0xce000000UL, 0x55000000UL, 0x28000000UL, 0xdf000000UL, +0x8c000000UL, 0xa1000000UL, 0x89000000UL, 0x0d000000UL, 0xbf000000UL, 0xe6000000UL, 0x42000000UL, 0x68000000UL, 0x41000000UL, 0x99000000UL, 0x2d000000UL, 0x0f000000UL, 0xb0000000UL, 0x54000000UL, 0xbb000000UL, 0x16000000UL }; #endif /* pelimac */ @@ -874,142 +874,142 @@ }; static const ulong32 Tks0[] = { -0x00000000UL, 0x0e090d0bUL, 0x1c121a16UL, 0x121b171dUL, 0x3824342cUL, 0x362d3927UL, 0x24362e3aUL, 0x2a3f2331UL, -0x70486858UL, 0x7e416553UL, 0x6c5a724eUL, 0x62537f45UL, 0x486c5c74UL, 0x4665517fUL, 0x547e4662UL, 0x5a774b69UL, -0xe090d0b0UL, 0xee99ddbbUL, 0xfc82caa6UL, 0xf28bc7adUL, 0xd8b4e49cUL, 0xd6bde997UL, 0xc4a6fe8aUL, 0xcaaff381UL, -0x90d8b8e8UL, 0x9ed1b5e3UL, 0x8ccaa2feUL, 0x82c3aff5UL, 0xa8fc8cc4UL, 0xa6f581cfUL, 0xb4ee96d2UL, 0xbae79bd9UL, -0xdb3bbb7bUL, 0xd532b670UL, 0xc729a16dUL, 0xc920ac66UL, 0xe31f8f57UL, 0xed16825cUL, 0xff0d9541UL, 0xf104984aUL, -0xab73d323UL, 0xa57ade28UL, 0xb761c935UL, 0xb968c43eUL, 0x9357e70fUL, 0x9d5eea04UL, 0x8f45fd19UL, 0x814cf012UL, -0x3bab6bcbUL, 0x35a266c0UL, 0x27b971ddUL, 0x29b07cd6UL, 0x038f5fe7UL, 0x0d8652ecUL, 0x1f9d45f1UL, 0x119448faUL, -0x4be30393UL, 0x45ea0e98UL, 0x57f11985UL, 0x59f8148eUL, 0x73c737bfUL, 0x7dce3ab4UL, 0x6fd52da9UL, 0x61dc20a2UL, -0xad766df6UL, 0xa37f60fdUL, 0xb16477e0UL, 0xbf6d7aebUL, 0x955259daUL, 0x9b5b54d1UL, 0x894043ccUL, 0x87494ec7UL, -0xdd3e05aeUL, 0xd33708a5UL, 0xc12c1fb8UL, 0xcf2512b3UL, 0xe51a3182UL, 0xeb133c89UL, 0xf9082b94UL, 0xf701269fUL, -0x4de6bd46UL, 0x43efb04dUL, 0x51f4a750UL, 0x5ffdaa5bUL, 0x75c2896aUL, 0x7bcb8461UL, 0x69d0937cUL, 0x67d99e77UL, -0x3daed51eUL, 0x33a7d815UL, 0x21bccf08UL, 0x2fb5c203UL, 0x058ae132UL, 0x0b83ec39UL, 0x1998fb24UL, 0x1791f62fUL, -0x764dd68dUL, 0x7844db86UL, 0x6a5fcc9bUL, 0x6456c190UL, 0x4e69e2a1UL, 0x4060efaaUL, 0x527bf8b7UL, 0x5c72f5bcUL, -0x0605bed5UL, 0x080cb3deUL, 0x1a17a4c3UL, 0x141ea9c8UL, 0x3e218af9UL, 0x302887f2UL, 0x223390efUL, 0x2c3a9de4UL, -0x96dd063dUL, 0x98d40b36UL, 0x8acf1c2bUL, 0x84c61120UL, 0xaef93211UL, 0xa0f03f1aUL, 0xb2eb2807UL, 0xbce2250cUL, -0xe6956e65UL, 0xe89c636eUL, 0xfa877473UL, 0xf48e7978UL, 0xdeb15a49UL, 0xd0b85742UL, 0xc2a3405fUL, 0xccaa4d54UL, -0x41ecdaf7UL, 0x4fe5d7fcUL, 0x5dfec0e1UL, 0x53f7cdeaUL, 0x79c8eedbUL, 0x77c1e3d0UL, 0x65daf4cdUL, 0x6bd3f9c6UL, -0x31a4b2afUL, 0x3fadbfa4UL, 0x2db6a8b9UL, 0x23bfa5b2UL, 0x09808683UL, 0x07898b88UL, 0x15929c95UL, 0x1b9b919eUL, -0xa17c0a47UL, 0xaf75074cUL, 0xbd6e1051UL, 0xb3671d5aUL, 0x99583e6bUL, 0x97513360UL, 0x854a247dUL, 0x8b432976UL, -0xd134621fUL, 0xdf3d6f14UL, 0xcd267809UL, 0xc32f7502UL, 0xe9105633UL, 0xe7195b38UL, 0xf5024c25UL, 0xfb0b412eUL, -0x9ad7618cUL, 0x94de6c87UL, 0x86c57b9aUL, 0x88cc7691UL, 0xa2f355a0UL, 0xacfa58abUL, 0xbee14fb6UL, 0xb0e842bdUL, -0xea9f09d4UL, 0xe49604dfUL, 0xf68d13c2UL, 0xf8841ec9UL, 0xd2bb3df8UL, 0xdcb230f3UL, 0xcea927eeUL, 0xc0a02ae5UL, -0x7a47b13cUL, 0x744ebc37UL, 0x6655ab2aUL, 0x685ca621UL, 0x42638510UL, 0x4c6a881bUL, 0x5e719f06UL, 0x5078920dUL, -0x0a0fd964UL, 0x0406d46fUL, 0x161dc372UL, 0x1814ce79UL, 0x322bed48UL, 0x3c22e043UL, 0x2e39f75eUL, 0x2030fa55UL, -0xec9ab701UL, 0xe293ba0aUL, 0xf088ad17UL, 0xfe81a01cUL, 0xd4be832dUL, 0xdab78e26UL, 0xc8ac993bUL, 0xc6a59430UL, -0x9cd2df59UL, 0x92dbd252UL, 0x80c0c54fUL, 0x8ec9c844UL, 0xa4f6eb75UL, 0xaaffe67eUL, 0xb8e4f163UL, 0xb6edfc68UL, -0x0c0a67b1UL, 0x02036abaUL, 0x10187da7UL, 0x1e1170acUL, 0x342e539dUL, 0x3a275e96UL, 0x283c498bUL, 0x26354480UL, -0x7c420fe9UL, 0x724b02e2UL, 0x605015ffUL, 0x6e5918f4UL, 0x44663bc5UL, 0x4a6f36ceUL, 0x587421d3UL, 0x567d2cd8UL, -0x37a10c7aUL, 0x39a80171UL, 0x2bb3166cUL, 0x25ba1b67UL, 0x0f853856UL, 0x018c355dUL, 0x13972240UL, 0x1d9e2f4bUL, -0x47e96422UL, 0x49e06929UL, 0x5bfb7e34UL, 0x55f2733fUL, 0x7fcd500eUL, 0x71c45d05UL, 0x63df4a18UL, 0x6dd64713UL, -0xd731dccaUL, 0xd938d1c1UL, 0xcb23c6dcUL, 0xc52acbd7UL, 0xef15e8e6UL, 0xe11ce5edUL, 0xf307f2f0UL, 0xfd0efffbUL, +0x00000000UL, 0x0e090d0bUL, 0x1c121a16UL, 0x121b171dUL, 0x3824342cUL, 0x362d3927UL, 0x24362e3aUL, 0x2a3f2331UL, +0x70486858UL, 0x7e416553UL, 0x6c5a724eUL, 0x62537f45UL, 0x486c5c74UL, 0x4665517fUL, 0x547e4662UL, 0x5a774b69UL, +0xe090d0b0UL, 0xee99ddbbUL, 0xfc82caa6UL, 0xf28bc7adUL, 0xd8b4e49cUL, 0xd6bde997UL, 0xc4a6fe8aUL, 0xcaaff381UL, +0x90d8b8e8UL, 0x9ed1b5e3UL, 0x8ccaa2feUL, 0x82c3aff5UL, 0xa8fc8cc4UL, 0xa6f581cfUL, 0xb4ee96d2UL, 0xbae79bd9UL, +0xdb3bbb7bUL, 0xd532b670UL, 0xc729a16dUL, 0xc920ac66UL, 0xe31f8f57UL, 0xed16825cUL, 0xff0d9541UL, 0xf104984aUL, +0xab73d323UL, 0xa57ade28UL, 0xb761c935UL, 0xb968c43eUL, 0x9357e70fUL, 0x9d5eea04UL, 0x8f45fd19UL, 0x814cf012UL, +0x3bab6bcbUL, 0x35a266c0UL, 0x27b971ddUL, 0x29b07cd6UL, 0x038f5fe7UL, 0x0d8652ecUL, 0x1f9d45f1UL, 0x119448faUL, +0x4be30393UL, 0x45ea0e98UL, 0x57f11985UL, 0x59f8148eUL, 0x73c737bfUL, 0x7dce3ab4UL, 0x6fd52da9UL, 0x61dc20a2UL, +0xad766df6UL, 0xa37f60fdUL, 0xb16477e0UL, 0xbf6d7aebUL, 0x955259daUL, 0x9b5b54d1UL, 0x894043ccUL, 0x87494ec7UL, +0xdd3e05aeUL, 0xd33708a5UL, 0xc12c1fb8UL, 0xcf2512b3UL, 0xe51a3182UL, 0xeb133c89UL, 0xf9082b94UL, 0xf701269fUL, +0x4de6bd46UL, 0x43efb04dUL, 0x51f4a750UL, 0x5ffdaa5bUL, 0x75c2896aUL, 0x7bcb8461UL, 0x69d0937cUL, 0x67d99e77UL, +0x3daed51eUL, 0x33a7d815UL, 0x21bccf08UL, 0x2fb5c203UL, 0x058ae132UL, 0x0b83ec39UL, 0x1998fb24UL, 0x1791f62fUL, +0x764dd68dUL, 0x7844db86UL, 0x6a5fcc9bUL, 0x6456c190UL, 0x4e69e2a1UL, 0x4060efaaUL, 0x527bf8b7UL, 0x5c72f5bcUL, +0x0605bed5UL, 0x080cb3deUL, 0x1a17a4c3UL, 0x141ea9c8UL, 0x3e218af9UL, 0x302887f2UL, 0x223390efUL, 0x2c3a9de4UL, +0x96dd063dUL, 0x98d40b36UL, 0x8acf1c2bUL, 0x84c61120UL, 0xaef93211UL, 0xa0f03f1aUL, 0xb2eb2807UL, 0xbce2250cUL, +0xe6956e65UL, 0xe89c636eUL, 0xfa877473UL, 0xf48e7978UL, 0xdeb15a49UL, 0xd0b85742UL, 0xc2a3405fUL, 0xccaa4d54UL, +0x41ecdaf7UL, 0x4fe5d7fcUL, 0x5dfec0e1UL, 0x53f7cdeaUL, 0x79c8eedbUL, 0x77c1e3d0UL, 0x65daf4cdUL, 0x6bd3f9c6UL, +0x31a4b2afUL, 0x3fadbfa4UL, 0x2db6a8b9UL, 0x23bfa5b2UL, 0x09808683UL, 0x07898b88UL, 0x15929c95UL, 0x1b9b919eUL, +0xa17c0a47UL, 0xaf75074cUL, 0xbd6e1051UL, 0xb3671d5aUL, 0x99583e6bUL, 0x97513360UL, 0x854a247dUL, 0x8b432976UL, +0xd134621fUL, 0xdf3d6f14UL, 0xcd267809UL, 0xc32f7502UL, 0xe9105633UL, 0xe7195b38UL, 0xf5024c25UL, 0xfb0b412eUL, +0x9ad7618cUL, 0x94de6c87UL, 0x86c57b9aUL, 0x88cc7691UL, 0xa2f355a0UL, 0xacfa58abUL, 0xbee14fb6UL, 0xb0e842bdUL, +0xea9f09d4UL, 0xe49604dfUL, 0xf68d13c2UL, 0xf8841ec9UL, 0xd2bb3df8UL, 0xdcb230f3UL, 0xcea927eeUL, 0xc0a02ae5UL, +0x7a47b13cUL, 0x744ebc37UL, 0x6655ab2aUL, 0x685ca621UL, 0x42638510UL, 0x4c6a881bUL, 0x5e719f06UL, 0x5078920dUL, +0x0a0fd964UL, 0x0406d46fUL, 0x161dc372UL, 0x1814ce79UL, 0x322bed48UL, 0x3c22e043UL, 0x2e39f75eUL, 0x2030fa55UL, +0xec9ab701UL, 0xe293ba0aUL, 0xf088ad17UL, 0xfe81a01cUL, 0xd4be832dUL, 0xdab78e26UL, 0xc8ac993bUL, 0xc6a59430UL, +0x9cd2df59UL, 0x92dbd252UL, 0x80c0c54fUL, 0x8ec9c844UL, 0xa4f6eb75UL, 0xaaffe67eUL, 0xb8e4f163UL, 0xb6edfc68UL, +0x0c0a67b1UL, 0x02036abaUL, 0x10187da7UL, 0x1e1170acUL, 0x342e539dUL, 0x3a275e96UL, 0x283c498bUL, 0x26354480UL, +0x7c420fe9UL, 0x724b02e2UL, 0x605015ffUL, 0x6e5918f4UL, 0x44663bc5UL, 0x4a6f36ceUL, 0x587421d3UL, 0x567d2cd8UL, +0x37a10c7aUL, 0x39a80171UL, 0x2bb3166cUL, 0x25ba1b67UL, 0x0f853856UL, 0x018c355dUL, 0x13972240UL, 0x1d9e2f4bUL, +0x47e96422UL, 0x49e06929UL, 0x5bfb7e34UL, 0x55f2733fUL, 0x7fcd500eUL, 0x71c45d05UL, 0x63df4a18UL, 0x6dd64713UL, +0xd731dccaUL, 0xd938d1c1UL, 0xcb23c6dcUL, 0xc52acbd7UL, 0xef15e8e6UL, 0xe11ce5edUL, 0xf307f2f0UL, 0xfd0efffbUL, 0xa779b492UL, 0xa970b999UL, 0xbb6bae84UL, 0xb562a38fUL, 0x9f5d80beUL, 0x91548db5UL, 0x834f9aa8UL, 0x8d4697a3UL }; static const ulong32 Tks1[] = { -0x00000000UL, 0x0b0e090dUL, 0x161c121aUL, 0x1d121b17UL, 0x2c382434UL, 0x27362d39UL, 0x3a24362eUL, 0x312a3f23UL, -0x58704868UL, 0x537e4165UL, 0x4e6c5a72UL, 0x4562537fUL, 0x74486c5cUL, 0x7f466551UL, 0x62547e46UL, 0x695a774bUL, -0xb0e090d0UL, 0xbbee99ddUL, 0xa6fc82caUL, 0xadf28bc7UL, 0x9cd8b4e4UL, 0x97d6bde9UL, 0x8ac4a6feUL, 0x81caaff3UL, -0xe890d8b8UL, 0xe39ed1b5UL, 0xfe8ccaa2UL, 0xf582c3afUL, 0xc4a8fc8cUL, 0xcfa6f581UL, 0xd2b4ee96UL, 0xd9bae79bUL, -0x7bdb3bbbUL, 0x70d532b6UL, 0x6dc729a1UL, 0x66c920acUL, 0x57e31f8fUL, 0x5ced1682UL, 0x41ff0d95UL, 0x4af10498UL, -0x23ab73d3UL, 0x28a57adeUL, 0x35b761c9UL, 0x3eb968c4UL, 0x0f9357e7UL, 0x049d5eeaUL, 0x198f45fdUL, 0x12814cf0UL, -0xcb3bab6bUL, 0xc035a266UL, 0xdd27b971UL, 0xd629b07cUL, 0xe7038f5fUL, 0xec0d8652UL, 0xf11f9d45UL, 0xfa119448UL, -0x934be303UL, 0x9845ea0eUL, 0x8557f119UL, 0x8e59f814UL, 0xbf73c737UL, 0xb47dce3aUL, 0xa96fd52dUL, 0xa261dc20UL, -0xf6ad766dUL, 0xfda37f60UL, 0xe0b16477UL, 0xebbf6d7aUL, 0xda955259UL, 0xd19b5b54UL, 0xcc894043UL, 0xc787494eUL, -0xaedd3e05UL, 0xa5d33708UL, 0xb8c12c1fUL, 0xb3cf2512UL, 0x82e51a31UL, 0x89eb133cUL, 0x94f9082bUL, 0x9ff70126UL, -0x464de6bdUL, 0x4d43efb0UL, 0x5051f4a7UL, 0x5b5ffdaaUL, 0x6a75c289UL, 0x617bcb84UL, 0x7c69d093UL, 0x7767d99eUL, -0x1e3daed5UL, 0x1533a7d8UL, 0x0821bccfUL, 0x032fb5c2UL, 0x32058ae1UL, 0x390b83ecUL, 0x241998fbUL, 0x2f1791f6UL, -0x8d764dd6UL, 0x867844dbUL, 0x9b6a5fccUL, 0x906456c1UL, 0xa14e69e2UL, 0xaa4060efUL, 0xb7527bf8UL, 0xbc5c72f5UL, -0xd50605beUL, 0xde080cb3UL, 0xc31a17a4UL, 0xc8141ea9UL, 0xf93e218aUL, 0xf2302887UL, 0xef223390UL, 0xe42c3a9dUL, -0x3d96dd06UL, 0x3698d40bUL, 0x2b8acf1cUL, 0x2084c611UL, 0x11aef932UL, 0x1aa0f03fUL, 0x07b2eb28UL, 0x0cbce225UL, -0x65e6956eUL, 0x6ee89c63UL, 0x73fa8774UL, 0x78f48e79UL, 0x49deb15aUL, 0x42d0b857UL, 0x5fc2a340UL, 0x54ccaa4dUL, -0xf741ecdaUL, 0xfc4fe5d7UL, 0xe15dfec0UL, 0xea53f7cdUL, 0xdb79c8eeUL, 0xd077c1e3UL, 0xcd65daf4UL, 0xc66bd3f9UL, -0xaf31a4b2UL, 0xa43fadbfUL, 0xb92db6a8UL, 0xb223bfa5UL, 0x83098086UL, 0x8807898bUL, 0x9515929cUL, 0x9e1b9b91UL, -0x47a17c0aUL, 0x4caf7507UL, 0x51bd6e10UL, 0x5ab3671dUL, 0x6b99583eUL, 0x60975133UL, 0x7d854a24UL, 0x768b4329UL, -0x1fd13462UL, 0x14df3d6fUL, 0x09cd2678UL, 0x02c32f75UL, 0x33e91056UL, 0x38e7195bUL, 0x25f5024cUL, 0x2efb0b41UL, -0x8c9ad761UL, 0x8794de6cUL, 0x9a86c57bUL, 0x9188cc76UL, 0xa0a2f355UL, 0xabacfa58UL, 0xb6bee14fUL, 0xbdb0e842UL, -0xd4ea9f09UL, 0xdfe49604UL, 0xc2f68d13UL, 0xc9f8841eUL, 0xf8d2bb3dUL, 0xf3dcb230UL, 0xeecea927UL, 0xe5c0a02aUL, -0x3c7a47b1UL, 0x37744ebcUL, 0x2a6655abUL, 0x21685ca6UL, 0x10426385UL, 0x1b4c6a88UL, 0x065e719fUL, 0x0d507892UL, -0x640a0fd9UL, 0x6f0406d4UL, 0x72161dc3UL, 0x791814ceUL, 0x48322bedUL, 0x433c22e0UL, 0x5e2e39f7UL, 0x552030faUL, -0x01ec9ab7UL, 0x0ae293baUL, 0x17f088adUL, 0x1cfe81a0UL, 0x2dd4be83UL, 0x26dab78eUL, 0x3bc8ac99UL, 0x30c6a594UL, -0x599cd2dfUL, 0x5292dbd2UL, 0x4f80c0c5UL, 0x448ec9c8UL, 0x75a4f6ebUL, 0x7eaaffe6UL, 0x63b8e4f1UL, 0x68b6edfcUL, -0xb10c0a67UL, 0xba02036aUL, 0xa710187dUL, 0xac1e1170UL, 0x9d342e53UL, 0x963a275eUL, 0x8b283c49UL, 0x80263544UL, -0xe97c420fUL, 0xe2724b02UL, 0xff605015UL, 0xf46e5918UL, 0xc544663bUL, 0xce4a6f36UL, 0xd3587421UL, 0xd8567d2cUL, -0x7a37a10cUL, 0x7139a801UL, 0x6c2bb316UL, 0x6725ba1bUL, 0x560f8538UL, 0x5d018c35UL, 0x40139722UL, 0x4b1d9e2fUL, -0x2247e964UL, 0x2949e069UL, 0x345bfb7eUL, 0x3f55f273UL, 0x0e7fcd50UL, 0x0571c45dUL, 0x1863df4aUL, 0x136dd647UL, -0xcad731dcUL, 0xc1d938d1UL, 0xdccb23c6UL, 0xd7c52acbUL, 0xe6ef15e8UL, 0xede11ce5UL, 0xf0f307f2UL, 0xfbfd0effUL, +0x00000000UL, 0x0b0e090dUL, 0x161c121aUL, 0x1d121b17UL, 0x2c382434UL, 0x27362d39UL, 0x3a24362eUL, 0x312a3f23UL, +0x58704868UL, 0x537e4165UL, 0x4e6c5a72UL, 0x4562537fUL, 0x74486c5cUL, 0x7f466551UL, 0x62547e46UL, 0x695a774bUL, +0xb0e090d0UL, 0xbbee99ddUL, 0xa6fc82caUL, 0xadf28bc7UL, 0x9cd8b4e4UL, 0x97d6bde9UL, 0x8ac4a6feUL, 0x81caaff3UL, +0xe890d8b8UL, 0xe39ed1b5UL, 0xfe8ccaa2UL, 0xf582c3afUL, 0xc4a8fc8cUL, 0xcfa6f581UL, 0xd2b4ee96UL, 0xd9bae79bUL, +0x7bdb3bbbUL, 0x70d532b6UL, 0x6dc729a1UL, 0x66c920acUL, 0x57e31f8fUL, 0x5ced1682UL, 0x41ff0d95UL, 0x4af10498UL, +0x23ab73d3UL, 0x28a57adeUL, 0x35b761c9UL, 0x3eb968c4UL, 0x0f9357e7UL, 0x049d5eeaUL, 0x198f45fdUL, 0x12814cf0UL, +0xcb3bab6bUL, 0xc035a266UL, 0xdd27b971UL, 0xd629b07cUL, 0xe7038f5fUL, 0xec0d8652UL, 0xf11f9d45UL, 0xfa119448UL, +0x934be303UL, 0x9845ea0eUL, 0x8557f119UL, 0x8e59f814UL, 0xbf73c737UL, 0xb47dce3aUL, 0xa96fd52dUL, 0xa261dc20UL, +0xf6ad766dUL, 0xfda37f60UL, 0xe0b16477UL, 0xebbf6d7aUL, 0xda955259UL, 0xd19b5b54UL, 0xcc894043UL, 0xc787494eUL, +0xaedd3e05UL, 0xa5d33708UL, 0xb8c12c1fUL, 0xb3cf2512UL, 0x82e51a31UL, 0x89eb133cUL, 0x94f9082bUL, 0x9ff70126UL, +0x464de6bdUL, 0x4d43efb0UL, 0x5051f4a7UL, 0x5b5ffdaaUL, 0x6a75c289UL, 0x617bcb84UL, 0x7c69d093UL, 0x7767d99eUL, +0x1e3daed5UL, 0x1533a7d8UL, 0x0821bccfUL, 0x032fb5c2UL, 0x32058ae1UL, 0x390b83ecUL, 0x241998fbUL, 0x2f1791f6UL, +0x8d764dd6UL, 0x867844dbUL, 0x9b6a5fccUL, 0x906456c1UL, 0xa14e69e2UL, 0xaa4060efUL, 0xb7527bf8UL, 0xbc5c72f5UL, +0xd50605beUL, 0xde080cb3UL, 0xc31a17a4UL, 0xc8141ea9UL, 0xf93e218aUL, 0xf2302887UL, 0xef223390UL, 0xe42c3a9dUL, +0x3d96dd06UL, 0x3698d40bUL, 0x2b8acf1cUL, 0x2084c611UL, 0x11aef932UL, 0x1aa0f03fUL, 0x07b2eb28UL, 0x0cbce225UL, +0x65e6956eUL, 0x6ee89c63UL, 0x73fa8774UL, 0x78f48e79UL, 0x49deb15aUL, 0x42d0b857UL, 0x5fc2a340UL, 0x54ccaa4dUL, +0xf741ecdaUL, 0xfc4fe5d7UL, 0xe15dfec0UL, 0xea53f7cdUL, 0xdb79c8eeUL, 0xd077c1e3UL, 0xcd65daf4UL, 0xc66bd3f9UL, +0xaf31a4b2UL, 0xa43fadbfUL, 0xb92db6a8UL, 0xb223bfa5UL, 0x83098086UL, 0x8807898bUL, 0x9515929cUL, 0x9e1b9b91UL, +0x47a17c0aUL, 0x4caf7507UL, 0x51bd6e10UL, 0x5ab3671dUL, 0x6b99583eUL, 0x60975133UL, 0x7d854a24UL, 0x768b4329UL, +0x1fd13462UL, 0x14df3d6fUL, 0x09cd2678UL, 0x02c32f75UL, 0x33e91056UL, 0x38e7195bUL, 0x25f5024cUL, 0x2efb0b41UL, +0x8c9ad761UL, 0x8794de6cUL, 0x9a86c57bUL, 0x9188cc76UL, 0xa0a2f355UL, 0xabacfa58UL, 0xb6bee14fUL, 0xbdb0e842UL, +0xd4ea9f09UL, 0xdfe49604UL, 0xc2f68d13UL, 0xc9f8841eUL, 0xf8d2bb3dUL, 0xf3dcb230UL, 0xeecea927UL, 0xe5c0a02aUL, +0x3c7a47b1UL, 0x37744ebcUL, 0x2a6655abUL, 0x21685ca6UL, 0x10426385UL, 0x1b4c6a88UL, 0x065e719fUL, 0x0d507892UL, +0x640a0fd9UL, 0x6f0406d4UL, 0x72161dc3UL, 0x791814ceUL, 0x48322bedUL, 0x433c22e0UL, 0x5e2e39f7UL, 0x552030faUL, +0x01ec9ab7UL, 0x0ae293baUL, 0x17f088adUL, 0x1cfe81a0UL, 0x2dd4be83UL, 0x26dab78eUL, 0x3bc8ac99UL, 0x30c6a594UL, +0x599cd2dfUL, 0x5292dbd2UL, 0x4f80c0c5UL, 0x448ec9c8UL, 0x75a4f6ebUL, 0x7eaaffe6UL, 0x63b8e4f1UL, 0x68b6edfcUL, +0xb10c0a67UL, 0xba02036aUL, 0xa710187dUL, 0xac1e1170UL, 0x9d342e53UL, 0x963a275eUL, 0x8b283c49UL, 0x80263544UL, +0xe97c420fUL, 0xe2724b02UL, 0xff605015UL, 0xf46e5918UL, 0xc544663bUL, 0xce4a6f36UL, 0xd3587421UL, 0xd8567d2cUL, +0x7a37a10cUL, 0x7139a801UL, 0x6c2bb316UL, 0x6725ba1bUL, 0x560f8538UL, 0x5d018c35UL, 0x40139722UL, 0x4b1d9e2fUL, +0x2247e964UL, 0x2949e069UL, 0x345bfb7eUL, 0x3f55f273UL, 0x0e7fcd50UL, 0x0571c45dUL, 0x1863df4aUL, 0x136dd647UL, +0xcad731dcUL, 0xc1d938d1UL, 0xdccb23c6UL, 0xd7c52acbUL, 0xe6ef15e8UL, 0xede11ce5UL, 0xf0f307f2UL, 0xfbfd0effUL, 0x92a779b4UL, 0x99a970b9UL, 0x84bb6baeUL, 0x8fb562a3UL, 0xbe9f5d80UL, 0xb591548dUL, 0xa8834f9aUL, 0xa38d4697UL }; static const ulong32 Tks2[] = { -0x00000000UL, 0x0d0b0e09UL, 0x1a161c12UL, 0x171d121bUL, 0x342c3824UL, 0x3927362dUL, 0x2e3a2436UL, 0x23312a3fUL, -0x68587048UL, 0x65537e41UL, 0x724e6c5aUL, 0x7f456253UL, 0x5c74486cUL, 0x517f4665UL, 0x4662547eUL, 0x4b695a77UL, -0xd0b0e090UL, 0xddbbee99UL, 0xcaa6fc82UL, 0xc7adf28bUL, 0xe49cd8b4UL, 0xe997d6bdUL, 0xfe8ac4a6UL, 0xf381caafUL, -0xb8e890d8UL, 0xb5e39ed1UL, 0xa2fe8ccaUL, 0xaff582c3UL, 0x8cc4a8fcUL, 0x81cfa6f5UL, 0x96d2b4eeUL, 0x9bd9bae7UL, -0xbb7bdb3bUL, 0xb670d532UL, 0xa16dc729UL, 0xac66c920UL, 0x8f57e31fUL, 0x825ced16UL, 0x9541ff0dUL, 0x984af104UL, -0xd323ab73UL, 0xde28a57aUL, 0xc935b761UL, 0xc43eb968UL, 0xe70f9357UL, 0xea049d5eUL, 0xfd198f45UL, 0xf012814cUL, -0x6bcb3babUL, 0x66c035a2UL, 0x71dd27b9UL, 0x7cd629b0UL, 0x5fe7038fUL, 0x52ec0d86UL, 0x45f11f9dUL, 0x48fa1194UL, -0x03934be3UL, 0x0e9845eaUL, 0x198557f1UL, 0x148e59f8UL, 0x37bf73c7UL, 0x3ab47dceUL, 0x2da96fd5UL, 0x20a261dcUL, -0x6df6ad76UL, 0x60fda37fUL, 0x77e0b164UL, 0x7aebbf6dUL, 0x59da9552UL, 0x54d19b5bUL, 0x43cc8940UL, 0x4ec78749UL, -0x05aedd3eUL, 0x08a5d337UL, 0x1fb8c12cUL, 0x12b3cf25UL, 0x3182e51aUL, 0x3c89eb13UL, 0x2b94f908UL, 0x269ff701UL, -0xbd464de6UL, 0xb04d43efUL, 0xa75051f4UL, 0xaa5b5ffdUL, 0x896a75c2UL, 0x84617bcbUL, 0x937c69d0UL, 0x9e7767d9UL, -0xd51e3daeUL, 0xd81533a7UL, 0xcf0821bcUL, 0xc2032fb5UL, 0xe132058aUL, 0xec390b83UL, 0xfb241998UL, 0xf62f1791UL, -0xd68d764dUL, 0xdb867844UL, 0xcc9b6a5fUL, 0xc1906456UL, 0xe2a14e69UL, 0xefaa4060UL, 0xf8b7527bUL, 0xf5bc5c72UL, -0xbed50605UL, 0xb3de080cUL, 0xa4c31a17UL, 0xa9c8141eUL, 0x8af93e21UL, 0x87f23028UL, 0x90ef2233UL, 0x9de42c3aUL, -0x063d96ddUL, 0x0b3698d4UL, 0x1c2b8acfUL, 0x112084c6UL, 0x3211aef9UL, 0x3f1aa0f0UL, 0x2807b2ebUL, 0x250cbce2UL, -0x6e65e695UL, 0x636ee89cUL, 0x7473fa87UL, 0x7978f48eUL, 0x5a49deb1UL, 0x5742d0b8UL, 0x405fc2a3UL, 0x4d54ccaaUL, -0xdaf741ecUL, 0xd7fc4fe5UL, 0xc0e15dfeUL, 0xcdea53f7UL, 0xeedb79c8UL, 0xe3d077c1UL, 0xf4cd65daUL, 0xf9c66bd3UL, -0xb2af31a4UL, 0xbfa43fadUL, 0xa8b92db6UL, 0xa5b223bfUL, 0x86830980UL, 0x8b880789UL, 0x9c951592UL, 0x919e1b9bUL, -0x0a47a17cUL, 0x074caf75UL, 0x1051bd6eUL, 0x1d5ab367UL, 0x3e6b9958UL, 0x33609751UL, 0x247d854aUL, 0x29768b43UL, -0x621fd134UL, 0x6f14df3dUL, 0x7809cd26UL, 0x7502c32fUL, 0x5633e910UL, 0x5b38e719UL, 0x4c25f502UL, 0x412efb0bUL, -0x618c9ad7UL, 0x6c8794deUL, 0x7b9a86c5UL, 0x769188ccUL, 0x55a0a2f3UL, 0x58abacfaUL, 0x4fb6bee1UL, 0x42bdb0e8UL, -0x09d4ea9fUL, 0x04dfe496UL, 0x13c2f68dUL, 0x1ec9f884UL, 0x3df8d2bbUL, 0x30f3dcb2UL, 0x27eecea9UL, 0x2ae5c0a0UL, -0xb13c7a47UL, 0xbc37744eUL, 0xab2a6655UL, 0xa621685cUL, 0x85104263UL, 0x881b4c6aUL, 0x9f065e71UL, 0x920d5078UL, -0xd9640a0fUL, 0xd46f0406UL, 0xc372161dUL, 0xce791814UL, 0xed48322bUL, 0xe0433c22UL, 0xf75e2e39UL, 0xfa552030UL, -0xb701ec9aUL, 0xba0ae293UL, 0xad17f088UL, 0xa01cfe81UL, 0x832dd4beUL, 0x8e26dab7UL, 0x993bc8acUL, 0x9430c6a5UL, -0xdf599cd2UL, 0xd25292dbUL, 0xc54f80c0UL, 0xc8448ec9UL, 0xeb75a4f6UL, 0xe67eaaffUL, 0xf163b8e4UL, 0xfc68b6edUL, -0x67b10c0aUL, 0x6aba0203UL, 0x7da71018UL, 0x70ac1e11UL, 0x539d342eUL, 0x5e963a27UL, 0x498b283cUL, 0x44802635UL, -0x0fe97c42UL, 0x02e2724bUL, 0x15ff6050UL, 0x18f46e59UL, 0x3bc54466UL, 0x36ce4a6fUL, 0x21d35874UL, 0x2cd8567dUL, -0x0c7a37a1UL, 0x017139a8UL, 0x166c2bb3UL, 0x1b6725baUL, 0x38560f85UL, 0x355d018cUL, 0x22401397UL, 0x2f4b1d9eUL, -0x642247e9UL, 0x692949e0UL, 0x7e345bfbUL, 0x733f55f2UL, 0x500e7fcdUL, 0x5d0571c4UL, 0x4a1863dfUL, 0x47136dd6UL, -0xdccad731UL, 0xd1c1d938UL, 0xc6dccb23UL, 0xcbd7c52aUL, 0xe8e6ef15UL, 0xe5ede11cUL, 0xf2f0f307UL, 0xfffbfd0eUL, +0x00000000UL, 0x0d0b0e09UL, 0x1a161c12UL, 0x171d121bUL, 0x342c3824UL, 0x3927362dUL, 0x2e3a2436UL, 0x23312a3fUL, +0x68587048UL, 0x65537e41UL, 0x724e6c5aUL, 0x7f456253UL, 0x5c74486cUL, 0x517f4665UL, 0x4662547eUL, 0x4b695a77UL, +0xd0b0e090UL, 0xddbbee99UL, 0xcaa6fc82UL, 0xc7adf28bUL, 0xe49cd8b4UL, 0xe997d6bdUL, 0xfe8ac4a6UL, 0xf381caafUL, +0xb8e890d8UL, 0xb5e39ed1UL, 0xa2fe8ccaUL, 0xaff582c3UL, 0x8cc4a8fcUL, 0x81cfa6f5UL, 0x96d2b4eeUL, 0x9bd9bae7UL, +0xbb7bdb3bUL, 0xb670d532UL, 0xa16dc729UL, 0xac66c920UL, 0x8f57e31fUL, 0x825ced16UL, 0x9541ff0dUL, 0x984af104UL, +0xd323ab73UL, 0xde28a57aUL, 0xc935b761UL, 0xc43eb968UL, 0xe70f9357UL, 0xea049d5eUL, 0xfd198f45UL, 0xf012814cUL, +0x6bcb3babUL, 0x66c035a2UL, 0x71dd27b9UL, 0x7cd629b0UL, 0x5fe7038fUL, 0x52ec0d86UL, 0x45f11f9dUL, 0x48fa1194UL, +0x03934be3UL, 0x0e9845eaUL, 0x198557f1UL, 0x148e59f8UL, 0x37bf73c7UL, 0x3ab47dceUL, 0x2da96fd5UL, 0x20a261dcUL, +0x6df6ad76UL, 0x60fda37fUL, 0x77e0b164UL, 0x7aebbf6dUL, 0x59da9552UL, 0x54d19b5bUL, 0x43cc8940UL, 0x4ec78749UL, +0x05aedd3eUL, 0x08a5d337UL, 0x1fb8c12cUL, 0x12b3cf25UL, 0x3182e51aUL, 0x3c89eb13UL, 0x2b94f908UL, 0x269ff701UL, +0xbd464de6UL, 0xb04d43efUL, 0xa75051f4UL, 0xaa5b5ffdUL, 0x896a75c2UL, 0x84617bcbUL, 0x937c69d0UL, 0x9e7767d9UL, +0xd51e3daeUL, 0xd81533a7UL, 0xcf0821bcUL, 0xc2032fb5UL, 0xe132058aUL, 0xec390b83UL, 0xfb241998UL, 0xf62f1791UL, +0xd68d764dUL, 0xdb867844UL, 0xcc9b6a5fUL, 0xc1906456UL, 0xe2a14e69UL, 0xefaa4060UL, 0xf8b7527bUL, 0xf5bc5c72UL, +0xbed50605UL, 0xb3de080cUL, 0xa4c31a17UL, 0xa9c8141eUL, 0x8af93e21UL, 0x87f23028UL, 0x90ef2233UL, 0x9de42c3aUL, +0x063d96ddUL, 0x0b3698d4UL, 0x1c2b8acfUL, 0x112084c6UL, 0x3211aef9UL, 0x3f1aa0f0UL, 0x2807b2ebUL, 0x250cbce2UL, +0x6e65e695UL, 0x636ee89cUL, 0x7473fa87UL, 0x7978f48eUL, 0x5a49deb1UL, 0x5742d0b8UL, 0x405fc2a3UL, 0x4d54ccaaUL, +0xdaf741ecUL, 0xd7fc4fe5UL, 0xc0e15dfeUL, 0xcdea53f7UL, 0xeedb79c8UL, 0xe3d077c1UL, 0xf4cd65daUL, 0xf9c66bd3UL, +0xb2af31a4UL, 0xbfa43fadUL, 0xa8b92db6UL, 0xa5b223bfUL, 0x86830980UL, 0x8b880789UL, 0x9c951592UL, 0x919e1b9bUL, +0x0a47a17cUL, 0x074caf75UL, 0x1051bd6eUL, 0x1d5ab367UL, 0x3e6b9958UL, 0x33609751UL, 0x247d854aUL, 0x29768b43UL, +0x621fd134UL, 0x6f14df3dUL, 0x7809cd26UL, 0x7502c32fUL, 0x5633e910UL, 0x5b38e719UL, 0x4c25f502UL, 0x412efb0bUL, +0x618c9ad7UL, 0x6c8794deUL, 0x7b9a86c5UL, 0x769188ccUL, 0x55a0a2f3UL, 0x58abacfaUL, 0x4fb6bee1UL, 0x42bdb0e8UL, +0x09d4ea9fUL, 0x04dfe496UL, 0x13c2f68dUL, 0x1ec9f884UL, 0x3df8d2bbUL, 0x30f3dcb2UL, 0x27eecea9UL, 0x2ae5c0a0UL, +0xb13c7a47UL, 0xbc37744eUL, 0xab2a6655UL, 0xa621685cUL, 0x85104263UL, 0x881b4c6aUL, 0x9f065e71UL, 0x920d5078UL, +0xd9640a0fUL, 0xd46f0406UL, 0xc372161dUL, 0xce791814UL, 0xed48322bUL, 0xe0433c22UL, 0xf75e2e39UL, 0xfa552030UL, +0xb701ec9aUL, 0xba0ae293UL, 0xad17f088UL, 0xa01cfe81UL, 0x832dd4beUL, 0x8e26dab7UL, 0x993bc8acUL, 0x9430c6a5UL, +0xdf599cd2UL, 0xd25292dbUL, 0xc54f80c0UL, 0xc8448ec9UL, 0xeb75a4f6UL, 0xe67eaaffUL, 0xf163b8e4UL, 0xfc68b6edUL, +0x67b10c0aUL, 0x6aba0203UL, 0x7da71018UL, 0x70ac1e11UL, 0x539d342eUL, 0x5e963a27UL, 0x498b283cUL, 0x44802635UL, +0x0fe97c42UL, 0x02e2724bUL, 0x15ff6050UL, 0x18f46e59UL, 0x3bc54466UL, 0x36ce4a6fUL, 0x21d35874UL, 0x2cd8567dUL, +0x0c7a37a1UL, 0x017139a8UL, 0x166c2bb3UL, 0x1b6725baUL, 0x38560f85UL, 0x355d018cUL, 0x22401397UL, 0x2f4b1d9eUL, +0x642247e9UL, 0x692949e0UL, 0x7e345bfbUL, 0x733f55f2UL, 0x500e7fcdUL, 0x5d0571c4UL, 0x4a1863dfUL, 0x47136dd6UL, +0xdccad731UL, 0xd1c1d938UL, 0xc6dccb23UL, 0xcbd7c52aUL, 0xe8e6ef15UL, 0xe5ede11cUL, 0xf2f0f307UL, 0xfffbfd0eUL, 0xb492a779UL, 0xb999a970UL, 0xae84bb6bUL, 0xa38fb562UL, 0x80be9f5dUL, 0x8db59154UL, 0x9aa8834fUL, 0x97a38d46UL }; static const ulong32 Tks3[] = { -0x00000000UL, 0x090d0b0eUL, 0x121a161cUL, 0x1b171d12UL, 0x24342c38UL, 0x2d392736UL, 0x362e3a24UL, 0x3f23312aUL, -0x48685870UL, 0x4165537eUL, 0x5a724e6cUL, 0x537f4562UL, 0x6c5c7448UL, 0x65517f46UL, 0x7e466254UL, 0x774b695aUL, -0x90d0b0e0UL, 0x99ddbbeeUL, 0x82caa6fcUL, 0x8bc7adf2UL, 0xb4e49cd8UL, 0xbde997d6UL, 0xa6fe8ac4UL, 0xaff381caUL, -0xd8b8e890UL, 0xd1b5e39eUL, 0xcaa2fe8cUL, 0xc3aff582UL, 0xfc8cc4a8UL, 0xf581cfa6UL, 0xee96d2b4UL, 0xe79bd9baUL, -0x3bbb7bdbUL, 0x32b670d5UL, 0x29a16dc7UL, 0x20ac66c9UL, 0x1f8f57e3UL, 0x16825cedUL, 0x0d9541ffUL, 0x04984af1UL, -0x73d323abUL, 0x7ade28a5UL, 0x61c935b7UL, 0x68c43eb9UL, 0x57e70f93UL, 0x5eea049dUL, 0x45fd198fUL, 0x4cf01281UL, -0xab6bcb3bUL, 0xa266c035UL, 0xb971dd27UL, 0xb07cd629UL, 0x8f5fe703UL, 0x8652ec0dUL, 0x9d45f11fUL, 0x9448fa11UL, -0xe303934bUL, 0xea0e9845UL, 0xf1198557UL, 0xf8148e59UL, 0xc737bf73UL, 0xce3ab47dUL, 0xd52da96fUL, 0xdc20a261UL, -0x766df6adUL, 0x7f60fda3UL, 0x6477e0b1UL, 0x6d7aebbfUL, 0x5259da95UL, 0x5b54d19bUL, 0x4043cc89UL, 0x494ec787UL, -0x3e05aeddUL, 0x3708a5d3UL, 0x2c1fb8c1UL, 0x2512b3cfUL, 0x1a3182e5UL, 0x133c89ebUL, 0x082b94f9UL, 0x01269ff7UL, -0xe6bd464dUL, 0xefb04d43UL, 0xf4a75051UL, 0xfdaa5b5fUL, 0xc2896a75UL, 0xcb84617bUL, 0xd0937c69UL, 0xd99e7767UL, -0xaed51e3dUL, 0xa7d81533UL, 0xbccf0821UL, 0xb5c2032fUL, 0x8ae13205UL, 0x83ec390bUL, 0x98fb2419UL, 0x91f62f17UL, -0x4dd68d76UL, 0x44db8678UL, 0x5fcc9b6aUL, 0x56c19064UL, 0x69e2a14eUL, 0x60efaa40UL, 0x7bf8b752UL, 0x72f5bc5cUL, -0x05bed506UL, 0x0cb3de08UL, 0x17a4c31aUL, 0x1ea9c814UL, 0x218af93eUL, 0x2887f230UL, 0x3390ef22UL, 0x3a9de42cUL, -0xdd063d96UL, 0xd40b3698UL, 0xcf1c2b8aUL, 0xc6112084UL, 0xf93211aeUL, 0xf03f1aa0UL, 0xeb2807b2UL, 0xe2250cbcUL, -0x956e65e6UL, 0x9c636ee8UL, 0x877473faUL, 0x8e7978f4UL, 0xb15a49deUL, 0xb85742d0UL, 0xa3405fc2UL, 0xaa4d54ccUL, -0xecdaf741UL, 0xe5d7fc4fUL, 0xfec0e15dUL, 0xf7cdea53UL, 0xc8eedb79UL, 0xc1e3d077UL, 0xdaf4cd65UL, 0xd3f9c66bUL, -0xa4b2af31UL, 0xadbfa43fUL, 0xb6a8b92dUL, 0xbfa5b223UL, 0x80868309UL, 0x898b8807UL, 0x929c9515UL, 0x9b919e1bUL, -0x7c0a47a1UL, 0x75074cafUL, 0x6e1051bdUL, 0x671d5ab3UL, 0x583e6b99UL, 0x51336097UL, 0x4a247d85UL, 0x4329768bUL, -0x34621fd1UL, 0x3d6f14dfUL, 0x267809cdUL, 0x2f7502c3UL, 0x105633e9UL, 0x195b38e7UL, 0x024c25f5UL, 0x0b412efbUL, -0xd7618c9aUL, 0xde6c8794UL, 0xc57b9a86UL, 0xcc769188UL, 0xf355a0a2UL, 0xfa58abacUL, 0xe14fb6beUL, 0xe842bdb0UL, -0x9f09d4eaUL, 0x9604dfe4UL, 0x8d13c2f6UL, 0x841ec9f8UL, 0xbb3df8d2UL, 0xb230f3dcUL, 0xa927eeceUL, 0xa02ae5c0UL, -0x47b13c7aUL, 0x4ebc3774UL, 0x55ab2a66UL, 0x5ca62168UL, 0x63851042UL, 0x6a881b4cUL, 0x719f065eUL, 0x78920d50UL, -0x0fd9640aUL, 0x06d46f04UL, 0x1dc37216UL, 0x14ce7918UL, 0x2bed4832UL, 0x22e0433cUL, 0x39f75e2eUL, 0x30fa5520UL, -0x9ab701ecUL, 0x93ba0ae2UL, 0x88ad17f0UL, 0x81a01cfeUL, 0xbe832dd4UL, 0xb78e26daUL, 0xac993bc8UL, 0xa59430c6UL, -0xd2df599cUL, 0xdbd25292UL, 0xc0c54f80UL, 0xc9c8448eUL, 0xf6eb75a4UL, 0xffe67eaaUL, 0xe4f163b8UL, 0xedfc68b6UL, -0x0a67b10cUL, 0x036aba02UL, 0x187da710UL, 0x1170ac1eUL, 0x2e539d34UL, 0x275e963aUL, 0x3c498b28UL, 0x35448026UL, -0x420fe97cUL, 0x4b02e272UL, 0x5015ff60UL, 0x5918f46eUL, 0x663bc544UL, 0x6f36ce4aUL, 0x7421d358UL, 0x7d2cd856UL, -0xa10c7a37UL, 0xa8017139UL, 0xb3166c2bUL, 0xba1b6725UL, 0x8538560fUL, 0x8c355d01UL, 0x97224013UL, 0x9e2f4b1dUL, -0xe9642247UL, 0xe0692949UL, 0xfb7e345bUL, 0xf2733f55UL, 0xcd500e7fUL, 0xc45d0571UL, 0xdf4a1863UL, 0xd647136dUL, -0x31dccad7UL, 0x38d1c1d9UL, 0x23c6dccbUL, 0x2acbd7c5UL, 0x15e8e6efUL, 0x1ce5ede1UL, 0x07f2f0f3UL, 0x0efffbfdUL, +0x00000000UL, 0x090d0b0eUL, 0x121a161cUL, 0x1b171d12UL, 0x24342c38UL, 0x2d392736UL, 0x362e3a24UL, 0x3f23312aUL, +0x48685870UL, 0x4165537eUL, 0x5a724e6cUL, 0x537f4562UL, 0x6c5c7448UL, 0x65517f46UL, 0x7e466254UL, 0x774b695aUL, +0x90d0b0e0UL, 0x99ddbbeeUL, 0x82caa6fcUL, 0x8bc7adf2UL, 0xb4e49cd8UL, 0xbde997d6UL, 0xa6fe8ac4UL, 0xaff381caUL, +0xd8b8e890UL, 0xd1b5e39eUL, 0xcaa2fe8cUL, 0xc3aff582UL, 0xfc8cc4a8UL, 0xf581cfa6UL, 0xee96d2b4UL, 0xe79bd9baUL, +0x3bbb7bdbUL, 0x32b670d5UL, 0x29a16dc7UL, 0x20ac66c9UL, 0x1f8f57e3UL, 0x16825cedUL, 0x0d9541ffUL, 0x04984af1UL, +0x73d323abUL, 0x7ade28a5UL, 0x61c935b7UL, 0x68c43eb9UL, 0x57e70f93UL, 0x5eea049dUL, 0x45fd198fUL, 0x4cf01281UL, +0xab6bcb3bUL, 0xa266c035UL, 0xb971dd27UL, 0xb07cd629UL, 0x8f5fe703UL, 0x8652ec0dUL, 0x9d45f11fUL, 0x9448fa11UL, +0xe303934bUL, 0xea0e9845UL, 0xf1198557UL, 0xf8148e59UL, 0xc737bf73UL, 0xce3ab47dUL, 0xd52da96fUL, 0xdc20a261UL, +0x766df6adUL, 0x7f60fda3UL, 0x6477e0b1UL, 0x6d7aebbfUL, 0x5259da95UL, 0x5b54d19bUL, 0x4043cc89UL, 0x494ec787UL, +0x3e05aeddUL, 0x3708a5d3UL, 0x2c1fb8c1UL, 0x2512b3cfUL, 0x1a3182e5UL, 0x133c89ebUL, 0x082b94f9UL, 0x01269ff7UL, +0xe6bd464dUL, 0xefb04d43UL, 0xf4a75051UL, 0xfdaa5b5fUL, 0xc2896a75UL, 0xcb84617bUL, 0xd0937c69UL, 0xd99e7767UL, +0xaed51e3dUL, 0xa7d81533UL, 0xbccf0821UL, 0xb5c2032fUL, 0x8ae13205UL, 0x83ec390bUL, 0x98fb2419UL, 0x91f62f17UL, +0x4dd68d76UL, 0x44db8678UL, 0x5fcc9b6aUL, 0x56c19064UL, 0x69e2a14eUL, 0x60efaa40UL, 0x7bf8b752UL, 0x72f5bc5cUL, +0x05bed506UL, 0x0cb3de08UL, 0x17a4c31aUL, 0x1ea9c814UL, 0x218af93eUL, 0x2887f230UL, 0x3390ef22UL, 0x3a9de42cUL, +0xdd063d96UL, 0xd40b3698UL, 0xcf1c2b8aUL, 0xc6112084UL, 0xf93211aeUL, 0xf03f1aa0UL, 0xeb2807b2UL, 0xe2250cbcUL, +0x956e65e6UL, 0x9c636ee8UL, 0x877473faUL, 0x8e7978f4UL, 0xb15a49deUL, 0xb85742d0UL, 0xa3405fc2UL, 0xaa4d54ccUL, +0xecdaf741UL, 0xe5d7fc4fUL, 0xfec0e15dUL, 0xf7cdea53UL, 0xc8eedb79UL, 0xc1e3d077UL, 0xdaf4cd65UL, 0xd3f9c66bUL, +0xa4b2af31UL, 0xadbfa43fUL, 0xb6a8b92dUL, 0xbfa5b223UL, 0x80868309UL, 0x898b8807UL, 0x929c9515UL, 0x9b919e1bUL, +0x7c0a47a1UL, 0x75074cafUL, 0x6e1051bdUL, 0x671d5ab3UL, 0x583e6b99UL, 0x51336097UL, 0x4a247d85UL, 0x4329768bUL, +0x34621fd1UL, 0x3d6f14dfUL, 0x267809cdUL, 0x2f7502c3UL, 0x105633e9UL, 0x195b38e7UL, 0x024c25f5UL, 0x0b412efbUL, +0xd7618c9aUL, 0xde6c8794UL, 0xc57b9a86UL, 0xcc769188UL, 0xf355a0a2UL, 0xfa58abacUL, 0xe14fb6beUL, 0xe842bdb0UL, +0x9f09d4eaUL, 0x9604dfe4UL, 0x8d13c2f6UL, 0x841ec9f8UL, 0xbb3df8d2UL, 0xb230f3dcUL, 0xa927eeceUL, 0xa02ae5c0UL, +0x47b13c7aUL, 0x4ebc3774UL, 0x55ab2a66UL, 0x5ca62168UL, 0x63851042UL, 0x6a881b4cUL, 0x719f065eUL, 0x78920d50UL, +0x0fd9640aUL, 0x06d46f04UL, 0x1dc37216UL, 0x14ce7918UL, 0x2bed4832UL, 0x22e0433cUL, 0x39f75e2eUL, 0x30fa5520UL, +0x9ab701ecUL, 0x93ba0ae2UL, 0x88ad17f0UL, 0x81a01cfeUL, 0xbe832dd4UL, 0xb78e26daUL, 0xac993bc8UL, 0xa59430c6UL, +0xd2df599cUL, 0xdbd25292UL, 0xc0c54f80UL, 0xc9c8448eUL, 0xf6eb75a4UL, 0xffe67eaaUL, 0xe4f163b8UL, 0xedfc68b6UL, +0x0a67b10cUL, 0x036aba02UL, 0x187da710UL, 0x1170ac1eUL, 0x2e539d34UL, 0x275e963aUL, 0x3c498b28UL, 0x35448026UL, +0x420fe97cUL, 0x4b02e272UL, 0x5015ff60UL, 0x5918f46eUL, 0x663bc544UL, 0x6f36ce4aUL, 0x7421d358UL, 0x7d2cd856UL, +0xa10c7a37UL, 0xa8017139UL, 0xb3166c2bUL, 0xba1b6725UL, 0x8538560fUL, 0x8c355d01UL, 0x97224013UL, 0x9e2f4b1dUL, +0xe9642247UL, 0xe0692949UL, 0xfb7e345bUL, 0xf2733f55UL, 0xcd500e7fUL, 0xc45d0571UL, 0xdf4a1863UL, 0xd647136dUL, +0x31dccad7UL, 0x38d1c1d9UL, 0x23c6dccbUL, 0x2acbd7c5UL, 0x15e8e6efUL, 0x1ce5ede1UL, 0x07f2f0f3UL, 0x0efffbfdUL, 0x79b492a7UL, 0x70b999a9UL, 0x6bae84bbUL, 0x62a38fb5UL, 0x5d80be9fUL, 0x548db591UL, 0x4f9aa883UL, 0x4697a38dUL }; @@ -1023,6 +1023,8 @@ 0x1B000000UL, 0x36000000UL, /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */ }; -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +#endif /* __LTC_AES_TAB_C__ */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/anubis.c --- a/libtomcrypt/src/ciphers/anubis.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/ciphers/anubis.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -29,17 +27,17 @@ &anubis_test, &anubis_done, &anubis_keysize, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; -#define MIN_N 4 -#define MAX_N 10 -#define MIN_ROUNDS (8 + MIN_N) -#define MAX_ROUNDS (8 + MAX_N) -#define MIN_KEYSIZEB (4*MIN_N) -#define MAX_KEYSIZEB (4*MAX_N) -#define BLOCKSIZE 128 -#define BLOCKSIZEB (BLOCKSIZE/8) +#define MIN_N 4 +#define MAX_N 10 +#define MIN_ROUNDS (8 + MIN_N) +#define MAX_ROUNDS (8 + MAX_N) +#define MIN_KEYSIZEB (4*MIN_N) +#define MAX_KEYSIZEB (4*MAX_N) +#define BLOCKSIZE 128 +#define BLOCKSIZEB (BLOCKSIZE/8) /* @@ -899,7 +897,7 @@ { int N, R, i, pos, r; ulong32 kappa[MAX_N]; - ulong32 inter[MAX_N]; + ulong32 inter[MAX_N] = { 0 }; /* initialize as all zeroes */ ulong32 v, K0, K1, K2, K3; LTC_ARGCHK(key != NULL); @@ -926,16 +924,16 @@ return CRYPT_INVALID_ROUNDS; } - /* - * map cipher key to initial key state (mu): - */ - for (i = 0, pos = 0; i < N; i++, pos += 4) { + /* + * map cipher key to initial key state (mu): + */ + for (i = 0, pos = 0; i < N; i++, pos += 4) { kappa[i] = - (key[pos ] << 24) ^ - (key[pos + 1] << 16) ^ - (key[pos + 2] << 8) ^ - (key[pos + 3] ); - } + (((ulong32)key[pos ]) << 24) ^ + (((ulong32)key[pos + 1]) << 16) ^ + (((ulong32)key[pos + 2]) << 8) ^ + (((ulong32)key[pos + 3]) ); + } /* * generate R + 1 round keys: @@ -1034,7 +1032,7 @@ return err; } #endif - + static void anubis_crypt(const unsigned char *plaintext, unsigned char *ciphertext, ulong32 roundKey[18 + 1][4], int R) { @@ -1048,10 +1046,10 @@ */ for (i = 0, pos = 0; i < 4; i++, pos += 4) { state[i] = - (plaintext[pos ] << 24) ^ - (plaintext[pos + 1] << 16) ^ - (plaintext[pos + 2] << 8) ^ - (plaintext[pos + 3] ) ^ + (((ulong32)plaintext[pos ]) << 24) ^ + (((ulong32)plaintext[pos + 1]) << 16) ^ + (((ulong32)plaintext[pos + 2]) << 8) ^ + (((ulong32)plaintext[pos + 3]) ) ^ roundKey[0][i]; } @@ -1149,7 +1147,7 @@ Decrypts a block of text with Anubis @param ct The input ciphertext (16 bytes) @param pt The output plaintext (16 bytes) - @param skey The key as scheduled + @param skey The key as scheduled @return CRYPT_OK if successful */ int anubis_ecb_decrypt(const unsigned char *ct, unsigned char *pt, symmetric_key *skey) @@ -1181,7 +1179,7 @@ 16, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0xF0, 0x68, 0x60, 0xFC, 0x67, 0x30, 0xE8, 0x18, + { 0xF0, 0x68, 0x60, 0xFC, 0x67, 0x30, 0xE8, 0x18, 0xF1, 0x32, 0xC7, 0x8A, 0xF4, 0x13, 0x2A, 0xFE }, { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } @@ -1189,7 +1187,7 @@ 16, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0xA8, 0x66, 0x84, 0x80, 0x07, 0x74, 0x5C, 0x89, + { 0xA8, 0x66, 0x84, 0x80, 0x07, 0x74, 0x5C, 0x89, 0xFC, 0x5E, 0xB5, 0xBA, 0xD4, 0xFE, 0x32, 0x6D }, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 } @@ -1221,7 +1219,7 @@ 24, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x17, 0xAC, 0x57, 0x44, 0x9D, 0x59, 0x61, 0x66, + { 0x17, 0xAC, 0x57, 0x44, 0x9D, 0x59, 0x61, 0x66, 0xD0, 0xC7, 0x9E, 0x04, 0x7C, 0xC7, 0x58, 0xF0 }, { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1230,7 +1228,7 @@ 24, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x71, 0x52, 0xB4, 0xEB, 0x1D, 0xAA, 0x36, 0xFD, + { 0x71, 0x52, 0xB4, 0xEB, 0x1D, 0xAA, 0x36, 0xFD, 0x57, 0x14, 0x5F, 0x57, 0x04, 0x9F, 0x70, 0x74 }, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1242,7 +1240,7 @@ 28, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0xA2, 0xF0, 0xA6, 0xB9, 0x17, 0x93, 0x2A, 0x3B, + { 0xA2, 0xF0, 0xA6, 0xB9, 0x17, 0x93, 0x2A, 0x3B, 0xEF, 0x08, 0xE8, 0x7A, 0x58, 0xD6, 0xF8, 0x53 }, { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1252,7 +1250,7 @@ 28, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0xF0, 0xCA, 0xFC, 0x78, 0x8B, 0x4B, 0x4E, 0x53, + { 0xF0, 0xCA, 0xFC, 0x78, 0x8B, 0x4B, 0x4E, 0x53, 0x8B, 0xC4, 0x32, 0x6A, 0xF5, 0xB9, 0x1B, 0x5F }, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1265,7 +1263,7 @@ 32, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0xE0, 0x86, 0xAC, 0x45, 0x6B, 0x3C, 0xE5, 0x13, + { 0xE0, 0x86, 0xAC, 0x45, 0x6B, 0x3C, 0xE5, 0x13, 0xED, 0xF5, 0xDF, 0xDD, 0xD6, 0x3B, 0x71, 0x93 }, { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1275,7 +1273,7 @@ 32, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x50, 0x01, 0xB9, 0xF5, 0x21, 0xC1, 0xC1, 0x29, + { 0x50, 0x01, 0xB9, 0xF5, 0x21, 0xC1, 0xC1, 0x29, 0x00, 0xD5, 0xEC, 0x98, 0x2B, 0x9E, 0xE8, 0x21 }, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1288,7 +1286,7 @@ 36, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0xE8, 0xF4, 0xAF, 0x2B, 0x21, 0xA0, 0x87, 0x9B, + { 0xE8, 0xF4, 0xAF, 0x2B, 0x21, 0xA0, 0x87, 0x9B, 0x41, 0x95, 0xB9, 0x71, 0x75, 0x79, 0x04, 0x7C }, { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1299,7 +1297,7 @@ 36, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0xE6, 0xA6, 0xA5, 0xBC, 0x8B, 0x63, 0x6F, 0xE2, + { 0xE6, 0xA6, 0xA5, 0xBC, 0x8B, 0x63, 0x6F, 0xE2, 0xBD, 0xA7, 0xA7, 0x53, 0xAB, 0x40, 0x22, 0xE0 }, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1313,7 +1311,7 @@ 40, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x17, 0x04, 0xD7, 0x2C, 0xC6, 0x85, 0x76, 0x02, + { 0x17, 0x04, 0xD7, 0x2C, 0xC6, 0x85, 0x76, 0x02, 0x4B, 0xCC, 0x39, 0x80, 0xD8, 0x22, 0xEA, 0xA4 }, { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1324,7 +1322,7 @@ 40, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x7A, 0x41, 0xE6, 0x7D, 0x4F, 0xD8, 0x64, 0xF0, + { 0x7A, 0x41, 0xE6, 0x7D, 0x4F, 0xD8, 0x64, 0xF0, 0x44, 0xA8, 0x3C, 0x73, 0x81, 0x7E, 0x53, 0xD8 }, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1500,13 +1498,14 @@ anubis_setup(tests[x].key, tests[x].keylen, 0, &skey); anubis_ecb_encrypt(tests[x].pt, buf[0], &skey); anubis_ecb_decrypt(buf[0], buf[1], &skey); - if (XMEMCMP(buf[0], tests[x].ct, 16) || XMEMCMP(buf[1], tests[x].pt, 16)) { + if (compare_testvector(buf[0], 16, tests[x].ct, 16, "Anubis Encrypt", x) || + compare_testvector(buf[1], 16, tests[x].pt, 16, "Anubis Decrypt", x)) { return CRYPT_FAIL_TESTVECTOR; } for (y = 0; y < 1000; y++) anubis_ecb_encrypt(buf[0], buf[0], &skey); for (y = 0; y < 1000; y++) anubis_ecb_decrypt(buf[0], buf[0], &skey); - if (XMEMCMP(buf[0], tests[x].ct, 16)) { + if (compare_testvector(buf[0], 16, tests[x].ct, 16, "Anubis 1000", 1000)) { return CRYPT_FAIL_TESTVECTOR; } @@ -1515,11 +1514,12 @@ #endif } -/** Terminate the context +/** Terminate the context @param skey The scheduled key */ void anubis_done(symmetric_key *skey) { + LTC_UNUSED_PARAM(skey); } /** @@ -1553,6 +1553,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/blowfish.c --- a/libtomcrypt/src/ciphers/blowfish.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/ciphers/blowfish.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @file blowfish.c @@ -27,7 +25,7 @@ &blowfish_test, &blowfish_done, &blowfish_keysize, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; static const ulong32 ORIG_P[16 + 2] = { @@ -322,15 +320,15 @@ /* check rounds */ if (num_rounds != 0 && num_rounds != 16) { return CRYPT_INVALID_ROUNDS; - } + } /* load in key bytes (Supplied by David Hopwood) */ for (x = y = 0; x < 18; x++) { A = 0; for (z = 0; z < 4; z++) { A = (A << 8) | ((ulong32)key[y++] & 255); - if (y == (ulong32)keylen) { - y = 0; + if (y == (ulong32)keylen) { + y = 0; } } skey->blowfish.K[x] = ORIG_P[x] ^ A; @@ -347,7 +345,7 @@ for (x = 0; x < 8; x++) { B[x] = 0; } - + for (x = 0; x < 18; x += 2) { /* encrypt it */ blowfish_ecb_encrypt(B, B, skey); @@ -446,7 +444,7 @@ Decrypts a block of text with Blowfish @param ct The input ciphertext (8 bytes) @param pt The output plaintext (8 bytes) - @param skey The key as scheduled + @param skey The key as scheduled @return CRYPT_OK if successful */ #ifdef LTC_CLEAN_STACK @@ -464,7 +462,7 @@ LTC_ARGCHK(pt != NULL); LTC_ARGCHK(ct != NULL); LTC_ARGCHK(skey != NULL); - + #ifndef __GNUC__ S1 = skey->blowfish.S[0]; S2 = skey->blowfish.S[1]; @@ -512,7 +510,7 @@ { #ifndef LTC_TEST return CRYPT_NOP; - #else + #else int err; symmetric_key key; static const struct { @@ -548,7 +546,8 @@ blowfish_ecb_decrypt(tmp[0], tmp[1], &key); /* compare */ - if ((XMEMCMP(tmp[0], tests[x].ct, 8) != 0) || (XMEMCMP(tmp[1], tests[x].pt, 8) != 0)) { + if ((compare_testvector(tmp[0], 8, tests[x].ct, 8, "Blowfish Encrypt", x) != 0) || + (compare_testvector(tmp[1], 8, tests[x].pt, 8, "Blowfish Decrypt", x) != 0)) { return CRYPT_FAIL_TESTVECTOR; } @@ -562,11 +561,12 @@ #endif } -/** Terminate the context +/** Terminate the context @param skey The scheduled key */ void blowfish_done(symmetric_key *skey) { + LTC_UNUSED_PARAM(skey); } /** @@ -589,6 +589,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/camellia.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/ciphers/camellia.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,726 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/** + @file camellia.c + Implementation by Tom St Denis of Elliptic Semiconductor +*/ + +#include "tomcrypt.h" + +#ifdef LTC_CAMELLIA + +const struct ltc_cipher_descriptor camellia_desc = { + "camellia", + 23, + 16, 32, 16, 18, + &camellia_setup, + &camellia_ecb_encrypt, + &camellia_ecb_decrypt, + &camellia_test, + &camellia_done, + &camellia_keysize, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL +}; + +static const ulong32 SP1110[] = { +0x70707000, 0x82828200, 0x2c2c2c00, 0xececec00, 0xb3b3b300, 0x27272700, 0xc0c0c000, 0xe5e5e500, +0xe4e4e400, 0x85858500, 0x57575700, 0x35353500, 0xeaeaea00, 0x0c0c0c00, 0xaeaeae00, 0x41414100, +0x23232300, 0xefefef00, 0x6b6b6b00, 0x93939300, 0x45454500, 0x19191900, 0xa5a5a500, 0x21212100, +0xededed00, 0x0e0e0e00, 0x4f4f4f00, 0x4e4e4e00, 0x1d1d1d00, 0x65656500, 0x92929200, 0xbdbdbd00, +0x86868600, 0xb8b8b800, 0xafafaf00, 0x8f8f8f00, 0x7c7c7c00, 0xebebeb00, 0x1f1f1f00, 0xcecece00, +0x3e3e3e00, 0x30303000, 0xdcdcdc00, 0x5f5f5f00, 0x5e5e5e00, 0xc5c5c500, 0x0b0b0b00, 0x1a1a1a00, +0xa6a6a600, 0xe1e1e100, 0x39393900, 0xcacaca00, 0xd5d5d500, 0x47474700, 0x5d5d5d00, 0x3d3d3d00, +0xd9d9d900, 0x01010100, 0x5a5a5a00, 0xd6d6d600, 0x51515100, 0x56565600, 0x6c6c6c00, 0x4d4d4d00, +0x8b8b8b00, 0x0d0d0d00, 0x9a9a9a00, 0x66666600, 0xfbfbfb00, 0xcccccc00, 0xb0b0b000, 0x2d2d2d00, +0x74747400, 0x12121200, 0x2b2b2b00, 0x20202000, 0xf0f0f000, 0xb1b1b100, 0x84848400, 0x99999900, +0xdfdfdf00, 0x4c4c4c00, 0xcbcbcb00, 0xc2c2c200, 0x34343400, 0x7e7e7e00, 0x76767600, 0x05050500, +0x6d6d6d00, 0xb7b7b700, 0xa9a9a900, 0x31313100, 0xd1d1d100, 0x17171700, 0x04040400, 0xd7d7d700, +0x14141400, 0x58585800, 0x3a3a3a00, 0x61616100, 0xdedede00, 0x1b1b1b00, 0x11111100, 0x1c1c1c00, +0x32323200, 0x0f0f0f00, 0x9c9c9c00, 0x16161600, 0x53535300, 0x18181800, 0xf2f2f200, 0x22222200, +0xfefefe00, 0x44444400, 0xcfcfcf00, 0xb2b2b200, 0xc3c3c300, 0xb5b5b500, 0x7a7a7a00, 0x91919100, +0x24242400, 0x08080800, 0xe8e8e800, 0xa8a8a800, 0x60606000, 0xfcfcfc00, 0x69696900, 0x50505000, +0xaaaaaa00, 0xd0d0d000, 0xa0a0a000, 0x7d7d7d00, 0xa1a1a100, 0x89898900, 0x62626200, 0x97979700, +0x54545400, 0x5b5b5b00, 0x1e1e1e00, 0x95959500, 0xe0e0e000, 0xffffff00, 0x64646400, 0xd2d2d200, +0x10101000, 0xc4c4c400, 0x00000000, 0x48484800, 0xa3a3a300, 0xf7f7f700, 0x75757500, 0xdbdbdb00, +0x8a8a8a00, 0x03030300, 0xe6e6e600, 0xdadada00, 0x09090900, 0x3f3f3f00, 0xdddddd00, 0x94949400, +0x87878700, 0x5c5c5c00, 0x83838300, 0x02020200, 0xcdcdcd00, 0x4a4a4a00, 0x90909000, 0x33333300, +0x73737300, 0x67676700, 0xf6f6f600, 0xf3f3f300, 0x9d9d9d00, 0x7f7f7f00, 0xbfbfbf00, 0xe2e2e200, +0x52525200, 0x9b9b9b00, 0xd8d8d800, 0x26262600, 0xc8c8c800, 0x37373700, 0xc6c6c600, 0x3b3b3b00, +0x81818100, 0x96969600, 0x6f6f6f00, 0x4b4b4b00, 0x13131300, 0xbebebe00, 0x63636300, 0x2e2e2e00, +0xe9e9e900, 0x79797900, 0xa7a7a700, 0x8c8c8c00, 0x9f9f9f00, 0x6e6e6e00, 0xbcbcbc00, 0x8e8e8e00, +0x29292900, 0xf5f5f500, 0xf9f9f900, 0xb6b6b600, 0x2f2f2f00, 0xfdfdfd00, 0xb4b4b400, 0x59595900, +0x78787800, 0x98989800, 0x06060600, 0x6a6a6a00, 0xe7e7e700, 0x46464600, 0x71717100, 0xbababa00, +0xd4d4d400, 0x25252500, 0xababab00, 0x42424200, 0x88888800, 0xa2a2a200, 0x8d8d8d00, 0xfafafa00, +0x72727200, 0x07070700, 0xb9b9b900, 0x55555500, 0xf8f8f800, 0xeeeeee00, 0xacacac00, 0x0a0a0a00, +0x36363600, 0x49494900, 0x2a2a2a00, 0x68686800, 0x3c3c3c00, 0x38383800, 0xf1f1f100, 0xa4a4a400, +0x40404000, 0x28282800, 0xd3d3d300, 0x7b7b7b00, 0xbbbbbb00, 0xc9c9c900, 0x43434300, 0xc1c1c100, +0x15151500, 0xe3e3e300, 0xadadad00, 0xf4f4f400, 0x77777700, 0xc7c7c700, 0x80808000, 0x9e9e9e00, +}; + +static const ulong32 SP0222[] = { +0x00e0e0e0, 0x00050505, 0x00585858, 0x00d9d9d9, 0x00676767, 0x004e4e4e, 0x00818181, 0x00cbcbcb, +0x00c9c9c9, 0x000b0b0b, 0x00aeaeae, 0x006a6a6a, 0x00d5d5d5, 0x00181818, 0x005d5d5d, 0x00828282, +0x00464646, 0x00dfdfdf, 0x00d6d6d6, 0x00272727, 0x008a8a8a, 0x00323232, 0x004b4b4b, 0x00424242, +0x00dbdbdb, 0x001c1c1c, 0x009e9e9e, 0x009c9c9c, 0x003a3a3a, 0x00cacaca, 0x00252525, 0x007b7b7b, +0x000d0d0d, 0x00717171, 0x005f5f5f, 0x001f1f1f, 0x00f8f8f8, 0x00d7d7d7, 0x003e3e3e, 0x009d9d9d, +0x007c7c7c, 0x00606060, 0x00b9b9b9, 0x00bebebe, 0x00bcbcbc, 0x008b8b8b, 0x00161616, 0x00343434, +0x004d4d4d, 0x00c3c3c3, 0x00727272, 0x00959595, 0x00ababab, 0x008e8e8e, 0x00bababa, 0x007a7a7a, +0x00b3b3b3, 0x00020202, 0x00b4b4b4, 0x00adadad, 0x00a2a2a2, 0x00acacac, 0x00d8d8d8, 0x009a9a9a, +0x00171717, 0x001a1a1a, 0x00353535, 0x00cccccc, 0x00f7f7f7, 0x00999999, 0x00616161, 0x005a5a5a, +0x00e8e8e8, 0x00242424, 0x00565656, 0x00404040, 0x00e1e1e1, 0x00636363, 0x00090909, 0x00333333, +0x00bfbfbf, 0x00989898, 0x00979797, 0x00858585, 0x00686868, 0x00fcfcfc, 0x00ececec, 0x000a0a0a, +0x00dadada, 0x006f6f6f, 0x00535353, 0x00626262, 0x00a3a3a3, 0x002e2e2e, 0x00080808, 0x00afafaf, +0x00282828, 0x00b0b0b0, 0x00747474, 0x00c2c2c2, 0x00bdbdbd, 0x00363636, 0x00222222, 0x00383838, +0x00646464, 0x001e1e1e, 0x00393939, 0x002c2c2c, 0x00a6a6a6, 0x00303030, 0x00e5e5e5, 0x00444444, +0x00fdfdfd, 0x00888888, 0x009f9f9f, 0x00656565, 0x00878787, 0x006b6b6b, 0x00f4f4f4, 0x00232323, +0x00484848, 0x00101010, 0x00d1d1d1, 0x00515151, 0x00c0c0c0, 0x00f9f9f9, 0x00d2d2d2, 0x00a0a0a0, +0x00555555, 0x00a1a1a1, 0x00414141, 0x00fafafa, 0x00434343, 0x00131313, 0x00c4c4c4, 0x002f2f2f, +0x00a8a8a8, 0x00b6b6b6, 0x003c3c3c, 0x002b2b2b, 0x00c1c1c1, 0x00ffffff, 0x00c8c8c8, 0x00a5a5a5, +0x00202020, 0x00898989, 0x00000000, 0x00909090, 0x00474747, 0x00efefef, 0x00eaeaea, 0x00b7b7b7, +0x00151515, 0x00060606, 0x00cdcdcd, 0x00b5b5b5, 0x00121212, 0x007e7e7e, 0x00bbbbbb, 0x00292929, +0x000f0f0f, 0x00b8b8b8, 0x00070707, 0x00040404, 0x009b9b9b, 0x00949494, 0x00212121, 0x00666666, +0x00e6e6e6, 0x00cecece, 0x00ededed, 0x00e7e7e7, 0x003b3b3b, 0x00fefefe, 0x007f7f7f, 0x00c5c5c5, +0x00a4a4a4, 0x00373737, 0x00b1b1b1, 0x004c4c4c, 0x00919191, 0x006e6e6e, 0x008d8d8d, 0x00767676, +0x00030303, 0x002d2d2d, 0x00dedede, 0x00969696, 0x00262626, 0x007d7d7d, 0x00c6c6c6, 0x005c5c5c, +0x00d3d3d3, 0x00f2f2f2, 0x004f4f4f, 0x00191919, 0x003f3f3f, 0x00dcdcdc, 0x00797979, 0x001d1d1d, +0x00525252, 0x00ebebeb, 0x00f3f3f3, 0x006d6d6d, 0x005e5e5e, 0x00fbfbfb, 0x00696969, 0x00b2b2b2, +0x00f0f0f0, 0x00313131, 0x000c0c0c, 0x00d4d4d4, 0x00cfcfcf, 0x008c8c8c, 0x00e2e2e2, 0x00757575, +0x00a9a9a9, 0x004a4a4a, 0x00575757, 0x00848484, 0x00111111, 0x00454545, 0x001b1b1b, 0x00f5f5f5, +0x00e4e4e4, 0x000e0e0e, 0x00737373, 0x00aaaaaa, 0x00f1f1f1, 0x00dddddd, 0x00595959, 0x00141414, +0x006c6c6c, 0x00929292, 0x00545454, 0x00d0d0d0, 0x00787878, 0x00707070, 0x00e3e3e3, 0x00494949, +0x00808080, 0x00505050, 0x00a7a7a7, 0x00f6f6f6, 0x00777777, 0x00939393, 0x00868686, 0x00838383, +0x002a2a2a, 0x00c7c7c7, 0x005b5b5b, 0x00e9e9e9, 0x00eeeeee, 0x008f8f8f, 0x00010101, 0x003d3d3d, +}; + +static const ulong32 SP3033[] = { +0x38003838, 0x41004141, 0x16001616, 0x76007676, 0xd900d9d9, 0x93009393, 0x60006060, 0xf200f2f2, +0x72007272, 0xc200c2c2, 0xab00abab, 0x9a009a9a, 0x75007575, 0x06000606, 0x57005757, 0xa000a0a0, +0x91009191, 0xf700f7f7, 0xb500b5b5, 0xc900c9c9, 0xa200a2a2, 0x8c008c8c, 0xd200d2d2, 0x90009090, +0xf600f6f6, 0x07000707, 0xa700a7a7, 0x27002727, 0x8e008e8e, 0xb200b2b2, 0x49004949, 0xde00dede, +0x43004343, 0x5c005c5c, 0xd700d7d7, 0xc700c7c7, 0x3e003e3e, 0xf500f5f5, 0x8f008f8f, 0x67006767, +0x1f001f1f, 0x18001818, 0x6e006e6e, 0xaf00afaf, 0x2f002f2f, 0xe200e2e2, 0x85008585, 0x0d000d0d, +0x53005353, 0xf000f0f0, 0x9c009c9c, 0x65006565, 0xea00eaea, 0xa300a3a3, 0xae00aeae, 0x9e009e9e, +0xec00ecec, 0x80008080, 0x2d002d2d, 0x6b006b6b, 0xa800a8a8, 0x2b002b2b, 0x36003636, 0xa600a6a6, +0xc500c5c5, 0x86008686, 0x4d004d4d, 0x33003333, 0xfd00fdfd, 0x66006666, 0x58005858, 0x96009696, +0x3a003a3a, 0x09000909, 0x95009595, 0x10001010, 0x78007878, 0xd800d8d8, 0x42004242, 0xcc00cccc, +0xef00efef, 0x26002626, 0xe500e5e5, 0x61006161, 0x1a001a1a, 0x3f003f3f, 0x3b003b3b, 0x82008282, +0xb600b6b6, 0xdb00dbdb, 0xd400d4d4, 0x98009898, 0xe800e8e8, 0x8b008b8b, 0x02000202, 0xeb00ebeb, +0x0a000a0a, 0x2c002c2c, 0x1d001d1d, 0xb000b0b0, 0x6f006f6f, 0x8d008d8d, 0x88008888, 0x0e000e0e, +0x19001919, 0x87008787, 0x4e004e4e, 0x0b000b0b, 0xa900a9a9, 0x0c000c0c, 0x79007979, 0x11001111, +0x7f007f7f, 0x22002222, 0xe700e7e7, 0x59005959, 0xe100e1e1, 0xda00dada, 0x3d003d3d, 0xc800c8c8, +0x12001212, 0x04000404, 0x74007474, 0x54005454, 0x30003030, 0x7e007e7e, 0xb400b4b4, 0x28002828, +0x55005555, 0x68006868, 0x50005050, 0xbe00bebe, 0xd000d0d0, 0xc400c4c4, 0x31003131, 0xcb00cbcb, +0x2a002a2a, 0xad00adad, 0x0f000f0f, 0xca00caca, 0x70007070, 0xff00ffff, 0x32003232, 0x69006969, +0x08000808, 0x62006262, 0x00000000, 0x24002424, 0xd100d1d1, 0xfb00fbfb, 0xba00baba, 0xed00eded, +0x45004545, 0x81008181, 0x73007373, 0x6d006d6d, 0x84008484, 0x9f009f9f, 0xee00eeee, 0x4a004a4a, +0xc300c3c3, 0x2e002e2e, 0xc100c1c1, 0x01000101, 0xe600e6e6, 0x25002525, 0x48004848, 0x99009999, +0xb900b9b9, 0xb300b3b3, 0x7b007b7b, 0xf900f9f9, 0xce00cece, 0xbf00bfbf, 0xdf00dfdf, 0x71007171, +0x29002929, 0xcd00cdcd, 0x6c006c6c, 0x13001313, 0x64006464, 0x9b009b9b, 0x63006363, 0x9d009d9d, +0xc000c0c0, 0x4b004b4b, 0xb700b7b7, 0xa500a5a5, 0x89008989, 0x5f005f5f, 0xb100b1b1, 0x17001717, +0xf400f4f4, 0xbc00bcbc, 0xd300d3d3, 0x46004646, 0xcf00cfcf, 0x37003737, 0x5e005e5e, 0x47004747, +0x94009494, 0xfa00fafa, 0xfc00fcfc, 0x5b005b5b, 0x97009797, 0xfe00fefe, 0x5a005a5a, 0xac00acac, +0x3c003c3c, 0x4c004c4c, 0x03000303, 0x35003535, 0xf300f3f3, 0x23002323, 0xb800b8b8, 0x5d005d5d, +0x6a006a6a, 0x92009292, 0xd500d5d5, 0x21002121, 0x44004444, 0x51005151, 0xc600c6c6, 0x7d007d7d, +0x39003939, 0x83008383, 0xdc00dcdc, 0xaa00aaaa, 0x7c007c7c, 0x77007777, 0x56005656, 0x05000505, +0x1b001b1b, 0xa400a4a4, 0x15001515, 0x34003434, 0x1e001e1e, 0x1c001c1c, 0xf800f8f8, 0x52005252, +0x20002020, 0x14001414, 0xe900e9e9, 0xbd00bdbd, 0xdd00dddd, 0xe400e4e4, 0xa100a1a1, 0xe000e0e0, +0x8a008a8a, 0xf100f1f1, 0xd600d6d6, 0x7a007a7a, 0xbb00bbbb, 0xe300e3e3, 0x40004040, 0x4f004f4f, +}; + +static const ulong32 SP4404[] = { +0x70700070, 0x2c2c002c, 0xb3b300b3, 0xc0c000c0, 0xe4e400e4, 0x57570057, 0xeaea00ea, 0xaeae00ae, +0x23230023, 0x6b6b006b, 0x45450045, 0xa5a500a5, 0xeded00ed, 0x4f4f004f, 0x1d1d001d, 0x92920092, +0x86860086, 0xafaf00af, 0x7c7c007c, 0x1f1f001f, 0x3e3e003e, 0xdcdc00dc, 0x5e5e005e, 0x0b0b000b, +0xa6a600a6, 0x39390039, 0xd5d500d5, 0x5d5d005d, 0xd9d900d9, 0x5a5a005a, 0x51510051, 0x6c6c006c, +0x8b8b008b, 0x9a9a009a, 0xfbfb00fb, 0xb0b000b0, 0x74740074, 0x2b2b002b, 0xf0f000f0, 0x84840084, +0xdfdf00df, 0xcbcb00cb, 0x34340034, 0x76760076, 0x6d6d006d, 0xa9a900a9, 0xd1d100d1, 0x04040004, +0x14140014, 0x3a3a003a, 0xdede00de, 0x11110011, 0x32320032, 0x9c9c009c, 0x53530053, 0xf2f200f2, +0xfefe00fe, 0xcfcf00cf, 0xc3c300c3, 0x7a7a007a, 0x24240024, 0xe8e800e8, 0x60600060, 0x69690069, +0xaaaa00aa, 0xa0a000a0, 0xa1a100a1, 0x62620062, 0x54540054, 0x1e1e001e, 0xe0e000e0, 0x64640064, +0x10100010, 0x00000000, 0xa3a300a3, 0x75750075, 0x8a8a008a, 0xe6e600e6, 0x09090009, 0xdddd00dd, +0x87870087, 0x83830083, 0xcdcd00cd, 0x90900090, 0x73730073, 0xf6f600f6, 0x9d9d009d, 0xbfbf00bf, +0x52520052, 0xd8d800d8, 0xc8c800c8, 0xc6c600c6, 0x81810081, 0x6f6f006f, 0x13130013, 0x63630063, +0xe9e900e9, 0xa7a700a7, 0x9f9f009f, 0xbcbc00bc, 0x29290029, 0xf9f900f9, 0x2f2f002f, 0xb4b400b4, +0x78780078, 0x06060006, 0xe7e700e7, 0x71710071, 0xd4d400d4, 0xabab00ab, 0x88880088, 0x8d8d008d, +0x72720072, 0xb9b900b9, 0xf8f800f8, 0xacac00ac, 0x36360036, 0x2a2a002a, 0x3c3c003c, 0xf1f100f1, +0x40400040, 0xd3d300d3, 0xbbbb00bb, 0x43430043, 0x15150015, 0xadad00ad, 0x77770077, 0x80800080, +0x82820082, 0xecec00ec, 0x27270027, 0xe5e500e5, 0x85850085, 0x35350035, 0x0c0c000c, 0x41410041, +0xefef00ef, 0x93930093, 0x19190019, 0x21210021, 0x0e0e000e, 0x4e4e004e, 0x65650065, 0xbdbd00bd, +0xb8b800b8, 0x8f8f008f, 0xebeb00eb, 0xcece00ce, 0x30300030, 0x5f5f005f, 0xc5c500c5, 0x1a1a001a, +0xe1e100e1, 0xcaca00ca, 0x47470047, 0x3d3d003d, 0x01010001, 0xd6d600d6, 0x56560056, 0x4d4d004d, +0x0d0d000d, 0x66660066, 0xcccc00cc, 0x2d2d002d, 0x12120012, 0x20200020, 0xb1b100b1, 0x99990099, +0x4c4c004c, 0xc2c200c2, 0x7e7e007e, 0x05050005, 0xb7b700b7, 0x31310031, 0x17170017, 0xd7d700d7, +0x58580058, 0x61610061, 0x1b1b001b, 0x1c1c001c, 0x0f0f000f, 0x16160016, 0x18180018, 0x22220022, +0x44440044, 0xb2b200b2, 0xb5b500b5, 0x91910091, 0x08080008, 0xa8a800a8, 0xfcfc00fc, 0x50500050, +0xd0d000d0, 0x7d7d007d, 0x89890089, 0x97970097, 0x5b5b005b, 0x95950095, 0xffff00ff, 0xd2d200d2, +0xc4c400c4, 0x48480048, 0xf7f700f7, 0xdbdb00db, 0x03030003, 0xdada00da, 0x3f3f003f, 0x94940094, +0x5c5c005c, 0x02020002, 0x4a4a004a, 0x33330033, 0x67670067, 0xf3f300f3, 0x7f7f007f, 0xe2e200e2, +0x9b9b009b, 0x26260026, 0x37370037, 0x3b3b003b, 0x96960096, 0x4b4b004b, 0xbebe00be, 0x2e2e002e, +0x79790079, 0x8c8c008c, 0x6e6e006e, 0x8e8e008e, 0xf5f500f5, 0xb6b600b6, 0xfdfd00fd, 0x59590059, +0x98980098, 0x6a6a006a, 0x46460046, 0xbaba00ba, 0x25250025, 0x42420042, 0xa2a200a2, 0xfafa00fa, +0x07070007, 0x55550055, 0xeeee00ee, 0x0a0a000a, 0x49490049, 0x68680068, 0x38380038, 0xa4a400a4, +0x28280028, 0x7b7b007b, 0xc9c900c9, 0xc1c100c1, 0xe3e300e3, 0xf4f400f4, 0xc7c700c7, 0x9e9e009e, +}; + +static const ulong64 key_sigma[] = { + CONST64(0xA09E667F3BCC908B), + CONST64(0xB67AE8584CAA73B2), + CONST64(0xC6EF372FE94F82BE), + CONST64(0x54FF53A5F1D36F1C), + CONST64(0x10E527FADE682D1D), + CONST64(0xB05688C2B3E6C1FD) +}; + +static ulong64 F(ulong64 x) +{ + ulong32 D, U; + +#define loc(i) ((8-i)*8) + + D = SP1110[(x >> loc(8)) & 0xFF] ^ SP0222[(x >> loc(5)) & 0xFF] ^ SP3033[(x >> loc(6)) & 0xFF] ^ SP4404[(x >> loc(7)) & 0xFF]; + U = SP1110[(x >> loc(1)) & 0xFF] ^ SP0222[(x >> loc(2)) & 0xFF] ^ SP3033[(x >> loc(3)) & 0xFF] ^ SP4404[(x >> loc(4)) & 0xFF]; + + D ^= U; + U = D ^ RORc(U, 8); + + return ((ulong64)U) | (((ulong64)D) << CONST64(32)); +} + +static void rot_128(unsigned char *in, unsigned count, unsigned char *out) +{ + unsigned x, w, b; + + w = count >> 3; + b = count & 7; + + for (x = 0; x < 16; x++) { + out[x] = (in[(x+w)&15] << b) | (in[(x+w+1)&15] >> (8 - b)); + } +} + +int camellia_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) +{ + unsigned char T[48], kA[16], kB[16], kR[16], kL[16]; + int x; + ulong64 A, B; + + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(skey != NULL); + + /* Valid sizes (in bytes) are 16, 24, 32 */ + if (keylen != 16 && keylen != 24 && keylen != 32) { + return CRYPT_INVALID_KEYSIZE; + } + + /* number of rounds */ + skey->camellia.R = (keylen == 16) ? 18 : 24; + + if (num_rounds != 0 && num_rounds != skey->camellia.R) { + return CRYPT_INVALID_ROUNDS; + } + + /* expand key */ + if (keylen == 16) { + for (x = 0; x < 16; x++) { + T[x] = key[x]; + T[x + 16] = 0; + } + } else if (keylen == 24) { + for (x = 0; x < 24; x++) { + T[x] = key[x]; + } + for (x = 24; x < 32; x++) { + T[x] = key[x-8] ^ 0xFF; + } + } else { + for (x = 0; x < 32; x++) { + T[x] = key[x]; + } + } + + for (x = 0; x < 16; x++) { + kL[x] = T[x]; + kR[x] = T[x + 16]; + } + + for (x = 32; x < 48; x++) { + T[x] = T[x - 32] ^ T[x - 16]; + } + + /* first two rounds */ + LOAD64H(A, T+32); LOAD64H(B, T+40); + B ^= F(A ^ key_sigma[0]); + A ^= F(B ^ key_sigma[1]); + STORE64H(A, T+32); STORE64H(B, T+40); + + /* xor kL in */ + for (x = 0; x < 16; x++) { T[x+32] ^= kL[x]; } + + /* next two rounds */ + LOAD64H(A, T+32); LOAD64H(B, T+40); + B ^= F(A ^ key_sigma[2]); + A ^= F(B ^ key_sigma[3]); + STORE64H(A, T+32); STORE64H(B, T+40); + + /* grab KA */ + for (x = 0; x < 16; x++) { kA[x] = T[x+32]; } + + /* xor kR in */ + for (x = 0; x < 16; x++) { T[x+32] ^= kR[x]; } + + if (keylen == 16) { + /* grab whitening keys kw1 and kw2 */ + LOAD64H(skey->camellia.kw[0], kL); + LOAD64H(skey->camellia.kw[1], kL+8); + + /* k1-k2 */ + LOAD64H(skey->camellia.k[0], kA); + LOAD64H(skey->camellia.k[1], kA+8); + + /* rotate kL by 15, k3/k4 */ + rot_128(kL, 15, T+32); + LOAD64H(skey->camellia.k[2], T+32); + LOAD64H(skey->camellia.k[3], T+40); + + /* rotate kA by 15, k5/k6 */ + rot_128(kA, 15, T+32); + LOAD64H(skey->camellia.k[4], T+32); + LOAD64H(skey->camellia.k[5], T+40); + + /* rotate kA by 30, kl1, kl2 */ + rot_128(kA, 30, T+32); + LOAD64H(skey->camellia.kl[0], T+32); + LOAD64H(skey->camellia.kl[1], T+40); + + /* rotate kL by 45, k7/k8 */ + rot_128(kL, 45, T+32); + LOAD64H(skey->camellia.k[6], T+32); + LOAD64H(skey->camellia.k[7], T+40); + + /* rotate kA by 45, k9/k10 */ + rot_128(kA, 45, T+32); + LOAD64H(skey->camellia.k[8], T+32); + rot_128(kL, 60, T+32); + LOAD64H(skey->camellia.k[9], T+40); + + /* rotate kA by 60, k11/k12 */ + rot_128(kA, 60, T+32); + LOAD64H(skey->camellia.k[10], T+32); + LOAD64H(skey->camellia.k[11], T+40); + + /* rotate kL by 77, kl3, kl4 */ + rot_128(kL, 77, T+32); + LOAD64H(skey->camellia.kl[2], T+32); + LOAD64H(skey->camellia.kl[3], T+40); + + /* rotate kL by 94, k13/k14 */ + rot_128(kL, 94, T+32); + LOAD64H(skey->camellia.k[12], T+32); + LOAD64H(skey->camellia.k[13], T+40); + + /* rotate kA by 94, k15/k16 */ + rot_128(kA, 94, T+32); + LOAD64H(skey->camellia.k[14], T+32); + LOAD64H(skey->camellia.k[15], T+40); + + /* rotate kL by 111, k17/k18 */ + rot_128(kL, 111, T+32); + LOAD64H(skey->camellia.k[16], T+32); + LOAD64H(skey->camellia.k[17], T+40); + + /* rotate kA by 111, kw3/kw4 */ + rot_128(kA, 111, T+32); + LOAD64H(skey->camellia.kw[2], T+32); + LOAD64H(skey->camellia.kw[3], T+40); + } else { + /* last two rounds */ + LOAD64H(A, T+32); LOAD64H(B, T+40); + B ^= F(A ^ key_sigma[4]); + A ^= F(B ^ key_sigma[5]); + STORE64H(A, T+32); STORE64H(B, T+40); + + /* grab kB */ + for (x = 0; x < 16; x++) { kB[x] = T[x+32]; } + + /* kw1/2 from kL*/ + LOAD64H(skey->camellia.kw[0], kL); + LOAD64H(skey->camellia.kw[1], kL+8); + + /* k1/k2 = kB */ + LOAD64H(skey->camellia.k[0], kB); + LOAD64H(skey->camellia.k[1], kB+8); + + /* k3/k4 = kR by 15 */ + rot_128(kR, 15, T+32); + LOAD64H(skey->camellia.k[2], T+32); + LOAD64H(skey->camellia.k[3], T+40); + + /* k5/k7 = kA by 15 */ + rot_128(kA, 15, T+32); + LOAD64H(skey->camellia.k[4], T+32); + LOAD64H(skey->camellia.k[5], T+40); + + /* kl1/2 = kR by 30 */ + rot_128(kR, 30, T+32); + LOAD64H(skey->camellia.kl[0], T+32); + LOAD64H(skey->camellia.kl[1], T+40); + + /* k7/k8 = kB by 30 */ + rot_128(kB, 30, T+32); + LOAD64H(skey->camellia.k[6], T+32); + LOAD64H(skey->camellia.k[7], T+40); + + /* k9/k10 = kL by 45 */ + rot_128(kL, 45, T+32); + LOAD64H(skey->camellia.k[8], T+32); + LOAD64H(skey->camellia.k[9], T+40); + + /* k11/k12 = kA by 45 */ + rot_128(kA, 45, T+32); + LOAD64H(skey->camellia.k[10], T+32); + LOAD64H(skey->camellia.k[11], T+40); + + /* kl3/4 = kL by 60 */ + rot_128(kL, 60, T+32); + LOAD64H(skey->camellia.kl[2], T+32); + LOAD64H(skey->camellia.kl[3], T+40); + + /* k13/k14 = kR by 60 */ + rot_128(kR, 60, T+32); + LOAD64H(skey->camellia.k[12], T+32); + LOAD64H(skey->camellia.k[13], T+40); + + /* k15/k16 = kB by 15 */ + rot_128(kB, 60, T+32); + LOAD64H(skey->camellia.k[14], T+32); + LOAD64H(skey->camellia.k[15], T+40); + + /* k17/k18 = kL by 77 */ + rot_128(kL, 77, T+32); + LOAD64H(skey->camellia.k[16], T+32); + LOAD64H(skey->camellia.k[17], T+40); + + /* kl5/6 = kA by 77 */ + rot_128(kA, 77, T+32); + LOAD64H(skey->camellia.kl[4], T+32); + LOAD64H(skey->camellia.kl[5], T+40); + + /* k19/k20 = kR by 94 */ + rot_128(kR, 94, T+32); + LOAD64H(skey->camellia.k[18], T+32); + LOAD64H(skey->camellia.k[19], T+40); + + /* k21/k22 = kA by 94 */ + rot_128(kA, 94, T+32); + LOAD64H(skey->camellia.k[20], T+32); + LOAD64H(skey->camellia.k[21], T+40); + + /* k23/k24 = kL by 111 */ + rot_128(kL, 111, T+32); + LOAD64H(skey->camellia.k[22], T+32); + LOAD64H(skey->camellia.k[23], T+40); + + /* kw2/kw3 = kB by 111 */ + rot_128(kB, 111, T+32); + LOAD64H(skey->camellia.kw[2], T+32); + LOAD64H(skey->camellia.kw[3], T+40); + } + + return CRYPT_OK; +} + +int camellia_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *skey) +{ + ulong64 L, R; + ulong32 a, b; + + LOAD64H(L, pt+0); LOAD64H(R, pt+8); + L ^= skey->camellia.kw[0]; + R ^= skey->camellia.kw[1]; + + /* first 6 rounds */ + R ^= F(L ^ skey->camellia.k[0]); + L ^= F(R ^ skey->camellia.k[1]); + R ^= F(L ^ skey->camellia.k[2]); + L ^= F(R ^ skey->camellia.k[3]); + R ^= F(L ^ skey->camellia.k[4]); + L ^= F(R ^ skey->camellia.k[5]); + + /* FL */ + a = (ulong32)(L >> 32); + b = (ulong32)(L & 0xFFFFFFFFUL); + b ^= ROL((a & (ulong32)(skey->camellia.kl[0] >> 32)), 1); + a ^= b | (skey->camellia.kl[0] & 0xFFFFFFFFU); + L = (((ulong64)a) << 32) | b; + + /* FL^-1 */ + a = (ulong32)(R >> 32); + b = (ulong32)(R & 0xFFFFFFFFUL); + a ^= b | (skey->camellia.kl[1] & 0xFFFFFFFFU); + b ^= ROL((a & (ulong32)(skey->camellia.kl[1] >> 32)), 1); + R = (((ulong64)a) << 32) | b; + + /* second 6 rounds */ + R ^= F(L ^ skey->camellia.k[6]); + L ^= F(R ^ skey->camellia.k[7]); + R ^= F(L ^ skey->camellia.k[8]); + L ^= F(R ^ skey->camellia.k[9]); + R ^= F(L ^ skey->camellia.k[10]); + L ^= F(R ^ skey->camellia.k[11]); + + /* FL */ + a = (ulong32)(L >> 32); + b = (ulong32)(L & 0xFFFFFFFFUL); + b ^= ROL((a & (ulong32)(skey->camellia.kl[2] >> 32)), 1); + a ^= b | (skey->camellia.kl[2] & 0xFFFFFFFFU); + L = (((ulong64)a) << 32) | b; + + /* FL^-1 */ + a = (ulong32)(R >> 32); + b = (ulong32)(R & 0xFFFFFFFFUL); + a ^= b | (skey->camellia.kl[3] & 0xFFFFFFFFU); + b ^= ROL((a & (ulong32)(skey->camellia.kl[3] >> 32)), 1); + R = (((ulong64)a) << 32) | b; + + /* third 6 rounds */ + R ^= F(L ^ skey->camellia.k[12]); + L ^= F(R ^ skey->camellia.k[13]); + R ^= F(L ^ skey->camellia.k[14]); + L ^= F(R ^ skey->camellia.k[15]); + R ^= F(L ^ skey->camellia.k[16]); + L ^= F(R ^ skey->camellia.k[17]); + + /* next FL */ + if (skey->camellia.R == 24) { + /* FL */ + a = (ulong32)(L >> 32); + b = (ulong32)(L & 0xFFFFFFFFUL); + b ^= ROL((a & (ulong32)(skey->camellia.kl[4] >> 32)), 1); + a ^= b | (skey->camellia.kl[4] & 0xFFFFFFFFU); + L = (((ulong64)a) << 32) | b; + + /* FL^-1 */ + a = (ulong32)(R >> 32); + b = (ulong32)(R & 0xFFFFFFFFUL); + a ^= b | (skey->camellia.kl[5] & 0xFFFFFFFFU); + b ^= ROL((a & (ulong32)(skey->camellia.kl[5] >> 32)), 1); + R = (((ulong64)a) << 32) | b; + + /* fourth 6 rounds */ + R ^= F(L ^ skey->camellia.k[18]); + L ^= F(R ^ skey->camellia.k[19]); + R ^= F(L ^ skey->camellia.k[20]); + L ^= F(R ^ skey->camellia.k[21]); + R ^= F(L ^ skey->camellia.k[22]); + L ^= F(R ^ skey->camellia.k[23]); + } + + L ^= skey->camellia.kw[3]; + R ^= skey->camellia.kw[2]; + + STORE64H(R, ct+0); STORE64H(L, ct+8); + + return CRYPT_OK; +} + +int camellia_ecb_decrypt(const unsigned char *ct, unsigned char *pt, symmetric_key *skey) +{ + ulong64 L, R; + ulong32 a, b; + + LOAD64H(R, ct+0); LOAD64H(L, ct+8); + L ^= skey->camellia.kw[3]; + R ^= skey->camellia.kw[2]; + + /* next FL */ + if (skey->camellia.R == 24) { + /* fourth 6 rounds */ + L ^= F(R ^ skey->camellia.k[23]); + R ^= F(L ^ skey->camellia.k[22]); + L ^= F(R ^ skey->camellia.k[21]); + R ^= F(L ^ skey->camellia.k[20]); + L ^= F(R ^ skey->camellia.k[19]); + R ^= F(L ^ skey->camellia.k[18]); + + /* FL */ + a = (ulong32)(L >> 32); + b = (ulong32)(L & 0xFFFFFFFFUL); + a ^= b | (skey->camellia.kl[4] & 0xFFFFFFFFU); + b ^= ROL((a & (ulong32)(skey->camellia.kl[4] >> 32)), 1); + L = (((ulong64)a) << 32) | b; + + /* FL^-1 */ + a = (ulong32)(R >> 32); + b = (ulong32)(R & 0xFFFFFFFFUL); + b ^= ROL((a & (ulong32)(skey->camellia.kl[5] >> 32)), 1); + a ^= b | (skey->camellia.kl[5] & 0xFFFFFFFFU); + R = (((ulong64)a) << 32) | b; + + } + + /* third 6 rounds */ + L ^= F(R ^ skey->camellia.k[17]); + R ^= F(L ^ skey->camellia.k[16]); + L ^= F(R ^ skey->camellia.k[15]); + R ^= F(L ^ skey->camellia.k[14]); + L ^= F(R ^ skey->camellia.k[13]); + R ^= F(L ^ skey->camellia.k[12]); + + /* FL */ + a = (ulong32)(L >> 32); + b = (ulong32)(L & 0xFFFFFFFFUL); + a ^= b | (skey->camellia.kl[2] & 0xFFFFFFFFU); + b ^= ROL((a & (ulong32)(skey->camellia.kl[2] >> 32)), 1); + L = (((ulong64)a) << 32) | b; + + /* FL^-1 */ + a = (ulong32)(R >> 32); + b = (ulong32)(R & 0xFFFFFFFFUL); + b ^= ROL((a & (ulong32)(skey->camellia.kl[3] >> 32)), 1); + a ^= b | (skey->camellia.kl[3] & 0xFFFFFFFFU); + R = (((ulong64)a) << 32) | b; + + /* second 6 rounds */ + L ^= F(R ^ skey->camellia.k[11]); + R ^= F(L ^ skey->camellia.k[10]); + L ^= F(R ^ skey->camellia.k[9]); + R ^= F(L ^ skey->camellia.k[8]); + L ^= F(R ^ skey->camellia.k[7]); + R ^= F(L ^ skey->camellia.k[6]); + + /* FL */ + a = (ulong32)(L >> 32); + b = (ulong32)(L & 0xFFFFFFFFUL); + a ^= b | (skey->camellia.kl[0] & 0xFFFFFFFFU); + b ^= ROL((a & (ulong32)(skey->camellia.kl[0] >> 32)), 1); + L = (((ulong64)a) << 32) | b; + + /* FL^-1 */ + a = (ulong32)(R >> 32); + b = (ulong32)(R & 0xFFFFFFFFUL); + b ^= ROL((a & (ulong32)(skey->camellia.kl[1] >> 32)), 1); + a ^= b | (skey->camellia.kl[1] & 0xFFFFFFFFU); + R = (((ulong64)a) << 32) | b; + + /* first 6 rounds */ + L ^= F(R ^ skey->camellia.k[5]); + R ^= F(L ^ skey->camellia.k[4]); + L ^= F(R ^ skey->camellia.k[3]); + R ^= F(L ^ skey->camellia.k[2]); + L ^= F(R ^ skey->camellia.k[1]); + R ^= F(L ^ skey->camellia.k[0]); + + R ^= skey->camellia.kw[1]; + L ^= skey->camellia.kw[0]; + + STORE64H(R, pt+8); STORE64H(L, pt+0); + + return CRYPT_OK; +} + +int camellia_test(void) +{ + static const struct { + int keylen; + unsigned char key[32], pt[16], ct[16]; + } tests[] = { + +{ + 16, + { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, + { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, + { 0x67, 0x67, 0x31, 0x38, 0x54, 0x96, 0x69, 0x73, + 0x08, 0x57, 0x06, 0x56, 0x48, 0xea, 0xbe, 0x43 } +}, + +{ + 24, + { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 }, + { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, + { 0xb4, 0x99, 0x34, 0x01, 0xb3, 0xe9, 0x96, 0xf8, + 0x4e, 0xe5, 0xce, 0xe7, 0xd7, 0x9b, 0x09, 0xb9 } +}, + + +{ + 32, + { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }, + { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, + { 0x9a, 0xcc, 0x23, 0x7d, 0xff, 0x16, 0xd7, 0x6c, + 0x20, 0xef, 0x7c, 0x91, 0x9e, 0x3a, 0x75, 0x09 } +}, + +{ + 32, + { 0x60, 0x3D, 0xEB, 0x10, 0x15, 0xCA, 0x71, 0xBE, + 0x2B, 0x73, 0xAE, 0xF0, 0x85, 0x7D, 0x77, 0x81, + 0x1F, 0x35, 0x2C, 0x07, 0x3B, 0x61, 0x08, 0xD7, + 0x2D, 0x98, 0x10, 0xA3, 0x09, 0x14, 0xDF, 0xF4 }, + { 0xF6, 0x9F, 0x24, 0x45, 0xDF, 0x4F, 0x9B, 0x17, + 0xAD, 0x2B, 0x41, 0x7B, 0xE6, 0x6C, 0x37, 0x10 }, + { 0x79, 0x60, 0x10, 0x9F, 0xB6, 0xDC, 0x42, 0x94, + 0x7F, 0xCF, 0xE5, 0x9E, 0xA3, 0xC5, 0xEB, 0x6B } +} +}; + unsigned char buf[2][16]; + symmetric_key skey; + int err; + unsigned int x; + + for (x = 0; x < sizeof(tests)/sizeof(tests[0]); x++) { + zeromem(&skey, sizeof(skey)); + if ((err = camellia_setup(tests[x].key, tests[x].keylen, 0, &skey)) != CRYPT_OK) { + return err; + } + if ((err = camellia_ecb_encrypt(tests[x].pt, buf[0], &skey)) != CRYPT_OK) { + camellia_done(&skey); + return err; + } + if ((err = camellia_ecb_decrypt(tests[x].ct, buf[1], &skey)) != CRYPT_OK) { + camellia_done(&skey); + return err; + } + camellia_done(&skey); + if (compare_testvector(tests[x].ct, 16, buf[0], 16, "Camellia Encrypt", x) || + compare_testvector(tests[x].pt, 16, buf[1], 16, "Camellia Decrypt", x)) { + return CRYPT_FAIL_TESTVECTOR; + } + } + return CRYPT_OK; +} + +void camellia_done(symmetric_key *skey) +{ + LTC_UNUSED_PARAM(skey); +} + +int camellia_keysize(int *keysize) +{ + if (*keysize >= 32) { *keysize = 32; } + else if (*keysize >= 24) { *keysize = 24; } + else if (*keysize >= 16) { *keysize = 16; } + else return CRYPT_INVALID_KEYSIZE; + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/cast5.c --- a/libtomcrypt/src/ciphers/cast5.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/ciphers/cast5.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,13 +5,11 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ - - /** + + /** @file cast5.c - Implementation of LTC_CAST5 (RFC 2144) by Tom St Denis + Implementation of LTC_CAST5 (RFC 2144) by Tom St Denis */ #include "tomcrypt.h" @@ -27,375 +25,375 @@ &cast5_test, &cast5_done, &cast5_keysize, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; static const ulong32 S1[256] = { -0x30fb40d4UL, 0x9fa0ff0bUL, 0x6beccd2fUL, 0x3f258c7aUL, 0x1e213f2fUL, 0x9c004dd3UL, -0x6003e540UL, 0xcf9fc949UL, 0xbfd4af27UL, 0x88bbbdb5UL, 0xe2034090UL, 0x98d09675UL, -0x6e63a0e0UL, 0x15c361d2UL, 0xc2e7661dUL, 0x22d4ff8eUL, 0x28683b6fUL, 0xc07fd059UL, -0xff2379c8UL, 0x775f50e2UL, 0x43c340d3UL, 0xdf2f8656UL, 0x887ca41aUL, 0xa2d2bd2dUL, -0xa1c9e0d6UL, 0x346c4819UL, 0x61b76d87UL, 0x22540f2fUL, 0x2abe32e1UL, 0xaa54166bUL, -0x22568e3aUL, 0xa2d341d0UL, 0x66db40c8UL, 0xa784392fUL, 0x004dff2fUL, 0x2db9d2deUL, -0x97943facUL, 0x4a97c1d8UL, 0x527644b7UL, 0xb5f437a7UL, 0xb82cbaefUL, 0xd751d159UL, -0x6ff7f0edUL, 0x5a097a1fUL, 0x827b68d0UL, 0x90ecf52eUL, 0x22b0c054UL, 0xbc8e5935UL, -0x4b6d2f7fUL, 0x50bb64a2UL, 0xd2664910UL, 0xbee5812dUL, 0xb7332290UL, 0xe93b159fUL, -0xb48ee411UL, 0x4bff345dUL, 0xfd45c240UL, 0xad31973fUL, 0xc4f6d02eUL, 0x55fc8165UL, -0xd5b1caadUL, 0xa1ac2daeUL, 0xa2d4b76dUL, 0xc19b0c50UL, 0x882240f2UL, 0x0c6e4f38UL, -0xa4e4bfd7UL, 0x4f5ba272UL, 0x564c1d2fUL, 0xc59c5319UL, 0xb949e354UL, 0xb04669feUL, -0xb1b6ab8aUL, 0xc71358ddUL, 0x6385c545UL, 0x110f935dUL, 0x57538ad5UL, 0x6a390493UL, -0xe63d37e0UL, 0x2a54f6b3UL, 0x3a787d5fUL, 0x6276a0b5UL, 0x19a6fcdfUL, 0x7a42206aUL, -0x29f9d4d5UL, 0xf61b1891UL, 0xbb72275eUL, 0xaa508167UL, 0x38901091UL, 0xc6b505ebUL, -0x84c7cb8cUL, 0x2ad75a0fUL, 0x874a1427UL, 0xa2d1936bUL, 0x2ad286afUL, 0xaa56d291UL, -0xd7894360UL, 0x425c750dUL, 0x93b39e26UL, 0x187184c9UL, 0x6c00b32dUL, 0x73e2bb14UL, -0xa0bebc3cUL, 0x54623779UL, 0x64459eabUL, 0x3f328b82UL, 0x7718cf82UL, 0x59a2cea6UL, -0x04ee002eUL, 0x89fe78e6UL, 0x3fab0950UL, 0x325ff6c2UL, 0x81383f05UL, 0x6963c5c8UL, -0x76cb5ad6UL, 0xd49974c9UL, 0xca180dcfUL, 0x380782d5UL, 0xc7fa5cf6UL, 0x8ac31511UL, -0x35e79e13UL, 0x47da91d0UL, 0xf40f9086UL, 0xa7e2419eUL, 0x31366241UL, 0x051ef495UL, -0xaa573b04UL, 0x4a805d8dUL, 0x548300d0UL, 0x00322a3cUL, 0xbf64cddfUL, 0xba57a68eUL, -0x75c6372bUL, 0x50afd341UL, 0xa7c13275UL, 0x915a0bf5UL, 0x6b54bfabUL, 0x2b0b1426UL, -0xab4cc9d7UL, 0x449ccd82UL, 0xf7fbf265UL, 0xab85c5f3UL, 0x1b55db94UL, 0xaad4e324UL, -0xcfa4bd3fUL, 0x2deaa3e2UL, 0x9e204d02UL, 0xc8bd25acUL, 0xeadf55b3UL, 0xd5bd9e98UL, -0xe31231b2UL, 0x2ad5ad6cUL, 0x954329deUL, 0xadbe4528UL, 0xd8710f69UL, 0xaa51c90fUL, -0xaa786bf6UL, 0x22513f1eUL, 0xaa51a79bUL, 0x2ad344ccUL, 0x7b5a41f0UL, 0xd37cfbadUL, -0x1b069505UL, 0x41ece491UL, 0xb4c332e6UL, 0x032268d4UL, 0xc9600accUL, 0xce387e6dUL, -0xbf6bb16cUL, 0x6a70fb78UL, 0x0d03d9c9UL, 0xd4df39deUL, 0xe01063daUL, 0x4736f464UL, -0x5ad328d8UL, 0xb347cc96UL, 0x75bb0fc3UL, 0x98511bfbUL, 0x4ffbcc35UL, 0xb58bcf6aUL, -0xe11f0abcUL, 0xbfc5fe4aUL, 0xa70aec10UL, 0xac39570aUL, 0x3f04442fUL, 0x6188b153UL, -0xe0397a2eUL, 0x5727cb79UL, 0x9ceb418fUL, 0x1cacd68dUL, 0x2ad37c96UL, 0x0175cb9dUL, -0xc69dff09UL, 0xc75b65f0UL, 0xd9db40d8UL, 0xec0e7779UL, 0x4744ead4UL, 0xb11c3274UL, -0xdd24cb9eUL, 0x7e1c54bdUL, 0xf01144f9UL, 0xd2240eb1UL, 0x9675b3fdUL, 0xa3ac3755UL, -0xd47c27afUL, 0x51c85f4dUL, 0x56907596UL, 0xa5bb15e6UL, 0x580304f0UL, 0xca042cf1UL, -0x011a37eaUL, 0x8dbfaadbUL, 0x35ba3e4aUL, 0x3526ffa0UL, 0xc37b4d09UL, 0xbc306ed9UL, -0x98a52666UL, 0x5648f725UL, 0xff5e569dUL, 0x0ced63d0UL, 0x7c63b2cfUL, 0x700b45e1UL, -0xd5ea50f1UL, 0x85a92872UL, 0xaf1fbda7UL, 0xd4234870UL, 0xa7870bf3UL, 0x2d3b4d79UL, -0x42e04198UL, 0x0cd0ede7UL, 0x26470db8UL, 0xf881814cUL, 0x474d6ad7UL, 0x7c0c5e5cUL, -0xd1231959UL, 0x381b7298UL, 0xf5d2f4dbUL, 0xab838653UL, 0x6e2f1e23UL, 0x83719c9eUL, -0xbd91e046UL, 0x9a56456eUL, 0xdc39200cUL, 0x20c8c571UL, 0x962bda1cUL, 0xe1e696ffUL, -0xb141ab08UL, 0x7cca89b9UL, 0x1a69e783UL, 0x02cc4843UL, 0xa2f7c579UL, 0x429ef47dUL, +0x30fb40d4UL, 0x9fa0ff0bUL, 0x6beccd2fUL, 0x3f258c7aUL, 0x1e213f2fUL, 0x9c004dd3UL, +0x6003e540UL, 0xcf9fc949UL, 0xbfd4af27UL, 0x88bbbdb5UL, 0xe2034090UL, 0x98d09675UL, +0x6e63a0e0UL, 0x15c361d2UL, 0xc2e7661dUL, 0x22d4ff8eUL, 0x28683b6fUL, 0xc07fd059UL, +0xff2379c8UL, 0x775f50e2UL, 0x43c340d3UL, 0xdf2f8656UL, 0x887ca41aUL, 0xa2d2bd2dUL, +0xa1c9e0d6UL, 0x346c4819UL, 0x61b76d87UL, 0x22540f2fUL, 0x2abe32e1UL, 0xaa54166bUL, +0x22568e3aUL, 0xa2d341d0UL, 0x66db40c8UL, 0xa784392fUL, 0x004dff2fUL, 0x2db9d2deUL, +0x97943facUL, 0x4a97c1d8UL, 0x527644b7UL, 0xb5f437a7UL, 0xb82cbaefUL, 0xd751d159UL, +0x6ff7f0edUL, 0x5a097a1fUL, 0x827b68d0UL, 0x90ecf52eUL, 0x22b0c054UL, 0xbc8e5935UL, +0x4b6d2f7fUL, 0x50bb64a2UL, 0xd2664910UL, 0xbee5812dUL, 0xb7332290UL, 0xe93b159fUL, +0xb48ee411UL, 0x4bff345dUL, 0xfd45c240UL, 0xad31973fUL, 0xc4f6d02eUL, 0x55fc8165UL, +0xd5b1caadUL, 0xa1ac2daeUL, 0xa2d4b76dUL, 0xc19b0c50UL, 0x882240f2UL, 0x0c6e4f38UL, +0xa4e4bfd7UL, 0x4f5ba272UL, 0x564c1d2fUL, 0xc59c5319UL, 0xb949e354UL, 0xb04669feUL, +0xb1b6ab8aUL, 0xc71358ddUL, 0x6385c545UL, 0x110f935dUL, 0x57538ad5UL, 0x6a390493UL, +0xe63d37e0UL, 0x2a54f6b3UL, 0x3a787d5fUL, 0x6276a0b5UL, 0x19a6fcdfUL, 0x7a42206aUL, +0x29f9d4d5UL, 0xf61b1891UL, 0xbb72275eUL, 0xaa508167UL, 0x38901091UL, 0xc6b505ebUL, +0x84c7cb8cUL, 0x2ad75a0fUL, 0x874a1427UL, 0xa2d1936bUL, 0x2ad286afUL, 0xaa56d291UL, +0xd7894360UL, 0x425c750dUL, 0x93b39e26UL, 0x187184c9UL, 0x6c00b32dUL, 0x73e2bb14UL, +0xa0bebc3cUL, 0x54623779UL, 0x64459eabUL, 0x3f328b82UL, 0x7718cf82UL, 0x59a2cea6UL, +0x04ee002eUL, 0x89fe78e6UL, 0x3fab0950UL, 0x325ff6c2UL, 0x81383f05UL, 0x6963c5c8UL, +0x76cb5ad6UL, 0xd49974c9UL, 0xca180dcfUL, 0x380782d5UL, 0xc7fa5cf6UL, 0x8ac31511UL, +0x35e79e13UL, 0x47da91d0UL, 0xf40f9086UL, 0xa7e2419eUL, 0x31366241UL, 0x051ef495UL, +0xaa573b04UL, 0x4a805d8dUL, 0x548300d0UL, 0x00322a3cUL, 0xbf64cddfUL, 0xba57a68eUL, +0x75c6372bUL, 0x50afd341UL, 0xa7c13275UL, 0x915a0bf5UL, 0x6b54bfabUL, 0x2b0b1426UL, +0xab4cc9d7UL, 0x449ccd82UL, 0xf7fbf265UL, 0xab85c5f3UL, 0x1b55db94UL, 0xaad4e324UL, +0xcfa4bd3fUL, 0x2deaa3e2UL, 0x9e204d02UL, 0xc8bd25acUL, 0xeadf55b3UL, 0xd5bd9e98UL, +0xe31231b2UL, 0x2ad5ad6cUL, 0x954329deUL, 0xadbe4528UL, 0xd8710f69UL, 0xaa51c90fUL, +0xaa786bf6UL, 0x22513f1eUL, 0xaa51a79bUL, 0x2ad344ccUL, 0x7b5a41f0UL, 0xd37cfbadUL, +0x1b069505UL, 0x41ece491UL, 0xb4c332e6UL, 0x032268d4UL, 0xc9600accUL, 0xce387e6dUL, +0xbf6bb16cUL, 0x6a70fb78UL, 0x0d03d9c9UL, 0xd4df39deUL, 0xe01063daUL, 0x4736f464UL, +0x5ad328d8UL, 0xb347cc96UL, 0x75bb0fc3UL, 0x98511bfbUL, 0x4ffbcc35UL, 0xb58bcf6aUL, +0xe11f0abcUL, 0xbfc5fe4aUL, 0xa70aec10UL, 0xac39570aUL, 0x3f04442fUL, 0x6188b153UL, +0xe0397a2eUL, 0x5727cb79UL, 0x9ceb418fUL, 0x1cacd68dUL, 0x2ad37c96UL, 0x0175cb9dUL, +0xc69dff09UL, 0xc75b65f0UL, 0xd9db40d8UL, 0xec0e7779UL, 0x4744ead4UL, 0xb11c3274UL, +0xdd24cb9eUL, 0x7e1c54bdUL, 0xf01144f9UL, 0xd2240eb1UL, 0x9675b3fdUL, 0xa3ac3755UL, +0xd47c27afUL, 0x51c85f4dUL, 0x56907596UL, 0xa5bb15e6UL, 0x580304f0UL, 0xca042cf1UL, +0x011a37eaUL, 0x8dbfaadbUL, 0x35ba3e4aUL, 0x3526ffa0UL, 0xc37b4d09UL, 0xbc306ed9UL, +0x98a52666UL, 0x5648f725UL, 0xff5e569dUL, 0x0ced63d0UL, 0x7c63b2cfUL, 0x700b45e1UL, +0xd5ea50f1UL, 0x85a92872UL, 0xaf1fbda7UL, 0xd4234870UL, 0xa7870bf3UL, 0x2d3b4d79UL, +0x42e04198UL, 0x0cd0ede7UL, 0x26470db8UL, 0xf881814cUL, 0x474d6ad7UL, 0x7c0c5e5cUL, +0xd1231959UL, 0x381b7298UL, 0xf5d2f4dbUL, 0xab838653UL, 0x6e2f1e23UL, 0x83719c9eUL, +0xbd91e046UL, 0x9a56456eUL, 0xdc39200cUL, 0x20c8c571UL, 0x962bda1cUL, 0xe1e696ffUL, +0xb141ab08UL, 0x7cca89b9UL, 0x1a69e783UL, 0x02cc4843UL, 0xa2f7c579UL, 0x429ef47dUL, 0x427b169cUL, 0x5ac9f049UL, 0xdd8f0f00UL, 0x5c8165bfUL}; static const ulong32 S2[256] = { -0x1f201094UL, 0xef0ba75bUL, 0x69e3cf7eUL, 0x393f4380UL, 0xfe61cf7aUL, 0xeec5207aUL, -0x55889c94UL, 0x72fc0651UL, 0xada7ef79UL, 0x4e1d7235UL, 0xd55a63ceUL, 0xde0436baUL, -0x99c430efUL, 0x5f0c0794UL, 0x18dcdb7dUL, 0xa1d6eff3UL, 0xa0b52f7bUL, 0x59e83605UL, -0xee15b094UL, 0xe9ffd909UL, 0xdc440086UL, 0xef944459UL, 0xba83ccb3UL, 0xe0c3cdfbUL, -0xd1da4181UL, 0x3b092ab1UL, 0xf997f1c1UL, 0xa5e6cf7bUL, 0x01420ddbUL, 0xe4e7ef5bUL, -0x25a1ff41UL, 0xe180f806UL, 0x1fc41080UL, 0x179bee7aUL, 0xd37ac6a9UL, 0xfe5830a4UL, -0x98de8b7fUL, 0x77e83f4eUL, 0x79929269UL, 0x24fa9f7bUL, 0xe113c85bUL, 0xacc40083UL, -0xd7503525UL, 0xf7ea615fUL, 0x62143154UL, 0x0d554b63UL, 0x5d681121UL, 0xc866c359UL, -0x3d63cf73UL, 0xcee234c0UL, 0xd4d87e87UL, 0x5c672b21UL, 0x071f6181UL, 0x39f7627fUL, -0x361e3084UL, 0xe4eb573bUL, 0x602f64a4UL, 0xd63acd9cUL, 0x1bbc4635UL, 0x9e81032dUL, -0x2701f50cUL, 0x99847ab4UL, 0xa0e3df79UL, 0xba6cf38cUL, 0x10843094UL, 0x2537a95eUL, -0xf46f6ffeUL, 0xa1ff3b1fUL, 0x208cfb6aUL, 0x8f458c74UL, 0xd9e0a227UL, 0x4ec73a34UL, -0xfc884f69UL, 0x3e4de8dfUL, 0xef0e0088UL, 0x3559648dUL, 0x8a45388cUL, 0x1d804366UL, -0x721d9bfdUL, 0xa58684bbUL, 0xe8256333UL, 0x844e8212UL, 0x128d8098UL, 0xfed33fb4UL, -0xce280ae1UL, 0x27e19ba5UL, 0xd5a6c252UL, 0xe49754bdUL, 0xc5d655ddUL, 0xeb667064UL, -0x77840b4dUL, 0xa1b6a801UL, 0x84db26a9UL, 0xe0b56714UL, 0x21f043b7UL, 0xe5d05860UL, -0x54f03084UL, 0x066ff472UL, 0xa31aa153UL, 0xdadc4755UL, 0xb5625dbfUL, 0x68561be6UL, -0x83ca6b94UL, 0x2d6ed23bUL, 0xeccf01dbUL, 0xa6d3d0baUL, 0xb6803d5cUL, 0xaf77a709UL, -0x33b4a34cUL, 0x397bc8d6UL, 0x5ee22b95UL, 0x5f0e5304UL, 0x81ed6f61UL, 0x20e74364UL, -0xb45e1378UL, 0xde18639bUL, 0x881ca122UL, 0xb96726d1UL, 0x8049a7e8UL, 0x22b7da7bUL, -0x5e552d25UL, 0x5272d237UL, 0x79d2951cUL, 0xc60d894cUL, 0x488cb402UL, 0x1ba4fe5bUL, -0xa4b09f6bUL, 0x1ca815cfUL, 0xa20c3005UL, 0x8871df63UL, 0xb9de2fcbUL, 0x0cc6c9e9UL, -0x0beeff53UL, 0xe3214517UL, 0xb4542835UL, 0x9f63293cUL, 0xee41e729UL, 0x6e1d2d7cUL, -0x50045286UL, 0x1e6685f3UL, 0xf33401c6UL, 0x30a22c95UL, 0x31a70850UL, 0x60930f13UL, -0x73f98417UL, 0xa1269859UL, 0xec645c44UL, 0x52c877a9UL, 0xcdff33a6UL, 0xa02b1741UL, -0x7cbad9a2UL, 0x2180036fUL, 0x50d99c08UL, 0xcb3f4861UL, 0xc26bd765UL, 0x64a3f6abUL, -0x80342676UL, 0x25a75e7bUL, 0xe4e6d1fcUL, 0x20c710e6UL, 0xcdf0b680UL, 0x17844d3bUL, -0x31eef84dUL, 0x7e0824e4UL, 0x2ccb49ebUL, 0x846a3baeUL, 0x8ff77888UL, 0xee5d60f6UL, -0x7af75673UL, 0x2fdd5cdbUL, 0xa11631c1UL, 0x30f66f43UL, 0xb3faec54UL, 0x157fd7faUL, -0xef8579ccUL, 0xd152de58UL, 0xdb2ffd5eUL, 0x8f32ce19UL, 0x306af97aUL, 0x02f03ef8UL, -0x99319ad5UL, 0xc242fa0fUL, 0xa7e3ebb0UL, 0xc68e4906UL, 0xb8da230cUL, 0x80823028UL, -0xdcdef3c8UL, 0xd35fb171UL, 0x088a1bc8UL, 0xbec0c560UL, 0x61a3c9e8UL, 0xbca8f54dUL, -0xc72feffaUL, 0x22822e99UL, 0x82c570b4UL, 0xd8d94e89UL, 0x8b1c34bcUL, 0x301e16e6UL, -0x273be979UL, 0xb0ffeaa6UL, 0x61d9b8c6UL, 0x00b24869UL, 0xb7ffce3fUL, 0x08dc283bUL, -0x43daf65aUL, 0xf7e19798UL, 0x7619b72fUL, 0x8f1c9ba4UL, 0xdc8637a0UL, 0x16a7d3b1UL, -0x9fc393b7UL, 0xa7136eebUL, 0xc6bcc63eUL, 0x1a513742UL, 0xef6828bcUL, 0x520365d6UL, -0x2d6a77abUL, 0x3527ed4bUL, 0x821fd216UL, 0x095c6e2eUL, 0xdb92f2fbUL, 0x5eea29cbUL, -0x145892f5UL, 0x91584f7fUL, 0x5483697bUL, 0x2667a8ccUL, 0x85196048UL, 0x8c4baceaUL, -0x833860d4UL, 0x0d23e0f9UL, 0x6c387e8aUL, 0x0ae6d249UL, 0xb284600cUL, 0xd835731dUL, -0xdcb1c647UL, 0xac4c56eaUL, 0x3ebd81b3UL, 0x230eabb0UL, 0x6438bc87UL, 0xf0b5b1faUL, -0x8f5ea2b3UL, 0xfc184642UL, 0x0a036b7aUL, 0x4fb089bdUL, 0x649da589UL, 0xa345415eUL, -0x5c038323UL, 0x3e5d3bb9UL, 0x43d79572UL, 0x7e6dd07cUL, 0x06dfdf1eUL, 0x6c6cc4efUL, +0x1f201094UL, 0xef0ba75bUL, 0x69e3cf7eUL, 0x393f4380UL, 0xfe61cf7aUL, 0xeec5207aUL, +0x55889c94UL, 0x72fc0651UL, 0xada7ef79UL, 0x4e1d7235UL, 0xd55a63ceUL, 0xde0436baUL, +0x99c430efUL, 0x5f0c0794UL, 0x18dcdb7dUL, 0xa1d6eff3UL, 0xa0b52f7bUL, 0x59e83605UL, +0xee15b094UL, 0xe9ffd909UL, 0xdc440086UL, 0xef944459UL, 0xba83ccb3UL, 0xe0c3cdfbUL, +0xd1da4181UL, 0x3b092ab1UL, 0xf997f1c1UL, 0xa5e6cf7bUL, 0x01420ddbUL, 0xe4e7ef5bUL, +0x25a1ff41UL, 0xe180f806UL, 0x1fc41080UL, 0x179bee7aUL, 0xd37ac6a9UL, 0xfe5830a4UL, +0x98de8b7fUL, 0x77e83f4eUL, 0x79929269UL, 0x24fa9f7bUL, 0xe113c85bUL, 0xacc40083UL, +0xd7503525UL, 0xf7ea615fUL, 0x62143154UL, 0x0d554b63UL, 0x5d681121UL, 0xc866c359UL, +0x3d63cf73UL, 0xcee234c0UL, 0xd4d87e87UL, 0x5c672b21UL, 0x071f6181UL, 0x39f7627fUL, +0x361e3084UL, 0xe4eb573bUL, 0x602f64a4UL, 0xd63acd9cUL, 0x1bbc4635UL, 0x9e81032dUL, +0x2701f50cUL, 0x99847ab4UL, 0xa0e3df79UL, 0xba6cf38cUL, 0x10843094UL, 0x2537a95eUL, +0xf46f6ffeUL, 0xa1ff3b1fUL, 0x208cfb6aUL, 0x8f458c74UL, 0xd9e0a227UL, 0x4ec73a34UL, +0xfc884f69UL, 0x3e4de8dfUL, 0xef0e0088UL, 0x3559648dUL, 0x8a45388cUL, 0x1d804366UL, +0x721d9bfdUL, 0xa58684bbUL, 0xe8256333UL, 0x844e8212UL, 0x128d8098UL, 0xfed33fb4UL, +0xce280ae1UL, 0x27e19ba5UL, 0xd5a6c252UL, 0xe49754bdUL, 0xc5d655ddUL, 0xeb667064UL, +0x77840b4dUL, 0xa1b6a801UL, 0x84db26a9UL, 0xe0b56714UL, 0x21f043b7UL, 0xe5d05860UL, +0x54f03084UL, 0x066ff472UL, 0xa31aa153UL, 0xdadc4755UL, 0xb5625dbfUL, 0x68561be6UL, +0x83ca6b94UL, 0x2d6ed23bUL, 0xeccf01dbUL, 0xa6d3d0baUL, 0xb6803d5cUL, 0xaf77a709UL, +0x33b4a34cUL, 0x397bc8d6UL, 0x5ee22b95UL, 0x5f0e5304UL, 0x81ed6f61UL, 0x20e74364UL, +0xb45e1378UL, 0xde18639bUL, 0x881ca122UL, 0xb96726d1UL, 0x8049a7e8UL, 0x22b7da7bUL, +0x5e552d25UL, 0x5272d237UL, 0x79d2951cUL, 0xc60d894cUL, 0x488cb402UL, 0x1ba4fe5bUL, +0xa4b09f6bUL, 0x1ca815cfUL, 0xa20c3005UL, 0x8871df63UL, 0xb9de2fcbUL, 0x0cc6c9e9UL, +0x0beeff53UL, 0xe3214517UL, 0xb4542835UL, 0x9f63293cUL, 0xee41e729UL, 0x6e1d2d7cUL, +0x50045286UL, 0x1e6685f3UL, 0xf33401c6UL, 0x30a22c95UL, 0x31a70850UL, 0x60930f13UL, +0x73f98417UL, 0xa1269859UL, 0xec645c44UL, 0x52c877a9UL, 0xcdff33a6UL, 0xa02b1741UL, +0x7cbad9a2UL, 0x2180036fUL, 0x50d99c08UL, 0xcb3f4861UL, 0xc26bd765UL, 0x64a3f6abUL, +0x80342676UL, 0x25a75e7bUL, 0xe4e6d1fcUL, 0x20c710e6UL, 0xcdf0b680UL, 0x17844d3bUL, +0x31eef84dUL, 0x7e0824e4UL, 0x2ccb49ebUL, 0x846a3baeUL, 0x8ff77888UL, 0xee5d60f6UL, +0x7af75673UL, 0x2fdd5cdbUL, 0xa11631c1UL, 0x30f66f43UL, 0xb3faec54UL, 0x157fd7faUL, +0xef8579ccUL, 0xd152de58UL, 0xdb2ffd5eUL, 0x8f32ce19UL, 0x306af97aUL, 0x02f03ef8UL, +0x99319ad5UL, 0xc242fa0fUL, 0xa7e3ebb0UL, 0xc68e4906UL, 0xb8da230cUL, 0x80823028UL, +0xdcdef3c8UL, 0xd35fb171UL, 0x088a1bc8UL, 0xbec0c560UL, 0x61a3c9e8UL, 0xbca8f54dUL, +0xc72feffaUL, 0x22822e99UL, 0x82c570b4UL, 0xd8d94e89UL, 0x8b1c34bcUL, 0x301e16e6UL, +0x273be979UL, 0xb0ffeaa6UL, 0x61d9b8c6UL, 0x00b24869UL, 0xb7ffce3fUL, 0x08dc283bUL, +0x43daf65aUL, 0xf7e19798UL, 0x7619b72fUL, 0x8f1c9ba4UL, 0xdc8637a0UL, 0x16a7d3b1UL, +0x9fc393b7UL, 0xa7136eebUL, 0xc6bcc63eUL, 0x1a513742UL, 0xef6828bcUL, 0x520365d6UL, +0x2d6a77abUL, 0x3527ed4bUL, 0x821fd216UL, 0x095c6e2eUL, 0xdb92f2fbUL, 0x5eea29cbUL, +0x145892f5UL, 0x91584f7fUL, 0x5483697bUL, 0x2667a8ccUL, 0x85196048UL, 0x8c4baceaUL, +0x833860d4UL, 0x0d23e0f9UL, 0x6c387e8aUL, 0x0ae6d249UL, 0xb284600cUL, 0xd835731dUL, +0xdcb1c647UL, 0xac4c56eaUL, 0x3ebd81b3UL, 0x230eabb0UL, 0x6438bc87UL, 0xf0b5b1faUL, +0x8f5ea2b3UL, 0xfc184642UL, 0x0a036b7aUL, 0x4fb089bdUL, 0x649da589UL, 0xa345415eUL, +0x5c038323UL, 0x3e5d3bb9UL, 0x43d79572UL, 0x7e6dd07cUL, 0x06dfdf1eUL, 0x6c6cc4efUL, 0x7160a539UL, 0x73bfbe70UL, 0x83877605UL, 0x4523ecf1UL}; static const ulong32 S3[256] = { -0x8defc240UL, 0x25fa5d9fUL, 0xeb903dbfUL, 0xe810c907UL, 0x47607fffUL, 0x369fe44bUL, -0x8c1fc644UL, 0xaececa90UL, 0xbeb1f9bfUL, 0xeefbcaeaUL, 0xe8cf1950UL, 0x51df07aeUL, -0x920e8806UL, 0xf0ad0548UL, 0xe13c8d83UL, 0x927010d5UL, 0x11107d9fUL, 0x07647db9UL, -0xb2e3e4d4UL, 0x3d4f285eUL, 0xb9afa820UL, 0xfade82e0UL, 0xa067268bUL, 0x8272792eUL, -0x553fb2c0UL, 0x489ae22bUL, 0xd4ef9794UL, 0x125e3fbcUL, 0x21fffceeUL, 0x825b1bfdUL, -0x9255c5edUL, 0x1257a240UL, 0x4e1a8302UL, 0xbae07fffUL, 0x528246e7UL, 0x8e57140eUL, -0x3373f7bfUL, 0x8c9f8188UL, 0xa6fc4ee8UL, 0xc982b5a5UL, 0xa8c01db7UL, 0x579fc264UL, -0x67094f31UL, 0xf2bd3f5fUL, 0x40fff7c1UL, 0x1fb78dfcUL, 0x8e6bd2c1UL, 0x437be59bUL, -0x99b03dbfUL, 0xb5dbc64bUL, 0x638dc0e6UL, 0x55819d99UL, 0xa197c81cUL, 0x4a012d6eUL, -0xc5884a28UL, 0xccc36f71UL, 0xb843c213UL, 0x6c0743f1UL, 0x8309893cUL, 0x0feddd5fUL, -0x2f7fe850UL, 0xd7c07f7eUL, 0x02507fbfUL, 0x5afb9a04UL, 0xa747d2d0UL, 0x1651192eUL, -0xaf70bf3eUL, 0x58c31380UL, 0x5f98302eUL, 0x727cc3c4UL, 0x0a0fb402UL, 0x0f7fef82UL, -0x8c96fdadUL, 0x5d2c2aaeUL, 0x8ee99a49UL, 0x50da88b8UL, 0x8427f4a0UL, 0x1eac5790UL, -0x796fb449UL, 0x8252dc15UL, 0xefbd7d9bUL, 0xa672597dUL, 0xada840d8UL, 0x45f54504UL, -0xfa5d7403UL, 0xe83ec305UL, 0x4f91751aUL, 0x925669c2UL, 0x23efe941UL, 0xa903f12eUL, -0x60270df2UL, 0x0276e4b6UL, 0x94fd6574UL, 0x927985b2UL, 0x8276dbcbUL, 0x02778176UL, -0xf8af918dUL, 0x4e48f79eUL, 0x8f616ddfUL, 0xe29d840eUL, 0x842f7d83UL, 0x340ce5c8UL, -0x96bbb682UL, 0x93b4b148UL, 0xef303cabUL, 0x984faf28UL, 0x779faf9bUL, 0x92dc560dUL, -0x224d1e20UL, 0x8437aa88UL, 0x7d29dc96UL, 0x2756d3dcUL, 0x8b907ceeUL, 0xb51fd240UL, -0xe7c07ce3UL, 0xe566b4a1UL, 0xc3e9615eUL, 0x3cf8209dUL, 0x6094d1e3UL, 0xcd9ca341UL, -0x5c76460eUL, 0x00ea983bUL, 0xd4d67881UL, 0xfd47572cUL, 0xf76cedd9UL, 0xbda8229cUL, -0x127dadaaUL, 0x438a074eUL, 0x1f97c090UL, 0x081bdb8aUL, 0x93a07ebeUL, 0xb938ca15UL, -0x97b03cffUL, 0x3dc2c0f8UL, 0x8d1ab2ecUL, 0x64380e51UL, 0x68cc7bfbUL, 0xd90f2788UL, -0x12490181UL, 0x5de5ffd4UL, 0xdd7ef86aUL, 0x76a2e214UL, 0xb9a40368UL, 0x925d958fUL, -0x4b39fffaUL, 0xba39aee9UL, 0xa4ffd30bUL, 0xfaf7933bUL, 0x6d498623UL, 0x193cbcfaUL, -0x27627545UL, 0x825cf47aUL, 0x61bd8ba0UL, 0xd11e42d1UL, 0xcead04f4UL, 0x127ea392UL, -0x10428db7UL, 0x8272a972UL, 0x9270c4a8UL, 0x127de50bUL, 0x285ba1c8UL, 0x3c62f44fUL, -0x35c0eaa5UL, 0xe805d231UL, 0x428929fbUL, 0xb4fcdf82UL, 0x4fb66a53UL, 0x0e7dc15bUL, -0x1f081fabUL, 0x108618aeUL, 0xfcfd086dUL, 0xf9ff2889UL, 0x694bcc11UL, 0x236a5caeUL, -0x12deca4dUL, 0x2c3f8cc5UL, 0xd2d02dfeUL, 0xf8ef5896UL, 0xe4cf52daUL, 0x95155b67UL, -0x494a488cUL, 0xb9b6a80cUL, 0x5c8f82bcUL, 0x89d36b45UL, 0x3a609437UL, 0xec00c9a9UL, -0x44715253UL, 0x0a874b49UL, 0xd773bc40UL, 0x7c34671cUL, 0x02717ef6UL, 0x4feb5536UL, -0xa2d02fffUL, 0xd2bf60c4UL, 0xd43f03c0UL, 0x50b4ef6dUL, 0x07478cd1UL, 0x006e1888UL, -0xa2e53f55UL, 0xb9e6d4bcUL, 0xa2048016UL, 0x97573833UL, 0xd7207d67UL, 0xde0f8f3dUL, -0x72f87b33UL, 0xabcc4f33UL, 0x7688c55dUL, 0x7b00a6b0UL, 0x947b0001UL, 0x570075d2UL, -0xf9bb88f8UL, 0x8942019eUL, 0x4264a5ffUL, 0x856302e0UL, 0x72dbd92bUL, 0xee971b69UL, -0x6ea22fdeUL, 0x5f08ae2bUL, 0xaf7a616dUL, 0xe5c98767UL, 0xcf1febd2UL, 0x61efc8c2UL, -0xf1ac2571UL, 0xcc8239c2UL, 0x67214cb8UL, 0xb1e583d1UL, 0xb7dc3e62UL, 0x7f10bdceUL, -0xf90a5c38UL, 0x0ff0443dUL, 0x606e6dc6UL, 0x60543a49UL, 0x5727c148UL, 0x2be98a1dUL, -0x8ab41738UL, 0x20e1be24UL, 0xaf96da0fUL, 0x68458425UL, 0x99833be5UL, 0x600d457dUL, -0x282f9350UL, 0x8334b362UL, 0xd91d1120UL, 0x2b6d8da0UL, 0x642b1e31UL, 0x9c305a00UL, -0x52bce688UL, 0x1b03588aUL, 0xf7baefd5UL, 0x4142ed9cUL, 0xa4315c11UL, 0x83323ec5UL, +0x8defc240UL, 0x25fa5d9fUL, 0xeb903dbfUL, 0xe810c907UL, 0x47607fffUL, 0x369fe44bUL, +0x8c1fc644UL, 0xaececa90UL, 0xbeb1f9bfUL, 0xeefbcaeaUL, 0xe8cf1950UL, 0x51df07aeUL, +0x920e8806UL, 0xf0ad0548UL, 0xe13c8d83UL, 0x927010d5UL, 0x11107d9fUL, 0x07647db9UL, +0xb2e3e4d4UL, 0x3d4f285eUL, 0xb9afa820UL, 0xfade82e0UL, 0xa067268bUL, 0x8272792eUL, +0x553fb2c0UL, 0x489ae22bUL, 0xd4ef9794UL, 0x125e3fbcUL, 0x21fffceeUL, 0x825b1bfdUL, +0x9255c5edUL, 0x1257a240UL, 0x4e1a8302UL, 0xbae07fffUL, 0x528246e7UL, 0x8e57140eUL, +0x3373f7bfUL, 0x8c9f8188UL, 0xa6fc4ee8UL, 0xc982b5a5UL, 0xa8c01db7UL, 0x579fc264UL, +0x67094f31UL, 0xf2bd3f5fUL, 0x40fff7c1UL, 0x1fb78dfcUL, 0x8e6bd2c1UL, 0x437be59bUL, +0x99b03dbfUL, 0xb5dbc64bUL, 0x638dc0e6UL, 0x55819d99UL, 0xa197c81cUL, 0x4a012d6eUL, +0xc5884a28UL, 0xccc36f71UL, 0xb843c213UL, 0x6c0743f1UL, 0x8309893cUL, 0x0feddd5fUL, +0x2f7fe850UL, 0xd7c07f7eUL, 0x02507fbfUL, 0x5afb9a04UL, 0xa747d2d0UL, 0x1651192eUL, +0xaf70bf3eUL, 0x58c31380UL, 0x5f98302eUL, 0x727cc3c4UL, 0x0a0fb402UL, 0x0f7fef82UL, +0x8c96fdadUL, 0x5d2c2aaeUL, 0x8ee99a49UL, 0x50da88b8UL, 0x8427f4a0UL, 0x1eac5790UL, +0x796fb449UL, 0x8252dc15UL, 0xefbd7d9bUL, 0xa672597dUL, 0xada840d8UL, 0x45f54504UL, +0xfa5d7403UL, 0xe83ec305UL, 0x4f91751aUL, 0x925669c2UL, 0x23efe941UL, 0xa903f12eUL, +0x60270df2UL, 0x0276e4b6UL, 0x94fd6574UL, 0x927985b2UL, 0x8276dbcbUL, 0x02778176UL, +0xf8af918dUL, 0x4e48f79eUL, 0x8f616ddfUL, 0xe29d840eUL, 0x842f7d83UL, 0x340ce5c8UL, +0x96bbb682UL, 0x93b4b148UL, 0xef303cabUL, 0x984faf28UL, 0x779faf9bUL, 0x92dc560dUL, +0x224d1e20UL, 0x8437aa88UL, 0x7d29dc96UL, 0x2756d3dcUL, 0x8b907ceeUL, 0xb51fd240UL, +0xe7c07ce3UL, 0xe566b4a1UL, 0xc3e9615eUL, 0x3cf8209dUL, 0x6094d1e3UL, 0xcd9ca341UL, +0x5c76460eUL, 0x00ea983bUL, 0xd4d67881UL, 0xfd47572cUL, 0xf76cedd9UL, 0xbda8229cUL, +0x127dadaaUL, 0x438a074eUL, 0x1f97c090UL, 0x081bdb8aUL, 0x93a07ebeUL, 0xb938ca15UL, +0x97b03cffUL, 0x3dc2c0f8UL, 0x8d1ab2ecUL, 0x64380e51UL, 0x68cc7bfbUL, 0xd90f2788UL, +0x12490181UL, 0x5de5ffd4UL, 0xdd7ef86aUL, 0x76a2e214UL, 0xb9a40368UL, 0x925d958fUL, +0x4b39fffaUL, 0xba39aee9UL, 0xa4ffd30bUL, 0xfaf7933bUL, 0x6d498623UL, 0x193cbcfaUL, +0x27627545UL, 0x825cf47aUL, 0x61bd8ba0UL, 0xd11e42d1UL, 0xcead04f4UL, 0x127ea392UL, +0x10428db7UL, 0x8272a972UL, 0x9270c4a8UL, 0x127de50bUL, 0x285ba1c8UL, 0x3c62f44fUL, +0x35c0eaa5UL, 0xe805d231UL, 0x428929fbUL, 0xb4fcdf82UL, 0x4fb66a53UL, 0x0e7dc15bUL, +0x1f081fabUL, 0x108618aeUL, 0xfcfd086dUL, 0xf9ff2889UL, 0x694bcc11UL, 0x236a5caeUL, +0x12deca4dUL, 0x2c3f8cc5UL, 0xd2d02dfeUL, 0xf8ef5896UL, 0xe4cf52daUL, 0x95155b67UL, +0x494a488cUL, 0xb9b6a80cUL, 0x5c8f82bcUL, 0x89d36b45UL, 0x3a609437UL, 0xec00c9a9UL, +0x44715253UL, 0x0a874b49UL, 0xd773bc40UL, 0x7c34671cUL, 0x02717ef6UL, 0x4feb5536UL, +0xa2d02fffUL, 0xd2bf60c4UL, 0xd43f03c0UL, 0x50b4ef6dUL, 0x07478cd1UL, 0x006e1888UL, +0xa2e53f55UL, 0xb9e6d4bcUL, 0xa2048016UL, 0x97573833UL, 0xd7207d67UL, 0xde0f8f3dUL, +0x72f87b33UL, 0xabcc4f33UL, 0x7688c55dUL, 0x7b00a6b0UL, 0x947b0001UL, 0x570075d2UL, +0xf9bb88f8UL, 0x8942019eUL, 0x4264a5ffUL, 0x856302e0UL, 0x72dbd92bUL, 0xee971b69UL, +0x6ea22fdeUL, 0x5f08ae2bUL, 0xaf7a616dUL, 0xe5c98767UL, 0xcf1febd2UL, 0x61efc8c2UL, +0xf1ac2571UL, 0xcc8239c2UL, 0x67214cb8UL, 0xb1e583d1UL, 0xb7dc3e62UL, 0x7f10bdceUL, +0xf90a5c38UL, 0x0ff0443dUL, 0x606e6dc6UL, 0x60543a49UL, 0x5727c148UL, 0x2be98a1dUL, +0x8ab41738UL, 0x20e1be24UL, 0xaf96da0fUL, 0x68458425UL, 0x99833be5UL, 0x600d457dUL, +0x282f9350UL, 0x8334b362UL, 0xd91d1120UL, 0x2b6d8da0UL, 0x642b1e31UL, 0x9c305a00UL, +0x52bce688UL, 0x1b03588aUL, 0xf7baefd5UL, 0x4142ed9cUL, 0xa4315c11UL, 0x83323ec5UL, 0xdfef4636UL, 0xa133c501UL, 0xe9d3531cUL, 0xee353783UL}; static const ulong32 S4[256] = { -0x9db30420UL, 0x1fb6e9deUL, 0xa7be7befUL, 0xd273a298UL, 0x4a4f7bdbUL, 0x64ad8c57UL, -0x85510443UL, 0xfa020ed1UL, 0x7e287affUL, 0xe60fb663UL, 0x095f35a1UL, 0x79ebf120UL, -0xfd059d43UL, 0x6497b7b1UL, 0xf3641f63UL, 0x241e4adfUL, 0x28147f5fUL, 0x4fa2b8cdUL, -0xc9430040UL, 0x0cc32220UL, 0xfdd30b30UL, 0xc0a5374fUL, 0x1d2d00d9UL, 0x24147b15UL, -0xee4d111aUL, 0x0fca5167UL, 0x71ff904cUL, 0x2d195ffeUL, 0x1a05645fUL, 0x0c13fefeUL, -0x081b08caUL, 0x05170121UL, 0x80530100UL, 0xe83e5efeUL, 0xac9af4f8UL, 0x7fe72701UL, -0xd2b8ee5fUL, 0x06df4261UL, 0xbb9e9b8aUL, 0x7293ea25UL, 0xce84ffdfUL, 0xf5718801UL, -0x3dd64b04UL, 0xa26f263bUL, 0x7ed48400UL, 0x547eebe6UL, 0x446d4ca0UL, 0x6cf3d6f5UL, -0x2649abdfUL, 0xaea0c7f5UL, 0x36338cc1UL, 0x503f7e93UL, 0xd3772061UL, 0x11b638e1UL, -0x72500e03UL, 0xf80eb2bbUL, 0xabe0502eUL, 0xec8d77deUL, 0x57971e81UL, 0xe14f6746UL, -0xc9335400UL, 0x6920318fUL, 0x081dbb99UL, 0xffc304a5UL, 0x4d351805UL, 0x7f3d5ce3UL, -0xa6c866c6UL, 0x5d5bcca9UL, 0xdaec6feaUL, 0x9f926f91UL, 0x9f46222fUL, 0x3991467dUL, -0xa5bf6d8eUL, 0x1143c44fUL, 0x43958302UL, 0xd0214eebUL, 0x022083b8UL, 0x3fb6180cUL, -0x18f8931eUL, 0x281658e6UL, 0x26486e3eUL, 0x8bd78a70UL, 0x7477e4c1UL, 0xb506e07cUL, -0xf32d0a25UL, 0x79098b02UL, 0xe4eabb81UL, 0x28123b23UL, 0x69dead38UL, 0x1574ca16UL, -0xdf871b62UL, 0x211c40b7UL, 0xa51a9ef9UL, 0x0014377bUL, 0x041e8ac8UL, 0x09114003UL, -0xbd59e4d2UL, 0xe3d156d5UL, 0x4fe876d5UL, 0x2f91a340UL, 0x557be8deUL, 0x00eae4a7UL, -0x0ce5c2ecUL, 0x4db4bba6UL, 0xe756bdffUL, 0xdd3369acUL, 0xec17b035UL, 0x06572327UL, -0x99afc8b0UL, 0x56c8c391UL, 0x6b65811cUL, 0x5e146119UL, 0x6e85cb75UL, 0xbe07c002UL, -0xc2325577UL, 0x893ff4ecUL, 0x5bbfc92dUL, 0xd0ec3b25UL, 0xb7801ab7UL, 0x8d6d3b24UL, -0x20c763efUL, 0xc366a5fcUL, 0x9c382880UL, 0x0ace3205UL, 0xaac9548aUL, 0xeca1d7c7UL, -0x041afa32UL, 0x1d16625aUL, 0x6701902cUL, 0x9b757a54UL, 0x31d477f7UL, 0x9126b031UL, -0x36cc6fdbUL, 0xc70b8b46UL, 0xd9e66a48UL, 0x56e55a79UL, 0x026a4cebUL, 0x52437effUL, -0x2f8f76b4UL, 0x0df980a5UL, 0x8674cde3UL, 0xedda04ebUL, 0x17a9be04UL, 0x2c18f4dfUL, -0xb7747f9dUL, 0xab2af7b4UL, 0xefc34d20UL, 0x2e096b7cUL, 0x1741a254UL, 0xe5b6a035UL, -0x213d42f6UL, 0x2c1c7c26UL, 0x61c2f50fUL, 0x6552daf9UL, 0xd2c231f8UL, 0x25130f69UL, -0xd8167fa2UL, 0x0418f2c8UL, 0x001a96a6UL, 0x0d1526abUL, 0x63315c21UL, 0x5e0a72ecUL, -0x49bafefdUL, 0x187908d9UL, 0x8d0dbd86UL, 0x311170a7UL, 0x3e9b640cUL, 0xcc3e10d7UL, -0xd5cad3b6UL, 0x0caec388UL, 0xf73001e1UL, 0x6c728affUL, 0x71eae2a1UL, 0x1f9af36eUL, -0xcfcbd12fUL, 0xc1de8417UL, 0xac07be6bUL, 0xcb44a1d8UL, 0x8b9b0f56UL, 0x013988c3UL, -0xb1c52fcaUL, 0xb4be31cdUL, 0xd8782806UL, 0x12a3a4e2UL, 0x6f7de532UL, 0x58fd7eb6UL, -0xd01ee900UL, 0x24adffc2UL, 0xf4990fc5UL, 0x9711aac5UL, 0x001d7b95UL, 0x82e5e7d2UL, -0x109873f6UL, 0x00613096UL, 0xc32d9521UL, 0xada121ffUL, 0x29908415UL, 0x7fbb977fUL, -0xaf9eb3dbUL, 0x29c9ed2aUL, 0x5ce2a465UL, 0xa730f32cUL, 0xd0aa3fe8UL, 0x8a5cc091UL, -0xd49e2ce7UL, 0x0ce454a9UL, 0xd60acd86UL, 0x015f1919UL, 0x77079103UL, 0xdea03af6UL, -0x78a8565eUL, 0xdee356dfUL, 0x21f05cbeUL, 0x8b75e387UL, 0xb3c50651UL, 0xb8a5c3efUL, -0xd8eeb6d2UL, 0xe523be77UL, 0xc2154529UL, 0x2f69efdfUL, 0xafe67afbUL, 0xf470c4b2UL, -0xf3e0eb5bUL, 0xd6cc9876UL, 0x39e4460cUL, 0x1fda8538UL, 0x1987832fUL, 0xca007367UL, -0xa99144f8UL, 0x296b299eUL, 0x492fc295UL, 0x9266beabUL, 0xb5676e69UL, 0x9bd3dddaUL, -0xdf7e052fUL, 0xdb25701cUL, 0x1b5e51eeUL, 0xf65324e6UL, 0x6afce36cUL, 0x0316cc04UL, -0x8644213eUL, 0xb7dc59d0UL, 0x7965291fUL, 0xccd6fd43UL, 0x41823979UL, 0x932bcdf6UL, -0xb657c34dUL, 0x4edfd282UL, 0x7ae5290cUL, 0x3cb9536bUL, 0x851e20feUL, 0x9833557eUL, +0x9db30420UL, 0x1fb6e9deUL, 0xa7be7befUL, 0xd273a298UL, 0x4a4f7bdbUL, 0x64ad8c57UL, +0x85510443UL, 0xfa020ed1UL, 0x7e287affUL, 0xe60fb663UL, 0x095f35a1UL, 0x79ebf120UL, +0xfd059d43UL, 0x6497b7b1UL, 0xf3641f63UL, 0x241e4adfUL, 0x28147f5fUL, 0x4fa2b8cdUL, +0xc9430040UL, 0x0cc32220UL, 0xfdd30b30UL, 0xc0a5374fUL, 0x1d2d00d9UL, 0x24147b15UL, +0xee4d111aUL, 0x0fca5167UL, 0x71ff904cUL, 0x2d195ffeUL, 0x1a05645fUL, 0x0c13fefeUL, +0x081b08caUL, 0x05170121UL, 0x80530100UL, 0xe83e5efeUL, 0xac9af4f8UL, 0x7fe72701UL, +0xd2b8ee5fUL, 0x06df4261UL, 0xbb9e9b8aUL, 0x7293ea25UL, 0xce84ffdfUL, 0xf5718801UL, +0x3dd64b04UL, 0xa26f263bUL, 0x7ed48400UL, 0x547eebe6UL, 0x446d4ca0UL, 0x6cf3d6f5UL, +0x2649abdfUL, 0xaea0c7f5UL, 0x36338cc1UL, 0x503f7e93UL, 0xd3772061UL, 0x11b638e1UL, +0x72500e03UL, 0xf80eb2bbUL, 0xabe0502eUL, 0xec8d77deUL, 0x57971e81UL, 0xe14f6746UL, +0xc9335400UL, 0x6920318fUL, 0x081dbb99UL, 0xffc304a5UL, 0x4d351805UL, 0x7f3d5ce3UL, +0xa6c866c6UL, 0x5d5bcca9UL, 0xdaec6feaUL, 0x9f926f91UL, 0x9f46222fUL, 0x3991467dUL, +0xa5bf6d8eUL, 0x1143c44fUL, 0x43958302UL, 0xd0214eebUL, 0x022083b8UL, 0x3fb6180cUL, +0x18f8931eUL, 0x281658e6UL, 0x26486e3eUL, 0x8bd78a70UL, 0x7477e4c1UL, 0xb506e07cUL, +0xf32d0a25UL, 0x79098b02UL, 0xe4eabb81UL, 0x28123b23UL, 0x69dead38UL, 0x1574ca16UL, +0xdf871b62UL, 0x211c40b7UL, 0xa51a9ef9UL, 0x0014377bUL, 0x041e8ac8UL, 0x09114003UL, +0xbd59e4d2UL, 0xe3d156d5UL, 0x4fe876d5UL, 0x2f91a340UL, 0x557be8deUL, 0x00eae4a7UL, +0x0ce5c2ecUL, 0x4db4bba6UL, 0xe756bdffUL, 0xdd3369acUL, 0xec17b035UL, 0x06572327UL, +0x99afc8b0UL, 0x56c8c391UL, 0x6b65811cUL, 0x5e146119UL, 0x6e85cb75UL, 0xbe07c002UL, +0xc2325577UL, 0x893ff4ecUL, 0x5bbfc92dUL, 0xd0ec3b25UL, 0xb7801ab7UL, 0x8d6d3b24UL, +0x20c763efUL, 0xc366a5fcUL, 0x9c382880UL, 0x0ace3205UL, 0xaac9548aUL, 0xeca1d7c7UL, +0x041afa32UL, 0x1d16625aUL, 0x6701902cUL, 0x9b757a54UL, 0x31d477f7UL, 0x9126b031UL, +0x36cc6fdbUL, 0xc70b8b46UL, 0xd9e66a48UL, 0x56e55a79UL, 0x026a4cebUL, 0x52437effUL, +0x2f8f76b4UL, 0x0df980a5UL, 0x8674cde3UL, 0xedda04ebUL, 0x17a9be04UL, 0x2c18f4dfUL, +0xb7747f9dUL, 0xab2af7b4UL, 0xefc34d20UL, 0x2e096b7cUL, 0x1741a254UL, 0xe5b6a035UL, +0x213d42f6UL, 0x2c1c7c26UL, 0x61c2f50fUL, 0x6552daf9UL, 0xd2c231f8UL, 0x25130f69UL, +0xd8167fa2UL, 0x0418f2c8UL, 0x001a96a6UL, 0x0d1526abUL, 0x63315c21UL, 0x5e0a72ecUL, +0x49bafefdUL, 0x187908d9UL, 0x8d0dbd86UL, 0x311170a7UL, 0x3e9b640cUL, 0xcc3e10d7UL, +0xd5cad3b6UL, 0x0caec388UL, 0xf73001e1UL, 0x6c728affUL, 0x71eae2a1UL, 0x1f9af36eUL, +0xcfcbd12fUL, 0xc1de8417UL, 0xac07be6bUL, 0xcb44a1d8UL, 0x8b9b0f56UL, 0x013988c3UL, +0xb1c52fcaUL, 0xb4be31cdUL, 0xd8782806UL, 0x12a3a4e2UL, 0x6f7de532UL, 0x58fd7eb6UL, +0xd01ee900UL, 0x24adffc2UL, 0xf4990fc5UL, 0x9711aac5UL, 0x001d7b95UL, 0x82e5e7d2UL, +0x109873f6UL, 0x00613096UL, 0xc32d9521UL, 0xada121ffUL, 0x29908415UL, 0x7fbb977fUL, +0xaf9eb3dbUL, 0x29c9ed2aUL, 0x5ce2a465UL, 0xa730f32cUL, 0xd0aa3fe8UL, 0x8a5cc091UL, +0xd49e2ce7UL, 0x0ce454a9UL, 0xd60acd86UL, 0x015f1919UL, 0x77079103UL, 0xdea03af6UL, +0x78a8565eUL, 0xdee356dfUL, 0x21f05cbeUL, 0x8b75e387UL, 0xb3c50651UL, 0xb8a5c3efUL, +0xd8eeb6d2UL, 0xe523be77UL, 0xc2154529UL, 0x2f69efdfUL, 0xafe67afbUL, 0xf470c4b2UL, +0xf3e0eb5bUL, 0xd6cc9876UL, 0x39e4460cUL, 0x1fda8538UL, 0x1987832fUL, 0xca007367UL, +0xa99144f8UL, 0x296b299eUL, 0x492fc295UL, 0x9266beabUL, 0xb5676e69UL, 0x9bd3dddaUL, +0xdf7e052fUL, 0xdb25701cUL, 0x1b5e51eeUL, 0xf65324e6UL, 0x6afce36cUL, 0x0316cc04UL, +0x8644213eUL, 0xb7dc59d0UL, 0x7965291fUL, 0xccd6fd43UL, 0x41823979UL, 0x932bcdf6UL, +0xb657c34dUL, 0x4edfd282UL, 0x7ae5290cUL, 0x3cb9536bUL, 0x851e20feUL, 0x9833557eUL, 0x13ecf0b0UL, 0xd3ffb372UL, 0x3f85c5c1UL, 0x0aef7ed2UL}; static const ulong32 S5[256] = { -0x7ec90c04UL, 0x2c6e74b9UL, 0x9b0e66dfUL, 0xa6337911UL, 0xb86a7fffUL, 0x1dd358f5UL, -0x44dd9d44UL, 0x1731167fUL, 0x08fbf1faUL, 0xe7f511ccUL, 0xd2051b00UL, 0x735aba00UL, -0x2ab722d8UL, 0x386381cbUL, 0xacf6243aUL, 0x69befd7aUL, 0xe6a2e77fUL, 0xf0c720cdUL, -0xc4494816UL, 0xccf5c180UL, 0x38851640UL, 0x15b0a848UL, 0xe68b18cbUL, 0x4caadeffUL, -0x5f480a01UL, 0x0412b2aaUL, 0x259814fcUL, 0x41d0efe2UL, 0x4e40b48dUL, 0x248eb6fbUL, -0x8dba1cfeUL, 0x41a99b02UL, 0x1a550a04UL, 0xba8f65cbUL, 0x7251f4e7UL, 0x95a51725UL, -0xc106ecd7UL, 0x97a5980aUL, 0xc539b9aaUL, 0x4d79fe6aUL, 0xf2f3f763UL, 0x68af8040UL, -0xed0c9e56UL, 0x11b4958bUL, 0xe1eb5a88UL, 0x8709e6b0UL, 0xd7e07156UL, 0x4e29fea7UL, -0x6366e52dUL, 0x02d1c000UL, 0xc4ac8e05UL, 0x9377f571UL, 0x0c05372aUL, 0x578535f2UL, -0x2261be02UL, 0xd642a0c9UL, 0xdf13a280UL, 0x74b55bd2UL, 0x682199c0UL, 0xd421e5ecUL, -0x53fb3ce8UL, 0xc8adedb3UL, 0x28a87fc9UL, 0x3d959981UL, 0x5c1ff900UL, 0xfe38d399UL, -0x0c4eff0bUL, 0x062407eaUL, 0xaa2f4fb1UL, 0x4fb96976UL, 0x90c79505UL, 0xb0a8a774UL, -0xef55a1ffUL, 0xe59ca2c2UL, 0xa6b62d27UL, 0xe66a4263UL, 0xdf65001fUL, 0x0ec50966UL, -0xdfdd55bcUL, 0x29de0655UL, 0x911e739aUL, 0x17af8975UL, 0x32c7911cUL, 0x89f89468UL, -0x0d01e980UL, 0x524755f4UL, 0x03b63cc9UL, 0x0cc844b2UL, 0xbcf3f0aaUL, 0x87ac36e9UL, -0xe53a7426UL, 0x01b3d82bUL, 0x1a9e7449UL, 0x64ee2d7eUL, 0xcddbb1daUL, 0x01c94910UL, -0xb868bf80UL, 0x0d26f3fdUL, 0x9342ede7UL, 0x04a5c284UL, 0x636737b6UL, 0x50f5b616UL, -0xf24766e3UL, 0x8eca36c1UL, 0x136e05dbUL, 0xfef18391UL, 0xfb887a37UL, 0xd6e7f7d4UL, -0xc7fb7dc9UL, 0x3063fcdfUL, 0xb6f589deUL, 0xec2941daUL, 0x26e46695UL, 0xb7566419UL, -0xf654efc5UL, 0xd08d58b7UL, 0x48925401UL, 0xc1bacb7fUL, 0xe5ff550fUL, 0xb6083049UL, -0x5bb5d0e8UL, 0x87d72e5aUL, 0xab6a6ee1UL, 0x223a66ceUL, 0xc62bf3cdUL, 0x9e0885f9UL, -0x68cb3e47UL, 0x086c010fUL, 0xa21de820UL, 0xd18b69deUL, 0xf3f65777UL, 0xfa02c3f6UL, -0x407edac3UL, 0xcbb3d550UL, 0x1793084dUL, 0xb0d70ebaUL, 0x0ab378d5UL, 0xd951fb0cUL, -0xded7da56UL, 0x4124bbe4UL, 0x94ca0b56UL, 0x0f5755d1UL, 0xe0e1e56eUL, 0x6184b5beUL, -0x580a249fUL, 0x94f74bc0UL, 0xe327888eUL, 0x9f7b5561UL, 0xc3dc0280UL, 0x05687715UL, -0x646c6bd7UL, 0x44904db3UL, 0x66b4f0a3UL, 0xc0f1648aUL, 0x697ed5afUL, 0x49e92ff6UL, -0x309e374fUL, 0x2cb6356aUL, 0x85808573UL, 0x4991f840UL, 0x76f0ae02UL, 0x083be84dUL, -0x28421c9aUL, 0x44489406UL, 0x736e4cb8UL, 0xc1092910UL, 0x8bc95fc6UL, 0x7d869cf4UL, -0x134f616fUL, 0x2e77118dUL, 0xb31b2be1UL, 0xaa90b472UL, 0x3ca5d717UL, 0x7d161bbaUL, -0x9cad9010UL, 0xaf462ba2UL, 0x9fe459d2UL, 0x45d34559UL, 0xd9f2da13UL, 0xdbc65487UL, -0xf3e4f94eUL, 0x176d486fUL, 0x097c13eaUL, 0x631da5c7UL, 0x445f7382UL, 0x175683f4UL, -0xcdc66a97UL, 0x70be0288UL, 0xb3cdcf72UL, 0x6e5dd2f3UL, 0x20936079UL, 0x459b80a5UL, -0xbe60e2dbUL, 0xa9c23101UL, 0xeba5315cUL, 0x224e42f2UL, 0x1c5c1572UL, 0xf6721b2cUL, -0x1ad2fff3UL, 0x8c25404eUL, 0x324ed72fUL, 0x4067b7fdUL, 0x0523138eUL, 0x5ca3bc78UL, -0xdc0fd66eUL, 0x75922283UL, 0x784d6b17UL, 0x58ebb16eUL, 0x44094f85UL, 0x3f481d87UL, -0xfcfeae7bUL, 0x77b5ff76UL, 0x8c2302bfUL, 0xaaf47556UL, 0x5f46b02aUL, 0x2b092801UL, -0x3d38f5f7UL, 0x0ca81f36UL, 0x52af4a8aUL, 0x66d5e7c0UL, 0xdf3b0874UL, 0x95055110UL, -0x1b5ad7a8UL, 0xf61ed5adUL, 0x6cf6e479UL, 0x20758184UL, 0xd0cefa65UL, 0x88f7be58UL, -0x4a046826UL, 0x0ff6f8f3UL, 0xa09c7f70UL, 0x5346aba0UL, 0x5ce96c28UL, 0xe176eda3UL, -0x6bac307fUL, 0x376829d2UL, 0x85360fa9UL, 0x17e3fe2aUL, 0x24b79767UL, 0xf5a96b20UL, -0xd6cd2595UL, 0x68ff1ebfUL, 0x7555442cUL, 0xf19f06beUL, 0xf9e0659aUL, 0xeeb9491dUL, -0x34010718UL, 0xbb30cab8UL, 0xe822fe15UL, 0x88570983UL, 0x750e6249UL, 0xda627e55UL, +0x7ec90c04UL, 0x2c6e74b9UL, 0x9b0e66dfUL, 0xa6337911UL, 0xb86a7fffUL, 0x1dd358f5UL, +0x44dd9d44UL, 0x1731167fUL, 0x08fbf1faUL, 0xe7f511ccUL, 0xd2051b00UL, 0x735aba00UL, +0x2ab722d8UL, 0x386381cbUL, 0xacf6243aUL, 0x69befd7aUL, 0xe6a2e77fUL, 0xf0c720cdUL, +0xc4494816UL, 0xccf5c180UL, 0x38851640UL, 0x15b0a848UL, 0xe68b18cbUL, 0x4caadeffUL, +0x5f480a01UL, 0x0412b2aaUL, 0x259814fcUL, 0x41d0efe2UL, 0x4e40b48dUL, 0x248eb6fbUL, +0x8dba1cfeUL, 0x41a99b02UL, 0x1a550a04UL, 0xba8f65cbUL, 0x7251f4e7UL, 0x95a51725UL, +0xc106ecd7UL, 0x97a5980aUL, 0xc539b9aaUL, 0x4d79fe6aUL, 0xf2f3f763UL, 0x68af8040UL, +0xed0c9e56UL, 0x11b4958bUL, 0xe1eb5a88UL, 0x8709e6b0UL, 0xd7e07156UL, 0x4e29fea7UL, +0x6366e52dUL, 0x02d1c000UL, 0xc4ac8e05UL, 0x9377f571UL, 0x0c05372aUL, 0x578535f2UL, +0x2261be02UL, 0xd642a0c9UL, 0xdf13a280UL, 0x74b55bd2UL, 0x682199c0UL, 0xd421e5ecUL, +0x53fb3ce8UL, 0xc8adedb3UL, 0x28a87fc9UL, 0x3d959981UL, 0x5c1ff900UL, 0xfe38d399UL, +0x0c4eff0bUL, 0x062407eaUL, 0xaa2f4fb1UL, 0x4fb96976UL, 0x90c79505UL, 0xb0a8a774UL, +0xef55a1ffUL, 0xe59ca2c2UL, 0xa6b62d27UL, 0xe66a4263UL, 0xdf65001fUL, 0x0ec50966UL, +0xdfdd55bcUL, 0x29de0655UL, 0x911e739aUL, 0x17af8975UL, 0x32c7911cUL, 0x89f89468UL, +0x0d01e980UL, 0x524755f4UL, 0x03b63cc9UL, 0x0cc844b2UL, 0xbcf3f0aaUL, 0x87ac36e9UL, +0xe53a7426UL, 0x01b3d82bUL, 0x1a9e7449UL, 0x64ee2d7eUL, 0xcddbb1daUL, 0x01c94910UL, +0xb868bf80UL, 0x0d26f3fdUL, 0x9342ede7UL, 0x04a5c284UL, 0x636737b6UL, 0x50f5b616UL, +0xf24766e3UL, 0x8eca36c1UL, 0x136e05dbUL, 0xfef18391UL, 0xfb887a37UL, 0xd6e7f7d4UL, +0xc7fb7dc9UL, 0x3063fcdfUL, 0xb6f589deUL, 0xec2941daUL, 0x26e46695UL, 0xb7566419UL, +0xf654efc5UL, 0xd08d58b7UL, 0x48925401UL, 0xc1bacb7fUL, 0xe5ff550fUL, 0xb6083049UL, +0x5bb5d0e8UL, 0x87d72e5aUL, 0xab6a6ee1UL, 0x223a66ceUL, 0xc62bf3cdUL, 0x9e0885f9UL, +0x68cb3e47UL, 0x086c010fUL, 0xa21de820UL, 0xd18b69deUL, 0xf3f65777UL, 0xfa02c3f6UL, +0x407edac3UL, 0xcbb3d550UL, 0x1793084dUL, 0xb0d70ebaUL, 0x0ab378d5UL, 0xd951fb0cUL, +0xded7da56UL, 0x4124bbe4UL, 0x94ca0b56UL, 0x0f5755d1UL, 0xe0e1e56eUL, 0x6184b5beUL, +0x580a249fUL, 0x94f74bc0UL, 0xe327888eUL, 0x9f7b5561UL, 0xc3dc0280UL, 0x05687715UL, +0x646c6bd7UL, 0x44904db3UL, 0x66b4f0a3UL, 0xc0f1648aUL, 0x697ed5afUL, 0x49e92ff6UL, +0x309e374fUL, 0x2cb6356aUL, 0x85808573UL, 0x4991f840UL, 0x76f0ae02UL, 0x083be84dUL, +0x28421c9aUL, 0x44489406UL, 0x736e4cb8UL, 0xc1092910UL, 0x8bc95fc6UL, 0x7d869cf4UL, +0x134f616fUL, 0x2e77118dUL, 0xb31b2be1UL, 0xaa90b472UL, 0x3ca5d717UL, 0x7d161bbaUL, +0x9cad9010UL, 0xaf462ba2UL, 0x9fe459d2UL, 0x45d34559UL, 0xd9f2da13UL, 0xdbc65487UL, +0xf3e4f94eUL, 0x176d486fUL, 0x097c13eaUL, 0x631da5c7UL, 0x445f7382UL, 0x175683f4UL, +0xcdc66a97UL, 0x70be0288UL, 0xb3cdcf72UL, 0x6e5dd2f3UL, 0x20936079UL, 0x459b80a5UL, +0xbe60e2dbUL, 0xa9c23101UL, 0xeba5315cUL, 0x224e42f2UL, 0x1c5c1572UL, 0xf6721b2cUL, +0x1ad2fff3UL, 0x8c25404eUL, 0x324ed72fUL, 0x4067b7fdUL, 0x0523138eUL, 0x5ca3bc78UL, +0xdc0fd66eUL, 0x75922283UL, 0x784d6b17UL, 0x58ebb16eUL, 0x44094f85UL, 0x3f481d87UL, +0xfcfeae7bUL, 0x77b5ff76UL, 0x8c2302bfUL, 0xaaf47556UL, 0x5f46b02aUL, 0x2b092801UL, +0x3d38f5f7UL, 0x0ca81f36UL, 0x52af4a8aUL, 0x66d5e7c0UL, 0xdf3b0874UL, 0x95055110UL, +0x1b5ad7a8UL, 0xf61ed5adUL, 0x6cf6e479UL, 0x20758184UL, 0xd0cefa65UL, 0x88f7be58UL, +0x4a046826UL, 0x0ff6f8f3UL, 0xa09c7f70UL, 0x5346aba0UL, 0x5ce96c28UL, 0xe176eda3UL, +0x6bac307fUL, 0x376829d2UL, 0x85360fa9UL, 0x17e3fe2aUL, 0x24b79767UL, 0xf5a96b20UL, +0xd6cd2595UL, 0x68ff1ebfUL, 0x7555442cUL, 0xf19f06beUL, 0xf9e0659aUL, 0xeeb9491dUL, +0x34010718UL, 0xbb30cab8UL, 0xe822fe15UL, 0x88570983UL, 0x750e6249UL, 0xda627e55UL, 0x5e76ffa8UL, 0xb1534546UL, 0x6d47de08UL, 0xefe9e7d4UL}; static const ulong32 S6[256] = { -0xf6fa8f9dUL, 0x2cac6ce1UL, 0x4ca34867UL, 0xe2337f7cUL, 0x95db08e7UL, 0x016843b4UL, -0xeced5cbcUL, 0x325553acUL, 0xbf9f0960UL, 0xdfa1e2edUL, 0x83f0579dUL, 0x63ed86b9UL, -0x1ab6a6b8UL, 0xde5ebe39UL, 0xf38ff732UL, 0x8989b138UL, 0x33f14961UL, 0xc01937bdUL, -0xf506c6daUL, 0xe4625e7eUL, 0xa308ea99UL, 0x4e23e33cUL, 0x79cbd7ccUL, 0x48a14367UL, -0xa3149619UL, 0xfec94bd5UL, 0xa114174aUL, 0xeaa01866UL, 0xa084db2dUL, 0x09a8486fUL, -0xa888614aUL, 0x2900af98UL, 0x01665991UL, 0xe1992863UL, 0xc8f30c60UL, 0x2e78ef3cUL, -0xd0d51932UL, 0xcf0fec14UL, 0xf7ca07d2UL, 0xd0a82072UL, 0xfd41197eUL, 0x9305a6b0UL, -0xe86be3daUL, 0x74bed3cdUL, 0x372da53cUL, 0x4c7f4448UL, 0xdab5d440UL, 0x6dba0ec3UL, -0x083919a7UL, 0x9fbaeed9UL, 0x49dbcfb0UL, 0x4e670c53UL, 0x5c3d9c01UL, 0x64bdb941UL, -0x2c0e636aUL, 0xba7dd9cdUL, 0xea6f7388UL, 0xe70bc762UL, 0x35f29adbUL, 0x5c4cdd8dUL, -0xf0d48d8cUL, 0xb88153e2UL, 0x08a19866UL, 0x1ae2eac8UL, 0x284caf89UL, 0xaa928223UL, -0x9334be53UL, 0x3b3a21bfUL, 0x16434be3UL, 0x9aea3906UL, 0xefe8c36eUL, 0xf890cdd9UL, -0x80226daeUL, 0xc340a4a3UL, 0xdf7e9c09UL, 0xa694a807UL, 0x5b7c5eccUL, 0x221db3a6UL, -0x9a69a02fUL, 0x68818a54UL, 0xceb2296fUL, 0x53c0843aUL, 0xfe893655UL, 0x25bfe68aUL, -0xb4628abcUL, 0xcf222ebfUL, 0x25ac6f48UL, 0xa9a99387UL, 0x53bddb65UL, 0xe76ffbe7UL, -0xe967fd78UL, 0x0ba93563UL, 0x8e342bc1UL, 0xe8a11be9UL, 0x4980740dUL, 0xc8087dfcUL, -0x8de4bf99UL, 0xa11101a0UL, 0x7fd37975UL, 0xda5a26c0UL, 0xe81f994fUL, 0x9528cd89UL, -0xfd339fedUL, 0xb87834bfUL, 0x5f04456dUL, 0x22258698UL, 0xc9c4c83bUL, 0x2dc156beUL, -0x4f628daaUL, 0x57f55ec5UL, 0xe2220abeUL, 0xd2916ebfUL, 0x4ec75b95UL, 0x24f2c3c0UL, -0x42d15d99UL, 0xcd0d7fa0UL, 0x7b6e27ffUL, 0xa8dc8af0UL, 0x7345c106UL, 0xf41e232fUL, -0x35162386UL, 0xe6ea8926UL, 0x3333b094UL, 0x157ec6f2UL, 0x372b74afUL, 0x692573e4UL, -0xe9a9d848UL, 0xf3160289UL, 0x3a62ef1dUL, 0xa787e238UL, 0xf3a5f676UL, 0x74364853UL, -0x20951063UL, 0x4576698dUL, 0xb6fad407UL, 0x592af950UL, 0x36f73523UL, 0x4cfb6e87UL, -0x7da4cec0UL, 0x6c152daaUL, 0xcb0396a8UL, 0xc50dfe5dUL, 0xfcd707abUL, 0x0921c42fUL, -0x89dff0bbUL, 0x5fe2be78UL, 0x448f4f33UL, 0x754613c9UL, 0x2b05d08dUL, 0x48b9d585UL, -0xdc049441UL, 0xc8098f9bUL, 0x7dede786UL, 0xc39a3373UL, 0x42410005UL, 0x6a091751UL, -0x0ef3c8a6UL, 0x890072d6UL, 0x28207682UL, 0xa9a9f7beUL, 0xbf32679dUL, 0xd45b5b75UL, -0xb353fd00UL, 0xcbb0e358UL, 0x830f220aUL, 0x1f8fb214UL, 0xd372cf08UL, 0xcc3c4a13UL, -0x8cf63166UL, 0x061c87beUL, 0x88c98f88UL, 0x6062e397UL, 0x47cf8e7aUL, 0xb6c85283UL, -0x3cc2acfbUL, 0x3fc06976UL, 0x4e8f0252UL, 0x64d8314dUL, 0xda3870e3UL, 0x1e665459UL, -0xc10908f0UL, 0x513021a5UL, 0x6c5b68b7UL, 0x822f8aa0UL, 0x3007cd3eUL, 0x74719eefUL, -0xdc872681UL, 0x073340d4UL, 0x7e432fd9UL, 0x0c5ec241UL, 0x8809286cUL, 0xf592d891UL, -0x08a930f6UL, 0x957ef305UL, 0xb7fbffbdUL, 0xc266e96fUL, 0x6fe4ac98UL, 0xb173ecc0UL, -0xbc60b42aUL, 0x953498daUL, 0xfba1ae12UL, 0x2d4bd736UL, 0x0f25faabUL, 0xa4f3fcebUL, -0xe2969123UL, 0x257f0c3dUL, 0x9348af49UL, 0x361400bcUL, 0xe8816f4aUL, 0x3814f200UL, -0xa3f94043UL, 0x9c7a54c2UL, 0xbc704f57UL, 0xda41e7f9UL, 0xc25ad33aUL, 0x54f4a084UL, -0xb17f5505UL, 0x59357cbeUL, 0xedbd15c8UL, 0x7f97c5abUL, 0xba5ac7b5UL, 0xb6f6deafUL, -0x3a479c3aUL, 0x5302da25UL, 0x653d7e6aUL, 0x54268d49UL, 0x51a477eaUL, 0x5017d55bUL, -0xd7d25d88UL, 0x44136c76UL, 0x0404a8c8UL, 0xb8e5a121UL, 0xb81a928aUL, 0x60ed5869UL, -0x97c55b96UL, 0xeaec991bUL, 0x29935913UL, 0x01fdb7f1UL, 0x088e8dfaUL, 0x9ab6f6f5UL, -0x3b4cbf9fUL, 0x4a5de3abUL, 0xe6051d35UL, 0xa0e1d855UL, 0xd36b4cf1UL, 0xf544edebUL, -0xb0e93524UL, 0xbebb8fbdUL, 0xa2d762cfUL, 0x49c92f54UL, 0x38b5f331UL, 0x7128a454UL, +0xf6fa8f9dUL, 0x2cac6ce1UL, 0x4ca34867UL, 0xe2337f7cUL, 0x95db08e7UL, 0x016843b4UL, +0xeced5cbcUL, 0x325553acUL, 0xbf9f0960UL, 0xdfa1e2edUL, 0x83f0579dUL, 0x63ed86b9UL, +0x1ab6a6b8UL, 0xde5ebe39UL, 0xf38ff732UL, 0x8989b138UL, 0x33f14961UL, 0xc01937bdUL, +0xf506c6daUL, 0xe4625e7eUL, 0xa308ea99UL, 0x4e23e33cUL, 0x79cbd7ccUL, 0x48a14367UL, +0xa3149619UL, 0xfec94bd5UL, 0xa114174aUL, 0xeaa01866UL, 0xa084db2dUL, 0x09a8486fUL, +0xa888614aUL, 0x2900af98UL, 0x01665991UL, 0xe1992863UL, 0xc8f30c60UL, 0x2e78ef3cUL, +0xd0d51932UL, 0xcf0fec14UL, 0xf7ca07d2UL, 0xd0a82072UL, 0xfd41197eUL, 0x9305a6b0UL, +0xe86be3daUL, 0x74bed3cdUL, 0x372da53cUL, 0x4c7f4448UL, 0xdab5d440UL, 0x6dba0ec3UL, +0x083919a7UL, 0x9fbaeed9UL, 0x49dbcfb0UL, 0x4e670c53UL, 0x5c3d9c01UL, 0x64bdb941UL, +0x2c0e636aUL, 0xba7dd9cdUL, 0xea6f7388UL, 0xe70bc762UL, 0x35f29adbUL, 0x5c4cdd8dUL, +0xf0d48d8cUL, 0xb88153e2UL, 0x08a19866UL, 0x1ae2eac8UL, 0x284caf89UL, 0xaa928223UL, +0x9334be53UL, 0x3b3a21bfUL, 0x16434be3UL, 0x9aea3906UL, 0xefe8c36eUL, 0xf890cdd9UL, +0x80226daeUL, 0xc340a4a3UL, 0xdf7e9c09UL, 0xa694a807UL, 0x5b7c5eccUL, 0x221db3a6UL, +0x9a69a02fUL, 0x68818a54UL, 0xceb2296fUL, 0x53c0843aUL, 0xfe893655UL, 0x25bfe68aUL, +0xb4628abcUL, 0xcf222ebfUL, 0x25ac6f48UL, 0xa9a99387UL, 0x53bddb65UL, 0xe76ffbe7UL, +0xe967fd78UL, 0x0ba93563UL, 0x8e342bc1UL, 0xe8a11be9UL, 0x4980740dUL, 0xc8087dfcUL, +0x8de4bf99UL, 0xa11101a0UL, 0x7fd37975UL, 0xda5a26c0UL, 0xe81f994fUL, 0x9528cd89UL, +0xfd339fedUL, 0xb87834bfUL, 0x5f04456dUL, 0x22258698UL, 0xc9c4c83bUL, 0x2dc156beUL, +0x4f628daaUL, 0x57f55ec5UL, 0xe2220abeUL, 0xd2916ebfUL, 0x4ec75b95UL, 0x24f2c3c0UL, +0x42d15d99UL, 0xcd0d7fa0UL, 0x7b6e27ffUL, 0xa8dc8af0UL, 0x7345c106UL, 0xf41e232fUL, +0x35162386UL, 0xe6ea8926UL, 0x3333b094UL, 0x157ec6f2UL, 0x372b74afUL, 0x692573e4UL, +0xe9a9d848UL, 0xf3160289UL, 0x3a62ef1dUL, 0xa787e238UL, 0xf3a5f676UL, 0x74364853UL, +0x20951063UL, 0x4576698dUL, 0xb6fad407UL, 0x592af950UL, 0x36f73523UL, 0x4cfb6e87UL, +0x7da4cec0UL, 0x6c152daaUL, 0xcb0396a8UL, 0xc50dfe5dUL, 0xfcd707abUL, 0x0921c42fUL, +0x89dff0bbUL, 0x5fe2be78UL, 0x448f4f33UL, 0x754613c9UL, 0x2b05d08dUL, 0x48b9d585UL, +0xdc049441UL, 0xc8098f9bUL, 0x7dede786UL, 0xc39a3373UL, 0x42410005UL, 0x6a091751UL, +0x0ef3c8a6UL, 0x890072d6UL, 0x28207682UL, 0xa9a9f7beUL, 0xbf32679dUL, 0xd45b5b75UL, +0xb353fd00UL, 0xcbb0e358UL, 0x830f220aUL, 0x1f8fb214UL, 0xd372cf08UL, 0xcc3c4a13UL, +0x8cf63166UL, 0x061c87beUL, 0x88c98f88UL, 0x6062e397UL, 0x47cf8e7aUL, 0xb6c85283UL, +0x3cc2acfbUL, 0x3fc06976UL, 0x4e8f0252UL, 0x64d8314dUL, 0xda3870e3UL, 0x1e665459UL, +0xc10908f0UL, 0x513021a5UL, 0x6c5b68b7UL, 0x822f8aa0UL, 0x3007cd3eUL, 0x74719eefUL, +0xdc872681UL, 0x073340d4UL, 0x7e432fd9UL, 0x0c5ec241UL, 0x8809286cUL, 0xf592d891UL, +0x08a930f6UL, 0x957ef305UL, 0xb7fbffbdUL, 0xc266e96fUL, 0x6fe4ac98UL, 0xb173ecc0UL, +0xbc60b42aUL, 0x953498daUL, 0xfba1ae12UL, 0x2d4bd736UL, 0x0f25faabUL, 0xa4f3fcebUL, +0xe2969123UL, 0x257f0c3dUL, 0x9348af49UL, 0x361400bcUL, 0xe8816f4aUL, 0x3814f200UL, +0xa3f94043UL, 0x9c7a54c2UL, 0xbc704f57UL, 0xda41e7f9UL, 0xc25ad33aUL, 0x54f4a084UL, +0xb17f5505UL, 0x59357cbeUL, 0xedbd15c8UL, 0x7f97c5abUL, 0xba5ac7b5UL, 0xb6f6deafUL, +0x3a479c3aUL, 0x5302da25UL, 0x653d7e6aUL, 0x54268d49UL, 0x51a477eaUL, 0x5017d55bUL, +0xd7d25d88UL, 0x44136c76UL, 0x0404a8c8UL, 0xb8e5a121UL, 0xb81a928aUL, 0x60ed5869UL, +0x97c55b96UL, 0xeaec991bUL, 0x29935913UL, 0x01fdb7f1UL, 0x088e8dfaUL, 0x9ab6f6f5UL, +0x3b4cbf9fUL, 0x4a5de3abUL, 0xe6051d35UL, 0xa0e1d855UL, 0xd36b4cf1UL, 0xf544edebUL, +0xb0e93524UL, 0xbebb8fbdUL, 0xa2d762cfUL, 0x49c92f54UL, 0x38b5f331UL, 0x7128a454UL, 0x48392905UL, 0xa65b1db8UL, 0x851c97bdUL, 0xd675cf2fUL}; static const ulong32 S7[256] = { -0x85e04019UL, 0x332bf567UL, 0x662dbfffUL, 0xcfc65693UL, 0x2a8d7f6fUL, 0xab9bc912UL, -0xde6008a1UL, 0x2028da1fUL, 0x0227bce7UL, 0x4d642916UL, 0x18fac300UL, 0x50f18b82UL, -0x2cb2cb11UL, 0xb232e75cUL, 0x4b3695f2UL, 0xb28707deUL, 0xa05fbcf6UL, 0xcd4181e9UL, -0xe150210cUL, 0xe24ef1bdUL, 0xb168c381UL, 0xfde4e789UL, 0x5c79b0d8UL, 0x1e8bfd43UL, -0x4d495001UL, 0x38be4341UL, 0x913cee1dUL, 0x92a79c3fUL, 0x089766beUL, 0xbaeeadf4UL, -0x1286becfUL, 0xb6eacb19UL, 0x2660c200UL, 0x7565bde4UL, 0x64241f7aUL, 0x8248dca9UL, -0xc3b3ad66UL, 0x28136086UL, 0x0bd8dfa8UL, 0x356d1cf2UL, 0x107789beUL, 0xb3b2e9ceUL, -0x0502aa8fUL, 0x0bc0351eUL, 0x166bf52aUL, 0xeb12ff82UL, 0xe3486911UL, 0xd34d7516UL, -0x4e7b3affUL, 0x5f43671bUL, 0x9cf6e037UL, 0x4981ac83UL, 0x334266ceUL, 0x8c9341b7UL, -0xd0d854c0UL, 0xcb3a6c88UL, 0x47bc2829UL, 0x4725ba37UL, 0xa66ad22bUL, 0x7ad61f1eUL, -0x0c5cbafaUL, 0x4437f107UL, 0xb6e79962UL, 0x42d2d816UL, 0x0a961288UL, 0xe1a5c06eUL, -0x13749e67UL, 0x72fc081aUL, 0xb1d139f7UL, 0xf9583745UL, 0xcf19df58UL, 0xbec3f756UL, -0xc06eba30UL, 0x07211b24UL, 0x45c28829UL, 0xc95e317fUL, 0xbc8ec511UL, 0x38bc46e9UL, -0xc6e6fa14UL, 0xbae8584aUL, 0xad4ebc46UL, 0x468f508bUL, 0x7829435fUL, 0xf124183bUL, -0x821dba9fUL, 0xaff60ff4UL, 0xea2c4e6dUL, 0x16e39264UL, 0x92544a8bUL, 0x009b4fc3UL, -0xaba68cedUL, 0x9ac96f78UL, 0x06a5b79aUL, 0xb2856e6eUL, 0x1aec3ca9UL, 0xbe838688UL, -0x0e0804e9UL, 0x55f1be56UL, 0xe7e5363bUL, 0xb3a1f25dUL, 0xf7debb85UL, 0x61fe033cUL, -0x16746233UL, 0x3c034c28UL, 0xda6d0c74UL, 0x79aac56cUL, 0x3ce4e1adUL, 0x51f0c802UL, -0x98f8f35aUL, 0x1626a49fUL, 0xeed82b29UL, 0x1d382fe3UL, 0x0c4fb99aUL, 0xbb325778UL, -0x3ec6d97bUL, 0x6e77a6a9UL, 0xcb658b5cUL, 0xd45230c7UL, 0x2bd1408bUL, 0x60c03eb7UL, -0xb9068d78UL, 0xa33754f4UL, 0xf430c87dUL, 0xc8a71302UL, 0xb96d8c32UL, 0xebd4e7beUL, -0xbe8b9d2dUL, 0x7979fb06UL, 0xe7225308UL, 0x8b75cf77UL, 0x11ef8da4UL, 0xe083c858UL, -0x8d6b786fUL, 0x5a6317a6UL, 0xfa5cf7a0UL, 0x5dda0033UL, 0xf28ebfb0UL, 0xf5b9c310UL, -0xa0eac280UL, 0x08b9767aUL, 0xa3d9d2b0UL, 0x79d34217UL, 0x021a718dUL, 0x9ac6336aUL, -0x2711fd60UL, 0x438050e3UL, 0x069908a8UL, 0x3d7fedc4UL, 0x826d2befUL, 0x4eeb8476UL, -0x488dcf25UL, 0x36c9d566UL, 0x28e74e41UL, 0xc2610acaUL, 0x3d49a9cfUL, 0xbae3b9dfUL, -0xb65f8de6UL, 0x92aeaf64UL, 0x3ac7d5e6UL, 0x9ea80509UL, 0xf22b017dUL, 0xa4173f70UL, -0xdd1e16c3UL, 0x15e0d7f9UL, 0x50b1b887UL, 0x2b9f4fd5UL, 0x625aba82UL, 0x6a017962UL, -0x2ec01b9cUL, 0x15488aa9UL, 0xd716e740UL, 0x40055a2cUL, 0x93d29a22UL, 0xe32dbf9aUL, -0x058745b9UL, 0x3453dc1eUL, 0xd699296eUL, 0x496cff6fUL, 0x1c9f4986UL, 0xdfe2ed07UL, -0xb87242d1UL, 0x19de7eaeUL, 0x053e561aUL, 0x15ad6f8cUL, 0x66626c1cUL, 0x7154c24cUL, -0xea082b2aUL, 0x93eb2939UL, 0x17dcb0f0UL, 0x58d4f2aeUL, 0x9ea294fbUL, 0x52cf564cUL, -0x9883fe66UL, 0x2ec40581UL, 0x763953c3UL, 0x01d6692eUL, 0xd3a0c108UL, 0xa1e7160eUL, -0xe4f2dfa6UL, 0x693ed285UL, 0x74904698UL, 0x4c2b0eddUL, 0x4f757656UL, 0x5d393378UL, -0xa132234fUL, 0x3d321c5dUL, 0xc3f5e194UL, 0x4b269301UL, 0xc79f022fUL, 0x3c997e7eUL, -0x5e4f9504UL, 0x3ffafbbdUL, 0x76f7ad0eUL, 0x296693f4UL, 0x3d1fce6fUL, 0xc61e45beUL, -0xd3b5ab34UL, 0xf72bf9b7UL, 0x1b0434c0UL, 0x4e72b567UL, 0x5592a33dUL, 0xb5229301UL, -0xcfd2a87fUL, 0x60aeb767UL, 0x1814386bUL, 0x30bcc33dUL, 0x38a0c07dUL, 0xfd1606f2UL, -0xc363519bUL, 0x589dd390UL, 0x5479f8e6UL, 0x1cb8d647UL, 0x97fd61a9UL, 0xea7759f4UL, -0x2d57539dUL, 0x569a58cfUL, 0xe84e63adUL, 0x462e1b78UL, 0x6580f87eUL, 0xf3817914UL, -0x91da55f4UL, 0x40a230f3UL, 0xd1988f35UL, 0xb6e318d2UL, 0x3ffa50bcUL, 0x3d40f021UL, -0xc3c0bdaeUL, 0x4958c24cUL, 0x518f36b2UL, 0x84b1d370UL, 0x0fedce83UL, 0x878ddadaUL, +0x85e04019UL, 0x332bf567UL, 0x662dbfffUL, 0xcfc65693UL, 0x2a8d7f6fUL, 0xab9bc912UL, +0xde6008a1UL, 0x2028da1fUL, 0x0227bce7UL, 0x4d642916UL, 0x18fac300UL, 0x50f18b82UL, +0x2cb2cb11UL, 0xb232e75cUL, 0x4b3695f2UL, 0xb28707deUL, 0xa05fbcf6UL, 0xcd4181e9UL, +0xe150210cUL, 0xe24ef1bdUL, 0xb168c381UL, 0xfde4e789UL, 0x5c79b0d8UL, 0x1e8bfd43UL, +0x4d495001UL, 0x38be4341UL, 0x913cee1dUL, 0x92a79c3fUL, 0x089766beUL, 0xbaeeadf4UL, +0x1286becfUL, 0xb6eacb19UL, 0x2660c200UL, 0x7565bde4UL, 0x64241f7aUL, 0x8248dca9UL, +0xc3b3ad66UL, 0x28136086UL, 0x0bd8dfa8UL, 0x356d1cf2UL, 0x107789beUL, 0xb3b2e9ceUL, +0x0502aa8fUL, 0x0bc0351eUL, 0x166bf52aUL, 0xeb12ff82UL, 0xe3486911UL, 0xd34d7516UL, +0x4e7b3affUL, 0x5f43671bUL, 0x9cf6e037UL, 0x4981ac83UL, 0x334266ceUL, 0x8c9341b7UL, +0xd0d854c0UL, 0xcb3a6c88UL, 0x47bc2829UL, 0x4725ba37UL, 0xa66ad22bUL, 0x7ad61f1eUL, +0x0c5cbafaUL, 0x4437f107UL, 0xb6e79962UL, 0x42d2d816UL, 0x0a961288UL, 0xe1a5c06eUL, +0x13749e67UL, 0x72fc081aUL, 0xb1d139f7UL, 0xf9583745UL, 0xcf19df58UL, 0xbec3f756UL, +0xc06eba30UL, 0x07211b24UL, 0x45c28829UL, 0xc95e317fUL, 0xbc8ec511UL, 0x38bc46e9UL, +0xc6e6fa14UL, 0xbae8584aUL, 0xad4ebc46UL, 0x468f508bUL, 0x7829435fUL, 0xf124183bUL, +0x821dba9fUL, 0xaff60ff4UL, 0xea2c4e6dUL, 0x16e39264UL, 0x92544a8bUL, 0x009b4fc3UL, +0xaba68cedUL, 0x9ac96f78UL, 0x06a5b79aUL, 0xb2856e6eUL, 0x1aec3ca9UL, 0xbe838688UL, +0x0e0804e9UL, 0x55f1be56UL, 0xe7e5363bUL, 0xb3a1f25dUL, 0xf7debb85UL, 0x61fe033cUL, +0x16746233UL, 0x3c034c28UL, 0xda6d0c74UL, 0x79aac56cUL, 0x3ce4e1adUL, 0x51f0c802UL, +0x98f8f35aUL, 0x1626a49fUL, 0xeed82b29UL, 0x1d382fe3UL, 0x0c4fb99aUL, 0xbb325778UL, +0x3ec6d97bUL, 0x6e77a6a9UL, 0xcb658b5cUL, 0xd45230c7UL, 0x2bd1408bUL, 0x60c03eb7UL, +0xb9068d78UL, 0xa33754f4UL, 0xf430c87dUL, 0xc8a71302UL, 0xb96d8c32UL, 0xebd4e7beUL, +0xbe8b9d2dUL, 0x7979fb06UL, 0xe7225308UL, 0x8b75cf77UL, 0x11ef8da4UL, 0xe083c858UL, +0x8d6b786fUL, 0x5a6317a6UL, 0xfa5cf7a0UL, 0x5dda0033UL, 0xf28ebfb0UL, 0xf5b9c310UL, +0xa0eac280UL, 0x08b9767aUL, 0xa3d9d2b0UL, 0x79d34217UL, 0x021a718dUL, 0x9ac6336aUL, +0x2711fd60UL, 0x438050e3UL, 0x069908a8UL, 0x3d7fedc4UL, 0x826d2befUL, 0x4eeb8476UL, +0x488dcf25UL, 0x36c9d566UL, 0x28e74e41UL, 0xc2610acaUL, 0x3d49a9cfUL, 0xbae3b9dfUL, +0xb65f8de6UL, 0x92aeaf64UL, 0x3ac7d5e6UL, 0x9ea80509UL, 0xf22b017dUL, 0xa4173f70UL, +0xdd1e16c3UL, 0x15e0d7f9UL, 0x50b1b887UL, 0x2b9f4fd5UL, 0x625aba82UL, 0x6a017962UL, +0x2ec01b9cUL, 0x15488aa9UL, 0xd716e740UL, 0x40055a2cUL, 0x93d29a22UL, 0xe32dbf9aUL, +0x058745b9UL, 0x3453dc1eUL, 0xd699296eUL, 0x496cff6fUL, 0x1c9f4986UL, 0xdfe2ed07UL, +0xb87242d1UL, 0x19de7eaeUL, 0x053e561aUL, 0x15ad6f8cUL, 0x66626c1cUL, 0x7154c24cUL, +0xea082b2aUL, 0x93eb2939UL, 0x17dcb0f0UL, 0x58d4f2aeUL, 0x9ea294fbUL, 0x52cf564cUL, +0x9883fe66UL, 0x2ec40581UL, 0x763953c3UL, 0x01d6692eUL, 0xd3a0c108UL, 0xa1e7160eUL, +0xe4f2dfa6UL, 0x693ed285UL, 0x74904698UL, 0x4c2b0eddUL, 0x4f757656UL, 0x5d393378UL, +0xa132234fUL, 0x3d321c5dUL, 0xc3f5e194UL, 0x4b269301UL, 0xc79f022fUL, 0x3c997e7eUL, +0x5e4f9504UL, 0x3ffafbbdUL, 0x76f7ad0eUL, 0x296693f4UL, 0x3d1fce6fUL, 0xc61e45beUL, +0xd3b5ab34UL, 0xf72bf9b7UL, 0x1b0434c0UL, 0x4e72b567UL, 0x5592a33dUL, 0xb5229301UL, +0xcfd2a87fUL, 0x60aeb767UL, 0x1814386bUL, 0x30bcc33dUL, 0x38a0c07dUL, 0xfd1606f2UL, +0xc363519bUL, 0x589dd390UL, 0x5479f8e6UL, 0x1cb8d647UL, 0x97fd61a9UL, 0xea7759f4UL, +0x2d57539dUL, 0x569a58cfUL, 0xe84e63adUL, 0x462e1b78UL, 0x6580f87eUL, 0xf3817914UL, +0x91da55f4UL, 0x40a230f3UL, 0xd1988f35UL, 0xb6e318d2UL, 0x3ffa50bcUL, 0x3d40f021UL, +0xc3c0bdaeUL, 0x4958c24cUL, 0x518f36b2UL, 0x84b1d370UL, 0x0fedce83UL, 0x878ddadaUL, 0xf2a279c7UL, 0x94e01be8UL, 0x90716f4bUL, 0x954b8aa3UL}; static const ulong32 S8[256] = { -0xe216300dUL, 0xbbddfffcUL, 0xa7ebdabdUL, 0x35648095UL, 0x7789f8b7UL, 0xe6c1121bUL, -0x0e241600UL, 0x052ce8b5UL, 0x11a9cfb0UL, 0xe5952f11UL, 0xece7990aUL, 0x9386d174UL, -0x2a42931cUL, 0x76e38111UL, 0xb12def3aUL, 0x37ddddfcUL, 0xde9adeb1UL, 0x0a0cc32cUL, -0xbe197029UL, 0x84a00940UL, 0xbb243a0fUL, 0xb4d137cfUL, 0xb44e79f0UL, 0x049eedfdUL, -0x0b15a15dUL, 0x480d3168UL, 0x8bbbde5aUL, 0x669ded42UL, 0xc7ece831UL, 0x3f8f95e7UL, -0x72df191bUL, 0x7580330dUL, 0x94074251UL, 0x5c7dcdfaUL, 0xabbe6d63UL, 0xaa402164UL, -0xb301d40aUL, 0x02e7d1caUL, 0x53571daeUL, 0x7a3182a2UL, 0x12a8ddecUL, 0xfdaa335dUL, -0x176f43e8UL, 0x71fb46d4UL, 0x38129022UL, 0xce949ad4UL, 0xb84769adUL, 0x965bd862UL, -0x82f3d055UL, 0x66fb9767UL, 0x15b80b4eUL, 0x1d5b47a0UL, 0x4cfde06fUL, 0xc28ec4b8UL, -0x57e8726eUL, 0x647a78fcUL, 0x99865d44UL, 0x608bd593UL, 0x6c200e03UL, 0x39dc5ff6UL, -0x5d0b00a3UL, 0xae63aff2UL, 0x7e8bd632UL, 0x70108c0cUL, 0xbbd35049UL, 0x2998df04UL, -0x980cf42aUL, 0x9b6df491UL, 0x9e7edd53UL, 0x06918548UL, 0x58cb7e07UL, 0x3b74ef2eUL, -0x522fffb1UL, 0xd24708ccUL, 0x1c7e27cdUL, 0xa4eb215bUL, 0x3cf1d2e2UL, 0x19b47a38UL, -0x424f7618UL, 0x35856039UL, 0x9d17dee7UL, 0x27eb35e6UL, 0xc9aff67bUL, 0x36baf5b8UL, -0x09c467cdUL, 0xc18910b1UL, 0xe11dbf7bUL, 0x06cd1af8UL, 0x7170c608UL, 0x2d5e3354UL, -0xd4de495aUL, 0x64c6d006UL, 0xbcc0c62cUL, 0x3dd00db3UL, 0x708f8f34UL, 0x77d51b42UL, -0x264f620fUL, 0x24b8d2bfUL, 0x15c1b79eUL, 0x46a52564UL, 0xf8d7e54eUL, 0x3e378160UL, -0x7895cda5UL, 0x859c15a5UL, 0xe6459788UL, 0xc37bc75fUL, 0xdb07ba0cUL, 0x0676a3abUL, -0x7f229b1eUL, 0x31842e7bUL, 0x24259fd7UL, 0xf8bef472UL, 0x835ffcb8UL, 0x6df4c1f2UL, -0x96f5b195UL, 0xfd0af0fcUL, 0xb0fe134cUL, 0xe2506d3dUL, 0x4f9b12eaUL, 0xf215f225UL, -0xa223736fUL, 0x9fb4c428UL, 0x25d04979UL, 0x34c713f8UL, 0xc4618187UL, 0xea7a6e98UL, -0x7cd16efcUL, 0x1436876cUL, 0xf1544107UL, 0xbedeee14UL, 0x56e9af27UL, 0xa04aa441UL, -0x3cf7c899UL, 0x92ecbae6UL, 0xdd67016dUL, 0x151682ebUL, 0xa842eedfUL, 0xfdba60b4UL, -0xf1907b75UL, 0x20e3030fUL, 0x24d8c29eUL, 0xe139673bUL, 0xefa63fb8UL, 0x71873054UL, -0xb6f2cf3bUL, 0x9f326442UL, 0xcb15a4ccUL, 0xb01a4504UL, 0xf1e47d8dUL, 0x844a1be5UL, -0xbae7dfdcUL, 0x42cbda70UL, 0xcd7dae0aUL, 0x57e85b7aUL, 0xd53f5af6UL, 0x20cf4d8cUL, -0xcea4d428UL, 0x79d130a4UL, 0x3486ebfbUL, 0x33d3cddcUL, 0x77853b53UL, 0x37effcb5UL, -0xc5068778UL, 0xe580b3e6UL, 0x4e68b8f4UL, 0xc5c8b37eUL, 0x0d809ea2UL, 0x398feb7cUL, -0x132a4f94UL, 0x43b7950eUL, 0x2fee7d1cUL, 0x223613bdUL, 0xdd06caa2UL, 0x37df932bUL, -0xc4248289UL, 0xacf3ebc3UL, 0x5715f6b7UL, 0xef3478ddUL, 0xf267616fUL, 0xc148cbe4UL, -0x9052815eUL, 0x5e410fabUL, 0xb48a2465UL, 0x2eda7fa4UL, 0xe87b40e4UL, 0xe98ea084UL, -0x5889e9e1UL, 0xefd390fcUL, 0xdd07d35bUL, 0xdb485694UL, 0x38d7e5b2UL, 0x57720101UL, -0x730edebcUL, 0x5b643113UL, 0x94917e4fUL, 0x503c2fbaUL, 0x646f1282UL, 0x7523d24aUL, -0xe0779695UL, 0xf9c17a8fUL, 0x7a5b2121UL, 0xd187b896UL, 0x29263a4dUL, 0xba510cdfUL, -0x81f47c9fUL, 0xad1163edUL, 0xea7b5965UL, 0x1a00726eUL, 0x11403092UL, 0x00da6d77UL, -0x4a0cdd61UL, 0xad1f4603UL, 0x605bdfb0UL, 0x9eedc364UL, 0x22ebe6a8UL, 0xcee7d28aUL, -0xa0e736a0UL, 0x5564a6b9UL, 0x10853209UL, 0xc7eb8f37UL, 0x2de705caUL, 0x8951570fUL, -0xdf09822bUL, 0xbd691a6cUL, 0xaa12e4f2UL, 0x87451c0fUL, 0xe0f6a27aUL, 0x3ada4819UL, -0x4cf1764fUL, 0x0d771c2bUL, 0x67cdb156UL, 0x350d8384UL, 0x5938fa0fUL, 0x42399ef3UL, -0x36997b07UL, 0x0e84093dUL, 0x4aa93e61UL, 0x8360d87bUL, 0x1fa98b0cUL, 0x1149382cUL, -0xe97625a5UL, 0x0614d1b7UL, 0x0e25244bUL, 0x0c768347UL, 0x589e8d82UL, 0x0d2059d1UL, -0xa466bb1eUL, 0xf8da0a82UL, 0x04f19130UL, 0xba6e4ec0UL, 0x99265164UL, 0x1ee7230dUL, +0xe216300dUL, 0xbbddfffcUL, 0xa7ebdabdUL, 0x35648095UL, 0x7789f8b7UL, 0xe6c1121bUL, +0x0e241600UL, 0x052ce8b5UL, 0x11a9cfb0UL, 0xe5952f11UL, 0xece7990aUL, 0x9386d174UL, +0x2a42931cUL, 0x76e38111UL, 0xb12def3aUL, 0x37ddddfcUL, 0xde9adeb1UL, 0x0a0cc32cUL, +0xbe197029UL, 0x84a00940UL, 0xbb243a0fUL, 0xb4d137cfUL, 0xb44e79f0UL, 0x049eedfdUL, +0x0b15a15dUL, 0x480d3168UL, 0x8bbbde5aUL, 0x669ded42UL, 0xc7ece831UL, 0x3f8f95e7UL, +0x72df191bUL, 0x7580330dUL, 0x94074251UL, 0x5c7dcdfaUL, 0xabbe6d63UL, 0xaa402164UL, +0xb301d40aUL, 0x02e7d1caUL, 0x53571daeUL, 0x7a3182a2UL, 0x12a8ddecUL, 0xfdaa335dUL, +0x176f43e8UL, 0x71fb46d4UL, 0x38129022UL, 0xce949ad4UL, 0xb84769adUL, 0x965bd862UL, +0x82f3d055UL, 0x66fb9767UL, 0x15b80b4eUL, 0x1d5b47a0UL, 0x4cfde06fUL, 0xc28ec4b8UL, +0x57e8726eUL, 0x647a78fcUL, 0x99865d44UL, 0x608bd593UL, 0x6c200e03UL, 0x39dc5ff6UL, +0x5d0b00a3UL, 0xae63aff2UL, 0x7e8bd632UL, 0x70108c0cUL, 0xbbd35049UL, 0x2998df04UL, +0x980cf42aUL, 0x9b6df491UL, 0x9e7edd53UL, 0x06918548UL, 0x58cb7e07UL, 0x3b74ef2eUL, +0x522fffb1UL, 0xd24708ccUL, 0x1c7e27cdUL, 0xa4eb215bUL, 0x3cf1d2e2UL, 0x19b47a38UL, +0x424f7618UL, 0x35856039UL, 0x9d17dee7UL, 0x27eb35e6UL, 0xc9aff67bUL, 0x36baf5b8UL, +0x09c467cdUL, 0xc18910b1UL, 0xe11dbf7bUL, 0x06cd1af8UL, 0x7170c608UL, 0x2d5e3354UL, +0xd4de495aUL, 0x64c6d006UL, 0xbcc0c62cUL, 0x3dd00db3UL, 0x708f8f34UL, 0x77d51b42UL, +0x264f620fUL, 0x24b8d2bfUL, 0x15c1b79eUL, 0x46a52564UL, 0xf8d7e54eUL, 0x3e378160UL, +0x7895cda5UL, 0x859c15a5UL, 0xe6459788UL, 0xc37bc75fUL, 0xdb07ba0cUL, 0x0676a3abUL, +0x7f229b1eUL, 0x31842e7bUL, 0x24259fd7UL, 0xf8bef472UL, 0x835ffcb8UL, 0x6df4c1f2UL, +0x96f5b195UL, 0xfd0af0fcUL, 0xb0fe134cUL, 0xe2506d3dUL, 0x4f9b12eaUL, 0xf215f225UL, +0xa223736fUL, 0x9fb4c428UL, 0x25d04979UL, 0x34c713f8UL, 0xc4618187UL, 0xea7a6e98UL, +0x7cd16efcUL, 0x1436876cUL, 0xf1544107UL, 0xbedeee14UL, 0x56e9af27UL, 0xa04aa441UL, +0x3cf7c899UL, 0x92ecbae6UL, 0xdd67016dUL, 0x151682ebUL, 0xa842eedfUL, 0xfdba60b4UL, +0xf1907b75UL, 0x20e3030fUL, 0x24d8c29eUL, 0xe139673bUL, 0xefa63fb8UL, 0x71873054UL, +0xb6f2cf3bUL, 0x9f326442UL, 0xcb15a4ccUL, 0xb01a4504UL, 0xf1e47d8dUL, 0x844a1be5UL, +0xbae7dfdcUL, 0x42cbda70UL, 0xcd7dae0aUL, 0x57e85b7aUL, 0xd53f5af6UL, 0x20cf4d8cUL, +0xcea4d428UL, 0x79d130a4UL, 0x3486ebfbUL, 0x33d3cddcUL, 0x77853b53UL, 0x37effcb5UL, +0xc5068778UL, 0xe580b3e6UL, 0x4e68b8f4UL, 0xc5c8b37eUL, 0x0d809ea2UL, 0x398feb7cUL, +0x132a4f94UL, 0x43b7950eUL, 0x2fee7d1cUL, 0x223613bdUL, 0xdd06caa2UL, 0x37df932bUL, +0xc4248289UL, 0xacf3ebc3UL, 0x5715f6b7UL, 0xef3478ddUL, 0xf267616fUL, 0xc148cbe4UL, +0x9052815eUL, 0x5e410fabUL, 0xb48a2465UL, 0x2eda7fa4UL, 0xe87b40e4UL, 0xe98ea084UL, +0x5889e9e1UL, 0xefd390fcUL, 0xdd07d35bUL, 0xdb485694UL, 0x38d7e5b2UL, 0x57720101UL, +0x730edebcUL, 0x5b643113UL, 0x94917e4fUL, 0x503c2fbaUL, 0x646f1282UL, 0x7523d24aUL, +0xe0779695UL, 0xf9c17a8fUL, 0x7a5b2121UL, 0xd187b896UL, 0x29263a4dUL, 0xba510cdfUL, +0x81f47c9fUL, 0xad1163edUL, 0xea7b5965UL, 0x1a00726eUL, 0x11403092UL, 0x00da6d77UL, +0x4a0cdd61UL, 0xad1f4603UL, 0x605bdfb0UL, 0x9eedc364UL, 0x22ebe6a8UL, 0xcee7d28aUL, +0xa0e736a0UL, 0x5564a6b9UL, 0x10853209UL, 0xc7eb8f37UL, 0x2de705caUL, 0x8951570fUL, +0xdf09822bUL, 0xbd691a6cUL, 0xaa12e4f2UL, 0x87451c0fUL, 0xe0f6a27aUL, 0x3ada4819UL, +0x4cf1764fUL, 0x0d771c2bUL, 0x67cdb156UL, 0x350d8384UL, 0x5938fa0fUL, 0x42399ef3UL, +0x36997b07UL, 0x0e84093dUL, 0x4aa93e61UL, 0x8360d87bUL, 0x1fa98b0cUL, 0x1149382cUL, +0xe97625a5UL, 0x0614d1b7UL, 0x0e25244bUL, 0x0c768347UL, 0x589e8d82UL, 0x0d2059d1UL, +0xa466bb1eUL, 0xf8da0a82UL, 0x04f19130UL, 0xba6e4ec0UL, 0x99265164UL, 0x1ee7230dUL, 0x50b2ad80UL, 0xeaee6801UL, 0x8db2a283UL, 0xea8bf59eUL}; /* returns the i'th byte of a variable */ #ifdef _MSC_VER #define GB(x, i) ((unsigned char)((x[(15-i)>>2])>>(unsigned)(8*((15-i)&3)))) -#else +#else #define GB(x, i) (((x[(15-i)>>2])>>(unsigned)(8*((15-i)&3)))&255) -#endif +#endif /** Initialize the LTC_CAST5 block cipher @@ -419,9 +417,9 @@ LTC_ARGCHK(skey != NULL); if (num_rounds != 12 && num_rounds != 16 && num_rounds != 0) { - return CRYPT_INVALID_ROUNDS; + return CRYPT_INVALID_ROUNDS; } - + if (num_rounds == 12 && keylen > 10) { return CRYPT_INVALID_ROUNDS; } @@ -484,7 +482,7 @@ zeromem(buf, sizeof(buf)); zeromem(x, sizeof(x)); zeromem(z, sizeof(z)); -#endif +#endif return CRYPT_OK; } @@ -502,9 +500,9 @@ #ifdef _MSC_VER #define INLINE __inline #else - #define INLINE -#endif - + #define INLINE +#endif + INLINE static ulong32 FI(ulong32 R, ulong32 Km, ulong32 Kr) { ulong32 I; @@ -512,7 +510,7 @@ I = ROL(I, Kr); return ((S1[byte(I, 3)] ^ S2[byte(I,2)]) - S3[byte(I,1)]) + S4[byte(I,0)]; } - + INLINE static ulong32 FII(ulong32 R, ulong32 Km, ulong32 Kr) { ulong32 I; @@ -547,7 +545,7 @@ LTC_ARGCHK(ct != NULL); LTC_ARGCHK(skey != NULL); - LOAD32H(L,&pt[0]); + LOAD32H(L,&pt[0]); LOAD32H(R,&pt[4]); L ^= FI(R, skey->cast5.K[0], skey->cast5.K[16]); R ^= FII(L, skey->cast5.K[1], skey->cast5.K[17]); @@ -586,7 +584,7 @@ Decrypts a block of text with LTC_CAST5 @param ct The input ciphertext (8 bytes) @param pt The output plaintext (8 bytes) - @param skey The key as scheduled + @param skey The key as scheduled */ #ifdef LTC_CLEAN_STACK static int _cast5_ecb_decrypt(const unsigned char *ct, unsigned char *pt, symmetric_key *skey) @@ -600,7 +598,7 @@ LTC_ARGCHK(ct != NULL); LTC_ARGCHK(skey != NULL); - LOAD32H(R,&ct[0]); + LOAD32H(R,&ct[0]); LOAD32H(L,&ct[4]); if (skey->cast5.keylen > 10) { R ^= FI(L, skey->cast5.K[15], skey->cast5.K[31]); @@ -643,7 +641,7 @@ { #ifndef LTC_TEST return CRYPT_NOP; - #else + #else static const struct { int keylen; unsigned char key[16]; @@ -676,7 +674,8 @@ } cast5_ecb_encrypt(tests[i].pt, tmp[0], &key); cast5_ecb_decrypt(tmp[0], tmp[1], &key); - if ((XMEMCMP(tmp[0], tests[i].ct, 8) != 0) || (XMEMCMP(tmp[1], tests[i].pt, 8) != 0)) { + if ((compare_testvector(tmp[0], 8, tests[i].ct, 8, "CAST5 Encrypt", i) != 0) || + (compare_testvector(tmp[1], 8, tests[i].pt, 8, "CAST5 Decrypt", i) != 0)) { return CRYPT_FAIL_TESTVECTOR; } /* now see if we can encrypt all zero bytes 1000 times, decrypt and come back where we started */ @@ -684,17 +683,18 @@ for (y = 0; y < 1000; y++) cast5_ecb_encrypt(tmp[0], tmp[0], &key); for (y = 0; y < 1000; y++) cast5_ecb_decrypt(tmp[0], tmp[0], &key); for (y = 0; y < 8; y++) if (tmp[0][y] != 0) return CRYPT_FAIL_TESTVECTOR; - + } return CRYPT_OK; #endif } -/** Terminate the context +/** Terminate the context @param skey The scheduled key */ void cast5_done(symmetric_key *skey) { + LTC_UNUSED_PARAM(skey); } /** @@ -711,10 +711,10 @@ *keysize = 16; } return CRYPT_OK; -} +} #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/des.c --- a/libtomcrypt/src/ciphers/des.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/ciphers/des.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,14 +5,12 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file des.c - LTC_DES code submitted by Dobes Vandermeer + DES code submitted by Dobes Vandermeer */ #ifdef LTC_DES @@ -32,7 +30,7 @@ &des_test, &des_done, &des_keysize, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; #endif @@ -47,7 +45,7 @@ &des3_test, &des3_done, &des3_keysize, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; static const ulong32 bytebit[8] = @@ -1387,7 +1385,7 @@ *cook++ |= (*raw1 & 0x0000003fL); } - XMEMCPY(keyout, dough, sizeof dough); + XMEMCPY(keyout, dough, sizeof(dough)); } #ifdef LTC_CLEAN_STACK @@ -1566,17 +1564,27 @@ return CRYPT_INVALID_ROUNDS; } - if (keylen != 24) { + if (keylen != 24 && keylen != 16) { return CRYPT_INVALID_KEYSIZE; } deskey(key, EN0, skey->des3.ek[0]); deskey(key+8, DE1, skey->des3.ek[1]); + if (keylen == 24) { deskey(key+16, EN0, skey->des3.ek[2]); + } else { + /* two-key 3DES: K3=K1 */ + deskey(key, EN0, skey->des3.ek[2]); + } deskey(key, DE1, skey->des3.dk[2]); deskey(key+8, EN0, skey->des3.dk[1]); + if (keylen == 24) { deskey(key+16, DE1, skey->des3.dk[0]); + } else { + /* two-key 3DES: K3=K1 */ + deskey(key, DE1, skey->des3.dk[0]); + } return CRYPT_OK; } @@ -1747,7 +1755,178 @@ { 0x0D, 0x9F, 0x27, 0x9B, 0xA5, 0xD8, 0x72, 0x60 } }, {10, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }, { 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0xD9, 0x03, 0x1B, 0x02, 0x71, 0xBD, 0x5A, 0x0A } } + { 0xD9, 0x03, 0x1B, 0x02, 0x71, 0xBD, 0x5A, 0x0A } }, + +#ifdef LTC_TEST_EXT + { 0+11, 0, { 0x80, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x95, 0xA8, 0xD7, 0x28, 0x13, 0xDA, 0xA9, 0x4D } }, + { 1+11, 0, { 0x40, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x0E, 0xEC, 0x14, 0x87, 0xDD, 0x8C, 0x26, 0xD5 } }, + { 2+11, 0, { 0x20, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x7A, 0xD1, 0x6F, 0xFB, 0x79, 0xC4, 0x59, 0x26 } }, + { 3+11, 0, { 0x10, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xD3, 0x74, 0x62, 0x94, 0xCA, 0x6A, 0x6C, 0xF3 } }, + { 4+11, 0, { 0x08, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x80, 0x9F, 0x5F, 0x87, 0x3C, 0x1F, 0xD7, 0x61 } }, + { 5+11, 0, { 0x04, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xC0, 0x2F, 0xAF, 0xFE, 0xC9, 0x89, 0xD1, 0xFC } }, + { 6+11, 0, { 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x46, 0x15, 0xAA, 0x1D, 0x33, 0xE7, 0x2F, 0x10 } }, + { 7+11, 0, { 0x01, 0x80, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x20, 0x55, 0x12, 0x33, 0x50, 0xC0, 0x08, 0x58 } }, + { 8+11, 0, { 0x01, 0x40, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xDF, 0x3B, 0x99, 0xD6, 0x57, 0x73, 0x97, 0xC8 } }, + { 9+11, 0, { 0x01, 0x20, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x31, 0xFE, 0x17, 0x36, 0x9B, 0x52, 0x88, 0xC9 } }, + {10+11, 0, { 0x01, 0x10, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xDF, 0xDD, 0x3C, 0xC6, 0x4D, 0xAE, 0x16, 0x42 } }, + {11+11, 0, { 0x01, 0x08, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x17, 0x8C, 0x83, 0xCE, 0x2B, 0x39, 0x9D, 0x94 } }, + {12+11, 0, { 0x01, 0x04, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x50, 0xF6, 0x36, 0x32, 0x4A, 0x9B, 0x7F, 0x80 } }, + {13+11, 0, { 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xA8, 0x46, 0x8E, 0xE3, 0xBC, 0x18, 0xF0, 0x6D } }, + {14+11, 0, { 0x01, 0x01, 0x80, 0x01, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xA2, 0xDC, 0x9E, 0x92, 0xFD, 0x3C, 0xDE, 0x92 } }, + {15+11, 0, { 0x01, 0x01, 0x40, 0x01, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xCA, 0xC0, 0x9F, 0x79, 0x7D, 0x03, 0x12, 0x87 } }, + {16+11, 0, { 0x01, 0x01, 0x20, 0x01, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x90, 0xBA, 0x68, 0x0B, 0x22, 0xAE, 0xB5, 0x25 } }, + {17+11, 0, { 0x01, 0x01, 0x10, 0x01, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xCE, 0x7A, 0x24, 0xF3, 0x50, 0xE2, 0x80, 0xB6 } }, + {18+11, 0, { 0x01, 0x01, 0x08, 0x01, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x88, 0x2B, 0xFF, 0x0A, 0xA0, 0x1A, 0x0B, 0x87 } }, + {19+11, 0, { 0x01, 0x01, 0x04, 0x01, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x25, 0x61, 0x02, 0x88, 0x92, 0x45, 0x11, 0xC2 } }, + {20+11, 0, { 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xC7, 0x15, 0x16, 0xC2, 0x9C, 0x75, 0xD1, 0x70 } }, + {21+11, 0, { 0x01, 0x01, 0x01, 0x80, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x51, 0x99, 0xC2, 0x9A, 0x52, 0xC9, 0xF0, 0x59 } }, + {22+11, 0, { 0x01, 0x01, 0x01, 0x40, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xC2, 0x2F, 0x0A, 0x29, 0x4A, 0x71, 0xF2, 0x9F } }, + {23+11, 0, { 0x01, 0x01, 0x01, 0x20, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xEE, 0x37, 0x14, 0x83, 0x71, 0x4C, 0x02, 0xEA } }, + {24+11, 0, { 0x01, 0x01, 0x01, 0x10, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xA8, 0x1F, 0xBD, 0x44, 0x8F, 0x9E, 0x52, 0x2F } }, + {25+11, 0, { 0x01, 0x01, 0x01, 0x08, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x4F, 0x64, 0x4C, 0x92, 0xE1, 0x92, 0xDF, 0xED } }, + {26+11, 0, { 0x01, 0x01, 0x01, 0x04, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x1A, 0xFA, 0x9A, 0x66, 0xA6, 0xDF, 0x92, 0xAE } }, + {27+11, 0, { 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xB3, 0xC1, 0xCC, 0x71, 0x5C, 0xB8, 0x79, 0xD8 } }, + {28+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x80, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x19, 0xD0, 0x32, 0xE6, 0x4A, 0xB0, 0xBD, 0x8B } }, + {29+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x40, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x3C, 0xFA, 0xA7, 0xA7, 0xDC, 0x87, 0x20, 0xDC } }, + {30+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x20, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xB7, 0x26, 0x5F, 0x7F, 0x44, 0x7A, 0xC6, 0xF3 } }, + {31+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x10, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x9D, 0xB7, 0x3B, 0x3C, 0x0D, 0x16, 0x3F, 0x54 } }, + {32+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x08, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x81, 0x81, 0xB6, 0x5B, 0xAB, 0xF4, 0xA9, 0x75 } }, + {33+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x04, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x93, 0xC9, 0xB6, 0x40, 0x42, 0xEA, 0xA2, 0x40 } }, + {34+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x55, 0x70, 0x53, 0x08, 0x29, 0x70, 0x55, 0x92 } }, + {35+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x80, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x86, 0x38, 0x80, 0x9E, 0x87, 0x87, 0x87, 0xA0 } }, + {36+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x40, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x41, 0xB9, 0xA7, 0x9A, 0xF7, 0x9A, 0xC2, 0x08 } }, + {37+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x20, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x7A, 0x9B, 0xE4, 0x2F, 0x20, 0x09, 0xA8, 0x92 } }, + {38+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x10, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x29, 0x03, 0x8D, 0x56, 0xBA, 0x6D, 0x27, 0x45 } }, + {39+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x08, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x54, 0x95, 0xC6, 0xAB, 0xF1, 0xE5, 0xDF, 0x51 } }, + {40+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x04, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xAE, 0x13, 0xDB, 0xD5, 0x61, 0x48, 0x89, 0x33 } }, + {41+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x02, 0x4D, 0x1F, 0xFA, 0x89, 0x04, 0xE3, 0x89 } }, + {42+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x80, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xD1, 0x39, 0x97, 0x12, 0xF9, 0x9B, 0xF0, 0x2E } }, + {43+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x40, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x14, 0xC1, 0xD7, 0xC1, 0xCF, 0xFE, 0xC7, 0x9E } }, + {44+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x20, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x1D, 0xE5, 0x27, 0x9D, 0xAE, 0x3B, 0xED, 0x6F } }, + {45+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x10, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xE9, 0x41, 0xA3, 0x3F, 0x85, 0x50, 0x13, 0x03 } }, + {46+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x08, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xDA, 0x99, 0xDB, 0xBC, 0x9A, 0x03, 0xF3, 0x79 } }, + {47+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x04, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xB7, 0xFC, 0x92, 0xF9, 0x1D, 0x8E, 0x92, 0xE9 } }, + {48+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xAE, 0x8E, 0x5C, 0xAA, 0x3C, 0xA0, 0x4E, 0x85 } }, + {49+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x80 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x9C, 0xC6, 0x2D, 0xF4, 0x3B, 0x6E, 0xED, 0x74 } }, + {50+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x40 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xD8, 0x63, 0xDB, 0xB5, 0xC5, 0x9A, 0x91, 0xA0 } }, + {51+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x20 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xA1, 0xAB, 0x21, 0x90, 0x54, 0x5B, 0x91, 0xD7 } }, + {52+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x10 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x08, 0x75, 0x04, 0x1E, 0x64, 0xC5, 0x70, 0xF7 } }, + {53+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x08 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x5A, 0x59, 0x45, 0x28, 0xBE, 0xBE, 0xF1, 0xCC } }, + {54+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x04 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xFC, 0xDB, 0x32, 0x91, 0xDE, 0x21, 0xF0, 0xC0 } }, + {55+11, 0, { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x86, 0x9E, 0xFD, 0x7F, 0x9F, 0x26, 0x5A, 0x09 } }, +#endif /* LTC_TEST_EXT */ /*** more test cases you could add if you are not convinced (the above test cases aren't really too good): @@ -1805,7 +1984,7 @@ des_ecb_decrypt(cases[i].txt, tmp, &des); } - if (XMEMCMP(cases[i].out, tmp, sizeof(tmp)) != 0) { + if (compare_testvector(cases[i].out, sizeof(tmp), tmp, sizeof(tmp), "DES", i) != 0) { return CRYPT_FAIL_TESTVECTOR; } @@ -1814,7 +1993,7 @@ for (y = 0; y < 1000; y++) des_ecb_encrypt(tmp, tmp, &des); for (y = 0; y < 1000; y++) des_ecb_decrypt(tmp, tmp, &des); for (y = 0; y < 8; y++) if (tmp[y] != 0) return CRYPT_FAIL_TESTVECTOR; -} + } return CRYPT_OK; #endif @@ -1849,7 +2028,7 @@ des3_ecb_encrypt(pt, ct, &skey); des3_ecb_decrypt(ct, tmp, &skey); - if (XMEMCMP(pt, tmp, 8) != 0) { + if (compare_testvector(pt, 8, tmp, 8, "3DES", 0) != 0) { return CRYPT_FAIL_TESTVECTOR; } @@ -1863,6 +2042,7 @@ */ void des_done(symmetric_key *skey) { + LTC_UNUSED_PARAM(skey); } #endif @@ -1871,7 +2051,7 @@ */ void des3_done(symmetric_key *skey) { - (void)skey; + LTC_UNUSED_PARAM(skey); } @@ -1910,6 +2090,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/kasumi.c --- a/libtomcrypt/src/ciphers/kasumi.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/ciphers/kasumi.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -33,7 +31,7 @@ &kasumi_test, &kasumi_done, &kasumi_keysize, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; static u16 FI( u16 in, u16 subkey ) @@ -150,7 +148,7 @@ LOAD32H(left, pt); LOAD32H(right, pt+4); - for (n = 0; n <= 7; ) { + for (n = 0; n <= 7; ) { temp = FL(left, n, skey); temp = FO(temp, n++, skey); right ^= temp; @@ -236,6 +234,7 @@ void kasumi_done(symmetric_key *skey) { + LTC_UNUSED_PARAM(skey); } int kasumi_keysize(int *keysize) @@ -303,7 +302,8 @@ if ((err = kasumi_ecb_decrypt(tests[x].ct, buf[1], &key)) != CRYPT_OK) { return err; } - if (XMEMCMP(tests[x].pt, buf[1], 8) || XMEMCMP(tests[x].ct, buf[0], 8)) { + if (compare_testvector(buf[1], 8, tests[x].pt, 8, "Kasumi Decrypt", x) || + compare_testvector(buf[0], 8, tests[x].ct, 8, "Kasumi Encrypt", x)) { return CRYPT_FAIL_TESTVECTOR; } } @@ -313,6 +313,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/khazad.c --- a/libtomcrypt/src/ciphers/khazad.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/ciphers/khazad.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -28,14 +26,14 @@ &khazad_test, &khazad_done, &khazad_keysize, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; -#define R 8 -#define KEYSIZE 128 -#define KEYSIZEB (KEYSIZE/8) -#define BLOCKSIZE 64 -#define BLOCKSIZEB (BLOCKSIZE/8) +#define R 8 +#define KEYSIZE 128 +#define KEYSIZEB (KEYSIZE/8) +#define BLOCKSIZE 64 +#define BLOCKSIZEB (BLOCKSIZE/8) static const ulong64 T0[256] = { CONST64(0xbad3d268bbb96a01), CONST64(0x54fc4d19e59a66b1), CONST64(0x2f71bc93e26514cd), CONST64(0x749ccdb925871b51), @@ -756,7 +754,7 @@ Decrypts a block of text with Khazad @param ct The input ciphertext (8 bytes) @param pt The output plaintext (8 bytes) - @param skey The key as scheduled + @param skey The key as scheduled @return CRYPT_OK if successful */ int khazad_ecb_decrypt(const unsigned char *ct, unsigned char *pt, symmetric_key *skey) @@ -783,22 +781,22 @@ { { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, { 0x49, 0xA4, 0xCE, 0x32, 0xAC, 0x19, 0x0E, 0x3F }, - { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, { { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, { 0x64, 0x5D, 0x77, 0x3E, 0x40, 0xAB, 0xDD, 0x53 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 } }, { { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, { 0x9E, 0x39, 0x98, 0x64, 0xF7, 0x8E, 0xCA, 0x02 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, { { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, { 0xA9, 0xDF, 0x3D, 0x2C, 0x64, 0xD3, 0xEA, 0x28 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } }; @@ -810,13 +808,14 @@ khazad_setup(tests[x].key, 16, 0, &skey); khazad_ecb_encrypt(tests[x].pt, buf[0], &skey); khazad_ecb_decrypt(buf[0], buf[1], &skey); - if (XMEMCMP(buf[0], tests[x].ct, 8) || XMEMCMP(buf[1], tests[x].pt, 8)) { + if (compare_testvector(buf[0], 8, tests[x].ct, 8, "Khazad Encrypt", x) || + compare_testvector(buf[1], 8, tests[x].pt, 8, "Khazad Decrypt", x)) { return CRYPT_FAIL_TESTVECTOR; } for (y = 0; y < 1000; y++) khazad_ecb_encrypt(buf[0], buf[0], &skey); for (y = 0; y < 1000; y++) khazad_ecb_decrypt(buf[0], buf[0], &skey); - if (XMEMCMP(buf[0], tests[x].ct, 8)) { + if (compare_testvector(buf[0], 8, tests[x].ct, 8, "Khazad 1000", 1000)) { return CRYPT_FAIL_TESTVECTOR; } @@ -825,11 +824,12 @@ #endif } -/** Terminate the context +/** Terminate the context @param skey The scheduled key */ void khazad_done(symmetric_key *skey) { + LTC_UNUSED_PARAM(skey); } /** @@ -850,6 +850,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/kseed.c --- a/libtomcrypt/src/ciphers/kseed.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/ciphers/kseed.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -29,7 +27,7 @@ &kseed_test, &kseed_done, &kseed_keysize, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; static const ulong32 SS0[256] = { @@ -201,41 +199,41 @@ */ int kseed_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) { - int i; - ulong32 tmp, k1, k2, k3, k4; + int i; + ulong32 tmp, k1, k2, k3, k4; - if (keylen != 16) { - return CRYPT_INVALID_KEYSIZE; - } - - if (num_rounds != 16 && num_rounds != 0) { - return CRYPT_INVALID_ROUNDS; - } + if (keylen != 16) { + return CRYPT_INVALID_KEYSIZE; + } + + if (num_rounds != 16 && num_rounds != 0) { + return CRYPT_INVALID_ROUNDS; + } - /* load key */ - LOAD32H(k1, key); - LOAD32H(k2, key+4); - LOAD32H(k3, key+8); - LOAD32H(k4, key+12); + /* load key */ + LOAD32H(k1, key); + LOAD32H(k2, key+4); + LOAD32H(k3, key+8); + LOAD32H(k4, key+12); - for (i = 0; i < 16; i++) { - skey->kseed.K[2*i+0] = G(k1 + k3 - KCi[i]); - skey->kseed.K[2*i+1] = G(k2 - k4 + KCi[i]); - if (i&1) { - tmp = k3; - k3 = ((k3 << 8) | (k4 >> 24)) & 0xFFFFFFFF; - k4 = ((k4 << 8) | (tmp >> 24)) & 0xFFFFFFFF; - } else { - tmp = k1; - k1 = ((k1 >> 8) | (k2 << 24)) & 0xFFFFFFFF; - k2 = ((k2 >> 8) | (tmp << 24)) & 0xFFFFFFFF; + for (i = 0; i < 16; i++) { + skey->kseed.K[2*i+0] = G(k1 + k3 - KCi[i]); + skey->kseed.K[2*i+1] = G(k2 - k4 + KCi[i]); + if (i&1) { + tmp = k3; + k3 = ((k3 << 8) | (k4 >> 24)) & 0xFFFFFFFF; + k4 = ((k4 << 8) | (tmp >> 24)) & 0xFFFFFFFF; + } else { + tmp = k1; + k1 = ((k1 >> 8) | (k2 << 24)) & 0xFFFFFFFF; + k2 = ((k2 >> 8) | (tmp << 24)) & 0xFFFFFFFF; } /* reverse keys for decrypt */ skey->kseed.dK[2*(15-i)+0] = skey->kseed.K[2*i+0]; skey->kseed.dK[2*(15-i)+1] = skey->kseed.K[2*i+1]; - } + } - return CRYPT_OK; + return CRYPT_OK; } static void rounds(ulong32 *P, ulong32 *K) @@ -275,7 +273,7 @@ Decrypts a block of text with SEED @param ct The input ciphertext (16 bytes) @param pt The output plaintext (16 bytes) - @param skey The key as scheduled + @param skey The key as scheduled @return CRYPT_OK if successful */ int kseed_ecb_decrypt(const unsigned char *ct, unsigned char *pt, symmetric_key *skey) @@ -293,11 +291,12 @@ return CRYPT_OK; } -/** Terminate the context +/** Terminate the context @param skey The scheduled key */ void kseed_done(symmetric_key *skey) { + LTC_UNUSED_PARAM(skey); } /** @@ -345,7 +344,8 @@ kseed_setup(tests[x].key, 16, 0, &skey); kseed_ecb_encrypt(tests[x].pt, buf[0], &skey); kseed_ecb_decrypt(buf[0], buf[1], &skey); - if (XMEMCMP(buf[0], tests[x].ct, 16) || XMEMCMP(buf[1], tests[x].pt, 16)) { + if (compare_testvector(buf[0], 16, tests[x].ct, 16, "KSEED Encrypt", x) || + compare_testvector(buf[1], 16, tests[x].pt, 16, "KSEED Decrypt", x)) { return CRYPT_FAIL_TESTVECTOR; } } @@ -371,6 +371,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/multi2.c --- a/libtomcrypt/src/ciphers/multi2.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/ciphers/multi2.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -58,7 +56,7 @@ p[0] = dk[0]; p[1] = dk[1]; - t = 4; + t = 4; n = 0; pi1(p); pi2(p, k); @@ -83,28 +81,28 @@ { int n, t; for (t = n = 0; ; ) { - pi1(p); if (++n == N) break; + pi1(p); if (++n == N) break; pi2(p, uk+t); if (++n == N) break; pi3(p, uk+t); if (++n == N) break; pi4(p, uk+t); if (++n == N) break; t ^= 4; } -} +} static void decrypt(ulong32 *p, int N, ulong32 *uk) { int n, t; - for (t = 4*((N&1)^1), n = N; ; ) { - switch (n >= 4 ? 4 : 0) { - case 4: pi4(p, uk+t); --n; - case 3: pi3(p, uk+t); --n; - case 2: pi2(p, uk+t); --n; + for (t = 4*(((N-1)>>2)&1), n = N; ; ) { + switch (n<=4 ? n : ((n-1)%4)+1) { + case 4: pi4(p, uk+t); --n; /* FALLTHROUGH */ + case 3: pi3(p, uk+t); --n; /* FALLTHROUGH */ + case 2: pi2(p, uk+t); --n; /* FALLTHROUGH */ case 1: pi1(p); --n; break; case 0: return; } t ^= 4; } -} +} const struct ltc_cipher_descriptor multi2_desc = { "multi2", @@ -116,7 +114,7 @@ &multi2_test, &multi2_done, &multi2_keysize, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; int multi2_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) @@ -129,7 +127,7 @@ if (keylen != 40) return CRYPT_INVALID_KEYSIZE; if (num_rounds == 0) num_rounds = 128; - + skey->multi2.N = num_rounds; for (x = 0; x < 8; x++) { LOAD32H(sk[x], key + x*4); @@ -159,7 +157,7 @@ LOAD32H(p[0], pt); LOAD32H(p[1], pt+4); encrypt(p, skey->multi2.N, skey->multi2.uk); - STORE32H(p[0], ct); + STORE32H(p[0], ct); STORE32H(p[1], ct+4); return CRYPT_OK; } @@ -180,7 +178,7 @@ LOAD32H(p[0], ct); LOAD32H(p[1], ct+4); decrypt(p, skey->multi2.N, skey->multi2.uk); - STORE32H(p[0], pt); + STORE32H(p[0], pt); STORE32H(p[1], pt+4); return CRYPT_OK; } @@ -207,7 +205,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - + 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF }, @@ -235,7 +233,7 @@ 0xb1, 0x27, 0xb9, 0x06, 0xe7, 0x56, 0x22, 0x38, }, - { + { 0x1f, 0xb4, 0x60, 0x60, 0xd0, 0xb3, 0x4f, 0xa5 }, @@ -258,26 +256,44 @@ return err; } - if (XMEMCMP(buf, tests[x].ct, 8)) { + if (compare_testvector(buf, 8, tests[x].ct, 8, "Multi2 Encrypt", x)) { return CRYPT_FAIL_TESTVECTOR; } - + if ((err = multi2_ecb_decrypt(buf, buf, &skey)) != CRYPT_OK) { return err; } - if (XMEMCMP(buf, tests[x].pt, 8)) { + if (compare_testvector(buf, 8, tests[x].pt, 8, "Multi2 Decrypt", x)) { return CRYPT_FAIL_TESTVECTOR; } } - + + for (x = 128; x < 256; ++x) { + unsigned char ct[8]; + + if ((err = multi2_setup(tests[0].key, 40, x, &skey)) != CRYPT_OK) { + return err; + } + if ((err = multi2_ecb_encrypt(tests[0].pt, ct, &skey)) != CRYPT_OK) { + return err; + } + if ((err = multi2_ecb_decrypt(ct, buf, &skey)) != CRYPT_OK) { + return err; + } + if (compare_testvector(buf, 8, tests[0].pt, 8, "Multi2 Rounds", x)) { + return CRYPT_FAIL_TESTVECTOR; + } + } + return CRYPT_OK; } -/** Terminate the context +/** Terminate the context @param skey The scheduled key */ void multi2_done(symmetric_key *skey) { + LTC_UNUSED_PARAM(skey); } /** @@ -298,6 +314,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/noekeon.c --- a/libtomcrypt/src/ciphers/noekeon.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/ciphers/noekeon.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,12 +5,10 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @file noekeon.c - Implementation of the Noekeon block cipher by Tom St Denis + Implementation of the Noekeon block cipher by Tom St Denis */ #include "tomcrypt.h" @@ -27,7 +25,7 @@ &noekeon_test, &noekeon_done, &noekeon_keysize, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; static const ulong32 RC[] = { @@ -35,7 +33,7 @@ 0x000000d8UL, 0x000000abUL, 0x0000004dUL, 0x0000009aUL, 0x0000002fUL, 0x0000005eUL, 0x000000bcUL, 0x00000063UL, 0x000000c6UL, 0x00000097UL, 0x00000035UL, 0x0000006aUL, - 0x000000d4UL + 0x000000d4UL }; #define kTHETA(a, b, c, d) \ @@ -49,7 +47,7 @@ b ^= temp ^ k[1]; d ^= temp ^ k[3]; \ temp = b^d; temp = temp ^ ROLc(temp, 8) ^ RORc(temp, 8); \ a ^= temp ^ k[0]; c ^= temp ^ k[2]; - + #define GAMMA(a, b, c, d) \ b ^= ~(d|c); \ a ^= c&b; \ @@ -57,13 +55,13 @@ c ^= a ^ b ^ d; \ b ^= ~(d|c); \ a ^= c&b; - + #define PI1(a, b, c, d) \ - a = ROLc(a, 1); c = ROLc(c, 5); d = ROLc(d, 2); - + b = ROLc(b, 1); c = ROLc(c, 5); d = ROLc(d, 2); + #define PI2(a, b, c, d) \ - a = RORc(a, 1); c = RORc(c, 5); d = RORc(d, 2); - + b = RORc(b, 1); c = RORc(c, 5); d = RORc(d, 2); + /** Initialize the Noekeon block cipher @param key The symmetric key you wish to pass @@ -75,23 +73,23 @@ int noekeon_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) { ulong32 temp; - + LTC_ARGCHK(key != NULL); LTC_ARGCHK(skey != NULL); - + if (keylen != 16) { return CRYPT_INVALID_KEYSIZE; } - + if (num_rounds != 16 && num_rounds != 0) { return CRYPT_INVALID_ROUNDS; } - + LOAD32H(skey->noekeon.K[0],&key[0]); LOAD32H(skey->noekeon.K[1],&key[4]); LOAD32H(skey->noekeon.K[2],&key[8]); LOAD32H(skey->noekeon.K[3],&key[12]); - + LOAD32H(skey->noekeon.dK[0],&key[0]); LOAD32H(skey->noekeon.dK[1],&key[4]); LOAD32H(skey->noekeon.dK[2],&key[8]); @@ -121,10 +119,10 @@ LTC_ARGCHK(skey != NULL); LTC_ARGCHK(pt != NULL); LTC_ARGCHK(ct != NULL); - + LOAD32H(a,&pt[0]); LOAD32H(b,&pt[4]); LOAD32H(c,&pt[8]); LOAD32H(d,&pt[12]); - + #define ROUND(i) \ a ^= RC[i]; \ THETA(skey->noekeon.K, a,b,c,d); \ @@ -140,7 +138,7 @@ a ^= RC[16]; THETA(skey->noekeon.K, a, b, c, d); - + STORE32H(a,&ct[0]); STORE32H(b,&ct[4]); STORE32H(c,&ct[8]); STORE32H(d,&ct[12]); @@ -152,7 +150,7 @@ { int err = _noekeon_ecb_encrypt(pt, ct, skey); burn_stack(sizeof(ulong32) * 5 + sizeof(int)); - return CRYPT_OK; + return err; } #endif @@ -160,7 +158,7 @@ Decrypts a block of text with Noekeon @param ct The input ciphertext (16 bytes) @param pt The output plaintext (16 bytes) - @param skey The key as scheduled + @param skey The key as scheduled @return CRYPT_OK if successful */ #ifdef LTC_CLEAN_STACK @@ -175,17 +173,17 @@ LTC_ARGCHK(skey != NULL); LTC_ARGCHK(pt != NULL); LTC_ARGCHK(ct != NULL); - + LOAD32H(a,&ct[0]); LOAD32H(b,&ct[4]); LOAD32H(c,&ct[8]); LOAD32H(d,&ct[12]); - + #define ROUND(i) \ THETA(skey->noekeon.dK, a,b,c,d); \ a ^= RC[i]; \ PI1(a,b,c,d); \ GAMMA(a,b,c,d); \ - PI2(a,b,c,d); + PI2(a,b,c,d); for (r = 16; r > 0; --r) { ROUND(r); @@ -224,59 +222,86 @@ } tests[] = { { 16, - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, - { 0x18, 0xa6, 0xec, 0xe5, 0x28, 0xaa, 0x79, 0x73, - 0x28, 0xb2, 0xc0, 0x91, 0xa0, 0x2f, 0x54, 0xc5} + { 0xAA, 0x3C, 0x8C, 0x86, 0xD9, 0x8B, 0xF8, 0xBE, 0x21, 0xE0, 0x36, 0x09, 0x78, 0xFB, 0xE4, 0x90 }, + { 0xE4, 0x96, 0x6C, 0xD3, 0x13, 0xA0, 0x6C, 0xAF, 0xD0, 0x23, 0xC9, 0xFD, 0x45, 0x32, 0x23, 0x16 }, + { 0xA6, 0xEC, 0xB8, 0xA8, 0x61, 0xFD, 0x62, 0xD9, 0x13, 0x02, 0xFE, 0x9E, 0x47, 0x01, 0x3F, 0xC3 } + }, + { + 16, + { 0xED, 0x43, 0xD1, 0x87, 0x21, 0x7E, 0xE0, 0x97, 0x3D, 0x76, 0xC3, 0x37, 0x2E, 0x7D, 0xAE, 0xD3 }, + { 0xE3, 0x38, 0x32, 0xCC, 0xF2, 0x2F, 0x2F, 0x0A, 0x4A, 0x8B, 0x8F, 0x18, 0x12, 0x20, 0x17, 0xD3 }, + { 0x94, 0xA5, 0xDF, 0xF5, 0xAE, 0x1C, 0xBB, 0x22, 0xAD, 0xEB, 0xA7, 0x0D, 0xB7, 0x82, 0x90, 0xA0 } + }, + { + 16, + { 0x6F, 0xDC, 0x23, 0x38, 0xF2, 0x10, 0xFB, 0xD3, 0xC1, 0x8C, 0x02, 0xF6, 0xB4, 0x6A, 0xD5, 0xA8 }, + { 0xDB, 0x29, 0xED, 0xB5, 0x5F, 0xB3, 0x60, 0x3A, 0x92, 0xA8, 0xEB, 0x9C, 0x6D, 0x9D, 0x3E, 0x8F }, + { 0x78, 0xF3, 0x6F, 0xF8, 0x9E, 0xBB, 0x8C, 0x6A, 0xE8, 0x10, 0xF7, 0x00, 0x22, 0x15, 0x30, 0x3D } + }, + { + 16, + { 0x2C, 0x0C, 0x02, 0xEF, 0x6B, 0xC4, 0xF2, 0x0B, 0x2E, 0xB9, 0xE0, 0xBF, 0xD9, 0x36, 0xC2, 0x4E }, + { 0x84, 0xE2, 0xFE, 0x64, 0xB1, 0xB9, 0xFE, 0x76, 0xA8, 0x3F, 0x45, 0xC7, 0x40, 0x7A, 0xAF, 0xEE }, + { 0x2A, 0x08, 0xD6, 0xA2, 0x1C, 0x63, 0x08, 0xB0, 0xF8, 0xBC, 0xB3, 0xA1, 0x66, 0xF7, 0xAE, 0xCF } + }, + { + 16, + { 0x6F, 0x30, 0xF8, 0x9F, 0xDA, 0x6E, 0xA0, 0x91, 0x04, 0x0F, 0x6C, 0x8B, 0x7D, 0xF7, 0x2A, 0x4B }, + { 0x65, 0xB6, 0xA6, 0xD0, 0x42, 0x14, 0x08, 0x60, 0x34, 0x8D, 0x37, 0x2F, 0x01, 0xF0, 0x46, 0xBE }, + { 0x66, 0xAC, 0x0B, 0x62, 0x1D, 0x68, 0x11, 0xF5, 0x27, 0xB1, 0x13, 0x5D, 0xF3, 0x2A, 0xE9, 0x18 } + }, + { + 16, + { 0xCA, 0xA4, 0x16, 0xB7, 0x1C, 0x92, 0x2E, 0xAD, 0xEB, 0xA7, 0xDB, 0x69, 0x92, 0xCB, 0x35, 0xEF }, + { 0x81, 0x6F, 0x8E, 0x4D, 0x96, 0xC6, 0xB3, 0x67, 0x83, 0xF5, 0x63, 0xC7, 0x20, 0x6D, 0x40, 0x23 }, + { 0x44, 0xF7, 0x63, 0x62, 0xF0, 0x43, 0xBB, 0x67, 0x4A, 0x75, 0x12, 0x42, 0x46, 0x29, 0x28, 0x19 } + }, + { + 16, + { 0x6B, 0xCF, 0x22, 0x2F, 0xE0, 0x1B, 0xB0, 0xAA, 0xD8, 0x3C, 0x91, 0x99, 0x18, 0xB2, 0x28, 0xE8 }, + { 0x7C, 0x37, 0xC7, 0xD0, 0xAC, 0x92, 0x29, 0xF1, 0x60, 0x82, 0x93, 0x89, 0xAA, 0x61, 0xAA, 0xA9 }, + { 0xE5, 0x89, 0x1B, 0xB3, 0xFE, 0x8B, 0x0C, 0xA1, 0xA6, 0xC7, 0xBE, 0x12, 0x73, 0x0F, 0xC1, 0x19 } + }, + { + 16, + { 0xE6, 0xD0, 0xF1, 0x03, 0x2E, 0xDE, 0x70, 0x8D, 0xD8, 0x9E, 0x36, 0x5C, 0x05, 0x52, 0xE7, 0x0D }, + { 0xE2, 0x42, 0xE7, 0x92, 0x0E, 0xF7, 0x82, 0xA2, 0xB8, 0x21, 0x8D, 0x26, 0xBA, 0x2D, 0xE6, 0x32 }, + { 0x1E, 0xDD, 0x75, 0x22, 0xB9, 0x36, 0x8A, 0x0F, 0x32, 0xFD, 0xD4, 0x48, 0x65, 0x12, 0x5A, 0x2F } } }; symmetric_key key; unsigned char tmp[2][16]; int err, i, y; - + for (i = 0; i < (int)(sizeof(tests)/sizeof(tests[0])); i++) { zeromem(&key, sizeof(key)); - if ((err = noekeon_setup(tests[i].key, tests[i].keylen, 0, &key)) != CRYPT_OK) { + if ((err = noekeon_setup(tests[i].key, tests[i].keylen, 0, &key)) != CRYPT_OK) { return err; } - + noekeon_ecb_encrypt(tests[i].pt, tmp[0], &key); noekeon_ecb_decrypt(tmp[0], tmp[1], &key); - if (XMEMCMP(tmp[0], tests[i].ct, 16) || XMEMCMP(tmp[1], tests[i].pt, 16)) { -#if 0 - printf("\n\nTest %d failed\n", i); - if (XMEMCMP(tmp[0], tests[i].ct, 16)) { - printf("CT: "); - for (i = 0; i < 16; i++) { - printf("%02x ", tmp[0][i]); - } - printf("\n"); - } else { - printf("PT: "); - for (i = 0; i < 16; i++) { - printf("%02x ", tmp[1][i]); - } - printf("\n"); - } -#endif + if (compare_testvector(tmp[0], 16, tests[i].ct, 16, "Noekeon Encrypt", i) || + compare_testvector(tmp[1], 16, tests[i].pt, 16, "Noekeon Decrypt", i)) { return CRYPT_FAIL_TESTVECTOR; } - /* now see if we can encrypt all zero bytes 1000 times, decrypt and come back where we started */ - for (y = 0; y < 16; y++) tmp[0][y] = 0; - for (y = 0; y < 1000; y++) noekeon_ecb_encrypt(tmp[0], tmp[0], &key); - for (y = 0; y < 1000; y++) noekeon_ecb_decrypt(tmp[0], tmp[0], &key); - for (y = 0; y < 16; y++) if (tmp[0][y] != 0) return CRYPT_FAIL_TESTVECTOR; - } + /* now see if we can encrypt all zero bytes 1000 times, decrypt and come back where we started */ + for (y = 0; y < 16; y++) tmp[0][y] = 0; + for (y = 0; y < 1000; y++) noekeon_ecb_encrypt(tmp[0], tmp[0], &key); + for (y = 0; y < 1000; y++) noekeon_ecb_decrypt(tmp[0], tmp[0], &key); + for (y = 0; y < 16; y++) if (tmp[0][y] != 0) return CRYPT_FAIL_TESTVECTOR; + } return CRYPT_OK; #endif } -/** Terminate the context +/** Terminate the context @param skey The scheduled key */ void noekeon_done(symmetric_key *skey) { + LTC_UNUSED_PARAM(skey); } /** @@ -298,6 +323,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/rc2.c --- a/libtomcrypt/src/ciphers/rc2.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/ciphers/rc2.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /**********************************************************************\ * To commemorate the 1996 RSA Data Security Conference, the following * @@ -18,12 +16,12 @@ * Thanks to CodeView, SoftIce, and D86 for helping bring this code to * * the public. * \**********************************************************************/ -#include +#include "tomcrypt.h" /** @file rc2.c - Implementation of LTC_RC2 -*/ + Implementation of RC2 with fixed effective key length of 64bits +*/ #ifdef LTC_RC2 @@ -36,7 +34,7 @@ &rc2_test, &rc2_done, &rc2_keysize, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; /* 256-entry permutation table, probably derived somehow from pi */ @@ -60,68 +58,87 @@ }; /** - Initialize the LTC_RC2 block cipher + Initialize the RC2 block cipher @param key The symmetric key you wish to pass @param keylen The key length in bytes + @param bits The effective key length in bits @param num_rounds The number of rounds desired (0 for default) @param skey The key in as scheduled by this function. @return CRYPT_OK if successful */ -int rc2_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) +int rc2_setup_ex(const unsigned char *key, int keylen, int bits, int num_rounds, symmetric_key *skey) { unsigned *xkey = skey->rc2.xkey; unsigned char tmp[128]; unsigned T8, TM; - int i, bits; + int i; LTC_ARGCHK(key != NULL); LTC_ARGCHK(skey != NULL); - if (keylen < 8 || keylen > 128) { + if (keylen == 0 || keylen > 128 || bits > 1024) { return CRYPT_INVALID_KEYSIZE; } + if (bits == 0) { + bits = 1024; + } if (num_rounds != 0 && num_rounds != 16) { return CRYPT_INVALID_ROUNDS; } for (i = 0; i < keylen; i++) { - tmp[i] = key[i] & 255; + tmp[i] = key[i] & 255; + } + + /* Phase 1: Expand input key to 128 bytes */ + if (keylen < 128) { + for (i = keylen; i < 128; i++) { + tmp[i] = permute[(tmp[i - 1] + tmp[i - keylen]) & 255]; + } + } + + /* Phase 2 - reduce effective key size to "bits" */ + T8 = (unsigned)(bits+7)>>3; + TM = (255 >> (unsigned)(7 & -bits)); + tmp[128 - T8] = permute[tmp[128 - T8] & TM]; + for (i = 127 - T8; i >= 0; i--) { + tmp[i] = permute[tmp[i + 1] ^ tmp[i + T8]]; } - /* Phase 1: Expand input key to 128 bytes */ - if (keylen < 128) { - for (i = keylen; i < 128; i++) { - tmp[i] = permute[(tmp[i - 1] + tmp[i - keylen]) & 255]; - } - } - - /* Phase 2 - reduce effective key size to "bits" */ - bits = keylen<<3; - T8 = (unsigned)(bits+7)>>3; - TM = (255 >> (unsigned)(7 & -bits)); - tmp[128 - T8] = permute[tmp[128 - T8] & TM]; - for (i = 127 - T8; i >= 0; i--) { - tmp[i] = permute[tmp[i + 1] ^ tmp[i + T8]]; - } - - /* Phase 3 - copy to xkey in little-endian order */ - for (i = 0; i < 64; i++) { - xkey[i] = (unsigned)tmp[2*i] + ((unsigned)tmp[2*i+1] << 8); - } + /* Phase 3 - copy to xkey in little-endian order */ + for (i = 0; i < 64; i++) { + xkey[i] = (unsigned)tmp[2*i] + ((unsigned)tmp[2*i+1] << 8); + } #ifdef LTC_CLEAN_STACK - zeromem(tmp, sizeof(tmp)); + zeromem(tmp, sizeof(tmp)); #endif - - return CRYPT_OK; + + return CRYPT_OK; +} + +/** + Initialize the RC2 block cipher + + The effective key length is here always keylen * 8 + + @param key The symmetric key you wish to pass + @param keylen The key length in bytes + @param num_rounds The number of rounds desired (0 for default) + @param skey The key in as scheduled by this function. + @return CRYPT_OK if successful +*/ +int rc2_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) +{ + return rc2_setup_ex(key, keylen, keylen * 8, num_rounds, skey); } /**********************************************************************\ * Encrypt an 8-byte block of plaintext using the given key. * \**********************************************************************/ /** - Encrypts a block of text with LTC_RC2 + Encrypts a block of text with RC2 @param pt The input plaintext (8 bytes) @param ct The output ciphertext (8 bytes) @param skey The key as scheduled @@ -180,7 +197,7 @@ ct[5] = (unsigned char)(x54 >> 8); ct[6] = (unsigned char)x76; ct[7] = (unsigned char)(x76 >> 8); - + return CRYPT_OK; } @@ -199,10 +216,10 @@ * Decrypt an 8-byte block of ciphertext using the given key. * \**********************************************************************/ /** - Decrypts a block of text with LTC_RC2 + Decrypts a block of text with RC2 @param ct The input ciphertext (8 bytes) @param pt The output plaintext (8 bytes) - @param skey The key as scheduled + @param skey The key as scheduled @return CRYPT_OK if successful */ #ifdef LTC_CLEAN_STACK @@ -275,27 +292,56 @@ #endif /** - Performs a self-test of the LTC_RC2 block cipher + Performs a self-test of the RC2 block cipher @return CRYPT_OK if functional, CRYPT_NOP if self-test has been disabled */ int rc2_test(void) { #ifndef LTC_TEST return CRYPT_NOP; - #else + #else static const struct { - int keylen; + int keylen, bits; unsigned char key[16], pt[8], ct[8]; } tests[] = { - { 8, + { 8, 63, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xeb, 0xb7, 0x73, 0xf9, 0x93, 0x27, 0x8e, 0xff } + }, + { 8, 64, + { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, + { 0x27, 0x8b, 0x27, 0xe4, 0x2e, 0x2f, 0x0d, 0x49 } + }, + { 8, 64, { 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, { 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, { 0x30, 0x64, 0x9e, 0xdf, 0x9b, 0xe7, 0xd2, 0xc2 } - + }, + { 1, 64, + { 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x61, 0xa8, 0xa2, 0x44, 0xad, 0xac, 0xcc, 0xf0 } }, - { 16, + { 7, 64, + { 0x88, 0xbc, 0xa9, 0x0e, 0x90, 0x87, 0x5a, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x6c, 0xcf, 0x43, 0x08, 0x97, 0x4c, 0x26, 0x7f } + }, + { 16, 64, + { 0x88, 0xbc, 0xa9, 0x0e, 0x90, 0x87, 0x5a, 0x7f, + 0x0f, 0x79, 0xc3, 0x84, 0x62, 0x7b, 0xaf, 0xb2 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x1a, 0x80, 0x7d, 0x27, 0x2b, 0xbe, 0x5d, 0xb1 } + }, + { 16, 128, { 0x88, 0xbc, 0xa9, 0x0e, 0x90, 0x87, 0x5a, 0x7f, 0x0f, 0x79, 0xc3, 0x84, 0x62, 0x7b, 0xaf, 0xb2 }, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, @@ -308,14 +354,22 @@ for (x = 0; x < (int)(sizeof(tests) / sizeof(tests[0])); x++) { zeromem(tmp, sizeof(tmp)); - if ((err = rc2_setup(tests[x].key, tests[x].keylen, 0, &skey)) != CRYPT_OK) { - return err; + if (tests[x].bits == (tests[x].keylen * 8)) { + if ((err = rc2_setup(tests[x].key, tests[x].keylen, 0, &skey)) != CRYPT_OK) { + return err; + } } - + else { + if ((err = rc2_setup_ex(tests[x].key, tests[x].keylen, tests[x].bits, 0, &skey)) != CRYPT_OK) { + return err; + } + } + rc2_ecb_encrypt(tests[x].pt, tmp[0], &skey); rc2_ecb_decrypt(tmp[0], tmp[1], &skey); - - if (XMEMCMP(tmp[0], tests[x].ct, 8) != 0 || XMEMCMP(tmp[1], tests[x].pt, 8) != 0) { + + if (compare_testvector(tmp[0], 8, tests[x].ct, 8, "RC2 CT", x) || + compare_testvector(tmp[1], 8, tests[x].pt, 8, "RC2 PT", x)) { return CRYPT_FAIL_TESTVECTOR; } @@ -329,11 +383,12 @@ #endif } -/** Terminate the context +/** Terminate the context @param skey The scheduled key */ void rc2_done(symmetric_key *skey) { + LTC_UNUSED_PARAM(skey); } /** @@ -344,7 +399,7 @@ int rc2_keysize(int *keysize) { LTC_ARGCHK(keysize != NULL); - if (*keysize < 8) { + if (*keysize < 1) { return CRYPT_INVALID_KEYSIZE; } else if (*keysize > 128) { *keysize = 128; @@ -357,6 +412,6 @@ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/rc5.c --- a/libtomcrypt/src/ciphers/rc5.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/ciphers/rc5.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,13 +5,11 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @file rc5.c - LTC_RC5 code by Tom St Denis + LTC_RC5 code by Tom St Denis */ #include "tomcrypt.h" @@ -29,7 +27,7 @@ &rc5_test, &rc5_done, &rc5_keysize, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; static const ulong32 stab[50] = { @@ -60,13 +58,13 @@ LTC_ARGCHK(skey != NULL); LTC_ARGCHK(key != NULL); - + /* test parameters */ - if (num_rounds == 0) { + if (num_rounds == 0) { num_rounds = rc5_desc.default_rounds; } - if (num_rounds < 12 || num_rounds > 24) { + if (num_rounds < 12 || num_rounds > 24) { return CRYPT_INVALID_ROUNDS; } @@ -74,12 +72,12 @@ if (keylen < 8 || keylen > 128) { return CRYPT_INVALID_KEYSIZE; } - + skey->rc5.rounds = num_rounds; S = skey->rc5.K; /* copy the key into the L array */ - for (A = i = j = 0; i < (ulong32)keylen; ) { + for (A = i = j = 0; i < (ulong32)keylen; ) { A = (A << 8) | ((ulong32)(key[i++] & 255)); if ((i & 3) == 0) { L[j++] = BSWAP(A); @@ -87,8 +85,8 @@ } } - if ((keylen & 3) != 0) { - A <<= (ulong32)((8 * (4 - (keylen&3)))); + if ((keylen & 3) != 0) { + A <<= (ulong32)((8 * (4 - (keylen&3)))); L[j++] = BSWAP(A); } @@ -99,7 +97,7 @@ /* mix buffer */ s = 3 * MAX(t, j); l = j; - for (A = B = i = j = v = 0; v < s; v++) { + for (A = B = i = j = v = 0; v < s; v++) { A = S[i] = ROLc(S[i] + A + B, 3); B = L[j] = ROL(L[j] + A + B, (A+B)); if (++i == t) { i = 0; } @@ -142,7 +140,7 @@ A += skey->rc5.K[0]; B += skey->rc5.K[1]; K = skey->rc5.K + 2; - + if ((skey->rc5.rounds & 1) == 0) { for (r = 0; r < skey->rc5.rounds; r += 2) { A = ROL(A ^ B, B) + K[0]; @@ -177,7 +175,7 @@ Decrypts a block of text with LTC_RC5 @param ct The input ciphertext (8 bytes) @param pt The output plaintext (8 bytes) - @param skey The key as scheduled + @param skey The key as scheduled @return CRYPT_OK if successful */ #ifdef LTC_CLEAN_STACK @@ -195,7 +193,7 @@ LOAD32L(A, &ct[0]); LOAD32L(B, &ct[4]); K = skey->rc5.K + (skey->rc5.rounds << 1); - + if ((skey->rc5.rounds & 1) == 0) { K -= 2; for (r = skey->rc5.rounds - 1; r >= 0; r -= 2) { @@ -237,7 +235,7 @@ { #ifndef LTC_TEST return CRYPT_NOP; - #else + #else static const struct { unsigned char key[16], pt[8], ct[8]; } tests[] = { @@ -275,7 +273,8 @@ rc5_ecb_decrypt(tmp[0], tmp[1], &key); /* compare */ - if (XMEMCMP(tmp[0], tests[x].ct, 8) != 0 || XMEMCMP(tmp[1], tests[x].pt, 8) != 0) { + if (compare_testvector(tmp[0], 8, tests[x].ct, 8, "RC5 Encrypt", x) != 0 || + compare_testvector(tmp[1], 8, tests[x].pt, 8, "RC5 Decrypt", x) != 0) { return CRYPT_FAIL_TESTVECTOR; } @@ -289,11 +288,12 @@ #endif } -/** Terminate the context +/** Terminate the context @param skey The scheduled key */ void rc5_done(symmetric_key *skey) { + LTC_UNUSED_PARAM(skey); } /** @@ -317,6 +317,6 @@ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/rc6.c --- a/libtomcrypt/src/ciphers/rc6.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/ciphers/rc6.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,13 +5,11 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @file rc6.c - LTC_RC6 code by Tom St Denis + LTC_RC6 code by Tom St Denis */ #include "tomcrypt.h" @@ -28,7 +26,7 @@ &rc6_test, &rc6_done, &rc6_keysize, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; static const ulong32 stab[44] = { @@ -59,7 +57,7 @@ LTC_ARGCHK(skey != NULL); /* test parameters */ - if (num_rounds != 0 && num_rounds != 20) { + if (num_rounds != 0 && num_rounds != 20) { return CRYPT_INVALID_ROUNDS; } @@ -69,7 +67,7 @@ } /* copy the key into the L array */ - for (A = i = j = 0; i < (ulong32)keylen; ) { + for (A = i = j = 0; i < (ulong32)keylen; ) { A = (A << 8) | ((ulong32)(key[i++] & 255)); if (!(i & 3)) { L[j++] = BSWAP(A); @@ -78,9 +76,9 @@ } /* handle odd sized keys */ - if (keylen & 3) { - A <<= (8 * (4 - (keylen&3))); - L[j++] = BSWAP(A); + if (keylen & 3) { + A <<= (8 * (4 - (keylen&3))); + L[j++] = BSWAP(A); } /* setup the S array */ @@ -89,15 +87,15 @@ /* mix buffer */ s = 3 * MAX(44, j); l = j; - for (A = B = i = j = v = 0; v < s; v++) { + for (A = B = i = j = v = 0; v < s; v++) { A = S[i] = ROLc(S[i] + A + B, 3); B = L[j] = ROL(L[j] + A + B, (A+B)); if (++i == 44) { i = 0; } if (++j == l) { j = 0; } } - + /* copy to key */ - for (i = 0; i < 44; i++) { + for (i = 0; i < 44; i++) { skey->rc6.K[i] = S[i]; } return CRYPT_OK; @@ -127,7 +125,7 @@ { ulong32 a,b,c,d,t,u, *K; int r; - + LTC_ARGCHK(skey != NULL); LTC_ARGCHK(pt != NULL); LTC_ARGCHK(ct != NULL); @@ -140,8 +138,8 @@ t = (b * (b + b + 1)); t = ROLc(t, 5); \ u = (d * (d + d + 1)); u = ROLc(u, 5); \ a = ROL(a^t,u) + K[0]; \ - c = ROL(c^u,t) + K[1]; K += 2; - + c = ROL(c^u,t) + K[1]; K += 2; + K = skey->rc6.K + 2; for (r = 0; r < 20; r += 4) { RND(a,b,c,d); @@ -149,7 +147,7 @@ RND(c,d,a,b); RND(d,a,b,c); } - + #undef RND a += skey->rc6.K[42]; @@ -171,7 +169,7 @@ Decrypts a block of text with LTC_RC6 @param ct The input ciphertext (16 bytes) @param pt The output plaintext (16 bytes) - @param skey The key as scheduled + @param skey The key as scheduled */ #ifdef LTC_CLEAN_STACK static int _rc6_ecb_decrypt(const unsigned char *ct, unsigned char *pt, symmetric_key *skey) @@ -185,26 +183,26 @@ LTC_ARGCHK(skey != NULL); LTC_ARGCHK(pt != NULL); LTC_ARGCHK(ct != NULL); - + LOAD32L(a,&ct[0]);LOAD32L(b,&ct[4]);LOAD32L(c,&ct[8]);LOAD32L(d,&ct[12]); a -= skey->rc6.K[42]; c -= skey->rc6.K[43]; - + #define RND(a,b,c,d) \ t = (b * (b + b + 1)); t = ROLc(t, 5); \ u = (d * (d + d + 1)); u = ROLc(u, 5); \ c = ROR(c - K[1], t) ^ u; \ a = ROR(a - K[0], u) ^ t; K -= 2; - + K = skey->rc6.K + 40; - + for (r = 0; r < 20; r += 4) { RND(d,a,b,c); RND(c,d,a,b); RND(b,c,d,a); RND(a,b,c,d); } - + #undef RND b -= skey->rc6.K[0]; @@ -231,7 +229,7 @@ { #ifndef LTC_TEST return CRYPT_NOP; - #else + #else static const struct { int keylen; unsigned char key[32], pt[16], ct[16]; @@ -285,24 +283,8 @@ rc6_ecb_decrypt(tmp[0], tmp[1], &key); /* compare */ - if (XMEMCMP(tmp[0], tests[x].ct, 16) || XMEMCMP(tmp[1], tests[x].pt, 16)) { -#if 0 - printf("\n\nFailed test %d\n", x); - if (XMEMCMP(tmp[0], tests[x].ct, 16)) { - printf("Ciphertext: "); - for (y = 0; y < 16; y++) printf("%02x ", tmp[0][y]); - printf("\nExpected : "); - for (y = 0; y < 16; y++) printf("%02x ", tests[x].ct[y]); - printf("\n"); - } - if (XMEMCMP(tmp[1], tests[x].pt, 16)) { - printf("Plaintext: "); - for (y = 0; y < 16; y++) printf("%02x ", tmp[0][y]); - printf("\nExpected : "); - for (y = 0; y < 16; y++) printf("%02x ", tests[x].pt[y]); - printf("\n"); - } -#endif + if (compare_testvector(tmp[0], 16, tests[x].ct, 16, "RC6 Encrypt", x) || + compare_testvector(tmp[1], 16, tests[x].pt, 16, "RC6 Decrypt", x)) { return CRYPT_FAIL_TESTVECTOR; } @@ -316,11 +298,12 @@ #endif } -/** Terminate the context +/** Terminate the context @param skey The scheduled key */ void rc6_done(symmetric_key *skey) { + LTC_UNUSED_PARAM(skey); } /** @@ -343,6 +326,6 @@ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/safer/safer.c --- a/libtomcrypt/src/ciphers/safer/safer.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/ciphers/safer/safer.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /******************************************************************************* @@ -28,13 +26,15 @@ * *******************************************************************************/ -#include +#include "tomcrypt.h" #ifdef LTC_SAFER -const struct ltc_cipher_descriptor - safer_k64_desc = { - "safer-k64", +#define __LTC_SAFER_TAB_C__ +#include "safer_tab.c" + +const struct ltc_cipher_descriptor safer_k64_desc = { + "safer-k64", 8, 8, 8, 8, LTC_SAFER_K64_DEFAULT_NOF_ROUNDS, &safer_k64_setup, &safer_ecb_encrypt, @@ -42,7 +42,7 @@ &safer_k64_test, &safer_done, &safer_64_keysize, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }, safer_sk64_desc = { @@ -54,7 +54,7 @@ &safer_sk64_test, &safer_done, &safer_64_keysize, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }, safer_k128_desc = { @@ -66,7 +66,7 @@ &safer_sk128_test, &safer_done, &safer_128_keysize, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }, safer_sk128_desc = { @@ -78,7 +78,7 @@ &safer_sk128_test, &safer_done, &safer_128_keysize, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; /******************* Constants ************************************************/ @@ -95,7 +95,6 @@ #define IPHT(x, y) { x -= y; y -= x; } /******************* Types ****************************************************/ -extern const unsigned char safer_ebox[], safer_lbox[]; #ifdef LTC_CLEAN_STACK static void _Safer_Expand_Userkey(const unsigned char *userkey_1, @@ -158,7 +157,7 @@ } } } - + #ifdef LTC_CLEAN_STACK zeromem(ka, sizeof(ka)); zeromem(kb, sizeof(kb)); @@ -193,7 +192,7 @@ Safer_Expand_Userkey(key, key, (unsigned int)(numrounds != 0 ?numrounds:LTC_SAFER_K64_DEFAULT_NOF_ROUNDS), 0, skey->safer.key); return CRYPT_OK; } - + int safer_sk64_setup(const unsigned char *key, int keylen, int numrounds, symmetric_key *skey) { LTC_ARGCHK(key != NULL); @@ -380,7 +379,7 @@ { #ifndef LTC_TEST return CRYPT_NOP; - #else + #else static const unsigned char k64_pt[] = { 1, 2, 3, 4, 5, 6, 7, 8 }, k64_key[] = { 8, 7, 6, 5, 4, 3, 2, 1 }, k64_ct[] = { 200, 242, 156, 221, 135, 120, 62, 217 }; @@ -396,7 +395,8 @@ safer_ecb_encrypt(k64_pt, buf[0], &skey); safer_ecb_decrypt(buf[0], buf[1], &skey); - if (XMEMCMP(buf[0], k64_ct, 8) != 0 || XMEMCMP(buf[1], k64_pt, 8) != 0) { + if (compare_testvector(buf[0], 8, k64_ct, 8, "Safer K64 Encrypt", 0) != 0 || + compare_testvector(buf[1], 8, k64_pt, 8, "Safer K64 Decrypt", 0) != 0) { return CRYPT_FAIL_TESTVECTOR; } @@ -409,7 +409,7 @@ { #ifndef LTC_TEST return CRYPT_NOP; - #else + #else static const unsigned char sk64_pt[] = { 1, 2, 3, 4, 5, 6, 7, 8 }, sk64_key[] = { 1, 2, 3, 4, 5, 6, 7, 8 }, sk64_ct[] = { 95, 206, 155, 162, 5, 132, 56, 199 }; @@ -426,32 +426,34 @@ safer_ecb_encrypt(sk64_pt, buf[0], &skey); safer_ecb_decrypt(buf[0], buf[1], &skey); - if (XMEMCMP(buf[0], sk64_ct, 8) != 0 || XMEMCMP(buf[1], sk64_pt, 8) != 0) { + if (compare_testvector(buf[0], 8, sk64_ct, 8, "Safer SK64 Encrypt", 0) != 0 || + compare_testvector(buf[1], 8, sk64_pt, 8, "Safer SK64 Decrypt", 0) != 0) { return CRYPT_FAIL_TESTVECTOR; } - /* now see if we can encrypt all zero bytes 1000 times, decrypt and come back where we started */ - for (y = 0; y < 8; y++) buf[0][y] = 0; - for (y = 0; y < 1000; y++) safer_ecb_encrypt(buf[0], buf[0], &skey); - for (y = 0; y < 1000; y++) safer_ecb_decrypt(buf[0], buf[0], &skey); - for (y = 0; y < 8; y++) if (buf[0][y] != 0) return CRYPT_FAIL_TESTVECTOR; + /* now see if we can encrypt all zero bytes 1000 times, decrypt and come back where we started */ + for (y = 0; y < 8; y++) buf[0][y] = 0; + for (y = 0; y < 1000; y++) safer_ecb_encrypt(buf[0], buf[0], &skey); + for (y = 0; y < 1000; y++) safer_ecb_decrypt(buf[0], buf[0], &skey); + for (y = 0; y < 8; y++) if (buf[0][y] != 0) return CRYPT_FAIL_TESTVECTOR; return CRYPT_OK; #endif } -/** Terminate the context +/** Terminate the context @param skey The scheduled key */ void safer_done(symmetric_key *skey) { + LTC_UNUSED_PARAM(skey); } int safer_sk128_test(void) { #ifndef LTC_TEST return CRYPT_NOP; - #else + #else static const unsigned char sk128_pt[] = { 1, 2, 3, 4, 5, 6, 7, 8 }, sk128_key[] = { 1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0 }, @@ -468,16 +470,18 @@ safer_ecb_encrypt(sk128_pt, buf[0], &skey); safer_ecb_decrypt(buf[0], buf[1], &skey); - if (XMEMCMP(buf[0], sk128_ct, 8) != 0 || XMEMCMP(buf[1], sk128_pt, 8) != 0) { + if (compare_testvector(buf[0], 8, sk128_ct, 8, "Safer SK128 Encrypt", 0) != 0 || + compare_testvector(buf[1], 8, sk128_pt, 8, "Safer SK128 Decrypt", 0) != 0) { return CRYPT_FAIL_TESTVECTOR; } - /* now see if we can encrypt all zero bytes 1000 times, decrypt and come back where we started */ - for (y = 0; y < 8; y++) buf[0][y] = 0; - for (y = 0; y < 1000; y++) safer_ecb_encrypt(buf[0], buf[0], &skey); - for (y = 0; y < 1000; y++) safer_ecb_decrypt(buf[0], buf[0], &skey); - for (y = 0; y < 8; y++) if (buf[0][y] != 0) return CRYPT_FAIL_TESTVECTOR; - return CRYPT_OK; + /* now see if we can encrypt all zero bytes 1000 times, decrypt and come back where we started */ + for (y = 0; y < 8; y++) buf[0][y] = 0; + for (y = 0; y < 1000; y++) safer_ecb_encrypt(buf[0], buf[0], &skey); + for (y = 0; y < 1000; y++) safer_ecb_decrypt(buf[0], buf[0], &skey); + for (y = 0; y < 8; y++) if (buf[0][y] != 0) return CRYPT_FAIL_TESTVECTOR; + + return CRYPT_OK; #endif } @@ -486,6 +490,6 @@ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/safer/safer_tab.c --- a/libtomcrypt/src/ciphers/safer/safer_tab.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/ciphers/safer/safer_tab.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,64 +5,60 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @file safer_tab.c Tables for LTC_SAFER block ciphers -*/ - -#include "tomcrypt.h" +*/ -#if defined(LTC_SAFERP) || defined(LTC_SAFER) +#ifdef __LTC_SAFER_TAB_C__ -/* This is the box defined by ebox[x] = 45^x mod 257. +/* This is the box defined by ebox[x] = 45^x mod 257. * Its assumed that the value "256" corresponds to zero. */ -const unsigned char safer_ebox[256] = { - 1, 45, 226, 147, 190, 69, 21, 174, 120, 3, 135, 164, 184, 56, 207, 63, - 8, 103, 9, 148, 235, 38, 168, 107, 189, 24, 52, 27, 187, 191, 114, 247, - 64, 53, 72, 156, 81, 47, 59, 85, 227, 192, 159, 216, 211, 243, 141, 177, -255, 167, 62, 220, 134, 119, 215, 166, 17, 251, 244, 186, 146, 145, 100, 131, -241, 51, 239, 218, 44, 181, 178, 43, 136, 209, 153, 203, 140, 132, 29, 20, -129, 151, 113, 202, 95, 163, 139, 87, 60, 130, 196, 82, 92, 28, 232, 160, - 4, 180, 133, 74, 246, 19, 84, 182, 223, 12, 26, 142, 222, 224, 57, 252, - 32, 155, 36, 78, 169, 152, 158, 171, 242, 96, 208, 108, 234, 250, 199, 217, - 0, 212, 31, 110, 67, 188, 236, 83, 137, 254, 122, 93, 73, 201, 50, 194, -249, 154, 248, 109, 22, 219, 89, 150, 68, 233, 205, 230, 70, 66, 143, 10, -193, 204, 185, 101, 176, 210, 198, 172, 30, 65, 98, 41, 46, 14, 116, 80, - 2, 90, 195, 37, 123, 138, 42, 91, 240, 6, 13, 71, 111, 112, 157, 126, - 16, 206, 18, 39, 213, 76, 79, 214, 121, 48, 104, 54, 117, 125, 228, 237, -128, 106, 144, 55, 162, 94, 118, 170, 197, 127, 61, 175, 165, 229, 25, 97, -253, 77, 124, 183, 11, 238, 173, 75, 34, 245, 231, 115, 35, 33, 200, 5, +static const unsigned char safer_ebox[256] = { + 1, 45, 226, 147, 190, 69, 21, 174, 120, 3, 135, 164, 184, 56, 207, 63, + 8, 103, 9, 148, 235, 38, 168, 107, 189, 24, 52, 27, 187, 191, 114, 247, + 64, 53, 72, 156, 81, 47, 59, 85, 227, 192, 159, 216, 211, 243, 141, 177, +255, 167, 62, 220, 134, 119, 215, 166, 17, 251, 244, 186, 146, 145, 100, 131, +241, 51, 239, 218, 44, 181, 178, 43, 136, 209, 153, 203, 140, 132, 29, 20, +129, 151, 113, 202, 95, 163, 139, 87, 60, 130, 196, 82, 92, 28, 232, 160, + 4, 180, 133, 74, 246, 19, 84, 182, 223, 12, 26, 142, 222, 224, 57, 252, + 32, 155, 36, 78, 169, 152, 158, 171, 242, 96, 208, 108, 234, 250, 199, 217, + 0, 212, 31, 110, 67, 188, 236, 83, 137, 254, 122, 93, 73, 201, 50, 194, +249, 154, 248, 109, 22, 219, 89, 150, 68, 233, 205, 230, 70, 66, 143, 10, +193, 204, 185, 101, 176, 210, 198, 172, 30, 65, 98, 41, 46, 14, 116, 80, + 2, 90, 195, 37, 123, 138, 42, 91, 240, 6, 13, 71, 111, 112, 157, 126, + 16, 206, 18, 39, 213, 76, 79, 214, 121, 48, 104, 54, 117, 125, 228, 237, +128, 106, 144, 55, 162, 94, 118, 170, 197, 127, 61, 175, 165, 229, 25, 97, +253, 77, 124, 183, 11, 238, 173, 75, 34, 245, 231, 115, 35, 33, 200, 5, 225, 102, 221, 179, 88, 105, 99, 86, 15, 161, 49, 149, 23, 7, 58, 40 }; /* This is the inverse of ebox or the base 45 logarithm */ -const unsigned char safer_lbox[256] = { +static const unsigned char safer_lbox[256] = { 128, 0, 176, 9, 96, 239, 185, 253, 16, 18, 159, 228, 105, 186, 173, 248, 192, 56, 194, 101, 79, 6, 148, 252, 25, 222, 106, 27, 93, 78, 168, 130, -112, 237, 232, 236, 114, 179, 21, 195, 255, 171, 182, 71, 68, 1, 172, 37, -201, 250, 142, 65, 26, 33, 203, 211, 13, 110, 254, 38, 88, 218, 50, 15, - 32, 169, 157, 132, 152, 5, 156, 187, 34, 140, 99, 231, 197, 225, 115, 198, -175, 36, 91, 135, 102, 39, 247, 87, 244, 150, 177, 183, 92, 139, 213, 84, -121, 223, 170, 246, 62, 163, 241, 17, 202, 245, 209, 23, 123, 147, 131, 188, +112, 237, 232, 236, 114, 179, 21, 195, 255, 171, 182, 71, 68, 1, 172, 37, +201, 250, 142, 65, 26, 33, 203, 211, 13, 110, 254, 38, 88, 218, 50, 15, + 32, 169, 157, 132, 152, 5, 156, 187, 34, 140, 99, 231, 197, 225, 115, 198, +175, 36, 91, 135, 102, 39, 247, 87, 244, 150, 177, 183, 92, 139, 213, 84, +121, 223, 170, 246, 62, 163, 241, 17, 202, 245, 209, 23, 123, 147, 131, 188, 189, 82, 30, 235, 174, 204, 214, 53, 8, 200, 138, 180, 226, 205, 191, 217, -208, 80, 89, 63, 77, 98, 52, 10, 72, 136, 181, 86, 76, 46, 107, 158, -210, 61, 60, 3, 19, 251, 151, 81, 117, 74, 145, 113, 35, 190, 118, 42, +208, 80, 89, 63, 77, 98, 52, 10, 72, 136, 181, 86, 76, 46, 107, 158, +210, 61, 60, 3, 19, 251, 151, 81, 117, 74, 145, 113, 35, 190, 118, 42, 95, 249, 212, 85, 11, 220, 55, 49, 22, 116, 215, 119, 167, 230, 7, 219, -164, 47, 70, 243, 97, 69, 103, 227, 12, 162, 59, 28, 133, 24, 4, 29, - 41, 160, 143, 178, 90, 216, 166, 126, 238, 141, 83, 75, 161, 154, 193, 14, -122, 73, 165, 44, 129, 196, 199, 54, 43, 127, 67, 149, 51, 242, 108, 104, -109, 240, 2, 40, 206, 221, 155, 234, 94, 153, 124, 20, 134, 207, 229, 66, +164, 47, 70, 243, 97, 69, 103, 227, 12, 162, 59, 28, 133, 24, 4, 29, + 41, 160, 143, 178, 90, 216, 166, 126, 238, 141, 83, 75, 161, 154, 193, 14, +122, 73, 165, 44, 129, 196, 199, 54, 43, 127, 67, 149, 51, 242, 108, 104, +109, 240, 2, 40, 206, 221, 155, 234, 94, 153, 124, 20, 134, 207, 229, 66, 184, 64, 120, 45, 58, 233, 100, 31, 146, 144, 125, 57, 111, 224, 137, 48 }; -#endif +#endif /* __LTC_SAFER_TAB_C__ */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/safer/saferp.c --- a/libtomcrypt/src/ciphers/safer/saferp.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/ciphers/safer/saferp.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,18 +5,19 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/** +/** @file saferp.c - LTC_SAFER+ Implementation by Tom St Denis + LTC_SAFER+ Implementation by Tom St Denis */ #include "tomcrypt.h" #ifdef LTC_SAFERP +#define __LTC_SAFER_TAB_C__ +#include "safer_tab.c" + const struct ltc_cipher_descriptor saferp_desc = { "safer+", @@ -28,23 +29,21 @@ &saferp_test, &saferp_done, &saferp_keysize, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; -/* ROUND(b,i) +/* ROUND(b,i) * - * This is one forward key application. Note the basic form is - * key addition, substitution, key addition. The safer_ebox and safer_lbox - * are the exponentiation box and logarithm boxes respectively. - * The value of 'i' is the current round number which allows this - * function to be unrolled massively. Most of LTC_SAFER+'s speed - * comes from not having to compute indirect accesses into the + * This is one forward key application. Note the basic form is + * key addition, substitution, key addition. The safer_ebox and safer_lbox + * are the exponentiation box and logarithm boxes respectively. + * The value of 'i' is the current round number which allows this + * function to be unrolled massively. Most of LTC_SAFER+'s speed + * comes from not having to compute indirect accesses into the * array of 16 bytes b[0..15] which is the block of data */ -extern const unsigned char safer_ebox[], safer_lbox[]; - -#define ROUND(b, i) \ +#define ROUND(b, i) do { \ b[0] = (safer_ebox[(b[0] ^ skey->saferp.K[i][0]) & 255] + skey->saferp.K[i+1][0]) & 255; \ b[1] = safer_lbox[(b[1] + skey->saferp.K[i][1]) & 255] ^ skey->saferp.K[i+1][1]; \ b[2] = safer_lbox[(b[2] + skey->saferp.K[i][2]) & 255] ^ skey->saferp.K[i+1][2]; \ @@ -60,10 +59,11 @@ b[12] = (safer_ebox[(b[12] ^ skey->saferp.K[i][12]) & 255] + skey->saferp.K[i+1][12]) & 255; \ b[13] = safer_lbox[(b[13] + skey->saferp.K[i][13]) & 255] ^ skey->saferp.K[i+1][13]; \ b[14] = safer_lbox[(b[14] + skey->saferp.K[i][14]) & 255] ^ skey->saferp.K[i+1][14]; \ - b[15] = (safer_ebox[(b[15] ^ skey->saferp.K[i][15]) & 255] + skey->saferp.K[i+1][15]) & 255; + b[15] = (safer_ebox[(b[15] ^ skey->saferp.K[i][15]) & 255] + skey->saferp.K[i+1][15]) & 255; \ +} while (0) /* This is one inverse key application */ -#define iROUND(b, i) \ +#define iROUND(b, i) do { \ b[0] = safer_lbox[(b[0] - skey->saferp.K[i+1][0]) & 255] ^ skey->saferp.K[i][0]; \ b[1] = (safer_ebox[(b[1] ^ skey->saferp.K[i+1][1]) & 255] - skey->saferp.K[i][1]) & 255; \ b[2] = (safer_ebox[(b[2] ^ skey->saferp.K[i+1][2]) & 255] - skey->saferp.K[i][2]) & 255; \ @@ -79,10 +79,11 @@ b[12] = safer_lbox[(b[12] - skey->saferp.K[i+1][12]) & 255] ^ skey->saferp.K[i][12]; \ b[13] = (safer_ebox[(b[13] ^ skey->saferp.K[i+1][13]) & 255] - skey->saferp.K[i][13]) & 255; \ b[14] = (safer_ebox[(b[14] ^ skey->saferp.K[i+1][14]) & 255] - skey->saferp.K[i][14]) & 255; \ - b[15] = safer_lbox[(b[15] - skey->saferp.K[i+1][15]) & 255] ^ skey->saferp.K[i][15]; + b[15] = safer_lbox[(b[15] - skey->saferp.K[i+1][15]) & 255] ^ skey->saferp.K[i][15]; \ +} while (0) /* This is a forward single layer PHT transform. */ -#define PHT(b) \ +#define PHT(b) do { \ b[0] = (b[0] + (b[1] = (b[0] + b[1]) & 255)) & 255; \ b[2] = (b[2] + (b[3] = (b[3] + b[2]) & 255)) & 255; \ b[4] = (b[4] + (b[5] = (b[5] + b[4]) & 255)) & 255; \ @@ -90,10 +91,11 @@ b[8] = (b[8] + (b[9] = (b[9] + b[8]) & 255)) & 255; \ b[10] = (b[10] + (b[11] = (b[11] + b[10]) & 255)) & 255; \ b[12] = (b[12] + (b[13] = (b[13] + b[12]) & 255)) & 255; \ - b[14] = (b[14] + (b[15] = (b[15] + b[14]) & 255)) & 255; + b[14] = (b[14] + (b[15] = (b[15] + b[14]) & 255)) & 255; \ +} while (0) /* This is an inverse single layer PHT transform */ -#define iPHT(b) \ +#define iPHT(b) do { \ b[15] = (b[15] - (b[14] = (b[14] - b[15]) & 255)) & 255; \ b[13] = (b[13] - (b[12] = (b[12] - b[13]) & 255)) & 255; \ b[11] = (b[11] - (b[10] = (b[10] - b[11]) & 255)) & 255; \ @@ -102,41 +104,46 @@ b[5] = (b[5] - (b[4] = (b[4] - b[5]) & 255)) & 255; \ b[3] = (b[3] - (b[2] = (b[2] - b[3]) & 255)) & 255; \ b[1] = (b[1] - (b[0] = (b[0] - b[1]) & 255)) & 255; \ + } while (0) /* This is the "Armenian" Shuffle. It takes the input from b and stores it in b2 */ -#define SHUF(b, b2) \ +#define SHUF(b, b2) do { \ b2[0] = b[8]; b2[1] = b[11]; b2[2] = b[12]; b2[3] = b[15]; \ b2[4] = b[2]; b2[5] = b[1]; b2[6] = b[6]; b2[7] = b[5]; \ b2[8] = b[10]; b2[9] = b[9]; b2[10] = b[14]; b2[11] = b[13]; \ - b2[12] = b[0]; b2[13] = b[7]; b2[14] = b[4]; b2[15] = b[3]; + b2[12] = b[0]; b2[13] = b[7]; b2[14] = b[4]; b2[15] = b[3]; \ +} while (0) /* This is the inverse shuffle. It takes from b and gives to b2 */ -#define iSHUF(b, b2) \ +#define iSHUF(b, b2) do { \ b2[0] = b[12]; b2[1] = b[5]; b2[2] = b[4]; b2[3] = b[15]; \ b2[4] = b[14]; b2[5] = b[7]; b2[6] = b[6]; b2[7] = b[13]; \ b2[8] = b[0]; b2[9] = b[9]; b2[10] = b[8]; b2[11] = b[1]; \ - b2[12] = b[2]; b2[13] = b[11]; b2[14] = b[10]; b2[15] = b[3]; + b2[12] = b[2]; b2[13] = b[11]; b2[14] = b[10]; b2[15] = b[3]; \ +} while (0) -/* The complete forward Linear Transform layer. - * Note that alternating usage of b and b2. - * Each round of LT starts in 'b' and ends in 'b2'. +/* The complete forward Linear Transform layer. + * Note that alternating usage of b and b2. + * Each round of LT starts in 'b' and ends in 'b2'. */ -#define LT(b, b2) \ +#define LT(b, b2) do { \ PHT(b); SHUF(b, b2); \ PHT(b2); SHUF(b2, b); \ PHT(b); SHUF(b, b2); \ - PHT(b2); + PHT(b2); \ +} while (0) /* This is the inverse linear transform layer. */ -#define iLT(b, b2) \ +#define iLT(b, b2) do { \ iPHT(b); \ iSHUF(b, b2); iPHT(b2); \ iSHUF(b2, b); iPHT(b); \ - iSHUF(b, b2); iPHT(b2); - -#ifdef LTC_SMALL_CODE + iSHUF(b, b2); iPHT(b2); \ +} while (0) -static void _round(unsigned char *b, int i, symmetric_key *skey) +#ifdef LTC_SMALL_CODE + +static void _round(unsigned char *b, int i, symmetric_key *skey) { ROUND(b, i); } @@ -154,7 +161,7 @@ static void _ilt(unsigned char *b, unsigned char *b2) { iLT(b, b2); -} +} #undef ROUND #define ROUND(b, i) _round(b, i, skey) @@ -228,7 +235,7 @@ } /* Is the number of rounds valid? Either use zero for default or - * 8,12,16 rounds for 16,24,32 byte keys + * 8,12,16 rounds for 16,24,32 byte keys */ if (num_rounds != 0 && num_rounds != rounds[(keylen/8)-2]) { return CRYPT_INVALID_ROUNDS; @@ -237,9 +244,9 @@ /* 128 bit key version */ if (keylen == 16) { /* copy key into t */ - for (x = y = 0; x < 16; x++) { - t[x] = key[x]; - y ^= key[x]; + for (x = y = 0; x < 16; x++) { + t[x] = key[x]; + y ^= key[x]; } t[16] = y; @@ -265,9 +272,9 @@ skey->saferp.rounds = 8; } else if (keylen == 24) { /* copy key into t */ - for (x = y = 0; x < 24; x++) { - t[x] = key[x]; - y ^= key[x]; + for (x = y = 0; x < 24; x++) { + t[x] = key[x]; + y ^= key[x]; } t[24] = y; @@ -284,7 +291,7 @@ /* select and add */ z = x; - for (y = 0; y < 16; y++) { + for (y = 0; y < 16; y++) { skey->saferp.K[x][y] = (t[z] + safer_bias[x-1][y]) & 255; if (++z == 25) { z = 0; } } @@ -292,14 +299,14 @@ skey->saferp.rounds = 12; } else { /* copy key into t */ - for (x = y = 0; x < 32; x++) { - t[x] = key[x]; - y ^= key[x]; + for (x = y = 0; x < 32; x++) { + t[x] = key[x]; + y ^= key[x]; } t[32] = y; /* make round keys */ - for (x = 0; x < 16; x++) { + for (x = 0; x < 16; x++) { skey->saferp.K[0][x] = t[x]; } @@ -308,7 +315,7 @@ for (y = 0; y < 33; y++) { t[y] = ((t[y]<<3)|(t[y]>>5)) & 255; } - + /* select and add */ z = x; for (y = 0; y < 16; y++) { @@ -392,7 +399,7 @@ Decrypts a block of text with LTC_SAFER+ @param ct The input ciphertext (16 bytes) @param pt The output plaintext (16 bytes) - @param skey The key as scheduled + @param skey The key as scheduled @return CRYPT_OK if successful */ int saferp_ecb_decrypt(const unsigned char *ct, unsigned char *pt, symmetric_key *skey) @@ -460,40 +467,40 @@ { #ifndef LTC_TEST return CRYPT_NOP; - #else + #else static const struct { int keylen; unsigned char key[32], pt[16], ct[16]; } tests[] = { { 16, - { 41, 35, 190, 132, 225, 108, 214, 174, + { 41, 35, 190, 132, 225, 108, 214, 174, 82, 144, 73, 241, 241, 187, 233, 235 }, - { 179, 166, 219, 60, 135, 12, 62, 153, + { 179, 166, 219, 60, 135, 12, 62, 153, 36, 94, 13, 28, 6, 183, 71, 222 }, - { 224, 31, 182, 10, 12, 255, 84, 70, + { 224, 31, 182, 10, 12, 255, 84, 70, 127, 13, 89, 249, 9, 57, 165, 220 } }, { 24, - { 72, 211, 143, 117, 230, 217, 29, 42, - 229, 192, 247, 43, 120, 129, 135, 68, + { 72, 211, 143, 117, 230, 217, 29, 42, + 229, 192, 247, 43, 120, 129, 135, 68, 14, 95, 80, 0, 212, 97, 141, 190 }, - { 123, 5, 21, 7, 59, 51, 130, 31, + { 123, 5, 21, 7, 59, 51, 130, 31, 24, 112, 146, 218, 100, 84, 206, 177 }, - { 92, 136, 4, 63, 57, 95, 100, 0, + { 92, 136, 4, 63, 57, 95, 100, 0, 150, 130, 130, 16, 193, 111, 219, 133 } }, { 32, - { 243, 168, 141, 254, 190, 242, 235, 113, + { 243, 168, 141, 254, 190, 242, 235, 113, 255, 160, 208, 59, 117, 6, 140, 126, - 135, 120, 115, 77, 208, 190, 130, 190, + 135, 120, 115, 77, 208, 190, 130, 190, 219, 194, 70, 65, 43, 140, 250, 48 }, - { 127, 112, 240, 167, 84, 134, 50, 149, + { 127, 112, 240, 167, 84, 134, 50, 149, 170, 91, 104, 19, 11, 230, 252, 245 }, - { 88, 11, 25, 36, 172, 229, 202, 213, + { 88, 11, 25, 36, 172, 229, 202, 213, 170, 65, 105, 153, 220, 104, 153, 138 } } - }; + }; unsigned char tmp[2][16]; symmetric_key skey; @@ -507,7 +514,8 @@ saferp_ecb_decrypt(tmp[0], tmp[1], &skey); /* compare */ - if (XMEMCMP(tmp[0], tests[i].ct, 16) || XMEMCMP(tmp[1], tests[i].pt, 16)) { + if (compare_testvector(tmp[0], 16, tests[i].ct, 16, "Safer+ Encrypt", i) || + compare_testvector(tmp[1], 16, tests[i].pt, 16, "Safer+ Decrypt", i)) { return CRYPT_FAIL_TESTVECTOR; } @@ -522,11 +530,12 @@ #endif } -/** Terminate the context +/** Terminate the context @param skey The scheduled key */ void saferp_done(symmetric_key *skey) { + LTC_UNUSED_PARAM(skey); } /** @@ -537,7 +546,7 @@ int saferp_keysize(int *keysize) { LTC_ARGCHK(keysize != NULL); - + if (*keysize < 16) return CRYPT_INVALID_KEYSIZE; if (*keysize < 24) { @@ -554,6 +563,6 @@ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/skipjack.c --- a/libtomcrypt/src/ciphers/skipjack.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/ciphers/skipjack.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -28,7 +26,7 @@ &skipjack_test, &skipjack_done, &skipjack_keysize, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; static const unsigned char sbox[256] = { @@ -75,7 +73,7 @@ return CRYPT_INVALID_KEYSIZE; } - if (num_rounds != 32 && num_rounds != 0) { + if (num_rounds != 32 && num_rounds != 0) { return CRYPT_INVALID_ROUNDS; } @@ -201,7 +199,7 @@ Decrypts a block of text with Skipjack @param ct The input ciphertext (8 bytes) @param pt The output plaintext (8 bytes) - @param skey The key as scheduled + @param skey The key as scheduled @return CRYPT_OK if successful */ #ifdef LTC_CLEAN_STACK @@ -223,7 +221,7 @@ w3 = ((unsigned)ct[4]<<8)|ct[5]; w4 = ((unsigned)ct[6]<<8)|ct[7]; - /* 8 rounds of RULE B^-1 + /* 8 rounds of RULE B^-1 Note the value "kp = 8" comes from "kp = (32 * 4) mod 10" where 32*4 is 128 which mod 10 is 8 */ @@ -273,7 +271,7 @@ { #ifndef LTC_TEST return CRYPT_NOP; - #else + #else static const struct { unsigned char key[10], pt[8], ct[8]; } tests[] = { @@ -298,7 +296,8 @@ skipjack_ecb_decrypt(buf[0], buf[1], &key); /* compare */ - if (XMEMCMP(buf[0], tests[x].ct, 8) != 0 || XMEMCMP(buf[1], tests[x].pt, 8) != 0) { + if (compare_testvector(buf[0], 8, tests[x].ct, 8, "Skipjack Encrypt", x) != 0 || + compare_testvector(buf[1], 8, tests[x].pt, 8, "Skipjack Decrypt", x) != 0) { return CRYPT_FAIL_TESTVECTOR; } @@ -313,11 +312,12 @@ #endif } -/** Terminate the context +/** Terminate the context @param skey The scheduled key */ void skipjack_done(symmetric_key *skey) { + LTC_UNUSED_PARAM(skey); } /** @@ -338,6 +338,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/twofish/twofish.c --- a/libtomcrypt/src/ciphers/twofish/twofish.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/ciphers/twofish/twofish.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -35,23 +33,13 @@ &twofish_test, &twofish_done, &twofish_keysize, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; /* the two polynomials */ #define MDS_POLY 0x169 #define RS_POLY 0x14D -/* The 4x4 MDS Linear Transform */ -#if 0 -static const unsigned char MDS[4][4] = { - { 0x01, 0xEF, 0x5B, 0x5B }, - { 0x5B, 0xEF, 0xEF, 0x01 }, - { 0xEF, 0x5B, 0x01, 0xEF }, - { 0xEF, 0x01, 0xEF, 0x5B } -}; -#endif - /* The 4x8 RS Linear Transform */ static const unsigned char RS[4][8] = { { 0x01, 0xA4, 0x55, 0x87, 0x5A, 0x58, 0xDB, 0x9E }, @@ -60,6 +48,7 @@ { 0XA4, 0X55, 0X87, 0X5A, 0X58, 0XDB, 0X9E, 0X03 } }; +#ifdef LTC_TWOFISH_SMALL /* sbox usage orderings */ static const unsigned char qord[4][5] = { { 1, 1, 0, 0, 1 }, @@ -67,9 +56,11 @@ { 0, 0, 0, 1, 1 }, { 1, 0, 1, 1, 0 } }; +#endif /* LTC_TWOFISH_SMALL */ #ifdef LTC_TWOFISH_TABLES +#define __LTC_TWOFISH_TAB_C__ #include "twofish_tab.c" #define sbox(i, x) ((ulong32)SBOX[i][(x)&255]) @@ -259,16 +250,19 @@ y[1] = (unsigned char)(sbox(0, (ulong32)y[1]) ^ M[4 * (6 + offset) + 1]); y[2] = (unsigned char)(sbox(0, (ulong32)y[2]) ^ M[4 * (6 + offset) + 2]); y[3] = (unsigned char)(sbox(1, (ulong32)y[3]) ^ M[4 * (6 + offset) + 3]); + /* FALLTHROUGH */ case 3: y[0] = (unsigned char)(sbox(1, (ulong32)y[0]) ^ M[4 * (4 + offset) + 0]); y[1] = (unsigned char)(sbox(1, (ulong32)y[1]) ^ M[4 * (4 + offset) + 1]); y[2] = (unsigned char)(sbox(0, (ulong32)y[2]) ^ M[4 * (4 + offset) + 2]); y[3] = (unsigned char)(sbox(0, (ulong32)y[3]) ^ M[4 * (4 + offset) + 3]); + /* FALLTHROUGH */ case 2: y[0] = (unsigned char)(sbox(1, sbox(0, sbox(0, (ulong32)y[0]) ^ M[4 * (2 + offset) + 0]) ^ M[4 * (0 + offset) + 0])); y[1] = (unsigned char)(sbox(0, sbox(0, sbox(1, (ulong32)y[1]) ^ M[4 * (2 + offset) + 1]) ^ M[4 * (0 + offset) + 1])); y[2] = (unsigned char)(sbox(1, sbox(1, sbox(0, (ulong32)y[2]) ^ M[4 * (2 + offset) + 2]) ^ M[4 * (0 + offset) + 2])); y[3] = (unsigned char)(sbox(0, sbox(1, sbox(1, (ulong32)y[3]) ^ M[4 * (2 + offset) + 3]) ^ M[4 * (0 + offset) + 3])); + /* FALLTHROUGH */ } mds_mult(y, out); } @@ -663,10 +657,8 @@ } twofish_ecb_encrypt(tests[i].pt, tmp[0], &key); twofish_ecb_decrypt(tmp[0], tmp[1], &key); - if (XMEMCMP(tmp[0], tests[i].ct, 16) != 0 || XMEMCMP(tmp[1], tests[i].pt, 16) != 0) { -#if 0 - printf("Twofish failed test %d, %d, %d\n", i, XMEMCMP(tmp[0], tests[i].ct, 16), XMEMCMP(tmp[1], tests[i].pt, 16)); -#endif + if (compare_testvector(tmp[0], 16, tests[i].ct, 16, "Twofish Encrypt", i) != 0 || + compare_testvector(tmp[1], 16, tests[i].pt, 16, "Twofish Decrypt", i) != 0) { return CRYPT_FAIL_TESTVECTOR; } /* now see if we can encrypt all zero bytes 1000 times, decrypt and come back where we started */ @@ -684,7 +676,7 @@ */ void twofish_done(symmetric_key *skey) { - (void)skey; + LTC_UNUSED_PARAM(skey); } /** @@ -714,6 +706,6 @@ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/twofish/twofish_tab.c --- a/libtomcrypt/src/ciphers/twofish/twofish_tab.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/ciphers/twofish/twofish_tab.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -14,201 +12,202 @@ Twofish tables, Tom St Denis */ #ifdef LTC_TWOFISH_TABLES +#ifdef __LTC_TWOFISH_TAB_C__ /* pre generated 8x8 tables from the four 4x4s */ static const unsigned char SBOX[2][256] = { { - 0xa9, 0x67, 0xb3, 0xe8, 0x04, 0xfd, 0xa3, 0x76, 0x9a, 0x92, - 0x80, 0x78, 0xe4, 0xdd, 0xd1, 0x38, 0x0d, 0xc6, 0x35, 0x98, - 0x18, 0xf7, 0xec, 0x6c, 0x43, 0x75, 0x37, 0x26, 0xfa, 0x13, - 0x94, 0x48, 0xf2, 0xd0, 0x8b, 0x30, 0x84, 0x54, 0xdf, 0x23, - 0x19, 0x5b, 0x3d, 0x59, 0xf3, 0xae, 0xa2, 0x82, 0x63, 0x01, - 0x83,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e9, 0xcf, 0xbf, 0xba, 0xea, 0x77, 0x39, 0xaf, 0x33, 0xc9, + 0x62, 0x71, 0x81, 0x79, 0x09, 0xad, 0x24, 0xcd, 0xf9, 0xd8, + 0xe5, 0xc5, 0xb9, 0x4d, 0x44, 0x08, 0x86, 0xe7, 0xa1, 0x1d, + 0xaa, 0xed, 0x06, 0x70, 0xb2, 0xd2, 0x41, 0x7b, 0xa0, 0x11, 0x31, 0xc2, 0x27, 0x90, 0x20, 0xf6, 0x60, 0xff, 0x96, 0x5c, - 0xb1, 0xab, 0x9e, 0x9c, 0x52, 0x1b, 0x5f, 0x93, 0x0a, 0xef, - 0x91, 0x85, 0x49, 0xee, 0x2d, 0x4f, 0x8f, 0x3b, 0x47, 0x87, - 0x6d, 0x46, 0xd6, 0x3e, 0x69, 0x64, 0x2a, 0xce, 0xcb, 0x2f, - 0xfc, 0x97, 0x05, 0x7a, 0xac, 0x7f, 0xd5, 0x1a, 0x4b, 0x0e, - 0xa7, 0x5a, 0x28, 0x14, 0x3f, 0x29, 0x88, 0x3c, 0x4c, 0x02, - 0xb8, 0xda, 0xb0, 0x17, 0x55, 0x1f, 0x8a, 0x7d, 0x57, 0xc7, - 0x8d, 0x74, 0xb7, 0xc4, 0x9f, 0x72, 0x7e, 0x15, 0x22, 0x12, - 0x58, 0x07, 0x99, 0x34, 0x6e, 0x50, 0xde, 0x68, 0x65, 0xbc, - 0xdb, 0xf8, 0xc8, 0xa8, 0x2b, 0x40, 0xdc, 0xfe, 0x32, 0xa4, - 0xca, 0x10, 0x21, 0xf0, 0xd3, 0x5d, 0x0f, 0x00, 0x6f, 0x9d, + 0xb1, 0xab, 0x9e, 0x9c, 0x52, 0x1b, 0x5f, 0x93, 0x0a, 0xef, + 0x91, 0x85, 0x49, 0xee, 0x2d, 0x4f, 0x8f, 0x3b, 0x47, 0x87, + 0x6d, 0x46, 0xd6, 0x3e, 0x69, 0x64, 0x2a, 0xce, 0xcb, 0x2f, + 0xfc, 0x97, 0x05,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d2, 0xd5, 0xa0, 0x84, + 0x07, 0x14, 0xb5, 0x90, 0x2c, 0xa3, 0xb2, 0x73, 0x4c, 0x54, + 0x92, 0x74, 0x36, 0x51, 0x38, 0xb0, 0xbd, 0x5a, 0xfc, 0x60, + 0x62, 0x96, 0x6c, 0x42, 0xf7, 0x10, 0x7c, 0x28, 0x27, 0x8c, + 0x13, 0x95, 0x9c, 0xc7, 0x24, 0x46, 0x3b, 0x70, 0xca, 0xe3, 0x85, 0xcb, 0x11, 0xd0, 0x93, 0xb8, 0xa6, 0x83, 0x20, 0xff, - 0x9f, 0x77, 0xc3, 0xcc, 0x03, 0x6f, 0x08, 0xbf, 0x40, 0xe7, - 0x2b, 0xe2, 0x79, 0x0c, 0xaa, 0x82, 0x41, 0x3a, 0xea, 0xb9, - 0xe4, 0x9a, 0xa4, 0x97, 0x7e, 0xda, 0x7a, 0x17, 0x66, 0x94, - 0xa1, 0x1d, 0x3d, 0xf0, 0xde, 0xb3, 0x0b, 0x72, 0xa7, 0x1c, - 0xef, 0xd1, 0x53, 0x3e, 0x8f, 0x33, 0x26, 0x5f, 0xec, 0x76, - 0x2a, 0x49, 0x81, 0x88, 0xee, 0x21, 0xc4, 0x1a, 0xeb, 0xd9, - 0xc5, 0x39, 0x99, 0xcd, 0xad, 0x31, 0x8b, 0x01, 0x18, 0x23, - 0xdd, 0x1f, 0x4e, 0x2d, 0xf9, 0x48, 0x4f, 0xf2, 0x65, 0x8e, - 0x78, 0x5c, 0x58, 0x19, 0x8d, 0xe5, 0x98, 0x57, 0x67, 0x7f, - 0x05, 0x64, 0xaf, 0x63, 0xb6, 0xfe, 0xf5, 0xb7, 0x3c, 0xa5, - 0xce, 0xe9, 0x68, 0x44, 0xe0, 0x4d, 0x43, 0x69, 0x29, 0x2e, - 0xac, 0x15, 0x59, 0xa8, 0x0a, 0x9e, 0x6e, 0x47, 0xdf, 0x34, - 0x35, 0x6a, 0xcf, 0xdc, 0x22, 0xc9, 0xc0, 0x9b, 0x89, 0xd4, - 0xed, 0xab, 0x12, 0xa2, 0x0d, 0x52, 0xbb, 0x02, 0x2f, 0xa9, - 0xd7, 0x61, 0x1e, 0xb4, 0x50, 0x04, 0xf6, 0xc2, 0x16, 0x25, + 0x9f, 0x77, 0xc3, 0xcc, 0x03, 0x6f, 0x08, 0xbf, 0x40, 0xe7, + 0x2b, 0xe2, 0x79, 0x0c, 0xaa, 0x82, 0x41, 0x3a, 0xea, 0xb9, + 0xe4, 0x9a, 0xa4, 0x97, 0x7e, 0xda, 0x7a, 0x17, 0x66, 0x94, + 0xa1, 0x1d, 0x3d, 0xf0, 0xde, 0xb3, 0x0b, 0x72, 0xa7, 0x1c, + 0xef, 0xd1, 0x53, 0x3e, 0x8f, 0x33, 0x26, 0x5f, 0xec, 0x76, + 0x2a, 0x49, 0x81, 0x88, 0xee, 0x21, 0xc4, 0x1a, 0xeb, 0xd9, + 0xc5, 0x39, 0x99, 0xcd, 0xad, 0x31, 0x8b, 0x01, 0x18, 0x23, + 0xdd, 0x1f, 0x4e, 0x2d, 0xf9, 0x48, 0x4f, 0xf2, 0x65, 0x8e, + 0x78, 0x5c, 0x58, 0x19, 0x8d, 0xe5, 0x98, 0x57, 0x67, 0x7f, + 0x05, 0x64, 0xaf, 0x63, 0xb6, 0xfe, 0xf5, 0xb7, 0x3c, 0xa5, + 0xce, 0xe9, 0x68, 0x44, 0xe0, 0x4d, 0x43, 0x69, 0x29, 0x2e, + 0xac, 0x15, 0x59, 0xa8, 0x0a, 0x9e, 0x6e, 0x47, 0xdf, 0x34, + 0x35, 0x6a, 0xcf, 0xdc, 0x22, 0xc9, 0xc0, 0x9b, 0x89, 0xd4, + 0xed, 0xab, 0x12, 0xa2, 0x0d, 0x52, 0xbb, 0x02, 0x2f, 0xa9, + 0xd7, 0x61, 0x1e, 0xb4, 0x50, 0x04, 0xf6, 0xc2, 0x16, 0x25, 0x86, 0x56, 0x55, 0x09, 0xbe, 0x91} }; /* the 4x4 MDS in a nicer format */ static const ulong32 mds_tab[4][256] = { { -0x00000000UL, 0xefef5b01UL, 0xb7b7b602UL, 0x5858ed03UL, 0x07070504UL, 0xe8e85e05UL, 0xb0b0b306UL, 0x5f5fe807UL, -0x0e0e0a08UL, 0xe1e15109UL, 0xb9b9bc0aUL, 0x5656e70bUL, 0x09090f0cUL, 0xe6e6540dUL, 0xbebeb90eUL, 0x5151e20fUL, -0x1c1c1410UL, 0xf3f34f11UL, 0xababa212UL, 0x4444f913UL, 0x1b1b1114UL, 0xf4f44a15UL, 0xacaca716UL, 0x4343fc17UL, -0x12121e18UL, 0xfdfd4519UL, 0xa5a5a81aUL, 0x4a4af31bUL, 0x15151b1cUL, 0xfafa401dUL, 0xa2a2ad1eUL, 0x4d4df61fUL, -0x38382820UL, 0xd7d77321UL, 0x8f8f9e22UL, 0x6060c523UL, 0x3f3f2d24UL, 0xd0d07625UL, 0x88889b26UL, 0x6767c027UL, -0x36362228UL, 0xd9d97929UL, 0x8181942aUL, 0x6e6ecf2bUL, 0x3131272cUL, 0xdede7c2dUL, 0x8686912eUL, 0x6969ca2fUL, -0x24243c30UL, 0xcbcb6731UL, 0x93938a32UL, 0x7c7cd133UL, 0x23233934UL, 0xcccc6235UL, 0x94948f36UL, 0x7b7bd437UL, -0x2a2a3638UL, 0xc5c56d39UL, 0x9d9d803aUL, 0x7272db3bUL, 0x2d2d333cUL, 0xc2c2683dUL, 0x9a9a853eUL, 0x7575de3fUL, +0x00000000UL, 0xefef5b01UL, 0xb7b7b602UL, 0x5858ed03UL, 0x07070504UL, 0xe8e85e05UL, 0xb0b0b306UL, 0x5f5fe807UL, +0x0e0e0a08UL, 0xe1e15109UL, 0xb9b9bc0aUL, 0x5656e70bUL, 0x09090f0cUL, 0xe6e6540dUL, 0xbebeb90eUL, 0x5151e20fUL, +0x1c1c1410UL, 0xf3f34f11UL, 0xababa212UL, 0x4444f913UL, 0x1b1b1114UL, 0xf4f44a15UL, 0xacaca716UL, 0x4343fc17UL, +0x12121e18UL, 0xfdfd4519UL, 0xa5a5a81aUL, 0x4a4af31bUL, 0x15151b1cUL, 0xfafa401dUL, 0xa2a2ad1eUL, 0x4d4df61fUL, +0x38382820UL, 0xd7d77321UL, 0x8f8f9e22UL, 0x6060c523UL, 0x3f3f2d24UL, 0xd0d07625UL, 0x88889b26UL, 0x6767c027UL, +0x36362228UL, 0xd9d97929UL, 0x8181942aUL, 0x6e6ecf2bUL, 0x3131272cUL, 0xdede7c2dUL, 0x8686912eUL, 0x6969ca2fUL, +0x24243c30UL, 0xcbcb6731UL, 0x93938a32UL, 0x7c7cd133UL, 0x23233934UL, 0xcccc6235UL, 0x94948f36UL, 0x7b7bd437UL, +0x2a2a3638UL, 0xc5c56d39UL, 0x9d9d803aUL, 0x7272db3bUL, 0x2d2d333cUL, 0xc2c2683dUL, 0x9a9a853eUL, 0x7575de3fUL, 0x70705040UL, 0x9f9f0b41UL, 0xc7c7e642UL, 0x2828bd43UL, 0x77775544UL, 0x98980e45UL, 0xc0c0e346UL, 0x2f2fb847UL, -0x7e7e5a48UL, 0x91910149UL, 0xc9c9ec4aUL, 0x2626b74bUL, 0x79795f4cUL, 0x9696044dUL, 0xcecee94eUL, 0x2121b24fUL, -0x6c6c4450UL, 0x83831f51UL, 0xdbdbf252UL, 0x3434a953UL, 0x6b6b4154UL, 0x84841a55UL, 0xdcdcf756UL, 0x3333ac57UL, -0x62624e58UL, 0x8d8d1559UL, 0xd5d5f85aUL, 0x3a3aa35bUL, 0x65654b5cUL, 0x8a8a105dUL, 0xd2d2fd5eUL, 0x3d3da65fUL, -0x48487860UL, 0xa7a72361UL, 0xffffce62UL, 0x10109563UL, 0x4f4f7d64UL, 0xa0a02665UL, 0xf8f8cb66UL, 0x17179067UL, +0x7e7e5a48UL, 0x91910149UL, 0xc9c9ec4aUL, 0x2626b74bUL, 0x79795f4cUL, 0x9696044dUL, 0xcecee94eUL, 0x2121b24fUL, +0x6c6c4450UL, 0x83831f51UL, 0xdbdbf252UL, 0x3434a953UL, 0x6b6b4154UL, 0x84841a55UL, 0xdcdcf756UL, 0x3333ac57UL, +0x62624e58UL, 0x8d8d1559UL, 0xd5d5f85aUL, 0x3a3aa35bUL, 0x65654b5cUL, 0x8a8a105dUL, 0xd2d2fd5eUL, 0x3d3da65fUL, +0x48487860UL, 0xa7a72361UL, 0xffffce62UL, 0x10109563UL, 0x4f4f7d64UL, 0xa0a02665UL, 0xf8f8cb66UL, 0x17179067UL, 0x46467268UL, 0xa9a92969UL, 0xf1f1c46aUL, 0x1e1e9f6bUL, 0x4141776cUL, 0xaeae2c6dUL, 0xf6f6c16eUL, 0x19199a6fUL, -0x54546c70UL, 0xbbbb3771UL, 0xe3e3da72UL, 0x0c0c8173UL, 0x53536974UL, 0xbcbc3275UL, 0xe4e4df76UL, 0x0b0b8477UL, -0x5a5a6678UL, 0xb5b53d79UL, 0xededd07aUL, 0x02028b7bUL, 0x5d5d637cUL, 0xb2b2387dUL, 0xeaead57eUL, 0x05058e7fUL, -0xe0e0a080UL, 0x0f0ffb81UL, 0x57571682UL, 0xb8b84d83UL, 0xe7e7a584UL, 0x0808fe85UL, 0x50501386UL, 0xbfbf4887UL, -0xeeeeaa88UL, 0x0101f189UL, 0x59591c8aUL, 0xb6b6478bUL, 0xe9e9af8cUL, 0x0606f48dUL, 0x5e5e198eUL, 0xb1b1428fUL, -0xfcfcb490UL, 0x1313ef91UL, 0x4b4b0292UL, 0xa4a45993UL, 0xfbfbb194UL, 0x1414ea95UL, 0x4c4c0796UL, 0xa3a35c97UL, -0xf2f2be98UL, 0x1d1de599UL, 0x4545089aUL, 0xaaaa539bUL, 0xf5f5bb9cUL, 0x1a1ae09dUL, 0x42420d9eUL, 0xadad569fUL, -0xd8d888a0UL, 0x3737d3a1UL, 0x6f6f3ea2UL, 0x808065a3UL, 0xdfdf8da4UL, 0x3030d6a5UL, 0x68683ba6UL, 0x878760a7UL, -0xd6d682a8UL, 0x3939d9a9UL, 0x616134aaUL, 0x8e8e6fabUL, 0xd1d187acUL, 0x3e3edcadUL, 0x666631aeUL, 0x89896aafUL, -0xc4c49cb0UL, 0x2b2bc7b1UL, 0x73732ab2UL, 0x9c9c71b3UL, 0xc3c399b4UL, 0x2c2cc2b5UL, 0x74742fb6UL, 0x9b9b74b7UL, -0xcaca96b8UL, 0x2525cdb9UL, 0x7d7d20baUL, 0x92927bbbUL, 0xcdcd93bcUL, 0x2222c8bdUL, 0x7a7a25beUL, 0x95957ebfUL, -0x9090f0c0UL, 0x7f7fabc1UL, 0x272746c2UL, 0xc8c81dc3UL, 0x9797f5c4UL, 0x7878aec5UL, 0x202043c6UL, 0xcfcf18c7UL, -0x9e9efac8UL, 0x7171a1c9UL, 0x29294ccaUL, 0xc6c617cbUL, 0x9999ffccUL, 0x7676a4cdUL, 0x2e2e49ceUL, 0xc1c112cfUL, -0x8c8ce4d0UL, 0x6363bfd1UL, 0x3b3b52d2UL, 0xd4d409d3UL, 0x8b8be1d4UL, 0x6464bad5UL, 0x3c3c57d6UL, 0xd3d30cd7UL, -0x8282eed8UL, 0x6d6db5d9UL, 0x353558daUL, 0xdada03dbUL, 0x8585ebdcUL, 0x6a6ab0ddUL, 0x32325ddeUL, 0xdddd06dfUL, +0x54546c70UL, 0xbbbb3771UL, 0xe3e3da72UL, 0x0c0c8173UL, 0x53536974UL, 0xbcbc3275UL, 0xe4e4df76UL, 0x0b0b8477UL, +0x5a5a6678UL, 0xb5b53d79UL, 0xededd07aUL, 0x02028b7bUL, 0x5d5d637cUL, 0xb2b2387dUL, 0xeaead57eUL, 0x05058e7fUL, +0xe0e0a080UL, 0x0f0ffb81UL, 0x57571682UL, 0xb8b84d83UL, 0xe7e7a584UL, 0x0808fe85UL, 0x50501386UL, 0xbfbf4887UL, +0xeeeeaa88UL, 0x0101f189UL, 0x59591c8aUL, 0xb6b6478bUL, 0xe9e9af8cUL, 0x0606f48dUL, 0x5e5e198eUL, 0xb1b1428fUL, +0xfcfcb490UL, 0x1313ef91UL, 0x4b4b0292UL, 0xa4a45993UL, 0xfbfbb194UL, 0x1414ea95UL, 0x4c4c0796UL, 0xa3a35c97UL, +0xf2f2be98UL, 0x1d1de599UL, 0x4545089aUL, 0xaaaa539bUL, 0xf5f5bb9cUL, 0x1a1ae09dUL, 0x42420d9eUL, 0xadad569fUL, +0xd8d888a0UL, 0x3737d3a1UL, 0x6f6f3ea2UL, 0x808065a3UL, 0xdfdf8da4UL, 0x3030d6a5UL, 0x68683ba6UL, 0x878760a7UL, +0xd6d682a8UL, 0x3939d9a9UL, 0x616134aaUL, 0x8e8e6fabUL, 0xd1d187acUL, 0x3e3edcadUL, 0x666631aeUL, 0x89896aafUL, +0xc4c49cb0UL, 0x2b2bc7b1UL, 0x73732ab2UL, 0x9c9c71b3UL, 0xc3c399b4UL, 0x2c2cc2b5UL, 0x74742fb6UL, 0x9b9b74b7UL, +0xcaca96b8UL, 0x2525cdb9UL, 0x7d7d20baUL, 0x92927bbbUL, 0xcdcd93bcUL, 0x2222c8bdUL, 0x7a7a25beUL, 0x95957ebfUL, +0x9090f0c0UL, 0x7f7fabc1UL, 0x272746c2UL, 0xc8c81dc3UL, 0x9797f5c4UL, 0x7878aec5UL, 0x202043c6UL, 0xcfcf18c7UL, +0x9e9efac8UL, 0x7171a1c9UL, 0x29294ccaUL, 0xc6c617cbUL, 0x9999ffccUL, 0x7676a4cdUL, 0x2e2e49ceUL, 0xc1c112cfUL, +0x8c8ce4d0UL, 0x6363bfd1UL, 0x3b3b52d2UL, 0xd4d409d3UL, 0x8b8be1d4UL, 0x6464bad5UL, 0x3c3c57d6UL, 0xd3d30cd7UL, +0x8282eed8UL, 0x6d6db5d9UL, 0x353558daUL, 0xdada03dbUL, 0x8585ebdcUL, 0x6a6ab0ddUL, 0x32325ddeUL, 0xdddd06dfUL, 0xa8a8d8e0UL, 0x474783e1UL, 0x1f1f6ee2UL, 0xf0f035e3UL, 0xafafdde4UL, 0x404086e5UL, 0x18186be6UL, 0xf7f730e7UL, 0xa6a6d2e8UL, 0x494989e9UL, 0x111164eaUL, 0xfefe3febUL, 0xa1a1d7ecUL, 0x4e4e8cedUL, 0x161661eeUL, 0xf9f93aefUL, -0xb4b4ccf0UL, 0x5b5b97f1UL, 0x03037af2UL, 0xecec21f3UL, 0xb3b3c9f4UL, 0x5c5c92f5UL, 0x04047ff6UL, 0xebeb24f7UL, +0xb4b4ccf0UL, 0x5b5b97f1UL, 0x03037af2UL, 0xecec21f3UL, 0xb3b3c9f4UL, 0x5c5c92f5UL, 0x04047ff6UL, 0xebeb24f7UL, 0xbabac6f8UL, 0x55559df9UL, 0x0d0d70faUL, 0xe2e22bfbUL, 0xbdbdc3fcUL, 0x525298fdUL, 0x0a0a75feUL, 0xe5e52effUL -}, +}, { -0x00000000UL, 0x015befefUL, 0x02b6b7b7UL, 0x03ed5858UL, 0x04050707UL, 0x055ee8e8UL, 0x06b3b0b0UL, 0x07e85f5fUL, -0x080a0e0eUL, 0x0951e1e1UL, 0x0abcb9b9UL, 0x0be75656UL, 0x0c0f0909UL, 0x0d54e6e6UL, 0x0eb9bebeUL, 0x0fe25151UL, -0x10141c1cUL, 0x114ff3f3UL, 0x12a2ababUL, 0x13f94444UL, 0x14111b1bUL, 0x154af4f4UL, 0x16a7acacUL, 0x17fc4343UL, -0x181e1212UL, 0x1945fdfdUL, 0x1aa8a5a5UL, 0x1bf34a4aUL, 0x1c1b1515UL, 0x1d40fafaUL, 0x1eada2a2UL, 0x1ff64d4dUL, -0x20283838UL, 0x2173d7d7UL, 0x229e8f8fUL, 0x23c56060UL, 0x242d3f3fUL, 0x2576d0d0UL, 0x269b8888UL, 0x27c06767UL, -0x28223636UL, 0x2979d9d9UL, 0x2a948181UL, 0x2bcf6e6eUL, 0x2c273131UL, 0x2d7cdedeUL, 0x2e918686UL, 0x2fca6969UL, -0x303c2424UL, 0x3167cbcbUL, 0x328a9393UL, 0x33d17c7cUL, 0x34392323UL, 0x3562ccccUL, 0x368f9494UL, 0x37d47b7bUL, -0x38362a2aUL, 0x396dc5c5UL, 0x3a809d9dUL, 0x3bdb7272UL, 0x3c332d2dUL, 0x3d68c2c2UL, 0x3e859a9aUL, 0x3fde7575UL, -0x40507070UL, 0x410b9f9fUL, 0x42e6c7c7UL, 0x43bd2828UL, 0x44557777UL, 0x450e9898UL, 0x46e3c0c0UL, 0x47b82f2fUL, -0x485a7e7eUL, 0x49019191UL, 0x4aecc9c9UL, 0x4bb72626UL, 0x4c5f7979UL, 0x4d049696UL, 0x4ee9ceceUL, 0x4fb22121UL, -0x50446c6cUL, 0x511f8383UL, 0x52f2dbdbUL, 0x53a93434UL, 0x54416b6bUL, 0x551a8484UL, 0x56f7dcdcUL, 0x57ac3333UL, +0x00000000UL, 0x015befefUL, 0x02b6b7b7UL, 0x03ed5858UL, 0x04050707UL, 0x055ee8e8UL, 0x06b3b0b0UL, 0x07e85f5fUL, +0x080a0e0eUL, 0x0951e1e1UL, 0x0abcb9b9UL, 0x0be75656UL, 0x0c0f0909UL, 0x0d54e6e6UL, 0x0eb9bebeUL, 0x0fe25151UL, +0x10141c1cUL, 0x114ff3f3UL, 0x12a2ababUL, 0x13f94444UL, 0x14111b1bUL, 0x154af4f4UL, 0x16a7acacUL, 0x17fc4343UL, +0x181e1212UL, 0x1945fdfdUL, 0x1aa8a5a5UL, 0x1bf34a4aUL, 0x1c1b1515UL, 0x1d40fafaUL, 0x1eada2a2UL, 0x1ff64d4dUL, +0x20283838UL, 0x2173d7d7UL, 0x229e8f8fUL, 0x23c56060UL, 0x242d3f3fUL, 0x2576d0d0UL, 0x269b8888UL, 0x27c06767UL, +0x28223636UL, 0x2979d9d9UL, 0x2a948181UL, 0x2bcf6e6eUL, 0x2c273131UL, 0x2d7cdedeUL, 0x2e918686UL, 0x2fca6969UL, +0x303c2424UL, 0x3167cbcbUL, 0x328a9393UL, 0x33d17c7cUL, 0x34392323UL, 0x3562ccccUL, 0x368f9494UL, 0x37d47b7bUL, +0x38362a2aUL, 0x396dc5c5UL, 0x3a809d9dUL, 0x3bdb7272UL, 0x3c332d2dUL, 0x3d68c2c2UL, 0x3e859a9aUL, 0x3fde7575UL, +0x40507070UL, 0x410b9f9fUL, 0x42e6c7c7UL, 0x43bd2828UL, 0x44557777UL, 0x450e9898UL, 0x46e3c0c0UL, 0x47b82f2fUL, +0x485a7e7eUL, 0x49019191UL, 0x4aecc9c9UL, 0x4bb72626UL, 0x4c5f7979UL, 0x4d049696UL, 0x4ee9ceceUL, 0x4fb22121UL, +0x50446c6cUL, 0x511f8383UL, 0x52f2dbdbUL, 0x53a93434UL, 0x54416b6bUL, 0x551a8484UL, 0x56f7dcdcUL, 0x57ac3333UL, 0x584e6262UL, 0x59158d8dUL, 0x5af8d5d5UL, 0x5ba33a3aUL, 0x5c4b6565UL, 0x5d108a8aUL, 0x5efdd2d2UL, 0x5fa63d3dUL, -0x60784848UL, 0x6123a7a7UL, 0x62ceffffUL, 0x63951010UL, 0x647d4f4fUL, 0x6526a0a0UL, 0x66cbf8f8UL, 0x67901717UL, -0x68724646UL, 0x6929a9a9UL, 0x6ac4f1f1UL, 0x6b9f1e1eUL, 0x6c774141UL, 0x6d2caeaeUL, 0x6ec1f6f6UL, 0x6f9a1919UL, -0x706c5454UL, 0x7137bbbbUL, 0x72dae3e3UL, 0x73810c0cUL, 0x74695353UL, 0x7532bcbcUL, 0x76dfe4e4UL, 0x77840b0bUL, -0x78665a5aUL, 0x793db5b5UL, 0x7ad0ededUL, 0x7b8b0202UL, 0x7c635d5dUL, 0x7d38b2b2UL, 0x7ed5eaeaUL, 0x7f8e0505UL, -0x80a0e0e0UL, 0x81fb0f0fUL, 0x82165757UL, 0x834db8b8UL, 0x84a5e7e7UL, 0x85fe0808UL, 0x86135050UL, 0x8748bfbfUL, -0x88aaeeeeUL, 0x89f10101UL, 0x8a1c5959UL, 0x8b47b6b6UL, 0x8cafe9e9UL, 0x8df40606UL, 0x8e195e5eUL, 0x8f42b1b1UL, -0x90b4fcfcUL, 0x91ef1313UL, 0x92024b4bUL, 0x9359a4a4UL, 0x94b1fbfbUL, 0x95ea1414UL, 0x96074c4cUL, 0x975ca3a3UL, +0x60784848UL, 0x6123a7a7UL, 0x62ceffffUL, 0x63951010UL, 0x647d4f4fUL, 0x6526a0a0UL, 0x66cbf8f8UL, 0x67901717UL, +0x68724646UL, 0x6929a9a9UL, 0x6ac4f1f1UL, 0x6b9f1e1eUL, 0x6c774141UL, 0x6d2caeaeUL, 0x6ec1f6f6UL, 0x6f9a1919UL, +0x706c5454UL, 0x7137bbbbUL, 0x72dae3e3UL, 0x73810c0cUL, 0x74695353UL, 0x7532bcbcUL, 0x76dfe4e4UL, 0x77840b0bUL, +0x78665a5aUL, 0x793db5b5UL, 0x7ad0ededUL, 0x7b8b0202UL, 0x7c635d5dUL, 0x7d38b2b2UL, 0x7ed5eaeaUL, 0x7f8e0505UL, +0x80a0e0e0UL, 0x81fb0f0fUL, 0x82165757UL, 0x834db8b8UL, 0x84a5e7e7UL, 0x85fe0808UL, 0x86135050UL, 0x8748bfbfUL, +0x88aaeeeeUL, 0x89f10101UL, 0x8a1c5959UL, 0x8b47b6b6UL, 0x8cafe9e9UL, 0x8df40606UL, 0x8e195e5eUL, 0x8f42b1b1UL, +0x90b4fcfcUL, 0x91ef1313UL, 0x92024b4bUL, 0x9359a4a4UL, 0x94b1fbfbUL, 0x95ea1414UL, 0x96074c4cUL, 0x975ca3a3UL, 0x98bef2f2UL, 0x99e51d1dUL, 0x9a084545UL, 0x9b53aaaaUL, 0x9cbbf5f5UL, 0x9de01a1aUL, 0x9e0d4242UL, 0x9f56adadUL, -0xa088d8d8UL, 0xa1d33737UL, 0xa23e6f6fUL, 0xa3658080UL, 0xa48ddfdfUL, 0xa5d63030UL, 0xa63b6868UL, 0xa7608787UL, -0xa882d6d6UL, 0xa9d93939UL, 0xaa346161UL, 0xab6f8e8eUL, 0xac87d1d1UL, 0xaddc3e3eUL, 0xae316666UL, 0xaf6a8989UL, -0xb09cc4c4UL, 0xb1c72b2bUL, 0xb22a7373UL, 0xb3719c9cUL, 0xb499c3c3UL, 0xb5c22c2cUL, 0xb62f7474UL, 0xb7749b9bUL, -0xb896cacaUL, 0xb9cd2525UL, 0xba207d7dUL, 0xbb7b9292UL, 0xbc93cdcdUL, 0xbdc82222UL, 0xbe257a7aUL, 0xbf7e9595UL, -0xc0f09090UL, 0xc1ab7f7fUL, 0xc2462727UL, 0xc31dc8c8UL, 0xc4f59797UL, 0xc5ae7878UL, 0xc6432020UL, 0xc718cfcfUL, -0xc8fa9e9eUL, 0xc9a17171UL, 0xca4c2929UL, 0xcb17c6c6UL, 0xccff9999UL, 0xcda47676UL, 0xce492e2eUL, 0xcf12c1c1UL, -0xd0e48c8cUL, 0xd1bf6363UL, 0xd2523b3bUL, 0xd309d4d4UL, 0xd4e18b8bUL, 0xd5ba6464UL, 0xd6573c3cUL, 0xd70cd3d3UL, -0xd8ee8282UL, 0xd9b56d6dUL, 0xda583535UL, 0xdb03dadaUL, 0xdceb8585UL, 0xddb06a6aUL, 0xde5d3232UL, 0xdf06ddddUL, -0xe0d8a8a8UL, 0xe1834747UL, 0xe26e1f1fUL, 0xe335f0f0UL, 0xe4ddafafUL, 0xe5864040UL, 0xe66b1818UL, 0xe730f7f7UL, -0xe8d2a6a6UL, 0xe9894949UL, 0xea641111UL, 0xeb3ffefeUL, 0xecd7a1a1UL, 0xed8c4e4eUL, 0xee611616UL, 0xef3af9f9UL, -0xf0ccb4b4UL, 0xf1975b5bUL, 0xf27a0303UL, 0xf321ececUL, 0xf4c9b3b3UL, 0xf5925c5cUL, 0xf67f0404UL, 0xf724ebebUL, +0xa088d8d8UL, 0xa1d33737UL, 0xa23e6f6fUL, 0xa3658080UL, 0xa48ddfdfUL, 0xa5d63030UL, 0xa63b6868UL, 0xa7608787UL, +0xa882d6d6UL, 0xa9d93939UL, 0xaa346161UL, 0xab6f8e8eUL, 0xac87d1d1UL, 0xaddc3e3eUL, 0xae316666UL, 0xaf6a8989UL, +0xb09cc4c4UL, 0xb1c72b2bUL, 0xb22a7373UL, 0xb3719c9cUL, 0xb499c3c3UL, 0xb5c22c2cUL, 0xb62f7474UL, 0xb7749b9bUL, +0xb896cacaUL, 0xb9cd2525UL, 0xba207d7dUL, 0xbb7b9292UL, 0xbc93cdcdUL, 0xbdc82222UL, 0xbe257a7aUL, 0xbf7e9595UL, +0xc0f09090UL, 0xc1ab7f7fUL, 0xc2462727UL, 0xc31dc8c8UL, 0xc4f59797UL, 0xc5ae7878UL, 0xc6432020UL, 0xc718cfcfUL, +0xc8fa9e9eUL, 0xc9a17171UL, 0xca4c2929UL, 0xcb17c6c6UL, 0xccff9999UL, 0xcda47676UL, 0xce492e2eUL, 0xcf12c1c1UL, +0xd0e48c8cUL, 0xd1bf6363UL, 0xd2523b3bUL, 0xd309d4d4UL, 0xd4e18b8bUL, 0xd5ba6464UL, 0xd6573c3cUL, 0xd70cd3d3UL, +0xd8ee8282UL, 0xd9b56d6dUL, 0xda583535UL, 0xdb03dadaUL, 0xdceb8585UL, 0xddb06a6aUL, 0xde5d3232UL, 0xdf06ddddUL, +0xe0d8a8a8UL, 0xe1834747UL, 0xe26e1f1fUL, 0xe335f0f0UL, 0xe4ddafafUL, 0xe5864040UL, 0xe66b1818UL, 0xe730f7f7UL, +0xe8d2a6a6UL, 0xe9894949UL, 0xea641111UL, 0xeb3ffefeUL, 0xecd7a1a1UL, 0xed8c4e4eUL, 0xee611616UL, 0xef3af9f9UL, +0xf0ccb4b4UL, 0xf1975b5bUL, 0xf27a0303UL, 0xf321ececUL, 0xf4c9b3b3UL, 0xf5925c5cUL, 0xf67f0404UL, 0xf724ebebUL, 0xf8c6babaUL, 0xf99d5555UL, 0xfa700d0dUL, 0xfb2be2e2UL, 0xfcc3bdbdUL, 0xfd985252UL, 0xfe750a0aUL, 0xff2ee5e5UL -}, +}, { -0x00000000UL, 0xef01ef5bUL, 0xb702b7b6UL, 0x580358edUL, 0x07040705UL, 0xe805e85eUL, 0xb006b0b3UL, 0x5f075fe8UL, +0x00000000UL, 0xef01ef5bUL, 0xb702b7b6UL, 0x580358edUL, 0x07040705UL, 0xe805e85eUL, 0xb006b0b3UL, 0x5f075fe8UL, 0x0e080e0aUL, 0xe109e151UL, 0xb90ab9bcUL, 0x560b56e7UL, 0x090c090fUL, 0xe60de654UL, 0xbe0ebeb9UL, 0x510f51e2UL, -0x1c101c14UL, 0xf311f34fUL, 0xab12aba2UL, 0x441344f9UL, 0x1b141b11UL, 0xf415f44aUL, 0xac16aca7UL, 0x431743fcUL, -0x1218121eUL, 0xfd19fd45UL, 0xa51aa5a8UL, 0x4a1b4af3UL, 0x151c151bUL, 0xfa1dfa40UL, 0xa21ea2adUL, 0x4d1f4df6UL, -0x38203828UL, 0xd721d773UL, 0x8f228f9eUL, 0x602360c5UL, 0x3f243f2dUL, 0xd025d076UL, 0x8826889bUL, 0x672767c0UL, -0x36283622UL, 0xd929d979UL, 0x812a8194UL, 0x6e2b6ecfUL, 0x312c3127UL, 0xde2dde7cUL, 0x862e8691UL, 0x692f69caUL, -0x2430243cUL, 0xcb31cb67UL, 0x9332938aUL, 0x7c337cd1UL, 0x23342339UL, 0xcc35cc62UL, 0x9436948fUL, 0x7b377bd4UL, +0x1c101c14UL, 0xf311f34fUL, 0xab12aba2UL, 0x441344f9UL, 0x1b141b11UL, 0xf415f44aUL, 0xac16aca7UL, 0x431743fcUL, +0x1218121eUL, 0xfd19fd45UL, 0xa51aa5a8UL, 0x4a1b4af3UL, 0x151c151bUL, 0xfa1dfa40UL, 0xa21ea2adUL, 0x4d1f4df6UL, +0x38203828UL, 0xd721d773UL, 0x8f228f9eUL, 0x602360c5UL, 0x3f243f2dUL, 0xd025d076UL, 0x8826889bUL, 0x672767c0UL, +0x36283622UL, 0xd929d979UL, 0x812a8194UL, 0x6e2b6ecfUL, 0x312c3127UL, 0xde2dde7cUL, 0x862e8691UL, 0x692f69caUL, +0x2430243cUL, 0xcb31cb67UL, 0x9332938aUL, 0x7c337cd1UL, 0x23342339UL, 0xcc35cc62UL, 0x9436948fUL, 0x7b377bd4UL, 0x2a382a36UL, 0xc539c56dUL, 0x9d3a9d80UL, 0x723b72dbUL, 0x2d3c2d33UL, 0xc23dc268UL, 0x9a3e9a85UL, 0x753f75deUL, -0x70407050UL, 0x9f419f0bUL, 0xc742c7e6UL, 0x284328bdUL, 0x77447755UL, 0x9845980eUL, 0xc046c0e3UL, 0x2f472fb8UL, -0x7e487e5aUL, 0x91499101UL, 0xc94ac9ecUL, 0x264b26b7UL, 0x794c795fUL, 0x964d9604UL, 0xce4ecee9UL, 0x214f21b2UL, +0x70407050UL, 0x9f419f0bUL, 0xc742c7e6UL, 0x284328bdUL, 0x77447755UL, 0x9845980eUL, 0xc046c0e3UL, 0x2f472fb8UL, +0x7e487e5aUL, 0x91499101UL, 0xc94ac9ecUL, 0x264b26b7UL, 0x794c795fUL, 0x964d9604UL, 0xce4ecee9UL, 0x214f21b2UL, 0x6c506c44UL, 0x8351831fUL, 0xdb52dbf2UL, 0x345334a9UL, 0x6b546b41UL, 0x8455841aUL, 0xdc56dcf7UL, 0x335733acUL, -0x6258624eUL, 0x8d598d15UL, 0xd55ad5f8UL, 0x3a5b3aa3UL, 0x655c654bUL, 0x8a5d8a10UL, 0xd25ed2fdUL, 0x3d5f3da6UL, -0x48604878UL, 0xa761a723UL, 0xff62ffceUL, 0x10631095UL, 0x4f644f7dUL, 0xa065a026UL, 0xf866f8cbUL, 0x17671790UL, -0x46684672UL, 0xa969a929UL, 0xf16af1c4UL, 0x1e6b1e9fUL, 0x416c4177UL, 0xae6dae2cUL, 0xf66ef6c1UL, 0x196f199aUL, +0x6258624eUL, 0x8d598d15UL, 0xd55ad5f8UL, 0x3a5b3aa3UL, 0x655c654bUL, 0x8a5d8a10UL, 0xd25ed2fdUL, 0x3d5f3da6UL, +0x48604878UL, 0xa761a723UL, 0xff62ffceUL, 0x10631095UL, 0x4f644f7dUL, 0xa065a026UL, 0xf866f8cbUL, 0x17671790UL, +0x46684672UL, 0xa969a929UL, 0xf16af1c4UL, 0x1e6b1e9fUL, 0x416c4177UL, 0xae6dae2cUL, 0xf66ef6c1UL, 0x196f199aUL, 0x5470546cUL, 0xbb71bb37UL, 0xe372e3daUL, 0x0c730c81UL, 0x53745369UL, 0xbc75bc32UL, 0xe476e4dfUL, 0x0b770b84UL, -0x5a785a66UL, 0xb579b53dUL, 0xed7aedd0UL, 0x027b028bUL, 0x5d7c5d63UL, 0xb27db238UL, 0xea7eead5UL, 0x057f058eUL, +0x5a785a66UL, 0xb579b53dUL, 0xed7aedd0UL, 0x027b028bUL, 0x5d7c5d63UL, 0xb27db238UL, 0xea7eead5UL, 0x057f058eUL, 0xe080e0a0UL, 0x0f810ffbUL, 0x57825716UL, 0xb883b84dUL, 0xe784e7a5UL, 0x088508feUL, 0x50865013UL, 0xbf87bf48UL, 0xee88eeaaUL, 0x018901f1UL, 0x598a591cUL, 0xb68bb647UL, 0xe98ce9afUL, 0x068d06f4UL, 0x5e8e5e19UL, 0xb18fb142UL, -0xfc90fcb4UL, 0x139113efUL, 0x4b924b02UL, 0xa493a459UL, 0xfb94fbb1UL, 0x149514eaUL, 0x4c964c07UL, 0xa397a35cUL, -0xf298f2beUL, 0x1d991de5UL, 0x459a4508UL, 0xaa9baa53UL, 0xf59cf5bbUL, 0x1a9d1ae0UL, 0x429e420dUL, 0xad9fad56UL, -0xd8a0d888UL, 0x37a137d3UL, 0x6fa26f3eUL, 0x80a38065UL, 0xdfa4df8dUL, 0x30a530d6UL, 0x68a6683bUL, 0x87a78760UL, -0xd6a8d682UL, 0x39a939d9UL, 0x61aa6134UL, 0x8eab8e6fUL, 0xd1acd187UL, 0x3ead3edcUL, 0x66ae6631UL, 0x89af896aUL, -0xc4b0c49cUL, 0x2bb12bc7UL, 0x73b2732aUL, 0x9cb39c71UL, 0xc3b4c399UL, 0x2cb52cc2UL, 0x74b6742fUL, 0x9bb79b74UL, -0xcab8ca96UL, 0x25b925cdUL, 0x7dba7d20UL, 0x92bb927bUL, 0xcdbccd93UL, 0x22bd22c8UL, 0x7abe7a25UL, 0x95bf957eUL, -0x90c090f0UL, 0x7fc17fabUL, 0x27c22746UL, 0xc8c3c81dUL, 0x97c497f5UL, 0x78c578aeUL, 0x20c62043UL, 0xcfc7cf18UL, -0x9ec89efaUL, 0x71c971a1UL, 0x29ca294cUL, 0xc6cbc617UL, 0x99cc99ffUL, 0x76cd76a4UL, 0x2ece2e49UL, 0xc1cfc112UL, -0x8cd08ce4UL, 0x63d163bfUL, 0x3bd23b52UL, 0xd4d3d409UL, 0x8bd48be1UL, 0x64d564baUL, 0x3cd63c57UL, 0xd3d7d30cUL, -0x82d882eeUL, 0x6dd96db5UL, 0x35da3558UL, 0xdadbda03UL, 0x85dc85ebUL, 0x6add6ab0UL, 0x32de325dUL, 0xdddfdd06UL, -0xa8e0a8d8UL, 0x47e14783UL, 0x1fe21f6eUL, 0xf0e3f035UL, 0xafe4afddUL, 0x40e54086UL, 0x18e6186bUL, 0xf7e7f730UL, -0xa6e8a6d2UL, 0x49e94989UL, 0x11ea1164UL, 0xfeebfe3fUL, 0xa1eca1d7UL, 0x4eed4e8cUL, 0x16ee1661UL, 0xf9eff93aUL, -0xb4f0b4ccUL, 0x5bf15b97UL, 0x03f2037aUL, 0xecf3ec21UL, 0xb3f4b3c9UL, 0x5cf55c92UL, 0x04f6047fUL, 0xebf7eb24UL, +0xfc90fcb4UL, 0x139113efUL, 0x4b924b02UL, 0xa493a459UL, 0xfb94fbb1UL, 0x149514eaUL, 0x4c964c07UL, 0xa397a35cUL, +0xf298f2beUL, 0x1d991de5UL, 0x459a4508UL, 0xaa9baa53UL, 0xf59cf5bbUL, 0x1a9d1ae0UL, 0x429e420dUL, 0xad9fad56UL, +0xd8a0d888UL, 0x37a137d3UL, 0x6fa26f3eUL, 0x80a38065UL, 0xdfa4df8dUL, 0x30a530d6UL, 0x68a6683bUL, 0x87a78760UL, +0xd6a8d682UL, 0x39a939d9UL, 0x61aa6134UL, 0x8eab8e6fUL, 0xd1acd187UL, 0x3ead3edcUL, 0x66ae6631UL, 0x89af896aUL, +0xc4b0c49cUL, 0x2bb12bc7UL, 0x73b2732aUL, 0x9cb39c71UL, 0xc3b4c399UL, 0x2cb52cc2UL, 0x74b6742fUL, 0x9bb79b74UL, +0xcab8ca96UL, 0x25b925cdUL, 0x7dba7d20UL, 0x92bb927bUL, 0xcdbccd93UL, 0x22bd22c8UL, 0x7abe7a25UL, 0x95bf957eUL, +0x90c090f0UL, 0x7fc17fabUL, 0x27c22746UL, 0xc8c3c81dUL, 0x97c497f5UL, 0x78c578aeUL, 0x20c62043UL, 0xcfc7cf18UL, +0x9ec89efaUL, 0x71c971a1UL, 0x29ca294cUL, 0xc6cbc617UL, 0x99cc99ffUL, 0x76cd76a4UL, 0x2ece2e49UL, 0xc1cfc112UL, +0x8cd08ce4UL, 0x63d163bfUL, 0x3bd23b52UL, 0xd4d3d409UL, 0x8bd48be1UL, 0x64d564baUL, 0x3cd63c57UL, 0xd3d7d30cUL, +0x82d882eeUL, 0x6dd96db5UL, 0x35da3558UL, 0xdadbda03UL, 0x85dc85ebUL, 0x6add6ab0UL, 0x32de325dUL, 0xdddfdd06UL, +0xa8e0a8d8UL, 0x47e14783UL, 0x1fe21f6eUL, 0xf0e3f035UL, 0xafe4afddUL, 0x40e54086UL, 0x18e6186bUL, 0xf7e7f730UL, +0xa6e8a6d2UL, 0x49e94989UL, 0x11ea1164UL, 0xfeebfe3fUL, 0xa1eca1d7UL, 0x4eed4e8cUL, 0x16ee1661UL, 0xf9eff93aUL, +0xb4f0b4ccUL, 0x5bf15b97UL, 0x03f2037aUL, 0xecf3ec21UL, 0xb3f4b3c9UL, 0x5cf55c92UL, 0x04f6047fUL, 0xebf7eb24UL, 0xbaf8bac6UL, 0x55f9559dUL, 0x0dfa0d70UL, 0xe2fbe22bUL, 0xbdfcbdc3UL, 0x52fd5298UL, 0x0afe0a75UL, 0xe5ffe52eUL -}, +}, { -0x00000000UL, 0x5bef015bUL, 0xb6b702b6UL, 0xed5803edUL, 0x05070405UL, 0x5ee8055eUL, 0xb3b006b3UL, 0xe85f07e8UL, -0x0a0e080aUL, 0x51e10951UL, 0xbcb90abcUL, 0xe7560be7UL, 0x0f090c0fUL, 0x54e60d54UL, 0xb9be0eb9UL, 0xe2510fe2UL, -0x141c1014UL, 0x4ff3114fUL, 0xa2ab12a2UL, 0xf94413f9UL, 0x111b1411UL, 0x4af4154aUL, 0xa7ac16a7UL, 0xfc4317fcUL, -0x1e12181eUL, 0x45fd1945UL, 0xa8a51aa8UL, 0xf34a1bf3UL, 0x1b151c1bUL, 0x40fa1d40UL, 0xada21eadUL, 0xf64d1ff6UL, -0x28382028UL, 0x73d72173UL, 0x9e8f229eUL, 0xc56023c5UL, 0x2d3f242dUL, 0x76d02576UL, 0x9b88269bUL, 0xc06727c0UL, -0x22362822UL, 0x79d92979UL, 0x94812a94UL, 0xcf6e2bcfUL, 0x27312c27UL, 0x7cde2d7cUL, 0x91862e91UL, 0xca692fcaUL, -0x3c24303cUL, 0x67cb3167UL, 0x8a93328aUL, 0xd17c33d1UL, 0x39233439UL, 0x62cc3562UL, 0x8f94368fUL, 0xd47b37d4UL, +0x00000000UL, 0x5bef015bUL, 0xb6b702b6UL, 0xed5803edUL, 0x05070405UL, 0x5ee8055eUL, 0xb3b006b3UL, 0xe85f07e8UL, +0x0a0e080aUL, 0x51e10951UL, 0xbcb90abcUL, 0xe7560be7UL, 0x0f090c0fUL, 0x54e60d54UL, 0xb9be0eb9UL, 0xe2510fe2UL, +0x141c1014UL, 0x4ff3114fUL, 0xa2ab12a2UL, 0xf94413f9UL, 0x111b1411UL, 0x4af4154aUL, 0xa7ac16a7UL, 0xfc4317fcUL, +0x1e12181eUL, 0x45fd1945UL, 0xa8a51aa8UL, 0xf34a1bf3UL, 0x1b151c1bUL, 0x40fa1d40UL, 0xada21eadUL, 0xf64d1ff6UL, +0x28382028UL, 0x73d72173UL, 0x9e8f229eUL, 0xc56023c5UL, 0x2d3f242dUL, 0x76d02576UL, 0x9b88269bUL, 0xc06727c0UL, +0x22362822UL, 0x79d92979UL, 0x94812a94UL, 0xcf6e2bcfUL, 0x27312c27UL, 0x7cde2d7cUL, 0x91862e91UL, 0xca692fcaUL, +0x3c24303cUL, 0x67cb3167UL, 0x8a93328aUL, 0xd17c33d1UL, 0x39233439UL, 0x62cc3562UL, 0x8f94368fUL, 0xd47b37d4UL, 0x362a3836UL, 0x6dc5396dUL, 0x809d3a80UL, 0xdb723bdbUL, 0x332d3c33UL, 0x68c23d68UL, 0x859a3e85UL, 0xde753fdeUL, -0x50704050UL, 0x0b9f410bUL, 0xe6c742e6UL, 0xbd2843bdUL, 0x55774455UL, 0x0e98450eUL, 0xe3c046e3UL, 0xb82f47b8UL, -0x5a7e485aUL, 0x01914901UL, 0xecc94aecUL, 0xb7264bb7UL, 0x5f794c5fUL, 0x04964d04UL, 0xe9ce4ee9UL, 0xb2214fb2UL, -0x446c5044UL, 0x1f83511fUL, 0xf2db52f2UL, 0xa93453a9UL, 0x416b5441UL, 0x1a84551aUL, 0xf7dc56f7UL, 0xac3357acUL, -0x4e62584eUL, 0x158d5915UL, 0xf8d55af8UL, 0xa33a5ba3UL, 0x4b655c4bUL, 0x108a5d10UL, 0xfdd25efdUL, 0xa63d5fa6UL, -0x78486078UL, 0x23a76123UL, 0xceff62ceUL, 0x95106395UL, 0x7d4f647dUL, 0x26a06526UL, 0xcbf866cbUL, 0x90176790UL, -0x72466872UL, 0x29a96929UL, 0xc4f16ac4UL, 0x9f1e6b9fUL, 0x77416c77UL, 0x2cae6d2cUL, 0xc1f66ec1UL, 0x9a196f9aUL, -0x6c54706cUL, 0x37bb7137UL, 0xdae372daUL, 0x810c7381UL, 0x69537469UL, 0x32bc7532UL, 0xdfe476dfUL, 0x840b7784UL, -0x665a7866UL, 0x3db5793dUL, 0xd0ed7ad0UL, 0x8b027b8bUL, 0x635d7c63UL, 0x38b27d38UL, 0xd5ea7ed5UL, 0x8e057f8eUL, -0xa0e080a0UL, 0xfb0f81fbUL, 0x16578216UL, 0x4db8834dUL, 0xa5e784a5UL, 0xfe0885feUL, 0x13508613UL, 0x48bf8748UL, +0x50704050UL, 0x0b9f410bUL, 0xe6c742e6UL, 0xbd2843bdUL, 0x55774455UL, 0x0e98450eUL, 0xe3c046e3UL, 0xb82f47b8UL, +0x5a7e485aUL, 0x01914901UL, 0xecc94aecUL, 0xb7264bb7UL, 0x5f794c5fUL, 0x04964d04UL, 0xe9ce4ee9UL, 0xb2214fb2UL, +0x446c5044UL, 0x1f83511fUL, 0xf2db52f2UL, 0xa93453a9UL, 0x416b5441UL, 0x1a84551aUL, 0xf7dc56f7UL, 0xac3357acUL, +0x4e62584eUL, 0x158d5915UL, 0xf8d55af8UL, 0xa33a5ba3UL, 0x4b655c4bUL, 0x108a5d10UL, 0xfdd25efdUL, 0xa63d5fa6UL, +0x78486078UL, 0x23a76123UL, 0xceff62ceUL, 0x95106395UL, 0x7d4f647dUL, 0x26a06526UL, 0xcbf866cbUL, 0x90176790UL, +0x72466872UL, 0x29a96929UL, 0xc4f16ac4UL, 0x9f1e6b9fUL, 0x77416c77UL, 0x2cae6d2cUL, 0xc1f66ec1UL, 0x9a196f9aUL, +0x6c54706cUL, 0x37bb7137UL, 0xdae372daUL, 0x810c7381UL, 0x69537469UL, 0x32bc7532UL, 0xdfe476dfUL, 0x840b7784UL, +0x665a7866UL, 0x3db5793dUL, 0xd0ed7ad0UL, 0x8b027b8bUL, 0x635d7c63UL, 0x38b27d38UL, 0xd5ea7ed5UL, 0x8e057f8eUL, +0xa0e080a0UL, 0xfb0f81fbUL, 0x16578216UL, 0x4db8834dUL, 0xa5e784a5UL, 0xfe0885feUL, 0x13508613UL, 0x48bf8748UL, 0xaaee88aaUL, 0xf10189f1UL, 0x1c598a1cUL, 0x47b68b47UL, 0xafe98cafUL, 0xf4068df4UL, 0x195e8e19UL, 0x42b18f42UL, -0xb4fc90b4UL, 0xef1391efUL, 0x024b9202UL, 0x59a49359UL, 0xb1fb94b1UL, 0xea1495eaUL, 0x074c9607UL, 0x5ca3975cUL, -0xbef298beUL, 0xe51d99e5UL, 0x08459a08UL, 0x53aa9b53UL, 0xbbf59cbbUL, 0xe01a9de0UL, 0x0d429e0dUL, 0x56ad9f56UL, -0x88d8a088UL, 0xd337a1d3UL, 0x3e6fa23eUL, 0x6580a365UL, 0x8ddfa48dUL, 0xd630a5d6UL, 0x3b68a63bUL, 0x6087a760UL, -0x82d6a882UL, 0xd939a9d9UL, 0x3461aa34UL, 0x6f8eab6fUL, 0x87d1ac87UL, 0xdc3eaddcUL, 0x3166ae31UL, 0x6a89af6aUL, -0x9cc4b09cUL, 0xc72bb1c7UL, 0x2a73b22aUL, 0x719cb371UL, 0x99c3b499UL, 0xc22cb5c2UL, 0x2f74b62fUL, 0x749bb774UL, +0xb4fc90b4UL, 0xef1391efUL, 0x024b9202UL, 0x59a49359UL, 0xb1fb94b1UL, 0xea1495eaUL, 0x074c9607UL, 0x5ca3975cUL, +0xbef298beUL, 0xe51d99e5UL, 0x08459a08UL, 0x53aa9b53UL, 0xbbf59cbbUL, 0xe01a9de0UL, 0x0d429e0dUL, 0x56ad9f56UL, +0x88d8a088UL, 0xd337a1d3UL, 0x3e6fa23eUL, 0x6580a365UL, 0x8ddfa48dUL, 0xd630a5d6UL, 0x3b68a63bUL, 0x6087a760UL, +0x82d6a882UL, 0xd939a9d9UL, 0x3461aa34UL, 0x6f8eab6fUL, 0x87d1ac87UL, 0xdc3eaddcUL, 0x3166ae31UL, 0x6a89af6aUL, +0x9cc4b09cUL, 0xc72bb1c7UL, 0x2a73b22aUL, 0x719cb371UL, 0x99c3b499UL, 0xc22cb5c2UL, 0x2f74b62fUL, 0x749bb774UL, 0x96cab896UL, 0xcd25b9cdUL, 0x207dba20UL, 0x7b92bb7bUL, 0x93cdbc93UL, 0xc822bdc8UL, 0x257abe25UL, 0x7e95bf7eUL, -0xf090c0f0UL, 0xab7fc1abUL, 0x4627c246UL, 0x1dc8c31dUL, 0xf597c4f5UL, 0xae78c5aeUL, 0x4320c643UL, 0x18cfc718UL, -0xfa9ec8faUL, 0xa171c9a1UL, 0x4c29ca4cUL, 0x17c6cb17UL, 0xff99ccffUL, 0xa476cda4UL, 0x492ece49UL, 0x12c1cf12UL, -0xe48cd0e4UL, 0xbf63d1bfUL, 0x523bd252UL, 0x09d4d309UL, 0xe18bd4e1UL, 0xba64d5baUL, 0x573cd657UL, 0x0cd3d70cUL, -0xee82d8eeUL, 0xb56dd9b5UL, 0x5835da58UL, 0x03dadb03UL, 0xeb85dcebUL, 0xb06addb0UL, 0x5d32de5dUL, 0x06dddf06UL, -0xd8a8e0d8UL, 0x8347e183UL, 0x6e1fe26eUL, 0x35f0e335UL, 0xddafe4ddUL, 0x8640e586UL, 0x6b18e66bUL, 0x30f7e730UL, +0xf090c0f0UL, 0xab7fc1abUL, 0x4627c246UL, 0x1dc8c31dUL, 0xf597c4f5UL, 0xae78c5aeUL, 0x4320c643UL, 0x18cfc718UL, +0xfa9ec8faUL, 0xa171c9a1UL, 0x4c29ca4cUL, 0x17c6cb17UL, 0xff99ccffUL, 0xa476cda4UL, 0x492ece49UL, 0x12c1cf12UL, +0xe48cd0e4UL, 0xbf63d1bfUL, 0x523bd252UL, 0x09d4d309UL, 0xe18bd4e1UL, 0xba64d5baUL, 0x573cd657UL, 0x0cd3d70cUL, +0xee82d8eeUL, 0xb56dd9b5UL, 0x5835da58UL, 0x03dadb03UL, 0xeb85dcebUL, 0xb06addb0UL, 0x5d32de5dUL, 0x06dddf06UL, +0xd8a8e0d8UL, 0x8347e183UL, 0x6e1fe26eUL, 0x35f0e335UL, 0xddafe4ddUL, 0x8640e586UL, 0x6b18e66bUL, 0x30f7e730UL, 0xd2a6e8d2UL, 0x8949e989UL, 0x6411ea64UL, 0x3ffeeb3fUL, 0xd7a1ecd7UL, 0x8c4eed8cUL, 0x6116ee61UL, 0x3af9ef3aUL, -0xccb4f0ccUL, 0x975bf197UL, 0x7a03f27aUL, 0x21ecf321UL, 0xc9b3f4c9UL, 0x925cf592UL, 0x7f04f67fUL, 0x24ebf724UL, +0xccb4f0ccUL, 0x975bf197UL, 0x7a03f27aUL, 0x21ecf321UL, 0xc9b3f4c9UL, 0x925cf592UL, 0x7f04f67fUL, 0x24ebf724UL, 0xc6baf8c6UL, 0x9d55f99dUL, 0x700dfa70UL, 0x2be2fb2bUL, 0xc3bdfcc3UL, 0x9852fd98UL, 0x750afe75UL, 0x2ee5ff2eUL }}; @@ -216,281 +215,282 @@ /* the 4x8 RS transform */ static const ulong32 rs_tab0[256] = { -0x00000000LU, 0xa402a401LU, 0x05040502LU, 0xa106a103LU, 0x0a080a04LU, 0xae0aae05LU, 0x0f0c0f06LU, 0xab0eab07LU, -0x14101408LU, 0xb012b009LU, 0x1114110aLU, 0xb516b50bLU, 0x1e181e0cLU, 0xba1aba0dLU, 0x1b1c1b0eLU, 0xbf1ebf0fLU, -0x28202810LU, 0x8c228c11LU, 0x2d242d12LU, 0x89268913LU, 0x22282214LU, 0x862a8615LU, 0x272c2716LU, 0x832e8317LU, -0x3c303c18LU, 0x98329819LU, 0x3934391aLU, 0x9d369d1bLU, 0x3638361cLU, 0x923a921dLU, 0x333c331eLU, 0x973e971fLU, -0x50405020LU, 0xf442f421LU, 0x55445522LU, 0xf146f123LU, 0x5a485a24LU, 0xfe4afe25LU, 0x5f4c5f26LU, 0xfb4efb27LU, -0x44504428LU, 0xe052e029LU, 0x4154412aLU, 0xe556e52bLU, 0x4e584e2cLU, 0xea5aea2dLU, 0x4b5c4b2eLU, 0xef5eef2fLU, -0x78607830LU, 0xdc62dc31LU, 0x7d647d32LU, 0xd966d933LU, 0x72687234LU, 0xd66ad635LU, 0x776c7736LU, 0xd36ed337LU, -0x6c706c38LU, 0xc872c839LU, 0x6974693aLU, 0xcd76cd3bLU, 0x6678663cLU, 0xc27ac23dLU, 0x637c633eLU, 0xc77ec73fLU, -0xa080a040LU, 0x04820441LU, 0xa584a542LU, 0x01860143LU, 0xaa88aa44LU, 0x0e8a0e45LU, 0xaf8caf46LU, 0x0b8e0b47LU, -0xb490b448LU, 0x10921049LU, 0xb194b14aLU, 0x1596154bLU, 0xbe98be4cLU, 0x1a9a1a4dLU, 0xbb9cbb4eLU, 0x1f9e1f4fLU, -0x88a08850LU, 0x2ca22c51LU, 0x8da48d52LU, 0x29a62953LU, 0x82a88254LU, 0x26aa2655LU, 0x87ac8756LU, 0x23ae2357LU, -0x9cb09c58LU, 0x38b23859LU, 0x99b4995aLU, 0x3db63d5bLU, 0x96b8965cLU, 0x32ba325dLU, 0x93bc935eLU, 0x37be375fLU, -0xf0c0f060LU, 0x54c25461LU, 0xf5c4f562LU, 0x51c65163LU, 0xfac8fa64LU, 0x5eca5e65LU, 0xffccff66LU, 0x5bce5b67LU, -0xe4d0e468LU, 0x40d24069LU, 0xe1d4e16aLU, 0x45d6456bLU, 0xeed8ee6cLU, 0x4ada4a6dLU, 0xebdceb6eLU, 0x4fde4f6fLU, -0xd8e0d870LU, 0x7ce27c71LU, 0xdde4dd72LU, 0x79e67973LU, 0xd2e8d274LU, 0x76ea7675LU, 0xd7ecd776LU, 0x73ee7377LU, -0xccf0cc78LU, 0x68f26879LU, 0xc9f4c97aLU, 0x6df66d7bLU, 0xc6f8c67cLU, 0x62fa627dLU, 0xc3fcc37eLU, 0x67fe677fLU, -0x0d4d0d80LU, 0xa94fa981LU, 0x08490882LU, 0xac4bac83LU, 0x07450784LU, 0xa347a385LU, 0x02410286LU, 0xa643a687LU, -0x195d1988LU, 0xbd5fbd89LU, 0x1c591c8aLU, 0xb85bb88bLU, 0x1355138cLU, 0xb757b78dLU, 0x1651168eLU, 0xb253b28fLU, -0x256d2590LU, 0x816f8191LU, 0x20692092LU, 0x846b8493LU, 0x2f652f94LU, 0x8b678b95LU, 0x2a612a96LU, 0x8e638e97LU, -0x317d3198LU, 0x957f9599LU, 0x3479349aLU, 0x907b909bLU, 0x3b753b9cLU, 0x9f779f9dLU, 0x3e713e9eLU, 0x9a739a9fLU, -0x5d0d5da0LU, 0xf90ff9a1LU, 0x580958a2LU, 0xfc0bfca3LU, 0x570557a4LU, 0xf307f3a5LU, 0x520152a6LU, 0xf603f6a7LU, -0x491d49a8LU, 0xed1feda9LU, 0x4c194caaLU, 0xe81be8abLU, 0x431543acLU, 0xe717e7adLU, 0x461146aeLU, 0xe213e2afLU, -0x752d75b0LU, 0xd12fd1b1LU, 0x702970b2LU, 0xd42bd4b3LU, 0x7f257fb4LU, 0xdb27dbb5LU, 0x7a217ab6LU, 0xde23deb7LU, -0x613d61b8LU, 0xc53fc5b9LU, 0x643964baLU, 0xc03bc0bbLU, 0x6b356bbcLU, 0xcf37cfbdLU, 0x6e316ebeLU, 0xca33cabfLU, -0xadcdadc0LU, 0x09cf09c1LU, 0xa8c9a8c2LU, 0x0ccb0cc3LU, 0xa7c5a7c4LU, 0x03c703c5LU, 0xa2c1a2c6LU, 0x06c306c7LU, -0xb9ddb9c8LU, 0x1ddf1dc9LU, 0xbcd9bccaLU, 0x18db18cbLU, 0xb3d5b3ccLU, 0x17d717cdLU, 0xb6d1b6ceLU, 0x12d312cfLU, -0x85ed85d0LU, 0x21ef21d1LU, 0x80e980d2LU, 0x24eb24d3LU, 0x8fe58fd4LU, 0x2be72bd5LU, 0x8ae18ad6LU, 0x2ee32ed7LU, -0x91fd91d8LU, 0x35ff35d9LU, 0x94f994daLU, 0x30fb30dbLU, 0x9bf59bdcLU, 0x3ff73fddLU, 0x9ef19edeLU, 0x3af33adfLU, -0xfd8dfde0LU, 0x598f59e1LU, 0xf889f8e2LU, 0x5c8b5ce3LU, 0xf785f7e4LU, 0x538753e5LU, 0xf281f2e6LU, 0x568356e7LU, -0xe99de9e8LU, 0x4d9f4de9LU, 0xec99eceaLU, 0x489b48ebLU, 0xe395e3ecLU, 0x479747edLU, 0xe691e6eeLU, 0x429342efLU, -0xd5add5f0LU, 0x71af71f1LU, 0xd0a9d0f2LU, 0x74ab74f3LU, 0xdfa5dff4LU, 0x7ba77bf5LU, 0xdaa1daf6LU, 0x7ea37ef7LU, -0xc1bdc1f8LU, 0x65bf65f9LU, 0xc4b9c4faLU, 0x60bb60fbLU, 0xcbb5cbfcLU, 0x6fb76ffdLU, 0xceb1cefeLU, 0x6ab36affLU }; +0x00000000LU, 0xa402a401LU, 0x05040502LU, 0xa106a103LU, 0x0a080a04LU, 0xae0aae05LU, 0x0f0c0f06LU, 0xab0eab07LU, +0x14101408LU, 0xb012b009LU, 0x1114110aLU, 0xb516b50bLU, 0x1e181e0cLU, 0xba1aba0dLU, 0x1b1c1b0eLU, 0xbf1ebf0fLU, +0x28202810LU, 0x8c228c11LU, 0x2d242d12LU, 0x89268913LU, 0x22282214LU, 0x862a8615LU, 0x272c2716LU, 0x832e8317LU, +0x3c303c18LU, 0x98329819LU, 0x3934391aLU, 0x9d369d1bLU, 0x3638361cLU, 0x923a921dLU, 0x333c331eLU, 0x973e971fLU, +0x50405020LU, 0xf442f421LU, 0x55445522LU, 0xf146f123LU, 0x5a485a24LU, 0xfe4afe25LU, 0x5f4c5f26LU, 0xfb4efb27LU, +0x44504428LU, 0xe052e029LU, 0x4154412aLU, 0xe556e52bLU, 0x4e584e2cLU, 0xea5aea2dLU, 0x4b5c4b2eLU, 0xef5eef2fLU, +0x78607830LU, 0xdc62dc31LU, 0x7d647d32LU, 0xd966d933LU, 0x72687234LU, 0xd66ad635LU, 0x776c7736LU, 0xd36ed337LU, +0x6c706c38LU, 0xc872c839LU, 0x6974693aLU, 0xcd76cd3bLU, 0x6678663cLU, 0xc27ac23dLU, 0x637c633eLU, 0xc77ec73fLU, +0xa080a040LU, 0x04820441LU, 0xa584a542LU, 0x01860143LU, 0xaa88aa44LU, 0x0e8a0e45LU, 0xaf8caf46LU, 0x0b8e0b47LU, +0xb490b448LU, 0x10921049LU, 0xb194b14aLU, 0x1596154bLU, 0xbe98be4cLU, 0x1a9a1a4dLU, 0xbb9cbb4eLU, 0x1f9e1f4fLU, +0x88a08850LU, 0x2ca22c51LU, 0x8da48d52LU, 0x29a62953LU, 0x82a88254LU, 0x26aa2655LU, 0x87ac8756LU, 0x23ae2357LU, +0x9cb09c58LU, 0x38b23859LU, 0x99b4995aLU, 0x3db63d5bLU, 0x96b8965cLU, 0x32ba325dLU, 0x93bc935eLU, 0x37be375fLU, +0xf0c0f060LU, 0x54c25461LU, 0xf5c4f562LU, 0x51c65163LU, 0xfac8fa64LU, 0x5eca5e65LU, 0xffccff66LU, 0x5bce5b67LU, +0xe4d0e468LU, 0x40d24069LU, 0xe1d4e16aLU, 0x45d6456bLU, 0xeed8ee6cLU, 0x4ada4a6dLU, 0xebdceb6eLU, 0x4fde4f6fLU, +0xd8e0d870LU, 0x7ce27c71LU, 0xdde4dd72LU, 0x79e67973LU, 0xd2e8d274LU, 0x76ea7675LU, 0xd7ecd776LU, 0x73ee7377LU, +0xccf0cc78LU, 0x68f26879LU, 0xc9f4c97aLU, 0x6df66d7bLU, 0xc6f8c67cLU, 0x62fa627dLU, 0xc3fcc37eLU, 0x67fe677fLU, +0x0d4d0d80LU, 0xa94fa981LU, 0x08490882LU, 0xac4bac83LU, 0x07450784LU, 0xa347a385LU, 0x02410286LU, 0xa643a687LU, +0x195d1988LU, 0xbd5fbd89LU, 0x1c591c8aLU, 0xb85bb88bLU, 0x1355138cLU, 0xb757b78dLU, 0x1651168eLU, 0xb253b28fLU, +0x256d2590LU, 0x816f8191LU, 0x20692092LU, 0x846b8493LU, 0x2f652f94LU, 0x8b678b95LU, 0x2a612a96LU, 0x8e638e97LU, +0x317d3198LU, 0x957f9599LU, 0x3479349aLU, 0x907b909bLU, 0x3b753b9cLU, 0x9f779f9dLU, 0x3e713e9eLU, 0x9a739a9fLU, +0x5d0d5da0LU, 0xf90ff9a1LU, 0x580958a2LU, 0xfc0bfca3LU, 0x570557a4LU, 0xf307f3a5LU, 0x520152a6LU, 0xf603f6a7LU, +0x491d49a8LU, 0xed1feda9LU, 0x4c194caaLU, 0xe81be8abLU, 0x431543acLU, 0xe717e7adLU, 0x461146aeLU, 0xe213e2afLU, +0x752d75b0LU, 0xd12fd1b1LU, 0x702970b2LU, 0xd42bd4b3LU, 0x7f257fb4LU, 0xdb27dbb5LU, 0x7a217ab6LU, 0xde23deb7LU, +0x613d61b8LU, 0xc53fc5b9LU, 0x643964baLU, 0xc03bc0bbLU, 0x6b356bbcLU, 0xcf37cfbdLU, 0x6e316ebeLU, 0xca33cabfLU, +0xadcdadc0LU, 0x09cf09c1LU, 0xa8c9a8c2LU, 0x0ccb0cc3LU, 0xa7c5a7c4LU, 0x03c703c5LU, 0xa2c1a2c6LU, 0x06c306c7LU, +0xb9ddb9c8LU, 0x1ddf1dc9LU, 0xbcd9bccaLU, 0x18db18cbLU, 0xb3d5b3ccLU, 0x17d717cdLU, 0xb6d1b6ceLU, 0x12d312cfLU, +0x85ed85d0LU, 0x21ef21d1LU, 0x80e980d2LU, 0x24eb24d3LU, 0x8fe58fd4LU, 0x2be72bd5LU, 0x8ae18ad6LU, 0x2ee32ed7LU, +0x91fd91d8LU, 0x35ff35d9LU, 0x94f994daLU, 0x30fb30dbLU, 0x9bf59bdcLU, 0x3ff73fddLU, 0x9ef19edeLU, 0x3af33adfLU, +0xfd8dfde0LU, 0x598f59e1LU, 0xf889f8e2LU, 0x5c8b5ce3LU, 0xf785f7e4LU, 0x538753e5LU, 0xf281f2e6LU, 0x568356e7LU, +0xe99de9e8LU, 0x4d9f4de9LU, 0xec99eceaLU, 0x489b48ebLU, 0xe395e3ecLU, 0x479747edLU, 0xe691e6eeLU, 0x429342efLU, +0xd5add5f0LU, 0x71af71f1LU, 0xd0a9d0f2LU, 0x74ab74f3LU, 0xdfa5dff4LU, 0x7ba77bf5LU, 0xdaa1daf6LU, 0x7ea37ef7LU, +0xc1bdc1f8LU, 0x65bf65f9LU, 0xc4b9c4faLU, 0x60bb60fbLU, 0xcbb5cbfcLU, 0x6fb76ffdLU, 0xceb1cefeLU, 0x6ab36affLU }; static const ulong32 rs_tab1[256] = { -0x00000000LU, 0x55a156a4LU, 0xaa0fac05LU, 0xffaefaa1LU, 0x191e150aLU, 0x4cbf43aeLU, 0xb311b90fLU, 0xe6b0efabLU, -0x323c2a14LU, 0x679d7cb0LU, 0x98338611LU, 0xcd92d0b5LU, 0x2b223f1eLU, 0x7e8369baLU, 0x812d931bLU, 0xd48cc5bfLU, -0x64785428LU, 0x31d9028cLU, 0xce77f82dLU, 0x9bd6ae89LU, 0x7d664122LU, 0x28c71786LU, 0xd769ed27LU, 0x82c8bb83LU, -0x56447e3cLU, 0x03e52898LU, 0xfc4bd239LU, 0xa9ea849dLU, 0x4f5a6b36LU, 0x1afb3d92LU, 0xe555c733LU, 0xb0f49197LU, -0xc8f0a850LU, 0x9d51fef4LU, 0x62ff0455LU, 0x375e52f1LU, 0xd1eebd5aLU, 0x844febfeLU, 0x7be1115fLU, 0x2e4047fbLU, -0xfacc8244LU, 0xaf6dd4e0LU, 0x50c32e41LU, 0x056278e5LU, 0xe3d2974eLU, 0xb673c1eaLU, 0x49dd3b4bLU, 0x1c7c6defLU, -0xac88fc78LU, 0xf929aadcLU, 0x0687507dLU, 0x532606d9LU, 0xb596e972LU, 0xe037bfd6LU, 0x1f994577LU, 0x4a3813d3LU, -0x9eb4d66cLU, 0xcb1580c8LU, 0x34bb7a69LU, 0x611a2ccdLU, 0x87aac366LU, 0xd20b95c2LU, 0x2da56f63LU, 0x780439c7LU, -0xddad1da0LU, 0x880c4b04LU, 0x77a2b1a5LU, 0x2203e701LU, 0xc4b308aaLU, 0x91125e0eLU, 0x6ebca4afLU, 0x3b1df20bLU, -0xef9137b4LU, 0xba306110LU, 0x459e9bb1LU, 0x103fcd15LU, 0xf68f22beLU, 0xa32e741aLU, 0x5c808ebbLU, 0x0921d81fLU, -0xb9d54988LU, 0xec741f2cLU, 0x13dae58dLU, 0x467bb329LU, 0xa0cb5c82LU, 0xf56a0a26LU, 0x0ac4f087LU, 0x5f65a623LU, -0x8be9639cLU, 0xde483538LU, 0x21e6cf99LU, 0x7447993dLU, 0x92f77696LU, 0xc7562032LU, 0x38f8da93LU, 0x6d598c37LU, -0x155db5f0LU, 0x40fce354LU, 0xbf5219f5LU, 0xeaf34f51LU, 0x0c43a0faLU, 0x59e2f65eLU, 0xa64c0cffLU, 0xf3ed5a5bLU, -0x27619fe4LU, 0x72c0c940LU, 0x8d6e33e1LU, 0xd8cf6545LU, 0x3e7f8aeeLU, 0x6bdedc4aLU, 0x947026ebLU, 0xc1d1704fLU, -0x7125e1d8LU, 0x2484b77cLU, 0xdb2a4dddLU, 0x8e8b1b79LU, 0x683bf4d2LU, 0x3d9aa276LU, 0xc23458d7LU, 0x97950e73LU, +0x00000000LU, 0x55a156a4LU, 0xaa0fac05LU, 0xffaefaa1LU, 0x191e150aLU, 0x4cbf43aeLU, 0xb311b90fLU, 0xe6b0efabLU, +0x323c2a14LU, 0x679d7cb0LU, 0x98338611LU, 0xcd92d0b5LU, 0x2b223f1eLU, 0x7e8369baLU, 0x812d931bLU, 0xd48cc5bfLU, +0x64785428LU, 0x31d9028cLU, 0xce77f82dLU, 0x9bd6ae89LU, 0x7d664122LU, 0x28c71786LU, 0xd769ed27LU, 0x82c8bb83LU, +0x56447e3cLU, 0x03e52898LU, 0xfc4bd239LU, 0xa9ea849dLU, 0x4f5a6b36LU, 0x1afb3d92LU, 0xe555c733LU, 0xb0f49197LU, +0xc8f0a850LU, 0x9d51fef4LU, 0x62ff0455LU, 0x375e52f1LU, 0xd1eebd5aLU, 0x844febfeLU, 0x7be1115fLU, 0x2e4047fbLU, +0xfacc8244LU, 0xaf6dd4e0LU, 0x50c32e41LU, 0x056278e5LU, 0xe3d2974eLU, 0xb673c1eaLU, 0x49dd3b4bLU, 0x1c7c6defLU, +0xac88fc78LU, 0xf929aadcLU, 0x0687507dLU, 0x532606d9LU, 0xb596e972LU, 0xe037bfd6LU, 0x1f994577LU, 0x4a3813d3LU, +0x9eb4d66cLU, 0xcb1580c8LU, 0x34bb7a69LU, 0x611a2ccdLU, 0x87aac366LU, 0xd20b95c2LU, 0x2da56f63LU, 0x780439c7LU, +0xddad1da0LU, 0x880c4b04LU, 0x77a2b1a5LU, 0x2203e701LU, 0xc4b308aaLU, 0x91125e0eLU, 0x6ebca4afLU, 0x3b1df20bLU, +0xef9137b4LU, 0xba306110LU, 0x459e9bb1LU, 0x103fcd15LU, 0xf68f22beLU, 0xa32e741aLU, 0x5c808ebbLU, 0x0921d81fLU, +0xb9d54988LU, 0xec741f2cLU, 0x13dae58dLU, 0x467bb329LU, 0xa0cb5c82LU, 0xf56a0a26LU, 0x0ac4f087LU, 0x5f65a623LU, +0x8be9639cLU, 0xde483538LU, 0x21e6cf99LU, 0x7447993dLU, 0x92f77696LU, 0xc7562032LU, 0x38f8da93LU, 0x6d598c37LU, +0x155db5f0LU, 0x40fce354LU, 0xbf5219f5LU, 0xeaf34f51LU, 0x0c43a0faLU, 0x59e2f65eLU, 0xa64c0cffLU, 0xf3ed5a5bLU, +0x27619fe4LU, 0x72c0c940LU, 0x8d6e33e1LU, 0xd8cf6545LU, 0x3e7f8aeeLU, 0x6bdedc4aLU, 0x947026ebLU, 0xc1d1704fLU, +0x7125e1d8LU, 0x2484b77cLU, 0xdb2a4dddLU, 0x8e8b1b79LU, 0x683bf4d2LU, 0x3d9aa276LU, 0xc23458d7LU, 0x97950e73LU, 0x4319cbccLU, 0x16b89d68LU, 0xe91667c9LU, 0xbcb7316dLU, 0x5a07dec6LU, 0x0fa68862LU, 0xf00872c3LU, 0xa5a92467LU, -0xf7173a0dLU, 0xa2b66ca9LU, 0x5d189608LU, 0x08b9c0acLU, 0xee092f07LU, 0xbba879a3LU, 0x44068302LU, 0x11a7d5a6LU, -0xc52b1019LU, 0x908a46bdLU, 0x6f24bc1cLU, 0x3a85eab8LU, 0xdc350513LU, 0x899453b7LU, 0x763aa916LU, 0x239bffb2LU, -0x936f6e25LU, 0xc6ce3881LU, 0x3960c220LU, 0x6cc19484LU, 0x8a717b2fLU, 0xdfd02d8bLU, 0x207ed72aLU, 0x75df818eLU, +0xf7173a0dLU, 0xa2b66ca9LU, 0x5d189608LU, 0x08b9c0acLU, 0xee092f07LU, 0xbba879a3LU, 0x44068302LU, 0x11a7d5a6LU, +0xc52b1019LU, 0x908a46bdLU, 0x6f24bc1cLU, 0x3a85eab8LU, 0xdc350513LU, 0x899453b7LU, 0x763aa916LU, 0x239bffb2LU, +0x936f6e25LU, 0xc6ce3881LU, 0x3960c220LU, 0x6cc19484LU, 0x8a717b2fLU, 0xdfd02d8bLU, 0x207ed72aLU, 0x75df818eLU, 0xa1534431LU, 0xf4f21295LU, 0x0b5ce834LU, 0x5efdbe90LU, 0xb84d513bLU, 0xedec079fLU, 0x1242fd3eLU, 0x47e3ab9aLU, -0x3fe7925dLU, 0x6a46c4f9LU, 0x95e83e58LU, 0xc04968fcLU, 0x26f98757LU, 0x7358d1f3LU, 0x8cf62b52LU, 0xd9577df6LU, +0x3fe7925dLU, 0x6a46c4f9LU, 0x95e83e58LU, 0xc04968fcLU, 0x26f98757LU, 0x7358d1f3LU, 0x8cf62b52LU, 0xd9577df6LU, 0x0ddbb849LU, 0x587aeeedLU, 0xa7d4144cLU, 0xf27542e8LU, 0x14c5ad43LU, 0x4164fbe7LU, 0xbeca0146LU, 0xeb6b57e2LU, -0x5b9fc675LU, 0x0e3e90d1LU, 0xf1906a70LU, 0xa4313cd4LU, 0x4281d37fLU, 0x172085dbLU, 0xe88e7f7aLU, 0xbd2f29deLU, -0x69a3ec61LU, 0x3c02bac5LU, 0xc3ac4064LU, 0x960d16c0LU, 0x70bdf96bLU, 0x251cafcfLU, 0xdab2556eLU, 0x8f1303caLU, -0x2aba27adLU, 0x7f1b7109LU, 0x80b58ba8LU, 0xd514dd0cLU, 0x33a432a7LU, 0x66056403LU, 0x99ab9ea2LU, 0xcc0ac806LU, -0x18860db9LU, 0x4d275b1dLU, 0xb289a1bcLU, 0xe728f718LU, 0x019818b3LU, 0x54394e17LU, 0xab97b4b6LU, 0xfe36e212LU, -0x4ec27385LU, 0x1b632521LU, 0xe4cddf80LU, 0xb16c8924LU, 0x57dc668fLU, 0x027d302bLU, 0xfdd3ca8aLU, 0xa8729c2eLU, -0x7cfe5991LU, 0x295f0f35LU, 0xd6f1f594LU, 0x8350a330LU, 0x65e04c9bLU, 0x30411a3fLU, 0xcfefe09eLU, 0x9a4eb63aLU, -0xe24a8ffdLU, 0xb7ebd959LU, 0x484523f8LU, 0x1de4755cLU, 0xfb549af7LU, 0xaef5cc53LU, 0x515b36f2LU, 0x04fa6056LU, -0xd076a5e9LU, 0x85d7f34dLU, 0x7a7909ecLU, 0x2fd85f48LU, 0xc968b0e3LU, 0x9cc9e647LU, 0x63671ce6LU, 0x36c64a42LU, -0x8632dbd5LU, 0xd3938d71LU, 0x2c3d77d0LU, 0x799c2174LU, 0x9f2ccedfLU, 0xca8d987bLU, 0x352362daLU, 0x6082347eLU, -0xb40ef1c1LU, 0xe1afa765LU, 0x1e015dc4LU, 0x4ba00b60LU, 0xad10e4cbLU, 0xf8b1b26fLU, 0x071f48ceLU, 0x52be1e6aLU }; +0x5b9fc675LU, 0x0e3e90d1LU, 0xf1906a70LU, 0xa4313cd4LU, 0x4281d37fLU, 0x172085dbLU, 0xe88e7f7aLU, 0xbd2f29deLU, +0x69a3ec61LU, 0x3c02bac5LU, 0xc3ac4064LU, 0x960d16c0LU, 0x70bdf96bLU, 0x251cafcfLU, 0xdab2556eLU, 0x8f1303caLU, +0x2aba27adLU, 0x7f1b7109LU, 0x80b58ba8LU, 0xd514dd0cLU, 0x33a432a7LU, 0x66056403LU, 0x99ab9ea2LU, 0xcc0ac806LU, +0x18860db9LU, 0x4d275b1dLU, 0xb289a1bcLU, 0xe728f718LU, 0x019818b3LU, 0x54394e17LU, 0xab97b4b6LU, 0xfe36e212LU, +0x4ec27385LU, 0x1b632521LU, 0xe4cddf80LU, 0xb16c8924LU, 0x57dc668fLU, 0x027d302bLU, 0xfdd3ca8aLU, 0xa8729c2eLU, +0x7cfe5991LU, 0x295f0f35LU, 0xd6f1f594LU, 0x8350a330LU, 0x65e04c9bLU, 0x30411a3fLU, 0xcfefe09eLU, 0x9a4eb63aLU, +0xe24a8ffdLU, 0xb7ebd959LU, 0x484523f8LU, 0x1de4755cLU, 0xfb549af7LU, 0xaef5cc53LU, 0x515b36f2LU, 0x04fa6056LU, +0xd076a5e9LU, 0x85d7f34dLU, 0x7a7909ecLU, 0x2fd85f48LU, 0xc968b0e3LU, 0x9cc9e647LU, 0x63671ce6LU, 0x36c64a42LU, +0x8632dbd5LU, 0xd3938d71LU, 0x2c3d77d0LU, 0x799c2174LU, 0x9f2ccedfLU, 0xca8d987bLU, 0x352362daLU, 0x6082347eLU, +0xb40ef1c1LU, 0xe1afa765LU, 0x1e015dc4LU, 0x4ba00b60LU, 0xad10e4cbLU, 0xf8b1b26fLU, 0x071f48ceLU, 0x52be1e6aLU }; static const ulong32 rs_tab2[256] = { -0x00000000LU, 0x87fc8255LU, 0x43b549aaLU, 0xc449cbffLU, 0x86279219LU, 0x01db104cLU, 0xc592dbb3LU, 0x426e59e6LU, -0x414e6932LU, 0xc6b2eb67LU, 0x02fb2098LU, 0x8507a2cdLU, 0xc769fb2bLU, 0x4095797eLU, 0x84dcb281LU, 0x032030d4LU, -0x829cd264LU, 0x05605031LU, 0xc1299bceLU, 0x46d5199bLU, 0x04bb407dLU, 0x8347c228LU, 0x470e09d7LU, 0xc0f28b82LU, -0xc3d2bb56LU, 0x442e3903LU, 0x8067f2fcLU, 0x079b70a9LU, 0x45f5294fLU, 0xc209ab1aLU, 0x064060e5LU, 0x81bce2b0LU, -0x4975e9c8LU, 0xce896b9dLU, 0x0ac0a062LU, 0x8d3c2237LU, 0xcf527bd1LU, 0x48aef984LU, 0x8ce7327bLU, 0x0b1bb02eLU, -0x083b80faLU, 0x8fc702afLU, 0x4b8ec950LU, 0xcc724b05LU, 0x8e1c12e3LU, 0x09e090b6LU, 0xcda95b49LU, 0x4a55d91cLU, -0xcbe93bacLU, 0x4c15b9f9LU, 0x885c7206LU, 0x0fa0f053LU, 0x4dcea9b5LU, 0xca322be0LU, 0x0e7be01fLU, 0x8987624aLU, -0x8aa7529eLU, 0x0d5bd0cbLU, 0xc9121b34LU, 0x4eee9961LU, 0x0c80c087LU, 0x8b7c42d2LU, 0x4f35892dLU, 0xc8c90b78LU, -0x92ea9fddLU, 0x15161d88LU, 0xd15fd677LU, 0x56a35422LU, 0x14cd0dc4LU, 0x93318f91LU, 0x5778446eLU, 0xd084c63bLU, -0xd3a4f6efLU, 0x545874baLU, 0x9011bf45LU, 0x17ed3d10LU, 0x558364f6LU, 0xd27fe6a3LU, 0x16362d5cLU, 0x91caaf09LU, -0x10764db9LU, 0x978acfecLU, 0x53c30413LU, 0xd43f8646LU, 0x9651dfa0LU, 0x11ad5df5LU, 0xd5e4960aLU, 0x5218145fLU, -0x5138248bLU, 0xd6c4a6deLU, 0x128d6d21LU, 0x9571ef74LU, 0xd71fb692LU, 0x50e334c7LU, 0x94aaff38LU, 0x13567d6dLU, -0xdb9f7615LU, 0x5c63f440LU, 0x982a3fbfLU, 0x1fd6bdeaLU, 0x5db8e40cLU, 0xda446659LU, 0x1e0dada6LU, 0x99f12ff3LU, -0x9ad11f27LU, 0x1d2d9d72LU, 0xd964568dLU, 0x5e98d4d8LU, 0x1cf68d3eLU, 0x9b0a0f6bLU, 0x5f43c494LU, 0xd8bf46c1LU, -0x5903a471LU, 0xdeff2624LU, 0x1ab6eddbLU, 0x9d4a6f8eLU, 0xdf243668LU, 0x58d8b43dLU, 0x9c917fc2LU, 0x1b6dfd97LU, -0x184dcd43LU, 0x9fb14f16LU, 0x5bf884e9LU, 0xdc0406bcLU, 0x9e6a5f5aLU, 0x1996dd0fLU, 0xdddf16f0LU, 0x5a2394a5LU, -0x699973f7LU, 0xee65f1a2LU, 0x2a2c3a5dLU, 0xadd0b808LU, 0xefbee1eeLU, 0x684263bbLU, 0xac0ba844LU, 0x2bf72a11LU, -0x28d71ac5LU, 0xaf2b9890LU, 0x6b62536fLU, 0xec9ed13aLU, 0xaef088dcLU, 0x290c0a89LU, 0xed45c176LU, 0x6ab94323LU, -0xeb05a193LU, 0x6cf923c6LU, 0xa8b0e839LU, 0x2f4c6a6cLU, 0x6d22338aLU, 0xeadeb1dfLU, 0x2e977a20LU, 0xa96bf875LU, -0xaa4bc8a1LU, 0x2db74af4LU, 0xe9fe810bLU, 0x6e02035eLU, 0x2c6c5ab8LU, 0xab90d8edLU, 0x6fd91312LU, 0xe8259147LU, -0x20ec9a3fLU, 0xa710186aLU, 0x6359d395LU, 0xe4a551c0LU, 0xa6cb0826LU, 0x21378a73LU, 0xe57e418cLU, 0x6282c3d9LU, -0x61a2f30dLU, 0xe65e7158LU, 0x2217baa7LU, 0xa5eb38f2LU, 0xe7856114LU, 0x6079e341LU, 0xa43028beLU, 0x23ccaaebLU, -0xa270485bLU, 0x258cca0eLU, 0xe1c501f1LU, 0x663983a4LU, 0x2457da42LU, 0xa3ab5817LU, 0x67e293e8LU, 0xe01e11bdLU, -0xe33e2169LU, 0x64c2a33cLU, 0xa08b68c3LU, 0x2777ea96LU, 0x6519b370LU, 0xe2e53125LU, 0x26acfadaLU, 0xa150788fLU, -0xfb73ec2aLU, 0x7c8f6e7fLU, 0xb8c6a580LU, 0x3f3a27d5LU, 0x7d547e33LU, 0xfaa8fc66LU, 0x3ee13799LU, 0xb91db5ccLU, -0xba3d8518LU, 0x3dc1074dLU, 0xf988ccb2LU, 0x7e744ee7LU, 0x3c1a1701LU, 0xbbe69554LU, 0x7faf5eabLU, 0xf853dcfeLU, -0x79ef3e4eLU, 0xfe13bc1bLU, 0x3a5a77e4LU, 0xbda6f5b1LU, 0xffc8ac57LU, 0x78342e02LU, 0xbc7de5fdLU, 0x3b8167a8LU, -0x38a1577cLU, 0xbf5dd529LU, 0x7b141ed6LU, 0xfce89c83LU, 0xbe86c565LU, 0x397a4730LU, 0xfd338ccfLU, 0x7acf0e9aLU, -0xb20605e2LU, 0x35fa87b7LU, 0xf1b34c48LU, 0x764fce1dLU, 0x342197fbLU, 0xb3dd15aeLU, 0x7794de51LU, 0xf0685c04LU, -0xf3486cd0LU, 0x74b4ee85LU, 0xb0fd257aLU, 0x3701a72fLU, 0x756ffec9LU, 0xf2937c9cLU, 0x36dab763LU, 0xb1263536LU, -0x309ad786LU, 0xb76655d3LU, 0x732f9e2cLU, 0xf4d31c79LU, 0xb6bd459fLU, 0x3141c7caLU, 0xf5080c35LU, 0x72f48e60LU, -0x71d4beb4LU, 0xf6283ce1LU, 0x3261f71eLU, 0xb59d754bLU, 0xf7f32cadLU, 0x700faef8LU, 0xb4466507LU, 0x33bae752LU }; +0x00000000LU, 0x87fc8255LU, 0x43b549aaLU, 0xc449cbffLU, 0x86279219LU, 0x01db104cLU, 0xc592dbb3LU, 0x426e59e6LU, +0x414e6932LU, 0xc6b2eb67LU, 0x02fb2098LU, 0x8507a2cdLU, 0xc769fb2bLU, 0x4095797eLU, 0x84dcb281LU, 0x032030d4LU, +0x829cd264LU, 0x05605031LU, 0xc1299bceLU, 0x46d5199bLU, 0x04bb407dLU, 0x8347c228LU, 0x470e09d7LU, 0xc0f28b82LU, +0xc3d2bb56LU, 0x442e3903LU, 0x8067f2fcLU, 0x079b70a9LU, 0x45f5294fLU, 0xc209ab1aLU, 0x064060e5LU, 0x81bce2b0LU, +0x4975e9c8LU, 0xce896b9dLU, 0x0ac0a062LU, 0x8d3c2237LU, 0xcf527bd1LU, 0x48aef984LU, 0x8ce7327bLU, 0x0b1bb02eLU, +0x083b80faLU, 0x8fc702afLU, 0x4b8ec950LU, 0xcc724b05LU, 0x8e1c12e3LU, 0x09e090b6LU, 0xcda95b49LU, 0x4a55d91cLU, +0xcbe93bacLU, 0x4c15b9f9LU, 0x885c7206LU, 0x0fa0f053LU, 0x4dcea9b5LU, 0xca322be0LU, 0x0e7be01fLU, 0x8987624aLU, +0x8aa7529eLU, 0x0d5bd0cbLU, 0xc9121b34LU, 0x4eee9961LU, 0x0c80c087LU, 0x8b7c42d2LU, 0x4f35892dLU, 0xc8c90b78LU, +0x92ea9fddLU, 0x15161d88LU, 0xd15fd677LU, 0x56a35422LU, 0x14cd0dc4LU, 0x93318f91LU, 0x5778446eLU, 0xd084c63bLU, +0xd3a4f6efLU, 0x545874baLU, 0x9011bf45LU, 0x17ed3d10LU, 0x558364f6LU, 0xd27fe6a3LU, 0x16362d5cLU, 0x91caaf09LU, +0x10764db9LU, 0x978acfecLU, 0x53c30413LU, 0xd43f8646LU, 0x9651dfa0LU, 0x11ad5df5LU, 0xd5e4960aLU, 0x5218145fLU, +0x5138248bLU, 0xd6c4a6deLU, 0x128d6d21LU, 0x9571ef74LU, 0xd71fb692LU, 0x50e334c7LU, 0x94aaff38LU, 0x13567d6dLU, +0xdb9f7615LU, 0x5c63f440LU, 0x982a3fbfLU, 0x1fd6bdeaLU, 0x5db8e40cLU, 0xda446659LU, 0x1e0dada6LU, 0x99f12ff3LU, +0x9ad11f27LU, 0x1d2d9d72LU, 0xd964568dLU, 0x5e98d4d8LU, 0x1cf68d3eLU, 0x9b0a0f6bLU, 0x5f43c494LU, 0xd8bf46c1LU, +0x5903a471LU, 0xdeff2624LU, 0x1ab6eddbLU, 0x9d4a6f8eLU, 0xdf243668LU, 0x58d8b43dLU, 0x9c917fc2LU, 0x1b6dfd97LU, +0x184dcd43LU, 0x9fb14f16LU, 0x5bf884e9LU, 0xdc0406bcLU, 0x9e6a5f5aLU, 0x1996dd0fLU, 0xdddf16f0LU, 0x5a2394a5LU, +0x699973f7LU, 0xee65f1a2LU, 0x2a2c3a5dLU, 0xadd0b808LU, 0xefbee1eeLU, 0x684263bbLU, 0xac0ba844LU, 0x2bf72a11LU, +0x28d71ac5LU, 0xaf2b9890LU, 0x6b62536fLU, 0xec9ed13aLU, 0xaef088dcLU, 0x290c0a89LU, 0xed45c176LU, 0x6ab94323LU, +0xeb05a193LU, 0x6cf923c6LU, 0xa8b0e839LU, 0x2f4c6a6cLU, 0x6d22338aLU, 0xeadeb1dfLU, 0x2e977a20LU, 0xa96bf875LU, +0xaa4bc8a1LU, 0x2db74af4LU, 0xe9fe810bLU, 0x6e02035eLU, 0x2c6c5ab8LU, 0xab90d8edLU, 0x6fd91312LU, 0xe8259147LU, +0x20ec9a3fLU, 0xa710186aLU, 0x6359d395LU, 0xe4a551c0LU, 0xa6cb0826LU, 0x21378a73LU, 0xe57e418cLU, 0x6282c3d9LU, +0x61a2f30dLU, 0xe65e7158LU, 0x2217baa7LU, 0xa5eb38f2LU, 0xe7856114LU, 0x6079e341LU, 0xa43028beLU, 0x23ccaaebLU, +0xa270485bLU, 0x258cca0eLU, 0xe1c501f1LU, 0x663983a4LU, 0x2457da42LU, 0xa3ab5817LU, 0x67e293e8LU, 0xe01e11bdLU, +0xe33e2169LU, 0x64c2a33cLU, 0xa08b68c3LU, 0x2777ea96LU, 0x6519b370LU, 0xe2e53125LU, 0x26acfadaLU, 0xa150788fLU, +0xfb73ec2aLU, 0x7c8f6e7fLU, 0xb8c6a580LU, 0x3f3a27d5LU, 0x7d547e33LU, 0xfaa8fc66LU, 0x3ee13799LU, 0xb91db5ccLU, +0xba3d8518LU, 0x3dc1074dLU, 0xf988ccb2LU, 0x7e744ee7LU, 0x3c1a1701LU, 0xbbe69554LU, 0x7faf5eabLU, 0xf853dcfeLU, +0x79ef3e4eLU, 0xfe13bc1bLU, 0x3a5a77e4LU, 0xbda6f5b1LU, 0xffc8ac57LU, 0x78342e02LU, 0xbc7de5fdLU, 0x3b8167a8LU, +0x38a1577cLU, 0xbf5dd529LU, 0x7b141ed6LU, 0xfce89c83LU, 0xbe86c565LU, 0x397a4730LU, 0xfd338ccfLU, 0x7acf0e9aLU, +0xb20605e2LU, 0x35fa87b7LU, 0xf1b34c48LU, 0x764fce1dLU, 0x342197fbLU, 0xb3dd15aeLU, 0x7794de51LU, 0xf0685c04LU, +0xf3486cd0LU, 0x74b4ee85LU, 0xb0fd257aLU, 0x3701a72fLU, 0x756ffec9LU, 0xf2937c9cLU, 0x36dab763LU, 0xb1263536LU, +0x309ad786LU, 0xb76655d3LU, 0x732f9e2cLU, 0xf4d31c79LU, 0xb6bd459fLU, 0x3141c7caLU, 0xf5080c35LU, 0x72f48e60LU, +0x71d4beb4LU, 0xf6283ce1LU, 0x3261f71eLU, 0xb59d754bLU, 0xf7f32cadLU, 0x700faef8LU, 0xb4466507LU, 0x33bae752LU }; static const ulong32 rs_tab3[256] = { -0x00000000LU, 0x5ac1f387LU, 0xb4cfab43LU, 0xee0e58c4LU, 0x25d31b86LU, 0x7f12e801LU, 0x911cb0c5LU, 0xcbdd4342LU, -0x4aeb3641LU, 0x102ac5c6LU, 0xfe249d02LU, 0xa4e56e85LU, 0x6f382dc7LU, 0x35f9de40LU, 0xdbf78684LU, 0x81367503LU, -0x949b6c82LU, 0xce5a9f05LU, 0x2054c7c1LU, 0x7a953446LU, 0xb1487704LU, 0xeb898483LU, 0x0587dc47LU, 0x5f462fc0LU, +0x00000000LU, 0x5ac1f387LU, 0xb4cfab43LU, 0xee0e58c4LU, 0x25d31b86LU, 0x7f12e801LU, 0x911cb0c5LU, 0xcbdd4342LU, +0x4aeb3641LU, 0x102ac5c6LU, 0xfe249d02LU, 0xa4e56e85LU, 0x6f382dc7LU, 0x35f9de40LU, 0xdbf78684LU, 0x81367503LU, +0x949b6c82LU, 0xce5a9f05LU, 0x2054c7c1LU, 0x7a953446LU, 0xb1487704LU, 0xeb898483LU, 0x0587dc47LU, 0x5f462fc0LU, 0xde705ac3LU, 0x84b1a944LU, 0x6abff180LU, 0x307e0207LU, 0xfba34145LU, 0xa162b2c2LU, 0x4f6cea06LU, 0x15ad1981LU, -0x657bd849LU, 0x3fba2bceLU, 0xd1b4730aLU, 0x8b75808dLU, 0x40a8c3cfLU, 0x1a693048LU, 0xf467688cLU, 0xaea69b0bLU, -0x2f90ee08LU, 0x75511d8fLU, 0x9b5f454bLU, 0xc19eb6ccLU, 0x0a43f58eLU, 0x50820609LU, 0xbe8c5ecdLU, 0xe44dad4aLU, -0xf1e0b4cbLU, 0xab21474cLU, 0x452f1f88LU, 0x1feeec0fLU, 0xd433af4dLU, 0x8ef25ccaLU, 0x60fc040eLU, 0x3a3df789LU, -0xbb0b828aLU, 0xe1ca710dLU, 0x0fc429c9LU, 0x5505da4eLU, 0x9ed8990cLU, 0xc4196a8bLU, 0x2a17324fLU, 0x70d6c1c8LU, -0xcaf6fd92LU, 0x90370e15LU, 0x7e3956d1LU, 0x24f8a556LU, 0xef25e614LU, 0xb5e41593LU, 0x5bea4d57LU, 0x012bbed0LU, +0x657bd849LU, 0x3fba2bceLU, 0xd1b4730aLU, 0x8b75808dLU, 0x40a8c3cfLU, 0x1a693048LU, 0xf467688cLU, 0xaea69b0bLU, +0x2f90ee08LU, 0x75511d8fLU, 0x9b5f454bLU, 0xc19eb6ccLU, 0x0a43f58eLU, 0x50820609LU, 0xbe8c5ecdLU, 0xe44dad4aLU, +0xf1e0b4cbLU, 0xab21474cLU, 0x452f1f88LU, 0x1feeec0fLU, 0xd433af4dLU, 0x8ef25ccaLU, 0x60fc040eLU, 0x3a3df789LU, +0xbb0b828aLU, 0xe1ca710dLU, 0x0fc429c9LU, 0x5505da4eLU, 0x9ed8990cLU, 0xc4196a8bLU, 0x2a17324fLU, 0x70d6c1c8LU, +0xcaf6fd92LU, 0x90370e15LU, 0x7e3956d1LU, 0x24f8a556LU, 0xef25e614LU, 0xb5e41593LU, 0x5bea4d57LU, 0x012bbed0LU, 0x801dcbd3LU, 0xdadc3854LU, 0x34d26090LU, 0x6e139317LU, 0xa5ced055LU, 0xff0f23d2LU, 0x11017b16LU, 0x4bc08891LU, -0x5e6d9110LU, 0x04ac6297LU, 0xeaa23a53LU, 0xb063c9d4LU, 0x7bbe8a96LU, 0x217f7911LU, 0xcf7121d5LU, 0x95b0d252LU, -0x1486a751LU, 0x4e4754d6LU, 0xa0490c12LU, 0xfa88ff95LU, 0x3155bcd7LU, 0x6b944f50LU, 0x859a1794LU, 0xdf5be413LU, +0x5e6d9110LU, 0x04ac6297LU, 0xeaa23a53LU, 0xb063c9d4LU, 0x7bbe8a96LU, 0x217f7911LU, 0xcf7121d5LU, 0x95b0d252LU, +0x1486a751LU, 0x4e4754d6LU, 0xa0490c12LU, 0xfa88ff95LU, 0x3155bcd7LU, 0x6b944f50LU, 0x859a1794LU, 0xdf5be413LU, 0xaf8d25dbLU, 0xf54cd65cLU, 0x1b428e98LU, 0x41837d1fLU, 0x8a5e3e5dLU, 0xd09fcddaLU, 0x3e91951eLU, 0x64506699LU, -0xe566139aLU, 0xbfa7e01dLU, 0x51a9b8d9LU, 0x0b684b5eLU, 0xc0b5081cLU, 0x9a74fb9bLU, 0x747aa35fLU, 0x2ebb50d8LU, -0x3b164959LU, 0x61d7badeLU, 0x8fd9e21aLU, 0xd518119dLU, 0x1ec552dfLU, 0x4404a158LU, 0xaa0af99cLU, 0xf0cb0a1bLU, -0x71fd7f18LU, 0x2b3c8c9fLU, 0xc532d45bLU, 0x9ff327dcLU, 0x542e649eLU, 0x0eef9719LU, 0xe0e1cfddLU, 0xba203c5aLU, -0xd9a1b769LU, 0x836044eeLU, 0x6d6e1c2aLU, 0x37afefadLU, 0xfc72acefLU, 0xa6b35f68LU, 0x48bd07acLU, 0x127cf42bLU, -0x934a8128LU, 0xc98b72afLU, 0x27852a6bLU, 0x7d44d9ecLU, 0xb6999aaeLU, 0xec586929LU, 0x025631edLU, 0x5897c26aLU, -0x4d3adbebLU, 0x17fb286cLU, 0xf9f570a8LU, 0xa334832fLU, 0x68e9c06dLU, 0x322833eaLU, 0xdc266b2eLU, 0x86e798a9LU, -0x07d1edaaLU, 0x5d101e2dLU, 0xb31e46e9LU, 0xe9dfb56eLU, 0x2202f62cLU, 0x78c305abLU, 0x96cd5d6fLU, 0xcc0caee8LU, -0xbcda6f20LU, 0xe61b9ca7LU, 0x0815c463LU, 0x52d437e4LU, 0x990974a6LU, 0xc3c88721LU, 0x2dc6dfe5LU, 0x77072c62LU, -0xf6315961LU, 0xacf0aae6LU, 0x42fef222LU, 0x183f01a5LU, 0xd3e242e7LU, 0x8923b160LU, 0x672de9a4LU, 0x3dec1a23LU, -0x284103a2LU, 0x7280f025LU, 0x9c8ea8e1LU, 0xc64f5b66LU, 0x0d921824LU, 0x5753eba3LU, 0xb95db367LU, 0xe39c40e0LU, -0x62aa35e3LU, 0x386bc664LU, 0xd6659ea0LU, 0x8ca46d27LU, 0x47792e65LU, 0x1db8dde2LU, 0xf3b68526LU, 0xa97776a1LU, -0x13574afbLU, 0x4996b97cLU, 0xa798e1b8LU, 0xfd59123fLU, 0x3684517dLU, 0x6c45a2faLU, 0x824bfa3eLU, 0xd88a09b9LU, -0x59bc7cbaLU, 0x037d8f3dLU, 0xed73d7f9LU, 0xb7b2247eLU, 0x7c6f673cLU, 0x26ae94bbLU, 0xc8a0cc7fLU, 0x92613ff8LU, -0x87cc2679LU, 0xdd0dd5feLU, 0x33038d3aLU, 0x69c27ebdLU, 0xa21f3dffLU, 0xf8dece78LU, 0x16d096bcLU, 0x4c11653bLU, -0xcd271038LU, 0x97e6e3bfLU, 0x79e8bb7bLU, 0x232948fcLU, 0xe8f40bbeLU, 0xb235f839LU, 0x5c3ba0fdLU, 0x06fa537aLU, -0x762c92b2LU, 0x2ced6135LU, 0xc2e339f1LU, 0x9822ca76LU, 0x53ff8934LU, 0x093e7ab3LU, 0xe7302277LU, 0xbdf1d1f0LU, -0x3cc7a4f3LU, 0x66065774LU, 0x88080fb0LU, 0xd2c9fc37LU, 0x1914bf75LU, 0x43d54cf2LU, 0xaddb1436LU, 0xf71ae7b1LU, -0xe2b7fe30LU, 0xb8760db7LU, 0x56785573LU, 0x0cb9a6f4LU, 0xc764e5b6LU, 0x9da51631LU, 0x73ab4ef5LU, 0x296abd72LU, -0xa85cc871LU, 0xf29d3bf6LU, 0x1c936332LU, 0x465290b5LU, 0x8d8fd3f7LU, 0xd74e2070LU, 0x394078b4LU, 0x63818b33LU }; +0xe566139aLU, 0xbfa7e01dLU, 0x51a9b8d9LU, 0x0b684b5eLU, 0xc0b5081cLU, 0x9a74fb9bLU, 0x747aa35fLU, 0x2ebb50d8LU, +0x3b164959LU, 0x61d7badeLU, 0x8fd9e21aLU, 0xd518119dLU, 0x1ec552dfLU, 0x4404a158LU, 0xaa0af99cLU, 0xf0cb0a1bLU, +0x71fd7f18LU, 0x2b3c8c9fLU, 0xc532d45bLU, 0x9ff327dcLU, 0x542e649eLU, 0x0eef9719LU, 0xe0e1cfddLU, 0xba203c5aLU, +0xd9a1b769LU, 0x836044eeLU, 0x6d6e1c2aLU, 0x37afefadLU, 0xfc72acefLU, 0xa6b35f68LU, 0x48bd07acLU, 0x127cf42bLU, +0x934a8128LU, 0xc98b72afLU, 0x27852a6bLU, 0x7d44d9ecLU, 0xb6999aaeLU, 0xec586929LU, 0x025631edLU, 0x5897c26aLU, +0x4d3adbebLU, 0x17fb286cLU, 0xf9f570a8LU, 0xa334832fLU, 0x68e9c06dLU, 0x322833eaLU, 0xdc266b2eLU, 0x86e798a9LU, +0x07d1edaaLU, 0x5d101e2dLU, 0xb31e46e9LU, 0xe9dfb56eLU, 0x2202f62cLU, 0x78c305abLU, 0x96cd5d6fLU, 0xcc0caee8LU, +0xbcda6f20LU, 0xe61b9ca7LU, 0x0815c463LU, 0x52d437e4LU, 0x990974a6LU, 0xc3c88721LU, 0x2dc6dfe5LU, 0x77072c62LU, +0xf6315961LU, 0xacf0aae6LU, 0x42fef222LU, 0x183f01a5LU, 0xd3e242e7LU, 0x8923b160LU, 0x672de9a4LU, 0x3dec1a23LU, +0x284103a2LU, 0x7280f025LU, 0x9c8ea8e1LU, 0xc64f5b66LU, 0x0d921824LU, 0x5753eba3LU, 0xb95db367LU, 0xe39c40e0LU, +0x62aa35e3LU, 0x386bc664LU, 0xd6659ea0LU, 0x8ca46d27LU, 0x47792e65LU, 0x1db8dde2LU, 0xf3b68526LU, 0xa97776a1LU, +0x13574afbLU, 0x4996b97cLU, 0xa798e1b8LU, 0xfd59123fLU, 0x3684517dLU, 0x6c45a2faLU, 0x824bfa3eLU, 0xd88a09b9LU, +0x59bc7cbaLU, 0x037d8f3dLU, 0xed73d7f9LU, 0xb7b2247eLU, 0x7c6f673cLU, 0x26ae94bbLU, 0xc8a0cc7fLU, 0x92613ff8LU, +0x87cc2679LU, 0xdd0dd5feLU, 0x33038d3aLU, 0x69c27ebdLU, 0xa21f3dffLU, 0xf8dece78LU, 0x16d096bcLU, 0x4c11653bLU, +0xcd271038LU, 0x97e6e3bfLU, 0x79e8bb7bLU, 0x232948fcLU, 0xe8f40bbeLU, 0xb235f839LU, 0x5c3ba0fdLU, 0x06fa537aLU, +0x762c92b2LU, 0x2ced6135LU, 0xc2e339f1LU, 0x9822ca76LU, 0x53ff8934LU, 0x093e7ab3LU, 0xe7302277LU, 0xbdf1d1f0LU, +0x3cc7a4f3LU, 0x66065774LU, 0x88080fb0LU, 0xd2c9fc37LU, 0x1914bf75LU, 0x43d54cf2LU, 0xaddb1436LU, 0xf71ae7b1LU, +0xe2b7fe30LU, 0xb8760db7LU, 0x56785573LU, 0x0cb9a6f4LU, 0xc764e5b6LU, 0x9da51631LU, 0x73ab4ef5LU, 0x296abd72LU, +0xa85cc871LU, 0xf29d3bf6LU, 0x1c936332LU, 0x465290b5LU, 0x8d8fd3f7LU, 0xd74e2070LU, 0x394078b4LU, 0x63818b33LU }; static const ulong32 rs_tab4[256] = { -0x00000000LU, 0x58471e5aLU, 0xb08e3cb4LU, 0xe8c922eeLU, 0x2d517825LU, 0x7516667fLU, 0x9ddf4491LU, 0xc5985acbLU, -0x5aa2f04aLU, 0x02e5ee10LU, 0xea2cccfeLU, 0xb26bd2a4LU, 0x77f3886fLU, 0x2fb49635LU, 0xc77db4dbLU, 0x9f3aaa81LU, -0xb409ad94LU, 0xec4eb3ceLU, 0x04879120LU, 0x5cc08f7aLU, 0x9958d5b1LU, 0xc11fcbebLU, 0x29d6e905LU, 0x7191f75fLU, -0xeeab5ddeLU, 0xb6ec4384LU, 0x5e25616aLU, 0x06627f30LU, 0xc3fa25fbLU, 0x9bbd3ba1LU, 0x7374194fLU, 0x2b330715LU, -0x25121765LU, 0x7d55093fLU, 0x959c2bd1LU, 0xcddb358bLU, 0x08436f40LU, 0x5004711aLU, 0xb8cd53f4LU, 0xe08a4daeLU, -0x7fb0e72fLU, 0x27f7f975LU, 0xcf3edb9bLU, 0x9779c5c1LU, 0x52e19f0aLU, 0x0aa68150LU, 0xe26fa3beLU, 0xba28bde4LU, -0x911bbaf1LU, 0xc95ca4abLU, 0x21958645LU, 0x79d2981fLU, 0xbc4ac2d4LU, 0xe40ddc8eLU, 0x0cc4fe60LU, 0x5483e03aLU, -0xcbb94abbLU, 0x93fe54e1LU, 0x7b37760fLU, 0x23706855LU, 0xe6e8329eLU, 0xbeaf2cc4LU, 0x56660e2aLU, 0x0e211070LU, -0x4a242ecaLU, 0x12633090LU, 0xfaaa127eLU, 0xa2ed0c24LU, 0x677556efLU, 0x3f3248b5LU, 0xd7fb6a5bLU, 0x8fbc7401LU, -0x1086de80LU, 0x48c1c0daLU, 0xa008e234LU, 0xf84ffc6eLU, 0x3dd7a6a5LU, 0x6590b8ffLU, 0x8d599a11LU, 0xd51e844bLU, -0xfe2d835eLU, 0xa66a9d04LU, 0x4ea3bfeaLU, 0x16e4a1b0LU, 0xd37cfb7bLU, 0x8b3be521LU, 0x63f2c7cfLU, 0x3bb5d995LU, -0xa48f7314LU, 0xfcc86d4eLU, 0x14014fa0LU, 0x4c4651faLU, 0x89de0b31LU, 0xd199156bLU, 0x39503785LU, 0x611729dfLU, -0x6f3639afLU, 0x377127f5LU, 0xdfb8051bLU, 0x87ff1b41LU, 0x4267418aLU, 0x1a205fd0LU, 0xf2e97d3eLU, 0xaaae6364LU, -0x3594c9e5LU, 0x6dd3d7bfLU, 0x851af551LU, 0xdd5deb0bLU, 0x18c5b1c0LU, 0x4082af9aLU, 0xa84b8d74LU, 0xf00c932eLU, -0xdb3f943bLU, 0x83788a61LU, 0x6bb1a88fLU, 0x33f6b6d5LU, 0xf66eec1eLU, 0xae29f244LU, 0x46e0d0aaLU, 0x1ea7cef0LU, -0x819d6471LU, 0xd9da7a2bLU, 0x311358c5LU, 0x6954469fLU, 0xaccc1c54LU, 0xf48b020eLU, 0x1c4220e0LU, 0x44053ebaLU, -0x94485cd9LU, 0xcc0f4283LU, 0x24c6606dLU, 0x7c817e37LU, 0xb91924fcLU, 0xe15e3aa6LU, 0x09971848LU, 0x51d00612LU, -0xceeaac93LU, 0x96adb2c9LU, 0x7e649027LU, 0x26238e7dLU, 0xe3bbd4b6LU, 0xbbfccaecLU, 0x5335e802LU, 0x0b72f658LU, -0x2041f14dLU, 0x7806ef17LU, 0x90cfcdf9LU, 0xc888d3a3LU, 0x0d108968LU, 0x55579732LU, 0xbd9eb5dcLU, 0xe5d9ab86LU, -0x7ae30107LU, 0x22a41f5dLU, 0xca6d3db3LU, 0x922a23e9LU, 0x57b27922LU, 0x0ff56778LU, 0xe73c4596LU, 0xbf7b5bccLU, -0xb15a4bbcLU, 0xe91d55e6LU, 0x01d47708LU, 0x59936952LU, 0x9c0b3399LU, 0xc44c2dc3LU, 0x2c850f2dLU, 0x74c21177LU, -0xebf8bbf6LU, 0xb3bfa5acLU, 0x5b768742LU, 0x03319918LU, 0xc6a9c3d3LU, 0x9eeedd89LU, 0x7627ff67LU, 0x2e60e13dLU, -0x0553e628LU, 0x5d14f872LU, 0xb5ddda9cLU, 0xed9ac4c6LU, 0x28029e0dLU, 0x70458057LU, 0x988ca2b9LU, 0xc0cbbce3LU, -0x5ff11662LU, 0x07b60838LU, 0xef7f2ad6LU, 0xb738348cLU, 0x72a06e47LU, 0x2ae7701dLU, 0xc22e52f3LU, 0x9a694ca9LU, -0xde6c7213LU, 0x862b6c49LU, 0x6ee24ea7LU, 0x36a550fdLU, 0xf33d0a36LU, 0xab7a146cLU, 0x43b33682LU, 0x1bf428d8LU, +0x00000000LU, 0x58471e5aLU, 0xb08e3cb4LU, 0xe8c922eeLU, 0x2d517825LU, 0x7516667fLU, 0x9ddf4491LU, 0xc5985acbLU, +0x5aa2f04aLU, 0x02e5ee10LU, 0xea2cccfeLU, 0xb26bd2a4LU, 0x77f3886fLU, 0x2fb49635LU, 0xc77db4dbLU, 0x9f3aaa81LU, +0xb409ad94LU, 0xec4eb3ceLU, 0x04879120LU, 0x5cc08f7aLU, 0x9958d5b1LU, 0xc11fcbebLU, 0x29d6e905LU, 0x7191f75fLU, +0xeeab5ddeLU, 0xb6ec4384LU, 0x5e25616aLU, 0x06627f30LU, 0xc3fa25fbLU, 0x9bbd3ba1LU, 0x7374194fLU, 0x2b330715LU, +0x25121765LU, 0x7d55093fLU, 0x959c2bd1LU, 0xcddb358bLU, 0x08436f40LU, 0x5004711aLU, 0xb8cd53f4LU, 0xe08a4daeLU, +0x7fb0e72fLU, 0x27f7f975LU, 0xcf3edb9bLU, 0x9779c5c1LU, 0x52e19f0aLU, 0x0aa68150LU, 0xe26fa3beLU, 0xba28bde4LU, +0x911bbaf1LU, 0xc95ca4abLU, 0x21958645LU, 0x79d2981fLU, 0xbc4ac2d4LU, 0xe40ddc8eLU, 0x0cc4fe60LU, 0x5483e03aLU, +0xcbb94abbLU, 0x93fe54e1LU, 0x7b37760fLU, 0x23706855LU, 0xe6e8329eLU, 0xbeaf2cc4LU, 0x56660e2aLU, 0x0e211070LU, +0x4a242ecaLU, 0x12633090LU, 0xfaaa127eLU, 0xa2ed0c24LU, 0x677556efLU, 0x3f3248b5LU, 0xd7fb6a5bLU, 0x8fbc7401LU, +0x1086de80LU, 0x48c1c0daLU, 0xa008e234LU, 0xf84ffc6eLU, 0x3dd7a6a5LU, 0x6590b8ffLU, 0x8d599a11LU, 0xd51e844bLU, +0xfe2d835eLU, 0xa66a9d04LU, 0x4ea3bfeaLU, 0x16e4a1b0LU, 0xd37cfb7bLU, 0x8b3be521LU, 0x63f2c7cfLU, 0x3bb5d995LU, +0xa48f7314LU, 0xfcc86d4eLU, 0x14014fa0LU, 0x4c4651faLU, 0x89de0b31LU, 0xd199156bLU, 0x39503785LU, 0x611729dfLU, +0x6f3639afLU, 0x377127f5LU, 0xdfb8051bLU, 0x87ff1b41LU, 0x4267418aLU, 0x1a205fd0LU, 0xf2e97d3eLU, 0xaaae6364LU, +0x3594c9e5LU, 0x6dd3d7bfLU, 0x851af551LU, 0xdd5deb0bLU, 0x18c5b1c0LU, 0x4082af9aLU, 0xa84b8d74LU, 0xf00c932eLU, +0xdb3f943bLU, 0x83788a61LU, 0x6bb1a88fLU, 0x33f6b6d5LU, 0xf66eec1eLU, 0xae29f244LU, 0x46e0d0aaLU, 0x1ea7cef0LU, +0x819d6471LU, 0xd9da7a2bLU, 0x311358c5LU, 0x6954469fLU, 0xaccc1c54LU, 0xf48b020eLU, 0x1c4220e0LU, 0x44053ebaLU, +0x94485cd9LU, 0xcc0f4283LU, 0x24c6606dLU, 0x7c817e37LU, 0xb91924fcLU, 0xe15e3aa6LU, 0x09971848LU, 0x51d00612LU, +0xceeaac93LU, 0x96adb2c9LU, 0x7e649027LU, 0x26238e7dLU, 0xe3bbd4b6LU, 0xbbfccaecLU, 0x5335e802LU, 0x0b72f658LU, +0x2041f14dLU, 0x7806ef17LU, 0x90cfcdf9LU, 0xc888d3a3LU, 0x0d108968LU, 0x55579732LU, 0xbd9eb5dcLU, 0xe5d9ab86LU, +0x7ae30107LU, 0x22a41f5dLU, 0xca6d3db3LU, 0x922a23e9LU, 0x57b27922LU, 0x0ff56778LU, 0xe73c4596LU, 0xbf7b5bccLU, +0xb15a4bbcLU, 0xe91d55e6LU, 0x01d47708LU, 0x59936952LU, 0x9c0b3399LU, 0xc44c2dc3LU, 0x2c850f2dLU, 0x74c21177LU, +0xebf8bbf6LU, 0xb3bfa5acLU, 0x5b768742LU, 0x03319918LU, 0xc6a9c3d3LU, 0x9eeedd89LU, 0x7627ff67LU, 0x2e60e13dLU, +0x0553e628LU, 0x5d14f872LU, 0xb5ddda9cLU, 0xed9ac4c6LU, 0x28029e0dLU, 0x70458057LU, 0x988ca2b9LU, 0xc0cbbce3LU, +0x5ff11662LU, 0x07b60838LU, 0xef7f2ad6LU, 0xb738348cLU, 0x72a06e47LU, 0x2ae7701dLU, 0xc22e52f3LU, 0x9a694ca9LU, +0xde6c7213LU, 0x862b6c49LU, 0x6ee24ea7LU, 0x36a550fdLU, 0xf33d0a36LU, 0xab7a146cLU, 0x43b33682LU, 0x1bf428d8LU, 0x84ce8259LU, 0xdc899c03LU, 0x3440beedLU, 0x6c07a0b7LU, 0xa99ffa7cLU, 0xf1d8e426LU, 0x1911c6c8LU, 0x4156d892LU, -0x6a65df87LU, 0x3222c1ddLU, 0xdaebe333LU, 0x82acfd69LU, 0x4734a7a2LU, 0x1f73b9f8LU, 0xf7ba9b16LU, 0xaffd854cLU, -0x30c72fcdLU, 0x68803197LU, 0x80491379LU, 0xd80e0d23LU, 0x1d9657e8LU, 0x45d149b2LU, 0xad186b5cLU, 0xf55f7506LU, -0xfb7e6576LU, 0xa3397b2cLU, 0x4bf059c2LU, 0x13b74798LU, 0xd62f1d53LU, 0x8e680309LU, 0x66a121e7LU, 0x3ee63fbdLU, -0xa1dc953cLU, 0xf99b8b66LU, 0x1152a988LU, 0x4915b7d2LU, 0x8c8ded19LU, 0xd4caf343LU, 0x3c03d1adLU, 0x6444cff7LU, -0x4f77c8e2LU, 0x1730d6b8LU, 0xfff9f456LU, 0xa7beea0cLU, 0x6226b0c7LU, 0x3a61ae9dLU, 0xd2a88c73LU, 0x8aef9229LU, +0x6a65df87LU, 0x3222c1ddLU, 0xdaebe333LU, 0x82acfd69LU, 0x4734a7a2LU, 0x1f73b9f8LU, 0xf7ba9b16LU, 0xaffd854cLU, +0x30c72fcdLU, 0x68803197LU, 0x80491379LU, 0xd80e0d23LU, 0x1d9657e8LU, 0x45d149b2LU, 0xad186b5cLU, 0xf55f7506LU, +0xfb7e6576LU, 0xa3397b2cLU, 0x4bf059c2LU, 0x13b74798LU, 0xd62f1d53LU, 0x8e680309LU, 0x66a121e7LU, 0x3ee63fbdLU, +0xa1dc953cLU, 0xf99b8b66LU, 0x1152a988LU, 0x4915b7d2LU, 0x8c8ded19LU, 0xd4caf343LU, 0x3c03d1adLU, 0x6444cff7LU, +0x4f77c8e2LU, 0x1730d6b8LU, 0xfff9f456LU, 0xa7beea0cLU, 0x6226b0c7LU, 0x3a61ae9dLU, 0xd2a88c73LU, 0x8aef9229LU, 0x15d538a8LU, 0x4d9226f2LU, 0xa55b041cLU, 0xfd1c1a46LU, 0x3884408dLU, 0x60c35ed7LU, 0x880a7c39LU, 0xd04d6263LU }; static const ulong32 rs_tab5[256] = { -0x00000000LU, 0xdbaec658LU, 0xfb11c1b0LU, 0x20bf07e8LU, 0xbb22cf2dLU, 0x608c0975LU, 0x40330e9dLU, 0x9b9dc8c5LU, -0x3b44d35aLU, 0xe0ea1502LU, 0xc05512eaLU, 0x1bfbd4b2LU, 0x80661c77LU, 0x5bc8da2fLU, 0x7b77ddc7LU, 0xa0d91b9fLU, -0x7688ebb4LU, 0xad262decLU, 0x8d992a04LU, 0x5637ec5cLU, 0xcdaa2499LU, 0x1604e2c1LU, 0x36bbe529LU, 0xed152371LU, -0x4dcc38eeLU, 0x9662feb6LU, 0xb6ddf95eLU, 0x6d733f06LU, 0xf6eef7c3LU, 0x2d40319bLU, 0x0dff3673LU, 0xd651f02bLU, -0xec5d9b25LU, 0x37f35d7dLU, 0x174c5a95LU, 0xcce29ccdLU, 0x577f5408LU, 0x8cd19250LU, 0xac6e95b8LU, 0x77c053e0LU, -0xd719487fLU, 0x0cb78e27LU, 0x2c0889cfLU, 0xf7a64f97LU, 0x6c3b8752LU, 0xb795410aLU, 0x972a46e2LU, 0x4c8480baLU, -0x9ad57091LU, 0x417bb6c9LU, 0x61c4b121LU, 0xba6a7779LU, 0x21f7bfbcLU, 0xfa5979e4LU, 0xdae67e0cLU, 0x0148b854LU, -0xa191a3cbLU, 0x7a3f6593LU, 0x5a80627bLU, 0x812ea423LU, 0x1ab36ce6LU, 0xc11daabeLU, 0xe1a2ad56LU, 0x3a0c6b0eLU, -0x95ba7b4aLU, 0x4e14bd12LU, 0x6eabbafaLU, 0xb5057ca2LU, 0x2e98b467LU, 0xf536723fLU, 0xd58975d7LU, 0x0e27b38fLU, -0xaefea810LU, 0x75506e48LU, 0x55ef69a0LU, 0x8e41aff8LU, 0x15dc673dLU, 0xce72a165LU, 0xeecda68dLU, 0x356360d5LU, -0xe33290feLU, 0x389c56a6LU, 0x1823514eLU, 0xc38d9716LU, 0x58105fd3LU, 0x83be998bLU, 0xa3019e63LU, 0x78af583bLU, -0xd87643a4LU, 0x03d885fcLU, 0x23678214LU, 0xf8c9444cLU, 0x63548c89LU, 0xb8fa4ad1LU, 0x98454d39LU, 0x43eb8b61LU, -0x79e7e06fLU, 0xa2492637LU, 0x82f621dfLU, 0x5958e787LU, 0xc2c52f42LU, 0x196be91aLU, 0x39d4eef2LU, 0xe27a28aaLU, -0x42a33335LU, 0x990df56dLU, 0xb9b2f285LU, 0x621c34ddLU, 0xf981fc18LU, 0x222f3a40LU, 0x02903da8LU, 0xd93efbf0LU, -0x0f6f0bdbLU, 0xd4c1cd83LU, 0xf47eca6bLU, 0x2fd00c33LU, 0xb44dc4f6LU, 0x6fe302aeLU, 0x4f5c0546LU, 0x94f2c31eLU, -0x342bd881LU, 0xef851ed9LU, 0xcf3a1931LU, 0x1494df69LU, 0x8f0917acLU, 0x54a7d1f4LU, 0x7418d61cLU, 0xafb61044LU, -0x6739f694LU, 0xbc9730ccLU, 0x9c283724LU, 0x4786f17cLU, 0xdc1b39b9LU, 0x07b5ffe1LU, 0x270af809LU, 0xfca43e51LU, -0x5c7d25ceLU, 0x87d3e396LU, 0xa76ce47eLU, 0x7cc22226LU, 0xe75feae3LU, 0x3cf12cbbLU, 0x1c4e2b53LU, 0xc7e0ed0bLU, -0x11b11d20LU, 0xca1fdb78LU, 0xeaa0dc90LU, 0x310e1ac8LU, 0xaa93d20dLU, 0x713d1455LU, 0x518213bdLU, 0x8a2cd5e5LU, -0x2af5ce7aLU, 0xf15b0822LU, 0xd1e40fcaLU, 0x0a4ac992LU, 0x91d70157LU, 0x4a79c70fLU, 0x6ac6c0e7LU, 0xb16806bfLU, -0x8b646db1LU, 0x50caabe9LU, 0x7075ac01LU, 0xabdb6a59LU, 0x3046a29cLU, 0xebe864c4LU, 0xcb57632cLU, 0x10f9a574LU, -0xb020beebLU, 0x6b8e78b3LU, 0x4b317f5bLU, 0x909fb903LU, 0x0b0271c6LU, 0xd0acb79eLU, 0xf013b076LU, 0x2bbd762eLU, -0xfdec8605LU, 0x2642405dLU, 0x06fd47b5LU, 0xdd5381edLU, 0x46ce4928LU, 0x9d608f70LU, 0xbddf8898LU, 0x66714ec0LU, -0xc6a8555fLU, 0x1d069307LU, 0x3db994efLU, 0xe61752b7LU, 0x7d8a9a72LU, 0xa6245c2aLU, 0x869b5bc2LU, 0x5d359d9aLU, -0xf2838ddeLU, 0x292d4b86LU, 0x09924c6eLU, 0xd23c8a36LU, 0x49a142f3LU, 0x920f84abLU, 0xb2b08343LU, 0x691e451bLU, -0xc9c75e84LU, 0x126998dcLU, 0x32d69f34LU, 0xe978596cLU, 0x72e591a9LU, 0xa94b57f1LU, 0x89f45019LU, 0x525a9641LU, -0x840b666aLU, 0x5fa5a032LU, 0x7f1aa7daLU, 0xa4b46182LU, 0x3f29a947LU, 0xe4876f1fLU, 0xc43868f7LU, 0x1f96aeafLU, -0xbf4fb530LU, 0x64e17368LU, 0x445e7480LU, 0x9ff0b2d8LU, 0x046d7a1dLU, 0xdfc3bc45LU, 0xff7cbbadLU, 0x24d27df5LU, -0x1ede16fbLU, 0xc570d0a3LU, 0xe5cfd74bLU, 0x3e611113LU, 0xa5fcd9d6LU, 0x7e521f8eLU, 0x5eed1866LU, 0x8543de3eLU, -0x259ac5a1LU, 0xfe3403f9LU, 0xde8b0411LU, 0x0525c249LU, 0x9eb80a8cLU, 0x4516ccd4LU, 0x65a9cb3cLU, 0xbe070d64LU, -0x6856fd4fLU, 0xb3f83b17LU, 0x93473cffLU, 0x48e9faa7LU, 0xd3743262LU, 0x08daf43aLU, 0x2865f3d2LU, 0xf3cb358aLU, -0x53122e15LU, 0x88bce84dLU, 0xa803efa5LU, 0x73ad29fdLU, 0xe830e138LU, 0x339e2760LU, 0x13212088LU, 0xc88fe6d0LU }; +0x00000000LU, 0xdbaec658LU, 0xfb11c1b0LU, 0x20bf07e8LU, 0xbb22cf2dLU, 0x608c0975LU, 0x40330e9dLU, 0x9b9dc8c5LU, +0x3b44d35aLU, 0xe0ea1502LU, 0xc05512eaLU, 0x1bfbd4b2LU, 0x80661c77LU, 0x5bc8da2fLU, 0x7b77ddc7LU, 0xa0d91b9fLU, +0x7688ebb4LU, 0xad262decLU, 0x8d992a04LU, 0x5637ec5cLU, 0xcdaa2499LU, 0x1604e2c1LU, 0x36bbe529LU, 0xed152371LU, +0x4dcc38eeLU, 0x9662feb6LU, 0xb6ddf95eLU, 0x6d733f06LU, 0xf6eef7c3LU, 0x2d40319bLU, 0x0dff3673LU, 0xd651f02bLU, +0xec5d9b25LU, 0x37f35d7dLU, 0x174c5a95LU, 0xcce29ccdLU, 0x577f5408LU, 0x8cd19250LU, 0xac6e95b8LU, 0x77c053e0LU, +0xd719487fLU, 0x0cb78e27LU, 0x2c0889cfLU, 0xf7a64f97LU, 0x6c3b8752LU, 0xb795410aLU, 0x972a46e2LU, 0x4c8480baLU, +0x9ad57091LU, 0x417bb6c9LU, 0x61c4b121LU, 0xba6a7779LU, 0x21f7bfbcLU, 0xfa5979e4LU, 0xdae67e0cLU, 0x0148b854LU, +0xa191a3cbLU, 0x7a3f6593LU, 0x5a80627bLU, 0x812ea423LU, 0x1ab36ce6LU, 0xc11daabeLU, 0xe1a2ad56LU, 0x3a0c6b0eLU, +0x95ba7b4aLU, 0x4e14bd12LU, 0x6eabbafaLU, 0xb5057ca2LU, 0x2e98b467LU, 0xf536723fLU, 0xd58975d7LU, 0x0e27b38fLU, +0xaefea810LU, 0x75506e48LU, 0x55ef69a0LU, 0x8e41aff8LU, 0x15dc673dLU, 0xce72a165LU, 0xeecda68dLU, 0x356360d5LU, +0xe33290feLU, 0x389c56a6LU, 0x1823514eLU, 0xc38d9716LU, 0x58105fd3LU, 0x83be998bLU, 0xa3019e63LU, 0x78af583bLU, +0xd87643a4LU, 0x03d885fcLU, 0x23678214LU, 0xf8c9444cLU, 0x63548c89LU, 0xb8fa4ad1LU, 0x98454d39LU, 0x43eb8b61LU, +0x79e7e06fLU, 0xa2492637LU, 0x82f621dfLU, 0x5958e787LU, 0xc2c52f42LU, 0x196be91aLU, 0x39d4eef2LU, 0xe27a28aaLU, +0x42a33335LU, 0x990df56dLU, 0xb9b2f285LU, 0x621c34ddLU, 0xf981fc18LU, 0x222f3a40LU, 0x02903da8LU, 0xd93efbf0LU, +0x0f6f0bdbLU, 0xd4c1cd83LU, 0xf47eca6bLU, 0x2fd00c33LU, 0xb44dc4f6LU, 0x6fe302aeLU, 0x4f5c0546LU, 0x94f2c31eLU, +0x342bd881LU, 0xef851ed9LU, 0xcf3a1931LU, 0x1494df69LU, 0x8f0917acLU, 0x54a7d1f4LU, 0x7418d61cLU, 0xafb61044LU, +0x6739f694LU, 0xbc9730ccLU, 0x9c283724LU, 0x4786f17cLU, 0xdc1b39b9LU, 0x07b5ffe1LU, 0x270af809LU, 0xfca43e51LU, +0x5c7d25ceLU, 0x87d3e396LU, 0xa76ce47eLU, 0x7cc22226LU, 0xe75feae3LU, 0x3cf12cbbLU, 0x1c4e2b53LU, 0xc7e0ed0bLU, +0x11b11d20LU, 0xca1fdb78LU, 0xeaa0dc90LU, 0x310e1ac8LU, 0xaa93d20dLU, 0x713d1455LU, 0x518213bdLU, 0x8a2cd5e5LU, +0x2af5ce7aLU, 0xf15b0822LU, 0xd1e40fcaLU, 0x0a4ac992LU, 0x91d70157LU, 0x4a79c70fLU, 0x6ac6c0e7LU, 0xb16806bfLU, +0x8b646db1LU, 0x50caabe9LU, 0x7075ac01LU, 0xabdb6a59LU, 0x3046a29cLU, 0xebe864c4LU, 0xcb57632cLU, 0x10f9a574LU, +0xb020beebLU, 0x6b8e78b3LU, 0x4b317f5bLU, 0x909fb903LU, 0x0b0271c6LU, 0xd0acb79eLU, 0xf013b076LU, 0x2bbd762eLU, +0xfdec8605LU, 0x2642405dLU, 0x06fd47b5LU, 0xdd5381edLU, 0x46ce4928LU, 0x9d608f70LU, 0xbddf8898LU, 0x66714ec0LU, +0xc6a8555fLU, 0x1d069307LU, 0x3db994efLU, 0xe61752b7LU, 0x7d8a9a72LU, 0xa6245c2aLU, 0x869b5bc2LU, 0x5d359d9aLU, +0xf2838ddeLU, 0x292d4b86LU, 0x09924c6eLU, 0xd23c8a36LU, 0x49a142f3LU, 0x920f84abLU, 0xb2b08343LU, 0x691e451bLU, +0xc9c75e84LU, 0x126998dcLU, 0x32d69f34LU, 0xe978596cLU, 0x72e591a9LU, 0xa94b57f1LU, 0x89f45019LU, 0x525a9641LU, +0x840b666aLU, 0x5fa5a032LU, 0x7f1aa7daLU, 0xa4b46182LU, 0x3f29a947LU, 0xe4876f1fLU, 0xc43868f7LU, 0x1f96aeafLU, +0xbf4fb530LU, 0x64e17368LU, 0x445e7480LU, 0x9ff0b2d8LU, 0x046d7a1dLU, 0xdfc3bc45LU, 0xff7cbbadLU, 0x24d27df5LU, +0x1ede16fbLU, 0xc570d0a3LU, 0xe5cfd74bLU, 0x3e611113LU, 0xa5fcd9d6LU, 0x7e521f8eLU, 0x5eed1866LU, 0x8543de3eLU, +0x259ac5a1LU, 0xfe3403f9LU, 0xde8b0411LU, 0x0525c249LU, 0x9eb80a8cLU, 0x4516ccd4LU, 0x65a9cb3cLU, 0xbe070d64LU, +0x6856fd4fLU, 0xb3f83b17LU, 0x93473cffLU, 0x48e9faa7LU, 0xd3743262LU, 0x08daf43aLU, 0x2865f3d2LU, 0xf3cb358aLU, +0x53122e15LU, 0x88bce84dLU, 0xa803efa5LU, 0x73ad29fdLU, 0xe830e138LU, 0x339e2760LU, 0x13212088LU, 0xc88fe6d0LU }; static const ulong32 rs_tab6[256] = { -0x00000000LU, 0x9e3d68dbLU, 0x717ad0fbLU, 0xef47b820LU, 0xe2f4edbbLU, 0x7cc98560LU, 0x938e3d40LU, 0x0db3559bLU, -0x89a5973bLU, 0x1798ffe0LU, 0xf8df47c0LU, 0x66e22f1bLU, 0x6b517a80LU, 0xf56c125bLU, 0x1a2baa7bLU, 0x8416c2a0LU, -0x5f076376LU, 0xc13a0badLU, 0x2e7db38dLU, 0xb040db56LU, 0xbdf38ecdLU, 0x23cee616LU, 0xcc895e36LU, 0x52b436edLU, -0xd6a2f44dLU, 0x489f9c96LU, 0xa7d824b6LU, 0x39e54c6dLU, 0x345619f6LU, 0xaa6b712dLU, 0x452cc90dLU, 0xdb11a1d6LU, -0xbe0ec6ecLU, 0x2033ae37LU, 0xcf741617LU, 0x51497eccLU, 0x5cfa2b57LU, 0xc2c7438cLU, 0x2d80fbacLU, 0xb3bd9377LU, -0x37ab51d7LU, 0xa996390cLU, 0x46d1812cLU, 0xd8ece9f7LU, 0xd55fbc6cLU, 0x4b62d4b7LU, 0xa4256c97LU, 0x3a18044cLU, -0xe109a59aLU, 0x7f34cd41LU, 0x90737561LU, 0x0e4e1dbaLU, 0x03fd4821LU, 0x9dc020faLU, 0x728798daLU, 0xecbaf001LU, -0x68ac32a1LU, 0xf6915a7aLU, 0x19d6e25aLU, 0x87eb8a81LU, 0x8a58df1aLU, 0x1465b7c1LU, 0xfb220fe1LU, 0x651f673aLU, -0x311cc195LU, 0xaf21a94eLU, 0x4066116eLU, 0xde5b79b5LU, 0xd3e82c2eLU, 0x4dd544f5LU, 0xa292fcd5LU, 0x3caf940eLU, -0xb8b956aeLU, 0x26843e75LU, 0xc9c38655LU, 0x57feee8eLU, 0x5a4dbb15LU, 0xc470d3ceLU, 0x2b376beeLU, 0xb50a0335LU, -0x6e1ba2e3LU, 0xf026ca38LU, 0x1f617218LU, 0x815c1ac3LU, 0x8cef4f58LU, 0x12d22783LU, 0xfd959fa3LU, 0x63a8f778LU, -0xe7be35d8LU, 0x79835d03LU, 0x96c4e523LU, 0x08f98df8LU, 0x054ad863LU, 0x9b77b0b8LU, 0x74300898LU, 0xea0d6043LU, -0x8f120779LU, 0x112f6fa2LU, 0xfe68d782LU, 0x6055bf59LU, 0x6de6eac2LU, 0xf3db8219LU, 0x1c9c3a39LU, 0x82a152e2LU, +0x00000000LU, 0x9e3d68dbLU, 0x717ad0fbLU, 0xef47b820LU, 0xe2f4edbbLU, 0x7cc98560LU, 0x938e3d40LU, 0x0db3559bLU, +0x89a5973bLU, 0x1798ffe0LU, 0xf8df47c0LU, 0x66e22f1bLU, 0x6b517a80LU, 0xf56c125bLU, 0x1a2baa7bLU, 0x8416c2a0LU, +0x5f076376LU, 0xc13a0badLU, 0x2e7db38dLU, 0xb040db56LU, 0xbdf38ecdLU, 0x23cee616LU, 0xcc895e36LU, 0x52b436edLU, +0xd6a2f44dLU, 0x489f9c96LU, 0xa7d824b6LU, 0x39e54c6dLU, 0x345619f6LU, 0xaa6b712dLU, 0x452cc90dLU, 0xdb11a1d6LU, +0xbe0ec6ecLU, 0x2033ae37LU, 0xcf741617LU, 0x51497eccLU, 0x5cfa2b57LU, 0xc2c7438cLU, 0x2d80fbacLU, 0xb3bd9377LU, +0x37ab51d7LU, 0xa996390cLU, 0x46d1812cLU, 0xd8ece9f7LU, 0xd55fbc6cLU, 0x4b62d4b7LU, 0xa4256c97LU, 0x3a18044cLU, +0xe109a59aLU, 0x7f34cd41LU, 0x90737561LU, 0x0e4e1dbaLU, 0x03fd4821LU, 0x9dc020faLU, 0x728798daLU, 0xecbaf001LU, +0x68ac32a1LU, 0xf6915a7aLU, 0x19d6e25aLU, 0x87eb8a81LU, 0x8a58df1aLU, 0x1465b7c1LU, 0xfb220fe1LU, 0x651f673aLU, +0x311cc195LU, 0xaf21a94eLU, 0x4066116eLU, 0xde5b79b5LU, 0xd3e82c2eLU, 0x4dd544f5LU, 0xa292fcd5LU, 0x3caf940eLU, +0xb8b956aeLU, 0x26843e75LU, 0xc9c38655LU, 0x57feee8eLU, 0x5a4dbb15LU, 0xc470d3ceLU, 0x2b376beeLU, 0xb50a0335LU, +0x6e1ba2e3LU, 0xf026ca38LU, 0x1f617218LU, 0x815c1ac3LU, 0x8cef4f58LU, 0x12d22783LU, 0xfd959fa3LU, 0x63a8f778LU, +0xe7be35d8LU, 0x79835d03LU, 0x96c4e523LU, 0x08f98df8LU, 0x054ad863LU, 0x9b77b0b8LU, 0x74300898LU, 0xea0d6043LU, +0x8f120779LU, 0x112f6fa2LU, 0xfe68d782LU, 0x6055bf59LU, 0x6de6eac2LU, 0xf3db8219LU, 0x1c9c3a39LU, 0x82a152e2LU, 0x06b79042LU, 0x988af899LU, 0x77cd40b9LU, 0xe9f02862LU, 0xe4437df9LU, 0x7a7e1522LU, 0x9539ad02LU, 0x0b04c5d9LU, -0xd015640fLU, 0x4e280cd4LU, 0xa16fb4f4LU, 0x3f52dc2fLU, 0x32e189b4LU, 0xacdce16fLU, 0x439b594fLU, 0xdda63194LU, -0x59b0f334LU, 0xc78d9befLU, 0x28ca23cfLU, 0xb6f74b14LU, 0xbb441e8fLU, 0x25797654LU, 0xca3ece74LU, 0x5403a6afLU, -0x6238cf67LU, 0xfc05a7bcLU, 0x13421f9cLU, 0x8d7f7747LU, 0x80cc22dcLU, 0x1ef14a07LU, 0xf1b6f227LU, 0x6f8b9afcLU, -0xeb9d585cLU, 0x75a03087LU, 0x9ae788a7LU, 0x04dae07cLU, 0x0969b5e7LU, 0x9754dd3cLU, 0x7813651cLU, 0xe62e0dc7LU, -0x3d3fac11LU, 0xa302c4caLU, 0x4c457ceaLU, 0xd2781431LU, 0xdfcb41aaLU, 0x41f62971LU, 0xaeb19151LU, 0x308cf98aLU, +0xd015640fLU, 0x4e280cd4LU, 0xa16fb4f4LU, 0x3f52dc2fLU, 0x32e189b4LU, 0xacdce16fLU, 0x439b594fLU, 0xdda63194LU, +0x59b0f334LU, 0xc78d9befLU, 0x28ca23cfLU, 0xb6f74b14LU, 0xbb441e8fLU, 0x25797654LU, 0xca3ece74LU, 0x5403a6afLU, +0x6238cf67LU, 0xfc05a7bcLU, 0x13421f9cLU, 0x8d7f7747LU, 0x80cc22dcLU, 0x1ef14a07LU, 0xf1b6f227LU, 0x6f8b9afcLU, +0xeb9d585cLU, 0x75a03087LU, 0x9ae788a7LU, 0x04dae07cLU, 0x0969b5e7LU, 0x9754dd3cLU, 0x7813651cLU, 0xe62e0dc7LU, +0x3d3fac11LU, 0xa302c4caLU, 0x4c457ceaLU, 0xd2781431LU, 0xdfcb41aaLU, 0x41f62971LU, 0xaeb19151LU, 0x308cf98aLU, 0xb49a3b2aLU, 0x2aa753f1LU, 0xc5e0ebd1LU, 0x5bdd830aLU, 0x566ed691LU, 0xc853be4aLU, 0x2714066aLU, 0xb9296eb1LU, -0xdc36098bLU, 0x420b6150LU, 0xad4cd970LU, 0x3371b1abLU, 0x3ec2e430LU, 0xa0ff8cebLU, 0x4fb834cbLU, 0xd1855c10LU, -0x55939eb0LU, 0xcbaef66bLU, 0x24e94e4bLU, 0xbad42690LU, 0xb767730bLU, 0x295a1bd0LU, 0xc61da3f0LU, 0x5820cb2bLU, -0x83316afdLU, 0x1d0c0226LU, 0xf24bba06LU, 0x6c76d2ddLU, 0x61c58746LU, 0xfff8ef9dLU, 0x10bf57bdLU, 0x8e823f66LU, -0x0a94fdc6LU, 0x94a9951dLU, 0x7bee2d3dLU, 0xe5d345e6LU, 0xe860107dLU, 0x765d78a6LU, 0x991ac086LU, 0x0727a85dLU, -0x53240ef2LU, 0xcd196629LU, 0x225ede09LU, 0xbc63b6d2LU, 0xb1d0e349LU, 0x2fed8b92LU, 0xc0aa33b2LU, 0x5e975b69LU, -0xda8199c9LU, 0x44bcf112LU, 0xabfb4932LU, 0x35c621e9LU, 0x38757472LU, 0xa6481ca9LU, 0x490fa489LU, 0xd732cc52LU, -0x0c236d84LU, 0x921e055fLU, 0x7d59bd7fLU, 0xe364d5a4LU, 0xeed7803fLU, 0x70eae8e4LU, 0x9fad50c4LU, 0x0190381fLU, -0x8586fabfLU, 0x1bbb9264LU, 0xf4fc2a44LU, 0x6ac1429fLU, 0x67721704LU, 0xf94f7fdfLU, 0x1608c7ffLU, 0x8835af24LU, -0xed2ac81eLU, 0x7317a0c5LU, 0x9c5018e5LU, 0x026d703eLU, 0x0fde25a5LU, 0x91e34d7eLU, 0x7ea4f55eLU, 0xe0999d85LU, -0x648f5f25LU, 0xfab237feLU, 0x15f58fdeLU, 0x8bc8e705LU, 0x867bb29eLU, 0x1846da45LU, 0xf7016265LU, 0x693c0abeLU, -0xb22dab68LU, 0x2c10c3b3LU, 0xc3577b93LU, 0x5d6a1348LU, 0x50d946d3LU, 0xcee42e08LU, 0x21a39628LU, 0xbf9efef3LU, -0x3b883c53LU, 0xa5b55488LU, 0x4af2eca8LU, 0xd4cf8473LU, 0xd97cd1e8LU, 0x4741b933LU, 0xa8060113LU, 0x363b69c8LU }; +0xdc36098bLU, 0x420b6150LU, 0xad4cd970LU, 0x3371b1abLU, 0x3ec2e430LU, 0xa0ff8cebLU, 0x4fb834cbLU, 0xd1855c10LU, +0x55939eb0LU, 0xcbaef66bLU, 0x24e94e4bLU, 0xbad42690LU, 0xb767730bLU, 0x295a1bd0LU, 0xc61da3f0LU, 0x5820cb2bLU, +0x83316afdLU, 0x1d0c0226LU, 0xf24bba06LU, 0x6c76d2ddLU, 0x61c58746LU, 0xfff8ef9dLU, 0x10bf57bdLU, 0x8e823f66LU, +0x0a94fdc6LU, 0x94a9951dLU, 0x7bee2d3dLU, 0xe5d345e6LU, 0xe860107dLU, 0x765d78a6LU, 0x991ac086LU, 0x0727a85dLU, +0x53240ef2LU, 0xcd196629LU, 0x225ede09LU, 0xbc63b6d2LU, 0xb1d0e349LU, 0x2fed8b92LU, 0xc0aa33b2LU, 0x5e975b69LU, +0xda8199c9LU, 0x44bcf112LU, 0xabfb4932LU, 0x35c621e9LU, 0x38757472LU, 0xa6481ca9LU, 0x490fa489LU, 0xd732cc52LU, +0x0c236d84LU, 0x921e055fLU, 0x7d59bd7fLU, 0xe364d5a4LU, 0xeed7803fLU, 0x70eae8e4LU, 0x9fad50c4LU, 0x0190381fLU, +0x8586fabfLU, 0x1bbb9264LU, 0xf4fc2a44LU, 0x6ac1429fLU, 0x67721704LU, 0xf94f7fdfLU, 0x1608c7ffLU, 0x8835af24LU, +0xed2ac81eLU, 0x7317a0c5LU, 0x9c5018e5LU, 0x026d703eLU, 0x0fde25a5LU, 0x91e34d7eLU, 0x7ea4f55eLU, 0xe0999d85LU, +0x648f5f25LU, 0xfab237feLU, 0x15f58fdeLU, 0x8bc8e705LU, 0x867bb29eLU, 0x1846da45LU, 0xf7016265LU, 0x693c0abeLU, +0xb22dab68LU, 0x2c10c3b3LU, 0xc3577b93LU, 0x5d6a1348LU, 0x50d946d3LU, 0xcee42e08LU, 0x21a39628LU, 0xbf9efef3LU, +0x3b883c53LU, 0xa5b55488LU, 0x4af2eca8LU, 0xd4cf8473LU, 0xd97cd1e8LU, 0x4741b933LU, 0xa8060113LU, 0x363b69c8LU }; static const ulong32 rs_tab7[256] = { -0x00000000LU, 0x0319e59eLU, 0x06328771LU, 0x052b62efLU, 0x0c6443e2LU, 0x0f7da67cLU, 0x0a56c493LU, 0x094f210dLU, -0x18c88689LU, 0x1bd16317LU, 0x1efa01f8LU, 0x1de3e466LU, 0x14acc56bLU, 0x17b520f5LU, 0x129e421aLU, 0x1187a784LU, -0x30dd415fLU, 0x33c4a4c1LU, 0x36efc62eLU, 0x35f623b0LU, 0x3cb902bdLU, 0x3fa0e723LU, 0x3a8b85ccLU, 0x39926052LU, -0x2815c7d6LU, 0x2b0c2248LU, 0x2e2740a7LU, 0x2d3ea539LU, 0x24718434LU, 0x276861aaLU, 0x22430345LU, 0x215ae6dbLU, -0x60f782beLU, 0x63ee6720LU, 0x66c505cfLU, 0x65dce051LU, 0x6c93c15cLU, 0x6f8a24c2LU, 0x6aa1462dLU, 0x69b8a3b3LU, -0x783f0437LU, 0x7b26e1a9LU, 0x7e0d8346LU, 0x7d1466d8LU, 0x745b47d5LU, 0x7742a24bLU, 0x7269c0a4LU, 0x7170253aLU, -0x502ac3e1LU, 0x5333267fLU, 0x56184490LU, 0x5501a10eLU, 0x5c4e8003LU, 0x5f57659dLU, 0x5a7c0772LU, 0x5965e2ecLU, -0x48e24568LU, 0x4bfba0f6LU, 0x4ed0c219LU, 0x4dc92787LU, 0x4486068aLU, 0x479fe314LU, 0x42b481fbLU, 0x41ad6465LU, -0xc0a34931LU, 0xc3baacafLU, 0xc691ce40LU, 0xc5882bdeLU, 0xccc70ad3LU, 0xcfdeef4dLU, 0xcaf58da2LU, 0xc9ec683cLU, -0xd86bcfb8LU, 0xdb722a26LU, 0xde5948c9LU, 0xdd40ad57LU, 0xd40f8c5aLU, 0xd71669c4LU, 0xd23d0b2bLU, 0xd124eeb5LU, -0xf07e086eLU, 0xf367edf0LU, 0xf64c8f1fLU, 0xf5556a81LU, 0xfc1a4b8cLU, 0xff03ae12LU, 0xfa28ccfdLU, 0xf9312963LU, -0xe8b68ee7LU, 0xebaf6b79LU, 0xee840996LU, 0xed9dec08LU, 0xe4d2cd05LU, 0xe7cb289bLU, 0xe2e04a74LU, 0xe1f9afeaLU, -0xa054cb8fLU, 0xa34d2e11LU, 0xa6664cfeLU, 0xa57fa960LU, 0xac30886dLU, 0xaf296df3LU, 0xaa020f1cLU, 0xa91bea82LU, -0xb89c4d06LU, 0xbb85a898LU, 0xbeaeca77LU, 0xbdb72fe9LU, 0xb4f80ee4LU, 0xb7e1eb7aLU, 0xb2ca8995LU, 0xb1d36c0bLU, -0x90898ad0LU, 0x93906f4eLU, 0x96bb0da1LU, 0x95a2e83fLU, 0x9cedc932LU, 0x9ff42cacLU, 0x9adf4e43LU, 0x99c6abddLU, -0x88410c59LU, 0x8b58e9c7LU, 0x8e738b28LU, 0x8d6a6eb6LU, 0x84254fbbLU, 0x873caa25LU, 0x8217c8caLU, 0x810e2d54LU, -0xcd0b9262LU, 0xce1277fcLU, 0xcb391513LU, 0xc820f08dLU, 0xc16fd180LU, 0xc276341eLU, 0xc75d56f1LU, 0xc444b36fLU, -0xd5c314ebLU, 0xd6daf175LU, 0xd3f1939aLU, 0xd0e87604LU, 0xd9a75709LU, 0xdabeb297LU, 0xdf95d078LU, 0xdc8c35e6LU, -0xfdd6d33dLU, 0xfecf36a3LU, 0xfbe4544cLU, 0xf8fdb1d2LU, 0xf1b290dfLU, 0xf2ab7541LU, 0xf78017aeLU, 0xf499f230LU, -0xe51e55b4LU, 0xe607b02aLU, 0xe32cd2c5LU, 0xe035375bLU, 0xe97a1656LU, 0xea63f3c8LU, 0xef489127LU, 0xec5174b9LU, -0xadfc10dcLU, 0xaee5f542LU, 0xabce97adLU, 0xa8d77233LU, 0xa198533eLU, 0xa281b6a0LU, 0xa7aad44fLU, 0xa4b331d1LU, -0xb5349655LU, 0xb62d73cbLU, 0xb3061124LU, 0xb01ff4baLU, 0xb950d5b7LU, 0xba493029LU, 0xbf6252c6LU, 0xbc7bb758LU, -0x9d215183LU, 0x9e38b41dLU, 0x9b13d6f2LU, 0x980a336cLU, 0x91451261LU, 0x925cf7ffLU, 0x97779510LU, 0x946e708eLU, -0x85e9d70aLU, 0x86f03294LU, 0x83db507bLU, 0x80c2b5e5LU, 0x898d94e8LU, 0x8a947176LU, 0x8fbf1399LU, 0x8ca6f607LU, -0x0da8db53LU, 0x0eb13ecdLU, 0x0b9a5c22LU, 0x0883b9bcLU, 0x01cc98b1LU, 0x02d57d2fLU, 0x07fe1fc0LU, 0x04e7fa5eLU, -0x15605ddaLU, 0x1679b844LU, 0x1352daabLU, 0x104b3f35LU, 0x19041e38LU, 0x1a1dfba6LU, 0x1f369949LU, 0x1c2f7cd7LU, -0x3d759a0cLU, 0x3e6c7f92LU, 0x3b471d7dLU, 0x385ef8e3LU, 0x3111d9eeLU, 0x32083c70LU, 0x37235e9fLU, 0x343abb01LU, -0x25bd1c85LU, 0x26a4f91bLU, 0x238f9bf4LU, 0x20967e6aLU, 0x29d95f67LU, 0x2ac0baf9LU, 0x2febd816LU, 0x2cf23d88LU, -0x6d5f59edLU, 0x6e46bc73LU, 0x6b6dde9cLU, 0x68743b02LU, 0x613b1a0fLU, 0x6222ff91LU, 0x67099d7eLU, 0x641078e0LU, -0x7597df64LU, 0x768e3afaLU, 0x73a55815LU, 0x70bcbd8bLU, 0x79f39c86LU, 0x7aea7918LU, 0x7fc11bf7LU, 0x7cd8fe69LU, -0x5d8218b2LU, 0x5e9bfd2cLU, 0x5bb09fc3LU, 0x58a97a5dLU, 0x51e65b50LU, 0x52ffbeceLU, 0x57d4dc21LU, 0x54cd39bfLU, +0x00000000LU, 0x0319e59eLU, 0x06328771LU, 0x052b62efLU, 0x0c6443e2LU, 0x0f7da67cLU, 0x0a56c493LU, 0x094f210dLU, +0x18c88689LU, 0x1bd16317LU, 0x1efa01f8LU, 0x1de3e466LU, 0x14acc56bLU, 0x17b520f5LU, 0x129e421aLU, 0x1187a784LU, +0x30dd415fLU, 0x33c4a4c1LU, 0x36efc62eLU, 0x35f623b0LU, 0x3cb902bdLU, 0x3fa0e723LU, 0x3a8b85ccLU, 0x39926052LU, +0x2815c7d6LU, 0x2b0c2248LU, 0x2e2740a7LU, 0x2d3ea539LU, 0x24718434LU, 0x276861aaLU, 0x22430345LU, 0x215ae6dbLU, +0x60f782beLU, 0x63ee6720LU, 0x66c505cfLU, 0x65dce051LU, 0x6c93c15cLU, 0x6f8a24c2LU, 0x6aa1462dLU, 0x69b8a3b3LU, +0x783f0437LU, 0x7b26e1a9LU, 0x7e0d8346LU, 0x7d1466d8LU, 0x745b47d5LU, 0x7742a24bLU, 0x7269c0a4LU, 0x7170253aLU, +0x502ac3e1LU, 0x5333267fLU, 0x56184490LU, 0x5501a10eLU, 0x5c4e8003LU, 0x5f57659dLU, 0x5a7c0772LU, 0x5965e2ecLU, +0x48e24568LU, 0x4bfba0f6LU, 0x4ed0c219LU, 0x4dc92787LU, 0x4486068aLU, 0x479fe314LU, 0x42b481fbLU, 0x41ad6465LU, +0xc0a34931LU, 0xc3baacafLU, 0xc691ce40LU, 0xc5882bdeLU, 0xccc70ad3LU, 0xcfdeef4dLU, 0xcaf58da2LU, 0xc9ec683cLU, +0xd86bcfb8LU, 0xdb722a26LU, 0xde5948c9LU, 0xdd40ad57LU, 0xd40f8c5aLU, 0xd71669c4LU, 0xd23d0b2bLU, 0xd124eeb5LU, +0xf07e086eLU, 0xf367edf0LU, 0xf64c8f1fLU, 0xf5556a81LU, 0xfc1a4b8cLU, 0xff03ae12LU, 0xfa28ccfdLU, 0xf9312963LU, +0xe8b68ee7LU, 0xebaf6b79LU, 0xee840996LU, 0xed9dec08LU, 0xe4d2cd05LU, 0xe7cb289bLU, 0xe2e04a74LU, 0xe1f9afeaLU, +0xa054cb8fLU, 0xa34d2e11LU, 0xa6664cfeLU, 0xa57fa960LU, 0xac30886dLU, 0xaf296df3LU, 0xaa020f1cLU, 0xa91bea82LU, +0xb89c4d06LU, 0xbb85a898LU, 0xbeaeca77LU, 0xbdb72fe9LU, 0xb4f80ee4LU, 0xb7e1eb7aLU, 0xb2ca8995LU, 0xb1d36c0bLU, +0x90898ad0LU, 0x93906f4eLU, 0x96bb0da1LU, 0x95a2e83fLU, 0x9cedc932LU, 0x9ff42cacLU, 0x9adf4e43LU, 0x99c6abddLU, +0x88410c59LU, 0x8b58e9c7LU, 0x8e738b28LU, 0x8d6a6eb6LU, 0x84254fbbLU, 0x873caa25LU, 0x8217c8caLU, 0x810e2d54LU, +0xcd0b9262LU, 0xce1277fcLU, 0xcb391513LU, 0xc820f08dLU, 0xc16fd180LU, 0xc276341eLU, 0xc75d56f1LU, 0xc444b36fLU, +0xd5c314ebLU, 0xd6daf175LU, 0xd3f1939aLU, 0xd0e87604LU, 0xd9a75709LU, 0xdabeb297LU, 0xdf95d078LU, 0xdc8c35e6LU, +0xfdd6d33dLU, 0xfecf36a3LU, 0xfbe4544cLU, 0xf8fdb1d2LU, 0xf1b290dfLU, 0xf2ab7541LU, 0xf78017aeLU, 0xf499f230LU, +0xe51e55b4LU, 0xe607b02aLU, 0xe32cd2c5LU, 0xe035375bLU, 0xe97a1656LU, 0xea63f3c8LU, 0xef489127LU, 0xec5174b9LU, +0xadfc10dcLU, 0xaee5f542LU, 0xabce97adLU, 0xa8d77233LU, 0xa198533eLU, 0xa281b6a0LU, 0xa7aad44fLU, 0xa4b331d1LU, +0xb5349655LU, 0xb62d73cbLU, 0xb3061124LU, 0xb01ff4baLU, 0xb950d5b7LU, 0xba493029LU, 0xbf6252c6LU, 0xbc7bb758LU, +0x9d215183LU, 0x9e38b41dLU, 0x9b13d6f2LU, 0x980a336cLU, 0x91451261LU, 0x925cf7ffLU, 0x97779510LU, 0x946e708eLU, +0x85e9d70aLU, 0x86f03294LU, 0x83db507bLU, 0x80c2b5e5LU, 0x898d94e8LU, 0x8a947176LU, 0x8fbf1399LU, 0x8ca6f607LU, +0x0da8db53LU, 0x0eb13ecdLU, 0x0b9a5c22LU, 0x0883b9bcLU, 0x01cc98b1LU, 0x02d57d2fLU, 0x07fe1fc0LU, 0x04e7fa5eLU, +0x15605ddaLU, 0x1679b844LU, 0x1352daabLU, 0x104b3f35LU, 0x19041e38LU, 0x1a1dfba6LU, 0x1f369949LU, 0x1c2f7cd7LU, +0x3d759a0cLU, 0x3e6c7f92LU, 0x3b471d7dLU, 0x385ef8e3LU, 0x3111d9eeLU, 0x32083c70LU, 0x37235e9fLU, 0x343abb01LU, +0x25bd1c85LU, 0x26a4f91bLU, 0x238f9bf4LU, 0x20967e6aLU, 0x29d95f67LU, 0x2ac0baf9LU, 0x2febd816LU, 0x2cf23d88LU, +0x6d5f59edLU, 0x6e46bc73LU, 0x6b6dde9cLU, 0x68743b02LU, 0x613b1a0fLU, 0x6222ff91LU, 0x67099d7eLU, 0x641078e0LU, +0x7597df64LU, 0x768e3afaLU, 0x73a55815LU, 0x70bcbd8bLU, 0x79f39c86LU, 0x7aea7918LU, 0x7fc11bf7LU, 0x7cd8fe69LU, +0x5d8218b2LU, 0x5e9bfd2cLU, 0x5bb09fc3LU, 0x58a97a5dLU, 0x51e65b50LU, 0x52ffbeceLU, 0x57d4dc21LU, 0x54cd39bfLU, 0x454a9e3bLU, 0x46537ba5LU, 0x4378194aLU, 0x4061fcd4LU, 0x492eddd9LU, 0x4a373847LU, 0x4f1c5aa8LU, 0x4c05bf36LU }; #endif /* LTC_TWOFISH_ALL_TABLES */ +#endif /* __LTC_TWOFISH_TAB_C__ */ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/ciphers/xtea.c --- a/libtomcrypt/src/ciphers/xtea.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/ciphers/xtea.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -28,13 +26,13 @@ &xtea_test, &xtea_done, &xtea_keysize, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; int xtea_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) { - unsigned long x, sum, K[4]; - + ulong32 x, sum, K[4]; + LTC_ARGCHK(key != NULL); LTC_ARGCHK(skey != NULL); @@ -48,21 +46,21 @@ } /* load key */ - LOAD32L(K[0], key+0); - LOAD32L(K[1], key+4); - LOAD32L(K[2], key+8); - LOAD32L(K[3], key+12); - + LOAD32H(K[0], key+0); + LOAD32H(K[1], key+4); + LOAD32H(K[2], key+8); + LOAD32H(K[3], key+12); + for (x = sum = 0; x < 32; x++) { skey->xtea.A[x] = (sum + K[sum&3]) & 0xFFFFFFFFUL; sum = (sum + 0x9E3779B9UL) & 0xFFFFFFFFUL; skey->xtea.B[x] = (sum + K[(sum>>11)&3]) & 0xFFFFFFFFUL; } - + #ifdef LTC_CLEAN_STACK zeromem(&K, sizeof(K)); -#endif - +#endif + return CRYPT_OK; } @@ -75,15 +73,15 @@ */ int xtea_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *skey) { - unsigned long y, z; + ulong32 y, z; int r; LTC_ARGCHK(pt != NULL); LTC_ARGCHK(ct != NULL); LTC_ARGCHK(skey != NULL); - LOAD32L(y, &pt[0]); - LOAD32L(z, &pt[4]); + LOAD32H(y, &pt[0]); + LOAD32H(z, &pt[4]); for (r = 0; r < 32; r += 4) { y = (y + ((((z<<4)^(z>>5)) + z) ^ skey->xtea.A[r])) & 0xFFFFFFFFUL; z = (z + ((((y<<4)^(y>>5)) + y) ^ skey->xtea.B[r])) & 0xFFFFFFFFUL; @@ -97,8 +95,8 @@ y = (y + ((((z<<4)^(z>>5)) + z) ^ skey->xtea.A[r+3])) & 0xFFFFFFFFUL; z = (z + ((((y<<4)^(y>>5)) + y) ^ skey->xtea.B[r+3])) & 0xFFFFFFFFUL; } - STORE32L(y, &ct[0]); - STORE32L(z, &ct[4]); + STORE32H(y, &ct[0]); + STORE32H(z, &ct[4]); return CRYPT_OK; } @@ -106,20 +104,20 @@ Decrypts a block of text with LTC_XTEA @param ct The input ciphertext (8 bytes) @param pt The output plaintext (8 bytes) - @param skey The key as scheduled + @param skey The key as scheduled @return CRYPT_OK if successful */ int xtea_ecb_decrypt(const unsigned char *ct, unsigned char *pt, symmetric_key *skey) { - unsigned long y, z; + ulong32 y, z; int r; LTC_ARGCHK(pt != NULL); LTC_ARGCHK(ct != NULL); LTC_ARGCHK(skey != NULL); - LOAD32L(y, &ct[0]); - LOAD32L(z, &ct[4]); + LOAD32H(y, &ct[0]); + LOAD32H(z, &ct[4]); for (r = 31; r >= 0; r -= 4) { z = (z - ((((y<<4)^(y>>5)) + y) ^ skey->xtea.B[r])) & 0xFFFFFFFFUL; y = (y - ((((z<<4)^(z>>5)) + z) ^ skey->xtea.A[r])) & 0xFFFFFFFFUL; @@ -133,8 +131,8 @@ z = (z - ((((y<<4)^(y>>5)) + y) ^ skey->xtea.B[r-3])) & 0xFFFFFFFFUL; y = (y - ((((z<<4)^(z>>5)) + z) ^ skey->xtea.A[r-3])) & 0xFFFFFFFFUL; } - STORE32L(y, &pt[0]); - STORE32L(z, &pt[4]); + STORE32H(y, &pt[0]); + STORE32H(z, &pt[4]); return CRYPT_OK; } @@ -146,43 +144,95 @@ { #ifndef LTC_TEST return CRYPT_NOP; - #else - static const unsigned char key[16] = - { 0x78, 0x56, 0x34, 0x12, 0xf0, 0xcd, 0xcb, 0x9a, - 0x48, 0x37, 0x26, 0x15, 0xc0, 0xbf, 0xae, 0x9d }; - static const unsigned char pt[8] = - { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 }; - static const unsigned char ct[8] = - { 0x75, 0xd7, 0xc5, 0xbf, 0xcf, 0x58, 0xc9, 0x3f }; + #else + static const struct { + unsigned char key[16], pt[8], ct[8]; + } tests[] = { + { + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xde, 0xe9, 0xd4, 0xd8, 0xf7, 0x13, 0x1e, 0xd9 } + }, { + { 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0xa5, 0x97, 0xab, 0x41, 0x76, 0x01, 0x4d, 0x72 } + }, { + { 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06 }, + { 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02 }, + { 0xb1, 0xfd, 0x5d, 0xa9, 0xcc, 0x6d, 0xc9, 0xdc } + }, { + { 0x78, 0x69, 0x5a, 0x4b, 0x3c, 0x2d, 0x1e, 0x0f, + 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87 }, + { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87 }, + { 0x70, 0x4b, 0x31, 0x34, 0x47, 0x44, 0xdf, 0xab } + }, { + { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, + { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48 }, + { 0x49, 0x7d, 0xf3, 0xd0, 0x72, 0x61, 0x2c, 0xb5 } + }, { + { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, + { 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 }, + { 0xe7, 0x8f, 0x2d, 0x13, 0x74, 0x43, 0x41, 0xd8 } + }, { + { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, + { 0x5a, 0x5b, 0x6e, 0x27, 0x89, 0x48, 0xd7, 0x7f }, + { 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 } + }, { + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48 }, + { 0xa0, 0x39, 0x05, 0x89, 0xf8, 0xb8, 0xef, 0xa5 } + }, { + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 }, + { 0xed, 0x23, 0x37, 0x5a, 0x82, 0x1a, 0x8c, 0x2d } + }, { + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x70, 0xe1, 0x22, 0x5d, 0x6e, 0x4e, 0x76, 0x55 }, + { 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 } + } + }; unsigned char tmp[2][8]; symmetric_key skey; - int err, y; + int i, err, y; + for (i = 0; i < (int)(sizeof(tests)/sizeof(tests[0])); i++) { + zeromem(&skey, sizeof(skey)); + if ((err = xtea_setup(tests[i].key, 16, 0, &skey)) != CRYPT_OK) { + return err; + } + xtea_ecb_encrypt(tests[i].pt, tmp[0], &skey); + xtea_ecb_decrypt(tmp[0], tmp[1], &skey); - if ((err = xtea_setup(key, 16, 0, &skey)) != CRYPT_OK) { - return err; - } - xtea_ecb_encrypt(pt, tmp[0], &skey); - xtea_ecb_decrypt(tmp[0], tmp[1], &skey); - - if (XMEMCMP(tmp[0], ct, 8) != 0 || XMEMCMP(tmp[1], pt, 8) != 0) { - return CRYPT_FAIL_TESTVECTOR; - } + if (compare_testvector(tmp[0], 8, tests[i].ct, 8, "XTEA Encrypt", i) != 0 || + compare_testvector(tmp[1], 8, tests[i].pt, 8, "XTEA Decrypt", i) != 0) { + return CRYPT_FAIL_TESTVECTOR; + } /* now see if we can encrypt all zero bytes 1000 times, decrypt and come back where we started */ for (y = 0; y < 8; y++) tmp[0][y] = 0; for (y = 0; y < 1000; y++) xtea_ecb_encrypt(tmp[0], tmp[0], &skey); for (y = 0; y < 1000; y++) xtea_ecb_decrypt(tmp[0], tmp[0], &skey); for (y = 0; y < 8; y++) if (tmp[0][y] != 0) return CRYPT_FAIL_TESTVECTOR; + } /* for */ return CRYPT_OK; #endif } -/** Terminate the context +/** Terminate the context @param skey The scheduled key */ void xtea_done(symmetric_key *skey) { + LTC_UNUSED_PARAM(skey); } /** @@ -194,7 +244,7 @@ { LTC_ARGCHK(keysize != NULL); if (*keysize < 16) { - return CRYPT_INVALID_KEYSIZE; + return CRYPT_INVALID_KEYSIZE; } *keysize = 16; return CRYPT_OK; @@ -206,6 +256,6 @@ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ccm/ccm_add_aad.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/ccm/ccm_add_aad.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,63 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +#ifdef LTC_CCM_MODE + +/** + Add AAD to the CCM state + @param ccm The CCM state + @param adata The additional authentication data to add to the CCM state + @param adatalen The length of the AAD data. + @return CRYPT_OK on success + */ +int ccm_add_aad(ccm_state *ccm, + const unsigned char *adata, unsigned long adatalen) +{ + unsigned long y; + int err; + + LTC_ARGCHK(ccm != NULL); + LTC_ARGCHK(adata != NULL); + + if (ccm->aadlen < ccm->current_aadlen + adatalen) { + return CRYPT_INVALID_ARG; + } + ccm->current_aadlen += adatalen; + + /* now add the data */ + for (y = 0; y < adatalen; y++) { + if (ccm->x == 16) { + /* full block so let's encrypt it */ + if ((err = cipher_descriptor[ccm->cipher].ecb_encrypt(ccm->PAD, ccm->PAD, &ccm->K)) != CRYPT_OK) { + return err; + } + ccm->x = 0; + } + ccm->PAD[ccm->x++] ^= adata[y]; + } + + /* remainder? */ + if (ccm->aadlen == ccm->current_aadlen) { + if (ccm->x != 0) { + if ((err = cipher_descriptor[ccm->cipher].ecb_encrypt(ccm->PAD, ccm->PAD, &ccm->K)) != CRYPT_OK) { + return err; + } + } + ccm->x = 0; + } + + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ccm/ccm_add_nonce.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/ccm/ccm_add_nonce.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,113 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +#ifdef LTC_CCM_MODE + +/** + Add nonce data to the CCM state + @param ccm The CCM state + @param nonce The nonce data to add + @param noncelen The length of the nonce + @return CRYPT_OK on success + */ +int ccm_add_nonce(ccm_state *ccm, + const unsigned char *nonce, unsigned long noncelen) +{ + unsigned long x, y, len; + int err; + + LTC_ARGCHK(ccm != NULL); + LTC_ARGCHK(nonce != NULL); + + /* increase L to match the nonce len */ + ccm->noncelen = (noncelen > 13) ? 13 : noncelen; + if ((15 - ccm->noncelen) > ccm->L) { + ccm->L = 15 - ccm->noncelen; + } + + /* decrease noncelen to match L */ + if ((ccm->noncelen + ccm->L) > 15) { + ccm->noncelen = 15 - ccm->L; + } + + /* form B_0 == flags | Nonce N | l(m) */ + x = 0; + ccm->PAD[x++] = (unsigned char)(((ccm->aadlen > 0) ? (1<<6) : 0) | + (((ccm->taglen - 2)>>1)<<3) | + (ccm->L-1)); + + /* nonce */ + for (y = 0; y < (16 - (ccm->L + 1)); y++) { + ccm->PAD[x++] = nonce[y]; + } + + /* store len */ + len = ccm->ptlen; + + /* shift len so the upper bytes of len are the contents of the length */ + for (y = ccm->L; y < 4; y++) { + len <<= 8; + } + + /* store l(m) (only store 32-bits) */ + for (y = 0; ccm->L > 4 && (ccm->L-y)>4; y++) { + ccm->PAD[x++] = 0; + } + for (; y < ccm->L; y++) { + ccm->PAD[x++] = (unsigned char)((len >> 24) & 255); + len <<= 8; + } + + /* encrypt PAD */ + if ((err = cipher_descriptor[ccm->cipher].ecb_encrypt(ccm->PAD, ccm->PAD, &ccm->K)) != CRYPT_OK) { + return err; + } + + /* handle header */ + ccm->x = 0; + if (ccm->aadlen > 0) { + /* store length */ + if (ccm->aadlen < ((1UL<<16) - (1UL<<8))) { + ccm->PAD[ccm->x++] ^= (ccm->aadlen>>8) & 255; + ccm->PAD[ccm->x++] ^= ccm->aadlen & 255; + } else { + ccm->PAD[ccm->x++] ^= 0xFF; + ccm->PAD[ccm->x++] ^= 0xFE; + ccm->PAD[ccm->x++] ^= (ccm->aadlen>>24) & 255; + ccm->PAD[ccm->x++] ^= (ccm->aadlen>>16) & 255; + ccm->PAD[ccm->x++] ^= (ccm->aadlen>>8) & 255; + ccm->PAD[ccm->x++] ^= ccm->aadlen & 255; + } + } + + /* setup the ctr counter */ + x = 0; + + /* flags */ + ccm->ctr[x++] = (unsigned char)ccm->L-1; + + /* nonce */ + for (y = 0; y < (16 - (ccm->L+1)); ++y) { + ccm->ctr[x++] = nonce[y]; + } + /* offset */ + while (x < 16) { + ccm->ctr[x++] = 0; + } + + ccm->CTRlen = 16; + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ccm/ccm_done.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/ccm/ccm_done.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,65 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +#ifdef LTC_CCM_MODE + +/** + Terminate a CCM stream + @param ccm The CCM state + @param tag [out] The destination for the MAC tag + @param taglen [in/out] The length of the MAC tag + @return CRYPT_OK on success + */ +int ccm_done(ccm_state *ccm, + unsigned char *tag, unsigned long *taglen) +{ + unsigned long x, y; + int err; + + LTC_ARGCHK(ccm != NULL); + + /* Check all data have been processed */ + if (ccm->ptlen != ccm->current_ptlen) { + return CRYPT_ERROR; + } + + LTC_ARGCHK(tag != NULL); + LTC_ARGCHK(taglen != NULL); + + if (ccm->x != 0) { + if ((err = cipher_descriptor[ccm->cipher].ecb_encrypt(ccm->PAD, ccm->PAD, &ccm->K)) != CRYPT_OK) { + return err; + } + } + + /* setup CTR for the TAG (zero the count) */ + for (y = 15; y > 15 - ccm->L; y--) { + ccm->ctr[y] = 0x00; + } + if ((err = cipher_descriptor[ccm->cipher].ecb_encrypt(ccm->ctr, ccm->CTRPAD, &ccm->K)) != CRYPT_OK) { + return err; + } + + cipher_descriptor[ccm->cipher].done(&ccm->K); + + /* store the TAG */ + for (x = 0; x < 16 && x < *taglen; x++) { + tag[x] = ccm->PAD[x] ^ ccm->CTRPAD[x]; + } + *taglen = x; + + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ccm/ccm_init.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/ccm/ccm_init.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,81 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +#ifdef LTC_CCM_MODE + +/** + Initialize a CCM state + @param ccm The CCM state to initialize + @param cipher The index of the cipher to use + @param key The secret key + @param keylen The length of the secret key + @param ptlen The length of the plain/cipher text that will be processed + @param taglen The max length of the MAC tag + @param aadlen The length of the AAD + + @return CRYPT_OK on success + */ +int ccm_init(ccm_state *ccm, int cipher, + const unsigned char *key, int keylen, int ptlen, int taglen, int aadlen) +{ + int err; + + LTC_ARGCHK(ccm != NULL); + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(taglen != 0); + + XMEMSET(ccm, 0, sizeof(ccm_state)); + + /* check cipher input */ + if ((err = cipher_is_valid(cipher)) != CRYPT_OK) { + return err; + } + if (cipher_descriptor[cipher].block_length != 16) { + return CRYPT_INVALID_CIPHER; + } + + /* make sure the taglen is even and <= 16 */ + ccm->taglen = taglen; + ccm->taglen &= ~1; + if (ccm->taglen > 16) { + ccm->taglen = 16; + } + + /* can't use < 4 */ + if (ccm->taglen < 4) { + return CRYPT_INVALID_ARG; + } + + /* schedule key */ + if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, &ccm->K)) != CRYPT_OK) { + return err; + } + ccm->cipher = cipher; + + /* let's get the L value */ + ccm->ptlen = ptlen; + ccm->L = 0; + while (ptlen) { + ++ccm->L; + ptlen >>= 8; + } + if (ccm->L <= 1) { + ccm->L = 2; + } + + ccm->aadlen = aadlen; + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ccm/ccm_memory.c --- a/libtomcrypt/src/encauth/ccm/ccm_memory.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/ccm/ccm_memory.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -19,6 +17,9 @@ /** CCM encrypt/decrypt and produce an authentication tag + + *1 'pt', 'ct' and 'tag' can both be 'in' or 'out', depending on 'direction' + @param cipher The index of the cipher desired @param key The secret key to use @param keylen The length of the secret key (octets) @@ -27,11 +28,11 @@ @param noncelen The length of the nonce @param header The header for the session @param headerlen The length of the header (octets) - @param pt [out] The plaintext + @param pt [*1] The plaintext @param ptlen The length of the plaintext (octets) - @param ct [out] The ciphertext - @param tag [out] The destination tag - @param taglen [in/out] The max size and resulting size of the authentication tag + @param ct [*1] The ciphertext + @param tag [*1] The destination tag + @param taglen The max size and resulting size of the authentication tag @param direction Encrypt or Decrypt direction (0 or 1) @return CRYPT_OK if successful */ @@ -45,10 +46,15 @@ unsigned char *tag, unsigned long *taglen, int direction) { - unsigned char PAD[16], ctr[16], CTRPAD[16], b; + unsigned char PAD[16], ctr[16], CTRPAD[16], ptTag[16], b, *pt_real; + unsigned char *pt_work = NULL; symmetric_key *skey; int err; unsigned long len, L, x, y, z, CTRlen; +#ifdef LTC_FAST + LTC_FAST_TYPE fastMask = ~0; /* initialize fastMask at all zeroes */ +#endif + unsigned char mask = 0xff; /* initialize mask at all zeroes */ if (uskey == NULL) { LTC_ARGCHK(key != NULL); @@ -62,6 +68,8 @@ LTC_ARGCHK(tag != NULL); LTC_ARGCHK(taglen != NULL); + pt_real = pt; + #ifdef LTC_FAST if (16 % sizeof(LTC_FAST_TYPE)) { return CRYPT_INVALID_ARG; @@ -95,7 +103,7 @@ nonce, noncelen, header, headerlen, pt, ptlen, - ct, + ct, tag, taglen, direction); } @@ -117,11 +125,6 @@ L = 15 - noncelen; } - /* decrease noncelen to match L */ - if ((noncelen + L) > 15) { - noncelen = 15 - L; - } - /* allocate mem for the symmetric key */ if (uskey == NULL) { skey = XMALLOC(sizeof(*skey)); @@ -138,6 +141,15 @@ skey = uskey; } + /* initialize buffer for pt */ + if (direction == CCM_DECRYPT && ptlen > 0) { + pt_work = XMALLOC(ptlen); + if (pt_work == NULL) { + goto error; + } + pt = pt_work; + } + /* form B_0 == flags | Nonce N | l(m) */ x = 0; PAD[x++] = (unsigned char)(((headerlen > 0) ? (1<<6) : 0) | @@ -174,7 +186,7 @@ /* handle header */ if (headerlen > 0) { x = 0; - + /* store length */ if (headerlen < ((1UL<<16) - (1UL<<8))) { PAD[x++] ^= (headerlen>>8) & 255; @@ -200,11 +212,9 @@ PAD[x++] ^= header[y]; } - /* remainder? */ - if (x != 0) { - if ((err = cipher_descriptor[cipher].ecb_encrypt(PAD, PAD, skey)) != CRYPT_OK) { - goto error; - } + /* remainder */ + if ((err = cipher_descriptor[cipher].ecb_encrypt(PAD, PAD, skey)) != CRYPT_OK) { + goto error; } } @@ -213,7 +223,7 @@ /* flags */ ctr[x++] = (unsigned char)L-1; - + /* nonce */ for (y = 0; y < (16 - (L+1)); ++y) { ctr[x++] = nonce[y]; @@ -244,14 +254,14 @@ /* xor the PT against the pad first */ for (z = 0; z < 16; z += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)(&PAD[z])) ^= *((LTC_FAST_TYPE*)(&pt[y+z])); - *((LTC_FAST_TYPE*)(&ct[y+z])) = *((LTC_FAST_TYPE*)(&pt[y+z])) ^ *((LTC_FAST_TYPE*)(&CTRPAD[z])); + *(LTC_FAST_TYPE_PTR_CAST(&PAD[z])) ^= *(LTC_FAST_TYPE_PTR_CAST(&pt[y+z])); + *(LTC_FAST_TYPE_PTR_CAST(&ct[y+z])) = *(LTC_FAST_TYPE_PTR_CAST(&pt[y+z])) ^ *(LTC_FAST_TYPE_PTR_CAST(&CTRPAD[z])); } if ((err = cipher_descriptor[cipher].ecb_encrypt(PAD, PAD, skey)) != CRYPT_OK) { goto error; } } - } else { + } else { /* direction == CCM_DECRYPT */ for (; y < (ptlen & ~15); y += 16) { /* increment the ctr? */ for (z = 15; z > 15-L; z--) { @@ -264,15 +274,15 @@ /* xor the PT against the pad last */ for (z = 0; z < 16; z += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)(&pt[y+z])) = *((LTC_FAST_TYPE*)(&ct[y+z])) ^ *((LTC_FAST_TYPE*)(&CTRPAD[z])); - *((LTC_FAST_TYPE*)(&PAD[z])) ^= *((LTC_FAST_TYPE*)(&pt[y+z])); + *(LTC_FAST_TYPE_PTR_CAST(&pt[y+z])) = *(LTC_FAST_TYPE_PTR_CAST(&ct[y+z])) ^ *(LTC_FAST_TYPE_PTR_CAST(&CTRPAD[z])); + *(LTC_FAST_TYPE_PTR_CAST(&PAD[z])) ^= *(LTC_FAST_TYPE_PTR_CAST(&pt[y+z])); } if ((err = cipher_descriptor[cipher].ecb_encrypt(PAD, PAD, skey)) != CRYPT_OK) { goto error; } } - } - } + } + } #endif for (; y < ptlen; y++) { @@ -305,7 +315,7 @@ } PAD[x++] ^= b; } - + if (x != 0) { if ((err = cipher_descriptor[cipher].ecb_encrypt(PAD, PAD, skey)) != CRYPT_OK) { goto error; @@ -323,20 +333,66 @@ if (skey != uskey) { cipher_descriptor[cipher].done(skey); +#ifdef LTC_CLEAN_STACK + zeromem(skey, sizeof(*skey)); +#endif } - /* store the TAG */ - for (x = 0; x < 16 && x < *taglen; x++) { - tag[x] = PAD[x] ^ CTRPAD[x]; + if (direction == CCM_ENCRYPT) { + /* store the TAG */ + for (x = 0; x < 16 && x < *taglen; x++) { + tag[x] = PAD[x] ^ CTRPAD[x]; + } + *taglen = x; + } else { /* direction == CCM_DECRYPT */ + /* decrypt the tag */ + for (x = 0; x < 16 && x < *taglen; x++) { + ptTag[x] = tag[x] ^ CTRPAD[x]; + } + *taglen = x; + + /* check validity of the decrypted tag against the computed PAD (in constant time) */ + /* HACK: the boolean value of XMEM_NEQ becomes either 0 (CRYPT_OK) or 1 (CRYPT_ERR). + * there should be a better way of setting the correct error code in constant + * time. + */ + err = XMEM_NEQ(ptTag, PAD, *taglen); + + /* Zero the plaintext if the tag was invalid (in constant time) */ + if (ptlen > 0) { + y = 0; + mask *= 1 - err; /* mask = ( err ? 0 : 0xff ) */ +#ifdef LTC_FAST + fastMask *= 1 - err; + if (ptlen & ~15) { + for (; y < (ptlen & ~15); y += 16) { + for (z = 0; z < 16; z += sizeof(LTC_FAST_TYPE)) { + *(LTC_FAST_TYPE_PTR_CAST(&pt_real[y+z])) = *(LTC_FAST_TYPE_PTR_CAST(&pt[y+z])) & fastMask; + } + } + } +#endif + for (; y < ptlen; y++) { + pt_real[y] = pt[y] & mask; + } + } } - *taglen = x; #ifdef LTC_CLEAN_STACK - zeromem(skey, sizeof(*skey)); +#ifdef LTC_FAST + fastMask = 0; +#endif + mask = 0; zeromem(PAD, sizeof(PAD)); zeromem(CTRPAD, sizeof(CTRPAD)); + if (pt_work != NULL) { + zeromem(pt_work, ptlen); + } #endif error: + if (pt_work) { + XFREE(pt_work); + } if (skey != uskey) { XFREE(skey); } @@ -346,6 +402,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ccm/ccm_process.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/ccm/ccm_process.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,88 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +#ifdef LTC_CCM_MODE + +/** + Process plaintext/ciphertext through CCM + @param ccm The CCM state + @param pt The plaintext + @param ptlen The plaintext length (ciphertext length is the same) + @param ct The ciphertext + @param direction Encrypt or Decrypt mode (CCM_ENCRYPT or CCM_DECRYPT) + @return CRYPT_OK on success + */ +int ccm_process(ccm_state *ccm, + unsigned char *pt, unsigned long ptlen, + unsigned char *ct, + int direction) +{ + unsigned char z, b; + unsigned long y; + int err; + + LTC_ARGCHK(ccm != NULL); + + /* Check aad has been correctly added */ + if (ccm->aadlen != ccm->current_aadlen) { + return CRYPT_ERROR; + } + + /* Check we do not process too much data */ + if (ccm->ptlen < ccm->current_ptlen + ptlen) { + return CRYPT_ERROR; + } + ccm->current_ptlen += ptlen; + + /* now handle the PT */ + if (ptlen > 0) { + LTC_ARGCHK(pt != NULL); + LTC_ARGCHK(ct != NULL); + + for (y = 0; y < ptlen; y++) { + /* increment the ctr? */ + if (ccm->CTRlen == 16) { + for (z = 15; z > 15-ccm->L; z--) { + ccm->ctr[z] = (ccm->ctr[z] + 1) & 255; + if (ccm->ctr[z]) break; + } + if ((err = cipher_descriptor[ccm->cipher].ecb_encrypt(ccm->ctr, ccm->CTRPAD, &ccm->K)) != CRYPT_OK) { + return err; + } + ccm->CTRlen = 0; + } + + /* if we encrypt we add the bytes to the MAC first */ + if (direction == CCM_ENCRYPT) { + b = pt[y]; + ct[y] = b ^ ccm->CTRPAD[ccm->CTRlen++]; + } else { + b = ct[y] ^ ccm->CTRPAD[ccm->CTRlen++]; + pt[y] = b; + } + + if (ccm->x == 16) { + if ((err = cipher_descriptor[ccm->cipher].ecb_encrypt(ccm->PAD, ccm->PAD, &ccm->K)) != CRYPT_OK) { + return err; + } + ccm->x = 0; + } + ccm->PAD[ccm->x++] ^= b; + } + } + + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ccm/ccm_reset.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/ccm/ccm_reset.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,35 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +#ifdef LTC_CCM_MODE + +/** + Reset a CCM state to as if you just called ccm_init(). This saves the initialization time. + @param ccm The CCM state to reset + @return CRYPT_OK on success +*/ +int ccm_reset(ccm_state *ccm) +{ + LTC_ARGCHK(ccm != NULL); + zeromem(ccm->PAD, sizeof(ccm->PAD)); + zeromem(ccm->ctr, sizeof(ccm->ctr)); + zeromem(ccm->CTRPAD, sizeof(ccm->CTRPAD)); + ccm->CTRlen = 0; + ccm->current_ptlen = 0; + ccm->current_aadlen = 0; + + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ccm/ccm_test.c --- a/libtomcrypt/src/encauth/ccm/ccm_test.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/ccm/ccm_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -32,14 +30,14 @@ int ptlen; unsigned char ct[64]; unsigned char tag[16]; - int taglen; + unsigned long taglen; } tests[] = { /* 13 byte nonce, 8 byte auth, 23 byte pt */ { - { 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, + { 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF }, - { 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0xA0, + { 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5 }, 13, { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 }, @@ -57,20 +55,20 @@ /* 13 byte nonce, 12 byte header, 19 byte pt */ { - { 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, + { 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF }, - { 0x00, 0x00, 0x00, 0x06, 0x05, 0x04, 0x03, 0xA0, + { 0x00, 0x00, 0x00, 0x06, 0x05, 0x04, 0x03, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5 }, 13, { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B }, 12, - { 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, - 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, + { 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, + 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E }, 19, - { 0xA2, 0x8C, 0x68, 0x65, 0x93, 0x9A, 0x9A, 0x79, - 0xFA, 0xAA, 0x5C, 0x4C, 0x2A, 0x9D, 0x4A, 0x91, + { 0xA2, 0x8C, 0x68, 0x65, 0x93, 0x9A, 0x9A, 0x79, + 0xFA, 0xAA, 0x5C, 0x4C, 0x2A, 0x9D, 0x4A, 0x91, 0xCD, 0xAC, 0x8C }, { 0x96, 0xC8, 0x61, 0xB9, 0xC9, 0xE6, 0x1E, 0xF1 }, 8 @@ -78,7 +76,7 @@ /* supplied by Brian Gladman */ { - { 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + { 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f }, { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16 }, 7, @@ -92,31 +90,34 @@ }, { - { 0xc9, 0x7c, 0x1f, 0x67, 0xce, 0x37, 0x11, 0x85, + { 0xc9, 0x7c, 0x1f, 0x67, 0xce, 0x37, 0x11, 0x85, 0x51, 0x4a, 0x8a, 0x19, 0xf2, 0xbd, 0xd5, 0x2f }, - { 0x00, 0x50, 0x30, 0xf1, 0x84, 0x44, 0x08, 0xb5, + { 0x00, 0x50, 0x30, 0xf1, 0x84, 0x44, 0x08, 0xb5, 0x03, 0x97, 0x76, 0xe7, 0x0c }, 13, - { 0x08, 0x40, 0x0f, 0xd2, 0xe1, 0x28, 0xa5, 0x7c, - 0x50, 0x30, 0xf1, 0x84, 0x44, 0x08, 0xab, 0xae, + { 0x08, 0x40, 0x0f, 0xd2, 0xe1, 0x28, 0xa5, 0x7c, + 0x50, 0x30, 0xf1, 0x84, 0x44, 0x08, 0xab, 0xae, 0xa5, 0xb8, 0xfc, 0xba, 0x00, 0x00 }, 22, - { 0xf8, 0xba, 0x1a, 0x55, 0xd0, 0x2f, 0x85, 0xae, - 0x96, 0x7b, 0xb6, 0x2f, 0xb6, 0xcd, 0xa8, 0xeb, + { 0xf8, 0xba, 0x1a, 0x55, 0xd0, 0x2f, 0x85, 0xae, + 0x96, 0x7b, 0xb6, 0x2f, 0xb6, 0xcd, 0xa8, 0xeb, 0x7e, 0x78, 0xa0, 0x50 }, 20, - { 0xf3, 0xd0, 0xa2, 0xfe, 0x9a, 0x3d, 0xbf, 0x23, - 0x42, 0xa6, 0x43, 0xe4, 0x32, 0x46, 0xe8, 0x0c, + { 0xf3, 0xd0, 0xa2, 0xfe, 0x9a, 0x3d, 0xbf, 0x23, + 0x42, 0xa6, 0x43, 0xe4, 0x32, 0x46, 0xe8, 0x0c, 0x3c, 0x04, 0xd0, 0x19 }, { 0x78, 0x45, 0xce, 0x0b, 0x16, 0xf9, 0x76, 0x23 }, 8 }, }; - unsigned long taglen, x; - unsigned char buf[64], buf2[64], tag2[16], tag[16]; + unsigned long taglen, x, y; + unsigned char buf[64], buf2[64], tag[16], tag2[16], tag3[16], zero[64]; int err, idx; symmetric_key skey; + ccm_state ccm; + + zeromem(zero, 64); idx = find_cipher("aes"); if (idx == -1) { @@ -127,54 +128,130 @@ } for (x = 0; x < (sizeof(tests)/sizeof(tests[0])); x++) { + for (y = 0; y < 2; y++) { taglen = tests[x].taglen; - if ((err = cipher_descriptor[idx].setup(tests[x].key, 16, 0, &skey)) != CRYPT_OK) { - return err; - } - - if ((err = ccm_memory(idx, - tests[x].key, 16, - &skey, - tests[x].nonce, tests[x].noncelen, - tests[x].header, tests[x].headerlen, - (unsigned char*)tests[x].pt, tests[x].ptlen, - buf, - tag, &taglen, 0)) != CRYPT_OK) { - return err; + if (y == 0) { + if ((err = cipher_descriptor[idx].setup(tests[x].key, 16, 0, &skey)) != CRYPT_OK) { + return err; + } + + if ((err = ccm_memory(idx, + tests[x].key, 16, + &skey, + tests[x].nonce, tests[x].noncelen, + tests[x].header, tests[x].headerlen, + (unsigned char*)tests[x].pt, tests[x].ptlen, + buf, + tag, &taglen, 0)) != CRYPT_OK) { + return err; + } + /* run a second time to make sure skey is not touched */ + if ((err = ccm_memory(idx, + tests[x].key, 16, + &skey, + tests[x].nonce, tests[x].noncelen, + tests[x].header, tests[x].headerlen, + (unsigned char*)tests[x].pt, tests[x].ptlen, + buf, + tag, &taglen, 0)) != CRYPT_OK) { + return err; + } + } else { + if ((err = ccm_init(&ccm, idx, tests[x].key, 16, tests[x].ptlen, tests[x].taglen, tests[x].headerlen)) != CRYPT_OK) { + return err; + } + if ((err = ccm_add_nonce(&ccm, tests[x].nonce, tests[x].noncelen)) != CRYPT_OK) { + return err; + } + if ((err = ccm_add_aad(&ccm, tests[x].header, tests[x].headerlen)) != CRYPT_OK) { + return err; + } + if ((err = ccm_process(&ccm, (unsigned char*)tests[x].pt, tests[x].ptlen, buf, CCM_ENCRYPT)) != CRYPT_OK) { + return err; + } + if ((err = ccm_done(&ccm, tag, &taglen)) != CRYPT_OK) { + return err; + } } - if (XMEMCMP(buf, tests[x].ct, tests[x].ptlen)) { + if (compare_testvector(buf, tests[x].ptlen, tests[x].ct, tests[x].ptlen, "CCM encrypt data", x)) { return CRYPT_FAIL_TESTVECTOR; } - if (XMEMCMP(tag, tests[x].tag, tests[x].taglen)) { + if (compare_testvector(tag, taglen, tests[x].tag, tests[x].taglen, "CCM encrypt tag", x)) { return CRYPT_FAIL_TESTVECTOR; } - if ((err = ccm_memory(idx, - tests[x].key, 16, - NULL, - tests[x].nonce, tests[x].noncelen, - tests[x].header, tests[x].headerlen, - buf2, tests[x].ptlen, - buf, - tag2, &taglen, 1 )) != CRYPT_OK) { - return err; + if (y == 0) { + XMEMCPY(tag3, tests[x].tag, tests[x].taglen); + taglen = tests[x].taglen; + if ((err = ccm_memory(idx, + tests[x].key, 16, + NULL, + tests[x].nonce, tests[x].noncelen, + tests[x].header, tests[x].headerlen, + buf2, tests[x].ptlen, + buf, + tag3, &taglen, 1 )) != CRYPT_OK) { + return err; + } + } else { + if ((err = ccm_init(&ccm, idx, tests[x].key, 16, tests[x].ptlen, tests[x].taglen, tests[x].headerlen)) != CRYPT_OK) { + return err; + } + if ((err = ccm_add_nonce(&ccm, tests[x].nonce, tests[x].noncelen)) != CRYPT_OK) { + return err; + } + if ((err = ccm_add_aad(&ccm, tests[x].header, tests[x].headerlen)) != CRYPT_OK) { + return err; + } + if ((err = ccm_process(&ccm, buf2, tests[x].ptlen, buf, CCM_DECRYPT)) != CRYPT_OK) { + return err; + } + if ((err = ccm_done(&ccm, tag2, &taglen)) != CRYPT_OK) { + return err; + } } - if (XMEMCMP(buf2, tests[x].pt, tests[x].ptlen)) { + + if (compare_testvector(buf2, tests[x].ptlen, tests[x].pt, tests[x].ptlen, "CCM decrypt data", x)) { return CRYPT_FAIL_TESTVECTOR; } - if (XMEMCMP(tag2, tests[x].tag, tests[x].taglen)) { - return CRYPT_FAIL_TESTVECTOR; + if (y == 0) { + /* check if decryption with the wrong tag does not reveal the plaintext */ + XMEMCPY(tag3, tests[x].tag, tests[x].taglen); + tag3[0] ^= 0xff; /* set the tag to the wrong value */ + taglen = tests[x].taglen; + if ((err = ccm_memory(idx, + tests[x].key, 16, + NULL, + tests[x].nonce, tests[x].noncelen, + tests[x].header, tests[x].headerlen, + buf2, tests[x].ptlen, + buf, + tag3, &taglen, 1 )) != CRYPT_ERROR) { + return CRYPT_FAIL_TESTVECTOR; + } + if (compare_testvector(buf2, tests[x].ptlen, zero, tests[x].ptlen, "CCM decrypt wrong tag", x)) { + return CRYPT_FAIL_TESTVECTOR; + } + } else { + if (compare_testvector(tag2, taglen, tests[x].tag, tests[x].taglen, "CCM decrypt tag", x)) { + return CRYPT_FAIL_TESTVECTOR; + } } - cipher_descriptor[idx].done(&skey); + + if (y == 0) { + cipher_descriptor[idx].done(&skey); + } + } } + return CRYPT_OK; #endif } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/chachapoly/chacha20poly1305_add_aad.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/chachapoly/chacha20poly1305_add_aad.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,38 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_CHACHA20POLY1305_MODE + +/** + Add AAD to the ChaCha20Poly1305 state + @param st The ChaCha20Poly1305 state + @param in The additional authentication data to add to the ChaCha20Poly1305 state + @param inlen The length of the ChaCha20Poly1305 data. + @return CRYPT_OK on success + */ +int chacha20poly1305_add_aad(chacha20poly1305_state *st, const unsigned char *in, unsigned long inlen) +{ + int err; + + if (inlen == 0) return CRYPT_OK; /* nothing to do */ + LTC_ARGCHK(st != NULL); + + if (st->aadflg == 0) return CRYPT_ERROR; + if ((err = poly1305_process(&st->poly, in, inlen)) != CRYPT_OK) return err; + st->aadlen += (ulong64)inlen; + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/chachapoly/chacha20poly1305_decrypt.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/chachapoly/chacha20poly1305_decrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,49 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_CHACHA20POLY1305_MODE + +/** + Decrypt bytes of ciphertext with ChaCha20Poly1305 + @param st The ChaCha20Poly1305 state + @param in The ciphertext + @param inlen The length of the input (octets) + @param out [out] The plaintext (length inlen) + @return CRYPT_OK if successful +*/ +int chacha20poly1305_decrypt(chacha20poly1305_state *st, const unsigned char *in, unsigned long inlen, unsigned char *out) +{ + unsigned char padzero[16] = { 0 }; + unsigned long padlen; + int err; + + if (inlen == 0) return CRYPT_OK; /* nothing to do */ + LTC_ARGCHK(st != NULL); + + if (st->aadflg) { + padlen = 16 - (unsigned long)(st->aadlen % 16); + if (padlen < 16) { + if ((err = poly1305_process(&st->poly, padzero, padlen)) != CRYPT_OK) return err; + } + st->aadflg = 0; /* no more AAD */ + } + if (st->aadflg) st->aadflg = 0; /* no more AAD */ + if ((err = poly1305_process(&st->poly, in, inlen)) != CRYPT_OK) return err; + if ((err = chacha_crypt(&st->chacha, in, inlen, out)) != CRYPT_OK) return err; + st->ctlen += (ulong64)inlen; + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/chachapoly/chacha20poly1305_done.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/chachapoly/chacha20poly1305_done.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,46 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_CHACHA20POLY1305_MODE + +/** + Terminate a ChaCha20Poly1305 stream + @param st The ChaCha20Poly1305 state + @param tag [out] The destination for the MAC tag + @param taglen [in/out] The length of the MAC tag + @return CRYPT_OK on success + */ +int chacha20poly1305_done(chacha20poly1305_state *st, unsigned char *tag, unsigned long *taglen) +{ + unsigned char padzero[16] = { 0 }; + unsigned long padlen; + unsigned char buf[16]; + int err; + + LTC_ARGCHK(st != NULL); + + padlen = 16 - (unsigned long)(st->ctlen % 16); + if (padlen < 16) { + if ((err = poly1305_process(&st->poly, padzero, padlen)) != CRYPT_OK) return err; + } + STORE64L(st->aadlen, buf); + STORE64L(st->ctlen, buf + 8); + if ((err = poly1305_process(&st->poly, buf, 16)) != CRYPT_OK) return err; + if ((err = poly1305_done(&st->poly, tag, taglen)) != CRYPT_OK) return err; + if ((err = chacha_done(&st->chacha)) != CRYPT_OK) return err; + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/chachapoly/chacha20poly1305_encrypt.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/chachapoly/chacha20poly1305_encrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,48 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_CHACHA20POLY1305_MODE + +/** + Encrypt bytes of ciphertext with ChaCha20Poly1305 + @param st The ChaCha20Poly1305 state + @param in The plaintext + @param inlen The length of the input (octets) + @param out [out] The ciphertext (length inlen) + @return CRYPT_OK if successful +*/ +int chacha20poly1305_encrypt(chacha20poly1305_state *st, const unsigned char *in, unsigned long inlen, unsigned char *out) +{ + unsigned char padzero[16] = { 0 }; + unsigned long padlen; + int err; + + if (inlen == 0) return CRYPT_OK; /* nothing to do */ + LTC_ARGCHK(st != NULL); + + if ((err = chacha_crypt(&st->chacha, in, inlen, out)) != CRYPT_OK) return err; + if (st->aadflg) { + padlen = 16 - (unsigned long)(st->aadlen % 16); + if (padlen < 16) { + if ((err = poly1305_process(&st->poly, padzero, padlen)) != CRYPT_OK) return err; + } + st->aadflg = 0; /* no more AAD */ + } + if ((err = poly1305_process(&st->poly, out, inlen)) != CRYPT_OK) return err; + st->ctlen += (ulong64)inlen; + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/chachapoly/chacha20poly1305_init.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/chachapoly/chacha20poly1305_init.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,30 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_CHACHA20POLY1305_MODE + +/** + Initialize an ChaCha20Poly1305 context (only the key) + @param st [out] The destination of the ChaCha20Poly1305 state + @param key The secret key + @param keylen The length of the secret key (octets) + @return CRYPT_OK if successful +*/ +int chacha20poly1305_init(chacha20poly1305_state *st, const unsigned char *key, unsigned long keylen) +{ + return chacha_setup(&st->chacha, key, keylen, 20); +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/chachapoly/chacha20poly1305_memory.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/chachapoly/chacha20poly1305_memory.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,74 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_CHACHA20POLY1305_MODE + +/** + Process an entire GCM packet in one call. + @param key The secret key + @param keylen The length of the secret key + @param iv The initialization vector + @param ivlen The length of the initialization vector + @param aad The additional authentication data (header) + @param aadlen The length of the aad + @param in The plaintext + @param inlen The length of the plaintext (ciphertext length is the same) + @param out The ciphertext + @param tag [out] The MAC tag + @param taglen [in/out] The MAC tag length + @param direction Encrypt or Decrypt mode (CHACHA20POLY1305_ENCRYPT or CHACHA20POLY1305_DECRYPT) + @return CRYPT_OK on success + */ +int chacha20poly1305_memory(const unsigned char *key, unsigned long keylen, + const unsigned char *iv, unsigned long ivlen, + const unsigned char *aad, unsigned long aadlen, + const unsigned char *in, unsigned long inlen, + unsigned char *out, + unsigned char *tag, unsigned long *taglen, + int direction) +{ + chacha20poly1305_state st; + int err; + + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(iv != NULL); + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(out != NULL); + LTC_ARGCHK(tag != NULL); + + if ((err = chacha20poly1305_init(&st, key, keylen)) != CRYPT_OK) { goto LBL_ERR; } + if ((err = chacha20poly1305_setiv(&st, iv, ivlen)) != CRYPT_OK) { goto LBL_ERR; } + if (aad && aadlen > 0) { + if ((err = chacha20poly1305_add_aad(&st, aad, aadlen)) != CRYPT_OK) { goto LBL_ERR; } + } + if (direction == CHACHA20POLY1305_ENCRYPT) { + if ((err = chacha20poly1305_encrypt(&st, in, inlen, out)) != CRYPT_OK) { goto LBL_ERR; } + } + else if (direction == CHACHA20POLY1305_DECRYPT) { + if ((err = chacha20poly1305_decrypt(&st, in, inlen, out)) != CRYPT_OK) { goto LBL_ERR; } + } + else { + err = CRYPT_INVALID_ARG; + goto LBL_ERR; + } + err = chacha20poly1305_done(&st, tag, taglen); +LBL_ERR: +#ifdef LTC_CLEAN_STACK + zeromem(&st, sizeof(chacha20poly1305_state)); +#endif + return err; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/chachapoly/chacha20poly1305_setiv.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/chachapoly/chacha20poly1305_setiv.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,68 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_CHACHA20POLY1305_MODE + +/** + Set IV + counter data to the ChaCha20Poly1305 state and reset the context + @param st The ChaCha20Poly1305 state + @param iv The IV data to add + @param ivlen The length of the IV (must be 12 or 8) + @return CRYPT_OK on success + */ +int chacha20poly1305_setiv(chacha20poly1305_state *st, const unsigned char *iv, unsigned long ivlen) +{ + chacha_state tmp_st; + int i, err; + unsigned char polykey[32]; + + LTC_ARGCHK(st != NULL); + LTC_ARGCHK(iv != NULL); + LTC_ARGCHK(ivlen == 12 || ivlen == 8); + + /* set IV for chacha20 */ + if (ivlen == 12) { + /* IV 96bit */ + if ((err = chacha_ivctr32(&st->chacha, iv, ivlen, 1)) != CRYPT_OK) return err; + } + else { + /* IV 64bit */ + if ((err = chacha_ivctr64(&st->chacha, iv, ivlen, 1)) != CRYPT_OK) return err; + } + + /* copy chacha20 key to temporary state */ + for(i = 0; i < 12; i++) tmp_st.input[i] = st->chacha.input[i]; + tmp_st.rounds = 20; + /* set IV */ + if (ivlen == 12) { + /* IV 32bit */ + if ((err = chacha_ivctr32(&tmp_st, iv, ivlen, 0)) != CRYPT_OK) return err; + } + else { + /* IV 64bit */ + if ((err = chacha_ivctr64(&tmp_st, iv, ivlen, 0)) != CRYPT_OK) return err; + } + /* (re)generate new poly1305 key */ + if ((err = chacha_keystream(&tmp_st, polykey, 32)) != CRYPT_OK) return err; + /* (re)initialise poly1305 */ + if ((err = poly1305_init(&st->poly, polykey, 32)) != CRYPT_OK) return err; + st->ctlen = 0; + st->aadlen = 0; + st->aadflg = 1; + + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/chachapoly/chacha20poly1305_setiv_rfc7905.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,40 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_CHACHA20POLY1305_MODE + +/** + Set IV + counter data (with RFC7905-magic) to the ChaCha20Poly1305 state and reset the context + @param st The ChaCha20Poly1305 state + @param iv The IV data to add + @param ivlen The length of the IV (must be 12 or 8) + @param sequence_number 64bit sequence number which is incorporated into IV as described in RFC7905 + @return CRYPT_OK on success + */ +int chacha20poly1305_setiv_rfc7905(chacha20poly1305_state *st, const unsigned char *iv, unsigned long ivlen, ulong64 sequence_number) +{ + int i; + unsigned char combined_iv[12] = { 0 }; + + LTC_ARGCHK(st != NULL); + LTC_ARGCHK(iv != NULL); + LTC_ARGCHK(ivlen == 12); + + STORE64L(sequence_number, combined_iv + 4); + for (i = 0; i < 12; i++) combined_iv[i] = iv[i] ^ combined_iv[i]; + return chacha20poly1305_setiv(st, combined_iv, 12); +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/chachapoly/chacha20poly1305_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/chachapoly/chacha20poly1305_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,134 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_CHACHA20POLY1305_MODE + +int chacha20poly1305_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + chacha20poly1305_state st1, st2; + unsigned char k[] = { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f }; + unsigned char i12[] = { 0x07, 0x00, 0x00, 0x00, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47 }; + unsigned char i8[] = { 0x07, 0x00, 0x00, 0x00, 0x40, 0x41, 0x42, 0x43 }; + unsigned char aad[] = { 0x50, 0x51, 0x52, 0x53, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7 }; + unsigned char enc[] = { 0xD3, 0x1A, 0x8D, 0x34, 0x64, 0x8E, 0x60, 0xDB, 0x7B, 0x86, 0xAF, 0xBC, 0x53, 0xEF, 0x7E, 0xC2, + 0xA4, 0xAD, 0xED, 0x51, 0x29, 0x6E, 0x08, 0xFE, 0xA9, 0xE2, 0xB5, 0xA7, 0x36, 0xEE, 0x62, 0xD6, + 0x3D, 0xBE, 0xA4, 0x5E, 0x8C, 0xA9, 0x67, 0x12, 0x82, 0xFA, 0xFB, 0x69, 0xDA, 0x92, 0x72, 0x8B, + 0x1A, 0x71, 0xDE, 0x0A, 0x9E, 0x06, 0x0B, 0x29, 0x05, 0xD6, 0xA5, 0xB6, 0x7E, 0xCD, 0x3B, 0x36, + 0x92, 0xDD, 0xBD, 0x7F, 0x2D, 0x77, 0x8B, 0x8C, 0x98, 0x03, 0xAE, 0xE3, 0x28, 0x09, 0x1B, 0x58, + 0xFA, 0xB3, 0x24, 0xE4, 0xFA, 0xD6, 0x75, 0x94, 0x55, 0x85, 0x80, 0x8B, 0x48, 0x31, 0xD7, 0xBC, + 0x3F, 0xF4, 0xDE, 0xF0, 0x8E, 0x4B, 0x7A, 0x9D, 0xE5, 0x76, 0xD2, 0x65, 0x86, 0xCE, 0xC6, 0x4B, + 0x61, 0x16 }; + unsigned char tag[] = { 0x1A, 0xE1, 0x0B, 0x59, 0x4F, 0x09, 0xE2, 0x6A, 0x7E, 0x90, 0x2E, 0xCB, 0xD0, 0x60, 0x06, 0x91 }; + char m[] = "Ladies and Gentlemen of the class of '99: If I could offer you only one tip for the future, sunscreen would be it."; + unsigned long mlen = strlen(m); + unsigned long len; + unsigned char rfc7905_pt[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F }; + unsigned char rfc7905_enc[] = { 0xE4, 0x62, 0x85, 0xB4, 0x29, 0x95, 0x34, 0x96, 0xAB, 0xFB, 0x67, 0xCD, 0xAE, 0xAC, 0x94, 0x1E }; + unsigned char rfc7905_tag[] = { 0x16, 0x2C, 0x92, 0x48, 0x2A, 0xDB, 0xD3, 0x5D, 0x48, 0xBE, 0xC6, 0xFF, 0x10, 0x9C, 0xBA, 0xE4 }; + unsigned char ct[1000], pt[1000], emac[16], dmac[16]; + int err; + + /* encrypt IV 96bit */ + if ((err = chacha20poly1305_init(&st1, k, sizeof(k))) != CRYPT_OK) return err; + if ((err = chacha20poly1305_setiv(&st1, i12, sizeof(i12))) != CRYPT_OK) return err; + if ((err = chacha20poly1305_add_aad(&st1, aad, sizeof(aad))) != CRYPT_OK) return err; + /* encrypt piece by piece */ + if ((err = chacha20poly1305_encrypt(&st1, (unsigned char *)m, 25, ct)) != CRYPT_OK) return err; + if ((err = chacha20poly1305_encrypt(&st1, (unsigned char *)m + 25, 10, ct + 25)) != CRYPT_OK) return err; + if ((err = chacha20poly1305_encrypt(&st1, (unsigned char *)m + 35, 35, ct + 35)) != CRYPT_OK) return err; + if ((err = chacha20poly1305_encrypt(&st1, (unsigned char *)m + 70, 5, ct + 70)) != CRYPT_OK) return err; + if ((err = chacha20poly1305_encrypt(&st1, (unsigned char *)m + 75, 5, ct + 75)) != CRYPT_OK) return err; + if ((err = chacha20poly1305_encrypt(&st1, (unsigned char *)m + 80, mlen - 80, ct + 80)) != CRYPT_OK) return err; + len = sizeof(emac); + if ((err = chacha20poly1305_done(&st1, emac, &len)) != CRYPT_OK) return err; + + if (compare_testvector(ct, mlen, enc, sizeof(enc), "ENC-CT", 1) != 0) return CRYPT_FAIL_TESTVECTOR; + if (compare_testvector(emac, len, tag, sizeof(tag), "ENC-TAG", 2) != 0) return CRYPT_FAIL_TESTVECTOR; + + /* decrypt IV 96bit */ + if ((err = chacha20poly1305_init(&st2, k, sizeof(k))) != CRYPT_OK) return err; + if ((err = chacha20poly1305_setiv(&st2, i12, sizeof(i12))) != CRYPT_OK) return err; + if ((err = chacha20poly1305_add_aad(&st2, aad, sizeof(aad))) != CRYPT_OK) return err; + if ((err = chacha20poly1305_decrypt(&st2, ct, 21, pt)) != CRYPT_OK) return err; + if ((err = chacha20poly1305_decrypt(&st2, ct + 21, mlen - 21, pt + 21)) != CRYPT_OK) return err; + len = sizeof(dmac); + if ((err = chacha20poly1305_done(&st2, dmac, &len)) != CRYPT_OK) return err; + + if (compare_testvector(pt, mlen, m, mlen, "DEC-PT", 3) != 0) return CRYPT_FAIL_TESTVECTOR; + if (compare_testvector(dmac, len, tag, sizeof(tag), "DEC-TAG", 4) != 0) return CRYPT_FAIL_TESTVECTOR; + + /* chacha20poly1305_memory - encrypt */ + len = sizeof(emac); + if ((err = chacha20poly1305_memory(k, sizeof(k), i12, sizeof(i12), aad, sizeof(aad), (unsigned char *)m, + mlen, ct, emac, &len, CHACHA20POLY1305_ENCRYPT)) != CRYPT_OK) return err; + if (compare_testvector(ct, mlen, enc, sizeof(enc), "ENC-CT2", 1) != 0) return CRYPT_FAIL_TESTVECTOR; + if (compare_testvector(emac, len, tag, sizeof(tag), "ENC-TAG2", 2) != 0) return CRYPT_FAIL_TESTVECTOR; + + /* chacha20poly1305_memory - decrypt */ + len = sizeof(dmac); + if ((err = chacha20poly1305_memory(k, sizeof(k), i12, sizeof(i12), aad, sizeof(aad), + ct, mlen, pt, dmac, &len, CHACHA20POLY1305_DECRYPT)) != CRYPT_OK) return err; + if (compare_testvector(pt, mlen, m, mlen, "DEC-PT2", 3) != 0) return CRYPT_FAIL_TESTVECTOR; + if (compare_testvector(dmac, len, tag, sizeof(tag), "DEC-TAG2", 4) != 0) return CRYPT_FAIL_TESTVECTOR; + + /* encrypt - rfc7905 */ + if ((err = chacha20poly1305_init(&st1, k, sizeof(k))) != CRYPT_OK) return err; + if ((err = chacha20poly1305_setiv_rfc7905(&st1, i12, sizeof(i12), CONST64(0x1122334455667788))) != CRYPT_OK) return err; + if ((err = chacha20poly1305_add_aad(&st1, aad, sizeof(aad))) != CRYPT_OK) return err; + if ((err = chacha20poly1305_encrypt(&st1, rfc7905_pt, 16, ct)) != CRYPT_OK) return err; + len = sizeof(emac); + if ((err = chacha20poly1305_done(&st1, emac, &len)) != CRYPT_OK) return err; + + if (compare_testvector(ct, 16, rfc7905_enc, 16, "ENC-CT3", 1) != 0) return CRYPT_FAIL_TESTVECTOR; + if (compare_testvector(emac, len, rfc7905_tag, 16, "ENC-TAG3", 2) != 0) return CRYPT_FAIL_TESTVECTOR; + + /* decrypt - rfc7905 */ + if ((err = chacha20poly1305_init(&st1, k, sizeof(k))) != CRYPT_OK) return err; + if ((err = chacha20poly1305_setiv_rfc7905(&st1, i12, sizeof(i12), CONST64(0x1122334455667788))) != CRYPT_OK) return err; + if ((err = chacha20poly1305_add_aad(&st1, aad, sizeof(aad))) != CRYPT_OK) return err; + if ((err = chacha20poly1305_decrypt(&st1, ct, 16, pt)) != CRYPT_OK) return err; + len = sizeof(dmac); + if ((err = chacha20poly1305_done(&st1, dmac, &len)) != CRYPT_OK) return err; + + if (compare_testvector(pt, 16, rfc7905_pt, 16, "DEC-CT3", 1) != 0) return CRYPT_FAIL_TESTVECTOR; + if (compare_testvector(dmac, len, rfc7905_tag, 16, "DEC-TAG3", 2) != 0) return CRYPT_FAIL_TESTVECTOR; + + /* encrypt IV 64bit */ + if ((err = chacha20poly1305_init(&st1, k, sizeof(k))) != CRYPT_OK) return err; + if ((err = chacha20poly1305_setiv(&st1, i8, sizeof(i8))) != CRYPT_OK) return err; + if ((err = chacha20poly1305_add_aad(&st1, aad, sizeof(aad))) != CRYPT_OK) return err; + if ((err = chacha20poly1305_encrypt(&st1, (unsigned char *)m, mlen, ct)) != CRYPT_OK) return err; + len = sizeof(emac); + if ((err = chacha20poly1305_done(&st1, emac, &len)) != CRYPT_OK) return err; + + /* decrypt IV 64bit */ + if ((err = chacha20poly1305_init(&st2, k, sizeof(k))) != CRYPT_OK) return err; + if ((err = chacha20poly1305_setiv(&st2, i8, sizeof(i8))) != CRYPT_OK) return err; + if ((err = chacha20poly1305_add_aad(&st2, aad, sizeof(aad))) != CRYPT_OK) return err; + if ((err = chacha20poly1305_decrypt(&st2, ct, mlen, pt)) != CRYPT_OK) return err; + len = sizeof(dmac); + if ((err = chacha20poly1305_done(&st2, dmac, &len)) != CRYPT_OK) return err; + + if (compare_testvector(pt, mlen, m, mlen, "DEC-PT4", 1) != 0) return CRYPT_FAIL_TESTVECTOR; + if (compare_testvector(dmac, len, emac, len, "DEC-TAG4", 2) != 0) return CRYPT_FAIL_TESTVECTOR; + + return CRYPT_OK; +#endif +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/eax/eax_addheader.c --- a/libtomcrypt/src/encauth/eax/eax_addheader.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/eax/eax_addheader.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,25 +5,23 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/** +/** @file eax_addheader.c - EAX implementation, add meta-data, by Tom St Denis + EAX implementation, add meta-data, by Tom St Denis */ #include "tomcrypt.h" #ifdef LTC_EAX_MODE -/** - add header (metadata) to the stream +/** + add header (metadata) to the stream @param eax The current EAX state @param header The header (meta-data) data you wish to add to the state @param length The length of the header data @return CRYPT_OK if successful */ -int eax_addheader(eax_state *eax, const unsigned char *header, +int eax_addheader(eax_state *eax, const unsigned char *header, unsigned long length) { LTC_ARGCHK(eax != NULL); @@ -33,6 +31,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/eax/eax_decrypt.c --- a/libtomcrypt/src/encauth/eax/eax_decrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/eax/eax_decrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,11 +5,9 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/** +/** @file eax_decrypt.c EAX implementation, decrypt block, by Tom St Denis */ @@ -17,7 +15,7 @@ #ifdef LTC_EAX_MODE -/** +/** Decrypt data with the EAX protocol @param eax The EAX state @param ct The ciphertext @@ -25,11 +23,11 @@ @param length The length (octets) of the ciphertext @return CRYPT_OK if successful */ -int eax_decrypt(eax_state *eax, const unsigned char *ct, unsigned char *pt, +int eax_decrypt(eax_state *eax, const unsigned char *ct, unsigned char *pt, unsigned long length) { int err; - + LTC_ARGCHK(eax != NULL); LTC_ARGCHK(pt != NULL); LTC_ARGCHK(ct != NULL); @@ -45,6 +43,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/eax/eax_decrypt_verify_memory.c --- a/libtomcrypt/src/encauth/eax/eax_decrypt_verify_memory.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/eax/eax_decrypt_verify_memory.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -57,6 +55,9 @@ /* default to zero */ *stat = 0; + /* limit taglen */ + taglen = MIN(taglen, MAXBLOCKSIZE); + /* allocate ram */ buf = XMALLOC(taglen); eax = XMALLOC(sizeof(*eax)); @@ -77,17 +78,17 @@ if ((err = eax_decrypt(eax, ct, pt, ctlen)) != CRYPT_OK) { goto LBL_ERR; } - + buflen = taglen; if ((err = eax_done(eax, buf, &buflen)) != CRYPT_OK) { goto LBL_ERR; } /* compare tags */ - if (buflen >= taglen && XMEMCMP(buf, tag, taglen) == 0) { + if (buflen >= taglen && XMEM_NEQ(buf, tag, taglen) == 0) { *stat = 1; } - + err = CRYPT_OK; LBL_ERR: #ifdef LTC_CLEAN_STACK @@ -103,6 +104,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/eax/eax_done.c --- a/libtomcrypt/src/encauth/eax/eax_done.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/eax/eax_done.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -51,7 +49,7 @@ /* finish ctomac */ len = MAXBLOCKSIZE; if ((err = omac_done(&eax->ctomac, ctmac, &len)) != CRYPT_OK) { - goto LBL_ERR; + goto LBL_ERR; } /* finish headeromac */ @@ -59,7 +57,7 @@ /* note we specifically don't reset len so the two lens are minimal */ if ((err = omac_done(&eax->headeromac, headermac, &len)) != CRYPT_OK) { - goto LBL_ERR; + goto LBL_ERR; } /* terminate the CTR chain */ @@ -89,6 +87,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/eax/eax_encrypt.c --- a/libtomcrypt/src/encauth/eax/eax_encrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/eax/eax_encrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,13 +5,11 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @file eax_encrypt.c - EAX implementation, encrypt block by Tom St Denis + EAX implementation, encrypt block by Tom St Denis */ #include "tomcrypt.h" @@ -25,11 +23,11 @@ @param length The length of the plaintext (octets) @return CRYPT_OK if successful */ -int eax_encrypt(eax_state *eax, const unsigned char *pt, unsigned char *ct, +int eax_encrypt(eax_state *eax, const unsigned char *pt, unsigned char *ct, unsigned long length) { int err; - + LTC_ARGCHK(eax != NULL); LTC_ARGCHK(pt != NULL); LTC_ARGCHK(ct != NULL); @@ -46,6 +44,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/eax/eax_encrypt_authenticate_memory.c --- a/libtomcrypt/src/encauth/eax/eax_encrypt_authenticate_memory.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/eax/eax_encrypt_authenticate_memory.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -53,15 +51,15 @@ eax = XMALLOC(sizeof(*eax)); if ((err = eax_init(eax, cipher, key, keylen, nonce, noncelen, header, headerlen)) != CRYPT_OK) { - goto LBL_ERR; + goto LBL_ERR; } if ((err = eax_encrypt(eax, pt, ct, ptlen)) != CRYPT_OK) { - goto LBL_ERR; + goto LBL_ERR; } - + if ((err = eax_done(eax, tag, taglen)) != CRYPT_OK) { - goto LBL_ERR; + goto LBL_ERR; } err = CRYPT_OK; @@ -72,11 +70,11 @@ XFREE(eax); - return err; + return err; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/eax/eax_init.c --- a/libtomcrypt/src/encauth/eax/eax_init.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/eax/eax_init.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,19 +5,17 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/** +/** @file eax_init.c - EAX implementation, initialized EAX state, by Tom St Denis + EAX implementation, initialized EAX state, by Tom St Denis */ #include "tomcrypt.h" #ifdef LTC_EAX_MODE -/** +/** Initialized an EAX state @param eax [out] The EAX state to initialize @param cipher The index of the desired cipher @@ -29,7 +27,7 @@ @param headerlen The header length (octets) @return CRYPT_OK if successful */ -int eax_init(eax_state *eax, int cipher, +int eax_init(eax_state *eax, int cipher, const unsigned char *key, unsigned long keylen, const unsigned char *nonce, unsigned long noncelen, const unsigned char *header, unsigned long headerlen) @@ -69,21 +67,21 @@ /* N = LTC_OMAC_0K(nonce) */ zeromem(buf, MAXBLOCKSIZE); if ((err = omac_init(omac, cipher, key, keylen)) != CRYPT_OK) { - goto LBL_ERR; + goto LBL_ERR; } /* omac the [0]_n */ if ((err = omac_process(omac, buf, blklen)) != CRYPT_OK) { - goto LBL_ERR; + goto LBL_ERR; } /* omac the nonce */ if ((err = omac_process(omac, nonce, noncelen)) != CRYPT_OK) { - goto LBL_ERR; + goto LBL_ERR; } /* store result */ len = sizeof(eax->N); if ((err = omac_done(omac, eax->N, &len)) != CRYPT_OK) { - goto LBL_ERR; + goto LBL_ERR; } /* H = LTC_OMAC_1K(header) */ @@ -91,17 +89,17 @@ buf[blklen - 1] = 1; if ((err = omac_init(&eax->headeromac, cipher, key, keylen)) != CRYPT_OK) { - goto LBL_ERR; + goto LBL_ERR; } /* omac the [1]_n */ if ((err = omac_process(&eax->headeromac, buf, blklen)) != CRYPT_OK) { - goto LBL_ERR; + goto LBL_ERR; } /* omac the header */ if (headerlen != 0) { if ((err = omac_process(&eax->headeromac, header, headerlen)) != CRYPT_OK) { - goto LBL_ERR; + goto LBL_ERR; } } @@ -109,19 +107,19 @@ /* setup the CTR mode */ if ((err = ctr_start(cipher, eax->N, key, keylen, 0, CTR_COUNTER_BIG_ENDIAN, &eax->ctr)) != CRYPT_OK) { - goto LBL_ERR; + goto LBL_ERR; } /* setup the LTC_OMAC for the ciphertext */ - if ((err = omac_init(&eax->ctomac, cipher, key, keylen)) != CRYPT_OK) { - goto LBL_ERR; + if ((err = omac_init(&eax->ctomac, cipher, key, keylen)) != CRYPT_OK) { + goto LBL_ERR; } /* omac [2]_n */ zeromem(buf, MAXBLOCKSIZE); buf[blklen-1] = 2; if ((err = omac_process(&eax->ctomac, buf, blklen)) != CRYPT_OK) { - goto LBL_ERR; + goto LBL_ERR; } err = CRYPT_OK; @@ -137,8 +135,8 @@ return err; } -#endif +#endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/eax/eax_test.c --- a/libtomcrypt/src/encauth/eax/eax_test.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/eax/eax_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,11 +5,9 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/** +/** @file eax_test.c EAX implementation, self-test, by Tom St Denis */ @@ -27,16 +25,16 @@ return CRYPT_NOP; #else static const struct { - int keylen, - noncelen, - headerlen, + int keylen, + noncelen, + headerlen, msglen; - unsigned char key[MAXBLOCKSIZE], - nonce[MAXBLOCKSIZE], - header[MAXBLOCKSIZE], + unsigned char key[MAXBLOCKSIZE], + nonce[MAXBLOCKSIZE], + header[MAXBLOCKSIZE], plaintext[MAXBLOCKSIZE], - ciphertext[MAXBLOCKSIZE], + ciphertext[MAXBLOCKSIZE], tag[MAXBLOCKSIZE]; } tests[] = { @@ -107,7 +105,7 @@ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, /* nonce */ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, /* header */ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, @@ -134,7 +132,7 @@ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, /* nonce */ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e }, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e }, /* header */ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d }, @@ -176,7 +174,7 @@ { 16, 16, 8, 2, - /* key */ + /* key */ { 0x91, 0x94, 0x5d, 0x3f, 0x4d, 0xcb, 0xee, 0x0b, 0xf4, 0x5e, 0xf5, 0x22, 0x55, 0xf0, 0x95, 0xa4 }, /* nonce */ @@ -210,14 +208,14 @@ /* Tag */ { 0x3a, 0x59, 0xf2, 0x38, 0xa2, 0x3e, 0x39, 0x19, 0x9d, 0xc9, 0x26, 0x66, 0x26, 0xc4, 0x0f, 0x80 } -} +} }; int err, x, idx, res; unsigned long len; unsigned char outct[MAXBLOCKSIZE], outtag[MAXBLOCKSIZE]; - /* AES can be under rijndael or aes... try to find it */ + /* AES can be under rijndael or aes... try to find it */ if ((idx = find_cipher("aes")) == -1) { if ((idx = find_cipher("rijndael")) == -1) { return CRYPT_NOP; @@ -231,22 +229,8 @@ tests[x].plaintext, tests[x].msglen, outct, outtag, &len)) != CRYPT_OK) { return err; } - if (XMEMCMP(outct, tests[x].ciphertext, tests[x].msglen) || XMEMCMP(outtag, tests[x].tag, len)) { -#if 0 - unsigned long y; - printf("\n\nFailure: \nCT:\n"); - for (y = 0; y < (unsigned long)tests[x].msglen; ) { - printf("0x%02x", outct[y]); - if (y < (unsigned long)(tests[x].msglen-1)) printf(", "); - if (!(++y % 8)) printf("\n"); - } - printf("\nTAG:\n"); - for (y = 0; y < len; ) { - printf("0x%02x", outtag[y]); - if (y < len-1) printf(", "); - if (!(++y % 8)) printf("\n"); - } -#endif + if (compare_testvector(outtag, len, tests[x].tag, len, "EAX Tag", x) || + compare_testvector(outct, tests[x].msglen, tests[x].ciphertext, tests[x].msglen, "EAX CT", x)) { return CRYPT_FAIL_TESTVECTOR; } @@ -256,27 +240,20 @@ outct, tests[x].msglen, outct, outtag, len, &res)) != CRYPT_OK) { return err; } - if ((res != 1) || XMEMCMP(outct, tests[x].plaintext, tests[x].msglen)) { -#if 0 - unsigned long y; - printf("\n\nFailure (res == %d): \nPT:\n", res); - for (y = 0; y < (unsigned long)tests[x].msglen; ) { - printf("0x%02x", outct[y]); - if (y < (unsigned long)(tests[x].msglen-1)) printf(", "); - if (!(++y % 8)) printf("\n"); - } - printf("\n\n"); + if ((res != 1) || compare_testvector(outct, tests[x].msglen, tests[x].plaintext, tests[x].msglen, "EAX", x)) { +#ifdef LTC_TEST_DBG + printf("\n\nEAX: Failure-decrypt - res = %d\n", res); #endif return CRYPT_FAIL_TESTVECTOR; } - } - return CRYPT_OK; + } + return CRYPT_OK; #endif /* LTC_TEST */ } #endif /* LTC_EAX_MODE */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/gcm/gcm_add_aad.c --- a/libtomcrypt/src/encauth/gcm/gcm_add_aad.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/gcm/gcm_add_aad.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -48,6 +46,8 @@ /* in IV mode? */ if (gcm->mode == LTC_GCM_MODE_IV) { + /* IV length must be > 0 */ + if (gcm->buflen == 0 && gcm->totlen == 0) return CRYPT_ERROR; /* let's process the IV */ if (gcm->ivmode || gcm->buflen != 12) { for (x = 0; x < (unsigned long)gcm->buflen; x++) { @@ -66,7 +66,7 @@ } gcm_mult_h(gcm, gcm->X); - /* copy counter out */ + /* copy counter out */ XMEMCPY(gcm->Y, gcm->X, 16); zeromem(gcm->X, 16); } else { @@ -92,7 +92,7 @@ if (gcm->buflen == 0) { for (x = 0; x < (adatalen & ~15); x += 16) { for (y = 0; y < 16; y += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)(&gcm->X[y])) ^= *((LTC_FAST_TYPE*)(&adata[x + y])); + *(LTC_FAST_TYPE_PTR_CAST(&gcm->X[y])) ^= *(LTC_FAST_TYPE_PTR_CAST(&adata[x + y])); } gcm_mult_h(gcm, gcm->X); gcm->totlen += 128; @@ -104,9 +104,9 @@ /* start adding AAD data to the state */ for (; x < adatalen; x++) { - gcm->X[gcm->buflen++] ^= *adata++; + gcm->X[gcm->buflen++] ^= *adata++; - if (gcm->buflen == 16) { + if (gcm->buflen == 16) { /* GF mult it */ gcm_mult_h(gcm, gcm->X); gcm->buflen = 0; @@ -117,8 +117,8 @@ return CRYPT_OK; } #endif - + -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/gcm/gcm_add_iv.c --- a/libtomcrypt/src/encauth/gcm/gcm_add_iv.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/gcm/gcm_add_iv.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -24,7 +22,7 @@ @param IVlen The length of the IV @return CRYPT_OK on success */ -int gcm_add_iv(gcm_state *gcm, +int gcm_add_iv(gcm_state *gcm, const unsigned char *IV, unsigned long IVlen) { unsigned long x, y; @@ -39,7 +37,7 @@ if (gcm->mode != LTC_GCM_MODE_IV) { return CRYPT_INVALID_ARG; } - + if (gcm->buflen >= 16 || gcm->buflen < 0) { return CRYPT_INVALID_ARG; } @@ -59,7 +57,7 @@ if (gcm->buflen == 0) { for (x = 0; x < (IVlen & ~15); x += 16) { for (y = 0; y < 16; y += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)(&gcm->X[y])) ^= *((LTC_FAST_TYPE*)(&IV[x + y])); + *(LTC_FAST_TYPE_PTR_CAST(&gcm->X[y])) ^= *(LTC_FAST_TYPE_PTR_CAST(&IV[x + y])); } gcm_mult_h(gcm, gcm->X); gcm->totlen += 128; @@ -72,7 +70,7 @@ for (; x < IVlen; x++) { gcm->buf[gcm->buflen++] = *IV++; - if (gcm->buflen == 16) { + if (gcm->buflen == 16) { /* GF mult it */ for (y = 0; y < 16; y++) { gcm->X[y] ^= gcm->buf[y]; @@ -87,8 +85,8 @@ } #endif - + -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/gcm/gcm_done.c --- a/libtomcrypt/src/encauth/gcm/gcm_done.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/gcm/gcm_done.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -24,7 +22,7 @@ @param taglen [in/out] The length of the MAC tag @return CRYPT_OK on success */ -int gcm_done(gcm_state *gcm, +int gcm_done(gcm_state *gcm, unsigned char *tag, unsigned long *taglen) { unsigned long x; @@ -42,6 +40,15 @@ return err; } + if (gcm->mode == LTC_GCM_MODE_IV) { + /* let's process the IV */ + if ((err = gcm_add_aad(gcm, NULL, 0)) != CRYPT_OK) return err; + } + + if (gcm->mode == LTC_GCM_MODE_AAD) { + /* let's process the AAD */ + if ((err = gcm_process(gcm, NULL, 0, NULL, 0)) != CRYPT_OK) return err; + } if (gcm->mode != LTC_GCM_MODE_TEXT) { return CRYPT_INVALID_ARG; @@ -78,6 +85,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/gcm/gcm_gf_mult.c --- a/libtomcrypt/src/encauth/gcm/gcm_gf_mult.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/gcm/gcm_gf_mult.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -15,9 +13,9 @@ */ #include "tomcrypt.h" -#if defined(LTC_GCM_TABLES) || defined(LRW_TABLES) || ((defined(LTC_GCM_MODE) || defined(LTC_GCM_MODE)) && defined(LTC_FAST)) +#if defined(LTC_GCM_TABLES) || defined(LTC_LRW_TABLES) || ((defined(LTC_GCM_MODE) || defined(LTC_GCM_MODE)) && defined(LTC_FAST)) -/* this is x*2^128 mod p(x) ... the results are 16 bytes each stored in a packed format. Since only the +/* this is x*2^128 mod p(x) ... the results are 16 bytes each stored in a packed format. Since only the * lower 16 bits are not zero'ed I removed the upper 14 bytes */ const unsigned char gcm_shift_table[256*2] = { 0x00, 0x00, 0x01, 0xc2, 0x03, 0x84, 0x02, 0x46, 0x07, 0x08, 0x06, 0xca, 0x04, 0x8c, 0x05, 0x4e, @@ -60,7 +58,7 @@ #ifndef LTC_FAST /* right shift */ -static void gcm_rightshift(unsigned char *a) +static void _gcm_rightshift(unsigned char *a) { int x; for (x = 15; x > 0; x--) { @@ -73,28 +71,28 @@ static const unsigned char mask[] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 }; static const unsigned char poly[] = { 0x00, 0xE1 }; - + /** GCM GF multiplier (internal use only) bitserial @param a First value @param b Second value @param c Destination for a * b - */ + */ void gcm_gf_mult(const unsigned char *a, const unsigned char *b, unsigned char *c) { unsigned char Z[16], V[16]; - unsigned x, y, z; + unsigned char x, y, z; zeromem(Z, 16); XMEMCPY(V, a, 16); for (x = 0; x < 128; x++) { if (b[x>>3] & mask[x&7]) { for (y = 0; y < 16; y++) { - Z[y] ^= V[y]; + Z[y] ^= V[y]; } } z = V[15] & 0x01; - gcm_rightshift(V); + _gcm_rightshift(V); V[0] ^= poly[z]; } XMEMCPY(c, Z, 16); @@ -113,7 +111,7 @@ @param a First value @param b Second value @param c Destination for a * b - */ + */ void gcm_gf_mult(const unsigned char *a, const unsigned char *b, unsigned char *c) { int i, j, k, u; @@ -129,7 +127,7 @@ LOAD32H(B[M(1)][i], a + (i<<2)); LOAD32L(pB[i], b + (i<<2)); } -#else +#else for (i = 0; i < 2; i++) { LOAD64H(B[M(1)][i], a + (i<<3)); LOAD64L(pB[i], b + (i<<3)); @@ -154,7 +152,7 @@ B[M(9)][i] = B[M(1)][i] ^ B[M(8)][i]; B[M(10)][i] = B[M(2)][i] ^ B[M(8)][i]; B[M(12)][i] = B[M(8)][i] ^ B[M(4)][i]; - + /* now all 3 bit values and the only 4 bit value: 7, 11, 13, 14, 15 */ B[M(7)][i] = B[M(3)][i] ^ B[M(4)][i]; B[M(11)][i] = B[M(3)][i] ^ B[M(8)][i]; @@ -193,7 +191,7 @@ for (i = 0; i < 8; i++) { STORE32H(tmp[i], pTmp + (i<<2)); } -#else +#else for (i = 0; i < 4; i++) { STORE64H(tmp[i], pTmp + (i<<3)); } @@ -215,7 +213,7 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ - +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ + diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/gcm/gcm_init.c --- a/libtomcrypt/src/encauth/gcm/gcm_init.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/gcm/gcm_init.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -25,7 +23,7 @@ @param keylen The length of the secret key @return CRYPT_OK on success */ -int gcm_init(gcm_state *gcm, int cipher, +int gcm_init(gcm_state *gcm, int cipher, const unsigned char *key, int keylen) { int err; @@ -92,8 +90,8 @@ } gcm->PC[x][y][0] = gcm_shift_table[t<<1]; gcm->PC[x][y][1] ^= gcm_shift_table[(t<<1)+1]; - } - } + } + } #endif @@ -102,6 +100,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/gcm/gcm_memory.c --- a/libtomcrypt/src/encauth/gcm/gcm_memory.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/gcm/gcm_memory.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -22,8 +20,8 @@ @param cipher Index of cipher to use @param key The secret key @param keylen The length of the secret key - @param IV The initial vector - @param IVlen The length of the initial vector + @param IV The initialization vector + @param IVlen The length of the initialization vector @param adata The additional authentication data (header) @param adatalen The length of the adata @param pt The plaintext @@ -39,7 +37,7 @@ const unsigned char *IV, unsigned long IVlen, const unsigned char *adata, unsigned long adatalen, unsigned char *pt, unsigned long ptlen, - unsigned char *ct, + unsigned char *ct, unsigned char *tag, unsigned long *taglen, int direction) { @@ -50,10 +48,9 @@ if ((err = cipher_is_valid(cipher)) != CRYPT_OK) { return err; } - + if (cipher_descriptor[cipher].accel_gcm_memory != NULL) { - return - cipher_descriptor[cipher].accel_gcm_memory + return cipher_descriptor[cipher].accel_gcm_memory (key, keylen, IV, IVlen, adata, adatalen, @@ -104,6 +101,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/gcm/gcm_mult_h.c --- a/libtomcrypt/src/encauth/gcm/gcm_mult_h.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/gcm/gcm_mult_h.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -25,7 +23,7 @@ { unsigned char T[16]; #ifdef LTC_GCM_TABLES - int x, y; + int x; #ifdef LTC_GCM_TABLES_SSE2 asm("movdqa (%0),%%xmm0"::"r"(&gcm->PC[0][I[0]][0])); for (x = 1; x < 16; x++) { @@ -33,11 +31,12 @@ } asm("movdqa %%xmm0,(%0)"::"r"(&T)); #else + int y; XMEMCPY(T, &gcm->PC[0][I[0]][0], 16); for (x = 1; x < 16; x++) { #ifdef LTC_FAST for (y = 0; y < 16; y += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE *)(T + y)) ^= *((LTC_FAST_TYPE *)(&gcm->PC[x][I[x]][y])); + *(LTC_FAST_TYPE_PTR_CAST(T + y)) ^= *(LTC_FAST_TYPE_PTR_CAST(&gcm->PC[x][I[x]][y])); } #else for (y = 0; y < 16; y++) { @@ -46,13 +45,13 @@ #endif /* LTC_FAST */ } #endif /* LTC_GCM_TABLES_SSE2 */ -#else - gcm_gf_mult(gcm->H, I, T); +#else + gcm_gf_mult(gcm->H, I, T); #endif XMEMCPY(I, T, 16); } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/gcm/gcm_process.c --- a/libtomcrypt/src/encauth/gcm/gcm_process.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/gcm/gcm_process.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -17,9 +15,9 @@ #ifdef LTC_GCM_MODE -/** +/** Process plaintext/ciphertext through GCM - @param gcm The GCM state + @param gcm The GCM state @param pt The plaintext @param ptlen The plaintext length (ciphertext length is the same) @param ct The ciphertext @@ -44,11 +42,21 @@ if (gcm->buflen > 16 || gcm->buflen < 0) { return CRYPT_INVALID_ARG; } - + if ((err = cipher_is_valid(gcm->cipher)) != CRYPT_OK) { return err; } + /* 0xFFFFFFFE0 = ((2^39)-256)/8 */ + if (gcm->pttotlen / 8 + (ulong64)gcm->buflen + (ulong64)ptlen >= CONST64(0xFFFFFFFE0)) { + return CRYPT_INVALID_ARG; + } + + if (gcm->mode == LTC_GCM_MODE_IV) { + /* let's process the IV */ + if ((err = gcm_add_aad(gcm, NULL, 0)) != CRYPT_OK) return err; + } + /* in AAD mode? */ if (gcm->mode == LTC_GCM_MODE_AAD) { /* let's process the AAD */ @@ -77,12 +85,12 @@ x = 0; #ifdef LTC_FAST if (gcm->buflen == 0) { - if (direction == GCM_ENCRYPT) { + if (direction == GCM_ENCRYPT) { for (x = 0; x < (ptlen & ~15); x += 16) { /* ctr encrypt */ for (y = 0; y < 16; y += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)(&ct[x + y])) = *((LTC_FAST_TYPE*)(&pt[x+y])) ^ *((LTC_FAST_TYPE*)(&gcm->buf[y])); - *((LTC_FAST_TYPE*)(&gcm->X[y])) ^= *((LTC_FAST_TYPE*)(&ct[x+y])); + *(LTC_FAST_TYPE_PTR_CAST(&ct[x + y])) = *(LTC_FAST_TYPE_PTR_CAST(&pt[x+y])) ^ *(LTC_FAST_TYPE_PTR_CAST(&gcm->buf[y])); + *(LTC_FAST_TYPE_PTR_CAST(&gcm->X[y])) ^= *(LTC_FAST_TYPE_PTR_CAST(&ct[x+y])); } /* GMAC it */ gcm->pttotlen += 128; @@ -99,8 +107,8 @@ for (x = 0; x < (ptlen & ~15); x += 16) { /* ctr encrypt */ for (y = 0; y < 16; y += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)(&gcm->X[y])) ^= *((LTC_FAST_TYPE*)(&ct[x+y])); - *((LTC_FAST_TYPE*)(&pt[x + y])) = *((LTC_FAST_TYPE*)(&ct[x+y])) ^ *((LTC_FAST_TYPE*)(&gcm->buf[y])); + *(LTC_FAST_TYPE_PTR_CAST(&gcm->X[y])) ^= *(LTC_FAST_TYPE_PTR_CAST(&ct[x+y])); + *(LTC_FAST_TYPE_PTR_CAST(&pt[x + y])) = *(LTC_FAST_TYPE_PTR_CAST(&ct[x+y])) ^ *(LTC_FAST_TYPE_PTR_CAST(&gcm->buf[y])); } /* GMAC it */ gcm->pttotlen += 128; @@ -113,16 +121,16 @@ return err; } } - } + } } -#endif +#endif /* process text */ for (; x < ptlen; x++) { if (gcm->buflen == 16) { gcm->pttotlen += 128; gcm_mult_h(gcm, gcm->X); - + /* increment counter */ for (y = 15; y >= 12; y--) { if (++gcm->Y[y] & 255) { break; } @@ -134,12 +142,12 @@ } if (direction == GCM_ENCRYPT) { - b = ct[x] = pt[x] ^ gcm->buf[gcm->buflen]; + b = ct[x] = pt[x] ^ gcm->buf[gcm->buflen]; } else { b = ct[x]; pt[x] = ct[x] ^ gcm->buf[gcm->buflen]; } - gcm->X[gcm->buflen++] ^= b; + gcm->X[gcm->buflen++] ^= b; } return CRYPT_OK; @@ -147,6 +155,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/gcm/gcm_reset.c --- a/libtomcrypt/src/encauth/gcm/gcm_reset.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/gcm/gcm_reset.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -33,12 +31,12 @@ gcm->buflen = 0; gcm->totlen = 0; gcm->pttotlen = 0; - + return CRYPT_OK; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/gcm/gcm_test.c --- a/libtomcrypt/src/encauth/gcm/gcm_test.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/gcm/gcm_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -17,7 +15,7 @@ #ifdef LTC_GCM_MODE -/** +/** Test the GCM code @return CRYPT_OK on success */ @@ -100,18 +98,18 @@ /* test case #3 */ { /* key */ - { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, + { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, }, 16, /* PT */ - { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, - 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, - 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, - 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, - 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, - 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, - 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, + { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, + 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, + 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, + 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, + 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, + 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, + 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, 0xba, 0x63, 0x7b, 0x39, 0x1a, 0xaf, 0xd2, 0x55, }, 64, @@ -120,66 +118,66 @@ 0, /* IV */ - { 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad, + { 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad, 0xde, 0xca, 0xf8, 0x88, }, 12, - + /* CT */ - { 0x42, 0x83, 0x1e, 0xc2, 0x21, 0x77, 0x74, 0x24, - 0x4b, 0x72, 0x21, 0xb7, 0x84, 0xd0, 0xd4, 0x9c, - 0xe3, 0xaa, 0x21, 0x2f, 0x2c, 0x02, 0xa4, 0xe0, - 0x35, 0xc1, 0x7e, 0x23, 0x29, 0xac, 0xa1, 0x2e, - 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c, - 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05, - 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97, + { 0x42, 0x83, 0x1e, 0xc2, 0x21, 0x77, 0x74, 0x24, + 0x4b, 0x72, 0x21, 0xb7, 0x84, 0xd0, 0xd4, 0x9c, + 0xe3, 0xaa, 0x21, 0x2f, 0x2c, 0x02, 0xa4, 0xe0, + 0x35, 0xc1, 0x7e, 0x23, 0x29, 0xac, 0xa1, 0x2e, + 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c, + 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05, + 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97, 0x3d, 0x58, 0xe0, 0x91, 0x47, 0x3f, 0x59, 0x85, }, /* TAG */ - { 0x4d, 0x5c, 0x2a, 0xf3, 0x27, 0xcd, 0x64, 0xa6, + { 0x4d, 0x5c, 0x2a, 0xf3, 0x27, 0xcd, 0x64, 0xa6, 0x2c, 0xf3, 0x5a, 0xbd, 0x2b, 0xa6, 0xfa, 0xb4, } }, /* test case #4 */ { /* key */ - { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, + { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, }, 16, /* PT */ - { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, - 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, - 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, - 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, - 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, - 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, - 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, + { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, + 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, + 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, + 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, + 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, + 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, + 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, 0xba, 0x63, 0x7b, 0x39, }, 60, /* ADATA */ - { 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, - 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, + { 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, + 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, 0xab, 0xad, 0xda, 0xd2, }, 20, /* IV */ - { 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad, + { 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad, 0xde, 0xca, 0xf8, 0x88, }, 12, /* CT */ - { 0x42, 0x83, 0x1e, 0xc2, 0x21, 0x77, 0x74, 0x24, - 0x4b, 0x72, 0x21, 0xb7, 0x84, 0xd0, 0xd4, 0x9c, - 0xe3, 0xaa, 0x21, 0x2f, 0x2c, 0x02, 0xa4, 0xe0, - 0x35, 0xc1, 0x7e, 0x23, 0x29, 0xac, 0xa1, 0x2e, - 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c, - 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05, - 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97, + { 0x42, 0x83, 0x1e, 0xc2, 0x21, 0x77, 0x74, 0x24, + 0x4b, 0x72, 0x21, 0xb7, 0x84, 0xd0, 0xd4, 0x9c, + 0xe3, 0xaa, 0x21, 0x2f, 0x2c, 0x02, 0xa4, 0xe0, + 0x35, 0xc1, 0x7e, 0x23, 0x29, 0xac, 0xa1, 0x2e, + 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c, + 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05, + 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97, 0x3d, 0x58, 0xe0, 0x91, }, /* TAG */ - { 0x5b, 0xc9, 0x4f, 0xbc, 0x32, 0x21, 0xa5, 0xdb, + { 0x5b, 0xc9, 0x4f, 0xbc, 0x32, 0x21, 0xa5, 0xdb, 0x94, 0xfa, 0xe9, 0x5a, 0xe7, 0x12, 0x1a, 0x47, } }, @@ -187,24 +185,24 @@ /* test case #5 */ { /* key */ - { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, + { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, }, 16, /* PT */ - { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, - 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, - 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, - 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, - 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, - 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, - 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, + { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, + 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, + 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, + 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, + 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, + 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, + 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, 0xba, 0x63, 0x7b, 0x39, }, 60, /* ADATA */ - { 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, - 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, + { 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, + 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, 0xab, 0xad, 0xda, 0xd2, }, 20, @@ -213,112 +211,112 @@ 8, /* CT */ - { 0x61, 0x35, 0x3b, 0x4c, 0x28, 0x06, 0x93, 0x4a, - 0x77, 0x7f, 0xf5, 0x1f, 0xa2, 0x2a, 0x47, 0x55, - 0x69, 0x9b, 0x2a, 0x71, 0x4f, 0xcd, 0xc6, 0xf8, - 0x37, 0x66, 0xe5, 0xf9, 0x7b, 0x6c, 0x74, 0x23, - 0x73, 0x80, 0x69, 0x00, 0xe4, 0x9f, 0x24, 0xb2, - 0x2b, 0x09, 0x75, 0x44, 0xd4, 0x89, 0x6b, 0x42, - 0x49, 0x89, 0xb5, 0xe1, 0xeb, 0xac, 0x0f, 0x07, + { 0x61, 0x35, 0x3b, 0x4c, 0x28, 0x06, 0x93, 0x4a, + 0x77, 0x7f, 0xf5, 0x1f, 0xa2, 0x2a, 0x47, 0x55, + 0x69, 0x9b, 0x2a, 0x71, 0x4f, 0xcd, 0xc6, 0xf8, + 0x37, 0x66, 0xe5, 0xf9, 0x7b, 0x6c, 0x74, 0x23, + 0x73, 0x80, 0x69, 0x00, 0xe4, 0x9f, 0x24, 0xb2, + 0x2b, 0x09, 0x75, 0x44, 0xd4, 0x89, 0x6b, 0x42, + 0x49, 0x89, 0xb5, 0xe1, 0xeb, 0xac, 0x0f, 0x07, 0xc2, 0x3f, 0x45, 0x98, }, /* TAG */ - { 0x36, 0x12, 0xd2, 0xe7, 0x9e, 0x3b, 0x07, 0x85, + { 0x36, 0x12, 0xd2, 0xe7, 0x9e, 0x3b, 0x07, 0x85, 0x56, 0x1b, 0xe1, 0x4a, 0xac, 0xa2, 0xfc, 0xcb, } }, /* test case #6 */ { /* key */ - { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, + { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, }, 16, /* PT */ - { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, - 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, - 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, - 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, - 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, - 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, - 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, + { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, + 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, + 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, + 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, + 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, + 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, + 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, 0xba, 0x63, 0x7b, 0x39, }, 60, /* ADATA */ - { 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, - 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, + { 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, + 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, 0xab, 0xad, 0xda, 0xd2, }, 20, /* IV */ - { 0x93, 0x13, 0x22, 0x5d, 0xf8, 0x84, 0x06, 0xe5, - 0x55, 0x90, 0x9c, 0x5a, 0xff, 0x52, 0x69, 0xaa, - 0x6a, 0x7a, 0x95, 0x38, 0x53, 0x4f, 0x7d, 0xa1, - 0xe4, 0xc3, 0x03, 0xd2, 0xa3, 0x18, 0xa7, 0x28, - 0xc3, 0xc0, 0xc9, 0x51, 0x56, 0x80, 0x95, 0x39, - 0xfc, 0xf0, 0xe2, 0x42, 0x9a, 0x6b, 0x52, 0x54, - 0x16, 0xae, 0xdb, 0xf5, 0xa0, 0xde, 0x6a, 0x57, + { 0x93, 0x13, 0x22, 0x5d, 0xf8, 0x84, 0x06, 0xe5, + 0x55, 0x90, 0x9c, 0x5a, 0xff, 0x52, 0x69, 0xaa, + 0x6a, 0x7a, 0x95, 0x38, 0x53, 0x4f, 0x7d, 0xa1, + 0xe4, 0xc3, 0x03, 0xd2, 0xa3, 0x18, 0xa7, 0x28, + 0xc3, 0xc0, 0xc9, 0x51, 0x56, 0x80, 0x95, 0x39, + 0xfc, 0xf0, 0xe2, 0x42, 0x9a, 0x6b, 0x52, 0x54, + 0x16, 0xae, 0xdb, 0xf5, 0xa0, 0xde, 0x6a, 0x57, 0xa6, 0x37, 0xb3, 0x9b, }, 60, /* CT */ - { 0x8c, 0xe2, 0x49, 0x98, 0x62, 0x56, 0x15, 0xb6, - 0x03, 0xa0, 0x33, 0xac, 0xa1, 0x3f, 0xb8, 0x94, - 0xbe, 0x91, 0x12, 0xa5, 0xc3, 0xa2, 0x11, 0xa8, - 0xba, 0x26, 0x2a, 0x3c, 0xca, 0x7e, 0x2c, 0xa7, - 0x01, 0xe4, 0xa9, 0xa4, 0xfb, 0xa4, 0x3c, 0x90, - 0xcc, 0xdc, 0xb2, 0x81, 0xd4, 0x8c, 0x7c, 0x6f, - 0xd6, 0x28, 0x75, 0xd2, 0xac, 0xa4, 0x17, 0x03, + { 0x8c, 0xe2, 0x49, 0x98, 0x62, 0x56, 0x15, 0xb6, + 0x03, 0xa0, 0x33, 0xac, 0xa1, 0x3f, 0xb8, 0x94, + 0xbe, 0x91, 0x12, 0xa5, 0xc3, 0xa2, 0x11, 0xa8, + 0xba, 0x26, 0x2a, 0x3c, 0xca, 0x7e, 0x2c, 0xa7, + 0x01, 0xe4, 0xa9, 0xa4, 0xfb, 0xa4, 0x3c, 0x90, + 0xcc, 0xdc, 0xb2, 0x81, 0xd4, 0x8c, 0x7c, 0x6f, + 0xd6, 0x28, 0x75, 0xd2, 0xac, 0xa4, 0x17, 0x03, 0x4c, 0x34, 0xae, 0xe5, }, /* TAG */ - { 0x61, 0x9c, 0xc5, 0xae, 0xff, 0xfe, 0x0b, 0xfa, + { 0x61, 0x9c, 0xc5, 0xae, 0xff, 0xfe, 0x0b, 0xfa, 0x46, 0x2a, 0xf4, 0x3c, 0x16, 0x99, 0xd0, 0x50, } }, /* test case #46 from BG (catches the LTC bug of v1.15) */ { /* key */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 16, /* PT */ - { 0xa2, 0xaa, 0xb3, 0xad, 0x8b, 0x17, 0xac, 0xdd, - 0xa2, 0x88, 0x42, 0x6c, 0xd7, 0xc4, 0x29, 0xb7, - 0xca, 0x86, 0xb7, 0xac, 0xa0, 0x58, 0x09, 0xc7, + { 0xa2, 0xaa, 0xb3, 0xad, 0x8b, 0x17, 0xac, 0xdd, + 0xa2, 0x88, 0x42, 0x6c, 0xd7, 0xc4, 0x29, 0xb7, + 0xca, 0x86, 0xb7, 0xac, 0xa0, 0x58, 0x09, 0xc7, 0x0c, 0xe8, 0x2d, 0xb2, 0x57, 0x11, 0xcb, 0x53, - 0x02, 0xeb, 0x27, 0x43, 0xb0, 0x36, 0xf3, 0xd7, - 0x50, 0xd6, 0xcf, 0x0d, 0xc0, 0xac, 0xb9, 0x29, - 0x50, 0xd5, 0x46, 0xdb, 0x30, 0x8f, 0x93, 0xb4, + 0x02, 0xeb, 0x27, 0x43, 0xb0, 0x36, 0xf3, 0xd7, + 0x50, 0xd6, 0xcf, 0x0d, 0xc0, 0xac, 0xb9, 0x29, + 0x50, 0xd5, 0x46, 0xdb, 0x30, 0x8f, 0x93, 0xb4, 0xff, 0x24, 0x4a, 0xfa, 0x9d, 0xc7, 0x2b, 0xcd, 0x75, 0x8d, 0x2c }, 67, /* ADATA */ - { 0x68, 0x8e, 0x1a, 0xa9, 0x84, 0xde, 0x92, 0x6d, + { 0x68, 0x8e, 0x1a, 0xa9, 0x84, 0xde, 0x92, 0x6d, 0xc7, 0xb4, 0xc4, 0x7f, 0x44 }, - 13, + 13, /* IV */ - { 0xb7, 0x21, 0x38, 0xb5, 0xa0, 0x5f, 0xf5, 0x07, + { 0xb7, 0x21, 0x38, 0xb5, 0xa0, 0x5f, 0xf5, 0x07, 0x0e, 0x8c, 0xd9, 0x41, 0x83, 0xf7, 0x61, 0xd8 }, 16, /* CT */ - { 0xcb, 0xc8, 0xd2, 0xf1, 0x54, 0x81, 0xa4, 0xcc, - 0x7d, 0xd1, 0xe1, 0x9a, 0xaa, 0x83, 0xde, 0x56, - 0x78, 0x48, 0x3e, 0xc3, 0x59, 0xae, 0x7d, 0xec, + { 0xcb, 0xc8, 0xd2, 0xf1, 0x54, 0x81, 0xa4, 0xcc, + 0x7d, 0xd1, 0xe1, 0x9a, 0xaa, 0x83, 0xde, 0x56, + 0x78, 0x48, 0x3e, 0xc3, 0x59, 0xae, 0x7d, 0xec, 0x2a, 0xb8, 0xd5, 0x34, 0xe0, 0x90, 0x6f, 0x4b, - 0x46, 0x63, 0xfa, 0xff, 0x58, 0xa8, 0xb2, 0xd7, - 0x33, 0xb8, 0x45, 0xee, 0xf7, 0xc9, 0xb3, 0x31, - 0xe9, 0xe1, 0x0e, 0xb2, 0x61, 0x2c, 0x99, 0x5f, + 0x46, 0x63, 0xfa, 0xff, 0x58, 0xa8, 0xb2, 0xd7, + 0x33, 0xb8, 0x45, 0xee, 0xf7, 0xc9, 0xb3, 0x31, + 0xe9, 0xe1, 0x0e, 0xb2, 0x61, 0x2c, 0x99, 0x5f, 0xeb, 0x1a, 0xc1, 0x5a, 0x62, 0x86, 0xcc, 0xe8, 0xb2, 0x97, 0xa8 }, /* TAG */ - { 0x8d, 0x2d, 0x2a, 0x93, 0x72, 0x62, 0x6f, 0x6b, + { 0x8d, 0x2d, 0x2a, 0x93, 0x72, 0x62, 0x6f, 0x6b, 0xee, 0x85, 0x80, 0x27, 0x6a, 0x63, 0x66, 0xbf } } @@ -327,6 +325,7 @@ int idx, err; unsigned long x, y; unsigned char out[2][128], T[2][16]; + gcm_state gcm; /* find aes */ idx = find_cipher("aes"); @@ -337,6 +336,14 @@ } } + /* Special test case for empty AAD + empty PT */ + y = sizeof(T[0]); + if ((err = gcm_init(&gcm, idx, tests[0].K, tests[0].keylen)) != CRYPT_OK) return err; + if ((err = gcm_add_iv(&gcm, tests[0].IV, tests[0].IVlen)) != CRYPT_OK) return err; + /* intentionally skip gcm_add_aad + gcm_process */ + if ((err = gcm_done(&gcm, T[0], &y)) != CRYPT_OK) return err; + if (compare_testvector(T[0], y, tests[0].T, 16, "GCM Encrypt Tag-special", 0)) return CRYPT_FAIL_TESTVECTOR; + for (x = 0; x < (int)(sizeof(tests)/sizeof(tests[0])); x++) { y = sizeof(T[0]); if ((err = gcm_memory(idx, tests[x].K, tests[x].keylen, @@ -347,25 +354,11 @@ return err; } - if (XMEMCMP(out[0], tests[x].C, tests[x].ptlen)) { -#if 0 - printf("\nCiphertext wrong %lu\n", x); - for (y = 0; y < tests[x].ptlen; y++) { - printf("%02x", out[0][y] & 255); - } - printf("\n"); -#endif + if (compare_testvector(out[0], tests[x].ptlen, tests[x].C, tests[x].ptlen, "GCM CT", x)) { return CRYPT_FAIL_TESTVECTOR; } - if (XMEMCMP(T[0], tests[x].T, 16)) { -#if 0 - printf("\nTag on plaintext wrong %lu\n", x); - for (y = 0; y < 16; y++) { - printf("%02x", T[0][y] & 255); - } - printf("\n"); -#endif + if (compare_testvector(T[0], y, tests[x].T, 16, "GCM Encrypt Tag", x)) { return CRYPT_FAIL_TESTVECTOR; } @@ -378,25 +371,11 @@ return err; } - if (XMEMCMP(out[1], tests[x].P, tests[x].ptlen)) { -#if 0 - printf("\nplaintext wrong %lu\n", x); - for (y = 0; y < tests[x].ptlen; y++) { - printf("%02x", out[0][y] & 255); - } - printf("\n"); -#endif + if (compare_testvector(out[1], tests[x].ptlen, tests[x].P, tests[x].ptlen, "GCM PT", x)) { return CRYPT_FAIL_TESTVECTOR; } - if (XMEMCMP(T[1], tests[x].T, 16)) { -#if 0 - printf("\nTag on ciphertext wrong %lu\n", x); - for (y = 0; y < 16; y++) { - printf("%02x", T[1][y] & 255); - } - printf("\n"); -#endif + if (compare_testvector(T[1], y, tests[x].T, 16, "GCM Decrypt Tag", x)) { return CRYPT_FAIL_TESTVECTOR; } @@ -408,6 +387,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb/ocb_decrypt.c --- a/libtomcrypt/src/encauth/ocb/ocb_decrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/ocb/ocb_decrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,13 +5,11 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @file ocb_decrypt.c - OCB implementation, decrypt data, by Tom St Denis + OCB implementation, decrypt data, by Tom St Denis */ #include "tomcrypt.h" @@ -38,7 +36,7 @@ return err; } LTC_ARGCHK(cipher_descriptor[ocb->cipher].ecb_decrypt != NULL); - + /* check length */ if (ocb->block_len != cipher_descriptor[ocb->cipher].block_length) { return CRYPT_INVALID_ARG; @@ -74,6 +72,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb/ocb_decrypt_verify_memory.c --- a/libtomcrypt/src/encauth/ocb/ocb_decrypt_verify_memory.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/ocb/ocb_decrypt_verify_memory.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,13 +5,11 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/** +/** @file ocb_decrypt_verify_memory.c - OCB implementation, helper to decrypt block of memory, by Tom St Denis + OCB implementation, helper to decrypt block of memory, by Tom St Denis */ #include "tomcrypt.h" @@ -33,7 +31,7 @@ */ int ocb_decrypt_verify_memory(int cipher, const unsigned char *key, unsigned long keylen, - const unsigned char *nonce, + const unsigned char *nonce, const unsigned char *ct, unsigned long ctlen, unsigned char *pt, const unsigned char *tag, unsigned long taglen, @@ -56,12 +54,12 @@ } if ((err = ocb_init(ocb, cipher, key, keylen, nonce)) != CRYPT_OK) { - goto LBL_ERR; + goto LBL_ERR; } while (ctlen > (unsigned long)ocb->block_len) { if ((err = ocb_decrypt(ocb, ct, pt)) != CRYPT_OK) { - goto LBL_ERR; + goto LBL_ERR; } ctlen -= ocb->block_len; pt += ocb->block_len; @@ -73,7 +71,7 @@ #ifdef LTC_CLEAN_STACK zeromem(ocb, sizeof(ocb_state)); #endif - + XFREE(ocb); return err; @@ -81,6 +79,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb/ocb_done_decrypt.c --- a/libtomcrypt/src/encauth/ocb/ocb_done_decrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/ocb/ocb_done_decrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,11 +5,9 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/** +/** @file ocb_done_decrypt.c OCB implementation, terminate decryption, by Tom St Denis */ @@ -28,9 +26,9 @@ @param stat [out] The result of the tag comparison @return CRYPT_OK if the process was successful regardless if the tag is valid */ -int ocb_done_decrypt(ocb_state *ocb, +int ocb_done_decrypt(ocb_state *ocb, const unsigned char *ct, unsigned long ctlen, - unsigned char *pt, + unsigned char *pt, const unsigned char *tag, unsigned long taglen, int *stat) { int err; @@ -57,7 +55,7 @@ goto LBL_ERR; } - if (taglen <= tagbuflen && XMEMCMP(tagbuf, tag, taglen) == 0) { + if (taglen <= tagbuflen && XMEM_NEQ(tagbuf, tag, taglen) == 0) { *stat = 1; } @@ -75,6 +73,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb/ocb_done_encrypt.c --- a/libtomcrypt/src/encauth/ocb/ocb_done_encrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/ocb/ocb_done_encrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,11 +5,9 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/** +/** @file ocb_done_encrypt.c OCB implementation, terminate encryption, by Tom St Denis */ @@ -17,7 +15,7 @@ #ifdef LTC_OCB_MODE -/** +/** Terminate an encryption OCB state @param ocb The OCB state @param pt Remaining plaintext (if any) @@ -41,6 +39,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb/ocb_encrypt.c --- a/libtomcrypt/src/encauth/ocb/ocb_encrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/ocb/ocb_encrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,11 +5,9 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/** +/** @file ocb_encrypt.c OCB implementation, encrypt data, by Tom St Denis */ @@ -67,6 +65,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb/ocb_encrypt_authenticate_memory.c --- a/libtomcrypt/src/encauth/ocb/ocb_encrypt_authenticate_memory.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/ocb/ocb_encrypt_authenticate_memory.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,11 +5,9 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/** +/** @file ocb_encrypt_authenticate_memory.c OCB implementation, encrypt block of memory, by Tom St Denis */ @@ -32,7 +30,7 @@ */ int ocb_encrypt_authenticate_memory(int cipher, const unsigned char *key, unsigned long keylen, - const unsigned char *nonce, + const unsigned char *nonce, const unsigned char *pt, unsigned long ptlen, unsigned char *ct, unsigned char *tag, unsigned long *taglen) @@ -79,6 +77,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb/ocb_init.c --- a/libtomcrypt/src/encauth/ocb/ocb_init.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/ocb/ocb_init.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -19,7 +17,7 @@ static const struct { int len; - unsigned char poly_div[MAXBLOCKSIZE], + unsigned char poly_div[MAXBLOCKSIZE], poly_mul[MAXBLOCKSIZE]; } polys[] = { { @@ -27,7 +25,7 @@ { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D }, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B } }, { - 16, + 16, { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43 }, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -44,7 +42,7 @@ @param nonce The session nonce (length of the block size of the cipher) @return CRYPT_OK if successful */ -int ocb_init(ocb_state *ocb, int cipher, +int ocb_init(ocb_state *ocb, int cipher, const unsigned char *key, unsigned long keylen, const unsigned char *nonce) { int poly, x, y, m, err; @@ -60,20 +58,24 @@ /* determine which polys to use */ ocb->block_len = cipher_descriptor[cipher].block_length; - for (poly = 0; poly < (int)(sizeof(polys)/sizeof(polys[0])); poly++) { - if (polys[poly].len == ocb->block_len) { + x = (int)(sizeof(polys)/sizeof(polys[0])); + for (poly = 0; poly < x; poly++) { + if (polys[poly].len == ocb->block_len) { break; } } + if (poly == x) { + return CRYPT_INVALID_ARG; /* block_len not found in polys */ + } if (polys[poly].len != ocb->block_len) { return CRYPT_INVALID_ARG; - } + } /* schedule the key */ if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, &ocb->key)) != CRYPT_OK) { return err; } - + /* find L = E[0] */ zeromem(ocb->L, ocb->block_len); if ((err = cipher_descriptor[cipher].ecb_encrypt(ocb->L, ocb->L, &ocb->key)) != CRYPT_OK) { @@ -102,36 +104,36 @@ ocb->Ls[x][y] ^= polys[poly].poly_mul[y]; } } - } + } - /* find Lr = L / x */ - m = ocb->L[ocb->block_len-1] & 1; + /* find Lr = L / x */ + m = ocb->L[ocb->block_len-1] & 1; - /* shift right */ - for (x = ocb->block_len - 1; x > 0; x--) { - ocb->Lr[x] = ((ocb->L[x] >> 1) | (ocb->L[x-1] << 7)) & 255; - } - ocb->Lr[0] = ocb->L[0] >> 1; + /* shift right */ + for (x = ocb->block_len - 1; x > 0; x--) { + ocb->Lr[x] = ((ocb->L[x] >> 1) | (ocb->L[x-1] << 7)) & 255; + } + ocb->Lr[0] = ocb->L[0] >> 1; - if (m == 1) { - for (x = 0; x < ocb->block_len; x++) { - ocb->Lr[x] ^= polys[poly].poly_div[x]; - } - } + if (m == 1) { + for (x = 0; x < ocb->block_len; x++) { + ocb->Lr[x] ^= polys[poly].poly_div[x]; + } + } - /* set Li, checksum */ - zeromem(ocb->Li, ocb->block_len); - zeromem(ocb->checksum, ocb->block_len); + /* set Li, checksum */ + zeromem(ocb->Li, ocb->block_len); + zeromem(ocb->checksum, ocb->block_len); - /* set other params */ - ocb->block_index = 1; - ocb->cipher = cipher; + /* set other params */ + ocb->block_index = 1; + ocb->cipher = cipher; - return CRYPT_OK; + return CRYPT_OK; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb/ocb_ntz.c --- a/libtomcrypt/src/encauth/ocb/ocb_ntz.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/ocb/ocb_ntz.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -37,6 +35,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb/ocb_shift_xor.c --- a/libtomcrypt/src/encauth/ocb/ocb_shift_xor.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/ocb/ocb_shift_xor.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,11 +5,9 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/** +/** @file ocb_shift_xor.c OCB implementation, internal function, by Tom St Denis */ @@ -19,7 +17,7 @@ /** Compute the shift/xor for OCB (internal function) - @param ocb The OCB state + @param ocb The OCB state @param Z The destination of the shift */ void ocb_shift_xor(ocb_state *ocb, unsigned char *Z) @@ -34,6 +32,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb/ocb_test.c --- a/libtomcrypt/src/encauth/ocb/ocb_test.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/ocb/ocb_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,11 +5,9 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/** +/** @file ocb_test.c OCB implementation, self-test by Tom St Denis */ @@ -17,7 +15,7 @@ #ifdef LTC_OCB_MODE -/** +/** Test the OCB protocol @return CRYPT_OK if successful */ @@ -52,7 +50,7 @@ /* OCB-AES-128-3B */ { - 3, + 3, /* key */ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, @@ -70,7 +68,7 @@ /* OCB-AES-128-16B */ { - 16, + 16, /* key */ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, @@ -90,7 +88,7 @@ /* OCB-AES-128-20B */ { - 20, + 20, /* key */ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, @@ -99,7 +97,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, /* pt */ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13 }, /* ct */ { 0x01, 0xa0, 0x75, 0xf0, 0xd8, 0x15, 0xb1, 0xa4, @@ -112,7 +110,7 @@ /* OCB-AES-128-32B */ { - 32, + 32, /* key */ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, @@ -121,7 +119,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, /* pt */ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, /* ct */ @@ -137,7 +135,7 @@ /* OCB-AES-128-34B */ { - 34, + 34, /* key */ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, @@ -146,7 +144,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, /* pt */ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21 }, @@ -168,7 +166,7 @@ unsigned long len; unsigned char outct[MAXBLOCKSIZE], outtag[MAXBLOCKSIZE]; - /* AES can be under rijndael or aes... try to find it */ + /* AES can be under rijndael or aes... try to find it */ if ((idx = find_cipher("aes")) == -1) { if ((idx = find_cipher("rijndael")) == -1) { return CRYPT_NOP; @@ -181,41 +179,21 @@ tests[x].nonce, tests[x].pt, tests[x].ptlen, outct, outtag, &len)) != CRYPT_OK) { return err; } - - if (XMEMCMP(outtag, tests[x].tag, len) || XMEMCMP(outct, tests[x].ct, tests[x].ptlen)) { -#if 0 - unsigned long y; - printf("\n\nFailure: \nCT:\n"); - for (y = 0; y < (unsigned long)tests[x].ptlen; ) { - printf("0x%02x", outct[y]); - if (y < (unsigned long)(tests[x].ptlen-1)) printf(", "); - if (!(++y % 8)) printf("\n"); - } - printf("\nTAG:\n"); - for (y = 0; y < len; ) { - printf("0x%02x", outtag[y]); - if (y < len-1) printf(", "); - if (!(++y % 8)) printf("\n"); - } -#endif + + if (compare_testvector(outtag, len, tests[x].tag, sizeof(tests[x].tag), "OCB Tag", x) || + compare_testvector(outct, tests[x].ptlen, tests[x].ct, tests[x].ptlen, "OCB CT", x)) { return CRYPT_FAIL_TESTVECTOR; } - + if ((err = ocb_decrypt_verify_memory(idx, tests[x].key, 16, tests[x].nonce, outct, tests[x].ptlen, outct, tests[x].tag, len, &res)) != CRYPT_OK) { return err; } - if ((res != 1) || XMEMCMP(tests[x].pt, outct, tests[x].ptlen)) { -#if 0 - unsigned long y; - printf("\n\nFailure-decrypt: \nPT:\n"); - for (y = 0; y < (unsigned long)tests[x].ptlen; ) { - printf("0x%02x", outct[y]); - if (y < (unsigned long)(tests[x].ptlen-1)) printf(", "); - if (!(++y % 8)) printf("\n"); - } - printf("\nres = %d\n\n", res); + if ((res != 1) || compare_testvector(outct, tests[x].ptlen, tests[x].pt, tests[x].ptlen, "OCB", x)) { +#ifdef LTC_TEST_DBG + printf("\n\nOCB: Failure-decrypt - res = %d\n", res); #endif + return CRYPT_FAIL_TESTVECTOR; } } return CRYPT_OK; @@ -232,6 +210,6 @@ -- The setup is somewhat complicated... */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb/s_ocb_done.c --- a/libtomcrypt/src/encauth/ocb/s_ocb_done.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/encauth/ocb/s_ocb_done.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,11 +5,9 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/** +/** @file s_ocb_done.c OCB implementation, internal helper, by Tom St Denis */ @@ -22,7 +20,7 @@ * is we XOR the final ciphertext into the checksum so we have to xor it * before we CTR [decrypt] or after [encrypt] * - * the names pt/ptlen/ct really just mean in/inlen/out but this is the way I wrote it... + * the names pt/ptlen/ct really just mean in/inlen/out but this is the way I wrote it... */ /** @@ -74,13 +72,13 @@ } /* compute X[m] = len(pt[m]) XOR Lr XOR Z[m] */ - ocb_shift_xor(ocb, X); + ocb_shift_xor(ocb, X); XMEMCPY(Z, X, ocb->block_len); X[ocb->block_len-1] ^= (ptlen*8)&255; X[ocb->block_len-2] ^= ((ptlen*8)>>8)&255; for (x = 0; x < ocb->block_len; x++) { - X[x] ^= ocb->Lr[x]; + X[x] ^= ocb->Lr[x]; } /* Y[m] = E(X[m])) */ @@ -93,7 +91,7 @@ /* xor C[m] into checksum */ for (x = 0; x < (int)ptlen; x++) { ocb->checksum[x] ^= ct[x]; - } + } } /* C[m] = P[m] xor Y[m] */ @@ -102,7 +100,7 @@ } if (mode == 0) { - /* encrypt mode */ + /* encrypt mode */ /* xor C[m] into checksum */ for (x = 0; x < (int)ptlen; x++) { ocb->checksum[x] ^= ct[x]; @@ -113,7 +111,7 @@ for (x = 0; x < ocb->block_len; x++) { ocb->checksum[x] ^= Y[x] ^ Z[x]; } - + /* encrypt checksum, er... tag!! */ if ((err = cipher_descriptor[ocb->cipher].ecb_encrypt(ocb->checksum, X, &ocb->key)) != CRYPT_OK) { goto error; @@ -132,7 +130,7 @@ zeromem(Z, MAXBLOCKSIZE); zeromem(ocb, sizeof(*ocb)); #endif -error: +error: XFREE(X); XFREE(Y); XFREE(Z); @@ -143,6 +141,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb3/ocb3_add_aad.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/ocb3/ocb3_add_aad.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,106 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/** + @file ocb3_add_aad.c + OCB implementation, add AAD data, by Karel Miko +*/ +#include "tomcrypt.h" + +#ifdef LTC_OCB3_MODE + +/** + Add one block of AAD data (internal function) + @param ocb The OCB state + @param aad_block [in] AAD data (block_len size) + @return CRYPT_OK if successful +*/ +static int _ocb3_int_aad_add_block(ocb3_state *ocb, const unsigned char *aad_block) +{ + unsigned char tmp[MAXBLOCKSIZE]; + int err; + + /* Offset_i = Offset_{i-1} xor L_{ntz(i)} */ + ocb3_int_xor_blocks(ocb->aOffset_current, ocb->aOffset_current, ocb->L_[ocb3_int_ntz(ocb->ablock_index)], ocb->block_len); + + /* Sum_i = Sum_{i-1} xor ENCIPHER(K, A_i xor Offset_i) */ + ocb3_int_xor_blocks(tmp, aad_block, ocb->aOffset_current, ocb->block_len); + if ((err = cipher_descriptor[ocb->cipher].ecb_encrypt(tmp, tmp, &ocb->key)) != CRYPT_OK) { + return err; + } + ocb3_int_xor_blocks(ocb->aSum_current, ocb->aSum_current, tmp, ocb->block_len); + + ocb->ablock_index++; + + return CRYPT_OK; +} + +/** + Add AAD - additional associated data + @param ocb The OCB state + @param aad The AAD data + @param aadlen The size of AAD data (octets) + @return CRYPT_OK if successful +*/ +int ocb3_add_aad(ocb3_state *ocb, const unsigned char *aad, unsigned long aadlen) +{ + int err, x, full_blocks, full_blocks_len, last_block_len; + unsigned char *data; + unsigned long datalen, l; + + LTC_ARGCHK(ocb != NULL); + if (aadlen == 0) return CRYPT_OK; + LTC_ARGCHK(aad != NULL); + + if (ocb->adata_buffer_bytes > 0) { + l = ocb->block_len - ocb->adata_buffer_bytes; + if (l > aadlen) l = aadlen; + XMEMCPY(ocb->adata_buffer+ocb->adata_buffer_bytes, aad, l); + ocb->adata_buffer_bytes += l; + + if (ocb->adata_buffer_bytes == ocb->block_len) { + if ((err = _ocb3_int_aad_add_block(ocb, ocb->adata_buffer)) != CRYPT_OK) { + return err; + } + ocb->adata_buffer_bytes = 0; + } + + data = (unsigned char *)aad + l; + datalen = aadlen - l; + } + else { + data = (unsigned char *)aad; + datalen = aadlen; + } + + if (datalen == 0) return CRYPT_OK; + + full_blocks = datalen/ocb->block_len; + full_blocks_len = full_blocks * ocb->block_len; + last_block_len = datalen - full_blocks_len; + + for (x=0; xblock_len)) != CRYPT_OK) { + return err; + } + } + + if (last_block_len>0) { + XMEMCPY(ocb->adata_buffer, data+full_blocks_len, last_block_len); + ocb->adata_buffer_bytes = last_block_len; + } + + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb3/ocb3_decrypt.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/ocb3/ocb3_decrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,86 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/** + @file ocb3_decrypt.c + OCB implementation, decrypt data, by Tom St Denis +*/ +#include "tomcrypt.h" + +#ifdef LTC_OCB3_MODE + +/** + Decrypt blocks of ciphertext with OCB + @param ocb The OCB state + @param ct The ciphertext (length multiple of the block size of the block cipher) + @param ctlen The length of the input (octets) + @param pt [out] The plaintext (length of ct) + @return CRYPT_OK if successful +*/ +int ocb3_decrypt(ocb3_state *ocb, const unsigned char *ct, unsigned long ctlen, unsigned char *pt) +{ + unsigned char tmp[MAXBLOCKSIZE]; + int err, i, full_blocks; + unsigned char *pt_b, *ct_b; + + LTC_ARGCHK(ocb != NULL); + if (ctlen == 0) return CRYPT_OK; /* no data, nothing to do */ + LTC_ARGCHK(ct != NULL); + LTC_ARGCHK(pt != NULL); + + if ((err = cipher_is_valid(ocb->cipher)) != CRYPT_OK) { + return err; + } + if (ocb->block_len != cipher_descriptor[ocb->cipher].block_length) { + return CRYPT_INVALID_ARG; + } + + if (ctlen % ocb->block_len) { /* ctlen has to bu multiple of block_len */ + return CRYPT_INVALID_ARG; + } + + full_blocks = ctlen/ocb->block_len; + for(i=0; iblock_len; + ct_b = (unsigned char *)ct+i*ocb->block_len; + + /* ocb->Offset_current[] = ocb->Offset_current[] ^ Offset_{ntz(block_index)} */ + ocb3_int_xor_blocks(ocb->Offset_current, ocb->Offset_current, ocb->L_[ocb3_int_ntz(ocb->block_index)], ocb->block_len); + + /* tmp[] = ct[] XOR ocb->Offset_current[] */ + ocb3_int_xor_blocks(tmp, ct_b, ocb->Offset_current, ocb->block_len); + + /* decrypt */ + if ((err = cipher_descriptor[ocb->cipher].ecb_decrypt(tmp, tmp, &ocb->key)) != CRYPT_OK) { + goto LBL_ERR; + } + + /* pt[] = tmp[] XOR ocb->Offset_current[] */ + ocb3_int_xor_blocks(pt_b, tmp, ocb->Offset_current, ocb->block_len); + + /* ocb->checksum[] = ocb->checksum[] XOR pt[] */ + ocb3_int_xor_blocks(ocb->checksum, ocb->checksum, pt_b, ocb->block_len); + + ocb->block_index++; + } + + err = CRYPT_OK; + +LBL_ERR: +#ifdef LTC_CLEAN_STACK + zeromem(tmp, sizeof(tmp)); +#endif + return err; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb3/ocb3_decrypt_last.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/ocb3/ocb3_decrypt_last.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,110 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/** + @file ocb3_decrypt_last.c + OCB implementation, internal helper, by Karel Miko +*/ +#include "tomcrypt.h" + +#ifdef LTC_OCB3_MODE + +/** + Finish an OCB (decryption) stream + @param ocb The OCB state + @param ct The remaining ciphertext + @param ctlen The length of the ciphertext (octets) + @param pt [out] The output buffer + @return CRYPT_OK if successful +*/ +int ocb3_decrypt_last(ocb3_state *ocb, const unsigned char *ct, unsigned long ctlen, unsigned char *pt) +{ + unsigned char iOffset_star[MAXBLOCKSIZE]; + unsigned char iPad[MAXBLOCKSIZE]; + int err, x, full_blocks, full_blocks_len, last_block_len; + + LTC_ARGCHK(ocb != NULL); + if (ct == NULL) LTC_ARGCHK(ctlen == 0); + if (ctlen != 0) { + LTC_ARGCHK(ct != NULL); + LTC_ARGCHK(pt != NULL); + } + + if ((err = cipher_is_valid(ocb->cipher)) != CRYPT_OK) { + goto LBL_ERR; + } + + full_blocks = ctlen/ocb->block_len; + full_blocks_len = full_blocks * ocb->block_len; + last_block_len = ctlen - full_blocks_len; + + /* process full blocks first */ + if (full_blocks>0) { + if ((err = ocb3_decrypt(ocb, ct, full_blocks_len, pt)) != CRYPT_OK) { + goto LBL_ERR; + } + } + + if (last_block_len>0) { + /* Offset_* = Offset_m xor L_* */ + ocb3_int_xor_blocks(iOffset_star, ocb->Offset_current, ocb->L_star, ocb->block_len); + + /* Pad = ENCIPHER(K, Offset_*) */ + if ((err = cipher_descriptor[ocb->cipher].ecb_encrypt(iOffset_star, iPad, &ocb->key)) != CRYPT_OK) { + goto LBL_ERR; + } + + /* P_* = C_* xor Pad[1..bitlen(C_*)] */ + ocb3_int_xor_blocks(pt+full_blocks_len, (unsigned char *)ct+full_blocks_len, iPad, last_block_len); + + /* Checksum_* = Checksum_m xor (P_* || 1 || zeros(127-bitlen(P_*))) */ + ocb3_int_xor_blocks(ocb->checksum, ocb->checksum, pt+full_blocks_len, last_block_len); + for(x=last_block_len; xblock_len; x++) { + if (x == last_block_len) + ocb->checksum[x] ^= 0x80; + else + ocb->checksum[x] ^= 0x00; + } + + /* Tag = ENCIPHER(K, Checksum_* xor Offset_* xor L_$) xor HASH(K,A) */ + /* at this point we calculate only: Tag_part = ENCIPHER(K, Checksum_* xor Offset_* xor L_$) */ + for(x=0; xblock_len; x++) { + ocb->tag_part[x] = (ocb->checksum[x] ^ iOffset_star[x]) ^ ocb->L_dollar[x]; + } + if ((err = cipher_descriptor[ocb->cipher].ecb_encrypt(ocb->tag_part, ocb->tag_part, &ocb->key)) != CRYPT_OK) { + goto LBL_ERR; + } + } + else { + /* Tag = ENCIPHER(K, Checksum_m xor Offset_m xor L_$) xor HASH(K,A) */ + /* at this point we calculate only: Tag_part = ENCIPHER(K, Checksum_m xor Offset_m xor L_$) */ + for(x=0; xblock_len; x++) { + ocb->tag_part[x] = (ocb->checksum[x] ^ ocb->Offset_current[x]) ^ ocb->L_dollar[x]; + } + if ((err = cipher_descriptor[ocb->cipher].ecb_encrypt(ocb->tag_part, ocb->tag_part, &ocb->key)) != CRYPT_OK) { + goto LBL_ERR; + } + } + + err = CRYPT_OK; + +LBL_ERR: +#ifdef LTC_CLEAN_STACK + zeromem(iOffset_star, MAXBLOCKSIZE); + zeromem(iPad, MAXBLOCKSIZE); +#endif + + return err; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb3/ocb3_decrypt_verify_memory.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/ocb3/ocb3_decrypt_verify_memory.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,110 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/** + @file ocb3_decrypt_verify_memory.c + OCB implementation, helper to decrypt block of memory, by Tom St Denis +*/ +#include "tomcrypt.h" + +#ifdef LTC_OCB3_MODE + +/** + Decrypt and compare the tag with OCB + @param cipher The index of the cipher desired + @param key The secret key + @param keylen The length of the secret key (octets) + @param nonce The session nonce (length of the block size of the block cipher) + @param noncelen The length of the nonce (octets) + @param adata The AAD - additional associated data + @param adatalen The length of AAD (octets) + @param ct The ciphertext + @param ctlen The length of the ciphertext (octets) + @param pt [out] The plaintext + @param tag The tag to compare against + @param taglen The length of the tag (octets) + @param stat [out] The result of the tag comparison (1==valid, 0==invalid) + @return CRYPT_OK if successful regardless of the tag comparison +*/ +int ocb3_decrypt_verify_memory(int cipher, + const unsigned char *key, unsigned long keylen, + const unsigned char *nonce, unsigned long noncelen, + const unsigned char *adata, unsigned long adatalen, + const unsigned char *ct, unsigned long ctlen, + unsigned char *pt, + const unsigned char *tag, unsigned long taglen, + int *stat) +{ + int err; + ocb3_state *ocb; + unsigned char *buf; + unsigned long buflen; + + LTC_ARGCHK(stat != NULL); + + /* default to zero */ + *stat = 0; + + /* limit taglen */ + taglen = MIN(taglen, MAXBLOCKSIZE); + + /* allocate memory */ + buf = XMALLOC(taglen); + ocb = XMALLOC(sizeof(ocb3_state)); + if (ocb == NULL || buf == NULL) { + if (ocb != NULL) { + XFREE(ocb); + } + if (buf != NULL) { + XFREE(buf); + } + return CRYPT_MEM; + } + + if ((err = ocb3_init(ocb, cipher, key, keylen, nonce, noncelen, taglen)) != CRYPT_OK) { + goto LBL_ERR; + } + + if (adata != NULL || adatalen != 0) { + if ((err = ocb3_add_aad(ocb, adata, adatalen)) != CRYPT_OK) { + goto LBL_ERR; + } + } + + if ((err = ocb3_decrypt_last(ocb, ct, ctlen, pt)) != CRYPT_OK) { + goto LBL_ERR; + } + + buflen = taglen; + if ((err = ocb3_done(ocb, buf, &buflen)) != CRYPT_OK) { + goto LBL_ERR; + } + + /* compare tags */ + if (buflen >= taglen && XMEM_NEQ(buf, tag, taglen) == 0) { + *stat = 1; + } + + err = CRYPT_OK; + +LBL_ERR: +#ifdef LTC_CLEAN_STACK + zeromem(ocb, sizeof(ocb3_state)); +#endif + + XFREE(ocb); + XFREE(buf); + return err; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb3/ocb3_done.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/ocb3/ocb3_done.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,92 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/** + @file ocb3_done.c + OCB implementation, INTERNAL ONLY helper, by Tom St Denis +*/ +#include "tomcrypt.h" + +#ifdef LTC_OCB3_MODE + +/** + Finish OCB processing and compute the tag + @param ocb The OCB state + @param tag [out] The destination for the authentication tag + @param taglen [in/out] The max size and resulting size of the authentication tag + @return CRYPT_OK if successful +*/ +int ocb3_done(ocb3_state *ocb, unsigned char *tag, unsigned long *taglen) +{ + unsigned char tmp[MAXBLOCKSIZE]; + int err, x; + + LTC_ARGCHK(ocb != NULL); + LTC_ARGCHK(tag != NULL); + LTC_ARGCHK(taglen != NULL); + if ((err = cipher_is_valid(ocb->cipher)) != CRYPT_OK) { + goto LBL_ERR; + } + + /* check taglen */ + if ((int)*taglen < ocb->tag_len) { + *taglen = (unsigned long)ocb->tag_len; + return CRYPT_BUFFER_OVERFLOW; + } + + /* finalize AAD processing */ + + if (ocb->adata_buffer_bytes>0) { + /* Offset_* = Offset_m xor L_* */ + ocb3_int_xor_blocks(ocb->aOffset_current, ocb->aOffset_current, ocb->L_star, ocb->block_len); + + /* CipherInput = (A_* || 1 || zeros(127-bitlen(A_*))) xor Offset_* */ + ocb3_int_xor_blocks(tmp, ocb->adata_buffer, ocb->aOffset_current, ocb->adata_buffer_bytes); + for(x=ocb->adata_buffer_bytes; xblock_len; x++) { + if (x == ocb->adata_buffer_bytes) { + tmp[x] = 0x80 ^ ocb->aOffset_current[x]; + } + else { + tmp[x] = 0x00 ^ ocb->aOffset_current[x]; + } + } + + /* Sum = Sum_m xor ENCIPHER(K, CipherInput) */ + if ((err = cipher_descriptor[ocb->cipher].ecb_encrypt(tmp, tmp, &ocb->key)) != CRYPT_OK) { + goto LBL_ERR; + } + ocb3_int_xor_blocks(ocb->aSum_current, ocb->aSum_current, tmp, ocb->block_len); + } + + /* finalize TAG computing */ + + /* at this point ocb->aSum_current = HASH(K, A) */ + /* tag = tag ^ HASH(K, A) */ + ocb3_int_xor_blocks(tmp, ocb->tag_part, ocb->aSum_current, ocb->block_len); + + /* copy tag bytes */ + for(x = 0; x < ocb->tag_len; x++) tag[x] = tmp[x]; + *taglen = (unsigned long)ocb->tag_len; + + err = CRYPT_OK; + +LBL_ERR: +#ifdef LTC_CLEAN_STACK + zeromem(tmp, MAXBLOCKSIZE); + zeromem(ocb, sizeof(*ocb)); +#endif + + return err; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb3/ocb3_encrypt.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/ocb3/ocb3_encrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,86 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/** + @file ocb3_encrypt.c + OCB implementation, encrypt data, by Tom St Denis +*/ +#include "tomcrypt.h" + +#ifdef LTC_OCB3_MODE + +/** + Encrypt blocks of data with OCB + @param ocb The OCB state + @param pt The plaintext (length multiple of the block size of the block cipher) + @param ptlen The length of the input (octets) + @param ct [out] The ciphertext (same size as the pt) + @return CRYPT_OK if successful +*/ +int ocb3_encrypt(ocb3_state *ocb, const unsigned char *pt, unsigned long ptlen, unsigned char *ct) +{ + unsigned char tmp[MAXBLOCKSIZE]; + int err, i, full_blocks; + unsigned char *pt_b, *ct_b; + + LTC_ARGCHK(ocb != NULL); + if (ptlen == 0) return CRYPT_OK; /* no data, nothing to do */ + LTC_ARGCHK(pt != NULL); + LTC_ARGCHK(ct != NULL); + + if ((err = cipher_is_valid(ocb->cipher)) != CRYPT_OK) { + return err; + } + if (ocb->block_len != cipher_descriptor[ocb->cipher].block_length) { + return CRYPT_INVALID_ARG; + } + + if (ptlen % ocb->block_len) { /* ptlen has to bu multiple of block_len */ + return CRYPT_INVALID_ARG; + } + + full_blocks = ptlen/ocb->block_len; + for(i=0; iblock_len; + ct_b = (unsigned char *)ct+i*ocb->block_len; + + /* ocb->Offset_current[] = ocb->Offset_current[] ^ Offset_{ntz(block_index)} */ + ocb3_int_xor_blocks(ocb->Offset_current, ocb->Offset_current, ocb->L_[ocb3_int_ntz(ocb->block_index)], ocb->block_len); + + /* tmp[] = pt[] XOR ocb->Offset_current[] */ + ocb3_int_xor_blocks(tmp, pt_b, ocb->Offset_current, ocb->block_len); + + /* encrypt */ + if ((err = cipher_descriptor[ocb->cipher].ecb_encrypt(tmp, tmp, &ocb->key)) != CRYPT_OK) { + goto LBL_ERR; + } + + /* ct[] = tmp[] XOR ocb->Offset_current[] */ + ocb3_int_xor_blocks(ct_b, tmp, ocb->Offset_current, ocb->block_len); + + /* ocb->checksum[] = ocb->checksum[] XOR pt[] */ + ocb3_int_xor_blocks(ocb->checksum, ocb->checksum, pt_b, ocb->block_len); + + ocb->block_index++; + } + + err = CRYPT_OK; + +LBL_ERR: +#ifdef LTC_CLEAN_STACK + zeromem(tmp, sizeof(tmp)); +#endif + return err; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb3/ocb3_encrypt_authenticate_memory.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/ocb3/ocb3_encrypt_authenticate_memory.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,82 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/** + @file ocb3_encrypt_authenticate_memory.c + OCB implementation, encrypt block of memory, by Tom St Denis +*/ +#include "tomcrypt.h" + +#ifdef LTC_OCB3_MODE + +/** + Encrypt and generate an authentication code for a buffer of memory + @param cipher The index of the cipher desired + @param key The secret key + @param keylen The length of the secret key (octets) + @param nonce The session nonce (length of the block ciphers block size) + @param noncelen The length of the nonce (octets) + @param adata The AAD - additional associated data + @param adatalen The length of AAD (octets) + @param pt The plaintext + @param ptlen The length of the plaintext (octets) + @param ct [out] The ciphertext + @param tag [out] The authentication tag + @param taglen [in/out] The max size and resulting size of the authentication tag + @return CRYPT_OK if successful +*/ +int ocb3_encrypt_authenticate_memory(int cipher, + const unsigned char *key, unsigned long keylen, + const unsigned char *nonce, unsigned long noncelen, + const unsigned char *adata, unsigned long adatalen, + const unsigned char *pt, unsigned long ptlen, + unsigned char *ct, + unsigned char *tag, unsigned long *taglen) +{ + int err; + ocb3_state *ocb; + + LTC_ARGCHK(taglen != NULL); + + /* allocate memory */ + ocb = XMALLOC(sizeof(ocb3_state)); + if (ocb == NULL) { + return CRYPT_MEM; + } + + if ((err = ocb3_init(ocb, cipher, key, keylen, nonce, noncelen, *taglen)) != CRYPT_OK) { + goto LBL_ERR; + } + + if (adata != NULL || adatalen != 0) { + if ((err = ocb3_add_aad(ocb, adata, adatalen)) != CRYPT_OK) { + goto LBL_ERR; + } + } + + if ((err = ocb3_encrypt_last(ocb, pt, ptlen, ct)) != CRYPT_OK) { + goto LBL_ERR; + } + + err = ocb3_done(ocb, tag, taglen); + +LBL_ERR: +#ifdef LTC_CLEAN_STACK + zeromem(ocb, sizeof(ocb3_state)); +#endif + + XFREE(ocb); + return err; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb3/ocb3_encrypt_last.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/ocb3/ocb3_encrypt_last.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,112 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/** + @file ocb3_encrypt_last.c + OCB implementation, internal helper, by Karel Miko +*/ +#include "tomcrypt.h" + +#ifdef LTC_OCB3_MODE + +/** + Finish an OCB (encryption) stream + @param ocb The OCB state + @param pt The remaining plaintext + @param ptlen The length of the plaintext (octets) + @param ct [out] The output buffer + @return CRYPT_OK if successful +*/ +int ocb3_encrypt_last(ocb3_state *ocb, const unsigned char *pt, unsigned long ptlen, unsigned char *ct) +{ + unsigned char iOffset_star[MAXBLOCKSIZE]; + unsigned char iPad[MAXBLOCKSIZE]; + int err, x, full_blocks, full_blocks_len, last_block_len; + + LTC_ARGCHK(ocb != NULL); + if (pt == NULL) LTC_ARGCHK(ptlen == 0); + if (ptlen != 0) { + LTC_ARGCHK(pt != NULL); + LTC_ARGCHK(ct != NULL); + } + + if ((err = cipher_is_valid(ocb->cipher)) != CRYPT_OK) { + goto LBL_ERR; + } + + full_blocks = ptlen/ocb->block_len; + full_blocks_len = full_blocks * ocb->block_len; + last_block_len = ptlen - full_blocks_len; + + /* process full blocks first */ + if (full_blocks>0) { + if ((err = ocb3_encrypt(ocb, pt, full_blocks_len, ct)) != CRYPT_OK) { + goto LBL_ERR; + } + } + + /* at this point: m = ocb->block_index (last block index), Offset_m = ocb->Offset_current */ + + if (last_block_len>0) { + /* Offset_* = Offset_m xor L_* */ + ocb3_int_xor_blocks(iOffset_star, ocb->Offset_current, ocb->L_star, ocb->block_len); + + /* Pad = ENCIPHER(K, Offset_*) */ + if ((err = cipher_descriptor[ocb->cipher].ecb_encrypt(iOffset_star, iPad, &ocb->key)) != CRYPT_OK) { + goto LBL_ERR; + } + + /* C_* = P_* xor Pad[1..bitlen(P_*)] */ + ocb3_int_xor_blocks(ct+full_blocks_len, pt+full_blocks_len, iPad, last_block_len); + + /* Checksum_* = Checksum_m xor (P_* || 1 || zeros(127-bitlen(P_*))) */ + ocb3_int_xor_blocks(ocb->checksum, ocb->checksum, pt+full_blocks_len, last_block_len); + for(x=last_block_len; xblock_len; x++) { + if (x == last_block_len) + ocb->checksum[x] ^= 0x80; + else + ocb->checksum[x] ^= 0x00; + } + + /* Tag = ENCIPHER(K, Checksum_* xor Offset_* xor L_$) xor HASH(K,A) */ + /* at this point we calculate only: Tag_part = ENCIPHER(K, Checksum_* xor Offset_* xor L_$) */ + for(x=0; xblock_len; x++) { + ocb->tag_part[x] = (ocb->checksum[x] ^ iOffset_star[x]) ^ ocb->L_dollar[x]; + } + if ((err = cipher_descriptor[ocb->cipher].ecb_encrypt(ocb->tag_part, ocb->tag_part, &ocb->key)) != CRYPT_OK) { + goto LBL_ERR; + } + } + else { + /* Tag = ENCIPHER(K, Checksum_m xor Offset_m xor L_$) xor HASH(K,A) */ + /* at this point we calculate only: Tag_part = ENCIPHER(K, Checksum_m xor Offset_m xor L_$) */ + for(x=0; xblock_len; x++) { + ocb->tag_part[x] = (ocb->checksum[x] ^ ocb->Offset_current[x]) ^ ocb->L_dollar[x]; + } + if ((err = cipher_descriptor[ocb->cipher].ecb_encrypt(ocb->tag_part, ocb->tag_part, &ocb->key)) != CRYPT_OK) { + goto LBL_ERR; + } + } + + err = CRYPT_OK; + +LBL_ERR: +#ifdef LTC_CLEAN_STACK + zeromem(iOffset_star, MAXBLOCKSIZE); + zeromem(iPad, MAXBLOCKSIZE); +#endif + + return err; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb3/ocb3_init.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/ocb3/ocb3_init.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,196 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/** + @file ocb3_init.c + OCB implementation, initialize state, by Tom St Denis +*/ +#include "tomcrypt.h" + +#ifdef LTC_OCB3_MODE + +static void _ocb3_int_calc_offset_zero(ocb3_state *ocb, const unsigned char *nonce, unsigned long noncelen, unsigned long taglen) +{ + int x, y, bottom; + int idx, shift; + unsigned char iNonce[MAXBLOCKSIZE]; + unsigned char iKtop[MAXBLOCKSIZE]; + unsigned char iStretch[MAXBLOCKSIZE+8]; + + /* Nonce = zeros(127-bitlen(N)) || 1 || N */ + zeromem(iNonce, sizeof(iNonce)); + for (x = ocb->block_len-1, y=0; y<(int)noncelen; x--, y++) { + iNonce[x] = nonce[noncelen-y-1]; + } + iNonce[x] = 0x01; + iNonce[0] |= ((taglen*8) % 128) << 1; + + /* bottom = str2num(Nonce[123..128]) */ + bottom = iNonce[ocb->block_len-1] & 0x3F; + + /* Ktop = ENCIPHER(K, Nonce[1..122] || zeros(6)) */ + iNonce[ocb->block_len-1] = iNonce[ocb->block_len-1] & 0xC0; + if ((cipher_descriptor[ocb->cipher].ecb_encrypt(iNonce, iKtop, &ocb->key)) != CRYPT_OK) { + zeromem(ocb->Offset_current, ocb->block_len); + return; + } + + /* Stretch = Ktop || (Ktop[1..64] xor Ktop[9..72]) */ + for (x = 0; x < ocb->block_len; x++) { + iStretch[x] = iKtop[x]; + } + for (y = 0; y < 8; y++) { + iStretch[x+y] = iKtop[y] ^ iKtop[y+1]; + } + + /* Offset_0 = Stretch[1+bottom..128+bottom] */ + idx = bottom / 8; + shift = (bottom % 8); + for (x = 0; x < ocb->block_len; x++) { + ocb->Offset_current[x] = iStretch[idx+x] << shift; + if (shift > 0) { + ocb->Offset_current[x] |= iStretch[idx+x+1] >> (8-shift); + } + } +} + +static const struct { + int len; + unsigned char poly_mul[MAXBLOCKSIZE]; +} polys[] = { +{ + 8, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B } +}, { + 16, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87 } +} +}; + +/** + Initialize an OCB context + @param ocb [out] The destination of the OCB state + @param cipher The index of the desired cipher + @param key The secret key + @param keylen The length of the secret key (octets) + @param nonce The session nonce + @param noncelen The length of the session nonce (octets, up to 15) + @param taglen The length of the tag (octets, up to 16) + @return CRYPT_OK if successful +*/ +int ocb3_init(ocb3_state *ocb, int cipher, + const unsigned char *key, unsigned long keylen, + const unsigned char *nonce, unsigned long noncelen, + unsigned long taglen) +{ + int poly, x, y, m, err; + unsigned char *previous, *current; + + LTC_ARGCHK(ocb != NULL); + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(nonce != NULL); + + /* valid cipher? */ + if ((err = cipher_is_valid(cipher)) != CRYPT_OK) { + return err; + } + ocb->cipher = cipher; + + /* Valid Nonce? + * As of RFC7253: "string of no more than 120 bits" */ + if (noncelen > (120/8)) { + return CRYPT_INVALID_ARG; + } + + /* The blockcipher must have a 128-bit blocksize */ + if (cipher_descriptor[cipher].block_length != 16) { + return CRYPT_INVALID_ARG; + } + + /* The TAGLEN may be any value up to 128 (bits) */ + if (taglen > 16) { + return CRYPT_INVALID_ARG; + } + ocb->tag_len = taglen; + + /* determine which polys to use */ + ocb->block_len = cipher_descriptor[cipher].block_length; + x = (int)(sizeof(polys)/sizeof(polys[0])); + for (poly = 0; poly < x; poly++) { + if (polys[poly].len == ocb->block_len) { + break; + } + } + if (poly == x) { + return CRYPT_INVALID_ARG; /* block_len not found in polys */ + } + if (polys[poly].len != ocb->block_len) { + return CRYPT_INVALID_ARG; + } + + /* schedule the key */ + if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, &ocb->key)) != CRYPT_OK) { + return err; + } + + /* L_* = ENCIPHER(K, zeros(128)) */ + zeromem(ocb->L_star, ocb->block_len); + if ((err = cipher_descriptor[cipher].ecb_encrypt(ocb->L_star, ocb->L_star, &ocb->key)) != CRYPT_OK) { + return err; + } + + /* compute L_$, L_0, L_1, ... */ + for (x = -1; x < 32; x++) { + if (x == -1) { /* gonna compute: L_$ = double(L_*) */ + current = ocb->L_dollar; + previous = ocb->L_star; + } + else if (x == 0) { /* gonna compute: L_0 = double(L_$) */ + current = ocb->L_[0]; + previous = ocb->L_dollar; + } + else { /* gonna compute: L_i = double(L_{i-1}) for every integer i > 0 */ + current = ocb->L_[x]; + previous = ocb->L_[x-1]; + } + m = previous[0] >> 7; + for (y = 0; y < ocb->block_len-1; y++) { + current[y] = ((previous[y] << 1) | (previous[y+1] >> 7)) & 255; + } + current[ocb->block_len-1] = (previous[ocb->block_len-1] << 1) & 255; + if (m == 1) { + /* current[] = current[] XOR polys[poly].poly_mul[]*/ + ocb3_int_xor_blocks(current, current, polys[poly].poly_mul, ocb->block_len); + } + } + + /* initialize ocb->Offset_current = Offset_0 */ + _ocb3_int_calc_offset_zero(ocb, nonce, noncelen, taglen); + + /* initialize checksum to all zeros */ + zeromem(ocb->checksum, ocb->block_len); + + /* set block index */ + ocb->block_index = 1; + + /* initialize AAD related stuff */ + ocb->ablock_index = 1; + ocb->adata_buffer_bytes = 0; + zeromem(ocb->aOffset_current, ocb->block_len); + zeromem(ocb->aSum_current, ocb->block_len); + + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb3/ocb3_int_ntz.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/ocb3/ocb3_int_ntz.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,39 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/** + @file ocb3_int_ntz.c + OCB implementation, INTERNAL ONLY helper, by Tom St Denis +*/ +#include "tomcrypt.h" + +#ifdef LTC_OCB3_MODE + +/** + Returns the number of leading zero bits [from lsb up] (internal function) + @param x The 32-bit value to observe + @return The number of bits [from the lsb up] that are zero +*/ +int ocb3_int_ntz(unsigned long x) +{ + int c; + x &= 0xFFFFFFFFUL; + c = 0; + while ((x & 1) == 0) { + ++c; + x >>= 1; + } + return c; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb3/ocb3_int_xor_blocks.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/ocb3/ocb3_int_xor_blocks.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,40 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/** + @file ocb3_int_xor_blocks.c + OCB implementation, INTERNAL ONLY helper, by Karel Miko +*/ +#include "tomcrypt.h" + +#ifdef LTC_OCB3_MODE + +/** + Compute xor for two blocks of bytes 'out = block_a XOR block_b' (internal function) + @param out The block of bytes (output) + @param block_a The block of bytes (input) + @param block_b The block of bytes (input) + @param block_len The size of block_a, block_b, out +*/ +void ocb3_int_xor_blocks(unsigned char *out, const unsigned char *block_a, const unsigned char *block_b, unsigned long block_len) +{ + int x; + if (out == block_a) { + for (x = 0; x < (int)block_len; x++) out[x] ^= block_b[x]; + } + else { + for (x = 0; x < (int)block_len; x++) out[x] = block_a[x] ^ block_b[x]; + } +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/encauth/ocb3/ocb3_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/encauth/ocb3/ocb3_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,309 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/** + @file ocb3_test.c + OCB implementation, self-test by Tom St Denis +*/ +#include "tomcrypt.h" + +#ifdef LTC_OCB3_MODE + +/** + Test the OCB protocol + @return CRYPT_OK if successful +*/ +int ocb3_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + /* test vectors from: http://tools.ietf.org/html/draft-krovetz-ocb-03 */ + unsigned char key[16] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F }; + unsigned char nonce[12] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B }; + const struct { + int ptlen; + int aadlen; + unsigned char pt[64], aad[64], ct[64], tag[16]; + } tests[] = { + + { /* index:0 */ + 0, /* PLAINTEXT length */ + 0, /* AAD length */ + { 0 }, /* PLAINTEXT */ + { 0 }, /* AAD */ + { 0 }, /* CIPHERTEXT */ + { 0x19,0x7b,0x9c,0x3c,0x44,0x1d,0x3c,0x83,0xea,0xfb,0x2b,0xef,0x63,0x3b,0x91,0x82 }, /* TAG */ + }, + { /* index:1 */ + 8, /* PLAINTEXT length */ + 8, /* AAD length */ + { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07 }, /* PLAINTEXT */ + { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07 }, /* AAD */ + { 0x92,0xb6,0x57,0x13,0x0a,0x74,0xb8,0x5a }, /* CIPHERTEXT */ + { 0x16,0xdc,0x76,0xa4,0x6d,0x47,0xe1,0xea,0xd5,0x37,0x20,0x9e,0x8a,0x96,0xd1,0x4e }, /* TAG */ + }, + { /* index:2 */ + 0, /* PLAINTEXT length */ + 8, /* AAD length */ + { 0 }, /* PLAINTEXT */ + { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07 }, /* AAD */ + { 0 }, /* CIPHERTEXT */ + { 0x98,0xb9,0x15,0x52,0xc8,0xc0,0x09,0x18,0x50,0x44,0xe3,0x0a,0x6e,0xb2,0xfe,0x21 }, /* TAG */ + }, + { /* index:3 */ + 8, /* PLAINTEXT length */ + 0, /* AAD length */ + { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07 }, /* PLAINTEXT */ + { 0 }, /* AAD */ + { 0x92,0xb6,0x57,0x13,0x0a,0x74,0xb8,0x5a }, /* CIPHERTEXT */ + { 0x97,0x1e,0xff,0xca,0xe1,0x9a,0xd4,0x71,0x6f,0x88,0xe8,0x7b,0x87,0x1f,0xbe,0xed }, /* TAG */ + }, + { /* index:4 */ + 16, /* PLAINTEXT length */ + 16, /* AAD length */ + { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f }, /* PLAINTEXT */ + { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f }, /* AAD */ + { 0xbe,0xa5,0xe8,0x79,0x8d,0xbe,0x71,0x10,0x03,0x1c,0x14,0x4d,0xa0,0xb2,0x61,0x22 }, /* CIPHERTEXT */ + { 0x77,0x6c,0x99,0x24,0xd6,0x72,0x3a,0x1f,0xc4,0x52,0x45,0x32,0xac,0x3e,0x5b,0xeb }, /* TAG */ + }, + { /* index:5 */ + 0, /* PLAINTEXT length */ + 16, /* AAD length */ + { 0 }, /* PLAINTEXT */ + { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f }, /* AAD */ + { 0 }, /* CIPHERTEXT */ + { 0x7d,0xdb,0x8e,0x6c,0xea,0x68,0x14,0x86,0x62,0x12,0x50,0x96,0x19,0xb1,0x9c,0xc6 }, /* TAG */ + }, + { /* index:6 */ + 16, /* PLAINTEXT length */ + 0, /* AAD length */ + { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f }, /* PLAINTEXT */ + { 0 }, /* AAD */ + { 0xbe,0xa5,0xe8,0x79,0x8d,0xbe,0x71,0x10,0x03,0x1c,0x14,0x4d,0xa0,0xb2,0x61,0x22 }, /* CIPHERTEXT */ + { 0x13,0xcc,0x8b,0x74,0x78,0x07,0x12,0x1a,0x4c,0xbb,0x3e,0x4b,0xd6,0xb4,0x56,0xaf }, /* TAG */ + }, + { /* index:7 */ + 24, /* PLAINTEXT length */ + 24, /* AAD length */ + { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17 }, /* PLAINTEXT */ + { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17 }, /* AAD */ + { 0xbe,0xa5,0xe8,0x79,0x8d,0xbe,0x71,0x10,0x03,0x1c,0x14,0x4d,0xa0,0xb2,0x61,0x22,0xfc,0xfc,0xee,0x7a,0x2a,0x8d,0x4d,0x48 }, /* CIPHERTEXT */ + { 0x5f,0xa9,0x4f,0xc3,0xf3,0x88,0x20,0xf1,0xdc,0x3f,0x3d,0x1f,0xd4,0xe5,0x5e,0x1c }, /* TAG */ + }, + { /* index:8 */ + 0, /* PLAINTEXT length */ + 24, /* AAD length */ + { 0 }, /* PLAINTEXT */ + { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17 }, /* AAD */ + { 0 }, /* CIPHERTEXT */ + { 0x28,0x20,0x26,0xda,0x30,0x68,0xbc,0x9f,0xa1,0x18,0x68,0x1d,0x55,0x9f,0x10,0xf6 }, /* TAG */ + }, + { /* index:9 */ + 24, /* PLAINTEXT length */ + 0, /* AAD length */ + { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17 }, /* PLAINTEXT */ + { 0 }, /* AAD */ + { 0xbe,0xa5,0xe8,0x79,0x8d,0xbe,0x71,0x10,0x03,0x1c,0x14,0x4d,0xa0,0xb2,0x61,0x22,0xfc,0xfc,0xee,0x7a,0x2a,0x8d,0x4d,0x48 }, /* CIPHERTEXT */ + { 0x6e,0xf2,0xf5,0x25,0x87,0xfd,0xa0,0xed,0x97,0xdc,0x7e,0xed,0xe2,0x41,0xdf,0x68 }, /* TAG */ + }, + { /* index:10 */ + 32, /* PLAINTEXT length */ + 32, /* AAD length */ + { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f }, /* PLAINTEXT */ + { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f }, /* AAD */ + { 0xbe,0xa5,0xe8,0x79,0x8d,0xbe,0x71,0x10,0x03,0x1c,0x14,0x4d,0xa0,0xb2,0x61,0x22,0xce,0xaa,0xb9,0xb0,0x5d,0xf7,0x71,0xa6,0x57,0x14,0x9d,0x53,0x77,0x34,0x63,0xcb }, /* CIPHERTEXT */ + { 0xb2,0xa0,0x40,0xdd,0x3b,0xd5,0x16,0x43,0x72,0xd7,0x6d,0x7b,0xb6,0x82,0x42,0x40 }, /* TAG */ + }, + { /* index:11 */ + 0, /* PLAINTEXT length */ + 32, /* AAD length */ + { 0 }, /* PLAINTEXT */ + { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f }, /* AAD */ + { 0 }, /* CIPHERTEXT */ + { 0xe1,0xe0,0x72,0x63,0x3b,0xad,0xe5,0x1a,0x60,0xe8,0x59,0x51,0xd9,0xc4,0x2a,0x1b }, /* TAG */ + }, + { /* index:12 */ + 32, /* PLAINTEXT length */ + 0, /* AAD length */ + { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f }, /* PLAINTEXT */ + { 0 }, /* AAD */ + { 0xbe,0xa5,0xe8,0x79,0x8d,0xbe,0x71,0x10,0x03,0x1c,0x14,0x4d,0xa0,0xb2,0x61,0x22,0xce,0xaa,0xb9,0xb0,0x5d,0xf7,0x71,0xa6,0x57,0x14,0x9d,0x53,0x77,0x34,0x63,0xcb }, /* CIPHERTEXT */ + { 0x4a,0x3b,0xae,0x82,0x44,0x65,0xcf,0xda,0xf8,0xc4,0x1f,0xc5,0x0c,0x7d,0xf9,0xd9 }, /* TAG */ + }, + { /* index:13 */ + 40, /* PLAINTEXT length */ + 40, /* AAD length */ + { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27 }, /* PLAINTEXT */ + { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27 }, /* AAD */ + { 0xbe,0xa5,0xe8,0x79,0x8d,0xbe,0x71,0x10,0x03,0x1c,0x14,0x4d,0xa0,0xb2,0x61,0x22,0xce,0xaa,0xb9,0xb0,0x5d,0xf7,0x71,0xa6,0x57,0x14,0x9d,0x53,0x77,0x34,0x63,0xcb,0x68,0xc6,0x57,0x78,0xb0,0x58,0xa6,0x35 }, /* CIPHERTEXT */ + { 0x65,0x9c,0x62,0x32,0x11,0xde,0xea,0x0d,0xe3,0x0d,0x2c,0x38,0x18,0x79,0xf4,0xc8 }, /* TAG */ + }, + { /* index:14 */ + 0, /* PLAINTEXT length */ + 40, /* AAD length */ + { 0 }, /* PLAINTEXT */ + { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27 }, /* AAD */ + { 0 }, /* CIPHERTEXT */ + { 0x7a,0xeb,0x7a,0x69,0xa1,0x68,0x7d,0xd0,0x82,0xca,0x27,0xb0,0xd9,0xa3,0x70,0x96 }, /* TAG */ + }, + { /* index:15 */ + 40, /* PLAINTEXT length */ + 0, /* AAD length */ + { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27 }, /* PLAINTEXT */ + { 0 }, /* AAD */ + { 0xbe,0xa5,0xe8,0x79,0x8d,0xbe,0x71,0x10,0x03,0x1c,0x14,0x4d,0xa0,0xb2,0x61,0x22,0xce,0xaa,0xb9,0xb0,0x5d,0xf7,0x71,0xa6,0x57,0x14,0x9d,0x53,0x77,0x34,0x63,0xcb,0x68,0xc6,0x57,0x78,0xb0,0x58,0xa6,0x35 }, /* CIPHERTEXT */ + { 0x06,0x0c,0x84,0x67,0xf4,0xab,0xab,0x5e,0x8b,0x3c,0x20,0x67,0xa2,0xe1,0x15,0xdc }, /* TAG */ + }, + +}; + /* As of RFC 7253 - 'Appendix A. Sample Results' + * The next tuple shows a result with a tag length of 96 bits and a + different key. + + K: 0F0E0D0C0B0A09080706050403020100 + + N: BBAA9988776655443322110D + A: 000102030405060708090A0B0C0D0E0F1011121314151617 + 18191A1B1C1D1E1F2021222324252627 + P: 000102030405060708090A0B0C0D0E0F1011121314151617 + 18191A1B1C1D1E1F2021222324252627 + C: 1792A4E31E0755FB03E31B22116E6C2DDF9EFD6E33D536F1 + A0124B0A55BAE884ED93481529C76B6AD0C515F4D1CDD4FD + AC4F02AA + + The C has been split up in C and T (tag) + */ + const unsigned char K[] = { 0x0F,0x0E,0x0D,0x0C,0x0B,0x0A,0x09,0x08, + 0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00 }; + const unsigned char N[] = { 0xBB,0xAA,0x99,0x88,0x77,0x66,0x55,0x44, + 0x33,0x22,0x11,0x0D }; + const unsigned char A[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07, + 0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, + 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17, + 0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, + 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27 }; + const unsigned char P[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07, + 0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, + 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17, + 0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, + 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27 }; + const unsigned char C[] = { 0x17,0x92,0xA4,0xE3,0x1E,0x07,0x55,0xFB, + 0x03,0xE3,0x1B,0x22,0x11,0x6E,0x6C,0x2D, + 0xDF,0x9E,0xFD,0x6E,0x33,0xD5,0x36,0xF1, + 0xA0,0x12,0x4B,0x0A,0x55,0xBA,0xE8,0x84, + 0xED,0x93,0x48,0x15,0x29,0xC7,0x6B,0x6A }; + const unsigned char T[] = { 0xD0,0xC5,0x15,0xF4,0xD1,0xCD,0xD4,0xFD, + 0xAC,0x4F,0x02,0xAA }; + + int err, x, idx, res; + unsigned long len; + unsigned char outct[MAXBLOCKSIZE] = { 0 }; + unsigned char outtag[MAXBLOCKSIZE] = { 0 }; + ocb3_state ocb; + + /* AES can be under rijndael or aes... try to find it */ + if ((idx = find_cipher("aes")) == -1) { + if ((idx = find_cipher("rijndael")) == -1) { + return CRYPT_NOP; + } + } + + for (x = 0; x < (int)(sizeof(tests)/sizeof(tests[0])); x++) { + len = 16; /* must be the same as the required taglen */ + if ((err = ocb3_encrypt_authenticate_memory(idx, + key, sizeof(key), + nonce, sizeof(nonce), + tests[x].aadlen != 0 ? tests[x].aad : NULL, tests[x].aadlen, + tests[x].ptlen != 0 ? tests[x].pt : NULL, tests[x].ptlen, + tests[x].ptlen != 0 ? outct : NULL, outtag, &len)) != CRYPT_OK) { + return err; + } + + if (compare_testvector(outtag, len, tests[x].tag, sizeof(tests[x].tag), "OCB3 Tag", x) || + compare_testvector(outct, tests[x].ptlen, tests[x].ct, tests[x].ptlen, "OCB3 CT", x)) { + return CRYPT_FAIL_TESTVECTOR; + } + + if ((err = ocb3_decrypt_verify_memory(idx, + key, sizeof(key), + nonce, sizeof(nonce), + tests[x].aadlen != 0 ? tests[x].aad : NULL, tests[x].aadlen, + tests[x].ptlen != 0 ? outct : NULL, tests[x].ptlen, + tests[x].ptlen != 0 ? outct : NULL, tests[x].tag, len, &res)) != CRYPT_OK) { + return err; + } + if ((res != 1) || compare_testvector(outct, tests[x].ptlen, tests[x].pt, tests[x].ptlen, "OCB3", x)) { +#ifdef LTC_TEST_DBG + printf("\n\nOCB3: Failure-decrypt - res = %d\n", res); +#endif + return CRYPT_FAIL_TESTVECTOR; + } + } + + /* RFC 7253 - test vector with a tag length of 96 bits - part 1 */ + x = 99; + len = 12; + if ((err = ocb3_encrypt_authenticate_memory(idx, + K, sizeof(K), + N, sizeof(N), + A, sizeof(A), + P, sizeof(P), + outct, outtag, &len)) != CRYPT_OK) { + return err; + } + + if (compare_testvector(outtag, len, T, sizeof(T), "OCB3 Tag", x) || + compare_testvector(outct, sizeof(P), C, sizeof(C), "OCB3 CT", x)) { + return CRYPT_FAIL_TESTVECTOR; + } + + if ((err = ocb3_decrypt_verify_memory(idx, + K, sizeof(K), + N, sizeof(N), + A, sizeof(A), + C, sizeof(C), + outct, T, sizeof(T), &res)) != CRYPT_OK) { + return err; + } + if ((res != 1) || compare_testvector(outct, sizeof(C), P, sizeof(P), "OCB3", x)) { +#ifdef LTC_TEST_DBG + printf("\n\nOCB3: Failure-decrypt - res = %d\n", res); +#endif + return CRYPT_FAIL_TESTVECTOR; + } + + /* RFC 7253 - test vector with a tag length of 96 bits - part 2 */ + x = 100; + if ((err = ocb3_init(&ocb, idx, K, sizeof(K), N, sizeof(N), 12)) != CRYPT_OK) return err; + if ((err = ocb3_add_aad(&ocb, A, sizeof(A))) != CRYPT_OK) return err; + if ((err = ocb3_encrypt(&ocb, P, 32, outct)) != CRYPT_OK) return err; + if ((err = ocb3_encrypt_last(&ocb, P+32, sizeof(P)-32, outct+32)) != CRYPT_OK) return err; + len = sizeof(outtag); /* intentionally more than 12 */ + if ((err = ocb3_done(&ocb, outtag, &len)) != CRYPT_OK) return err; + if (compare_testvector(outct, sizeof(P), C, sizeof(C), "OCB3 CT", x)) return CRYPT_FAIL_TESTVECTOR; + if (compare_testvector(outtag, len, T, sizeof(T), "OCB3 Tag.enc", x)) return CRYPT_FAIL_TESTVECTOR; + if ((err = ocb3_init(&ocb, idx, K, sizeof(K), N, sizeof(N), 12)) != CRYPT_OK) return err; + if ((err = ocb3_add_aad(&ocb, A, sizeof(A))) != CRYPT_OK) return err; + if ((err = ocb3_decrypt(&ocb, C, 32, outct)) != CRYPT_OK) return err; + if ((err = ocb3_decrypt_last(&ocb, C+32, sizeof(C)-32, outct+32)) != CRYPT_OK) return err; + len = sizeof(outtag); /* intentionally more than 12 */ + if ((err = ocb3_done(&ocb, outtag, &len)) != CRYPT_OK) return err; + if (compare_testvector(outct, sizeof(C), P, sizeof(P), "OCB3 PT", x)) return CRYPT_FAIL_TESTVECTOR; + if (compare_testvector(outtag, len, T, sizeof(T), "OCB3 Tag.dec", x)) return CRYPT_FAIL_TESTVECTOR; + + return CRYPT_OK; +#endif /* LTC_TEST */ +} + +#endif /* LTC_OCB3_MODE */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/blake2b.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/hashes/blake2b.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,588 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/* + BLAKE2 reference source code package - reference C implementations + + Copyright 2012, Samuel Neves . You may use this under the + terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at + your option. The terms of these licenses can be found at: + + - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + - OpenSSL license : https://www.openssl.org/source/license.html + - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + + More information about the BLAKE2 hash function can be found at + https://blake2.net. +*/ +/* see also https://www.ietf.org/rfc/rfc7693.txt */ + +#include "tomcrypt.h" + +#ifdef LTC_BLAKE2B + +enum blake2b_constant { + BLAKE2B_BLOCKBYTES = 128, + BLAKE2B_OUTBYTES = 64, + BLAKE2B_KEYBYTES = 64, + BLAKE2B_SALTBYTES = 16, + BLAKE2B_PERSONALBYTES = 16, + BLAKE2B_PARAM_SIZE = 64 +}; + +/* param offsets */ +enum { + O_DIGEST_LENGTH = 0, + O_KEY_LENGTH = 1, + O_FANOUT = 2, + O_DEPTH = 3, + O_LEAF_LENGTH = 4, + O_NODE_OFFSET = 8, + O_XOF_LENGTH = 12, + O_NODE_DEPTH = 16, + O_INNER_LENGTH = 17, + O_RESERVED = 18, + O_SALT = 32, + O_PERSONAL = 48 +}; + +/* +struct blake2b_param { + unsigned char digest_length; + unsigned char key_length; + unsigned char fanout; + unsigned char depth; + ulong32 leaf_length; + ulong32 node_offset; + ulong32 xof_length; + unsigned char node_depth; + unsigned char inner_length; + unsigned char reserved[14]; + unsigned char salt[BLAKE2B_SALTBYTES]; + unsigned char personal[BLAKE2B_PERSONALBYTES]; +}; +*/ + +const struct ltc_hash_descriptor blake2b_160_desc = +{ + "blake2b-160", + 25, + 20, + 128, + { 1, 3, 6, 1, 4, 1, 1722, 12, 2, 1, 5 }, + 11, + &blake2b_160_init, + &blake2b_process, + &blake2b_done, + &blake2b_160_test, + NULL +}; + +const struct ltc_hash_descriptor blake2b_256_desc = +{ + "blake2b-256", + 26, + 32, + 128, + { 1, 3, 6, 1, 4, 1, 1722, 12, 2, 1, 8 }, + 11, + &blake2b_256_init, + &blake2b_process, + &blake2b_done, + &blake2b_256_test, + NULL +}; + +const struct ltc_hash_descriptor blake2b_384_desc = +{ + "blake2b-384", + 27, + 48, + 128, + { 1, 3, 6, 1, 4, 1, 1722, 12, 2, 1, 12 }, + 11, + &blake2b_384_init, + &blake2b_process, + &blake2b_done, + &blake2b_384_test, + NULL +}; + +const struct ltc_hash_descriptor blake2b_512_desc = +{ + "blake2b-512", + 28, + 64, + 128, + { 1, 3, 6, 1, 4, 1, 1722, 12, 2, 1, 16 }, + 11, + &blake2b_512_init, + &blake2b_process, + &blake2b_done, + &blake2b_512_test, + NULL +}; + +static const ulong64 blake2b_IV[8] = +{ + CONST64(0x6a09e667f3bcc908), CONST64(0xbb67ae8584caa73b), + CONST64(0x3c6ef372fe94f82b), CONST64(0xa54ff53a5f1d36f1), + CONST64(0x510e527fade682d1), CONST64(0x9b05688c2b3e6c1f), + CONST64(0x1f83d9abfb41bd6b), CONST64(0x5be0cd19137e2179) +}; + +static const unsigned char 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 void blake2b_set_lastnode(hash_state *md) { md->blake2b.f[1] = CONST64(0xffffffffffffffff); } + +/* Some helper functions, not necessarily useful */ +static int blake2b_is_lastblock(const hash_state *md) { return md->blake2b.f[0] != 0; } + +static void blake2b_set_lastblock(hash_state *md) +{ + if (md->blake2b.last_node) + blake2b_set_lastnode(md); + + md->blake2b.f[0] = CONST64(0xffffffffffffffff); +} + +static void blake2b_increment_counter(hash_state *md, ulong64 inc) +{ + md->blake2b.t[0] += inc; + if (md->blake2b.t[0] < inc) md->blake2b.t[1]++; +} + +static void blake2b_init0(hash_state *md) +{ + unsigned long i; + XMEMSET(&md->blake2b, 0, sizeof(md->blake2b)); + + for (i = 0; i < 8; ++i) + md->blake2b.h[i] = blake2b_IV[i]; +} + +/* init xors IV with input parameter block */ +static int blake2b_init_param(hash_state *md, const unsigned char *P) +{ + unsigned long i; + + blake2b_init0(md); + + /* IV XOR ParamBlock */ + for (i = 0; i < 8; ++i) { + ulong64 tmp; + LOAD64L(tmp, P + i * 8); + md->blake2b.h[i] ^= tmp; + } + + md->blake2b.outlen = P[O_DIGEST_LENGTH]; + return CRYPT_OK; +} + +int blake2b_init(hash_state *md, unsigned long outlen, const unsigned char *key, unsigned long keylen) +{ + unsigned char P[BLAKE2B_PARAM_SIZE]; + int err; + + LTC_ARGCHK(md != NULL); + + if ((!outlen) || (outlen > BLAKE2B_OUTBYTES)) + return CRYPT_INVALID_ARG; + + if ((key && !keylen) || (keylen && !key) || (keylen > BLAKE2B_KEYBYTES)) + return CRYPT_INVALID_ARG; + + XMEMSET(P, 0, sizeof(P)); + + P[O_DIGEST_LENGTH] = (unsigned char)outlen; + P[O_KEY_LENGTH] = (unsigned char)keylen; + P[O_FANOUT] = 1; + P[O_DEPTH] = 1; + + err = blake2b_init_param(md, P); + if (err != CRYPT_OK) return err; + + if (key) { + unsigned char block[BLAKE2B_BLOCKBYTES]; + + XMEMSET(block, 0, BLAKE2B_BLOCKBYTES); + XMEMCPY(block, key, keylen); + blake2b_process(md, block, BLAKE2B_BLOCKBYTES); + +#ifdef LTC_CLEAN_STACK + zeromem(block, sizeof(block)); +#endif + } + + return CRYPT_OK; +} + +int blake2b_160_init(hash_state *md) { return blake2b_init(md, 20, NULL, 0); } + +int blake2b_256_init(hash_state *md) { return blake2b_init(md, 32, NULL, 0); } + +int blake2b_384_init(hash_state *md) { return blake2b_init(md, 48, NULL, 0); } + +int blake2b_512_init(hash_state *md) { return blake2b_init(md, 64, NULL, 0); } + +#define G(r, i, a, b, c, d) \ + do { \ + a = a + b + m[blake2b_sigma[r][2 * i + 0]]; \ + d = ROR64(d ^ a, 32); \ + c = c + d; \ + b = ROR64(b ^ c, 24); \ + a = a + b + m[blake2b_sigma[r][2 * i + 1]]; \ + d = ROR64(d ^ a, 16); \ + c = c + d; \ + b = ROR64(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) + +#ifdef LTC_CLEAN_STACK +static int _blake2b_compress(hash_state *md, const unsigned char *buf) +#else +static int blake2b_compress(hash_state *md, const unsigned char *buf) +#endif +{ + ulong64 m[16]; + ulong64 v[16]; + unsigned long i; + + for (i = 0; i < 16; ++i) { + LOAD64L(m[i], buf + i * sizeof(m[i])); + } + + for (i = 0; i < 8; ++i) { + v[i] = md->blake2b.h[i]; + } + + v[8] = blake2b_IV[0]; + v[9] = blake2b_IV[1]; + v[10] = blake2b_IV[2]; + v[11] = blake2b_IV[3]; + v[12] = blake2b_IV[4] ^ md->blake2b.t[0]; + v[13] = blake2b_IV[5] ^ md->blake2b.t[1]; + v[14] = blake2b_IV[6] ^ md->blake2b.f[0]; + v[15] = blake2b_IV[7] ^ md->blake2b.f[1]; + + 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) { + md->blake2b.h[i] = md->blake2b.h[i] ^ v[i] ^ v[i + 8]; + } + return CRYPT_OK; +} + +#undef G +#undef ROUND + +#ifdef LTC_CLEAN_STACK +static int blake2b_compress(hash_state *md, const unsigned char *buf) +{ + int err; + err = _blake2b_compress(md, buf); + burn_stack(sizeof(ulong64) * 32 + sizeof(unsigned long)); + return err; +} +#endif + +int blake2b_process(hash_state *md, const unsigned char *in, unsigned long inlen) +{ + LTC_ARGCHK(md != NULL); + LTC_ARGCHK(in != NULL); + + if (md->blake2b.curlen > sizeof(md->blake2b.buf)) { + return CRYPT_INVALID_ARG; + } + + if (inlen > 0) { + unsigned long left = md->blake2b.curlen; + unsigned long fill = BLAKE2B_BLOCKBYTES - left; + if (inlen > fill) { + md->blake2b.curlen = 0; + XMEMCPY(md->blake2b.buf + (left % sizeof(md->blake2b.buf)), in, fill); /* Fill buffer */ + blake2b_increment_counter(md, BLAKE2B_BLOCKBYTES); + blake2b_compress(md, md->blake2b.buf); /* Compress */ + in += fill; + inlen -= fill; + while (inlen > BLAKE2B_BLOCKBYTES) { + blake2b_increment_counter(md, BLAKE2B_BLOCKBYTES); + blake2b_compress(md, in); + in += BLAKE2B_BLOCKBYTES; + inlen -= BLAKE2B_BLOCKBYTES; + } + } + XMEMCPY(md->blake2b.buf + md->blake2b.curlen, in, inlen); + md->blake2b.curlen += inlen; + } + return CRYPT_OK; +} + +int blake2b_done(hash_state *md, unsigned char *out) +{ + unsigned char buffer[BLAKE2B_OUTBYTES] = { 0 }; + unsigned long i; + + LTC_ARGCHK(md != NULL); + LTC_ARGCHK(out != NULL); + + /* if(md->blakebs.outlen != outlen) return CRYPT_INVALID_ARG; */ + + if (blake2b_is_lastblock(md)) + return CRYPT_ERROR; + + blake2b_increment_counter(md, md->blake2b.curlen); + blake2b_set_lastblock(md); + XMEMSET(md->blake2b.buf + md->blake2b.curlen, 0, BLAKE2B_BLOCKBYTES - md->blake2b.curlen); /* Padding */ + blake2b_compress(md, md->blake2b.buf); + + for (i = 0; i < 8; ++i) /* Output full hash to temp buffer */ + STORE64L(md->blake2b.h[i], buffer + i * 8); + + XMEMCPY(out, buffer, md->blake2b.outlen); + zeromem(md, sizeof(hash_state)); +#ifdef LTC_CLEAN_STACK + zeromem(buffer, sizeof(buffer)); +#endif + return CRYPT_OK; +} + +/** + Self-test the hash + @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled +*/ +int blake2b_512_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + static const struct { + const char *msg; + unsigned char hash[64]; + } tests[] = { + { "", + { 0x78, 0x6a, 0x02, 0xf7, 0x42, 0x01, 0x59, 0x03, + 0xc6, 0xc6, 0xfd, 0x85, 0x25, 0x52, 0xd2, 0x72, + 0x91, 0x2f, 0x47, 0x40, 0xe1, 0x58, 0x47, 0x61, + 0x8a, 0x86, 0xe2, 0x17, 0xf7, 0x1f, 0x54, 0x19, + 0xd2, 0x5e, 0x10, 0x31, 0xaf, 0xee, 0x58, 0x53, + 0x13, 0x89, 0x64, 0x44, 0x93, 0x4e, 0xb0, 0x4b, + 0x90, 0x3a, 0x68, 0x5b, 0x14, 0x48, 0xb7, 0x55, + 0xd5, 0x6f, 0x70, 0x1a, 0xfe, 0x9b, 0xe2, 0xce } }, + { "abc", + { 0xba, 0x80, 0xa5, 0x3f, 0x98, 0x1c, 0x4d, 0x0d, + 0x6a, 0x27, 0x97, 0xb6, 0x9f, 0x12, 0xf6, 0xe9, + 0x4c, 0x21, 0x2f, 0x14, 0x68, 0x5a, 0xc4, 0xb7, + 0x4b, 0x12, 0xbb, 0x6f, 0xdb, 0xff, 0xa2, 0xd1, + 0x7d, 0x87, 0xc5, 0x39, 0x2a, 0xab, 0x79, 0x2d, + 0xc2, 0x52, 0xd5, 0xde, 0x45, 0x33, 0xcc, 0x95, + 0x18, 0xd3, 0x8a, 0xa8, 0xdb, 0xf1, 0x92, 0x5a, + 0xb9, 0x23, 0x86, 0xed, 0xd4, 0x00, 0x99, 0x23 } }, + + { NULL, { 0 } } + }; + + int i; + unsigned char tmp[64]; + hash_state md; + + for (i = 0; tests[i].msg != NULL; i++) { + blake2b_512_init(&md); + blake2b_process(&md, (unsigned char *)tests[i].msg, (unsigned long)strlen(tests[i].msg)); + blake2b_done(&md, tmp); + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "BLAKE2B_512", i)) { + return CRYPT_FAIL_TESTVECTOR; + } + } + return CRYPT_OK; +#endif +} + +/** + Self-test the hash + @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled +*/ +int blake2b_384_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + static const struct { + const char *msg; + unsigned char hash[48]; + } tests[] = { + { "", + { 0xb3, 0x28, 0x11, 0x42, 0x33, 0x77, 0xf5, 0x2d, + 0x78, 0x62, 0x28, 0x6e, 0xe1, 0xa7, 0x2e, 0xe5, + 0x40, 0x52, 0x43, 0x80, 0xfd, 0xa1, 0x72, 0x4a, + 0x6f, 0x25, 0xd7, 0x97, 0x8c, 0x6f, 0xd3, 0x24, + 0x4a, 0x6c, 0xaf, 0x04, 0x98, 0x81, 0x26, 0x73, + 0xc5, 0xe0, 0x5e, 0xf5, 0x83, 0x82, 0x51, 0x00 } }, + { "abc", + { 0x6f, 0x56, 0xa8, 0x2c, 0x8e, 0x7e, 0xf5, 0x26, + 0xdf, 0xe1, 0x82, 0xeb, 0x52, 0x12, 0xf7, 0xdb, + 0x9d, 0xf1, 0x31, 0x7e, 0x57, 0x81, 0x5d, 0xbd, + 0xa4, 0x60, 0x83, 0xfc, 0x30, 0xf5, 0x4e, 0xe6, + 0xc6, 0x6b, 0xa8, 0x3b, 0xe6, 0x4b, 0x30, 0x2d, + 0x7c, 0xba, 0x6c, 0xe1, 0x5b, 0xb5, 0x56, 0xf4 } }, + + { NULL, { 0 } } + }; + + int i; + unsigned char tmp[48]; + hash_state md; + + for (i = 0; tests[i].msg != NULL; i++) { + blake2b_384_init(&md); + blake2b_process(&md, (unsigned char *)tests[i].msg, (unsigned long)strlen(tests[i].msg)); + blake2b_done(&md, tmp); + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "BLAKE2B_384", i)) { + return CRYPT_FAIL_TESTVECTOR; + } + } + return CRYPT_OK; +#endif +} + +/** + Self-test the hash + @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled +*/ +int blake2b_256_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + static const struct { + const char *msg; + unsigned char hash[32]; + } tests[] = { + { "", + { 0x0e, 0x57, 0x51, 0xc0, 0x26, 0xe5, 0x43, 0xb2, + 0xe8, 0xab, 0x2e, 0xb0, 0x60, 0x99, 0xda, 0xa1, + 0xd1, 0xe5, 0xdf, 0x47, 0x77, 0x8f, 0x77, 0x87, + 0xfa, 0xab, 0x45, 0xcd, 0xf1, 0x2f, 0xe3, 0xa8 } }, + { "abc", + { 0xbd, 0xdd, 0x81, 0x3c, 0x63, 0x42, 0x39, 0x72, + 0x31, 0x71, 0xef, 0x3f, 0xee, 0x98, 0x57, 0x9b, + 0x94, 0x96, 0x4e, 0x3b, 0xb1, 0xcb, 0x3e, 0x42, + 0x72, 0x62, 0xc8, 0xc0, 0x68, 0xd5, 0x23, 0x19 } }, + { "12345678901234567890123456789012345678901234567890" + "12345678901234567890123456789012345678901234567890" + "12345678901234567890123456789012345678901234567890" + "12345678901234567890123456789012345678901234567890" + "12345678901234567890123456789012345678901234567890" + "12345678901234567890123456789012345678901234567890", + { 0x0f, 0x6e, 0x01, 0x8d, 0x38, 0xd6, 0x3f, 0x08, + 0x4d, 0x58, 0xe3, 0x0c, 0x90, 0xfb, 0xa2, 0x41, + 0x5f, 0xca, 0x17, 0xfa, 0x66, 0x26, 0x49, 0xf3, + 0x8a, 0x30, 0x41, 0x7c, 0x57, 0xcd, 0xa8, 0x14 } }, + + { NULL, { 0 } } + }; + + int i; + unsigned char tmp[32]; + hash_state md; + + for (i = 0; tests[i].msg != NULL; i++) { + blake2b_256_init(&md); + blake2b_process(&md, (unsigned char *)tests[i].msg, (unsigned long)strlen(tests[i].msg)); + blake2b_done(&md, tmp); + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "BLAKE2B_256", i)) { + return CRYPT_FAIL_TESTVECTOR; + } + } + return CRYPT_OK; +#endif +} + +/** + Self-test the hash + @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled +*/ +int blake2b_160_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + static const struct { + const char *msg; + unsigned char hash[20]; + } tests[] = { + { "", + { 0x33, 0x45, 0x52, 0x4a, 0xbf, 0x6b, 0xbe, 0x18, + 0x09, 0x44, 0x92, 0x24, 0xb5, 0x97, 0x2c, 0x41, + 0x79, 0x0b, 0x6c, 0xf2 } }, + { "abc", + { 0x38, 0x42, 0x64, 0xf6, 0x76, 0xf3, 0x95, 0x36, + 0x84, 0x05, 0x23, 0xf2, 0x84, 0x92, 0x1c, 0xdc, + 0x68, 0xb6, 0x84, 0x6b } }, + + { NULL, { 0 } } + }; + + int i; + unsigned char tmp[20]; + hash_state md; + + for (i = 0; tests[i].msg != NULL; i++) { + blake2b_160_init(&md); + blake2b_process(&md, (unsigned char *)tests[i].msg, (unsigned long)strlen(tests[i].msg)); + blake2b_done(&md, tmp); + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "BLAKE2B_160", i)) { + return CRYPT_FAIL_TESTVECTOR; + } + } + return CRYPT_OK; +#endif +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/blake2s.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/hashes/blake2s.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,563 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/* + BLAKE2 reference source code package - reference C implementations + + Copyright 2012, Samuel Neves . You may use this under the + terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at + your option. The terms of these licenses can be found at: + + - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 + - OpenSSL license : https://www.openssl.org/source/license.html + - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 + + More information about the BLAKE2 hash function can be found at + https://blake2.net. +*/ +/* see also https://www.ietf.org/rfc/rfc7693.txt */ + +#include "tomcrypt.h" + +#ifdef LTC_BLAKE2S + +enum blake2s_constant { + BLAKE2S_BLOCKBYTES = 64, + BLAKE2S_OUTBYTES = 32, + BLAKE2S_KEYBYTES = 32, + BLAKE2S_SALTBYTES = 8, + BLAKE2S_PERSONALBYTES = 8, + BLAKE2S_PARAM_SIZE = 32 +}; + +/* param offsets */ +enum { + O_DIGEST_LENGTH = 0, + O_KEY_LENGTH = 1, + O_FANOUT = 2, + O_DEPTH = 3, + O_LEAF_LENGTH = 4, + O_NODE_OFFSET = 8, + O_XOF_LENGTH = 12, + O_NODE_DEPTH = 14, + O_INNER_LENGTH = 15, + O_SALT = 16, + O_PERSONAL = 24 +}; + +/* +struct blake2s_param { + unsigned char digest_length; + unsigned char key_length; + unsigned char fanout; + unsigned char depth; + ulong32 leaf_length; + ulong32 node_offset; + ushort16 xof_length; + unsigned char node_depth; + unsigned char inner_length; + unsigned char salt[BLAKE2S_SALTBYTES]; + unsigned char personal[BLAKE2S_PERSONALBYTES]; +}; +*/ + +const struct ltc_hash_descriptor blake2s_128_desc = +{ + "blake2s-128", + 21, + 16, + 64, + { 1, 3, 6, 1, 4, 1, 1722, 12, 2, 2, 4 }, + 11, + &blake2s_128_init, + &blake2s_process, + &blake2s_done, + &blake2s_128_test, + NULL +}; + +const struct ltc_hash_descriptor blake2s_160_desc = +{ + "blake2s-160", + 22, + 20, + 64, + { 1, 3, 6, 1, 4, 1, 1722, 12, 2, 2, 5 }, + 11, + &blake2s_160_init, + &blake2s_process, + &blake2s_done, + &blake2s_160_test, + NULL +}; + +const struct ltc_hash_descriptor blake2s_224_desc = +{ + "blake2s-224", + 23, + 28, + 64, + { 1, 3, 6, 1, 4, 1, 1722, 12, 2, 2, 7 }, + 11, + &blake2s_224_init, + &blake2s_process, + &blake2s_done, + &blake2s_224_test, + NULL +}; + +const struct ltc_hash_descriptor blake2s_256_desc = +{ + "blake2s-256", + 24, + 32, + 64, + { 1, 3, 6, 1, 4, 1, 1722, 12, 2, 2, 8 }, + 11, + &blake2s_256_init, + &blake2s_process, + &blake2s_done, + &blake2s_256_test, + NULL +}; + +static const ulong32 blake2s_IV[8] = { + 0x6A09E667UL, 0xBB67AE85UL, 0x3C6EF372UL, 0xA54FF53AUL, + 0x510E527FUL, 0x9B05688CUL, 0x1F83D9ABUL, 0x5BE0CD19UL +}; + +static const unsigned char blake2s_sigma[10][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 }, +}; + +static void blake2s_set_lastnode(hash_state *md) { md->blake2s.f[1] = 0xffffffffUL; } + +/* Some helper functions, not necessarily useful */ +static int blake2s_is_lastblock(const hash_state *md) { return md->blake2s.f[0] != 0; } + +static void blake2s_set_lastblock(hash_state *md) +{ + if (md->blake2s.last_node) + blake2s_set_lastnode(md); + + md->blake2s.f[0] = 0xffffffffUL; +} + +static void blake2s_increment_counter(hash_state *md, const ulong32 inc) +{ + md->blake2s.t[0] += inc; + if (md->blake2s.t[0] < inc) md->blake2s.t[1]++; +} + +static int blake2s_init0(hash_state *md) +{ + int i; + XMEMSET(&md->blake2s, 0, sizeof(struct blake2s_state)); + + for (i = 0; i < 8; ++i) + md->blake2s.h[i] = blake2s_IV[i]; + + return CRYPT_OK; +} + +/* init2 xors IV with input parameter block */ +static int blake2s_init_param(hash_state *md, const unsigned char *P) +{ + unsigned long i; + + blake2s_init0(md); + + /* IV XOR ParamBlock */ + for (i = 0; i < 8; ++i) { + ulong32 tmp; + LOAD32L(tmp, P + i * 4); + md->blake2s.h[i] ^= tmp; + } + + md->blake2s.outlen = P[O_DIGEST_LENGTH]; + return CRYPT_OK; +} + +int blake2s_init(hash_state *md, unsigned long outlen, const unsigned char *key, unsigned long keylen) +{ + unsigned char P[BLAKE2S_PARAM_SIZE]; + int err; + + LTC_ARGCHK(md != NULL); + + if ((!outlen) || (outlen > BLAKE2S_OUTBYTES)) + return CRYPT_INVALID_ARG; + + if ((key && !keylen) || (keylen && !key) || (keylen > BLAKE2S_KEYBYTES)) + return CRYPT_INVALID_ARG; + + XMEMSET(P, 0, sizeof(P)); + + P[O_DIGEST_LENGTH] = (unsigned char)outlen; + P[O_KEY_LENGTH] = (unsigned char)keylen; + P[O_FANOUT] = 1; + P[O_DEPTH] = 1; + + err = blake2s_init_param(md, P); + if (err != CRYPT_OK) return err; + + if (key) { + unsigned char block[BLAKE2S_BLOCKBYTES]; + + XMEMSET(block, 0, BLAKE2S_BLOCKBYTES); + XMEMCPY(block, key, keylen); + blake2s_process(md, block, BLAKE2S_BLOCKBYTES); + +#ifdef LTC_CLEAN_STACK + zeromem(block, sizeof(block)); +#endif + } + return CRYPT_OK; +} + +int blake2s_128_init(hash_state *md) { return blake2s_init(md, 16, NULL, 0); } + +int blake2s_160_init(hash_state *md) { return blake2s_init(md, 20, NULL, 0); } + +int blake2s_224_init(hash_state *md) { return blake2s_init(md, 28, NULL, 0); } + +int blake2s_256_init(hash_state *md) { return blake2s_init(md, 32, NULL, 0); } + +#define G(r, i, a, b, c, d) \ + do { \ + a = a + b + m[blake2s_sigma[r][2 * i + 0]]; \ + d = ROR(d ^ a, 16); \ + c = c + d; \ + b = ROR(b ^ c, 12); \ + a = a + b + m[blake2s_sigma[r][2 * i + 1]]; \ + d = ROR(d ^ a, 8); \ + c = c + d; \ + b = ROR(b ^ c, 7); \ + } 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) + +#ifdef LTC_CLEAN_STACK +static int _blake2s_compress(hash_state *md, const unsigned char *buf) +#else +static int blake2s_compress(hash_state *md, const unsigned char *buf) +#endif +{ + unsigned long i; + ulong32 m[16]; + ulong32 v[16]; + + for (i = 0; i < 16; ++i) { + LOAD32L(m[i], buf + i * sizeof(m[i])); + } + + for (i = 0; i < 8; ++i) + v[i] = md->blake2s.h[i]; + + v[8] = blake2s_IV[0]; + v[9] = blake2s_IV[1]; + v[10] = blake2s_IV[2]; + v[11] = blake2s_IV[3]; + v[12] = md->blake2s.t[0] ^ blake2s_IV[4]; + v[13] = md->blake2s.t[1] ^ blake2s_IV[5]; + v[14] = md->blake2s.f[0] ^ blake2s_IV[6]; + v[15] = md->blake2s.f[1] ^ blake2s_IV[7]; + + ROUND(0); + ROUND(1); + ROUND(2); + ROUND(3); + ROUND(4); + ROUND(5); + ROUND(6); + ROUND(7); + ROUND(8); + ROUND(9); + + for (i = 0; i < 8; ++i) + md->blake2s.h[i] = md->blake2s.h[i] ^ v[i] ^ v[i + 8]; + + return CRYPT_OK; +} +#undef G +#undef ROUND + +#ifdef LTC_CLEAN_STACK +static int blake2s_compress(hash_state *md, const unsigned char *buf) +{ + int err; + err = _blake2s_compress(md, buf); + burn_stack(sizeof(ulong32) * (32) + sizeof(unsigned long)); + return err; +} +#endif + +int blake2s_process(hash_state *md, const unsigned char *in, unsigned long inlen) +{ + LTC_ARGCHK(md != NULL); + LTC_ARGCHK(in != NULL); + + if (md->blake2s.curlen > sizeof(md->blake2s.buf)) { + return CRYPT_INVALID_ARG; + } + + if (inlen > 0) { + unsigned long left = md->blake2s.curlen; + unsigned long fill = BLAKE2S_BLOCKBYTES - left; + if (inlen > fill) { + md->blake2s.curlen = 0; + XMEMCPY(md->blake2s.buf + (left % sizeof(md->blake2s.buf)), in, fill); /* Fill buffer */ + blake2s_increment_counter(md, BLAKE2S_BLOCKBYTES); + blake2s_compress(md, md->blake2s.buf); /* Compress */ + in += fill; + inlen -= fill; + while (inlen > BLAKE2S_BLOCKBYTES) { + blake2s_increment_counter(md, BLAKE2S_BLOCKBYTES); + blake2s_compress(md, in); + in += BLAKE2S_BLOCKBYTES; + inlen -= BLAKE2S_BLOCKBYTES; + } + } + XMEMCPY(md->blake2s.buf + md->blake2s.curlen, in, inlen); + md->blake2s.curlen += inlen; + } + return CRYPT_OK; +} + +int blake2s_done(hash_state *md, unsigned char *out) +{ + unsigned char buffer[BLAKE2S_OUTBYTES] = { 0 }; + unsigned long i; + + LTC_ARGCHK(md != NULL); + LTC_ARGCHK(out != NULL); + + /* if(md->blake2s.outlen != outlen) return CRYPT_INVALID_ARG; */ + + if (blake2s_is_lastblock(md)) + return CRYPT_ERROR; + + blake2s_increment_counter(md, md->blake2s.curlen); + blake2s_set_lastblock(md); + XMEMSET(md->blake2s.buf + md->blake2s.curlen, 0, BLAKE2S_BLOCKBYTES - md->blake2s.curlen); /* Padding */ + blake2s_compress(md, md->blake2s.buf); + + for (i = 0; i < 8; ++i) /* Output full hash to temp buffer */ + STORE32L(md->blake2s.h[i], buffer + i * 4); + + XMEMCPY(out, buffer, md->blake2s.outlen); + zeromem(md, sizeof(hash_state)); +#ifdef LTC_CLEAN_STACK + zeromem(buffer, sizeof(buffer)); +#endif + return CRYPT_OK; +} + +/** + Self-test the hash + @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled +*/ +int blake2s_256_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + static const struct { + const char *msg; + unsigned char hash[32]; + } tests[] = { + { "", + { 0x69, 0x21, 0x7a, 0x30, 0x79, 0x90, 0x80, 0x94, + 0xe1, 0x11, 0x21, 0xd0, 0x42, 0x35, 0x4a, 0x7c, + 0x1f, 0x55, 0xb6, 0x48, 0x2c, 0xa1, 0xa5, 0x1e, + 0x1b, 0x25, 0x0d, 0xfd, 0x1e, 0xd0, 0xee, 0xf9 } }, + { "abc", + { 0x50, 0x8c, 0x5e, 0x8c, 0x32, 0x7c, 0x14, 0xe2, + 0xe1, 0xa7, 0x2b, 0xa3, 0x4e, 0xeb, 0x45, 0x2f, + 0x37, 0x45, 0x8b, 0x20, 0x9e, 0xd6, 0x3a, 0x29, + 0x4d, 0x99, 0x9b, 0x4c, 0x86, 0x67, 0x59, 0x82 } }, + { "12345678901234567890123456789012345678901234567890" + "12345678901234567890123456789012345678901234567890" + "12345678901234567890123456789012345678901234567890" + "12345678901234567890123456789012345678901234567890" + "12345678901234567890123456789012345678901234567890" + "12345678901234567890123456789012345678901234567890", + { 0xa3, 0x78, 0x8b, 0x5b, 0x59, 0xee, 0xe4, 0x41, + 0x95, 0x23, 0x58, 0x00, 0xa4, 0xf9, 0xfa, 0x41, + 0x86, 0x0c, 0x7b, 0x1c, 0x35, 0xa2, 0x42, 0x70, + 0x50, 0x80, 0x79, 0x56, 0xe3, 0xbe, 0x31, 0x74 } }, + + { NULL, { 0 } } + }; + + int i; + unsigned char tmp[32]; + hash_state md; + + for (i = 0; tests[i].msg != NULL; i++) { + blake2s_256_init(&md); + blake2s_process(&md, (unsigned char *)tests[i].msg, (unsigned long)strlen(tests[i].msg)); + blake2s_done(&md, tmp); + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "BLAKE2S_256", i)) { + return CRYPT_FAIL_TESTVECTOR; + } + + } + return CRYPT_OK; +#endif +} + +/** + Self-test the hash + @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled +*/ +int blake2s_224_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + static const struct { + const char *msg; + unsigned char hash[28]; + } tests[] = { + { "", + { 0x1f, 0xa1, 0x29, 0x1e, 0x65, 0x24, 0x8b, 0x37, + 0xb3, 0x43, 0x34, 0x75, 0xb2, 0xa0, 0xdd, 0x63, + 0xd5, 0x4a, 0x11, 0xec, 0xc4, 0xe3, 0xe0, 0x34, + 0xe7, 0xbc, 0x1e, 0xf4 } }, + { "abc", + { 0x0b, 0x03, 0x3f, 0xc2, 0x26, 0xdf, 0x7a, 0xbd, + 0xe2, 0x9f, 0x67, 0xa0, 0x5d, 0x3d, 0xc6, 0x2c, + 0xf2, 0x71, 0xef, 0x3d, 0xfe, 0xa4, 0xd3, 0x87, + 0x40, 0x7f, 0xbd, 0x55 } }, + + { NULL, { 0 } } + }; + + int i; + unsigned char tmp[28]; + hash_state md; + + for (i = 0; tests[i].msg != NULL; i++) { + blake2s_224_init(&md); + blake2s_process(&md, (unsigned char *)tests[i].msg, (unsigned long)strlen(tests[i].msg)); + blake2s_done(&md, tmp); + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "BLAKE2S_224", i)) { + return CRYPT_FAIL_TESTVECTOR; + } + + } + return CRYPT_OK; +#endif +} + +/** + Self-test the hash + @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled +*/ +int blake2s_160_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + static const struct { + const char *msg; + unsigned char hash[20]; + } tests[] = { + { "", + { 0x35, 0x4c, 0x9c, 0x33, 0xf7, 0x35, 0x96, 0x24, + 0x18, 0xbd, 0xac, 0xb9, 0x47, 0x98, 0x73, 0x42, + 0x9c, 0x34, 0x91, 0x6f} }, + { "abc", + { 0x5a, 0xe3, 0xb9, 0x9b, 0xe2, 0x9b, 0x01, 0x83, + 0x4c, 0x3b, 0x50, 0x85, 0x21, 0xed, 0xe6, 0x04, + 0x38, 0xf8, 0xde, 0x17 } }, + + { NULL, { 0 } } + }; + + int i; + unsigned char tmp[20]; + hash_state md; + + for (i = 0; tests[i].msg != NULL; i++) { + blake2s_160_init(&md); + blake2s_process(&md, (unsigned char *)tests[i].msg, (unsigned long)strlen(tests[i].msg)); + blake2s_done(&md, tmp); + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "BLAKE2S_160", i)) { + return CRYPT_FAIL_TESTVECTOR; + } + + } + return CRYPT_OK; +#endif +} + +/** + Self-test the hash + @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled +*/ +int blake2s_128_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + static const struct { + const char *msg; + unsigned char hash[16]; + } tests[] = { + { "", + { 0x64, 0x55, 0x0d, 0x6f, 0xfe, 0x2c, 0x0a, 0x01, + 0xa1, 0x4a, 0xba, 0x1e, 0xad, 0xe0, 0x20, 0x0c } }, + { "abc", + { 0xaa, 0x49, 0x38, 0x11, 0x9b, 0x1d, 0xc7, 0xb8, + 0x7c, 0xba, 0xd0, 0xff, 0xd2, 0x00, 0xd0, 0xae } }, + + { NULL, { 0 } } + }; + + int i; + unsigned char tmp[16]; + hash_state md; + + for (i = 0; tests[i].msg != NULL; i++) { + blake2s_128_init(&md); + blake2s_process(&md, (unsigned char *)tests[i].msg, (unsigned long)strlen(tests[i].msg)); + blake2s_done(&md, tmp); + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "BLAKE2S_128", i)) { + return CRYPT_FAIL_TESTVECTOR; + } + } + return CRYPT_OK; +#endif +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/chc/chc.c --- a/libtomcrypt/src/hashes/chc/chc.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/hashes/chc/chc.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -35,8 +33,8 @@ }; /** - Initialize the CHC state with a given cipher - @param cipher The index of the cipher you wish to bind + Initialize the CHC state with a given cipher + @param cipher The index of the cipher you wish to bind @return CRYPT_OK if successful */ int chc_register(int cipher) @@ -70,7 +68,7 @@ } /* store into descriptor */ - hash_descriptor[idx].hashsize = + hash_descriptor[idx].hashsize = hash_descriptor[idx].blocksize = cipher_descriptor[cipher].block_length; /* store the idx and block size */ @@ -89,7 +87,7 @@ symmetric_key *key; unsigned char buf[MAXBLOCKSIZE]; int err; - + LTC_ARGCHK(md != NULL); /* is the cipher valid? */ @@ -105,7 +103,7 @@ return CRYPT_MEM; } - /* zero key and what not */ + /* zero key and what not */ zeromem(buf, cipher_blocksize); if ((err = cipher_descriptor[cipher_idx].setup(buf, cipher_blocksize, 0, key)) != CRYPT_OK) { XFREE(key); @@ -123,7 +121,7 @@ return CRYPT_OK; } -/* +/* key <= state T0,T1 <= block T0 <= encrypt T0 @@ -147,17 +145,23 @@ for (x = 0; x < cipher_blocksize; x++) { md->chc.state[x] ^= T[0][x] ^ T[1][x]; } - XFREE(key); #ifdef LTC_CLEAN_STACK zeromem(T, sizeof(T)); - zeromem(&key, sizeof(key)); + zeromem(key, sizeof(*key)); #endif + XFREE(key); return CRYPT_OK; } -/* function for processing blocks */ -int _chc_process(hash_state * md, const unsigned char *buf, unsigned long len); -HASH_PROCESS(_chc_process, chc_compress, chc, (unsigned long)cipher_blocksize) +/** + Function for processing blocks + @param md The hash state + @param buf The data to hash + @param len The length of the data (octets) + @return CRYPT_OK if successful +*/ +static int _chc_process(hash_state * md, const unsigned char *buf, unsigned long len); +static HASH_PROCESS(_chc_process, chc_compress, chc, (unsigned long)cipher_blocksize) /** Process a block of memory though the hash @@ -248,23 +252,26 @@ /** Self-test the hash @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled -*/ +*/ int chc_test(void) { +#ifndef LTC_TEST + return CRYPT_NOP; +#else static const struct { unsigned char *msg, - md[MAXBLOCKSIZE]; + hash[MAXBLOCKSIZE]; int len; } tests[] = { { (unsigned char *)"hello world", - { 0xcf, 0x57, 0x9d, 0xc3, 0x0a, 0x0e, 0xea, 0x61, + { 0xcf, 0x57, 0x9d, 0xc3, 0x0a, 0x0e, 0xea, 0x61, 0x0d, 0x54, 0x47, 0xc4, 0x3c, 0x06, 0xf5, 0x4e }, 16 } }; - int x, oldhashidx, idx; - unsigned char out[MAXBLOCKSIZE]; + int i, oldhashidx, idx; + unsigned char tmp[MAXBLOCKSIZE]; hash_state md; /* AES can be under rijndael or aes... try to find it */ @@ -276,11 +283,11 @@ oldhashidx = cipher_idx; chc_register(idx); - for (x = 0; x < (int)(sizeof(tests)/sizeof(tests[0])); x++) { + for (i = 0; i < (int)(sizeof(tests)/sizeof(tests[0])); i++) { chc_init(&md); - chc_process(&md, tests[x].msg, strlen((char *)tests[x].msg)); - chc_done(&md, out); - if (XMEMCMP(out, tests[x].md, tests[x].len)) { + chc_process(&md, tests[i].msg, strlen((char *)tests[i].msg)); + chc_done(&md, tmp); + if (compare_testvector(tmp, tests[i].len, tests[i].hash, tests[i].len, "CHC", i)) { return CRYPT_FAIL_TESTVECTOR; } } @@ -289,10 +296,11 @@ } return CRYPT_OK; +#endif } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/helper/hash_file.c --- a/libtomcrypt/src/hashes/helper/hash_file.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/hashes/helper/hash_file.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,11 +5,10 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" +#ifndef LTC_NO_FILE /** @file hash_file.c Hash a file, Tom St Denis @@ -24,10 +23,6 @@ */ int hash_file(int hash, const char *fname, unsigned char *out, unsigned long *outlen) { -#ifdef LTC_NO_FILE - (void)hash; (void)fname; (void)out; (void)outlen; - return CRYPT_NOP; -#else FILE *in; int err; LTC_ARGCHK(fname != NULL); @@ -49,10 +44,10 @@ } return err; -#endif } +#endif /* #ifndef LTC_NO_FILE */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/helper/hash_filehandle.c --- a/libtomcrypt/src/hashes/helper/hash_filehandle.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/hashes/helper/hash_filehandle.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,11 +5,10 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" +#ifndef LTC_NO_FILE /** @file hash_filehandle.c Hash open files, Tom St Denis @@ -25,12 +24,8 @@ */ int hash_filehandle(int hash, FILE *in, unsigned char *out, unsigned long *outlen) { -#ifdef LTC_NO_FILE - (void)hash; (void)in; (void)out; (void)outlen; - return CRYPT_NOP; -#else hash_state md; - unsigned char buf[512]; + unsigned char *buf; size_t x; int err; @@ -38,35 +33,42 @@ LTC_ARGCHK(outlen != NULL); LTC_ARGCHK(in != NULL); + if ((buf = XMALLOC(LTC_FILE_READ_BUFSIZE)) == NULL) { + return CRYPT_MEM; + } + if ((err = hash_is_valid(hash)) != CRYPT_OK) { - return err; + goto LBL_ERR; } if (*outlen < hash_descriptor[hash].hashsize) { *outlen = hash_descriptor[hash].hashsize; - return CRYPT_BUFFER_OVERFLOW; + err = CRYPT_BUFFER_OVERFLOW; + goto LBL_ERR; } if ((err = hash_descriptor[hash].init(&md)) != CRYPT_OK) { - return err; + goto LBL_ERR; } + do { + x = fread(buf, 1, LTC_FILE_READ_BUFSIZE, in); + if ((err = hash_descriptor[hash].process(&md, buf, (unsigned long)x)) != CRYPT_OK) { + goto LBL_CLEANBUF; + } + } while (x == LTC_FILE_READ_BUFSIZE); + if ((err = hash_descriptor[hash].done(&md, out)) == CRYPT_OK) { *outlen = hash_descriptor[hash].hashsize; - do { - x = fread(buf, 1, sizeof(buf), in); - if ((err = hash_descriptor[hash].process(&md, buf, x)) != CRYPT_OK) { - return err; } - } while (x == sizeof(buf)); - err = hash_descriptor[hash].done(&md, out); -#ifdef LTC_CLEAN_STACK - zeromem(buf, sizeof(buf)); -#endif +LBL_CLEANBUF: + zeromem(buf, LTC_FILE_READ_BUFSIZE); +LBL_ERR: + XFREE(buf); return err; -#endif } +#endif /* #ifndef LTC_NO_FILE */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/helper/hash_memory.c --- a/libtomcrypt/src/hashes/helper/hash_memory.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/hashes/helper/hash_memory.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,11 +5,10 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" +#ifdef LTC_HASH_HELPERS /** @file hash_memory.c Hash memory helper, Tom St Denis @@ -63,7 +62,8 @@ return err; } +#endif /* #ifdef LTC_HASH_HELPERS */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/helper/hash_memory_multi.c --- a/libtomcrypt/src/hashes/helper/hash_memory_multi.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/hashes/helper/hash_memory_multi.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,18 +5,18 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" #include + +#ifdef LTC_HASH_HELPERS /** @file hash_memory_multi.c Hash (multiple buffers) memory helper, Tom St Denis */ /** - Hash multiple (non-adjacent) blocks of memory at once. + Hash multiple (non-adjacent) blocks of memory at once. @param hash The index of the hash you wish to use @param out [out] Where to store the digest @param outlen [in/out] Max size and resulting size of the digest @@ -24,7 +24,7 @@ @param inlen The length of the data to hash (octets) @param ... tuples of (data,len) pairs to hash, terminated with a (NULL,x) (x=don't care) @return CRYPT_OK if successful -*/ +*/ int hash_memory_multi(int hash, unsigned char *out, unsigned long *outlen, const unsigned char *in, unsigned long inlen, ...) { @@ -57,7 +57,7 @@ } va_start(args, inlen); - curptr = in; + curptr = in; curlen = inlen; for (;;) { /* process buf */ @@ -81,7 +81,8 @@ va_end(args); return err; } +#endif /* #ifdef LTC_HASH_HELPERS */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/md2.c --- a/libtomcrypt/src/hashes/md2.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/hashes/md2.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,14 +5,12 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @param md2.c - LTC_MD2 (RFC 1319) hash function implementation by Tom St Denis + LTC_MD2 (RFC 1319) hash function implementation by Tom St Denis */ #ifdef LTC_MD2 @@ -64,7 +62,7 @@ L = md->md2.chksum[15]; for (j = 0; j < 16; j++) { -/* caution, the RFC says its "C[j] = S[M[i*16+j] xor L]" but the reference source code [and test vectors] say +/* caution, the RFC says its "C[j] = S[M[i*16+j] xor L]" but the reference source code [and test vectors] say otherwise. */ L = (md->md2.chksum[j] ^= PI_SUBST[(int)(md->md2.buf[j] ^ L)] & 255); @@ -75,7 +73,7 @@ { int j, k; unsigned char t; - + /* copy block */ for (j = 0; j < 16; j++) { md->md2.X[16+j] = md->md2.buf[j]; @@ -122,9 +120,9 @@ unsigned long n; LTC_ARGCHK(md != NULL); LTC_ARGCHK(in != NULL); - if (md-> md2 .curlen > sizeof(md-> md2 .buf)) { - return CRYPT_INVALID_ARG; - } + if (md-> md2 .curlen > sizeof(md-> md2 .buf)) { + return CRYPT_INVALID_ARG; + } while (inlen > 0) { n = MIN(inlen, (16 - md->md2.curlen)); XMEMCPY(md->md2.buf + md->md2.curlen, in, (size_t)n); @@ -186,15 +184,15 @@ /** Self-test the hash @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled -*/ +*/ int md2_test(void) { #ifndef LTC_TEST return CRYPT_NOP; - #else + #else static const struct { - char *msg; - unsigned char md[16]; + const char *msg; + unsigned char hash[16]; } tests[] = { { "", {0x83,0x50,0xe5,0xa3,0xe2,0x4c,0x15,0x3d, @@ -227,25 +225,26 @@ } } }; + int i; + unsigned char tmp[16]; hash_state md; - unsigned char buf[16]; for (i = 0; i < (int)(sizeof(tests) / sizeof(tests[0])); i++) { md2_init(&md); md2_process(&md, (unsigned char*)tests[i].msg, (unsigned long)strlen(tests[i].msg)); - md2_done(&md, buf); - if (XMEMCMP(buf, tests[i].md, 16) != 0) { + md2_done(&md, tmp); + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "MD2", i)) { return CRYPT_FAIL_TESTVECTOR; } } - return CRYPT_OK; + return CRYPT_OK; #endif } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/md4.c --- a/libtomcrypt/src/hashes/md4.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/hashes/md4.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,14 +5,12 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @param md4.c - Submitted by Dobes Vandermeer (dobes@smartt.com) + Submitted by Dobes Vandermeer (dobes@smartt.com) */ #ifdef LTC_MD4 @@ -23,7 +21,7 @@ 6, 16, 64, - + /* OID */ { 1, 2, 840, 113549, 2, 4, }, 6, @@ -56,8 +54,8 @@ /* ROTATE_LEFT rotates x left n bits. */ #define ROTATE_LEFT(x, n) ROLc(x, n) -/* FF, GG and HH are transformations for rounds 1, 2 and 3 */ -/* Rotation is separate from addition to prevent recomputation */ +/* FF, GG and HH are transformations for rounds 1, 2 and 3 */ +/* Rotation is separate from addition to prevent recomputation */ #define FF(a, b, c, d, x, s) { \ (a) += F ((b), (c), (d)) + (x); \ @@ -91,61 +89,61 @@ for (i = 0; i < 16; i++) { LOAD32L(x[i], buf + (4*i)); } - - /* Round 1 */ - FF (a, b, c, d, x[ 0], S11); /* 1 */ - FF (d, a, b, c, x[ 1], S12); /* 2 */ - FF (c, d, a, b, x[ 2], S13); /* 3 */ - FF (b, c, d, a, x[ 3], S14); /* 4 */ - FF (a, b, c, d, x[ 4], S11); /* 5 */ - FF (d, a, b, c, x[ 5], S12); /* 6 */ - FF (c, d, a, b, x[ 6], S13); /* 7 */ - FF (b, c, d, a, x[ 7], S14); /* 8 */ - FF (a, b, c, d, x[ 8], S11); /* 9 */ + + /* Round 1 */ + FF (a, b, c, d, x[ 0], S11); /* 1 */ + FF (d, a, b, c, x[ 1], S12); /* 2 */ + FF (c, d, a, b, x[ 2], S13); /* 3 */ + FF (b, c, d, a, x[ 3], S14); /* 4 */ + FF (a, b, c, d, x[ 4], S11); /* 5 */ + FF (d, a, b, c, x[ 5], S12); /* 6 */ + FF (c, d, a, b, x[ 6], S13); /* 7 */ + FF (b, c, d, a, x[ 7], S14); /* 8 */ + FF (a, b, c, d, x[ 8], S11); /* 9 */ FF (d, a, b, c, x[ 9], S12); /* 10 */ - FF (c, d, a, b, x[10], S13); /* 11 */ + FF (c, d, a, b, x[10], S13); /* 11 */ FF (b, c, d, a, x[11], S14); /* 12 */ FF (a, b, c, d, x[12], S11); /* 13 */ - FF (d, a, b, c, x[13], S12); /* 14 */ - FF (c, d, a, b, x[14], S13); /* 15 */ - FF (b, c, d, a, x[15], S14); /* 16 */ - - /* Round 2 */ - GG (a, b, c, d, x[ 0], S21); /* 17 */ - GG (d, a, b, c, x[ 4], S22); /* 18 */ - GG (c, d, a, b, x[ 8], S23); /* 19 */ - GG (b, c, d, a, x[12], S24); /* 20 */ - GG (a, b, c, d, x[ 1], S21); /* 21 */ - GG (d, a, b, c, x[ 5], S22); /* 22 */ - GG (c, d, a, b, x[ 9], S23); /* 23 */ - GG (b, c, d, a, x[13], S24); /* 24 */ - GG (a, b, c, d, x[ 2], S21); /* 25 */ - GG (d, a, b, c, x[ 6], S22); /* 26 */ - GG (c, d, a, b, x[10], S23); /* 27 */ - GG (b, c, d, a, x[14], S24); /* 28 */ - GG (a, b, c, d, x[ 3], S21); /* 29 */ - GG (d, a, b, c, x[ 7], S22); /* 30 */ - GG (c, d, a, b, x[11], S23); /* 31 */ - GG (b, c, d, a, x[15], S24); /* 32 */ - + FF (d, a, b, c, x[13], S12); /* 14 */ + FF (c, d, a, b, x[14], S13); /* 15 */ + FF (b, c, d, a, x[15], S14); /* 16 */ + + /* Round 2 */ + GG (a, b, c, d, x[ 0], S21); /* 17 */ + GG (d, a, b, c, x[ 4], S22); /* 18 */ + GG (c, d, a, b, x[ 8], S23); /* 19 */ + GG (b, c, d, a, x[12], S24); /* 20 */ + GG (a, b, c, d, x[ 1], S21); /* 21 */ + GG (d, a, b, c, x[ 5], S22); /* 22 */ + GG (c, d, a, b, x[ 9], S23); /* 23 */ + GG (b, c, d, a, x[13], S24); /* 24 */ + GG (a, b, c, d, x[ 2], S21); /* 25 */ + GG (d, a, b, c, x[ 6], S22); /* 26 */ + GG (c, d, a, b, x[10], S23); /* 27 */ + GG (b, c, d, a, x[14], S24); /* 28 */ + GG (a, b, c, d, x[ 3], S21); /* 29 */ + GG (d, a, b, c, x[ 7], S22); /* 30 */ + GG (c, d, a, b, x[11], S23); /* 31 */ + GG (b, c, d, a, x[15], S24); /* 32 */ + /* Round 3 */ - HH (a, b, c, d, x[ 0], S31); /* 33 */ - HH (d, a, b, c, x[ 8], S32); /* 34 */ - HH (c, d, a, b, x[ 4], S33); /* 35 */ - HH (b, c, d, a, x[12], S34); /* 36 */ - HH (a, b, c, d, x[ 2], S31); /* 37 */ - HH (d, a, b, c, x[10], S32); /* 38 */ - HH (c, d, a, b, x[ 6], S33); /* 39 */ - HH (b, c, d, a, x[14], S34); /* 40 */ - HH (a, b, c, d, x[ 1], S31); /* 41 */ - HH (d, a, b, c, x[ 9], S32); /* 42 */ - HH (c, d, a, b, x[ 5], S33); /* 43 */ - HH (b, c, d, a, x[13], S34); /* 44 */ - HH (a, b, c, d, x[ 3], S31); /* 45 */ - HH (d, a, b, c, x[11], S32); /* 46 */ - HH (c, d, a, b, x[ 7], S33); /* 47 */ - HH (b, c, d, a, x[15], S34); /* 48 */ - + HH (a, b, c, d, x[ 0], S31); /* 33 */ + HH (d, a, b, c, x[ 8], S32); /* 34 */ + HH (c, d, a, b, x[ 4], S33); /* 35 */ + HH (b, c, d, a, x[12], S34); /* 36 */ + HH (a, b, c, d, x[ 2], S31); /* 37 */ + HH (d, a, b, c, x[10], S32); /* 38 */ + HH (c, d, a, b, x[ 6], S33); /* 39 */ + HH (b, c, d, a, x[14], S34); /* 40 */ + HH (a, b, c, d, x[ 1], S31); /* 41 */ + HH (d, a, b, c, x[ 9], S32); /* 42 */ + HH (c, d, a, b, x[ 5], S33); /* 43 */ + HH (b, c, d, a, x[13], S34); /* 44 */ + HH (a, b, c, d, x[ 3], S31); /* 45 */ + HH (d, a, b, c, x[11], S32); /* 46 */ + HH (c, d, a, b, x[ 7], S33); /* 47 */ + HH (b, c, d, a, x[15], S34); /* 48 */ + /* Update our state */ md->md4.state[0] = md->md4.state[0] + a; @@ -242,54 +240,55 @@ } #ifdef LTC_CLEAN_STACK zeromem(md, sizeof(hash_state)); -#endif +#endif return CRYPT_OK; } /** Self-test the hash @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled -*/ +*/ int md4_test(void) { #ifndef LTC_TEST return CRYPT_NOP; - #else + #else static const struct md4_test_case { - char *input; - unsigned char digest[16]; - } cases[] = { - { "", + const char *input; + unsigned char hash[16]; + } tests[] = { + { "", {0x31, 0xd6, 0xcf, 0xe0, 0xd1, 0x6a, 0xe9, 0x31, 0xb7, 0x3c, 0x59, 0xd7, 0xe0, 0xc0, 0x89, 0xc0} }, { "a", {0xbd, 0xe5, 0x2c, 0xb3, 0x1d, 0xe3, 0x3e, 0x46, 0x24, 0x5e, 0x05, 0xfb, 0xdb, 0xd6, 0xfb, 0x24} }, { "abc", - {0xa4, 0x48, 0x01, 0x7a, 0xaf, 0x21, 0xd8, 0x52, + {0xa4, 0x48, 0x01, 0x7a, 0xaf, 0x21, 0xd8, 0x52, 0x5f, 0xc1, 0x0a, 0xe8, 0x7a, 0xa6, 0x72, 0x9d} }, - { "message digest", - {0xd9, 0x13, 0x0a, 0x81, 0x64, 0x54, 0x9f, 0xe8, + { "message digest", + {0xd9, 0x13, 0x0a, 0x81, 0x64, 0x54, 0x9f, 0xe8, 0x18, 0x87, 0x48, 0x06, 0xe1, 0xc7, 0x01, 0x4b} }, - { "abcdefghijklmnopqrstuvwxyz", - {0xd7, 0x9e, 0x1c, 0x30, 0x8a, 0xa5, 0xbb, 0xcd, + { "abcdefghijklmnopqrstuvwxyz", + {0xd7, 0x9e, 0x1c, 0x30, 0x8a, 0xa5, 0xbb, 0xcd, 0xee, 0xa8, 0xed, 0x63, 0xdf, 0x41, 0x2d, 0xa9} }, - { "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", - {0x04, 0x3f, 0x85, 0x82, 0xf2, 0x41, 0xdb, 0x35, + { "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", + {0x04, 0x3f, 0x85, 0x82, 0xf2, 0x41, 0xdb, 0x35, 0x1c, 0xe6, 0x27, 0xe1, 0x53, 0xe7, 0xf0, 0xe4} }, - { "12345678901234567890123456789012345678901234567890123456789012345678901234567890", - {0xe3, 0x3b, 0x4d, 0xdc, 0x9c, 0x38, 0xf2, 0x19, + { "12345678901234567890123456789012345678901234567890123456789012345678901234567890", + {0xe3, 0x3b, 0x4d, 0xdc, 0x9c, 0x38, 0xf2, 0x19, 0x9c, 0x3e, 0x7b, 0x16, 0x4f, 0xcc, 0x05, 0x36} }, }; + int i; + unsigned char tmp[16]; hash_state md; - unsigned char digest[16]; - for(i = 0; i < (int)(sizeof(cases) / sizeof(cases[0])); i++) { + for(i = 0; i < (int)(sizeof(tests) / sizeof(tests[0])); i++) { md4_init(&md); - md4_process(&md, (unsigned char *)cases[i].input, (unsigned long)strlen(cases[i].input)); - md4_done(&md, digest); - if (XMEMCMP(digest, cases[i].digest, 16) != 0) { + md4_process(&md, (unsigned char *)tests[i].input, (unsigned long)strlen(tests[i].input)); + md4_done(&md, tmp); + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "MD4", i)) { return CRYPT_FAIL_TESTVECTOR; } @@ -302,6 +301,6 @@ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/md5.c --- a/libtomcrypt/src/hashes/md5.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/hashes/md5.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,15 +5,13 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file md5.c - LTC_MD5 hash function by Tom St Denis + LTC_MD5 hash function by Tom St Denis */ #ifdef LTC_MD5 @@ -95,7 +93,7 @@ a = (a + I(b,c,d) + M + t); a = ROLc(a, s) + b; -#endif +#endif #ifdef LTC_CLEAN_STACK static int _md5_compress(hash_state *md, unsigned char *buf) @@ -112,7 +110,7 @@ for (i = 0; i < 16; i++) { LOAD32L(W[i], buf + (4*i)); } - + /* copy state */ a = md->md5.state[0]; b = md->md5.state[1]; @@ -309,37 +307,37 @@ /** Self-test the hash @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled -*/ +*/ int md5_test(void) { #ifndef LTC_TEST return CRYPT_NOP; - #else + #else static const struct { - char *msg; + const char *msg; unsigned char hash[16]; } tests[] = { { "", - { 0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04, + { 0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04, 0xe9, 0x80, 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e } }, { "a", - {0x0c, 0xc1, 0x75, 0xb9, 0xc0, 0xf1, 0xb6, 0xa8, + {0x0c, 0xc1, 0x75, 0xb9, 0xc0, 0xf1, 0xb6, 0xa8, 0x31, 0xc3, 0x99, 0xe2, 0x69, 0x77, 0x26, 0x61 } }, { "abc", - { 0x90, 0x01, 0x50, 0x98, 0x3c, 0xd2, 0x4f, 0xb0, + { 0x90, 0x01, 0x50, 0x98, 0x3c, 0xd2, 0x4f, 0xb0, 0xd6, 0x96, 0x3f, 0x7d, 0x28, 0xe1, 0x7f, 0x72 } }, - { "message digest", - { 0xf9, 0x6b, 0x69, 0x7d, 0x7c, 0xb7, 0x93, 0x8d, - 0x52, 0x5a, 0x2f, 0x31, 0xaa, 0xf1, 0x61, 0xd0 } }, + { "message digest", + { 0xf9, 0x6b, 0x69, 0x7d, 0x7c, 0xb7, 0x93, 0x8d, + 0x52, 0x5a, 0x2f, 0x31, 0xaa, 0xf1, 0x61, 0xd0 } }, { "abcdefghijklmnopqrstuvwxyz", - { 0xc3, 0xfc, 0xd3, 0xd7, 0x61, 0x92, 0xe4, 0x00, + { 0xc3, 0xfc, 0xd3, 0xd7, 0x61, 0x92, 0xe4, 0x00, 0x7d, 0xfb, 0x49, 0x6c, 0xca, 0x67, 0xe1, 0x3b } }, { "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", - { 0xd1, 0x74, 0xab, 0x98, 0xd2, 0x77, 0xd9, 0xf5, + { 0xd1, 0x74, 0xab, 0x98, 0xd2, 0x77, 0xd9, 0xf5, 0xa5, 0x61, 0x1c, 0x2c, 0x9f, 0x41, 0x9d, 0x9f } }, { "12345678901234567890123456789012345678901234567890123456789012345678901234567890", - { 0x57, 0xed, 0xf4, 0xa2, 0x2b, 0xe3, 0xc9, 0x55, - 0xac, 0x49, 0xda, 0x2e, 0x21, 0x07, 0xb6, 0x7a } }, + { 0x57, 0xed, 0xf4, 0xa2, 0x2b, 0xe3, 0xc9, 0x55, + 0xac, 0x49, 0xda, 0x2e, 0x21, 0x07, 0xb6, 0x7a } }, { NULL, { 0 } } }; @@ -351,7 +349,7 @@ md5_init(&md); md5_process(&md, (unsigned char *)tests[i].msg, (unsigned long)strlen(tests[i].msg)); md5_done(&md, tmp); - if (XMEMCMP(tmp, tests[i].hash, 16) != 0) { + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "MD5", i)) { return CRYPT_FAIL_TESTVECTOR; } } @@ -363,6 +361,6 @@ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/rmd128.c --- a/libtomcrypt/src/hashes/rmd128.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/hashes/rmd128.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,15 +5,13 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @param rmd128.c RMD128 Hash function -*/ +*/ /* Implementation of LTC_RIPEMD-128 based on the source by Antoon Bosselaers, ESAT-COSIC * @@ -42,11 +40,11 @@ }; /* the four basic functions F(), G() and H() */ -#define F(x, y, z) ((x) ^ (y) ^ (z)) -#define G(x, y, z) (((x) & (y)) | (~(x) & (z))) +#define F(x, y, z) ((x) ^ (y) ^ (z)) +#define G(x, y, z) (((x) & (y)) | (~(x) & (z))) #define H(x, y, z) (((x) | ~(y)) ^ (z)) -#define I(x, y, z) (((x) & (z)) | ((y) & ~(z))) - +#define I(x, y, z) (((x) & (z)) | ((y) & ~(z))) + /* the eight basic operations FF() through III() */ #define FF(a, b, c, d, x, s) \ (a) += F((b), (c), (d)) + (x);\ @@ -88,7 +86,7 @@ { ulong32 aa,bb,cc,dd,aaa,bbb,ccc,ddd,X[16]; int i; - + /* load words X */ for (i = 0; i < 16; i++){ LOAD32L(X[i], buf + (4 * i)); @@ -117,7 +115,7 @@ FF(dd, aa, bb, cc, X[13], 7); FF(cc, dd, aa, bb, X[14], 9); FF(bb, cc, dd, aa, X[15], 8); - + /* round 2 */ GG(aa, bb, cc, dd, X[ 7], 7); GG(dd, aa, bb, cc, X[ 4], 6); @@ -173,7 +171,7 @@ II(bb, cc, dd, aa, X[ 2], 12); /* parallel round 1 */ - III(aaa, bbb, ccc, ddd, X[ 5], 8); + III(aaa, bbb, ccc, ddd, X[ 5], 8); III(ddd, aaa, bbb, ccc, X[14], 9); III(ccc, ddd, aaa, bbb, X[ 7], 9); III(bbb, ccc, ddd, aaa, X[ 0], 11); @@ -208,7 +206,7 @@ HHH(ccc, ddd, aaa, bbb, X[ 1], 13); HHH(bbb, ccc, ddd, aaa, X[ 2], 11); - /* parallel round 3 */ + /* parallel round 3 */ GGG(aaa, bbb, ccc, ddd, X[15], 9); GGG(ddd, aaa, bbb, ccc, X[ 5], 7); GGG(ccc, ddd, aaa, bbb, X[ 1], 15); @@ -342,21 +340,21 @@ #ifdef LTC_CLEAN_STACK zeromem(md, sizeof(hash_state)); #endif - return CRYPT_OK; + return CRYPT_OK; } /** Self-test the hash @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled -*/ +*/ int rmd128_test(void) { #ifndef LTC_TEST return CRYPT_NOP; #else static const struct { - char *msg; - unsigned char md[16]; + const char *msg; + unsigned char hash[16]; } tests[] = { { "", { 0xcd, 0xf2, 0x62, 0x13, 0xa1, 0x50, 0xdc, 0x3e, @@ -383,18 +381,16 @@ 0xae, 0xa4, 0x62, 0x4c, 0x60, 0xc5, 0xc7, 0x02 } } }; - int x; - unsigned char buf[16]; + + int i; + unsigned char tmp[16]; hash_state md; - for (x = 0; x < (int)(sizeof(tests)/sizeof(tests[0])); x++) { + for (i = 0; i < (int)(sizeof(tests)/sizeof(tests[0])); i++) { rmd128_init(&md); - rmd128_process(&md, (unsigned char *)tests[x].msg, strlen(tests[x].msg)); - rmd128_done(&md, buf); - if (XMEMCMP(buf, tests[x].md, 16) != 0) { - #if 0 - printf("Failed test %d\n", x); - #endif + rmd128_process(&md, (unsigned char *)tests[i].msg, strlen(tests[i].msg)); + rmd128_done(&md, tmp); + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "RIPEMD128", i)) { return CRYPT_FAIL_TESTVECTOR; } } @@ -405,6 +401,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/rmd160.c --- a/libtomcrypt/src/hashes/rmd160.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/hashes/rmd160.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,15 +5,13 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file rmd160.c RMD160 hash function -*/ +*/ /* Implementation of LTC_RIPEMD-160 based on the source by Antoon Bosselaers, ESAT-COSIC * @@ -42,12 +40,12 @@ }; /* the five basic functions F(), G() and H() */ -#define F(x, y, z) ((x) ^ (y) ^ (z)) -#define G(x, y, z) (((x) & (y)) | (~(x) & (z))) +#define F(x, y, z) ((x) ^ (y) ^ (z)) +#define G(x, y, z) (((x) & (y)) | (~(x) & (z))) #define H(x, y, z) (((x) | ~(y)) ^ (z)) -#define I(x, y, z) (((x) & (z)) | ((y) & ~(z))) +#define I(x, y, z) (((x) & (z)) | ((y) & ~(z))) #define J(x, y, z) ((x) ^ ((y) | ~(z))) - + /* the ten basic operations FF() through III() */ #define FF(a, b, c, d, e, x, s) \ (a) += F((b), (c), (d)) + (x);\ @@ -138,7 +136,7 @@ FF(cc, dd, ee, aa, bb, X[13], 7); FF(bb, cc, dd, ee, aa, X[14], 9); FF(aa, bb, cc, dd, ee, X[15], 8); - + /* round 2 */ GG(ee, aa, bb, cc, dd, X[ 7], 7); GG(dd, ee, aa, bb, cc, X[ 4], 6); @@ -230,7 +228,7 @@ JJJ(aaa, bbb, ccc, ddd, eee, X[12], 6); /* parallel round 2 */ - III(eee, aaa, bbb, ccc, ddd, X[ 6], 9); + III(eee, aaa, bbb, ccc, ddd, X[ 6], 9); III(ddd, eee, aaa, bbb, ccc, X[11], 13); III(ccc, ddd, eee, aaa, bbb, X[ 3], 15); III(bbb, ccc, ddd, eee, aaa, X[ 7], 7); @@ -265,7 +263,7 @@ HHH(eee, aaa, bbb, ccc, ddd, X[ 4], 7); HHH(ddd, eee, aaa, bbb, ccc, X[13], 5); - /* parallel round 4 */ + /* parallel round 4 */ GGG(ccc, ddd, eee, aaa, bbb, X[ 8], 15); GGG(bbb, ccc, ddd, eee, aaa, X[ 6], 5); GGG(aaa, bbb, ccc, ddd, eee, X[ 4], 8); @@ -407,15 +405,15 @@ /** Self-test the hash @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled -*/ +*/ int rmd160_test(void) { #ifndef LTC_TEST return CRYPT_NOP; #else static const struct { - char *msg; - unsigned char md[20]; + const char *msg; + unsigned char hash[20]; } tests[] = { { "", { 0x9c, 0x11, 0x85, 0xa5, 0xc5, 0xe9, 0xfc, 0x54, 0x61, 0x28, @@ -442,18 +440,16 @@ 0xa0, 0x6c, 0x27, 0xdc, 0xf4, 0x9a, 0xda, 0x62, 0xeb, 0x2b } } }; - int x; - unsigned char buf[20]; + + int i; + unsigned char tmp[20]; hash_state md; - for (x = 0; x < (int)(sizeof(tests)/sizeof(tests[0])); x++) { + for (i = 0; i < (int)(sizeof(tests)/sizeof(tests[0])); i++) { rmd160_init(&md); - rmd160_process(&md, (unsigned char *)tests[x].msg, strlen(tests[x].msg)); - rmd160_done(&md, buf); - if (XMEMCMP(buf, tests[x].md, 20) != 0) { -#if 0 - printf("Failed test %d\n", x); -#endif + rmd160_process(&md, (unsigned char *)tests[i].msg, strlen(tests[i].msg)); + rmd160_done(&md, tmp); + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "RIPEMD160", i)) { return CRYPT_FAIL_TESTVECTOR; } } @@ -464,6 +460,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/rmd256.c --- a/libtomcrypt/src/hashes/rmd256.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/hashes/rmd256.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -20,7 +18,7 @@ const struct ltc_hash_descriptor rmd256_desc = { "rmd256", - 8, + 13, 32, 64, @@ -368,8 +366,8 @@ return CRYPT_NOP; #else static const struct { - char *msg; - unsigned char md[32]; + const char *msg; + unsigned char hash[32]; } tests[] = { { "", { 0x02, 0xba, 0x4c, 0x4e, 0x5f, 0x8e, 0xcd, 0x18, @@ -408,18 +406,16 @@ 0xa8, 0x9f, 0x7e, 0xa6, 0xde, 0x77, 0xa0, 0xb8 } } }; - int x; - unsigned char buf[32]; + + int i; + unsigned char tmp[32]; hash_state md; - for (x = 0; x < (int)(sizeof(tests)/sizeof(tests[0])); x++) { + for (i = 0; i < (int)(sizeof(tests)/sizeof(tests[0])); i++) { rmd256_init(&md); - rmd256_process(&md, (unsigned char *)tests[x].msg, strlen(tests[x].msg)); - rmd256_done(&md, buf); - if (XMEMCMP(buf, tests[x].md, 32) != 0) { - #if 0 - printf("Failed test %d\n", x); - #endif + rmd256_process(&md, (unsigned char *)tests[i].msg, strlen(tests[i].msg)); + rmd256_done(&md, tmp); + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "RIPEMD256", i)) { return CRYPT_FAIL_TESTVECTOR; } } @@ -429,3 +425,6 @@ #endif +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/rmd320.c --- a/libtomcrypt/src/hashes/rmd320.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/hashes/rmd320.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -20,11 +18,12 @@ const struct ltc_hash_descriptor rmd320_desc = { "rmd320", - 9, + 14, 40, 64, - /* OID */ + /* OID ... does not exist + * http://oid-info.com/get/1.3.36.3.2 */ { 0 }, 0, @@ -432,8 +431,8 @@ return CRYPT_NOP; #else static const struct { - char *msg; - unsigned char md[40]; + const char *msg; + unsigned char hash[40]; } tests[] = { { "", { 0x22, 0xd6, 0x5d, 0x56, 0x61, 0x53, 0x6c, 0xdc, 0x75, 0xc1, @@ -472,18 +471,16 @@ 0xbc, 0x74, 0x70, 0xa9, 0x69, 0xc9, 0xd0, 0x72, 0xa1, 0xac } } }; - int x; - unsigned char buf[40]; + + int i; + unsigned char tmp[40]; hash_state md; - for (x = 0; x < (int)(sizeof(tests)/sizeof(tests[0])); x++) { + for (i = 0; i < (int)(sizeof(tests)/sizeof(tests[0])); i++) { rmd320_init(&md); - rmd320_process(&md, (unsigned char *)tests[x].msg, strlen(tests[x].msg)); - rmd320_done(&md, buf); - if (XMEMCMP(buf, tests[x].md, 40) != 0) { -#if 0 - printf("Failed test %d\n", x); -#endif + rmd320_process(&md, (unsigned char *)tests[i].msg, strlen(tests[i].msg)); + rmd320_done(&md, tmp); + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "RIPEMD320", i)) { return CRYPT_FAIL_TESTVECTOR; } } @@ -493,3 +490,6 @@ #endif +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/sha1.c --- a/libtomcrypt/src/hashes/sha1.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/hashes/sha1.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,14 +5,12 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file sha1.c - LTC_SHA1 code by Tom St Denis + LTC_SHA1 code by Tom St Denis */ @@ -66,7 +64,7 @@ /* expand it */ for (i = 16; i < 80; i++) { - W[i] = ROL(W[i-3] ^ W[i-8] ^ W[i-14] ^ W[i-16], 1); + W[i] = ROL(W[i-3] ^ W[i-8] ^ W[i-14] ^ W[i-16], 1); } /* compress */ @@ -75,9 +73,9 @@ #define FF1(a,b,c,d,e,i) e = (ROLc(a, 5) + F1(b,c,d) + e + W[i] + 0x6ed9eba1UL); b = ROLc(b, 30); #define FF2(a,b,c,d,e,i) e = (ROLc(a, 5) + F2(b,c,d) + e + W[i] + 0x8f1bbcdcUL); b = ROLc(b, 30); #define FF3(a,b,c,d,e,i) e = (ROLc(a, 5) + F3(b,c,d) + e + W[i] + 0xca62c1d6UL); b = ROLc(b, 30); - + #ifdef LTC_SMALL_CODE - + for (i = 0; i < 20; ) { FF0(a,b,c,d,e,i++); t = e; e = d; d = c; c = b; b = a; a = t; } @@ -105,7 +103,7 @@ } /* round two */ - for (; i < 40; ) { + for (; i < 40; ) { FF1(a,b,c,d,e,i++); FF1(e,a,b,c,d,i++); FF1(d,e,a,b,c,i++); @@ -114,7 +112,7 @@ } /* round three */ - for (; i < 60; ) { + for (; i < 60; ) { FF2(a,b,c,d,e,i++); FF2(e,a,b,c,d,i++); FF2(d,e,a,b,c,i++); @@ -123,7 +121,7 @@ } /* round four */ - for (; i < 80; ) { + for (; i < 80; ) { FF3(a,b,c,d,e,i++); FF3(e,a,b,c,d,i++); FF3(d,e,a,b,c,i++); @@ -241,14 +239,14 @@ /** Self-test the hash @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled -*/ +*/ int sha1_test(void) { #ifndef LTC_TEST return CRYPT_NOP; - #else + #else static const struct { - char *msg; + const char *msg; unsigned char hash[20]; } tests[] = { { "abc", @@ -271,7 +269,7 @@ sha1_init(&md); sha1_process(&md, (unsigned char*)tests[i].msg, (unsigned long)strlen(tests[i].msg)); sha1_done(&md, tmp); - if (XMEMCMP(tmp, tests[i].hash, 20) != 0) { + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "SHA1", i)) { return CRYPT_FAIL_TESTVECTOR; } } @@ -283,6 +281,6 @@ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/sha2/sha224.c --- a/libtomcrypt/src/hashes/sha2/sha224.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/hashes/sha2/sha224.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,14 +5,16 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @param sha224.c LTC_SHA-224 new NIST standard based off of LTC_SHA-256 truncated to 224 bits (Tom St Denis) */ +#include "tomcrypt.h" + +#if defined(LTC_SHA224) && defined(LTC_SHA256) + const struct ltc_hash_descriptor sha224_desc = { "sha224", @@ -72,21 +74,21 @@ XMEMCPY(out, buf, 28); #ifdef LTC_CLEAN_STACK zeromem(buf, sizeof(buf)); -#endif +#endif return err; } /** Self-test the hash @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled -*/ +*/ int sha224_test(void) { #ifndef LTC_TEST return CRYPT_NOP; - #else + #else static const struct { - char *msg; + const char *msg; unsigned char hash[28]; } tests[] = { { "abc", @@ -111,7 +113,7 @@ sha224_init(&md); sha224_process(&md, (unsigned char*)tests[i].msg, (unsigned long)strlen(tests[i].msg)); sha224_done(&md, tmp); - if (XMEMCMP(tmp, tests[i].hash, 28) != 0) { + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "SHA224", i)) { return CRYPT_FAIL_TESTVECTOR; } } @@ -119,7 +121,9 @@ #endif } +#endif /* defined(LTC_SHA224) && defined(LTC_SHA256) */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/sha2/sha256.c --- a/libtomcrypt/src/hashes/sha2/sha256.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/hashes/sha2/sha256.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,17 +5,15 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file sha256.c - LTC_SHA256 by Tom St Denis + LTC_SHA256 by Tom St Denis */ -#ifdef LTC_SHA256 +#ifdef LTC_SHA256 const struct ltc_hash_descriptor sha256_desc = { @@ -27,7 +25,7 @@ /* OID */ { 2, 16, 840, 1, 101, 3, 4, 2, 1, }, 9, - + &sha256_init, &sha256_process, &sha256_done, @@ -56,7 +54,7 @@ /* Various logical functions */ #define Ch(x,y,z) (z ^ (x & (y ^ z))) -#define Maj(x,y,z) (((x | y) & z) | (x & y)) +#define Maj(x,y,z) (((x | y) & z) | (x & y)) #define S(x, n) RORc((x),(n)) #define R(x, n) (((x)&0xFFFFFFFFUL)>>(n)) #define Sigma0(x) (S(x, 2) ^ S(x, 13) ^ S(x, 22)) @@ -90,10 +88,10 @@ /* fill W[16..63] */ for (i = 16; i < 64; i++) { W[i] = Gamma1(W[i - 2]) + W[i - 7] + Gamma0(W[i - 15]) + W[i - 16]; - } + } /* Compress */ -#ifdef LTC_SMALL_CODE +#ifdef LTC_SMALL_CODE #define RND(a,b,c,d,e,f,g,h,i) \ t0 = h + Sigma1(e) + Ch(e, f, g) + K[i] + W[i]; \ t1 = Sigma0(a) + Maj(a, b, c); \ @@ -102,10 +100,10 @@ for (i = 0; i < 64; ++i) { RND(S[0],S[1],S[2],S[3],S[4],S[5],S[6],S[7],i); - t = S[7]; S[7] = S[6]; S[6] = S[5]; S[5] = S[4]; + t = S[7]; S[7] = S[6]; S[6] = S[5]; S[5] = S[4]; S[4] = S[3]; S[3] = S[2]; S[2] = S[1]; S[1] = S[0]; S[0] = t; - } -#else + } +#else #define RND(a,b,c,d,e,f,g,h,i,ki) \ t0 = h + Sigma1(e) + Ch(e, f, g) + ki + W[i]; \ t1 = Sigma0(a) + Maj(a, b, c); \ @@ -177,9 +175,9 @@ RND(S[2],S[3],S[4],S[5],S[6],S[7],S[0],S[1],62,0xbef9a3f7); RND(S[1],S[2],S[3],S[4],S[5],S[6],S[7],S[0],63,0xc67178f2); -#undef RND - -#endif +#undef RND + +#endif /* feedback */ for (i = 0; i < 8; i++) { @@ -287,14 +285,14 @@ /** Self-test the hash @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled -*/ +*/ int sha256_test(void) { #ifndef LTC_TEST return CRYPT_NOP; - #else + #else static const struct { - char *msg; + const char *msg; unsigned char hash[32]; } tests[] = { { "abc", @@ -304,9 +302,9 @@ 0xb4, 0x10, 0xff, 0x61, 0xf2, 0x00, 0x15, 0xad } }, { "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", - { 0x24, 0x8d, 0x6a, 0x61, 0xd2, 0x06, 0x38, 0xb8, + { 0x24, 0x8d, 0x6a, 0x61, 0xd2, 0x06, 0x38, 0xb8, 0xe5, 0xc0, 0x26, 0x93, 0x0c, 0x3e, 0x60, 0x39, - 0xa3, 0x3c, 0xe4, 0x59, 0x64, 0xff, 0x21, 0x67, + 0xa3, 0x3c, 0xe4, 0x59, 0x64, 0xff, 0x21, 0x67, 0xf6, 0xec, 0xed, 0xd4, 0x19, 0xdb, 0x06, 0xc1 } }, }; @@ -319,7 +317,7 @@ sha256_init(&md); sha256_process(&md, (unsigned char*)tests[i].msg, (unsigned long)strlen(tests[i].msg)); sha256_done(&md, tmp); - if (XMEMCMP(tmp, tests[i].hash, 32) != 0) { + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "SHA256", i)) { return CRYPT_FAIL_TESTVECTOR; } } @@ -327,14 +325,10 @@ #endif } -#ifdef LTC_SHA224 -#include "sha224.c" -#endif - #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/sha2/sha384.c --- a/libtomcrypt/src/hashes/sha2/sha384.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/hashes/sha2/sha384.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,14 +5,16 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/** +/** @param sha384.c LTC_SHA384 hash included in sha512.c, Tom St Denis */ +#include "tomcrypt.h" + +#if defined(LTC_SHA384) && defined(LTC_SHA512) + const struct ltc_hash_descriptor sha384_desc = { "sha384", @@ -81,14 +83,14 @@ /** Self-test the hash @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled -*/ +*/ int sha384_test(void) { #ifndef LTC_TEST return CRYPT_NOP; - #else + #else static const struct { - char *msg; + const char *msg; unsigned char hash[48]; } tests[] = { { "abc", @@ -117,7 +119,7 @@ sha384_init(&md); sha384_process(&md, (unsigned char*)tests[i].msg, (unsigned long)strlen(tests[i].msg)); sha384_done(&md, tmp); - if (XMEMCMP(tmp, tests[i].hash, 48) != 0) { + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "SHA384", i)) { return CRYPT_FAIL_TESTVECTOR; } } @@ -125,11 +127,8 @@ #endif } - - - +#endif /* defined(LTC_SHA384) && defined(LTC_SHA512) */ - -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/sha2/sha512.c --- a/libtomcrypt/src/hashes/sha2/sha512.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/hashes/sha2/sha512.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,14 +5,12 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @param sha512.c - LTC_SHA512 by Tom St Denis + LTC_SHA512 by Tom St Denis */ #ifdef LTC_SHA512 @@ -37,51 +35,51 @@ /* the K array */ static const ulong64 K[80] = { -CONST64(0x428a2f98d728ae22), CONST64(0x7137449123ef65cd), +CONST64(0x428a2f98d728ae22), CONST64(0x7137449123ef65cd), CONST64(0xb5c0fbcfec4d3b2f), CONST64(0xe9b5dba58189dbbc), -CONST64(0x3956c25bf348b538), CONST64(0x59f111f1b605d019), +CONST64(0x3956c25bf348b538), CONST64(0x59f111f1b605d019), CONST64(0x923f82a4af194f9b), CONST64(0xab1c5ed5da6d8118), -CONST64(0xd807aa98a3030242), CONST64(0x12835b0145706fbe), +CONST64(0xd807aa98a3030242), CONST64(0x12835b0145706fbe), CONST64(0x243185be4ee4b28c), CONST64(0x550c7dc3d5ffb4e2), -CONST64(0x72be5d74f27b896f), CONST64(0x80deb1fe3b1696b1), +CONST64(0x72be5d74f27b896f), CONST64(0x80deb1fe3b1696b1), CONST64(0x9bdc06a725c71235), CONST64(0xc19bf174cf692694), -CONST64(0xe49b69c19ef14ad2), CONST64(0xefbe4786384f25e3), +CONST64(0xe49b69c19ef14ad2), CONST64(0xefbe4786384f25e3), CONST64(0x0fc19dc68b8cd5b5), CONST64(0x240ca1cc77ac9c65), -CONST64(0x2de92c6f592b0275), CONST64(0x4a7484aa6ea6e483), +CONST64(0x2de92c6f592b0275), CONST64(0x4a7484aa6ea6e483), CONST64(0x5cb0a9dcbd41fbd4), CONST64(0x76f988da831153b5), -CONST64(0x983e5152ee66dfab), CONST64(0xa831c66d2db43210), +CONST64(0x983e5152ee66dfab), CONST64(0xa831c66d2db43210), CONST64(0xb00327c898fb213f), CONST64(0xbf597fc7beef0ee4), -CONST64(0xc6e00bf33da88fc2), CONST64(0xd5a79147930aa725), +CONST64(0xc6e00bf33da88fc2), CONST64(0xd5a79147930aa725), CONST64(0x06ca6351e003826f), CONST64(0x142929670a0e6e70), -CONST64(0x27b70a8546d22ffc), CONST64(0x2e1b21385c26c926), +CONST64(0x27b70a8546d22ffc), CONST64(0x2e1b21385c26c926), CONST64(0x4d2c6dfc5ac42aed), CONST64(0x53380d139d95b3df), -CONST64(0x650a73548baf63de), CONST64(0x766a0abb3c77b2a8), +CONST64(0x650a73548baf63de), CONST64(0x766a0abb3c77b2a8), CONST64(0x81c2c92e47edaee6), CONST64(0x92722c851482353b), CONST64(0xa2bfe8a14cf10364), CONST64(0xa81a664bbc423001), CONST64(0xc24b8b70d0f89791), CONST64(0xc76c51a30654be30), -CONST64(0xd192e819d6ef5218), CONST64(0xd69906245565a910), +CONST64(0xd192e819d6ef5218), CONST64(0xd69906245565a910), CONST64(0xf40e35855771202a), CONST64(0x106aa07032bbd1b8), -CONST64(0x19a4c116b8d2d0c8), CONST64(0x1e376c085141ab53), +CONST64(0x19a4c116b8d2d0c8), CONST64(0x1e376c085141ab53), CONST64(0x2748774cdf8eeb99), CONST64(0x34b0bcb5e19b48a8), -CONST64(0x391c0cb3c5c95a63), CONST64(0x4ed8aa4ae3418acb), +CONST64(0x391c0cb3c5c95a63), CONST64(0x4ed8aa4ae3418acb), CONST64(0x5b9cca4f7763e373), CONST64(0x682e6ff3d6b2b8a3), -CONST64(0x748f82ee5defb2fc), CONST64(0x78a5636f43172f60), +CONST64(0x748f82ee5defb2fc), CONST64(0x78a5636f43172f60), CONST64(0x84c87814a1f0ab72), CONST64(0x8cc702081a6439ec), -CONST64(0x90befffa23631e28), CONST64(0xa4506cebde82bde9), +CONST64(0x90befffa23631e28), CONST64(0xa4506cebde82bde9), CONST64(0xbef9a3f7b2c67915), CONST64(0xc67178f2e372532b), -CONST64(0xca273eceea26619c), CONST64(0xd186b8c721c0c207), +CONST64(0xca273eceea26619c), CONST64(0xd186b8c721c0c207), CONST64(0xeada7dd6cde0eb1e), CONST64(0xf57d4f7fee6ed178), -CONST64(0x06f067aa72176fba), CONST64(0x0a637dc5a2c898a6), +CONST64(0x06f067aa72176fba), CONST64(0x0a637dc5a2c898a6), CONST64(0x113f9804bef90dae), CONST64(0x1b710b35131c471b), -CONST64(0x28db77f523047d84), CONST64(0x32caab7b40c72493), +CONST64(0x28db77f523047d84), CONST64(0x32caab7b40c72493), CONST64(0x3c9ebe0a15c9bebc), CONST64(0x431d67c49c100d4c), -CONST64(0x4cc5d4becb3e42b6), CONST64(0x597f299cfc657e2a), +CONST64(0x4cc5d4becb3e42b6), CONST64(0x597f299cfc657e2a), CONST64(0x5fcb6fab3ad6faec), CONST64(0x6c44198c4a475817) }; /* Various logical functions */ #define Ch(x,y,z) (z ^ (x & (y ^ z))) -#define Maj(x,y,z) (((x | y) & z) | (x & y)) +#define Maj(x,y,z) (((x | y) & z) | (x & y)) #define S(x, n) ROR64c(x, n) #define R(x, n) (((x)&CONST64(0xFFFFFFFFFFFFFFFF))>>((ulong64)n)) #define Sigma0(x) (S(x, 28) ^ S(x, 34) ^ S(x, 39)) @@ -112,7 +110,7 @@ /* fill W[16..79] */ for (i = 16; i < 80; i++) { W[i] = Gamma1(W[i - 2]) + W[i - 7] + Gamma0(W[i - 15]) + W[i - 16]; - } + } /* Compress */ #ifdef LTC_SMALL_CODE @@ -135,17 +133,17 @@ d += t0; \ h = t0 + t1; - for (i = 0; i < 80; i += 8) { - RND(S[0],S[1],S[2],S[3],S[4],S[5],S[6],S[7],i+0); - RND(S[7],S[0],S[1],S[2],S[3],S[4],S[5],S[6],i+1); - RND(S[6],S[7],S[0],S[1],S[2],S[3],S[4],S[5],i+2); - RND(S[5],S[6],S[7],S[0],S[1],S[2],S[3],S[4],i+3); - RND(S[4],S[5],S[6],S[7],S[0],S[1],S[2],S[3],i+4); - RND(S[3],S[4],S[5],S[6],S[7],S[0],S[1],S[2],i+5); - RND(S[2],S[3],S[4],S[5],S[6],S[7],S[0],S[1],i+6); - RND(S[1],S[2],S[3],S[4],S[5],S[6],S[7],S[0],i+7); - } -#endif + for (i = 0; i < 80; i += 8) { + RND(S[0],S[1],S[2],S[3],S[4],S[5],S[6],S[7],i+0); + RND(S[7],S[0],S[1],S[2],S[3],S[4],S[5],S[6],i+1); + RND(S[6],S[7],S[0],S[1],S[2],S[3],S[4],S[5],i+2); + RND(S[5],S[6],S[7],S[0],S[1],S[2],S[3],S[4],i+3); + RND(S[4],S[5],S[6],S[7],S[0],S[1],S[2],S[3],i+4); + RND(S[3],S[4],S[5],S[6],S[7],S[0],S[1],S[2],i+5); + RND(S[2],S[3],S[4],S[5],S[6],S[7],S[0],S[1],i+6); + RND(S[1],S[2],S[3],S[4],S[5],S[6],S[7],S[0],i+7); + } +#endif /* feedback */ @@ -232,7 +230,7 @@ md->sha512.curlen = 0; } - /* pad upto 120 bytes of zeroes + /* pad upto 120 bytes of zeroes * note: that from 112 to 120 is the 64 MSB of the length. We assume that you won't hash * > 2^64 bits of data... :-) */ @@ -257,14 +255,14 @@ /** Self-test the hash @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled -*/ +*/ int sha512_test(void) { #ifndef LTC_TEST return CRYPT_NOP; - #else + #else static const struct { - char *msg; + const char *msg; unsigned char hash[64]; } tests[] = { { "abc", @@ -297,7 +295,7 @@ sha512_init(&md); sha512_process(&md, (unsigned char *)tests[i].msg, (unsigned long)strlen(tests[i].msg)); sha512_done(&md, tmp); - if (XMEMCMP(tmp, tests[i].hash, 64) != 0) { + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "SHA512", i)) { return CRYPT_FAIL_TESTVECTOR; } } @@ -305,15 +303,11 @@ #endif } -#ifdef LTC_SHA384 - #include "sha384.c" -#endif - #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/sha2/sha512_224.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/hashes/sha2/sha512_224.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,130 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +/** + @param sha512_224.c + SHA512/224 hash included in sha512.c +*/ + +#include "tomcrypt.h" + +#if defined(LTC_SHA512_224) && defined(LTC_SHA512) + +const struct ltc_hash_descriptor sha512_224_desc = +{ + "sha512-224", + 15, + 28, + 128, + + /* OID */ + { 2, 16, 840, 1, 101, 3, 4, 2, 5, }, + 9, + + &sha512_224_init, + &sha512_process, + &sha512_224_done, + &sha512_224_test, + NULL +}; + +/** + Initialize the hash state + @param md The hash state you wish to initialize + @return CRYPT_OK if successful +*/ +int sha512_224_init(hash_state * md) +{ + LTC_ARGCHK(md != NULL); + + md->sha512.curlen = 0; + md->sha512.length = 0; + md->sha512.state[0] = CONST64(0x8C3D37C819544DA2); + md->sha512.state[1] = CONST64(0x73E1996689DCD4D6); + md->sha512.state[2] = CONST64(0x1DFAB7AE32FF9C82); + md->sha512.state[3] = CONST64(0x679DD514582F9FCF); + md->sha512.state[4] = CONST64(0x0F6D2B697BD44DA8); + md->sha512.state[5] = CONST64(0x77E36F7304C48942); + md->sha512.state[6] = CONST64(0x3F9D85A86A1D36C8); + md->sha512.state[7] = CONST64(0x1112E6AD91D692A1); + return CRYPT_OK; +} + +/** + Terminate the hash to get the digest + @param md The hash state + @param out [out] The destination of the hash (48 bytes) + @return CRYPT_OK if successful +*/ +int sha512_224_done(hash_state * md, unsigned char *out) +{ + unsigned char buf[64]; + + LTC_ARGCHK(md != NULL); + LTC_ARGCHK(out != NULL); + + if (md->sha512.curlen >= sizeof(md->sha512.buf)) { + return CRYPT_INVALID_ARG; + } + + sha512_done(md, buf); + XMEMCPY(out, buf, 28); +#ifdef LTC_CLEAN_STACK + zeromem(buf, sizeof(buf)); +#endif + return CRYPT_OK; +} + +/** + Self-test the hash + @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled +*/ +int sha512_224_test(void) +{ + #ifndef LTC_TEST + return CRYPT_NOP; + #else + static const struct { + const char *msg; + unsigned char hash[28]; + } tests[] = { + { "abc", + { 0x46, 0x34, 0x27, 0x0F, 0x70, 0x7B, 0x6A, 0x54, + 0xDA, 0xAE, 0x75, 0x30, 0x46, 0x08, 0x42, 0xE2, + 0x0E, 0x37, 0xED, 0x26, 0x5C, 0xEE, 0xE9, 0xA4, + 0x3E, 0x89, 0x24, 0xAA } + }, + { "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", + { 0x23, 0xFE, 0xC5, 0xBB, 0x94, 0xD6, 0x0B, 0x23, + 0x30, 0x81, 0x92, 0x64, 0x0B, 0x0C, 0x45, 0x33, + 0x35, 0xD6, 0x64, 0x73, 0x4F, 0xE4, 0x0E, 0x72, + 0x68, 0x67, 0x4A, 0xF9 } + }, + }; + + int i; + unsigned char tmp[28]; + hash_state md; + + for (i = 0; i < (int)(sizeof(tests) / sizeof(tests[0])); i++) { + sha512_224_init(&md); + sha512_224_process(&md, (unsigned char*)tests[i].msg, (unsigned long)strlen(tests[i].msg)); + sha512_224_done(&md, tmp); + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "SHA512-224", i)) { + return CRYPT_FAIL_TESTVECTOR; + } + } + return CRYPT_OK; + #endif +} + +#endif /* defined(LTC_SHA384) && defined(LTC_SHA512) */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/sha2/sha512_256.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/hashes/sha2/sha512_256.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,130 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +/** + @param sha512_256.c + SHA512/256 hash included in sha512.c +*/ + +#include "tomcrypt.h" + +#if defined(LTC_SHA512_256) && defined(LTC_SHA512) + +const struct ltc_hash_descriptor sha512_256_desc = +{ + "sha512-256", + 16, + 32, + 128, + + /* OID */ + { 2, 16, 840, 1, 101, 3, 4, 2, 6, }, + 9, + + &sha512_256_init, + &sha512_process, + &sha512_256_done, + &sha512_256_test, + NULL +}; + +/** + Initialize the hash state + @param md The hash state you wish to initialize + @return CRYPT_OK if successful +*/ +int sha512_256_init(hash_state * md) +{ + LTC_ARGCHK(md != NULL); + + md->sha512.curlen = 0; + md->sha512.length = 0; + md->sha512.state[0] = CONST64(0x22312194FC2BF72C); + md->sha512.state[1] = CONST64(0x9F555FA3C84C64C2); + md->sha512.state[2] = CONST64(0x2393B86B6F53B151); + md->sha512.state[3] = CONST64(0x963877195940EABD); + md->sha512.state[4] = CONST64(0x96283EE2A88EFFE3); + md->sha512.state[5] = CONST64(0xBE5E1E2553863992); + md->sha512.state[6] = CONST64(0x2B0199FC2C85B8AA); + md->sha512.state[7] = CONST64(0x0EB72DDC81C52CA2); + return CRYPT_OK; +} + +/** + Terminate the hash to get the digest + @param md The hash state + @param out [out] The destination of the hash (48 bytes) + @return CRYPT_OK if successful +*/ +int sha512_256_done(hash_state * md, unsigned char *out) +{ + unsigned char buf[64]; + + LTC_ARGCHK(md != NULL); + LTC_ARGCHK(out != NULL); + + if (md->sha512.curlen >= sizeof(md->sha512.buf)) { + return CRYPT_INVALID_ARG; + } + + sha512_done(md, buf); + XMEMCPY(out, buf, 32); +#ifdef LTC_CLEAN_STACK + zeromem(buf, sizeof(buf)); +#endif + return CRYPT_OK; +} + +/** + Self-test the hash + @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled +*/ +int sha512_256_test(void) +{ + #ifndef LTC_TEST + return CRYPT_NOP; + #else + static const struct { + const char *msg; + unsigned char hash[32]; + } tests[] = { + { "abc", + { 0x53, 0x04, 0x8E, 0x26, 0x81, 0x94, 0x1E, 0xF9, + 0x9B, 0x2E, 0x29, 0xB7, 0x6B, 0x4C, 0x7D, 0xAB, + 0xE4, 0xC2, 0xD0, 0xC6, 0x34, 0xFC, 0x6D, 0x46, + 0xE0, 0xE2, 0xF1, 0x31, 0x07, 0xE7, 0xAF, 0x23 } + }, + { "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", + { 0x39, 0x28, 0xE1, 0x84, 0xFB, 0x86, 0x90, 0xF8, + 0x40, 0xDA, 0x39, 0x88, 0x12, 0x1D, 0x31, 0xBE, + 0x65, 0xCB, 0x9D, 0x3E, 0xF8, 0x3E, 0xE6, 0x14, + 0x6F, 0xEA, 0xC8, 0x61, 0xE1, 0x9B, 0x56, 0x3A } + }, + }; + + int i; + unsigned char tmp[32]; + hash_state md; + + for (i = 0; i < (int)(sizeof(tests) / sizeof(tests[0])); i++) { + sha512_256_init(&md); + sha512_256_process(&md, (unsigned char*)tests[i].msg, (unsigned long)strlen(tests[i].msg)); + sha512_256_done(&md, tmp); + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "SHA512-265", i)) { + return CRYPT_FAIL_TESTVECTOR; + } + } + return CRYPT_OK; + #endif +} + +#endif /* defined(LTC_SHA384) && defined(LTC_SHA512) */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/sha3.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/hashes/sha3.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,306 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/* based on https://github.com/brainhub/SHA3IUF (public domain) */ + +#include "tomcrypt.h" + +#ifdef LTC_SHA3 + +const struct ltc_hash_descriptor sha3_224_desc = +{ + "sha3-224", /* name of hash */ + 17, /* internal ID */ + 28, /* Size of digest in octets */ + 144, /* Input block size in octets */ + { 2,16,840,1,101,3,4,2,7 }, /* ASN.1 OID */ + 9, /* Length OID */ + &sha3_224_init, + &sha3_process, + &sha3_done, + &sha3_224_test, + NULL +}; + +const struct ltc_hash_descriptor sha3_256_desc = +{ + "sha3-256", /* name of hash */ + 18, /* internal ID */ + 32, /* Size of digest in octets */ + 136, /* Input block size in octets */ + { 2,16,840,1,101,3,4,2,8 }, /* ASN.1 OID */ + 9, /* Length OID */ + &sha3_256_init, + &sha3_process, + &sha3_done, + &sha3_256_test, + NULL +}; + +const struct ltc_hash_descriptor sha3_384_desc = +{ + "sha3-384", /* name of hash */ + 19, /* internal ID */ + 48, /* Size of digest in octets */ + 104, /* Input block size in octets */ + { 2,16,840,1,101,3,4,2,9 }, /* ASN.1 OID */ + 9, /* Length OID */ + &sha3_384_init, + &sha3_process, + &sha3_done, + &sha3_384_test, + NULL +}; + +const struct ltc_hash_descriptor sha3_512_desc = +{ + "sha3-512", /* name of hash */ + 20, /* internal ID */ + 64, /* Size of digest in octets */ + 72, /* Input block size in octets */ + { 2,16,840,1,101,3,4,2,10 }, /* ASN.1 OID */ + 9, /* Length OID */ + &sha3_512_init, + &sha3_process, + &sha3_done, + &sha3_512_test, + NULL +}; + +#define SHA3_KECCAK_SPONGE_WORDS 25 /* 1600 bits > 200 bytes > 25 x ulong64 */ +#define SHA3_KECCAK_ROUNDS 24 + +static const ulong64 keccakf_rndc[24] = { + CONST64(0x0000000000000001), CONST64(0x0000000000008082), + CONST64(0x800000000000808a), CONST64(0x8000000080008000), + CONST64(0x000000000000808b), CONST64(0x0000000080000001), + CONST64(0x8000000080008081), CONST64(0x8000000000008009), + CONST64(0x000000000000008a), CONST64(0x0000000000000088), + CONST64(0x0000000080008009), CONST64(0x000000008000000a), + CONST64(0x000000008000808b), CONST64(0x800000000000008b), + CONST64(0x8000000000008089), CONST64(0x8000000000008003), + CONST64(0x8000000000008002), CONST64(0x8000000000000080), + CONST64(0x000000000000800a), CONST64(0x800000008000000a), + CONST64(0x8000000080008081), CONST64(0x8000000000008080), + CONST64(0x0000000080000001), CONST64(0x8000000080008008) +}; + +static const unsigned keccakf_rotc[24] = { + 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 2, 14, 27, 41, 56, 8, 25, 43, 62, 18, 39, 61, 20, 44 +}; + +static const unsigned keccakf_piln[24] = { + 10, 7, 11, 17, 18, 3, 5, 16, 8, 21, 24, 4, 15, 23, 19, 13, 12, 2, 20, 14, 22, 9, 6, 1 +}; + +static void keccakf(ulong64 s[25]) +{ + int i, j, round; + ulong64 t, bc[5]; + + for(round = 0; round < SHA3_KECCAK_ROUNDS; round++) { + /* Theta */ + for(i = 0; i < 5; i++) + bc[i] = s[i] ^ s[i + 5] ^ s[i + 10] ^ s[i + 15] ^ s[i + 20]; + + for(i = 0; i < 5; i++) { + t = bc[(i + 4) % 5] ^ ROL64(bc[(i + 1) % 5], 1); + for(j = 0; j < 25; j += 5) + s[j + i] ^= t; + } + /* Rho Pi */ + t = s[1]; + for(i = 0; i < 24; i++) { + j = keccakf_piln[i]; + bc[0] = s[j]; + s[j] = ROL64(t, keccakf_rotc[i]); + t = bc[0]; + } + /* Chi */ + for(j = 0; j < 25; j += 5) { + for(i = 0; i < 5; i++) + bc[i] = s[j + i]; + for(i = 0; i < 5; i++) + s[j + i] ^= (~bc[(i + 1) % 5]) & bc[(i + 2) % 5]; + } + /* Iota */ + s[0] ^= keccakf_rndc[round]; + } +} + +/* Public Inteface */ + +int sha3_224_init(hash_state *md) +{ + LTC_ARGCHK(md != NULL); + XMEMSET(&md->sha3, 0, sizeof(md->sha3)); + md->sha3.capacity_words = 2 * 224 / (8 * sizeof(ulong64)); + return CRYPT_OK; +} + +int sha3_256_init(hash_state *md) +{ + LTC_ARGCHK(md != NULL); + XMEMSET(&md->sha3, 0, sizeof(md->sha3)); + md->sha3.capacity_words = 2 * 256 / (8 * sizeof(ulong64)); + return CRYPT_OK; +} + +int sha3_384_init(hash_state *md) +{ + LTC_ARGCHK(md != NULL); + XMEMSET(&md->sha3, 0, sizeof(md->sha3)); + md->sha3.capacity_words = 2 * 384 / (8 * sizeof(ulong64)); + return CRYPT_OK; +} + +int sha3_512_init(hash_state *md) +{ + LTC_ARGCHK(md != NULL); + XMEMSET(&md->sha3, 0, sizeof(md->sha3)); + md->sha3.capacity_words = 2 * 512 / (8 * sizeof(ulong64)); + return CRYPT_OK; +} + +int sha3_shake_init(hash_state *md, int num) +{ + LTC_ARGCHK(md != NULL); + if (num != 128 && num != 256) return CRYPT_INVALID_ARG; + XMEMSET(&md->sha3, 0, sizeof(md->sha3)); + md->sha3.capacity_words = (unsigned short)(2 * num / (8 * sizeof(ulong64))); + return CRYPT_OK; +} + +int sha3_process(hash_state *md, const unsigned char *in, unsigned long inlen) +{ + /* 0...7 -- how much is needed to have a word */ + unsigned old_tail = (8 - md->sha3.byte_index) & 7; + + unsigned long words; + unsigned tail; + unsigned long i; + + if (inlen == 0) return CRYPT_OK; /* nothing to do */ + LTC_ARGCHK(md != NULL); + LTC_ARGCHK(in != NULL); + + if(inlen < old_tail) { /* have no complete word or haven't started the word yet */ + while (inlen--) md->sha3.saved |= (ulong64) (*(in++)) << ((md->sha3.byte_index++) * 8); + return CRYPT_OK; + } + + if(old_tail) { /* will have one word to process */ + inlen -= old_tail; + while (old_tail--) md->sha3.saved |= (ulong64) (*(in++)) << ((md->sha3.byte_index++) * 8); + /* now ready to add saved to the sponge */ + md->sha3.s[md->sha3.word_index] ^= md->sha3.saved; + md->sha3.byte_index = 0; + md->sha3.saved = 0; + if(++md->sha3.word_index == (SHA3_KECCAK_SPONGE_WORDS - md->sha3.capacity_words)) { + keccakf(md->sha3.s); + md->sha3.word_index = 0; + } + } + + /* now work in full words directly from input */ + words = inlen / sizeof(ulong64); + tail = inlen - words * sizeof(ulong64); + + for(i = 0; i < words; i++, in += sizeof(ulong64)) { + ulong64 t; + LOAD64L(t, in); + md->sha3.s[md->sha3.word_index] ^= t; + if(++md->sha3.word_index == (SHA3_KECCAK_SPONGE_WORDS - md->sha3.capacity_words)) { + keccakf(md->sha3.s); + md->sha3.word_index = 0; + } + } + + /* finally, save the partial word */ + while (tail--) { + md->sha3.saved |= (ulong64) (*(in++)) << ((md->sha3.byte_index++) * 8); + } + return CRYPT_OK; +} + +int sha3_done(hash_state *md, unsigned char *hash) +{ + unsigned i; + + LTC_ARGCHK(md != NULL); + LTC_ARGCHK(hash != NULL); + + md->sha3.s[md->sha3.word_index] ^= (md->sha3.saved ^ (CONST64(0x06) << (md->sha3.byte_index * 8))); + md->sha3.s[SHA3_KECCAK_SPONGE_WORDS - md->sha3.capacity_words - 1] ^= CONST64(0x8000000000000000); + keccakf(md->sha3.s); + + /* store sha3.s[] as little-endian bytes into sha3.sb */ + for(i = 0; i < SHA3_KECCAK_SPONGE_WORDS; i++) { + STORE64L(md->sha3.s[i], md->sha3.sb + i * 8); + } + + XMEMCPY(hash, md->sha3.sb, md->sha3.capacity_words * 4); + return CRYPT_OK; +} + +int sha3_shake_done(hash_state *md, unsigned char *out, unsigned long outlen) +{ + /* IMPORTANT NOTE: sha3_shake_done can be called many times */ + unsigned long idx; + unsigned i; + + if (outlen == 0) return CRYPT_OK; /* nothing to do */ + LTC_ARGCHK(md != NULL); + LTC_ARGCHK(out != NULL); + + if (!md->sha3.xof_flag) { + /* shake_xof operation must be done only once */ + md->sha3.s[md->sha3.word_index] ^= (md->sha3.saved ^ (CONST64(0x1F) << (md->sha3.byte_index * 8))); + md->sha3.s[SHA3_KECCAK_SPONGE_WORDS - md->sha3.capacity_words - 1] ^= CONST64(0x8000000000000000); + keccakf(md->sha3.s); + /* store sha3.s[] as little-endian bytes into sha3.sb */ + for(i = 0; i < SHA3_KECCAK_SPONGE_WORDS; i++) { + STORE64L(md->sha3.s[i], md->sha3.sb + i * 8); + } + md->sha3.byte_index = 0; + md->sha3.xof_flag = 1; + } + + for (idx = 0; idx < outlen; idx++) { + if(md->sha3.byte_index >= (SHA3_KECCAK_SPONGE_WORDS - md->sha3.capacity_words) * 8) { + keccakf(md->sha3.s); + /* store sha3.s[] as little-endian bytes into sha3.sb */ + for(i = 0; i < SHA3_KECCAK_SPONGE_WORDS; i++) { + STORE64L(md->sha3.s[i], md->sha3.sb + i * 8); + } + md->sha3.byte_index = 0; + } + out[idx] = md->sha3.sb[md->sha3.byte_index++]; + } + return CRYPT_OK; +} + +int sha3_shake_memory(int num, const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen) +{ + hash_state md; + int err; + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(out != NULL); + LTC_ARGCHK(outlen != NULL); + if ((err = sha3_shake_init(&md, num)) != CRYPT_OK) return err; + if ((err = sha3_shake_process(&md, in, inlen)) != CRYPT_OK) return err; + if ((err = sha3_shake_done(&md, out, *outlen)) != CRYPT_OK) return err; + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/sha3_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/hashes/sha3_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,401 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/* based on https://github.com/brainhub/SHA3IUF (public domain) */ + +#include "tomcrypt.h" + +#ifdef LTC_SHA3 + +int sha3_224_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + unsigned char buf[200], hash[224 / 8]; + int i; + hash_state c; + const unsigned char c1 = 0xa3; + + const unsigned char sha3_224_empty[224 / 8] = { + 0x6b, 0x4e, 0x03, 0x42, 0x36, 0x67, 0xdb, 0xb7, + 0x3b, 0x6e, 0x15, 0x45, 0x4f, 0x0e, 0xb1, 0xab, + 0xd4, 0x59, 0x7f, 0x9a, 0x1b, 0x07, 0x8e, 0x3f, + 0x5b, 0x5a, 0x6b, 0xc7 + }; + + const unsigned char sha3_224_0xa3_200_times[224 / 8] = { + 0x93, 0x76, 0x81, 0x6a, 0xba, 0x50, 0x3f, 0x72, + 0xf9, 0x6c, 0xe7, 0xeb, 0x65, 0xac, 0x09, 0x5d, + 0xee, 0xe3, 0xbe, 0x4b, 0xf9, 0xbb, 0xc2, 0xa1, + 0xcb, 0x7e, 0x11, 0xe0 + }; + + XMEMSET(buf, c1, sizeof(buf)); + + /* SHA3-224 on an empty buffer */ + sha3_224_init(&c); + sha3_done(&c, hash); + if (compare_testvector(hash, sizeof(hash), sha3_224_empty, sizeof(sha3_224_empty), "SHA3-224", 0)) { + return CRYPT_FAIL_TESTVECTOR; + } + + /* SHA3-224 in two steps. [FIPS 202] */ + sha3_224_init(&c); + sha3_process(&c, buf, sizeof(buf) / 2); + sha3_process(&c, buf + sizeof(buf) / 2, sizeof(buf) / 2); + sha3_done(&c, hash); + if (compare_testvector(hash, sizeof(hash), sha3_224_0xa3_200_times, sizeof(sha3_224_0xa3_200_times), "SHA3-224", 1)) { + return CRYPT_FAIL_TESTVECTOR; + } + + /* SHA3-224 byte-by-byte: 200 steps. [FIPS 202] */ + i = 200; + sha3_224_init(&c); + while (i--) { + sha3_process(&c, &c1, 1); + } + sha3_done(&c, hash); + if (compare_testvector(hash, sizeof(hash), sha3_224_0xa3_200_times, sizeof(sha3_224_0xa3_200_times), "SHA3-224", 2)) { + return CRYPT_FAIL_TESTVECTOR; + } + + return CRYPT_OK; +#endif +} + +int sha3_256_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + unsigned char buf[200], hash[256 / 8]; + int i; + hash_state c; + const unsigned char c1 = 0xa3; + + const unsigned char sha3_256_empty[256 / 8] = { + 0xa7, 0xff, 0xc6, 0xf8, 0xbf, 0x1e, 0xd7, 0x66, + 0x51, 0xc1, 0x47, 0x56, 0xa0, 0x61, 0xd6, 0x62, + 0xf5, 0x80, 0xff, 0x4d, 0xe4, 0x3b, 0x49, 0xfa, + 0x82, 0xd8, 0x0a, 0x4b, 0x80, 0xf8, 0x43, 0x4a + }; + const unsigned char sha3_256_0xa3_200_times[256 / 8] = { + 0x79, 0xf3, 0x8a, 0xde, 0xc5, 0xc2, 0x03, 0x07, + 0xa9, 0x8e, 0xf7, 0x6e, 0x83, 0x24, 0xaf, 0xbf, + 0xd4, 0x6c, 0xfd, 0x81, 0xb2, 0x2e, 0x39, 0x73, + 0xc6, 0x5f, 0xa1, 0xbd, 0x9d, 0xe3, 0x17, 0x87 + }; + + XMEMSET(buf, c1, sizeof(buf)); + + /* SHA3-256 on an empty buffer */ + sha3_256_init(&c); + sha3_done(&c, hash); + if (compare_testvector(hash, sizeof(hash), sha3_256_empty, sizeof(sha3_256_empty), "SHA3-256", 0)) { + return CRYPT_FAIL_TESTVECTOR; + } + + /* SHA3-256 as a single buffer. [FIPS 202] */ + sha3_256_init(&c); + sha3_process(&c, buf, sizeof(buf)); + sha3_done(&c, hash); + if (compare_testvector(hash, sizeof(hash), sha3_256_0xa3_200_times, sizeof(sha3_256_0xa3_200_times), "SHA3-256", 1)) { + return CRYPT_FAIL_TESTVECTOR; + } + + /* SHA3-256 in two steps. [FIPS 202] */ + sha3_256_init(&c); + sha3_process(&c, buf, sizeof(buf) / 2); + sha3_process(&c, buf + sizeof(buf) / 2, sizeof(buf) / 2); + sha3_done(&c, hash); + if (compare_testvector(hash, sizeof(hash), sha3_256_0xa3_200_times, sizeof(sha3_256_0xa3_200_times), "SHA3-256", 2)) { + return CRYPT_FAIL_TESTVECTOR; + } + + /* SHA3-256 byte-by-byte: 200 steps. [FIPS 202] */ + i = 200; + sha3_256_init(&c); + while (i--) { + sha3_process(&c, &c1, 1); + } + sha3_done(&c, hash); + if (compare_testvector(hash, sizeof(hash), sha3_256_0xa3_200_times, sizeof(sha3_256_0xa3_200_times), "SHA3-256", 3)) { + return CRYPT_FAIL_TESTVECTOR; + } + + /* SHA3-256 byte-by-byte: 135 bytes. Input from [Keccak]. Output + * matched with sha3sum. */ + sha3_256_init(&c); + sha3_process(&c, (unsigned char*) + "\xb7\x71\xd5\xce\xf5\xd1\xa4\x1a" + "\x93\xd1\x56\x43\xd7\x18\x1d\x2a" + "\x2e\xf0\xa8\xe8\x4d\x91\x81\x2f" + "\x20\xed\x21\xf1\x47\xbe\xf7\x32" + "\xbf\x3a\x60\xef\x40\x67\xc3\x73" + "\x4b\x85\xbc\x8c\xd4\x71\x78\x0f" + "\x10\xdc\x9e\x82\x91\xb5\x83\x39" + "\xa6\x77\xb9\x60\x21\x8f\x71\xe7" + "\x93\xf2\x79\x7a\xea\x34\x94\x06" + "\x51\x28\x29\x06\x5d\x37\xbb\x55" + "\xea\x79\x6f\xa4\xf5\x6f\xd8\x89" + "\x6b\x49\xb2\xcd\x19\xb4\x32\x15" + "\xad\x96\x7c\x71\x2b\x24\xe5\x03" + "\x2d\x06\x52\x32\xe0\x2c\x12\x74" + "\x09\xd2\xed\x41\x46\xb9\xd7\x5d" + "\x76\x3d\x52\xdb\x98\xd9\x49\xd3" + "\xb0\xfe\xd6\xa8\x05\x2f\xbb", 1080 / 8); + sha3_done(&c, hash); + if(compare_testvector(hash, sizeof(hash), + "\xa1\x9e\xee\x92\xbb\x20\x97\xb6" + "\x4e\x82\x3d\x59\x77\x98\xaa\x18" + "\xbe\x9b\x7c\x73\x6b\x80\x59\xab" + "\xfd\x67\x79\xac\x35\xac\x81\xb5", 256 / 8, "SHA3-256", 4)) { + return CRYPT_FAIL_TESTVECTOR; + } + + return CRYPT_OK; +#endif +} + +int sha3_384_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + unsigned char buf[200], hash[384 / 8]; + int i; + hash_state c; + const unsigned char c1 = 0xa3; + + const unsigned char sha3_384_0xa3_200_times[384 / 8] = { + 0x18, 0x81, 0xde, 0x2c, 0xa7, 0xe4, 0x1e, 0xf9, + 0x5d, 0xc4, 0x73, 0x2b, 0x8f, 0x5f, 0x00, 0x2b, + 0x18, 0x9c, 0xc1, 0xe4, 0x2b, 0x74, 0x16, 0x8e, + 0xd1, 0x73, 0x26, 0x49, 0xce, 0x1d, 0xbc, 0xdd, + 0x76, 0x19, 0x7a, 0x31, 0xfd, 0x55, 0xee, 0x98, + 0x9f, 0x2d, 0x70, 0x50, 0xdd, 0x47, 0x3e, 0x8f + }; + + XMEMSET(buf, c1, sizeof(buf)); + + /* SHA3-384 as a single buffer. [FIPS 202] */ + sha3_384_init(&c); + sha3_process(&c, buf, sizeof(buf)); + sha3_done(&c, hash); + if (compare_testvector(hash, sizeof(hash), sha3_384_0xa3_200_times, sizeof(sha3_384_0xa3_200_times), "SHA3-384", 0)) { + return CRYPT_FAIL_TESTVECTOR; + } + + /* SHA3-384 in two steps. [FIPS 202] */ + sha3_384_init(&c); + sha3_process(&c, buf, sizeof(buf) / 2); + sha3_process(&c, buf + sizeof(buf) / 2, sizeof(buf) / 2); + sha3_done(&c, hash); + if (compare_testvector(hash, sizeof(hash), sha3_384_0xa3_200_times, sizeof(sha3_384_0xa3_200_times), "SHA3-384", 1)) { + return CRYPT_FAIL_TESTVECTOR; + } + + /* SHA3-384 byte-by-byte: 200 steps. [FIPS 202] */ + i = 200; + sha3_384_init(&c); + while (i--) { + sha3_process(&c, &c1, 1); + } + sha3_done(&c, hash); + if (compare_testvector(hash, sizeof(hash), sha3_384_0xa3_200_times, sizeof(sha3_384_0xa3_200_times), "SHA3-384", 2)) { + return CRYPT_FAIL_TESTVECTOR; + } + + return CRYPT_OK; +#endif +} + +int sha3_512_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + unsigned char buf[200], hash[512 / 8]; + int i; + hash_state c; + const unsigned char c1 = 0xa3; + + const unsigned char sha3_512_0xa3_200_times[512 / 8] = { + 0xe7, 0x6d, 0xfa, 0xd2, 0x20, 0x84, 0xa8, 0xb1, + 0x46, 0x7f, 0xcf, 0x2f, 0xfa, 0x58, 0x36, 0x1b, + 0xec, 0x76, 0x28, 0xed, 0xf5, 0xf3, 0xfd, 0xc0, + 0xe4, 0x80, 0x5d, 0xc4, 0x8c, 0xae, 0xec, 0xa8, + 0x1b, 0x7c, 0x13, 0xc3, 0x0a, 0xdf, 0x52, 0xa3, + 0x65, 0x95, 0x84, 0x73, 0x9a, 0x2d, 0xf4, 0x6b, + 0xe5, 0x89, 0xc5, 0x1c, 0xa1, 0xa4, 0xa8, 0x41, + 0x6d, 0xf6, 0x54, 0x5a, 0x1c, 0xe8, 0xba, 0x00 + }; + + XMEMSET(buf, c1, sizeof(buf)); + + /* SHA3-512 as a single buffer. [FIPS 202] */ + sha3_512_init(&c); + sha3_process(&c, buf, sizeof(buf)); + sha3_done(&c, hash); + if (compare_testvector(hash, sizeof(hash), sha3_512_0xa3_200_times, sizeof(sha3_512_0xa3_200_times), "SHA3-512", 0)) { + return CRYPT_FAIL_TESTVECTOR; + } + + /* SHA3-512 in two steps. [FIPS 202] */ + sha3_512_init(&c); + sha3_process(&c, buf, sizeof(buf) / 2); + sha3_process(&c, buf + sizeof(buf) / 2, sizeof(buf) / 2); + sha3_done(&c, hash); + if (compare_testvector(hash, sizeof(hash), sha3_512_0xa3_200_times, sizeof(sha3_512_0xa3_200_times), "SHA3-512", 1)) { + return CRYPT_FAIL_TESTVECTOR; + } + + /* SHA3-512 byte-by-byte: 200 steps. [FIPS 202] */ + i = 200; + sha3_512_init(&c); + while (i--) { + sha3_process(&c, &c1, 1); + } + sha3_done(&c, hash); + if (compare_testvector(hash, sizeof(hash), sha3_512_0xa3_200_times, sizeof(sha3_512_0xa3_200_times), "SHA3-512", 2)) { + return CRYPT_FAIL_TESTVECTOR; + } + + return CRYPT_OK; +#endif +} + +int sha3_shake_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + unsigned char buf[200], hash[512]; + int i; + hash_state c; + const unsigned char c1 = 0xa3; + unsigned long len; + + const unsigned char shake256_empty[32] = { + 0xab, 0x0b, 0xae, 0x31, 0x63, 0x39, 0x89, 0x43, + 0x04, 0xe3, 0x58, 0x77, 0xb0, 0xc2, 0x8a, 0x9b, + 0x1f, 0xd1, 0x66, 0xc7, 0x96, 0xb9, 0xcc, 0x25, + 0x8a, 0x06, 0x4a, 0x8f, 0x57, 0xe2, 0x7f, 0x2a + }; + const unsigned char shake256_0xa3_200_times[32] = { + 0x6a, 0x1a, 0x9d, 0x78, 0x46, 0x43, 0x6e, 0x4d, + 0xca, 0x57, 0x28, 0xb6, 0xf7, 0x60, 0xee, 0xf0, + 0xca, 0x92, 0xbf, 0x0b, 0xe5, 0x61, 0x5e, 0x96, + 0x95, 0x9d, 0x76, 0x71, 0x97, 0xa0, 0xbe, 0xeb + }; + const unsigned char shake128_empty[32] = { + 0x43, 0xe4, 0x1b, 0x45, 0xa6, 0x53, 0xf2, 0xa5, + 0xc4, 0x49, 0x2c, 0x1a, 0xdd, 0x54, 0x45, 0x12, + 0xdd, 0xa2, 0x52, 0x98, 0x33, 0x46, 0x2b, 0x71, + 0xa4, 0x1a, 0x45, 0xbe, 0x97, 0x29, 0x0b, 0x6f + }; + const unsigned char shake128_0xa3_200_times[32] = { + 0x44, 0xc9, 0xfb, 0x35, 0x9f, 0xd5, 0x6a, 0xc0, + 0xa9, 0xa7, 0x5a, 0x74, 0x3c, 0xff, 0x68, 0x62, + 0xf1, 0x7d, 0x72, 0x59, 0xab, 0x07, 0x52, 0x16, + 0xc0, 0x69, 0x95, 0x11, 0x64, 0x3b, 0x64, 0x39 + }; + + XMEMSET(buf, c1, sizeof(buf)); + + /* SHAKE256 on an empty buffer */ + sha3_shake_init(&c, 256); + for (i = 0; i < 16; i++) sha3_shake_done(&c, hash, 32); /* get 512 bytes, keep in hash the last 32 */ + if (compare_testvector(hash, sizeof(shake256_empty), shake256_empty, sizeof(shake256_empty), "SHAKE256", 0)) { + return CRYPT_FAIL_TESTVECTOR; + } + + /* SHAKE256 via sha3_shake_memory [FIPS 202] */ + len = 512; + sha3_shake_memory(256, buf, sizeof(buf), hash, &len); + if (compare_testvector(hash + 480, sizeof(shake256_0xa3_200_times), shake256_0xa3_200_times, sizeof(shake256_0xa3_200_times), "SHAKE256", 1)) { + return CRYPT_FAIL_TESTVECTOR; + } + + /* SHAKE256 as a single buffer. [FIPS 202] */ + sha3_shake_init(&c, 256); + sha3_shake_process(&c, buf, sizeof(buf)); + for (i = 0; i < 16; i++) sha3_shake_done(&c, hash, 32); /* get 512 bytes, keep in hash the last 32 */ + if (compare_testvector(hash, sizeof(shake256_0xa3_200_times), shake256_0xa3_200_times, sizeof(shake256_0xa3_200_times), "SHAKE256", 2)) { + return CRYPT_FAIL_TESTVECTOR; + } + + /* SHAKE256 in two steps. [FIPS 202] */ + sha3_shake_init(&c, 256); + sha3_shake_process(&c, buf, sizeof(buf) / 2); + sha3_shake_process(&c, buf + sizeof(buf) / 2, sizeof(buf) / 2); + for (i = 0; i < 16; i++) sha3_shake_done(&c, hash, 32); /* get 512 bytes, keep in hash the last 32 */ + if (compare_testvector(hash, sizeof(shake256_0xa3_200_times), shake256_0xa3_200_times, sizeof(shake256_0xa3_200_times), "SHAKE256", 3)) { + return CRYPT_FAIL_TESTVECTOR; + } + + /* SHAKE256 byte-by-byte: 200 steps. [FIPS 202] */ + i = 200; + sha3_shake_init(&c, 256); + while (i--) sha3_shake_process(&c, &c1, 1); + for (i = 0; i < 16; i++) sha3_shake_done(&c, hash, 32); /* get 512 bytes, keep in hash the last 32 */ + if (compare_testvector(hash, sizeof(shake256_0xa3_200_times), shake256_0xa3_200_times, sizeof(shake256_0xa3_200_times), "SHAKE256", 4)) { + return CRYPT_FAIL_TESTVECTOR; + } + + /* SHAKE128 on an empty buffer */ + sha3_shake_init(&c, 128); + for (i = 0; i < 16; i++) sha3_shake_done(&c, hash, 32); /* get 512 bytes, keep in hash the last 32 */ + if (compare_testvector(hash, sizeof(shake128_empty), shake128_empty, sizeof(shake128_empty), "SHAKE128", 0)) { + return CRYPT_FAIL_TESTVECTOR; + } + + /* SHAKE128 via sha3_shake_memory [FIPS 202] */ + len = 512; + sha3_shake_memory(128, buf, sizeof(buf), hash, &len); + if (compare_testvector(hash + 480, sizeof(shake128_0xa3_200_times), shake128_0xa3_200_times, sizeof(shake128_0xa3_200_times), "SHAKE128", 1)) { + return CRYPT_FAIL_TESTVECTOR; + } + + /* SHAKE128 as a single buffer. [FIPS 202] */ + sha3_shake_init(&c, 128); + sha3_shake_process(&c, buf, sizeof(buf)); + for (i = 0; i < 16; i++) sha3_shake_done(&c, hash, 32); /* get 512 bytes, keep in hash the last 32 */ + if (compare_testvector(hash, sizeof(shake128_0xa3_200_times), shake128_0xa3_200_times, sizeof(shake128_0xa3_200_times), "SHAKE128", 2)) { + return CRYPT_FAIL_TESTVECTOR; + } + + /* SHAKE128 in two steps. [FIPS 202] */ + sha3_shake_init(&c, 128); + sha3_shake_process(&c, buf, sizeof(buf) / 2); + sha3_shake_process(&c, buf + sizeof(buf) / 2, sizeof(buf) / 2); + for (i = 0; i < 16; i++) sha3_shake_done(&c, hash, 32); /* get 512 bytes, keep in hash the last 32 */ + if (compare_testvector(hash, sizeof(shake128_0xa3_200_times), shake128_0xa3_200_times, sizeof(shake128_0xa3_200_times), "SHAKE128", 3)) { + return CRYPT_FAIL_TESTVECTOR; + } + + /* SHAKE128 byte-by-byte: 200 steps. [FIPS 202] */ + i = 200; + sha3_shake_init(&c, 128); + while (i--) sha3_shake_process(&c, &c1, 1); + for (i = 0; i < 16; i++) sha3_shake_done(&c, hash, 32); /* get 512 bytes, keep in hash the last 32 */ + if (compare_testvector(hash, sizeof(shake128_0xa3_200_times), shake128_0xa3_200_times, sizeof(shake128_0xa3_200_times), "SHAKE128", 4)) { + return CRYPT_FAIL_TESTVECTOR; + } + + return CRYPT_OK; +#endif +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/tiger.c --- a/libtomcrypt/src/hashes/tiger.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/hashes/tiger.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -558,16 +556,16 @@ #ifdef _MSC_VER #define INLINE __inline #else - #define INLINE -#endif + #define INLINE +#endif /* one round of the hash function */ INLINE static void tiger_round(ulong64 *a, ulong64 *b, ulong64 *c, ulong64 x, int mul) { ulong64 tmp; - tmp = (*c ^= x); - *a -= t1[byte(tmp, 0)] ^ t2[byte(tmp, 2)] ^ t3[byte(tmp, 4)] ^ t4[byte(tmp, 6)]; - tmp = (*b += t4[byte(tmp, 1)] ^ t3[byte(tmp, 3)] ^ t2[byte(tmp,5)] ^ t1[byte(tmp,7)]); + tmp = (*c ^= x); + *a -= t1[byte(tmp, 0)] ^ t2[byte(tmp, 2)] ^ t3[byte(tmp, 4)] ^ t4[byte(tmp, 6)]; + tmp = (*b += t4[byte(tmp, 1)] ^ t3[byte(tmp, 3)] ^ t2[byte(tmp,5)] ^ t1[byte(tmp,7)]); switch (mul) { case 5: *b = (tmp << 2) + tmp; break; case 7: *b = (tmp << 3) - tmp; break; @@ -578,36 +576,36 @@ /* one complete pass */ static void pass(ulong64 *a, ulong64 *b, ulong64 *c, ulong64 *x, int mul) { - tiger_round(a,b,c,x[0],mul); - tiger_round(b,c,a,x[1],mul); - tiger_round(c,a,b,x[2],mul); - tiger_round(a,b,c,x[3],mul); - tiger_round(b,c,a,x[4],mul); - tiger_round(c,a,b,x[5],mul); - tiger_round(a,b,c,x[6],mul); - tiger_round(b,c,a,x[7],mul); -} + tiger_round(a,b,c,x[0],mul); + tiger_round(b,c,a,x[1],mul); + tiger_round(c,a,b,x[2],mul); + tiger_round(a,b,c,x[3],mul); + tiger_round(b,c,a,x[4],mul); + tiger_round(c,a,b,x[5],mul); + tiger_round(a,b,c,x[6],mul); + tiger_round(b,c,a,x[7],mul); +} /* The key mixing schedule */ -static void key_schedule(ulong64 *x) +static void key_schedule(ulong64 *x) { - x[0] -= x[7] ^ CONST64(0xA5A5A5A5A5A5A5A5); - x[1] ^= x[0]; - x[2] += x[1]; - x[3] -= x[2] ^ ((~x[1])<<19); - x[4] ^= x[3]; - x[5] += x[4]; - x[6] -= x[5] ^ ((~x[4])>>23); - x[7] ^= x[6]; - x[0] += x[7]; - x[1] -= x[0] ^ ((~x[7])<<19); - x[2] ^= x[1]; - x[3] += x[2]; - x[4] -= x[3] ^ ((~x[2])>>23); - x[5] ^= x[4]; - x[6] += x[5]; + x[0] -= x[7] ^ CONST64(0xA5A5A5A5A5A5A5A5); + x[1] ^= x[0]; + x[2] += x[1]; + x[3] -= x[2] ^ ((~x[1])<<19); + x[4] ^= x[3]; + x[5] += x[4]; + x[6] -= x[5] ^ ((~x[4])>>23); + x[7] ^= x[6]; + x[0] += x[7]; + x[1] -= x[0] ^ ((~x[7])<<19); + x[2] ^= x[1]; + x[3] += x[2]; + x[4] -= x[3] ^ ((~x[2])>>23); + x[5] ^= x[4]; + x[6] += x[5]; x[7] -= x[6] ^ CONST64(0x0123456789ABCDEF); -} +} #ifdef LTC_CLEAN_STACK static int _tiger_compress(hash_state *md, unsigned char *buf) @@ -709,7 +707,7 @@ /* pad upto 56 bytes of zeroes */ while (md->tiger.curlen < 56) { - md->tiger.buf[md->tiger.curlen++] = (unsigned char)0; + md->tiger.buf[md->tiger.curlen++] = (unsigned char)0; } /* store length */ @@ -730,14 +728,14 @@ /** Self-test the hash @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled -*/ +*/ int tiger_test(void) { #ifndef LTC_TEST return CRYPT_NOP; - #else + #else static const struct { - char *msg; + const char *msg; unsigned char hash[24]; } tests[] = { { "", @@ -775,7 +773,7 @@ tiger_init(&md); tiger_process(&md, (unsigned char *)tests[i].msg, (unsigned long)strlen(tests[i].msg)); tiger_done(&md, tmp); - if (XMEMCMP(tmp, tests[i].hash, 24) != 0) { + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "TIGER", i)) { return CRYPT_FAIL_TESTVECTOR; } } @@ -809,6 +807,6 @@ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/whirl/whirl.c --- a/libtomcrypt/src/hashes/whirl/whirl.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/hashes/whirl/whirl.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,13 +5,11 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/** +/** @file whirl.c - LTC_WHIRLPOOL (using their new sbox) hash function by Tom St Denis + LTC_WHIRLPOOL (using their new sbox) hash function by Tom St Denis */ #include "tomcrypt.h" @@ -37,6 +35,7 @@ }; /* the sboxes */ +#define __LTC_WHIRLTAB_C__ #include "whirltab.c" /* get a_{i,j} */ @@ -44,14 +43,14 @@ /* shortcut macro to perform three functions at once */ #define theta_pi_gamma(a, i) \ - SB0(GB(a, i-0, 7)) ^ \ + (SB0(GB(a, i-0, 7)) ^ \ SB1(GB(a, i-1, 6)) ^ \ SB2(GB(a, i-2, 5)) ^ \ SB3(GB(a, i-3, 4)) ^ \ SB4(GB(a, i-4, 3)) ^ \ SB5(GB(a, i-5, 2)) ^ \ SB6(GB(a, i-6, 1)) ^ \ - SB7(GB(a, i-7, 0)) + SB7(GB(a, i-7, 0))) #ifdef LTC_CLEAN_STACK static int _whirlpool_compress(hash_state *md, unsigned char *buf) @@ -61,7 +60,7 @@ { ulong64 K[2][8], T[3][8]; int x, y; - + /* load the block/state */ for (x = 0; x < 8; x++) { K[0][x] = md->whirlpool.state[x]; @@ -70,7 +69,7 @@ T[2][x] = T[0][x]; T[0][x] ^= K[0][x]; } - + /* do rounds 1..10 */ for (x = 0; x < 10; x += 2) { /* odd round */ @@ -80,7 +79,7 @@ } /* xor the constant */ K[1][0] ^= cont[x]; - + /* apply main transform to T[0] into T[1] */ for (y = 0; y < 8; y++) { T[1][y] = theta_pi_gamma(T[0], y) ^ K[1][y]; @@ -93,13 +92,13 @@ } /* xor the constant */ K[0][0] ^= cont[x+1]; - + /* apply main transform to T[1] into T[0] */ for (y = 0; y < 8; y++) { T[0][y] = theta_pi_gamma(T[1], y) ^ K[0][y]; } } - + /* store state */ for (x = 0; x < 8; x++) { md->whirlpool.state[x] ^= T[0][x] ^ T[2][x]; @@ -198,20 +197,20 @@ /** Self-test the hash @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled -*/ +*/ int whirlpool_test(void) { #ifndef LTC_TEST return CRYPT_NOP; - #else + #else static const struct { int len; unsigned char msg[128], hash[64]; } tests[] = { - + /* NULL Message */ { - 0, + 0, { 0x00 }, { 0x19, 0xFA, 0x61, 0xD7, 0x55, 0x22, 0xA4, 0x66, 0x9B, 0x44, 0xE3, 0x9C, 0x1D, 0x2E, 0x17, 0x26, 0xC5, 0x30, 0x23, 0x21, 0x30, 0xD4, 0x07, 0xF8, 0x9A, 0xFE, 0xE0, 0x96, 0x49, 0x97, 0xF7, 0xA7, @@ -279,7 +278,7 @@ 0x06, 0xDB, 0x4F, 0xF7, 0x08, 0xA3, 0xA2, 0x8B, 0xC3, 0x7A, 0x92, 0x1E, 0xEE, 0x11, 0xED, 0x7B, 0x6A, 0x53, 0x79, 0x32, 0xCC, 0x5E, 0x94, 0xEE, 0x1E, 0xA6, 0x57, 0x60, 0x7E, 0x36, 0xC9, 0xF7 } }, - + }; int i; @@ -290,14 +289,7 @@ whirlpool_init(&md); whirlpool_process(&md, (unsigned char *)tests[i].msg, tests[i].len); whirlpool_done(&md, tmp); - if (XMEMCMP(tmp, tests[i].hash, 64) != 0) { -#if 0 - printf("\nFailed test %d\n", i); - for (i = 0; i < 64; ) { - printf("%02x ", tmp[i]); - if (!(++i & 15)) printf("\n"); - } -#endif + if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "WHIRLPOOL", i)) { return CRYPT_FAIL_TESTVECTOR; } } @@ -309,6 +301,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/hashes/whirl/whirltab.c --- a/libtomcrypt/src/hashes/whirl/whirltab.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/hashes/whirl/whirltab.c Fri Feb 09 21:44:05 2018 +0800 @@ -1,71 +1,83 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + /** @file whirltab.c LTC_WHIRLPOOL tables, Tom St Denis -*/ +*/ + +#ifdef __LTC_WHIRLTAB_C__ + static const ulong64 sbox0[] = { -CONST64(0x18186018c07830d8), CONST64(0x23238c2305af4626), CONST64(0xc6c63fc67ef991b8), CONST64(0xe8e887e8136fcdfb), -CONST64(0x878726874ca113cb), CONST64(0xb8b8dab8a9626d11), CONST64(0x0101040108050209), CONST64(0x4f4f214f426e9e0d), -CONST64(0x3636d836adee6c9b), CONST64(0xa6a6a2a6590451ff), CONST64(0xd2d26fd2debdb90c), CONST64(0xf5f5f3f5fb06f70e), -CONST64(0x7979f979ef80f296), CONST64(0x6f6fa16f5fcede30), CONST64(0x91917e91fcef3f6d), CONST64(0x52525552aa07a4f8), -CONST64(0x60609d6027fdc047), CONST64(0xbcbccabc89766535), CONST64(0x9b9b569baccd2b37), CONST64(0x8e8e028e048c018a), -CONST64(0xa3a3b6a371155bd2), CONST64(0x0c0c300c603c186c), CONST64(0x7b7bf17bff8af684), CONST64(0x3535d435b5e16a80), -CONST64(0x1d1d741de8693af5), CONST64(0xe0e0a7e05347ddb3), CONST64(0xd7d77bd7f6acb321), CONST64(0xc2c22fc25eed999c), -CONST64(0x2e2eb82e6d965c43), CONST64(0x4b4b314b627a9629), CONST64(0xfefedffea321e15d), CONST64(0x575741578216aed5), -CONST64(0x15155415a8412abd), CONST64(0x7777c1779fb6eee8), CONST64(0x3737dc37a5eb6e92), CONST64(0xe5e5b3e57b56d79e), -CONST64(0x9f9f469f8cd92313), CONST64(0xf0f0e7f0d317fd23), CONST64(0x4a4a354a6a7f9420), CONST64(0xdada4fda9e95a944), -CONST64(0x58587d58fa25b0a2), CONST64(0xc9c903c906ca8fcf), CONST64(0x2929a429558d527c), CONST64(0x0a0a280a5022145a), -CONST64(0xb1b1feb1e14f7f50), CONST64(0xa0a0baa0691a5dc9), CONST64(0x6b6bb16b7fdad614), CONST64(0x85852e855cab17d9), -CONST64(0xbdbdcebd8173673c), CONST64(0x5d5d695dd234ba8f), CONST64(0x1010401080502090), CONST64(0xf4f4f7f4f303f507), -CONST64(0xcbcb0bcb16c08bdd), CONST64(0x3e3ef83eedc67cd3), CONST64(0x0505140528110a2d), CONST64(0x676781671fe6ce78), -CONST64(0xe4e4b7e47353d597), CONST64(0x27279c2725bb4e02), CONST64(0x4141194132588273), CONST64(0x8b8b168b2c9d0ba7), -CONST64(0xa7a7a6a7510153f6), CONST64(0x7d7de97dcf94fab2), CONST64(0x95956e95dcfb3749), CONST64(0xd8d847d88e9fad56), -CONST64(0xfbfbcbfb8b30eb70), CONST64(0xeeee9fee2371c1cd), CONST64(0x7c7ced7cc791f8bb), CONST64(0x6666856617e3cc71), -CONST64(0xdddd53dda68ea77b), CONST64(0x17175c17b84b2eaf), CONST64(0x4747014702468e45), CONST64(0x9e9e429e84dc211a), -CONST64(0xcaca0fca1ec589d4), CONST64(0x2d2db42d75995a58), CONST64(0xbfbfc6bf9179632e), CONST64(0x07071c07381b0e3f), -CONST64(0xadad8ead012347ac), CONST64(0x5a5a755aea2fb4b0), CONST64(0x838336836cb51bef), CONST64(0x3333cc3385ff66b6), -CONST64(0x636391633ff2c65c), CONST64(0x02020802100a0412), CONST64(0xaaaa92aa39384993), CONST64(0x7171d971afa8e2de), -CONST64(0xc8c807c80ecf8dc6), CONST64(0x19196419c87d32d1), CONST64(0x494939497270923b), CONST64(0xd9d943d9869aaf5f), -CONST64(0xf2f2eff2c31df931), CONST64(0xe3e3abe34b48dba8), CONST64(0x5b5b715be22ab6b9), CONST64(0x88881a8834920dbc), -CONST64(0x9a9a529aa4c8293e), CONST64(0x262698262dbe4c0b), CONST64(0x3232c8328dfa64bf), CONST64(0xb0b0fab0e94a7d59), -CONST64(0xe9e983e91b6acff2), CONST64(0x0f0f3c0f78331e77), CONST64(0xd5d573d5e6a6b733), CONST64(0x80803a8074ba1df4), -CONST64(0xbebec2be997c6127), CONST64(0xcdcd13cd26de87eb), CONST64(0x3434d034bde46889), CONST64(0x48483d487a759032), -CONST64(0xffffdbffab24e354), CONST64(0x7a7af57af78ff48d), CONST64(0x90907a90f4ea3d64), CONST64(0x5f5f615fc23ebe9d), -CONST64(0x202080201da0403d), CONST64(0x6868bd6867d5d00f), CONST64(0x1a1a681ad07234ca), CONST64(0xaeae82ae192c41b7), -CONST64(0xb4b4eab4c95e757d), CONST64(0x54544d549a19a8ce), CONST64(0x93937693ece53b7f), CONST64(0x222288220daa442f), -CONST64(0x64648d6407e9c863), CONST64(0xf1f1e3f1db12ff2a), CONST64(0x7373d173bfa2e6cc), CONST64(0x12124812905a2482), -CONST64(0x40401d403a5d807a), CONST64(0x0808200840281048), CONST64(0xc3c32bc356e89b95), CONST64(0xecec97ec337bc5df), -CONST64(0xdbdb4bdb9690ab4d), CONST64(0xa1a1bea1611f5fc0), CONST64(0x8d8d0e8d1c830791), CONST64(0x3d3df43df5c97ac8), -CONST64(0x97976697ccf1335b), CONST64(0x0000000000000000), CONST64(0xcfcf1bcf36d483f9), CONST64(0x2b2bac2b4587566e), -CONST64(0x7676c57697b3ece1), CONST64(0x8282328264b019e6), CONST64(0xd6d67fd6fea9b128), CONST64(0x1b1b6c1bd87736c3), -CONST64(0xb5b5eeb5c15b7774), CONST64(0xafaf86af112943be), CONST64(0x6a6ab56a77dfd41d), CONST64(0x50505d50ba0da0ea), -CONST64(0x45450945124c8a57), CONST64(0xf3f3ebf3cb18fb38), CONST64(0x3030c0309df060ad), CONST64(0xefef9bef2b74c3c4), -CONST64(0x3f3ffc3fe5c37eda), CONST64(0x55554955921caac7), CONST64(0xa2a2b2a2791059db), CONST64(0xeaea8fea0365c9e9), -CONST64(0x656589650fecca6a), CONST64(0xbabad2bab9686903), CONST64(0x2f2fbc2f65935e4a), CONST64(0xc0c027c04ee79d8e), -CONST64(0xdede5fdebe81a160), CONST64(0x1c1c701ce06c38fc), CONST64(0xfdfdd3fdbb2ee746), CONST64(0x4d4d294d52649a1f), -CONST64(0x92927292e4e03976), CONST64(0x7575c9758fbceafa), CONST64(0x06061806301e0c36), CONST64(0x8a8a128a249809ae), -CONST64(0xb2b2f2b2f940794b), CONST64(0xe6e6bfe66359d185), CONST64(0x0e0e380e70361c7e), CONST64(0x1f1f7c1ff8633ee7), -CONST64(0x6262956237f7c455), CONST64(0xd4d477d4eea3b53a), CONST64(0xa8a89aa829324d81), CONST64(0x96966296c4f43152), -CONST64(0xf9f9c3f99b3aef62), CONST64(0xc5c533c566f697a3), CONST64(0x2525942535b14a10), CONST64(0x59597959f220b2ab), -CONST64(0x84842a8454ae15d0), CONST64(0x7272d572b7a7e4c5), CONST64(0x3939e439d5dd72ec), CONST64(0x4c4c2d4c5a619816), -CONST64(0x5e5e655eca3bbc94), CONST64(0x7878fd78e785f09f), CONST64(0x3838e038ddd870e5), CONST64(0x8c8c0a8c14860598), -CONST64(0xd1d163d1c6b2bf17), CONST64(0xa5a5aea5410b57e4), CONST64(0xe2e2afe2434dd9a1), CONST64(0x616199612ff8c24e), -CONST64(0xb3b3f6b3f1457b42), CONST64(0x2121842115a54234), CONST64(0x9c9c4a9c94d62508), CONST64(0x1e1e781ef0663cee), -CONST64(0x4343114322528661), CONST64(0xc7c73bc776fc93b1), CONST64(0xfcfcd7fcb32be54f), CONST64(0x0404100420140824), -CONST64(0x51515951b208a2e3), CONST64(0x99995e99bcc72f25), CONST64(0x6d6da96d4fc4da22), CONST64(0x0d0d340d68391a65), -CONST64(0xfafacffa8335e979), CONST64(0xdfdf5bdfb684a369), CONST64(0x7e7ee57ed79bfca9), CONST64(0x242490243db44819), -CONST64(0x3b3bec3bc5d776fe), CONST64(0xabab96ab313d4b9a), CONST64(0xcece1fce3ed181f0), CONST64(0x1111441188552299), -CONST64(0x8f8f068f0c890383), CONST64(0x4e4e254e4a6b9c04), CONST64(0xb7b7e6b7d1517366), CONST64(0xebeb8beb0b60cbe0), -CONST64(0x3c3cf03cfdcc78c1), CONST64(0x81813e817cbf1ffd), CONST64(0x94946a94d4fe3540), CONST64(0xf7f7fbf7eb0cf31c), -CONST64(0xb9b9deb9a1676f18), CONST64(0x13134c13985f268b), CONST64(0x2c2cb02c7d9c5851), CONST64(0xd3d36bd3d6b8bb05), -CONST64(0xe7e7bbe76b5cd38c), CONST64(0x6e6ea56e57cbdc39), CONST64(0xc4c437c46ef395aa), CONST64(0x03030c03180f061b), -CONST64(0x565645568a13acdc), CONST64(0x44440d441a49885e), CONST64(0x7f7fe17fdf9efea0), CONST64(0xa9a99ea921374f88), -CONST64(0x2a2aa82a4d825467), CONST64(0xbbbbd6bbb16d6b0a), CONST64(0xc1c123c146e29f87), CONST64(0x53535153a202a6f1), -CONST64(0xdcdc57dcae8ba572), CONST64(0x0b0b2c0b58271653), CONST64(0x9d9d4e9d9cd32701), CONST64(0x6c6cad6c47c1d82b), -CONST64(0x3131c43195f562a4), CONST64(0x7474cd7487b9e8f3), CONST64(0xf6f6fff6e309f115), CONST64(0x464605460a438c4c), -CONST64(0xacac8aac092645a5), CONST64(0x89891e893c970fb5), CONST64(0x14145014a04428b4), CONST64(0xe1e1a3e15b42dfba), -CONST64(0x16165816b04e2ca6), CONST64(0x3a3ae83acdd274f7), CONST64(0x6969b9696fd0d206), CONST64(0x09092409482d1241), -CONST64(0x7070dd70a7ade0d7), CONST64(0xb6b6e2b6d954716f), CONST64(0xd0d067d0ceb7bd1e), CONST64(0xeded93ed3b7ec7d6), -CONST64(0xcccc17cc2edb85e2), CONST64(0x424215422a578468), CONST64(0x98985a98b4c22d2c), CONST64(0xa4a4aaa4490e55ed), +CONST64(0x18186018c07830d8), CONST64(0x23238c2305af4626), CONST64(0xc6c63fc67ef991b8), CONST64(0xe8e887e8136fcdfb), +CONST64(0x878726874ca113cb), CONST64(0xb8b8dab8a9626d11), CONST64(0x0101040108050209), CONST64(0x4f4f214f426e9e0d), +CONST64(0x3636d836adee6c9b), CONST64(0xa6a6a2a6590451ff), CONST64(0xd2d26fd2debdb90c), CONST64(0xf5f5f3f5fb06f70e), +CONST64(0x7979f979ef80f296), CONST64(0x6f6fa16f5fcede30), CONST64(0x91917e91fcef3f6d), CONST64(0x52525552aa07a4f8), +CONST64(0x60609d6027fdc047), CONST64(0xbcbccabc89766535), CONST64(0x9b9b569baccd2b37), CONST64(0x8e8e028e048c018a), +CONST64(0xa3a3b6a371155bd2), CONST64(0x0c0c300c603c186c), CONST64(0x7b7bf17bff8af684), CONST64(0x3535d435b5e16a80), +CONST64(0x1d1d741de8693af5), CONST64(0xe0e0a7e05347ddb3), CONST64(0xd7d77bd7f6acb321), CONST64(0xc2c22fc25eed999c), +CONST64(0x2e2eb82e6d965c43), CONST64(0x4b4b314b627a9629), CONST64(0xfefedffea321e15d), CONST64(0x575741578216aed5), +CONST64(0x15155415a8412abd), CONST64(0x7777c1779fb6eee8), CONST64(0x3737dc37a5eb6e92), CONST64(0xe5e5b3e57b56d79e), +CONST64(0x9f9f469f8cd92313), CONST64(0xf0f0e7f0d317fd23), CONST64(0x4a4a354a6a7f9420), CONST64(0xdada4fda9e95a944), +CONST64(0x58587d58fa25b0a2), CONST64(0xc9c903c906ca8fcf), CONST64(0x2929a429558d527c), CONST64(0x0a0a280a5022145a), +CONST64(0xb1b1feb1e14f7f50), CONST64(0xa0a0baa0691a5dc9), CONST64(0x6b6bb16b7fdad614), CONST64(0x85852e855cab17d9), +CONST64(0xbdbdcebd8173673c), CONST64(0x5d5d695dd234ba8f), CONST64(0x1010401080502090), CONST64(0xf4f4f7f4f303f507), +CONST64(0xcbcb0bcb16c08bdd), CONST64(0x3e3ef83eedc67cd3), CONST64(0x0505140528110a2d), CONST64(0x676781671fe6ce78), +CONST64(0xe4e4b7e47353d597), CONST64(0x27279c2725bb4e02), CONST64(0x4141194132588273), CONST64(0x8b8b168b2c9d0ba7), +CONST64(0xa7a7a6a7510153f6), CONST64(0x7d7de97dcf94fab2), CONST64(0x95956e95dcfb3749), CONST64(0xd8d847d88e9fad56), +CONST64(0xfbfbcbfb8b30eb70), CONST64(0xeeee9fee2371c1cd), CONST64(0x7c7ced7cc791f8bb), CONST64(0x6666856617e3cc71), +CONST64(0xdddd53dda68ea77b), CONST64(0x17175c17b84b2eaf), CONST64(0x4747014702468e45), CONST64(0x9e9e429e84dc211a), +CONST64(0xcaca0fca1ec589d4), CONST64(0x2d2db42d75995a58), CONST64(0xbfbfc6bf9179632e), CONST64(0x07071c07381b0e3f), +CONST64(0xadad8ead012347ac), CONST64(0x5a5a755aea2fb4b0), CONST64(0x838336836cb51bef), CONST64(0x3333cc3385ff66b6), +CONST64(0x636391633ff2c65c), CONST64(0x02020802100a0412), CONST64(0xaaaa92aa39384993), CONST64(0x7171d971afa8e2de), +CONST64(0xc8c807c80ecf8dc6), CONST64(0x19196419c87d32d1), CONST64(0x494939497270923b), CONST64(0xd9d943d9869aaf5f), +CONST64(0xf2f2eff2c31df931), CONST64(0xe3e3abe34b48dba8), CONST64(0x5b5b715be22ab6b9), CONST64(0x88881a8834920dbc), +CONST64(0x9a9a529aa4c8293e), CONST64(0x262698262dbe4c0b), CONST64(0x3232c8328dfa64bf), CONST64(0xb0b0fab0e94a7d59), +CONST64(0xe9e983e91b6acff2), CONST64(0x0f0f3c0f78331e77), CONST64(0xd5d573d5e6a6b733), CONST64(0x80803a8074ba1df4), +CONST64(0xbebec2be997c6127), CONST64(0xcdcd13cd26de87eb), CONST64(0x3434d034bde46889), CONST64(0x48483d487a759032), +CONST64(0xffffdbffab24e354), CONST64(0x7a7af57af78ff48d), CONST64(0x90907a90f4ea3d64), CONST64(0x5f5f615fc23ebe9d), +CONST64(0x202080201da0403d), CONST64(0x6868bd6867d5d00f), CONST64(0x1a1a681ad07234ca), CONST64(0xaeae82ae192c41b7), +CONST64(0xb4b4eab4c95e757d), CONST64(0x54544d549a19a8ce), CONST64(0x93937693ece53b7f), CONST64(0x222288220daa442f), +CONST64(0x64648d6407e9c863), CONST64(0xf1f1e3f1db12ff2a), CONST64(0x7373d173bfa2e6cc), CONST64(0x12124812905a2482), +CONST64(0x40401d403a5d807a), CONST64(0x0808200840281048), CONST64(0xc3c32bc356e89b95), CONST64(0xecec97ec337bc5df), +CONST64(0xdbdb4bdb9690ab4d), CONST64(0xa1a1bea1611f5fc0), CONST64(0x8d8d0e8d1c830791), CONST64(0x3d3df43df5c97ac8), +CONST64(0x97976697ccf1335b), CONST64(0x0000000000000000), CONST64(0xcfcf1bcf36d483f9), CONST64(0x2b2bac2b4587566e), +CONST64(0x7676c57697b3ece1), CONST64(0x8282328264b019e6), CONST64(0xd6d67fd6fea9b128), CONST64(0x1b1b6c1bd87736c3), +CONST64(0xb5b5eeb5c15b7774), CONST64(0xafaf86af112943be), CONST64(0x6a6ab56a77dfd41d), CONST64(0x50505d50ba0da0ea), +CONST64(0x45450945124c8a57), CONST64(0xf3f3ebf3cb18fb38), CONST64(0x3030c0309df060ad), CONST64(0xefef9bef2b74c3c4), +CONST64(0x3f3ffc3fe5c37eda), CONST64(0x55554955921caac7), CONST64(0xa2a2b2a2791059db), CONST64(0xeaea8fea0365c9e9), +CONST64(0x656589650fecca6a), CONST64(0xbabad2bab9686903), CONST64(0x2f2fbc2f65935e4a), CONST64(0xc0c027c04ee79d8e), +CONST64(0xdede5fdebe81a160), CONST64(0x1c1c701ce06c38fc), CONST64(0xfdfdd3fdbb2ee746), CONST64(0x4d4d294d52649a1f), +CONST64(0x92927292e4e03976), CONST64(0x7575c9758fbceafa), CONST64(0x06061806301e0c36), CONST64(0x8a8a128a249809ae), +CONST64(0xb2b2f2b2f940794b), CONST64(0xe6e6bfe66359d185), CONST64(0x0e0e380e70361c7e), CONST64(0x1f1f7c1ff8633ee7), +CONST64(0x6262956237f7c455), CONST64(0xd4d477d4eea3b53a), CONST64(0xa8a89aa829324d81), CONST64(0x96966296c4f43152), +CONST64(0xf9f9c3f99b3aef62), CONST64(0xc5c533c566f697a3), CONST64(0x2525942535b14a10), CONST64(0x59597959f220b2ab), +CONST64(0x84842a8454ae15d0), CONST64(0x7272d572b7a7e4c5), CONST64(0x3939e439d5dd72ec), CONST64(0x4c4c2d4c5a619816), +CONST64(0x5e5e655eca3bbc94), CONST64(0x7878fd78e785f09f), CONST64(0x3838e038ddd870e5), CONST64(0x8c8c0a8c14860598), +CONST64(0xd1d163d1c6b2bf17), CONST64(0xa5a5aea5410b57e4), CONST64(0xe2e2afe2434dd9a1), CONST64(0x616199612ff8c24e), +CONST64(0xb3b3f6b3f1457b42), CONST64(0x2121842115a54234), CONST64(0x9c9c4a9c94d62508), CONST64(0x1e1e781ef0663cee), +CONST64(0x4343114322528661), CONST64(0xc7c73bc776fc93b1), CONST64(0xfcfcd7fcb32be54f), CONST64(0x0404100420140824), +CONST64(0x51515951b208a2e3), CONST64(0x99995e99bcc72f25), CONST64(0x6d6da96d4fc4da22), CONST64(0x0d0d340d68391a65), +CONST64(0xfafacffa8335e979), CONST64(0xdfdf5bdfb684a369), CONST64(0x7e7ee57ed79bfca9), CONST64(0x242490243db44819), +CONST64(0x3b3bec3bc5d776fe), CONST64(0xabab96ab313d4b9a), CONST64(0xcece1fce3ed181f0), CONST64(0x1111441188552299), +CONST64(0x8f8f068f0c890383), CONST64(0x4e4e254e4a6b9c04), CONST64(0xb7b7e6b7d1517366), CONST64(0xebeb8beb0b60cbe0), +CONST64(0x3c3cf03cfdcc78c1), CONST64(0x81813e817cbf1ffd), CONST64(0x94946a94d4fe3540), CONST64(0xf7f7fbf7eb0cf31c), +CONST64(0xb9b9deb9a1676f18), CONST64(0x13134c13985f268b), CONST64(0x2c2cb02c7d9c5851), CONST64(0xd3d36bd3d6b8bb05), +CONST64(0xe7e7bbe76b5cd38c), CONST64(0x6e6ea56e57cbdc39), CONST64(0xc4c437c46ef395aa), CONST64(0x03030c03180f061b), +CONST64(0x565645568a13acdc), CONST64(0x44440d441a49885e), CONST64(0x7f7fe17fdf9efea0), CONST64(0xa9a99ea921374f88), +CONST64(0x2a2aa82a4d825467), CONST64(0xbbbbd6bbb16d6b0a), CONST64(0xc1c123c146e29f87), CONST64(0x53535153a202a6f1), +CONST64(0xdcdc57dcae8ba572), CONST64(0x0b0b2c0b58271653), CONST64(0x9d9d4e9d9cd32701), CONST64(0x6c6cad6c47c1d82b), +CONST64(0x3131c43195f562a4), CONST64(0x7474cd7487b9e8f3), CONST64(0xf6f6fff6e309f115), CONST64(0x464605460a438c4c), +CONST64(0xacac8aac092645a5), CONST64(0x89891e893c970fb5), CONST64(0x14145014a04428b4), CONST64(0xe1e1a3e15b42dfba), +CONST64(0x16165816b04e2ca6), CONST64(0x3a3ae83acdd274f7), CONST64(0x6969b9696fd0d206), CONST64(0x09092409482d1241), +CONST64(0x7070dd70a7ade0d7), CONST64(0xb6b6e2b6d954716f), CONST64(0xd0d067d0ceb7bd1e), CONST64(0xeded93ed3b7ec7d6), +CONST64(0xcccc17cc2edb85e2), CONST64(0x424215422a578468), CONST64(0x98985a98b4c22d2c), CONST64(0xa4a4aaa4490e55ed), CONST64(0x2828a0285d885075), CONST64(0x5c5c6d5cda31b886), CONST64(0xf8f8c7f8933fed6b), CONST64(0x8686228644a411c2) }; @@ -93,471 +105,471 @@ static const ulong64 sbox1[] = { -CONST64(0xd818186018c07830), CONST64(0x2623238c2305af46), CONST64(0xb8c6c63fc67ef991), CONST64(0xfbe8e887e8136fcd), -CONST64(0xcb878726874ca113), CONST64(0x11b8b8dab8a9626d), CONST64(0x0901010401080502), CONST64(0x0d4f4f214f426e9e), -CONST64(0x9b3636d836adee6c), CONST64(0xffa6a6a2a6590451), CONST64(0x0cd2d26fd2debdb9), CONST64(0x0ef5f5f3f5fb06f7), -CONST64(0x967979f979ef80f2), CONST64(0x306f6fa16f5fcede), CONST64(0x6d91917e91fcef3f), CONST64(0xf852525552aa07a4), -CONST64(0x4760609d6027fdc0), CONST64(0x35bcbccabc897665), CONST64(0x379b9b569baccd2b), CONST64(0x8a8e8e028e048c01), -CONST64(0xd2a3a3b6a371155b), CONST64(0x6c0c0c300c603c18), CONST64(0x847b7bf17bff8af6), CONST64(0x803535d435b5e16a), -CONST64(0xf51d1d741de8693a), CONST64(0xb3e0e0a7e05347dd), CONST64(0x21d7d77bd7f6acb3), CONST64(0x9cc2c22fc25eed99), -CONST64(0x432e2eb82e6d965c), CONST64(0x294b4b314b627a96), CONST64(0x5dfefedffea321e1), CONST64(0xd5575741578216ae), -CONST64(0xbd15155415a8412a), CONST64(0xe87777c1779fb6ee), CONST64(0x923737dc37a5eb6e), CONST64(0x9ee5e5b3e57b56d7), -CONST64(0x139f9f469f8cd923), CONST64(0x23f0f0e7f0d317fd), CONST64(0x204a4a354a6a7f94), CONST64(0x44dada4fda9e95a9), -CONST64(0xa258587d58fa25b0), CONST64(0xcfc9c903c906ca8f), CONST64(0x7c2929a429558d52), CONST64(0x5a0a0a280a502214), -CONST64(0x50b1b1feb1e14f7f), CONST64(0xc9a0a0baa0691a5d), CONST64(0x146b6bb16b7fdad6), CONST64(0xd985852e855cab17), -CONST64(0x3cbdbdcebd817367), CONST64(0x8f5d5d695dd234ba), CONST64(0x9010104010805020), CONST64(0x07f4f4f7f4f303f5), -CONST64(0xddcbcb0bcb16c08b), CONST64(0xd33e3ef83eedc67c), CONST64(0x2d0505140528110a), CONST64(0x78676781671fe6ce), -CONST64(0x97e4e4b7e47353d5), CONST64(0x0227279c2725bb4e), CONST64(0x7341411941325882), CONST64(0xa78b8b168b2c9d0b), -CONST64(0xf6a7a7a6a7510153), CONST64(0xb27d7de97dcf94fa), CONST64(0x4995956e95dcfb37), CONST64(0x56d8d847d88e9fad), -CONST64(0x70fbfbcbfb8b30eb), CONST64(0xcdeeee9fee2371c1), CONST64(0xbb7c7ced7cc791f8), CONST64(0x716666856617e3cc), -CONST64(0x7bdddd53dda68ea7), CONST64(0xaf17175c17b84b2e), CONST64(0x454747014702468e), CONST64(0x1a9e9e429e84dc21), -CONST64(0xd4caca0fca1ec589), CONST64(0x582d2db42d75995a), CONST64(0x2ebfbfc6bf917963), CONST64(0x3f07071c07381b0e), -CONST64(0xacadad8ead012347), CONST64(0xb05a5a755aea2fb4), CONST64(0xef838336836cb51b), CONST64(0xb63333cc3385ff66), -CONST64(0x5c636391633ff2c6), CONST64(0x1202020802100a04), CONST64(0x93aaaa92aa393849), CONST64(0xde7171d971afa8e2), -CONST64(0xc6c8c807c80ecf8d), CONST64(0xd119196419c87d32), CONST64(0x3b49493949727092), CONST64(0x5fd9d943d9869aaf), -CONST64(0x31f2f2eff2c31df9), CONST64(0xa8e3e3abe34b48db), CONST64(0xb95b5b715be22ab6), CONST64(0xbc88881a8834920d), -CONST64(0x3e9a9a529aa4c829), CONST64(0x0b262698262dbe4c), CONST64(0xbf3232c8328dfa64), CONST64(0x59b0b0fab0e94a7d), -CONST64(0xf2e9e983e91b6acf), CONST64(0x770f0f3c0f78331e), CONST64(0x33d5d573d5e6a6b7), CONST64(0xf480803a8074ba1d), -CONST64(0x27bebec2be997c61), CONST64(0xebcdcd13cd26de87), CONST64(0x893434d034bde468), CONST64(0x3248483d487a7590), -CONST64(0x54ffffdbffab24e3), CONST64(0x8d7a7af57af78ff4), CONST64(0x6490907a90f4ea3d), CONST64(0x9d5f5f615fc23ebe), -CONST64(0x3d202080201da040), CONST64(0x0f6868bd6867d5d0), CONST64(0xca1a1a681ad07234), CONST64(0xb7aeae82ae192c41), -CONST64(0x7db4b4eab4c95e75), CONST64(0xce54544d549a19a8), CONST64(0x7f93937693ece53b), CONST64(0x2f222288220daa44), -CONST64(0x6364648d6407e9c8), CONST64(0x2af1f1e3f1db12ff), CONST64(0xcc7373d173bfa2e6), CONST64(0x8212124812905a24), -CONST64(0x7a40401d403a5d80), CONST64(0x4808082008402810), CONST64(0x95c3c32bc356e89b), CONST64(0xdfecec97ec337bc5), -CONST64(0x4ddbdb4bdb9690ab), CONST64(0xc0a1a1bea1611f5f), CONST64(0x918d8d0e8d1c8307), CONST64(0xc83d3df43df5c97a), -CONST64(0x5b97976697ccf133), CONST64(0x0000000000000000), CONST64(0xf9cfcf1bcf36d483), CONST64(0x6e2b2bac2b458756), -CONST64(0xe17676c57697b3ec), CONST64(0xe68282328264b019), CONST64(0x28d6d67fd6fea9b1), CONST64(0xc31b1b6c1bd87736), -CONST64(0x74b5b5eeb5c15b77), CONST64(0xbeafaf86af112943), CONST64(0x1d6a6ab56a77dfd4), CONST64(0xea50505d50ba0da0), -CONST64(0x5745450945124c8a), CONST64(0x38f3f3ebf3cb18fb), CONST64(0xad3030c0309df060), CONST64(0xc4efef9bef2b74c3), -CONST64(0xda3f3ffc3fe5c37e), CONST64(0xc755554955921caa), CONST64(0xdba2a2b2a2791059), CONST64(0xe9eaea8fea0365c9), -CONST64(0x6a656589650fecca), CONST64(0x03babad2bab96869), CONST64(0x4a2f2fbc2f65935e), CONST64(0x8ec0c027c04ee79d), -CONST64(0x60dede5fdebe81a1), CONST64(0xfc1c1c701ce06c38), CONST64(0x46fdfdd3fdbb2ee7), CONST64(0x1f4d4d294d52649a), -CONST64(0x7692927292e4e039), CONST64(0xfa7575c9758fbcea), CONST64(0x3606061806301e0c), CONST64(0xae8a8a128a249809), -CONST64(0x4bb2b2f2b2f94079), CONST64(0x85e6e6bfe66359d1), CONST64(0x7e0e0e380e70361c), CONST64(0xe71f1f7c1ff8633e), -CONST64(0x556262956237f7c4), CONST64(0x3ad4d477d4eea3b5), CONST64(0x81a8a89aa829324d), CONST64(0x5296966296c4f431), -CONST64(0x62f9f9c3f99b3aef), CONST64(0xa3c5c533c566f697), CONST64(0x102525942535b14a), CONST64(0xab59597959f220b2), -CONST64(0xd084842a8454ae15), CONST64(0xc57272d572b7a7e4), CONST64(0xec3939e439d5dd72), CONST64(0x164c4c2d4c5a6198), -CONST64(0x945e5e655eca3bbc), CONST64(0x9f7878fd78e785f0), CONST64(0xe53838e038ddd870), CONST64(0x988c8c0a8c148605), -CONST64(0x17d1d163d1c6b2bf), CONST64(0xe4a5a5aea5410b57), CONST64(0xa1e2e2afe2434dd9), CONST64(0x4e616199612ff8c2), -CONST64(0x42b3b3f6b3f1457b), CONST64(0x342121842115a542), CONST64(0x089c9c4a9c94d625), CONST64(0xee1e1e781ef0663c), -CONST64(0x6143431143225286), CONST64(0xb1c7c73bc776fc93), CONST64(0x4ffcfcd7fcb32be5), CONST64(0x2404041004201408), -CONST64(0xe351515951b208a2), CONST64(0x2599995e99bcc72f), CONST64(0x226d6da96d4fc4da), CONST64(0x650d0d340d68391a), -CONST64(0x79fafacffa8335e9), CONST64(0x69dfdf5bdfb684a3), CONST64(0xa97e7ee57ed79bfc), CONST64(0x19242490243db448), -CONST64(0xfe3b3bec3bc5d776), CONST64(0x9aabab96ab313d4b), CONST64(0xf0cece1fce3ed181), CONST64(0x9911114411885522), -CONST64(0x838f8f068f0c8903), CONST64(0x044e4e254e4a6b9c), CONST64(0x66b7b7e6b7d15173), CONST64(0xe0ebeb8beb0b60cb), -CONST64(0xc13c3cf03cfdcc78), CONST64(0xfd81813e817cbf1f), CONST64(0x4094946a94d4fe35), CONST64(0x1cf7f7fbf7eb0cf3), -CONST64(0x18b9b9deb9a1676f), CONST64(0x8b13134c13985f26), CONST64(0x512c2cb02c7d9c58), CONST64(0x05d3d36bd3d6b8bb), -CONST64(0x8ce7e7bbe76b5cd3), CONST64(0x396e6ea56e57cbdc), CONST64(0xaac4c437c46ef395), CONST64(0x1b03030c03180f06), -CONST64(0xdc565645568a13ac), CONST64(0x5e44440d441a4988), CONST64(0xa07f7fe17fdf9efe), CONST64(0x88a9a99ea921374f), -CONST64(0x672a2aa82a4d8254), CONST64(0x0abbbbd6bbb16d6b), CONST64(0x87c1c123c146e29f), CONST64(0xf153535153a202a6), -CONST64(0x72dcdc57dcae8ba5), CONST64(0x530b0b2c0b582716), CONST64(0x019d9d4e9d9cd327), CONST64(0x2b6c6cad6c47c1d8), -CONST64(0xa43131c43195f562), CONST64(0xf37474cd7487b9e8), CONST64(0x15f6f6fff6e309f1), CONST64(0x4c464605460a438c), -CONST64(0xa5acac8aac092645), CONST64(0xb589891e893c970f), CONST64(0xb414145014a04428), CONST64(0xbae1e1a3e15b42df), -CONST64(0xa616165816b04e2c), CONST64(0xf73a3ae83acdd274), CONST64(0x066969b9696fd0d2), CONST64(0x4109092409482d12), -CONST64(0xd77070dd70a7ade0), CONST64(0x6fb6b6e2b6d95471), CONST64(0x1ed0d067d0ceb7bd), CONST64(0xd6eded93ed3b7ec7), -CONST64(0xe2cccc17cc2edb85), CONST64(0x68424215422a5784), CONST64(0x2c98985a98b4c22d), CONST64(0xeda4a4aaa4490e55), +CONST64(0xd818186018c07830), CONST64(0x2623238c2305af46), CONST64(0xb8c6c63fc67ef991), CONST64(0xfbe8e887e8136fcd), +CONST64(0xcb878726874ca113), CONST64(0x11b8b8dab8a9626d), CONST64(0x0901010401080502), CONST64(0x0d4f4f214f426e9e), +CONST64(0x9b3636d836adee6c), CONST64(0xffa6a6a2a6590451), CONST64(0x0cd2d26fd2debdb9), CONST64(0x0ef5f5f3f5fb06f7), +CONST64(0x967979f979ef80f2), CONST64(0x306f6fa16f5fcede), CONST64(0x6d91917e91fcef3f), CONST64(0xf852525552aa07a4), +CONST64(0x4760609d6027fdc0), CONST64(0x35bcbccabc897665), CONST64(0x379b9b569baccd2b), CONST64(0x8a8e8e028e048c01), +CONST64(0xd2a3a3b6a371155b), CONST64(0x6c0c0c300c603c18), CONST64(0x847b7bf17bff8af6), CONST64(0x803535d435b5e16a), +CONST64(0xf51d1d741de8693a), CONST64(0xb3e0e0a7e05347dd), CONST64(0x21d7d77bd7f6acb3), CONST64(0x9cc2c22fc25eed99), +CONST64(0x432e2eb82e6d965c), CONST64(0x294b4b314b627a96), CONST64(0x5dfefedffea321e1), CONST64(0xd5575741578216ae), +CONST64(0xbd15155415a8412a), CONST64(0xe87777c1779fb6ee), CONST64(0x923737dc37a5eb6e), CONST64(0x9ee5e5b3e57b56d7), +CONST64(0x139f9f469f8cd923), CONST64(0x23f0f0e7f0d317fd), CONST64(0x204a4a354a6a7f94), CONST64(0x44dada4fda9e95a9), +CONST64(0xa258587d58fa25b0), CONST64(0xcfc9c903c906ca8f), CONST64(0x7c2929a429558d52), CONST64(0x5a0a0a280a502214), +CONST64(0x50b1b1feb1e14f7f), CONST64(0xc9a0a0baa0691a5d), CONST64(0x146b6bb16b7fdad6), CONST64(0xd985852e855cab17), +CONST64(0x3cbdbdcebd817367), CONST64(0x8f5d5d695dd234ba), CONST64(0x9010104010805020), CONST64(0x07f4f4f7f4f303f5), +CONST64(0xddcbcb0bcb16c08b), CONST64(0xd33e3ef83eedc67c), CONST64(0x2d0505140528110a), CONST64(0x78676781671fe6ce), +CONST64(0x97e4e4b7e47353d5), CONST64(0x0227279c2725bb4e), CONST64(0x7341411941325882), CONST64(0xa78b8b168b2c9d0b), +CONST64(0xf6a7a7a6a7510153), CONST64(0xb27d7de97dcf94fa), CONST64(0x4995956e95dcfb37), CONST64(0x56d8d847d88e9fad), +CONST64(0x70fbfbcbfb8b30eb), CONST64(0xcdeeee9fee2371c1), CONST64(0xbb7c7ced7cc791f8), CONST64(0x716666856617e3cc), +CONST64(0x7bdddd53dda68ea7), CONST64(0xaf17175c17b84b2e), CONST64(0x454747014702468e), CONST64(0x1a9e9e429e84dc21), +CONST64(0xd4caca0fca1ec589), CONST64(0x582d2db42d75995a), CONST64(0x2ebfbfc6bf917963), CONST64(0x3f07071c07381b0e), +CONST64(0xacadad8ead012347), CONST64(0xb05a5a755aea2fb4), CONST64(0xef838336836cb51b), CONST64(0xb63333cc3385ff66), +CONST64(0x5c636391633ff2c6), CONST64(0x1202020802100a04), CONST64(0x93aaaa92aa393849), CONST64(0xde7171d971afa8e2), +CONST64(0xc6c8c807c80ecf8d), CONST64(0xd119196419c87d32), CONST64(0x3b49493949727092), CONST64(0x5fd9d943d9869aaf), +CONST64(0x31f2f2eff2c31df9), CONST64(0xa8e3e3abe34b48db), CONST64(0xb95b5b715be22ab6), CONST64(0xbc88881a8834920d), +CONST64(0x3e9a9a529aa4c829), CONST64(0x0b262698262dbe4c), CONST64(0xbf3232c8328dfa64), CONST64(0x59b0b0fab0e94a7d), +CONST64(0xf2e9e983e91b6acf), CONST64(0x770f0f3c0f78331e), CONST64(0x33d5d573d5e6a6b7), CONST64(0xf480803a8074ba1d), +CONST64(0x27bebec2be997c61), CONST64(0xebcdcd13cd26de87), CONST64(0x893434d034bde468), CONST64(0x3248483d487a7590), +CONST64(0x54ffffdbffab24e3), CONST64(0x8d7a7af57af78ff4), CONST64(0x6490907a90f4ea3d), CONST64(0x9d5f5f615fc23ebe), +CONST64(0x3d202080201da040), CONST64(0x0f6868bd6867d5d0), CONST64(0xca1a1a681ad07234), CONST64(0xb7aeae82ae192c41), +CONST64(0x7db4b4eab4c95e75), CONST64(0xce54544d549a19a8), CONST64(0x7f93937693ece53b), CONST64(0x2f222288220daa44), +CONST64(0x6364648d6407e9c8), CONST64(0x2af1f1e3f1db12ff), CONST64(0xcc7373d173bfa2e6), CONST64(0x8212124812905a24), +CONST64(0x7a40401d403a5d80), CONST64(0x4808082008402810), CONST64(0x95c3c32bc356e89b), CONST64(0xdfecec97ec337bc5), +CONST64(0x4ddbdb4bdb9690ab), CONST64(0xc0a1a1bea1611f5f), CONST64(0x918d8d0e8d1c8307), CONST64(0xc83d3df43df5c97a), +CONST64(0x5b97976697ccf133), CONST64(0x0000000000000000), CONST64(0xf9cfcf1bcf36d483), CONST64(0x6e2b2bac2b458756), +CONST64(0xe17676c57697b3ec), CONST64(0xe68282328264b019), CONST64(0x28d6d67fd6fea9b1), CONST64(0xc31b1b6c1bd87736), +CONST64(0x74b5b5eeb5c15b77), CONST64(0xbeafaf86af112943), CONST64(0x1d6a6ab56a77dfd4), CONST64(0xea50505d50ba0da0), +CONST64(0x5745450945124c8a), CONST64(0x38f3f3ebf3cb18fb), CONST64(0xad3030c0309df060), CONST64(0xc4efef9bef2b74c3), +CONST64(0xda3f3ffc3fe5c37e), CONST64(0xc755554955921caa), CONST64(0xdba2a2b2a2791059), CONST64(0xe9eaea8fea0365c9), +CONST64(0x6a656589650fecca), CONST64(0x03babad2bab96869), CONST64(0x4a2f2fbc2f65935e), CONST64(0x8ec0c027c04ee79d), +CONST64(0x60dede5fdebe81a1), CONST64(0xfc1c1c701ce06c38), CONST64(0x46fdfdd3fdbb2ee7), CONST64(0x1f4d4d294d52649a), +CONST64(0x7692927292e4e039), CONST64(0xfa7575c9758fbcea), CONST64(0x3606061806301e0c), CONST64(0xae8a8a128a249809), +CONST64(0x4bb2b2f2b2f94079), CONST64(0x85e6e6bfe66359d1), CONST64(0x7e0e0e380e70361c), CONST64(0xe71f1f7c1ff8633e), +CONST64(0x556262956237f7c4), CONST64(0x3ad4d477d4eea3b5), CONST64(0x81a8a89aa829324d), CONST64(0x5296966296c4f431), +CONST64(0x62f9f9c3f99b3aef), CONST64(0xa3c5c533c566f697), CONST64(0x102525942535b14a), CONST64(0xab59597959f220b2), +CONST64(0xd084842a8454ae15), CONST64(0xc57272d572b7a7e4), CONST64(0xec3939e439d5dd72), CONST64(0x164c4c2d4c5a6198), +CONST64(0x945e5e655eca3bbc), CONST64(0x9f7878fd78e785f0), CONST64(0xe53838e038ddd870), CONST64(0x988c8c0a8c148605), +CONST64(0x17d1d163d1c6b2bf), CONST64(0xe4a5a5aea5410b57), CONST64(0xa1e2e2afe2434dd9), CONST64(0x4e616199612ff8c2), +CONST64(0x42b3b3f6b3f1457b), CONST64(0x342121842115a542), CONST64(0x089c9c4a9c94d625), CONST64(0xee1e1e781ef0663c), +CONST64(0x6143431143225286), CONST64(0xb1c7c73bc776fc93), CONST64(0x4ffcfcd7fcb32be5), CONST64(0x2404041004201408), +CONST64(0xe351515951b208a2), CONST64(0x2599995e99bcc72f), CONST64(0x226d6da96d4fc4da), CONST64(0x650d0d340d68391a), +CONST64(0x79fafacffa8335e9), CONST64(0x69dfdf5bdfb684a3), CONST64(0xa97e7ee57ed79bfc), CONST64(0x19242490243db448), +CONST64(0xfe3b3bec3bc5d776), CONST64(0x9aabab96ab313d4b), CONST64(0xf0cece1fce3ed181), CONST64(0x9911114411885522), +CONST64(0x838f8f068f0c8903), CONST64(0x044e4e254e4a6b9c), CONST64(0x66b7b7e6b7d15173), CONST64(0xe0ebeb8beb0b60cb), +CONST64(0xc13c3cf03cfdcc78), CONST64(0xfd81813e817cbf1f), CONST64(0x4094946a94d4fe35), CONST64(0x1cf7f7fbf7eb0cf3), +CONST64(0x18b9b9deb9a1676f), CONST64(0x8b13134c13985f26), CONST64(0x512c2cb02c7d9c58), CONST64(0x05d3d36bd3d6b8bb), +CONST64(0x8ce7e7bbe76b5cd3), CONST64(0x396e6ea56e57cbdc), CONST64(0xaac4c437c46ef395), CONST64(0x1b03030c03180f06), +CONST64(0xdc565645568a13ac), CONST64(0x5e44440d441a4988), CONST64(0xa07f7fe17fdf9efe), CONST64(0x88a9a99ea921374f), +CONST64(0x672a2aa82a4d8254), CONST64(0x0abbbbd6bbb16d6b), CONST64(0x87c1c123c146e29f), CONST64(0xf153535153a202a6), +CONST64(0x72dcdc57dcae8ba5), CONST64(0x530b0b2c0b582716), CONST64(0x019d9d4e9d9cd327), CONST64(0x2b6c6cad6c47c1d8), +CONST64(0xa43131c43195f562), CONST64(0xf37474cd7487b9e8), CONST64(0x15f6f6fff6e309f1), CONST64(0x4c464605460a438c), +CONST64(0xa5acac8aac092645), CONST64(0xb589891e893c970f), CONST64(0xb414145014a04428), CONST64(0xbae1e1a3e15b42df), +CONST64(0xa616165816b04e2c), CONST64(0xf73a3ae83acdd274), CONST64(0x066969b9696fd0d2), CONST64(0x4109092409482d12), +CONST64(0xd77070dd70a7ade0), CONST64(0x6fb6b6e2b6d95471), CONST64(0x1ed0d067d0ceb7bd), CONST64(0xd6eded93ed3b7ec7), +CONST64(0xe2cccc17cc2edb85), CONST64(0x68424215422a5784), CONST64(0x2c98985a98b4c22d), CONST64(0xeda4a4aaa4490e55), CONST64(0x752828a0285d8850), CONST64(0x865c5c6d5cda31b8), CONST64(0x6bf8f8c7f8933fed), CONST64(0xc28686228644a411) }; static const ulong64 sbox2[] = { -CONST64(0x30d818186018c078), CONST64(0x462623238c2305af), CONST64(0x91b8c6c63fc67ef9), CONST64(0xcdfbe8e887e8136f), -CONST64(0x13cb878726874ca1), CONST64(0x6d11b8b8dab8a962), CONST64(0x0209010104010805), CONST64(0x9e0d4f4f214f426e), -CONST64(0x6c9b3636d836adee), CONST64(0x51ffa6a6a2a65904), CONST64(0xb90cd2d26fd2debd), CONST64(0xf70ef5f5f3f5fb06), -CONST64(0xf2967979f979ef80), CONST64(0xde306f6fa16f5fce), CONST64(0x3f6d91917e91fcef), CONST64(0xa4f852525552aa07), -CONST64(0xc04760609d6027fd), CONST64(0x6535bcbccabc8976), CONST64(0x2b379b9b569baccd), CONST64(0x018a8e8e028e048c), -CONST64(0x5bd2a3a3b6a37115), CONST64(0x186c0c0c300c603c), CONST64(0xf6847b7bf17bff8a), CONST64(0x6a803535d435b5e1), -CONST64(0x3af51d1d741de869), CONST64(0xddb3e0e0a7e05347), CONST64(0xb321d7d77bd7f6ac), CONST64(0x999cc2c22fc25eed), -CONST64(0x5c432e2eb82e6d96), CONST64(0x96294b4b314b627a), CONST64(0xe15dfefedffea321), CONST64(0xaed5575741578216), -CONST64(0x2abd15155415a841), CONST64(0xeee87777c1779fb6), CONST64(0x6e923737dc37a5eb), CONST64(0xd79ee5e5b3e57b56), -CONST64(0x23139f9f469f8cd9), CONST64(0xfd23f0f0e7f0d317), CONST64(0x94204a4a354a6a7f), CONST64(0xa944dada4fda9e95), -CONST64(0xb0a258587d58fa25), CONST64(0x8fcfc9c903c906ca), CONST64(0x527c2929a429558d), CONST64(0x145a0a0a280a5022), -CONST64(0x7f50b1b1feb1e14f), CONST64(0x5dc9a0a0baa0691a), CONST64(0xd6146b6bb16b7fda), CONST64(0x17d985852e855cab), -CONST64(0x673cbdbdcebd8173), CONST64(0xba8f5d5d695dd234), CONST64(0x2090101040108050), CONST64(0xf507f4f4f7f4f303), -CONST64(0x8bddcbcb0bcb16c0), CONST64(0x7cd33e3ef83eedc6), CONST64(0x0a2d050514052811), CONST64(0xce78676781671fe6), -CONST64(0xd597e4e4b7e47353), CONST64(0x4e0227279c2725bb), CONST64(0x8273414119413258), CONST64(0x0ba78b8b168b2c9d), -CONST64(0x53f6a7a7a6a75101), CONST64(0xfab27d7de97dcf94), CONST64(0x374995956e95dcfb), CONST64(0xad56d8d847d88e9f), -CONST64(0xeb70fbfbcbfb8b30), CONST64(0xc1cdeeee9fee2371), CONST64(0xf8bb7c7ced7cc791), CONST64(0xcc716666856617e3), -CONST64(0xa77bdddd53dda68e), CONST64(0x2eaf17175c17b84b), CONST64(0x8e45474701470246), CONST64(0x211a9e9e429e84dc), -CONST64(0x89d4caca0fca1ec5), CONST64(0x5a582d2db42d7599), CONST64(0x632ebfbfc6bf9179), CONST64(0x0e3f07071c07381b), -CONST64(0x47acadad8ead0123), CONST64(0xb4b05a5a755aea2f), CONST64(0x1bef838336836cb5), CONST64(0x66b63333cc3385ff), -CONST64(0xc65c636391633ff2), CONST64(0x041202020802100a), CONST64(0x4993aaaa92aa3938), CONST64(0xe2de7171d971afa8), -CONST64(0x8dc6c8c807c80ecf), CONST64(0x32d119196419c87d), CONST64(0x923b494939497270), CONST64(0xaf5fd9d943d9869a), -CONST64(0xf931f2f2eff2c31d), CONST64(0xdba8e3e3abe34b48), CONST64(0xb6b95b5b715be22a), CONST64(0x0dbc88881a883492), -CONST64(0x293e9a9a529aa4c8), CONST64(0x4c0b262698262dbe), CONST64(0x64bf3232c8328dfa), CONST64(0x7d59b0b0fab0e94a), -CONST64(0xcff2e9e983e91b6a), CONST64(0x1e770f0f3c0f7833), CONST64(0xb733d5d573d5e6a6), CONST64(0x1df480803a8074ba), -CONST64(0x6127bebec2be997c), CONST64(0x87ebcdcd13cd26de), CONST64(0x68893434d034bde4), CONST64(0x903248483d487a75), -CONST64(0xe354ffffdbffab24), CONST64(0xf48d7a7af57af78f), CONST64(0x3d6490907a90f4ea), CONST64(0xbe9d5f5f615fc23e), -CONST64(0x403d202080201da0), CONST64(0xd00f6868bd6867d5), CONST64(0x34ca1a1a681ad072), CONST64(0x41b7aeae82ae192c), -CONST64(0x757db4b4eab4c95e), CONST64(0xa8ce54544d549a19), CONST64(0x3b7f93937693ece5), CONST64(0x442f222288220daa), -CONST64(0xc86364648d6407e9), CONST64(0xff2af1f1e3f1db12), CONST64(0xe6cc7373d173bfa2), CONST64(0x248212124812905a), -CONST64(0x807a40401d403a5d), CONST64(0x1048080820084028), CONST64(0x9b95c3c32bc356e8), CONST64(0xc5dfecec97ec337b), -CONST64(0xab4ddbdb4bdb9690), CONST64(0x5fc0a1a1bea1611f), CONST64(0x07918d8d0e8d1c83), CONST64(0x7ac83d3df43df5c9), -CONST64(0x335b97976697ccf1), CONST64(0x0000000000000000), CONST64(0x83f9cfcf1bcf36d4), CONST64(0x566e2b2bac2b4587), -CONST64(0xece17676c57697b3), CONST64(0x19e68282328264b0), CONST64(0xb128d6d67fd6fea9), CONST64(0x36c31b1b6c1bd877), -CONST64(0x7774b5b5eeb5c15b), CONST64(0x43beafaf86af1129), CONST64(0xd41d6a6ab56a77df), CONST64(0xa0ea50505d50ba0d), -CONST64(0x8a5745450945124c), CONST64(0xfb38f3f3ebf3cb18), CONST64(0x60ad3030c0309df0), CONST64(0xc3c4efef9bef2b74), -CONST64(0x7eda3f3ffc3fe5c3), CONST64(0xaac755554955921c), CONST64(0x59dba2a2b2a27910), CONST64(0xc9e9eaea8fea0365), -CONST64(0xca6a656589650fec), CONST64(0x6903babad2bab968), CONST64(0x5e4a2f2fbc2f6593), CONST64(0x9d8ec0c027c04ee7), -CONST64(0xa160dede5fdebe81), CONST64(0x38fc1c1c701ce06c), CONST64(0xe746fdfdd3fdbb2e), CONST64(0x9a1f4d4d294d5264), -CONST64(0x397692927292e4e0), CONST64(0xeafa7575c9758fbc), CONST64(0x0c3606061806301e), CONST64(0x09ae8a8a128a2498), -CONST64(0x794bb2b2f2b2f940), CONST64(0xd185e6e6bfe66359), CONST64(0x1c7e0e0e380e7036), CONST64(0x3ee71f1f7c1ff863), -CONST64(0xc4556262956237f7), CONST64(0xb53ad4d477d4eea3), CONST64(0x4d81a8a89aa82932), CONST64(0x315296966296c4f4), -CONST64(0xef62f9f9c3f99b3a), CONST64(0x97a3c5c533c566f6), CONST64(0x4a102525942535b1), CONST64(0xb2ab59597959f220), -CONST64(0x15d084842a8454ae), CONST64(0xe4c57272d572b7a7), CONST64(0x72ec3939e439d5dd), CONST64(0x98164c4c2d4c5a61), -CONST64(0xbc945e5e655eca3b), CONST64(0xf09f7878fd78e785), CONST64(0x70e53838e038ddd8), CONST64(0x05988c8c0a8c1486), -CONST64(0xbf17d1d163d1c6b2), CONST64(0x57e4a5a5aea5410b), CONST64(0xd9a1e2e2afe2434d), CONST64(0xc24e616199612ff8), -CONST64(0x7b42b3b3f6b3f145), CONST64(0x42342121842115a5), CONST64(0x25089c9c4a9c94d6), CONST64(0x3cee1e1e781ef066), -CONST64(0x8661434311432252), CONST64(0x93b1c7c73bc776fc), CONST64(0xe54ffcfcd7fcb32b), CONST64(0x0824040410042014), -CONST64(0xa2e351515951b208), CONST64(0x2f2599995e99bcc7), CONST64(0xda226d6da96d4fc4), CONST64(0x1a650d0d340d6839), -CONST64(0xe979fafacffa8335), CONST64(0xa369dfdf5bdfb684), CONST64(0xfca97e7ee57ed79b), CONST64(0x4819242490243db4), -CONST64(0x76fe3b3bec3bc5d7), CONST64(0x4b9aabab96ab313d), CONST64(0x81f0cece1fce3ed1), CONST64(0x2299111144118855), -CONST64(0x03838f8f068f0c89), CONST64(0x9c044e4e254e4a6b), CONST64(0x7366b7b7e6b7d151), CONST64(0xcbe0ebeb8beb0b60), -CONST64(0x78c13c3cf03cfdcc), CONST64(0x1ffd81813e817cbf), CONST64(0x354094946a94d4fe), CONST64(0xf31cf7f7fbf7eb0c), -CONST64(0x6f18b9b9deb9a167), CONST64(0x268b13134c13985f), CONST64(0x58512c2cb02c7d9c), CONST64(0xbb05d3d36bd3d6b8), -CONST64(0xd38ce7e7bbe76b5c), CONST64(0xdc396e6ea56e57cb), CONST64(0x95aac4c437c46ef3), CONST64(0x061b03030c03180f), -CONST64(0xacdc565645568a13), CONST64(0x885e44440d441a49), CONST64(0xfea07f7fe17fdf9e), CONST64(0x4f88a9a99ea92137), -CONST64(0x54672a2aa82a4d82), CONST64(0x6b0abbbbd6bbb16d), CONST64(0x9f87c1c123c146e2), CONST64(0xa6f153535153a202), -CONST64(0xa572dcdc57dcae8b), CONST64(0x16530b0b2c0b5827), CONST64(0x27019d9d4e9d9cd3), CONST64(0xd82b6c6cad6c47c1), -CONST64(0x62a43131c43195f5), CONST64(0xe8f37474cd7487b9), CONST64(0xf115f6f6fff6e309), CONST64(0x8c4c464605460a43), -CONST64(0x45a5acac8aac0926), CONST64(0x0fb589891e893c97), CONST64(0x28b414145014a044), CONST64(0xdfbae1e1a3e15b42), -CONST64(0x2ca616165816b04e), CONST64(0x74f73a3ae83acdd2), CONST64(0xd2066969b9696fd0), CONST64(0x124109092409482d), -CONST64(0xe0d77070dd70a7ad), CONST64(0x716fb6b6e2b6d954), CONST64(0xbd1ed0d067d0ceb7), CONST64(0xc7d6eded93ed3b7e), -CONST64(0x85e2cccc17cc2edb), CONST64(0x8468424215422a57), CONST64(0x2d2c98985a98b4c2), CONST64(0x55eda4a4aaa4490e), +CONST64(0x30d818186018c078), CONST64(0x462623238c2305af), CONST64(0x91b8c6c63fc67ef9), CONST64(0xcdfbe8e887e8136f), +CONST64(0x13cb878726874ca1), CONST64(0x6d11b8b8dab8a962), CONST64(0x0209010104010805), CONST64(0x9e0d4f4f214f426e), +CONST64(0x6c9b3636d836adee), CONST64(0x51ffa6a6a2a65904), CONST64(0xb90cd2d26fd2debd), CONST64(0xf70ef5f5f3f5fb06), +CONST64(0xf2967979f979ef80), CONST64(0xde306f6fa16f5fce), CONST64(0x3f6d91917e91fcef), CONST64(0xa4f852525552aa07), +CONST64(0xc04760609d6027fd), CONST64(0x6535bcbccabc8976), CONST64(0x2b379b9b569baccd), CONST64(0x018a8e8e028e048c), +CONST64(0x5bd2a3a3b6a37115), CONST64(0x186c0c0c300c603c), CONST64(0xf6847b7bf17bff8a), CONST64(0x6a803535d435b5e1), +CONST64(0x3af51d1d741de869), CONST64(0xddb3e0e0a7e05347), CONST64(0xb321d7d77bd7f6ac), CONST64(0x999cc2c22fc25eed), +CONST64(0x5c432e2eb82e6d96), CONST64(0x96294b4b314b627a), CONST64(0xe15dfefedffea321), CONST64(0xaed5575741578216), +CONST64(0x2abd15155415a841), CONST64(0xeee87777c1779fb6), CONST64(0x6e923737dc37a5eb), CONST64(0xd79ee5e5b3e57b56), +CONST64(0x23139f9f469f8cd9), CONST64(0xfd23f0f0e7f0d317), CONST64(0x94204a4a354a6a7f), CONST64(0xa944dada4fda9e95), +CONST64(0xb0a258587d58fa25), CONST64(0x8fcfc9c903c906ca), CONST64(0x527c2929a429558d), CONST64(0x145a0a0a280a5022), +CONST64(0x7f50b1b1feb1e14f), CONST64(0x5dc9a0a0baa0691a), CONST64(0xd6146b6bb16b7fda), CONST64(0x17d985852e855cab), +CONST64(0x673cbdbdcebd8173), CONST64(0xba8f5d5d695dd234), CONST64(0x2090101040108050), CONST64(0xf507f4f4f7f4f303), +CONST64(0x8bddcbcb0bcb16c0), CONST64(0x7cd33e3ef83eedc6), CONST64(0x0a2d050514052811), CONST64(0xce78676781671fe6), +CONST64(0xd597e4e4b7e47353), CONST64(0x4e0227279c2725bb), CONST64(0x8273414119413258), CONST64(0x0ba78b8b168b2c9d), +CONST64(0x53f6a7a7a6a75101), CONST64(0xfab27d7de97dcf94), CONST64(0x374995956e95dcfb), CONST64(0xad56d8d847d88e9f), +CONST64(0xeb70fbfbcbfb8b30), CONST64(0xc1cdeeee9fee2371), CONST64(0xf8bb7c7ced7cc791), CONST64(0xcc716666856617e3), +CONST64(0xa77bdddd53dda68e), CONST64(0x2eaf17175c17b84b), CONST64(0x8e45474701470246), CONST64(0x211a9e9e429e84dc), +CONST64(0x89d4caca0fca1ec5), CONST64(0x5a582d2db42d7599), CONST64(0x632ebfbfc6bf9179), CONST64(0x0e3f07071c07381b), +CONST64(0x47acadad8ead0123), CONST64(0xb4b05a5a755aea2f), CONST64(0x1bef838336836cb5), CONST64(0x66b63333cc3385ff), +CONST64(0xc65c636391633ff2), CONST64(0x041202020802100a), CONST64(0x4993aaaa92aa3938), CONST64(0xe2de7171d971afa8), +CONST64(0x8dc6c8c807c80ecf), CONST64(0x32d119196419c87d), CONST64(0x923b494939497270), CONST64(0xaf5fd9d943d9869a), +CONST64(0xf931f2f2eff2c31d), CONST64(0xdba8e3e3abe34b48), CONST64(0xb6b95b5b715be22a), CONST64(0x0dbc88881a883492), +CONST64(0x293e9a9a529aa4c8), CONST64(0x4c0b262698262dbe), CONST64(0x64bf3232c8328dfa), CONST64(0x7d59b0b0fab0e94a), +CONST64(0xcff2e9e983e91b6a), CONST64(0x1e770f0f3c0f7833), CONST64(0xb733d5d573d5e6a6), CONST64(0x1df480803a8074ba), +CONST64(0x6127bebec2be997c), CONST64(0x87ebcdcd13cd26de), CONST64(0x68893434d034bde4), CONST64(0x903248483d487a75), +CONST64(0xe354ffffdbffab24), CONST64(0xf48d7a7af57af78f), CONST64(0x3d6490907a90f4ea), CONST64(0xbe9d5f5f615fc23e), +CONST64(0x403d202080201da0), CONST64(0xd00f6868bd6867d5), CONST64(0x34ca1a1a681ad072), CONST64(0x41b7aeae82ae192c), +CONST64(0x757db4b4eab4c95e), CONST64(0xa8ce54544d549a19), CONST64(0x3b7f93937693ece5), CONST64(0x442f222288220daa), +CONST64(0xc86364648d6407e9), CONST64(0xff2af1f1e3f1db12), CONST64(0xe6cc7373d173bfa2), CONST64(0x248212124812905a), +CONST64(0x807a40401d403a5d), CONST64(0x1048080820084028), CONST64(0x9b95c3c32bc356e8), CONST64(0xc5dfecec97ec337b), +CONST64(0xab4ddbdb4bdb9690), CONST64(0x5fc0a1a1bea1611f), CONST64(0x07918d8d0e8d1c83), CONST64(0x7ac83d3df43df5c9), +CONST64(0x335b97976697ccf1), CONST64(0x0000000000000000), CONST64(0x83f9cfcf1bcf36d4), CONST64(0x566e2b2bac2b4587), +CONST64(0xece17676c57697b3), CONST64(0x19e68282328264b0), CONST64(0xb128d6d67fd6fea9), CONST64(0x36c31b1b6c1bd877), +CONST64(0x7774b5b5eeb5c15b), CONST64(0x43beafaf86af1129), CONST64(0xd41d6a6ab56a77df), CONST64(0xa0ea50505d50ba0d), +CONST64(0x8a5745450945124c), CONST64(0xfb38f3f3ebf3cb18), CONST64(0x60ad3030c0309df0), CONST64(0xc3c4efef9bef2b74), +CONST64(0x7eda3f3ffc3fe5c3), CONST64(0xaac755554955921c), CONST64(0x59dba2a2b2a27910), CONST64(0xc9e9eaea8fea0365), +CONST64(0xca6a656589650fec), CONST64(0x6903babad2bab968), CONST64(0x5e4a2f2fbc2f6593), CONST64(0x9d8ec0c027c04ee7), +CONST64(0xa160dede5fdebe81), CONST64(0x38fc1c1c701ce06c), CONST64(0xe746fdfdd3fdbb2e), CONST64(0x9a1f4d4d294d5264), +CONST64(0x397692927292e4e0), CONST64(0xeafa7575c9758fbc), CONST64(0x0c3606061806301e), CONST64(0x09ae8a8a128a2498), +CONST64(0x794bb2b2f2b2f940), CONST64(0xd185e6e6bfe66359), CONST64(0x1c7e0e0e380e7036), CONST64(0x3ee71f1f7c1ff863), +CONST64(0xc4556262956237f7), CONST64(0xb53ad4d477d4eea3), CONST64(0x4d81a8a89aa82932), CONST64(0x315296966296c4f4), +CONST64(0xef62f9f9c3f99b3a), CONST64(0x97a3c5c533c566f6), CONST64(0x4a102525942535b1), CONST64(0xb2ab59597959f220), +CONST64(0x15d084842a8454ae), CONST64(0xe4c57272d572b7a7), CONST64(0x72ec3939e439d5dd), CONST64(0x98164c4c2d4c5a61), +CONST64(0xbc945e5e655eca3b), CONST64(0xf09f7878fd78e785), CONST64(0x70e53838e038ddd8), CONST64(0x05988c8c0a8c1486), +CONST64(0xbf17d1d163d1c6b2), CONST64(0x57e4a5a5aea5410b), CONST64(0xd9a1e2e2afe2434d), CONST64(0xc24e616199612ff8), +CONST64(0x7b42b3b3f6b3f145), CONST64(0x42342121842115a5), CONST64(0x25089c9c4a9c94d6), CONST64(0x3cee1e1e781ef066), +CONST64(0x8661434311432252), CONST64(0x93b1c7c73bc776fc), CONST64(0xe54ffcfcd7fcb32b), CONST64(0x0824040410042014), +CONST64(0xa2e351515951b208), CONST64(0x2f2599995e99bcc7), CONST64(0xda226d6da96d4fc4), CONST64(0x1a650d0d340d6839), +CONST64(0xe979fafacffa8335), CONST64(0xa369dfdf5bdfb684), CONST64(0xfca97e7ee57ed79b), CONST64(0x4819242490243db4), +CONST64(0x76fe3b3bec3bc5d7), CONST64(0x4b9aabab96ab313d), CONST64(0x81f0cece1fce3ed1), CONST64(0x2299111144118855), +CONST64(0x03838f8f068f0c89), CONST64(0x9c044e4e254e4a6b), CONST64(0x7366b7b7e6b7d151), CONST64(0xcbe0ebeb8beb0b60), +CONST64(0x78c13c3cf03cfdcc), CONST64(0x1ffd81813e817cbf), CONST64(0x354094946a94d4fe), CONST64(0xf31cf7f7fbf7eb0c), +CONST64(0x6f18b9b9deb9a167), CONST64(0x268b13134c13985f), CONST64(0x58512c2cb02c7d9c), CONST64(0xbb05d3d36bd3d6b8), +CONST64(0xd38ce7e7bbe76b5c), CONST64(0xdc396e6ea56e57cb), CONST64(0x95aac4c437c46ef3), CONST64(0x061b03030c03180f), +CONST64(0xacdc565645568a13), CONST64(0x885e44440d441a49), CONST64(0xfea07f7fe17fdf9e), CONST64(0x4f88a9a99ea92137), +CONST64(0x54672a2aa82a4d82), CONST64(0x6b0abbbbd6bbb16d), CONST64(0x9f87c1c123c146e2), CONST64(0xa6f153535153a202), +CONST64(0xa572dcdc57dcae8b), CONST64(0x16530b0b2c0b5827), CONST64(0x27019d9d4e9d9cd3), CONST64(0xd82b6c6cad6c47c1), +CONST64(0x62a43131c43195f5), CONST64(0xe8f37474cd7487b9), CONST64(0xf115f6f6fff6e309), CONST64(0x8c4c464605460a43), +CONST64(0x45a5acac8aac0926), CONST64(0x0fb589891e893c97), CONST64(0x28b414145014a044), CONST64(0xdfbae1e1a3e15b42), +CONST64(0x2ca616165816b04e), CONST64(0x74f73a3ae83acdd2), CONST64(0xd2066969b9696fd0), CONST64(0x124109092409482d), +CONST64(0xe0d77070dd70a7ad), CONST64(0x716fb6b6e2b6d954), CONST64(0xbd1ed0d067d0ceb7), CONST64(0xc7d6eded93ed3b7e), +CONST64(0x85e2cccc17cc2edb), CONST64(0x8468424215422a57), CONST64(0x2d2c98985a98b4c2), CONST64(0x55eda4a4aaa4490e), CONST64(0x50752828a0285d88), CONST64(0xb8865c5c6d5cda31), CONST64(0xed6bf8f8c7f8933f), CONST64(0x11c28686228644a4) }; static const ulong64 sbox3[] = { -CONST64(0x7830d818186018c0), CONST64(0xaf462623238c2305), CONST64(0xf991b8c6c63fc67e), CONST64(0x6fcdfbe8e887e813), -CONST64(0xa113cb878726874c), CONST64(0x626d11b8b8dab8a9), CONST64(0x0502090101040108), CONST64(0x6e9e0d4f4f214f42), -CONST64(0xee6c9b3636d836ad), CONST64(0x0451ffa6a6a2a659), CONST64(0xbdb90cd2d26fd2de), CONST64(0x06f70ef5f5f3f5fb), -CONST64(0x80f2967979f979ef), CONST64(0xcede306f6fa16f5f), CONST64(0xef3f6d91917e91fc), CONST64(0x07a4f852525552aa), -CONST64(0xfdc04760609d6027), CONST64(0x766535bcbccabc89), CONST64(0xcd2b379b9b569bac), CONST64(0x8c018a8e8e028e04), -CONST64(0x155bd2a3a3b6a371), CONST64(0x3c186c0c0c300c60), CONST64(0x8af6847b7bf17bff), CONST64(0xe16a803535d435b5), -CONST64(0x693af51d1d741de8), CONST64(0x47ddb3e0e0a7e053), CONST64(0xacb321d7d77bd7f6), CONST64(0xed999cc2c22fc25e), -CONST64(0x965c432e2eb82e6d), CONST64(0x7a96294b4b314b62), CONST64(0x21e15dfefedffea3), CONST64(0x16aed55757415782), -CONST64(0x412abd15155415a8), CONST64(0xb6eee87777c1779f), CONST64(0xeb6e923737dc37a5), CONST64(0x56d79ee5e5b3e57b), -CONST64(0xd923139f9f469f8c), CONST64(0x17fd23f0f0e7f0d3), CONST64(0x7f94204a4a354a6a), CONST64(0x95a944dada4fda9e), -CONST64(0x25b0a258587d58fa), CONST64(0xca8fcfc9c903c906), CONST64(0x8d527c2929a42955), CONST64(0x22145a0a0a280a50), -CONST64(0x4f7f50b1b1feb1e1), CONST64(0x1a5dc9a0a0baa069), CONST64(0xdad6146b6bb16b7f), CONST64(0xab17d985852e855c), -CONST64(0x73673cbdbdcebd81), CONST64(0x34ba8f5d5d695dd2), CONST64(0x5020901010401080), CONST64(0x03f507f4f4f7f4f3), -CONST64(0xc08bddcbcb0bcb16), CONST64(0xc67cd33e3ef83eed), CONST64(0x110a2d0505140528), CONST64(0xe6ce78676781671f), -CONST64(0x53d597e4e4b7e473), CONST64(0xbb4e0227279c2725), CONST64(0x5882734141194132), CONST64(0x9d0ba78b8b168b2c), -CONST64(0x0153f6a7a7a6a751), CONST64(0x94fab27d7de97dcf), CONST64(0xfb374995956e95dc), CONST64(0x9fad56d8d847d88e), -CONST64(0x30eb70fbfbcbfb8b), CONST64(0x71c1cdeeee9fee23), CONST64(0x91f8bb7c7ced7cc7), CONST64(0xe3cc716666856617), -CONST64(0x8ea77bdddd53dda6), CONST64(0x4b2eaf17175c17b8), CONST64(0x468e454747014702), CONST64(0xdc211a9e9e429e84), -CONST64(0xc589d4caca0fca1e), CONST64(0x995a582d2db42d75), CONST64(0x79632ebfbfc6bf91), CONST64(0x1b0e3f07071c0738), -CONST64(0x2347acadad8ead01), CONST64(0x2fb4b05a5a755aea), CONST64(0xb51bef838336836c), CONST64(0xff66b63333cc3385), -CONST64(0xf2c65c636391633f), CONST64(0x0a04120202080210), CONST64(0x384993aaaa92aa39), CONST64(0xa8e2de7171d971af), -CONST64(0xcf8dc6c8c807c80e), CONST64(0x7d32d119196419c8), CONST64(0x70923b4949394972), CONST64(0x9aaf5fd9d943d986), -CONST64(0x1df931f2f2eff2c3), CONST64(0x48dba8e3e3abe34b), CONST64(0x2ab6b95b5b715be2), CONST64(0x920dbc88881a8834), -CONST64(0xc8293e9a9a529aa4), CONST64(0xbe4c0b262698262d), CONST64(0xfa64bf3232c8328d), CONST64(0x4a7d59b0b0fab0e9), -CONST64(0x6acff2e9e983e91b), CONST64(0x331e770f0f3c0f78), CONST64(0xa6b733d5d573d5e6), CONST64(0xba1df480803a8074), -CONST64(0x7c6127bebec2be99), CONST64(0xde87ebcdcd13cd26), CONST64(0xe468893434d034bd), CONST64(0x75903248483d487a), -CONST64(0x24e354ffffdbffab), CONST64(0x8ff48d7a7af57af7), CONST64(0xea3d6490907a90f4), CONST64(0x3ebe9d5f5f615fc2), -CONST64(0xa0403d202080201d), CONST64(0xd5d00f6868bd6867), CONST64(0x7234ca1a1a681ad0), CONST64(0x2c41b7aeae82ae19), -CONST64(0x5e757db4b4eab4c9), CONST64(0x19a8ce54544d549a), CONST64(0xe53b7f93937693ec), CONST64(0xaa442f222288220d), -CONST64(0xe9c86364648d6407), CONST64(0x12ff2af1f1e3f1db), CONST64(0xa2e6cc7373d173bf), CONST64(0x5a24821212481290), -CONST64(0x5d807a40401d403a), CONST64(0x2810480808200840), CONST64(0xe89b95c3c32bc356), CONST64(0x7bc5dfecec97ec33), -CONST64(0x90ab4ddbdb4bdb96), CONST64(0x1f5fc0a1a1bea161), CONST64(0x8307918d8d0e8d1c), CONST64(0xc97ac83d3df43df5), -CONST64(0xf1335b97976697cc), CONST64(0x0000000000000000), CONST64(0xd483f9cfcf1bcf36), CONST64(0x87566e2b2bac2b45), -CONST64(0xb3ece17676c57697), CONST64(0xb019e68282328264), CONST64(0xa9b128d6d67fd6fe), CONST64(0x7736c31b1b6c1bd8), -CONST64(0x5b7774b5b5eeb5c1), CONST64(0x2943beafaf86af11), CONST64(0xdfd41d6a6ab56a77), CONST64(0x0da0ea50505d50ba), -CONST64(0x4c8a574545094512), CONST64(0x18fb38f3f3ebf3cb), CONST64(0xf060ad3030c0309d), CONST64(0x74c3c4efef9bef2b), -CONST64(0xc37eda3f3ffc3fe5), CONST64(0x1caac75555495592), CONST64(0x1059dba2a2b2a279), CONST64(0x65c9e9eaea8fea03), -CONST64(0xecca6a656589650f), CONST64(0x686903babad2bab9), CONST64(0x935e4a2f2fbc2f65), CONST64(0xe79d8ec0c027c04e), -CONST64(0x81a160dede5fdebe), CONST64(0x6c38fc1c1c701ce0), CONST64(0x2ee746fdfdd3fdbb), CONST64(0x649a1f4d4d294d52), -CONST64(0xe0397692927292e4), CONST64(0xbceafa7575c9758f), CONST64(0x1e0c360606180630), CONST64(0x9809ae8a8a128a24), -CONST64(0x40794bb2b2f2b2f9), CONST64(0x59d185e6e6bfe663), CONST64(0x361c7e0e0e380e70), CONST64(0x633ee71f1f7c1ff8), -CONST64(0xf7c4556262956237), CONST64(0xa3b53ad4d477d4ee), CONST64(0x324d81a8a89aa829), CONST64(0xf4315296966296c4), -CONST64(0x3aef62f9f9c3f99b), CONST64(0xf697a3c5c533c566), CONST64(0xb14a102525942535), CONST64(0x20b2ab59597959f2), -CONST64(0xae15d084842a8454), CONST64(0xa7e4c57272d572b7), CONST64(0xdd72ec3939e439d5), CONST64(0x6198164c4c2d4c5a), -CONST64(0x3bbc945e5e655eca), CONST64(0x85f09f7878fd78e7), CONST64(0xd870e53838e038dd), CONST64(0x8605988c8c0a8c14), -CONST64(0xb2bf17d1d163d1c6), CONST64(0x0b57e4a5a5aea541), CONST64(0x4dd9a1e2e2afe243), CONST64(0xf8c24e616199612f), -CONST64(0x457b42b3b3f6b3f1), CONST64(0xa542342121842115), CONST64(0xd625089c9c4a9c94), CONST64(0x663cee1e1e781ef0), -CONST64(0x5286614343114322), CONST64(0xfc93b1c7c73bc776), CONST64(0x2be54ffcfcd7fcb3), CONST64(0x1408240404100420), -CONST64(0x08a2e351515951b2), CONST64(0xc72f2599995e99bc), CONST64(0xc4da226d6da96d4f), CONST64(0x391a650d0d340d68), -CONST64(0x35e979fafacffa83), CONST64(0x84a369dfdf5bdfb6), CONST64(0x9bfca97e7ee57ed7), CONST64(0xb44819242490243d), -CONST64(0xd776fe3b3bec3bc5), CONST64(0x3d4b9aabab96ab31), CONST64(0xd181f0cece1fce3e), CONST64(0x5522991111441188), -CONST64(0x8903838f8f068f0c), CONST64(0x6b9c044e4e254e4a), CONST64(0x517366b7b7e6b7d1), CONST64(0x60cbe0ebeb8beb0b), -CONST64(0xcc78c13c3cf03cfd), CONST64(0xbf1ffd81813e817c), CONST64(0xfe354094946a94d4), CONST64(0x0cf31cf7f7fbf7eb), -CONST64(0x676f18b9b9deb9a1), CONST64(0x5f268b13134c1398), CONST64(0x9c58512c2cb02c7d), CONST64(0xb8bb05d3d36bd3d6), -CONST64(0x5cd38ce7e7bbe76b), CONST64(0xcbdc396e6ea56e57), CONST64(0xf395aac4c437c46e), CONST64(0x0f061b03030c0318), -CONST64(0x13acdc565645568a), CONST64(0x49885e44440d441a), CONST64(0x9efea07f7fe17fdf), CONST64(0x374f88a9a99ea921), -CONST64(0x8254672a2aa82a4d), CONST64(0x6d6b0abbbbd6bbb1), CONST64(0xe29f87c1c123c146), CONST64(0x02a6f153535153a2), -CONST64(0x8ba572dcdc57dcae), CONST64(0x2716530b0b2c0b58), CONST64(0xd327019d9d4e9d9c), CONST64(0xc1d82b6c6cad6c47), -CONST64(0xf562a43131c43195), CONST64(0xb9e8f37474cd7487), CONST64(0x09f115f6f6fff6e3), CONST64(0x438c4c464605460a), -CONST64(0x2645a5acac8aac09), CONST64(0x970fb589891e893c), CONST64(0x4428b414145014a0), CONST64(0x42dfbae1e1a3e15b), -CONST64(0x4e2ca616165816b0), CONST64(0xd274f73a3ae83acd), CONST64(0xd0d2066969b9696f), CONST64(0x2d12410909240948), -CONST64(0xade0d77070dd70a7), CONST64(0x54716fb6b6e2b6d9), CONST64(0xb7bd1ed0d067d0ce), CONST64(0x7ec7d6eded93ed3b), -CONST64(0xdb85e2cccc17cc2e), CONST64(0x578468424215422a), CONST64(0xc22d2c98985a98b4), CONST64(0x0e55eda4a4aaa449), +CONST64(0x7830d818186018c0), CONST64(0xaf462623238c2305), CONST64(0xf991b8c6c63fc67e), CONST64(0x6fcdfbe8e887e813), +CONST64(0xa113cb878726874c), CONST64(0x626d11b8b8dab8a9), CONST64(0x0502090101040108), CONST64(0x6e9e0d4f4f214f42), +CONST64(0xee6c9b3636d836ad), CONST64(0x0451ffa6a6a2a659), CONST64(0xbdb90cd2d26fd2de), CONST64(0x06f70ef5f5f3f5fb), +CONST64(0x80f2967979f979ef), CONST64(0xcede306f6fa16f5f), CONST64(0xef3f6d91917e91fc), CONST64(0x07a4f852525552aa), +CONST64(0xfdc04760609d6027), CONST64(0x766535bcbccabc89), CONST64(0xcd2b379b9b569bac), CONST64(0x8c018a8e8e028e04), +CONST64(0x155bd2a3a3b6a371), CONST64(0x3c186c0c0c300c60), CONST64(0x8af6847b7bf17bff), CONST64(0xe16a803535d435b5), +CONST64(0x693af51d1d741de8), CONST64(0x47ddb3e0e0a7e053), CONST64(0xacb321d7d77bd7f6), CONST64(0xed999cc2c22fc25e), +CONST64(0x965c432e2eb82e6d), CONST64(0x7a96294b4b314b62), CONST64(0x21e15dfefedffea3), CONST64(0x16aed55757415782), +CONST64(0x412abd15155415a8), CONST64(0xb6eee87777c1779f), CONST64(0xeb6e923737dc37a5), CONST64(0x56d79ee5e5b3e57b), +CONST64(0xd923139f9f469f8c), CONST64(0x17fd23f0f0e7f0d3), CONST64(0x7f94204a4a354a6a), CONST64(0x95a944dada4fda9e), +CONST64(0x25b0a258587d58fa), CONST64(0xca8fcfc9c903c906), CONST64(0x8d527c2929a42955), CONST64(0x22145a0a0a280a50), +CONST64(0x4f7f50b1b1feb1e1), CONST64(0x1a5dc9a0a0baa069), CONST64(0xdad6146b6bb16b7f), CONST64(0xab17d985852e855c), +CONST64(0x73673cbdbdcebd81), CONST64(0x34ba8f5d5d695dd2), CONST64(0x5020901010401080), CONST64(0x03f507f4f4f7f4f3), +CONST64(0xc08bddcbcb0bcb16), CONST64(0xc67cd33e3ef83eed), CONST64(0x110a2d0505140528), CONST64(0xe6ce78676781671f), +CONST64(0x53d597e4e4b7e473), CONST64(0xbb4e0227279c2725), CONST64(0x5882734141194132), CONST64(0x9d0ba78b8b168b2c), +CONST64(0x0153f6a7a7a6a751), CONST64(0x94fab27d7de97dcf), CONST64(0xfb374995956e95dc), CONST64(0x9fad56d8d847d88e), +CONST64(0x30eb70fbfbcbfb8b), CONST64(0x71c1cdeeee9fee23), CONST64(0x91f8bb7c7ced7cc7), CONST64(0xe3cc716666856617), +CONST64(0x8ea77bdddd53dda6), CONST64(0x4b2eaf17175c17b8), CONST64(0x468e454747014702), CONST64(0xdc211a9e9e429e84), +CONST64(0xc589d4caca0fca1e), CONST64(0x995a582d2db42d75), CONST64(0x79632ebfbfc6bf91), CONST64(0x1b0e3f07071c0738), +CONST64(0x2347acadad8ead01), CONST64(0x2fb4b05a5a755aea), CONST64(0xb51bef838336836c), CONST64(0xff66b63333cc3385), +CONST64(0xf2c65c636391633f), CONST64(0x0a04120202080210), CONST64(0x384993aaaa92aa39), CONST64(0xa8e2de7171d971af), +CONST64(0xcf8dc6c8c807c80e), CONST64(0x7d32d119196419c8), CONST64(0x70923b4949394972), CONST64(0x9aaf5fd9d943d986), +CONST64(0x1df931f2f2eff2c3), CONST64(0x48dba8e3e3abe34b), CONST64(0x2ab6b95b5b715be2), CONST64(0x920dbc88881a8834), +CONST64(0xc8293e9a9a529aa4), CONST64(0xbe4c0b262698262d), CONST64(0xfa64bf3232c8328d), CONST64(0x4a7d59b0b0fab0e9), +CONST64(0x6acff2e9e983e91b), CONST64(0x331e770f0f3c0f78), CONST64(0xa6b733d5d573d5e6), CONST64(0xba1df480803a8074), +CONST64(0x7c6127bebec2be99), CONST64(0xde87ebcdcd13cd26), CONST64(0xe468893434d034bd), CONST64(0x75903248483d487a), +CONST64(0x24e354ffffdbffab), CONST64(0x8ff48d7a7af57af7), CONST64(0xea3d6490907a90f4), CONST64(0x3ebe9d5f5f615fc2), +CONST64(0xa0403d202080201d), CONST64(0xd5d00f6868bd6867), CONST64(0x7234ca1a1a681ad0), CONST64(0x2c41b7aeae82ae19), +CONST64(0x5e757db4b4eab4c9), CONST64(0x19a8ce54544d549a), CONST64(0xe53b7f93937693ec), CONST64(0xaa442f222288220d), +CONST64(0xe9c86364648d6407), CONST64(0x12ff2af1f1e3f1db), CONST64(0xa2e6cc7373d173bf), CONST64(0x5a24821212481290), +CONST64(0x5d807a40401d403a), CONST64(0x2810480808200840), CONST64(0xe89b95c3c32bc356), CONST64(0x7bc5dfecec97ec33), +CONST64(0x90ab4ddbdb4bdb96), CONST64(0x1f5fc0a1a1bea161), CONST64(0x8307918d8d0e8d1c), CONST64(0xc97ac83d3df43df5), +CONST64(0xf1335b97976697cc), CONST64(0x0000000000000000), CONST64(0xd483f9cfcf1bcf36), CONST64(0x87566e2b2bac2b45), +CONST64(0xb3ece17676c57697), CONST64(0xb019e68282328264), CONST64(0xa9b128d6d67fd6fe), CONST64(0x7736c31b1b6c1bd8), +CONST64(0x5b7774b5b5eeb5c1), CONST64(0x2943beafaf86af11), CONST64(0xdfd41d6a6ab56a77), CONST64(0x0da0ea50505d50ba), +CONST64(0x4c8a574545094512), CONST64(0x18fb38f3f3ebf3cb), CONST64(0xf060ad3030c0309d), CONST64(0x74c3c4efef9bef2b), +CONST64(0xc37eda3f3ffc3fe5), CONST64(0x1caac75555495592), CONST64(0x1059dba2a2b2a279), CONST64(0x65c9e9eaea8fea03), +CONST64(0xecca6a656589650f), CONST64(0x686903babad2bab9), CONST64(0x935e4a2f2fbc2f65), CONST64(0xe79d8ec0c027c04e), +CONST64(0x81a160dede5fdebe), CONST64(0x6c38fc1c1c701ce0), CONST64(0x2ee746fdfdd3fdbb), CONST64(0x649a1f4d4d294d52), +CONST64(0xe0397692927292e4), CONST64(0xbceafa7575c9758f), CONST64(0x1e0c360606180630), CONST64(0x9809ae8a8a128a24), +CONST64(0x40794bb2b2f2b2f9), CONST64(0x59d185e6e6bfe663), CONST64(0x361c7e0e0e380e70), CONST64(0x633ee71f1f7c1ff8), +CONST64(0xf7c4556262956237), CONST64(0xa3b53ad4d477d4ee), CONST64(0x324d81a8a89aa829), CONST64(0xf4315296966296c4), +CONST64(0x3aef62f9f9c3f99b), CONST64(0xf697a3c5c533c566), CONST64(0xb14a102525942535), CONST64(0x20b2ab59597959f2), +CONST64(0xae15d084842a8454), CONST64(0xa7e4c57272d572b7), CONST64(0xdd72ec3939e439d5), CONST64(0x6198164c4c2d4c5a), +CONST64(0x3bbc945e5e655eca), CONST64(0x85f09f7878fd78e7), CONST64(0xd870e53838e038dd), CONST64(0x8605988c8c0a8c14), +CONST64(0xb2bf17d1d163d1c6), CONST64(0x0b57e4a5a5aea541), CONST64(0x4dd9a1e2e2afe243), CONST64(0xf8c24e616199612f), +CONST64(0x457b42b3b3f6b3f1), CONST64(0xa542342121842115), CONST64(0xd625089c9c4a9c94), CONST64(0x663cee1e1e781ef0), +CONST64(0x5286614343114322), CONST64(0xfc93b1c7c73bc776), CONST64(0x2be54ffcfcd7fcb3), CONST64(0x1408240404100420), +CONST64(0x08a2e351515951b2), CONST64(0xc72f2599995e99bc), CONST64(0xc4da226d6da96d4f), CONST64(0x391a650d0d340d68), +CONST64(0x35e979fafacffa83), CONST64(0x84a369dfdf5bdfb6), CONST64(0x9bfca97e7ee57ed7), CONST64(0xb44819242490243d), +CONST64(0xd776fe3b3bec3bc5), CONST64(0x3d4b9aabab96ab31), CONST64(0xd181f0cece1fce3e), CONST64(0x5522991111441188), +CONST64(0x8903838f8f068f0c), CONST64(0x6b9c044e4e254e4a), CONST64(0x517366b7b7e6b7d1), CONST64(0x60cbe0ebeb8beb0b), +CONST64(0xcc78c13c3cf03cfd), CONST64(0xbf1ffd81813e817c), CONST64(0xfe354094946a94d4), CONST64(0x0cf31cf7f7fbf7eb), +CONST64(0x676f18b9b9deb9a1), CONST64(0x5f268b13134c1398), CONST64(0x9c58512c2cb02c7d), CONST64(0xb8bb05d3d36bd3d6), +CONST64(0x5cd38ce7e7bbe76b), CONST64(0xcbdc396e6ea56e57), CONST64(0xf395aac4c437c46e), CONST64(0x0f061b03030c0318), +CONST64(0x13acdc565645568a), CONST64(0x49885e44440d441a), CONST64(0x9efea07f7fe17fdf), CONST64(0x374f88a9a99ea921), +CONST64(0x8254672a2aa82a4d), CONST64(0x6d6b0abbbbd6bbb1), CONST64(0xe29f87c1c123c146), CONST64(0x02a6f153535153a2), +CONST64(0x8ba572dcdc57dcae), CONST64(0x2716530b0b2c0b58), CONST64(0xd327019d9d4e9d9c), CONST64(0xc1d82b6c6cad6c47), +CONST64(0xf562a43131c43195), CONST64(0xb9e8f37474cd7487), CONST64(0x09f115f6f6fff6e3), CONST64(0x438c4c464605460a), +CONST64(0x2645a5acac8aac09), CONST64(0x970fb589891e893c), CONST64(0x4428b414145014a0), CONST64(0x42dfbae1e1a3e15b), +CONST64(0x4e2ca616165816b0), CONST64(0xd274f73a3ae83acd), CONST64(0xd0d2066969b9696f), CONST64(0x2d12410909240948), +CONST64(0xade0d77070dd70a7), CONST64(0x54716fb6b6e2b6d9), CONST64(0xb7bd1ed0d067d0ce), CONST64(0x7ec7d6eded93ed3b), +CONST64(0xdb85e2cccc17cc2e), CONST64(0x578468424215422a), CONST64(0xc22d2c98985a98b4), CONST64(0x0e55eda4a4aaa449), CONST64(0x8850752828a0285d), CONST64(0x31b8865c5c6d5cda), CONST64(0x3fed6bf8f8c7f893), CONST64(0xa411c28686228644) }; static const ulong64 sbox4[] = { -CONST64(0xc07830d818186018), CONST64(0x05af462623238c23), CONST64(0x7ef991b8c6c63fc6), CONST64(0x136fcdfbe8e887e8), -CONST64(0x4ca113cb87872687), CONST64(0xa9626d11b8b8dab8), CONST64(0x0805020901010401), CONST64(0x426e9e0d4f4f214f), -CONST64(0xadee6c9b3636d836), CONST64(0x590451ffa6a6a2a6), CONST64(0xdebdb90cd2d26fd2), CONST64(0xfb06f70ef5f5f3f5), -CONST64(0xef80f2967979f979), CONST64(0x5fcede306f6fa16f), CONST64(0xfcef3f6d91917e91), CONST64(0xaa07a4f852525552), -CONST64(0x27fdc04760609d60), CONST64(0x89766535bcbccabc), CONST64(0xaccd2b379b9b569b), CONST64(0x048c018a8e8e028e), -CONST64(0x71155bd2a3a3b6a3), CONST64(0x603c186c0c0c300c), CONST64(0xff8af6847b7bf17b), CONST64(0xb5e16a803535d435), -CONST64(0xe8693af51d1d741d), CONST64(0x5347ddb3e0e0a7e0), CONST64(0xf6acb321d7d77bd7), CONST64(0x5eed999cc2c22fc2), -CONST64(0x6d965c432e2eb82e), CONST64(0x627a96294b4b314b), CONST64(0xa321e15dfefedffe), CONST64(0x8216aed557574157), -CONST64(0xa8412abd15155415), CONST64(0x9fb6eee87777c177), CONST64(0xa5eb6e923737dc37), CONST64(0x7b56d79ee5e5b3e5), -CONST64(0x8cd923139f9f469f), CONST64(0xd317fd23f0f0e7f0), CONST64(0x6a7f94204a4a354a), CONST64(0x9e95a944dada4fda), -CONST64(0xfa25b0a258587d58), CONST64(0x06ca8fcfc9c903c9), CONST64(0x558d527c2929a429), CONST64(0x5022145a0a0a280a), -CONST64(0xe14f7f50b1b1feb1), CONST64(0x691a5dc9a0a0baa0), CONST64(0x7fdad6146b6bb16b), CONST64(0x5cab17d985852e85), -CONST64(0x8173673cbdbdcebd), CONST64(0xd234ba8f5d5d695d), CONST64(0x8050209010104010), CONST64(0xf303f507f4f4f7f4), -CONST64(0x16c08bddcbcb0bcb), CONST64(0xedc67cd33e3ef83e), CONST64(0x28110a2d05051405), CONST64(0x1fe6ce7867678167), -CONST64(0x7353d597e4e4b7e4), CONST64(0x25bb4e0227279c27), CONST64(0x3258827341411941), CONST64(0x2c9d0ba78b8b168b), -CONST64(0x510153f6a7a7a6a7), CONST64(0xcf94fab27d7de97d), CONST64(0xdcfb374995956e95), CONST64(0x8e9fad56d8d847d8), -CONST64(0x8b30eb70fbfbcbfb), CONST64(0x2371c1cdeeee9fee), CONST64(0xc791f8bb7c7ced7c), CONST64(0x17e3cc7166668566), -CONST64(0xa68ea77bdddd53dd), CONST64(0xb84b2eaf17175c17), CONST64(0x02468e4547470147), CONST64(0x84dc211a9e9e429e), -CONST64(0x1ec589d4caca0fca), CONST64(0x75995a582d2db42d), CONST64(0x9179632ebfbfc6bf), CONST64(0x381b0e3f07071c07), -CONST64(0x012347acadad8ead), CONST64(0xea2fb4b05a5a755a), CONST64(0x6cb51bef83833683), CONST64(0x85ff66b63333cc33), -CONST64(0x3ff2c65c63639163), CONST64(0x100a041202020802), CONST64(0x39384993aaaa92aa), CONST64(0xafa8e2de7171d971), -CONST64(0x0ecf8dc6c8c807c8), CONST64(0xc87d32d119196419), CONST64(0x7270923b49493949), CONST64(0x869aaf5fd9d943d9), -CONST64(0xc31df931f2f2eff2), CONST64(0x4b48dba8e3e3abe3), CONST64(0xe22ab6b95b5b715b), CONST64(0x34920dbc88881a88), -CONST64(0xa4c8293e9a9a529a), CONST64(0x2dbe4c0b26269826), CONST64(0x8dfa64bf3232c832), CONST64(0xe94a7d59b0b0fab0), -CONST64(0x1b6acff2e9e983e9), CONST64(0x78331e770f0f3c0f), CONST64(0xe6a6b733d5d573d5), CONST64(0x74ba1df480803a80), -CONST64(0x997c6127bebec2be), CONST64(0x26de87ebcdcd13cd), CONST64(0xbde468893434d034), CONST64(0x7a75903248483d48), -CONST64(0xab24e354ffffdbff), CONST64(0xf78ff48d7a7af57a), CONST64(0xf4ea3d6490907a90), CONST64(0xc23ebe9d5f5f615f), -CONST64(0x1da0403d20208020), CONST64(0x67d5d00f6868bd68), CONST64(0xd07234ca1a1a681a), CONST64(0x192c41b7aeae82ae), -CONST64(0xc95e757db4b4eab4), CONST64(0x9a19a8ce54544d54), CONST64(0xece53b7f93937693), CONST64(0x0daa442f22228822), -CONST64(0x07e9c86364648d64), CONST64(0xdb12ff2af1f1e3f1), CONST64(0xbfa2e6cc7373d173), CONST64(0x905a248212124812), -CONST64(0x3a5d807a40401d40), CONST64(0x4028104808082008), CONST64(0x56e89b95c3c32bc3), CONST64(0x337bc5dfecec97ec), -CONST64(0x9690ab4ddbdb4bdb), CONST64(0x611f5fc0a1a1bea1), CONST64(0x1c8307918d8d0e8d), CONST64(0xf5c97ac83d3df43d), -CONST64(0xccf1335b97976697), CONST64(0x0000000000000000), CONST64(0x36d483f9cfcf1bcf), CONST64(0x4587566e2b2bac2b), -CONST64(0x97b3ece17676c576), CONST64(0x64b019e682823282), CONST64(0xfea9b128d6d67fd6), CONST64(0xd87736c31b1b6c1b), -CONST64(0xc15b7774b5b5eeb5), CONST64(0x112943beafaf86af), CONST64(0x77dfd41d6a6ab56a), CONST64(0xba0da0ea50505d50), -CONST64(0x124c8a5745450945), CONST64(0xcb18fb38f3f3ebf3), CONST64(0x9df060ad3030c030), CONST64(0x2b74c3c4efef9bef), -CONST64(0xe5c37eda3f3ffc3f), CONST64(0x921caac755554955), CONST64(0x791059dba2a2b2a2), CONST64(0x0365c9e9eaea8fea), -CONST64(0x0fecca6a65658965), CONST64(0xb9686903babad2ba), CONST64(0x65935e4a2f2fbc2f), CONST64(0x4ee79d8ec0c027c0), -CONST64(0xbe81a160dede5fde), CONST64(0xe06c38fc1c1c701c), CONST64(0xbb2ee746fdfdd3fd), CONST64(0x52649a1f4d4d294d), -CONST64(0xe4e0397692927292), CONST64(0x8fbceafa7575c975), CONST64(0x301e0c3606061806), CONST64(0x249809ae8a8a128a), -CONST64(0xf940794bb2b2f2b2), CONST64(0x6359d185e6e6bfe6), CONST64(0x70361c7e0e0e380e), CONST64(0xf8633ee71f1f7c1f), -CONST64(0x37f7c45562629562), CONST64(0xeea3b53ad4d477d4), CONST64(0x29324d81a8a89aa8), CONST64(0xc4f4315296966296), -CONST64(0x9b3aef62f9f9c3f9), CONST64(0x66f697a3c5c533c5), CONST64(0x35b14a1025259425), CONST64(0xf220b2ab59597959), -CONST64(0x54ae15d084842a84), CONST64(0xb7a7e4c57272d572), CONST64(0xd5dd72ec3939e439), CONST64(0x5a6198164c4c2d4c), -CONST64(0xca3bbc945e5e655e), CONST64(0xe785f09f7878fd78), CONST64(0xddd870e53838e038), CONST64(0x148605988c8c0a8c), -CONST64(0xc6b2bf17d1d163d1), CONST64(0x410b57e4a5a5aea5), CONST64(0x434dd9a1e2e2afe2), CONST64(0x2ff8c24e61619961), -CONST64(0xf1457b42b3b3f6b3), CONST64(0x15a5423421218421), CONST64(0x94d625089c9c4a9c), CONST64(0xf0663cee1e1e781e), -CONST64(0x2252866143431143), CONST64(0x76fc93b1c7c73bc7), CONST64(0xb32be54ffcfcd7fc), CONST64(0x2014082404041004), -CONST64(0xb208a2e351515951), CONST64(0xbcc72f2599995e99), CONST64(0x4fc4da226d6da96d), CONST64(0x68391a650d0d340d), -CONST64(0x8335e979fafacffa), CONST64(0xb684a369dfdf5bdf), CONST64(0xd79bfca97e7ee57e), CONST64(0x3db4481924249024), -CONST64(0xc5d776fe3b3bec3b), CONST64(0x313d4b9aabab96ab), CONST64(0x3ed181f0cece1fce), CONST64(0x8855229911114411), -CONST64(0x0c8903838f8f068f), CONST64(0x4a6b9c044e4e254e), CONST64(0xd1517366b7b7e6b7), CONST64(0x0b60cbe0ebeb8beb), -CONST64(0xfdcc78c13c3cf03c), CONST64(0x7cbf1ffd81813e81), CONST64(0xd4fe354094946a94), CONST64(0xeb0cf31cf7f7fbf7), -CONST64(0xa1676f18b9b9deb9), CONST64(0x985f268b13134c13), CONST64(0x7d9c58512c2cb02c), CONST64(0xd6b8bb05d3d36bd3), -CONST64(0x6b5cd38ce7e7bbe7), CONST64(0x57cbdc396e6ea56e), CONST64(0x6ef395aac4c437c4), CONST64(0x180f061b03030c03), -CONST64(0x8a13acdc56564556), CONST64(0x1a49885e44440d44), CONST64(0xdf9efea07f7fe17f), CONST64(0x21374f88a9a99ea9), -CONST64(0x4d8254672a2aa82a), CONST64(0xb16d6b0abbbbd6bb), CONST64(0x46e29f87c1c123c1), CONST64(0xa202a6f153535153), -CONST64(0xae8ba572dcdc57dc), CONST64(0x582716530b0b2c0b), CONST64(0x9cd327019d9d4e9d), CONST64(0x47c1d82b6c6cad6c), -CONST64(0x95f562a43131c431), CONST64(0x87b9e8f37474cd74), CONST64(0xe309f115f6f6fff6), CONST64(0x0a438c4c46460546), -CONST64(0x092645a5acac8aac), CONST64(0x3c970fb589891e89), CONST64(0xa04428b414145014), CONST64(0x5b42dfbae1e1a3e1), -CONST64(0xb04e2ca616165816), CONST64(0xcdd274f73a3ae83a), CONST64(0x6fd0d2066969b969), CONST64(0x482d124109092409), -CONST64(0xa7ade0d77070dd70), CONST64(0xd954716fb6b6e2b6), CONST64(0xceb7bd1ed0d067d0), CONST64(0x3b7ec7d6eded93ed), -CONST64(0x2edb85e2cccc17cc), CONST64(0x2a57846842421542), CONST64(0xb4c22d2c98985a98), CONST64(0x490e55eda4a4aaa4), +CONST64(0xc07830d818186018), CONST64(0x05af462623238c23), CONST64(0x7ef991b8c6c63fc6), CONST64(0x136fcdfbe8e887e8), +CONST64(0x4ca113cb87872687), CONST64(0xa9626d11b8b8dab8), CONST64(0x0805020901010401), CONST64(0x426e9e0d4f4f214f), +CONST64(0xadee6c9b3636d836), CONST64(0x590451ffa6a6a2a6), CONST64(0xdebdb90cd2d26fd2), CONST64(0xfb06f70ef5f5f3f5), +CONST64(0xef80f2967979f979), CONST64(0x5fcede306f6fa16f), CONST64(0xfcef3f6d91917e91), CONST64(0xaa07a4f852525552), +CONST64(0x27fdc04760609d60), CONST64(0x89766535bcbccabc), CONST64(0xaccd2b379b9b569b), CONST64(0x048c018a8e8e028e), +CONST64(0x71155bd2a3a3b6a3), CONST64(0x603c186c0c0c300c), CONST64(0xff8af6847b7bf17b), CONST64(0xb5e16a803535d435), +CONST64(0xe8693af51d1d741d), CONST64(0x5347ddb3e0e0a7e0), CONST64(0xf6acb321d7d77bd7), CONST64(0x5eed999cc2c22fc2), +CONST64(0x6d965c432e2eb82e), CONST64(0x627a96294b4b314b), CONST64(0xa321e15dfefedffe), CONST64(0x8216aed557574157), +CONST64(0xa8412abd15155415), CONST64(0x9fb6eee87777c177), CONST64(0xa5eb6e923737dc37), CONST64(0x7b56d79ee5e5b3e5), +CONST64(0x8cd923139f9f469f), CONST64(0xd317fd23f0f0e7f0), CONST64(0x6a7f94204a4a354a), CONST64(0x9e95a944dada4fda), +CONST64(0xfa25b0a258587d58), CONST64(0x06ca8fcfc9c903c9), CONST64(0x558d527c2929a429), CONST64(0x5022145a0a0a280a), +CONST64(0xe14f7f50b1b1feb1), CONST64(0x691a5dc9a0a0baa0), CONST64(0x7fdad6146b6bb16b), CONST64(0x5cab17d985852e85), +CONST64(0x8173673cbdbdcebd), CONST64(0xd234ba8f5d5d695d), CONST64(0x8050209010104010), CONST64(0xf303f507f4f4f7f4), +CONST64(0x16c08bddcbcb0bcb), CONST64(0xedc67cd33e3ef83e), CONST64(0x28110a2d05051405), CONST64(0x1fe6ce7867678167), +CONST64(0x7353d597e4e4b7e4), CONST64(0x25bb4e0227279c27), CONST64(0x3258827341411941), CONST64(0x2c9d0ba78b8b168b), +CONST64(0x510153f6a7a7a6a7), CONST64(0xcf94fab27d7de97d), CONST64(0xdcfb374995956e95), CONST64(0x8e9fad56d8d847d8), +CONST64(0x8b30eb70fbfbcbfb), CONST64(0x2371c1cdeeee9fee), CONST64(0xc791f8bb7c7ced7c), CONST64(0x17e3cc7166668566), +CONST64(0xa68ea77bdddd53dd), CONST64(0xb84b2eaf17175c17), CONST64(0x02468e4547470147), CONST64(0x84dc211a9e9e429e), +CONST64(0x1ec589d4caca0fca), CONST64(0x75995a582d2db42d), CONST64(0x9179632ebfbfc6bf), CONST64(0x381b0e3f07071c07), +CONST64(0x012347acadad8ead), CONST64(0xea2fb4b05a5a755a), CONST64(0x6cb51bef83833683), CONST64(0x85ff66b63333cc33), +CONST64(0x3ff2c65c63639163), CONST64(0x100a041202020802), CONST64(0x39384993aaaa92aa), CONST64(0xafa8e2de7171d971), +CONST64(0x0ecf8dc6c8c807c8), CONST64(0xc87d32d119196419), CONST64(0x7270923b49493949), CONST64(0x869aaf5fd9d943d9), +CONST64(0xc31df931f2f2eff2), CONST64(0x4b48dba8e3e3abe3), CONST64(0xe22ab6b95b5b715b), CONST64(0x34920dbc88881a88), +CONST64(0xa4c8293e9a9a529a), CONST64(0x2dbe4c0b26269826), CONST64(0x8dfa64bf3232c832), CONST64(0xe94a7d59b0b0fab0), +CONST64(0x1b6acff2e9e983e9), CONST64(0x78331e770f0f3c0f), CONST64(0xe6a6b733d5d573d5), CONST64(0x74ba1df480803a80), +CONST64(0x997c6127bebec2be), CONST64(0x26de87ebcdcd13cd), CONST64(0xbde468893434d034), CONST64(0x7a75903248483d48), +CONST64(0xab24e354ffffdbff), CONST64(0xf78ff48d7a7af57a), CONST64(0xf4ea3d6490907a90), CONST64(0xc23ebe9d5f5f615f), +CONST64(0x1da0403d20208020), CONST64(0x67d5d00f6868bd68), CONST64(0xd07234ca1a1a681a), CONST64(0x192c41b7aeae82ae), +CONST64(0xc95e757db4b4eab4), CONST64(0x9a19a8ce54544d54), CONST64(0xece53b7f93937693), CONST64(0x0daa442f22228822), +CONST64(0x07e9c86364648d64), CONST64(0xdb12ff2af1f1e3f1), CONST64(0xbfa2e6cc7373d173), CONST64(0x905a248212124812), +CONST64(0x3a5d807a40401d40), CONST64(0x4028104808082008), CONST64(0x56e89b95c3c32bc3), CONST64(0x337bc5dfecec97ec), +CONST64(0x9690ab4ddbdb4bdb), CONST64(0x611f5fc0a1a1bea1), CONST64(0x1c8307918d8d0e8d), CONST64(0xf5c97ac83d3df43d), +CONST64(0xccf1335b97976697), CONST64(0x0000000000000000), CONST64(0x36d483f9cfcf1bcf), CONST64(0x4587566e2b2bac2b), +CONST64(0x97b3ece17676c576), CONST64(0x64b019e682823282), CONST64(0xfea9b128d6d67fd6), CONST64(0xd87736c31b1b6c1b), +CONST64(0xc15b7774b5b5eeb5), CONST64(0x112943beafaf86af), CONST64(0x77dfd41d6a6ab56a), CONST64(0xba0da0ea50505d50), +CONST64(0x124c8a5745450945), CONST64(0xcb18fb38f3f3ebf3), CONST64(0x9df060ad3030c030), CONST64(0x2b74c3c4efef9bef), +CONST64(0xe5c37eda3f3ffc3f), CONST64(0x921caac755554955), CONST64(0x791059dba2a2b2a2), CONST64(0x0365c9e9eaea8fea), +CONST64(0x0fecca6a65658965), CONST64(0xb9686903babad2ba), CONST64(0x65935e4a2f2fbc2f), CONST64(0x4ee79d8ec0c027c0), +CONST64(0xbe81a160dede5fde), CONST64(0xe06c38fc1c1c701c), CONST64(0xbb2ee746fdfdd3fd), CONST64(0x52649a1f4d4d294d), +CONST64(0xe4e0397692927292), CONST64(0x8fbceafa7575c975), CONST64(0x301e0c3606061806), CONST64(0x249809ae8a8a128a), +CONST64(0xf940794bb2b2f2b2), CONST64(0x6359d185e6e6bfe6), CONST64(0x70361c7e0e0e380e), CONST64(0xf8633ee71f1f7c1f), +CONST64(0x37f7c45562629562), CONST64(0xeea3b53ad4d477d4), CONST64(0x29324d81a8a89aa8), CONST64(0xc4f4315296966296), +CONST64(0x9b3aef62f9f9c3f9), CONST64(0x66f697a3c5c533c5), CONST64(0x35b14a1025259425), CONST64(0xf220b2ab59597959), +CONST64(0x54ae15d084842a84), CONST64(0xb7a7e4c57272d572), CONST64(0xd5dd72ec3939e439), CONST64(0x5a6198164c4c2d4c), +CONST64(0xca3bbc945e5e655e), CONST64(0xe785f09f7878fd78), CONST64(0xddd870e53838e038), CONST64(0x148605988c8c0a8c), +CONST64(0xc6b2bf17d1d163d1), CONST64(0x410b57e4a5a5aea5), CONST64(0x434dd9a1e2e2afe2), CONST64(0x2ff8c24e61619961), +CONST64(0xf1457b42b3b3f6b3), CONST64(0x15a5423421218421), CONST64(0x94d625089c9c4a9c), CONST64(0xf0663cee1e1e781e), +CONST64(0x2252866143431143), CONST64(0x76fc93b1c7c73bc7), CONST64(0xb32be54ffcfcd7fc), CONST64(0x2014082404041004), +CONST64(0xb208a2e351515951), CONST64(0xbcc72f2599995e99), CONST64(0x4fc4da226d6da96d), CONST64(0x68391a650d0d340d), +CONST64(0x8335e979fafacffa), CONST64(0xb684a369dfdf5bdf), CONST64(0xd79bfca97e7ee57e), CONST64(0x3db4481924249024), +CONST64(0xc5d776fe3b3bec3b), CONST64(0x313d4b9aabab96ab), CONST64(0x3ed181f0cece1fce), CONST64(0x8855229911114411), +CONST64(0x0c8903838f8f068f), CONST64(0x4a6b9c044e4e254e), CONST64(0xd1517366b7b7e6b7), CONST64(0x0b60cbe0ebeb8beb), +CONST64(0xfdcc78c13c3cf03c), CONST64(0x7cbf1ffd81813e81), CONST64(0xd4fe354094946a94), CONST64(0xeb0cf31cf7f7fbf7), +CONST64(0xa1676f18b9b9deb9), CONST64(0x985f268b13134c13), CONST64(0x7d9c58512c2cb02c), CONST64(0xd6b8bb05d3d36bd3), +CONST64(0x6b5cd38ce7e7bbe7), CONST64(0x57cbdc396e6ea56e), CONST64(0x6ef395aac4c437c4), CONST64(0x180f061b03030c03), +CONST64(0x8a13acdc56564556), CONST64(0x1a49885e44440d44), CONST64(0xdf9efea07f7fe17f), CONST64(0x21374f88a9a99ea9), +CONST64(0x4d8254672a2aa82a), CONST64(0xb16d6b0abbbbd6bb), CONST64(0x46e29f87c1c123c1), CONST64(0xa202a6f153535153), +CONST64(0xae8ba572dcdc57dc), CONST64(0x582716530b0b2c0b), CONST64(0x9cd327019d9d4e9d), CONST64(0x47c1d82b6c6cad6c), +CONST64(0x95f562a43131c431), CONST64(0x87b9e8f37474cd74), CONST64(0xe309f115f6f6fff6), CONST64(0x0a438c4c46460546), +CONST64(0x092645a5acac8aac), CONST64(0x3c970fb589891e89), CONST64(0xa04428b414145014), CONST64(0x5b42dfbae1e1a3e1), +CONST64(0xb04e2ca616165816), CONST64(0xcdd274f73a3ae83a), CONST64(0x6fd0d2066969b969), CONST64(0x482d124109092409), +CONST64(0xa7ade0d77070dd70), CONST64(0xd954716fb6b6e2b6), CONST64(0xceb7bd1ed0d067d0), CONST64(0x3b7ec7d6eded93ed), +CONST64(0x2edb85e2cccc17cc), CONST64(0x2a57846842421542), CONST64(0xb4c22d2c98985a98), CONST64(0x490e55eda4a4aaa4), CONST64(0x5d8850752828a028), CONST64(0xda31b8865c5c6d5c), CONST64(0x933fed6bf8f8c7f8), CONST64(0x44a411c286862286) }; static const ulong64 sbox5[] = { -CONST64(0x18c07830d8181860), CONST64(0x2305af462623238c), CONST64(0xc67ef991b8c6c63f), CONST64(0xe8136fcdfbe8e887), -CONST64(0x874ca113cb878726), CONST64(0xb8a9626d11b8b8da), CONST64(0x0108050209010104), CONST64(0x4f426e9e0d4f4f21), -CONST64(0x36adee6c9b3636d8), CONST64(0xa6590451ffa6a6a2), CONST64(0xd2debdb90cd2d26f), CONST64(0xf5fb06f70ef5f5f3), -CONST64(0x79ef80f2967979f9), CONST64(0x6f5fcede306f6fa1), CONST64(0x91fcef3f6d91917e), CONST64(0x52aa07a4f8525255), -CONST64(0x6027fdc04760609d), CONST64(0xbc89766535bcbcca), CONST64(0x9baccd2b379b9b56), CONST64(0x8e048c018a8e8e02), -CONST64(0xa371155bd2a3a3b6), CONST64(0x0c603c186c0c0c30), CONST64(0x7bff8af6847b7bf1), CONST64(0x35b5e16a803535d4), -CONST64(0x1de8693af51d1d74), CONST64(0xe05347ddb3e0e0a7), CONST64(0xd7f6acb321d7d77b), CONST64(0xc25eed999cc2c22f), -CONST64(0x2e6d965c432e2eb8), CONST64(0x4b627a96294b4b31), CONST64(0xfea321e15dfefedf), CONST64(0x578216aed5575741), -CONST64(0x15a8412abd151554), CONST64(0x779fb6eee87777c1), CONST64(0x37a5eb6e923737dc), CONST64(0xe57b56d79ee5e5b3), -CONST64(0x9f8cd923139f9f46), CONST64(0xf0d317fd23f0f0e7), CONST64(0x4a6a7f94204a4a35), CONST64(0xda9e95a944dada4f), -CONST64(0x58fa25b0a258587d), CONST64(0xc906ca8fcfc9c903), CONST64(0x29558d527c2929a4), CONST64(0x0a5022145a0a0a28), -CONST64(0xb1e14f7f50b1b1fe), CONST64(0xa0691a5dc9a0a0ba), CONST64(0x6b7fdad6146b6bb1), CONST64(0x855cab17d985852e), -CONST64(0xbd8173673cbdbdce), CONST64(0x5dd234ba8f5d5d69), CONST64(0x1080502090101040), CONST64(0xf4f303f507f4f4f7), -CONST64(0xcb16c08bddcbcb0b), CONST64(0x3eedc67cd33e3ef8), CONST64(0x0528110a2d050514), CONST64(0x671fe6ce78676781), -CONST64(0xe47353d597e4e4b7), CONST64(0x2725bb4e0227279c), CONST64(0x4132588273414119), CONST64(0x8b2c9d0ba78b8b16), -CONST64(0xa7510153f6a7a7a6), CONST64(0x7dcf94fab27d7de9), CONST64(0x95dcfb374995956e), CONST64(0xd88e9fad56d8d847), -CONST64(0xfb8b30eb70fbfbcb), CONST64(0xee2371c1cdeeee9f), CONST64(0x7cc791f8bb7c7ced), CONST64(0x6617e3cc71666685), -CONST64(0xdda68ea77bdddd53), CONST64(0x17b84b2eaf17175c), CONST64(0x4702468e45474701), CONST64(0x9e84dc211a9e9e42), -CONST64(0xca1ec589d4caca0f), CONST64(0x2d75995a582d2db4), CONST64(0xbf9179632ebfbfc6), CONST64(0x07381b0e3f07071c), -CONST64(0xad012347acadad8e), CONST64(0x5aea2fb4b05a5a75), CONST64(0x836cb51bef838336), CONST64(0x3385ff66b63333cc), -CONST64(0x633ff2c65c636391), CONST64(0x02100a0412020208), CONST64(0xaa39384993aaaa92), CONST64(0x71afa8e2de7171d9), -CONST64(0xc80ecf8dc6c8c807), CONST64(0x19c87d32d1191964), CONST64(0x497270923b494939), CONST64(0xd9869aaf5fd9d943), -CONST64(0xf2c31df931f2f2ef), CONST64(0xe34b48dba8e3e3ab), CONST64(0x5be22ab6b95b5b71), CONST64(0x8834920dbc88881a), -CONST64(0x9aa4c8293e9a9a52), CONST64(0x262dbe4c0b262698), CONST64(0x328dfa64bf3232c8), CONST64(0xb0e94a7d59b0b0fa), -CONST64(0xe91b6acff2e9e983), CONST64(0x0f78331e770f0f3c), CONST64(0xd5e6a6b733d5d573), CONST64(0x8074ba1df480803a), -CONST64(0xbe997c6127bebec2), CONST64(0xcd26de87ebcdcd13), CONST64(0x34bde468893434d0), CONST64(0x487a75903248483d), -CONST64(0xffab24e354ffffdb), CONST64(0x7af78ff48d7a7af5), CONST64(0x90f4ea3d6490907a), CONST64(0x5fc23ebe9d5f5f61), -CONST64(0x201da0403d202080), CONST64(0x6867d5d00f6868bd), CONST64(0x1ad07234ca1a1a68), CONST64(0xae192c41b7aeae82), -CONST64(0xb4c95e757db4b4ea), CONST64(0x549a19a8ce54544d), CONST64(0x93ece53b7f939376), CONST64(0x220daa442f222288), -CONST64(0x6407e9c86364648d), CONST64(0xf1db12ff2af1f1e3), CONST64(0x73bfa2e6cc7373d1), CONST64(0x12905a2482121248), -CONST64(0x403a5d807a40401d), CONST64(0x0840281048080820), CONST64(0xc356e89b95c3c32b), CONST64(0xec337bc5dfecec97), -CONST64(0xdb9690ab4ddbdb4b), CONST64(0xa1611f5fc0a1a1be), CONST64(0x8d1c8307918d8d0e), CONST64(0x3df5c97ac83d3df4), -CONST64(0x97ccf1335b979766), CONST64(0x0000000000000000), CONST64(0xcf36d483f9cfcf1b), CONST64(0x2b4587566e2b2bac), -CONST64(0x7697b3ece17676c5), CONST64(0x8264b019e6828232), CONST64(0xd6fea9b128d6d67f), CONST64(0x1bd87736c31b1b6c), -CONST64(0xb5c15b7774b5b5ee), CONST64(0xaf112943beafaf86), CONST64(0x6a77dfd41d6a6ab5), CONST64(0x50ba0da0ea50505d), -CONST64(0x45124c8a57454509), CONST64(0xf3cb18fb38f3f3eb), CONST64(0x309df060ad3030c0), CONST64(0xef2b74c3c4efef9b), -CONST64(0x3fe5c37eda3f3ffc), CONST64(0x55921caac7555549), CONST64(0xa2791059dba2a2b2), CONST64(0xea0365c9e9eaea8f), -CONST64(0x650fecca6a656589), CONST64(0xbab9686903babad2), CONST64(0x2f65935e4a2f2fbc), CONST64(0xc04ee79d8ec0c027), -CONST64(0xdebe81a160dede5f), CONST64(0x1ce06c38fc1c1c70), CONST64(0xfdbb2ee746fdfdd3), CONST64(0x4d52649a1f4d4d29), -CONST64(0x92e4e03976929272), CONST64(0x758fbceafa7575c9), CONST64(0x06301e0c36060618), CONST64(0x8a249809ae8a8a12), -CONST64(0xb2f940794bb2b2f2), CONST64(0xe66359d185e6e6bf), CONST64(0x0e70361c7e0e0e38), CONST64(0x1ff8633ee71f1f7c), -CONST64(0x6237f7c455626295), CONST64(0xd4eea3b53ad4d477), CONST64(0xa829324d81a8a89a), CONST64(0x96c4f43152969662), -CONST64(0xf99b3aef62f9f9c3), CONST64(0xc566f697a3c5c533), CONST64(0x2535b14a10252594), CONST64(0x59f220b2ab595979), -CONST64(0x8454ae15d084842a), CONST64(0x72b7a7e4c57272d5), CONST64(0x39d5dd72ec3939e4), CONST64(0x4c5a6198164c4c2d), -CONST64(0x5eca3bbc945e5e65), CONST64(0x78e785f09f7878fd), CONST64(0x38ddd870e53838e0), CONST64(0x8c148605988c8c0a), -CONST64(0xd1c6b2bf17d1d163), CONST64(0xa5410b57e4a5a5ae), CONST64(0xe2434dd9a1e2e2af), CONST64(0x612ff8c24e616199), -CONST64(0xb3f1457b42b3b3f6), CONST64(0x2115a54234212184), CONST64(0x9c94d625089c9c4a), CONST64(0x1ef0663cee1e1e78), -CONST64(0x4322528661434311), CONST64(0xc776fc93b1c7c73b), CONST64(0xfcb32be54ffcfcd7), CONST64(0x0420140824040410), -CONST64(0x51b208a2e3515159), CONST64(0x99bcc72f2599995e), CONST64(0x6d4fc4da226d6da9), CONST64(0x0d68391a650d0d34), -CONST64(0xfa8335e979fafacf), CONST64(0xdfb684a369dfdf5b), CONST64(0x7ed79bfca97e7ee5), CONST64(0x243db44819242490), -CONST64(0x3bc5d776fe3b3bec), CONST64(0xab313d4b9aabab96), CONST64(0xce3ed181f0cece1f), CONST64(0x1188552299111144), -CONST64(0x8f0c8903838f8f06), CONST64(0x4e4a6b9c044e4e25), CONST64(0xb7d1517366b7b7e6), CONST64(0xeb0b60cbe0ebeb8b), -CONST64(0x3cfdcc78c13c3cf0), CONST64(0x817cbf1ffd81813e), CONST64(0x94d4fe354094946a), CONST64(0xf7eb0cf31cf7f7fb), -CONST64(0xb9a1676f18b9b9de), CONST64(0x13985f268b13134c), CONST64(0x2c7d9c58512c2cb0), CONST64(0xd3d6b8bb05d3d36b), -CONST64(0xe76b5cd38ce7e7bb), CONST64(0x6e57cbdc396e6ea5), CONST64(0xc46ef395aac4c437), CONST64(0x03180f061b03030c), -CONST64(0x568a13acdc565645), CONST64(0x441a49885e44440d), CONST64(0x7fdf9efea07f7fe1), CONST64(0xa921374f88a9a99e), -CONST64(0x2a4d8254672a2aa8), CONST64(0xbbb16d6b0abbbbd6), CONST64(0xc146e29f87c1c123), CONST64(0x53a202a6f1535351), -CONST64(0xdcae8ba572dcdc57), CONST64(0x0b582716530b0b2c), CONST64(0x9d9cd327019d9d4e), CONST64(0x6c47c1d82b6c6cad), -CONST64(0x3195f562a43131c4), CONST64(0x7487b9e8f37474cd), CONST64(0xf6e309f115f6f6ff), CONST64(0x460a438c4c464605), -CONST64(0xac092645a5acac8a), CONST64(0x893c970fb589891e), CONST64(0x14a04428b4141450), CONST64(0xe15b42dfbae1e1a3), -CONST64(0x16b04e2ca6161658), CONST64(0x3acdd274f73a3ae8), CONST64(0x696fd0d2066969b9), CONST64(0x09482d1241090924), -CONST64(0x70a7ade0d77070dd), CONST64(0xb6d954716fb6b6e2), CONST64(0xd0ceb7bd1ed0d067), CONST64(0xed3b7ec7d6eded93), -CONST64(0xcc2edb85e2cccc17), CONST64(0x422a578468424215), CONST64(0x98b4c22d2c98985a), CONST64(0xa4490e55eda4a4aa), +CONST64(0x18c07830d8181860), CONST64(0x2305af462623238c), CONST64(0xc67ef991b8c6c63f), CONST64(0xe8136fcdfbe8e887), +CONST64(0x874ca113cb878726), CONST64(0xb8a9626d11b8b8da), CONST64(0x0108050209010104), CONST64(0x4f426e9e0d4f4f21), +CONST64(0x36adee6c9b3636d8), CONST64(0xa6590451ffa6a6a2), CONST64(0xd2debdb90cd2d26f), CONST64(0xf5fb06f70ef5f5f3), +CONST64(0x79ef80f2967979f9), CONST64(0x6f5fcede306f6fa1), CONST64(0x91fcef3f6d91917e), CONST64(0x52aa07a4f8525255), +CONST64(0x6027fdc04760609d), CONST64(0xbc89766535bcbcca), CONST64(0x9baccd2b379b9b56), CONST64(0x8e048c018a8e8e02), +CONST64(0xa371155bd2a3a3b6), CONST64(0x0c603c186c0c0c30), CONST64(0x7bff8af6847b7bf1), CONST64(0x35b5e16a803535d4), +CONST64(0x1de8693af51d1d74), CONST64(0xe05347ddb3e0e0a7), CONST64(0xd7f6acb321d7d77b), CONST64(0xc25eed999cc2c22f), +CONST64(0x2e6d965c432e2eb8), CONST64(0x4b627a96294b4b31), CONST64(0xfea321e15dfefedf), CONST64(0x578216aed5575741), +CONST64(0x15a8412abd151554), CONST64(0x779fb6eee87777c1), CONST64(0x37a5eb6e923737dc), CONST64(0xe57b56d79ee5e5b3), +CONST64(0x9f8cd923139f9f46), CONST64(0xf0d317fd23f0f0e7), CONST64(0x4a6a7f94204a4a35), CONST64(0xda9e95a944dada4f), +CONST64(0x58fa25b0a258587d), CONST64(0xc906ca8fcfc9c903), CONST64(0x29558d527c2929a4), CONST64(0x0a5022145a0a0a28), +CONST64(0xb1e14f7f50b1b1fe), CONST64(0xa0691a5dc9a0a0ba), CONST64(0x6b7fdad6146b6bb1), CONST64(0x855cab17d985852e), +CONST64(0xbd8173673cbdbdce), CONST64(0x5dd234ba8f5d5d69), CONST64(0x1080502090101040), CONST64(0xf4f303f507f4f4f7), +CONST64(0xcb16c08bddcbcb0b), CONST64(0x3eedc67cd33e3ef8), CONST64(0x0528110a2d050514), CONST64(0x671fe6ce78676781), +CONST64(0xe47353d597e4e4b7), CONST64(0x2725bb4e0227279c), CONST64(0x4132588273414119), CONST64(0x8b2c9d0ba78b8b16), +CONST64(0xa7510153f6a7a7a6), CONST64(0x7dcf94fab27d7de9), CONST64(0x95dcfb374995956e), CONST64(0xd88e9fad56d8d847), +CONST64(0xfb8b30eb70fbfbcb), CONST64(0xee2371c1cdeeee9f), CONST64(0x7cc791f8bb7c7ced), CONST64(0x6617e3cc71666685), +CONST64(0xdda68ea77bdddd53), CONST64(0x17b84b2eaf17175c), CONST64(0x4702468e45474701), CONST64(0x9e84dc211a9e9e42), +CONST64(0xca1ec589d4caca0f), CONST64(0x2d75995a582d2db4), CONST64(0xbf9179632ebfbfc6), CONST64(0x07381b0e3f07071c), +CONST64(0xad012347acadad8e), CONST64(0x5aea2fb4b05a5a75), CONST64(0x836cb51bef838336), CONST64(0x3385ff66b63333cc), +CONST64(0x633ff2c65c636391), CONST64(0x02100a0412020208), CONST64(0xaa39384993aaaa92), CONST64(0x71afa8e2de7171d9), +CONST64(0xc80ecf8dc6c8c807), CONST64(0x19c87d32d1191964), CONST64(0x497270923b494939), CONST64(0xd9869aaf5fd9d943), +CONST64(0xf2c31df931f2f2ef), CONST64(0xe34b48dba8e3e3ab), CONST64(0x5be22ab6b95b5b71), CONST64(0x8834920dbc88881a), +CONST64(0x9aa4c8293e9a9a52), CONST64(0x262dbe4c0b262698), CONST64(0x328dfa64bf3232c8), CONST64(0xb0e94a7d59b0b0fa), +CONST64(0xe91b6acff2e9e983), CONST64(0x0f78331e770f0f3c), CONST64(0xd5e6a6b733d5d573), CONST64(0x8074ba1df480803a), +CONST64(0xbe997c6127bebec2), CONST64(0xcd26de87ebcdcd13), CONST64(0x34bde468893434d0), CONST64(0x487a75903248483d), +CONST64(0xffab24e354ffffdb), CONST64(0x7af78ff48d7a7af5), CONST64(0x90f4ea3d6490907a), CONST64(0x5fc23ebe9d5f5f61), +CONST64(0x201da0403d202080), CONST64(0x6867d5d00f6868bd), CONST64(0x1ad07234ca1a1a68), CONST64(0xae192c41b7aeae82), +CONST64(0xb4c95e757db4b4ea), CONST64(0x549a19a8ce54544d), CONST64(0x93ece53b7f939376), CONST64(0x220daa442f222288), +CONST64(0x6407e9c86364648d), CONST64(0xf1db12ff2af1f1e3), CONST64(0x73bfa2e6cc7373d1), CONST64(0x12905a2482121248), +CONST64(0x403a5d807a40401d), CONST64(0x0840281048080820), CONST64(0xc356e89b95c3c32b), CONST64(0xec337bc5dfecec97), +CONST64(0xdb9690ab4ddbdb4b), CONST64(0xa1611f5fc0a1a1be), CONST64(0x8d1c8307918d8d0e), CONST64(0x3df5c97ac83d3df4), +CONST64(0x97ccf1335b979766), CONST64(0x0000000000000000), CONST64(0xcf36d483f9cfcf1b), CONST64(0x2b4587566e2b2bac), +CONST64(0x7697b3ece17676c5), CONST64(0x8264b019e6828232), CONST64(0xd6fea9b128d6d67f), CONST64(0x1bd87736c31b1b6c), +CONST64(0xb5c15b7774b5b5ee), CONST64(0xaf112943beafaf86), CONST64(0x6a77dfd41d6a6ab5), CONST64(0x50ba0da0ea50505d), +CONST64(0x45124c8a57454509), CONST64(0xf3cb18fb38f3f3eb), CONST64(0x309df060ad3030c0), CONST64(0xef2b74c3c4efef9b), +CONST64(0x3fe5c37eda3f3ffc), CONST64(0x55921caac7555549), CONST64(0xa2791059dba2a2b2), CONST64(0xea0365c9e9eaea8f), +CONST64(0x650fecca6a656589), CONST64(0xbab9686903babad2), CONST64(0x2f65935e4a2f2fbc), CONST64(0xc04ee79d8ec0c027), +CONST64(0xdebe81a160dede5f), CONST64(0x1ce06c38fc1c1c70), CONST64(0xfdbb2ee746fdfdd3), CONST64(0x4d52649a1f4d4d29), +CONST64(0x92e4e03976929272), CONST64(0x758fbceafa7575c9), CONST64(0x06301e0c36060618), CONST64(0x8a249809ae8a8a12), +CONST64(0xb2f940794bb2b2f2), CONST64(0xe66359d185e6e6bf), CONST64(0x0e70361c7e0e0e38), CONST64(0x1ff8633ee71f1f7c), +CONST64(0x6237f7c455626295), CONST64(0xd4eea3b53ad4d477), CONST64(0xa829324d81a8a89a), CONST64(0x96c4f43152969662), +CONST64(0xf99b3aef62f9f9c3), CONST64(0xc566f697a3c5c533), CONST64(0x2535b14a10252594), CONST64(0x59f220b2ab595979), +CONST64(0x8454ae15d084842a), CONST64(0x72b7a7e4c57272d5), CONST64(0x39d5dd72ec3939e4), CONST64(0x4c5a6198164c4c2d), +CONST64(0x5eca3bbc945e5e65), CONST64(0x78e785f09f7878fd), CONST64(0x38ddd870e53838e0), CONST64(0x8c148605988c8c0a), +CONST64(0xd1c6b2bf17d1d163), CONST64(0xa5410b57e4a5a5ae), CONST64(0xe2434dd9a1e2e2af), CONST64(0x612ff8c24e616199), +CONST64(0xb3f1457b42b3b3f6), CONST64(0x2115a54234212184), CONST64(0x9c94d625089c9c4a), CONST64(0x1ef0663cee1e1e78), +CONST64(0x4322528661434311), CONST64(0xc776fc93b1c7c73b), CONST64(0xfcb32be54ffcfcd7), CONST64(0x0420140824040410), +CONST64(0x51b208a2e3515159), CONST64(0x99bcc72f2599995e), CONST64(0x6d4fc4da226d6da9), CONST64(0x0d68391a650d0d34), +CONST64(0xfa8335e979fafacf), CONST64(0xdfb684a369dfdf5b), CONST64(0x7ed79bfca97e7ee5), CONST64(0x243db44819242490), +CONST64(0x3bc5d776fe3b3bec), CONST64(0xab313d4b9aabab96), CONST64(0xce3ed181f0cece1f), CONST64(0x1188552299111144), +CONST64(0x8f0c8903838f8f06), CONST64(0x4e4a6b9c044e4e25), CONST64(0xb7d1517366b7b7e6), CONST64(0xeb0b60cbe0ebeb8b), +CONST64(0x3cfdcc78c13c3cf0), CONST64(0x817cbf1ffd81813e), CONST64(0x94d4fe354094946a), CONST64(0xf7eb0cf31cf7f7fb), +CONST64(0xb9a1676f18b9b9de), CONST64(0x13985f268b13134c), CONST64(0x2c7d9c58512c2cb0), CONST64(0xd3d6b8bb05d3d36b), +CONST64(0xe76b5cd38ce7e7bb), CONST64(0x6e57cbdc396e6ea5), CONST64(0xc46ef395aac4c437), CONST64(0x03180f061b03030c), +CONST64(0x568a13acdc565645), CONST64(0x441a49885e44440d), CONST64(0x7fdf9efea07f7fe1), CONST64(0xa921374f88a9a99e), +CONST64(0x2a4d8254672a2aa8), CONST64(0xbbb16d6b0abbbbd6), CONST64(0xc146e29f87c1c123), CONST64(0x53a202a6f1535351), +CONST64(0xdcae8ba572dcdc57), CONST64(0x0b582716530b0b2c), CONST64(0x9d9cd327019d9d4e), CONST64(0x6c47c1d82b6c6cad), +CONST64(0x3195f562a43131c4), CONST64(0x7487b9e8f37474cd), CONST64(0xf6e309f115f6f6ff), CONST64(0x460a438c4c464605), +CONST64(0xac092645a5acac8a), CONST64(0x893c970fb589891e), CONST64(0x14a04428b4141450), CONST64(0xe15b42dfbae1e1a3), +CONST64(0x16b04e2ca6161658), CONST64(0x3acdd274f73a3ae8), CONST64(0x696fd0d2066969b9), CONST64(0x09482d1241090924), +CONST64(0x70a7ade0d77070dd), CONST64(0xb6d954716fb6b6e2), CONST64(0xd0ceb7bd1ed0d067), CONST64(0xed3b7ec7d6eded93), +CONST64(0xcc2edb85e2cccc17), CONST64(0x422a578468424215), CONST64(0x98b4c22d2c98985a), CONST64(0xa4490e55eda4a4aa), CONST64(0x285d8850752828a0), CONST64(0x5cda31b8865c5c6d), CONST64(0xf8933fed6bf8f8c7), CONST64(0x8644a411c2868622) }; static const ulong64 sbox6[] = { -CONST64(0x6018c07830d81818), CONST64(0x8c2305af46262323), CONST64(0x3fc67ef991b8c6c6), CONST64(0x87e8136fcdfbe8e8), -CONST64(0x26874ca113cb8787), CONST64(0xdab8a9626d11b8b8), CONST64(0x0401080502090101), CONST64(0x214f426e9e0d4f4f), -CONST64(0xd836adee6c9b3636), CONST64(0xa2a6590451ffa6a6), CONST64(0x6fd2debdb90cd2d2), CONST64(0xf3f5fb06f70ef5f5), -CONST64(0xf979ef80f2967979), CONST64(0xa16f5fcede306f6f), CONST64(0x7e91fcef3f6d9191), CONST64(0x5552aa07a4f85252), -CONST64(0x9d6027fdc0476060), CONST64(0xcabc89766535bcbc), CONST64(0x569baccd2b379b9b), CONST64(0x028e048c018a8e8e), -CONST64(0xb6a371155bd2a3a3), CONST64(0x300c603c186c0c0c), CONST64(0xf17bff8af6847b7b), CONST64(0xd435b5e16a803535), -CONST64(0x741de8693af51d1d), CONST64(0xa7e05347ddb3e0e0), CONST64(0x7bd7f6acb321d7d7), CONST64(0x2fc25eed999cc2c2), -CONST64(0xb82e6d965c432e2e), CONST64(0x314b627a96294b4b), CONST64(0xdffea321e15dfefe), CONST64(0x41578216aed55757), -CONST64(0x5415a8412abd1515), CONST64(0xc1779fb6eee87777), CONST64(0xdc37a5eb6e923737), CONST64(0xb3e57b56d79ee5e5), -CONST64(0x469f8cd923139f9f), CONST64(0xe7f0d317fd23f0f0), CONST64(0x354a6a7f94204a4a), CONST64(0x4fda9e95a944dada), -CONST64(0x7d58fa25b0a25858), CONST64(0x03c906ca8fcfc9c9), CONST64(0xa429558d527c2929), CONST64(0x280a5022145a0a0a), -CONST64(0xfeb1e14f7f50b1b1), CONST64(0xbaa0691a5dc9a0a0), CONST64(0xb16b7fdad6146b6b), CONST64(0x2e855cab17d98585), -CONST64(0xcebd8173673cbdbd), CONST64(0x695dd234ba8f5d5d), CONST64(0x4010805020901010), CONST64(0xf7f4f303f507f4f4), -CONST64(0x0bcb16c08bddcbcb), CONST64(0xf83eedc67cd33e3e), CONST64(0x140528110a2d0505), CONST64(0x81671fe6ce786767), -CONST64(0xb7e47353d597e4e4), CONST64(0x9c2725bb4e022727), CONST64(0x1941325882734141), CONST64(0x168b2c9d0ba78b8b), -CONST64(0xa6a7510153f6a7a7), CONST64(0xe97dcf94fab27d7d), CONST64(0x6e95dcfb37499595), CONST64(0x47d88e9fad56d8d8), -CONST64(0xcbfb8b30eb70fbfb), CONST64(0x9fee2371c1cdeeee), CONST64(0xed7cc791f8bb7c7c), CONST64(0x856617e3cc716666), -CONST64(0x53dda68ea77bdddd), CONST64(0x5c17b84b2eaf1717), CONST64(0x014702468e454747), CONST64(0x429e84dc211a9e9e), -CONST64(0x0fca1ec589d4caca), CONST64(0xb42d75995a582d2d), CONST64(0xc6bf9179632ebfbf), CONST64(0x1c07381b0e3f0707), -CONST64(0x8ead012347acadad), CONST64(0x755aea2fb4b05a5a), CONST64(0x36836cb51bef8383), CONST64(0xcc3385ff66b63333), -CONST64(0x91633ff2c65c6363), CONST64(0x0802100a04120202), CONST64(0x92aa39384993aaaa), CONST64(0xd971afa8e2de7171), -CONST64(0x07c80ecf8dc6c8c8), CONST64(0x6419c87d32d11919), CONST64(0x39497270923b4949), CONST64(0x43d9869aaf5fd9d9), -CONST64(0xeff2c31df931f2f2), CONST64(0xabe34b48dba8e3e3), CONST64(0x715be22ab6b95b5b), CONST64(0x1a8834920dbc8888), -CONST64(0x529aa4c8293e9a9a), CONST64(0x98262dbe4c0b2626), CONST64(0xc8328dfa64bf3232), CONST64(0xfab0e94a7d59b0b0), -CONST64(0x83e91b6acff2e9e9), CONST64(0x3c0f78331e770f0f), CONST64(0x73d5e6a6b733d5d5), CONST64(0x3a8074ba1df48080), -CONST64(0xc2be997c6127bebe), CONST64(0x13cd26de87ebcdcd), CONST64(0xd034bde468893434), CONST64(0x3d487a7590324848), -CONST64(0xdbffab24e354ffff), CONST64(0xf57af78ff48d7a7a), CONST64(0x7a90f4ea3d649090), CONST64(0x615fc23ebe9d5f5f), -CONST64(0x80201da0403d2020), CONST64(0xbd6867d5d00f6868), CONST64(0x681ad07234ca1a1a), CONST64(0x82ae192c41b7aeae), -CONST64(0xeab4c95e757db4b4), CONST64(0x4d549a19a8ce5454), CONST64(0x7693ece53b7f9393), CONST64(0x88220daa442f2222), -CONST64(0x8d6407e9c8636464), CONST64(0xe3f1db12ff2af1f1), CONST64(0xd173bfa2e6cc7373), CONST64(0x4812905a24821212), -CONST64(0x1d403a5d807a4040), CONST64(0x2008402810480808), CONST64(0x2bc356e89b95c3c3), CONST64(0x97ec337bc5dfecec), -CONST64(0x4bdb9690ab4ddbdb), CONST64(0xbea1611f5fc0a1a1), CONST64(0x0e8d1c8307918d8d), CONST64(0xf43df5c97ac83d3d), -CONST64(0x6697ccf1335b9797), CONST64(0x0000000000000000), CONST64(0x1bcf36d483f9cfcf), CONST64(0xac2b4587566e2b2b), -CONST64(0xc57697b3ece17676), CONST64(0x328264b019e68282), CONST64(0x7fd6fea9b128d6d6), CONST64(0x6c1bd87736c31b1b), -CONST64(0xeeb5c15b7774b5b5), CONST64(0x86af112943beafaf), CONST64(0xb56a77dfd41d6a6a), CONST64(0x5d50ba0da0ea5050), -CONST64(0x0945124c8a574545), CONST64(0xebf3cb18fb38f3f3), CONST64(0xc0309df060ad3030), CONST64(0x9bef2b74c3c4efef), -CONST64(0xfc3fe5c37eda3f3f), CONST64(0x4955921caac75555), CONST64(0xb2a2791059dba2a2), CONST64(0x8fea0365c9e9eaea), -CONST64(0x89650fecca6a6565), CONST64(0xd2bab9686903baba), CONST64(0xbc2f65935e4a2f2f), CONST64(0x27c04ee79d8ec0c0), -CONST64(0x5fdebe81a160dede), CONST64(0x701ce06c38fc1c1c), CONST64(0xd3fdbb2ee746fdfd), CONST64(0x294d52649a1f4d4d), -CONST64(0x7292e4e039769292), CONST64(0xc9758fbceafa7575), CONST64(0x1806301e0c360606), CONST64(0x128a249809ae8a8a), -CONST64(0xf2b2f940794bb2b2), CONST64(0xbfe66359d185e6e6), CONST64(0x380e70361c7e0e0e), CONST64(0x7c1ff8633ee71f1f), -CONST64(0x956237f7c4556262), CONST64(0x77d4eea3b53ad4d4), CONST64(0x9aa829324d81a8a8), CONST64(0x6296c4f431529696), -CONST64(0xc3f99b3aef62f9f9), CONST64(0x33c566f697a3c5c5), CONST64(0x942535b14a102525), CONST64(0x7959f220b2ab5959), -CONST64(0x2a8454ae15d08484), CONST64(0xd572b7a7e4c57272), CONST64(0xe439d5dd72ec3939), CONST64(0x2d4c5a6198164c4c), -CONST64(0x655eca3bbc945e5e), CONST64(0xfd78e785f09f7878), CONST64(0xe038ddd870e53838), CONST64(0x0a8c148605988c8c), -CONST64(0x63d1c6b2bf17d1d1), CONST64(0xaea5410b57e4a5a5), CONST64(0xafe2434dd9a1e2e2), CONST64(0x99612ff8c24e6161), -CONST64(0xf6b3f1457b42b3b3), CONST64(0x842115a542342121), CONST64(0x4a9c94d625089c9c), CONST64(0x781ef0663cee1e1e), -CONST64(0x1143225286614343), CONST64(0x3bc776fc93b1c7c7), CONST64(0xd7fcb32be54ffcfc), CONST64(0x1004201408240404), -CONST64(0x5951b208a2e35151), CONST64(0x5e99bcc72f259999), CONST64(0xa96d4fc4da226d6d), CONST64(0x340d68391a650d0d), -CONST64(0xcffa8335e979fafa), CONST64(0x5bdfb684a369dfdf), CONST64(0xe57ed79bfca97e7e), CONST64(0x90243db448192424), -CONST64(0xec3bc5d776fe3b3b), CONST64(0x96ab313d4b9aabab), CONST64(0x1fce3ed181f0cece), CONST64(0x4411885522991111), -CONST64(0x068f0c8903838f8f), CONST64(0x254e4a6b9c044e4e), CONST64(0xe6b7d1517366b7b7), CONST64(0x8beb0b60cbe0ebeb), -CONST64(0xf03cfdcc78c13c3c), CONST64(0x3e817cbf1ffd8181), CONST64(0x6a94d4fe35409494), CONST64(0xfbf7eb0cf31cf7f7), -CONST64(0xdeb9a1676f18b9b9), CONST64(0x4c13985f268b1313), CONST64(0xb02c7d9c58512c2c), CONST64(0x6bd3d6b8bb05d3d3), -CONST64(0xbbe76b5cd38ce7e7), CONST64(0xa56e57cbdc396e6e), CONST64(0x37c46ef395aac4c4), CONST64(0x0c03180f061b0303), -CONST64(0x45568a13acdc5656), CONST64(0x0d441a49885e4444), CONST64(0xe17fdf9efea07f7f), CONST64(0x9ea921374f88a9a9), -CONST64(0xa82a4d8254672a2a), CONST64(0xd6bbb16d6b0abbbb), CONST64(0x23c146e29f87c1c1), CONST64(0x5153a202a6f15353), -CONST64(0x57dcae8ba572dcdc), CONST64(0x2c0b582716530b0b), CONST64(0x4e9d9cd327019d9d), CONST64(0xad6c47c1d82b6c6c), -CONST64(0xc43195f562a43131), CONST64(0xcd7487b9e8f37474), CONST64(0xfff6e309f115f6f6), CONST64(0x05460a438c4c4646), -CONST64(0x8aac092645a5acac), CONST64(0x1e893c970fb58989), CONST64(0x5014a04428b41414), CONST64(0xa3e15b42dfbae1e1), -CONST64(0x5816b04e2ca61616), CONST64(0xe83acdd274f73a3a), CONST64(0xb9696fd0d2066969), CONST64(0x2409482d12410909), -CONST64(0xdd70a7ade0d77070), CONST64(0xe2b6d954716fb6b6), CONST64(0x67d0ceb7bd1ed0d0), CONST64(0x93ed3b7ec7d6eded), -CONST64(0x17cc2edb85e2cccc), CONST64(0x15422a5784684242), CONST64(0x5a98b4c22d2c9898), CONST64(0xaaa4490e55eda4a4), +CONST64(0x6018c07830d81818), CONST64(0x8c2305af46262323), CONST64(0x3fc67ef991b8c6c6), CONST64(0x87e8136fcdfbe8e8), +CONST64(0x26874ca113cb8787), CONST64(0xdab8a9626d11b8b8), CONST64(0x0401080502090101), CONST64(0x214f426e9e0d4f4f), +CONST64(0xd836adee6c9b3636), CONST64(0xa2a6590451ffa6a6), CONST64(0x6fd2debdb90cd2d2), CONST64(0xf3f5fb06f70ef5f5), +CONST64(0xf979ef80f2967979), CONST64(0xa16f5fcede306f6f), CONST64(0x7e91fcef3f6d9191), CONST64(0x5552aa07a4f85252), +CONST64(0x9d6027fdc0476060), CONST64(0xcabc89766535bcbc), CONST64(0x569baccd2b379b9b), CONST64(0x028e048c018a8e8e), +CONST64(0xb6a371155bd2a3a3), CONST64(0x300c603c186c0c0c), CONST64(0xf17bff8af6847b7b), CONST64(0xd435b5e16a803535), +CONST64(0x741de8693af51d1d), CONST64(0xa7e05347ddb3e0e0), CONST64(0x7bd7f6acb321d7d7), CONST64(0x2fc25eed999cc2c2), +CONST64(0xb82e6d965c432e2e), CONST64(0x314b627a96294b4b), CONST64(0xdffea321e15dfefe), CONST64(0x41578216aed55757), +CONST64(0x5415a8412abd1515), CONST64(0xc1779fb6eee87777), CONST64(0xdc37a5eb6e923737), CONST64(0xb3e57b56d79ee5e5), +CONST64(0x469f8cd923139f9f), CONST64(0xe7f0d317fd23f0f0), CONST64(0x354a6a7f94204a4a), CONST64(0x4fda9e95a944dada), +CONST64(0x7d58fa25b0a25858), CONST64(0x03c906ca8fcfc9c9), CONST64(0xa429558d527c2929), CONST64(0x280a5022145a0a0a), +CONST64(0xfeb1e14f7f50b1b1), CONST64(0xbaa0691a5dc9a0a0), CONST64(0xb16b7fdad6146b6b), CONST64(0x2e855cab17d98585), +CONST64(0xcebd8173673cbdbd), CONST64(0x695dd234ba8f5d5d), CONST64(0x4010805020901010), CONST64(0xf7f4f303f507f4f4), +CONST64(0x0bcb16c08bddcbcb), CONST64(0xf83eedc67cd33e3e), CONST64(0x140528110a2d0505), CONST64(0x81671fe6ce786767), +CONST64(0xb7e47353d597e4e4), CONST64(0x9c2725bb4e022727), CONST64(0x1941325882734141), CONST64(0x168b2c9d0ba78b8b), +CONST64(0xa6a7510153f6a7a7), CONST64(0xe97dcf94fab27d7d), CONST64(0x6e95dcfb37499595), CONST64(0x47d88e9fad56d8d8), +CONST64(0xcbfb8b30eb70fbfb), CONST64(0x9fee2371c1cdeeee), CONST64(0xed7cc791f8bb7c7c), CONST64(0x856617e3cc716666), +CONST64(0x53dda68ea77bdddd), CONST64(0x5c17b84b2eaf1717), CONST64(0x014702468e454747), CONST64(0x429e84dc211a9e9e), +CONST64(0x0fca1ec589d4caca), CONST64(0xb42d75995a582d2d), CONST64(0xc6bf9179632ebfbf), CONST64(0x1c07381b0e3f0707), +CONST64(0x8ead012347acadad), CONST64(0x755aea2fb4b05a5a), CONST64(0x36836cb51bef8383), CONST64(0xcc3385ff66b63333), +CONST64(0x91633ff2c65c6363), CONST64(0x0802100a04120202), CONST64(0x92aa39384993aaaa), CONST64(0xd971afa8e2de7171), +CONST64(0x07c80ecf8dc6c8c8), CONST64(0x6419c87d32d11919), CONST64(0x39497270923b4949), CONST64(0x43d9869aaf5fd9d9), +CONST64(0xeff2c31df931f2f2), CONST64(0xabe34b48dba8e3e3), CONST64(0x715be22ab6b95b5b), CONST64(0x1a8834920dbc8888), +CONST64(0x529aa4c8293e9a9a), CONST64(0x98262dbe4c0b2626), CONST64(0xc8328dfa64bf3232), CONST64(0xfab0e94a7d59b0b0), +CONST64(0x83e91b6acff2e9e9), CONST64(0x3c0f78331e770f0f), CONST64(0x73d5e6a6b733d5d5), CONST64(0x3a8074ba1df48080), +CONST64(0xc2be997c6127bebe), CONST64(0x13cd26de87ebcdcd), CONST64(0xd034bde468893434), CONST64(0x3d487a7590324848), +CONST64(0xdbffab24e354ffff), CONST64(0xf57af78ff48d7a7a), CONST64(0x7a90f4ea3d649090), CONST64(0x615fc23ebe9d5f5f), +CONST64(0x80201da0403d2020), CONST64(0xbd6867d5d00f6868), CONST64(0x681ad07234ca1a1a), CONST64(0x82ae192c41b7aeae), +CONST64(0xeab4c95e757db4b4), CONST64(0x4d549a19a8ce5454), CONST64(0x7693ece53b7f9393), CONST64(0x88220daa442f2222), +CONST64(0x8d6407e9c8636464), CONST64(0xe3f1db12ff2af1f1), CONST64(0xd173bfa2e6cc7373), CONST64(0x4812905a24821212), +CONST64(0x1d403a5d807a4040), CONST64(0x2008402810480808), CONST64(0x2bc356e89b95c3c3), CONST64(0x97ec337bc5dfecec), +CONST64(0x4bdb9690ab4ddbdb), CONST64(0xbea1611f5fc0a1a1), CONST64(0x0e8d1c8307918d8d), CONST64(0xf43df5c97ac83d3d), +CONST64(0x6697ccf1335b9797), CONST64(0x0000000000000000), CONST64(0x1bcf36d483f9cfcf), CONST64(0xac2b4587566e2b2b), +CONST64(0xc57697b3ece17676), CONST64(0x328264b019e68282), CONST64(0x7fd6fea9b128d6d6), CONST64(0x6c1bd87736c31b1b), +CONST64(0xeeb5c15b7774b5b5), CONST64(0x86af112943beafaf), CONST64(0xb56a77dfd41d6a6a), CONST64(0x5d50ba0da0ea5050), +CONST64(0x0945124c8a574545), CONST64(0xebf3cb18fb38f3f3), CONST64(0xc0309df060ad3030), CONST64(0x9bef2b74c3c4efef), +CONST64(0xfc3fe5c37eda3f3f), CONST64(0x4955921caac75555), CONST64(0xb2a2791059dba2a2), CONST64(0x8fea0365c9e9eaea), +CONST64(0x89650fecca6a6565), CONST64(0xd2bab9686903baba), CONST64(0xbc2f65935e4a2f2f), CONST64(0x27c04ee79d8ec0c0), +CONST64(0x5fdebe81a160dede), CONST64(0x701ce06c38fc1c1c), CONST64(0xd3fdbb2ee746fdfd), CONST64(0x294d52649a1f4d4d), +CONST64(0x7292e4e039769292), CONST64(0xc9758fbceafa7575), CONST64(0x1806301e0c360606), CONST64(0x128a249809ae8a8a), +CONST64(0xf2b2f940794bb2b2), CONST64(0xbfe66359d185e6e6), CONST64(0x380e70361c7e0e0e), CONST64(0x7c1ff8633ee71f1f), +CONST64(0x956237f7c4556262), CONST64(0x77d4eea3b53ad4d4), CONST64(0x9aa829324d81a8a8), CONST64(0x6296c4f431529696), +CONST64(0xc3f99b3aef62f9f9), CONST64(0x33c566f697a3c5c5), CONST64(0x942535b14a102525), CONST64(0x7959f220b2ab5959), +CONST64(0x2a8454ae15d08484), CONST64(0xd572b7a7e4c57272), CONST64(0xe439d5dd72ec3939), CONST64(0x2d4c5a6198164c4c), +CONST64(0x655eca3bbc945e5e), CONST64(0xfd78e785f09f7878), CONST64(0xe038ddd870e53838), CONST64(0x0a8c148605988c8c), +CONST64(0x63d1c6b2bf17d1d1), CONST64(0xaea5410b57e4a5a5), CONST64(0xafe2434dd9a1e2e2), CONST64(0x99612ff8c24e6161), +CONST64(0xf6b3f1457b42b3b3), CONST64(0x842115a542342121), CONST64(0x4a9c94d625089c9c), CONST64(0x781ef0663cee1e1e), +CONST64(0x1143225286614343), CONST64(0x3bc776fc93b1c7c7), CONST64(0xd7fcb32be54ffcfc), CONST64(0x1004201408240404), +CONST64(0x5951b208a2e35151), CONST64(0x5e99bcc72f259999), CONST64(0xa96d4fc4da226d6d), CONST64(0x340d68391a650d0d), +CONST64(0xcffa8335e979fafa), CONST64(0x5bdfb684a369dfdf), CONST64(0xe57ed79bfca97e7e), CONST64(0x90243db448192424), +CONST64(0xec3bc5d776fe3b3b), CONST64(0x96ab313d4b9aabab), CONST64(0x1fce3ed181f0cece), CONST64(0x4411885522991111), +CONST64(0x068f0c8903838f8f), CONST64(0x254e4a6b9c044e4e), CONST64(0xe6b7d1517366b7b7), CONST64(0x8beb0b60cbe0ebeb), +CONST64(0xf03cfdcc78c13c3c), CONST64(0x3e817cbf1ffd8181), CONST64(0x6a94d4fe35409494), CONST64(0xfbf7eb0cf31cf7f7), +CONST64(0xdeb9a1676f18b9b9), CONST64(0x4c13985f268b1313), CONST64(0xb02c7d9c58512c2c), CONST64(0x6bd3d6b8bb05d3d3), +CONST64(0xbbe76b5cd38ce7e7), CONST64(0xa56e57cbdc396e6e), CONST64(0x37c46ef395aac4c4), CONST64(0x0c03180f061b0303), +CONST64(0x45568a13acdc5656), CONST64(0x0d441a49885e4444), CONST64(0xe17fdf9efea07f7f), CONST64(0x9ea921374f88a9a9), +CONST64(0xa82a4d8254672a2a), CONST64(0xd6bbb16d6b0abbbb), CONST64(0x23c146e29f87c1c1), CONST64(0x5153a202a6f15353), +CONST64(0x57dcae8ba572dcdc), CONST64(0x2c0b582716530b0b), CONST64(0x4e9d9cd327019d9d), CONST64(0xad6c47c1d82b6c6c), +CONST64(0xc43195f562a43131), CONST64(0xcd7487b9e8f37474), CONST64(0xfff6e309f115f6f6), CONST64(0x05460a438c4c4646), +CONST64(0x8aac092645a5acac), CONST64(0x1e893c970fb58989), CONST64(0x5014a04428b41414), CONST64(0xa3e15b42dfbae1e1), +CONST64(0x5816b04e2ca61616), CONST64(0xe83acdd274f73a3a), CONST64(0xb9696fd0d2066969), CONST64(0x2409482d12410909), +CONST64(0xdd70a7ade0d77070), CONST64(0xe2b6d954716fb6b6), CONST64(0x67d0ceb7bd1ed0d0), CONST64(0x93ed3b7ec7d6eded), +CONST64(0x17cc2edb85e2cccc), CONST64(0x15422a5784684242), CONST64(0x5a98b4c22d2c9898), CONST64(0xaaa4490e55eda4a4), CONST64(0xa0285d8850752828), CONST64(0x6d5cda31b8865c5c), CONST64(0xc7f8933fed6bf8f8), CONST64(0x228644a411c28686) }; static const ulong64 sbox7[] = { -CONST64(0x186018c07830d818), CONST64(0x238c2305af462623), CONST64(0xc63fc67ef991b8c6), CONST64(0xe887e8136fcdfbe8), -CONST64(0x8726874ca113cb87), CONST64(0xb8dab8a9626d11b8), CONST64(0x0104010805020901), CONST64(0x4f214f426e9e0d4f), -CONST64(0x36d836adee6c9b36), CONST64(0xa6a2a6590451ffa6), CONST64(0xd26fd2debdb90cd2), CONST64(0xf5f3f5fb06f70ef5), -CONST64(0x79f979ef80f29679), CONST64(0x6fa16f5fcede306f), CONST64(0x917e91fcef3f6d91), CONST64(0x525552aa07a4f852), -CONST64(0x609d6027fdc04760), CONST64(0xbccabc89766535bc), CONST64(0x9b569baccd2b379b), CONST64(0x8e028e048c018a8e), -CONST64(0xa3b6a371155bd2a3), CONST64(0x0c300c603c186c0c), CONST64(0x7bf17bff8af6847b), CONST64(0x35d435b5e16a8035), -CONST64(0x1d741de8693af51d), CONST64(0xe0a7e05347ddb3e0), CONST64(0xd77bd7f6acb321d7), CONST64(0xc22fc25eed999cc2), -CONST64(0x2eb82e6d965c432e), CONST64(0x4b314b627a96294b), CONST64(0xfedffea321e15dfe), CONST64(0x5741578216aed557), -CONST64(0x155415a8412abd15), CONST64(0x77c1779fb6eee877), CONST64(0x37dc37a5eb6e9237), CONST64(0xe5b3e57b56d79ee5), -CONST64(0x9f469f8cd923139f), CONST64(0xf0e7f0d317fd23f0), CONST64(0x4a354a6a7f94204a), CONST64(0xda4fda9e95a944da), -CONST64(0x587d58fa25b0a258), CONST64(0xc903c906ca8fcfc9), CONST64(0x29a429558d527c29), CONST64(0x0a280a5022145a0a), -CONST64(0xb1feb1e14f7f50b1), CONST64(0xa0baa0691a5dc9a0), CONST64(0x6bb16b7fdad6146b), CONST64(0x852e855cab17d985), -CONST64(0xbdcebd8173673cbd), CONST64(0x5d695dd234ba8f5d), CONST64(0x1040108050209010), CONST64(0xf4f7f4f303f507f4), -CONST64(0xcb0bcb16c08bddcb), CONST64(0x3ef83eedc67cd33e), CONST64(0x05140528110a2d05), CONST64(0x6781671fe6ce7867), -CONST64(0xe4b7e47353d597e4), CONST64(0x279c2725bb4e0227), CONST64(0x4119413258827341), CONST64(0x8b168b2c9d0ba78b), -CONST64(0xa7a6a7510153f6a7), CONST64(0x7de97dcf94fab27d), CONST64(0x956e95dcfb374995), CONST64(0xd847d88e9fad56d8), -CONST64(0xfbcbfb8b30eb70fb), CONST64(0xee9fee2371c1cdee), CONST64(0x7ced7cc791f8bb7c), CONST64(0x66856617e3cc7166), -CONST64(0xdd53dda68ea77bdd), CONST64(0x175c17b84b2eaf17), CONST64(0x47014702468e4547), CONST64(0x9e429e84dc211a9e), -CONST64(0xca0fca1ec589d4ca), CONST64(0x2db42d75995a582d), CONST64(0xbfc6bf9179632ebf), CONST64(0x071c07381b0e3f07), -CONST64(0xad8ead012347acad), CONST64(0x5a755aea2fb4b05a), CONST64(0x8336836cb51bef83), CONST64(0x33cc3385ff66b633), -CONST64(0x6391633ff2c65c63), CONST64(0x020802100a041202), CONST64(0xaa92aa39384993aa), CONST64(0x71d971afa8e2de71), -CONST64(0xc807c80ecf8dc6c8), CONST64(0x196419c87d32d119), CONST64(0x4939497270923b49), CONST64(0xd943d9869aaf5fd9), -CONST64(0xf2eff2c31df931f2), CONST64(0xe3abe34b48dba8e3), CONST64(0x5b715be22ab6b95b), CONST64(0x881a8834920dbc88), -CONST64(0x9a529aa4c8293e9a), CONST64(0x2698262dbe4c0b26), CONST64(0x32c8328dfa64bf32), CONST64(0xb0fab0e94a7d59b0), -CONST64(0xe983e91b6acff2e9), CONST64(0x0f3c0f78331e770f), CONST64(0xd573d5e6a6b733d5), CONST64(0x803a8074ba1df480), -CONST64(0xbec2be997c6127be), CONST64(0xcd13cd26de87ebcd), CONST64(0x34d034bde4688934), CONST64(0x483d487a75903248), -CONST64(0xffdbffab24e354ff), CONST64(0x7af57af78ff48d7a), CONST64(0x907a90f4ea3d6490), CONST64(0x5f615fc23ebe9d5f), -CONST64(0x2080201da0403d20), CONST64(0x68bd6867d5d00f68), CONST64(0x1a681ad07234ca1a), CONST64(0xae82ae192c41b7ae), -CONST64(0xb4eab4c95e757db4), CONST64(0x544d549a19a8ce54), CONST64(0x937693ece53b7f93), CONST64(0x2288220daa442f22), -CONST64(0x648d6407e9c86364), CONST64(0xf1e3f1db12ff2af1), CONST64(0x73d173bfa2e6cc73), CONST64(0x124812905a248212), -CONST64(0x401d403a5d807a40), CONST64(0x0820084028104808), CONST64(0xc32bc356e89b95c3), CONST64(0xec97ec337bc5dfec), -CONST64(0xdb4bdb9690ab4ddb), CONST64(0xa1bea1611f5fc0a1), CONST64(0x8d0e8d1c8307918d), CONST64(0x3df43df5c97ac83d), -CONST64(0x976697ccf1335b97), CONST64(0x0000000000000000), CONST64(0xcf1bcf36d483f9cf), CONST64(0x2bac2b4587566e2b), -CONST64(0x76c57697b3ece176), CONST64(0x82328264b019e682), CONST64(0xd67fd6fea9b128d6), CONST64(0x1b6c1bd87736c31b), -CONST64(0xb5eeb5c15b7774b5), CONST64(0xaf86af112943beaf), CONST64(0x6ab56a77dfd41d6a), CONST64(0x505d50ba0da0ea50), -CONST64(0x450945124c8a5745), CONST64(0xf3ebf3cb18fb38f3), CONST64(0x30c0309df060ad30), CONST64(0xef9bef2b74c3c4ef), -CONST64(0x3ffc3fe5c37eda3f), CONST64(0x554955921caac755), CONST64(0xa2b2a2791059dba2), CONST64(0xea8fea0365c9e9ea), -CONST64(0x6589650fecca6a65), CONST64(0xbad2bab9686903ba), CONST64(0x2fbc2f65935e4a2f), CONST64(0xc027c04ee79d8ec0), -CONST64(0xde5fdebe81a160de), CONST64(0x1c701ce06c38fc1c), CONST64(0xfdd3fdbb2ee746fd), CONST64(0x4d294d52649a1f4d), -CONST64(0x927292e4e0397692), CONST64(0x75c9758fbceafa75), CONST64(0x061806301e0c3606), CONST64(0x8a128a249809ae8a), -CONST64(0xb2f2b2f940794bb2), CONST64(0xe6bfe66359d185e6), CONST64(0x0e380e70361c7e0e), CONST64(0x1f7c1ff8633ee71f), -CONST64(0x62956237f7c45562), CONST64(0xd477d4eea3b53ad4), CONST64(0xa89aa829324d81a8), CONST64(0x966296c4f4315296), -CONST64(0xf9c3f99b3aef62f9), CONST64(0xc533c566f697a3c5), CONST64(0x25942535b14a1025), CONST64(0x597959f220b2ab59), -CONST64(0x842a8454ae15d084), CONST64(0x72d572b7a7e4c572), CONST64(0x39e439d5dd72ec39), CONST64(0x4c2d4c5a6198164c), -CONST64(0x5e655eca3bbc945e), CONST64(0x78fd78e785f09f78), CONST64(0x38e038ddd870e538), CONST64(0x8c0a8c148605988c), -CONST64(0xd163d1c6b2bf17d1), CONST64(0xa5aea5410b57e4a5), CONST64(0xe2afe2434dd9a1e2), CONST64(0x6199612ff8c24e61), -CONST64(0xb3f6b3f1457b42b3), CONST64(0x21842115a5423421), CONST64(0x9c4a9c94d625089c), CONST64(0x1e781ef0663cee1e), -CONST64(0x4311432252866143), CONST64(0xc73bc776fc93b1c7), CONST64(0xfcd7fcb32be54ffc), CONST64(0x0410042014082404), -CONST64(0x515951b208a2e351), CONST64(0x995e99bcc72f2599), CONST64(0x6da96d4fc4da226d), CONST64(0x0d340d68391a650d), -CONST64(0xfacffa8335e979fa), CONST64(0xdf5bdfb684a369df), CONST64(0x7ee57ed79bfca97e), CONST64(0x2490243db4481924), -CONST64(0x3bec3bc5d776fe3b), CONST64(0xab96ab313d4b9aab), CONST64(0xce1fce3ed181f0ce), CONST64(0x1144118855229911), -CONST64(0x8f068f0c8903838f), CONST64(0x4e254e4a6b9c044e), CONST64(0xb7e6b7d1517366b7), CONST64(0xeb8beb0b60cbe0eb), -CONST64(0x3cf03cfdcc78c13c), CONST64(0x813e817cbf1ffd81), CONST64(0x946a94d4fe354094), CONST64(0xf7fbf7eb0cf31cf7), -CONST64(0xb9deb9a1676f18b9), CONST64(0x134c13985f268b13), CONST64(0x2cb02c7d9c58512c), CONST64(0xd36bd3d6b8bb05d3), -CONST64(0xe7bbe76b5cd38ce7), CONST64(0x6ea56e57cbdc396e), CONST64(0xc437c46ef395aac4), CONST64(0x030c03180f061b03), -CONST64(0x5645568a13acdc56), CONST64(0x440d441a49885e44), CONST64(0x7fe17fdf9efea07f), CONST64(0xa99ea921374f88a9), -CONST64(0x2aa82a4d8254672a), CONST64(0xbbd6bbb16d6b0abb), CONST64(0xc123c146e29f87c1), CONST64(0x535153a202a6f153), -CONST64(0xdc57dcae8ba572dc), CONST64(0x0b2c0b582716530b), CONST64(0x9d4e9d9cd327019d), CONST64(0x6cad6c47c1d82b6c), -CONST64(0x31c43195f562a431), CONST64(0x74cd7487b9e8f374), CONST64(0xf6fff6e309f115f6), CONST64(0x4605460a438c4c46), -CONST64(0xac8aac092645a5ac), CONST64(0x891e893c970fb589), CONST64(0x145014a04428b414), CONST64(0xe1a3e15b42dfbae1), -CONST64(0x165816b04e2ca616), CONST64(0x3ae83acdd274f73a), CONST64(0x69b9696fd0d20669), CONST64(0x092409482d124109), -CONST64(0x70dd70a7ade0d770), CONST64(0xb6e2b6d954716fb6), CONST64(0xd067d0ceb7bd1ed0), CONST64(0xed93ed3b7ec7d6ed), -CONST64(0xcc17cc2edb85e2cc), CONST64(0x4215422a57846842), CONST64(0x985a98b4c22d2c98), CONST64(0xa4aaa4490e55eda4), +CONST64(0x186018c07830d818), CONST64(0x238c2305af462623), CONST64(0xc63fc67ef991b8c6), CONST64(0xe887e8136fcdfbe8), +CONST64(0x8726874ca113cb87), CONST64(0xb8dab8a9626d11b8), CONST64(0x0104010805020901), CONST64(0x4f214f426e9e0d4f), +CONST64(0x36d836adee6c9b36), CONST64(0xa6a2a6590451ffa6), CONST64(0xd26fd2debdb90cd2), CONST64(0xf5f3f5fb06f70ef5), +CONST64(0x79f979ef80f29679), CONST64(0x6fa16f5fcede306f), CONST64(0x917e91fcef3f6d91), CONST64(0x525552aa07a4f852), +CONST64(0x609d6027fdc04760), CONST64(0xbccabc89766535bc), CONST64(0x9b569baccd2b379b), CONST64(0x8e028e048c018a8e), +CONST64(0xa3b6a371155bd2a3), CONST64(0x0c300c603c186c0c), CONST64(0x7bf17bff8af6847b), CONST64(0x35d435b5e16a8035), +CONST64(0x1d741de8693af51d), CONST64(0xe0a7e05347ddb3e0), CONST64(0xd77bd7f6acb321d7), CONST64(0xc22fc25eed999cc2), +CONST64(0x2eb82e6d965c432e), CONST64(0x4b314b627a96294b), CONST64(0xfedffea321e15dfe), CONST64(0x5741578216aed557), +CONST64(0x155415a8412abd15), CONST64(0x77c1779fb6eee877), CONST64(0x37dc37a5eb6e9237), CONST64(0xe5b3e57b56d79ee5), +CONST64(0x9f469f8cd923139f), CONST64(0xf0e7f0d317fd23f0), CONST64(0x4a354a6a7f94204a), CONST64(0xda4fda9e95a944da), +CONST64(0x587d58fa25b0a258), CONST64(0xc903c906ca8fcfc9), CONST64(0x29a429558d527c29), CONST64(0x0a280a5022145a0a), +CONST64(0xb1feb1e14f7f50b1), CONST64(0xa0baa0691a5dc9a0), CONST64(0x6bb16b7fdad6146b), CONST64(0x852e855cab17d985), +CONST64(0xbdcebd8173673cbd), CONST64(0x5d695dd234ba8f5d), CONST64(0x1040108050209010), CONST64(0xf4f7f4f303f507f4), +CONST64(0xcb0bcb16c08bddcb), CONST64(0x3ef83eedc67cd33e), CONST64(0x05140528110a2d05), CONST64(0x6781671fe6ce7867), +CONST64(0xe4b7e47353d597e4), CONST64(0x279c2725bb4e0227), CONST64(0x4119413258827341), CONST64(0x8b168b2c9d0ba78b), +CONST64(0xa7a6a7510153f6a7), CONST64(0x7de97dcf94fab27d), CONST64(0x956e95dcfb374995), CONST64(0xd847d88e9fad56d8), +CONST64(0xfbcbfb8b30eb70fb), CONST64(0xee9fee2371c1cdee), CONST64(0x7ced7cc791f8bb7c), CONST64(0x66856617e3cc7166), +CONST64(0xdd53dda68ea77bdd), CONST64(0x175c17b84b2eaf17), CONST64(0x47014702468e4547), CONST64(0x9e429e84dc211a9e), +CONST64(0xca0fca1ec589d4ca), CONST64(0x2db42d75995a582d), CONST64(0xbfc6bf9179632ebf), CONST64(0x071c07381b0e3f07), +CONST64(0xad8ead012347acad), CONST64(0x5a755aea2fb4b05a), CONST64(0x8336836cb51bef83), CONST64(0x33cc3385ff66b633), +CONST64(0x6391633ff2c65c63), CONST64(0x020802100a041202), CONST64(0xaa92aa39384993aa), CONST64(0x71d971afa8e2de71), +CONST64(0xc807c80ecf8dc6c8), CONST64(0x196419c87d32d119), CONST64(0x4939497270923b49), CONST64(0xd943d9869aaf5fd9), +CONST64(0xf2eff2c31df931f2), CONST64(0xe3abe34b48dba8e3), CONST64(0x5b715be22ab6b95b), CONST64(0x881a8834920dbc88), +CONST64(0x9a529aa4c8293e9a), CONST64(0x2698262dbe4c0b26), CONST64(0x32c8328dfa64bf32), CONST64(0xb0fab0e94a7d59b0), +CONST64(0xe983e91b6acff2e9), CONST64(0x0f3c0f78331e770f), CONST64(0xd573d5e6a6b733d5), CONST64(0x803a8074ba1df480), +CONST64(0xbec2be997c6127be), CONST64(0xcd13cd26de87ebcd), CONST64(0x34d034bde4688934), CONST64(0x483d487a75903248), +CONST64(0xffdbffab24e354ff), CONST64(0x7af57af78ff48d7a), CONST64(0x907a90f4ea3d6490), CONST64(0x5f615fc23ebe9d5f), +CONST64(0x2080201da0403d20), CONST64(0x68bd6867d5d00f68), CONST64(0x1a681ad07234ca1a), CONST64(0xae82ae192c41b7ae), +CONST64(0xb4eab4c95e757db4), CONST64(0x544d549a19a8ce54), CONST64(0x937693ece53b7f93), CONST64(0x2288220daa442f22), +CONST64(0x648d6407e9c86364), CONST64(0xf1e3f1db12ff2af1), CONST64(0x73d173bfa2e6cc73), CONST64(0x124812905a248212), +CONST64(0x401d403a5d807a40), CONST64(0x0820084028104808), CONST64(0xc32bc356e89b95c3), CONST64(0xec97ec337bc5dfec), +CONST64(0xdb4bdb9690ab4ddb), CONST64(0xa1bea1611f5fc0a1), CONST64(0x8d0e8d1c8307918d), CONST64(0x3df43df5c97ac83d), +CONST64(0x976697ccf1335b97), CONST64(0x0000000000000000), CONST64(0xcf1bcf36d483f9cf), CONST64(0x2bac2b4587566e2b), +CONST64(0x76c57697b3ece176), CONST64(0x82328264b019e682), CONST64(0xd67fd6fea9b128d6), CONST64(0x1b6c1bd87736c31b), +CONST64(0xb5eeb5c15b7774b5), CONST64(0xaf86af112943beaf), CONST64(0x6ab56a77dfd41d6a), CONST64(0x505d50ba0da0ea50), +CONST64(0x450945124c8a5745), CONST64(0xf3ebf3cb18fb38f3), CONST64(0x30c0309df060ad30), CONST64(0xef9bef2b74c3c4ef), +CONST64(0x3ffc3fe5c37eda3f), CONST64(0x554955921caac755), CONST64(0xa2b2a2791059dba2), CONST64(0xea8fea0365c9e9ea), +CONST64(0x6589650fecca6a65), CONST64(0xbad2bab9686903ba), CONST64(0x2fbc2f65935e4a2f), CONST64(0xc027c04ee79d8ec0), +CONST64(0xde5fdebe81a160de), CONST64(0x1c701ce06c38fc1c), CONST64(0xfdd3fdbb2ee746fd), CONST64(0x4d294d52649a1f4d), +CONST64(0x927292e4e0397692), CONST64(0x75c9758fbceafa75), CONST64(0x061806301e0c3606), CONST64(0x8a128a249809ae8a), +CONST64(0xb2f2b2f940794bb2), CONST64(0xe6bfe66359d185e6), CONST64(0x0e380e70361c7e0e), CONST64(0x1f7c1ff8633ee71f), +CONST64(0x62956237f7c45562), CONST64(0xd477d4eea3b53ad4), CONST64(0xa89aa829324d81a8), CONST64(0x966296c4f4315296), +CONST64(0xf9c3f99b3aef62f9), CONST64(0xc533c566f697a3c5), CONST64(0x25942535b14a1025), CONST64(0x597959f220b2ab59), +CONST64(0x842a8454ae15d084), CONST64(0x72d572b7a7e4c572), CONST64(0x39e439d5dd72ec39), CONST64(0x4c2d4c5a6198164c), +CONST64(0x5e655eca3bbc945e), CONST64(0x78fd78e785f09f78), CONST64(0x38e038ddd870e538), CONST64(0x8c0a8c148605988c), +CONST64(0xd163d1c6b2bf17d1), CONST64(0xa5aea5410b57e4a5), CONST64(0xe2afe2434dd9a1e2), CONST64(0x6199612ff8c24e61), +CONST64(0xb3f6b3f1457b42b3), CONST64(0x21842115a5423421), CONST64(0x9c4a9c94d625089c), CONST64(0x1e781ef0663cee1e), +CONST64(0x4311432252866143), CONST64(0xc73bc776fc93b1c7), CONST64(0xfcd7fcb32be54ffc), CONST64(0x0410042014082404), +CONST64(0x515951b208a2e351), CONST64(0x995e99bcc72f2599), CONST64(0x6da96d4fc4da226d), CONST64(0x0d340d68391a650d), +CONST64(0xfacffa8335e979fa), CONST64(0xdf5bdfb684a369df), CONST64(0x7ee57ed79bfca97e), CONST64(0x2490243db4481924), +CONST64(0x3bec3bc5d776fe3b), CONST64(0xab96ab313d4b9aab), CONST64(0xce1fce3ed181f0ce), CONST64(0x1144118855229911), +CONST64(0x8f068f0c8903838f), CONST64(0x4e254e4a6b9c044e), CONST64(0xb7e6b7d1517366b7), CONST64(0xeb8beb0b60cbe0eb), +CONST64(0x3cf03cfdcc78c13c), CONST64(0x813e817cbf1ffd81), CONST64(0x946a94d4fe354094), CONST64(0xf7fbf7eb0cf31cf7), +CONST64(0xb9deb9a1676f18b9), CONST64(0x134c13985f268b13), CONST64(0x2cb02c7d9c58512c), CONST64(0xd36bd3d6b8bb05d3), +CONST64(0xe7bbe76b5cd38ce7), CONST64(0x6ea56e57cbdc396e), CONST64(0xc437c46ef395aac4), CONST64(0x030c03180f061b03), +CONST64(0x5645568a13acdc56), CONST64(0x440d441a49885e44), CONST64(0x7fe17fdf9efea07f), CONST64(0xa99ea921374f88a9), +CONST64(0x2aa82a4d8254672a), CONST64(0xbbd6bbb16d6b0abb), CONST64(0xc123c146e29f87c1), CONST64(0x535153a202a6f153), +CONST64(0xdc57dcae8ba572dc), CONST64(0x0b2c0b582716530b), CONST64(0x9d4e9d9cd327019d), CONST64(0x6cad6c47c1d82b6c), +CONST64(0x31c43195f562a431), CONST64(0x74cd7487b9e8f374), CONST64(0xf6fff6e309f115f6), CONST64(0x4605460a438c4c46), +CONST64(0xac8aac092645a5ac), CONST64(0x891e893c970fb589), CONST64(0x145014a04428b414), CONST64(0xe1a3e15b42dfbae1), +CONST64(0x165816b04e2ca616), CONST64(0x3ae83acdd274f73a), CONST64(0x69b9696fd0d20669), CONST64(0x092409482d124109), +CONST64(0x70dd70a7ade0d770), CONST64(0xb6e2b6d954716fb6), CONST64(0xd067d0ceb7bd1ed0), CONST64(0xed93ed3b7ec7d6ed), +CONST64(0xcc17cc2edb85e2cc), CONST64(0x4215422a57846842), CONST64(0x985a98b4c22d2c98), CONST64(0xa4aaa4490e55eda4), CONST64(0x28a0285d88507528), CONST64(0x5c6d5cda31b8865c), CONST64(0xf8c7f8933fed6bf8), CONST64(0x86228644a411c286) }; @@ -577,7 +589,8 @@ CONST64(0x6302aa71c81949d9), }; +#endif /* __LTC_WHIRLTAB_C__ */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/headers/tomcrypt.h --- a/libtomcrypt/src/headers/tomcrypt.h Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/headers/tomcrypt.h Fri Feb 09 21:44:05 2018 +0800 @@ -1,9 +1,19 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + #ifndef TOMCRYPT_H_ #define TOMCRYPT_H_ #include #include #include #include +#include #include #include #include @@ -16,8 +26,8 @@ #endif /* version */ -#define CRYPT 0x0117 -#define SCRYPT "1.17" +#define CRYPT 0x0118 +#define SCRYPT "1.18.1" /* max size of either a cipher/hash block or symmetric key [largest of the two] */ #define MAXBLOCKSIZE 128 @@ -55,13 +65,19 @@ CRYPT_FILE_NOTFOUND, /* File Not Found */ CRYPT_PK_INVALID_TYPE, /* Invalid type of PK key */ - CRYPT_PK_INVALID_SYSTEM,/* Invalid PK system specified */ - CRYPT_PK_DUP, /* Duplicate key already in key ring */ - CRYPT_PK_NOT_FOUND, /* Key not found in keyring */ + + CRYPT_OVERFLOW, /* An overflow of a value was detected/prevented */ + + CRYPT_UNUSED1, /* UNUSED1 */ + + CRYPT_INPUT_TOO_LONG, /* The input was longer than expected. */ + CRYPT_PK_INVALID_SIZE, /* Invalid size input for PK parameters */ CRYPT_INVALID_PRIME_SIZE,/* Invalid size of prime requested */ - CRYPT_PK_INVALID_PADDING /* Invalid padding on input */ + CRYPT_PK_INVALID_PADDING, /* Invalid padding on input */ + + CRYPT_HASH_OVERFLOW /* Hash applied to too many bits */ }; #include @@ -83,6 +99,6 @@ #endif /* TOMCRYPT_H_ */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/headers/tomcrypt_argchk.h --- a/libtomcrypt/src/headers/tomcrypt_argchk.h Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/headers/tomcrypt_argchk.h Fri Feb 09 21:44:05 2018 +0800 @@ -1,5 +1,14 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + /* Defines the LTC_ARGCHK macro used within the library */ -/* ARGTYPE is defined in mycrypt_cfg.h */ +/* ARGTYPE is defined in tomcrypt_cfg.h */ #if ARGTYPE == 0 #include @@ -13,9 +22,15 @@ /* this is the default LibTomCrypt macro */ -void crypt_argchk(char *v, char *s, int d) ATTRIB_NORETURN; -#define LTC_ARGCHK(x) if (!(x)) { crypt_argchk(#x, __FILE__, __LINE__); } -#define LTC_ARGCHKVD(x) LTC_ARGCHK(x) +#if defined(__clang__) || defined(__GNUC_MINOR__) +#define NORETURN __attribute__ ((noreturn)) +#else +#define NORETURN +#endif + +void crypt_argchk(const char *v, const char *s, int d) NORETURN; +#define LTC_ARGCHK(x) do { if (!(x)) { crypt_argchk(#x, __FILE__, __LINE__); } }while(0) +#define LTC_ARGCHKVD(x) do { if (!(x)) { crypt_argchk(#x, __FILE__, __LINE__); } }while(0) #elif ARGTYPE == 1 @@ -41,6 +56,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/headers/tomcrypt_cfg.h --- a/libtomcrypt/src/headers/tomcrypt_cfg.h Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/headers/tomcrypt_cfg.h Fri Feb 09 21:44:05 2018 +0800 @@ -1,3 +1,12 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + /* This is the build config file. * * With this you can setup what to inlcude/exclude automatically during any build. Just comment @@ -8,15 +17,13 @@ #define TOMCRYPT_CFG_H #if defined(_WIN32) || defined(_MSC_VER) -#define LTC_CALL __cdecl -#else -#ifndef LTC_CALL + #define LTC_CALL __cdecl +#elif !defined(LTC_CALL) #define LTC_CALL #endif -#endif #ifndef LTC_EXPORT -#define LTC_EXPORT + #define LTC_EXPORT #endif /* certain platforms use macros for these, making the prototypes broken */ @@ -43,94 +50,234 @@ #endif +/* some compilers do not like "inline" (or maybe "static inline"), namely: HP cc, IBM xlc */ +#if defined(__HP_cc) || defined(__xlc__) + #define LTC_INLINE +#elif defined(_MSC_VER) + #define LTC_INLINE __inline +#else + #define LTC_INLINE inline +#endif + /* type of argument checking, 0=default, 1=fatal and 2=error+continue, 3=nothing */ #ifndef ARGTYPE #define ARGTYPE 0 #endif -/* Controls endianess and size of registers. Leave uncommented to get platform neutral [slower] code - * +#undef LTC_ENCRYPT +#define LTC_ENCRYPT 0 +#undef LTC_DECRYPT +#define LTC_DECRYPT 1 + +/* Controls endianess and size of registers. Leave uncommented to get platform neutral [slower] code + * * Note: in order to use the optimized macros your platform must support unaligned 32 and 64 bit read/writes. * The x86 platforms allow this but some others [ARM for instance] do not. On those platforms you **MUST** * use the portable [slower] macros. */ - -/* detect x86-32 machines somewhat */ -#if !defined(__STRICT_ANSI__) && (defined(INTEL_CC) || (defined(_MSC_VER) && defined(WIN32)) || (defined(__GNUC__) && (defined(__DJGPP__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__i386__)))) +/* detect x86/i386 32bit */ +#if defined(__i386__) || defined(__i386) || defined(_M_IX86) #define ENDIAN_LITTLE #define ENDIAN_32BITWORD #define LTC_FAST - #define LTC_FAST_TYPE unsigned long +#endif + +/* detect amd64/x64 */ +#if defined(__x86_64__) || defined(_M_X64) || defined(_M_AMD64) + #define ENDIAN_LITTLE + #define ENDIAN_64BITWORD + #define LTC_FAST +#endif + +/* detect PPC32 */ +#if defined(LTC_PPC32) + #define ENDIAN_BIG + #define ENDIAN_32BITWORD + #define LTC_FAST #endif /* detects MIPS R5900 processors (PS2) */ #if (defined(__R5900) || defined(R5900) || defined(__R5900__)) && (defined(_mips) || defined(__mips__) || defined(mips)) - #define ENDIAN_LITTLE #define ENDIAN_64BITWORD + #if defined(_MIPSEB) || defined(__MIPSEB) || defined(__MIPSEB__) + #define ENDIAN_BIG + #endif + #define ENDIAN_LITTLE + #endif #endif -/* detect amd64 */ -#if !defined(__STRICT_ANSI__) && defined(__x86_64__) - #define ENDIAN_LITTLE - #define ENDIAN_64BITWORD - #define LTC_FAST - #define LTC_FAST_TYPE unsigned long +/* detect AIX */ +#if defined(_AIX) && defined(_BIG_ENDIAN) + #define ENDIAN_BIG + #if defined(__LP64__) || defined(_ARCH_PPC64) + #define ENDIAN_64BITWORD + #else + #define ENDIAN_32BITWORD + #endif +#endif + +/* detect HP-UX */ +#if defined(__hpux) || defined(__hpux__) + #define ENDIAN_BIG + #if defined(__ia64) || defined(__ia64__) || defined(__LP64__) + #define ENDIAN_64BITWORD + #else + #define ENDIAN_32BITWORD + #endif #endif -/* detect PPC32 */ -#if !defined(__STRICT_ANSI__) && defined(LTC_PPC32) - #define ENDIAN_BIG - #define ENDIAN_32BITWORD - #define LTC_FAST - #define LTC_FAST_TYPE unsigned long -#endif +/* detect Apple OS X */ +#if defined(__APPLE__) && defined(__MACH__) + #if defined(__LITTLE_ENDIAN__) || defined(__x86_64__) + #define ENDIAN_LITTLE + #else + #define ENDIAN_BIG + #endif + #if defined(__LP64__) || defined(__x86_64__) + #define ENDIAN_64BITWORD + #else + #define ENDIAN_32BITWORD + #endif +#endif -/* detect sparc and sparc64 */ -#if defined(__sparc__) +/* detect SPARC and SPARC64 */ +#if defined(__sparc__) || defined(__sparc) #define ENDIAN_BIG - #if defined(__arch64__) + #if defined(__arch64__) || defined(__sparcv9) || defined(__sparc_v9__) + #define ENDIAN_64BITWORD + #else + #define ENDIAN_32BITWORD + #endif +#endif + +/* detect IBM S390(x) */ +#if defined(__s390x__) || defined(__s390__) + #define ENDIAN_BIG + #if defined(__s390x__) #define ENDIAN_64BITWORD #else #define ENDIAN_32BITWORD #endif #endif +/* detect PPC64 */ +#if defined(__powerpc64__) || defined(__ppc64__) || defined(__PPC64__) + #define ENDIAN_64BITWORD + #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + #define ENDIAN_BIG + #elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + #define ENDIAN_LITTLE + #endif + #define LTC_FAST +#endif -#ifdef LTC_NO_FAST - #ifdef LTC_FAST - #undef LTC_FAST +/* endianness fallback */ +#if !defined(ENDIAN_BIG) && !defined(ENDIAN_LITTLE) + #if defined(_BYTE_ORDER) && _BYTE_ORDER == _BIG_ENDIAN || \ + defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN || \ + defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ || \ + defined(__BIG_ENDIAN__) || \ + defined(__ARMEB__) || defined(__THUMBEB__) || defined(__AARCH64EB__) || \ + defined(_MIPSEB) || defined(__MIPSEB) || defined(__MIPSEB__) + #define ENDIAN_BIG + #elif defined(_BYTE_ORDER) && _BYTE_ORDER == _LITTLE_ENDIAN || \ + defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN || \ + defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ || \ + defined(__LITTLE_ENDIAN__) || \ + defined(__ARMEL__) || defined(__THUMBEL__) || defined(__AARCH64EL__) || \ + defined(_MIPSEL) || defined(__MIPSEL) || defined(__MIPSEL__) + #define ENDIAN_LITTLE + #else + #error Cannot detect endianness + #endif +#endif + +/* ulong64: 64-bit data type */ +#ifdef _MSC_VER + #define CONST64(n) n ## ui64 + typedef unsigned __int64 ulong64; +#else + #define CONST64(n) n ## ULL + typedef unsigned long long ulong64; +#endif + +/* ulong32: "32-bit at least" data type */ +#if defined(__x86_64__) || defined(_M_X64) || defined(_M_AMD64) || \ + defined(__powerpc64__) || defined(__ppc64__) || defined(__PPC64__) || \ + defined(__s390x__) || defined(__arch64__) || defined(__aarch64__) || \ + defined(__sparcv9) || defined(__sparc_v9__) || defined(__sparc64__) || \ + defined(__ia64) || defined(__ia64__) || defined(__itanium__) || defined(_M_IA64) || \ + defined(__LP64__) || defined(_LP64) || defined(__64BIT__) + typedef unsigned ulong32; + #if !defined(ENDIAN_64BITWORD) && !defined(ENDIAN_32BITWORD) + #define ENDIAN_64BITWORD #endif +#else + typedef unsigned long ulong32; + #if !defined(ENDIAN_64BITWORD) && !defined(ENDIAN_32BITWORD) + #define ENDIAN_32BITWORD + #endif +#endif + +#if defined(ENDIAN_64BITWORD) && !defined(_MSC_VER) +typedef unsigned long long ltc_mp_digit; +#else +typedef unsigned long ltc_mp_digit; #endif /* No asm is a quick way to disable anything "not portable" */ #ifdef LTC_NO_ASM - #undef ENDIAN_LITTLE - #undef ENDIAN_BIG + #define ENDIAN_NEUTRAL #undef ENDIAN_32BITWORD #undef ENDIAN_64BITWORD #undef LTC_FAST - #undef LTC_FAST_TYPE #define LTC_NO_ROLC - #define LTC_NO_BSWAP + #define LTC_NO_BSWAP +#endif + +/* No LTC_FAST if: explicitly disabled OR non-gcc/non-clang compiler OR old gcc OR using -ansi -std=c99 */ +#if defined(LTC_NO_FAST) || (__GNUC__ < 4) || defined(__STRICT_ANSI__) + #undef LTC_FAST #endif -/* #define ENDIAN_LITTLE */ -/* #define ENDIAN_BIG */ +#ifdef LTC_FAST + #define LTC_FAST_TYPE_PTR_CAST(x) ((LTC_FAST_TYPE*)(void*)(x)) + #ifdef ENDIAN_64BITWORD + typedef ulong64 __attribute__((__may_alias__)) LTC_FAST_TYPE; + #else + typedef ulong32 __attribute__((__may_alias__)) LTC_FAST_TYPE; + #endif +#endif -/* #define ENDIAN_32BITWORD */ -/* #define ENDIAN_64BITWORD */ - -#if (defined(ENDIAN_BIG) || defined(ENDIAN_LITTLE)) && !(defined(ENDIAN_32BITWORD) || defined(ENDIAN_64BITWORD)) - #error You must specify a word size as well as endianess in tomcrypt_cfg.h +#if !defined(ENDIAN_NEUTRAL) && (defined(ENDIAN_BIG) || defined(ENDIAN_LITTLE)) && !(defined(ENDIAN_32BITWORD) || defined(ENDIAN_64BITWORD)) + #error You must specify a word size as well as endianess in tomcrypt_cfg.h #endif #if !(defined(ENDIAN_BIG) || defined(ENDIAN_LITTLE)) #define ENDIAN_NEUTRAL #endif +#if (defined(ENDIAN_32BITWORD) && defined(ENDIAN_64BITWORD)) + #error Cannot be 32 and 64 bit words... +#endif + +/* gcc 4.3 and up has a bswap builtin; detect it by gcc version. + * clang also supports the bswap builtin, and although clang pretends + * to be gcc (macro-wise, anyway), clang pretends to be a version + * prior to gcc 4.3, so we can't detect bswap that way. Instead, + * clang has a __has_builtin mechanism that can be used to check + * for builtins: + * http://clang.llvm.org/docs/LanguageExtensions.html#feature_check */ +#ifndef __has_builtin + #define __has_builtin(x) 0 +#endif +#if !defined(LTC_NO_BSWAP) && defined(__GNUC__) && \ + ((__GNUC__ * 100 + __GNUC_MINOR__ >= 403) || \ + (__has_builtin(__builtin_bswap32) && __has_builtin(__builtin_bswap64))) + #define LTC_HAVE_BSWAP_BUILTIN #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/headers/tomcrypt_cipher.h --- a/libtomcrypt/src/headers/tomcrypt_cipher.h Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/headers/tomcrypt_cipher.h Fri Feb 09 21:44:05 2018 +0800 @@ -1,6 +1,15 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + /* ---- SYMMETRIC KEY STUFF ----- * - * We put each of the ciphers scheduled keys in their own structs then we put all of + * We put each of the ciphers scheduled keys in their own structs then we put all of * the key formats in one union. This makes the function prototypes easier to use. */ #ifdef LTC_BLOWFISH @@ -109,7 +118,7 @@ }; #endif -#ifdef LTC_SKIPJACK +#ifdef LTC_SKIPJACK struct skipjack_key { unsigned char key[10]; }; @@ -117,18 +126,18 @@ #ifdef LTC_KHAZAD struct khazad_key { - ulong64 roundKeyEnc[8 + 1]; - ulong64 roundKeyDec[8 + 1]; + ulong64 roundKeyEnc[8 + 1]; + ulong64 roundKeyDec[8 + 1]; }; #endif #ifdef LTC_ANUBIS -struct anubis_key { - int keyBits; - int R; - ulong32 roundKeyEnc[18 + 1][4]; - ulong32 roundKeyDec[18 + 1][4]; -}; +struct anubis_key { + int keyBits; + int R; + ulong32 roundKeyEnc[18 + 1][4]; + ulong32 roundKeyDec[18 + 1][4]; +}; #endif #ifdef LTC_MULTI2 @@ -138,6 +147,13 @@ }; #endif +#ifdef LTC_CAMELLIA +struct camellia_key { + int R; + ulong64 kw[4], k[24], kl[6]; +}; +#endif + typedef union Symmetric_key { #ifdef LTC_DES struct des_key des; @@ -175,7 +191,7 @@ #endif #ifdef LTC_NOEKEON struct noekeon_key noekeon; -#endif +#endif #ifdef LTC_SKIPJACK struct skipjack_key skipjack; #endif @@ -190,10 +206,13 @@ #endif #ifdef LTC_KASUMI struct kasumi_key kasumi; -#endif +#endif #ifdef LTC_MULTI2 struct multi2_key multi2; #endif +#ifdef LTC_CAMELLIA + struct camellia_key camellia; +#endif void *data; } symmetric_key; @@ -201,10 +220,10 @@ /** A block cipher ECB structure */ typedef struct { /** The index of the cipher chosen */ - int cipher, + int cipher, /** The block size of the given cipher */ blocklen; - /** The scheduled key */ + /** The scheduled key */ symmetric_key key; } symmetric_ECB; #endif @@ -213,14 +232,14 @@ /** A block cipher CFB structure */ typedef struct { /** The index of the cipher chosen */ - int cipher, - /** The block size of the given cipher */ - blocklen, + int cipher, + /** The block size of the given cipher */ + blocklen, /** The padding offset */ padlen; /** The current IV */ - unsigned char IV[MAXBLOCKSIZE], - /** The pad used to encrypt/decrypt */ + unsigned char IV[MAXBLOCKSIZE], + /** The pad used to encrypt/decrypt */ pad[MAXBLOCKSIZE]; /** The scheduled key */ symmetric_key key; @@ -231,9 +250,9 @@ /** A block cipher OFB structure */ typedef struct { /** The index of the cipher chosen */ - int cipher, - /** The block size of the given cipher */ - blocklen, + int cipher, + /** The block size of the given cipher */ + blocklen, /** The padding offset */ padlen; /** The current IV */ @@ -247,8 +266,8 @@ /** A block cipher CBC structure */ typedef struct { /** The index of the cipher chosen */ - int cipher, - /** The block size of the given cipher */ + int cipher, + /** The block size of the given cipher */ blocklen; /** The current IV */ unsigned char IV[MAXBLOCKSIZE]; @@ -263,18 +282,18 @@ typedef struct { /** The index of the cipher chosen */ int cipher, - /** The block size of the given cipher */ - blocklen, + /** The block size of the given cipher */ + blocklen, /** The padding offset */ - padlen, + padlen, /** The mode (endianess) of the CTR, 0==little, 1==big */ mode, /** counter width */ ctrlen; - /** The counter */ - unsigned char ctr[MAXBLOCKSIZE], - /** The pad used to encrypt/decrypt */ + /** The counter */ + unsigned char ctr[MAXBLOCKSIZE], + /** The pad used to encrypt/decrypt */ pad[MAXBLOCKSIZE]; /** The scheduled key */ symmetric_key key; @@ -290,7 +309,7 @@ /** The current IV */ unsigned char IV[16], - + /** the tweak key */ tweak[16], @@ -300,7 +319,7 @@ /** The scheduled symmetric key */ symmetric_key key; -#ifdef LRW_TABLES +#ifdef LTC_LRW_TABLES /** The pre-computed multiplication table */ unsigned char PC[16][256][16]; #endif @@ -311,9 +330,9 @@ /** A block cipher F8 structure */ typedef struct { /** The index of the cipher chosen */ - int cipher, - /** The block size of the given cipher */ - blocklen, + int cipher, + /** The block size of the given cipher */ + blocklen, /** The padding offset */ padlen; /** The current IV */ @@ -330,18 +349,18 @@ /** cipher descriptor table, last entry has "name == NULL" to mark the end of table */ extern struct ltc_cipher_descriptor { /** name of cipher */ - char *name; + const char *name; /** internal ID */ unsigned char ID; /** min keysize (octets) */ - int min_key_length, + int min_key_length, /** max keysize (octets) */ - max_key_length, + max_key_length, /** block size (octets) */ - block_length, + block_length, /** default number of rounds */ default_rounds; - /** Setup the cipher + /** Setup the cipher @param key The input symmetric key @param keylen The length of the input key (octets) @param num_rounds The requested number of rounds (0==default) @@ -368,10 +387,10 @@ */ int (*test)(void); - /** Terminate the context + /** Terminate the context @param skey The scheduled key */ - void (*done)(symmetric_key *skey); + void (*done)(symmetric_key *skey); /** Determine a key size @param keysize [in/out] The size of the key desired and the suggested size @@ -380,7 +399,7 @@ int (*keysize)(int *keysize); /** Accelerators **/ - /** Accelerated ECB encryption + /** Accelerated ECB encryption @param pt Plaintext @param ct Ciphertext @param blocks The number of complete blocks to process @@ -389,7 +408,7 @@ */ int (*accel_ecb_encrypt)(const unsigned char *pt, unsigned char *ct, unsigned long blocks, symmetric_key *skey); - /** Accelerated ECB decryption + /** Accelerated ECB decryption @param pt Plaintext @param ct Ciphertext @param blocks The number of complete blocks to process @@ -398,7 +417,7 @@ */ int (*accel_ecb_decrypt)(const unsigned char *ct, unsigned char *pt, unsigned long blocks, symmetric_key *skey); - /** Accelerated CBC encryption + /** Accelerated CBC encryption @param pt Plaintext @param ct Ciphertext @param blocks The number of complete blocks to process @@ -408,7 +427,7 @@ */ int (*accel_cbc_encrypt)(const unsigned char *pt, unsigned char *ct, unsigned long blocks, unsigned char *IV, symmetric_key *skey); - /** Accelerated CBC decryption + /** Accelerated CBC decryption @param pt Plaintext @param ct Ciphertext @param blocks The number of complete blocks to process @@ -418,7 +437,7 @@ */ int (*accel_cbc_decrypt)(const unsigned char *ct, unsigned char *pt, unsigned long blocks, unsigned char *IV, symmetric_key *skey); - /** Accelerated CTR encryption + /** Accelerated CTR encryption @param pt Plaintext @param ct Ciphertext @param blocks The number of complete blocks to process @@ -429,7 +448,7 @@ */ int (*accel_ctr_encrypt)(const unsigned char *pt, unsigned char *ct, unsigned long blocks, unsigned char *IV, int mode, symmetric_key *skey); - /** Accelerated LRW + /** Accelerated LRW @param pt Plaintext @param ct Ciphertext @param blocks The number of complete blocks to process @@ -440,7 +459,7 @@ */ int (*accel_lrw_encrypt)(const unsigned char *pt, unsigned char *ct, unsigned long blocks, unsigned char *IV, const unsigned char *tweak, symmetric_key *skey); - /** Accelerated LRW + /** Accelerated LRW @param ct Ciphertext @param pt Plaintext @param blocks The number of complete blocks to process @@ -480,8 +499,8 @@ /** Accelerated GCM packet (one shot) @param key The secret key @param keylen The length of the secret key - @param IV The initial vector - @param IVlen The length of the initial vector + @param IV The initialization vector + @param IVlen The length of the initialization vector @param adata The additional authentication data (header) @param adatalen The length of the adata @param pt The plaintext @@ -497,14 +516,14 @@ const unsigned char *IV, unsigned long IVlen, const unsigned char *adata, unsigned long adatalen, unsigned char *pt, unsigned long ptlen, - unsigned char *ct, + unsigned char *ct, unsigned char *tag, unsigned long *taglen, int direction); - /** Accelerated one shot LTC_OMAC + /** Accelerated one shot LTC_OMAC @param key The secret key - @param keylen The key length (octets) - @param in The message + @param keylen The key length (octets) + @param in The message @param inlen Length of message (octets) @param out [out] Destination for tag @param outlen [in/out] Initial and final size of out @@ -515,10 +534,10 @@ const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen); - /** Accelerated one shot XCBC + /** Accelerated one shot XCBC @param key The secret key - @param keylen The key length (octets) - @param in The message + @param keylen The key length (octets) + @param in The message @param inlen Length of message (octets) @param out [out] Destination for tag @param outlen [in/out] Initial and final size of out @@ -529,10 +548,10 @@ const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen); - /** Accelerated one shot F9 + /** Accelerated one shot F9 @param key The secret key - @param keylen The key length (octets) - @param in The message + @param keylen The key length (octets) + @param in The message @param inlen Length of message (octets) @param out [out] Destination for tag @param outlen [in/out] Initial and final size of out @@ -543,6 +562,36 @@ const unsigned char *key, unsigned long keylen, const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen); + + /** Accelerated XTS encryption + @param pt Plaintext + @param ct Ciphertext + @param blocks The number of complete blocks to process + @param tweak The 128-bit encryption tweak (input/output). + The tweak should not be encrypted on input, but + next tweak will be copied encrypted on output. + @param skey1 The first scheduled key context + @param skey2 The second scheduled key context + @return CRYPT_OK if successful + */ + int (*accel_xts_encrypt)(const unsigned char *pt, unsigned char *ct, + unsigned long blocks, unsigned char *tweak, symmetric_key *skey1, + symmetric_key *skey2); + + /** Accelerated XTS decryption + @param ct Ciphertext + @param pt Plaintext + @param blocks The number of complete blocks to process + @param tweak The 128-bit encryption tweak (input/output). + The tweak should not be encrypted on input, but + next tweak will be copied encrypted on output. + @param skey1 The first scheduled key context + @param skey2 The second scheduled key context + @return CRYPT_OK if successful + */ + int (*accel_xts_decrypt)(const unsigned char *ct, unsigned char *pt, + unsigned long blocks, unsigned char *tweak, symmetric_key *skey1, + symmetric_key *skey2); } cipher_descriptor[]; #ifdef LTC_BLOWFISH @@ -577,6 +626,7 @@ #ifdef LTC_RC2 int rc2_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey); +int rc2_setup_ex(const unsigned char *key, int keylen, int bits, int num_rounds, symmetric_key *skey); int rc2_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *skey); int rc2_ecb_decrypt(const unsigned char *ct, unsigned char *pt, symmetric_key *skey); int rc2_test(void); @@ -756,8 +806,18 @@ extern const struct ltc_cipher_descriptor multi2_desc; #endif +#ifdef LTC_CAMELLIA +int camellia_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey); +int camellia_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *skey); +int camellia_ecb_decrypt(const unsigned char *ct, unsigned char *pt, symmetric_key *skey); +int camellia_test(void); +void camellia_done(symmetric_key *skey); +int camellia_keysize(int *keysize); +extern const struct ltc_cipher_descriptor camellia_desc; +#endif + #ifdef LTC_ECB_MODE -int ecb_start(int cipher, const unsigned char *key, +int ecb_start(int cipher, const unsigned char *key, int keylen, int num_rounds, symmetric_ECB *ecb); int ecb_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, symmetric_ECB *ecb); int ecb_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_ECB *ecb); @@ -765,7 +825,7 @@ #endif #ifdef LTC_CFB_MODE -int cfb_start(int cipher, const unsigned char *IV, const unsigned char *key, +int cfb_start(int cipher, const unsigned char *IV, const unsigned char *key, int keylen, int num_rounds, symmetric_CFB *cfb); int cfb_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, symmetric_CFB *cfb); int cfb_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_CFB *cfb); @@ -775,7 +835,7 @@ #endif #ifdef LTC_OFB_MODE -int ofb_start(int cipher, const unsigned char *IV, const unsigned char *key, +int ofb_start(int cipher, const unsigned char *IV, const unsigned char *key, int keylen, int num_rounds, symmetric_OFB *ofb); int ofb_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, symmetric_OFB *ofb); int ofb_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_OFB *ofb); @@ -815,14 +875,14 @@ #ifdef LTC_LRW_MODE -#define LRW_ENCRYPT 0 -#define LRW_DECRYPT 1 +#define LRW_ENCRYPT LTC_ENCRYPT +#define LRW_DECRYPT LTC_DECRYPT int lrw_start( int cipher, const unsigned char *IV, const unsigned char *key, int keylen, const unsigned char *tweak, - int num_rounds, + int num_rounds, symmetric_LRW *lrw); int lrw_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, symmetric_LRW *lrw); int lrw_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_LRW *lrw); @@ -833,11 +893,11 @@ /* don't call */ int lrw_process(const unsigned char *pt, unsigned char *ct, unsigned long len, int mode, symmetric_LRW *lrw); -#endif +#endif #ifdef LTC_F8_MODE -int f8_start( int cipher, const unsigned char *IV, - const unsigned char *key, int keylen, +int f8_start( int cipher, const unsigned char *IV, + const unsigned char *key, int keylen, const unsigned char *salt_key, int skeylen, int num_rounds, symmetric_F8 *f8); int f8_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, symmetric_F8 *f8); @@ -855,21 +915,21 @@ } symmetric_xts; int xts_start( int cipher, - const unsigned char *key1, - const unsigned char *key2, + const unsigned char *key1, + const unsigned char *key2, unsigned long keylen, - int num_rounds, + int num_rounds, symmetric_xts *xts); int xts_encrypt( const unsigned char *pt, unsigned long ptlen, unsigned char *ct, - const unsigned char *tweak, + unsigned char *tweak, symmetric_xts *xts); int xts_decrypt( const unsigned char *ct, unsigned long ptlen, unsigned char *pt, - const unsigned char *tweak, + unsigned char *tweak, symmetric_xts *xts); void xts_done(symmetric_xts *xts); @@ -882,10 +942,67 @@ int find_cipher_id(unsigned char ID); int register_cipher(const struct ltc_cipher_descriptor *cipher); int unregister_cipher(const struct ltc_cipher_descriptor *cipher); +int register_all_ciphers(void); int cipher_is_valid(int idx); LTC_MUTEX_PROTO(ltc_cipher_mutex) -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ---- stream ciphers ---- */ + +#ifdef LTC_CHACHA + +typedef struct { + ulong32 input[16]; + unsigned char kstream[64]; + unsigned long ksleft; + unsigned long ivlen; + int rounds; +} chacha_state; + +int chacha_setup(chacha_state *st, const unsigned char *key, unsigned long keylen, int rounds); +int chacha_ivctr32(chacha_state *st, const unsigned char *iv, unsigned long ivlen, ulong32 counter); +int chacha_ivctr64(chacha_state *st, const unsigned char *iv, unsigned long ivlen, ulong64 counter); +int chacha_crypt(chacha_state *st, const unsigned char *in, unsigned long inlen, unsigned char *out); +int chacha_keystream(chacha_state *st, unsigned char *out, unsigned long outlen); +int chacha_done(chacha_state *st); +int chacha_test(void); + +#endif /* LTC_CHACHA */ + +#ifdef LTC_RC4_STREAM + +typedef struct { + unsigned int x, y; + unsigned char buf[256]; +} rc4_state; + +int rc4_stream_setup(rc4_state *st, const unsigned char *key, unsigned long keylen); +int rc4_stream_crypt(rc4_state *st, const unsigned char *in, unsigned long inlen, unsigned char *out); +int rc4_stream_keystream(rc4_state *st, unsigned char *out, unsigned long outlen); +int rc4_stream_done(rc4_state *st); +int rc4_stream_test(void); + +#endif /* LTC_RC4_STREAM */ + +#ifdef LTC_SOBER128_STREAM + +typedef struct { + ulong32 R[17], /* Working storage for the shift register */ + initR[17], /* saved register contents */ + konst, /* key dependent constant */ + sbuf; /* partial word encryption buffer */ + int nbuf; /* number of part-word stream bits buffered */ +} sober128_state; + +int sober128_stream_setup(sober128_state *st, const unsigned char *key, unsigned long keylen); +int sober128_stream_setiv(sober128_state *st, const unsigned char *iv, unsigned long ivlen); +int sober128_stream_crypt(sober128_state *st, const unsigned char *in, unsigned long inlen, unsigned char *out); +int sober128_stream_keystream(sober128_state *st, unsigned char *out, unsigned long outlen); +int sober128_stream_done(sober128_state *st); +int sober128_stream_test(void); + +#endif /* LTC_SOBER128_STREAM */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/headers/tomcrypt_custom.h --- a/libtomcrypt/src/headers/tomcrypt_custom.h Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/headers/tomcrypt_custom.h Fri Feb 09 21:44:05 2018 +0800 @@ -1,91 +1,152 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + #ifndef TOMCRYPT_CUSTOM_H_ #define TOMCRYPT_CUSTOM_H_ -/* compile options depend on Dropbear options.h */ -#include "options.h" - /* macros for various libc functions you can change for embedded targets */ #ifndef XMALLOC - #ifdef malloc - #define LTC_NO_PROTOTYPES - #endif #define XMALLOC malloc #endif #ifndef XREALLOC - #ifdef realloc - #define LTC_NO_PROTOTYPES - #endif #define XREALLOC realloc #endif #ifndef XCALLOC - #ifdef calloc - #define LTC_NO_PROTOTYPES - #endif #define XCALLOC calloc #endif #ifndef XFREE - #ifdef free - #define LTC_NO_PROTOTYPES - #endif #define XFREE free #endif #ifndef XMEMSET - #ifdef memset - #define LTC_NO_PROTOTYPES - #endif #define XMEMSET memset #endif #ifndef XMEMCPY - #ifdef memcpy - #define LTC_NO_PROTOTYPES - #endif #define XMEMCPY memcpy #endif +#ifndef XMEMMOVE +#define XMEMMOVE memmove +#endif #ifndef XMEMCMP - #ifdef memcmp - #define LTC_NO_PROTOTYPES - #endif #define XMEMCMP memcmp #endif +/* A memory compare function that has to run in constant time, + * c.f. mem_neq() API summary. + */ +#ifndef XMEM_NEQ +#define XMEM_NEQ mem_neq +#endif #ifndef XSTRCMP - #ifdef strcmp - #define LTC_NO_PROTOTYPES - #endif #define XSTRCMP strcmp #endif #ifndef XCLOCK #define XCLOCK clock #endif -#ifndef XCLOCKS_PER_SEC -#define XCLOCKS_PER_SEC CLOCKS_PER_SEC -#endif - #define LTC_NO_PRNGS - #define LTC_NO_PK -#ifdef DROPBEAR_SMALL_CODE -#define LTC_SMALL_CODE -#endif -/* These spit out warnings etc */ -#define LTC_NO_ROLC #ifndef XQSORT - #ifdef qsort - #define LTC_NO_PROTOTYPES - #endif #define XQSORT qsort #endif +#if ( defined(malloc) || defined(realloc) || defined(calloc) || defined(free) || \ + defined(memset) || defined(memcpy) || defined(memcmp) || defined(strcmp) || \ + defined(clock) || defined(qsort) ) && !defined(LTC_NO_PROTOTYPES) +#define LTC_NO_PROTOTYPES +#endif + +/* shortcut to disable automatic inclusion */ +#if defined LTC_NOTHING && !defined LTC_EASY + #define LTC_NO_CIPHERS + #define LTC_NO_MODES + #define LTC_NO_HASHES + #define LTC_NO_MACS + #define LTC_NO_PRNGS + #define LTC_NO_PK + #define LTC_NO_PKCS + #define LTC_NO_MISC +#endif /* LTC_NOTHING */ + +/* Easy button? */ +#ifdef LTC_EASY + #define LTC_NO_CIPHERS + #define LTC_RIJNDAEL + #define LTC_BLOWFISH + #define LTC_DES + #define LTC_CAST5 + + #define LTC_NO_MODES + #define LTC_ECB_MODE + #define LTC_CBC_MODE + #define LTC_CTR_MODE + + #define LTC_NO_HASHES + #define LTC_SHA1 + #define LTC_SHA3 + #define LTC_SHA512 + #define LTC_SHA384 + #define LTC_SHA256 + #define LTC_SHA224 + #define LTC_HASH_HELPERS + + #define LTC_NO_MACS + #define LTC_HMAC + #define LTC_OMAC + #define LTC_CCM_MODE + + #define LTC_NO_PRNGS + #define LTC_SPRNG + #define LTC_YARROW + #define LTC_DEVRANDOM + #define LTC_TRY_URANDOM_FIRST + #define LTC_RNG_GET_BYTES + #define LTC_RNG_MAKE_PRNG + + #define LTC_NO_PK + #define LTC_MRSA + #define LTC_MECC + + #define LTC_NO_MISC + #define LTC_BASE64 +#endif + +/* The minimal set of functionality to run the tests */ +#ifdef LTC_MINIMAL + #define LTC_RIJNDAEL + #define LTC_SHA256 + #define LTC_YARROW + #define LTC_CTR_MODE + + #define LTC_RNG_MAKE_PRNG + #define LTC_RNG_GET_BYTES + #define LTC_DEVRANDOM + #define LTC_TRY_URANDOM_FIRST + + #undef LTC_NO_FILE +#endif /* Enable self-test test vector checking */ -/* Not for dropbear */ -/*#define LTC_TEST*/ +#ifndef LTC_NO_TEST + #define LTC_TEST +#endif +/* Enable extended self-tests */ +/* #define LTC_TEST_EXT */ + +/* Use small code where possible */ +#if DROPBEAR_SMALL_CODE +#define LTC_SMALL_CODE +#endif /* clean the stack of functions which put private information on stack */ /* #define LTC_CLEAN_STACK */ /* disable all file related functions */ -#define LTC_NO_FILE +/* #define LTC_NO_FILE */ /* disable all forms of ASM */ /* #define LTC_NO_ASM */ @@ -96,93 +157,333 @@ /* disable BSWAP on x86 */ /* #define LTC_NO_BSWAP */ +/* ---> math provider? <--- */ +#ifndef LTC_NO_MATH -#ifdef DROPBEAR_BLOWFISH +/* LibTomMath */ +/* #define LTM_DESC */ + +/* TomsFastMath */ +/* #define TFM_DESC */ + +/* GNU Multiple Precision Arithmetic Library */ +/* #define GMP_DESC */ + +#endif /* LTC_NO_MATH */ + +/* ---> Symmetric Block Ciphers <--- */ +#ifndef LTC_NO_CIPHERS + +#if DROPBEAR_BLOWFISH #define LTC_BLOWFISH #endif - -#ifdef DROPBEAR_AES +#if DROPBEAR_AES #define LTC_RIJNDAEL #endif +/* _TABLES tells it to use tables during setup, _SMALL means to use the smaller scheduled key format + * (saves 4KB of ram), _ALL_TABLES enables all tables during setup */ +#if DROPBEAR_TWOFISH +#define LTC_TWOFISH +#define LTC_TWOFISH_SMALL +#endif -#ifdef DROPBEAR_TWOFISH -#define LTC_TWOFISH - -/* _TABLES tells it to use tables during setup, _SMALL means to use the smaller scheduled key format - * (saves 4KB of ram), _ALL_TABLES enables all tables during setup */ -/* enabling just TWOFISH_SMALL will make the binary ~1kB smaller, turning on - * TWOFISH_TABLES will make it a few kB bigger, but perhaps reduces runtime - * memory usage? */ -#define LTC_TWOFISH_SMALL -/*#define LTC_TWOFISH_TABLES*/ -#endif - -#ifdef DROPBEAR_3DES +#if DROPBEAR_3DES #define LTC_DES #endif +/* stream ciphers */ + +#endif /* LTC_NO_CIPHERS */ + + +/* ---> Block Cipher Modes of Operation <--- */ +#ifndef LTC_NO_MODES + +#if DROPBEAR_ENABLE_CTR_MODE #define LTC_CBC_MODE +#endif + +#if DROPBEAR_ENABLE_CTR_MODE +#define LTC_CTR_MODE +#endif -#ifdef DROPBEAR_ENABLE_CTR_MODE -#define LTC_CTR_MODE +#endif /* LTC_NO_MODES */ + +/* ---> One-Way Hash Functions <--- */ +#ifndef LTC_NO_HASHES + +#if DROPBEAR_SHA512 +#define LTC_SHA512 +#endif + +#if DROPBEAR_SHA384 +#define LTC_SHA384 +#endif + +#if DROPBEAR_SHA256 +#define LTC_SHA256 #endif #define LTC_SHA1 -#ifdef DROPBEAR_MD5 +#if DROPBEAR_MD5 #define LTC_MD5 #endif -#ifdef DROPBEAR_SHA256 -#define LTC_SHA256 -#endif -#ifdef DROPBEAR_SHA384 -#define LTC_SHA384 -#endif -#ifdef DROPBEAR_SHA512 -#define LTC_SHA512 -#endif +#endif /* LTC_NO_HASHES */ + + +/* ---> MAC functions <--- */ +#ifndef LTC_NO_MACS #define LTC_HMAC -#ifdef DROPBEAR_ECC +/* ---> Encrypt + Authenticate Modes <--- */ + +/* Use 64KiB tables */ +#ifndef LTC_NO_TABLES + #define LTC_GCM_TABLES +#endif + +/* USE SSE2? requires GCC works on x86_32 and x86_64*/ +#ifdef LTC_GCM_TABLES +/* #define LTC_GCM_TABLES_SSE2 */ +#endif + +#endif /* LTC_NO_MACS */ + + +/* --> Pseudo Random Number Generators <--- */ +#ifndef LTC_NO_PRNGS + +/* try /dev/urandom before trying /dev/random + * are you sure you want to disable this? http://www.2uo.de/myths-about-urandom/ */ +#define LTC_TRY_URANDOM_FIRST +/* rng_get_bytes() */ +#define LTC_RNG_GET_BYTES +/* rng_make_prng() */ +#define LTC_RNG_MAKE_PRNG + +/* enable the ltc_rng hook to integrate e.g. embedded hardware RNG's easily */ +/* #define LTC_PRNG_ENABLE_LTC_RNG */ + +#endif /* LTC_NO_PRNGS */ + +#ifdef LTC_YARROW + +/* which descriptor of AES to use? */ +/* 0 = rijndael_enc 1 = aes_enc, 2 = rijndael [full], 3 = aes [full] */ +#ifdef ENCRYPT_ONLY + #define LTC_YARROW_AES 0 +#else + #define LTC_YARROW_AES 2 +#endif + +#endif + +#ifdef LTC_FORTUNA + +#ifndef LTC_FORTUNA_WD +/* reseed every N calls to the read function */ +#define LTC_FORTUNA_WD 10 +#endif + +#ifndef LTC_FORTUNA_POOLS +/* number of pools (4..32) can save a bit of ram by lowering the count */ +#define LTC_FORTUNA_POOLS 0 +#endif + +#endif /* LTC_FORTUNA */ + + +/* ---> Public Key Crypto <--- */ +#ifndef LTC_NO_PK + +/* Include Katja (a Rabin variant like RSA) */ +/* #define LTC_MKAT */ + +/* ECC */ +#if DROPBEAR_ECC #define LTC_MECC +#define LTM_DESC + +/* use Shamir's trick for point mul (speeds up signature verification) */ #define LTC_ECC_SHAMIR -#define LTC_ECC_TIMING_RESISTANT -#define MPI -#define LTM_DESC -#ifdef DROPBEAR_ECC_256 + +#if DROPBEAR_ECC_256 #define ECC256 #endif -#ifdef DROPBEAR_ECC_384 +#if DROPBEAR_ECC_384 #define ECC384 #endif -#ifdef DROPBEAR_ECC_521 +#if DROPBEAR_ECC_521 #define ECC521 #endif + +#endif /* DROPBEAR_ECC */ + +#if defined(TFM_DESC) && defined(LTC_MECC) + #define LTC_MECC_ACCEL +#endif + +/* do we want fixed point ECC */ +/* #define LTC_MECC_FP */ + +#endif /* LTC_NO_PK */ + +#if defined(LTC_MRSA) && !defined(LTC_NO_RSA_BLINDING) +/* Enable RSA blinding when doing private key operations by default */ +#define LTC_RSA_BLINDING +#endif /* LTC_NO_RSA_BLINDING */ + +#if defined(LTC_MRSA) && !defined(LTC_NO_RSA_CRT_HARDENING) +/* Enable RSA CRT hardening when doing private key operations by default */ +#define LTC_RSA_CRT_HARDENING +#endif /* LTC_NO_RSA_CRT_HARDENING */ + +#if defined(LTC_MECC) && !defined(LTC_NO_ECC_TIMING_RESISTANT) +/* Enable ECC timing resistant version by default */ +#define LTC_ECC_TIMING_RESISTANT #endif +/* PKCS #1 (RSA) and #5 (Password Handling) stuff */ +#ifndef LTC_NO_PKCS + +#define LTC_PKCS_1 +#define LTC_PKCS_5 + +/* Include ASN.1 DER (required by DSA/RSA) */ +#define LTC_DER + +#endif /* LTC_NO_PKCS */ + +/* misc stuff */ +#ifndef LTC_NO_MISC + /* Various tidbits of modern neatoness */ #define LTC_BASE64 -/* default no pthread functions */ +/* Keep LTC_NO_HKDF for compatibility reasons + * superseeded by LTC_NO_MISC*/ +#ifndef LTC_NO_HKDF +/* HKDF Key Derivation/Expansion stuff */ +#define LTC_HKDF +#endif /* LTC_NO_HKDF */ + +#define LTC_ADLER32 + +#define LTC_CRC32 + +#endif /* LTC_NO_MISC */ + +/* cleanup */ + +#if defined(LTC_MECC) || defined(LTC_MRSA) || defined(LTC_MDSA) || defined(LTC_MKAT) + /* Include the MPI functionality? (required by the PK algorithms) */ + #define LTC_MPI + + #ifndef LTC_PK_MAX_RETRIES + /* iterations limit for retry-loops */ + #define LTC_PK_MAX_RETRIES 20 + #endif +#endif + +#ifdef LTC_MRSA + #define LTC_PKCS_1 +#endif + +#if defined(LTC_PELICAN) && !defined(LTC_RIJNDAEL) + #error Pelican-MAC requires LTC_RIJNDAEL +#endif + +#if defined(LTC_EAX_MODE) && !(defined(LTC_CTR_MODE) && defined(LTC_OMAC)) + #error LTC_EAX_MODE requires CTR and LTC_OMAC mode +#endif + +#if defined(LTC_YARROW) && !defined(LTC_CTR_MODE) + #error LTC_YARROW requires LTC_CTR_MODE chaining mode to be defined! +#endif + +#if defined(LTC_DER) && !defined(LTC_MPI) + #error ASN.1 DER requires MPI functionality +#endif + +#if (defined(LTC_MDSA) || defined(LTC_MRSA) || defined(LTC_MECC) || defined(LTC_MKAT)) && !defined(LTC_DER) + #error PK requires ASN.1 DER functionality, make sure LTC_DER is enabled +#endif + +#if defined(LTC_CHACHA20POLY1305_MODE) && (!defined(LTC_CHACHA) || !defined(LTC_POLY1305)) + #error LTC_CHACHA20POLY1305_MODE requires LTC_CHACHA + LTC_POLY1305 +#endif + +#if defined(LTC_CHACHA20_PRNG) && !defined(LTC_CHACHA) + #error LTC_CHACHA20_PRNG requires LTC_CHACHA +#endif + +#if defined(LTC_RC4) && !defined(LTC_RC4_STREAM) + #error LTC_RC4 requires LTC_RC4_STREAM +#endif + +#if defined(LTC_SOBER128) && !defined(LTC_SOBER128_STREAM) + #error LTC_SOBER128 requires LTC_SOBER128_STREAM +#endif + +#if defined(LTC_BLAKE2SMAC) && !defined(LTC_BLAKE2S) + #error LTC_BLAKE2SMAC requires LTC_BLAKE2S +#endif + +#if defined(LTC_BLAKE2BMAC) && !defined(LTC_BLAKE2B) + #error LTC_BLAKE2BMAC requires LTC_BLAKE2B +#endif + +#if defined(LTC_SPRNG) && !defined(LTC_RNG_GET_BYTES) + #error LTC_SPRNG requires LTC_RNG_GET_BYTES +#endif + +#if defined(LTC_NO_MATH) && (defined(LTM_DESC) || defined(TFM_DESC) || defined(GMP_DESC)) + #error LTC_NO_MATH defined, but also a math descriptor +#endif + +/* THREAD management */ +#ifdef LTC_PTHREAD + +#include + +#define LTC_MUTEX_GLOBAL(x) pthread_mutex_t x = PTHREAD_MUTEX_INITIALIZER; +#define LTC_MUTEX_PROTO(x) extern pthread_mutex_t x; +#define LTC_MUTEX_TYPE(x) pthread_mutex_t x; +#define LTC_MUTEX_INIT(x) LTC_ARGCHK(pthread_mutex_init(x, NULL) == 0); +#define LTC_MUTEX_LOCK(x) LTC_ARGCHK(pthread_mutex_lock(x) == 0); +#define LTC_MUTEX_UNLOCK(x) LTC_ARGCHK(pthread_mutex_unlock(x) == 0); +#define LTC_MUTEX_DESTROY(x) LTC_ARGCHK(pthread_mutex_destroy(x) == 0); + +#else + +/* default no functions */ #define LTC_MUTEX_GLOBAL(x) #define LTC_MUTEX_PROTO(x) #define LTC_MUTEX_TYPE(x) #define LTC_MUTEX_INIT(x) #define LTC_MUTEX_LOCK(x) #define LTC_MUTEX_UNLOCK(x) -#define FORTUNA_POOLS 0 +#define LTC_MUTEX_DESTROY(x) + +#endif /* Debuggers */ -/* define this if you use Valgrind, note: it CHANGES the way SOBER-128 and LTC_RC4 work (see the code) */ +/* define this if you use Valgrind, note: it CHANGES the way SOBER-128 and RC4 work (see the code) */ /* #define LTC_VALGRIND */ #endif - +#ifndef LTC_NO_FILE + /* buffer size for reading from a file via fread(..) */ + #ifndef LTC_FILE_READ_BUFSIZE + #define LTC_FILE_READ_BUFSIZE 8192 + #endif +#endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/headers/tomcrypt_hash.h --- a/libtomcrypt/src/headers/tomcrypt_hash.h Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/headers/tomcrypt_hash.h Fri Feb 09 21:44:05 2018 +0800 @@ -1,4 +1,25 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + /* ---- HASH FUNCTIONS ---- */ +#ifdef LTC_SHA3 +struct sha3_state { + ulong64 saved; /* the portion of the input message that we didn't consume yet */ + ulong64 s[25]; + unsigned char sb[25 * 8]; /* used for storing `ulong64 s[25]` as little-endian bytes */ + unsigned short byte_index; /* 0..7--the next byte after the set one (starts from 0; 0--none are buffered) */ + unsigned short word_index; /* 0..24--the next word to integrate input (starts from 0) */ + unsigned short capacity_words; /* the double size of the hash output in words (e.g. 16 for Keccak 512) */ + unsigned short xof_flag; +}; +#endif + #ifdef LTC_SHA512 struct sha512_state { ulong64 length, state[8]; @@ -102,6 +123,30 @@ }; #endif +#ifdef LTC_BLAKE2S +struct blake2s_state { + ulong32 h[8]; + ulong32 t[2]; + ulong32 f[2]; + unsigned char buf[64]; + unsigned long curlen; + unsigned long outlen; + unsigned char last_node; +}; +#endif + +#ifdef LTC_BLAKE2B +struct blake2b_state { + ulong64 h[8]; + ulong64 t[2]; + ulong64 f[2]; + unsigned char buf[128]; + unsigned long curlen; + unsigned long outlen; + unsigned char last_node; +}; +#endif + typedef union Hash_state { char dummy[1]; #ifdef LTC_CHC_HASH @@ -110,6 +155,9 @@ #ifdef LTC_WHIRLPOOL struct whirlpool_state whirlpool; #endif +#ifdef LTC_SHA3 + struct sha3_state sha3; +#endif #ifdef LTC_SHA512 struct sha512_state sha512; #endif @@ -143,13 +191,20 @@ #ifdef LTC_RIPEMD320 struct rmd320_state rmd320; #endif +#ifdef LTC_BLAKE2S + struct blake2s_state blake2s; +#endif +#ifdef LTC_BLAKE2B + struct blake2b_state blake2b; +#endif + void *data; } hash_state; /** hash descriptor */ extern struct ltc_hash_descriptor { /** name of hash */ - char *name; + const char *name; /** internal ID */ unsigned char ID; /** Size of digest in octets */ @@ -166,7 +221,7 @@ @return CRYPT_OK if successful */ int (*init)(hash_state *hash); - /** Process a block of data + /** Process a block of data @param hash The hash state @param in The data to hash @param inlen The length of the data (octets) @@ -186,7 +241,7 @@ /* accelerated hmac callback: if you need to-do multiple packets just use the generic hmac_memory and provide a hash callback */ int (*hmac_block)(const unsigned char *key, unsigned long keylen, - const unsigned char *in, unsigned long inlen, + const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen); } hash_descriptor[]; @@ -208,6 +263,30 @@ extern const struct ltc_hash_descriptor whirlpool_desc; #endif +#ifdef LTC_SHA3 +int sha3_512_init(hash_state * md); +int sha3_512_test(void); +extern const struct ltc_hash_descriptor sha3_512_desc; +int sha3_384_init(hash_state * md); +int sha3_384_test(void); +extern const struct ltc_hash_descriptor sha3_384_desc; +int sha3_256_init(hash_state * md); +int sha3_256_test(void); +extern const struct ltc_hash_descriptor sha3_256_desc; +int sha3_224_init(hash_state * md); +int sha3_224_test(void); +extern const struct ltc_hash_descriptor sha3_224_desc; +/* process + done are the same for all variants */ +int sha3_process(hash_state * md, const unsigned char *in, unsigned long inlen); +int sha3_done(hash_state *md, unsigned char *hash); +/* SHAKE128 + SHAKE256 */ +int sha3_shake_init(hash_state *md, int num); +#define sha3_shake_process(a,b,c) sha3_process(a,b,c) +int sha3_shake_done(hash_state *md, unsigned char *out, unsigned long outlen); +int sha3_shake_test(void); +int sha3_shake_memory(int num, const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen); +#endif + #ifdef LTC_SHA512 int sha512_init(hash_state * md); int sha512_process(hash_state * md, const unsigned char *in, unsigned long inlen); @@ -227,6 +306,28 @@ extern const struct ltc_hash_descriptor sha384_desc; #endif +#ifdef LTC_SHA512_256 +#ifndef LTC_SHA512 + #error LTC_SHA512 is required for LTC_SHA512_256 +#endif +int sha512_256_init(hash_state * md); +#define sha512_256_process sha512_process +int sha512_256_done(hash_state * md, unsigned char *hash); +int sha512_256_test(void); +extern const struct ltc_hash_descriptor sha512_256_desc; +#endif + +#ifdef LTC_SHA512_224 +#ifndef LTC_SHA512 + #error LTC_SHA512 is required for LTC_SHA512_224 +#endif +int sha512_224_init(hash_state * md); +#define sha512_224_process sha512_process +int sha512_224_done(hash_state * md, unsigned char *hash); +int sha512_224_test(void); +extern const struct ltc_hash_descriptor sha512_224_desc; +#endif + #ifdef LTC_SHA256 int sha256_init(hash_state * md); int sha256_process(hash_state * md, const unsigned char *in, unsigned long inlen); @@ -254,6 +355,50 @@ extern const struct ltc_hash_descriptor sha1_desc; #endif +#ifdef LTC_BLAKE2S +extern const struct ltc_hash_descriptor blake2s_256_desc; +int blake2s_256_init(hash_state * md); +int blake2s_256_test(void); + +extern const struct ltc_hash_descriptor blake2s_224_desc; +int blake2s_224_init(hash_state * md); +int blake2s_224_test(void); + +extern const struct ltc_hash_descriptor blake2s_160_desc; +int blake2s_160_init(hash_state * md); +int blake2s_160_test(void); + +extern const struct ltc_hash_descriptor blake2s_128_desc; +int blake2s_128_init(hash_state * md); +int blake2s_128_test(void); + +int blake2s_init(hash_state * md, unsigned long outlen, const unsigned char *key, unsigned long keylen); +int blake2s_process(hash_state * md, const unsigned char *in, unsigned long inlen); +int blake2s_done(hash_state * md, unsigned char *hash); +#endif + +#ifdef LTC_BLAKE2B +extern const struct ltc_hash_descriptor blake2b_512_desc; +int blake2b_512_init(hash_state * md); +int blake2b_512_test(void); + +extern const struct ltc_hash_descriptor blake2b_384_desc; +int blake2b_384_init(hash_state * md); +int blake2b_384_test(void); + +extern const struct ltc_hash_descriptor blake2b_256_desc; +int blake2b_256_init(hash_state * md); +int blake2b_256_test(void); + +extern const struct ltc_hash_descriptor blake2b_160_desc; +int blake2b_160_init(hash_state * md); +int blake2b_160_test(void); + +int blake2b_init(hash_state * md, unsigned long outlen, const unsigned char *key, unsigned long keylen); +int blake2b_process(hash_state * md, const unsigned char *in, unsigned long inlen); +int blake2b_done(hash_state * md, unsigned char *hash); +#endif + #ifdef LTC_MD5 int md5_init(hash_state * md); int md5_process(hash_state * md, const unsigned char *in, unsigned long inlen); @@ -325,17 +470,21 @@ int find_hash_any(const char *name, int digestlen); int register_hash(const struct ltc_hash_descriptor *hash); int unregister_hash(const struct ltc_hash_descriptor *hash); +int register_all_hashes(void); int hash_is_valid(int idx); LTC_MUTEX_PROTO(ltc_hash_mutex) -int hash_memory(int hash, - const unsigned char *in, unsigned long inlen, +int hash_memory(int hash, + const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen); int hash_memory_multi(int hash, unsigned char *out, unsigned long *outlen, const unsigned char *in, unsigned long inlen, ...); + +#ifndef LTC_NO_FILE int hash_filehandle(int hash, FILE *in, unsigned char *out, unsigned long *outlen); int hash_file(int hash, const char *fname, unsigned char *out, unsigned long *outlen); +#endif /* a simple macro for making hash "process" functions */ #define HASH_PROCESS(func_name, compress_name, state_var, block_size) \ @@ -348,6 +497,9 @@ if (md-> state_var .curlen > sizeof(md-> state_var .buf)) { \ return CRYPT_INVALID_ARG; \ } \ + if ((md-> state_var .length + inlen) < md-> state_var .length) { \ + return CRYPT_HASH_OVERFLOW; \ + } \ while (inlen > 0) { \ if (md-> state_var .curlen == 0 && inlen >= block_size) { \ if ((err = compress_name (md, (unsigned char *)in)) != CRYPT_OK) { \ @@ -358,7 +510,7 @@ inlen -= block_size; \ } else { \ n = MIN(inlen, (block_size - md-> state_var .curlen)); \ - memcpy(md-> state_var .buf + md-> state_var.curlen, in, (size_t)n); \ + XMEMCPY(md-> state_var .buf + md-> state_var.curlen, in, (size_t)n); \ md-> state_var .curlen += n; \ in += n; \ inlen -= n; \ @@ -374,6 +526,6 @@ return CRYPT_OK; \ } -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/headers/tomcrypt_mac.h --- a/libtomcrypt/src/headers/tomcrypt_mac.h Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/headers/tomcrypt_mac.h Fri Feb 09 21:44:05 2018 +0800 @@ -1,3 +1,12 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + #ifdef LTC_HMAC typedef struct Hmac_state { hash_state md; @@ -10,23 +19,23 @@ int hmac_process(hmac_state *hmac, const unsigned char *in, unsigned long inlen); int hmac_done(hmac_state *hmac, unsigned char *out, unsigned long *outlen); int hmac_test(void); -int hmac_memory(int hash, +int hmac_memory(int hash, const unsigned char *key, unsigned long keylen, - const unsigned char *in, unsigned long inlen, + const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen); -int hmac_memory_multi(int hash, +int hmac_memory_multi(int hash, const unsigned char *key, unsigned long keylen, unsigned char *out, unsigned long *outlen, const unsigned char *in, unsigned long inlen, ...); int hmac_file(int hash, const char *fname, const unsigned char *key, - unsigned long keylen, + unsigned long keylen, unsigned char *dst, unsigned long *dstlen); #endif #ifdef LTC_OMAC typedef struct { - int cipher_idx, + int cipher_idx, buflen, blklen; unsigned char block[MAXBLOCKSIZE], @@ -38,17 +47,17 @@ int omac_init(omac_state *omac, int cipher, const unsigned char *key, unsigned long keylen); int omac_process(omac_state *omac, const unsigned char *in, unsigned long inlen); int omac_done(omac_state *omac, unsigned char *out, unsigned long *outlen); -int omac_memory(int cipher, +int omac_memory(int cipher, const unsigned char *key, unsigned long keylen, const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen); -int omac_memory_multi(int cipher, +int omac_memory_multi(int cipher, const unsigned char *key, unsigned long keylen, unsigned char *out, unsigned long *outlen, const unsigned char *in, unsigned long inlen, ...); -int omac_file(int cipher, +int omac_file(int cipher, const unsigned char *key, unsigned long keylen, - const char *filename, + const char *filename, unsigned char *out, unsigned long *outlen); int omac_test(void); #endif /* LTC_OMAC */ @@ -73,19 +82,19 @@ int pmac_process(pmac_state *pmac, const unsigned char *in, unsigned long inlen); int pmac_done(pmac_state *pmac, unsigned char *out, unsigned long *outlen); -int pmac_memory(int cipher, +int pmac_memory(int cipher, const unsigned char *key, unsigned long keylen, const unsigned char *msg, unsigned long msglen, unsigned char *out, unsigned long *outlen); -int pmac_memory_multi(int cipher, +int pmac_memory_multi(int cipher, const unsigned char *key, unsigned long keylen, unsigned char *out, unsigned long *outlen, const unsigned char *in, unsigned long inlen, ...); -int pmac_file(int cipher, +int pmac_file(int cipher, const unsigned char *key, unsigned long keylen, - const char *filename, + const char *filename, unsigned char *out, unsigned long *outlen); int pmac_test(void); @@ -96,6 +105,47 @@ #endif /* PMAC */ +#ifdef LTC_POLY1305 +typedef struct { + ulong32 r[5]; + ulong32 h[5]; + ulong32 pad[4]; + unsigned long leftover; + unsigned char buffer[16]; + int final; +} poly1305_state; + +int poly1305_init(poly1305_state *st, const unsigned char *key, unsigned long keylen); +int poly1305_process(poly1305_state *st, const unsigned char *in, unsigned long inlen); +int poly1305_done(poly1305_state *st, unsigned char *mac, unsigned long *maclen); +int poly1305_memory(const unsigned char *key, unsigned long keylen, const unsigned char *in, unsigned long inlen, unsigned char *mac, unsigned long *maclen); +int poly1305_memory_multi(const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *maclen, const unsigned char *in, unsigned long inlen, ...); +int poly1305_file(const char *fname, const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *maclen); +int poly1305_test(void); +#endif /* LTC_POLY1305 */ + +#ifdef LTC_BLAKE2SMAC +typedef hash_state blake2smac_state; +int blake2smac_init(blake2smac_state *st, unsigned long outlen, const unsigned char *key, unsigned long keylen); +int blake2smac_process(blake2smac_state *st, const unsigned char *in, unsigned long inlen); +int blake2smac_done(blake2smac_state *st, unsigned char *mac, unsigned long *maclen); +int blake2smac_memory(const unsigned char *key, unsigned long keylen, const unsigned char *in, unsigned long inlen, unsigned char *mac, unsigned long *maclen); +int blake2smac_memory_multi(const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *maclen, const unsigned char *in, unsigned long inlen, ...); +int blake2smac_file(const char *fname, const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *maclen); +int blake2smac_test(void); +#endif /* LTC_BLAKE2SMAC */ + +#ifdef LTC_BLAKE2BMAC +typedef hash_state blake2bmac_state; +int blake2bmac_init(blake2bmac_state *st, unsigned long outlen, const unsigned char *key, unsigned long keylen); +int blake2bmac_process(blake2bmac_state *st, const unsigned char *in, unsigned long inlen); +int blake2bmac_done(blake2bmac_state *st, unsigned char *mac, unsigned long *maclen); +int blake2bmac_memory(const unsigned char *key, unsigned long keylen, const unsigned char *in, unsigned long inlen, unsigned char *mac, unsigned long *maclen); +int blake2bmac_memory_multi(const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *maclen, const unsigned char *in, unsigned long inlen, ...); +int blake2bmac_file(const char *fname, const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *maclen); +int blake2bmac_test(void); +#endif /* LTC_BLAKE2BMAC */ + #ifdef LTC_EAX_MODE #if !(defined(LTC_OMAC) && defined(LTC_CTR_MODE)) @@ -152,32 +202,32 @@ block_len; /* length of block */ } ocb_state; -int ocb_init(ocb_state *ocb, int cipher, +int ocb_init(ocb_state *ocb, int cipher, const unsigned char *key, unsigned long keylen, const unsigned char *nonce); int ocb_encrypt(ocb_state *ocb, const unsigned char *pt, unsigned char *ct); int ocb_decrypt(ocb_state *ocb, const unsigned char *ct, unsigned char *pt); -int ocb_done_encrypt(ocb_state *ocb, +int ocb_done_encrypt(ocb_state *ocb, const unsigned char *pt, unsigned long ptlen, - unsigned char *ct, + unsigned char *ct, unsigned char *tag, unsigned long *taglen); -int ocb_done_decrypt(ocb_state *ocb, +int ocb_done_decrypt(ocb_state *ocb, const unsigned char *ct, unsigned long ctlen, - unsigned char *pt, + unsigned char *pt, const unsigned char *tag, unsigned long taglen, int *stat); int ocb_encrypt_authenticate_memory(int cipher, const unsigned char *key, unsigned long keylen, - const unsigned char *nonce, + const unsigned char *nonce, const unsigned char *pt, unsigned long ptlen, unsigned char *ct, unsigned char *tag, unsigned long *taglen); int ocb_decrypt_verify_memory(int cipher, const unsigned char *key, unsigned long keylen, - const unsigned char *nonce, + const unsigned char *nonce, const unsigned char *ct, unsigned long ctlen, unsigned char *pt, const unsigned char *tag, unsigned long taglen, @@ -193,10 +243,111 @@ #endif /* LTC_OCB_MODE */ +#ifdef LTC_OCB3_MODE +typedef struct { + unsigned char Offset_0[MAXBLOCKSIZE], /* Offset_0 value */ + Offset_current[MAXBLOCKSIZE], /* Offset_{current_block_index} value */ + L_dollar[MAXBLOCKSIZE], /* L_$ value */ + L_star[MAXBLOCKSIZE], /* L_* value */ + L_[32][MAXBLOCKSIZE], /* L_{i} values */ + tag_part[MAXBLOCKSIZE], /* intermediate result of tag calculation */ + checksum[MAXBLOCKSIZE]; /* current checksum */ + + /* AAD related members */ + unsigned char aSum_current[MAXBLOCKSIZE], /* AAD related helper variable */ + aOffset_current[MAXBLOCKSIZE], /* AAD related helper variable */ + adata_buffer[MAXBLOCKSIZE]; /* AAD buffer */ + int adata_buffer_bytes; /* bytes in AAD buffer */ + unsigned long ablock_index; /* index # for current adata (AAD) block */ + + symmetric_key key; /* scheduled key for cipher */ + unsigned long block_index; /* index # for current data block */ + int cipher, /* cipher idx */ + tag_len, /* length of tag */ + block_len; /* length of block */ +} ocb3_state; + +int ocb3_init(ocb3_state *ocb, int cipher, + const unsigned char *key, unsigned long keylen, + const unsigned char *nonce, unsigned long noncelen, + unsigned long taglen); + +int ocb3_encrypt(ocb3_state *ocb, const unsigned char *pt, unsigned long ptlen, unsigned char *ct); +int ocb3_decrypt(ocb3_state *ocb, const unsigned char *ct, unsigned long ctlen, unsigned char *pt); +int ocb3_encrypt_last(ocb3_state *ocb, const unsigned char *pt, unsigned long ptlen, unsigned char *ct); +int ocb3_decrypt_last(ocb3_state *ocb, const unsigned char *ct, unsigned long ctlen, unsigned char *pt); +int ocb3_add_aad(ocb3_state *ocb, const unsigned char *aad, unsigned long aadlen); +int ocb3_done(ocb3_state *ocb, unsigned char *tag, unsigned long *taglen); + +int ocb3_encrypt_authenticate_memory(int cipher, + const unsigned char *key, unsigned long keylen, + const unsigned char *nonce, unsigned long noncelen, + const unsigned char *adata, unsigned long adatalen, + const unsigned char *pt, unsigned long ptlen, + unsigned char *ct, + unsigned char *tag, unsigned long *taglen); + +int ocb3_decrypt_verify_memory(int cipher, + const unsigned char *key, unsigned long keylen, + const unsigned char *nonce, unsigned long noncelen, + const unsigned char *adata, unsigned long adatalen, + const unsigned char *ct, unsigned long ctlen, + unsigned char *pt, + const unsigned char *tag, unsigned long taglen, + int *stat); + +int ocb3_test(void); + +#ifdef LTC_SOURCE +/* internal helper functions */ +int ocb3_int_ntz(unsigned long x); +void ocb3_int_xor_blocks(unsigned char *out, const unsigned char *block_a, const unsigned char *block_b, unsigned long block_len); +#endif /* LTC_SOURCE */ + +#endif /* LTC_OCB3_MODE */ + #ifdef LTC_CCM_MODE -#define CCM_ENCRYPT 0 -#define CCM_DECRYPT 1 +#define CCM_ENCRYPT LTC_ENCRYPT +#define CCM_DECRYPT LTC_DECRYPT + +typedef struct { + symmetric_key K; + int cipher, /* which cipher */ + taglen, /* length of the tag */ + x; /* index in PAD */ + + unsigned long L, /* L value */ + ptlen, /* length that will be enc / dec */ + current_ptlen, /* current processed length */ + aadlen, /* length of the aad */ + current_aadlen, /* length of the currently provided add */ + noncelen; /* length of the nonce */ + + unsigned char PAD[16], + ctr[16], + CTRPAD[16], + CTRlen; +} ccm_state; + +int ccm_init(ccm_state *ccm, int cipher, + const unsigned char *key, int keylen, int ptlen, int taglen, int aad_len); + +int ccm_reset(ccm_state *ccm); + +int ccm_add_nonce(ccm_state *ccm, + const unsigned char *nonce, unsigned long noncelen); + +int ccm_add_aad(ccm_state *ccm, + const unsigned char *adata, unsigned long adatalen); + +int ccm_process(ccm_state *ccm, + unsigned char *pt, unsigned long ptlen, + unsigned char *ct, + int direction); + +int ccm_done(ccm_state *ccm, + unsigned char *tag, unsigned long *taglen); int ccm_memory(int cipher, const unsigned char *key, unsigned long keylen, @@ -218,20 +369,20 @@ /* table shared between GCM and LRW */ -#if defined(LTC_GCM_TABLES) || defined(LRW_TABLES) || ((defined(LTC_GCM_MODE) || defined(LTC_GCM_MODE)) && defined(LTC_FAST)) +#if defined(LTC_GCM_TABLES) || defined(LTC_LRW_TABLES) || ((defined(LTC_GCM_MODE) || defined(LTC_GCM_MODE)) && defined(LTC_FAST)) extern const unsigned char gcm_shift_table[]; #endif #ifdef LTC_GCM_MODE -#define GCM_ENCRYPT 0 -#define GCM_DECRYPT 1 +#define GCM_ENCRYPT LTC_ENCRYPT +#define GCM_DECRYPT LTC_DECRYPT #define LTC_GCM_MODE_IV 0 #define LTC_GCM_MODE_AAD 1 #define LTC_GCM_MODE_TEXT 2 -typedef struct { +typedef struct { symmetric_key K; unsigned char H[16], /* multiplier */ X[16], /* accumulator */ @@ -253,7 +404,7 @@ __attribute__ ((aligned (16))) #endif ; -#endif +#endif } gcm_state; void gcm_mult_h(gcm_state *gcm, unsigned char *I); @@ -263,7 +414,7 @@ int gcm_reset(gcm_state *gcm); -int gcm_add_iv(gcm_state *gcm, +int gcm_add_iv(gcm_state *gcm, const unsigned char *IV, unsigned long IVlen); int gcm_add_aad(gcm_state *gcm, @@ -274,7 +425,7 @@ unsigned char *ct, int direction); -int gcm_done(gcm_state *gcm, +int gcm_done(gcm_state *gcm, unsigned char *tag, unsigned long *taglen); int gcm_memory( int cipher, @@ -282,7 +433,7 @@ const unsigned char *IV, unsigned long IVlen, const unsigned char *adata, unsigned long adatalen, unsigned char *pt, unsigned long ptlen, - unsigned char *ct, + unsigned char *ct, unsigned char *tag, unsigned long *taglen, int direction); int gcm_test(void); @@ -328,17 +479,17 @@ int xcbc_init(xcbc_state *xcbc, int cipher, const unsigned char *key, unsigned long keylen); int xcbc_process(xcbc_state *xcbc, const unsigned char *in, unsigned long inlen); int xcbc_done(xcbc_state *xcbc, unsigned char *out, unsigned long *outlen); -int xcbc_memory(int cipher, +int xcbc_memory(int cipher, const unsigned char *key, unsigned long keylen, const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen); -int xcbc_memory_multi(int cipher, +int xcbc_memory_multi(int cipher, const unsigned char *key, unsigned long keylen, unsigned char *out, unsigned long *outlen, const unsigned char *in, unsigned long inlen, ...); -int xcbc_file(int cipher, +int xcbc_file(int cipher, const unsigned char *key, unsigned long keylen, - const char *filename, + const char *filename, unsigned char *out, unsigned long *outlen); int xcbc_test(void); @@ -362,23 +513,53 @@ int f9_init(f9_state *f9, int cipher, const unsigned char *key, unsigned long keylen); int f9_process(f9_state *f9, const unsigned char *in, unsigned long inlen); int f9_done(f9_state *f9, unsigned char *out, unsigned long *outlen); -int f9_memory(int cipher, +int f9_memory(int cipher, const unsigned char *key, unsigned long keylen, const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen); -int f9_memory_multi(int cipher, +int f9_memory_multi(int cipher, const unsigned char *key, unsigned long keylen, unsigned char *out, unsigned long *outlen, const unsigned char *in, unsigned long inlen, ...); -int f9_file(int cipher, +int f9_file(int cipher, const unsigned char *key, unsigned long keylen, - const char *filename, + const char *filename, unsigned char *out, unsigned long *outlen); int f9_test(void); #endif +#ifdef LTC_CHACHA20POLY1305_MODE -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +typedef struct { + poly1305_state poly; + chacha_state chacha; + ulong64 aadlen; + ulong64 ctlen; + int aadflg; +} chacha20poly1305_state; + +#define CHACHA20POLY1305_ENCRYPT LTC_ENCRYPT +#define CHACHA20POLY1305_DECRYPT LTC_DECRYPT + +int chacha20poly1305_init(chacha20poly1305_state *st, const unsigned char *key, unsigned long keylen); +int chacha20poly1305_setiv(chacha20poly1305_state *st, const unsigned char *iv, unsigned long ivlen); +int chacha20poly1305_setiv_rfc7905(chacha20poly1305_state *st, const unsigned char *iv, unsigned long ivlen, ulong64 sequence_number); +int chacha20poly1305_add_aad(chacha20poly1305_state *st, const unsigned char *in, unsigned long inlen); +int chacha20poly1305_encrypt(chacha20poly1305_state *st, const unsigned char *in, unsigned long inlen, unsigned char *out); +int chacha20poly1305_decrypt(chacha20poly1305_state *st, const unsigned char *in, unsigned long inlen, unsigned char *out); +int chacha20poly1305_done(chacha20poly1305_state *st, unsigned char *tag, unsigned long *taglen); +int chacha20poly1305_memory(const unsigned char *key, unsigned long keylen, + const unsigned char *iv, unsigned long ivlen, + const unsigned char *aad, unsigned long aadlen, + const unsigned char *in, unsigned long inlen, + unsigned char *out, + unsigned char *tag, unsigned long *taglen, + int direction); +int chacha20poly1305_test(void); + +#endif /* LTC_CHACHA20POLY1305_MODE */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/headers/tomcrypt_macros.h --- a/libtomcrypt/src/headers/tomcrypt_macros.h Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/headers/tomcrypt_macros.h Fri Feb 09 21:44:05 2018 +0800 @@ -1,73 +1,73 @@ -/* fix for MSVC ...evil! */ -#ifdef _MSC_VER - #define CONST64(n) n ## ui64 - typedef unsigned __int64 ulong64; -#else - #define CONST64(n) n ## ULL - typedef unsigned long long ulong64; -#endif - -/* this is the "32-bit at least" data type - * Re-define it to suit your platform but it must be at least 32-bits +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. */ -#if defined(__x86_64__) || (defined(__sparc__) && defined(__arch64__)) - typedef unsigned ulong32; -#else - typedef unsigned long ulong32; -#endif /* ---- HELPER MACROS ---- */ #ifdef ENDIAN_NEUTRAL #define STORE32L(x, y) \ - { (y)[3] = (unsigned char)(((x)>>24)&255); (y)[2] = (unsigned char)(((x)>>16)&255); \ - (y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); } + do { (y)[3] = (unsigned char)(((x)>>24)&255); (y)[2] = (unsigned char)(((x)>>16)&255); \ + (y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); } while(0) #define LOAD32L(x, y) \ - { x = ((unsigned long)((y)[3] & 255)<<24) | \ - ((unsigned long)((y)[2] & 255)<<16) | \ - ((unsigned long)((y)[1] & 255)<<8) | \ - ((unsigned long)((y)[0] & 255)); } + do { x = ((ulong32)((y)[3] & 255)<<24) | \ + ((ulong32)((y)[2] & 255)<<16) | \ + ((ulong32)((y)[1] & 255)<<8) | \ + ((ulong32)((y)[0] & 255)); } while(0) #define STORE64L(x, y) \ - { (y)[7] = (unsigned char)(((x)>>56)&255); (y)[6] = (unsigned char)(((x)>>48)&255); \ + do { (y)[7] = (unsigned char)(((x)>>56)&255); (y)[6] = (unsigned char)(((x)>>48)&255); \ (y)[5] = (unsigned char)(((x)>>40)&255); (y)[4] = (unsigned char)(((x)>>32)&255); \ (y)[3] = (unsigned char)(((x)>>24)&255); (y)[2] = (unsigned char)(((x)>>16)&255); \ - (y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); } + (y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); } while(0) #define LOAD64L(x, y) \ - { x = (((ulong64)((y)[7] & 255))<<56)|(((ulong64)((y)[6] & 255))<<48)| \ + do { x = (((ulong64)((y)[7] & 255))<<56)|(((ulong64)((y)[6] & 255))<<48)| \ (((ulong64)((y)[5] & 255))<<40)|(((ulong64)((y)[4] & 255))<<32)| \ (((ulong64)((y)[3] & 255))<<24)|(((ulong64)((y)[2] & 255))<<16)| \ - (((ulong64)((y)[1] & 255))<<8)|(((ulong64)((y)[0] & 255))); } + (((ulong64)((y)[1] & 255))<<8)|(((ulong64)((y)[0] & 255))); } while(0) #define STORE32H(x, y) \ - { (y)[0] = (unsigned char)(((x)>>24)&255); (y)[1] = (unsigned char)(((x)>>16)&255); \ - (y)[2] = (unsigned char)(((x)>>8)&255); (y)[3] = (unsigned char)((x)&255); } + do { (y)[0] = (unsigned char)(((x)>>24)&255); (y)[1] = (unsigned char)(((x)>>16)&255); \ + (y)[2] = (unsigned char)(((x)>>8)&255); (y)[3] = (unsigned char)((x)&255); } while(0) #define LOAD32H(x, y) \ - { x = ((unsigned long)((y)[0] & 255)<<24) | \ - ((unsigned long)((y)[1] & 255)<<16) | \ - ((unsigned long)((y)[2] & 255)<<8) | \ - ((unsigned long)((y)[3] & 255)); } + do { x = ((ulong32)((y)[0] & 255)<<24) | \ + ((ulong32)((y)[1] & 255)<<16) | \ + ((ulong32)((y)[2] & 255)<<8) | \ + ((ulong32)((y)[3] & 255)); } while(0) #define STORE64H(x, y) \ - { (y)[0] = (unsigned char)(((x)>>56)&255); (y)[1] = (unsigned char)(((x)>>48)&255); \ +do { (y)[0] = (unsigned char)(((x)>>56)&255); (y)[1] = (unsigned char)(((x)>>48)&255); \ (y)[2] = (unsigned char)(((x)>>40)&255); (y)[3] = (unsigned char)(((x)>>32)&255); \ (y)[4] = (unsigned char)(((x)>>24)&255); (y)[5] = (unsigned char)(((x)>>16)&255); \ - (y)[6] = (unsigned char)(((x)>>8)&255); (y)[7] = (unsigned char)((x)&255); } + (y)[6] = (unsigned char)(((x)>>8)&255); (y)[7] = (unsigned char)((x)&255); } while(0) #define LOAD64H(x, y) \ - { x = (((ulong64)((y)[0] & 255))<<56)|(((ulong64)((y)[1] & 255))<<48) | \ +do { x = (((ulong64)((y)[0] & 255))<<56)|(((ulong64)((y)[1] & 255))<<48) | \ (((ulong64)((y)[2] & 255))<<40)|(((ulong64)((y)[3] & 255))<<32) | \ (((ulong64)((y)[4] & 255))<<24)|(((ulong64)((y)[5] & 255))<<16) | \ - (((ulong64)((y)[6] & 255))<<8)|(((ulong64)((y)[7] & 255))); } + (((ulong64)((y)[6] & 255))<<8)|(((ulong64)((y)[7] & 255))); } while(0) + -#endif /* ENDIAN_NEUTRAL */ +#elif defined(ENDIAN_LITTLE) + +#ifdef LTC_HAVE_BSWAP_BUILTIN -#ifdef ENDIAN_LITTLE +#define STORE32H(x, y) \ +do { ulong32 __t = __builtin_bswap32 ((x)); \ + XMEMCPY ((y), &__t, 4); } while(0) -#if !defined(LTC_NO_BSWAP) && (defined(INTEL_CC) || (defined(__GNUC__) && (defined(__DJGPP__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__i386__) || defined(__x86_64__)))) +#define LOAD32H(x, y) \ +do { XMEMCPY (&(x), (y), 4); \ + (x) = __builtin_bswap32 ((x)); } while(0) + +#elif !defined(LTC_NO_BSWAP) && (defined(INTEL_CC) || (defined(__GNUC__) && (defined(__DJGPP__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__i386__) || defined(__x86_64__)))) #define STORE32H(x, y) \ asm __volatile__ ( \ @@ -85,144 +85,152 @@ #else #define STORE32H(x, y) \ - { (y)[0] = (unsigned char)(((x)>>24)&255); (y)[1] = (unsigned char)(((x)>>16)&255); \ - (y)[2] = (unsigned char)(((x)>>8)&255); (y)[3] = (unsigned char)((x)&255); } + do { (y)[0] = (unsigned char)(((x)>>24)&255); (y)[1] = (unsigned char)(((x)>>16)&255); \ + (y)[2] = (unsigned char)(((x)>>8)&255); (y)[3] = (unsigned char)((x)&255); } while(0) #define LOAD32H(x, y) \ - { x = ((unsigned long)((y)[0] & 255)<<24) | \ - ((unsigned long)((y)[1] & 255)<<16) | \ - ((unsigned long)((y)[2] & 255)<<8) | \ - ((unsigned long)((y)[3] & 255)); } + do { x = ((ulong32)((y)[0] & 255)<<24) | \ + ((ulong32)((y)[1] & 255)<<16) | \ + ((ulong32)((y)[2] & 255)<<8) | \ + ((ulong32)((y)[3] & 255)); } while(0) #endif +#ifdef LTC_HAVE_BSWAP_BUILTIN + +#define STORE64H(x, y) \ +do { ulong64 __t = __builtin_bswap64 ((x)); \ + XMEMCPY ((y), &__t, 8); } while(0) + +#define LOAD64H(x, y) \ +do { XMEMCPY (&(x), (y), 8); \ + (x) = __builtin_bswap64 ((x)); } while(0) /* x86_64 processor */ -#if !defined(LTC_NO_BSWAP) && (defined(__GNUC__) && defined(__x86_64__)) +#elif !defined(LTC_NO_BSWAP) && (defined(__GNUC__) && defined(__x86_64__)) #define STORE64H(x, y) \ asm __volatile__ ( \ "bswapq %0 \n\t" \ "movq %0,(%1)\n\t" \ "bswapq %0 \n\t" \ - ::"r"(x), "r"(y)); + ::"r"(x), "r"(y): "memory"); #define LOAD64H(x, y) \ asm __volatile__ ( \ "movq (%1),%0\n\t" \ "bswapq %0\n\t" \ - :"=r"(x): "r"(y)); + :"=r"(x): "r"(y): "memory"); #else #define STORE64H(x, y) \ - { (y)[0] = (unsigned char)(((x)>>56)&255); (y)[1] = (unsigned char)(((x)>>48)&255); \ +do { (y)[0] = (unsigned char)(((x)>>56)&255); (y)[1] = (unsigned char)(((x)>>48)&255); \ (y)[2] = (unsigned char)(((x)>>40)&255); (y)[3] = (unsigned char)(((x)>>32)&255); \ (y)[4] = (unsigned char)(((x)>>24)&255); (y)[5] = (unsigned char)(((x)>>16)&255); \ - (y)[6] = (unsigned char)(((x)>>8)&255); (y)[7] = (unsigned char)((x)&255); } + (y)[6] = (unsigned char)(((x)>>8)&255); (y)[7] = (unsigned char)((x)&255); } while(0) #define LOAD64H(x, y) \ - { x = (((ulong64)((y)[0] & 255))<<56)|(((ulong64)((y)[1] & 255))<<48) | \ +do { x = (((ulong64)((y)[0] & 255))<<56)|(((ulong64)((y)[1] & 255))<<48) | \ (((ulong64)((y)[2] & 255))<<40)|(((ulong64)((y)[3] & 255))<<32) | \ (((ulong64)((y)[4] & 255))<<24)|(((ulong64)((y)[5] & 255))<<16) | \ - (((ulong64)((y)[6] & 255))<<8)|(((ulong64)((y)[7] & 255))); } + (((ulong64)((y)[6] & 255))<<8)|(((ulong64)((y)[7] & 255))); } while(0) #endif -#ifdef ENDIAN_32BITWORD +#ifdef ENDIAN_32BITWORD #define STORE32L(x, y) \ - { ulong32 __t = (x); XMEMCPY(y, &__t, 4); } + do { ulong32 __t = (x); XMEMCPY(y, &__t, 4); } while(0) #define LOAD32L(x, y) \ - XMEMCPY(&(x), y, 4); + do { XMEMCPY(&(x), y, 4); } while(0) #define STORE64L(x, y) \ - { (y)[7] = (unsigned char)(((x)>>56)&255); (y)[6] = (unsigned char)(((x)>>48)&255); \ + do { (y)[7] = (unsigned char)(((x)>>56)&255); (y)[6] = (unsigned char)(((x)>>48)&255); \ (y)[5] = (unsigned char)(((x)>>40)&255); (y)[4] = (unsigned char)(((x)>>32)&255); \ (y)[3] = (unsigned char)(((x)>>24)&255); (y)[2] = (unsigned char)(((x)>>16)&255); \ - (y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); } + (y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); } while(0) #define LOAD64L(x, y) \ - { x = (((ulong64)((y)[7] & 255))<<56)|(((ulong64)((y)[6] & 255))<<48)| \ + do { x = (((ulong64)((y)[7] & 255))<<56)|(((ulong64)((y)[6] & 255))<<48)| \ (((ulong64)((y)[5] & 255))<<40)|(((ulong64)((y)[4] & 255))<<32)| \ (((ulong64)((y)[3] & 255))<<24)|(((ulong64)((y)[2] & 255))<<16)| \ - (((ulong64)((y)[1] & 255))<<8)|(((ulong64)((y)[0] & 255))); } + (((ulong64)((y)[1] & 255))<<8)|(((ulong64)((y)[0] & 255))); } while(0) #else /* 64-bit words then */ #define STORE32L(x, y) \ - { ulong32 __t = (x); XMEMCPY(y, &__t, 4); } + do { ulong32 __t = (x); XMEMCPY(y, &__t, 4); } while(0) #define LOAD32L(x, y) \ - { XMEMCPY(&(x), y, 4); x &= 0xFFFFFFFF; } + do { XMEMCPY(&(x), y, 4); x &= 0xFFFFFFFF; } while(0) #define STORE64L(x, y) \ - { ulong64 __t = (x); XMEMCPY(y, &__t, 8); } + do { ulong64 __t = (x); XMEMCPY(y, &__t, 8); } while(0) #define LOAD64L(x, y) \ - { XMEMCPY(&(x), y, 8); } + do { XMEMCPY(&(x), y, 8); } while(0) #endif /* ENDIAN_64BITWORD */ -#endif /* ENDIAN_LITTLE */ +#elif defined(ENDIAN_BIG) -#ifdef ENDIAN_BIG #define STORE32L(x, y) \ - { (y)[3] = (unsigned char)(((x)>>24)&255); (y)[2] = (unsigned char)(((x)>>16)&255); \ - (y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); } + do { (y)[3] = (unsigned char)(((x)>>24)&255); (y)[2] = (unsigned char)(((x)>>16)&255); \ + (y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); } while(0) #define LOAD32L(x, y) \ - { x = ((unsigned long)((y)[3] & 255)<<24) | \ - ((unsigned long)((y)[2] & 255)<<16) | \ - ((unsigned long)((y)[1] & 255)<<8) | \ - ((unsigned long)((y)[0] & 255)); } + do { x = ((ulong32)((y)[3] & 255)<<24) | \ + ((ulong32)((y)[2] & 255)<<16) | \ + ((ulong32)((y)[1] & 255)<<8) | \ + ((ulong32)((y)[0] & 255)); } while(0) #define STORE64L(x, y) \ - { (y)[7] = (unsigned char)(((x)>>56)&255); (y)[6] = (unsigned char)(((x)>>48)&255); \ +do { (y)[7] = (unsigned char)(((x)>>56)&255); (y)[6] = (unsigned char)(((x)>>48)&255); \ (y)[5] = (unsigned char)(((x)>>40)&255); (y)[4] = (unsigned char)(((x)>>32)&255); \ (y)[3] = (unsigned char)(((x)>>24)&255); (y)[2] = (unsigned char)(((x)>>16)&255); \ - (y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); } + (y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); } while(0) #define LOAD64L(x, y) \ - { x = (((ulong64)((y)[7] & 255))<<56)|(((ulong64)((y)[6] & 255))<<48) | \ +do { x = (((ulong64)((y)[7] & 255))<<56)|(((ulong64)((y)[6] & 255))<<48) | \ (((ulong64)((y)[5] & 255))<<40)|(((ulong64)((y)[4] & 255))<<32) | \ (((ulong64)((y)[3] & 255))<<24)|(((ulong64)((y)[2] & 255))<<16) | \ - (((ulong64)((y)[1] & 255))<<8)|(((ulong64)((y)[0] & 255))); } + (((ulong64)((y)[1] & 255))<<8)|(((ulong64)((y)[0] & 255))); } while(0) -#ifdef ENDIAN_32BITWORD +#ifdef ENDIAN_32BITWORD #define STORE32H(x, y) \ - { ulong32 __t = (x); XMEMCPY(y, &__t, 4); } + do { ulong32 __t = (x); XMEMCPY(y, &__t, 4); } while(0) #define LOAD32H(x, y) \ - XMEMCPY(&(x), y, 4); + do { XMEMCPY(&(x), y, 4); } while(0) #define STORE64H(x, y) \ - { (y)[0] = (unsigned char)(((x)>>56)&255); (y)[1] = (unsigned char)(((x)>>48)&255); \ + do { (y)[0] = (unsigned char)(((x)>>56)&255); (y)[1] = (unsigned char)(((x)>>48)&255); \ (y)[2] = (unsigned char)(((x)>>40)&255); (y)[3] = (unsigned char)(((x)>>32)&255); \ (y)[4] = (unsigned char)(((x)>>24)&255); (y)[5] = (unsigned char)(((x)>>16)&255); \ - (y)[6] = (unsigned char)(((x)>>8)&255); (y)[7] = (unsigned char)((x)&255); } + (y)[6] = (unsigned char)(((x)>>8)&255); (y)[7] = (unsigned char)((x)&255); } while(0) #define LOAD64H(x, y) \ - { x = (((ulong64)((y)[0] & 255))<<56)|(((ulong64)((y)[1] & 255))<<48)| \ + do { x = (((ulong64)((y)[0] & 255))<<56)|(((ulong64)((y)[1] & 255))<<48)| \ (((ulong64)((y)[2] & 255))<<40)|(((ulong64)((y)[3] & 255))<<32)| \ (((ulong64)((y)[4] & 255))<<24)|(((ulong64)((y)[5] & 255))<<16)| \ - (((ulong64)((y)[6] & 255))<<8)| (((ulong64)((y)[7] & 255))); } + (((ulong64)((y)[6] & 255))<<8)| (((ulong64)((y)[7] & 255))); } while(0) #else /* 64-bit words then */ #define STORE32H(x, y) \ - { ulong32 __t = (x); XMEMCPY(y, &__t, 4); } + do { ulong32 __t = (x); XMEMCPY(y, &__t, 4); } while(0) #define LOAD32H(x, y) \ - { XMEMCPY(&(x), y, 4); x &= 0xFFFFFFFF; } + do { XMEMCPY(&(x), y, 4); x &= 0xFFFFFFFF; } while(0) #define STORE64H(x, y) \ - { ulong64 __t = (x); XMEMCPY(y, &__t, 8); } + do { ulong64 __t = (x); XMEMCPY(y, &__t, 8); } while(0) #define LOAD64H(x, y) \ - { XMEMCPY(&(x), y, 8); } + do { XMEMCPY(&(x), y, 8); } while(0) #endif /* ENDIAN_64BITWORD */ #endif /* ENDIAN_BIG */ @@ -233,6 +241,7 @@ /* 32-bit Rotates */ #if defined(_MSC_VER) +#define LTC_ROx_ASM /* instrinsic rotate */ #include @@ -243,8 +252,9 @@ #define ROLc(x,n) _lrotl(x,n) #elif !defined(__STRICT_ANSI__) && defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && !defined(INTEL_CC) && !defined(LTC_NO_ASM) +#define LTC_ROx_ASM -static inline unsigned ROL(unsigned word, int i) +static inline ulong32 ROL(ulong32 word, int i) { asm ("roll %%cl,%0" :"=r" (word) @@ -252,7 +262,7 @@ return word; } -static inline unsigned ROR(unsigned word, int i) +static inline ulong32 ROR(ulong32 word, int i) { asm ("rorl %%cl,%0" :"=r" (word) @@ -262,21 +272,22 @@ #ifndef LTC_NO_ROLC -static inline unsigned ROLc(unsigned word, const int i) -{ - asm ("roll %2,%0" - :"=r" (word) - :"0" (word),"I" (i)); - return word; -} - -static inline unsigned RORc(unsigned word, const int i) -{ - asm ("rorl %2,%0" - :"=r" (word) - :"0" (word),"I" (i)); - return word; -} +#define ROLc(word,i) ({ \ + ulong32 __ROLc_tmp = (word); \ + __asm__ ("roll %2, %0" : \ + "=r" (__ROLc_tmp) : \ + "0" (__ROLc_tmp), \ + "I" (i)); \ + __ROLc_tmp; \ + }) +#define RORc(word,i) ({ \ + ulong32 __RORc_tmp = (word); \ + __asm__ ("rorl %2, %0" : \ + "=r" (__RORc_tmp) : \ + "0" (__RORc_tmp), \ + "I" (i)); \ + __RORc_tmp; \ + }) #else @@ -286,8 +297,9 @@ #endif #elif !defined(__STRICT_ANSI__) && defined(LTC_PPC32) +#define LTC_ROx_ASM -static inline unsigned ROL(unsigned word, int i) +static inline ulong32 ROL(ulong32 word, int i) { asm ("rotlw %0,%0,%2" :"=r" (word) @@ -295,7 +307,7 @@ return word; } -static inline unsigned ROR(unsigned word, int i) +static inline ulong32 ROR(ulong32 word, int i) { asm ("rotlw %0,%0,%2" :"=r" (word) @@ -305,7 +317,7 @@ #ifndef LTC_NO_ROLC -static inline unsigned ROLc(unsigned word, const int i) +static inline ulong32 ROLc(ulong32 word, const int i) { asm ("rotlwi %0,%0,%2" :"=r" (word) @@ -313,7 +325,7 @@ return word; } -static inline unsigned RORc(unsigned word, const int i) +static inline ulong32 RORc(ulong32 word, const int i) { asm ("rotrwi %0,%0,%2" :"=r" (word) @@ -332,18 +344,18 @@ #else /* rotates the hard way */ -#define ROL(x, y) ( (((unsigned long)(x)<<(unsigned long)((y)&31)) | (((unsigned long)(x)&0xFFFFFFFFUL)>>(unsigned long)(32-((y)&31)))) & 0xFFFFFFFFUL) -#define ROR(x, y) ( ((((unsigned long)(x)&0xFFFFFFFFUL)>>(unsigned long)((y)&31)) | ((unsigned long)(x)<<(unsigned long)(32-((y)&31)))) & 0xFFFFFFFFUL) -#define ROLc(x, y) ( (((unsigned long)(x)<<(unsigned long)((y)&31)) | (((unsigned long)(x)&0xFFFFFFFFUL)>>(unsigned long)(32-((y)&31)))) & 0xFFFFFFFFUL) -#define RORc(x, y) ( ((((unsigned long)(x)&0xFFFFFFFFUL)>>(unsigned long)((y)&31)) | ((unsigned long)(x)<<(unsigned long)(32-((y)&31)))) & 0xFFFFFFFFUL) +#define ROL(x, y) ( (((ulong32)(x)<<(ulong32)((y)&31)) | (((ulong32)(x)&0xFFFFFFFFUL)>>(ulong32)((32-((y)&31))&31))) & 0xFFFFFFFFUL) +#define ROR(x, y) ( ((((ulong32)(x)&0xFFFFFFFFUL)>>(ulong32)((y)&31)) | ((ulong32)(x)<<(ulong32)((32-((y)&31))&31))) & 0xFFFFFFFFUL) +#define ROLc(x, y) ( (((ulong32)(x)<<(ulong32)((y)&31)) | (((ulong32)(x)&0xFFFFFFFFUL)>>(ulong32)((32-((y)&31))&31))) & 0xFFFFFFFFUL) +#define RORc(x, y) ( ((((ulong32)(x)&0xFFFFFFFFUL)>>(ulong32)((y)&31)) | ((ulong32)(x)<<(ulong32)((32-((y)&31))&31))) & 0xFFFFFFFFUL) #endif /* 64-bit Rotates */ -#if !defined(__STRICT_ANSI__) && defined(__GNUC__) && defined(__x86_64__) && !defined(LTC_NO_ASM) +#if !defined(__STRICT_ANSI__) && defined(__GNUC__) && defined(__x86_64__) && !defined(_WIN64) && !defined(LTC_NO_ASM) -static inline unsigned long ROL64(unsigned long word, int i) +static inline ulong64 ROL64(ulong64 word, int i) { asm("rolq %%cl,%0" :"=r" (word) @@ -351,7 +363,7 @@ return word; } -static inline unsigned long ROR64(unsigned long word, int i) +static inline ulong64 ROR64(ulong64 word, int i) { asm("rorq %%cl,%0" :"=r" (word) @@ -361,21 +373,22 @@ #ifndef LTC_NO_ROLC -static inline unsigned long ROL64c(unsigned long word, const int i) -{ - asm("rolq %2,%0" - :"=r" (word) - :"0" (word),"J" (i)); - return word; -} - -static inline unsigned long ROR64c(unsigned long word, const int i) -{ - asm("rorq %2,%0" - :"=r" (word) - :"0" (word),"J" (i)); - return word; -} +#define ROL64c(word,i) ({ \ + ulong64 __ROL64c_tmp = word; \ + __asm__ ("rolq %2, %0" : \ + "=r" (__ROL64c_tmp) : \ + "0" (__ROL64c_tmp), \ + "J" (i)); \ + __ROL64c_tmp; \ + }) +#define ROR64c(word,i) ({ \ + ulong64 __ROR64c_tmp = word; \ + __asm__ ("rorq %2, %0" : \ + "=r" (__ROR64c_tmp) : \ + "0" (__ROR64c_tmp), \ + "J" (i)); \ + __ROR64c_tmp; \ + }) #else /* LTC_NO_ROLC */ @@ -388,19 +401,19 @@ #define ROL64(x, y) \ ( (((x)<<((ulong64)(y)&63)) | \ - (((x)&CONST64(0xFFFFFFFFFFFFFFFF))>>((ulong64)64-((y)&63)))) & CONST64(0xFFFFFFFFFFFFFFFF)) + (((x)&CONST64(0xFFFFFFFFFFFFFFFF))>>(((ulong64)64-((y)&63))&63))) & CONST64(0xFFFFFFFFFFFFFFFF)) #define ROR64(x, y) \ ( ((((x)&CONST64(0xFFFFFFFFFFFFFFFF))>>((ulong64)(y)&CONST64(63))) | \ - ((x)<<((ulong64)(64-((y)&CONST64(63)))))) & CONST64(0xFFFFFFFFFFFFFFFF)) + ((x)<<(((ulong64)64-((y)&63))&63))) & CONST64(0xFFFFFFFFFFFFFFFF)) #define ROL64c(x, y) \ ( (((x)<<((ulong64)(y)&63)) | \ - (((x)&CONST64(0xFFFFFFFFFFFFFFFF))>>((ulong64)64-((y)&63)))) & CONST64(0xFFFFFFFFFFFFFFFF)) + (((x)&CONST64(0xFFFFFFFFFFFFFFFF))>>(((ulong64)64-((y)&63))&63))) & CONST64(0xFFFFFFFFFFFFFFFF)) #define ROR64c(x, y) \ ( ((((x)&CONST64(0xFFFFFFFFFFFFFFFF))>>((ulong64)(y)&CONST64(63))) | \ - ((x)<<((ulong64)(64-((y)&CONST64(63)))))) & CONST64(0xFFFFFFFFFFFFFFFF)) + ((x)<<(((ulong64)64-((y)&63))&63))) & CONST64(0xFFFFFFFFFFFFFFFF)) #endif @@ -412,13 +425,22 @@ #define MIN(x, y) ( ((x)<(y))?(x):(y) ) #endif +#ifndef LTC_UNUSED_PARAM + #define LTC_UNUSED_PARAM(x) (void)(x) +#endif + /* extract a byte portably */ #ifdef _MSC_VER #define byte(x, n) ((unsigned char)((x) >> (8 * (n)))) #else #define byte(x, n) (((x) >> (8 * (n))) & 255) -#endif +#endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* there is no snprintf before Visual C++ 2015 */ +#if defined(_MSC_VER) && _MSC_VER < 1900 +#define snprintf _snprintf +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/headers/tomcrypt_math.h --- a/libtomcrypt/src/headers/tomcrypt_math.h Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/headers/tomcrypt_math.h Fri Feb 09 21:44:05 2018 +0800 @@ -1,3 +1,12 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + /** math functions **/ #define LTC_MP_LT -1 @@ -15,10 +24,19 @@ typedef void rsa_key; #endif +#ifndef LTC_MILLER_RABIN_REPS + /* Number of rounds of the Miller-Rabin test + * "Reasonable values of reps are between 15 and 50." c.f. gmp doc of mpz_probab_prime_p() + * As of https://security.stackexchange.com/a/4546 we should use 40 rounds */ + #define LTC_MILLER_RABIN_REPS 40 +#endif + +int radix_to_bin(const void *in, int radix, void *out, unsigned long *len); + /** math descriptor */ typedef struct { /** Name of the math provider */ - char *name; + const char *name; /** Bits per digit, amount of bits must fit in an unsigned long */ int bits_per_digit; @@ -30,15 +48,15 @@ @return CRYPT_OK on success */ int (*init)(void **a); - - /** init copy + + /** init copy @param dst The number to initialize and write to @param src The number to copy from @return CRYPT_OK on success */ int (*init_copy)(void **dst, void *src); - /** deinit + /** deinit @param a The number to free @return CRYPT_OK on success */ @@ -52,35 +70,36 @@ @return CRYPT_OK on success */ int (*neg)(void *src, void *dst); - - /** copy + + /** copy @param src The number to copy from - @param dst The number to write to + @param dst The number to write to @return CRYPT_OK on success */ int (*copy)(void *src, void *dst); /* ---- trivial low level functions ---- */ - /** set small constant + /** set small constant @param a Number to write to - @param n Source upto bits_per_digit (actually meant for very small constants) - @return CRYPT_OK on succcess + @param n Source upto bits_per_digit (actually meant for very small constants) + @return CRYPT_OK on success */ - int (*set_int)(void *a, unsigned long n); + int (*set_int)(void *a, ltc_mp_digit n); - /** get small constant - @param a Number to read, only fetches upto bits_per_digit from the number - @return The lower bits_per_digit of the integer (unsigned) + /** get small constant + @param a Small number to read, + only fetches up to bits_per_digit from the number + @return The lower bits_per_digit of the integer (unsigned) */ unsigned long (*get_int)(void *a); - /** get digit n + /** get digit n @param a The number to read from @param n The number of the digit to fetch @return The bits_per_digit sized n'th digit of a */ - unsigned long (*get_digit)(void *a, int n); + ltc_mp_digit (*get_digit)(void *a, int n); /** Get the number of digits that represent the number @param a The number to count @@ -91,16 +110,20 @@ /** compare two integers @param a The left side integer @param b The right side integer - @return LTC_MP_LT if a < b, LTC_MP_GT if a > b and LTC_MP_EQ otherwise. (signed comparison) + @return LTC_MP_LT if a < b, + LTC_MP_GT if a > b and + LTC_MP_EQ otherwise. (signed comparison) */ int (*compare)(void *a, void *b); - /** compare against int + /** compare against int @param a The left side integer @param b The right side integer (upto bits_per_digit) - @return LTC_MP_LT if a < b, LTC_MP_GT if a > b and LTC_MP_EQ otherwise. (signed comparison) + @return LTC_MP_LT if a < b, + LTC_MP_GT if a > b and + LTC_MP_EQ otherwise. (signed comparison) */ - int (*compare_d)(void *a, unsigned long n); + int (*compare_d)(void *a, ltc_mp_digit n); /** Count the number of bits used to represent the integer @param a The integer to count @@ -108,7 +131,7 @@ */ int (*count_bits)(void * a); - /** Count the number of LSB bits which are zero + /** Count the number of LSB bits which are zero @param a The integer to count @return The number of contiguous zero LSB bits */ @@ -122,8 +145,8 @@ int (*twoexpt)(void *a , int n); /* ---- radix conversions ---- */ - - /** read ascii string + + /** read ascii string @param a The integer to store into @param str The string to read @param radix The radix the integer has been represented in (2-64) @@ -139,13 +162,13 @@ */ int (*write_radix)(void *a, char *str, int radix); - /** get size as unsigned char string - @param a The integer to get the size (when stored in array of octets) - @return The length of the integer + /** get size as unsigned char string + @param a The integer to get the size (when stored in array of octets) + @return The length of the integer in octets */ unsigned long (*unsigned_size)(void *a); - /** store an integer as an array of octets + /** store an integer as an array of octets @param src The integer to store @param dst The buffer to store the integer in @return CRYPT_OK on success @@ -154,15 +177,17 @@ /** read an array of octets and store as integer @param dst The integer to load - @param src The array of octets - @param len The number of octets + @param src The array of octets + @param len The number of octets @return CRYPT_OK on success */ - int (*unsigned_read)(void *dst, unsigned char *src, unsigned long len); + int (*unsigned_read)( void *dst, + unsigned char *src, + unsigned long len); /* ---- basic math ---- */ - /** add two integers + /** add two integers @param a The first source integer @param b The second source integer @param c The destination of "a + b" @@ -170,16 +195,16 @@ */ int (*add)(void *a, void *b, void *c); - - /** add two integers + /** add two integers @param a The first source integer - @param b The second source integer (single digit of upto bits_per_digit in length) + @param b The second source integer + (single digit of upto bits_per_digit in length) @param c The destination of "a + b" @return CRYPT_OK on success */ - int (*addi)(void *a, unsigned long b, void *c); + int (*addi)(void *a, ltc_mp_digit b, void *c); - /** subtract two integers + /** subtract two integers @param a The first source integer @param b The second source integer @param c The destination of "a - b" @@ -187,29 +212,32 @@ */ int (*sub)(void *a, void *b, void *c); - /** subtract two integers + /** subtract two integers @param a The first source integer - @param b The second source integer (single digit of upto bits_per_digit in length) + @param b The second source integer + (single digit of upto bits_per_digit in length) @param c The destination of "a - b" @return CRYPT_OK on success */ - int (*subi)(void *a, unsigned long b, void *c); + int (*subi)(void *a, ltc_mp_digit b, void *c); - /** multiply two integers + /** multiply two integers @param a The first source integer - @param b The second source integer (single digit of upto bits_per_digit in length) + @param b The second source integer + (single digit of upto bits_per_digit in length) @param c The destination of "a * b" @return CRYPT_OK on success */ int (*mul)(void *a, void *b, void *c); - /** multiply two integers + /** multiply two integers @param a The first source integer - @param b The second source integer (single digit of upto bits_per_digit in length) + @param b The second source integer + (single digit of upto bits_per_digit in length) @param c The destination of "a * b" @return CRYPT_OK on success */ - int (*muli)(void *a, unsigned long b, void *c); + int (*muli)(void *a, ltc_mp_digit b, void *c); /** Square an integer @param a The integer to square @@ -227,9 +255,9 @@ */ int (*mpdiv)(void *a, void *b, void *c, void *d); - /** divide by two + /** divide by two @param a The integer to divide (shift right) - @param b The destination + @param b The destination @return CRYPT_OK on success */ int (*div_2)(void *a, void *b); @@ -240,9 +268,9 @@ @param c The destination for the residue @return CRYPT_OK on success */ - int (*modi)(void *a, unsigned long b, unsigned long *c); + int (*modi)(void *a, ltc_mp_digit b, ltc_mp_digit *c); - /** gcd + /** gcd @param a The first integer @param b The second integer @param c The destination for (a, b) @@ -250,7 +278,7 @@ */ int (*gcd)(void *a, void *b, void *c); - /** lcm + /** lcm @param a The first integer @param b The second integer @param c The destination for [a, b] @@ -260,7 +288,7 @@ /** Modular multiplication @param a The first source - @param b The second source + @param b The second source @param c The modulus @param d The destination (a*b mod c) @return CRYPT_OK on success @@ -277,7 +305,7 @@ /** Modular inversion @param a The value to invert - @param b The modulus + @param b The modulus @param c The destination (1/a mod b) @return CRYPT_OK on success */ @@ -285,14 +313,14 @@ /* ---- reduction ---- */ - /** setup montgomery - @param a The modulus - @param b The destination for the reduction digit + /** setup Montgomery + @param a The modulus + @param b The destination for the reduction digit @return CRYPT_OK on success */ int (*montgomery_setup)(void *a, void **b); - /** get normalization value + /** get normalization value @param a The destination for the normalization value @param b The modulus @return CRYPT_OK on success @@ -310,7 +338,7 @@ /** clean up (frees memory) @param a The value "b" from montgomery_setup() @return CRYPT_OK on success - */ + */ void (*montgomery_deinit)(void *a); /* ---- exponentiation ---- */ @@ -326,24 +354,30 @@ /** Primality testing @param a The integer to test - @param b The destination of the result (FP_YES if prime) + @param b The number of Miller-Rabin tests that shall be executed + @param c The destination of the result (FP_YES if prime) @return CRYPT_OK on success */ - int (*isprime)(void *a, int *b); + int (*isprime)(void *a, int b, int *c); /* ---- (optional) ecc point math ---- */ /** ECC GF(p) point multiplication (from the NIST curves) @param k The integer to multiply the point by @param G The point to multiply - @param R The destination for kG + @param R The destination for kG @param modulus The modulus for the field - @param map Boolean indicated whether to map back to affine or not (can be ignored if you work in affine only) + @param map Boolean indicated whether to map back to affine or not + (can be ignored if you work in affine only) @return CRYPT_OK on success */ - int (*ecc_ptmul)(void *k, ecc_point *G, ecc_point *R, void *modulus, int map); + int (*ecc_ptmul)( void *k, + ecc_point *G, + ecc_point *R, + void *modulus, + int map); - /** ECC GF(p) point addition + /** ECC GF(p) point addition @param P The first point @param Q The second point @param R The destination of P + Q @@ -351,24 +385,33 @@ @param mp The "b" value from montgomery_setup() @return CRYPT_OK on success */ - int (*ecc_ptadd)(ecc_point *P, ecc_point *Q, ecc_point *R, void *modulus, void *mp); + int (*ecc_ptadd)(ecc_point *P, + ecc_point *Q, + ecc_point *R, + void *modulus, + void *mp); - /** ECC GF(p) point double + /** ECC GF(p) point double @param P The first point @param R The destination of 2P @param modulus The modulus @param mp The "b" value from montgomery_setup() @return CRYPT_OK on success */ - int (*ecc_ptdbl)(ecc_point *P, ecc_point *R, void *modulus, void *mp); + int (*ecc_ptdbl)(ecc_point *P, + ecc_point *R, + void *modulus, + void *mp); - /** ECC mapping from projective to affine, currently uses (x,y,z) => (x/z^2, y/z^3, 1) + /** ECC mapping from projective to affine, + currently uses (x,y,z) => (x/z^2, y/z^3, 1) @param P The point to map @param modulus The modulus @param mp The "b" value from montgomery_setup() @return CRYPT_OK on success - @remark The mapping can be different but keep in mind a ecc_point only has three - integers (x,y,z) so if you use a different mapping you have to make it fit. + @remark The mapping can be different but keep in mind a + ecc_point only has three integers (x,y,z) so if + you use a different mapping you have to make it fit. */ int (*ecc_map)(ecc_point *P, void *modulus, void *mp); @@ -377,10 +420,10 @@ @param kA What to multiple A by @param B Second point to multiply @param kB What to multiple B by - @param C [out] Destination point (can overlap with A or B - @param modulus Modulus for curve + @param C [out] Destination point (can overlap with A or B) + @param modulus Modulus for curve @return CRYPT_OK on success - */ + */ int (*ecc_mul2add)(ecc_point *A, void *kA, ecc_point *B, void *kB, ecc_point *C, @@ -388,35 +431,70 @@ /* ---- (optional) rsa optimized math (for internal CRT) ---- */ - /** RSA Key Generation + /** RSA Key Generation @param prng An active PRNG state @param wprng The index of the PRNG desired - @param size The size of the modulus (key size) desired (octets) - @param e The "e" value (public key). e==65537 is a good choice + @param size The size of the key in octets + @param e The "e" value (public key). + e==65537 is a good choice @param key [out] Destination of a newly created private key pair @return CRYPT_OK if successful, upon error all allocated ram is freed */ - int (*rsa_keygen)(prng_state *prng, int wprng, int size, long e, rsa_key *key); - + int (*rsa_keygen)(prng_state *prng, + int wprng, + int size, + long e, + rsa_key *key); /** RSA exponentiation @param in The octet array representing the base @param inlen The length of the input @param out The destination (to be stored in an octet array format) - @param outlen The length of the output buffer and the resulting size (zero padded to the size of the modulus) + @param outlen The length of the output buffer and the resulting size + (zero padded to the size of the modulus) @param which PK_PUBLIC for public RSA and PK_PRIVATE for private RSA - @param key The RSA key to use + @param key The RSA key to use @return CRYPT_OK on success */ int (*rsa_me)(const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen, int which, rsa_key *key); + +/* ---- basic math continued ---- */ + + /** Modular addition + @param a The first source + @param b The second source + @param c The modulus + @param d The destination (a + b mod c) + @return CRYPT_OK on success + */ + int (*addmod)(void *a, void *b, void *c, void *d); + + /** Modular substraction + @param a The first source + @param b The second source + @param c The modulus + @param d The destination (a - b mod c) + @return CRYPT_OK on success + */ + int (*submod)(void *a, void *b, void *c, void *d); + +/* ---- misc stuff ---- */ + + /** Make a pseudo-random mpi + @param a The mpi to make random + @param size The desired length + @return CRYPT_OK on success + */ + int (*rand)(void *a, int size); } ltc_math_descriptor; extern ltc_math_descriptor ltc_mp; int ltc_init_multi(void **a, ...); void ltc_deinit_multi(void *a, ...); +void ltc_cleanup_multi(void **a, ...); #ifdef LTM_DESC extern const ltc_math_descriptor ltm_desc; @@ -439,6 +517,7 @@ #define mp_init_multi ltc_init_multi #define mp_clear(a) ltc_mp.deinit(a) #define mp_clear_multi ltc_deinit_multi +#define mp_cleanup_multi ltc_cleanup_multi #define mp_init_copy(a, b) ltc_mp.init_copy(a, b) #define mp_neg(a, b) ltc_mp.neg(a, b) @@ -475,6 +554,8 @@ #define mp_gcd(a, b, c) ltc_mp.gcd(a, b, c) #define mp_lcm(a, b, c) ltc_mp.lcm(a, b, c) +#define mp_addmod(a, b, c, d) ltc_mp.addmod(a, b, c, d) +#define mp_submod(a, b, c, d) ltc_mp.submod(a, b, c, d) #define mp_mulmod(a, b, c, d) ltc_mp.mulmod(a, b, c, d) #define mp_sqrmod(a, b, c) ltc_mp.sqrmod(a, b, c) #define mp_invmod(a, b, c) ltc_mp.invmod(a, b, c) @@ -485,16 +566,18 @@ #define mp_montgomery_free(a) ltc_mp.montgomery_deinit(a) #define mp_exptmod(a,b,c,d) ltc_mp.exptmod(a,b,c,d) -#define mp_prime_is_prime(a, b, c) ltc_mp.isprime(a, c) +#define mp_prime_is_prime(a, b, c) ltc_mp.isprime(a, b, c) #define mp_iszero(a) (mp_cmp_d(a, 0) == LTC_MP_EQ ? LTC_MP_YES : LTC_MP_NO) #define mp_isodd(a) (mp_get_digit_count(a) > 0 ? (mp_get_digit(a, 0) & 1 ? LTC_MP_YES : LTC_MP_NO) : LTC_MP_NO) -#define mp_exch(a, b) do { void *ABC__tmp = a; a = b; b = ABC__tmp; } while(0); +#define mp_exch(a, b) do { void *ABC__tmp = a; a = b; b = ABC__tmp; } while(0) #define mp_tohex(a, b) mp_toradix(a, b, 16) +#define mp_rand(a, b) ltc_mp.rand(a, b) + #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/headers/tomcrypt_misc.h --- a/libtomcrypt/src/headers/tomcrypt_misc.h Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/headers/tomcrypt_misc.h Fri Feb 09 21:44:05 2018 +0800 @@ -1,14 +1,61 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + /* ---- LTC_BASE64 Routines ---- */ #ifdef LTC_BASE64 -int base64_encode(const unsigned char *in, unsigned long len, +int base64_encode(const unsigned char *in, unsigned long len, unsigned char *out, unsigned long *outlen); -int base64_decode(const unsigned char *in, unsigned long len, +int base64_decode(const unsigned char *in, unsigned long len, + unsigned char *out, unsigned long *outlen); +int base64_strict_decode(const unsigned char *in, unsigned long len, unsigned char *out, unsigned long *outlen); #endif +#ifdef LTC_BASE64_URL +int base64url_encode(const unsigned char *in, unsigned long len, + unsigned char *out, unsigned long *outlen); +int base64url_strict_encode(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen); + +int base64url_decode(const unsigned char *in, unsigned long len, + unsigned char *out, unsigned long *outlen); +int base64url_strict_decode(const unsigned char *in, unsigned long len, + unsigned char *out, unsigned long *outlen); +#endif + +/* ===> LTC_HKDF -- RFC5869 HMAC-based Key Derivation Function <=== */ +#ifdef LTC_HKDF + +int hkdf_test(void); + +int hkdf_extract(int hash_idx, + const unsigned char *salt, unsigned long saltlen, + const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen); + +int hkdf_expand(int hash_idx, + const unsigned char *info, unsigned long infolen, + const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long outlen); + +int hkdf(int hash_idx, + const unsigned char *salt, unsigned long saltlen, + const unsigned char *info, unsigned long infolen, + const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long outlen); + +#endif /* LTC_HKDF */ + /* ---- MEM routines ---- */ -void zeromem(void *dst, size_t len); +int mem_neq(const void *a, const void *b, size_t len); +void zeromem(volatile void *dst, size_t len); void burn_stack(unsigned long len); const char *error_to_string(int err); @@ -18,6 +65,49 @@ /* ---- HMM ---- */ int crypt_fsa(void *mp, ...); -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ---- Dynamic language support ---- */ +int crypt_get_constant(const char* namein, int *valueout); +int crypt_list_all_constants(char *names_list, unsigned int *names_list_size); + +int crypt_get_size(const char* namein, unsigned int *sizeout); +int crypt_list_all_sizes(char *names_list, unsigned int *names_list_size); + +#ifdef LTM_DESC +void init_LTM(void); +#endif +#ifdef TFM_DESC +void init_TFM(void); +#endif +#ifdef GMP_DESC +void init_GMP(void); +#endif + +#ifdef LTC_ADLER32 +typedef struct adler32_state_s +{ + unsigned short s[2]; +} adler32_state; + +void adler32_init(adler32_state *ctx); +void adler32_update(adler32_state *ctx, const unsigned char *input, unsigned long length); +void adler32_finish(adler32_state *ctx, void *hash, unsigned long size); +int adler32_test(void); +#endif + +#ifdef LTC_CRC32 +typedef struct crc32_state_s +{ + ulong32 crc; +} crc32_state; + +void crc32_init(crc32_state *ctx); +void crc32_update(crc32_state *ctx, const unsigned char *input, unsigned long length); +void crc32_finish(crc32_state *ctx, void *hash, unsigned long size); +int crc32_test(void); +#endif + +int compare_testvector(const void* is, const unsigned long is_len, const void* should, const unsigned long should_len, const char* what, int which); + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/headers/tomcrypt_pk.h --- a/libtomcrypt/src/headers/tomcrypt_pk.h Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/headers/tomcrypt_pk.h Fri Feb 09 21:44:05 2018 +0800 @@ -1,3 +1,12 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + /* ---- NUMBER THEORY ---- */ enum { @@ -5,59 +14,82 @@ PK_PRIVATE=1 }; +/* Indicates standard output formats that can be read e.g. by OpenSSL or GnuTLS */ +#define PK_STD 0x1000 + int rand_prime(void *N, long len, prng_state *prng, int wprng); +#ifdef LTC_SOURCE +/* internal helper functions */ +int rand_bn_bits(void *N, int bits, prng_state *prng, int wprng); +int rand_bn_upto(void *N, void *limit, prng_state *prng, int wprng); + +enum public_key_algorithms { + PKA_RSA, + PKA_DSA +}; + +typedef struct Oid { + unsigned long OID[16]; + /** Number of OID digits in use */ + unsigned long OIDlen; +} oid_st; + +int pk_get_oid(int pk, oid_st *st); +#endif /* LTC_SOURCE */ + /* ---- RSA ---- */ #ifdef LTC_MRSA -/* Min and Max RSA key sizes (in bits) */ -#define MIN_RSA_SIZE 1024 -#define MAX_RSA_SIZE 4096 - -/** RSA LTC_PKCS style key */ +/** RSA PKCS style key */ typedef struct Rsa_key { /** Type of key, PK_PRIVATE or PK_PUBLIC */ int type; /** The public exponent */ - void *e; + void *e; /** The private exponent */ - void *d; + void *d; /** The modulus */ - void *N; + void *N; /** The p factor of N */ - void *p; + void *p; /** The q factor of N */ - void *q; + void *q; /** The 1/q mod p CRT param */ - void *qP; + void *qP; /** The d mod (p - 1) CRT param */ - void *dP; + void *dP; /** The d mod (q - 1) CRT param */ void *dQ; } rsa_key; int rsa_make_key(prng_state *prng, int wprng, int size, long e, rsa_key *key); +int rsa_get_size(rsa_key *key); + int rsa_exptmod(const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen, int which, rsa_key *key); void rsa_free(rsa_key *key); -/* These use LTC_PKCS #1 v2.0 padding */ +/* These use PKCS #1 v2.0 padding */ #define rsa_encrypt_key(_in, _inlen, _out, _outlen, _lparam, _lparamlen, _prng, _prng_idx, _hash_idx, _key) \ - rsa_encrypt_key_ex(_in, _inlen, _out, _outlen, _lparam, _lparamlen, _prng, _prng_idx, _hash_idx, LTC_LTC_PKCS_1_OAEP, _key) + rsa_encrypt_key_ex(_in, _inlen, _out, _outlen, _lparam, _lparamlen, _prng, _prng_idx, _hash_idx, LTC_PKCS_1_OAEP, _key) #define rsa_decrypt_key(_in, _inlen, _out, _outlen, _lparam, _lparamlen, _hash_idx, _stat, _key) \ - rsa_decrypt_key_ex(_in, _inlen, _out, _outlen, _lparam, _lparamlen, _hash_idx, LTC_LTC_PKCS_1_OAEP, _stat, _key) + rsa_decrypt_key_ex(_in, _inlen, _out, _outlen, _lparam, _lparamlen, _hash_idx, LTC_PKCS_1_OAEP, _stat, _key) #define rsa_sign_hash(_in, _inlen, _out, _outlen, _prng, _prng_idx, _hash_idx, _saltlen, _key) \ - rsa_sign_hash_ex(_in, _inlen, _out, _outlen, LTC_LTC_PKCS_1_PSS, _prng, _prng_idx, _hash_idx, _saltlen, _key) + rsa_sign_hash_ex(_in, _inlen, _out, _outlen, LTC_PKCS_1_PSS, _prng, _prng_idx, _hash_idx, _saltlen, _key) #define rsa_verify_hash(_sig, _siglen, _hash, _hashlen, _hash_idx, _saltlen, _stat, _key) \ - rsa_verify_hash_ex(_sig, _siglen, _hash, _hashlen, LTC_LTC_PKCS_1_PSS, _hash_idx, _saltlen, _stat, _key) + rsa_verify_hash_ex(_sig, _siglen, _hash, _hashlen, LTC_PKCS_1_PSS, _hash_idx, _saltlen, _stat, _key) -/* These can be switched between LTC_PKCS #1 v2.x and LTC_PKCS #1 v1.5 paddings */ +#define rsa_sign_saltlen_get_max(_hash_idx, _key) \ + rsa_sign_saltlen_get_max_ex(LTC_PKCS_1_PSS, _hash_idx, _key) + +/* These can be switched between PKCS #1 v2.x and PKCS #1 v1.5 paddings */ int rsa_encrypt_key_ex(const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen, const unsigned char *lparam, unsigned long lparamlen, @@ -82,35 +114,52 @@ int hash_idx, unsigned long saltlen, int *stat, rsa_key *key); -/* LTC_PKCS #1 import/export */ +int rsa_sign_saltlen_get_max_ex(int padding, int hash_idx, rsa_key *key); + +/* PKCS #1 import/export */ int rsa_export(unsigned char *out, unsigned long *outlen, int type, rsa_key *key); int rsa_import(const unsigned char *in, unsigned long inlen, rsa_key *key); - + +int rsa_import_x509(const unsigned char *in, unsigned long inlen, rsa_key *key); +int rsa_import_pkcs8(const unsigned char *in, unsigned long inlen, + const void *passwd, unsigned long passwdlen, rsa_key *key); + +int rsa_set_key(const unsigned char *N, unsigned long Nlen, + const unsigned char *e, unsigned long elen, + const unsigned char *d, unsigned long dlen, + rsa_key *key); +int rsa_set_factors(const unsigned char *p, unsigned long plen, + const unsigned char *q, unsigned long qlen, + rsa_key *key); +int rsa_set_crt_params(const unsigned char *dP, unsigned long dPlen, + const unsigned char *dQ, unsigned long dQlen, + const unsigned char *qP, unsigned long qPlen, + rsa_key *key); #endif /* ---- Katja ---- */ -#ifdef MKAT +#ifdef LTC_MKAT /* Min and Max KAT key sizes (in bits) */ #define MIN_KAT_SIZE 1024 #define MAX_KAT_SIZE 4096 -/** Katja LTC_PKCS style key */ +/** Katja PKCS style key */ typedef struct KAT_key { /** Type of key, PK_PRIVATE or PK_PUBLIC */ int type; /** The private exponent */ - void *d; + void *d; /** The modulus */ - void *N; + void *N; /** The p factor of N */ - void *p; + void *p; /** The q factor of N */ - void *q; + void *q; /** The 1/q mod p CRT param */ - void *qP; + void *qP; /** The d mod (p - 1) CRT param */ - void *dP; + void *dP; /** The d mod (q - 1) CRT param */ void *dQ; /** The pq param */ @@ -125,24 +174,71 @@ void katja_free(katja_key *key); -/* These use LTC_PKCS #1 v2.0 padding */ +/* These use PKCS #1 v2.0 padding */ int katja_encrypt_key(const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen, const unsigned char *lparam, unsigned long lparamlen, prng_state *prng, int prng_idx, int hash_idx, katja_key *key); - + int katja_decrypt_key(const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen, + unsigned char *out, unsigned long *outlen, const unsigned char *lparam, unsigned long lparamlen, int hash_idx, int *stat, katja_key *key); -/* LTC_PKCS #1 import/export */ +/* PKCS #1 import/export */ int katja_export(unsigned char *out, unsigned long *outlen, int type, katja_key *key); int katja_import(const unsigned char *in, unsigned long inlen, katja_key *key); - + #endif +/* ---- DH Routines ---- */ +#ifdef LTC_MDH + +typedef struct { + int type; + void *x; + void *y; + void *base; + void *prime; +} dh_key; + +int dh_get_groupsize(dh_key *key); + +int dh_export(unsigned char *out, unsigned long *outlen, int type, dh_key *key); +int dh_import(const unsigned char *in, unsigned long inlen, dh_key *key); + +int dh_set_pg(const unsigned char *p, unsigned long plen, + const unsigned char *g, unsigned long glen, + dh_key *key); +int dh_set_pg_dhparam(const unsigned char *dhparam, unsigned long dhparamlen, dh_key *key); +int dh_set_pg_groupsize(int groupsize, dh_key *key); + +int dh_set_key(const unsigned char *in, unsigned long inlen, int type, dh_key *key); +int dh_generate_key(prng_state *prng, int wprng, dh_key *key); + +int dh_shared_secret(dh_key *private_key, dh_key *public_key, + unsigned char *out, unsigned long *outlen); + +void dh_free(dh_key *key); + +int dh_export_key(void *out, unsigned long *outlen, int type, dh_key *key); + +#ifdef LTC_SOURCE +typedef struct { + int size; + const char *name, *base, *prime; +} ltc_dh_set_type; + +extern const ltc_dh_set_type ltc_dh_sets[]; + +/* internal helper functions */ +int dh_check_pubkey(dh_key *key); +#endif + +#endif /* LTC_MDH */ + + /* ---- ECC Routines ---- */ #ifdef LTC_MECC @@ -158,22 +254,22 @@ int size; /** name of curve */ - char *name; + const char *name; /** The prime that defines the field the curve is in (encoded in hex) */ - char *prime; + const char *prime; /** The fields B param (hex) */ - char *B; + const char *B; /** The order of the curve (hex) */ - char *order; - + const char *order; + /** The x co-ordinate of the base point on the curve (hex) */ - char *Gx; - + const char *Gx; + /** The y co-ordinate of the base point on the curve (hex) */ - char *Gy; + const char *Gy; } ltc_ecc_set_type; /** A point on a ECC curve, stored in Jacbobian format such that (x,y,z) => (x/z^2, y/z^3, 1) when interpretted as affine */ @@ -196,8 +292,8 @@ /** Index into the ltc_ecc_sets[] for the parameters of this curve; if -1, then this key is using user supplied curve in dp */ int idx; - /** pointer to domain parameters; either points to NIST curves (identified by idx >= 0) or user supplied curve */ - const ltc_ecc_set_type *dp; + /** pointer to domain parameters; either points to NIST curves (identified by idx >= 0) or user supplied curve */ + const ltc_ecc_set_type *dp; /** The public key */ ecc_point pubkey; @@ -225,24 +321,32 @@ int ecc_ansi_x963_import(const unsigned char *in, unsigned long inlen, ecc_key *key); int ecc_ansi_x963_import_ex(const unsigned char *in, unsigned long inlen, ecc_key *key, ltc_ecc_set_type *dp); -int ecc_shared_secret(ecc_key *private_key, ecc_key *public_key, +int ecc_shared_secret(ecc_key *private_key, ecc_key *public_key, unsigned char *out, unsigned long *outlen); int ecc_encrypt_key(const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen, - prng_state *prng, int wprng, int hash, + unsigned char *out, unsigned long *outlen, + prng_state *prng, int wprng, int hash, ecc_key *key); int ecc_decrypt_key(const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen, + unsigned char *out, unsigned long *outlen, ecc_key *key); -int ecc_sign_hash(const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen, +int ecc_sign_hash_rfc7518(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen, + prng_state *prng, int wprng, ecc_key *key); + +int ecc_sign_hash(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen, prng_state *prng, int wprng, ecc_key *key); +int ecc_verify_hash_rfc7518(const unsigned char *sig, unsigned long siglen, + const unsigned char *hash, unsigned long hashlen, + int *stat, ecc_key *key); + int ecc_verify_hash(const unsigned char *sig, unsigned long siglen, - const unsigned char *hash, unsigned long hashlen, + const unsigned char *hash, unsigned long hashlen, int *stat, ecc_key *key); /* low level functions */ @@ -251,7 +355,7 @@ int ltc_ecc_is_valid_idx(int n); /* point ops (mp == montgomery digit) */ -#if !defined(LTC_MECC_ACCEL) || defined(LTM_LTC_DESC) || defined(GMP_LTC_DESC) +#if !defined(LTC_MECC_ACCEL) || defined(LTM_DESC) || defined(GMP_DESC) /* R = 2P */ int ltc_ecc_projective_dbl_point(ecc_point *P, ecc_point *R, void *modulus, void *mp); @@ -309,7 +413,7 @@ /** DSA key structure */ typedef struct { /** The key type, PK_PRIVATE or PK_PUBLIC */ - int type; + int type; /** The order of the sub-group used in octets */ int qord; @@ -331,6 +435,17 @@ } dsa_key; int dsa_make_key(prng_state *prng, int wprng, int group_size, int modulus_size, dsa_key *key); + +int dsa_set_pqg(const unsigned char *p, unsigned long plen, + const unsigned char *q, unsigned long qlen, + const unsigned char *g, unsigned long glen, + dsa_key *key); +int dsa_set_pqg_dsaparam(const unsigned char *dsaparam, unsigned long dsaparamlen, dsa_key *key); +int dsa_generate_pqg(prng_state *prng, int wprng, int group_size, int modulus_size, dsa_key *key); + +int dsa_set_key(const unsigned char *in, unsigned long inlen, int type, dsa_key *key); +int dsa_generate_key(prng_state *prng, int wprng, dsa_key *key); + void dsa_free(dsa_key *key); int dsa_sign_hash_raw(const unsigned char *in, unsigned long inlen, @@ -342,26 +457,31 @@ prng_state *prng, int wprng, dsa_key *key); int dsa_verify_hash_raw( void *r, void *s, - const unsigned char *hash, unsigned long hashlen, + const unsigned char *hash, unsigned long hashlen, int *stat, dsa_key *key); int dsa_verify_hash(const unsigned char *sig, unsigned long siglen, - const unsigned char *hash, unsigned long hashlen, + const unsigned char *hash, unsigned long hashlen, int *stat, dsa_key *key); int dsa_encrypt_key(const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen, - prng_state *prng, int wprng, int hash, + unsigned char *out, unsigned long *outlen, + prng_state *prng, int wprng, int hash, dsa_key *key); - + int dsa_decrypt_key(const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen, + unsigned char *out, unsigned long *outlen, dsa_key *key); - + int dsa_import(const unsigned char *in, unsigned long inlen, dsa_key *key); int dsa_export(unsigned char *out, unsigned long *outlen, int type, dsa_key *key); int dsa_verify_key(dsa_key *key, int *stat); - +#ifdef LTC_SOURCE +/* internal helper functions */ +int dsa_int_validate_xy(dsa_key *key, int *stat); +int dsa_int_validate_pqg(dsa_key *key, int *stat); +int dsa_int_validate_primes(dsa_key *key, int *stat); +#endif int dsa_shared_secret(void *private_key, void *base, dsa_key *public_key, unsigned char *out, unsigned long *outlen); @@ -370,29 +490,39 @@ #ifdef LTC_DER /* DER handling */ -enum { +typedef enum ltc_asn1_type_ { + /* 0 */ LTC_ASN1_EOL, LTC_ASN1_BOOLEAN, LTC_ASN1_INTEGER, LTC_ASN1_SHORT_INTEGER, LTC_ASN1_BIT_STRING, + /* 5 */ LTC_ASN1_OCTET_STRING, LTC_ASN1_NULL, LTC_ASN1_OBJECT_IDENTIFIER, LTC_ASN1_IA5_STRING, LTC_ASN1_PRINTABLE_STRING, + /* 10 */ LTC_ASN1_UTF8_STRING, LTC_ASN1_UTCTIME, LTC_ASN1_CHOICE, LTC_ASN1_SEQUENCE, LTC_ASN1_SET, - LTC_ASN1_SETOF -}; + /* 15 */ + LTC_ASN1_SETOF, + LTC_ASN1_RAW_BIT_STRING, + LTC_ASN1_TELETEX_STRING, + LTC_ASN1_CONSTRUCTED, + LTC_ASN1_CONTEXT_SPECIFIC, + /* 20 */ + LTC_ASN1_GENERALIZEDTIME, +} ltc_asn1_type; /** A LTC ASN.1 list type */ typedef struct ltc_asn1_list_ { /** The LTC ASN.1 enumerated type identifier */ - int type; + ltc_asn1_type type; /** The data to encode or place for decoding */ void *data; /** The size of the input or resulting output */ @@ -411,22 +541,37 @@ LTC_MACRO_list[LTC_MACRO_temp].data = (void*)(Data); \ LTC_MACRO_list[LTC_MACRO_temp].size = (Size); \ LTC_MACRO_list[LTC_MACRO_temp].used = 0; \ - } while (0); + } while (0) /* SEQUENCE */ int der_encode_sequence_ex(ltc_asn1_list *list, unsigned long inlen, unsigned char *out, unsigned long *outlen, int type_of); - -#define der_encode_sequence(list, inlen, out, outlen) der_encode_sequence_ex(list, inlen, out, outlen, LTC_ASN1_SEQUENCE) + +#define der_encode_sequence(list, inlen, out, outlen) der_encode_sequence_ex(list, inlen, out, outlen, LTC_ASN1_SEQUENCE) int der_decode_sequence_ex(const unsigned char *in, unsigned long inlen, ltc_asn1_list *list, unsigned long outlen, int ordered); - + #define der_decode_sequence(in, inlen, list, outlen) der_decode_sequence_ex(in, inlen, list, outlen, 1) int der_length_sequence(ltc_asn1_list *list, unsigned long inlen, unsigned long *outlen); + +#ifdef LTC_SOURCE +/* internal helper functions */ +int der_length_sequence_ex(ltc_asn1_list *list, unsigned long inlen, + unsigned long *outlen, unsigned long *payloadlen); +/* SUBJECT PUBLIC KEY INFO */ +int der_encode_subject_public_key_info(unsigned char *out, unsigned long *outlen, + unsigned int algorithm, void* public_key, unsigned long public_key_len, + unsigned long parameters_type, void* parameters, unsigned long parameters_len); + +int der_decode_subject_public_key_info(const unsigned char *in, unsigned long inlen, + unsigned int algorithm, void* public_key, unsigned long* public_key_len, + unsigned long parameters_type, ltc_asn1_list* parameters, unsigned long parameters_len); +#endif /* LTC_SOURCE */ + /* SET */ #define der_decode_set(in, inlen, list, outlen) der_decode_sequence_ex(in, inlen, list, outlen, 0) #define der_length_set der_length_sequence @@ -435,22 +580,23 @@ int der_encode_setof(ltc_asn1_list *list, unsigned long inlen, unsigned char *out, unsigned long *outlen); - + /* VA list handy helpers with triplets of */ int der_encode_sequence_multi(unsigned char *out, unsigned long *outlen, ...); int der_decode_sequence_multi(const unsigned char *in, unsigned long inlen, ...); /* FLEXI DECODER handle unknown list decoder */ int der_decode_sequence_flexi(const unsigned char *in, unsigned long *inlen, ltc_asn1_list **out); -void der_free_sequence_flexi(ltc_asn1_list *list); +#define der_free_sequence_flexi der_sequence_free void der_sequence_free(ltc_asn1_list *in); +void der_sequence_shrink(ltc_asn1_list *in); /* BOOLEAN */ int der_length_boolean(unsigned long *outlen); -int der_encode_boolean(int in, +int der_encode_boolean(int in, unsigned char *out, unsigned long *outlen); int der_decode_boolean(const unsigned char *in, unsigned long inlen, - int *out); + int *out); /* INTEGER */ int der_encode_integer(void *num, unsigned char *out, unsigned long *outlen); int der_decode_integer(const unsigned char *in, unsigned long inlen, void *num); @@ -466,6 +612,10 @@ unsigned char *out, unsigned long *outlen); int der_decode_bit_string(const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen); +int der_encode_raw_bit_string(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen); +int der_decode_raw_bit_string(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen); int der_length_bit_string(unsigned long nbits, unsigned long *outlen); /* OCTET STRING */ @@ -493,7 +643,19 @@ int der_ia5_char_encode(int c); int der_ia5_value_decode(int v); -/* Printable STRING */ +/* TELETEX STRING */ +int der_decode_teletex_string(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen); +int der_length_teletex_string(const unsigned char *octets, unsigned long noctets, unsigned long *outlen); + +#ifdef LTC_SOURCE +/* internal helper functions */ +int der_teletex_char_encode(int c); +int der_teletex_value_decode(int v); +#endif /* LTC_SOURCE */ + + +/* PRINTABLE STRING */ int der_encode_printable_string(const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen); int der_decode_printable_string(const unsigned char *in, unsigned long inlen, @@ -504,10 +666,17 @@ int der_printable_value_decode(int v); /* UTF-8 */ -#if (defined(SIZE_MAX) || __STDC_VERSION__ >= 199901L || defined(WCHAR_MAX) || defined(_WCHAR_T) || defined(_WCHAR_T_DEFINED) || defined (__WCHAR_TYPE__)) && !defined(LTC_NO_WCHAR) +#if (defined(SIZE_MAX) || __STDC_VERSION__ >= 199901L || defined(WCHAR_MAX) || defined(__WCHAR_MAX__) || defined(_WCHAR_T) || defined(_WCHAR_T_DEFINED) || defined (__WCHAR_TYPE__)) && !defined(LTC_NO_WCHAR) #include +#if defined(__WCHAR_MAX__) +#define LTC_WCHAR_MAX __WCHAR_MAX__ +#elif defined(WCHAR_MAX) +#define LTC_WCHAR_MAX WCHAR_MAX +#endif +/* please note that it might happen that LTC_WCHAR_MAX is undefined */ #else typedef ulong32 wchar_t; +#define LTC_WCHAR_MAX 0xFFFFFFFF #endif int der_encode_utf8_string(const wchar_t *in, unsigned long inlen, @@ -516,6 +685,10 @@ int der_decode_utf8_string(const unsigned char *in, unsigned long inlen, wchar_t *out, unsigned long *outlen); unsigned long der_utf8_charsize(const wchar_t c); +#ifdef LTC_SOURCE +/* internal helper functions */ +int der_utf8_valid_char(const wchar_t c); +#endif /* LTC_SOURCE */ int der_length_utf8_string(const wchar_t *in, unsigned long noctets, unsigned long *outlen); @@ -536,7 +709,7 @@ off_mm; /* timezone offset minutes */ } ltc_utctime; -int der_encode_utctime(ltc_utctime *utctime, +int der_encode_utctime(ltc_utctime *utctime, unsigned char *out, unsigned long *outlen); int der_decode_utctime(const unsigned char *in, unsigned long *inlen, @@ -544,9 +717,31 @@ int der_length_utctime(ltc_utctime *utctime, unsigned long *outlen); +/* GeneralizedTime */ +typedef struct { + unsigned YYYY, /* year */ + MM, /* month */ + DD, /* day */ + hh, /* hour */ + mm, /* minute */ + ss, /* second */ + fs, /* fractional seconds */ + off_dir, /* timezone offset direction 0 == +, 1 == - */ + off_hh, /* timezone offset hours */ + off_mm; /* timezone offset minutes */ +} ltc_generalizedtime; + +int der_encode_generalizedtime(ltc_generalizedtime *gtime, + unsigned char *out, unsigned long *outlen); + +int der_decode_generalizedtime(const unsigned char *in, unsigned long *inlen, + ltc_generalizedtime *out); + +int der_length_generalizedtime(ltc_generalizedtime *gtime, unsigned long *outlen); + #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/headers/tomcrypt_pkcs.h --- a/libtomcrypt/src/headers/tomcrypt_pkcs.h Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/headers/tomcrypt_pkcs.h Fri Feb 09 21:44:05 2018 +0800 @@ -1,19 +1,29 @@ -/* LTC_PKCS Header Info */ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ -/* ===> LTC_PKCS #1 -- RSA Cryptography <=== */ +/* PKCS Header Info */ + +/* ===> PKCS #1 -- RSA Cryptography <=== */ #ifdef LTC_PKCS_1 enum ltc_pkcs_1_v1_5_blocks { - LTC_LTC_PKCS_1_EMSA = 1, /* Block type 1 (LTC_PKCS #1 v1.5 signature padding) */ - LTC_LTC_PKCS_1_EME = 2 /* Block type 2 (LTC_PKCS #1 v1.5 encryption padding) */ + LTC_PKCS_1_EMSA = 1, /* Block type 1 (PKCS #1 v1.5 signature padding) */ + LTC_PKCS_1_EME = 2 /* Block type 2 (PKCS #1 v1.5 encryption padding) */ }; enum ltc_pkcs_1_paddings { - LTC_LTC_PKCS_1_V1_5 = 1, /* LTC_PKCS #1 v1.5 padding (\sa ltc_pkcs_1_v1_5_blocks) */ - LTC_LTC_PKCS_1_OAEP = 2, /* LTC_PKCS #1 v2.0 encryption padding */ - LTC_LTC_PKCS_1_PSS = 3 /* LTC_PKCS #1 v2.1 signature padding */ + LTC_PKCS_1_V1_5 = 1, /* PKCS #1 v1.5 padding (\sa ltc_pkcs_1_v1_5_blocks) */ + LTC_PKCS_1_OAEP = 2, /* PKCS #1 v2.0 encryption padding */ + LTC_PKCS_1_PSS = 3, /* PKCS #1 v2.1 signature padding */ + LTC_PKCS_1_V1_5_NA1 = 4 /* PKCS #1 v1.5 padding - No ASN.1 (\sa ltc_pkcs_1_v1_5_blocks) */ }; int pkcs_1_mgf1( int hash_idx, @@ -24,20 +34,20 @@ int pkcs_1_os2ip(void *n, unsigned char *in, unsigned long inlen); /* *** v1.5 padding */ -int pkcs_1_v1_5_encode(const unsigned char *msg, +int pkcs_1_v1_5_encode(const unsigned char *msg, unsigned long msglen, int block_type, unsigned long modulus_bitlen, - prng_state *prng, + prng_state *prng, int prng_idx, - unsigned char *out, + unsigned char *out, unsigned long *outlen); -int pkcs_1_v1_5_decode(const unsigned char *msg, +int pkcs_1_v1_5_decode(const unsigned char *msg, unsigned long msglen, int block_type, unsigned long modulus_bitlen, - unsigned char *out, + unsigned char *out, unsigned long *outlen, int *is_valid); @@ -55,7 +65,7 @@ int *res); int pkcs_1_pss_encode(const unsigned char *msghash, unsigned long msghashlen, - unsigned long saltlen, prng_state *prng, + unsigned long saltlen, prng_state *prng, int prng_idx, int hash_idx, unsigned long modulus_bitlen, unsigned char *out, unsigned long *outlen); @@ -67,23 +77,32 @@ #endif /* LTC_PKCS_1 */ -/* ===> LTC_PKCS #5 -- Password Based Cryptography <=== */ +/* ===> PKCS #5 -- Password Based Cryptography <=== */ #ifdef LTC_PKCS_5 -/* Algorithm #1 (old) */ -int pkcs_5_alg1(const unsigned char *password, unsigned long password_len, - const unsigned char *salt, +/* Algorithm #1 (PBKDF1) */ +int pkcs_5_alg1(const unsigned char *password, unsigned long password_len, + const unsigned char *salt, int iteration_count, int hash_idx, unsigned char *out, unsigned long *outlen); -/* Algorithm #2 (new) */ -int pkcs_5_alg2(const unsigned char *password, unsigned long password_len, +/* Algorithm #1 (PBKDF1) - OpenSSL-compatible variant for arbitrarily-long keys. + Compatible with EVP_BytesToKey() */ +int pkcs_5_alg1_openssl(const unsigned char *password, + unsigned long password_len, + const unsigned char *salt, + int iteration_count, int hash_idx, + unsigned char *out, unsigned long *outlen); + +/* Algorithm #2 (PBKDF2) */ +int pkcs_5_alg2(const unsigned char *password, unsigned long password_len, const unsigned char *salt, unsigned long salt_len, int iteration_count, int hash_idx, unsigned char *out, unsigned long *outlen); +int pkcs_5_test (void); #endif /* LTC_PKCS_5 */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/headers/tomcrypt_prng.h --- a/libtomcrypt/src/headers/tomcrypt_prng.h Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/headers/tomcrypt_prng.h Fri Feb 09 21:44:05 2018 +0800 @@ -1,17 +1,32 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + /* ---- PRNG Stuff ---- */ #ifdef LTC_YARROW struct yarrow_prng { int cipher, hash; unsigned char pool[MAXBLOCKSIZE]; symmetric_CTR ctr; - LTC_MUTEX_TYPE(prng_lock) }; #endif #ifdef LTC_RC4 struct rc4_prng { - int x, y; - unsigned char buf[256]; + rc4_state s; +}; +#endif + +#ifdef LTC_CHACHA20_PRNG +struct chacha20_prng { + chacha_state s; /* chacha state */ + unsigned char ent[40]; /* entropy buffer */ + unsigned long idx; /* entropy counter */ }; #endif @@ -23,50 +38,50 @@ unsigned char K[32], /* the current key */ IV[16]; /* IV for CTR mode */ - + unsigned long pool_idx, /* current pool we will add to */ pool0_len, /* length of 0'th pool */ - wd; + wd; ulong64 reset_cnt; /* number of times we have reset */ - LTC_MUTEX_TYPE(prng_lock) }; #endif #ifdef LTC_SOBER128 struct sober128_prng { - ulong32 R[17], /* Working storage for the shift register */ - initR[17], /* saved register contents */ - konst, /* key dependent constant */ - sbuf; /* partial word encryption buffer */ - - int nbuf, /* number of part-word stream bits buffered */ - flag, /* first add_entropy call or not? */ - set; /* did we call add_entropy to set key? */ - + sober128_state s; /* sober128 state */ + unsigned char ent[40]; /* entropy buffer */ + unsigned long idx; /* entropy counter */ }; #endif -typedef union Prng_state { - char dummy[1]; +typedef struct { + union { + char dummy[1]; #ifdef LTC_YARROW - struct yarrow_prng yarrow; + struct yarrow_prng yarrow; #endif #ifdef LTC_RC4 - struct rc4_prng rc4; + struct rc4_prng rc4; +#endif +#ifdef LTC_CHACHA20_PRNG + struct chacha20_prng chacha; #endif #ifdef LTC_FORTUNA - struct fortuna_prng fortuna; + struct fortuna_prng fortuna; #endif #ifdef LTC_SOBER128 - struct sober128_prng sober128; + struct sober128_prng sober128; #endif + }; + short ready; /* ready flag 0-1 */ + LTC_MUTEX_TYPE(lock) /* lock */ } prng_state; /** PRNG descriptor */ extern struct ltc_prng_descriptor { /** Name of the PRNG */ - char *name; + const char *name; /** size in bytes of exported state */ int export_size; /** Start a PRNG state @@ -98,7 +113,7 @@ @return CRYPT_OK if successful */ int (*done)(prng_state *prng); - /** Export a PRNG state + /** Export a PRNG state @param out [out] The destination for the state @param outlen [in/out] The max size and resulting size of the PRNG state @param prng The PRNG to export @@ -154,6 +169,18 @@ extern const struct ltc_prng_descriptor rc4_desc; #endif +#ifdef LTC_CHACHA20_PRNG +int chacha20_prng_start(prng_state *prng); +int chacha20_prng_add_entropy(const unsigned char *in, unsigned long inlen, prng_state *prng); +int chacha20_prng_ready(prng_state *prng); +unsigned long chacha20_prng_read(unsigned char *out, unsigned long outlen, prng_state *prng); +int chacha20_prng_done(prng_state *prng); +int chacha20_prng_export(unsigned char *out, unsigned long *outlen, prng_state *prng); +int chacha20_prng_import(const unsigned char *in, unsigned long inlen, prng_state *prng); +int chacha20_prng_test(void); +extern const struct ltc_prng_descriptor chacha20_prng_desc; +#endif + #ifdef LTC_SPRNG int sprng_start(prng_state *prng); int sprng_add_entropy(const unsigned char *in, unsigned long inlen, prng_state *prng); @@ -181,19 +208,25 @@ int find_prng(const char *name); int register_prng(const struct ltc_prng_descriptor *prng); int unregister_prng(const struct ltc_prng_descriptor *prng); +int register_all_prngs(void); int prng_is_valid(int idx); LTC_MUTEX_PROTO(ltc_prng_mutex) /* Slow RNG you **might** be able to use to seed a PRNG with. Be careful as this * might not work on all platforms as planned */ -unsigned long rng_get_bytes(unsigned char *out, - unsigned long outlen, +unsigned long rng_get_bytes(unsigned char *out, + unsigned long outlen, void (*callback)(void)); int rng_make_prng(int bits, int wprng, prng_state *prng, void (*callback)(void)); +#ifdef LTC_PRNG_ENABLE_LTC_RNG +extern unsigned long (*ltc_rng)(unsigned char *out, unsigned long outlen, + void (*callback)(void)); +#endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/blake2/blake2bmac.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/mac/blake2/blake2bmac.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,66 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_BLAKE2BMAC + +/** + Initialize an BLAKE2B MAC context. + @param st The BLAKE2B MAC state + @param outlen The size of the MAC output (octets) + @param key The secret key + @param keylen The length of the secret key (octets) + @return CRYPT_OK if successful +*/ +int blake2bmac_init(blake2bmac_state *st, unsigned long outlen, const unsigned char *key, unsigned long keylen) +{ + LTC_ARGCHK(st != NULL); + LTC_ARGCHK(key != NULL); + return blake2b_init(st, outlen, key, keylen); +} + +/** + Process data through BLAKE2B MAC + @param st The BLAKE2B MAC state + @param in The data to send through HMAC + @param inlen The length of the data to HMAC (octets) + @return CRYPT_OK if successful +*/ +int blake2bmac_process(blake2bmac_state *st, const unsigned char *in, unsigned long inlen) +{ + if (inlen == 0) return CRYPT_OK; /* nothing to do */ + LTC_ARGCHK(st != NULL); + LTC_ARGCHK(in != NULL); + return blake2b_process(st, in, inlen); +} + +/** + Terminate a BLAKE2B MAC session + @param st The BLAKE2B MAC state + @param mac [out] The destination of the BLAKE2B MAC authentication tag + @param maclen [in/out] The max size and resulting size of the BLAKE2B MAC authentication tag + @return CRYPT_OK if successful +*/ +int blake2bmac_done(blake2bmac_state *st, unsigned char *mac, unsigned long *maclen) +{ + LTC_ARGCHK(st != NULL); + LTC_ARGCHK(mac != NULL); + LTC_ARGCHK(maclen != NULL); + LTC_ARGCHK(*maclen >= st->blake2b.outlen); + + *maclen = st->blake2b.outlen; + return blake2b_done(st, mac); +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/blake2/blake2bmac_file.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/mac/blake2/blake2bmac_file.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,83 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_BLAKE2BMAC + +/** + BLAKE2B MAC a file + @param fname The name of the file you wish to BLAKE2B MAC + @param key The secret key + @param keylen The length of the secret key + @param mac [out] The BLAKE2B MAC authentication tag + @param maclen [in/out] The max size and resulting size of the authentication tag + @return CRYPT_OK if successful, CRYPT_NOP if file support has been disabled +*/ +int blake2bmac_file(const char *fname, const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *maclen) +{ +#ifdef LTC_NO_FILE + return CRYPT_NOP; +#else + blake2bmac_state st; + FILE *in; + unsigned char *buf; + size_t x; + int err; + + LTC_ARGCHK(fname != NULL); + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(mac != NULL); + LTC_ARGCHK(maclen != NULL); + + if ((buf = XMALLOC(LTC_FILE_READ_BUFSIZE)) == NULL) { + return CRYPT_MEM; + } + + if ((err = blake2bmac_init(&st, *maclen, key, keylen)) != CRYPT_OK) { + goto LBL_ERR; + } + + in = fopen(fname, "rb"); + if (in == NULL) { + err = CRYPT_FILE_NOTFOUND; + goto LBL_ERR; + } + + do { + x = fread(buf, 1, LTC_FILE_READ_BUFSIZE, in); + if ((err = blake2bmac_process(&st, buf, (unsigned long)x)) != CRYPT_OK) { + fclose(in); + goto LBL_CLEANBUF; + } + } while (x == LTC_FILE_READ_BUFSIZE); + + if (fclose(in) != 0) { + err = CRYPT_ERROR; + goto LBL_CLEANBUF; + } + + err = blake2bmac_done(&st, mac, maclen); + +LBL_CLEANBUF: + zeromem(buf, LTC_FILE_READ_BUFSIZE); +LBL_ERR: +#ifdef LTC_CLEAN_STACK + zeromem(&st, sizeof(blake2bmac_state)); +#endif + XFREE(buf); + return err; +#endif +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/blake2/blake2bmac_memory.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/mac/blake2/blake2bmac_memory.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,48 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_BLAKE2BMAC + +/** + BLAKE2B MAC a block of memory to produce the authentication tag + @param key The secret key + @param keylen The length of the secret key (octets) + @param in The data to BLAKE2B MAC + @param inlen The length of the data to BLAKE2B MAC (octets) + @param mac [out] Destination of the authentication tag + @param maclen [in/out] Max size and resulting size of authentication tag + @return CRYPT_OK if successful +*/ +int blake2bmac_memory(const unsigned char *key, unsigned long keylen, const unsigned char *in, unsigned long inlen, unsigned char *mac, unsigned long *maclen) +{ + blake2bmac_state st; + int err; + + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(mac != NULL); + LTC_ARGCHK(maclen != NULL); + + if ((err = blake2bmac_init(&st, *maclen, key, keylen)) != CRYPT_OK) { goto LBL_ERR; } + if ((err = blake2bmac_process(&st, in, inlen)) != CRYPT_OK) { goto LBL_ERR; } + err = blake2bmac_done(&st, mac, maclen); +LBL_ERR: +#ifdef LTC_CLEAN_STACK + zeromem(&st, sizeof(blake2bmac_state)); +#endif + return err; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/blake2/blake2bmac_memory_multi.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/mac/blake2/blake2bmac_memory_multi.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,62 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" +#include + +#ifdef LTC_BLAKE2BMAC + +/** + BLAKE2B MAC multiple blocks of memory to produce the authentication tag + @param key The secret key + @param keylen The length of the secret key (octets) + @param mac [out] Destination of the authentication tag + @param maclen [in/out] Max size and resulting size of authentication tag + @param in The data to BLAKE2B MAC + @param inlen The length of the data to BLAKE2B MAC (octets) + @param ... tuples of (data,len) pairs to BLAKE2B MAC, terminated with a (NULL,x) (x=don't care) + @return CRYPT_OK if successful +*/ +int blake2bmac_memory_multi(const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *maclen, const unsigned char *in, unsigned long inlen, ...) +{ + blake2bmac_state st; + int err; + va_list args; + const unsigned char *curptr; + unsigned long curlen; + + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(mac != NULL); + LTC_ARGCHK(maclen != NULL); + + va_start(args, inlen); + curptr = in; + curlen = inlen; + if ((err = blake2bmac_init(&st, *maclen, key, keylen)) != CRYPT_OK) { goto LBL_ERR; } + for (;;) { + if ((err = blake2bmac_process(&st, curptr, curlen)) != CRYPT_OK) { goto LBL_ERR; } + curptr = va_arg(args, const unsigned char*); + if (curptr == NULL) break; + curlen = va_arg(args, unsigned long); + } + err = blake2bmac_done(&st, mac, maclen); +LBL_ERR: +#ifdef LTC_CLEAN_STACK + zeromem(&st, sizeof(blake2bmac_state)); +#endif + va_end(args); + return err; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/blake2/blake2bmac_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/mac/blake2/blake2bmac_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,314 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_BLAKE2BMAC + +int blake2bmac_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + static const unsigned char tests[256][64] = { + /* source: https://github.com/BLAKE2/BLAKE2/blob/master/testvectors/blake2b-kat.txt */ + { 0x10, 0xeb, 0xb6, 0x77, 0x00, 0xb1, 0x86, 0x8e, 0xfb, 0x44, 0x17, 0x98, 0x7a, 0xcf, 0x46, 0x90, 0xae, 0x9d, 0x97, 0x2f, 0xb7, 0xa5, 0x90, 0xc2, 0xf0, 0x28, 0x71, 0x79, 0x9a, 0xaa, 0x47, 0x86, 0xb5, 0xe9, 0x96, 0xe8, 0xf0, 0xf4, 0xeb, 0x98, 0x1f, 0xc2, 0x14, 0xb0, 0x05, 0xf4, 0x2d, 0x2f, 0xf4, 0x23, 0x34, 0x99, 0x39, 0x16, 0x53, 0xdf, 0x7a, 0xef, 0xcb, 0xc1, 0x3f, 0xc5, 0x15, 0x68 }, + { 0x96, 0x1f, 0x6d, 0xd1, 0xe4, 0xdd, 0x30, 0xf6, 0x39, 0x01, 0x69, 0x0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, 0x29, 0x62, 0xb9, 0x92, 0x8f, 0xfa, 0xb5, 0x8d, 0xe4, 0xaf, 0x2e, 0xdd, 0x4e, 0x15, 0xd8, 0xb3, 0x55, 0x70, 0x52, 0x32, 0x07, 0xff, 0x4e, 0x2a, 0x5a, 0xa7, 0x75, 0x4c, 0xaa }, + { 0x46, 0x2f, 0x17, 0xbf, 0x00, 0x5f, 0xb1, 0xc1, 0xb9, 0xe6, 0x71, 0x77, 0x9f, 0x66, 0x52, 0x09, 0xec, 0x28, 0x73, 0xe3, 0xe4, 0x11, 0xf9, 0x8d, 0xab, 0xf2, 0x40, 0xa1, 0xd5, 0xec, 0x3f, 0x95, 0xce, 0x67, 0x96, 0xb6, 0xfc, 0x23, 0xfe, 0x17, 0x19, 0x03, 0xb5, 0x02, 0x02, 0x34, 0x67, 0xde, 0xc7, 0x27, 0x3f, 0xf7, 0x48, 0x79, 0xb9, 0x29, 0x67, 0xa2, 0xa4, 0x3a, 0x5a, 0x18, 0x3d, 0x33 }, + { 0xd3, 0x33, 0x81, 0x93, 0xb6, 0x45, 0x53, 0xdb, 0xd3, 0x8d, 0x14, 0x4b, 0xea, 0x71, 0xc5, 0x91, 0x5b, 0xb1, 0x10, 0xe2, 0xd8, 0x81, 0x80, 0xdb, 0xc5, 0xdb, 0x36, 0x4f, 0xd6, 0x17, 0x1d, 0xf3, 0x17, 0xfc, 0x72, 0x68, 0x83, 0x1b, 0x5a, 0xef, 0x75, 0xe4, 0x34, 0x2b, 0x2f, 0xad, 0x87, 0x97, 0xba, 0x39, 0xed, 0xdc, 0xef, 0x80, 0xe6, 0xec, 0x08, 0x15, 0x93, 0x50, 0xb1, 0xad, 0x69, 0x6d }, + { 0xe1, 0x59, 0x0d, 0x58, 0x5a, 0x3d, 0x39, 0xf7, 0xcb, 0x59, 0x9a, 0xbd, 0x47, 0x90, 0x70, 0x96, 0x64, 0x09, 0xa6, 0x84, 0x6d, 0x43, 0x77, 0xac, 0xf4, 0x47, 0x1d, 0x06, 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, 0x45, 0x05, 0x1c }, + { 0xde, 0x74, 0x8b, 0xcf, 0x89, 0xec, 0x88, 0x08, 0x47, 0x21, 0xe1, 0x6b, 0x85, 0xf3, 0x0a, 0xdb, 0x1a, 0x61, 0x34, 0xd6, 0x64, 0xb5, 0x84, 0x35, 0x69, 0xba, 0xbc, 0x5b, 0xbd, 0x1a, 0x15, 0xca, 0x9b, 0x61, 0x80, 0x3c, 0x90, 0x1a, 0x4f, 0xef, 0x32, 0x96, 0x5a, 0x17, 0x49, 0xc9, 0xf3, 0xa4, 0xe2, 0x43, 0xe1, 0x73, 0x93, 0x9d, 0xc5, 0xa8, 0xdc, 0x49, 0x5c, 0x67, 0x1a, 0xb5, 0x21, 0x45 }, + { 0xaa, 0xf4, 0xd2, 0xbd, 0xf2, 0x00, 0xa9, 0x19, 0x70, 0x6d, 0x98, 0x42, 0xdc, 0xe1, 0x6c, 0x98, 0x14, 0x0d, 0x34, 0xbc, 0x43, 0x3d, 0xf3, 0x20, 0xab, 0xa9, 0xbd, 0x42, 0x9e, 0x54, 0x9a, 0xa7, 0xa3, 0x39, 0x76, 0x52, 0xa4, 0xd7, 0x68, 0x27, 0x77, 0x86, 0xcf, 0x99, 0x3c, 0xde, 0x23, 0x38, 0x67, 0x3e, 0xd2, 0xe6, 0xb6, 0x6c, 0x96, 0x1f, 0xef, 0xb8, 0x2c, 0xd2, 0x0c, 0x93, 0x33, 0x8f }, + { 0xc4, 0x08, 0x21, 0x89, 0x68, 0xb7, 0x88, 0xbf, 0x86, 0x4f, 0x09, 0x97, 0xe6, 0xbc, 0x4c, 0x3d, 0xba, 0x68, 0xb2, 0x76, 0xe2, 0x12, 0x5a, 0x48, 0x43, 0x29, 0x60, 0x52, 0xff, 0x93, 0xbf, 0x57, 0x67, 0xb8, 0xcd, 0xce, 0x71, 0x31, 0xf0, 0x87, 0x64, 0x30, 0xc1, 0x16, 0x5f, 0xec, 0x6c, 0x4f, 0x47, 0xad, 0xaa, 0x4f, 0xd8, 0xb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0x44, 0x1b, 0xa6, 0x6f, 0x44, 0xb2, 0xac, 0xce, 0xe6, 0x16, 0x09, 0x17, 0x7e, 0xd3, 0x40, 0x12, 0x8b, 0x40, 0x7e, 0xce, 0xc7, 0xc6, 0x4b, 0xbe, 0x50, 0xd6, 0x3d, 0x22, 0xd8, 0x62, 0x77, 0x27 }, + { 0xf6, 0x3d, 0x88, 0x12, 0x28, 0x77, 0xec, 0x30, 0xb8, 0xc8, 0xb0, 0x0d, 0x22, 0xe8, 0x90, 0x00, 0xa9, 0x66, 0x42, 0x61, 0x12, 0xbd, 0x44, 0x16, 0x6e, 0x2f, 0x52, 0x5b, 0x76, 0x9c, 0xcb, 0xe9, 0xb2, 0x86, 0xd4, 0x37, 0xa0, 0x12, 0x91, 0x30, 0xdd, 0xe1, 0xa8, 0x6c, 0x43, 0xe0, 0x4b, 0xed, 0xb5, 0x94, 0xe6, 0x71, 0xd9, 0x82, 0x83, 0xaf, 0xe6, 0x4c, 0xe3, 0x31, 0xde, 0x98, 0x28, 0xfd }, + { 0x34, 0x8b, 0x05, 0x32, 0x88, 0x0b, 0x88, 0xa6, 0x61, 0x4a, 0x8d, 0x74, 0x08, 0xc3, 0xf9, 0x13, 0x35, 0x7f, 0xbb, 0x60, 0xe9, 0x95, 0xc6, 0x02, 0x05, 0xbe, 0x91, 0x39, 0xe7, 0x49, 0x98, 0xae, 0xde, 0x7f, 0x45, 0x81, 0xe4, 0x2f, 0x6b, 0x52, 0x69, 0x8f, 0x7f, 0xa1, 0x21, 0x97, 0x08, 0xc1, 0x44, 0x98, 0x06, 0x7f, 0xd1, 0xe0, 0x95, 0x02, 0xde, 0x83, 0xa7, 0x7d, 0xd2, 0x81, 0x15, 0x0c }, + { 0x51, 0x33, 0xdc, 0x8b, 0xef, 0x72, 0x53, 0x59, 0xdf, 0xf5, 0x97, 0x92, 0xd8, 0x5e, 0xaf, 0x75, 0xb7, 0xe1, 0xdc, 0xd1, 0x97, 0x8b, 0x01, 0xc3, 0x5b,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xb1, 0x21, 0xf9, 0x16, 0x1c, 0xb9, 0x2b, 0x69, 0xa9 }, + { 0x14, 0x27, 0x09, 0xd6, 0x2e, 0x28, 0xfc, 0xcc, 0xd0, 0xaf, 0x97, 0xfa, 0xd0, 0xf8, 0x46, 0x5b, 0x97, 0x1e, 0x82, 0x20, 0x1d, 0xc5, 0x10, 0x70, 0xfa, 0xa0, 0x37, 0x2a, 0xa4, 0x3e, 0x92, 0x48, 0x4b, 0xe1, 0xc1, 0xe7, 0x3b, 0xa1, 0x09, 0x06, 0xd5, 0xd1, 0x85, 0x3d, 0xb6, 0xa4, 0x10, 0x6e, 0x0a, 0x7b, 0xf9, 0x80, 0x0d, 0x37, 0x3d, 0x6d, 0xee, 0x2d, 0x46, 0xd6, 0x2e, 0xf2, 0xa4, 0x61 }, + }; + unsigned char inp[1000], out[1000]; + unsigned char key[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f }; + unsigned long ilen, klen = sizeof(key), mlen = 64; + blake2bmac_state st; + + for (ilen = 0; ilen < 256; ilen++) inp[ilen] = (unsigned char)ilen; + + for (ilen = 0; ilen < 256; ilen++) { + const unsigned char *mac = tests[ilen]; + unsigned long olen = mlen; + /* process piece by piece */ + if (ilen > 15) { + blake2bmac_init(&st, olen, key, klen); + blake2bmac_process(&st, (unsigned char*)inp, 5); + blake2bmac_process(&st, (unsigned char*)inp + 5, 4); + blake2bmac_process(&st, (unsigned char*)inp + 9, 3); + blake2bmac_process(&st, (unsigned char*)inp + 12, 2); + blake2bmac_process(&st, (unsigned char*)inp + 14, 1); + blake2bmac_process(&st, (unsigned char*)inp + 15, ilen - 15); + blake2bmac_done(&st, out, &olen); + if (compare_testvector(out, olen, mac, mlen, "BLAKE2B MAC multi", ilen) != 0) return CRYPT_FAIL_TESTVECTOR; + } + /* process in one go */ + blake2bmac_init(&st, olen, key, klen); + blake2bmac_process(&st, (unsigned char*)inp, ilen); + blake2bmac_done(&st, out, &olen); + if (compare_testvector(out, olen, mac, mlen, "BLAKE2B MAC single", ilen) != 0) return CRYPT_FAIL_TESTVECTOR; + } + return CRYPT_OK; +#endif +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/blake2/blake2smac.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/mac/blake2/blake2smac.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,66 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_BLAKE2SMAC + +/** + Initialize an BLAKE2S MAC context. + @param st The BLAKE2S MAC state + @param outlen The size of the MAC output (octets) + @param key The secret key + @param keylen The length of the secret key (octets) + @return CRYPT_OK if successful +*/ +int blake2smac_init(blake2smac_state *st, unsigned long outlen, const unsigned char *key, unsigned long keylen) +{ + LTC_ARGCHK(st != NULL); + LTC_ARGCHK(key != NULL); + return blake2s_init(st, outlen, key, keylen); +} + +/** + Process data through BLAKE2S MAC + @param st The BLAKE2S MAC state + @param in The data to send through HMAC + @param inlen The length of the data to HMAC (octets) + @return CRYPT_OK if successful +*/ +int blake2smac_process(blake2smac_state *st, const unsigned char *in, unsigned long inlen) +{ + if (inlen == 0) return CRYPT_OK; /* nothing to do */ + LTC_ARGCHK(st != NULL); + LTC_ARGCHK(in != NULL); + return blake2s_process(st, in, inlen); +} + +/** + Terminate a BLAKE2S MAC session + @param st The BLAKE2S MAC state + @param mac [out] The destination of the BLAKE2S MAC authentication tag + @param maclen [in/out] The max size and resulting size of the BLAKE2S MAC authentication tag + @return CRYPT_OK if successful +*/ +int blake2smac_done(blake2smac_state *st, unsigned char *mac, unsigned long *maclen) +{ + LTC_ARGCHK(st != NULL); + LTC_ARGCHK(mac != NULL); + LTC_ARGCHK(maclen != NULL); + LTC_ARGCHK(*maclen >= st->blake2s.outlen); + + *maclen = st->blake2s.outlen; + return blake2s_done(st, mac); +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/blake2/blake2smac_file.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/mac/blake2/blake2smac_file.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,83 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_BLAKE2SMAC + +/** + BLAKE2S MAC a file + @param fname The name of the file you wish to BLAKE2S MAC + @param key The secret key + @param keylen The length of the secret key + @param mac [out] The BLAKE2S MAC authentication tag + @param maclen [in/out] The max size and resulting size of the authentication tag + @return CRYPT_OK if successful, CRYPT_NOP if file support has been disabled +*/ +int blake2smac_file(const char *fname, const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *maclen) +{ +#ifdef LTC_NO_FILE + return CRYPT_NOP; +#else + blake2smac_state st; + FILE *in; + unsigned char *buf; + size_t x; + int err; + + LTC_ARGCHK(fname != NULL); + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(mac != NULL); + LTC_ARGCHK(maclen != NULL); + + if ((buf = XMALLOC(LTC_FILE_READ_BUFSIZE)) == NULL) { + return CRYPT_MEM; + } + + if ((err = blake2smac_init(&st, *maclen, key, keylen)) != CRYPT_OK) { + goto LBL_ERR; + } + + in = fopen(fname, "rb"); + if (in == NULL) { + err = CRYPT_FILE_NOTFOUND; + goto LBL_ERR; + } + + do { + x = fread(buf, 1, LTC_FILE_READ_BUFSIZE, in); + if ((err = blake2smac_process(&st, buf, (unsigned long)x)) != CRYPT_OK) { + fclose(in); + goto LBL_CLEANBUF; + } + } while (x == LTC_FILE_READ_BUFSIZE); + + if (fclose(in) != 0) { + err = CRYPT_ERROR; + goto LBL_CLEANBUF; + } + + err = blake2smac_done(&st, mac, maclen); + +LBL_CLEANBUF: + zeromem(buf, LTC_FILE_READ_BUFSIZE); +LBL_ERR: +#ifdef LTC_CLEAN_STACK + zeromem(&st, sizeof(blake2smac_state)); +#endif + XFREE(buf); + return err; +#endif +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/blake2/blake2smac_memory.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/mac/blake2/blake2smac_memory.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,48 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_BLAKE2SMAC + +/** + BLAKE2S MAC a block of memory to produce the authentication tag + @param key The secret key + @param keylen The length of the secret key (octets) + @param in The data to BLAKE2S MAC + @param inlen The length of the data to BLAKE2S MAC (octets) + @param mac [out] Destination of the authentication tag + @param maclen [in/out] Max size and resulting size of authentication tag + @return CRYPT_OK if successful +*/ +int blake2smac_memory(const unsigned char *key, unsigned long keylen, const unsigned char *in, unsigned long inlen, unsigned char *mac, unsigned long *maclen) +{ + blake2smac_state st; + int err; + + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(mac != NULL); + LTC_ARGCHK(maclen != NULL); + + if ((err = blake2smac_init(&st, *maclen, key, keylen)) != CRYPT_OK) { goto LBL_ERR; } + if ((err = blake2smac_process(&st, in, inlen)) != CRYPT_OK) { goto LBL_ERR; } + err = blake2smac_done(&st, mac, maclen); +LBL_ERR: +#ifdef LTC_CLEAN_STACK + zeromem(&st, sizeof(blake2smac_state)); +#endif + return err; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/blake2/blake2smac_memory_multi.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/mac/blake2/blake2smac_memory_multi.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,62 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" +#include + +#ifdef LTC_BLAKE2SMAC + +/** + BLAKE2S MAC multiple blocks of memory to produce the authentication tag + @param key The secret key + @param keylen The length of the secret key (octets) + @param mac [out] Destination of the authentication tag + @param maclen [in/out] Max size and resulting size of authentication tag + @param in The data to BLAKE2S MAC + @param inlen The length of the data to BLAKE2S MAC (octets) + @param ... tuples of (data,len) pairs to BLAKE2S MAC, terminated with a (NULL,x) (x=don't care) + @return CRYPT_OK if successful +*/ +int blake2smac_memory_multi(const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *maclen, const unsigned char *in, unsigned long inlen, ...) +{ + blake2smac_state st; + int err; + va_list args; + const unsigned char *curptr; + unsigned long curlen; + + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(mac != NULL); + LTC_ARGCHK(maclen != NULL); + + va_start(args, inlen); + curptr = in; + curlen = inlen; + if ((err = blake2smac_init(&st, *maclen, key, keylen)) != CRYPT_OK) { goto LBL_ERR; } + for (;;) { + if ((err = blake2smac_process(&st, curptr, curlen)) != CRYPT_OK) { goto LBL_ERR; } + curptr = va_arg(args, const unsigned char*); + if (curptr == NULL) break; + curlen = va_arg(args, unsigned long); + } + err = blake2smac_done(&st, mac, maclen); +LBL_ERR: +#ifdef LTC_CLEAN_STACK + zeromem(&st, sizeof(blake2smac_state)); +#endif + va_end(args); + return err; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/blake2/blake2smac_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/mac/blake2/blake2smac_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,314 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_BLAKE2SMAC + +int blake2smac_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + static const unsigned char tests[256][32] = { + /* source: https://github.com/BLAKE2/BLAKE2/blob/master/testvectors/blake2s-kat.txt */ + { 0x48, 0xa8, 0x99, 0x7d, 0xa4, 0x07, 0x87, 0x6b, 0x3d, 0x79, 0xc0, 0xd9, 0x23, 0x25, 0xad, 0x3b, 0x89, 0xcb, 0xb7, 0x54, 0xd8, 0x6a, 0xb7, 0x1a, 0xee, 0x04, 0x7a, 0xd3, 0x45, 0xfd, 0x2c, 0x49 }, + { 0x40, 0xd1, 0x5f, 0xee, 0x7c, 0x32, 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6d, 0xe5, 0x6f, 0xc9, 0xae, 0x95, 0x05, 0x9a, 0x99 }, + { 0xe3, 0xe3, 0xac, 0xe5, 0x37, 0xeb, 0x3e, 0xdd, 0x84, 0x63, 0xd9, 0xad, 0x35, 0x82, 0xe1, 0x3c, 0xf8, 0x65, 0x33, 0xff, 0xde, 0x43, 0xd6, 0x68, 0xdd, 0x2e, 0x93, 0xbb, 0xdb, 0xd7, 0x19, 0x5a }, + { 0x11, 0x0c, 0x50, 0xc0, 0xbf, 0x2c, 0x6e, 0x7a, 0xeb, 0x7e, 0x43, 0x5d, 0x92, 0xd1, 0x32, 0xab, 0x66, 0x55, 0x16, 0x8e, 0x78, 0xa2, 0xde, 0xcd, 0xec, 0x33, 0x30, 0x77, 0x76, 0x84, 0xd9, 0xc1 }, + { 0xe9, 0xba, 0x8f, 0x50, 0x5c, 0x9c, 0x80, 0xc0, 0x86, 0x66, 0xa7, 0x01, 0xf3, 0x36, 0x7e, 0x6c, 0xc6, 0x65, 0xf3, 0x4b, 0x22, 0xe7, 0x3c, 0x3c, 0x04, 0x17, 0xeb, 0x1c, 0x22, 0x06, 0x08, 0x2f }, + { 0x26, 0xcd, 0x66, 0xfc, 0xa0, 0x23, 0x79, 0xc7, 0x6d, 0xf1, 0x23, 0x17, 0x05, 0x2b, 0xca, 0xfd, 0x6c, 0xd8, 0xc3, 0xa7, 0xb8, 0x90, 0xd8, 0x05, 0xf3, 0x6c, 0x49, 0x98, 0x97, 0x82, 0x43, 0x3a }, + { 0x21, 0x3f, 0x35, 0x96, 0xd6, 0xe3, 0xa5, 0xd0, 0xe9, 0x93, 0x2c, 0xd2, 0x15, 0x91, 0x46, 0x01, 0x5e, 0x2a, 0xbc, 0x94, 0x9f, 0x47, 0x29, 0xee, 0x26, 0x32, 0xfe, 0x1e, 0xdb, 0x78, 0xd3, 0x37 }, + { 0x10, 0x15, 0xd7, 0x01, 0x08, 0xe0, 0x3b, 0xe1, 0xc7, 0x02, 0xfe, 0x97, 0x25, 0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, 0xa2, 0xc5, 0x0c, 0x8e, 0xbd, 0x10, 0x13, 0x47 }, + { 0x56, 0xf8, 0xcc, 0xf1, 0xf8, 0x64, 0x09, 0xb4, 0x6c, 0xe3, 0x61, 0x66, 0xae, 0x91, 0x65, 0x13, 0x84, 0x41, 0x57, 0x75, 0x89, 0xdb, 0x08, 0xcb, 0xc5, 0xf6, 0x6c, 0xa2, 0x97, 0x43, 0xb9, 0xfd }, + { 0x97, 0x06, 0xc0, 0x92, 0xb0, 0x4d, 0x91, 0xf5, 0x3d, 0xff, 0x91, 0xfa, 0x37, 0xb7, 0x49, 0x3d, 0x28, 0xb5, 0x76, 0xb5, 0xd7, 0x10, 0x46, 0x9d, 0xf7, 0x94, 0x01, 0x66, 0x22, 0x36, 0xfc, 0x03 }, + { 0x87, 0x79, 0x68, 0x68, 0x6c, 0x06, 0x8c, 0xe2, 0xf7, 0xe2, 0xad, 0xcf, 0xf6, 0x8b, 0xf8, 0x74, 0x8e, 0xdf, 0x3c, 0xf8, 0x62, 0xcf, 0xb4, 0xd3, 0x94, 0x7a, 0x31, 0x06, 0x95, 0x80, 0x54, 0xe3 }, + { 0x88, 0x17, 0xe5, 0x71, 0x98, 0x79, 0xac, 0xf7, 0x02, 0x47, 0x87, 0xec, 0xcd, 0xb2, 0x71, 0x03, 0x55, 0x66, 0xcf, 0xa3, 0x33, 0xe0, 0x49, 0x40, 0x7c, 0x01, 0x78, 0xcc, 0xc5, 0x7a, 0x5b, 0x9f }, + { 0x89, 0x38, 0x24, 0x9e, 0x4b, 0x50, 0xca, 0xda, 0xcc, 0xdf, 0x5b, 0x18, 0x62, 0x13, 0x26, 0xcb, 0xb1, 0x52, 0x53, 0xe3, 0x3a, 0x20, 0xf5, 0x63, 0x6e, 0x99, 0x5d, 0x72, 0x47, 0x8d, 0xe4, 0x72 }, + { 0xf1, 0x64, 0xab, 0xba, 0x49, 0x63, 0xa4, 0x4d, 0x10, 0x72, 0x57, 0xe3, 0x23, 0x2d, 0x90, 0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xc1, 0x88, 0x4d, 0x5c, 0x86, 0x48, 0x89, 0xab, 0xc9, 0x66, 0x77 }, + { 0x81, 0xea, 0x0b, 0x78, 0x04, 0x12, 0x4e, 0x0c, 0x22, 0xea, 0x5f, 0xc7, 0x11, 0x04, 0xa2, 0xaf, 0xcb, 0x52, 0xa1, 0xfa, 0x81, 0x6f, 0x3e, 0xcb, 0x7d, 0xcb, 0x5d, 0x9d, 0xea, 0x17, 0x86, 0xd0 }, + { 0xfe, 0x36, 0x27, 0x33, 0xb0, 0x5f, 0x6b, 0xed, 0xaf, 0x93, 0x79, 0xd7, 0xf7, 0x93, 0x6e, 0xde, 0x20, 0x9b, 0x1f, 0x83, 0x23, 0xc3, 0x92, 0x25, 0x49, 0xd9, 0xe7, 0x36, 0x81, 0xb5, 0xdb, 0x7b }, + { 0xef, 0xf3, 0x7d, 0x30, 0xdf, 0xd2, 0x03, 0x59, 0xbe, 0x4e, 0x73, 0xfd, 0xf4, 0x0d, 0x27, 0x73, 0x4b, 0x3d, 0xf9, 0x0a, 0x97, 0xa5, 0x5e, 0xd7, 0x45, 0x29, 0x72, 0x94, 0xca, 0x85, 0xd0, 0x9f }, + { 0x17, 0x2f, 0xfc, 0x67, 0x15, 0x3d, 0x12, 0xe0, 0xca, 0x76, 0xa8, 0xb6, 0xcd, 0x5d, 0x47, 0x31, 0x88, 0x5b, 0x39, 0xce, 0x0c, 0xac, 0x93, 0xa8, 0x97, 0x2a, 0x18, 0x00, 0x6c, 0x8b, 0x8b, 0xaf }, + { 0xc4, 0x79, 0x57, 0xf1, 0xcc, 0x88, 0xe8, 0x3e, 0xf9, 0x44, 0x58, 0x39, 0x70, 0x9a, 0x48, 0x0a, 0x03, 0x6b, 0xed, 0x5f, 0x88, 0xac, 0x0f, 0xcc, 0x8e, 0x1e, 0x70, 0x3f, 0xfa, 0xac, 0x13, 0x2c }, + { 0x30, 0xf3, 0x54, 0x83, 0x70, 0xcf, 0xdc, 0xed, 0xa5, 0xc3, 0x7b, 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, 0xce, 0xdb }, + { 0xbd, 0xdc, 0x65, 0x14, 0xd7, 0xee, 0x6a, 0xce, 0x0a, 0x4a, 0xc1, 0xd0, 0xe0, 0x68, 0x11, 0x22, 0x88, 0xcb, 0xcf, 0x56, 0x04, 0x54, 0x64, 0x27, 0x05, 0x63, 0x01, 0x77, 0xcb, 0xa6, 0x08, 0xbd }, + { 0xd6, 0x35, 0x99, 0x4f, 0x62, 0x91, 0x51, 0x7b, 0x02, 0x81, 0xff, 0xdd, 0x49, 0x6a, 0xfa, 0x86, 0x27, 0x12, 0xe5, 0xb3, 0xc4, 0xe5, 0x2e, 0x4c, 0xd5, 0xfd, 0xae, 0x8c, 0x0e, 0x72, 0xfb, 0x08 }, + { 0x87, 0x8d, 0x9c, 0xa6, 0x00, 0xcf, 0x87, 0xe7, 0x69, 0xcc, 0x30, 0x5c, 0x1b, 0x35, 0x25, 0x51, 0x86, 0x61, 0x5a, 0x73, 0xa0, 0xda, 0x61, 0x3b, 0x5f, 0x1c, 0x98, 0xdb, 0xf8, 0x12, 0x83, 0xea }, + { 0xa6, 0x4e, 0xbe, 0x5d, 0xc1, 0x85, 0xde, 0x9f, 0xdd, 0xe7, 0x60, 0x7b, 0x69, 0x98, 0x70, 0x2e, 0xb2, 0x34, 0x56, 0x18, 0x49, 0x57, 0x30, 0x7d, 0x2f, 0xa7, 0x2e, 0x87, 0xa4, 0x77, 0x02, 0xd6 }, + { 0xce, 0x50, 0xea, 0xb7, 0xb5, 0xeb, 0x52, 0xbd, 0xc9, 0xad, 0x8e, 0x5a, 0x48, 0x0a, 0xb7, 0x80, 0xca, 0x93, 0x20, 0xe4, 0x43, 0x60, 0xb1, 0xfe, 0x37, 0xe0, 0x3f, 0x2f, 0x7a, 0xd7, 0xde, 0x01 }, + { 0xee, 0xdd, 0xb7, 0xc0, 0xdb, 0x6e, 0x30, 0xab, 0xe6, 0x6d, 0x79, 0xe3, 0x27, 0x51, 0x1e, 0x61, 0xfc, 0xeb, 0xbc, 0x29, 0xf1, 0x59, 0xb4, 0x0a, 0x86, 0xb0, 0x46, 0xec, 0xf0, 0x51, 0x38, 0x23 }, + { 0x78, 0x7f, 0xc9, 0x34, 0x40, 0xc1, 0xec, 0x96, 0xb5, 0xad, 0x01, 0xc1, 0x6c, 0xf7, 0x79, 0x16, 0xa1, 0x40, 0x5f, 0x94, 0x26, 0x35, 0x6e, 0xc9, 0x21, 0xd8, 0xdf, 0xf3, 0xea, 0x63, 0xb7, 0xe0 }, + { 0x7f, 0x0d, 0x5e, 0xab, 0x47, 0xee, 0xfd, 0xa6, 0x96, 0xc0, 0xbf, 0x0f, 0xbf, 0x86, 0xab, 0x21, 0x6f, 0xce, 0x46, 0x1e, 0x93, 0x03, 0xab, 0xa6, 0xac, 0x37, 0x41, 0x20, 0xe8, 0x90, 0xe8, 0xdf }, + { 0xb6, 0x80, 0x04, 0xb4, 0x2f, 0x14, 0xad, 0x02, 0x9f, 0x4c, 0x2e, 0x03, 0xb1, 0xd5, 0xeb, 0x76, 0xd5, 0x71, 0x60, 0xe2, 0x64, 0x76, 0xd2, 0x11, 0x31, 0xbe, 0xf2, 0x0a, 0xda, 0x7d, 0x27, 0xf4 }, + { 0xb0, 0xc4, 0xeb, 0x18, 0xae, 0x25, 0x0b, 0x51, 0xa4, 0x13, 0x82, 0xea, 0xd9, 0x2d, 0x0d, 0xc7, 0x45, 0x5f, 0x93, 0x79, 0xfc, 0x98, 0x84, 0x42, 0x8e, 0x47, 0x70, 0x60, 0x8d, 0xb0, 0xfa, 0xec }, + { 0xf9, 0x2b, 0x7a, 0x87, 0x0c, 0x05, 0x9f, 0x4d, 0x46, 0x46, 0x4c, 0x82, 0x4e, 0xc9, 0x63, 0x55, 0x14, 0x0b, 0xdc, 0xe6, 0x81, 0x32, 0x2c, 0xc3, 0xa9, 0x92, 0xff, 0x10, 0x3e, 0x3f, 0xea, 0x52 }, + { 0x53, 0x64, 0x31, 0x26, 0x14, 0x81, 0x33, 0x98, 0xcc, 0x52, 0x5d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, 0x62, 0x2c, 0xb9, 0x86, 0xe7, 0x69, 0xc7, 0x8e, 0xdd, 0x73, 0x3e }, + { 0x9a, 0xb8, 0xea, 0xbb, 0x14, 0x16, 0x43, 0x4d, 0x85, 0x39, 0x13, 0x41, 0xd5, 0x69, 0x93, 0xc5, 0x54, 0x58, 0x16, 0x7d, 0x44, 0x18, 0xb1, 0x9a, 0x0f, 0x2a, 0xd8, 0xb7, 0x9a, 0x83, 0xa7, 0x5b }, + { 0x79, 0x92, 0xd0, 0xbb, 0xb1, 0x5e, 0x23, 0x82, 0x6f, 0x44, 0x3e, 0x00, 0x50, 0x5d, 0x68, 0xd3, 0xed, 0x73, 0x72, 0x99, 0x5a, 0x5c, 0x3e, 0x49, 0x86, 0x54, 0x10, 0x2f, 0xbc, 0xd0, 0x96, 0x4e }, + { 0xc0, 0x21, 0xb3, 0x00, 0x85, 0x15, 0x14, 0x35, 0xdf, 0x33, 0xb0, 0x07, 0xcc, 0xec, 0xc6, 0x9d, 0xf1, 0x26, 0x9f, 0x39, 0xba, 0x25, 0x09, 0x2b, 0xed, 0x59, 0xd9, 0x32, 0xac, 0x0f, 0xdc, 0x28 }, + { 0x91, 0xa2, 0x5e, 0xc0, 0xec, 0x0d, 0x9a, 0x56, 0x7f, 0x89, 0xc4, 0xbf, 0xe1, 0xa6, 0x5a, 0x0e, 0x43, 0x2d, 0x07, 0x06, 0x4b, 0x41, 0x90, 0xe2, 0x7d, 0xfb, 0x81, 0x90, 0x1f, 0xd3, 0x13, 0x9b }, + { 0x59, 0x50, 0xd3, 0x9a, 0x23, 0xe1, 0x54, 0x5f, 0x30, 0x12, 0x70, 0xaa, 0x1a, 0x12, 0xf2, 0xe6, 0xc4, 0x53, 0x77, 0x6e, 0x4d, 0x63, 0x55, 0xde, 0x42, 0x5c, 0xc1, 0x53, 0xf9, 0x81, 0x88, 0x67 }, + { 0xd7, 0x9f, 0x14, 0x72, 0x0c, 0x61, 0x0a, 0xf1, 0x79, 0xa3, 0x76, 0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xbb, 0xdb, 0xab, 0xe4, 0xf4, 0xd6, 0x74, 0xde, 0xd5, 0x3f, 0xfc, 0x6b }, + { 0xf1, 0x95, 0xf3, 0x21, 0xe9, 0xe3, 0xd6, 0xbd, 0x7d, 0x07, 0x45, 0x04, 0xdd, 0x2a, 0xb0, 0xe6, 0x24, 0x1f, 0x92, 0xe7, 0x84, 0xb1, 0xaa, 0x27, 0x1f, 0xf6, 0x48, 0xb1, 0xca, 0xb6, 0xd7, 0xf6 }, + { 0x27, 0xe4, 0xcc, 0x72, 0x09, 0x0f, 0x24, 0x12, 0x66, 0x47, 0x6a, 0x7c, 0x09, 0x49, 0x5f, 0x2d, 0xb1, 0x53, 0xd5, 0xbc, 0xbd, 0x76, 0x19, 0x03, 0xef, 0x79, 0x27, 0x5e, 0xc5, 0x6b, 0x2e, 0xd8 }, + { 0x89, 0x9c, 0x24, 0x05, 0x78, 0x8e, 0x25, 0xb9, 0x9a, 0x18, 0x46, 0x35, 0x5e, 0x64, 0x6d, 0x77, 0xcf, 0x40, 0x00, 0x83, 0x41, 0x5f, 0x7d, 0xc5, 0xaf, 0xe6, 0x9d, 0x6e, 0x17, 0xc0, 0x00, 0x23 }, + { 0xa5, 0x9b, 0x78, 0xc4, 0x90, 0x57, 0x44, 0x07, 0x6b, 0xfe, 0xe8, 0x94, 0xde, 0x70, 0x7d, 0x4f, 0x12, 0x0b, 0x5c, 0x68, 0x93, 0xea, 0x04, 0x00, 0x29, 0x7d, 0x0b, 0xb8, 0x34, 0x72, 0x76, 0x32 }, + { 0x59, 0xdc, 0x78, 0xb1, 0x05, 0x64, 0x97, 0x07, 0xa2, 0xbb, 0x44, 0x19, 0xc4, 0x8f, 0x00, 0x54, 0x00, 0xd3, 0x97, 0x3d, 0xe3, 0x73, 0x66, 0x10, 0x23, 0x04, 0x35, 0xb1, 0x04, 0x24, 0xb2, 0x4f }, + { 0xc0, 0x14, 0x9d, 0x1d, 0x7e, 0x7a, 0x63, 0x53, 0xa6, 0xd9, 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fa, 0xd0, 0xa9, 0xd8, 0x58, 0xb3, 0x31, 0x5b, 0xad, 0x34, 0xbd, 0xe9, 0x99, 0xef, 0xd7, 0x24, 0xdd }, + }; + unsigned char inp[1000], out[1000]; + unsigned char key[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }; + unsigned long ilen, klen = sizeof(key), mlen = 32; + blake2smac_state st; + + for (ilen = 0; ilen < 256; ilen++) inp[ilen] = (unsigned char)ilen; + + for (ilen = 0; ilen < 256; ilen++) { + const unsigned char *mac = tests[ilen]; + unsigned long olen = mlen; + /* process piece by piece */ + if (ilen > 15) { + blake2smac_init(&st, olen, key, klen); + blake2smac_process(&st, (unsigned char*)inp, 5); + blake2smac_process(&st, (unsigned char*)inp + 5, 4); + blake2smac_process(&st, (unsigned char*)inp + 9, 3); + blake2smac_process(&st, (unsigned char*)inp + 12, 2); + blake2smac_process(&st, (unsigned char*)inp + 14, 1); + blake2smac_process(&st, (unsigned char*)inp + 15, ilen - 15); + blake2smac_done(&st, out, &olen); + if (compare_testvector(out, olen, mac, mlen, "BLAKE2S MAC multi", ilen) != 0) return CRYPT_FAIL_TESTVECTOR; + } + /* process in one go */ + blake2smac_init(&st, olen, key, klen); + blake2smac_process(&st, (unsigned char*)inp, ilen); + blake2smac_done(&st, out, &olen); + if (compare_testvector(out, olen, mac, mlen, "BLAKE2S MAC single", ilen) != 0) return CRYPT_FAIL_TESTVECTOR; + } + return CRYPT_OK; +#endif +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/f9/f9_done.c --- a/libtomcrypt/src/mac/f9/f9_done.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/f9/f9_done.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -62,7 +60,7 @@ out[x] = f9->ACC[x]; } *outlen = x; - + #ifdef LTC_CLEAN_STACK zeromem(f9, sizeof(*f9)); #endif @@ -71,7 +69,7 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/f9/f9_file.c --- a/libtomcrypt/src/mac/f9/f9_file.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/f9/f9_file.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,12 +5,10 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file f9_file.c f9 support, process a file, Tom St Denis */ @@ -22,62 +20,72 @@ @param cipher The index of the cipher desired @param key The secret key @param keylen The length of the secret key (octets) - @param filename The name of the file you wish to f9 + @param fname The name of the file you wish to f9 @param out [out] Where the authentication tag is to be stored @param outlen [in/out] The max size and resulting size of the authentication tag @return CRYPT_OK if successful, CRYPT_NOP if file support has been disabled */ int f9_file(int cipher, const unsigned char *key, unsigned long keylen, - const char *filename, + const char *fname, unsigned char *out, unsigned long *outlen) { #ifdef LTC_NO_FILE return CRYPT_NOP; #else - int err, x; + size_t x; + int err; f9_state f9; FILE *in; - unsigned char buf[512]; + unsigned char *buf; - LTC_ARGCHK(key != NULL); - LTC_ARGCHK(filename != NULL); - LTC_ARGCHK(out != NULL); - LTC_ARGCHK(outlen != NULL); + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(fname != NULL); + LTC_ARGCHK(out != NULL); + LTC_ARGCHK(outlen != NULL); - in = fopen(filename, "rb"); - if (in == NULL) { - return CRYPT_FILE_NOTFOUND; + if ((buf = XMALLOC(LTC_FILE_READ_BUFSIZE)) == NULL) { + return CRYPT_MEM; } if ((err = f9_init(&f9, cipher, key, keylen)) != CRYPT_OK) { - fclose(in); - return err; + goto LBL_ERR; + } + + in = fopen(fname, "rb"); + if (in == NULL) { + err = CRYPT_FILE_NOTFOUND; + goto LBL_ERR; } do { - x = fread(buf, 1, sizeof(buf), in); - if ((err = f9_process(&f9, buf, x)) != CRYPT_OK) { + x = fread(buf, 1, LTC_FILE_READ_BUFSIZE, in); + if ((err = f9_process(&f9, buf, (unsigned long)x)) != CRYPT_OK) { fclose(in); - return err; + goto LBL_CLEANBUF; } - } while (x == sizeof(buf)); - fclose(in); + } while (x == LTC_FILE_READ_BUFSIZE); - if ((err = f9_done(&f9, out, outlen)) != CRYPT_OK) { - return err; + if (fclose(in) != 0) { + err = CRYPT_ERROR; + goto LBL_CLEANBUF; } + err = f9_done(&f9, out, outlen); + +LBL_CLEANBUF: + zeromem(buf, LTC_FILE_READ_BUFSIZE); +LBL_ERR: #ifdef LTC_CLEAN_STACK - zeromem(buf, sizeof(buf)); + zeromem(&f9, sizeof(f9_state)); #endif - - return CRYPT_OK; + XFREE(buf); + return err; #endif } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/f9/f9_init.c --- a/libtomcrypt/src/mac/f9/f9_init.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/f9/f9_init.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -45,12 +43,12 @@ if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, &f9->key)) != CRYPT_OK) { goto done; } - + /* make the second key */ for (x = 0; (unsigned)x < keylen; x++) { f9->akey[x] = key[x] ^ 0xAA; } - + /* setup struct */ zeromem(f9->IV, cipher_descriptor[cipher].block_length); zeromem(f9->ACC, cipher_descriptor[cipher].block_length); @@ -64,7 +62,7 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/f9/f9_memory.c --- a/libtomcrypt/src/mac/f9/f9_memory.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/f9/f9_memory.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -17,7 +15,7 @@ #ifdef LTC_F9_MODE -/** f9-MAC a block of memory +/** f9-MAC a block of memory @param cipher Index of cipher to use @param key [in] Secret key @param keylen Length of key in octets @@ -27,7 +25,7 @@ @param outlen [in/out] Output size and final tag size Return CRYPT_OK on success. */ -int f9_memory(int cipher, +int f9_memory(int cipher, const unsigned char *key, unsigned long keylen, const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen) @@ -66,6 +64,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/f9/f9_memory_multi.c --- a/libtomcrypt/src/mac/f9/f9_memory_multi.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/f9/f9_memory_multi.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,13 +5,11 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" #include -/** +/** @file f9_memory_multi.c f9 support, process multiple blocks of memory, Tom St Denis */ @@ -19,7 +17,7 @@ #ifdef LTC_F9_MODE /** - f9 multiple blocks of memory + f9 multiple blocks of memory @param cipher The index of the desired cipher @param key The secret key @param keylen The length of the secret key (octets) @@ -30,7 +28,7 @@ @param ... tuples of (data,len) pairs to f9, terminated with a (NULL,x) (x=don't care) @return CRYPT_OK if successful */ -int f9_memory_multi(int cipher, +int f9_memory_multi(int cipher, const unsigned char *key, unsigned long keylen, unsigned char *out, unsigned long *outlen, const unsigned char *in, unsigned long inlen, ...) @@ -57,7 +55,7 @@ goto LBL_ERR; } va_start(args, inlen); - curptr = in; + curptr = in; curlen = inlen; for (;;) { /* process buf */ @@ -80,11 +78,11 @@ #endif XFREE(f9); va_end(args); - return err; + return err; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/f9/f9_process.c --- a/libtomcrypt/src/mac/f9/f9_process.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/f9/f9_process.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -44,35 +42,35 @@ if (f9->buflen == 0) { while (inlen >= (unsigned long)f9->blocksize) { for (x = 0; x < f9->blocksize; x += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)&(f9->IV[x])) ^= *((LTC_FAST_TYPE*)&(in[x])); + *(LTC_FAST_TYPE_PTR_CAST(&(f9->IV[x]))) ^= *(LTC_FAST_TYPE_PTR_CAST(&(in[x]))); } cipher_descriptor[f9->cipher].ecb_encrypt(f9->IV, f9->IV, &f9->key); for (x = 0; x < f9->blocksize; x += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)&(f9->ACC[x])) ^= *((LTC_FAST_TYPE*)&(f9->IV[x])); + *(LTC_FAST_TYPE_PTR_CAST(&(f9->ACC[x]))) ^= *(LTC_FAST_TYPE_PTR_CAST(&(f9->IV[x]))); } in += f9->blocksize; inlen -= f9->blocksize; } - } + } #endif while (inlen) { - if (f9->buflen == f9->blocksize) { + if (f9->buflen == f9->blocksize) { cipher_descriptor[f9->cipher].ecb_encrypt(f9->IV, f9->IV, &f9->key); for (x = 0; x < f9->blocksize; x++) { f9->ACC[x] ^= f9->IV[x]; } f9->buflen = 0; - } - f9->IV[f9->buflen++] ^= *in++; - --inlen; - } - return CRYPT_OK; + } + f9->IV[f9->buflen++] ^= *in++; + --inlen; + } + return CRYPT_OK; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/f9/f9_test.c --- a/libtomcrypt/src/mac/f9/f9_test.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/f9/f9_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,14 +5,12 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file f9_test.c - f9 Support, Test F9 mode + f9 Support, Test F9 mode */ #ifdef LTC_F9_MODE @@ -39,7 +37,7 @@ { 105, { 0x83, 0xFD, 0x23, 0xA2, 0x44, 0xA7, 0x4C, 0xF3, 0x58, 0xDA, 0x30, 0x19, 0xF1, 0x72, 0x26, 0x35 }, - { 0x36, 0xAF, 0x61, 0x44, 0x4F, 0x30, 0x2A, 0xD2, + { 0x36, 0xAF, 0x61, 0x44, 0x4F, 0x30, 0x2A, 0xD2, 0x35, 0xC6, 0x87, 0x16, 0x63, 0x3C, 0x66, 0xFB, 0x75, 0x0C, 0x26, 0x68, 0x65, 0xD5, 0x3C, 0x11, 0xEA, 0x05, 0xB1, 0xE9, 0xFA, 0x49, 0xC8, 0x39, 0x8D, 0x48, 0xE1, 0xEF, 0xA5, 0x90, 0x9D, 0x39, 0x47, 0x90, 0x28, 0x37, 0xF5, 0xAE, 0x96, 0xD5, 0xA0, 0x5B, 0xC8, 0xD6, 0x1C, 0xA8, 0xDB, 0xEF, 0x1B, 0x13, 0xA4, 0xB4, 0xAB, 0xFE, 0x4F, 0xB1, 0x00, 0x60, 0x45, 0xB6, 0x74, 0xBB, 0x54, 0x72, 0x93, 0x04, 0xC3, 0x82, 0xBE, 0x53, 0xA5, 0xAF, 0x05, 0x55, 0x61, 0x76, 0xF6, 0xEA, 0xA2, 0xEF, 0x1D, 0x05, 0xE4, 0xB0, 0x83, 0x18, 0x1E, 0xE6, 0x74, 0xCD, 0xA5, 0xA4, 0x85, 0xF7, 0x4D, 0x7A, @@ -61,7 +59,7 @@ if ((err = f9_memory(idx, tests[x].K, 16, tests[x].M, tests[x].msglen, T, &taglen)) != CRYPT_OK) { return err; } - if (taglen != 4 || XMEMCMP(T, tests[x].T, 4)) { + if (compare_testvector(T, taglen, tests[x].T, 4, "F9", x)) { return CRYPT_FAIL_TESTVECTOR; } } @@ -72,7 +70,7 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/hmac/hmac_done.c --- a/libtomcrypt/src/mac/hmac/hmac_done.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/hmac/hmac_done.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,14 +5,12 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file hmac_done.c - LTC_HMAC support, terminate stream, Tom St Denis/Dobes Vandermeer + HMAC support, terminate stream, Tom St Denis/Dobes Vandermeer */ #ifdef LTC_HMAC @@ -20,10 +18,10 @@ #define LTC_HMAC_BLOCKSIZE hash_descriptor[hash].blocksize /** - Terminate an LTC_HMAC session - @param hmac The LTC_HMAC state - @param out [out] The destination of the LTC_HMAC authentication tag - @param outlen [in/out] The max size and resulting size of the LTC_HMAC authentication tag + Terminate an HMAC session + @param hmac The HMAC state + @param out [out] The destination of the HMAC authentication tag + @param outlen [in/out] The max size and resulting size of the HMAC authentication tag @return CRYPT_OK if successful */ int hmac_done(hmac_state *hmac, unsigned char *out, unsigned long *outlen) @@ -48,7 +46,7 @@ goto LBL_ERR; } - /* Create the second LTC_HMAC vector vector for step (3) */ + /* Create the second HMAC vector vector for step (3) */ for(i=0; i < LTC_HMAC_BLOCKSIZE; i++) { buf[i] = hmac->key[i] ^ 0x5C; } @@ -87,6 +85,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/hmac/hmac_file.c --- a/libtomcrypt/src/mac/hmac/hmac_file.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/hmac/hmac_file.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,30 +5,28 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file hmac_file.c - LTC_HMAC support, process a file, Tom St Denis/Dobes Vandermeer + HMAC support, process a file, Tom St Denis/Dobes Vandermeer */ #ifdef LTC_HMAC /** - LTC_HMAC a file + HMAC a file @param hash The index of the hash you wish to use - @param fname The name of the file you wish to LTC_HMAC + @param fname The name of the file you wish to HMAC @param key The secret key @param keylen The length of the secret key - @param out [out] The LTC_HMAC authentication tag + @param out [out] The HMAC authentication tag @param outlen [in/out] The max size and resulting size of the authentication tag @return CRYPT_OK if successful, CRYPT_NOP if file support has been disabled */ -int hmac_file(int hash, const char *fname, - const unsigned char *key, unsigned long keylen, +int hmac_file(int hash, const char *fname, + const unsigned char *key, unsigned long keylen, unsigned char *out, unsigned long *outlen) { #ifdef LTC_NO_FILE @@ -37,7 +35,7 @@ #else hmac_state hmac; FILE *in; - unsigned char buf[512]; + unsigned char *buf; size_t x; int err; @@ -45,50 +43,53 @@ LTC_ARGCHK(key != NULL); LTC_ARGCHK(out != NULL); LTC_ARGCHK(outlen != NULL); - - if((err = hash_is_valid(hash)) != CRYPT_OK) { - return err; + + if ((buf = XMALLOC(LTC_FILE_READ_BUFSIZE)) == NULL) { + return CRYPT_MEM; + } + + if ((err = hash_is_valid(hash)) != CRYPT_OK) { + goto LBL_ERR; } if ((err = hmac_init(&hmac, hash, key, keylen)) != CRYPT_OK) { - return err; + goto LBL_ERR; } in = fopen(fname, "rb"); if (in == NULL) { - return CRYPT_FILE_NOTFOUND; + err = CRYPT_FILE_NOTFOUND; + goto LBL_ERR; } - /* process the file contents */ do { - x = fread(buf, 1, sizeof(buf), in); + x = fread(buf, 1, LTC_FILE_READ_BUFSIZE, in); if ((err = hmac_process(&hmac, buf, (unsigned long)x)) != CRYPT_OK) { - /* we don't trap this error since we're already returning an error! */ - fclose(in); - return err; + fclose(in); /* we don't trap this error since we're already returning an error! */ + goto LBL_CLEANBUF; } - } while (x == sizeof(buf)); + } while (x == LTC_FILE_READ_BUFSIZE); if (fclose(in) != 0) { - return CRYPT_ERROR; + err = CRYPT_ERROR; + goto LBL_CLEANBUF; } - /* get final hmac */ - if ((err = hmac_done(&hmac, out, outlen)) != CRYPT_OK) { - return err; - } + err = hmac_done(&hmac, out, outlen); +LBL_CLEANBUF: + zeromem(buf, LTC_FILE_READ_BUFSIZE); +LBL_ERR: #ifdef LTC_CLEAN_STACK - /* clear memory */ - zeromem(buf, sizeof(buf)); -#endif - return CRYPT_OK; + zeromem(&hmac, sizeof(hmac_state)); +#endif + XFREE(buf); + return err; #endif } #endif - -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/hmac/hmac_init.c --- a/libtomcrypt/src/mac/hmac/hmac_init.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/hmac/hmac_init.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,14 +5,12 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file hmac_init.c - LTC_HMAC support, initialize state, Tom St Denis/Dobes Vandermeer + HMAC support, initialize state, Tom St Denis/Dobes Vandermeer */ #ifdef LTC_HMAC @@ -20,8 +18,8 @@ #define LTC_HMAC_BLOCKSIZE hash_descriptor[hash].blocksize /** - Initialize an LTC_HMAC context. - @param hmac The LTC_HMAC state + Initialize an HMAC context. + @param hmac The HMAC state @param hash The index of the hash you want to use @param key The secret key @param keylen The length of the secret key (octets) @@ -61,18 +59,16 @@ if ((err = hash_memory(hash, key, keylen, hmac->key, &z)) != CRYPT_OK) { goto LBL_ERR; } - if(hashsize < LTC_HMAC_BLOCKSIZE) { - zeromem((hmac->key) + hashsize, (size_t)(LTC_HMAC_BLOCKSIZE - hashsize)); - } keylen = hashsize; } else { XMEMCPY(hmac->key, key, (size_t)keylen); + } + if(keylen < LTC_HMAC_BLOCKSIZE) { zeromem((hmac->key) + keylen, (size_t)(LTC_HMAC_BLOCKSIZE - keylen)); } - } - /* Create the initial vector for step (3) */ + /* Create the initialization vector for step (3) */ for(i=0; i < LTC_HMAC_BLOCKSIZE; i++) { buf[i] = hmac->key[i] ^ 0x36; } @@ -99,6 +95,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/hmac/hmac_memory.c --- a/libtomcrypt/src/mac/hmac/hmac_memory.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/hmac/hmac_memory.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,32 +5,30 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file hmac_memory.c - LTC_HMAC support, process a block of memory, Tom St Denis/Dobes Vandermeer + HMAC support, process a block of memory, Tom St Denis/Dobes Vandermeer */ #ifdef LTC_HMAC /** - LTC_HMAC a block of memory to produce the authentication tag - @param hash The index of the hash to use - @param key The secret key + HMAC a block of memory to produce the authentication tag + @param hash The index of the hash to use + @param key The secret key @param keylen The length of the secret key (octets) - @param in The data to LTC_HMAC - @param inlen The length of the data to LTC_HMAC (octets) + @param in The data to HMAC + @param inlen The length of the data to HMAC (octets) @param out [out] Destination of the authentication tag @param outlen [in/out] Max size and resulting size of authentication tag @return CRYPT_OK if successful */ -int hmac_memory(int hash, +int hmac_memory(int hash, const unsigned char *key, unsigned long keylen, - const unsigned char *in, unsigned long inlen, + const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen) { hmac_state *hmac; @@ -38,7 +36,7 @@ LTC_ARGCHK(key != NULL); LTC_ARGCHK(in != NULL); - LTC_ARGCHK(out != NULL); + LTC_ARGCHK(out != NULL); LTC_ARGCHK(outlen != NULL); /* make sure hash descriptor is valid */ @@ -77,12 +75,12 @@ #endif XFREE(hmac); - return err; + return err; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/hmac/hmac_memory_multi.c --- a/libtomcrypt/src/mac/hmac/hmac_memory_multi.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/hmac/hmac_memory_multi.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,32 +5,30 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" #include /** @file hmac_memory_multi.c - LTC_HMAC support, process multiple blocks of memory, Tom St Denis/Dobes Vandermeer + HMAC support, process multiple blocks of memory, Tom St Denis/Dobes Vandermeer */ #ifdef LTC_HMAC /** - LTC_HMAC multiple blocks of memory to produce the authentication tag - @param hash The index of the hash to use - @param key The secret key + HMAC multiple blocks of memory to produce the authentication tag + @param hash The index of the hash to use + @param key The secret key @param keylen The length of the secret key (octets) @param out [out] Destination of the authentication tag @param outlen [in/out] Max size and resulting size of authentication tag - @param in The data to LTC_HMAC - @param inlen The length of the data to LTC_HMAC (octets) - @param ... tuples of (data,len) pairs to LTC_HMAC, terminated with a (NULL,x) (x=don't care) + @param in The data to HMAC + @param inlen The length of the data to HMAC (octets) + @param ... tuples of (data,len) pairs to HMAC, terminated with a (NULL,x) (x=don't care) @return CRYPT_OK if successful */ -int hmac_memory_multi(int hash, +int hmac_memory_multi(int hash, const unsigned char *key, unsigned long keylen, unsigned char *out, unsigned long *outlen, const unsigned char *in, unsigned long inlen, ...) @@ -44,7 +42,7 @@ LTC_ARGCHK(key != NULL); LTC_ARGCHK(in != NULL); - LTC_ARGCHK(out != NULL); + LTC_ARGCHK(out != NULL); LTC_ARGCHK(outlen != NULL); /* allocate ram for hmac state */ @@ -58,7 +56,7 @@ } va_start(args, inlen); - curptr = in; + curptr = in; curlen = inlen; for (;;) { /* process buf */ @@ -81,12 +79,12 @@ #endif XFREE(hmac); va_end(args); - return err; + return err; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/hmac/hmac_process.c --- a/libtomcrypt/src/mac/hmac/hmac_process.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/hmac/hmac_process.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,23 +5,21 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file hmac_process.c - LTC_HMAC support, process data, Tom St Denis/Dobes Vandermeer + HMAC support, process data, Tom St Denis/Dobes Vandermeer */ #ifdef LTC_HMAC -/** - Process data through LTC_HMAC +/** + Process data through HMAC @param hmac The hmac state - @param in The data to send through LTC_HMAC - @param inlen The length of the data to LTC_HMAC (octets) + @param in The data to send through HMAC + @param inlen The length of the data to HMAC (octets) @return CRYPT_OK if successful */ int hmac_process(hmac_state *hmac, const unsigned char *in, unsigned long inlen) @@ -38,6 +36,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/hmac/hmac_test.c --- a/libtomcrypt/src/mac/hmac/hmac_test.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/hmac/hmac_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,14 +5,12 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file hmac_test.c - LTC_HMAC support, self-test, Tom St Denis/Dobes Vandermeer + HMAC support, self-test, Tom St Denis/Dobes Vandermeer/Steffen Jaeckel */ #ifdef LTC_HMAC @@ -27,239 +25,571 @@ Category: Informational R. Glenn NIST September 1997 - Test Cases for LTC_HMAC-LTC_MD5 and LTC_HMAC-LTC_SHA-1 + + Test Cases for HMAC-MD5 and HMAC-SHA-1 + +******************************************************************************* + +Network Working Group J. Kapp +Request for Comments: 2286 Reaper Technologies +Category: Informational February 1998 + + Test Cases for HMAC-RIPEMD160 and HMAC-RIPEMD128 + +******************************************************************************* + +Network Working Group M. Nystrom +Request for Comments: 4231 RSA Security +Category: Standards Track December 2005 + + Identifiers and Test Vectors for HMAC-SHA-224, HMAC-SHA-256, + HMAC-SHA-384, and HMAC-SHA-512 */ /** - LTC_HMAC self-test + HMAC self-test @return CRYPT_OK if successful, CRYPT_NOP if tests have been disabled. */ int hmac_test(void) { #ifndef LTC_TEST return CRYPT_NOP; - #else + #else unsigned char digest[MAXBLOCKSIZE]; int i; + static const unsigned char hmac_test_case_keys[][136] = { + { /* 1 */ + 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, + 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, + 0x0b, 0x0b, 0x0b, 0x0b + }, +#ifdef LTC_TEST_EXT + { /* 2 */ + 0x4a, 0x65, 0x66, 0x65 + }, + { /* 4 */ + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, + 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19 + }, + { /* 5 */ + 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, + 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, + 0x0c, 0x0c, 0x0c, 0x0c + }, + { /* 3, 6, 7 */ + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa + } +#endif /* LTC_TEST_EXT */ + }; + + + static const unsigned char hmac_test_case_data[][153] = { + { + "Hi There" + }, +#ifdef LTC_TEST_EXT + { + "what do ya want for nothing?" + }, + { + 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd + }, + { + 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, + 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, + 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, + 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, + 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd + }, + { + "Test With Truncation" + }, + { + "Test Using Larger Than Block-Size Key - Hash Key First" + }, + { + "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data" + }, + { + "This is a test using a larger than block-size key and a larger than block-size data. The key needs to be hashed before being used by the HMAC algorithm." + } +#endif /* LTC_TEST_EXT */ + }; + static const struct hmac_test_case { - int num; - char *algo; - unsigned char key[128]; + const char *num; + const char *algo; + const unsigned char *key; unsigned long keylen; - unsigned char data[128]; + const unsigned char *data; unsigned long datalen; unsigned char digest[MAXBLOCKSIZE]; } cases[] = { /* - 3. Test Cases for LTC_HMAC-LTC_SHA-1 + RFC 2202 3. Test Cases for HMAC-SHA-1 + */ + { "rfc2202 3.1", "sha1", + hmac_test_case_keys[0], 20, + hmac_test_case_data[0], 8, + {0xb6, 0x17, 0x31, 0x86, 0x55, 0x05, 0x72, 0x64, + 0xe2, 0x8b, 0xc0, 0xb6, 0xfb, 0x37, 0x8c, 0x8e, + 0xf1, 0x46, 0xbe, 0x00} }, + +#ifdef LTC_TEST_EXT + { "rfc2202 3.2", "sha1", + hmac_test_case_keys[1], 4, + hmac_test_case_data[1], 28, + {0xef, 0xfc, 0xdf, 0x6a, 0xe5, 0xeb, 0x2f, 0xa2, + 0xd2, 0x74, 0x16, 0xd5, 0xf1, 0x84, 0xdf, 0x9c, + 0x25, 0x9a, 0x7c, 0x79} }, - test_case = 1 - key = 0x0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c - key_len = 20 - data = "Hi Ther 20 - digest = 0x4c1a03424b55e07fe7f27be1d58bb9324a9a5a04 - digest-96 = 0x4c1a03424b55e07fe7f27be1 - */ - { 5, "sha1", - {0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, - 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, - 0x0c, 0x0c, 0x0c, 0x0c}, 20, - "Test With Truncation", 20, + { "rfc2202 3.3", "sha1", + hmac_test_case_keys[4], 20, + hmac_test_case_data[2], 50, + {0x12, 0x5d, 0x73, 0x42, 0xb9, 0xac, 0x11, 0xcd, + 0x91, 0xa3, 0x9a, 0xf4, 0x8a, 0xa1, 0x7b, 0x4f, + 0x63, 0xf1, 0x75, 0xd3} }, + + { "rfc2202 3.4", "sha1", + hmac_test_case_keys[2], 25, + hmac_test_case_data[3], 50, + {0x4c, 0x90, 0x07, 0xf4, 0x02, 0x62, 0x50, 0xc6, + 0xbc, 0x84, 0x14, 0xf9, 0xbf, 0x50, 0xc8, 0x6c, + 0x2d, 0x72, 0x35, 0xda} }, + + { "rfc2202 3.5", "sha1", + hmac_test_case_keys[3], 20, + hmac_test_case_data[4], 20, {0x4c, 0x1a, 0x03, 0x42, 0x4b, 0x55, 0xe0, 0x7f, 0xe7, 0xf2, 0x7b, 0xe1, 0xd5, 0x8b, 0xb9, 0x32, 0x4a, 0x9a, 0x5a, 0x04} }, + { "rfc2202 3.6", "sha1", + hmac_test_case_keys[4], 80, + hmac_test_case_data[5], 54, + {0xaa, 0x4a, 0xe5, 0xe1, 0x52, 0x72, 0xd0, 0x0e, + 0x95, 0x70, 0x56, 0x37, 0xce, 0x8a, 0x3b, 0x55, + 0xed, 0x40, 0x21, 0x12} }, + + { "rfc2202 3.7", "sha1", + hmac_test_case_keys[4], 80, + hmac_test_case_data[6], 73, + {0xe8, 0xe9, 0x9d, 0x0f, 0x45, 0x23, 0x7d, 0x78, 0x6d, + 0x6b, 0xba, 0xa7, 0x96, 0x5c, 0x78, 0x08, 0xbb, 0xff, 0x1a, 0x91} }, +#endif /* LTC_TEST_EXT */ + /* - test_case = 6 - key = 0xaa repeated 80 times - key_len = 80 - data = "Test Using Larger Than Block-Size Key - Hash Key First" - data_len = 54 - digest = 0xaa4ae5e15272d00e95705637ce8a3b55ed402112 + RFC 2202 2. Test Cases for HMAC-MD5 */ - { 6, "sha1", - {0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa}, 80, - "Test Using Larger Than Block-Size Key - Hash Key First", 54, - {0xaa, 0x4a, 0xe5, 0xe1, 0x52, 0x72, 0xd0, 0x0e, - 0x95, 0x70, 0x56, 0x37, 0xce, 0x8a, 0x3b, 0x55, - 0xed, 0x40, 0x21, 0x12} }, + { "rfc2202 2.1", "md5", + hmac_test_case_keys[0], 16, + hmac_test_case_data[0], 8, + {0x92, 0x94, 0x72, 0x7a, 0x36, 0x38, 0xbb, 0x1c, + 0x13, 0xf4, 0x8e, 0xf8, 0x15, 0x8b, 0xfc, 0x9d} }, + +#ifdef LTC_TEST_EXT + { "rfc2202 2.2", "md5", + hmac_test_case_keys[1], 4, + hmac_test_case_data[1], 28, + {0x75, 0x0c, 0x78, 0x3e, 0x6a, 0xb0, 0xb5, 0x03, + 0xea, 0xa8, 0x6e, 0x31, 0x0a, 0x5d, 0xb7, 0x38} }, + + { "rfc2202 2.3", "md5", + hmac_test_case_keys[4], 16, + hmac_test_case_data[2], 50, + {0x56, 0xbe, 0x34, 0x52, 0x1d, 0x14, 0x4c, 0x88, + 0xdb, 0xb8, 0xc7, 0x33, 0xf0, 0xe8, 0xb3, 0xf6} }, + + { "rfc2202 2.4", "md5", + hmac_test_case_keys[2], 25, + hmac_test_case_data[3], 50, + {0x69, 0x7e, 0xaf, 0x0a, 0xca, 0x3a, 0x3a, 0xea, + 0x3a, 0x75, 0x16, 0x47, 0x46, 0xff, 0xaa, 0x79} }, + + { "rfc2202 2.5", "md5", + hmac_test_case_keys[3], 16, + hmac_test_case_data[4], 20, + {0x56, 0x46, 0x1e, 0xf2, 0x34, 0x2e, 0xdc, 0x00, + 0xf9, 0xba, 0xb9, 0x95, 0x69, 0x0e, 0xfd, 0x4c} }, + + { "rfc2202 2.6", "md5", + hmac_test_case_keys[4], 80, + hmac_test_case_data[5], 54, + {0x6b, 0x1a, 0xb7, 0xfe, 0x4b, 0xd7, 0xbf, 0x8f, + 0x0b, 0x62, 0xe6, 0xce, 0x61, 0xb9, 0xd0, 0xcd} }, + + { "rfc2202 2.7", "md5", + hmac_test_case_keys[4], 80, + hmac_test_case_data[6], 73, + {0x6f, 0x63, 0x0f, 0xad, 0x67, 0xcd, 0xa0, 0xee, + 0x1f, 0xb1, 0xf5, 0x62, 0xdb, 0x3a, 0xa5, 0x3e} }, +#endif /* LTC_TEST_EXT */ /* - test_case = 7 - key = 0xaa repeated 80 times - key_len = 80 - data = "Test Using Larger Than Block-Size Key and Larger - Than One Block-Size Data" - data_len = 73 - digest = 0xe8e99d0f45237d786d6bbaa7965c7808bbff1a91 + RFC 2286 2. Test Cases for HMAC-RIPEMD160 */ - { 7, "sha1", - {0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa}, 80, - "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data", 73, - {0xe8, 0xe9, 0x9d, 0x0f, 0x45, 0x23, 0x7d, 0x78, 0x6d, - 0x6b, 0xba, 0xa7, 0x96, 0x5c, 0x78, 0x08, 0xbb, 0xff, 0x1a, 0x91} }, + { "rfc2286 2.1", "rmd160", + hmac_test_case_keys[0], 20, + hmac_test_case_data[0], 8, + {0x24, 0xcb, 0x4b, 0xd6, 0x7d, 0x20, 0xfc, 0x1a, + 0x5d, 0x2e, 0xd7, 0x73, 0x2d, 0xcc, 0x39, 0x37, + 0x7f, 0x0a, 0x56, 0x68} }, + +#ifdef LTC_TEST_EXT + { "rfc2286 2.2", "rmd160", + hmac_test_case_keys[1], 4, + hmac_test_case_data[1], 28, + {0xdd, 0xa6, 0xc0, 0x21, 0x3a, 0x48, 0x5a, 0x9e, + 0x24, 0xf4, 0x74, 0x20, 0x64, 0xa7, 0xf0, 0x33, + 0xb4, 0x3c, 0x40, 0x69} }, + + { "rfc2286 2.3", "rmd160", + hmac_test_case_keys[4], 20, + hmac_test_case_data[2], 50, + {0xb0, 0xb1, 0x05, 0x36, 0x0d, 0xe7, 0x59, 0x96, + 0x0a, 0xb4, 0xf3, 0x52, 0x98, 0xe1, 0x16, 0xe2, + 0x95, 0xd8, 0xe7, 0xc1} }, + + { "rfc2286 2.4", "rmd160", + hmac_test_case_keys[2], 25, + hmac_test_case_data[3], 50, + {0xd5, 0xca, 0x86, 0x2f, 0x4d, 0x21, 0xd5, 0xe6, + 0x10, 0xe1, 0x8b, 0x4c, 0xf1, 0xbe, 0xb9, 0x7a, + 0x43, 0x65, 0xec, 0xf4} }, + + { "rfc2286 2.5", "rmd160", + hmac_test_case_keys[3], 20, + hmac_test_case_data[4], 20, + {0x76, 0x19, 0x69, 0x39, 0x78, 0xf9, 0x1d, 0x90, + 0x53, 0x9a, 0xe7, 0x86, 0x50, 0x0f, 0xf3, 0xd8, + 0xe0, 0x51, 0x8e, 0x39} }, + + { "rfc2286 2.6", "rmd160", + hmac_test_case_keys[4], 80, + hmac_test_case_data[5], 54, + {0x64, 0x66, 0xca, 0x07, 0xac, 0x5e, 0xac, 0x29, + 0xe1, 0xbd, 0x52, 0x3e, 0x5a, 0xda, 0x76, 0x05, + 0xb7, 0x91, 0xfd, 0x8b} }, + + { "rfc2286 2.7", "rmd160", + hmac_test_case_keys[4], 80, + hmac_test_case_data[6], 73, + {0x69, 0xea, 0x60, 0x79, 0x8d, 0x71, 0x61, 0x6c, + 0xce, 0x5f, 0xd0, 0x87, 0x1e, 0x23, 0x75, 0x4c, + 0xd7, 0x5d, 0x5a, 0x0a} }, +#endif /* LTC_TEST_EXT */ /* - 2. Test Cases for LTC_HMAC-LTC_MD5 - - test_case = 1 - key = 0x0b 0b 0b 0b - 0b 0b 0b 0b - 0b 0b 0b 0b - 0b 0b 0b 0b - key_len = 16 - data = "Hi There" - data_len = 8 - digest = 0x92 94 72 7a - 36 38 bb 1c - 13 f4 8e f8 - 15 8b fc 9d + RFC 2286 3. Test Cases for HMAC-RIPEMD128 */ - { 1, "md5", - {0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b}, 16, - "Hi There", 8, - {0x92, 0x94, 0x72, 0x7a, 0x36, 0x38, 0xbb, 0x1c, - 0x13, 0xf4, 0x8e, 0xf8, 0x15, 0x8b, 0xfc, 0x9d} }, - /* - test_case = 2 - key = "Jefe" - key_len = 4 - data = "what do ya want for nothing?" - data_len = 28 - digest = 0x750c783e6ab0b503eaa86e310a5db738 - */ - { 2, "md5", - "Jefe", 4, - "what do ya want for nothing?", 28, - {0x75, 0x0c, 0x78, 0x3e, 0x6a, 0xb0, 0xb5, 0x03, - 0xea, 0xa8, 0x6e, 0x31, 0x0a, 0x5d, 0xb7, 0x38} }, + { "rfc2286 3.1", "rmd128", + hmac_test_case_keys[0], 16, + hmac_test_case_data[0], 8, + {0xfb, 0xf6, 0x1f, 0x94, 0x92, 0xaa, 0x4b, 0xbf, + 0x81, 0xc1, 0x72, 0xe8, 0x4e, 0x07, 0x34, 0xdb} }, + +#ifdef LTC_TEST_EXT + { "rfc2286 3.2", "rmd128", + hmac_test_case_keys[1], 4, + hmac_test_case_data[1], 28, + {0x87, 0x5f, 0x82, 0x88, 0x62, 0xb6, 0xb3, 0x34, + 0xb4, 0x27, 0xc5, 0x5f, 0x9f, 0x7f, 0xf0, 0x9b} }, + + { "rfc2286 3.3", "rmd128", + hmac_test_case_keys[4], 16, + hmac_test_case_data[2], 50, + {0x09, 0xf0, 0xb2, 0x84, 0x6d, 0x2f, 0x54, 0x3d, + 0xa3, 0x63, 0xcb, 0xec, 0x8d, 0x62, 0xa3, 0x8d} }, + + { "rfc2286 3.4", "rmd128", + hmac_test_case_keys[2], 25, + hmac_test_case_data[3], 50, + {0xbd, 0xbb, 0xd7, 0xcf, 0x03, 0xe4, 0x4b, 0x5a, + 0xa6, 0x0a, 0xf8, 0x15, 0xbe, 0x4d, 0x22, 0x94} }, + + { "rfc2286 3.5", "rmd128", + hmac_test_case_keys[3], 16, + hmac_test_case_data[4], 20, + {0xe7, 0x98, 0x08, 0xf2, 0x4b, 0x25, 0xfd, 0x03, + 0x1c, 0x15, 0x5f, 0x0d, 0x55, 0x1d, 0x9a, 0x3a} }, + + { "rfc2286 3.6", "rmd128", + hmac_test_case_keys[4], 80, + hmac_test_case_data[5], 54, + {0xdc, 0x73, 0x29, 0x28, 0xde, 0x98, 0x10, 0x4a, + 0x1f, 0x59, 0xd3, 0x73, 0xc1, 0x50, 0xac, 0xbb} }, + + { "rfc2286 3.7", "rmd128", + hmac_test_case_keys[4], 80, + hmac_test_case_data[6], 73, + {0x5c, 0x6b, 0xec, 0x96, 0x79, 0x3e, 0x16, 0xd4, + 0x06, 0x90, 0xc2, 0x37, 0x63, 0x5f, 0x30, 0xc5} }, +#endif /* LTC_TEST_EXT */ /* - test_case = 3 - key = 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - key_len 16 - data = 0xdd repeated 50 times - data_len = 50 - digest = 0x56be34521d144c88dbb8c733f0e8b3f6 - */ - { 3, "md5", - {0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa}, 16, - {0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, - 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, - 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, - 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, - 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd}, 50, - {0x56, 0xbe, 0x34, 0x52, 0x1d, 0x14, 0x4c, 0x88, - 0xdb, 0xb8, 0xc7, 0x33, 0xf0, 0xe8, 0xb3, 0xf6} }, - /* - - test_case = 4 - key = 0x0102030405060708090a0b0c0d0e0f10111213141516171819 - key_len 25 - data = 0xcd repeated 50 times - data_len = 50 - digest = 0x697eaf0aca3a3aea3a75164746ffaa79 - */ - { 4, "md5", - {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, - 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, - 0x15, 0x16, 0x17, 0x18, 0x19}, 25, - {0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, - 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, - 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, - 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, - 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd}, 50, - {0x69, 0x7e, 0xaf, 0x0a, 0xca, 0x3a, 0x3a, 0xea, - 0x3a, 0x75, 0x16, 0x47, 0x46, 0xff, 0xaa, 0x79} }, - - - /* - - test_case = 5 - key = 0x0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c - key_len = 16 - data = "Test With Truncation" - data_len = 20 - digest = 0x56461ef2342edc00f9bab995690efd4c - digest-96 0x56461ef2342edc00f9bab995 + RFC 4231 4. Test Vectors + Ch. 4.6 with truncated output left out to simplify tests */ - { 5, "md5", - {0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, - 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c}, 16, - "Test With Truncation", 20, - {0x56, 0x46, 0x1e, 0xf2, 0x34, 0x2e, 0xdc, 0x00, - 0xf9, 0xba, 0xb9, 0x95, 0x69, 0x0e, 0xfd, 0x4c} }, + { "rfc4231 4.2", "sha224", + hmac_test_case_keys[0], 20, + hmac_test_case_data[0], 8, + {0x89, 0x6f, 0xb1, 0x12, 0x8a, 0xbb, 0xdf, 0x19, + 0x68, 0x32, 0x10, 0x7c, 0xd4, 0x9d, 0xf3, 0x3f, + 0x47, 0xb4, 0xb1, 0x16, 0x99, 0x12, 0xba, 0x4f, + 0x53, 0x68, 0x4b, 0x22} }, + +#ifdef LTC_TEST_EXT + { "rfc4231 4.3", "sha224", + hmac_test_case_keys[1], 4, + hmac_test_case_data[1], 28, + {0xa3, 0x0e, 0x01, 0x09, 0x8b, 0xc6, 0xdb, 0xbf, + 0x45, 0x69, 0x0f, 0x3a, 0x7e, 0x9e, 0x6d, 0x0f, + 0x8b, 0xbe, 0xa2, 0xa3, 0x9e, 0x61, 0x48, 0x00, + 0x8f, 0xd0, 0x5e, 0x44} }, + + { "rfc4231 4.4", "sha224", + hmac_test_case_keys[4], 20, + hmac_test_case_data[2], 50, + {0x7f, 0xb3, 0xcb, 0x35, 0x88, 0xc6, 0xc1, 0xf6, + 0xff, 0xa9, 0x69, 0x4d, 0x7d, 0x6a, 0xd2, 0x64, + 0x93, 0x65, 0xb0, 0xc1, 0xf6, 0x5d, 0x69, 0xd1, + 0xec, 0x83, 0x33, 0xea} }, + + { "rfc4231 4.5", "sha224", + hmac_test_case_keys[2], 25, + hmac_test_case_data[3], 50, + {0x6c, 0x11, 0x50, 0x68, 0x74, 0x01, 0x3c, 0xac, + 0x6a, 0x2a, 0xbc, 0x1b, 0xb3, 0x82, 0x62, 0x7c, + 0xec, 0x6a, 0x90, 0xd8, 0x6e, 0xfc, 0x01, 0x2d, + 0xe7, 0xaf, 0xec, 0x5a} }, + + { "rfc4231 4.7", "sha224", + hmac_test_case_keys[4], 131, + hmac_test_case_data[5], 54, + {0x95, 0xe9, 0xa0, 0xdb, 0x96, 0x20, 0x95, 0xad, + 0xae, 0xbe, 0x9b, 0x2d, 0x6f, 0x0d, 0xbc, 0xe2, + 0xd4, 0x99, 0xf1, 0x12, 0xf2, 0xd2, 0xb7, 0x27, + 0x3f, 0xa6, 0x87, 0x0e} }, + + { "rfc4231 4.8", "sha224", + hmac_test_case_keys[4], 131, + hmac_test_case_data[7], 152, + {0x3a, 0x85, 0x41, 0x66, 0xac, 0x5d, 0x9f, 0x02, + 0x3f, 0x54, 0xd5, 0x17, 0xd0, 0xb3, 0x9d, 0xbd, + 0x94, 0x67, 0x70, 0xdb, 0x9c, 0x2b, 0x95, 0xc9, + 0xf6, 0xf5, 0x65, 0xd1} }, +#endif /* LTC_TEST_EXT */ - /* + { "rfc4231 4.2", "sha256", + hmac_test_case_keys[0], 20, + hmac_test_case_data[0], 8, + {0xb0, 0x34, 0x4c, 0x61, 0xd8, 0xdb, 0x38, 0x53, + 0x5c, 0xa8, 0xaf, 0xce, 0xaf, 0x0b, 0xf1, 0x2b, + 0x88, 0x1d, 0xc2, 0x00, 0xc9, 0x83, 0x3d, 0xa7, + 0x26, 0xe9, 0x37, 0x6c, 0x2e, 0x32, 0xcf, 0xf7} }, + +#ifdef LTC_TEST_EXT + { "rfc4231 4.3", "sha256", + hmac_test_case_keys[1], 4, + hmac_test_case_data[1], 28, + {0x5b, 0xdc, 0xc1, 0x46, 0xbf, 0x60, 0x75, 0x4e, + 0x6a, 0x04, 0x24, 0x26, 0x08, 0x95, 0x75, 0xc7, + 0x5a, 0x00, 0x3f, 0x08, 0x9d, 0x27, 0x39, 0x83, + 0x9d, 0xec, 0x58, 0xb9, 0x64, 0xec, 0x38, 0x43} }, + + { "rfc4231 4.4", "sha256", + hmac_test_case_keys[4], 20, + hmac_test_case_data[2], 50, + {0x77, 0x3e, 0xa9, 0x1e, 0x36, 0x80, 0x0e, 0x46, + 0x85, 0x4d, 0xb8, 0xeb, 0xd0, 0x91, 0x81, 0xa7, + 0x29, 0x59, 0x09, 0x8b, 0x3e, 0xf8, 0xc1, 0x22, + 0xd9, 0x63, 0x55, 0x14, 0xce, 0xd5, 0x65, 0xfe} }, + + { "rfc4231 4.5", "sha256", + hmac_test_case_keys[2], 25, + hmac_test_case_data[3], 50, + {0x82, 0x55, 0x8a, 0x38, 0x9a, 0x44, 0x3c, 0x0e, + 0xa4, 0xcc, 0x81, 0x98, 0x99, 0xf2, 0x08, 0x3a, + 0x85, 0xf0, 0xfa, 0xa3, 0xe5, 0x78, 0xf8, 0x07, + 0x7a, 0x2e, 0x3f, 0xf4, 0x67, 0x29, 0x66, 0x5b} }, + + { "rfc4231 4.7", "sha256", + hmac_test_case_keys[4], 131, + hmac_test_case_data[5], 54, + {0x60, 0xe4, 0x31, 0x59, 0x1e, 0xe0, 0xb6, 0x7f, + 0x0d, 0x8a, 0x26, 0xaa, 0xcb, 0xf5, 0xb7, 0x7f, + 0x8e, 0x0b, 0xc6, 0x21, 0x37, 0x28, 0xc5, 0x14, + 0x05, 0x46, 0x04, 0x0f, 0x0e, 0xe3, 0x7f, 0x54} }, + + { "rfc4231 4.8", "sha256", + hmac_test_case_keys[4], 131, + hmac_test_case_data[7], 152, + {0x9b, 0x09, 0xff, 0xa7, 0x1b, 0x94, 0x2f, 0xcb, + 0x27, 0x63, 0x5f, 0xbc, 0xd5, 0xb0, 0xe9, 0x44, + 0xbf, 0xdc, 0x63, 0x64, 0x4f, 0x07, 0x13, 0x93, + 0x8a, 0x7f, 0x51, 0x53, 0x5c, 0x3a, 0x35, 0xe2} }, +#endif /* LTC_TEST_EXT */ + + { "rfc4231 4.2", "sha384", + hmac_test_case_keys[0], 20, + hmac_test_case_data[0], 8, + {0xaf, 0xd0, 0x39, 0x44, 0xd8, 0x48, 0x95, 0x62, + 0x6b, 0x08, 0x25, 0xf4, 0xab, 0x46, 0x90, 0x7f, + 0x15, 0xf9, 0xda, 0xdb, 0xe4, 0x10, 0x1e, 0xc6, + 0x82, 0xaa, 0x03, 0x4c, 0x7c, 0xeb, 0xc5, 0x9c, + 0xfa, 0xea, 0x9e, 0xa9, 0x07, 0x6e, 0xde, 0x7f, + 0x4a, 0xf1, 0x52, 0xe8, 0xb2, 0xfa, 0x9c, 0xb6} }, - test_case = 6 - key = 0xaa repeated 80 times - key_len = 80 - data = "Test Using Larger Than Block-Size Key - Hash -Key First" - data_len = 54 - digest = 0x6b1ab7fe4bd7bf8f0b62e6ce61b9d0cd - */ - { 6, "md5", - {0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa}, 80, - "Test Using Larger Than Block-Size Key - Hash Key First", 54, - {0x6b, 0x1a, 0xb7, 0xfe, 0x4b, 0xd7, 0xbf, 0x8f, - 0x0b, 0x62, 0xe6, 0xce, 0x61, 0xb9, 0xd0, 0xcd} }, +#ifdef LTC_TEST_EXT + { "rfc4231 4.3", "sha384", + hmac_test_case_keys[1], 4, + hmac_test_case_data[1], 28, + {0xaf, 0x45, 0xd2, 0xe3, 0x76, 0x48, 0x40, 0x31, + 0x61, 0x7f, 0x78, 0xd2, 0xb5, 0x8a, 0x6b, 0x1b, + 0x9c, 0x7e, 0xf4, 0x64, 0xf5, 0xa0, 0x1b, 0x47, + 0xe4, 0x2e, 0xc3, 0x73, 0x63, 0x22, 0x44, 0x5e, + 0x8e, 0x22, 0x40, 0xca, 0x5e, 0x69, 0xe2, 0xc7, + 0x8b, 0x32, 0x39, 0xec, 0xfa, 0xb2, 0x16, 0x49} }, + + { "rfc4231 4.4", "sha384", + hmac_test_case_keys[4], 20, + hmac_test_case_data[2], 50, + {0x88, 0x06, 0x26, 0x08, 0xd3, 0xe6, 0xad, 0x8a, + 0x0a, 0xa2, 0xac, 0xe0, 0x14, 0xc8, 0xa8, 0x6f, + 0x0a, 0xa6, 0x35, 0xd9, 0x47, 0xac, 0x9f, 0xeb, + 0xe8, 0x3e, 0xf4, 0xe5, 0x59, 0x66, 0x14, 0x4b, + 0x2a, 0x5a, 0xb3, 0x9d, 0xc1, 0x38, 0x14, 0xb9, + 0x4e, 0x3a, 0xb6, 0xe1, 0x01, 0xa3, 0x4f, 0x27} }, + + { "rfc4231 4.5", "sha384", + hmac_test_case_keys[2], 25, + hmac_test_case_data[3], 50, + {0x3e, 0x8a, 0x69, 0xb7, 0x78, 0x3c, 0x25, 0x85, + 0x19, 0x33, 0xab, 0x62, 0x90, 0xaf, 0x6c, 0xa7, + 0x7a, 0x99, 0x81, 0x48, 0x08, 0x50, 0x00, 0x9c, + 0xc5, 0x57, 0x7c, 0x6e, 0x1f, 0x57, 0x3b, 0x4e, + 0x68, 0x01, 0xdd, 0x23, 0xc4, 0xa7, 0xd6, 0x79, + 0xcc, 0xf8, 0xa3, 0x86, 0xc6, 0x74, 0xcf, 0xfb} }, + + { "rfc4231 4.7", "sha384", + hmac_test_case_keys[4], 131, + hmac_test_case_data[5], 54, + {0x4e, 0xce, 0x08, 0x44, 0x85, 0x81, 0x3e, 0x90, + 0x88, 0xd2, 0xc6, 0x3a, 0x04, 0x1b, 0xc5, 0xb4, + 0x4f, 0x9e, 0xf1, 0x01, 0x2a, 0x2b, 0x58, 0x8f, + 0x3c, 0xd1, 0x1f, 0x05, 0x03, 0x3a, 0xc4, 0xc6, + 0x0c, 0x2e, 0xf6, 0xab, 0x40, 0x30, 0xfe, 0x82, + 0x96, 0x24, 0x8d, 0xf1, 0x63, 0xf4, 0x49, 0x52} }, + + { "rfc4231 4.8", "sha384", + hmac_test_case_keys[4], 131, + hmac_test_case_data[7], 152, + {0x66, 0x17, 0x17, 0x8e, 0x94, 0x1f, 0x02, 0x0d, + 0x35, 0x1e, 0x2f, 0x25, 0x4e, 0x8f, 0xd3, 0x2c, + 0x60, 0x24, 0x20, 0xfe, 0xb0, 0xb8, 0xfb, 0x9a, + 0xdc, 0xce, 0xbb, 0x82, 0x46, 0x1e, 0x99, 0xc5, + 0xa6, 0x78, 0xcc, 0x31, 0xe7, 0x99, 0x17, 0x6d, + 0x38, 0x60, 0xe6, 0x11, 0x0c, 0x46, 0x52, 0x3e} }, +#endif /* LTC_TEST_EXT */ - /* + { "rfc4231 4.2", "sha512", + hmac_test_case_keys[0], 20, + hmac_test_case_data[0], 8, + {0x87, 0xaa, 0x7c, 0xde, 0xa5, 0xef, 0x61, 0x9d, + 0x4f, 0xf0, 0xb4, 0x24, 0x1a, 0x1d, 0x6c, 0xb0, + 0x23, 0x79, 0xf4, 0xe2, 0xce, 0x4e, 0xc2, 0x78, + 0x7a, 0xd0, 0xb3, 0x05, 0x45, 0xe1, 0x7c, 0xde, + 0xda, 0xa8, 0x33, 0xb7, 0xd6, 0xb8, 0xa7, 0x02, + 0x03, 0x8b, 0x27, 0x4e, 0xae, 0xa3, 0xf4, 0xe4, + 0xbe, 0x9d, 0x91, 0x4e, 0xeb, 0x61, 0xf1, 0x70, + 0x2e, 0x69, 0x6c, 0x20, 0x3a, 0x12, 0x68, 0x54} }, + +#ifdef LTC_TEST_EXT + { "rfc4231 4.3", "sha512", + hmac_test_case_keys[1], 4, + hmac_test_case_data[1], 28, + {0x16, 0x4b, 0x7a, 0x7b, 0xfc, 0xf8, 0x19, 0xe2, + 0xe3, 0x95, 0xfb, 0xe7, 0x3b, 0x56, 0xe0, 0xa3, + 0x87, 0xbd, 0x64, 0x22, 0x2e, 0x83, 0x1f, 0xd6, + 0x10, 0x27, 0x0c, 0xd7, 0xea, 0x25, 0x05, 0x54, + 0x97, 0x58, 0xbf, 0x75, 0xc0, 0x5a, 0x99, 0x4a, + 0x6d, 0x03, 0x4f, 0x65, 0xf8, 0xf0, 0xe6, 0xfd, + 0xca, 0xea, 0xb1, 0xa3, 0x4d, 0x4a, 0x6b, 0x4b, + 0x63, 0x6e, 0x07, 0x0a, 0x38, 0xbc, 0xe7, 0x37} }, + + { "rfc4231 4.4", "sha512", + hmac_test_case_keys[4], 20, + hmac_test_case_data[2], 50, + {0xfa, 0x73, 0xb0, 0x08, 0x9d, 0x56, 0xa2, 0x84, + 0xef, 0xb0, 0xf0, 0x75, 0x6c, 0x89, 0x0b, 0xe9, + 0xb1, 0xb5, 0xdb, 0xdd, 0x8e, 0xe8, 0x1a, 0x36, + 0x55, 0xf8, 0x3e, 0x33, 0xb2, 0x27, 0x9d, 0x39, + 0xbf, 0x3e, 0x84, 0x82, 0x79, 0xa7, 0x22, 0xc8, + 0x06, 0xb4, 0x85, 0xa4, 0x7e, 0x67, 0xc8, 0x07, + 0xb9, 0x46, 0xa3, 0x37, 0xbe, 0xe8, 0x94, 0x26, + 0x74, 0x27, 0x88, 0x59, 0xe1, 0x32, 0x92, 0xfb} }, - test_case = 7 - key = 0xaa repeated 80 times - key_len = 80 - data = "Test Using Larger Than Block-Size Key and Larger - Than One Block-Size Data" - data_len = 73 - digest = 0x6f630fad67cda0ee1fb1f562db3aa53e - */ - { 7, "md5", - {0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa}, 80, - "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data", 73, - {0x6f, 0x63, 0x0f, 0xad, 0x67, 0xcd, 0xa0, 0xee, - 0x1f, 0xb1, 0xf5, 0x62, 0xdb, 0x3a, 0xa5, 0x3e} } + { "rfc4231 4.5", "sha512", + hmac_test_case_keys[2], 25, + hmac_test_case_data[3], 50, + {0xb0, 0xba, 0x46, 0x56, 0x37, 0x45, 0x8c, 0x69, + 0x90, 0xe5, 0xa8, 0xc5, 0xf6, 0x1d, 0x4a, 0xf7, + 0xe5, 0x76, 0xd9, 0x7f, 0xf9, 0x4b, 0x87, 0x2d, + 0xe7, 0x6f, 0x80, 0x50, 0x36, 0x1e, 0xe3, 0xdb, + 0xa9, 0x1c, 0xa5, 0xc1, 0x1a, 0xa2, 0x5e, 0xb4, + 0xd6, 0x79, 0x27, 0x5c, 0xc5, 0x78, 0x80, 0x63, + 0xa5, 0xf1, 0x97, 0x41, 0x12, 0x0c, 0x4f, 0x2d, + 0xe2, 0xad, 0xeb, 0xeb, 0x10, 0xa2, 0x98, 0xdd} }, + + { "rfc4231 4.7", "sha512", + hmac_test_case_keys[4], 131, + hmac_test_case_data[5], 54, + {0x80, 0xb2, 0x42, 0x63, 0xc7, 0xc1, 0xa3, 0xeb, + 0xb7, 0x14, 0x93, 0xc1, 0xdd, 0x7b, 0xe8, 0xb4, + 0x9b, 0x46, 0xd1, 0xf4, 0x1b, 0x4a, 0xee, 0xc1, + 0x12, 0x1b, 0x01, 0x37, 0x83, 0xf8, 0xf3, 0x52, + 0x6b, 0x56, 0xd0, 0x37, 0xe0, 0x5f, 0x25, 0x98, + 0xbd, 0x0f, 0xd2, 0x21, 0x5d, 0x6a, 0x1e, 0x52, + 0x95, 0xe6, 0x4f, 0x73, 0xf6, 0x3f, 0x0a, 0xec, + 0x8b, 0x91, 0x5a, 0x98, 0x5d, 0x78, 0x65, 0x98} }, + + { "rfc4231 4.8", "sha512", + hmac_test_case_keys[4], 131, + hmac_test_case_data[7], 152, + {0xe3, 0x7b, 0x6a, 0x77, 0x5d, 0xc8, 0x7d, 0xba, + 0xa4, 0xdf, 0xa9, 0xf9, 0x6e, 0x5e, 0x3f, 0xfd, + 0xde, 0xbd, 0x71, 0xf8, 0x86, 0x72, 0x89, 0x86, + 0x5d, 0xf5, 0xa3, 0x2d, 0x20, 0xcd, 0xc9, 0x44, + 0xb6, 0x02, 0x2c, 0xac, 0x3c, 0x49, 0x82, 0xb1, + 0x0d, 0x5e, 0xeb, 0x55, 0xc3, 0xe4, 0xde, 0x15, + 0x13, 0x46, 0x76, 0xfb, 0x6d, 0xe0, 0x44, 0x60, + 0x65, 0xc9, 0x74, 0x40, 0xfa, 0x8c, 0x6a, 0x58} }, +#endif /* LTC_TEST_EXT */ + }; unsigned long outlen; @@ -271,30 +601,14 @@ ++tested; outlen = sizeof(digest); if((err = hmac_memory(hash, cases[i].key, cases[i].keylen, cases[i].data, cases[i].datalen, digest, &outlen)) != CRYPT_OK) { -#if 0 - printf("LTC_HMAC-%s test #%d, %s\n", cases[i].algo, cases[i].num, error_to_string(err)); +#ifdef LTC_TEST_DBG + printf("HMAC-%s test %s, %s\n", cases[i].algo, cases[i].num, error_to_string(err)); #endif return err; } - if(XMEMCMP(digest, cases[i].digest, (size_t)hash_descriptor[hash].hashsize) != 0) { + if(compare_testvector(digest, outlen, cases[i].digest, (size_t)hash_descriptor[hash].hashsize, cases[i].num, i)) { failed++; -#if 0 - unsigned int j; - printf("\nLTC_HMAC-%s test #%d:\n", cases[i].algo, cases[i].num); - printf( "Result: 0x"); - for(j=0; j < hash_descriptor[hash].hashsize; j++) { - printf("%2x ", digest[j]); - } - printf("\nCorrect: 0x"); - for(j=0; j < hash_descriptor[hash].hashsize; j++) { - printf("%2x ", cases[i].digest[j]); - } - printf("\n"); - return CRYPT_ERROR; -#endif - } else { - /* printf("LTC_HMAC-%s test #%d: Passed\n", cases[i].algo, cases[i].num); */ } } @@ -311,6 +625,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/omac/omac_done.c --- a/libtomcrypt/src/mac/omac/omac_done.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/omac/omac_done.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,21 +5,19 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file omac_done.c - LTC_OMAC1 support, terminate a stream, Tom St Denis + OMAC1 support, terminate a stream, Tom St Denis */ #ifdef LTC_OMAC /** - Terminate an LTC_OMAC stream - @param omac The LTC_OMAC state + Terminate an OMAC stream + @param omac The OMAC state @param out [out] Destination for the authentication tag @param outlen [in/out] The max size and resulting size of the authentication tag @return CRYPT_OK if successful @@ -65,7 +63,7 @@ return err; } cipher_descriptor[omac->cipher_idx].done(&omac->key); - + /* output it */ for (x = 0; x < (unsigned)omac->blklen && x < *outlen; x++) { out[x] = omac->block[x]; @@ -81,6 +79,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/omac/omac_file.c --- a/libtomcrypt/src/mac/omac/omac_file.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/omac/omac_file.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,79 +5,87 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file omac_file.c - LTC_OMAC1 support, process a file, Tom St Denis + OMAC1 support, process a file, Tom St Denis */ #ifdef LTC_OMAC /** - LTC_OMAC a file + OMAC a file @param cipher The index of the cipher desired @param key The secret key @param keylen The length of the secret key (octets) - @param filename The name of the file you wish to LTC_OMAC + @param filename The name of the file you wish to OMAC @param out [out] Where the authentication tag is to be stored @param outlen [in/out] The max size and resulting size of the authentication tag @return CRYPT_OK if successful, CRYPT_NOP if file support has been disabled */ -int omac_file(int cipher, +int omac_file(int cipher, const unsigned char *key, unsigned long keylen, - const char *filename, + const char *filename, unsigned char *out, unsigned long *outlen) { #ifdef LTC_NO_FILE return CRYPT_NOP; #else - int err, x; + size_t x; + int err; omac_state omac; FILE *in; - unsigned char buf[512]; + unsigned char *buf; LTC_ARGCHK(key != NULL); LTC_ARGCHK(filename != NULL); LTC_ARGCHK(out != NULL); LTC_ARGCHK(outlen != NULL); - in = fopen(filename, "rb"); - if (in == NULL) { - return CRYPT_FILE_NOTFOUND; + if ((buf = XMALLOC(LTC_FILE_READ_BUFSIZE)) == NULL) { + return CRYPT_MEM; } if ((err = omac_init(&omac, cipher, key, keylen)) != CRYPT_OK) { - fclose(in); - return err; + goto LBL_ERR; + } + + in = fopen(filename, "rb"); + if (in == NULL) { + err = CRYPT_FILE_NOTFOUND; + goto LBL_ERR; } do { - x = fread(buf, 1, sizeof(buf), in); - if ((err = omac_process(&omac, buf, x)) != CRYPT_OK) { + x = fread(buf, 1, LTC_FILE_READ_BUFSIZE, in); + if ((err = omac_process(&omac, buf, (unsigned long)x)) != CRYPT_OK) { fclose(in); - return err; + goto LBL_CLEANBUF; } - } while (x == sizeof(buf)); - fclose(in); + } while (x == LTC_FILE_READ_BUFSIZE); - if ((err = omac_done(&omac, out, outlen)) != CRYPT_OK) { - return err; + if (fclose(in) != 0) { + err = CRYPT_ERROR; + goto LBL_CLEANBUF; } + err = omac_done(&omac, out, outlen); + +LBL_CLEANBUF: + zeromem(buf, LTC_FILE_READ_BUFSIZE); +LBL_ERR: #ifdef LTC_CLEAN_STACK - zeromem(buf, sizeof(buf)); + zeromem(&omac, sizeof(omac_state)); #endif - - return CRYPT_OK; + XFREE(buf); + return err; #endif } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/omac/omac_init.c --- a/libtomcrypt/src/mac/omac/omac_init.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/omac/omac_init.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,22 +5,20 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file omac_init.c - LTC_OMAC1 support, initialize state, by Tom St Denis + OMAC1 support, initialize state, by Tom St Denis */ #ifdef LTC_OMAC /** - Initialize an LTC_OMAC state - @param omac The LTC_OMAC state to initialize + Initialize an OMAC state + @param omac The OMAC state to initialize @param cipher The index of the desired cipher @param key The secret key @param keylen The length of the secret key (octets) @@ -77,7 +75,7 @@ omac->Lu[x][y] = ((omac->Lu[x][y] << 1) | (omac->Lu[x][y+1] >> 7)) & 255; } omac->Lu[x][len - 1] = ((omac->Lu[x][len - 1] << 1) ^ (msb ? mask : 0)) & 255; - + /* copy up as require */ if (x == 0) { XMEMCPY(omac->Lu[1], omac->Lu[0], sizeof(omac->Lu[0])); @@ -96,6 +94,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/omac/omac_memory.c --- a/libtomcrypt/src/mac/omac/omac_memory.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/omac/omac_memory.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,30 +5,28 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file omac_memory.c - LTC_OMAC1 support, process a block of memory, Tom St Denis + OMAC1 support, process a block of memory, Tom St Denis */ #ifdef LTC_OMAC /** - LTC_OMAC a block of memory + OMAC a block of memory @param cipher The index of the desired cipher @param key The secret key @param keylen The length of the secret key (octets) - @param in The data to send through LTC_OMAC - @param inlen The length of the data to send through LTC_OMAC (octets) + @param in The data to send through OMAC + @param inlen The length of the data to send through OMAC (octets) @param out [out] The destination of the authentication tag @param outlen [in/out] The max size and resulting size of the authentication tag (octets) @return CRYPT_OK if successful */ -int omac_memory(int cipher, +int omac_memory(int cipher, const unsigned char *key, unsigned long keylen, const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen) @@ -75,11 +73,11 @@ #endif XFREE(omac); - return err; + return err; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/omac/omac_memory_multi.c --- a/libtomcrypt/src/mac/omac/omac_memory_multi.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/omac/omac_memory_multi.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,32 +5,30 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" #include -/** +/** @file omac_memory_multi.c - LTC_OMAC1 support, process multiple blocks of memory, Tom St Denis + OMAC1 support, process multiple blocks of memory, Tom St Denis */ #ifdef LTC_OMAC /** - LTC_OMAC multiple blocks of memory + OMAC multiple blocks of memory @param cipher The index of the desired cipher @param key The secret key @param keylen The length of the secret key (octets) @param out [out] The destination of the authentication tag @param outlen [in/out] The max size and resulting size of the authentication tag (octets) - @param in The data to send through LTC_OMAC - @param inlen The length of the data to send through LTC_OMAC (octets) - @param ... tuples of (data,len) pairs to LTC_OMAC, terminated with a (NULL,x) (x=don't care) + @param in The data to send through OMAC + @param inlen The length of the data to send through OMAC (octets) + @param ... tuples of (data,len) pairs to OMAC, terminated with a (NULL,x) (x=don't care) @return CRYPT_OK if successful */ -int omac_memory_multi(int cipher, +int omac_memory_multi(int cipher, const unsigned char *key, unsigned long keylen, unsigned char *out, unsigned long *outlen, const unsigned char *in, unsigned long inlen, ...) @@ -57,7 +55,7 @@ goto LBL_ERR; } va_start(args, inlen); - curptr = in; + curptr = in; curlen = inlen; for (;;) { /* process buf */ @@ -80,11 +78,11 @@ #endif XFREE(omac); va_end(args); - return err; + return err; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/omac/omac_process.c --- a/libtomcrypt/src/mac/omac/omac_process.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/omac/omac_process.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,29 +5,27 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file omac_process.c - LTC_OMAC1 support, process data, Tom St Denis + OMAC1 support, process data, Tom St Denis */ #ifdef LTC_OMAC -/** - Process data through LTC_OMAC - @param omac The LTC_OMAC state - @param in The input data to send through LTC_OMAC +/** + Process data through OMAC + @param omac The OMAC state + @param in The input data to send through OMAC @param inlen The length of the input (octets) @return CRYPT_OK if successful */ int omac_process(omac_state *omac, const unsigned char *in, unsigned long inlen) { - unsigned long n, x, blklen; + unsigned long n, x; int err; LTC_ARGCHK(omac != NULL); @@ -42,23 +40,26 @@ } #ifdef LTC_FAST - blklen = cipher_descriptor[omac->cipher_idx].block_length; - if (omac->buflen == 0 && inlen > blklen) { - unsigned long y; - for (x = 0; x < (inlen - blklen); x += blklen) { - for (y = 0; y < blklen; y += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)(&omac->prev[y])) ^= *((LTC_FAST_TYPE*)(&in[y])); - } - in += blklen; - if ((err = cipher_descriptor[omac->cipher_idx].ecb_encrypt(omac->prev, omac->prev, &omac->key)) != CRYPT_OK) { - return err; - } - } - inlen -= x; - } + { + unsigned long blklen = cipher_descriptor[omac->cipher_idx].block_length; + + if (omac->buflen == 0 && inlen > blklen) { + unsigned long y; + for (x = 0; x < (inlen - blklen); x += blklen) { + for (y = 0; y < blklen; y += sizeof(LTC_FAST_TYPE)) { + *(LTC_FAST_TYPE_PTR_CAST(&omac->prev[y])) ^= *(LTC_FAST_TYPE_PTR_CAST(&in[y])); + } + in += blklen; + if ((err = cipher_descriptor[omac->cipher_idx].ecb_encrypt(omac->prev, omac->prev, &omac->key)) != CRYPT_OK) { + return err; + } + } + inlen -= x; + } + } #endif - while (inlen != 0) { + while (inlen != 0) { /* ok if the block is full we xor in prev, encrypt and replace prev */ if (omac->buflen == omac->blklen) { for (x = 0; x < (unsigned long)omac->blklen; x++) { @@ -84,6 +85,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/omac/omac_test.c --- a/libtomcrypt/src/mac/omac/omac_test.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/omac/omac_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,20 +5,18 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file omac_test.c - LTC_OMAC1 support, self-test, by Tom St Denis + OMAC1 support, self-test, by Tom St Denis */ #ifdef LTC_OMAC /** - Test the LTC_OMAC setup + Test the OMAC setup @return CRYPT_OK if successful, CRYPT_NOP if tests have been disabled */ int omac_test(void) @@ -26,48 +24,48 @@ #if !defined(LTC_TEST) return CRYPT_NOP; #else - static const struct { + static const struct { int keylen, msglen; unsigned char key[16], msg[64], tag[16]; } tests[] = { { 16, 0, - { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, + { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c }, { 0x00 }, { 0xbb, 0x1d, 0x69, 0x29, 0xe9, 0x59, 0x37, 0x28, 0x7f, 0xa3, 0x7d, 0x12, 0x9b, 0x75, 0x67, 0x46 } }, - { 16, 16, - { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, + { 16, 16, + { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c }, { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a }, - { 0x07, 0x0a, 0x16, 0xb4, 0x6b, 0x4d, 0x41, 0x44, + { 0x07, 0x0a, 0x16, 0xb4, 0x6b, 0x4d, 0x41, 0x44, 0xf7, 0x9b, 0xdd, 0x9d, 0xd0, 0x4a, 0x28, 0x7c } }, - { 16, 40, - { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, + { 16, 40, + { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c }, { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, - 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, + 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11 }, { 0xdf, 0xa6, 0x67, 0x47, 0xde, 0x9a, 0xe6, 0x30, 0x30, 0xca, 0x32, 0x61, 0x14, 0x97, 0xc8, 0x27 } }, - { 16, 64, - { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, + { 16, 64, + { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c }, { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, - 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, + 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef, 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 }, - { 0x51, 0xf0, 0xbe, 0xbf, 0x7e, 0x3b, 0x9d, 0x92, + { 0x51, 0xf0, 0xbe, 0xbf, 0x7e, 0x3b, 0x9d, 0x92, 0xfc, 0x49, 0x74, 0x17, 0x79, 0x36, 0x3c, 0xfe } } @@ -77,7 +75,7 @@ unsigned long len; - /* AES can be under rijndael or aes... try to find it */ + /* AES can be under rijndael or aes... try to find it */ if ((idx = find_cipher("aes")) == -1) { if ((idx = find_cipher("rijndael")) == -1) { return CRYPT_NOP; @@ -85,26 +83,21 @@ } for (x = 0; x < (int)(sizeof(tests)/sizeof(tests[0])); x++) { - len = sizeof(out); + len = sizeof(out); if ((err = omac_memory(idx, tests[x].key, tests[x].keylen, tests[x].msg, tests[x].msglen, out, &len)) != CRYPT_OK) { return err; } - if (XMEMCMP(out, tests[x].tag, 16) != 0) { -#if 0 - int y; - printf("\n\nTag: "); - for (y = 0; y < 16; y++) printf("%02x", out[y]); printf("\n\n"); -#endif + if (compare_testvector(out, len, tests[x].tag, sizeof(tests[x].tag), "OMAC", x) != 0) { return CRYPT_FAIL_TESTVECTOR; } } return CRYPT_OK; #endif -} +} #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/pelican/pelican.c --- a/libtomcrypt/src/mac/pelican/pelican.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/pelican/pelican.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,18 +5,17 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file pelican.c - Pelican MAC, initialize state, by Tom St Denis + Pelican MAC, initialize state, by Tom St Denis */ #ifdef LTC_PELICAN +#define __LTC_AES_TAB_C__ #define ENCRYPT_ONLY #define PELI_TAB #include "../../ciphers/aes/aes_tab.c" @@ -24,14 +23,14 @@ /** Initialize a Pelican state @param pelmac The Pelican state to initialize - @param key The secret key + @param key The secret key @param keylen The length of the secret key (octets) @return CRYPT_OK if successful */ int pelican_init(pelican_state *pelmac, const unsigned char *key, unsigned long keylen) { int err; - + LTC_ARGCHK(pelmac != NULL); LTC_ARGCHK(key != NULL); @@ -49,10 +48,10 @@ aes_ecb_encrypt(pelmac->state, pelmac->state, &pelmac->K); pelmac->buflen = 0; - return CRYPT_OK; + return CRYPT_OK; } -static void four_rounds(pelican_state *pelmac) +static void _four_rounds(pelican_state *pelmac) { ulong32 s0, s1, s2, s3, t0, t1, t2, t3; int r; @@ -90,7 +89,7 @@ STORE32H(s3, pelmac->state + 12); } -/** +/** Process a block of text through Pelican @param pelmac The Pelican MAC state @param in The input @@ -113,9 +112,9 @@ while (inlen & ~15) { int x; for (x = 0; x < 16; x += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)((unsigned char *)pelmac->state + x)) ^= *((LTC_FAST_TYPE*)((unsigned char *)in + x)); + *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)pelmac->state + x)) ^= *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)in + x)); } - four_rounds(pelmac); + _four_rounds(pelmac); in += 16; inlen -= 16; } @@ -125,7 +124,7 @@ while (inlen--) { pelmac->state[pelmac->buflen++] ^= *in++; if (pelmac->buflen == 16) { - four_rounds(pelmac); + _four_rounds(pelmac); pelmac->buflen = 0; } } @@ -149,17 +148,17 @@ } if (pelmac->buflen == 16) { - four_rounds(pelmac); + _four_rounds(pelmac); pelmac->buflen = 0; } pelmac->state[pelmac->buflen++] ^= 0x80; aes_ecb_encrypt(pelmac->state, out, &pelmac->K); aes_done(&pelmac->K); return CRYPT_OK; -} +} #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/pelican/pelican_memory.c --- a/libtomcrypt/src/mac/pelican/pelican_memory.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/pelican/pelican_memory.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,14 +5,12 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file pelican_memory.c - Pelican MAC, MAC a block of memory, by Tom St Denis + Pelican MAC, MAC a block of memory, by Tom St Denis */ #ifdef LTC_PELICAN @@ -23,7 +21,7 @@ @param keylen The length of the key (octets) @param in The input to MAC @param inlen The length of the input (octets) - @param out [out] The output TAG + @param out [out] The output TAG @return CRYPT_OK on success */ int pelican_memory(const unsigned char *key, unsigned long keylen, @@ -34,7 +32,7 @@ int err; pel = XMALLOC(sizeof(*pel)); - if (pel == NULL) { + if (pel == NULL) { return CRYPT_MEM; } @@ -47,13 +45,13 @@ return err; } err = pelican_done(pel, out); - XFREE(pel); + XFREE(pel); return err; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/pelican/pelican_test.c --- a/libtomcrypt/src/mac/pelican/pelican_test.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/pelican/pelican_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,14 +5,12 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file pelican_test.c - Pelican MAC, test, by Tom St Denis + Pelican MAC, test, by Tom St Denis */ #ifdef LTC_PELICAN @@ -31,7 +29,7 @@ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F }, { 0 }, - { 0xeb, 0x58, 0x37, 0x15, 0xf8, 0x34, 0xde, 0xe5, + { 0xeb, 0x58, 0x37, 0x15, 0xf8, 0x34, 0xde, 0xe5, 0xa4, 0xd1, 0x6e, 0xe4, 0xb9, 0xd7, 0x76, 0x0e, }, 16, 0 }, @@ -41,7 +39,7 @@ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F }, { 0x00, 0x01, 0x02 }, - { 0x1c, 0x97, 0x40, 0x60, 0x6c, 0x58, 0x17, 0x2d, + { 0x1c, 0x97, 0x40, 0x60, 0x6c, 0x58, 0x17, 0x2d, 0x03, 0x94, 0x19, 0x70, 0x81, 0xc4, 0x38, 0x54, }, 16, 3 }, @@ -52,7 +50,7 @@ 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F }, { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F }, - { 0x03, 0xcc, 0x46, 0xb8, 0xac, 0xa7, 0x9c, 0x36, + { 0x03, 0xcc, 0x46, 0xb8, 0xac, 0xa7, 0x9c, 0x36, 0x1e, 0x8c, 0x6e, 0xa6, 0x7b, 0x89, 0x32, 0x49, }, 16, 16 }, @@ -65,7 +63,7 @@ 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F }, - { 0x89, 0xcc, 0x36, 0x58, 0x1b, 0xdd, 0x4d, 0xb5, + { 0x89, 0xcc, 0x36, 0x58, 0x1b, 0xdd, 0x4d, 0xb5, 0x78, 0xbb, 0xac, 0xf0, 0xff, 0x8b, 0x08, 0x15, }, 16, 32 }, @@ -79,7 +77,7 @@ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x23 }, - { 0x4a, 0x7d, 0x45, 0x4d, 0xcd, 0xb5, 0xda, 0x8d, + { 0x4a, 0x7d, 0x45, 0x4d, 0xcd, 0xb5, 0xda, 0x8d, 0x48, 0x78, 0x16, 0x48, 0x5d, 0x45, 0x95, 0x99, }, 16, 35 }, @@ -87,8 +85,8 @@ int x, err; unsigned char out[16]; pelican_state pel; - - for (x = 0; x < (int)(sizeof(tests)/sizeof(tests[0])); x++) { + + for (x = 0; x < (int)(sizeof(tests)/sizeof(tests[0])); x++) { if ((err = pelican_init(&pel, tests[x].K, tests[x].keylen)) != CRYPT_OK) { return err; } @@ -99,12 +97,7 @@ return err; } - if (XMEMCMP(out, tests[x].T, 16)) { -#if 0 - int y; - printf("\nFailed test %d\n", x); - printf("{ "); for (y = 0; y < 16; ) { printf("0x%02x, ", out[y]); if (!(++y & 7)) printf("\n"); } printf(" }\n"); -#endif + if (compare_testvector(out, 16, tests[x].T, 16, "PELICAN", x)) { return CRYPT_FAIL_TESTVECTOR; } } @@ -115,6 +108,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/pmac/pmac_done.c --- a/libtomcrypt/src/mac/pmac/pmac_done.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/pmac/pmac_done.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,14 +5,12 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file pmac_done.c - PMAC implementation, terminate a session, by Tom St Denis + PMAC implementation, terminate a session, by Tom St Denis */ #ifdef LTC_PMAC @@ -69,6 +67,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/pmac/pmac_file.c --- a/libtomcrypt/src/mac/pmac/pmac_file.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/pmac/pmac_file.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,20 +5,18 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file pmac_file.c - PMAC implementation, process a file, by Tom St Denis + PMAC implementation, process a file, by Tom St Denis */ #ifdef LTC_PMAC /** - PMAC a file + PMAC a file @param cipher The index of the cipher desired @param key The secret key @param keylen The length of the secret key (octets) @@ -27,18 +25,19 @@ @param outlen [in/out] Max size and resulting size of the authentication tag @return CRYPT_OK if successful, CRYPT_NOP if file support has been disabled */ -int pmac_file(int cipher, +int pmac_file(int cipher, const unsigned char *key, unsigned long keylen, - const char *filename, + const char *filename, unsigned char *out, unsigned long *outlen) { #ifdef LTC_NO_FILE return CRYPT_NOP; #else - int err, x; + size_t x; + int err; pmac_state pmac; FILE *in; - unsigned char buf[512]; + unsigned char *buf; LTC_ARGCHK(key != NULL); @@ -46,39 +45,48 @@ LTC_ARGCHK(out != NULL); LTC_ARGCHK(outlen != NULL); - in = fopen(filename, "rb"); - if (in == NULL) { - return CRYPT_FILE_NOTFOUND; + if ((buf = XMALLOC(LTC_FILE_READ_BUFSIZE)) == NULL) { + return CRYPT_MEM; } if ((err = pmac_init(&pmac, cipher, key, keylen)) != CRYPT_OK) { - fclose(in); - return err; + goto LBL_ERR; + } + + in = fopen(filename, "rb"); + if (in == NULL) { + err = CRYPT_FILE_NOTFOUND; + goto LBL_ERR; } do { - x = fread(buf, 1, sizeof(buf), in); - if ((err = pmac_process(&pmac, buf, x)) != CRYPT_OK) { + x = fread(buf, 1, LTC_FILE_READ_BUFSIZE, in); + if ((err = pmac_process(&pmac, buf, (unsigned long)x)) != CRYPT_OK) { fclose(in); - return err; + goto LBL_CLEANBUF; } - } while (x == sizeof(buf)); - fclose(in); + } while (x == LTC_FILE_READ_BUFSIZE); - if ((err = pmac_done(&pmac, out, outlen)) != CRYPT_OK) { - return err; + if (fclose(in) != 0) { + err = CRYPT_ERROR; + goto LBL_CLEANBUF; } + err = pmac_done(&pmac, out, outlen); + +LBL_CLEANBUF: + zeromem(buf, LTC_FILE_READ_BUFSIZE); +LBL_ERR: #ifdef LTC_CLEAN_STACK - zeromem(buf, sizeof(buf)); + zeromem(&pmac, sizeof(pmac_state)); #endif - - return CRYPT_OK; + XFREE(buf); + return err; #endif } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/pmac/pmac_init.c --- a/libtomcrypt/src/mac/pmac/pmac_init.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/pmac/pmac_init.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,21 +5,19 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file pmac_init.c - PMAC implementation, initialize state, by Tom St Denis + PMAC implementation, initialize state, by Tom St Denis */ #ifdef LTC_PMAC static const struct { int len; - unsigned char poly_div[MAXBLOCKSIZE], + unsigned char poly_div[MAXBLOCKSIZE], poly_mul[MAXBLOCKSIZE]; } polys[] = { { @@ -27,7 +25,7 @@ { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D }, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B } }, { - 16, + 16, { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43 }, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -39,7 +37,7 @@ Initialize a PMAC state @param pmac The PMAC state to initialize @param cipher The index of the desired cipher - @param key The secret key + @param key The secret key @param keylen The length of the secret key (octets) @return CRYPT_OK if successful */ @@ -59,10 +57,13 @@ /* determine which polys to use */ pmac->block_len = cipher_descriptor[cipher].block_length; for (poly = 0; poly < (int)(sizeof(polys)/sizeof(polys[0])); poly++) { - if (polys[poly].len == pmac->block_len) { + if (polys[poly].len == pmac->block_len) { break; } } + if (poly >= (int)(sizeof(polys)/sizeof(polys[0]))) { + return CRYPT_INVALID_ARG; + } if (polys[poly].len != pmac->block_len) { return CRYPT_INVALID_ARG; } @@ -78,7 +79,7 @@ if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, &pmac->key)) != CRYPT_OK) { return err; } - + /* allocate L */ L = XMALLOC(pmac->block_len); if (L == NULL) { @@ -107,41 +108,41 @@ } } - /* find Lr = L / x */ - m = L[pmac->block_len-1] & 1; + /* find Lr = L / x */ + m = L[pmac->block_len-1] & 1; - /* shift right */ - for (x = pmac->block_len - 1; x > 0; x--) { - pmac->Lr[x] = ((L[x] >> 1) | (L[x-1] << 7)) & 255; - } - pmac->Lr[0] = L[0] >> 1; + /* shift right */ + for (x = pmac->block_len - 1; x > 0; x--) { + pmac->Lr[x] = ((L[x] >> 1) | (L[x-1] << 7)) & 255; + } + pmac->Lr[0] = L[0] >> 1; - if (m == 1) { - for (x = 0; x < pmac->block_len; x++) { - pmac->Lr[x] ^= polys[poly].poly_div[x]; - } - } + if (m == 1) { + for (x = 0; x < pmac->block_len; x++) { + pmac->Lr[x] ^= polys[poly].poly_div[x]; + } + } - /* zero buffer, counters, etc... */ - pmac->block_index = 1; - pmac->cipher_idx = cipher; - pmac->buflen = 0; - zeromem(pmac->block, sizeof(pmac->block)); - zeromem(pmac->Li, sizeof(pmac->Li)); - zeromem(pmac->checksum, sizeof(pmac->checksum)); - err = CRYPT_OK; + /* zero buffer, counters, etc... */ + pmac->block_index = 1; + pmac->cipher_idx = cipher; + pmac->buflen = 0; + zeromem(pmac->block, sizeof(pmac->block)); + zeromem(pmac->Li, sizeof(pmac->Li)); + zeromem(pmac->checksum, sizeof(pmac->checksum)); + err = CRYPT_OK; error: #ifdef LTC_CLEAN_STACK - zeromem(L, pmac->block_len); + zeromem(L, pmac->block_len); #endif - XFREE(L); + XFREE(L); - return err; + return err; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/pmac/pmac_memory.c --- a/libtomcrypt/src/mac/pmac/pmac_memory.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/pmac/pmac_memory.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,14 +5,12 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file pmac_memory.c - PMAC implementation, process a block of memory, by Tom St Denis + PMAC implementation, process a block of memory, by Tom St Denis */ #ifdef LTC_PMAC @@ -28,7 +26,7 @@ @param outlen [in/out] The max size and resulting size of the authentication tag @return CRYPT_OK if successful */ -int pmac_memory(int cipher, +int pmac_memory(int cipher, const unsigned char *key, unsigned long keylen, const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen) @@ -46,7 +44,7 @@ if (pmac == NULL) { return CRYPT_MEM; } - + if ((err = pmac_init(pmac, cipher, key, keylen)) != CRYPT_OK) { goto LBL_ERR; } @@ -64,11 +62,11 @@ #endif XFREE(pmac); - return err; + return err; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/pmac/pmac_memory_multi.c --- a/libtomcrypt/src/mac/pmac/pmac_memory_multi.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/pmac/pmac_memory_multi.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,15 +5,13 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" #include -/** +/** @file pmac_memory_multi.c - PMAC implementation, process multiple blocks of memory, by Tom St Denis + PMAC implementation, process multiple blocks of memory, by Tom St Denis */ #ifdef LTC_PMAC @@ -30,7 +28,7 @@ @param ... tuples of (data,len) pairs to PMAC, terminated with a (NULL,x) (x=don't care) @return CRYPT_OK if successful */ -int pmac_memory_multi(int cipher, +int pmac_memory_multi(int cipher, const unsigned char *key, unsigned long keylen, unsigned char *out, unsigned long *outlen, const unsigned char *in, unsigned long inlen, ...) @@ -51,12 +49,12 @@ if (pmac == NULL) { return CRYPT_MEM; } - + if ((err = pmac_init(pmac, cipher, key, keylen)) != CRYPT_OK) { goto LBL_ERR; } va_start(args, inlen); - curptr = in; + curptr = in; curlen = inlen; for (;;) { /* process buf */ @@ -79,11 +77,11 @@ #endif XFREE(pmac); va_end(args); - return err; + return err; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/pmac/pmac_ntz.c --- a/libtomcrypt/src/mac/pmac/pmac_ntz.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/pmac/pmac_ntz.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,14 +5,12 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file pmac_ntz.c - PMAC implementation, internal function, by Tom St Denis + PMAC implementation, internal function, by Tom St Denis */ #ifdef LTC_PMAC @@ -34,6 +32,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/pmac/pmac_process.c --- a/libtomcrypt/src/mac/pmac/pmac_process.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/pmac/pmac_process.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,14 +5,12 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file pmac_process.c - PMAC implementation, process data, by Tom St Denis + PMAC implementation, process data, by Tom St Denis */ @@ -48,13 +46,13 @@ for (x = 0; x < (inlen - 16); x += 16) { pmac_shift_xor(pmac); for (y = 0; y < 16; y += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)(&Z[y])) = *((LTC_FAST_TYPE*)(&in[y])) ^ *((LTC_FAST_TYPE*)(&pmac->Li[y])); + *(LTC_FAST_TYPE_PTR_CAST(&Z[y])) = *(LTC_FAST_TYPE_PTR_CAST(&in[y])) ^ *(LTC_FAST_TYPE_PTR_CAST(&pmac->Li[y])); } if ((err = cipher_descriptor[pmac->cipher_idx].ecb_encrypt(Z, Z, &pmac->key)) != CRYPT_OK) { return err; } for (y = 0; y < 16; y += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)(&pmac->checksum[y])) ^= *((LTC_FAST_TYPE*)(&Z[y])); + *(LTC_FAST_TYPE_PTR_CAST(&pmac->checksum[y])) ^= *(LTC_FAST_TYPE_PTR_CAST(&Z[y])); } in += 16; } @@ -62,7 +60,7 @@ } #endif - while (inlen != 0) { + while (inlen != 0) { /* ok if the block is full we xor in prev, encrypt and replace prev */ if (pmac->buflen == pmac->block_len) { pmac_shift_xor(pmac); @@ -95,6 +93,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/pmac/pmac_shift_xor.c --- a/libtomcrypt/src/mac/pmac/pmac_shift_xor.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/pmac/pmac_shift_xor.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,14 +5,12 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file pmac_shift_xor.c - PMAC implementation, internal function, by Tom St Denis + PMAC implementation, internal function, by Tom St Denis */ #ifdef LTC_PMAC @@ -27,8 +25,8 @@ y = pmac_ntz(pmac->block_index++); #ifdef LTC_FAST for (x = 0; x < pmac->block_len; x += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)((unsigned char *)pmac->Li + x)) ^= - *((LTC_FAST_TYPE*)((unsigned char *)pmac->Ls[y] + x)); + *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)pmac->Li + x)) ^= + *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)pmac->Ls[y] + x)); } #else for (x = 0; x < pmac->block_len; x++) { @@ -39,6 +37,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/pmac/pmac_test.c --- a/libtomcrypt/src/mac/pmac/pmac_test.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/pmac/pmac_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,20 +5,18 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file pmac_test.c - PMAC implementation, self-test, by Tom St Denis + PMAC implementation, self-test, by Tom St Denis */ #ifdef LTC_PMAC -/** +/** Test the LTC_OMAC implementation @return CRYPT_OK if successful, CRYPT_NOP if testing has been disabled */ @@ -27,7 +25,7 @@ #if !defined(LTC_TEST) return CRYPT_NOP; #else - static const struct { + static const struct { int msglen; unsigned char key[16], msg[34], tag[16]; } tests[] = { @@ -125,7 +123,7 @@ unsigned long len; unsigned char outtag[MAXBLOCKSIZE]; - /* AES can be under rijndael or aes... try to find it */ + /* AES can be under rijndael or aes... try to find it */ if ((idx = find_cipher("aes")) == -1) { if ((idx = find_cipher("rijndael")) == -1) { return CRYPT_NOP; @@ -137,29 +135,20 @@ if ((err = pmac_memory(idx, tests[x].key, 16, tests[x].msg, tests[x].msglen, outtag, &len)) != CRYPT_OK) { return err; } - - if (XMEMCMP(outtag, tests[x].tag, len)) { -#if 0 - unsigned long y; - printf("\nTAG:\n"); - for (y = 0; y < len; ) { - printf("0x%02x", outtag[y]); - if (y < len-1) printf(", "); - if (!(++y % 8)) printf("\n"); - } -#endif + + if (compare_testvector(outtag, len, tests[x].tag, sizeof(tests[x].tag), "PMAC", x)) { return CRYPT_FAIL_TESTVECTOR; } - } - return CRYPT_OK; + } + return CRYPT_OK; #endif /* LTC_TEST */ } #endif /* PMAC_MODE */ - + -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/poly1305/poly1305.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/mac/poly1305/poly1305.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,268 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/* The implementation is based on: + * Public Domain poly1305 from Andrew Moon + * https://github.com/floodyberry/poly1305-donna + */ + +#include "tomcrypt.h" + +#ifdef LTC_POLY1305 + +/* internal only */ +static void _poly1305_block(poly1305_state *st, const unsigned char *in, unsigned long inlen) +{ + const unsigned long hibit = (st->final) ? 0 : (1UL << 24); /* 1 << 128 */ + ulong32 r0,r1,r2,r3,r4; + ulong32 s1,s2,s3,s4; + ulong32 h0,h1,h2,h3,h4; + ulong32 tmp; + ulong64 d0,d1,d2,d3,d4; + ulong32 c; + + r0 = st->r[0]; + r1 = st->r[1]; + r2 = st->r[2]; + r3 = st->r[3]; + r4 = st->r[4]; + + s1 = r1 * 5; + s2 = r2 * 5; + s3 = r3 * 5; + s4 = r4 * 5; + + h0 = st->h[0]; + h1 = st->h[1]; + h2 = st->h[2]; + h3 = st->h[3]; + h4 = st->h[4]; + + while (inlen >= 16) { + /* h += in[i] */ + LOAD32L(tmp, in+ 0); h0 += (tmp ) & 0x3ffffff; + LOAD32L(tmp, in+ 3); h1 += (tmp >> 2) & 0x3ffffff; + LOAD32L(tmp, in+ 6); h2 += (tmp >> 4) & 0x3ffffff; + LOAD32L(tmp, in+ 9); h3 += (tmp >> 6) & 0x3ffffff; + LOAD32L(tmp, in+12); h4 += (tmp >> 8) | hibit; + + /* h *= r */ + d0 = ((ulong64)h0 * r0) + ((ulong64)h1 * s4) + ((ulong64)h2 * s3) + ((ulong64)h3 * s2) + ((ulong64)h4 * s1); + d1 = ((ulong64)h0 * r1) + ((ulong64)h1 * r0) + ((ulong64)h2 * s4) + ((ulong64)h3 * s3) + ((ulong64)h4 * s2); + d2 = ((ulong64)h0 * r2) + ((ulong64)h1 * r1) + ((ulong64)h2 * r0) + ((ulong64)h3 * s4) + ((ulong64)h4 * s3); + d3 = ((ulong64)h0 * r3) + ((ulong64)h1 * r2) + ((ulong64)h2 * r1) + ((ulong64)h3 * r0) + ((ulong64)h4 * s4); + d4 = ((ulong64)h0 * r4) + ((ulong64)h1 * r3) + ((ulong64)h2 * r2) + ((ulong64)h3 * r1) + ((ulong64)h4 * r0); + + /* (partial) h %= p */ + c = (ulong32)(d0 >> 26); h0 = (ulong32)d0 & 0x3ffffff; + d1 += c; c = (ulong32)(d1 >> 26); h1 = (ulong32)d1 & 0x3ffffff; + d2 += c; c = (ulong32)(d2 >> 26); h2 = (ulong32)d2 & 0x3ffffff; + d3 += c; c = (ulong32)(d3 >> 26); h3 = (ulong32)d3 & 0x3ffffff; + d4 += c; c = (ulong32)(d4 >> 26); h4 = (ulong32)d4 & 0x3ffffff; + h0 += c * 5; c = (h0 >> 26); h0 = h0 & 0x3ffffff; + h1 += c; + + in += 16; + inlen -= 16; + } + + st->h[0] = h0; + st->h[1] = h1; + st->h[2] = h2; + st->h[3] = h3; + st->h[4] = h4; +} + +/** + Initialize an POLY1305 context. + @param st The POLY1305 state + @param key The secret key + @param keylen The length of the secret key (octets) + @return CRYPT_OK if successful +*/ +int poly1305_init(poly1305_state *st, const unsigned char *key, unsigned long keylen) +{ + LTC_ARGCHK(st != NULL); + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(keylen == 32); + + /* r &= 0xffffffc0ffffffc0ffffffc0fffffff */ + LOAD32L(st->r[0], key + 0); st->r[0] = (st->r[0] ) & 0x3ffffff; + LOAD32L(st->r[1], key + 3); st->r[1] = (st->r[1] >> 2) & 0x3ffff03; + LOAD32L(st->r[2], key + 6); st->r[2] = (st->r[2] >> 4) & 0x3ffc0ff; + LOAD32L(st->r[3], key + 9); st->r[3] = (st->r[3] >> 6) & 0x3f03fff; + LOAD32L(st->r[4], key + 12); st->r[4] = (st->r[4] >> 8) & 0x00fffff; + + /* h = 0 */ + st->h[0] = 0; + st->h[1] = 0; + st->h[2] = 0; + st->h[3] = 0; + st->h[4] = 0; + + /* save pad for later */ + LOAD32L(st->pad[0], key + 16); + LOAD32L(st->pad[1], key + 20); + LOAD32L(st->pad[2], key + 24); + LOAD32L(st->pad[3], key + 28); + + st->leftover = 0; + st->final = 0; + return CRYPT_OK; +} + +/** + Process data through POLY1305 + @param st The POLY1305 state + @param in The data to send through HMAC + @param inlen The length of the data to HMAC (octets) + @return CRYPT_OK if successful +*/ +int poly1305_process(poly1305_state *st, const unsigned char *in, unsigned long inlen) +{ + unsigned long i; + + if (inlen == 0) return CRYPT_OK; /* nothing to do */ + LTC_ARGCHK(st != NULL); + LTC_ARGCHK(in != NULL); + + /* handle leftover */ + if (st->leftover) { + unsigned long want = (16 - st->leftover); + if (want > inlen) want = inlen; + for (i = 0; i < want; i++) st->buffer[st->leftover + i] = in[i]; + inlen -= want; + in += want; + st->leftover += want; + if (st->leftover < 16) return CRYPT_OK; + _poly1305_block(st, st->buffer, 16); + st->leftover = 0; + } + + /* process full blocks */ + if (inlen >= 16) { + unsigned long want = (inlen & ~(16 - 1)); + _poly1305_block(st, in, want); + in += want; + inlen -= want; + } + + /* store leftover */ + if (inlen) { + for (i = 0; i < inlen; i++) st->buffer[st->leftover + i] = in[i]; + st->leftover += inlen; + } + return CRYPT_OK; +} + +/** + Terminate a POLY1305 session + @param st The POLY1305 state + @param mac [out] The destination of the POLY1305 authentication tag + @param maclen [in/out] The max size and resulting size of the POLY1305 authentication tag + @return CRYPT_OK if successful +*/ +int poly1305_done(poly1305_state *st, unsigned char *mac, unsigned long *maclen) +{ + ulong32 h0,h1,h2,h3,h4,c; + ulong32 g0,g1,g2,g3,g4; + ulong64 f; + ulong32 mask; + + LTC_ARGCHK(st != NULL); + LTC_ARGCHK(mac != NULL); + LTC_ARGCHK(maclen != NULL); + LTC_ARGCHK(*maclen >= 16); + + /* process the remaining block */ + if (st->leftover) { + unsigned long i = st->leftover; + st->buffer[i++] = 1; + for (; i < 16; i++) st->buffer[i] = 0; + st->final = 1; + _poly1305_block(st, st->buffer, 16); + } + + /* fully carry h */ + h0 = st->h[0]; + h1 = st->h[1]; + h2 = st->h[2]; + h3 = st->h[3]; + h4 = st->h[4]; + + c = h1 >> 26; h1 = h1 & 0x3ffffff; + h2 += c; c = h2 >> 26; h2 = h2 & 0x3ffffff; + h3 += c; c = h3 >> 26; h3 = h3 & 0x3ffffff; + h4 += c; c = h4 >> 26; h4 = h4 & 0x3ffffff; + h0 += c * 5; c = h0 >> 26; h0 = h0 & 0x3ffffff; + h1 += c; + + /* compute h + -p */ + g0 = h0 + 5; c = g0 >> 26; g0 &= 0x3ffffff; + g1 = h1 + c; c = g1 >> 26; g1 &= 0x3ffffff; + g2 = h2 + c; c = g2 >> 26; g2 &= 0x3ffffff; + g3 = h3 + c; c = g3 >> 26; g3 &= 0x3ffffff; + g4 = h4 + c - (1UL << 26); + + /* select h if h < p, or h + -p if h >= p */ + mask = (g4 >> 31) - 1; + g0 &= mask; + g1 &= mask; + g2 &= mask; + g3 &= mask; + g4 &= mask; + mask = ~mask; + h0 = (h0 & mask) | g0; + h1 = (h1 & mask) | g1; + h2 = (h2 & mask) | g2; + h3 = (h3 & mask) | g3; + h4 = (h4 & mask) | g4; + + /* h = h % (2^128) */ + h0 = ((h0 ) | (h1 << 26)) & 0xffffffff; + h1 = ((h1 >> 6) | (h2 << 20)) & 0xffffffff; + h2 = ((h2 >> 12) | (h3 << 14)) & 0xffffffff; + h3 = ((h3 >> 18) | (h4 << 8)) & 0xffffffff; + + /* mac = (h + pad) % (2^128) */ + f = (ulong64)h0 + st->pad[0] ; h0 = (ulong32)f; + f = (ulong64)h1 + st->pad[1] + (f >> 32); h1 = (ulong32)f; + f = (ulong64)h2 + st->pad[2] + (f >> 32); h2 = (ulong32)f; + f = (ulong64)h3 + st->pad[3] + (f >> 32); h3 = (ulong32)f; + + STORE32L(h0, mac + 0); + STORE32L(h1, mac + 4); + STORE32L(h2, mac + 8); + STORE32L(h3, mac + 12); + + /* zero out the state */ + st->h[0] = 0; + st->h[1] = 0; + st->h[2] = 0; + st->h[3] = 0; + st->h[4] = 0; + st->r[0] = 0; + st->r[1] = 0; + st->r[2] = 0; + st->r[3] = 0; + st->r[4] = 0; + st->pad[0] = 0; + st->pad[1] = 0; + st->pad[2] = 0; + st->pad[3] = 0; + + *maclen = 16; + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/poly1305/poly1305_file.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/mac/poly1305/poly1305_file.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,88 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/* The implementation is based on: + * Public Domain poly1305 from Andrew Moon + * https://github.com/floodyberry/poly1305-donna + */ + +#include "tomcrypt.h" + +#ifdef LTC_POLY1305 + +/** + POLY1305 a file + @param fname The name of the file you wish to POLY1305 + @param key The secret key + @param keylen The length of the secret key + @param mac [out] The POLY1305 authentication tag + @param maclen [in/out] The max size and resulting size of the authentication tag + @return CRYPT_OK if successful, CRYPT_NOP if file support has been disabled +*/ +int poly1305_file(const char *fname, const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *maclen) +{ +#ifdef LTC_NO_FILE + return CRYPT_NOP; +#else + poly1305_state st; + FILE *in; + unsigned char *buf; + size_t x; + int err; + + LTC_ARGCHK(fname != NULL); + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(mac != NULL); + LTC_ARGCHK(maclen != NULL); + + if ((buf = XMALLOC(LTC_FILE_READ_BUFSIZE)) == NULL) { + return CRYPT_MEM; + } + + if ((err = poly1305_init(&st, key, keylen)) != CRYPT_OK) { + goto LBL_ERR; + } + + in = fopen(fname, "rb"); + if (in == NULL) { + err = CRYPT_FILE_NOTFOUND; + goto LBL_ERR; + } + + do { + x = fread(buf, 1, LTC_FILE_READ_BUFSIZE, in); + if ((err = poly1305_process(&st, buf, (unsigned long)x)) != CRYPT_OK) { + fclose(in); + goto LBL_CLEANBUF; + } + } while (x == LTC_FILE_READ_BUFSIZE); + + if (fclose(in) != 0) { + err = CRYPT_ERROR; + goto LBL_CLEANBUF; + } + + err = poly1305_done(&st, mac, maclen); + +LBL_CLEANBUF: + zeromem(buf, LTC_FILE_READ_BUFSIZE); +LBL_ERR: +#ifdef LTC_CLEAN_STACK + zeromem(&st, sizeof(poly1305_state)); +#endif + XFREE(buf); + return err; +#endif +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/poly1305/poly1305_memory.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/mac/poly1305/poly1305_memory.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,53 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/* The implementation is based on: + * Public Domain poly1305 from Andrew Moon + * https://github.com/floodyberry/poly1305-donna + */ + +#include "tomcrypt.h" + +#ifdef LTC_POLY1305 + +/** + POLY1305 a block of memory to produce the authentication tag + @param key The secret key + @param keylen The length of the secret key (octets) + @param in The data to POLY1305 + @param inlen The length of the data to POLY1305 (octets) + @param mac [out] Destination of the authentication tag + @param maclen [in/out] Max size and resulting size of authentication tag + @return CRYPT_OK if successful +*/ +int poly1305_memory(const unsigned char *key, unsigned long keylen, const unsigned char *in, unsigned long inlen, unsigned char *mac, unsigned long *maclen) +{ + poly1305_state st; + int err; + + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(mac != NULL); + LTC_ARGCHK(maclen != NULL); + + if ((err = poly1305_init(&st, key, keylen)) != CRYPT_OK) { goto LBL_ERR; } + if ((err = poly1305_process(&st, in, inlen)) != CRYPT_OK) { goto LBL_ERR; } + err = poly1305_done(&st, mac, maclen); +LBL_ERR: +#ifdef LTC_CLEAN_STACK + zeromem(&st, sizeof(poly1305_state)); +#endif + return err; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/poly1305/poly1305_memory_multi.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/mac/poly1305/poly1305_memory_multi.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,67 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/* The implementation is based on: + * Public Domain poly1305 from Andrew Moon + * https://github.com/floodyberry/poly1305-donna + */ + +#include "tomcrypt.h" +#include + +#ifdef LTC_POLY1305 + +/** + POLY1305 multiple blocks of memory to produce the authentication tag + @param key The secret key + @param keylen The length of the secret key (octets) + @param mac [out] Destination of the authentication tag + @param maclen [in/out] Max size and resulting size of authentication tag + @param in The data to POLY1305 + @param inlen The length of the data to POLY1305 (octets) + @param ... tuples of (data,len) pairs to POLY1305, terminated with a (NULL,x) (x=don't care) + @return CRYPT_OK if successful +*/ +int poly1305_memory_multi(const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *maclen, const unsigned char *in, unsigned long inlen, ...) +{ + poly1305_state st; + int err; + va_list args; + const unsigned char *curptr; + unsigned long curlen; + + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(mac != NULL); + LTC_ARGCHK(maclen != NULL); + + va_start(args, inlen); + curptr = in; + curlen = inlen; + if ((err = poly1305_init(&st, key, keylen)) != CRYPT_OK) { goto LBL_ERR; } + for (;;) { + if ((err = poly1305_process(&st, curptr, curlen)) != CRYPT_OK) { goto LBL_ERR; } + curptr = va_arg(args, const unsigned char*); + if (curptr == NULL) break; + curlen = va_arg(args, unsigned long); + } + err = poly1305_done(&st, mac, maclen); +LBL_ERR: +#ifdef LTC_CLEAN_STACK + zeromem(&st, sizeof(poly1305_state)); +#endif + va_end(args); + return err; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/poly1305/poly1305_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/mac/poly1305/poly1305_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,56 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/* The implementation is based on: + * Public Domain poly1305 from Andrew Moon + * https://github.com/floodyberry/poly1305-donna + */ + +#include "tomcrypt.h" + +#ifdef LTC_POLY1305 + +int poly1305_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + /* https://tools.ietf.org/html/rfc7539#section-2.5.2 */ + unsigned char k[] = { 0x85, 0xd6, 0xbe, 0x78, 0x57, 0x55, 0x6d, 0x33, 0x7f, 0x44, 0x52, 0xfe, 0x42, 0xd5, 0x06, 0xa8, 0x01, 0x03, 0x80, 0x8a, 0xfb, 0x0d, 0xb2, 0xfd, 0x4a, 0xbf, 0xf6, 0xaf, 0x41, 0x49, 0xf5, 0x1b }; + unsigned char tag[] = { 0xA8, 0x06, 0x1D, 0xC1, 0x30, 0x51, 0x36, 0xC6, 0xC2, 0x2B, 0x8B, 0xAF, 0x0C, 0x01, 0x27, 0xA9 }; + char m[] = "Cryptographic Forum Research Group"; + unsigned long len = 16, mlen = strlen(m); + unsigned char out[1000]; + poly1305_state st; + int err; + + /* process piece by piece */ + if ((err = poly1305_init(&st, k, 32)) != CRYPT_OK) return err; + if ((err = poly1305_process(&st, (unsigned char*)m, 5)) != CRYPT_OK) return err; + if ((err = poly1305_process(&st, (unsigned char*)m + 5, 4)) != CRYPT_OK) return err; + if ((err = poly1305_process(&st, (unsigned char*)m + 9, 3)) != CRYPT_OK) return err; + if ((err = poly1305_process(&st, (unsigned char*)m + 12, 2)) != CRYPT_OK) return err; + if ((err = poly1305_process(&st, (unsigned char*)m + 14, 1)) != CRYPT_OK) return err; + if ((err = poly1305_process(&st, (unsigned char*)m + 15, mlen - 15)) != CRYPT_OK) return err; + if ((err = poly1305_done(&st, out, &len)) != CRYPT_OK) return err; + if (compare_testvector(out, len, tag, sizeof(tag), "POLY1305-TV1", 1) != 0) return CRYPT_FAIL_TESTVECTOR; + /* process in one go */ + if ((err = poly1305_init(&st, k, 32)) != CRYPT_OK) return err; + if ((err = poly1305_process(&st, (unsigned char*)m, mlen)) != CRYPT_OK) return err; + if ((err = poly1305_done(&st, out, &len)) != CRYPT_OK) return err; + if (compare_testvector(out, len, tag, sizeof(tag), "POLY1305-TV2", 1) != 0) return CRYPT_FAIL_TESTVECTOR; + return CRYPT_OK; +#endif +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/xcbc/xcbc_done.c --- a/libtomcrypt/src/mac/xcbc/xcbc_done.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/xcbc/xcbc_done.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -62,7 +60,7 @@ out[x] = xcbc->IV[x]; } *outlen = x; - + #ifdef LTC_CLEAN_STACK zeromem(xcbc, sizeof(*xcbc)); #endif @@ -71,7 +69,7 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/xcbc/xcbc_file.c --- a/libtomcrypt/src/mac/xcbc/xcbc_file.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/xcbc/xcbc_file.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,12 +5,10 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file xcbc_file.c XCBC support, process a file, Tom St Denis */ @@ -27,57 +25,67 @@ @param outlen [in/out] The max size and resulting size of the authentication tag @return CRYPT_OK if successful, CRYPT_NOP if file support has been disabled */ -int xcbc_file(int cipher, +int xcbc_file(int cipher, const unsigned char *key, unsigned long keylen, - const char *filename, + const char *filename, unsigned char *out, unsigned long *outlen) { #ifdef LTC_NO_FILE return CRYPT_NOP; #else - int err, x; + size_t x; + int err; xcbc_state xcbc; FILE *in; - unsigned char buf[512]; + unsigned char *buf; LTC_ARGCHK(key != NULL); LTC_ARGCHK(filename != NULL); LTC_ARGCHK(out != NULL); LTC_ARGCHK(outlen != NULL); - in = fopen(filename, "rb"); - if (in == NULL) { - return CRYPT_FILE_NOTFOUND; + if ((buf = XMALLOC(LTC_FILE_READ_BUFSIZE)) == NULL) { + return CRYPT_MEM; } if ((err = xcbc_init(&xcbc, cipher, key, keylen)) != CRYPT_OK) { - fclose(in); - return err; + goto LBL_ERR; + } + + in = fopen(filename, "rb"); + if (in == NULL) { + err = CRYPT_FILE_NOTFOUND; + goto LBL_ERR; } do { - x = fread(buf, 1, sizeof(buf), in); - if ((err = xcbc_process(&xcbc, buf, x)) != CRYPT_OK) { + x = fread(buf, 1, LTC_FILE_READ_BUFSIZE, in); + if ((err = xcbc_process(&xcbc, buf, (unsigned long)x)) != CRYPT_OK) { fclose(in); - return err; + goto LBL_CLEANBUF; } - } while (x == sizeof(buf)); - fclose(in); + } while (x == LTC_FILE_READ_BUFSIZE); - if ((err = xcbc_done(&xcbc, out, outlen)) != CRYPT_OK) { - return err; + if (fclose(in) != 0) { + err = CRYPT_ERROR; + goto LBL_CLEANBUF; } + err = xcbc_done(&xcbc, out, outlen); + +LBL_CLEANBUF: + zeromem(buf, LTC_FILE_READ_BUFSIZE); +LBL_ERR: #ifdef LTC_CLEAN_STACK - zeromem(buf, sizeof(buf)); + zeromem(&xcbc, sizeof(xcbc_state)); #endif - - return CRYPT_OK; + XFREE(buf); + return err; #endif } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/xcbc/xcbc_init.c --- a/libtomcrypt/src/mac/xcbc/xcbc_init.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/xcbc/xcbc_init.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -71,7 +69,7 @@ if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, skey)) != CRYPT_OK) { goto done; } - + /* make the three keys */ for (y = 0; y < 3; y++) { for (x = 0; x < cipher_descriptor[cipher].block_length; x++) { @@ -80,10 +78,10 @@ cipher_descriptor[cipher].ecb_encrypt(xcbc->K[y], xcbc->K[y], skey); } } - + /* setup K1 */ err = cipher_descriptor[cipher].setup(xcbc->K[0], k1, 0, &xcbc->key); - + /* setup struct */ zeromem(xcbc->IV, cipher_descriptor[cipher].block_length); xcbc->blocksize = cipher_descriptor[cipher].block_length; @@ -91,7 +89,7 @@ xcbc->buflen = 0; done: cipher_descriptor[cipher].done(skey); - if (skey != NULL) { + if (skey != NULL) { #ifdef LTC_CLEAN_STACK zeromem(skey, sizeof(*skey)); #endif @@ -102,7 +100,7 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/xcbc/xcbc_memory.c --- a/libtomcrypt/src/mac/xcbc/xcbc_memory.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/xcbc/xcbc_memory.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -17,7 +15,7 @@ #ifdef LTC_XCBC -/** XCBC-MAC a block of memory +/** XCBC-MAC a block of memory @param cipher Index of cipher to use @param key [in] Secret key @param keylen Length of key in octets @@ -27,7 +25,7 @@ @param outlen [in/out] Output size and final tag size Return CRYPT_OK on success. */ -int xcbc_memory(int cipher, +int xcbc_memory(int cipher, const unsigned char *key, unsigned long keylen, const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen) @@ -66,6 +64,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/xcbc/xcbc_memory_multi.c --- a/libtomcrypt/src/mac/xcbc/xcbc_memory_multi.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/xcbc/xcbc_memory_multi.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,13 +5,11 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" #include -/** +/** @file xcbc_memory_multi.c XCBC support, process multiple blocks of memory, Tom St Denis */ @@ -19,7 +17,7 @@ #ifdef LTC_XCBC /** - XCBC multiple blocks of memory + XCBC multiple blocks of memory @param cipher The index of the desired cipher @param key The secret key @param keylen The length of the secret key (octets) @@ -30,7 +28,7 @@ @param ... tuples of (data,len) pairs to XCBC, terminated with a (NULL,x) (x=don't care) @return CRYPT_OK if successful */ -int xcbc_memory_multi(int cipher, +int xcbc_memory_multi(int cipher, const unsigned char *key, unsigned long keylen, unsigned char *out, unsigned long *outlen, const unsigned char *in, unsigned long inlen, ...) @@ -57,7 +55,7 @@ goto LBL_ERR; } va_start(args, inlen); - curptr = in; + curptr = in; curlen = inlen; for (;;) { /* process buf */ @@ -80,11 +78,11 @@ #endif XFREE(xcbc); va_end(args); - return err; + return err; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/xcbc/xcbc_process.c --- a/libtomcrypt/src/mac/xcbc/xcbc_process.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/xcbc/xcbc_process.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -47,29 +45,29 @@ if (xcbc->buflen == 0) { while (inlen > (unsigned long)xcbc->blocksize) { for (x = 0; x < xcbc->blocksize; x += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)&(xcbc->IV[x])) ^= *((LTC_FAST_TYPE*)&(in[x])); + *(LTC_FAST_TYPE_PTR_CAST(&(xcbc->IV[x]))) ^= *(LTC_FAST_TYPE_PTR_CAST(&(in[x]))); } cipher_descriptor[xcbc->cipher].ecb_encrypt(xcbc->IV, xcbc->IV, &xcbc->key); in += xcbc->blocksize; inlen -= xcbc->blocksize; } - } + } #endif while (inlen) { - if (xcbc->buflen == xcbc->blocksize) { + if (xcbc->buflen == xcbc->blocksize) { cipher_descriptor[xcbc->cipher].ecb_encrypt(xcbc->IV, xcbc->IV, &xcbc->key); xcbc->buflen = 0; - } - xcbc->IV[xcbc->buflen++] ^= *in++; - --inlen; - } - return CRYPT_OK; + } + xcbc->IV[xcbc->buflen++] ^= *in++; + --inlen; + } + return CRYPT_OK; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/mac/xcbc/xcbc_test.c --- a/libtomcrypt/src/mac/xcbc/xcbc_test.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/mac/xcbc/xcbc_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -31,64 +29,64 @@ } tests[] = { { 0, - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, { 0 }, - { 0x75, 0xf0, 0x25, 0x1d, 0x52, 0x8a, 0xc0, 0x1c, + { 0x75, 0xf0, 0x25, 0x1d, 0x52, 0x8a, 0xc0, 0x1c, 0x45, 0x73, 0xdf, 0xd5, 0x84, 0xd7, 0x9f, 0x29 } }, { 3, - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, { 0x00, 0x01, 0x02 }, - { 0x5b, 0x37, 0x65, 0x80, 0xae, 0x2f, 0x19, 0xaf, + { 0x5b, 0x37, 0x65, 0x80, 0xae, 0x2f, 0x19, 0xaf, 0xe7, 0x21, 0x9c, 0xee, 0xf1, 0x72, 0x75, 0x6f } }, { 16, - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, - { 0xd2, 0xa2, 0x46, 0xfa, 0x34, 0x9b, 0x68, 0xa7, + { 0xd2, 0xa2, 0x46, 0xfa, 0x34, 0x9b, 0x68, 0xa7, 0x99, 0x98, 0xa4, 0x39, 0x4f, 0xf7, 0xa2, 0x63 } }, { 32, - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, - { 0xf5, 0x4f, 0x0e, 0xc8, 0xd2, 0xb9, 0xf3, 0xd3, + { 0xf5, 0x4f, 0x0e, 0xc8, 0xd2, 0xb9, 0xf3, 0xd3, 0x68, 0x07, 0x73, 0x4b, 0xd5, 0x28, 0x3f, 0xd4 } }, { 34, - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21 }, - { 0xbe, 0xcb, 0xb3, 0xbc, 0xcd, 0xb5, 0x18, 0xa3, + { 0xbe, 0xcb, 0xb3, 0xbc, 0xcd, 0xb5, 0x18, 0xa3, 0x06, 0x77, 0xd5, 0x48, 0x1f, 0xb6, 0xb4, 0xd8 }, }, @@ -99,7 +97,7 @@ unsigned long taglen; int err, x, idx; - /* AES can be under rijndael or aes... try to find it */ + /* AES can be under rijndael or aes... try to find it */ if ((idx = find_cipher("aes")) == -1) { if ((idx = find_cipher("rijndael")) == -1) { return CRYPT_NOP; @@ -111,7 +109,7 @@ if ((err = xcbc_memory(idx, tests[x].K, 16, tests[x].M, tests[x].msglen, T, &taglen)) != CRYPT_OK) { return err; } - if (taglen != 16 || XMEMCMP(T, tests[x].T, 16)) { + if (compare_testvector(T, taglen, tests[x].T, 16, "XCBC", x)) { return CRYPT_FAIL_TESTVECTOR; } } @@ -122,7 +120,7 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/math/fp/ltc_ecc_fp_mulmod.c --- a/libtomcrypt/src/math/fp/ltc_ecc_fp_mulmod.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/math/fp/ltc_ecc_fp_mulmod.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,15 +5,13 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file ltc_ecc_fp_mulmod.c ECC Crypto, Tom St Denis -*/ +*/ #if defined(LTC_MECC) && defined(LTC_MECC_FP) #include @@ -30,12 +28,12 @@ #if (FP_LUT > 12) || (FP_LUT < 2) #error FP_LUT must be between 2 and 12 inclusively -#endif +#endif /** Our FP cache */ static struct { ecc_point *g, /* cached COPY of base point */ - *LUT[1U< 6 - { 1, 0, 0 }, { 2, 1, 64 }, { 2, 2, 64 }, { 3, 3, 64 }, { 2, 4, 64 }, { 3, 5, 64 }, { 3, 6, 64 }, { 4, 7, 64 }, - { 2, 8, 64 }, { 3, 9, 64 }, { 3, 10, 64 }, { 4, 11, 64 }, { 3, 12, 64 }, { 4, 13, 64 }, { 4, 14, 64 }, { 5, 15, 64 }, - { 2, 16, 64 }, { 3, 17, 64 }, { 3, 18, 64 }, { 4, 19, 64 }, { 3, 20, 64 }, { 4, 21, 64 }, { 4, 22, 64 }, { 5, 23, 64 }, - { 3, 24, 64 }, { 4, 25, 64 }, { 4, 26, 64 }, { 5, 27, 64 }, { 4, 28, 64 }, { 5, 29, 64 }, { 5, 30, 64 }, { 6, 31, 64 }, - { 2, 32, 64 }, { 3, 33, 64 }, { 3, 34, 64 }, { 4, 35, 64 }, { 3, 36, 64 }, { 4, 37, 64 }, { 4, 38, 64 }, { 5, 39, 64 }, - { 3, 40, 64 }, { 4, 41, 64 }, { 4, 42, 64 }, { 5, 43, 64 }, { 4, 44, 64 }, { 5, 45, 64 }, { 5, 46, 64 }, { 6, 47, 64 }, - { 3, 48, 64 }, { 4, 49, 64 }, { 4, 50, 64 }, { 5, 51, 64 }, { 4, 52, 64 }, { 5, 53, 64 }, { 5, 54, 64 }, { 6, 55, 64 }, - { 4, 56, 64 }, { 5, 57, 64 }, { 5, 58, 64 }, { 6, 59, 64 }, { 5, 60, 64 }, { 6, 61, 64 }, { 6, 62, 64 }, { 7, 63, 64 }, + { 1, 0, 0 }, { 2, 1, 64 }, { 2, 2, 64 }, { 3, 3, 64 }, { 2, 4, 64 }, { 3, 5, 64 }, { 3, 6, 64 }, { 4, 7, 64 }, + { 2, 8, 64 }, { 3, 9, 64 }, { 3, 10, 64 }, { 4, 11, 64 }, { 3, 12, 64 }, { 4, 13, 64 }, { 4, 14, 64 }, { 5, 15, 64 }, + { 2, 16, 64 }, { 3, 17, 64 }, { 3, 18, 64 }, { 4, 19, 64 }, { 3, 20, 64 }, { 4, 21, 64 }, { 4, 22, 64 }, { 5, 23, 64 }, + { 3, 24, 64 }, { 4, 25, 64 }, { 4, 26, 64 }, { 5, 27, 64 }, { 4, 28, 64 }, { 5, 29, 64 }, { 5, 30, 64 }, { 6, 31, 64 }, + { 2, 32, 64 }, { 3, 33, 64 }, { 3, 34, 64 }, { 4, 35, 64 }, { 3, 36, 64 }, { 4, 37, 64 }, { 4, 38, 64 }, { 5, 39, 64 }, + { 3, 40, 64 }, { 4, 41, 64 }, { 4, 42, 64 }, { 5, 43, 64 }, { 4, 44, 64 }, { 5, 45, 64 }, { 5, 46, 64 }, { 6, 47, 64 }, + { 3, 48, 64 }, { 4, 49, 64 }, { 4, 50, 64 }, { 5, 51, 64 }, { 4, 52, 64 }, { 5, 53, 64 }, { 5, 54, 64 }, { 6, 55, 64 }, + { 4, 56, 64 }, { 5, 57, 64 }, { 5, 58, 64 }, { 6, 59, 64 }, { 5, 60, 64 }, { 6, 61, 64 }, { 6, 62, 64 }, { 7, 63, 64 }, #if FP_LUT > 7 - { 1, 0, 0 }, { 2, 1, 128 }, { 2, 2, 128 }, { 3, 3, 128 }, { 2, 4, 128 }, { 3, 5, 128 }, { 3, 6, 128 }, { 4, 7, 128 }, - { 2, 8, 128 }, { 3, 9, 128 }, { 3, 10, 128 }, { 4, 11, 128 }, { 3, 12, 128 }, { 4, 13, 128 }, { 4, 14, 128 }, { 5, 15, 128 }, - { 2, 16, 128 }, { 3, 17, 128 }, { 3, 18, 128 }, { 4, 19, 128 }, { 3, 20, 128 }, { 4, 21, 128 }, { 4, 22, 128 }, { 5, 23, 128 }, - { 3, 24, 128 }, { 4, 25, 128 }, { 4, 26, 128 }, { 5, 27, 128 }, { 4, 28, 128 }, { 5, 29, 128 }, { 5, 30, 128 }, { 6, 31, 128 }, - { 2, 32, 128 }, { 3, 33, 128 }, { 3, 34, 128 }, { 4, 35, 128 }, { 3, 36, 128 }, { 4, 37, 128 }, { 4, 38, 128 }, { 5, 39, 128 }, - { 3, 40, 128 }, { 4, 41, 128 }, { 4, 42, 128 }, { 5, 43, 128 }, { 4, 44, 128 }, { 5, 45, 128 }, { 5, 46, 128 }, { 6, 47, 128 }, - { 3, 48, 128 }, { 4, 49, 128 }, { 4, 50, 128 }, { 5, 51, 128 }, { 4, 52, 128 }, { 5, 53, 128 }, { 5, 54, 128 }, { 6, 55, 128 }, - { 4, 56, 128 }, { 5, 57, 128 }, { 5, 58, 128 }, { 6, 59, 128 }, { 5, 60, 128 }, { 6, 61, 128 }, { 6, 62, 128 }, { 7, 63, 128 }, - { 2, 64, 128 }, { 3, 65, 128 }, { 3, 66, 128 }, { 4, 67, 128 }, { 3, 68, 128 }, { 4, 69, 128 }, { 4, 70, 128 }, { 5, 71, 128 }, - { 3, 72, 128 }, { 4, 73, 128 }, { 4, 74, 128 }, { 5, 75, 128 }, { 4, 76, 128 }, { 5, 77, 128 }, { 5, 78, 128 }, { 6, 79, 128 }, - { 3, 80, 128 }, { 4, 81, 128 }, { 4, 82, 128 }, { 5, 83, 128 }, { 4, 84, 128 }, { 5, 85, 128 }, { 5, 86, 128 }, { 6, 87, 128 }, - { 4, 88, 128 }, { 5, 89, 128 }, { 5, 90, 128 }, { 6, 91, 128 }, { 5, 92, 128 }, { 6, 93, 128 }, { 6, 94, 128 }, { 7, 95, 128 }, - { 3, 96, 128 }, { 4, 97, 128 }, { 4, 98, 128 }, { 5, 99, 128 }, { 4, 100, 128 }, { 5, 101, 128 }, { 5, 102, 128 }, { 6, 103, 128 }, - { 4, 104, 128 }, { 5, 105, 128 }, { 5, 106, 128 }, { 6, 107, 128 }, { 5, 108, 128 }, { 6, 109, 128 }, { 6, 110, 128 }, { 7, 111, 128 }, - { 4, 112, 128 }, { 5, 113, 128 }, { 5, 114, 128 }, { 6, 115, 128 }, { 5, 116, 128 }, { 6, 117, 128 }, { 6, 118, 128 }, { 7, 119, 128 }, - { 5, 120, 128 }, { 6, 121, 128 }, { 6, 122, 128 }, { 7, 123, 128 }, { 6, 124, 128 }, { 7, 125, 128 }, { 7, 126, 128 }, { 8, 127, 128 }, + { 1, 0, 0 }, { 2, 1, 128 }, { 2, 2, 128 }, { 3, 3, 128 }, { 2, 4, 128 }, { 3, 5, 128 }, { 3, 6, 128 }, { 4, 7, 128 }, + { 2, 8, 128 }, { 3, 9, 128 }, { 3, 10, 128 }, { 4, 11, 128 }, { 3, 12, 128 }, { 4, 13, 128 }, { 4, 14, 128 }, { 5, 15, 128 }, + { 2, 16, 128 }, { 3, 17, 128 }, { 3, 18, 128 }, { 4, 19, 128 }, { 3, 20, 128 }, { 4, 21, 128 }, { 4, 22, 128 }, { 5, 23, 128 }, + { 3, 24, 128 }, { 4, 25, 128 }, { 4, 26, 128 }, { 5, 27, 128 }, { 4, 28, 128 }, { 5, 29, 128 }, { 5, 30, 128 }, { 6, 31, 128 }, + { 2, 32, 128 }, { 3, 33, 128 }, { 3, 34, 128 }, { 4, 35, 128 }, { 3, 36, 128 }, { 4, 37, 128 }, { 4, 38, 128 }, { 5, 39, 128 }, + { 3, 40, 128 }, { 4, 41, 128 }, { 4, 42, 128 }, { 5, 43, 128 }, { 4, 44, 128 }, { 5, 45, 128 }, { 5, 46, 128 }, { 6, 47, 128 }, + { 3, 48, 128 }, { 4, 49, 128 }, { 4, 50, 128 }, { 5, 51, 128 }, { 4, 52, 128 }, { 5, 53, 128 }, { 5, 54, 128 }, { 6, 55, 128 }, + { 4, 56, 128 }, { 5, 57, 128 }, { 5, 58, 128 }, { 6, 59, 128 }, { 5, 60, 128 }, { 6, 61, 128 }, { 6, 62, 128 }, { 7, 63, 128 }, + { 2, 64, 128 }, { 3, 65, 128 }, { 3, 66, 128 }, { 4, 67, 128 }, { 3, 68, 128 }, { 4, 69, 128 }, { 4, 70, 128 }, { 5, 71, 128 }, + { 3, 72, 128 }, { 4, 73, 128 }, { 4, 74, 128 }, { 5, 75, 128 }, { 4, 76, 128 }, { 5, 77, 128 }, { 5, 78, 128 }, { 6, 79, 128 }, + { 3, 80, 128 }, { 4, 81, 128 }, { 4, 82, 128 }, { 5, 83, 128 }, { 4, 84, 128 }, { 5, 85, 128 }, { 5, 86, 128 }, { 6, 87, 128 }, + { 4, 88, 128 }, { 5, 89, 128 }, { 5, 90, 128 }, { 6, 91, 128 }, { 5, 92, 128 }, { 6, 93, 128 }, { 6, 94, 128 }, { 7, 95, 128 }, + { 3, 96, 128 }, { 4, 97, 128 }, { 4, 98, 128 }, { 5, 99, 128 }, { 4, 100, 128 }, { 5, 101, 128 }, { 5, 102, 128 }, { 6, 103, 128 }, + { 4, 104, 128 }, { 5, 105, 128 }, { 5, 106, 128 }, { 6, 107, 128 }, { 5, 108, 128 }, { 6, 109, 128 }, { 6, 110, 128 }, { 7, 111, 128 }, + { 4, 112, 128 }, { 5, 113, 128 }, { 5, 114, 128 }, { 6, 115, 128 }, { 5, 116, 128 }, { 6, 117, 128 }, { 6, 118, 128 }, { 7, 119, 128 }, + { 5, 120, 128 }, { 6, 121, 128 }, { 6, 122, 128 }, { 7, 123, 128 }, { 6, 124, 128 }, { 7, 125, 128 }, { 7, 126, 128 }, { 8, 127, 128 }, #if FP_LUT > 8 - { 1, 0, 0 }, { 2, 1, 256 }, { 2, 2, 256 }, { 3, 3, 256 }, { 2, 4, 256 }, { 3, 5, 256 }, { 3, 6, 256 }, { 4, 7, 256 }, - { 2, 8, 256 }, { 3, 9, 256 }, { 3, 10, 256 }, { 4, 11, 256 }, { 3, 12, 256 }, { 4, 13, 256 }, { 4, 14, 256 }, { 5, 15, 256 }, - { 2, 16, 256 }, { 3, 17, 256 }, { 3, 18, 256 }, { 4, 19, 256 }, { 3, 20, 256 }, { 4, 21, 256 }, { 4, 22, 256 }, { 5, 23, 256 }, - { 3, 24, 256 }, { 4, 25, 256 }, { 4, 26, 256 }, { 5, 27, 256 }, { 4, 28, 256 }, { 5, 29, 256 }, { 5, 30, 256 }, { 6, 31, 256 }, - { 2, 32, 256 }, { 3, 33, 256 }, { 3, 34, 256 }, { 4, 35, 256 }, { 3, 36, 256 }, { 4, 37, 256 }, { 4, 38, 256 }, { 5, 39, 256 }, - { 3, 40, 256 }, { 4, 41, 256 }, { 4, 42, 256 }, { 5, 43, 256 }, { 4, 44, 256 }, { 5, 45, 256 }, { 5, 46, 256 }, { 6, 47, 256 }, - { 3, 48, 256 }, { 4, 49, 256 }, { 4, 50, 256 }, { 5, 51, 256 }, { 4, 52, 256 }, { 5, 53, 256 }, { 5, 54, 256 }, { 6, 55, 256 }, - { 4, 56, 256 }, { 5, 57, 256 }, { 5, 58, 256 }, { 6, 59, 256 }, { 5, 60, 256 }, { 6, 61, 256 }, { 6, 62, 256 }, { 7, 63, 256 }, - { 2, 64, 256 }, { 3, 65, 256 }, { 3, 66, 256 }, { 4, 67, 256 }, { 3, 68, 256 }, { 4, 69, 256 }, { 4, 70, 256 }, { 5, 71, 256 }, - { 3, 72, 256 }, { 4, 73, 256 }, { 4, 74, 256 }, { 5, 75, 256 }, { 4, 76, 256 }, { 5, 77, 256 }, { 5, 78, 256 }, { 6, 79, 256 }, - { 3, 80, 256 }, { 4, 81, 256 }, { 4, 82, 256 }, { 5, 83, 256 }, { 4, 84, 256 }, { 5, 85, 256 }, { 5, 86, 256 }, { 6, 87, 256 }, - { 4, 88, 256 }, { 5, 89, 256 }, { 5, 90, 256 }, { 6, 91, 256 }, { 5, 92, 256 }, { 6, 93, 256 }, { 6, 94, 256 }, { 7, 95, 256 }, - { 3, 96, 256 }, { 4, 97, 256 }, { 4, 98, 256 }, { 5, 99, 256 }, { 4, 100, 256 }, { 5, 101, 256 }, { 5, 102, 256 }, { 6, 103, 256 }, - { 4, 104, 256 }, { 5, 105, 256 }, { 5, 106, 256 }, { 6, 107, 256 }, { 5, 108, 256 }, { 6, 109, 256 }, { 6, 110, 256 }, { 7, 111, 256 }, - { 4, 112, 256 }, { 5, 113, 256 }, { 5, 114, 256 }, { 6, 115, 256 }, { 5, 116, 256 }, { 6, 117, 256 }, { 6, 118, 256 }, { 7, 119, 256 }, - { 5, 120, 256 }, { 6, 121, 256 }, { 6, 122, 256 }, { 7, 123, 256 }, { 6, 124, 256 }, { 7, 125, 256 }, { 7, 126, 256 }, { 8, 127, 256 }, - { 2, 128, 256 }, { 3, 129, 256 }, { 3, 130, 256 }, { 4, 131, 256 }, { 3, 132, 256 }, { 4, 133, 256 }, { 4, 134, 256 }, { 5, 135, 256 }, - { 3, 136, 256 }, { 4, 137, 256 }, { 4, 138, 256 }, { 5, 139, 256 }, { 4, 140, 256 }, { 5, 141, 256 }, { 5, 142, 256 }, { 6, 143, 256 }, - { 3, 144, 256 }, { 4, 145, 256 }, { 4, 146, 256 }, { 5, 147, 256 }, { 4, 148, 256 }, { 5, 149, 256 }, { 5, 150, 256 }, { 6, 151, 256 }, - { 4, 152, 256 }, { 5, 153, 256 }, { 5, 154, 256 }, { 6, 155, 256 }, { 5, 156, 256 }, { 6, 157, 256 }, { 6, 158, 256 }, { 7, 159, 256 }, - { 3, 160, 256 }, { 4, 161, 256 }, { 4, 162, 256 }, { 5, 163, 256 }, { 4, 164, 256 }, { 5, 165, 256 }, { 5, 166, 256 }, { 6, 167, 256 }, - { 4, 168, 256 }, { 5, 169, 256 }, { 5, 170, 256 }, { 6, 171, 256 }, { 5, 172, 256 }, { 6, 173, 256 }, { 6, 174, 256 }, { 7, 175, 256 }, - { 4, 176, 256 }, { 5, 177, 256 }, { 5, 178, 256 }, { 6, 179, 256 }, { 5, 180, 256 }, { 6, 181, 256 }, { 6, 182, 256 }, { 7, 183, 256 }, - { 5, 184, 256 }, { 6, 185, 256 }, { 6, 186, 256 }, { 7, 187, 256 }, { 6, 188, 256 }, { 7, 189, 256 }, { 7, 190, 256 }, { 8, 191, 256 }, - { 3, 192, 256 }, { 4, 193, 256 }, { 4, 194, 256 }, { 5, 195, 256 }, { 4, 196, 256 }, { 5, 197, 256 }, { 5, 198, 256 }, { 6, 199, 256 }, - { 4, 200, 256 }, { 5, 201, 256 }, { 5, 202, 256 }, { 6, 203, 256 }, { 5, 204, 256 }, { 6, 205, 256 }, { 6, 206, 256 }, { 7, 207, 256 }, - { 4, 208, 256 }, { 5, 209, 256 }, { 5, 210, 256 }, { 6, 211, 256 }, { 5, 212, 256 }, { 6, 213, 256 }, { 6, 214, 256 }, { 7, 215, 256 }, - { 5, 216, 256 }, { 6, 217, 256 }, { 6, 218, 256 }, { 7, 219, 256 }, { 6, 220, 256 }, { 7, 221, 256 }, { 7, 222, 256 }, { 8, 223, 256 }, - { 4, 224, 256 }, { 5, 225, 256 }, { 5, 226, 256 }, { 6, 227, 256 }, { 5, 228, 256 }, { 6, 229, 256 }, { 6, 230, 256 }, { 7, 231, 256 }, - { 5, 232, 256 }, { 6, 233, 256 }, { 6, 234, 256 }, { 7, 235, 256 }, { 6, 236, 256 }, { 7, 237, 256 }, { 7, 238, 256 }, { 8, 239, 256 }, - { 5, 240, 256 }, { 6, 241, 256 }, { 6, 242, 256 }, { 7, 243, 256 }, { 6, 244, 256 }, { 7, 245, 256 }, { 7, 246, 256 }, { 8, 247, 256 }, - { 6, 248, 256 }, { 7, 249, 256 }, { 7, 250, 256 }, { 8, 251, 256 }, { 7, 252, 256 }, { 8, 253, 256 }, { 8, 254, 256 }, { 9, 255, 256 }, + { 1, 0, 0 }, { 2, 1, 256 }, { 2, 2, 256 }, { 3, 3, 256 }, { 2, 4, 256 }, { 3, 5, 256 }, { 3, 6, 256 }, { 4, 7, 256 }, + { 2, 8, 256 }, { 3, 9, 256 }, { 3, 10, 256 }, { 4, 11, 256 }, { 3, 12, 256 }, { 4, 13, 256 }, { 4, 14, 256 }, { 5, 15, 256 }, + { 2, 16, 256 }, { 3, 17, 256 }, { 3, 18, 256 }, { 4, 19, 256 }, { 3, 20, 256 }, { 4, 21, 256 }, { 4, 22, 256 }, { 5, 23, 256 }, + { 3, 24, 256 }, { 4, 25, 256 }, { 4, 26, 256 }, { 5, 27, 256 }, { 4, 28, 256 }, { 5, 29, 256 }, { 5, 30, 256 }, { 6, 31, 256 }, + { 2, 32, 256 }, { 3, 33, 256 }, { 3, 34, 256 }, { 4, 35, 256 }, { 3, 36, 256 }, { 4, 37, 256 }, { 4, 38, 256 }, { 5, 39, 256 }, + { 3, 40, 256 }, { 4, 41, 256 }, { 4, 42, 256 }, { 5, 43, 256 }, { 4, 44, 256 }, { 5, 45, 256 }, { 5, 46, 256 }, { 6, 47, 256 }, + { 3, 48, 256 }, { 4, 49, 256 }, { 4, 50, 256 }, { 5, 51, 256 }, { 4, 52, 256 }, { 5, 53, 256 }, { 5, 54, 256 }, { 6, 55, 256 }, + { 4, 56, 256 }, { 5, 57, 256 }, { 5, 58, 256 }, { 6, 59, 256 }, { 5, 60, 256 }, { 6, 61, 256 }, { 6, 62, 256 }, { 7, 63, 256 }, + { 2, 64, 256 }, { 3, 65, 256 }, { 3, 66, 256 }, { 4, 67, 256 }, { 3, 68, 256 }, { 4, 69, 256 }, { 4, 70, 256 }, { 5, 71, 256 }, + { 3, 72, 256 }, { 4, 73, 256 }, { 4, 74, 256 }, { 5, 75, 256 }, { 4, 76, 256 }, { 5, 77, 256 }, { 5, 78, 256 }, { 6, 79, 256 }, + { 3, 80, 256 }, { 4, 81, 256 }, { 4, 82, 256 }, { 5, 83, 256 }, { 4, 84, 256 }, { 5, 85, 256 }, { 5, 86, 256 }, { 6, 87, 256 }, + { 4, 88, 256 }, { 5, 89, 256 }, { 5, 90, 256 }, { 6, 91, 256 }, { 5, 92, 256 }, { 6, 93, 256 }, { 6, 94, 256 }, { 7, 95, 256 }, + { 3, 96, 256 }, { 4, 97, 256 }, { 4, 98, 256 }, { 5, 99, 256 }, { 4, 100, 256 }, { 5, 101, 256 }, { 5, 102, 256 }, { 6, 103, 256 }, + { 4, 104, 256 }, { 5, 105, 256 }, { 5, 106, 256 }, { 6, 107, 256 }, { 5, 108, 256 }, { 6, 109, 256 }, { 6, 110, 256 }, { 7, 111, 256 }, + { 4, 112, 256 }, { 5, 113, 256 }, { 5, 114, 256 }, { 6, 115, 256 }, { 5, 116, 256 }, { 6, 117, 256 }, { 6, 118, 256 }, { 7, 119, 256 }, + { 5, 120, 256 }, { 6, 121, 256 }, { 6, 122, 256 }, { 7, 123, 256 }, { 6, 124, 256 }, { 7, 125, 256 }, { 7, 126, 256 }, { 8, 127, 256 }, + { 2, 128, 256 }, { 3, 129, 256 }, { 3, 130, 256 }, { 4, 131, 256 }, { 3, 132, 256 }, { 4, 133, 256 }, { 4, 134, 256 }, { 5, 135, 256 }, + { 3, 136, 256 }, { 4, 137, 256 }, { 4, 138, 256 }, { 5, 139, 256 }, { 4, 140, 256 }, { 5, 141, 256 }, { 5, 142, 256 }, { 6, 143, 256 }, + { 3, 144, 256 }, { 4, 145, 256 }, { 4, 146, 256 }, { 5, 147, 256 }, { 4, 148, 256 }, { 5, 149, 256 }, { 5, 150, 256 }, { 6, 151, 256 }, + { 4, 152, 256 }, { 5, 153, 256 }, { 5, 154, 256 }, { 6, 155, 256 }, { 5, 156, 256 }, { 6, 157, 256 }, { 6, 158, 256 }, { 7, 159, 256 }, + { 3, 160, 256 }, { 4, 161, 256 }, { 4, 162, 256 }, { 5, 163, 256 }, { 4, 164, 256 }, { 5, 165, 256 }, { 5, 166, 256 }, { 6, 167, 256 }, + { 4, 168, 256 }, { 5, 169, 256 }, { 5, 170, 256 }, { 6, 171, 256 }, { 5, 172, 256 }, { 6, 173, 256 }, { 6, 174, 256 }, { 7, 175, 256 }, + { 4, 176, 256 }, { 5, 177, 256 }, { 5, 178, 256 }, { 6, 179, 256 }, { 5, 180, 256 }, { 6, 181, 256 }, { 6, 182, 256 }, { 7, 183, 256 }, + { 5, 184, 256 }, { 6, 185, 256 }, { 6, 186, 256 }, { 7, 187, 256 }, { 6, 188, 256 }, { 7, 189, 256 }, { 7, 190, 256 }, { 8, 191, 256 }, + { 3, 192, 256 }, { 4, 193, 256 }, { 4, 194, 256 }, { 5, 195, 256 }, { 4, 196, 256 }, { 5, 197, 256 }, { 5, 198, 256 }, { 6, 199, 256 }, + { 4, 200, 256 }, { 5, 201, 256 }, { 5, 202, 256 }, { 6, 203, 256 }, { 5, 204, 256 }, { 6, 205, 256 }, { 6, 206, 256 }, { 7, 207, 256 }, + { 4, 208, 256 }, { 5, 209, 256 }, { 5, 210, 256 }, { 6, 211, 256 }, { 5, 212, 256 }, { 6, 213, 256 }, { 6, 214, 256 }, { 7, 215, 256 }, + { 5, 216, 256 }, { 6, 217, 256 }, { 6, 218, 256 }, { 7, 219, 256 }, { 6, 220, 256 }, { 7, 221, 256 }, { 7, 222, 256 }, { 8, 223, 256 }, + { 4, 224, 256 }, { 5, 225, 256 }, { 5, 226, 256 }, { 6, 227, 256 }, { 5, 228, 256 }, { 6, 229, 256 }, { 6, 230, 256 }, { 7, 231, 256 }, + { 5, 232, 256 }, { 6, 233, 256 }, { 6, 234, 256 }, { 7, 235, 256 }, { 6, 236, 256 }, { 7, 237, 256 }, { 7, 238, 256 }, { 8, 239, 256 }, + { 5, 240, 256 }, { 6, 241, 256 }, { 6, 242, 256 }, { 7, 243, 256 }, { 6, 244, 256 }, { 7, 245, 256 }, { 7, 246, 256 }, { 8, 247, 256 }, + { 6, 248, 256 }, { 7, 249, 256 }, { 7, 250, 256 }, { 8, 251, 256 }, { 7, 252, 256 }, { 8, 253, 256 }, { 8, 254, 256 }, { 9, 255, 256 }, #if FP_LUT > 9 - { 1, 0, 0 }, { 2, 1, 512 }, { 2, 2, 512 }, { 3, 3, 512 }, { 2, 4, 512 }, { 3, 5, 512 }, { 3, 6, 512 }, { 4, 7, 512 }, - { 2, 8, 512 }, { 3, 9, 512 }, { 3, 10, 512 }, { 4, 11, 512 }, { 3, 12, 512 }, { 4, 13, 512 }, { 4, 14, 512 }, { 5, 15, 512 }, - { 2, 16, 512 }, { 3, 17, 512 }, { 3, 18, 512 }, { 4, 19, 512 }, { 3, 20, 512 }, { 4, 21, 512 }, { 4, 22, 512 }, { 5, 23, 512 }, - { 3, 24, 512 }, { 4, 25, 512 }, { 4, 26, 512 }, { 5, 27, 512 }, { 4, 28, 512 }, { 5, 29, 512 }, { 5, 30, 512 }, { 6, 31, 512 }, - { 2, 32, 512 }, { 3, 33, 512 }, { 3, 34, 512 }, { 4, 35, 512 }, { 3, 36, 512 }, { 4, 37, 512 }, { 4, 38, 512 }, { 5, 39, 512 }, - { 3, 40, 512 }, { 4, 41, 512 }, { 4, 42, 512 }, { 5, 43, 512 }, { 4, 44, 512 }, { 5, 45, 512 }, { 5, 46, 512 }, { 6, 47, 512 }, - { 3, 48, 512 }, { 4, 49, 512 }, { 4, 50, 512 }, { 5, 51, 512 }, { 4, 52, 512 }, { 5, 53, 512 }, { 5, 54, 512 }, { 6, 55, 512 }, - { 4, 56, 512 }, { 5, 57, 512 }, { 5, 58, 512 }, { 6, 59, 512 }, { 5, 60, 512 }, { 6, 61, 512 }, { 6, 62, 512 }, { 7, 63, 512 }, - { 2, 64, 512 }, { 3, 65, 512 }, { 3, 66, 512 }, { 4, 67, 512 }, { 3, 68, 512 }, { 4, 69, 512 }, { 4, 70, 512 }, { 5, 71, 512 }, - { 3, 72, 512 }, { 4, 73, 512 }, { 4, 74, 512 }, { 5, 75, 512 }, { 4, 76, 512 }, { 5, 77, 512 }, { 5, 78, 512 }, { 6, 79, 512 }, - { 3, 80, 512 }, { 4, 81, 512 }, { 4, 82, 512 }, { 5, 83, 512 }, { 4, 84, 512 }, { 5, 85, 512 }, { 5, 86, 512 }, { 6, 87, 512 }, - { 4, 88, 512 }, { 5, 89, 512 }, { 5, 90, 512 }, { 6, 91, 512 }, { 5, 92, 512 }, { 6, 93, 512 }, { 6, 94, 512 }, { 7, 95, 512 }, - { 3, 96, 512 }, { 4, 97, 512 }, { 4, 98, 512 }, { 5, 99, 512 }, { 4, 100, 512 }, { 5, 101, 512 }, { 5, 102, 512 }, { 6, 103, 512 }, - { 4, 104, 512 }, { 5, 105, 512 }, { 5, 106, 512 }, { 6, 107, 512 }, { 5, 108, 512 }, { 6, 109, 512 }, { 6, 110, 512 }, { 7, 111, 512 }, - { 4, 112, 512 }, { 5, 113, 512 }, { 5, 114, 512 }, { 6, 115, 512 }, { 5, 116, 512 }, { 6, 117, 512 }, { 6, 118, 512 }, { 7, 119, 512 }, - { 5, 120, 512 }, { 6, 121, 512 }, { 6, 122, 512 }, { 7, 123, 512 }, { 6, 124, 512 }, { 7, 125, 512 }, { 7, 126, 512 }, { 8, 127, 512 }, - { 2, 128, 512 }, { 3, 129, 512 }, { 3, 130, 512 }, { 4, 131, 512 }, { 3, 132, 512 }, { 4, 133, 512 }, { 4, 134, 512 }, { 5, 135, 512 }, - { 3, 136, 512 }, { 4, 137, 512 }, { 4, 138, 512 }, { 5, 139, 512 }, { 4, 140, 512 }, { 5, 141, 512 }, { 5, 142, 512 }, { 6, 143, 512 }, - { 3, 144, 512 }, { 4, 145, 512 }, { 4, 146, 512 }, { 5, 147, 512 }, { 4, 148, 512 }, { 5, 149, 512 }, { 5, 150, 512 }, { 6, 151, 512 }, - { 4, 152, 512 }, { 5, 153, 512 }, { 5, 154, 512 }, { 6, 155, 512 }, { 5, 156, 512 }, { 6, 157, 512 }, { 6, 158, 512 }, { 7, 159, 512 }, - { 3, 160, 512 }, { 4, 161, 512 }, { 4, 162, 512 }, { 5, 163, 512 }, { 4, 164, 512 }, { 5, 165, 512 }, { 5, 166, 512 }, { 6, 167, 512 }, - { 4, 168, 512 }, { 5, 169, 512 }, { 5, 170, 512 }, { 6, 171, 512 }, { 5, 172, 512 }, { 6, 173, 512 }, { 6, 174, 512 }, { 7, 175, 512 }, - { 4, 176, 512 }, { 5, 177, 512 }, { 5, 178, 512 }, { 6, 179, 512 }, { 5, 180, 512 }, { 6, 181, 512 }, { 6, 182, 512 }, { 7, 183, 512 }, - { 5, 184, 512 }, { 6, 185, 512 }, { 6, 186, 512 }, { 7, 187, 512 }, { 6, 188, 512 }, { 7, 189, 512 }, { 7, 190, 512 }, { 8, 191, 512 }, - { 3, 192, 512 }, { 4, 193, 512 }, { 4, 194, 512 }, { 5, 195, 512 }, { 4, 196, 512 }, { 5, 197, 512 }, { 5, 198, 512 }, { 6, 199, 512 }, - { 4, 200, 512 }, { 5, 201, 512 }, { 5, 202, 512 }, { 6, 203, 512 }, { 5, 204, 512 }, { 6, 205, 512 }, { 6, 206, 512 }, { 7, 207, 512 }, - { 4, 208, 512 }, { 5, 209, 512 }, { 5, 210, 512 }, { 6, 211, 512 }, { 5, 212, 512 }, { 6, 213, 512 }, { 6, 214, 512 }, { 7, 215, 512 }, - { 5, 216, 512 }, { 6, 217, 512 }, { 6, 218, 512 }, { 7, 219, 512 }, { 6, 220, 512 }, { 7, 221, 512 }, { 7, 222, 512 }, { 8, 223, 512 }, - { 4, 224, 512 }, { 5, 225, 512 }, { 5, 226, 512 }, { 6, 227, 512 }, { 5, 228, 512 }, { 6, 229, 512 }, { 6, 230, 512 }, { 7, 231, 512 }, - { 5, 232, 512 }, { 6, 233, 512 }, { 6, 234, 512 }, { 7, 235, 512 }, { 6, 236, 512 }, { 7, 237, 512 }, { 7, 238, 512 }, { 8, 239, 512 }, - { 5, 240, 512 }, { 6, 241, 512 }, { 6, 242, 512 }, { 7, 243, 512 }, { 6, 244, 512 }, { 7, 245, 512 }, { 7, 246, 512 }, { 8, 247, 512 }, - { 6, 248, 512 }, { 7, 249, 512 }, { 7, 250, 512 }, { 8, 251, 512 }, { 7, 252, 512 }, { 8, 253, 512 }, { 8, 254, 512 }, { 9, 255, 512 }, - { 2, 256, 512 }, { 3, 257, 512 }, { 3, 258, 512 }, { 4, 259, 512 }, { 3, 260, 512 }, { 4, 261, 512 }, { 4, 262, 512 }, { 5, 263, 512 }, - { 3, 264, 512 }, { 4, 265, 512 }, { 4, 266, 512 }, { 5, 267, 512 }, { 4, 268, 512 }, { 5, 269, 512 }, { 5, 270, 512 }, { 6, 271, 512 }, - { 3, 272, 512 }, { 4, 273, 512 }, { 4, 274, 512 }, { 5, 275, 512 }, { 4, 276, 512 }, { 5, 277, 512 }, { 5, 278, 512 }, { 6, 279, 512 }, - { 4, 280, 512 }, { 5, 281, 512 }, { 5, 282, 512 }, { 6, 283, 512 }, { 5, 284, 512 }, { 6, 285, 512 }, { 6, 286, 512 }, { 7, 287, 512 }, - { 3, 288, 512 }, { 4, 289, 512 }, { 4, 290, 512 }, { 5, 291, 512 }, { 4, 292, 512 }, { 5, 293, 512 }, { 5, 294, 512 }, { 6, 295, 512 }, - { 4, 296, 512 }, { 5, 297, 512 }, { 5, 298, 512 }, { 6, 299, 512 }, { 5, 300, 512 }, { 6, 301, 512 }, { 6, 302, 512 }, { 7, 303, 512 }, - { 4, 304, 512 }, { 5, 305, 512 }, { 5, 306, 512 }, { 6, 307, 512 }, { 5, 308, 512 }, { 6, 309, 512 }, { 6, 310, 512 }, { 7, 311, 512 }, - { 5, 312, 512 }, { 6, 313, 512 }, { 6, 314, 512 }, { 7, 315, 512 }, { 6, 316, 512 }, { 7, 317, 512 }, { 7, 318, 512 }, { 8, 319, 512 }, - { 3, 320, 512 }, { 4, 321, 512 }, { 4, 322, 512 }, { 5, 323, 512 }, { 4, 324, 512 }, { 5, 325, 512 }, { 5, 326, 512 }, { 6, 327, 512 }, - { 4, 328, 512 }, { 5, 329, 512 }, { 5, 330, 512 }, { 6, 331, 512 }, { 5, 332, 512 }, { 6, 333, 512 }, { 6, 334, 512 }, { 7, 335, 512 }, - { 4, 336, 512 }, { 5, 337, 512 }, { 5, 338, 512 }, { 6, 339, 512 }, { 5, 340, 512 }, { 6, 341, 512 }, { 6, 342, 512 }, { 7, 343, 512 }, - { 5, 344, 512 }, { 6, 345, 512 }, { 6, 346, 512 }, { 7, 347, 512 }, { 6, 348, 512 }, { 7, 349, 512 }, { 7, 350, 512 }, { 8, 351, 512 }, - { 4, 352, 512 }, { 5, 353, 512 }, { 5, 354, 512 }, { 6, 355, 512 }, { 5, 356, 512 }, { 6, 357, 512 }, { 6, 358, 512 }, { 7, 359, 512 }, - { 5, 360, 512 }, { 6, 361, 512 }, { 6, 362, 512 }, { 7, 363, 512 }, { 6, 364, 512 }, { 7, 365, 512 }, { 7, 366, 512 }, { 8, 367, 512 }, - { 5, 368, 512 }, { 6, 369, 512 }, { 6, 370, 512 }, { 7, 371, 512 }, { 6, 372, 512 }, { 7, 373, 512 }, { 7, 374, 512 }, { 8, 375, 512 }, - { 6, 376, 512 }, { 7, 377, 512 }, { 7, 378, 512 }, { 8, 379, 512 }, { 7, 380, 512 }, { 8, 381, 512 }, { 8, 382, 512 }, { 9, 383, 512 }, - { 3, 384, 512 }, { 4, 385, 512 }, { 4, 386, 512 }, { 5, 387, 512 }, { 4, 388, 512 }, { 5, 389, 512 }, { 5, 390, 512 }, { 6, 391, 512 }, - { 4, 392, 512 }, { 5, 393, 512 }, { 5, 394, 512 }, { 6, 395, 512 }, { 5, 396, 512 }, { 6, 397, 512 }, { 6, 398, 512 }, { 7, 399, 512 }, - { 4, 400, 512 }, { 5, 401, 512 }, { 5, 402, 512 }, { 6, 403, 512 }, { 5, 404, 512 }, { 6, 405, 512 }, { 6, 406, 512 }, { 7, 407, 512 }, - { 5, 408, 512 }, { 6, 409, 512 }, { 6, 410, 512 }, { 7, 411, 512 }, { 6, 412, 512 }, { 7, 413, 512 }, { 7, 414, 512 }, { 8, 415, 512 }, - { 4, 416, 512 }, { 5, 417, 512 }, { 5, 418, 512 }, { 6, 419, 512 }, { 5, 420, 512 }, { 6, 421, 512 }, { 6, 422, 512 }, { 7, 423, 512 }, - { 5, 424, 512 }, { 6, 425, 512 }, { 6, 426, 512 }, { 7, 427, 512 }, { 6, 428, 512 }, { 7, 429, 512 }, { 7, 430, 512 }, { 8, 431, 512 }, - { 5, 432, 512 }, { 6, 433, 512 }, { 6, 434, 512 }, { 7, 435, 512 }, { 6, 436, 512 }, { 7, 437, 512 }, { 7, 438, 512 }, { 8, 439, 512 }, - { 6, 440, 512 }, { 7, 441, 512 }, { 7, 442, 512 }, { 8, 443, 512 }, { 7, 444, 512 }, { 8, 445, 512 }, { 8, 446, 512 }, { 9, 447, 512 }, - { 4, 448, 512 }, { 5, 449, 512 }, { 5, 450, 512 }, { 6, 451, 512 }, { 5, 452, 512 }, { 6, 453, 512 }, { 6, 454, 512 }, { 7, 455, 512 }, - { 5, 456, 512 }, { 6, 457, 512 }, { 6, 458, 512 }, { 7, 459, 512 }, { 6, 460, 512 }, { 7, 461, 512 }, { 7, 462, 512 }, { 8, 463, 512 }, - { 5, 464, 512 }, { 6, 465, 512 }, { 6, 466, 512 }, { 7, 467, 512 }, { 6, 468, 512 }, { 7, 469, 512 }, { 7, 470, 512 }, { 8, 471, 512 }, - { 6, 472, 512 }, { 7, 473, 512 }, { 7, 474, 512 }, { 8, 475, 512 }, { 7, 476, 512 }, { 8, 477, 512 }, { 8, 478, 512 }, { 9, 479, 512 }, - { 5, 480, 512 }, { 6, 481, 512 }, { 6, 482, 512 }, { 7, 483, 512 }, { 6, 484, 512 }, { 7, 485, 512 }, { 7, 486, 512 }, { 8, 487, 512 }, - { 6, 488, 512 }, { 7, 489, 512 }, { 7, 490, 512 }, { 8, 491, 512 }, { 7, 492, 512 }, { 8, 493, 512 }, { 8, 494, 512 }, { 9, 495, 512 }, - { 6, 496, 512 }, { 7, 497, 512 }, { 7, 498, 512 }, { 8, 499, 512 }, { 7, 500, 512 }, { 8, 501, 512 }, { 8, 502, 512 }, { 9, 503, 512 }, - { 7, 504, 512 }, { 8, 505, 512 }, { 8, 506, 512 }, { 9, 507, 512 }, { 8, 508, 512 }, { 9, 509, 512 }, { 9, 510, 512 }, { 10, 511, 512 }, + { 1, 0, 0 }, { 2, 1, 512 }, { 2, 2, 512 }, { 3, 3, 512 }, { 2, 4, 512 }, { 3, 5, 512 }, { 3, 6, 512 }, { 4, 7, 512 }, + { 2, 8, 512 }, { 3, 9, 512 }, { 3, 10, 512 }, { 4, 11, 512 }, { 3, 12, 512 }, { 4, 13, 512 }, { 4, 14, 512 }, { 5, 15, 512 }, + { 2, 16, 512 }, { 3, 17, 512 }, { 3, 18, 512 }, { 4, 19, 512 }, { 3, 20, 512 }, { 4, 21, 512 }, { 4, 22, 512 }, { 5, 23, 512 }, + { 3, 24, 512 }, { 4, 25, 512 }, { 4, 26, 512 }, { 5, 27, 512 }, { 4, 28, 512 }, { 5, 29, 512 }, { 5, 30, 512 }, { 6, 31, 512 }, + { 2, 32, 512 }, { 3, 33, 512 }, { 3, 34, 512 }, { 4, 35, 512 }, { 3, 36, 512 }, { 4, 37, 512 }, { 4, 38, 512 }, { 5, 39, 512 }, + { 3, 40, 512 }, { 4, 41, 512 }, { 4, 42, 512 }, { 5, 43, 512 }, { 4, 44, 512 }, { 5, 45, 512 }, { 5, 46, 512 }, { 6, 47, 512 }, + { 3, 48, 512 }, { 4, 49, 512 }, { 4, 50, 512 }, { 5, 51, 512 }, { 4, 52, 512 }, { 5, 53, 512 }, { 5, 54, 512 }, { 6, 55, 512 }, + { 4, 56, 512 }, { 5, 57, 512 }, { 5, 58, 512 }, { 6, 59, 512 }, { 5, 60, 512 }, { 6, 61, 512 }, { 6, 62, 512 }, { 7, 63, 512 }, + { 2, 64, 512 }, { 3, 65, 512 }, { 3, 66, 512 }, { 4, 67, 512 }, { 3, 68, 512 }, { 4, 69, 512 }, { 4, 70, 512 }, { 5, 71, 512 }, + { 3, 72, 512 }, { 4, 73, 512 }, { 4, 74, 512 }, { 5, 75, 512 }, { 4, 76, 512 }, { 5, 77, 512 }, { 5, 78, 512 }, { 6, 79, 512 }, + { 3, 80, 512 }, { 4, 81, 512 }, { 4, 82, 512 }, { 5, 83, 512 }, { 4, 84, 512 }, { 5, 85, 512 }, { 5, 86, 512 }, { 6, 87, 512 }, + { 4, 88, 512 }, { 5, 89, 512 }, { 5, 90, 512 }, { 6, 91, 512 }, { 5, 92, 512 }, { 6, 93, 512 }, { 6, 94, 512 }, { 7, 95, 512 }, + { 3, 96, 512 }, { 4, 97, 512 }, { 4, 98, 512 }, { 5, 99, 512 }, { 4, 100, 512 }, { 5, 101, 512 }, { 5, 102, 512 }, { 6, 103, 512 }, + { 4, 104, 512 }, { 5, 105, 512 }, { 5, 106, 512 }, { 6, 107, 512 }, { 5, 108, 512 }, { 6, 109, 512 }, { 6, 110, 512 }, { 7, 111, 512 }, + { 4, 112, 512 }, { 5, 113, 512 }, { 5, 114, 512 }, { 6, 115, 512 }, { 5, 116, 512 }, { 6, 117, 512 }, { 6, 118, 512 }, { 7, 119, 512 }, + { 5, 120, 512 }, { 6, 121, 512 }, { 6, 122, 512 }, { 7, 123, 512 }, { 6, 124, 512 }, { 7, 125, 512 }, { 7, 126, 512 }, { 8, 127, 512 }, + { 2, 128, 512 }, { 3, 129, 512 }, { 3, 130, 512 }, { 4, 131, 512 }, { 3, 132, 512 }, { 4, 133, 512 }, { 4, 134, 512 }, { 5, 135, 512 }, + { 3, 136, 512 }, { 4, 137, 512 }, { 4, 138, 512 }, { 5, 139, 512 }, { 4, 140, 512 }, { 5, 141, 512 }, { 5, 142, 512 }, { 6, 143, 512 }, + { 3, 144, 512 }, { 4, 145, 512 }, { 4, 146, 512 }, { 5, 147, 512 }, { 4, 148, 512 }, { 5, 149, 512 }, { 5, 150, 512 }, { 6, 151, 512 }, + { 4, 152, 512 }, { 5, 153, 512 }, { 5, 154, 512 }, { 6, 155, 512 }, { 5, 156, 512 }, { 6, 157, 512 }, { 6, 158, 512 }, { 7, 159, 512 }, + { 3, 160, 512 }, { 4, 161, 512 }, { 4, 162, 512 }, { 5, 163, 512 }, { 4, 164, 512 }, { 5, 165, 512 }, { 5, 166, 512 }, { 6, 167, 512 }, + { 4, 168, 512 }, { 5, 169, 512 }, { 5, 170, 512 }, { 6, 171, 512 }, { 5, 172, 512 }, { 6, 173, 512 }, { 6, 174, 512 }, { 7, 175, 512 }, + { 4, 176, 512 }, { 5, 177, 512 }, { 5, 178, 512 }, { 6, 179, 512 }, { 5, 180, 512 }, { 6, 181, 512 }, { 6, 182, 512 }, { 7, 183, 512 }, + { 5, 184, 512 }, { 6, 185, 512 }, { 6, 186, 512 }, { 7, 187, 512 }, { 6, 188, 512 }, { 7, 189, 512 }, { 7, 190, 512 }, { 8, 191, 512 }, + { 3, 192, 512 }, { 4, 193, 512 }, { 4, 194, 512 }, { 5, 195, 512 }, { 4, 196, 512 }, { 5, 197, 512 }, { 5, 198, 512 }, { 6, 199, 512 }, + { 4, 200, 512 }, { 5, 201, 512 }, { 5, 202, 512 }, { 6, 203, 512 }, { 5, 204, 512 }, { 6, 205, 512 }, { 6, 206, 512 }, { 7, 207, 512 }, + { 4, 208, 512 }, { 5, 209, 512 }, { 5, 210, 512 }, { 6, 211, 512 }, { 5, 212, 512 }, { 6, 213, 512 }, { 6, 214, 512 }, { 7, 215, 512 }, + { 5, 216, 512 }, { 6, 217, 512 }, { 6, 218, 512 }, { 7, 219, 512 }, { 6, 220, 512 }, { 7, 221, 512 }, { 7, 222, 512 }, { 8, 223, 512 }, + { 4, 224, 512 }, { 5, 225, 512 }, { 5, 226, 512 }, { 6, 227, 512 }, { 5, 228, 512 }, { 6, 229, 512 }, { 6, 230, 512 }, { 7, 231, 512 }, + { 5, 232, 512 }, { 6, 233, 512 }, { 6, 234, 512 }, { 7, 235, 512 }, { 6, 236, 512 }, { 7, 237, 512 }, { 7, 238, 512 }, { 8, 239, 512 }, + { 5, 240, 512 }, { 6, 241, 512 }, { 6, 242, 512 }, { 7, 243, 512 }, { 6, 244, 512 }, { 7, 245, 512 }, { 7, 246, 512 }, { 8, 247, 512 }, + { 6, 248, 512 }, { 7, 249, 512 }, { 7, 250, 512 }, { 8, 251, 512 }, { 7, 252, 512 }, { 8, 253, 512 }, { 8, 254, 512 }, { 9, 255, 512 }, + { 2, 256, 512 }, { 3, 257, 512 }, { 3, 258, 512 }, { 4, 259, 512 }, { 3, 260, 512 }, { 4, 261, 512 }, { 4, 262, 512 }, { 5, 263, 512 }, + { 3, 264, 512 }, { 4, 265, 512 }, { 4, 266, 512 }, { 5, 267, 512 }, { 4, 268, 512 }, { 5, 269, 512 }, { 5, 270, 512 }, { 6, 271, 512 }, + { 3, 272, 512 }, { 4, 273, 512 }, { 4, 274, 512 }, { 5, 275, 512 }, { 4, 276, 512 }, { 5, 277, 512 }, { 5, 278, 512 }, { 6, 279, 512 }, + { 4, 280, 512 }, { 5, 281, 512 }, { 5, 282, 512 }, { 6, 283, 512 }, { 5, 284, 512 }, { 6, 285, 512 }, { 6, 286, 512 }, { 7, 287, 512 }, + { 3, 288, 512 }, { 4, 289, 512 }, { 4, 290, 512 }, { 5, 291, 512 }, { 4, 292, 512 }, { 5, 293, 512 }, { 5, 294, 512 }, { 6, 295, 512 }, + { 4, 296, 512 }, { 5, 297, 512 }, { 5, 298, 512 }, { 6, 299, 512 }, { 5, 300, 512 }, { 6, 301, 512 }, { 6, 302, 512 }, { 7, 303, 512 }, + { 4, 304, 512 }, { 5, 305, 512 }, { 5, 306, 512 }, { 6, 307, 512 }, { 5, 308, 512 }, { 6, 309, 512 }, { 6, 310, 512 }, { 7, 311, 512 }, + { 5, 312, 512 }, { 6, 313, 512 }, { 6, 314, 512 }, { 7, 315, 512 }, { 6, 316, 512 }, { 7, 317, 512 }, { 7, 318, 512 }, { 8, 319, 512 }, + { 3, 320, 512 }, { 4, 321, 512 }, { 4, 322, 512 }, { 5, 323, 512 }, { 4, 324, 512 }, { 5, 325, 512 }, { 5, 326, 512 }, { 6, 327, 512 }, + { 4, 328, 512 }, { 5, 329, 512 }, { 5, 330, 512 }, { 6, 331, 512 }, { 5, 332, 512 }, { 6, 333, 512 }, { 6, 334, 512 }, { 7, 335, 512 }, + { 4, 336, 512 }, { 5, 337, 512 }, { 5, 338, 512 }, { 6, 339, 512 }, { 5, 340, 512 }, { 6, 341, 512 }, { 6, 342, 512 }, { 7, 343, 512 }, + { 5, 344, 512 }, { 6, 345, 512 }, { 6, 346, 512 }, { 7, 347, 512 }, { 6, 348, 512 }, { 7, 349, 512 }, { 7, 350, 512 }, { 8, 351, 512 }, + { 4, 352, 512 }, { 5, 353, 512 }, { 5, 354, 512 }, { 6, 355, 512 }, { 5, 356, 512 }, { 6, 357, 512 }, { 6, 358, 512 }, { 7, 359, 512 }, + { 5, 360, 512 }, { 6, 361, 512 }, { 6, 362, 512 }, { 7, 363, 512 }, { 6, 364, 512 }, { 7, 365, 512 }, { 7, 366, 512 }, { 8, 367, 512 }, + { 5, 368, 512 }, { 6, 369, 512 }, { 6, 370, 512 }, { 7, 371, 512 }, { 6, 372, 512 }, { 7, 373, 512 }, { 7, 374, 512 }, { 8, 375, 512 }, + { 6, 376, 512 }, { 7, 377, 512 }, { 7, 378, 512 }, { 8, 379, 512 }, { 7, 380, 512 }, { 8, 381, 512 }, { 8, 382, 512 }, { 9, 383, 512 }, + { 3, 384, 512 }, { 4, 385, 512 }, { 4, 386, 512 }, { 5, 387, 512 }, { 4, 388, 512 }, { 5, 389, 512 }, { 5, 390, 512 }, { 6, 391, 512 }, + { 4, 392, 512 }, { 5, 393, 512 }, { 5, 394, 512 }, { 6, 395, 512 }, { 5, 396, 512 }, { 6, 397, 512 }, { 6, 398, 512 }, { 7, 399, 512 }, + { 4, 400, 512 }, { 5, 401, 512 }, { 5, 402, 512 }, { 6, 403, 512 }, { 5, 404, 512 }, { 6, 405, 512 }, { 6, 406, 512 }, { 7, 407, 512 }, + { 5, 408, 512 }, { 6, 409, 512 }, { 6, 410, 512 }, { 7, 411, 512 }, { 6, 412, 512 }, { 7, 413, 512 }, { 7, 414, 512 }, { 8, 415, 512 }, + { 4, 416, 512 }, { 5, 417, 512 }, { 5, 418, 512 }, { 6, 419, 512 }, { 5, 420, 512 }, { 6, 421, 512 }, { 6, 422, 512 }, { 7, 423, 512 }, + { 5, 424, 512 }, { 6, 425, 512 }, { 6, 426, 512 }, { 7, 427, 512 }, { 6, 428, 512 }, { 7, 429, 512 }, { 7, 430, 512 }, { 8, 431, 512 }, + { 5, 432, 512 }, { 6, 433, 512 }, { 6, 434, 512 }, { 7, 435, 512 }, { 6, 436, 512 }, { 7, 437, 512 }, { 7, 438, 512 }, { 8, 439, 512 }, + { 6, 440, 512 }, { 7, 441, 512 }, { 7, 442, 512 }, { 8, 443, 512 }, { 7, 444, 512 }, { 8, 445, 512 }, { 8, 446, 512 }, { 9, 447, 512 }, + { 4, 448, 512 }, { 5, 449, 512 }, { 5, 450, 512 }, { 6, 451, 512 }, { 5, 452, 512 }, { 6, 453, 512 }, { 6, 454, 512 }, { 7, 455, 512 }, + { 5, 456, 512 }, { 6, 457, 512 }, { 6, 458, 512 }, { 7, 459, 512 }, { 6, 460, 512 }, { 7, 461, 512 }, { 7, 462, 512 }, { 8, 463, 512 }, + { 5, 464, 512 }, { 6, 465, 512 }, { 6, 466, 512 }, { 7, 467, 512 }, { 6, 468, 512 }, { 7, 469, 512 }, { 7, 470, 512 }, { 8, 471, 512 }, + { 6, 472, 512 }, { 7, 473, 512 }, { 7, 474, 512 }, { 8, 475, 512 }, { 7, 476, 512 }, { 8, 477, 512 }, { 8, 478, 512 }, { 9, 479, 512 }, + { 5, 480, 512 }, { 6, 481, 512 }, { 6, 482, 512 }, { 7, 483, 512 }, { 6, 484, 512 }, { 7, 485, 512 }, { 7, 486, 512 }, { 8, 487, 512 }, + { 6, 488, 512 }, { 7, 489, 512 }, { 7, 490, 512 }, { 8, 491, 512 }, { 7, 492, 512 }, { 8, 493, 512 }, { 8, 494, 512 }, { 9, 495, 512 }, + { 6, 496, 512 }, { 7, 497, 512 }, { 7, 498, 512 }, { 8, 499, 512 }, { 7, 500, 512 }, { 8, 501, 512 }, { 8, 502, 512 }, { 9, 503, 512 }, + { 7, 504, 512 }, { 8, 505, 512 }, { 8, 506, 512 }, { 9, 507, 512 }, { 8, 508, 512 }, { 9, 509, 512 }, { 9, 510, 512 }, { 10, 511, 512 }, #if FP_LUT > 10 - { 1, 0, 0 }, { 2, 1, 1024 }, { 2, 2, 1024 }, { 3, 3, 1024 }, { 2, 4, 1024 }, { 3, 5, 1024 }, { 3, 6, 1024 }, { 4, 7, 1024 }, - { 2, 8, 1024 }, { 3, 9, 1024 }, { 3, 10, 1024 }, { 4, 11, 1024 }, { 3, 12, 1024 }, { 4, 13, 1024 }, { 4, 14, 1024 }, { 5, 15, 1024 }, - { 2, 16, 1024 }, { 3, 17, 1024 }, { 3, 18, 1024 }, { 4, 19, 1024 }, { 3, 20, 1024 }, { 4, 21, 1024 }, { 4, 22, 1024 }, { 5, 23, 1024 }, - { 3, 24, 1024 }, { 4, 25, 1024 }, { 4, 26, 1024 }, { 5, 27, 1024 }, { 4, 28, 1024 }, { 5, 29, 1024 }, { 5, 30, 1024 }, { 6, 31, 1024 }, - { 2, 32, 1024 }, { 3, 33, 1024 }, { 3, 34, 1024 }, { 4, 35, 1024 }, { 3, 36, 1024 }, { 4, 37, 1024 }, { 4, 38, 1024 }, { 5, 39, 1024 }, - { 3, 40, 1024 }, { 4, 41, 1024 }, { 4, 42, 1024 }, { 5, 43, 1024 }, { 4, 44, 1024 }, { 5, 45, 1024 }, { 5, 46, 1024 }, { 6, 47, 1024 }, - { 3, 48, 1024 }, { 4, 49, 1024 }, { 4, 50, 1024 }, { 5, 51, 1024 }, { 4, 52, 1024 }, { 5, 53, 1024 }, { 5, 54, 1024 }, { 6, 55, 1024 }, - { 4, 56, 1024 }, { 5, 57, 1024 }, { 5, 58, 1024 }, { 6, 59, 1024 }, { 5, 60, 1024 }, { 6, 61, 1024 }, { 6, 62, 1024 }, { 7, 63, 1024 }, - { 2, 64, 1024 }, { 3, 65, 1024 }, { 3, 66, 1024 }, { 4, 67, 1024 }, { 3, 68, 1024 }, { 4, 69, 1024 }, { 4, 70, 1024 }, { 5, 71, 1024 }, - { 3, 72, 1024 }, { 4, 73, 1024 }, { 4, 74, 1024 }, { 5, 75, 1024 }, { 4, 76, 1024 }, { 5, 77, 1024 }, { 5, 78, 1024 }, { 6, 79, 1024 }, - { 3, 80, 1024 }, { 4, 81, 1024 }, { 4, 82, 1024 }, { 5, 83, 1024 }, { 4, 84, 1024 }, { 5, 85, 1024 }, { 5, 86, 1024 }, { 6, 87, 1024 }, - { 4, 88, 1024 }, { 5, 89, 1024 }, { 5, 90, 1024 }, { 6, 91, 1024 }, { 5, 92, 1024 }, { 6, 93, 1024 }, { 6, 94, 1024 }, { 7, 95, 1024 }, - { 3, 96, 1024 }, { 4, 97, 1024 }, { 4, 98, 1024 }, { 5, 99, 1024 }, { 4, 100, 1024 }, { 5, 101, 1024 }, { 5, 102, 1024 }, { 6, 103, 1024 }, - { 4, 104, 1024 }, { 5, 105, 1024 }, { 5, 106, 1024 }, { 6, 107, 1024 }, { 5, 108, 1024 }, { 6, 109, 1024 }, { 6, 110, 1024 }, { 7, 111, 1024 }, - { 4, 112, 1024 }, { 5, 113, 1024 }, { 5, 114, 1024 }, { 6, 115, 1024 }, { 5, 116, 1024 }, { 6, 117, 1024 }, { 6, 118, 1024 }, { 7, 119, 1024 }, - { 5, 120, 1024 }, { 6, 121, 1024 }, { 6, 122, 1024 }, { 7, 123, 1024 }, { 6, 124, 1024 }, { 7, 125, 1024 }, { 7, 126, 1024 }, { 8, 127, 1024 }, - { 2, 128, 1024 }, { 3, 129, 1024 }, { 3, 130, 1024 }, { 4, 131, 1024 }, { 3, 132, 1024 }, { 4, 133, 1024 }, { 4, 134, 1024 }, { 5, 135, 1024 }, - { 3, 136, 1024 }, { 4, 137, 1024 }, { 4, 138, 1024 }, { 5, 139, 1024 }, { 4, 140, 1024 }, { 5, 141, 1024 }, { 5, 142, 1024 }, { 6, 143, 1024 }, - { 3, 144, 1024 }, { 4, 145, 1024 }, { 4, 146, 1024 }, { 5, 147, 1024 }, { 4, 148, 1024 }, { 5, 149, 1024 }, { 5, 150, 1024 }, { 6, 151, 1024 }, - { 4, 152, 1024 }, { 5, 153, 1024 }, { 5, 154, 1024 }, { 6, 155, 1024 }, { 5, 156, 1024 }, { 6, 157, 1024 }, { 6, 158, 1024 }, { 7, 159, 1024 }, - { 3, 160, 1024 }, { 4, 161, 1024 }, { 4, 162, 1024 }, { 5, 163, 1024 }, { 4, 164, 1024 }, { 5, 165, 1024 }, { 5, 166, 1024 }, { 6, 167, 1024 }, - { 4, 168, 1024 }, { 5, 169, 1024 }, { 5, 170, 1024 }, { 6, 171, 1024 }, { 5, 172, 1024 }, { 6, 173, 1024 }, { 6, 174, 1024 }, { 7, 175, 1024 }, - { 4, 176, 1024 }, { 5, 177, 1024 }, { 5, 178, 1024 }, { 6, 179, 1024 }, { 5, 180, 1024 }, { 6, 181, 1024 }, { 6, 182, 1024 }, { 7, 183, 1024 }, - { 5, 184, 1024 }, { 6, 185, 1024 }, { 6, 186, 1024 }, { 7, 187, 1024 }, { 6, 188, 1024 }, { 7, 189, 1024 }, { 7, 190, 1024 }, { 8, 191, 1024 }, - { 3, 192, 1024 }, { 4, 193, 1024 }, { 4, 194, 1024 }, { 5, 195, 1024 }, { 4, 196, 1024 }, { 5, 197, 1024 }, { 5, 198, 1024 }, { 6, 199, 1024 }, - { 4, 200, 1024 }, { 5, 201, 1024 }, { 5, 202, 1024 }, { 6, 203, 1024 }, { 5, 204, 1024 }, { 6, 205, 1024 }, { 6, 206, 1024 }, { 7, 207, 1024 }, - { 4, 208, 1024 }, { 5, 209, 1024 }, { 5, 210, 1024 }, { 6, 211, 1024 }, { 5, 212, 1024 }, { 6, 213, 1024 }, { 6, 214, 1024 }, { 7, 215, 1024 }, - { 5, 216, 1024 }, { 6, 217, 1024 }, { 6, 218, 1024 }, { 7, 219, 1024 }, { 6, 220, 1024 }, { 7, 221, 1024 }, { 7, 222, 1024 }, { 8, 223, 1024 }, - { 4, 224, 1024 }, { 5, 225, 1024 }, { 5, 226, 1024 }, { 6, 227, 1024 }, { 5, 228, 1024 }, { 6, 229, 1024 }, { 6, 230, 1024 }, { 7, 231, 1024 }, - { 5, 232, 1024 }, { 6, 233, 1024 }, { 6, 234, 1024 }, { 7, 235, 1024 }, { 6, 236, 1024 }, { 7, 237, 1024 }, { 7, 238, 1024 }, { 8, 239, 1024 }, - { 5, 240, 1024 }, { 6, 241, 1024 }, { 6, 242, 1024 }, { 7, 243, 1024 }, { 6, 244, 1024 }, { 7, 245, 1024 }, { 7, 246, 1024 }, { 8, 247, 1024 }, - { 6, 248, 1024 }, { 7, 249, 1024 }, { 7, 250, 1024 }, { 8, 251, 1024 }, { 7, 252, 1024 }, { 8, 253, 1024 }, { 8, 254, 1024 }, { 9, 255, 1024 }, - { 2, 256, 1024 }, { 3, 257, 1024 }, { 3, 258, 1024 }, { 4, 259, 1024 }, { 3, 260, 1024 }, { 4, 261, 1024 }, { 4, 262, 1024 }, { 5, 263, 1024 }, - { 3, 264, 1024 }, { 4, 265, 1024 }, { 4, 266, 1024 }, { 5, 267, 1024 }, { 4, 268, 1024 }, { 5, 269, 1024 }, { 5, 270, 1024 }, { 6, 271, 1024 }, - { 3, 272, 1024 }, { 4, 273, 1024 }, { 4, 274, 1024 }, { 5, 275, 1024 }, { 4, 276, 1024 }, { 5, 277, 1024 }, { 5, 278, 1024 }, { 6, 279, 1024 }, - { 4, 280, 1024 }, { 5, 281, 1024 }, { 5, 282, 1024 }, { 6, 283, 1024 }, { 5, 284, 1024 }, { 6, 285, 1024 }, { 6, 286, 1024 }, { 7, 287, 1024 }, - { 3, 288, 1024 }, { 4, 289, 1024 }, { 4, 290, 1024 }, { 5, 291, 1024 }, { 4, 292, 1024 }, { 5, 293, 1024 }, { 5, 294, 1024 }, { 6, 295, 1024 }, - { 4, 296, 1024 }, { 5, 297, 1024 }, { 5, 298, 1024 }, { 6, 299, 1024 }, { 5, 300, 1024 }, { 6, 301, 1024 }, { 6, 302, 1024 }, { 7, 303, 1024 }, - { 4, 304, 1024 }, { 5, 305, 1024 }, { 5, 306, 1024 }, { 6, 307, 1024 }, { 5, 308, 1024 }, { 6, 309, 1024 }, { 6, 310, 1024 }, { 7, 311, 1024 }, - { 5, 312, 1024 }, { 6, 313, 1024 }, { 6, 314, 1024 }, { 7, 315, 1024 }, { 6, 316, 1024 }, { 7, 317, 1024 }, { 7, 318, 1024 }, { 8, 319, 1024 }, - { 3, 320, 1024 }, { 4, 321, 1024 }, { 4, 322, 1024 }, { 5, 323, 1024 }, { 4, 324, 1024 }, { 5, 325, 1024 }, { 5, 326, 1024 }, { 6, 327, 1024 }, - { 4, 328, 1024 }, { 5, 329, 1024 }, { 5, 330, 1024 }, { 6, 331, 1024 }, { 5, 332, 1024 }, { 6, 333, 1024 }, { 6, 334, 1024 }, { 7, 335, 1024 }, - { 4, 336, 1024 }, { 5, 337, 1024 }, { 5, 338, 1024 }, { 6, 339, 1024 }, { 5, 340, 1024 }, { 6, 341, 1024 }, { 6, 342, 1024 }, { 7, 343, 1024 }, - { 5, 344, 1024 }, { 6, 345, 1024 }, { 6, 346, 1024 }, { 7, 347, 1024 }, { 6, 348, 1024 }, { 7, 349, 1024 }, { 7, 350, 1024 }, { 8, 351, 1024 }, - { 4, 352, 1024 }, { 5, 353, 1024 }, { 5, 354, 1024 }, { 6, 355, 1024 }, { 5, 356, 1024 }, { 6, 357, 1024 }, { 6, 358, 1024 }, { 7, 359, 1024 }, - { 5, 360, 1024 }, { 6, 361, 1024 }, { 6, 362, 1024 }, { 7, 363, 1024 }, { 6, 364, 1024 }, { 7, 365, 1024 }, { 7, 366, 1024 }, { 8, 367, 1024 }, - { 5, 368, 1024 }, { 6, 369, 1024 }, { 6, 370, 1024 }, { 7, 371, 1024 }, { 6, 372, 1024 }, { 7, 373, 1024 }, { 7, 374, 1024 }, { 8, 375, 1024 }, - { 6, 376, 1024 }, { 7, 377, 1024 }, { 7, 378, 1024 }, { 8, 379, 1024 }, { 7, 380, 1024 }, { 8, 381, 1024 }, { 8, 382, 1024 }, { 9, 383, 1024 }, - { 3, 384, 1024 }, { 4, 385, 1024 }, { 4, 386, 1024 }, { 5, 387, 1024 }, { 4, 388, 1024 }, { 5, 389, 1024 }, { 5, 390, 1024 }, { 6, 391, 1024 }, - { 4, 392, 1024 }, { 5, 393, 1024 }, { 5, 394, 1024 }, { 6, 395, 1024 }, { 5, 396, 1024 }, { 6, 397, 1024 }, { 6, 398, 1024 }, { 7, 399, 1024 }, - { 4, 400, 1024 }, { 5, 401, 1024 }, { 5, 402, 1024 }, { 6, 403, 1024 }, { 5, 404, 1024 }, { 6, 405, 1024 }, { 6, 406, 1024 }, { 7, 407, 1024 }, - { 5, 408, 1024 }, { 6, 409, 1024 }, { 6, 410, 1024 }, { 7, 411, 1024 }, { 6, 412, 1024 }, { 7, 413, 1024 }, { 7, 414, 1024 }, { 8, 415, 1024 }, - { 4, 416, 1024 }, { 5, 417, 1024 }, { 5, 418, 1024 }, { 6, 419, 1024 }, { 5, 420, 1024 }, { 6, 421, 1024 }, { 6, 422, 1024 }, { 7, 423, 1024 }, - { 5, 424, 1024 }, { 6, 425, 1024 }, { 6, 426, 1024 }, { 7, 427, 1024 }, { 6, 428, 1024 }, { 7, 429, 1024 }, { 7, 430, 1024 }, { 8, 431, 1024 }, - { 5, 432, 1024 }, { 6, 433, 1024 }, { 6, 434, 1024 }, { 7, 435, 1024 }, { 6, 436, 1024 }, { 7, 437, 1024 }, { 7, 438, 1024 }, { 8, 439, 1024 }, - { 6, 440, 1024 }, { 7, 441, 1024 }, { 7, 442, 1024 }, { 8, 443, 1024 }, { 7, 444, 1024 }, { 8, 445, 1024 }, { 8, 446, 1024 }, { 9, 447, 1024 }, - { 4, 448, 1024 }, { 5, 449, 1024 }, { 5, 450, 1024 }, { 6, 451, 1024 }, { 5, 452, 1024 }, { 6, 453, 1024 }, { 6, 454, 1024 }, { 7, 455, 1024 }, - { 5, 456, 1024 }, { 6, 457, 1024 }, { 6, 458, 1024 }, { 7, 459, 1024 }, { 6, 460, 1024 }, { 7, 461, 1024 }, { 7, 462, 1024 }, { 8, 463, 1024 }, - { 5, 464, 1024 }, { 6, 465, 1024 }, { 6, 466, 1024 }, { 7, 467, 1024 }, { 6, 468, 1024 }, { 7, 469, 1024 }, { 7, 470, 1024 }, { 8, 471, 1024 }, - { 6, 472, 1024 }, { 7, 473, 1024 }, { 7, 474, 1024 }, { 8, 475, 1024 }, { 7, 476, 1024 }, { 8, 477, 1024 }, { 8, 478, 1024 }, { 9, 479, 1024 }, - { 5, 480, 1024 }, { 6, 481, 1024 }, { 6, 482, 1024 }, { 7, 483, 1024 }, { 6, 484, 1024 }, { 7, 485, 1024 }, { 7, 486, 1024 }, { 8, 487, 1024 }, - { 6, 488, 1024 }, { 7, 489, 1024 }, { 7, 490, 1024 }, { 8, 491, 1024 }, { 7, 492, 1024 }, { 8, 493, 1024 }, { 8, 494, 1024 }, { 9, 495, 1024 }, - { 6, 496, 1024 }, { 7, 497, 1024 }, { 7, 498, 1024 }, { 8, 499, 1024 }, { 7, 500, 1024 }, { 8, 501, 1024 }, { 8, 502, 1024 }, { 9, 503, 1024 }, - { 7, 504, 1024 }, { 8, 505, 1024 }, { 8, 506, 1024 }, { 9, 507, 1024 }, { 8, 508, 1024 }, { 9, 509, 1024 }, { 9, 510, 1024 }, { 10, 511, 1024 }, - { 2, 512, 1024 }, { 3, 513, 1024 }, { 3, 514, 1024 }, { 4, 515, 1024 }, { 3, 516, 1024 }, { 4, 517, 1024 }, { 4, 518, 1024 }, { 5, 519, 1024 }, - { 3, 520, 1024 }, { 4, 521, 1024 }, { 4, 522, 1024 }, { 5, 523, 1024 }, { 4, 524, 1024 }, { 5, 525, 1024 }, { 5, 526, 1024 }, { 6, 527, 1024 }, - { 3, 528, 1024 }, { 4, 529, 1024 }, { 4, 530, 1024 }, { 5, 531, 1024 }, { 4, 532, 1024 }, { 5, 533, 1024 }, { 5, 534, 1024 }, { 6, 535, 1024 }, - { 4, 536, 1024 }, { 5, 537, 1024 }, { 5, 538, 1024 }, { 6, 539, 1024 }, { 5, 540, 1024 }, { 6, 541, 1024 }, { 6, 542, 1024 }, { 7, 543, 1024 }, - { 3, 544, 1024 }, { 4, 545, 1024 }, { 4, 546, 1024 }, { 5, 547, 1024 }, { 4, 548, 1024 }, { 5, 549, 1024 }, { 5, 550, 1024 }, { 6, 551, 1024 }, - { 4, 552, 1024 }, { 5, 553, 1024 }, { 5, 554, 1024 }, { 6, 555, 1024 }, { 5, 556, 1024 }, { 6, 557, 1024 }, { 6, 558, 1024 }, { 7, 559, 1024 }, - { 4, 560, 1024 }, { 5, 561, 1024 }, { 5, 562, 1024 }, { 6, 563, 1024 }, { 5, 564, 1024 }, { 6, 565, 1024 }, { 6, 566, 1024 }, { 7, 567, 1024 }, - { 5, 568, 1024 }, { 6, 569, 1024 }, { 6, 570, 1024 }, { 7, 571, 1024 }, { 6, 572, 1024 }, { 7, 573, 1024 }, { 7, 574, 1024 }, { 8, 575, 1024 }, - { 3, 576, 1024 }, { 4, 577, 1024 }, { 4, 578, 1024 }, { 5, 579, 1024 }, { 4, 580, 1024 }, { 5, 581, 1024 }, { 5, 582, 1024 }, { 6, 583, 1024 }, - { 4, 584, 1024 }, { 5, 585, 1024 }, { 5, 586, 1024 }, { 6, 587, 1024 }, { 5, 588, 1024 }, { 6, 589, 1024 }, { 6, 590, 1024 }, { 7, 591, 1024 }, - { 4, 592, 1024 }, { 5, 593, 1024 }, { 5, 594, 1024 }, { 6, 595, 1024 }, { 5, 596, 1024 }, { 6, 597, 1024 }, { 6, 598, 1024 }, { 7, 599, 1024 }, - { 5, 600, 1024 }, { 6, 601, 1024 }, { 6, 602, 1024 }, { 7, 603, 1024 }, { 6, 604, 1024 }, { 7, 605, 1024 }, { 7, 606, 1024 }, { 8, 607, 1024 }, - { 4, 608, 1024 }, { 5, 609, 1024 }, { 5, 610, 1024 }, { 6, 611, 1024 }, { 5, 612, 1024 }, { 6, 613, 1024 }, { 6, 614, 1024 }, { 7, 615, 1024 }, - { 5, 616, 1024 }, { 6, 617, 1024 }, { 6, 618, 1024 }, { 7, 619, 1024 }, { 6, 620, 1024 }, { 7, 621, 1024 }, { 7, 622, 1024 }, { 8, 623, 1024 }, - { 5, 624, 1024 }, { 6, 625, 1024 }, { 6, 626, 1024 }, { 7, 627, 1024 }, { 6, 628, 1024 }, { 7, 629, 1024 }, { 7, 630, 1024 }, { 8, 631, 1024 }, - { 6, 632, 1024 }, { 7, 633, 1024 }, { 7, 634, 1024 }, { 8, 635, 1024 }, { 7, 636, 1024 }, { 8, 637, 1024 }, { 8, 638, 1024 }, { 9, 639, 1024 }, - { 3, 640, 1024 }, { 4, 641, 1024 }, { 4, 642, 1024 }, { 5, 643, 1024 }, { 4, 644, 1024 }, { 5, 645, 1024 }, { 5, 646, 1024 }, { 6, 647, 1024 }, - { 4, 648, 1024 }, { 5, 649, 1024 }, { 5, 650, 1024 }, { 6, 651, 1024 }, { 5, 652, 1024 }, { 6, 653, 1024 }, { 6, 654, 1024 }, { 7, 655, 1024 }, - { 4, 656, 1024 }, { 5, 657, 1024 }, { 5, 658, 1024 }, { 6, 659, 1024 }, { 5, 660, 1024 }, { 6, 661, 1024 }, { 6, 662, 1024 }, { 7, 663, 1024 }, - { 5, 664, 1024 }, { 6, 665, 1024 }, { 6, 666, 1024 }, { 7, 667, 1024 }, { 6, 668, 1024 }, { 7, 669, 1024 }, { 7, 670, 1024 }, { 8, 671, 1024 }, - { 4, 672, 1024 }, { 5, 673, 1024 }, { 5, 674, 1024 }, { 6, 675, 1024 }, { 5, 676, 1024 }, { 6, 677, 1024 }, { 6, 678, 1024 }, { 7, 679, 1024 }, - { 5, 680, 1024 }, { 6, 681, 1024 }, { 6, 682, 1024 }, { 7, 683, 1024 }, { 6, 684, 1024 }, { 7, 685, 1024 }, { 7, 686, 1024 }, { 8, 687, 1024 }, - { 5, 688, 1024 }, { 6, 689, 1024 }, { 6, 690, 1024 }, { 7, 691, 1024 }, { 6, 692, 1024 }, { 7, 693, 1024 }, { 7, 694, 1024 }, { 8, 695, 1024 }, - { 6, 696, 1024 }, { 7, 697, 1024 }, { 7, 698, 1024 }, { 8, 699, 1024 }, { 7, 700, 1024 }, { 8, 701, 1024 }, { 8, 702, 1024 }, { 9, 703, 1024 }, - { 4, 704, 1024 }, { 5, 705, 1024 }, { 5, 706, 1024 }, { 6, 707, 1024 }, { 5, 708, 1024 }, { 6, 709, 1024 }, { 6, 710, 1024 }, { 7, 711, 1024 }, - { 5, 712, 1024 }, { 6, 713, 1024 }, { 6, 714, 1024 }, { 7, 715, 1024 }, { 6, 716, 1024 }, { 7, 717, 1024 }, { 7, 718, 1024 }, { 8, 719, 1024 }, - { 5, 720, 1024 }, { 6, 721, 1024 }, { 6, 722, 1024 }, { 7, 723, 1024 }, { 6, 724, 1024 }, { 7, 725, 1024 }, { 7, 726, 1024 }, { 8, 727, 1024 }, - { 6, 728, 1024 }, { 7, 729, 1024 }, { 7, 730, 1024 }, { 8, 731, 1024 }, { 7, 732, 1024 }, { 8, 733, 1024 }, { 8, 734, 1024 }, { 9, 735, 1024 }, - { 5, 736, 1024 }, { 6, 737, 1024 }, { 6, 738, 1024 }, { 7, 739, 1024 }, { 6, 740, 1024 }, { 7, 741, 1024 }, { 7, 742, 1024 }, { 8, 743, 1024 }, - { 6, 744, 1024 }, { 7, 745, 1024 }, { 7, 746, 1024 }, { 8, 747, 1024 }, { 7, 748, 1024 }, { 8, 749, 1024 }, { 8, 750, 1024 }, { 9, 751, 1024 }, - { 6, 752, 1024 }, { 7, 753, 1024 }, { 7, 754, 1024 }, { 8, 755, 1024 }, { 7, 756, 1024 }, { 8, 757, 1024 }, { 8, 758, 1024 }, { 9, 759, 1024 }, - { 7, 760, 1024 }, { 8, 761, 1024 }, { 8, 762, 1024 }, { 9, 763, 1024 }, { 8, 764, 1024 }, { 9, 765, 1024 }, { 9, 766, 1024 }, { 10, 767, 1024 }, - { 3, 768, 1024 }, { 4, 769, 1024 }, { 4, 770, 1024 }, { 5, 771, 1024 }, { 4, 772, 1024 }, { 5, 773, 1024 }, { 5, 774, 1024 }, { 6, 775, 1024 }, - { 4, 776, 1024 }, { 5, 777, 1024 }, { 5, 778, 1024 }, { 6, 779, 1024 }, { 5, 780, 1024 }, { 6, 781, 1024 }, { 6, 782, 1024 }, { 7, 783, 1024 }, - { 4, 784, 1024 }, { 5, 785, 1024 }, { 5, 786, 1024 }, { 6, 787, 1024 }, { 5, 788, 1024 }, { 6, 789, 1024 }, { 6, 790, 1024 }, { 7, 791, 1024 }, - { 5, 792, 1024 }, { 6, 793, 1024 }, { 6, 794, 1024 }, { 7, 795, 1024 }, { 6, 796, 1024 }, { 7, 797, 1024 }, { 7, 798, 1024 }, { 8, 799, 1024 }, - { 4, 800, 1024 }, { 5, 801, 1024 }, { 5, 802, 1024 }, { 6, 803, 1024 }, { 5, 804, 1024 }, { 6, 805, 1024 }, { 6, 806, 1024 }, { 7, 807, 1024 }, - { 5, 808, 1024 }, { 6, 809, 1024 }, { 6, 810, 1024 }, { 7, 811, 1024 }, { 6, 812, 1024 }, { 7, 813, 1024 }, { 7, 814, 1024 }, { 8, 815, 1024 }, - { 5, 816, 1024 }, { 6, 817, 1024 }, { 6, 818, 1024 }, { 7, 819, 1024 }, { 6, 820, 1024 }, { 7, 821, 1024 }, { 7, 822, 1024 }, { 8, 823, 1024 }, - { 6, 824, 1024 }, { 7, 825, 1024 }, { 7, 826, 1024 }, { 8, 827, 1024 }, { 7, 828, 1024 }, { 8, 829, 1024 }, { 8, 830, 1024 }, { 9, 831, 1024 }, - { 4, 832, 1024 }, { 5, 833, 1024 }, { 5, 834, 1024 }, { 6, 835, 1024 }, { 5, 836, 1024 }, { 6, 837, 1024 }, { 6, 838, 1024 }, { 7, 839, 1024 }, - { 5, 840, 1024 }, { 6, 841, 1024 }, { 6, 842, 1024 }, { 7, 843, 1024 }, { 6, 844, 1024 }, { 7, 845, 1024 }, { 7, 846, 1024 }, { 8, 847, 1024 }, - { 5, 848, 1024 }, { 6, 849, 1024 }, { 6, 850, 1024 }, { 7, 851, 1024 }, { 6, 852, 1024 }, { 7, 853, 1024 }, { 7, 854, 1024 }, { 8, 855, 1024 }, - { 6, 856, 1024 }, { 7, 857, 1024 }, { 7, 858, 1024 }, { 8, 859, 1024 }, { 7, 860, 1024 }, { 8, 861, 1024 }, { 8, 862, 1024 }, { 9, 863, 1024 }, - { 5, 864, 1024 }, { 6, 865, 1024 }, { 6, 866, 1024 }, { 7, 867, 1024 }, { 6, 868, 1024 }, { 7, 869, 1024 }, { 7, 870, 1024 }, { 8, 871, 1024 }, - { 6, 872, 1024 }, { 7, 873, 1024 }, { 7, 874, 1024 }, { 8, 875, 1024 }, { 7, 876, 1024 }, { 8, 877, 1024 }, { 8, 878, 1024 }, { 9, 879, 1024 }, - { 6, 880, 1024 }, { 7, 881, 1024 }, { 7, 882, 1024 }, { 8, 883, 1024 }, { 7, 884, 1024 }, { 8, 885, 1024 }, { 8, 886, 1024 }, { 9, 887, 1024 }, - { 7, 888, 1024 }, { 8, 889, 1024 }, { 8, 890, 1024 }, { 9, 891, 1024 }, { 8, 892, 1024 }, { 9, 893, 1024 }, { 9, 894, 1024 }, { 10, 895, 1024 }, - { 4, 896, 1024 }, { 5, 897, 1024 }, { 5, 898, 1024 }, { 6, 899, 1024 }, { 5, 900, 1024 }, { 6, 901, 1024 }, { 6, 902, 1024 }, { 7, 903, 1024 }, - { 5, 904, 1024 }, { 6, 905, 1024 }, { 6, 906, 1024 }, { 7, 907, 1024 }, { 6, 908, 1024 }, { 7, 909, 1024 }, { 7, 910, 1024 }, { 8, 911, 1024 }, - { 5, 912, 1024 }, { 6, 913, 1024 }, { 6, 914, 1024 }, { 7, 915, 1024 }, { 6, 916, 1024 }, { 7, 917, 1024 }, { 7, 918, 1024 }, { 8, 919, 1024 }, - { 6, 920, 1024 }, { 7, 921, 1024 }, { 7, 922, 1024 }, { 8, 923, 1024 }, { 7, 924, 1024 }, { 8, 925, 1024 }, { 8, 926, 1024 }, { 9, 927, 1024 }, - { 5, 928, 1024 }, { 6, 929, 1024 }, { 6, 930, 1024 }, { 7, 931, 1024 }, { 6, 932, 1024 }, { 7, 933, 1024 }, { 7, 934, 1024 }, { 8, 935, 1024 }, - { 6, 936, 1024 }, { 7, 937, 1024 }, { 7, 938, 1024 }, { 8, 939, 1024 }, { 7, 940, 1024 }, { 8, 941, 1024 }, { 8, 942, 1024 }, { 9, 943, 1024 }, - { 6, 944, 1024 }, { 7, 945, 1024 }, { 7, 946, 1024 }, { 8, 947, 1024 }, { 7, 948, 1024 }, { 8, 949, 1024 }, { 8, 950, 1024 }, { 9, 951, 1024 }, - { 7, 952, 1024 }, { 8, 953, 1024 }, { 8, 954, 1024 }, { 9, 955, 1024 }, { 8, 956, 1024 }, { 9, 957, 1024 }, { 9, 958, 1024 }, { 10, 959, 1024 }, - { 5, 960, 1024 }, { 6, 961, 1024 }, { 6, 962, 1024 }, { 7, 963, 1024 }, { 6, 964, 1024 }, { 7, 965, 1024 }, { 7, 966, 1024 }, { 8, 967, 1024 }, - { 6, 968, 1024 }, { 7, 969, 1024 }, { 7, 970, 1024 }, { 8, 971, 1024 }, { 7, 972, 1024 }, { 8, 973, 1024 }, { 8, 974, 1024 }, { 9, 975, 1024 }, - { 6, 976, 1024 }, { 7, 977, 1024 }, { 7, 978, 1024 }, { 8, 979, 1024 }, { 7, 980, 1024 }, { 8, 981, 1024 }, { 8, 982, 1024 }, { 9, 983, 1024 }, - { 7, 984, 1024 }, { 8, 985, 1024 }, { 8, 986, 1024 }, { 9, 987, 1024 }, { 8, 988, 1024 }, { 9, 989, 1024 }, { 9, 990, 1024 }, { 10, 991, 1024 }, - { 6, 992, 1024 }, { 7, 993, 1024 }, { 7, 994, 1024 }, { 8, 995, 1024 }, { 7, 996, 1024 }, { 8, 997, 1024 }, { 8, 998, 1024 }, { 9, 999, 1024 }, - { 7, 1000, 1024 }, { 8, 1001, 1024 }, { 8, 1002, 1024 }, { 9, 1003, 1024 }, { 8, 1004, 1024 }, { 9, 1005, 1024 }, { 9, 1006, 1024 }, { 10, 1007, 1024 }, - { 7, 1008, 1024 }, { 8, 1009, 1024 }, { 8, 1010, 1024 }, { 9, 1011, 1024 }, { 8, 1012, 1024 }, { 9, 1013, 1024 }, { 9, 1014, 1024 }, { 10, 1015, 1024 }, - { 8, 1016, 1024 }, { 9, 1017, 1024 }, { 9, 1018, 1024 }, { 10, 1019, 1024 }, { 9, 1020, 1024 }, { 10, 1021, 1024 }, { 10, 1022, 1024 }, { 11, 1023, 1024 }, + { 1, 0, 0 }, { 2, 1, 1024 }, { 2, 2, 1024 }, { 3, 3, 1024 }, { 2, 4, 1024 }, { 3, 5, 1024 }, { 3, 6, 1024 }, { 4, 7, 1024 }, + { 2, 8, 1024 }, { 3, 9, 1024 }, { 3, 10, 1024 }, { 4, 11, 1024 }, { 3, 12, 1024 }, { 4, 13, 1024 }, { 4, 14, 1024 }, { 5, 15, 1024 }, + { 2, 16, 1024 }, { 3, 17, 1024 }, { 3, 18, 1024 }, { 4, 19, 1024 }, { 3, 20, 1024 }, { 4, 21, 1024 }, { 4, 22, 1024 }, { 5, 23, 1024 }, + { 3, 24, 1024 }, { 4, 25, 1024 }, { 4, 26, 1024 }, { 5, 27, 1024 }, { 4, 28, 1024 }, { 5, 29, 1024 }, { 5, 30, 1024 }, { 6, 31, 1024 }, + { 2, 32, 1024 }, { 3, 33, 1024 }, { 3, 34, 1024 }, { 4, 35, 1024 }, { 3, 36, 1024 }, { 4, 37, 1024 }, { 4, 38, 1024 }, { 5, 39, 1024 }, + { 3, 40, 1024 }, { 4, 41, 1024 }, { 4, 42, 1024 }, { 5, 43, 1024 }, { 4, 44, 1024 }, { 5, 45, 1024 }, { 5, 46, 1024 }, { 6, 47, 1024 }, + { 3, 48, 1024 }, { 4, 49, 1024 }, { 4, 50, 1024 }, { 5, 51, 1024 }, { 4, 52, 1024 }, { 5, 53, 1024 }, { 5, 54, 1024 }, { 6, 55, 1024 }, + { 4, 56, 1024 }, { 5, 57, 1024 }, { 5, 58, 1024 }, { 6, 59, 1024 }, { 5, 60, 1024 }, { 6, 61, 1024 }, { 6, 62, 1024 }, { 7, 63, 1024 }, + { 2, 64, 1024 }, { 3, 65, 1024 }, { 3, 66, 1024 }, { 4, 67, 1024 }, { 3, 68, 1024 }, { 4, 69, 1024 }, { 4, 70, 1024 }, { 5, 71, 1024 }, + { 3, 72, 1024 }, { 4, 73, 1024 }, { 4, 74, 1024 }, { 5, 75, 1024 }, { 4, 76, 1024 }, { 5, 77, 1024 }, { 5, 78, 1024 }, { 6, 79, 1024 }, + { 3, 80, 1024 }, { 4, 81, 1024 }, { 4, 82, 1024 }, { 5, 83, 1024 }, { 4, 84, 1024 }, { 5, 85, 1024 }, { 5, 86, 1024 }, { 6, 87, 1024 }, + { 4, 88, 1024 }, { 5, 89, 1024 }, { 5, 90, 1024 }, { 6, 91, 1024 }, { 5, 92, 1024 }, { 6, 93, 1024 }, { 6, 94, 1024 }, { 7, 95, 1024 }, + { 3, 96, 1024 }, { 4, 97, 1024 }, { 4, 98, 1024 }, { 5, 99, 1024 }, { 4, 100, 1024 }, { 5, 101, 1024 }, { 5, 102, 1024 }, { 6, 103, 1024 }, + { 4, 104, 1024 }, { 5, 105, 1024 }, { 5, 106, 1024 }, { 6, 107, 1024 }, { 5, 108, 1024 }, { 6, 109, 1024 }, { 6, 110, 1024 }, { 7, 111, 1024 }, + { 4, 112, 1024 }, { 5, 113, 1024 }, { 5, 114, 1024 }, { 6, 115, 1024 }, { 5, 116, 1024 }, { 6, 117, 1024 }, { 6, 118, 1024 }, { 7, 119, 1024 }, + { 5, 120, 1024 }, { 6, 121, 1024 }, { 6, 122, 1024 }, { 7, 123, 1024 }, { 6, 124, 1024 }, { 7, 125, 1024 }, { 7, 126, 1024 }, { 8, 127, 1024 }, + { 2, 128, 1024 }, { 3, 129, 1024 }, { 3, 130, 1024 }, { 4, 131, 1024 }, { 3, 132, 1024 }, { 4, 133, 1024 }, { 4, 134, 1024 }, { 5, 135, 1024 }, + { 3, 136, 1024 }, { 4, 137, 1024 }, { 4, 138, 1024 }, { 5, 139, 1024 }, { 4, 140, 1024 }, { 5, 141, 1024 }, { 5, 142, 1024 }, { 6, 143, 1024 }, + { 3, 144, 1024 }, { 4, 145, 1024 }, { 4, 146, 1024 }, { 5, 147, 1024 }, { 4, 148, 1024 }, { 5, 149, 1024 }, { 5, 150, 1024 }, { 6, 151, 1024 }, + { 4, 152, 1024 }, { 5, 153, 1024 }, { 5, 154, 1024 }, { 6, 155, 1024 }, { 5, 156, 1024 }, { 6, 157, 1024 }, { 6, 158, 1024 }, { 7, 159, 1024 }, + { 3, 160, 1024 }, { 4, 161, 1024 }, { 4, 162, 1024 }, { 5, 163, 1024 }, { 4, 164, 1024 }, { 5, 165, 1024 }, { 5, 166, 1024 }, { 6, 167, 1024 }, + { 4, 168, 1024 }, { 5, 169, 1024 }, { 5, 170, 1024 }, { 6, 171, 1024 }, { 5, 172, 1024 }, { 6, 173, 1024 }, { 6, 174, 1024 }, { 7, 175, 1024 }, + { 4, 176, 1024 }, { 5, 177, 1024 }, { 5, 178, 1024 }, { 6, 179, 1024 }, { 5, 180, 1024 }, { 6, 181, 1024 }, { 6, 182, 1024 }, { 7, 183, 1024 }, + { 5, 184, 1024 }, { 6, 185, 1024 }, { 6, 186, 1024 }, { 7, 187, 1024 }, { 6, 188, 1024 }, { 7, 189, 1024 }, { 7, 190, 1024 }, { 8, 191, 1024 }, + { 3, 192, 1024 }, { 4, 193, 1024 }, { 4, 194, 1024 }, { 5, 195, 1024 }, { 4, 196, 1024 }, { 5, 197, 1024 }, { 5, 198, 1024 }, { 6, 199, 1024 }, + { 4, 200, 1024 }, { 5, 201, 1024 }, { 5, 202, 1024 }, { 6, 203, 1024 }, { 5, 204, 1024 }, { 6, 205, 1024 }, { 6, 206, 1024 }, { 7, 207, 1024 }, + { 4, 208, 1024 }, { 5, 209, 1024 }, { 5, 210, 1024 }, { 6, 211, 1024 }, { 5, 212, 1024 }, { 6, 213, 1024 }, { 6, 214, 1024 }, { 7, 215, 1024 }, + { 5, 216, 1024 }, { 6, 217, 1024 }, { 6, 218, 1024 }, { 7, 219, 1024 }, { 6, 220, 1024 }, { 7, 221, 1024 }, { 7, 222, 1024 }, { 8, 223, 1024 }, + { 4, 224, 1024 }, { 5, 225, 1024 }, { 5, 226, 1024 }, { 6, 227, 1024 }, { 5, 228, 1024 }, { 6, 229, 1024 }, { 6, 230, 1024 }, { 7, 231, 1024 }, + { 5, 232, 1024 }, { 6, 233, 1024 }, { 6, 234, 1024 }, { 7, 235, 1024 }, { 6, 236, 1024 }, { 7, 237, 1024 }, { 7, 238, 1024 }, { 8, 239, 1024 }, + { 5, 240, 1024 }, { 6, 241, 1024 }, { 6, 242, 1024 }, { 7, 243, 1024 }, { 6, 244, 1024 }, { 7, 245, 1024 }, { 7, 246, 1024 }, { 8, 247, 1024 }, + { 6, 248, 1024 }, { 7, 249, 1024 }, { 7, 250, 1024 }, { 8, 251, 1024 }, { 7, 252, 1024 }, { 8, 253, 1024 }, { 8, 254, 1024 }, { 9, 255, 1024 }, + { 2, 256, 1024 }, { 3, 257, 1024 }, { 3, 258, 1024 }, { 4, 259, 1024 }, { 3, 260, 1024 }, { 4, 261, 1024 }, { 4, 262, 1024 }, { 5, 263, 1024 }, + { 3, 264, 1024 }, { 4, 265, 1024 }, { 4, 266, 1024 }, { 5, 267, 1024 }, { 4, 268, 1024 }, { 5, 269, 1024 }, { 5, 270, 1024 }, { 6, 271, 1024 }, + { 3, 272, 1024 }, { 4, 273, 1024 }, { 4, 274, 1024 }, { 5, 275, 1024 }, { 4, 276, 1024 }, { 5, 277, 1024 }, { 5, 278, 1024 }, { 6, 279, 1024 }, + { 4, 280, 1024 }, { 5, 281, 1024 }, { 5, 282, 1024 }, { 6, 283, 1024 }, { 5, 284, 1024 }, { 6, 285, 1024 }, { 6, 286, 1024 }, { 7, 287, 1024 }, + { 3, 288, 1024 }, { 4, 289, 1024 }, { 4, 290, 1024 }, { 5, 291, 1024 }, { 4, 292, 1024 }, { 5, 293, 1024 }, { 5, 294, 1024 }, { 6, 295, 1024 }, + { 4, 296, 1024 }, { 5, 297, 1024 }, { 5, 298, 1024 }, { 6, 299, 1024 }, { 5, 300, 1024 }, { 6, 301, 1024 }, { 6, 302, 1024 }, { 7, 303, 1024 }, + { 4, 304, 1024 }, { 5, 305, 1024 }, { 5, 306, 1024 }, { 6, 307, 1024 }, { 5, 308, 1024 }, { 6, 309, 1024 }, { 6, 310, 1024 }, { 7, 311, 1024 }, + { 5, 312, 1024 }, { 6, 313, 1024 }, { 6, 314, 1024 }, { 7, 315, 1024 }, { 6, 316, 1024 }, { 7, 317, 1024 }, { 7, 318, 1024 }, { 8, 319, 1024 }, + { 3, 320, 1024 }, { 4, 321, 1024 }, { 4, 322, 1024 }, { 5, 323, 1024 }, { 4, 324, 1024 }, { 5, 325, 1024 }, { 5, 326, 1024 }, { 6, 327, 1024 }, + { 4, 328, 1024 }, { 5, 329, 1024 }, { 5, 330, 1024 }, { 6, 331, 1024 }, { 5, 332, 1024 }, { 6, 333, 1024 }, { 6, 334, 1024 }, { 7, 335, 1024 }, + { 4, 336, 1024 }, { 5, 337, 1024 }, { 5, 338, 1024 }, { 6, 339, 1024 }, { 5, 340, 1024 }, { 6, 341, 1024 }, { 6, 342, 1024 }, { 7, 343, 1024 }, + { 5, 344, 1024 }, { 6, 345, 1024 }, { 6, 346, 1024 }, { 7, 347, 1024 }, { 6, 348, 1024 }, { 7, 349, 1024 }, { 7, 350, 1024 }, { 8, 351, 1024 }, + { 4, 352, 1024 }, { 5, 353, 1024 }, { 5, 354, 1024 }, { 6, 355, 1024 }, { 5, 356, 1024 }, { 6, 357, 1024 }, { 6, 358, 1024 }, { 7, 359, 1024 }, + { 5, 360, 1024 }, { 6, 361, 1024 }, { 6, 362, 1024 }, { 7, 363, 1024 }, { 6, 364, 1024 }, { 7, 365, 1024 }, { 7, 366, 1024 }, { 8, 367, 1024 }, + { 5, 368, 1024 }, { 6, 369, 1024 }, { 6, 370, 1024 }, { 7, 371, 1024 }, { 6, 372, 1024 }, { 7, 373, 1024 }, { 7, 374, 1024 }, { 8, 375, 1024 }, + { 6, 376, 1024 }, { 7, 377, 1024 }, { 7, 378, 1024 }, { 8, 379, 1024 }, { 7, 380, 1024 }, { 8, 381, 1024 }, { 8, 382, 1024 }, { 9, 383, 1024 }, + { 3, 384, 1024 }, { 4, 385, 1024 }, { 4, 386, 1024 }, { 5, 387, 1024 }, { 4, 388, 1024 }, { 5, 389, 1024 }, { 5, 390, 1024 }, { 6, 391, 1024 }, + { 4, 392, 1024 }, { 5, 393, 1024 }, { 5, 394, 1024 }, { 6, 395, 1024 }, { 5, 396, 1024 }, { 6, 397, 1024 }, { 6, 398, 1024 }, { 7, 399, 1024 }, + { 4, 400, 1024 }, { 5, 401, 1024 }, { 5, 402, 1024 }, { 6, 403, 1024 }, { 5, 404, 1024 }, { 6, 405, 1024 }, { 6, 406, 1024 }, { 7, 407, 1024 }, + { 5, 408, 1024 }, { 6, 409, 1024 }, { 6, 410, 1024 }, { 7, 411, 1024 }, { 6, 412, 1024 }, { 7, 413, 1024 }, { 7, 414, 1024 }, { 8, 415, 1024 }, + { 4, 416, 1024 }, { 5, 417, 1024 }, { 5, 418, 1024 }, { 6, 419, 1024 }, { 5, 420, 1024 }, { 6, 421, 1024 }, { 6, 422, 1024 }, { 7, 423, 1024 }, + { 5, 424, 1024 }, { 6, 425, 1024 }, { 6, 426, 1024 }, { 7, 427, 1024 }, { 6, 428, 1024 }, { 7, 429, 1024 }, { 7, 430, 1024 }, { 8, 431, 1024 }, + { 5, 432, 1024 }, { 6, 433, 1024 }, { 6, 434, 1024 }, { 7, 435, 1024 }, { 6, 436, 1024 }, { 7, 437, 1024 }, { 7, 438, 1024 }, { 8, 439, 1024 }, + { 6, 440, 1024 }, { 7, 441, 1024 }, { 7, 442, 1024 }, { 8, 443, 1024 }, { 7, 444, 1024 }, { 8, 445, 1024 }, { 8, 446, 1024 }, { 9, 447, 1024 }, + { 4, 448, 1024 }, { 5, 449, 1024 }, { 5, 450, 1024 }, { 6, 451, 1024 }, { 5, 452, 1024 }, { 6, 453, 1024 }, { 6, 454, 1024 }, { 7, 455, 1024 }, + { 5, 456, 1024 }, { 6, 457, 1024 }, { 6, 458, 1024 }, { 7, 459, 1024 }, { 6, 460, 1024 }, { 7, 461, 1024 }, { 7, 462, 1024 }, { 8, 463, 1024 }, + { 5, 464, 1024 }, { 6, 465, 1024 }, { 6, 466, 1024 }, { 7, 467, 1024 }, { 6, 468, 1024 }, { 7, 469, 1024 }, { 7, 470, 1024 }, { 8, 471, 1024 }, + { 6, 472, 1024 }, { 7, 473, 1024 }, { 7, 474, 1024 }, { 8, 475, 1024 }, { 7, 476, 1024 }, { 8, 477, 1024 }, { 8, 478, 1024 }, { 9, 479, 1024 }, + { 5, 480, 1024 }, { 6, 481, 1024 }, { 6, 482, 1024 }, { 7, 483, 1024 }, { 6, 484, 1024 }, { 7, 485, 1024 }, { 7, 486, 1024 }, { 8, 487, 1024 }, + { 6, 488, 1024 }, { 7, 489, 1024 }, { 7, 490, 1024 }, { 8, 491, 1024 }, { 7, 492, 1024 }, { 8, 493, 1024 }, { 8, 494, 1024 }, { 9, 495, 1024 }, + { 6, 496, 1024 }, { 7, 497, 1024 }, { 7, 498, 1024 }, { 8, 499, 1024 }, { 7, 500, 1024 }, { 8, 501, 1024 }, { 8, 502, 1024 }, { 9, 503, 1024 }, + { 7, 504, 1024 }, { 8, 505, 1024 }, { 8, 506, 1024 }, { 9, 507, 1024 }, { 8, 508, 1024 }, { 9, 509, 1024 }, { 9, 510, 1024 }, { 10, 511, 1024 }, + { 2, 512, 1024 }, { 3, 513, 1024 }, { 3, 514, 1024 }, { 4, 515, 1024 }, { 3, 516, 1024 }, { 4, 517, 1024 }, { 4, 518, 1024 }, { 5, 519, 1024 }, + { 3, 520, 1024 }, { 4, 521, 1024 }, { 4, 522, 1024 }, { 5, 523, 1024 }, { 4, 524, 1024 }, { 5, 525, 1024 }, { 5, 526, 1024 }, { 6, 527, 1024 }, + { 3, 528, 1024 }, { 4, 529, 1024 }, { 4, 530, 1024 }, { 5, 531, 1024 }, { 4, 532, 1024 }, { 5, 533, 1024 }, { 5, 534, 1024 }, { 6, 535, 1024 }, + { 4, 536, 1024 }, { 5, 537, 1024 }, { 5, 538, 1024 }, { 6, 539, 1024 }, { 5, 540, 1024 }, { 6, 541, 1024 }, { 6, 542, 1024 }, { 7, 543, 1024 }, + { 3, 544, 1024 }, { 4, 545, 1024 }, { 4, 546, 1024 }, { 5, 547, 1024 }, { 4, 548, 1024 }, { 5, 549, 1024 }, { 5, 550, 1024 }, { 6, 551, 1024 }, + { 4, 552, 1024 }, { 5, 553, 1024 }, { 5, 554, 1024 }, { 6, 555, 1024 }, { 5, 556, 1024 }, { 6, 557, 1024 }, { 6, 558, 1024 }, { 7, 559, 1024 }, + { 4, 560, 1024 }, { 5, 561, 1024 }, { 5, 562, 1024 }, { 6, 563, 1024 }, { 5, 564, 1024 }, { 6, 565, 1024 }, { 6, 566, 1024 }, { 7, 567, 1024 }, + { 5, 568, 1024 }, { 6, 569, 1024 }, { 6, 570, 1024 }, { 7, 571, 1024 }, { 6, 572, 1024 }, { 7, 573, 1024 }, { 7, 574, 1024 }, { 8, 575, 1024 }, + { 3, 576, 1024 }, { 4, 577, 1024 }, { 4, 578, 1024 }, { 5, 579, 1024 }, { 4, 580, 1024 }, { 5, 581, 1024 }, { 5, 582, 1024 }, { 6, 583, 1024 }, + { 4, 584, 1024 }, { 5, 585, 1024 }, { 5, 586, 1024 }, { 6, 587, 1024 }, { 5, 588, 1024 }, { 6, 589, 1024 }, { 6, 590, 1024 }, { 7, 591, 1024 }, + { 4, 592, 1024 }, { 5, 593, 1024 }, { 5, 594, 1024 }, { 6, 595, 1024 }, { 5, 596, 1024 }, { 6, 597, 1024 }, { 6, 598, 1024 }, { 7, 599, 1024 }, + { 5, 600, 1024 }, { 6, 601, 1024 }, { 6, 602, 1024 }, { 7, 603, 1024 }, { 6, 604, 1024 }, { 7, 605, 1024 }, { 7, 606, 1024 }, { 8, 607, 1024 }, + { 4, 608, 1024 }, { 5, 609, 1024 }, { 5, 610, 1024 }, { 6, 611, 1024 }, { 5, 612, 1024 }, { 6, 613, 1024 }, { 6, 614, 1024 }, { 7, 615, 1024 }, + { 5, 616, 1024 }, { 6, 617, 1024 }, { 6, 618, 1024 }, { 7, 619, 1024 }, { 6, 620, 1024 }, { 7, 621, 1024 }, { 7, 622, 1024 }, { 8, 623, 1024 }, + { 5, 624, 1024 }, { 6, 625, 1024 }, { 6, 626, 1024 }, { 7, 627, 1024 }, { 6, 628, 1024 }, { 7, 629, 1024 }, { 7, 630, 1024 }, { 8, 631, 1024 }, + { 6, 632, 1024 }, { 7, 633, 1024 }, { 7, 634, 1024 }, { 8, 635, 1024 }, { 7, 636, 1024 }, { 8, 637, 1024 }, { 8, 638, 1024 }, { 9, 639, 1024 }, + { 3, 640, 1024 }, { 4, 641, 1024 }, { 4, 642, 1024 }, { 5, 643, 1024 }, { 4, 644, 1024 }, { 5, 645, 1024 }, { 5, 646, 1024 }, { 6, 647, 1024 }, + { 4, 648, 1024 }, { 5, 649, 1024 }, { 5, 650, 1024 }, { 6, 651, 1024 }, { 5, 652, 1024 }, { 6, 653, 1024 }, { 6, 654, 1024 }, { 7, 655, 1024 }, + { 4, 656, 1024 }, { 5, 657, 1024 }, { 5, 658, 1024 }, { 6, 659, 1024 }, { 5, 660, 1024 }, { 6, 661, 1024 }, { 6, 662, 1024 }, { 7, 663, 1024 }, + { 5, 664, 1024 }, { 6, 665, 1024 }, { 6, 666, 1024 }, { 7, 667, 1024 }, { 6, 668, 1024 }, { 7, 669, 1024 }, { 7, 670, 1024 }, { 8, 671, 1024 }, + { 4, 672, 1024 }, { 5, 673, 1024 }, { 5, 674, 1024 }, { 6, 675, 1024 }, { 5, 676, 1024 }, { 6, 677, 1024 }, { 6, 678, 1024 }, { 7, 679, 1024 }, + { 5, 680, 1024 }, { 6, 681, 1024 }, { 6, 682, 1024 }, { 7, 683, 1024 }, { 6, 684, 1024 }, { 7, 685, 1024 }, { 7, 686, 1024 }, { 8, 687, 1024 }, + { 5, 688, 1024 }, { 6, 689, 1024 }, { 6, 690, 1024 }, { 7, 691, 1024 }, { 6, 692, 1024 }, { 7, 693, 1024 }, { 7, 694, 1024 }, { 8, 695, 1024 }, + { 6, 696, 1024 }, { 7, 697, 1024 }, { 7, 698, 1024 }, { 8, 699, 1024 }, { 7, 700, 1024 }, { 8, 701, 1024 }, { 8, 702, 1024 }, { 9, 703, 1024 }, + { 4, 704, 1024 }, { 5, 705, 1024 }, { 5, 706, 1024 }, { 6, 707, 1024 }, { 5, 708, 1024 }, { 6, 709, 1024 }, { 6, 710, 1024 }, { 7, 711, 1024 }, + { 5, 712, 1024 }, { 6, 713, 1024 }, { 6, 714, 1024 }, { 7, 715, 1024 }, { 6, 716, 1024 }, { 7, 717, 1024 }, { 7, 718, 1024 }, { 8, 719, 1024 }, + { 5, 720, 1024 }, { 6, 721, 1024 }, { 6, 722, 1024 }, { 7, 723, 1024 }, { 6, 724, 1024 }, { 7, 725, 1024 }, { 7, 726, 1024 }, { 8, 727, 1024 }, + { 6, 728, 1024 }, { 7, 729, 1024 }, { 7, 730, 1024 }, { 8, 731, 1024 }, { 7, 732, 1024 }, { 8, 733, 1024 }, { 8, 734, 1024 }, { 9, 735, 1024 }, + { 5, 736, 1024 }, { 6, 737, 1024 }, { 6, 738, 1024 }, { 7, 739, 1024 }, { 6, 740, 1024 }, { 7, 741, 1024 }, { 7, 742, 1024 }, { 8, 743, 1024 }, + { 6, 744, 1024 }, { 7, 745, 1024 }, { 7, 746, 1024 }, { 8, 747, 1024 }, { 7, 748, 1024 }, { 8, 749, 1024 }, { 8, 750, 1024 }, { 9, 751, 1024 }, + { 6, 752, 1024 }, { 7, 753, 1024 }, { 7, 754, 1024 }, { 8, 755, 1024 }, { 7, 756, 1024 }, { 8, 757, 1024 }, { 8, 758, 1024 }, { 9, 759, 1024 }, + { 7, 760, 1024 }, { 8, 761, 1024 }, { 8, 762, 1024 }, { 9, 763, 1024 }, { 8, 764, 1024 }, { 9, 765, 1024 }, { 9, 766, 1024 }, { 10, 767, 1024 }, + { 3, 768, 1024 }, { 4, 769, 1024 }, { 4, 770, 1024 }, { 5, 771, 1024 }, { 4, 772, 1024 }, { 5, 773, 1024 }, { 5, 774, 1024 }, { 6, 775, 1024 }, + { 4, 776, 1024 }, { 5, 777, 1024 }, { 5, 778, 1024 }, { 6, 779, 1024 }, { 5, 780, 1024 }, { 6, 781, 1024 }, { 6, 782, 1024 }, { 7, 783, 1024 }, + { 4, 784, 1024 }, { 5, 785, 1024 }, { 5, 786, 1024 }, { 6, 787, 1024 }, { 5, 788, 1024 }, { 6, 789, 1024 }, { 6, 790, 1024 }, { 7, 791, 1024 }, + { 5, 792, 1024 }, { 6, 793, 1024 }, { 6, 794, 1024 }, { 7, 795, 1024 }, { 6, 796, 1024 }, { 7, 797, 1024 }, { 7, 798, 1024 }, { 8, 799, 1024 }, + { 4, 800, 1024 }, { 5, 801, 1024 }, { 5, 802, 1024 }, { 6, 803, 1024 }, { 5, 804, 1024 }, { 6, 805, 1024 }, { 6, 806, 1024 }, { 7, 807, 1024 }, + { 5, 808, 1024 }, { 6, 809, 1024 }, { 6, 810, 1024 }, { 7, 811, 1024 }, { 6, 812, 1024 }, { 7, 813, 1024 }, { 7, 814, 1024 }, { 8, 815, 1024 }, + { 5, 816, 1024 }, { 6, 817, 1024 }, { 6, 818, 1024 }, { 7, 819, 1024 }, { 6, 820, 1024 }, { 7, 821, 1024 }, { 7, 822, 1024 }, { 8, 823, 1024 }, + { 6, 824, 1024 }, { 7, 825, 1024 }, { 7, 826, 1024 }, { 8, 827, 1024 }, { 7, 828, 1024 }, { 8, 829, 1024 }, { 8, 830, 1024 }, { 9, 831, 1024 }, + { 4, 832, 1024 }, { 5, 833, 1024 }, { 5, 834, 1024 }, { 6, 835, 1024 }, { 5, 836, 1024 }, { 6, 837, 1024 }, { 6, 838, 1024 }, { 7, 839, 1024 }, + { 5, 840, 1024 }, { 6, 841, 1024 }, { 6, 842, 1024 }, { 7, 843, 1024 }, { 6, 844, 1024 }, { 7, 845, 1024 }, { 7, 846, 1024 }, { 8, 847, 1024 }, + { 5, 848, 1024 }, { 6, 849, 1024 }, { 6, 850, 1024 }, { 7, 851, 1024 }, { 6, 852, 1024 }, { 7, 853, 1024 }, { 7, 854, 1024 }, { 8, 855, 1024 }, + { 6, 856, 1024 }, { 7, 857, 1024 }, { 7, 858, 1024 }, { 8, 859, 1024 }, { 7, 860, 1024 }, { 8, 861, 1024 }, { 8, 862, 1024 }, { 9, 863, 1024 }, + { 5, 864, 1024 }, { 6, 865, 1024 }, { 6, 866, 1024 }, { 7, 867, 1024 }, { 6, 868, 1024 }, { 7, 869, 1024 }, { 7, 870, 1024 }, { 8, 871, 1024 }, + { 6, 872, 1024 }, { 7, 873, 1024 }, { 7, 874, 1024 }, { 8, 875, 1024 }, { 7, 876, 1024 }, { 8, 877, 1024 }, { 8, 878, 1024 }, { 9, 879, 1024 }, + { 6, 880, 1024 }, { 7, 881, 1024 }, { 7, 882, 1024 }, { 8, 883, 1024 }, { 7, 884, 1024 }, { 8, 885, 1024 }, { 8, 886, 1024 }, { 9, 887, 1024 }, + { 7, 888, 1024 }, { 8, 889, 1024 }, { 8, 890, 1024 }, { 9, 891, 1024 }, { 8, 892, 1024 }, { 9, 893, 1024 }, { 9, 894, 1024 }, { 10, 895, 1024 }, + { 4, 896, 1024 }, { 5, 897, 1024 }, { 5, 898, 1024 }, { 6, 899, 1024 }, { 5, 900, 1024 }, { 6, 901, 1024 }, { 6, 902, 1024 }, { 7, 903, 1024 }, + { 5, 904, 1024 }, { 6, 905, 1024 }, { 6, 906, 1024 }, { 7, 907, 1024 }, { 6, 908, 1024 }, { 7, 909, 1024 }, { 7, 910, 1024 }, { 8, 911, 1024 }, + { 5, 912, 1024 }, { 6, 913, 1024 }, { 6, 914, 1024 }, { 7, 915, 1024 }, { 6, 916, 1024 }, { 7, 917, 1024 }, { 7, 918, 1024 }, { 8, 919, 1024 }, + { 6, 920, 1024 }, { 7, 921, 1024 }, { 7, 922, 1024 }, { 8, 923, 1024 }, { 7, 924, 1024 }, { 8, 925, 1024 }, { 8, 926, 1024 }, { 9, 927, 1024 }, + { 5, 928, 1024 }, { 6, 929, 1024 }, { 6, 930, 1024 }, { 7, 931, 1024 }, { 6, 932, 1024 }, { 7, 933, 1024 }, { 7, 934, 1024 }, { 8, 935, 1024 }, + { 6, 936, 1024 }, { 7, 937, 1024 }, { 7, 938, 1024 }, { 8, 939, 1024 }, { 7, 940, 1024 }, { 8, 941, 1024 }, { 8, 942, 1024 }, { 9, 943, 1024 }, + { 6, 944, 1024 }, { 7, 945, 1024 }, { 7, 946, 1024 }, { 8, 947, 1024 }, { 7, 948, 1024 }, { 8, 949, 1024 }, { 8, 950, 1024 }, { 9, 951, 1024 }, + { 7, 952, 1024 }, { 8, 953, 1024 }, { 8, 954, 1024 }, { 9, 955, 1024 }, { 8, 956, 1024 }, { 9, 957, 1024 }, { 9, 958, 1024 }, { 10, 959, 1024 }, + { 5, 960, 1024 }, { 6, 961, 1024 }, { 6, 962, 1024 }, { 7, 963, 1024 }, { 6, 964, 1024 }, { 7, 965, 1024 }, { 7, 966, 1024 }, { 8, 967, 1024 }, + { 6, 968, 1024 }, { 7, 969, 1024 }, { 7, 970, 1024 }, { 8, 971, 1024 }, { 7, 972, 1024 }, { 8, 973, 1024 }, { 8, 974, 1024 }, { 9, 975, 1024 }, + { 6, 976, 1024 }, { 7, 977, 1024 }, { 7, 978, 1024 }, { 8, 979, 1024 }, { 7, 980, 1024 }, { 8, 981, 1024 }, { 8, 982, 1024 }, { 9, 983, 1024 }, + { 7, 984, 1024 }, { 8, 985, 1024 }, { 8, 986, 1024 }, { 9, 987, 1024 }, { 8, 988, 1024 }, { 9, 989, 1024 }, { 9, 990, 1024 }, { 10, 991, 1024 }, + { 6, 992, 1024 }, { 7, 993, 1024 }, { 7, 994, 1024 }, { 8, 995, 1024 }, { 7, 996, 1024 }, { 8, 997, 1024 }, { 8, 998, 1024 }, { 9, 999, 1024 }, + { 7, 1000, 1024 }, { 8, 1001, 1024 }, { 8, 1002, 1024 }, { 9, 1003, 1024 }, { 8, 1004, 1024 }, { 9, 1005, 1024 }, { 9, 1006, 1024 }, { 10, 1007, 1024 }, + { 7, 1008, 1024 }, { 8, 1009, 1024 }, { 8, 1010, 1024 }, { 9, 1011, 1024 }, { 8, 1012, 1024 }, { 9, 1013, 1024 }, { 9, 1014, 1024 }, { 10, 1015, 1024 }, + { 8, 1016, 1024 }, { 9, 1017, 1024 }, { 9, 1018, 1024 }, { 10, 1019, 1024 }, { 9, 1020, 1024 }, { 10, 1021, 1024 }, { 10, 1022, 1024 }, { 11, 1023, 1024 }, #if FP_LUT > 11 - { 1, 0, 0 }, { 2, 1, 2048 }, { 2, 2, 2048 }, { 3, 3, 2048 }, { 2, 4, 2048 }, { 3, 5, 2048 }, { 3, 6, 2048 }, { 4, 7, 2048 }, - { 2, 8, 2048 }, { 3, 9, 2048 }, { 3, 10, 2048 }, { 4, 11, 2048 }, { 3, 12, 2048 }, { 4, 13, 2048 }, { 4, 14, 2048 }, { 5, 15, 2048 }, - { 2, 16, 2048 }, { 3, 17, 2048 }, { 3, 18, 2048 }, { 4, 19, 2048 }, { 3, 20, 2048 }, { 4, 21, 2048 }, { 4, 22, 2048 }, { 5, 23, 2048 }, - { 3, 24, 2048 }, { 4, 25, 2048 }, { 4, 26, 2048 }, { 5, 27, 2048 }, { 4, 28, 2048 }, { 5, 29, 2048 }, { 5, 30, 2048 }, { 6, 31, 2048 }, - { 2, 32, 2048 }, { 3, 33, 2048 }, { 3, 34, 2048 }, { 4, 35, 2048 }, { 3, 36, 2048 }, { 4, 37, 2048 }, { 4, 38, 2048 }, { 5, 39, 2048 }, - { 3, 40, 2048 }, { 4, 41, 2048 }, { 4, 42, 2048 }, { 5, 43, 2048 }, { 4, 44, 2048 }, { 5, 45, 2048 }, { 5, 46, 2048 }, { 6, 47, 2048 }, - { 3, 48, 2048 }, { 4, 49, 2048 }, { 4, 50, 2048 }, { 5, 51, 2048 }, { 4, 52, 2048 }, { 5, 53, 2048 }, { 5, 54, 2048 }, { 6, 55, 2048 }, - { 4, 56, 2048 }, { 5, 57, 2048 }, { 5, 58, 2048 }, { 6, 59, 2048 }, { 5, 60, 2048 }, { 6, 61, 2048 }, { 6, 62, 2048 }, { 7, 63, 2048 }, - { 2, 64, 2048 }, { 3, 65, 2048 }, { 3, 66, 2048 }, { 4, 67, 2048 }, { 3, 68, 2048 }, { 4, 69, 2048 }, { 4, 70, 2048 }, { 5, 71, 2048 }, - { 3, 72, 2048 }, { 4, 73, 2048 }, { 4, 74, 2048 }, { 5, 75, 2048 }, { 4, 76, 2048 }, { 5, 77, 2048 }, { 5, 78, 2048 }, { 6, 79, 2048 }, - { 3, 80, 2048 }, { 4, 81, 2048 }, { 4, 82, 2048 }, { 5, 83, 2048 }, { 4, 84, 2048 }, { 5, 85, 2048 }, { 5, 86, 2048 }, { 6, 87, 2048 }, - { 4, 88, 2048 }, { 5, 89, 2048 }, { 5, 90, 2048 }, { 6, 91, 2048 }, { 5, 92, 2048 }, { 6, 93, 2048 }, { 6, 94, 2048 }, { 7, 95, 2048 }, - { 3, 96, 2048 }, { 4, 97, 2048 }, { 4, 98, 2048 }, { 5, 99, 2048 }, { 4, 100, 2048 }, { 5, 101, 2048 }, { 5, 102, 2048 }, { 6, 103, 2048 }, - { 4, 104, 2048 }, { 5, 105, 2048 }, { 5, 106, 2048 }, { 6, 107, 2048 }, { 5, 108, 2048 }, { 6, 109, 2048 }, { 6, 110, 2048 }, { 7, 111, 2048 }, - { 4, 112, 2048 }, { 5, 113, 2048 }, { 5, 114, 2048 }, { 6, 115, 2048 }, { 5, 116, 2048 }, { 6, 117, 2048 }, { 6, 118, 2048 }, { 7, 119, 2048 }, - { 5, 120, 2048 }, { 6, 121, 2048 }, { 6, 122, 2048 }, { 7, 123, 2048 }, { 6, 124, 2048 }, { 7, 125, 2048 }, { 7, 126, 2048 }, { 8, 127, 2048 }, - { 2, 128, 2048 }, { 3, 129, 2048 }, { 3, 130, 2048 }, { 4, 131, 2048 }, { 3, 132, 2048 }, { 4, 133, 2048 }, { 4, 134, 2048 }, { 5, 135, 2048 }, - { 3, 136, 2048 }, { 4, 137, 2048 }, { 4, 138, 2048 }, { 5, 139, 2048 }, { 4, 140, 2048 }, { 5, 141, 2048 }, { 5, 142, 2048 }, { 6, 143, 2048 }, - { 3, 144, 2048 }, { 4, 145, 2048 }, { 4, 146, 2048 }, { 5, 147, 2048 }, { 4, 148, 2048 }, { 5, 149, 2048 }, { 5, 150, 2048 }, { 6, 151, 2048 }, - { 4, 152, 2048 }, { 5, 153, 2048 }, { 5, 154, 2048 }, { 6, 155, 2048 }, { 5, 156, 2048 }, { 6, 157, 2048 }, { 6, 158, 2048 }, { 7, 159, 2048 }, - { 3, 160, 2048 }, { 4, 161, 2048 }, { 4, 162, 2048 }, { 5, 163, 2048 }, { 4, 164, 2048 }, { 5, 165, 2048 }, { 5, 166, 2048 }, { 6, 167, 2048 }, - { 4, 168, 2048 }, { 5, 169, 2048 }, { 5, 170, 2048 }, { 6, 171, 2048 }, { 5, 172, 2048 }, { 6, 173, 2048 }, { 6, 174, 2048 }, { 7, 175, 2048 }, - { 4, 176, 2048 }, { 5, 177, 2048 }, { 5, 178, 2048 }, { 6, 179, 2048 }, { 5, 180, 2048 }, { 6, 181, 2048 }, { 6, 182, 2048 }, { 7, 183, 2048 }, - { 5, 184, 2048 }, { 6, 185, 2048 }, { 6, 186, 2048 }, { 7, 187, 2048 }, { 6, 188, 2048 }, { 7, 189, 2048 }, { 7, 190, 2048 }, { 8, 191, 2048 }, - { 3, 192, 2048 }, { 4, 193, 2048 }, { 4, 194, 2048 }, { 5, 195, 2048 }, { 4, 196, 2048 }, { 5, 197, 2048 }, { 5, 198, 2048 }, { 6, 199, 2048 }, - { 4, 200, 2048 }, { 5, 201, 2048 }, { 5, 202, 2048 }, { 6, 203, 2048 }, { 5, 204, 2048 }, { 6, 205, 2048 }, { 6, 206, 2048 }, { 7, 207, 2048 }, - { 4, 208, 2048 }, { 5, 209, 2048 }, { 5, 210, 2048 }, { 6, 211, 2048 }, { 5, 212, 2048 }, { 6, 213, 2048 }, { 6, 214, 2048 }, { 7, 215, 2048 }, - { 5, 216, 2048 }, { 6, 217, 2048 }, { 6, 218, 2048 }, { 7, 219, 2048 }, { 6, 220, 2048 }, { 7, 221, 2048 }, { 7, 222, 2048 }, { 8, 223, 2048 }, - { 4, 224, 2048 }, { 5, 225, 2048 }, { 5, 226, 2048 }, { 6, 227, 2048 }, { 5, 228, 2048 }, { 6, 229, 2048 }, { 6, 230, 2048 }, { 7, 231, 2048 }, - { 5, 232, 2048 }, { 6, 233, 2048 }, { 6, 234, 2048 }, { 7, 235, 2048 }, { 6, 236, 2048 }, { 7, 237, 2048 }, { 7, 238, 2048 }, { 8, 239, 2048 }, - { 5, 240, 2048 }, { 6, 241, 2048 }, { 6, 242, 2048 }, { 7, 243, 2048 }, { 6, 244, 2048 }, { 7, 245, 2048 }, { 7, 246, 2048 }, { 8, 247, 2048 }, - { 6, 248, 2048 }, { 7, 249, 2048 }, { 7, 250, 2048 }, { 8, 251, 2048 }, { 7, 252, 2048 }, { 8, 253, 2048 }, { 8, 254, 2048 }, { 9, 255, 2048 }, - { 2, 256, 2048 }, { 3, 257, 2048 }, { 3, 258, 2048 }, { 4, 259, 2048 }, { 3, 260, 2048 }, { 4, 261, 2048 }, { 4, 262, 2048 }, { 5, 263, 2048 }, - { 3, 264, 2048 }, { 4, 265, 2048 }, { 4, 266, 2048 }, { 5, 267, 2048 }, { 4, 268, 2048 }, { 5, 269, 2048 }, { 5, 270, 2048 }, { 6, 271, 2048 }, - { 3, 272, 2048 }, { 4, 273, 2048 }, { 4, 274, 2048 }, { 5, 275, 2048 }, { 4, 276, 2048 }, { 5, 277, 2048 }, { 5, 278, 2048 }, { 6, 279, 2048 }, - { 4, 280, 2048 }, { 5, 281, 2048 }, { 5, 282, 2048 }, { 6, 283, 2048 }, { 5, 284, 2048 }, { 6, 285, 2048 }, { 6, 286, 2048 }, { 7, 287, 2048 }, - { 3, 288, 2048 }, { 4, 289, 2048 }, { 4, 290, 2048 }, { 5, 291, 2048 }, { 4, 292, 2048 }, { 5, 293, 2048 }, { 5, 294, 2048 }, { 6, 295, 2048 }, - { 4, 296, 2048 }, { 5, 297, 2048 }, { 5, 298, 2048 }, { 6, 299, 2048 }, { 5, 300, 2048 }, { 6, 301, 2048 }, { 6, 302, 2048 }, { 7, 303, 2048 }, - { 4, 304, 2048 }, { 5, 305, 2048 }, { 5, 306, 2048 }, { 6, 307, 2048 }, { 5, 308, 2048 }, { 6, 309, 2048 }, { 6, 310, 2048 }, { 7, 311, 2048 }, - { 5, 312, 2048 }, { 6, 313, 2048 }, { 6, 314, 2048 }, { 7, 315, 2048 }, { 6, 316, 2048 }, { 7, 317, 2048 }, { 7, 318, 2048 }, { 8, 319, 2048 }, - { 3, 320, 2048 }, { 4, 321, 2048 }, { 4, 322, 2048 }, { 5, 323, 2048 }, { 4, 324, 2048 }, { 5, 325, 2048 }, { 5, 326, 2048 }, { 6, 327, 2048 }, - { 4, 328, 2048 }, { 5, 329, 2048 }, { 5, 330, 2048 }, { 6, 331, 2048 }, { 5, 332, 2048 }, { 6, 333, 2048 }, { 6, 334, 2048 }, { 7, 335, 2048 }, - { 4, 336, 2048 }, { 5, 337, 2048 }, { 5, 338, 2048 }, { 6, 339, 2048 }, { 5, 340, 2048 }, { 6, 341, 2048 }, { 6, 342, 2048 }, { 7, 343, 2048 }, - { 5, 344, 2048 }, { 6, 345, 2048 }, { 6, 346, 2048 }, { 7, 347, 2048 }, { 6, 348, 2048 }, { 7, 349, 2048 }, { 7, 350, 2048 }, { 8, 351, 2048 }, - { 4, 352, 2048 }, { 5, 353, 2048 }, { 5, 354, 2048 }, { 6, 355, 2048 }, { 5, 356, 2048 }, { 6, 357, 2048 }, { 6, 358, 2048 }, { 7, 359, 2048 }, - { 5, 360, 2048 }, { 6, 361, 2048 }, { 6, 362, 2048 }, { 7, 363, 2048 }, { 6, 364, 2048 }, { 7, 365, 2048 }, { 7, 366, 2048 }, { 8, 367, 2048 }, - { 5, 368, 2048 }, { 6, 369, 2048 }, { 6, 370, 2048 }, { 7, 371, 2048 }, { 6, 372, 2048 }, { 7, 373, 2048 }, { 7, 374, 2048 }, { 8, 375, 2048 }, - { 6, 376, 2048 }, { 7, 377, 2048 }, { 7, 378, 2048 }, { 8, 379, 2048 }, { 7, 380, 2048 }, { 8, 381, 2048 }, { 8, 382, 2048 }, { 9, 383, 2048 }, - { 3, 384, 2048 }, { 4, 385, 2048 }, { 4, 386, 2048 }, { 5, 387, 2048 }, { 4, 388, 2048 }, { 5, 389, 2048 }, { 5, 390, 2048 }, { 6, 391, 2048 }, - { 4, 392, 2048 }, { 5, 393, 2048 }, { 5, 394, 2048 }, { 6, 395, 2048 }, { 5, 396, 2048 }, { 6, 397, 2048 }, { 6, 398, 2048 }, { 7, 399, 2048 }, - { 4, 400, 2048 }, { 5, 401, 2048 }, { 5, 402, 2048 }, { 6, 403, 2048 }, { 5, 404, 2048 }, { 6, 405, 2048 }, { 6, 406, 2048 }, { 7, 407, 2048 }, - { 5, 408, 2048 }, { 6, 409, 2048 }, { 6, 410, 2048 }, { 7, 411, 2048 }, { 6, 412, 2048 }, { 7, 413, 2048 }, { 7, 414, 2048 }, { 8, 415, 2048 }, - { 4, 416, 2048 }, { 5, 417, 2048 }, { 5, 418, 2048 }, { 6, 419, 2048 }, { 5, 420, 2048 }, { 6, 421, 2048 }, { 6, 422, 2048 }, { 7, 423, 2048 }, - { 5, 424, 2048 }, { 6, 425, 2048 }, { 6, 426, 2048 }, { 7, 427, 2048 }, { 6, 428, 2048 }, { 7, 429, 2048 }, { 7, 430, 2048 }, { 8, 431, 2048 }, - { 5, 432, 2048 }, { 6, 433, 2048 }, { 6, 434, 2048 }, { 7, 435, 2048 }, { 6, 436, 2048 }, { 7, 437, 2048 }, { 7, 438, 2048 }, { 8, 439, 2048 }, - { 6, 440, 2048 }, { 7, 441, 2048 }, { 7, 442, 2048 }, { 8, 443, 2048 }, { 7, 444, 2048 }, { 8, 445, 2048 }, { 8, 446, 2048 }, { 9, 447, 2048 }, - { 4, 448, 2048 }, { 5, 449, 2048 }, { 5, 450, 2048 }, { 6, 451, 2048 }, { 5, 452, 2048 }, { 6, 453, 2048 }, { 6, 454, 2048 }, { 7, 455, 2048 }, - { 5, 456, 2048 }, { 6, 457, 2048 }, { 6, 458, 2048 }, { 7, 459, 2048 }, { 6, 460, 2048 }, { 7, 461, 2048 }, { 7, 462, 2048 }, { 8, 463, 2048 }, - { 5, 464, 2048 }, { 6, 465, 2048 }, { 6, 466, 2048 }, { 7, 467, 2048 }, { 6, 468, 2048 }, { 7, 469, 2048 }, { 7, 470, 2048 }, { 8, 471, 2048 }, - { 6, 472, 2048 }, { 7, 473, 2048 }, { 7, 474, 2048 }, { 8, 475, 2048 }, { 7, 476, 2048 }, { 8, 477, 2048 }, { 8, 478, 2048 }, { 9, 479, 2048 }, - { 5, 480, 2048 }, { 6, 481, 2048 }, { 6, 482, 2048 }, { 7, 483, 2048 }, { 6, 484, 2048 }, { 7, 485, 2048 }, { 7, 486, 2048 }, { 8, 487, 2048 }, - { 6, 488, 2048 }, { 7, 489, 2048 }, { 7, 490, 2048 }, { 8, 491, 2048 }, { 7, 492, 2048 }, { 8, 493, 2048 }, { 8, 494, 2048 }, { 9, 495, 2048 }, - { 6, 496, 2048 }, { 7, 497, 2048 }, { 7, 498, 2048 }, { 8, 499, 2048 }, { 7, 500, 2048 }, { 8, 501, 2048 }, { 8, 502, 2048 }, { 9, 503, 2048 }, - { 7, 504, 2048 }, { 8, 505, 2048 }, { 8, 506, 2048 }, { 9, 507, 2048 }, { 8, 508, 2048 }, { 9, 509, 2048 }, { 9, 510, 2048 }, { 10, 511, 2048 }, - { 2, 512, 2048 }, { 3, 513, 2048 }, { 3, 514, 2048 }, { 4, 515, 2048 }, { 3, 516, 2048 }, { 4, 517, 2048 }, { 4, 518, 2048 }, { 5, 519, 2048 }, - { 3, 520, 2048 }, { 4, 521, 2048 }, { 4, 522, 2048 }, { 5, 523, 2048 }, { 4, 524, 2048 }, { 5, 525, 2048 }, { 5, 526, 2048 }, { 6, 527, 2048 }, - { 3, 528, 2048 }, { 4, 529, 2048 }, { 4, 530, 2048 }, { 5, 531, 2048 }, { 4, 532, 2048 }, { 5, 533, 2048 }, { 5, 534, 2048 }, { 6, 535, 2048 }, - { 4, 536, 2048 }, { 5, 537, 2048 }, { 5, 538, 2048 }, { 6, 539, 2048 }, { 5, 540, 2048 }, { 6, 541, 2048 }, { 6, 542, 2048 }, { 7, 543, 2048 }, - { 3, 544, 2048 }, { 4, 545, 2048 }, { 4, 546, 2048 }, { 5, 547, 2048 }, { 4, 548, 2048 }, { 5, 549, 2048 }, { 5, 550, 2048 }, { 6, 551, 2048 }, - { 4, 552, 2048 }, { 5, 553, 2048 }, { 5, 554, 2048 }, { 6, 555, 2048 }, { 5, 556, 2048 }, { 6, 557, 2048 }, { 6, 558, 2048 }, { 7, 559, 2048 }, - { 4, 560, 2048 }, { 5, 561, 2048 }, { 5, 562, 2048 }, { 6, 563, 2048 }, { 5, 564, 2048 }, { 6, 565, 2048 }, { 6, 566, 2048 }, { 7, 567, 2048 }, - { 5, 568, 2048 }, { 6, 569, 2048 }, { 6, 570, 2048 }, { 7, 571, 2048 }, { 6, 572, 2048 }, { 7, 573, 2048 }, { 7, 574, 2048 }, { 8, 575, 2048 }, - { 3, 576, 2048 }, { 4, 577, 2048 }, { 4, 578, 2048 }, { 5, 579, 2048 }, { 4, 580, 2048 }, { 5, 581, 2048 }, { 5, 582, 2048 }, { 6, 583, 2048 }, - { 4, 584, 2048 }, { 5, 585, 2048 }, { 5, 586, 2048 }, { 6, 587, 2048 }, { 5, 588, 2048 }, { 6, 589, 2048 }, { 6, 590, 2048 }, { 7, 591, 2048 }, - { 4, 592, 2048 }, { 5, 593, 2048 }, { 5, 594, 2048 }, { 6, 595, 2048 }, { 5, 596, 2048 }, { 6, 597, 2048 }, { 6, 598, 2048 }, { 7, 599, 2048 }, - { 5, 600, 2048 }, { 6, 601, 2048 }, { 6, 602, 2048 }, { 7, 603, 2048 }, { 6, 604, 2048 }, { 7, 605, 2048 }, { 7, 606, 2048 }, { 8, 607, 2048 }, - { 4, 608, 2048 }, { 5, 609, 2048 }, { 5, 610, 2048 }, { 6, 611, 2048 }, { 5, 612, 2048 }, { 6, 613, 2048 }, { 6, 614, 2048 }, { 7, 615, 2048 }, - { 5, 616, 2048 }, { 6, 617, 2048 }, { 6, 618, 2048 }, { 7, 619, 2048 }, { 6, 620, 2048 }, { 7, 621, 2048 }, { 7, 622, 2048 }, { 8, 623, 2048 }, - { 5, 624, 2048 }, { 6, 625, 2048 }, { 6, 626, 2048 }, { 7, 627, 2048 }, { 6, 628, 2048 }, { 7, 629, 2048 }, { 7, 630, 2048 }, { 8, 631, 2048 }, - { 6, 632, 2048 }, { 7, 633, 2048 }, { 7, 634, 2048 }, { 8, 635, 2048 }, { 7, 636, 2048 }, { 8, 637, 2048 }, { 8, 638, 2048 }, { 9, 639, 2048 }, - { 3, 640, 2048 }, { 4, 641, 2048 }, { 4, 642, 2048 }, { 5, 643, 2048 }, { 4, 644, 2048 }, { 5, 645, 2048 }, { 5, 646, 2048 }, { 6, 647, 2048 }, - { 4, 648, 2048 }, { 5, 649, 2048 }, { 5, 650, 2048 }, { 6, 651, 2048 }, { 5, 652, 2048 }, { 6, 653, 2048 }, { 6, 654, 2048 }, { 7, 655, 2048 }, - { 4, 656, 2048 }, { 5, 657, 2048 }, { 5, 658, 2048 }, { 6, 659, 2048 }, { 5, 660, 2048 }, { 6, 661, 2048 }, { 6, 662, 2048 }, { 7, 663, 2048 }, - { 5, 664, 2048 }, { 6, 665, 2048 }, { 6, 666, 2048 }, { 7, 667, 2048 }, { 6, 668, 2048 }, { 7, 669, 2048 }, { 7, 670, 2048 }, { 8, 671, 2048 }, - { 4, 672, 2048 }, { 5, 673, 2048 }, { 5, 674, 2048 }, { 6, 675, 2048 }, { 5, 676, 2048 }, { 6, 677, 2048 }, { 6, 678, 2048 }, { 7, 679, 2048 }, - { 5, 680, 2048 }, { 6, 681, 2048 }, { 6, 682, 2048 }, { 7, 683, 2048 }, { 6, 684, 2048 }, { 7, 685, 2048 }, { 7, 686, 2048 }, { 8, 687, 2048 }, - { 5, 688, 2048 }, { 6, 689, 2048 }, { 6, 690, 2048 }, { 7, 691, 2048 }, { 6, 692, 2048 }, { 7, 693, 2048 }, { 7, 694, 2048 }, { 8, 695, 2048 }, - { 6, 696, 2048 }, { 7, 697, 2048 }, { 7, 698, 2048 }, { 8, 699, 2048 }, { 7, 700, 2048 }, { 8, 701, 2048 }, { 8, 702, 2048 }, { 9, 703, 2048 }, - { 4, 704, 2048 }, { 5, 705, 2048 }, { 5, 706, 2048 }, { 6, 707, 2048 }, { 5, 708, 2048 }, { 6, 709, 2048 }, { 6, 710, 2048 }, { 7, 711, 2048 }, - { 5, 712, 2048 }, { 6, 713, 2048 }, { 6, 714, 2048 }, { 7, 715, 2048 }, { 6, 716, 2048 }, { 7, 717, 2048 }, { 7, 718, 2048 }, { 8, 719, 2048 }, - { 5, 720, 2048 }, { 6, 721, 2048 }, { 6, 722, 2048 }, { 7, 723, 2048 }, { 6, 724, 2048 }, { 7, 725, 2048 }, { 7, 726, 2048 }, { 8, 727, 2048 }, - { 6, 728, 2048 }, { 7, 729, 2048 }, { 7, 730, 2048 }, { 8, 731, 2048 }, { 7, 732, 2048 }, { 8, 733, 2048 }, { 8, 734, 2048 }, { 9, 735, 2048 }, - { 5, 736, 2048 }, { 6, 737, 2048 }, { 6, 738, 2048 }, { 7, 739, 2048 }, { 6, 740, 2048 }, { 7, 741, 2048 }, { 7, 742, 2048 }, { 8, 743, 2048 }, - { 6, 744, 2048 }, { 7, 745, 2048 }, { 7, 746, 2048 }, { 8, 747, 2048 }, { 7, 748, 2048 }, { 8, 749, 2048 }, { 8, 750, 2048 }, { 9, 751, 2048 }, - { 6, 752, 2048 }, { 7, 753, 2048 }, { 7, 754, 2048 }, { 8, 755, 2048 }, { 7, 756, 2048 }, { 8, 757, 2048 }, { 8, 758, 2048 }, { 9, 759, 2048 }, - { 7, 760, 2048 }, { 8, 761, 2048 }, { 8, 762, 2048 }, { 9, 763, 2048 }, { 8, 764, 2048 }, { 9, 765, 2048 }, { 9, 766, 2048 }, { 10, 767, 2048 }, - { 3, 768, 2048 }, { 4, 769, 2048 }, { 4, 770, 2048 }, { 5, 771, 2048 }, { 4, 772, 2048 }, { 5, 773, 2048 }, { 5, 774, 2048 }, { 6, 775, 2048 }, - { 4, 776, 2048 }, { 5, 777, 2048 }, { 5, 778, 2048 }, { 6, 779, 2048 }, { 5, 780, 2048 }, { 6, 781, 2048 }, { 6, 782, 2048 }, { 7, 783, 2048 }, - { 4, 784, 2048 }, { 5, 785, 2048 }, { 5, 786, 2048 }, { 6, 787, 2048 }, { 5, 788, 2048 }, { 6, 789, 2048 }, { 6, 790, 2048 }, { 7, 791, 2048 }, - { 5, 792, 2048 }, { 6, 793, 2048 }, { 6, 794, 2048 }, { 7, 795, 2048 }, { 6, 796, 2048 }, { 7, 797, 2048 }, { 7, 798, 2048 }, { 8, 799, 2048 }, - { 4, 800, 2048 }, { 5, 801, 2048 }, { 5, 802, 2048 }, { 6, 803, 2048 }, { 5, 804, 2048 }, { 6, 805, 2048 }, { 6, 806, 2048 }, { 7, 807, 2048 }, - { 5, 808, 2048 }, { 6, 809, 2048 }, { 6, 810, 2048 }, { 7, 811, 2048 }, { 6, 812, 2048 }, { 7, 813, 2048 }, { 7, 814, 2048 }, { 8, 815, 2048 }, - { 5, 816, 2048 }, { 6, 817, 2048 }, { 6, 818, 2048 }, { 7, 819, 2048 }, { 6, 820, 2048 }, { 7, 821, 2048 }, { 7, 822, 2048 }, { 8, 823, 2048 }, - { 6, 824, 2048 }, { 7, 825, 2048 }, { 7, 826, 2048 }, { 8, 827, 2048 }, { 7, 828, 2048 }, { 8, 829, 2048 }, { 8, 830, 2048 }, { 9, 831, 2048 }, - { 4, 832, 2048 }, { 5, 833, 2048 }, { 5, 834, 2048 }, { 6, 835, 2048 }, { 5, 836, 2048 }, { 6, 837, 2048 }, { 6, 838, 2048 }, { 7, 839, 2048 }, - { 5, 840, 2048 }, { 6, 841, 2048 }, { 6, 842, 2048 }, { 7, 843, 2048 }, { 6, 844, 2048 }, { 7, 845, 2048 }, { 7, 846, 2048 }, { 8, 847, 2048 }, - { 5, 848, 2048 }, { 6, 849, 2048 }, { 6, 850, 2048 }, { 7, 851, 2048 }, { 6, 852, 2048 }, { 7, 853, 2048 }, { 7, 854, 2048 }, { 8, 855, 2048 }, - { 6, 856, 2048 }, { 7, 857, 2048 }, { 7, 858, 2048 }, { 8, 859, 2048 }, { 7, 860, 2048 }, { 8, 861, 2048 }, { 8, 862, 2048 }, { 9, 863, 2048 }, - { 5, 864, 2048 }, { 6, 865, 2048 }, { 6, 866, 2048 }, { 7, 867, 2048 }, { 6, 868, 2048 }, { 7, 869, 2048 }, { 7, 870, 2048 }, { 8, 871, 2048 }, - { 6, 872, 2048 }, { 7, 873, 2048 }, { 7, 874, 2048 }, { 8, 875, 2048 }, { 7, 876, 2048 }, { 8, 877, 2048 }, { 8, 878, 2048 }, { 9, 879, 2048 }, - { 6, 880, 2048 }, { 7, 881, 2048 }, { 7, 882, 2048 }, { 8, 883, 2048 }, { 7, 884, 2048 }, { 8, 885, 2048 }, { 8, 886, 2048 }, { 9, 887, 2048 }, - { 7, 888, 2048 }, { 8, 889, 2048 }, { 8, 890, 2048 }, { 9, 891, 2048 }, { 8, 892, 2048 }, { 9, 893, 2048 }, { 9, 894, 2048 }, { 10, 895, 2048 }, - { 4, 896, 2048 }, { 5, 897, 2048 }, { 5, 898, 2048 }, { 6, 899, 2048 }, { 5, 900, 2048 }, { 6, 901, 2048 }, { 6, 902, 2048 }, { 7, 903, 2048 }, - { 5, 904, 2048 }, { 6, 905, 2048 }, { 6, 906, 2048 }, { 7, 907, 2048 }, { 6, 908, 2048 }, { 7, 909, 2048 }, { 7, 910, 2048 }, { 8, 911, 2048 }, - { 5, 912, 2048 }, { 6, 913, 2048 }, { 6, 914, 2048 }, { 7, 915, 2048 }, { 6, 916, 2048 }, { 7, 917, 2048 }, { 7, 918, 2048 }, { 8, 919, 2048 }, - { 6, 920, 2048 }, { 7, 921, 2048 }, { 7, 922, 2048 }, { 8, 923, 2048 }, { 7, 924, 2048 }, { 8, 925, 2048 }, { 8, 926, 2048 }, { 9, 927, 2048 }, - { 5, 928, 2048 }, { 6, 929, 2048 }, { 6, 930, 2048 }, { 7, 931, 2048 }, { 6, 932, 2048 }, { 7, 933, 2048 }, { 7, 934, 2048 }, { 8, 935, 2048 }, - { 6, 936, 2048 }, { 7, 937, 2048 }, { 7, 938, 2048 }, { 8, 939, 2048 }, { 7, 940, 2048 }, { 8, 941, 2048 }, { 8, 942, 2048 }, { 9, 943, 2048 }, - { 6, 944, 2048 }, { 7, 945, 2048 }, { 7, 946, 2048 }, { 8, 947, 2048 }, { 7, 948, 2048 }, { 8, 949, 2048 }, { 8, 950, 2048 }, { 9, 951, 2048 }, - { 7, 952, 2048 }, { 8, 953, 2048 }, { 8, 954, 2048 }, { 9, 955, 2048 }, { 8, 956, 2048 }, { 9, 957, 2048 }, { 9, 958, 2048 }, { 10, 959, 2048 }, - { 5, 960, 2048 }, { 6, 961, 2048 }, { 6, 962, 2048 }, { 7, 963, 2048 }, { 6, 964, 2048 }, { 7, 965, 2048 }, { 7, 966, 2048 }, { 8, 967, 2048 }, - { 6, 968, 2048 }, { 7, 969, 2048 }, { 7, 970, 2048 }, { 8, 971, 2048 }, { 7, 972, 2048 }, { 8, 973, 2048 }, { 8, 974, 2048 }, { 9, 975, 2048 }, - { 6, 976, 2048 }, { 7, 977, 2048 }, { 7, 978, 2048 }, { 8, 979, 2048 }, { 7, 980, 2048 }, { 8, 981, 2048 }, { 8, 982, 2048 }, { 9, 983, 2048 }, - { 7, 984, 2048 }, { 8, 985, 2048 }, { 8, 986, 2048 }, { 9, 987, 2048 }, { 8, 988, 2048 }, { 9, 989, 2048 }, { 9, 990, 2048 }, { 10, 991, 2048 }, - { 6, 992, 2048 }, { 7, 993, 2048 }, { 7, 994, 2048 }, { 8, 995, 2048 }, { 7, 996, 2048 }, { 8, 997, 2048 }, { 8, 998, 2048 }, { 9, 999, 2048 }, - { 7, 1000, 2048 }, { 8, 1001, 2048 }, { 8, 1002, 2048 }, { 9, 1003, 2048 }, { 8, 1004, 2048 }, { 9, 1005, 2048 }, { 9, 1006, 2048 }, { 10, 1007, 2048 }, - { 7, 1008, 2048 }, { 8, 1009, 2048 }, { 8, 1010, 2048 }, { 9, 1011, 2048 }, { 8, 1012, 2048 }, { 9, 1013, 2048 }, { 9, 1014, 2048 }, { 10, 1015, 2048 }, - { 8, 1016, 2048 }, { 9, 1017, 2048 }, { 9, 1018, 2048 }, { 10, 1019, 2048 }, { 9, 1020, 2048 }, { 10, 1021, 2048 }, { 10, 1022, 2048 }, { 11, 1023, 2048 }, - { 2, 1024, 2048 }, { 3, 1025, 2048 }, { 3, 1026, 2048 }, { 4, 1027, 2048 }, { 3, 1028, 2048 }, { 4, 1029, 2048 }, { 4, 1030, 2048 }, { 5, 1031, 2048 }, - { 3, 1032, 2048 }, { 4, 1033, 2048 }, { 4, 1034, 2048 }, { 5, 1035, 2048 }, { 4, 1036, 2048 }, { 5, 1037, 2048 }, { 5, 1038, 2048 }, { 6, 1039, 2048 }, - { 3, 1040, 2048 }, { 4, 1041, 2048 }, { 4, 1042, 2048 }, { 5, 1043, 2048 }, { 4, 1044, 2048 }, { 5, 1045, 2048 }, { 5, 1046, 2048 }, { 6, 1047, 2048 }, - { 4, 1048, 2048 }, { 5, 1049, 2048 }, { 5, 1050, 2048 }, { 6, 1051, 2048 }, { 5, 1052, 2048 }, { 6, 1053, 2048 }, { 6, 1054, 2048 }, { 7, 1055, 2048 }, - { 3, 1056, 2048 }, { 4, 1057, 2048 }, { 4, 1058, 2048 }, { 5, 1059, 2048 }, { 4, 1060, 2048 }, { 5, 1061, 2048 }, { 5, 1062, 2048 }, { 6, 1063, 2048 }, - { 4, 1064, 2048 }, { 5, 1065, 2048 }, { 5, 1066, 2048 }, { 6, 1067, 2048 }, { 5, 1068, 2048 }, { 6, 1069, 2048 }, { 6, 1070, 2048 }, { 7, 1071, 2048 }, - { 4, 1072, 2048 }, { 5, 1073, 2048 }, { 5, 1074, 2048 }, { 6, 1075, 2048 }, { 5, 1076, 2048 }, { 6, 1077, 2048 }, { 6, 1078, 2048 }, { 7, 1079, 2048 }, - { 5, 1080, 2048 }, { 6, 1081, 2048 }, { 6, 1082, 2048 }, { 7, 1083, 2048 }, { 6, 1084, 2048 }, { 7, 1085, 2048 }, { 7, 1086, 2048 }, { 8, 1087, 2048 }, - { 3, 1088, 2048 }, { 4, 1089, 2048 }, { 4, 1090, 2048 }, { 5, 1091, 2048 }, { 4, 1092, 2048 }, { 5, 1093, 2048 }, { 5, 1094, 2048 }, { 6, 1095, 2048 }, - { 4, 1096, 2048 }, { 5, 1097, 2048 }, { 5, 1098, 2048 }, { 6, 1099, 2048 }, { 5, 1100, 2048 }, { 6, 1101, 2048 }, { 6, 1102, 2048 }, { 7, 1103, 2048 }, - { 4, 1104, 2048 }, { 5, 1105, 2048 }, { 5, 1106, 2048 }, { 6, 1107, 2048 }, { 5, 1108, 2048 }, { 6, 1109, 2048 }, { 6, 1110, 2048 }, { 7, 1111, 2048 }, - { 5, 1112, 2048 }, { 6, 1113, 2048 }, { 6, 1114, 2048 }, { 7, 1115, 2048 }, { 6, 1116, 2048 }, { 7, 1117, 2048 }, { 7, 1118, 2048 }, { 8, 1119, 2048 }, - { 4, 1120, 2048 }, { 5, 1121, 2048 }, { 5, 1122, 2048 }, { 6, 1123, 2048 }, { 5, 1124, 2048 }, { 6, 1125, 2048 }, { 6, 1126, 2048 }, { 7, 1127, 2048 }, - { 5, 1128, 2048 }, { 6, 1129, 2048 }, { 6, 1130, 2048 }, { 7, 1131, 2048 }, { 6, 1132, 2048 }, { 7, 1133, 2048 }, { 7, 1134, 2048 }, { 8, 1135, 2048 }, - { 5, 1136, 2048 }, { 6, 1137, 2048 }, { 6, 1138, 2048 }, { 7, 1139, 2048 }, { 6, 1140, 2048 }, { 7, 1141, 2048 }, { 7, 1142, 2048 }, { 8, 1143, 2048 }, - { 6, 1144, 2048 }, { 7, 1145, 2048 }, { 7, 1146, 2048 }, { 8, 1147, 2048 }, { 7, 1148, 2048 }, { 8, 1149, 2048 }, { 8, 1150, 2048 }, { 9, 1151, 2048 }, - { 3, 1152, 2048 }, { 4, 1153, 2048 }, { 4, 1154, 2048 }, { 5, 1155, 2048 }, { 4, 1156, 2048 }, { 5, 1157, 2048 }, { 5, 1158, 2048 }, { 6, 1159, 2048 }, - { 4, 1160, 2048 }, { 5, 1161, 2048 }, { 5, 1162, 2048 }, { 6, 1163, 2048 }, { 5, 1164, 2048 }, { 6, 1165, 2048 }, { 6, 1166, 2048 }, { 7, 1167, 2048 }, - { 4, 1168, 2048 }, { 5, 1169, 2048 }, { 5, 1170, 2048 }, { 6, 1171, 2048 }, { 5, 1172, 2048 }, { 6, 1173, 2048 }, { 6, 1174, 2048 }, { 7, 1175, 2048 }, - { 5, 1176, 2048 }, { 6, 1177, 2048 }, { 6, 1178, 2048 }, { 7, 1179, 2048 }, { 6, 1180, 2048 }, { 7, 1181, 2048 }, { 7, 1182, 2048 }, { 8, 1183, 2048 }, - { 4, 1184, 2048 }, { 5, 1185, 2048 }, { 5, 1186, 2048 }, { 6, 1187, 2048 }, { 5, 1188, 2048 }, { 6, 1189, 2048 }, { 6, 1190, 2048 }, { 7, 1191, 2048 }, - { 5, 1192, 2048 }, { 6, 1193, 2048 }, { 6, 1194, 2048 }, { 7, 1195, 2048 }, { 6, 1196, 2048 }, { 7, 1197, 2048 }, { 7, 1198, 2048 }, { 8, 1199, 2048 }, - { 5, 1200, 2048 }, { 6, 1201, 2048 }, { 6, 1202, 2048 }, { 7, 1203, 2048 }, { 6, 1204, 2048 }, { 7, 1205, 2048 }, { 7, 1206, 2048 }, { 8, 1207, 2048 }, - { 6, 1208, 2048 }, { 7, 1209, 2048 }, { 7, 1210, 2048 }, { 8, 1211, 2048 }, { 7, 1212, 2048 }, { 8, 1213, 2048 }, { 8, 1214, 2048 }, { 9, 1215, 2048 }, - { 4, 1216, 2048 }, { 5, 1217, 2048 }, { 5, 1218, 2048 }, { 6, 1219, 2048 }, { 5, 1220, 2048 }, { 6, 1221, 2048 }, { 6, 1222, 2048 }, { 7, 1223, 2048 }, - { 5, 1224, 2048 }, { 6, 1225, 2048 }, { 6, 1226, 2048 }, { 7, 1227, 2048 }, { 6, 1228, 2048 }, { 7, 1229, 2048 }, { 7, 1230, 2048 }, { 8, 1231, 2048 }, - { 5, 1232, 2048 }, { 6, 1233, 2048 }, { 6, 1234, 2048 }, { 7, 1235, 2048 }, { 6, 1236, 2048 }, { 7, 1237, 2048 }, { 7, 1238, 2048 }, { 8, 1239, 2048 }, - { 6, 1240, 2048 }, { 7, 1241, 2048 }, { 7, 1242, 2048 }, { 8, 1243, 2048 }, { 7, 1244, 2048 }, { 8, 1245, 2048 }, { 8, 1246, 2048 }, { 9, 1247, 2048 }, - { 5, 1248, 2048 }, { 6, 1249, 2048 }, { 6, 1250, 2048 }, { 7, 1251, 2048 }, { 6, 1252, 2048 }, { 7, 1253, 2048 }, { 7, 1254, 2048 }, { 8, 1255, 2048 }, - { 6, 1256, 2048 }, { 7, 1257, 2048 }, { 7, 1258, 2048 }, { 8, 1259, 2048 }, { 7, 1260, 2048 }, { 8, 1261, 2048 }, { 8, 1262, 2048 }, { 9, 1263, 2048 }, - { 6, 1264, 2048 }, { 7, 1265, 2048 }, { 7, 1266, 2048 }, { 8, 1267, 2048 }, { 7, 1268, 2048 }, { 8, 1269, 2048 }, { 8, 1270, 2048 }, { 9, 1271, 2048 }, - { 7, 1272, 2048 }, { 8, 1273, 2048 }, { 8, 1274, 2048 }, { 9, 1275, 2048 }, { 8, 1276, 2048 }, { 9, 1277, 2048 }, { 9, 1278, 2048 }, { 10, 1279, 2048 }, - { 3, 1280, 2048 }, { 4, 1281, 2048 }, { 4, 1282, 2048 }, { 5, 1283, 2048 }, { 4, 1284, 2048 }, { 5, 1285, 2048 }, { 5, 1286, 2048 }, { 6, 1287, 2048 }, - { 4, 1288, 2048 }, { 5, 1289, 2048 }, { 5, 1290, 2048 }, { 6, 1291, 2048 }, { 5, 1292, 2048 }, { 6, 1293, 2048 }, { 6, 1294, 2048 }, { 7, 1295, 2048 }, - { 4, 1296, 2048 }, { 5, 1297, 2048 }, { 5, 1298, 2048 }, { 6, 1299, 2048 }, { 5, 1300, 2048 }, { 6, 1301, 2048 }, { 6, 1302, 2048 }, { 7, 1303, 2048 }, - { 5, 1304, 2048 }, { 6, 1305, 2048 }, { 6, 1306, 2048 }, { 7, 1307, 2048 }, { 6, 1308, 2048 }, { 7, 1309, 2048 }, { 7, 1310, 2048 }, { 8, 1311, 2048 }, - { 4, 1312, 2048 }, { 5, 1313, 2048 }, { 5, 1314, 2048 }, { 6, 1315, 2048 }, { 5, 1316, 2048 }, { 6, 1317, 2048 }, { 6, 1318, 2048 }, { 7, 1319, 2048 }, - { 5, 1320, 2048 }, { 6, 1321, 2048 }, { 6, 1322, 2048 }, { 7, 1323, 2048 }, { 6, 1324, 2048 }, { 7, 1325, 2048 }, { 7, 1326, 2048 }, { 8, 1327, 2048 }, - { 5, 1328, 2048 }, { 6, 1329, 2048 }, { 6, 1330, 2048 }, { 7, 1331, 2048 }, { 6, 1332, 2048 }, { 7, 1333, 2048 }, { 7, 1334, 2048 }, { 8, 1335, 2048 }, - { 6, 1336, 2048 }, { 7, 1337, 2048 }, { 7, 1338, 2048 }, { 8, 1339, 2048 }, { 7, 1340, 2048 }, { 8, 1341, 2048 }, { 8, 1342, 2048 }, { 9, 1343, 2048 }, - { 4, 1344, 2048 }, { 5, 1345, 2048 }, { 5, 1346, 2048 }, { 6, 1347, 2048 }, { 5, 1348, 2048 }, { 6, 1349, 2048 }, { 6, 1350, 2048 }, { 7, 1351, 2048 }, - { 5, 1352, 2048 }, { 6, 1353, 2048 }, { 6, 1354, 2048 }, { 7, 1355, 2048 }, { 6, 1356, 2048 }, { 7, 1357, 2048 }, { 7, 1358, 2048 }, { 8, 1359, 2048 }, - { 5, 1360, 2048 }, { 6, 1361, 2048 }, { 6, 1362, 2048 }, { 7, 1363, 2048 }, { 6, 1364, 2048 }, { 7, 1365, 2048 }, { 7, 1366, 2048 }, { 8, 1367, 2048 }, - { 6, 1368, 2048 }, { 7, 1369, 2048 }, { 7, 1370, 2048 }, { 8, 1371, 2048 }, { 7, 1372, 2048 }, { 8, 1373, 2048 }, { 8, 1374, 2048 }, { 9, 1375, 2048 }, - { 5, 1376, 2048 }, { 6, 1377, 2048 }, { 6, 1378, 2048 }, { 7, 1379, 2048 }, { 6, 1380, 2048 }, { 7, 1381, 2048 }, { 7, 1382, 2048 }, { 8, 1383, 2048 }, - { 6, 1384, 2048 }, { 7, 1385, 2048 }, { 7, 1386, 2048 }, { 8, 1387, 2048 }, { 7, 1388, 2048 }, { 8, 1389, 2048 }, { 8, 1390, 2048 }, { 9, 1391, 2048 }, - { 6, 1392, 2048 }, { 7, 1393, 2048 }, { 7, 1394, 2048 }, { 8, 1395, 2048 }, { 7, 1396, 2048 }, { 8, 1397, 2048 }, { 8, 1398, 2048 }, { 9, 1399, 2048 }, - { 7, 1400, 2048 }, { 8, 1401, 2048 }, { 8, 1402, 2048 }, { 9, 1403, 2048 }, { 8, 1404, 2048 }, { 9, 1405, 2048 }, { 9, 1406, 2048 }, { 10, 1407, 2048 }, - { 4, 1408, 2048 }, { 5, 1409, 2048 }, { 5, 1410, 2048 }, { 6, 1411, 2048 }, { 5, 1412, 2048 }, { 6, 1413, 2048 }, { 6, 1414, 2048 }, { 7, 1415, 2048 }, - { 5, 1416, 2048 }, { 6, 1417, 2048 }, { 6, 1418, 2048 }, { 7, 1419, 2048 }, { 6, 1420, 2048 }, { 7, 1421, 2048 }, { 7, 1422, 2048 }, { 8, 1423, 2048 }, - { 5, 1424, 2048 }, { 6, 1425, 2048 }, { 6, 1426, 2048 }, { 7, 1427, 2048 }, { 6, 1428, 2048 }, { 7, 1429, 2048 }, { 7, 1430, 2048 }, { 8, 1431, 2048 }, - { 6, 1432, 2048 }, { 7, 1433, 2048 }, { 7, 1434, 2048 }, { 8, 1435, 2048 }, { 7, 1436, 2048 }, { 8, 1437, 2048 }, { 8, 1438, 2048 }, { 9, 1439, 2048 }, - { 5, 1440, 2048 }, { 6, 1441, 2048 }, { 6, 1442, 2048 }, { 7, 1443, 2048 }, { 6, 1444, 2048 }, { 7, 1445, 2048 }, { 7, 1446, 2048 }, { 8, 1447, 2048 }, - { 6, 1448, 2048 }, { 7, 1449, 2048 }, { 7, 1450, 2048 }, { 8, 1451, 2048 }, { 7, 1452, 2048 }, { 8, 1453, 2048 }, { 8, 1454, 2048 }, { 9, 1455, 2048 }, - { 6, 1456, 2048 }, { 7, 1457, 2048 }, { 7, 1458, 2048 }, { 8, 1459, 2048 }, { 7, 1460, 2048 }, { 8, 1461, 2048 }, { 8, 1462, 2048 }, { 9, 1463, 2048 }, - { 7, 1464, 2048 }, { 8, 1465, 2048 }, { 8, 1466, 2048 }, { 9, 1467, 2048 }, { 8, 1468, 2048 }, { 9, 1469, 2048 }, { 9, 1470, 2048 }, { 10, 1471, 2048 }, - { 5, 1472, 2048 }, { 6, 1473, 2048 }, { 6, 1474, 2048 }, { 7, 1475, 2048 }, { 6, 1476, 2048 }, { 7, 1477, 2048 }, { 7, 1478, 2048 }, { 8, 1479, 2048 }, - { 6, 1480, 2048 }, { 7, 1481, 2048 }, { 7, 1482, 2048 }, { 8, 1483, 2048 }, { 7, 1484, 2048 }, { 8, 1485, 2048 }, { 8, 1486, 2048 }, { 9, 1487, 2048 }, - { 6, 1488, 2048 }, { 7, 1489, 2048 }, { 7, 1490, 2048 }, { 8, 1491, 2048 }, { 7, 1492, 2048 }, { 8, 1493, 2048 }, { 8, 1494, 2048 }, { 9, 1495, 2048 }, - { 7, 1496, 2048 }, { 8, 1497, 2048 }, { 8, 1498, 2048 }, { 9, 1499, 2048 }, { 8, 1500, 2048 }, { 9, 1501, 2048 }, { 9, 1502, 2048 }, { 10, 1503, 2048 }, - { 6, 1504, 2048 }, { 7, 1505, 2048 }, { 7, 1506, 2048 }, { 8, 1507, 2048 }, { 7, 1508, 2048 }, { 8, 1509, 2048 }, { 8, 1510, 2048 }, { 9, 1511, 2048 }, - { 7, 1512, 2048 }, { 8, 1513, 2048 }, { 8, 1514, 2048 }, { 9, 1515, 2048 }, { 8, 1516, 2048 }, { 9, 1517, 2048 }, { 9, 1518, 2048 }, { 10, 1519, 2048 }, - { 7, 1520, 2048 }, { 8, 1521, 2048 }, { 8, 1522, 2048 }, { 9, 1523, 2048 }, { 8, 1524, 2048 }, { 9, 1525, 2048 }, { 9, 1526, 2048 }, { 10, 1527, 2048 }, - { 8, 1528, 2048 }, { 9, 1529, 2048 }, { 9, 1530, 2048 }, { 10, 1531, 2048 }, { 9, 1532, 2048 }, { 10, 1533, 2048 }, { 10, 1534, 2048 }, { 11, 1535, 2048 }, - { 3, 1536, 2048 }, { 4, 1537, 2048 }, { 4, 1538, 2048 }, { 5, 1539, 2048 }, { 4, 1540, 2048 }, { 5, 1541, 2048 }, { 5, 1542, 2048 }, { 6, 1543, 2048 }, - { 4, 1544, 2048 }, { 5, 1545, 2048 }, { 5, 1546, 2048 }, { 6, 1547, 2048 }, { 5, 1548, 2048 }, { 6, 1549, 2048 }, { 6, 1550, 2048 }, { 7, 1551, 2048 }, - { 4, 1552, 2048 }, { 5, 1553, 2048 }, { 5, 1554, 2048 }, { 6, 1555, 2048 }, { 5, 1556, 2048 }, { 6, 1557, 2048 }, { 6, 1558, 2048 }, { 7, 1559, 2048 }, - { 5, 1560, 2048 }, { 6, 1561, 2048 }, { 6, 1562, 2048 }, { 7, 1563, 2048 }, { 6, 1564, 2048 }, { 7, 1565, 2048 }, { 7, 1566, 2048 }, { 8, 1567, 2048 }, - { 4, 1568, 2048 }, { 5, 1569, 2048 }, { 5, 1570, 2048 }, { 6, 1571, 2048 }, { 5, 1572, 2048 }, { 6, 1573, 2048 }, { 6, 1574, 2048 }, { 7, 1575, 2048 }, - { 5, 1576, 2048 }, { 6, 1577, 2048 }, { 6, 1578, 2048 }, { 7, 1579, 2048 }, { 6, 1580, 2048 }, { 7, 1581, 2048 }, { 7, 1582, 2048 }, { 8, 1583, 2048 }, - { 5, 1584, 2048 }, { 6, 1585, 2048 }, { 6, 1586, 2048 }, { 7, 1587, 2048 }, { 6, 1588, 2048 }, { 7, 1589, 2048 }, { 7, 1590, 2048 }, { 8, 1591, 2048 }, - { 6, 1592, 2048 }, { 7, 1593, 2048 }, { 7, 1594, 2048 }, { 8, 1595, 2048 }, { 7, 1596, 2048 }, { 8, 1597, 2048 }, { 8, 1598, 2048 }, { 9, 1599, 2048 }, - { 4, 1600, 2048 }, { 5, 1601, 2048 }, { 5, 1602, 2048 }, { 6, 1603, 2048 }, { 5, 1604, 2048 }, { 6, 1605, 2048 }, { 6, 1606, 2048 }, { 7, 1607, 2048 }, - { 5, 1608, 2048 }, { 6, 1609, 2048 }, { 6, 1610, 2048 }, { 7, 1611, 2048 }, { 6, 1612, 2048 }, { 7, 1613, 2048 }, { 7, 1614, 2048 }, { 8, 1615, 2048 }, - { 5, 1616, 2048 }, { 6, 1617, 2048 }, { 6, 1618, 2048 }, { 7, 1619, 2048 }, { 6, 1620, 2048 }, { 7, 1621, 2048 }, { 7, 1622, 2048 }, { 8, 1623, 2048 }, - { 6, 1624, 2048 }, { 7, 1625, 2048 }, { 7, 1626, 2048 }, { 8, 1627, 2048 }, { 7, 1628, 2048 }, { 8, 1629, 2048 }, { 8, 1630, 2048 }, { 9, 1631, 2048 }, - { 5, 1632, 2048 }, { 6, 1633, 2048 }, { 6, 1634, 2048 }, { 7, 1635, 2048 }, { 6, 1636, 2048 }, { 7, 1637, 2048 }, { 7, 1638, 2048 }, { 8, 1639, 2048 }, - { 6, 1640, 2048 }, { 7, 1641, 2048 }, { 7, 1642, 2048 }, { 8, 1643, 2048 }, { 7, 1644, 2048 }, { 8, 1645, 2048 }, { 8, 1646, 2048 }, { 9, 1647, 2048 }, - { 6, 1648, 2048 }, { 7, 1649, 2048 }, { 7, 1650, 2048 }, { 8, 1651, 2048 }, { 7, 1652, 2048 }, { 8, 1653, 2048 }, { 8, 1654, 2048 }, { 9, 1655, 2048 }, - { 7, 1656, 2048 }, { 8, 1657, 2048 }, { 8, 1658, 2048 }, { 9, 1659, 2048 }, { 8, 1660, 2048 }, { 9, 1661, 2048 }, { 9, 1662, 2048 }, { 10, 1663, 2048 }, - { 4, 1664, 2048 }, { 5, 1665, 2048 }, { 5, 1666, 2048 }, { 6, 1667, 2048 }, { 5, 1668, 2048 }, { 6, 1669, 2048 }, { 6, 1670, 2048 }, { 7, 1671, 2048 }, - { 5, 1672, 2048 }, { 6, 1673, 2048 }, { 6, 1674, 2048 }, { 7, 1675, 2048 }, { 6, 1676, 2048 }, { 7, 1677, 2048 }, { 7, 1678, 2048 }, { 8, 1679, 2048 }, - { 5, 1680, 2048 }, { 6, 1681, 2048 }, { 6, 1682, 2048 }, { 7, 1683, 2048 }, { 6, 1684, 2048 }, { 7, 1685, 2048 }, { 7, 1686, 2048 }, { 8, 1687, 2048 }, - { 6, 1688, 2048 }, { 7, 1689, 2048 }, { 7, 1690, 2048 }, { 8, 1691, 2048 }, { 7, 1692, 2048 }, { 8, 1693, 2048 }, { 8, 1694, 2048 }, { 9, 1695, 2048 }, - { 5, 1696, 2048 }, { 6, 1697, 2048 }, { 6, 1698, 2048 }, { 7, 1699, 2048 }, { 6, 1700, 2048 }, { 7, 1701, 2048 }, { 7, 1702, 2048 }, { 8, 1703, 2048 }, - { 6, 1704, 2048 }, { 7, 1705, 2048 }, { 7, 1706, 2048 }, { 8, 1707, 2048 }, { 7, 1708, 2048 }, { 8, 1709, 2048 }, { 8, 1710, 2048 }, { 9, 1711, 2048 }, - { 6, 1712, 2048 }, { 7, 1713, 2048 }, { 7, 1714, 2048 }, { 8, 1715, 2048 }, { 7, 1716, 2048 }, { 8, 1717, 2048 }, { 8, 1718, 2048 }, { 9, 1719, 2048 }, - { 7, 1720, 2048 }, { 8, 1721, 2048 }, { 8, 1722, 2048 }, { 9, 1723, 2048 }, { 8, 1724, 2048 }, { 9, 1725, 2048 }, { 9, 1726, 2048 }, { 10, 1727, 2048 }, - { 5, 1728, 2048 }, { 6, 1729, 2048 }, { 6, 1730, 2048 }, { 7, 1731, 2048 }, { 6, 1732, 2048 }, { 7, 1733, 2048 }, { 7, 1734, 2048 }, { 8, 1735, 2048 }, - { 6, 1736, 2048 }, { 7, 1737, 2048 }, { 7, 1738, 2048 }, { 8, 1739, 2048 }, { 7, 1740, 2048 }, { 8, 1741, 2048 }, { 8, 1742, 2048 }, { 9, 1743, 2048 }, - { 6, 1744, 2048 }, { 7, 1745, 2048 }, { 7, 1746, 2048 }, { 8, 1747, 2048 }, { 7, 1748, 2048 }, { 8, 1749, 2048 }, { 8, 1750, 2048 }, { 9, 1751, 2048 }, - { 7, 1752, 2048 }, { 8, 1753, 2048 }, { 8, 1754, 2048 }, { 9, 1755, 2048 }, { 8, 1756, 2048 }, { 9, 1757, 2048 }, { 9, 1758, 2048 }, { 10, 1759, 2048 }, - { 6, 1760, 2048 }, { 7, 1761, 2048 }, { 7, 1762, 2048 }, { 8, 1763, 2048 }, { 7, 1764, 2048 }, { 8, 1765, 2048 }, { 8, 1766, 2048 }, { 9, 1767, 2048 }, - { 7, 1768, 2048 }, { 8, 1769, 2048 }, { 8, 1770, 2048 }, { 9, 1771, 2048 }, { 8, 1772, 2048 }, { 9, 1773, 2048 }, { 9, 1774, 2048 }, { 10, 1775, 2048 }, - { 7, 1776, 2048 }, { 8, 1777, 2048 }, { 8, 1778, 2048 }, { 9, 1779, 2048 }, { 8, 1780, 2048 }, { 9, 1781, 2048 }, { 9, 1782, 2048 }, { 10, 1783, 2048 }, - { 8, 1784, 2048 }, { 9, 1785, 2048 }, { 9, 1786, 2048 }, { 10, 1787, 2048 }, { 9, 1788, 2048 }, { 10, 1789, 2048 }, { 10, 1790, 2048 }, { 11, 1791, 2048 }, - { 4, 1792, 2048 }, { 5, 1793, 2048 }, { 5, 1794, 2048 }, { 6, 1795, 2048 }, { 5, 1796, 2048 }, { 6, 1797, 2048 }, { 6, 1798, 2048 }, { 7, 1799, 2048 }, - { 5, 1800, 2048 }, { 6, 1801, 2048 }, { 6, 1802, 2048 }, { 7, 1803, 2048 }, { 6, 1804, 2048 }, { 7, 1805, 2048 }, { 7, 1806, 2048 }, { 8, 1807, 2048 }, - { 5, 1808, 2048 }, { 6, 1809, 2048 }, { 6, 1810, 2048 }, { 7, 1811, 2048 }, { 6, 1812, 2048 }, { 7, 1813, 2048 }, { 7, 1814, 2048 }, { 8, 1815, 2048 }, - { 6, 1816, 2048 }, { 7, 1817, 2048 }, { 7, 1818, 2048 }, { 8, 1819, 2048 }, { 7, 1820, 2048 }, { 8, 1821, 2048 }, { 8, 1822, 2048 }, { 9, 1823, 2048 }, - { 5, 1824, 2048 }, { 6, 1825, 2048 }, { 6, 1826, 2048 }, { 7, 1827, 2048 }, { 6, 1828, 2048 }, { 7, 1829, 2048 }, { 7, 1830, 2048 }, { 8, 1831, 2048 }, - { 6, 1832, 2048 }, { 7, 1833, 2048 }, { 7, 1834, 2048 }, { 8, 1835, 2048 }, { 7, 1836, 2048 }, { 8, 1837, 2048 }, { 8, 1838, 2048 }, { 9, 1839, 2048 }, - { 6, 1840, 2048 }, { 7, 1841, 2048 }, { 7, 1842, 2048 }, { 8, 1843, 2048 }, { 7, 1844, 2048 }, { 8, 1845, 2048 }, { 8, 1846, 2048 }, { 9, 1847, 2048 }, - { 7, 1848, 2048 }, { 8, 1849, 2048 }, { 8, 1850, 2048 }, { 9, 1851, 2048 }, { 8, 1852, 2048 }, { 9, 1853, 2048 }, { 9, 1854, 2048 }, { 10, 1855, 2048 }, - { 5, 1856, 2048 }, { 6, 1857, 2048 }, { 6, 1858, 2048 }, { 7, 1859, 2048 }, { 6, 1860, 2048 }, { 7, 1861, 2048 }, { 7, 1862, 2048 }, { 8, 1863, 2048 }, - { 6, 1864, 2048 }, { 7, 1865, 2048 }, { 7, 1866, 2048 }, { 8, 1867, 2048 }, { 7, 1868, 2048 }, { 8, 1869, 2048 }, { 8, 1870, 2048 }, { 9, 1871, 2048 }, - { 6, 1872, 2048 }, { 7, 1873, 2048 }, { 7, 1874, 2048 }, { 8, 1875, 2048 }, { 7, 1876, 2048 }, { 8, 1877, 2048 }, { 8, 1878, 2048 }, { 9, 1879, 2048 }, - { 7, 1880, 2048 }, { 8, 1881, 2048 }, { 8, 1882, 2048 }, { 9, 1883, 2048 }, { 8, 1884, 2048 }, { 9, 1885, 2048 }, { 9, 1886, 2048 }, { 10, 1887, 2048 }, - { 6, 1888, 2048 }, { 7, 1889, 2048 }, { 7, 1890, 2048 }, { 8, 1891, 2048 }, { 7, 1892, 2048 }, { 8, 1893, 2048 }, { 8, 1894, 2048 }, { 9, 1895, 2048 }, - { 7, 1896, 2048 }, { 8, 1897, 2048 }, { 8, 1898, 2048 }, { 9, 1899, 2048 }, { 8, 1900, 2048 }, { 9, 1901, 2048 }, { 9, 1902, 2048 }, { 10, 1903, 2048 }, - { 7, 1904, 2048 }, { 8, 1905, 2048 }, { 8, 1906, 2048 }, { 9, 1907, 2048 }, { 8, 1908, 2048 }, { 9, 1909, 2048 }, { 9, 1910, 2048 }, { 10, 1911, 2048 }, - { 8, 1912, 2048 }, { 9, 1913, 2048 }, { 9, 1914, 2048 }, { 10, 1915, 2048 }, { 9, 1916, 2048 }, { 10, 1917, 2048 }, { 10, 1918, 2048 }, { 11, 1919, 2048 }, - { 5, 1920, 2048 }, { 6, 1921, 2048 }, { 6, 1922, 2048 }, { 7, 1923, 2048 }, { 6, 1924, 2048 }, { 7, 1925, 2048 }, { 7, 1926, 2048 }, { 8, 1927, 2048 }, - { 6, 1928, 2048 }, { 7, 1929, 2048 }, { 7, 1930, 2048 }, { 8, 1931, 2048 }, { 7, 1932, 2048 }, { 8, 1933, 2048 }, { 8, 1934, 2048 }, { 9, 1935, 2048 }, - { 6, 1936, 2048 }, { 7, 1937, 2048 }, { 7, 1938, 2048 }, { 8, 1939, 2048 }, { 7, 1940, 2048 }, { 8, 1941, 2048 }, { 8, 1942, 2048 }, { 9, 1943, 2048 }, - { 7, 1944, 2048 }, { 8, 1945, 2048 }, { 8, 1946, 2048 }, { 9, 1947, 2048 }, { 8, 1948, 2048 }, { 9, 1949, 2048 }, { 9, 1950, 2048 }, { 10, 1951, 2048 }, - { 6, 1952, 2048 }, { 7, 1953, 2048 }, { 7, 1954, 2048 }, { 8, 1955, 2048 }, { 7, 1956, 2048 }, { 8, 1957, 2048 }, { 8, 1958, 2048 }, { 9, 1959, 2048 }, - { 7, 1960, 2048 }, { 8, 1961, 2048 }, { 8, 1962, 2048 }, { 9, 1963, 2048 }, { 8, 1964, 2048 }, { 9, 1965, 2048 }, { 9, 1966, 2048 }, { 10, 1967, 2048 }, - { 7, 1968, 2048 }, { 8, 1969, 2048 }, { 8, 1970, 2048 }, { 9, 1971, 2048 }, { 8, 1972, 2048 }, { 9, 1973, 2048 }, { 9, 1974, 2048 }, { 10, 1975, 2048 }, - { 8, 1976, 2048 }, { 9, 1977, 2048 }, { 9, 1978, 2048 }, { 10, 1979, 2048 }, { 9, 1980, 2048 }, { 10, 1981, 2048 }, { 10, 1982, 2048 }, { 11, 1983, 2048 }, - { 6, 1984, 2048 }, { 7, 1985, 2048 }, { 7, 1986, 2048 }, { 8, 1987, 2048 }, { 7, 1988, 2048 }, { 8, 1989, 2048 }, { 8, 1990, 2048 }, { 9, 1991, 2048 }, - { 7, 1992, 2048 }, { 8, 1993, 2048 }, { 8, 1994, 2048 }, { 9, 1995, 2048 }, { 8, 1996, 2048 }, { 9, 1997, 2048 }, { 9, 1998, 2048 }, { 10, 1999, 2048 }, - { 7, 2000, 2048 }, { 8, 2001, 2048 }, { 8, 2002, 2048 }, { 9, 2003, 2048 }, { 8, 2004, 2048 }, { 9, 2005, 2048 }, { 9, 2006, 2048 }, { 10, 2007, 2048 }, - { 8, 2008, 2048 }, { 9, 2009, 2048 }, { 9, 2010, 2048 }, { 10, 2011, 2048 }, { 9, 2012, 2048 }, { 10, 2013, 2048 }, { 10, 2014, 2048 }, { 11, 2015, 2048 }, - { 7, 2016, 2048 }, { 8, 2017, 2048 }, { 8, 2018, 2048 }, { 9, 2019, 2048 }, { 8, 2020, 2048 }, { 9, 2021, 2048 }, { 9, 2022, 2048 }, { 10, 2023, 2048 }, - { 8, 2024, 2048 }, { 9, 2025, 2048 }, { 9, 2026, 2048 }, { 10, 2027, 2048 }, { 9, 2028, 2048 }, { 10, 2029, 2048 }, { 10, 2030, 2048 }, { 11, 2031, 2048 }, - { 8, 2032, 2048 }, { 9, 2033, 2048 }, { 9, 2034, 2048 }, { 10, 2035, 2048 }, { 9, 2036, 2048 }, { 10, 2037, 2048 }, { 10, 2038, 2048 }, { 11, 2039, 2048 }, - { 9, 2040, 2048 }, { 10, 2041, 2048 }, { 10, 2042, 2048 }, { 11, 2043, 2048 }, { 10, 2044, 2048 }, { 11, 2045, 2048 }, { 11, 2046, 2048 }, { 12, 2047, 2048 }, + { 1, 0, 0 }, { 2, 1, 2048 }, { 2, 2, 2048 }, { 3, 3, 2048 }, { 2, 4, 2048 }, { 3, 5, 2048 }, { 3, 6, 2048 }, { 4, 7, 2048 }, + { 2, 8, 2048 }, { 3, 9, 2048 }, { 3, 10, 2048 }, { 4, 11, 2048 }, { 3, 12, 2048 }, { 4, 13, 2048 }, { 4, 14, 2048 }, { 5, 15, 2048 }, + { 2, 16, 2048 }, { 3, 17, 2048 }, { 3, 18, 2048 }, { 4, 19, 2048 }, { 3, 20, 2048 }, { 4, 21, 2048 }, { 4, 22, 2048 }, { 5, 23, 2048 }, + { 3, 24, 2048 }, { 4, 25, 2048 }, { 4, 26, 2048 }, { 5, 27, 2048 }, { 4, 28, 2048 }, { 5, 29, 2048 }, { 5, 30, 2048 }, { 6, 31, 2048 }, + { 2, 32, 2048 }, { 3, 33, 2048 }, { 3, 34, 2048 }, { 4, 35, 2048 }, { 3, 36, 2048 }, { 4, 37, 2048 }, { 4, 38, 2048 }, { 5, 39, 2048 }, + { 3, 40, 2048 }, { 4, 41, 2048 }, { 4, 42, 2048 }, { 5, 43, 2048 }, { 4, 44, 2048 }, { 5, 45, 2048 }, { 5, 46, 2048 }, { 6, 47, 2048 }, + { 3, 48, 2048 }, { 4, 49, 2048 }, { 4, 50, 2048 }, { 5, 51, 2048 }, { 4, 52, 2048 }, { 5, 53, 2048 }, { 5, 54, 2048 }, { 6, 55, 2048 }, + { 4, 56, 2048 }, { 5, 57, 2048 }, { 5, 58, 2048 }, { 6, 59, 2048 }, { 5, 60, 2048 }, { 6, 61, 2048 }, { 6, 62, 2048 }, { 7, 63, 2048 }, + { 2, 64, 2048 }, { 3, 65, 2048 }, { 3, 66, 2048 }, { 4, 67, 2048 }, { 3, 68, 2048 }, { 4, 69, 2048 }, { 4, 70, 2048 }, { 5, 71, 2048 }, + { 3, 72, 2048 }, { 4, 73, 2048 }, { 4, 74, 2048 }, { 5, 75, 2048 }, { 4, 76, 2048 }, { 5, 77, 2048 }, { 5, 78, 2048 }, { 6, 79, 2048 }, + { 3, 80, 2048 }, { 4, 81, 2048 }, { 4, 82, 2048 }, { 5, 83, 2048 }, { 4, 84, 2048 }, { 5, 85, 2048 }, { 5, 86, 2048 }, { 6, 87, 2048 }, + { 4, 88, 2048 }, { 5, 89, 2048 }, { 5, 90, 2048 }, { 6, 91, 2048 }, { 5, 92, 2048 }, { 6, 93, 2048 }, { 6, 94, 2048 }, { 7, 95, 2048 }, + { 3, 96, 2048 }, { 4, 97, 2048 }, { 4, 98, 2048 }, { 5, 99, 2048 }, { 4, 100, 2048 }, { 5, 101, 2048 }, { 5, 102, 2048 }, { 6, 103, 2048 }, + { 4, 104, 2048 }, { 5, 105, 2048 }, { 5, 106, 2048 }, { 6, 107, 2048 }, { 5, 108, 2048 }, { 6, 109, 2048 }, { 6, 110, 2048 }, { 7, 111, 2048 }, + { 4, 112, 2048 }, { 5, 113, 2048 }, { 5, 114, 2048 }, { 6, 115, 2048 }, { 5, 116, 2048 }, { 6, 117, 2048 }, { 6, 118, 2048 }, { 7, 119, 2048 }, + { 5, 120, 2048 }, { 6, 121, 2048 }, { 6, 122, 2048 }, { 7, 123, 2048 }, { 6, 124, 2048 }, { 7, 125, 2048 }, { 7, 126, 2048 }, { 8, 127, 2048 }, + { 2, 128, 2048 }, { 3, 129, 2048 }, { 3, 130, 2048 }, { 4, 131, 2048 }, { 3, 132, 2048 }, { 4, 133, 2048 }, { 4, 134, 2048 }, { 5, 135, 2048 }, + { 3, 136, 2048 }, { 4, 137, 2048 }, { 4, 138, 2048 }, { 5, 139, 2048 }, { 4, 140, 2048 }, { 5, 141, 2048 }, { 5, 142, 2048 }, { 6, 143, 2048 }, + { 3, 144, 2048 }, { 4, 145, 2048 }, { 4, 146, 2048 }, { 5, 147, 2048 }, { 4, 148, 2048 }, { 5, 149, 2048 }, { 5, 150, 2048 }, { 6, 151, 2048 }, + { 4, 152, 2048 }, { 5, 153, 2048 }, { 5, 154, 2048 }, { 6, 155, 2048 }, { 5, 156, 2048 }, { 6, 157, 2048 }, { 6, 158, 2048 }, { 7, 159, 2048 }, + { 3, 160, 2048 }, { 4, 161, 2048 }, { 4, 162, 2048 }, { 5, 163, 2048 }, { 4, 164, 2048 }, { 5, 165, 2048 }, { 5, 166, 2048 }, { 6, 167, 2048 }, + { 4, 168, 2048 }, { 5, 169, 2048 }, { 5, 170, 2048 }, { 6, 171, 2048 }, { 5, 172, 2048 }, { 6, 173, 2048 }, { 6, 174, 2048 }, { 7, 175, 2048 }, + { 4, 176, 2048 }, { 5, 177, 2048 }, { 5, 178, 2048 }, { 6, 179, 2048 }, { 5, 180, 2048 }, { 6, 181, 2048 }, { 6, 182, 2048 }, { 7, 183, 2048 }, + { 5, 184, 2048 }, { 6, 185, 2048 }, { 6, 186, 2048 }, { 7, 187, 2048 }, { 6, 188, 2048 }, { 7, 189, 2048 }, { 7, 190, 2048 }, { 8, 191, 2048 }, + { 3, 192, 2048 }, { 4, 193, 2048 }, { 4, 194, 2048 }, { 5, 195, 2048 }, { 4, 196, 2048 }, { 5, 197, 2048 }, { 5, 198, 2048 }, { 6, 199, 2048 }, + { 4, 200, 2048 }, { 5, 201, 2048 }, { 5, 202, 2048 }, { 6, 203, 2048 }, { 5, 204, 2048 }, { 6, 205, 2048 }, { 6, 206, 2048 }, { 7, 207, 2048 }, + { 4, 208, 2048 }, { 5, 209, 2048 }, { 5, 210, 2048 }, { 6, 211, 2048 }, { 5, 212, 2048 }, { 6, 213, 2048 }, { 6, 214, 2048 }, { 7, 215, 2048 }, + { 5, 216, 2048 }, { 6, 217, 2048 }, { 6, 218, 2048 }, { 7, 219, 2048 }, { 6, 220, 2048 }, { 7, 221, 2048 }, { 7, 222, 2048 }, { 8, 223, 2048 }, + { 4, 224, 2048 }, { 5, 225, 2048 }, { 5, 226, 2048 }, { 6, 227, 2048 }, { 5, 228, 2048 }, { 6, 229, 2048 }, { 6, 230, 2048 }, { 7, 231, 2048 }, + { 5, 232, 2048 }, { 6, 233, 2048 }, { 6, 234, 2048 }, { 7, 235, 2048 }, { 6, 236, 2048 }, { 7, 237, 2048 }, { 7, 238, 2048 }, { 8, 239, 2048 }, + { 5, 240, 2048 }, { 6, 241, 2048 }, { 6, 242, 2048 }, { 7, 243, 2048 }, { 6, 244, 2048 }, { 7, 245, 2048 }, { 7, 246, 2048 }, { 8, 247, 2048 }, + { 6, 248, 2048 }, { 7, 249, 2048 }, { 7, 250, 2048 }, { 8, 251, 2048 }, { 7, 252, 2048 }, { 8, 253, 2048 }, { 8, 254, 2048 }, { 9, 255, 2048 }, + { 2, 256, 2048 }, { 3, 257, 2048 }, { 3, 258, 2048 }, { 4, 259, 2048 }, { 3, 260, 2048 }, { 4, 261, 2048 }, { 4, 262, 2048 }, { 5, 263, 2048 }, + { 3, 264, 2048 }, { 4, 265, 2048 }, { 4, 266, 2048 }, { 5, 267, 2048 }, { 4, 268, 2048 }, { 5, 269, 2048 }, { 5, 270, 2048 }, { 6, 271, 2048 }, + { 3, 272, 2048 }, { 4, 273, 2048 }, { 4, 274, 2048 }, { 5, 275, 2048 }, { 4, 276, 2048 }, { 5, 277, 2048 }, { 5, 278, 2048 }, { 6, 279, 2048 }, + { 4, 280, 2048 }, { 5, 281, 2048 }, { 5, 282, 2048 }, { 6, 283, 2048 }, { 5, 284, 2048 }, { 6, 285, 2048 }, { 6, 286, 2048 }, { 7, 287, 2048 }, + { 3, 288, 2048 }, { 4, 289, 2048 }, { 4, 290, 2048 }, { 5, 291, 2048 }, { 4, 292, 2048 }, { 5, 293, 2048 }, { 5, 294, 2048 }, { 6, 295, 2048 }, + { 4, 296, 2048 }, { 5, 297, 2048 }, { 5, 298, 2048 }, { 6, 299, 2048 }, { 5, 300, 2048 }, { 6, 301, 2048 }, { 6, 302, 2048 }, { 7, 303, 2048 }, + { 4, 304, 2048 }, { 5, 305, 2048 }, { 5, 306, 2048 }, { 6, 307, 2048 }, { 5, 308, 2048 }, { 6, 309, 2048 }, { 6, 310, 2048 }, { 7, 311, 2048 }, + { 5, 312, 2048 }, { 6, 313, 2048 }, { 6, 314, 2048 }, { 7, 315, 2048 }, { 6, 316, 2048 }, { 7, 317, 2048 }, { 7, 318, 2048 }, { 8, 319, 2048 }, + { 3, 320, 2048 }, { 4, 321, 2048 }, { 4, 322, 2048 }, { 5, 323, 2048 }, { 4, 324, 2048 }, { 5, 325, 2048 }, { 5, 326, 2048 }, { 6, 327, 2048 }, + { 4, 328, 2048 }, { 5, 329, 2048 }, { 5, 330, 2048 }, { 6, 331, 2048 }, { 5, 332, 2048 }, { 6, 333, 2048 }, { 6, 334, 2048 }, { 7, 335, 2048 }, + { 4, 336, 2048 }, { 5, 337, 2048 }, { 5, 338, 2048 }, { 6, 339, 2048 }, { 5, 340, 2048 }, { 6, 341, 2048 }, { 6, 342, 2048 }, { 7, 343, 2048 }, + { 5, 344, 2048 }, { 6, 345, 2048 }, { 6, 346, 2048 }, { 7, 347, 2048 }, { 6, 348, 2048 }, { 7, 349, 2048 }, { 7, 350, 2048 }, { 8, 351, 2048 }, + { 4, 352, 2048 }, { 5, 353, 2048 }, { 5, 354, 2048 }, { 6, 355, 2048 }, { 5, 356, 2048 }, { 6, 357, 2048 }, { 6, 358, 2048 }, { 7, 359, 2048 }, + { 5, 360, 2048 }, { 6, 361, 2048 }, { 6, 362, 2048 }, { 7, 363, 2048 }, { 6, 364, 2048 }, { 7, 365, 2048 }, { 7, 366, 2048 }, { 8, 367, 2048 }, + { 5, 368, 2048 }, { 6, 369, 2048 }, { 6, 370, 2048 }, { 7, 371, 2048 }, { 6, 372, 2048 }, { 7, 373, 2048 }, { 7, 374, 2048 }, { 8, 375, 2048 }, + { 6, 376, 2048 }, { 7, 377, 2048 }, { 7, 378, 2048 }, { 8, 379, 2048 }, { 7, 380, 2048 }, { 8, 381, 2048 }, { 8, 382, 2048 }, { 9, 383, 2048 }, + { 3, 384, 2048 }, { 4, 385, 2048 }, { 4, 386, 2048 }, { 5, 387, 2048 }, { 4, 388, 2048 }, { 5, 389, 2048 }, { 5, 390, 2048 }, { 6, 391, 2048 }, + { 4, 392, 2048 }, { 5, 393, 2048 }, { 5, 394, 2048 }, { 6, 395, 2048 }, { 5, 396, 2048 }, { 6, 397, 2048 }, { 6, 398, 2048 }, { 7, 399, 2048 }, + { 4, 400, 2048 }, { 5, 401, 2048 }, { 5, 402, 2048 }, { 6, 403, 2048 }, { 5, 404, 2048 }, { 6, 405, 2048 }, { 6, 406, 2048 }, { 7, 407, 2048 }, + { 5, 408, 2048 }, { 6, 409, 2048 }, { 6, 410, 2048 }, { 7, 411, 2048 }, { 6, 412, 2048 }, { 7, 413, 2048 }, { 7, 414, 2048 }, { 8, 415, 2048 }, + { 4, 416, 2048 }, { 5, 417, 2048 }, { 5, 418, 2048 }, { 6, 419, 2048 }, { 5, 420, 2048 }, { 6, 421, 2048 }, { 6, 422, 2048 }, { 7, 423, 2048 }, + { 5, 424, 2048 }, { 6, 425, 2048 }, { 6, 426, 2048 }, { 7, 427, 2048 }, { 6, 428, 2048 }, { 7, 429, 2048 }, { 7, 430, 2048 }, { 8, 431, 2048 }, + { 5, 432, 2048 }, { 6, 433, 2048 }, { 6, 434, 2048 }, { 7, 435, 2048 }, { 6, 436, 2048 }, { 7, 437, 2048 }, { 7, 438, 2048 }, { 8, 439, 2048 }, + { 6, 440, 2048 }, { 7, 441, 2048 }, { 7, 442, 2048 }, { 8, 443, 2048 }, { 7, 444, 2048 }, { 8, 445, 2048 }, { 8, 446, 2048 }, { 9, 447, 2048 }, + { 4, 448, 2048 }, { 5, 449, 2048 }, { 5, 450, 2048 }, { 6, 451, 2048 }, { 5, 452, 2048 }, { 6, 453, 2048 }, { 6, 454, 2048 }, { 7, 455, 2048 }, + { 5, 456, 2048 }, { 6, 457, 2048 }, { 6, 458, 2048 }, { 7, 459, 2048 }, { 6, 460, 2048 }, { 7, 461, 2048 }, { 7, 462, 2048 }, { 8, 463, 2048 }, + { 5, 464, 2048 }, { 6, 465, 2048 }, { 6, 466, 2048 }, { 7, 467, 2048 }, { 6, 468, 2048 }, { 7, 469, 2048 }, { 7, 470, 2048 }, { 8, 471, 2048 }, + { 6, 472, 2048 }, { 7, 473, 2048 }, { 7, 474, 2048 }, { 8, 475, 2048 }, { 7, 476, 2048 }, { 8, 477, 2048 }, { 8, 478, 2048 }, { 9, 479, 2048 }, + { 5, 480, 2048 }, { 6, 481, 2048 }, { 6, 482, 2048 }, { 7, 483, 2048 }, { 6, 484, 2048 }, { 7, 485, 2048 }, { 7, 486, 2048 }, { 8, 487, 2048 }, + { 6, 488, 2048 }, { 7, 489, 2048 }, { 7, 490, 2048 }, { 8, 491, 2048 }, { 7, 492, 2048 }, { 8, 493, 2048 }, { 8, 494, 2048 }, { 9, 495, 2048 }, + { 6, 496, 2048 }, { 7, 497, 2048 }, { 7, 498, 2048 }, { 8, 499, 2048 }, { 7, 500, 2048 }, { 8, 501, 2048 }, { 8, 502, 2048 }, { 9, 503, 2048 }, + { 7, 504, 2048 }, { 8, 505, 2048 }, { 8, 506, 2048 }, { 9, 507, 2048 }, { 8, 508, 2048 }, { 9, 509, 2048 }, { 9, 510, 2048 }, { 10, 511, 2048 }, + { 2, 512, 2048 }, { 3, 513, 2048 }, { 3, 514, 2048 }, { 4, 515, 2048 }, { 3, 516, 2048 }, { 4, 517, 2048 }, { 4, 518, 2048 }, { 5, 519, 2048 }, + { 3, 520, 2048 }, { 4, 521, 2048 }, { 4, 522, 2048 }, { 5, 523, 2048 }, { 4, 524, 2048 }, { 5, 525, 2048 }, { 5, 526, 2048 }, { 6, 527, 2048 }, + { 3, 528, 2048 }, { 4, 529, 2048 }, { 4, 530, 2048 }, { 5, 531, 2048 }, { 4, 532, 2048 }, { 5, 533, 2048 }, { 5, 534, 2048 }, { 6, 535, 2048 }, + { 4, 536, 2048 }, { 5, 537, 2048 }, { 5, 538, 2048 }, { 6, 539, 2048 }, { 5, 540, 2048 }, { 6, 541, 2048 }, { 6, 542, 2048 }, { 7, 543, 2048 }, + { 3, 544, 2048 }, { 4, 545, 2048 }, { 4, 546, 2048 }, { 5, 547, 2048 }, { 4, 548, 2048 }, { 5, 549, 2048 }, { 5, 550, 2048 }, { 6, 551, 2048 }, + { 4, 552, 2048 }, { 5, 553, 2048 }, { 5, 554, 2048 }, { 6, 555, 2048 }, { 5, 556, 2048 }, { 6, 557, 2048 }, { 6, 558, 2048 }, { 7, 559, 2048 }, + { 4, 560, 2048 }, { 5, 561, 2048 }, { 5, 562, 2048 }, { 6, 563, 2048 }, { 5, 564, 2048 }, { 6, 565, 2048 }, { 6, 566, 2048 }, { 7, 567, 2048 }, + { 5, 568, 2048 }, { 6, 569, 2048 }, { 6, 570, 2048 }, { 7, 571, 2048 }, { 6, 572, 2048 }, { 7, 573, 2048 }, { 7, 574, 2048 }, { 8, 575, 2048 }, + { 3, 576, 2048 }, { 4, 577, 2048 }, { 4, 578, 2048 }, { 5, 579, 2048 }, { 4, 580, 2048 }, { 5, 581, 2048 }, { 5, 582, 2048 }, { 6, 583, 2048 }, + { 4, 584, 2048 }, { 5, 585, 2048 }, { 5, 586, 2048 }, { 6, 587, 2048 }, { 5, 588, 2048 }, { 6, 589, 2048 }, { 6, 590, 2048 }, { 7, 591, 2048 }, + { 4, 592, 2048 }, { 5, 593, 2048 }, { 5, 594, 2048 }, { 6, 595, 2048 }, { 5, 596, 2048 }, { 6, 597, 2048 }, { 6, 598, 2048 }, { 7, 599, 2048 }, + { 5, 600, 2048 }, { 6, 601, 2048 }, { 6, 602, 2048 }, { 7, 603, 2048 }, { 6, 604, 2048 }, { 7, 605, 2048 }, { 7, 606, 2048 }, { 8, 607, 2048 }, + { 4, 608, 2048 }, { 5, 609, 2048 }, { 5, 610, 2048 }, { 6, 611, 2048 }, { 5, 612, 2048 }, { 6, 613, 2048 }, { 6, 614, 2048 }, { 7, 615, 2048 }, + { 5, 616, 2048 }, { 6, 617, 2048 }, { 6, 618, 2048 }, { 7, 619, 2048 }, { 6, 620, 2048 }, { 7, 621, 2048 }, { 7, 622, 2048 }, { 8, 623, 2048 }, + { 5, 624, 2048 }, { 6, 625, 2048 }, { 6, 626, 2048 }, { 7, 627, 2048 }, { 6, 628, 2048 }, { 7, 629, 2048 }, { 7, 630, 2048 }, { 8, 631, 2048 }, + { 6, 632, 2048 }, { 7, 633, 2048 }, { 7, 634, 2048 }, { 8, 635, 2048 }, { 7, 636, 2048 }, { 8, 637, 2048 }, { 8, 638, 2048 }, { 9, 639, 2048 }, + { 3, 640, 2048 }, { 4, 641, 2048 }, { 4, 642, 2048 }, { 5, 643, 2048 }, { 4, 644, 2048 }, { 5, 645, 2048 }, { 5, 646, 2048 }, { 6, 647, 2048 }, + { 4, 648, 2048 }, { 5, 649, 2048 }, { 5, 650, 2048 }, { 6, 651, 2048 }, { 5, 652, 2048 }, { 6, 653, 2048 }, { 6, 654, 2048 }, { 7, 655, 2048 }, + { 4, 656, 2048 }, { 5, 657, 2048 }, { 5, 658, 2048 }, { 6, 659, 2048 }, { 5, 660, 2048 }, { 6, 661, 2048 }, { 6, 662, 2048 }, { 7, 663, 2048 }, + { 5, 664, 2048 }, { 6, 665, 2048 }, { 6, 666, 2048 }, { 7, 667, 2048 }, { 6, 668, 2048 }, { 7, 669, 2048 }, { 7, 670, 2048 }, { 8, 671, 2048 }, + { 4, 672, 2048 }, { 5, 673, 2048 }, { 5, 674, 2048 }, { 6, 675, 2048 }, { 5, 676, 2048 }, { 6, 677, 2048 }, { 6, 678, 2048 }, { 7, 679, 2048 }, + { 5, 680, 2048 }, { 6, 681, 2048 }, { 6, 682, 2048 }, { 7, 683, 2048 }, { 6, 684, 2048 }, { 7, 685, 2048 }, { 7, 686, 2048 }, { 8, 687, 2048 }, + { 5, 688, 2048 }, { 6, 689, 2048 }, { 6, 690, 2048 }, { 7, 691, 2048 }, { 6, 692, 2048 }, { 7, 693, 2048 }, { 7, 694, 2048 }, { 8, 695, 2048 }, + { 6, 696, 2048 }, { 7, 697, 2048 }, { 7, 698, 2048 }, { 8, 699, 2048 }, { 7, 700, 2048 }, { 8, 701, 2048 }, { 8, 702, 2048 }, { 9, 703, 2048 }, + { 4, 704, 2048 }, { 5, 705, 2048 }, { 5, 706, 2048 }, { 6, 707, 2048 }, { 5, 708, 2048 }, { 6, 709, 2048 }, { 6, 710, 2048 }, { 7, 711, 2048 }, + { 5, 712, 2048 }, { 6, 713, 2048 }, { 6, 714, 2048 }, { 7, 715, 2048 }, { 6, 716, 2048 }, { 7, 717, 2048 }, { 7, 718, 2048 }, { 8, 719, 2048 }, + { 5, 720, 2048 }, { 6, 721, 2048 }, { 6, 722, 2048 }, { 7, 723, 2048 }, { 6, 724, 2048 }, { 7, 725, 2048 }, { 7, 726, 2048 }, { 8, 727, 2048 }, + { 6, 728, 2048 }, { 7, 729, 2048 }, { 7, 730, 2048 }, { 8, 731, 2048 }, { 7, 732, 2048 }, { 8, 733, 2048 }, { 8, 734, 2048 }, { 9, 735, 2048 }, + { 5, 736, 2048 }, { 6, 737, 2048 }, { 6, 738, 2048 }, { 7, 739, 2048 }, { 6, 740, 2048 }, { 7, 741, 2048 }, { 7, 742, 2048 }, { 8, 743, 2048 }, + { 6, 744, 2048 }, { 7, 745, 2048 }, { 7, 746, 2048 }, { 8, 747, 2048 }, { 7, 748, 2048 }, { 8, 749, 2048 }, { 8, 750, 2048 }, { 9, 751, 2048 }, + { 6, 752, 2048 }, { 7, 753, 2048 }, { 7, 754, 2048 }, { 8, 755, 2048 }, { 7, 756, 2048 }, { 8, 757, 2048 }, { 8, 758, 2048 }, { 9, 759, 2048 }, + { 7, 760, 2048 }, { 8, 761, 2048 }, { 8, 762, 2048 }, { 9, 763, 2048 }, { 8, 764, 2048 }, { 9, 765, 2048 }, { 9, 766, 2048 }, { 10, 767, 2048 }, + { 3, 768, 2048 }, { 4, 769, 2048 }, { 4, 770, 2048 }, { 5, 771, 2048 }, { 4, 772, 2048 }, { 5, 773, 2048 }, { 5, 774, 2048 }, { 6, 775, 2048 }, + { 4, 776, 2048 }, { 5, 777, 2048 }, { 5, 778, 2048 }, { 6, 779, 2048 }, { 5, 780, 2048 }, { 6, 781, 2048 }, { 6, 782, 2048 }, { 7, 783, 2048 }, + { 4, 784, 2048 }, { 5, 785, 2048 }, { 5, 786, 2048 }, { 6, 787, 2048 }, { 5, 788, 2048 }, { 6, 789, 2048 }, { 6, 790, 2048 }, { 7, 791, 2048 }, + { 5, 792, 2048 }, { 6, 793, 2048 }, { 6, 794, 2048 }, { 7, 795, 2048 }, { 6, 796, 2048 }, { 7, 797, 2048 }, { 7, 798, 2048 }, { 8, 799, 2048 }, + { 4, 800, 2048 }, { 5, 801, 2048 }, { 5, 802, 2048 }, { 6, 803, 2048 }, { 5, 804, 2048 }, { 6, 805, 2048 }, { 6, 806, 2048 }, { 7, 807, 2048 }, + { 5, 808, 2048 }, { 6, 809, 2048 }, { 6, 810, 2048 }, { 7, 811, 2048 }, { 6, 812, 2048 }, { 7, 813, 2048 }, { 7, 814, 2048 }, { 8, 815, 2048 }, + { 5, 816, 2048 }, { 6, 817, 2048 }, { 6, 818, 2048 }, { 7, 819, 2048 }, { 6, 820, 2048 }, { 7, 821, 2048 }, { 7, 822, 2048 }, { 8, 823, 2048 }, + { 6, 824, 2048 }, { 7, 825, 2048 }, { 7, 826, 2048 }, { 8, 827, 2048 }, { 7, 828, 2048 }, { 8, 829, 2048 }, { 8, 830, 2048 }, { 9, 831, 2048 }, + { 4, 832, 2048 }, { 5, 833, 2048 }, { 5, 834, 2048 }, { 6, 835, 2048 }, { 5, 836, 2048 }, { 6, 837, 2048 }, { 6, 838, 2048 }, { 7, 839, 2048 }, + { 5, 840, 2048 }, { 6, 841, 2048 }, { 6, 842, 2048 }, { 7, 843, 2048 }, { 6, 844, 2048 }, { 7, 845, 2048 }, { 7, 846, 2048 }, { 8, 847, 2048 }, + { 5, 848, 2048 }, { 6, 849, 2048 }, { 6, 850, 2048 }, { 7, 851, 2048 }, { 6, 852, 2048 }, { 7, 853, 2048 }, { 7, 854, 2048 }, { 8, 855, 2048 }, + { 6, 856, 2048 }, { 7, 857, 2048 }, { 7, 858, 2048 }, { 8, 859, 2048 }, { 7, 860, 2048 }, { 8, 861, 2048 }, { 8, 862, 2048 }, { 9, 863, 2048 }, + { 5, 864, 2048 }, { 6, 865, 2048 }, { 6, 866, 2048 }, { 7, 867, 2048 }, { 6, 868, 2048 }, { 7, 869, 2048 }, { 7, 870, 2048 }, { 8, 871, 2048 }, + { 6, 872, 2048 }, { 7, 873, 2048 }, { 7, 874, 2048 }, { 8, 875, 2048 }, { 7, 876, 2048 }, { 8, 877, 2048 }, { 8, 878, 2048 }, { 9, 879, 2048 }, + { 6, 880, 2048 }, { 7, 881, 2048 }, { 7, 882, 2048 }, { 8, 883, 2048 }, { 7, 884, 2048 }, { 8, 885, 2048 }, { 8, 886, 2048 }, { 9, 887, 2048 }, + { 7, 888, 2048 }, { 8, 889, 2048 }, { 8, 890, 2048 }, { 9, 891, 2048 }, { 8, 892, 2048 }, { 9, 893, 2048 }, { 9, 894, 2048 }, { 10, 895, 2048 }, + { 4, 896, 2048 }, { 5, 897, 2048 }, { 5, 898, 2048 }, { 6, 899, 2048 }, { 5, 900, 2048 }, { 6, 901, 2048 }, { 6, 902, 2048 }, { 7, 903, 2048 }, + { 5, 904, 2048 }, { 6, 905, 2048 }, { 6, 906, 2048 }, { 7, 907, 2048 }, { 6, 908, 2048 }, { 7, 909, 2048 }, { 7, 910, 2048 }, { 8, 911, 2048 }, + { 5, 912, 2048 }, { 6, 913, 2048 }, { 6, 914, 2048 }, { 7, 915, 2048 }, { 6, 916, 2048 }, { 7, 917, 2048 }, { 7, 918, 2048 }, { 8, 919, 2048 }, + { 6, 920, 2048 }, { 7, 921, 2048 }, { 7, 922, 2048 }, { 8, 923, 2048 }, { 7, 924, 2048 }, { 8, 925, 2048 }, { 8, 926, 2048 }, { 9, 927, 2048 }, + { 5, 928, 2048 }, { 6, 929, 2048 }, { 6, 930, 2048 }, { 7, 931, 2048 }, { 6, 932, 2048 }, { 7, 933, 2048 }, { 7, 934, 2048 }, { 8, 935, 2048 }, + { 6, 936, 2048 }, { 7, 937, 2048 }, { 7, 938, 2048 }, { 8, 939, 2048 }, { 7, 940, 2048 }, { 8, 941, 2048 }, { 8, 942, 2048 }, { 9, 943, 2048 }, + { 6, 944, 2048 }, { 7, 945, 2048 }, { 7, 946, 2048 }, { 8, 947, 2048 }, { 7, 948, 2048 }, { 8, 949, 2048 }, { 8, 950, 2048 }, { 9, 951, 2048 }, + { 7, 952, 2048 }, { 8, 953, 2048 }, { 8, 954, 2048 }, { 9, 955, 2048 }, { 8, 956, 2048 }, { 9, 957, 2048 }, { 9, 958, 2048 }, { 10, 959, 2048 }, + { 5, 960, 2048 }, { 6, 961, 2048 }, { 6, 962, 2048 }, { 7, 963, 2048 }, { 6, 964, 2048 }, { 7, 965, 2048 }, { 7, 966, 2048 }, { 8, 967, 2048 }, + { 6, 968, 2048 }, { 7, 969, 2048 }, { 7, 970, 2048 }, { 8, 971, 2048 }, { 7, 972, 2048 }, { 8, 973, 2048 }, { 8, 974, 2048 }, { 9, 975, 2048 }, + { 6, 976, 2048 }, { 7, 977, 2048 }, { 7, 978, 2048 }, { 8, 979, 2048 }, { 7, 980, 2048 }, { 8, 981, 2048 }, { 8, 982, 2048 }, { 9, 983, 2048 }, + { 7, 984, 2048 }, { 8, 985, 2048 }, { 8, 986, 2048 }, { 9, 987, 2048 }, { 8, 988, 2048 }, { 9, 989, 2048 }, { 9, 990, 2048 }, { 10, 991, 2048 }, + { 6, 992, 2048 }, { 7, 993, 2048 }, { 7, 994, 2048 }, { 8, 995, 2048 }, { 7, 996, 2048 }, { 8, 997, 2048 }, { 8, 998, 2048 }, { 9, 999, 2048 }, + { 7, 1000, 2048 }, { 8, 1001, 2048 }, { 8, 1002, 2048 }, { 9, 1003, 2048 }, { 8, 1004, 2048 }, { 9, 1005, 2048 }, { 9, 1006, 2048 }, { 10, 1007, 2048 }, + { 7, 1008, 2048 }, { 8, 1009, 2048 }, { 8, 1010, 2048 }, { 9, 1011, 2048 }, { 8, 1012, 2048 }, { 9, 1013, 2048 }, { 9, 1014, 2048 }, { 10, 1015, 2048 }, + { 8, 1016, 2048 }, { 9, 1017, 2048 }, { 9, 1018, 2048 }, { 10, 1019, 2048 }, { 9, 1020, 2048 }, { 10, 1021, 2048 }, { 10, 1022, 2048 }, { 11, 1023, 2048 }, + { 2, 1024, 2048 }, { 3, 1025, 2048 }, { 3, 1026, 2048 }, { 4, 1027, 2048 }, { 3, 1028, 2048 }, { 4, 1029, 2048 }, { 4, 1030, 2048 }, { 5, 1031, 2048 }, + { 3, 1032, 2048 }, { 4, 1033, 2048 }, { 4, 1034, 2048 }, { 5, 1035, 2048 }, { 4, 1036, 2048 }, { 5, 1037, 2048 }, { 5, 1038, 2048 }, { 6, 1039, 2048 }, + { 3, 1040, 2048 }, { 4, 1041, 2048 }, { 4, 1042, 2048 }, { 5, 1043, 2048 }, { 4, 1044, 2048 }, { 5, 1045, 2048 }, { 5, 1046, 2048 }, { 6, 1047, 2048 }, + { 4, 1048, 2048 }, { 5, 1049, 2048 }, { 5, 1050, 2048 }, { 6, 1051, 2048 }, { 5, 1052, 2048 }, { 6, 1053, 2048 }, { 6, 1054, 2048 }, { 7, 1055, 2048 }, + { 3, 1056, 2048 }, { 4, 1057, 2048 }, { 4, 1058, 2048 }, { 5, 1059, 2048 }, { 4, 1060, 2048 }, { 5, 1061, 2048 }, { 5, 1062, 2048 }, { 6, 1063, 2048 }, + { 4, 1064, 2048 }, { 5, 1065, 2048 }, { 5, 1066, 2048 }, { 6, 1067, 2048 }, { 5, 1068, 2048 }, { 6, 1069, 2048 }, { 6, 1070, 2048 }, { 7, 1071, 2048 }, + { 4, 1072, 2048 }, { 5, 1073, 2048 }, { 5, 1074, 2048 }, { 6, 1075, 2048 }, { 5, 1076, 2048 }, { 6, 1077, 2048 }, { 6, 1078, 2048 }, { 7, 1079, 2048 }, + { 5, 1080, 2048 }, { 6, 1081, 2048 }, { 6, 1082, 2048 }, { 7, 1083, 2048 }, { 6, 1084, 2048 }, { 7, 1085, 2048 }, { 7, 1086, 2048 }, { 8, 1087, 2048 }, + { 3, 1088, 2048 }, { 4, 1089, 2048 }, { 4, 1090, 2048 }, { 5, 1091, 2048 }, { 4, 1092, 2048 }, { 5, 1093, 2048 }, { 5, 1094, 2048 }, { 6, 1095, 2048 }, + { 4, 1096, 2048 }, { 5, 1097, 2048 }, { 5, 1098, 2048 }, { 6, 1099, 2048 }, { 5, 1100, 2048 }, { 6, 1101, 2048 }, { 6, 1102, 2048 }, { 7, 1103, 2048 }, + { 4, 1104, 2048 }, { 5, 1105, 2048 }, { 5, 1106, 2048 }, { 6, 1107, 2048 }, { 5, 1108, 2048 }, { 6, 1109, 2048 }, { 6, 1110, 2048 }, { 7, 1111, 2048 }, + { 5, 1112, 2048 }, { 6, 1113, 2048 }, { 6, 1114, 2048 }, { 7, 1115, 2048 }, { 6, 1116, 2048 }, { 7, 1117, 2048 }, { 7, 1118, 2048 }, { 8, 1119, 2048 }, + { 4, 1120, 2048 }, { 5, 1121, 2048 }, { 5, 1122, 2048 }, { 6, 1123, 2048 }, { 5, 1124, 2048 }, { 6, 1125, 2048 }, { 6, 1126, 2048 }, { 7, 1127, 2048 }, + { 5, 1128, 2048 }, { 6, 1129, 2048 }, { 6, 1130, 2048 }, { 7, 1131, 2048 }, { 6, 1132, 2048 }, { 7, 1133, 2048 }, { 7, 1134, 2048 }, { 8, 1135, 2048 }, + { 5, 1136, 2048 }, { 6, 1137, 2048 }, { 6, 1138, 2048 }, { 7, 1139, 2048 }, { 6, 1140, 2048 }, { 7, 1141, 2048 }, { 7, 1142, 2048 }, { 8, 1143, 2048 }, + { 6, 1144, 2048 }, { 7, 1145, 2048 }, { 7, 1146, 2048 }, { 8, 1147, 2048 }, { 7, 1148, 2048 }, { 8, 1149, 2048 }, { 8, 1150, 2048 }, { 9, 1151, 2048 }, + { 3, 1152, 2048 }, { 4, 1153, 2048 }, { 4, 1154, 2048 }, { 5, 1155, 2048 }, { 4, 1156, 2048 }, { 5, 1157, 2048 }, { 5, 1158, 2048 }, { 6, 1159, 2048 }, + { 4, 1160, 2048 }, { 5, 1161, 2048 }, { 5, 1162, 2048 }, { 6, 1163, 2048 }, { 5, 1164, 2048 }, { 6, 1165, 2048 }, { 6, 1166, 2048 }, { 7, 1167, 2048 }, + { 4, 1168, 2048 }, { 5, 1169, 2048 }, { 5, 1170, 2048 }, { 6, 1171, 2048 }, { 5, 1172, 2048 }, { 6, 1173, 2048 }, { 6, 1174, 2048 }, { 7, 1175, 2048 }, + { 5, 1176, 2048 }, { 6, 1177, 2048 }, { 6, 1178, 2048 }, { 7, 1179, 2048 }, { 6, 1180, 2048 }, { 7, 1181, 2048 }, { 7, 1182, 2048 }, { 8, 1183, 2048 }, + { 4, 1184, 2048 }, { 5, 1185, 2048 }, { 5, 1186, 2048 }, { 6, 1187, 2048 }, { 5, 1188, 2048 }, { 6, 1189, 2048 }, { 6, 1190, 2048 }, { 7, 1191, 2048 }, + { 5, 1192, 2048 }, { 6, 1193, 2048 }, { 6, 1194, 2048 }, { 7, 1195, 2048 }, { 6, 1196, 2048 }, { 7, 1197, 2048 }, { 7, 1198, 2048 }, { 8, 1199, 2048 }, + { 5, 1200, 2048 }, { 6, 1201, 2048 }, { 6, 1202, 2048 }, { 7, 1203, 2048 }, { 6, 1204, 2048 }, { 7, 1205, 2048 }, { 7, 1206, 2048 }, { 8, 1207, 2048 }, + { 6, 1208, 2048 }, { 7, 1209, 2048 }, { 7, 1210, 2048 }, { 8, 1211, 2048 }, { 7, 1212, 2048 }, { 8, 1213, 2048 }, { 8, 1214, 2048 }, { 9, 1215, 2048 }, + { 4, 1216, 2048 }, { 5, 1217, 2048 }, { 5, 1218, 2048 }, { 6, 1219, 2048 }, { 5, 1220, 2048 }, { 6, 1221, 2048 }, { 6, 1222, 2048 }, { 7, 1223, 2048 }, + { 5, 1224, 2048 }, { 6, 1225, 2048 }, { 6, 1226, 2048 }, { 7, 1227, 2048 }, { 6, 1228, 2048 }, { 7, 1229, 2048 }, { 7, 1230, 2048 }, { 8, 1231, 2048 }, + { 5, 1232, 2048 }, { 6, 1233, 2048 }, { 6, 1234, 2048 }, { 7, 1235, 2048 }, { 6, 1236, 2048 }, { 7, 1237, 2048 }, { 7, 1238, 2048 }, { 8, 1239, 2048 }, + { 6, 1240, 2048 }, { 7, 1241, 2048 }, { 7, 1242, 2048 }, { 8, 1243, 2048 }, { 7, 1244, 2048 }, { 8, 1245, 2048 }, { 8, 1246, 2048 }, { 9, 1247, 2048 }, + { 5, 1248, 2048 }, { 6, 1249, 2048 }, { 6, 1250, 2048 }, { 7, 1251, 2048 }, { 6, 1252, 2048 }, { 7, 1253, 2048 }, { 7, 1254, 2048 }, { 8, 1255, 2048 }, + { 6, 1256, 2048 }, { 7, 1257, 2048 }, { 7, 1258, 2048 }, { 8, 1259, 2048 }, { 7, 1260, 2048 }, { 8, 1261, 2048 }, { 8, 1262, 2048 }, { 9, 1263, 2048 }, + { 6, 1264, 2048 }, { 7, 1265, 2048 }, { 7, 1266, 2048 }, { 8, 1267, 2048 }, { 7, 1268, 2048 }, { 8, 1269, 2048 }, { 8, 1270, 2048 }, { 9, 1271, 2048 }, + { 7, 1272, 2048 }, { 8, 1273, 2048 }, { 8, 1274, 2048 }, { 9, 1275, 2048 }, { 8, 1276, 2048 }, { 9, 1277, 2048 }, { 9, 1278, 2048 }, { 10, 1279, 2048 }, + { 3, 1280, 2048 }, { 4, 1281, 2048 }, { 4, 1282, 2048 }, { 5, 1283, 2048 }, { 4, 1284, 2048 }, { 5, 1285, 2048 }, { 5, 1286, 2048 }, { 6, 1287, 2048 }, + { 4, 1288, 2048 }, { 5, 1289, 2048 }, { 5, 1290, 2048 }, { 6, 1291, 2048 }, { 5, 1292, 2048 }, { 6, 1293, 2048 }, { 6, 1294, 2048 }, { 7, 1295, 2048 }, + { 4, 1296, 2048 }, { 5, 1297, 2048 }, { 5, 1298, 2048 }, { 6, 1299, 2048 }, { 5, 1300, 2048 }, { 6, 1301, 2048 }, { 6, 1302, 2048 }, { 7, 1303, 2048 }, + { 5, 1304, 2048 }, { 6, 1305, 2048 }, { 6, 1306, 2048 }, { 7, 1307, 2048 }, { 6, 1308, 2048 }, { 7, 1309, 2048 }, { 7, 1310, 2048 }, { 8, 1311, 2048 }, + { 4, 1312, 2048 }, { 5, 1313, 2048 }, { 5, 1314, 2048 }, { 6, 1315, 2048 }, { 5, 1316, 2048 }, { 6, 1317, 2048 }, { 6, 1318, 2048 }, { 7, 1319, 2048 }, + { 5, 1320, 2048 }, { 6, 1321, 2048 }, { 6, 1322, 2048 }, { 7, 1323, 2048 }, { 6, 1324, 2048 }, { 7, 1325, 2048 }, { 7, 1326, 2048 }, { 8, 1327, 2048 }, + { 5, 1328, 2048 }, { 6, 1329, 2048 }, { 6, 1330, 2048 }, { 7, 1331, 2048 }, { 6, 1332, 2048 }, { 7, 1333, 2048 }, { 7, 1334, 2048 }, { 8, 1335, 2048 }, + { 6, 1336, 2048 }, { 7, 1337, 2048 }, { 7, 1338, 2048 }, { 8, 1339, 2048 }, { 7, 1340, 2048 }, { 8, 1341, 2048 }, { 8, 1342, 2048 }, { 9, 1343, 2048 }, + { 4, 1344, 2048 }, { 5, 1345, 2048 }, { 5, 1346, 2048 }, { 6, 1347, 2048 }, { 5, 1348, 2048 }, { 6, 1349, 2048 }, { 6, 1350, 2048 }, { 7, 1351, 2048 }, + { 5, 1352, 2048 }, { 6, 1353, 2048 }, { 6, 1354, 2048 }, { 7, 1355, 2048 }, { 6, 1356, 2048 }, { 7, 1357, 2048 }, { 7, 1358, 2048 }, { 8, 1359, 2048 }, + { 5, 1360, 2048 }, { 6, 1361, 2048 }, { 6, 1362, 2048 }, { 7, 1363, 2048 }, { 6, 1364, 2048 }, { 7, 1365, 2048 }, { 7, 1366, 2048 }, { 8, 1367, 2048 }, + { 6, 1368, 2048 }, { 7, 1369, 2048 }, { 7, 1370, 2048 }, { 8, 1371, 2048 }, { 7, 1372, 2048 }, { 8, 1373, 2048 }, { 8, 1374, 2048 }, { 9, 1375, 2048 }, + { 5, 1376, 2048 }, { 6, 1377, 2048 }, { 6, 1378, 2048 }, { 7, 1379, 2048 }, { 6, 1380, 2048 }, { 7, 1381, 2048 }, { 7, 1382, 2048 }, { 8, 1383, 2048 }, + { 6, 1384, 2048 }, { 7, 1385, 2048 }, { 7, 1386, 2048 }, { 8, 1387, 2048 }, { 7, 1388, 2048 }, { 8, 1389, 2048 }, { 8, 1390, 2048 }, { 9, 1391, 2048 }, + { 6, 1392, 2048 }, { 7, 1393, 2048 }, { 7, 1394, 2048 }, { 8, 1395, 2048 }, { 7, 1396, 2048 }, { 8, 1397, 2048 }, { 8, 1398, 2048 }, { 9, 1399, 2048 }, + { 7, 1400, 2048 }, { 8, 1401, 2048 }, { 8, 1402, 2048 }, { 9, 1403, 2048 }, { 8, 1404, 2048 }, { 9, 1405, 2048 }, { 9, 1406, 2048 }, { 10, 1407, 2048 }, + { 4, 1408, 2048 }, { 5, 1409, 2048 }, { 5, 1410, 2048 }, { 6, 1411, 2048 }, { 5, 1412, 2048 }, { 6, 1413, 2048 }, { 6, 1414, 2048 }, { 7, 1415, 2048 }, + { 5, 1416, 2048 }, { 6, 1417, 2048 }, { 6, 1418, 2048 }, { 7, 1419, 2048 }, { 6, 1420, 2048 }, { 7, 1421, 2048 }, { 7, 1422, 2048 }, { 8, 1423, 2048 }, + { 5, 1424, 2048 }, { 6, 1425, 2048 }, { 6, 1426, 2048 }, { 7, 1427, 2048 }, { 6, 1428, 2048 }, { 7, 1429, 2048 }, { 7, 1430, 2048 }, { 8, 1431, 2048 }, + { 6, 1432, 2048 }, { 7, 1433, 2048 }, { 7, 1434, 2048 }, { 8, 1435, 2048 }, { 7, 1436, 2048 }, { 8, 1437, 2048 }, { 8, 1438, 2048 }, { 9, 1439, 2048 }, + { 5, 1440, 2048 }, { 6, 1441, 2048 }, { 6, 1442, 2048 }, { 7, 1443, 2048 }, { 6, 1444, 2048 }, { 7, 1445, 2048 }, { 7, 1446, 2048 }, { 8, 1447, 2048 }, + { 6, 1448, 2048 }, { 7, 1449, 2048 }, { 7, 1450, 2048 }, { 8, 1451, 2048 }, { 7, 1452, 2048 }, { 8, 1453, 2048 }, { 8, 1454, 2048 }, { 9, 1455, 2048 }, + { 6, 1456, 2048 }, { 7, 1457, 2048 }, { 7, 1458, 2048 }, { 8, 1459, 2048 }, { 7, 1460, 2048 }, { 8, 1461, 2048 }, { 8, 1462, 2048 }, { 9, 1463, 2048 }, + { 7, 1464, 2048 }, { 8, 1465, 2048 }, { 8, 1466, 2048 }, { 9, 1467, 2048 }, { 8, 1468, 2048 }, { 9, 1469, 2048 }, { 9, 1470, 2048 }, { 10, 1471, 2048 }, + { 5, 1472, 2048 }, { 6, 1473, 2048 }, { 6, 1474, 2048 }, { 7, 1475, 2048 }, { 6, 1476, 2048 }, { 7, 1477, 2048 }, { 7, 1478, 2048 }, { 8, 1479, 2048 }, + { 6, 1480, 2048 }, { 7, 1481, 2048 }, { 7, 1482, 2048 }, { 8, 1483, 2048 }, { 7, 1484, 2048 }, { 8, 1485, 2048 }, { 8, 1486, 2048 }, { 9, 1487, 2048 }, + { 6, 1488, 2048 }, { 7, 1489, 2048 }, { 7, 1490, 2048 }, { 8, 1491, 2048 }, { 7, 1492, 2048 }, { 8, 1493, 2048 }, { 8, 1494, 2048 }, { 9, 1495, 2048 }, + { 7, 1496, 2048 }, { 8, 1497, 2048 }, { 8, 1498, 2048 }, { 9, 1499, 2048 }, { 8, 1500, 2048 }, { 9, 1501, 2048 }, { 9, 1502, 2048 }, { 10, 1503, 2048 }, + { 6, 1504, 2048 }, { 7, 1505, 2048 }, { 7, 1506, 2048 }, { 8, 1507, 2048 }, { 7, 1508, 2048 }, { 8, 1509, 2048 }, { 8, 1510, 2048 }, { 9, 1511, 2048 }, + { 7, 1512, 2048 }, { 8, 1513, 2048 }, { 8, 1514, 2048 }, { 9, 1515, 2048 }, { 8, 1516, 2048 }, { 9, 1517, 2048 }, { 9, 1518, 2048 }, { 10, 1519, 2048 }, + { 7, 1520, 2048 }, { 8, 1521, 2048 }, { 8, 1522, 2048 }, { 9, 1523, 2048 }, { 8, 1524, 2048 }, { 9, 1525, 2048 }, { 9, 1526, 2048 }, { 10, 1527, 2048 }, + { 8, 1528, 2048 }, { 9, 1529, 2048 }, { 9, 1530, 2048 }, { 10, 1531, 2048 }, { 9, 1532, 2048 }, { 10, 1533, 2048 }, { 10, 1534, 2048 }, { 11, 1535, 2048 }, + { 3, 1536, 2048 }, { 4, 1537, 2048 }, { 4, 1538, 2048 }, { 5, 1539, 2048 }, { 4, 1540, 2048 }, { 5, 1541, 2048 }, { 5, 1542, 2048 }, { 6, 1543, 2048 }, + { 4, 1544, 2048 }, { 5, 1545, 2048 }, { 5, 1546, 2048 }, { 6, 1547, 2048 }, { 5, 1548, 2048 }, { 6, 1549, 2048 }, { 6, 1550, 2048 }, { 7, 1551, 2048 }, + { 4, 1552, 2048 }, { 5, 1553, 2048 }, { 5, 1554, 2048 }, { 6, 1555, 2048 }, { 5, 1556, 2048 }, { 6, 1557, 2048 }, { 6, 1558, 2048 }, { 7, 1559, 2048 }, + { 5, 1560, 2048 }, { 6, 1561, 2048 }, { 6, 1562, 2048 }, { 7, 1563, 2048 }, { 6, 1564, 2048 }, { 7, 1565, 2048 }, { 7, 1566, 2048 }, { 8, 1567, 2048 }, + { 4, 1568, 2048 }, { 5, 1569, 2048 }, { 5, 1570, 2048 }, { 6, 1571, 2048 }, { 5, 1572, 2048 }, { 6, 1573, 2048 }, { 6, 1574, 2048 }, { 7, 1575, 2048 }, + { 5, 1576, 2048 }, { 6, 1577, 2048 }, { 6, 1578, 2048 }, { 7, 1579, 2048 }, { 6, 1580, 2048 }, { 7, 1581, 2048 }, { 7, 1582, 2048 }, { 8, 1583, 2048 }, + { 5, 1584, 2048 }, { 6, 1585, 2048 }, { 6, 1586, 2048 }, { 7, 1587, 2048 }, { 6, 1588, 2048 }, { 7, 1589, 2048 }, { 7, 1590, 2048 }, { 8, 1591, 2048 }, + { 6, 1592, 2048 }, { 7, 1593, 2048 }, { 7, 1594, 2048 }, { 8, 1595, 2048 }, { 7, 1596, 2048 }, { 8, 1597, 2048 }, { 8, 1598, 2048 }, { 9, 1599, 2048 }, + { 4, 1600, 2048 }, { 5, 1601, 2048 }, { 5, 1602, 2048 }, { 6, 1603, 2048 }, { 5, 1604, 2048 }, { 6, 1605, 2048 }, { 6, 1606, 2048 }, { 7, 1607, 2048 }, + { 5, 1608, 2048 }, { 6, 1609, 2048 }, { 6, 1610, 2048 }, { 7, 1611, 2048 }, { 6, 1612, 2048 }, { 7, 1613, 2048 }, { 7, 1614, 2048 }, { 8, 1615, 2048 }, + { 5, 1616, 2048 }, { 6, 1617, 2048 }, { 6, 1618, 2048 }, { 7, 1619, 2048 }, { 6, 1620, 2048 }, { 7, 1621, 2048 }, { 7, 1622, 2048 }, { 8, 1623, 2048 }, + { 6, 1624, 2048 }, { 7, 1625, 2048 }, { 7, 1626, 2048 }, { 8, 1627, 2048 }, { 7, 1628, 2048 }, { 8, 1629, 2048 }, { 8, 1630, 2048 }, { 9, 1631, 2048 }, + { 5, 1632, 2048 }, { 6, 1633, 2048 }, { 6, 1634, 2048 }, { 7, 1635, 2048 }, { 6, 1636, 2048 }, { 7, 1637, 2048 }, { 7, 1638, 2048 }, { 8, 1639, 2048 }, + { 6, 1640, 2048 }, { 7, 1641, 2048 }, { 7, 1642, 2048 }, { 8, 1643, 2048 }, { 7, 1644, 2048 }, { 8, 1645, 2048 }, { 8, 1646, 2048 }, { 9, 1647, 2048 }, + { 6, 1648, 2048 }, { 7, 1649, 2048 }, { 7, 1650, 2048 }, { 8, 1651, 2048 }, { 7, 1652, 2048 }, { 8, 1653, 2048 }, { 8, 1654, 2048 }, { 9, 1655, 2048 }, + { 7, 1656, 2048 }, { 8, 1657, 2048 }, { 8, 1658, 2048 }, { 9, 1659, 2048 }, { 8, 1660, 2048 }, { 9, 1661, 2048 }, { 9, 1662, 2048 }, { 10, 1663, 2048 }, + { 4, 1664, 2048 }, { 5, 1665, 2048 }, { 5, 1666, 2048 }, { 6, 1667, 2048 }, { 5, 1668, 2048 }, { 6, 1669, 2048 }, { 6, 1670, 2048 }, { 7, 1671, 2048 }, + { 5, 1672, 2048 }, { 6, 1673, 2048 }, { 6, 1674, 2048 }, { 7, 1675, 2048 }, { 6, 1676, 2048 }, { 7, 1677, 2048 }, { 7, 1678, 2048 }, { 8, 1679, 2048 }, + { 5, 1680, 2048 }, { 6, 1681, 2048 }, { 6, 1682, 2048 }, { 7, 1683, 2048 }, { 6, 1684, 2048 }, { 7, 1685, 2048 }, { 7, 1686, 2048 }, { 8, 1687, 2048 }, + { 6, 1688, 2048 }, { 7, 1689, 2048 }, { 7, 1690, 2048 }, { 8, 1691, 2048 }, { 7, 1692, 2048 }, { 8, 1693, 2048 }, { 8, 1694, 2048 }, { 9, 1695, 2048 }, + { 5, 1696, 2048 }, { 6, 1697, 2048 }, { 6, 1698, 2048 }, { 7, 1699, 2048 }, { 6, 1700, 2048 }, { 7, 1701, 2048 }, { 7, 1702, 2048 }, { 8, 1703, 2048 }, + { 6, 1704, 2048 }, { 7, 1705, 2048 }, { 7, 1706, 2048 }, { 8, 1707, 2048 }, { 7, 1708, 2048 }, { 8, 1709, 2048 }, { 8, 1710, 2048 }, { 9, 1711, 2048 }, + { 6, 1712, 2048 }, { 7, 1713, 2048 }, { 7, 1714, 2048 }, { 8, 1715, 2048 }, { 7, 1716, 2048 }, { 8, 1717, 2048 }, { 8, 1718, 2048 }, { 9, 1719, 2048 }, + { 7, 1720, 2048 }, { 8, 1721, 2048 }, { 8, 1722, 2048 }, { 9, 1723, 2048 }, { 8, 1724, 2048 }, { 9, 1725, 2048 }, { 9, 1726, 2048 }, { 10, 1727, 2048 }, + { 5, 1728, 2048 }, { 6, 1729, 2048 }, { 6, 1730, 2048 }, { 7, 1731, 2048 }, { 6, 1732, 2048 }, { 7, 1733, 2048 }, { 7, 1734, 2048 }, { 8, 1735, 2048 }, + { 6, 1736, 2048 }, { 7, 1737, 2048 }, { 7, 1738, 2048 }, { 8, 1739, 2048 }, { 7, 1740, 2048 }, { 8, 1741, 2048 }, { 8, 1742, 2048 }, { 9, 1743, 2048 }, + { 6, 1744, 2048 }, { 7, 1745, 2048 }, { 7, 1746, 2048 }, { 8, 1747, 2048 }, { 7, 1748, 2048 }, { 8, 1749, 2048 }, { 8, 1750, 2048 }, { 9, 1751, 2048 }, + { 7, 1752, 2048 }, { 8, 1753, 2048 }, { 8, 1754, 2048 }, { 9, 1755, 2048 }, { 8, 1756, 2048 }, { 9, 1757, 2048 }, { 9, 1758, 2048 }, { 10, 1759, 2048 }, + { 6, 1760, 2048 }, { 7, 1761, 2048 }, { 7, 1762, 2048 }, { 8, 1763, 2048 }, { 7, 1764, 2048 }, { 8, 1765, 2048 }, { 8, 1766, 2048 }, { 9, 1767, 2048 }, + { 7, 1768, 2048 }, { 8, 1769, 2048 }, { 8, 1770, 2048 }, { 9, 1771, 2048 }, { 8, 1772, 2048 }, { 9, 1773, 2048 }, { 9, 1774, 2048 }, { 10, 1775, 2048 }, + { 7, 1776, 2048 }, { 8, 1777, 2048 }, { 8, 1778, 2048 }, { 9, 1779, 2048 }, { 8, 1780, 2048 }, { 9, 1781, 2048 }, { 9, 1782, 2048 }, { 10, 1783, 2048 }, + { 8, 1784, 2048 }, { 9, 1785, 2048 }, { 9, 1786, 2048 }, { 10, 1787, 2048 }, { 9, 1788, 2048 }, { 10, 1789, 2048 }, { 10, 1790, 2048 }, { 11, 1791, 2048 }, + { 4, 1792, 2048 }, { 5, 1793, 2048 }, { 5, 1794, 2048 }, { 6, 1795, 2048 }, { 5, 1796, 2048 }, { 6, 1797, 2048 }, { 6, 1798, 2048 }, { 7, 1799, 2048 }, + { 5, 1800, 2048 }, { 6, 1801, 2048 }, { 6, 1802, 2048 }, { 7, 1803, 2048 }, { 6, 1804, 2048 }, { 7, 1805, 2048 }, { 7, 1806, 2048 }, { 8, 1807, 2048 }, + { 5, 1808, 2048 }, { 6, 1809, 2048 }, { 6, 1810, 2048 }, { 7, 1811, 2048 }, { 6, 1812, 2048 }, { 7, 1813, 2048 }, { 7, 1814, 2048 }, { 8, 1815, 2048 }, + { 6, 1816, 2048 }, { 7, 1817, 2048 }, { 7, 1818, 2048 }, { 8, 1819, 2048 }, { 7, 1820, 2048 }, { 8, 1821, 2048 }, { 8, 1822, 2048 }, { 9, 1823, 2048 }, + { 5, 1824, 2048 }, { 6, 1825, 2048 }, { 6, 1826, 2048 }, { 7, 1827, 2048 }, { 6, 1828, 2048 }, { 7, 1829, 2048 }, { 7, 1830, 2048 }, { 8, 1831, 2048 }, + { 6, 1832, 2048 }, { 7, 1833, 2048 }, { 7, 1834, 2048 }, { 8, 1835, 2048 }, { 7, 1836, 2048 }, { 8, 1837, 2048 }, { 8, 1838, 2048 }, { 9, 1839, 2048 }, + { 6, 1840, 2048 }, { 7, 1841, 2048 }, { 7, 1842, 2048 }, { 8, 1843, 2048 }, { 7, 1844, 2048 }, { 8, 1845, 2048 }, { 8, 1846, 2048 }, { 9, 1847, 2048 }, + { 7, 1848, 2048 }, { 8, 1849, 2048 }, { 8, 1850, 2048 }, { 9, 1851, 2048 }, { 8, 1852, 2048 }, { 9, 1853, 2048 }, { 9, 1854, 2048 }, { 10, 1855, 2048 }, + { 5, 1856, 2048 }, { 6, 1857, 2048 }, { 6, 1858, 2048 }, { 7, 1859, 2048 }, { 6, 1860, 2048 }, { 7, 1861, 2048 }, { 7, 1862, 2048 }, { 8, 1863, 2048 }, + { 6, 1864, 2048 }, { 7, 1865, 2048 }, { 7, 1866, 2048 }, { 8, 1867, 2048 }, { 7, 1868, 2048 }, { 8, 1869, 2048 }, { 8, 1870, 2048 }, { 9, 1871, 2048 }, + { 6, 1872, 2048 }, { 7, 1873, 2048 }, { 7, 1874, 2048 }, { 8, 1875, 2048 }, { 7, 1876, 2048 }, { 8, 1877, 2048 }, { 8, 1878, 2048 }, { 9, 1879, 2048 }, + { 7, 1880, 2048 }, { 8, 1881, 2048 }, { 8, 1882, 2048 }, { 9, 1883, 2048 }, { 8, 1884, 2048 }, { 9, 1885, 2048 }, { 9, 1886, 2048 }, { 10, 1887, 2048 }, + { 6, 1888, 2048 }, { 7, 1889, 2048 }, { 7, 1890, 2048 }, { 8, 1891, 2048 }, { 7, 1892, 2048 }, { 8, 1893, 2048 }, { 8, 1894, 2048 }, { 9, 1895, 2048 }, + { 7, 1896, 2048 }, { 8, 1897, 2048 }, { 8, 1898, 2048 }, { 9, 1899, 2048 }, { 8, 1900, 2048 }, { 9, 1901, 2048 }, { 9, 1902, 2048 }, { 10, 1903, 2048 }, + { 7, 1904, 2048 }, { 8, 1905, 2048 }, { 8, 1906, 2048 }, { 9, 1907, 2048 }, { 8, 1908, 2048 }, { 9, 1909, 2048 }, { 9, 1910, 2048 }, { 10, 1911, 2048 }, + { 8, 1912, 2048 }, { 9, 1913, 2048 }, { 9, 1914, 2048 }, { 10, 1915, 2048 }, { 9, 1916, 2048 }, { 10, 1917, 2048 }, { 10, 1918, 2048 }, { 11, 1919, 2048 }, + { 5, 1920, 2048 }, { 6, 1921, 2048 }, { 6, 1922, 2048 }, { 7, 1923, 2048 }, { 6, 1924, 2048 }, { 7, 1925, 2048 }, { 7, 1926, 2048 }, { 8, 1927, 2048 }, + { 6, 1928, 2048 }, { 7, 1929, 2048 }, { 7, 1930, 2048 }, { 8, 1931, 2048 }, { 7, 1932, 2048 }, { 8, 1933, 2048 }, { 8, 1934, 2048 }, { 9, 1935, 2048 }, + { 6, 1936, 2048 }, { 7, 1937, 2048 }, { 7, 1938, 2048 }, { 8, 1939, 2048 }, { 7, 1940, 2048 }, { 8, 1941, 2048 }, { 8, 1942, 2048 }, { 9, 1943, 2048 }, + { 7, 1944, 2048 }, { 8, 1945, 2048 }, { 8, 1946, 2048 }, { 9, 1947, 2048 }, { 8, 1948, 2048 }, { 9, 1949, 2048 }, { 9, 1950, 2048 }, { 10, 1951, 2048 }, + { 6, 1952, 2048 }, { 7, 1953, 2048 }, { 7, 1954, 2048 }, { 8, 1955, 2048 }, { 7, 1956, 2048 }, { 8, 1957, 2048 }, { 8, 1958, 2048 }, { 9, 1959, 2048 }, + { 7, 1960, 2048 }, { 8, 1961, 2048 }, { 8, 1962, 2048 }, { 9, 1963, 2048 }, { 8, 1964, 2048 }, { 9, 1965, 2048 }, { 9, 1966, 2048 }, { 10, 1967, 2048 }, + { 7, 1968, 2048 }, { 8, 1969, 2048 }, { 8, 1970, 2048 }, { 9, 1971, 2048 }, { 8, 1972, 2048 }, { 9, 1973, 2048 }, { 9, 1974, 2048 }, { 10, 1975, 2048 }, + { 8, 1976, 2048 }, { 9, 1977, 2048 }, { 9, 1978, 2048 }, { 10, 1979, 2048 }, { 9, 1980, 2048 }, { 10, 1981, 2048 }, { 10, 1982, 2048 }, { 11, 1983, 2048 }, + { 6, 1984, 2048 }, { 7, 1985, 2048 }, { 7, 1986, 2048 }, { 8, 1987, 2048 }, { 7, 1988, 2048 }, { 8, 1989, 2048 }, { 8, 1990, 2048 }, { 9, 1991, 2048 }, + { 7, 1992, 2048 }, { 8, 1993, 2048 }, { 8, 1994, 2048 }, { 9, 1995, 2048 }, { 8, 1996, 2048 }, { 9, 1997, 2048 }, { 9, 1998, 2048 }, { 10, 1999, 2048 }, + { 7, 2000, 2048 }, { 8, 2001, 2048 }, { 8, 2002, 2048 }, { 9, 2003, 2048 }, { 8, 2004, 2048 }, { 9, 2005, 2048 }, { 9, 2006, 2048 }, { 10, 2007, 2048 }, + { 8, 2008, 2048 }, { 9, 2009, 2048 }, { 9, 2010, 2048 }, { 10, 2011, 2048 }, { 9, 2012, 2048 }, { 10, 2013, 2048 }, { 10, 2014, 2048 }, { 11, 2015, 2048 }, + { 7, 2016, 2048 }, { 8, 2017, 2048 }, { 8, 2018, 2048 }, { 9, 2019, 2048 }, { 8, 2020, 2048 }, { 9, 2021, 2048 }, { 9, 2022, 2048 }, { 10, 2023, 2048 }, + { 8, 2024, 2048 }, { 9, 2025, 2048 }, { 9, 2026, 2048 }, { 10, 2027, 2048 }, { 9, 2028, 2048 }, { 10, 2029, 2048 }, { 10, 2030, 2048 }, { 11, 2031, 2048 }, + { 8, 2032, 2048 }, { 9, 2033, 2048 }, { 9, 2034, 2048 }, { 10, 2035, 2048 }, { 9, 2036, 2048 }, { 10, 2037, 2048 }, { 10, 2038, 2048 }, { 11, 2039, 2048 }, + { 9, 2040, 2048 }, { 10, 2041, 2048 }, { 10, 2042, 2048 }, { 11, 2043, 2048 }, { 10, 2044, 2048 }, { 11, 2045, 2048 }, { 11, 2046, 2048 }, { 12, 2047, 2048 }, #endif #endif #endif @@ -574,7 +572,7 @@ }; /* find a hole and free as required, return -1 if no hole found */ -static int find_hole(void) +static int _find_hole(void) { unsigned x; int y, z; @@ -610,13 +608,13 @@ } /* determine if a base is already in the cache and if so, where */ -static int find_base(ecc_point *g) +static int _find_base(ecc_point *g) { int x; for (x = 0; x < FP_ENTRIES; x++) { - if (fp_cache[x].g != NULL && - mp_cmp(fp_cache[x].g->x, g->x) == LTC_MP_EQ && - mp_cmp(fp_cache[x].g->y, g->y) == LTC_MP_EQ && + if (fp_cache[x].g != NULL && + mp_cmp(fp_cache[x].g->x, g->x) == LTC_MP_EQ && + mp_cmp(fp_cache[x].g->y, g->y) == LTC_MP_EQ && mp_cmp(fp_cache[x].g->z, g->z) == LTC_MP_EQ) { break; } @@ -628,7 +626,7 @@ } /* add a new base to the cache */ -static int add_entry(int idx, ecc_point *g) +static int _add_entry(int idx, ecc_point *g) { unsigned x, y; @@ -645,7 +643,7 @@ ltc_ecc_del_point(fp_cache[idx].g); fp_cache[idx].g = NULL; return CRYPT_MEM; - } + } for (x = 0; x < (1U<x, mu, modulus, fp_cache[idx].LUT[1]->x) != CRYPT_OK) || - (mp_mulmod(fp_cache[idx].g->y, mu, modulus, fp_cache[idx].LUT[1]->y) != CRYPT_OK) || + if ((mp_mulmod(fp_cache[idx].g->x, mu, modulus, fp_cache[idx].LUT[1]->x) != CRYPT_OK) || + (mp_mulmod(fp_cache[idx].g->y, mu, modulus, fp_cache[idx].LUT[1]->y) != CRYPT_OK) || (mp_mulmod(fp_cache[idx].g->z, mu, modulus, fp_cache[idx].LUT[1]->z) != CRYPT_OK)) { goto ERR; } - + /* make all single bit entries */ for (x = 1; x < FP_LUT; x++) { - if ((mp_copy(fp_cache[idx].LUT[1<<(x-1)]->x, fp_cache[idx].LUT[1<x) != CRYPT_OK) || - (mp_copy(fp_cache[idx].LUT[1<<(x-1)]->y, fp_cache[idx].LUT[1<y) != CRYPT_OK) || + if ((mp_copy(fp_cache[idx].LUT[1<<(x-1)]->x, fp_cache[idx].LUT[1<x) != CRYPT_OK) || + (mp_copy(fp_cache[idx].LUT[1<<(x-1)]->y, fp_cache[idx].LUT[1<y) != CRYPT_OK) || (mp_copy(fp_cache[idx].LUT[1<<(x-1)]->z, fp_cache[idx].LUT[1<z) != CRYPT_OK)) { goto ERR; } - + /* now double it bitlen/FP_LUT times */ for (y = 0; y < lut_gap; y++) { if ((err = ltc_mp.ecc_ptdbl(fp_cache[idx].LUT[1<z, modulus, mp)) != CRYPT_OK) { goto ERR; } - + /* invert it */ if ((err = mp_invmod(fp_cache[idx].LUT[x]->z, modulus, fp_cache[idx].LUT[x]->z)) != CRYPT_OK) { goto ERR; } /* now square it */ if ((err = mp_sqrmod(fp_cache[idx].LUT[x]->z, modulus, tmp)) != CRYPT_OK) { goto ERR; } - + /* fix x */ if ((err = mp_mulmod(fp_cache[idx].LUT[x]->x, tmp, modulus, fp_cache[idx].LUT[x]->x)) != CRYPT_OK) { goto ERR; } @@ -755,10 +753,10 @@ } mp_clear(tmp); - return CRYPT_OK; + return CRYPT_OK; ERR: err = CRYPT_MEM; -DONE: +DONE: for (y = 0; y < (1U< (sizeof(kb) - 2)) { if (tk != k) { mp_clear(tk); - } + } return CRYPT_BUFFER_OVERFLOW; } - + /* store k */ zeromem(kb, sizeof(kb)); if ((err = mp_to_unsigned_bin(tk, kb)) != CRYPT_OK) { if (tk != k) { mp_clear(tk); - } + } return err; } - + /* let's reverse kb so it's little endian */ x = 0; y = mp_unsigned_bin_size(tk) - 1; if (tk != k) { mp_clear(tk); - } + } while ((unsigned)x < y) { z = kb[x]; kb[x] = kb[y]; kb[y] = z; ++x; --y; - } - + } + /* at this point we can start, yipee */ first = 1; for (x = lut_gap-1; x >= 0; x--) { @@ -867,26 +865,26 @@ z |= ((kb[bitpos>>3] >> (bitpos&7)) & 1) << y; bitpos += lut_gap; /* it's y*lut_gap + x, but here we can avoid the mult in each loop */ } - + /* double if not first */ if (!first) { if ((err = ltc_mp.ecc_ptdbl(R, R, modulus, mp)) != CRYPT_OK) { return err; } } - - /* add if not first, otherwise copy */ + + /* add if not first, otherwise copy */ if (!first && z) { if ((err = ltc_mp.ecc_ptadd(R, fp_cache[idx].LUT[z], R, modulus, mp)) != CRYPT_OK) { return err; } } else if (z) { - if ((mp_copy(fp_cache[idx].LUT[z]->x, R->x) != CRYPT_OK) || - (mp_copy(fp_cache[idx].LUT[z]->y, R->y) != CRYPT_OK) || + if ((mp_copy(fp_cache[idx].LUT[z]->x, R->x) != CRYPT_OK) || + (mp_copy(fp_cache[idx].LUT[z]->y, R->y) != CRYPT_OK) || (mp_copy(fp_cache[idx].mu, R->z) != CRYPT_OK)) { return CRYPT_MEM; } - first = 0; + first = 0; } - } + } z = 0; zeromem(kb, sizeof(kb)); /* map R back from projective space */ @@ -900,7 +898,7 @@ #ifdef LTC_ECC_SHAMIR /* perform a fixed point ECC mulmod */ -static int accel_fp_mul2add(int idx1, int idx2, +static int _accel_fp_mul2add(int idx1, int idx2, void *kA, void *kB, ecc_point *R, void *modulus, void *mp) { @@ -916,13 +914,13 @@ for (x = 0; ltc_ecc_sets[x].size; x++) { if (y <= (unsigned)ltc_ecc_sets[x].size) break; } - + /* back off if we are on the 521 bit curve */ if (y == 66) --x; - + if ((err = mp_init(&order)) != CRYPT_OK) { return err; - } + } if ((err = mp_read_radix(order, ltc_ecc_sets[x].order, 16)) != CRYPT_OK) { mp_clear(&order); return err; @@ -945,7 +943,7 @@ mp_clear(order); } else { tka = kA; - } + } /* if it's smaller than modulus we fine */ if (mp_unsigned_bin_size(kB) > mp_unsigned_bin_size(modulus)) { @@ -954,13 +952,13 @@ for (x = 0; ltc_ecc_sets[x].size; x++) { if (y <= (unsigned)ltc_ecc_sets[x].size) break; } - + /* back off if we are on the 521 bit curve */ if (y == 66) --x; - + if ((err = mp_init(&order)) != CRYPT_OK) { return err; - } + } if ((err = mp_read_radix(order, ltc_ecc_sets[x].order, 16)) != CRYPT_OK) { mp_clear(&order); return err; @@ -983,55 +981,55 @@ mp_clear(order); } else { tkb = kB; - } + } /* get bitlen and round up to next multiple of FP_LUT */ bitlen = mp_unsigned_bin_size(modulus) << 3; x = bitlen % FP_LUT; if (x) { bitlen += FP_LUT - x; - } + } lut_gap = bitlen / FP_LUT; - + /* get the k value */ if ((mp_unsigned_bin_size(tka) > (sizeof(kb[0]) - 2)) || (mp_unsigned_bin_size(tkb) > (sizeof(kb[0]) - 2)) ) { if (tka != kA) { mp_clear(tka); - } + } if (tkb != kB) { mp_clear(tkb); - } + } return CRYPT_BUFFER_OVERFLOW; } - + /* store k */ zeromem(kb, sizeof(kb)); if ((err = mp_to_unsigned_bin(tka, kb[0])) != CRYPT_OK) { if (tka != kA) { mp_clear(tka); - } + } if (tkb != kB) { mp_clear(tkb); - } + } return err; } - + /* let's reverse kb so it's little endian */ x = 0; y = mp_unsigned_bin_size(tka) - 1; if (tka != kA) { mp_clear(tka); - } + } while ((unsigned)x < y) { z = kb[0][x]; kb[0][x] = kb[0][y]; kb[0][y] = z; ++x; --y; - } - + } + /* store b */ if ((err = mp_to_unsigned_bin(tkb, kb[1])) != CRYPT_OK) { if (tkb != kB) { mp_clear(tkb); - } + } return err; } @@ -1039,11 +1037,11 @@ y = mp_unsigned_bin_size(tkb) - 1; if (tkb != kB) { mp_clear(tkb); - } + } while ((unsigned)x < y) { z = kb[1][x]; kb[1][x] = kb[1][y]; kb[1][y] = z; ++x; --y; - } + } /* at this point we can start, yipee */ first = 1; @@ -1055,15 +1053,15 @@ zB |= ((kb[1][bitpos>>3] >> (bitpos&7)) & 1) << y; bitpos += lut_gap; /* it's y*lut_gap + x, but here we can avoid the mult in each loop */ } - + /* double if not first */ if (!first) { if ((err = ltc_mp.ecc_ptdbl(R, R, modulus, mp)) != CRYPT_OK) { return err; } } - - /* add if not first, otherwise copy */ + + /* add if not first, otherwise copy */ if (!first) { if (zA) { if ((err = ltc_mp.ecc_ptadd(R, fp_cache[idx1].LUT[zA], R, modulus, mp)) != CRYPT_OK) { @@ -1077,10 +1075,10 @@ } } else { if (zA) { - if ((mp_copy(fp_cache[idx1].LUT[zA]->x, R->x) != CRYPT_OK) || - (mp_copy(fp_cache[idx1].LUT[zA]->y, R->y) != CRYPT_OK) || + if ((mp_copy(fp_cache[idx1].LUT[zA]->x, R->x) != CRYPT_OK) || + (mp_copy(fp_cache[idx1].LUT[zA]->y, R->y) != CRYPT_OK) || (mp_copy(fp_cache[idx1].mu, R->z) != CRYPT_OK)) { return CRYPT_MEM; } - first = 0; + first = 0; } if (zB && first == 0) { if (zB) { @@ -1089,13 +1087,13 @@ } } } else if (zB && first == 1) { - if ((mp_copy(fp_cache[idx2].LUT[zB]->x, R->x) != CRYPT_OK) || - (mp_copy(fp_cache[idx2].LUT[zB]->y, R->y) != CRYPT_OK) || + if ((mp_copy(fp_cache[idx2].LUT[zB]->x, R->x) != CRYPT_OK) || + (mp_copy(fp_cache[idx2].LUT[zB]->y, R->y) != CRYPT_OK) || (mp_copy(fp_cache[idx2].mu, R->z) != CRYPT_OK)) { return CRYPT_MEM; } - first = 0; + first = 0; } } - } + } zeromem(kb, sizeof(kb)); return ltc_ecc_map(R, modulus, mp); } @@ -1107,27 +1105,27 @@ @param B Second point to multiply @param kB What to multiple B by @param C [out] Destination point (can overlap with A or B) - @param modulus Modulus for curve + @param modulus Modulus for curve @return CRYPT_OK on success -*/ +*/ int ltc_ecc_fp_mul2add(ecc_point *A, void *kA, ecc_point *B, void *kB, ecc_point *C, void *modulus) { int idx1, idx2, err; void *mp, *mu; - + mp = NULL; mu = NULL; LTC_MUTEX_LOCK(<c_ecc_fp_lock); /* find point */ - idx1 = find_base(A); + idx1 = _find_base(A); /* no entry? */ if (idx1 == -1) { /* find hole and add it */ - if ((idx1 = find_hole()) >= 0) { - if ((err = add_entry(idx1, A)) != CRYPT_OK) { + if ((idx1 = _find_hole()) >= 0) { + if ((err = _add_entry(idx1, A)) != CRYPT_OK) { goto LBL_ERR; } } @@ -1138,13 +1136,13 @@ } /* find point */ - idx2 = find_base(B); + idx2 = _find_base(B); /* no entry? */ if (idx2 == -1) { /* find hole and add it */ - if ((idx2 = find_hole()) >= 0) { - if ((err = add_entry(idx2, B)) != CRYPT_OK) { + if ((idx2 = _find_hole()) >= 0) { + if ((err = _add_entry(idx2, B)) != CRYPT_OK) { goto LBL_ERR; } } @@ -1165,12 +1163,12 @@ } if ((err = mp_montgomery_normalization(mu, modulus)) != CRYPT_OK) { goto LBL_ERR; - } - + } + /* build the LUT */ - if ((err = build_lut(idx1, modulus, mp, mu)) != CRYPT_OK) { + if ((err = _build_lut(idx1, modulus, mp, mu)) != CRYPT_OK) { goto LBL_ERR;; - } + } } /* if it's 2 build the LUT, if it's higher just use the LUT */ @@ -1185,13 +1183,13 @@ } if ((err = mp_montgomery_normalization(mu, modulus)) != CRYPT_OK) { goto LBL_ERR; - } + } } - + /* build the LUT */ - if ((err = build_lut(idx2, modulus, mp, mu)) != CRYPT_OK) { + if ((err = _build_lut(idx2, modulus, mp, mu)) != CRYPT_OK) { goto LBL_ERR;; - } + } } @@ -1200,7 +1198,7 @@ /* compute mp */ if ((err = mp_montgomery_setup(modulus, &mp)) != CRYPT_OK) { goto LBL_ERR; } } - err = accel_fp_mul2add(idx1, idx2, kA, kB, C, modulus, mp); + err = _accel_fp_mul2add(idx1, idx2, kA, kB, C, modulus, mp); } else { err = ltc_ecc_mul2add(A, kA, B, kB, C, modulus); } @@ -1208,10 +1206,10 @@ LTC_MUTEX_UNLOCK(<c_ecc_fp_lock); if (mp != NULL) { mp_montgomery_free(mp); - } + } if (mu != NULL) { mp_clear(mu); - } + } return err; } #endif @@ -1223,25 +1221,25 @@ @param modulus The modulus for the curve @param map [boolean] If non-zero maps the point back to affine co-ordinates, otherwise it's left in jacobian-montgomery form @return CRYPT_OK if successful -*/ +*/ int ltc_ecc_fp_mulmod(void *k, ecc_point *G, ecc_point *R, void *modulus, int map) { int idx, err; void *mp, *mu; - + mp = NULL; mu = NULL; LTC_MUTEX_LOCK(<c_ecc_fp_lock); /* find point */ - idx = find_base(G); + idx = _find_base(G); /* no entry? */ if (idx == -1) { /* find hole and add it */ - idx = find_hole(); + idx = _find_hole(); if (idx >= 0) { - if ((err = add_entry(idx, G)) != CRYPT_OK) { + if ((err = _add_entry(idx, G)) != CRYPT_OK) { goto LBL_ERR; } } @@ -1251,7 +1249,7 @@ ++(fp_cache[idx].lru_count); } - + /* if it's 2 build the LUT, if it's higher just use the LUT */ if (idx >= 0 && fp_cache[idx].lru_count == 2) { /* compute mp */ @@ -1263,12 +1261,12 @@ } if ((err = mp_montgomery_normalization(mu, modulus)) != CRYPT_OK) { goto LBL_ERR; - } - + } + /* build the LUT */ - if ((err = build_lut(idx, modulus, mp, mu)) != CRYPT_OK) { + if ((err = _build_lut(idx, modulus, mp, mu)) != CRYPT_OK) { goto LBL_ERR;; - } + } } if (idx >= 0 && fp_cache[idx].lru_count >= 2) { @@ -1276,7 +1274,7 @@ /* compute mp */ if ((err = mp_montgomery_setup(modulus, &mp)) != CRYPT_OK) { goto LBL_ERR; } } - err = accel_fp_mul(idx, k, R, modulus, mp, map); + err = _accel_fp_mul(idx, k, R, modulus, mp, map); } else { err = ltc_ecc_mulmod(k, G, R, modulus, map); } @@ -1284,15 +1282,15 @@ LTC_MUTEX_UNLOCK(<c_ecc_fp_lock); if (mp != NULL) { mp_montgomery_free(mp); - } + } if (mu != NULL) { mp_clear(mu); - } + } return err; } /* helper function for freeing the cache ... must be called with the cache mutex locked */ -static void ltc_ecc_fp_free_cache(void) +static void _ltc_ecc_fp_free_cache(void) { unsigned x, y; for (x = 0; x < FP_ENTRIES; x++) { @@ -1309,21 +1307,21 @@ } fp_cache[x].lru_count = 0; fp_cache[x].lock = 0; - } + } } -} +} /** Free the Fixed Point cache */ void ltc_ecc_fp_free(void) { LTC_MUTEX_LOCK(<c_ecc_fp_lock); - ltc_ecc_fp_free_cache(); + _ltc_ecc_fp_free_cache(); LTC_MUTEX_UNLOCK(<c_ecc_fp_lock); } /** Add a point to the cache and initialize the LUT @param g The point to add - @param modulus Modulus for curve + @param modulus Modulus for curve @param lock Flag to indicate if this entry should be locked into the cache or not @return CRYPT_OK on success */ @@ -1336,7 +1334,7 @@ void *mu = NULL; LTC_MUTEX_LOCK(<c_ecc_fp_lock); - if ((idx = find_base(g)) >= 0) { + if ((idx = _find_base(g)) >= 0) { /* it is already in the cache ... just check that the LUT is initialized */ if(fp_cache[idx].lru_count >= 2) { LTC_MUTEX_UNLOCK(<c_ecc_fp_lock); @@ -1344,11 +1342,11 @@ } } - if(idx == -1 && (idx = find_hole()) == -1) { + if(idx == -1 && (idx = _find_hole()) == -1) { err = CRYPT_BUFFER_OVERFLOW; goto LBL_ERR; } - if ((err = add_entry(idx, g)) != CRYPT_OK) { + if ((err = _add_entry(idx, g)) != CRYPT_OK) { goto LBL_ERR; } /* compute mp */ @@ -1362,26 +1360,26 @@ } if ((err = mp_montgomery_normalization(mu, modulus)) != CRYPT_OK) { goto LBL_ERR; - } - + } + /* build the LUT */ - if ((err = build_lut(idx, modulus, mp, mu)) != CRYPT_OK) { + if ((err = _build_lut(idx, modulus, mp, mu)) != CRYPT_OK) { goto LBL_ERR; - } + } fp_cache[idx].lru_count = 2; fp_cache[idx].lock = lock; LBL_ERR: LTC_MUTEX_UNLOCK(<c_ecc_fp_lock); if (mp != NULL) { mp_montgomery_free(mp); - } + } if (mu != NULL) { mp_clear(mu); - } + } return err; } -/** Prevent/permit the FP cache from being updated +/** Prevent/permit the FP cache from being updated @param flag If flag is 0, remove cache lock (unlock), otherwise lock it */ void ltc_ecc_fp_tablelock(int lock) @@ -1416,7 +1414,7 @@ LTC_MUTEX_LOCK(<c_ecc_fp_lock); /* - * build the list; + * build the list; Cache DEFINITIONS ::= BEGIN CacheDump ::= SEQUENCE { @@ -1426,12 +1424,12 @@ cache SEQUENCE OF INTEGER } END - * + * */ /* - * The cache itself is a point (3 INTEGERS), - * the LUT as pairs of INTEGERS (2 * 1<y, 1); LTC_SET_ASN1(asn1_list, j++, LTC_ASN1_INTEGER, fp_cache[i].g->z, 1); for (x = 0; x < (1U< static int init(void **a) -{ +{ LTC_ARGCHK(a != NULL); *a = XCALLOC(1, sizeof(__mpz_struct)); @@ -61,7 +59,7 @@ } /* ---- trivial ---- */ -static int set_int(void *a, unsigned long b) +static int set_int(void *a, ltc_mp_digit b) { LTC_ARGCHK(a != NULL); mpz_set_ui(((__mpz_struct *)a), b); @@ -74,7 +72,7 @@ return mpz_get_ui(a); } -static unsigned long get_digit(void *a, int n) +static ltc_mp_digit get_digit(void *a, int n) { LTC_ARGCHK(a != NULL); return mpz_getlimbn(a, n); @@ -85,7 +83,7 @@ LTC_ARGCHK(a != NULL); return mpz_size(a); } - + static int compare(void *a, void *b) { int ret; @@ -101,7 +99,7 @@ } } -static int compare_d(void *a, unsigned long b) +static int compare_d(void *a, ltc_mp_digit b) { int ret; LTC_ARGCHK(a != NULL); @@ -138,13 +136,49 @@ /* ---- conversions ---- */ +static const char rmap[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/"; + /* read ascii string */ static int read_radix(void *a, const char *b, int radix) { + int ret; LTC_ARGCHK(a != NULL); LTC_ARGCHK(b != NULL); - mpz_set_str(a, b, radix); - return CRYPT_OK; + if (radix == 64) { + /* Sadly, GMP only supports radixes up to 62, but we need 64. + * So, although this is not the most elegant or efficient way, + * let's just convert the base 64 string (6 bits per digit) to + * an octal string (3 bits per digit) that's twice as long. */ + char c, *tmp, *q; + const char *p; + int i; + tmp = XMALLOC (1 + 2 * strlen (b)); + if (tmp == NULL) { + return CRYPT_MEM; + } + p = b; + q = tmp; + while ((c = *p++) != 0) { + for (i = 0; i < 64; i++) { + if (c == rmap[i]) + break; + } + if (i == 64) { + XFREE (tmp); + /* printf ("c = '%c'\n", c); */ + return CRYPT_ERROR; + } + *q++ = '0' + (i / 8); + *q++ = '0' + (i % 8); + } + *q = 0; + ret = mpz_set_str(a, tmp, 8); + /* printf ("ret = %d for '%s'\n", ret, tmp); */ + XFREE (tmp); + } else { + ret = mpz_set_str(a, b, radix); + } + return (ret == 0 ? CRYPT_OK : CRYPT_ERROR); } /* write one */ @@ -152,6 +186,11 @@ { LTC_ARGCHK(a != NULL); LTC_ARGCHK(b != NULL); + if (radix >= 11 && radix <= 36) + /* If radix is positive, GMP uses lowercase, and if negative, uppercase. + * We want it to use uppercase, to match the test vectors (presumably + * generated with LibTomMath). */ + radix = -radix; mpz_get_str(b, radix, a); return CRYPT_OK; } @@ -193,8 +232,8 @@ mpz_add(c, a, b); return CRYPT_OK; } - -static int addi(void *a, unsigned long b, void *c) + +static int addi(void *a, ltc_mp_digit b, void *c) { LTC_ARGCHK(a != NULL); LTC_ARGCHK(c != NULL); @@ -212,7 +251,7 @@ return CRYPT_OK; } -static int subi(void *a, unsigned long b, void *c) +static int subi(void *a, ltc_mp_digit b, void *c) { LTC_ARGCHK(a != NULL); LTC_ARGCHK(c != NULL); @@ -230,7 +269,7 @@ return CRYPT_OK; } -static int muli(void *a, unsigned long b, void *c) +static int muli(void *a, ltc_mp_digit b, void *c) { LTC_ARGCHK(a != NULL); LTC_ARGCHK(c != NULL); @@ -276,14 +315,14 @@ } /* modi */ -static int modi(void *a, unsigned long b, unsigned long *c) +static int modi(void *a, ltc_mp_digit b, ltc_mp_digit *c) { LTC_ARGCHK(a != NULL); LTC_ARGCHK(c != NULL); - + *c = mpz_fdiv_ui(a, b); return CRYPT_OK; -} +} /* gcd */ static int gcd(void *a, void *b, void *c) @@ -305,6 +344,28 @@ return CRYPT_OK; } +static int addmod(void *a, void *b, void *c, void *d) +{ + LTC_ARGCHK(a != NULL); + LTC_ARGCHK(b != NULL); + LTC_ARGCHK(c != NULL); + LTC_ARGCHK(d != NULL); + mpz_add(d, a, b); + mpz_mod(d, d, c); + return CRYPT_OK; +} + +static int submod(void *a, void *b, void *c, void *d) +{ + LTC_ARGCHK(a != NULL); + LTC_ARGCHK(b != NULL); + LTC_ARGCHK(c != NULL); + LTC_ARGCHK(d != NULL); + mpz_sub(d, a, b); + mpz_mod(d, d, c); + return CRYPT_OK; +} + static int mulmod(void *a, void *b, void *c, void *d) { LTC_ARGCHK(a != NULL); @@ -367,6 +428,7 @@ /* clean up */ static void montgomery_deinit(void *a) { + LTC_UNUSED_PARAM(a); } static int exptmod(void *a, void *b, void *c, void *d) @@ -377,13 +439,23 @@ LTC_ARGCHK(d != NULL); mpz_powm(d, a, b, c); return CRYPT_OK; -} +} -static int isprime(void *a, int *b) +static int isprime(void *a, int b, int *c) { LTC_ARGCHK(a != NULL); - LTC_ARGCHK(b != NULL); - *b = mpz_probab_prime_p(a, 8) > 0 ? LTC_MP_YES : LTC_MP_NO; + LTC_ARGCHK(c != NULL); + if (b == 0) { + b = LTC_MILLER_RABIN_REPS; + } /* if */ + *c = mpz_probab_prime_p(a, b) > 0 ? LTC_MP_YES : LTC_MP_NO; + return CRYPT_OK; +} + +static int set_rand(void *a, int size) +{ + LTC_ARGCHK(a != NULL); + mpz_random(a, size); return CRYPT_OK; } @@ -458,21 +530,25 @@ NULL, #endif /* LTC_ECC_SHAMIR */ #else - NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, #endif /* LTC_MECC */ #ifdef LTC_MRSA &rsa_make_key, &rsa_exptmod, #else - NULL, NULL + NULL, NULL, #endif - + &addmod, + &submod, + + &set_rand, + }; #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/math/ltm_desc.c --- a/libtomcrypt/src/math/ltm_desc.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/math/ltm_desc.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #define DESC_DEF_ONLY @@ -25,7 +23,7 @@ }; /** - Convert a MPI error to a LTC error (Possibly the most powerful function ever! Oh wait... no) + Convert a MPI error to a LTC error (Possibly the most powerful function ever! Oh wait... no) @param err The error to convert @return The equivalent LTC error code or CRYPT_ERROR if none found */ @@ -34,7 +32,7 @@ int x; for (x = 0; x < (int)(sizeof(mpi_to_ltc_codes)/sizeof(mpi_to_ltc_codes[0])); x++) { - if (err == mpi_to_ltc_codes[x].mpi_code) { + if (err == mpi_to_ltc_codes[x].mpi_code) { return mpi_to_ltc_codes[x].ltc_code; } } @@ -51,7 +49,7 @@ if (*a == NULL) { return CRYPT_MEM; } - + if ((err = mpi_to_ltc_error(mp_init(*a))) != CRYPT_OK) { XFREE(*a); } @@ -88,7 +86,7 @@ } /* ---- trivial ---- */ -static int set_int(void *a, unsigned long b) +static int set_int(void *a, ltc_mp_digit b) { LTC_ARGCHK(a != NULL); return mpi_to_ltc_error(mp_set_int(a, b)); @@ -100,7 +98,7 @@ return mp_get_int(a); } -static unsigned long get_digit(void *a, int n) +static ltc_mp_digit get_digit(void *a, int n) { mp_int *A; LTC_ARGCHK(a != NULL); @@ -115,7 +113,7 @@ A = a; return A->used; } - + static int compare(void *a, void *b) { int ret; @@ -126,11 +124,11 @@ case MP_LT: return LTC_MP_LT; case MP_EQ: return LTC_MP_EQ; case MP_GT: return LTC_MP_GT; + default: return 0; } - return 0; } -static int compare_d(void *a, unsigned long b) +static int compare_d(void *a, ltc_mp_digit b) { int ret; LTC_ARGCHK(a != NULL); @@ -139,8 +137,8 @@ case MP_LT: return LTC_MP_LT; case MP_EQ: return LTC_MP_EQ; case MP_GT: return LTC_MP_GT; + default: return 0; } - return 0; } static int count_bits(void *a) @@ -211,8 +209,8 @@ LTC_ARGCHK(c != NULL); return mpi_to_ltc_error(mp_add(a, b, c)); } - -static int addi(void *a, unsigned long b, void *c) + +static int addi(void *a, ltc_mp_digit b, void *c) { LTC_ARGCHK(a != NULL); LTC_ARGCHK(c != NULL); @@ -228,7 +226,7 @@ return mpi_to_ltc_error(mp_sub(a, b, c)); } -static int subi(void *a, unsigned long b, void *c) +static int subi(void *a, ltc_mp_digit b, void *c) { LTC_ARGCHK(a != NULL); LTC_ARGCHK(c != NULL); @@ -244,7 +242,7 @@ return mpi_to_ltc_error(mp_mul(a, b, c)); } -static int muli(void *a, unsigned long b, void *c) +static int muli(void *a, ltc_mp_digit b, void *c) { LTC_ARGCHK(a != NULL); LTC_ARGCHK(c != NULL); @@ -275,7 +273,7 @@ } /* modi */ -static int modi(void *a, unsigned long b, unsigned long *c) +static int modi(void *a, ltc_mp_digit b, ltc_mp_digit *c) { mp_digit tmp; int err; @@ -288,7 +286,7 @@ } *c = tmp; return CRYPT_OK; -} +} /* gcd */ static int gcd(void *a, void *b, void *c) @@ -308,6 +306,24 @@ return mpi_to_ltc_error(mp_lcm(a, b, c)); } +static int addmod(void *a, void *b, void *c, void *d) +{ + LTC_ARGCHK(a != NULL); + LTC_ARGCHK(b != NULL); + LTC_ARGCHK(c != NULL); + LTC_ARGCHK(d != NULL); + return mpi_to_ltc_error(mp_addmod(a,b,c,d)); +} + +static int submod(void *a, void *b, void *c, void *d) +{ + LTC_ARGCHK(a != NULL); + LTC_ARGCHK(b != NULL); + LTC_ARGCHK(c != NULL); + LTC_ARGCHK(d != NULL); + return mpi_to_ltc_error(mp_submod(a,b,c,d)); +} + static int mulmod(void *a, void *b, void *c, void *d) { LTC_ARGCHK(a != NULL); @@ -380,17 +396,26 @@ LTC_ARGCHK(c != NULL); LTC_ARGCHK(d != NULL); return mpi_to_ltc_error(mp_exptmod(a,b,c,d)); -} +} -static int isprime(void *a, int *b) +static int isprime(void *a, int b, int *c) { int err; LTC_ARGCHK(a != NULL); - LTC_ARGCHK(b != NULL); - err = mpi_to_ltc_error(mp_prime_is_prime(a, 8, b)); - *b = (*b == MP_YES) ? LTC_MP_YES : LTC_MP_NO; + LTC_ARGCHK(c != NULL); + if (b == 0) { + b = LTC_MILLER_RABIN_REPS; + } /* if */ + err = mpi_to_ltc_error(mp_prime_is_prime(a, b, c)); + *c = (*c == MP_YES) ? LTC_MP_YES : LTC_MP_NO; return err; -} +} + +static int set_rand(void *a, int size) +{ + LTC_ARGCHK(a != NULL); + return mpi_to_ltc_error(mp_rand(a, size)); +} const ltc_math_descriptor ltm_desc = { @@ -436,7 +461,7 @@ &mulmod, &sqrmod, &invmod, - + &montgomery_setup, &montgomery_normalization, &montgomery_reduce, @@ -448,7 +473,7 @@ #ifdef LTC_MECC #ifdef LTC_MECC_FP <c_ecc_fp_mulmod, -#else +#else <c_ecc_mulmod, #endif <c_ecc_projective_add_point, @@ -471,13 +496,18 @@ &rsa_make_key, &rsa_exptmod, #else - NULL, NULL + NULL, NULL, #endif + &addmod, + &submod, + + &set_rand, + }; #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/math/multi.c --- a/libtomcrypt/src/math/multi.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/math/multi.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,12 +5,10 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -#ifdef MPI +#ifdef LTC_MPI #include int ltc_init_multi(void **a, ...) @@ -32,13 +30,14 @@ cur = va_arg(clean_list, void**); } va_end(clean_list); + va_end(args); return CRYPT_MEM; } ++np; cur = va_arg(args, void**); } va_end(args); - return CRYPT_OK; + return CRYPT_OK; } void ltc_deinit_multi(void *a, ...) @@ -54,8 +53,25 @@ va_end(args); } +void ltc_cleanup_multi(void **a, ...) +{ + void **cur = a; + va_list args; + + va_start(args, a); + while (cur != NULL) { + if (*cur != NULL) { + mp_clear(*cur); + *cur = NULL; + } + cur = va_arg(args, void**); + } + va_end(args); + return; +} + #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/math/radix_to_bin.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/math/radix_to_bin.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,62 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file radix_to_bin.c + Convert data from a specific radix to binary. + Steffen Jaeckel +*/ + +/** + Convert data from a specific radix to binary + + The default MPI descriptors #ltm_desc, #tfm_desc and #gmp_desc + have the following restrictions on parameters: + + \p in - NUL-terminated char buffer + + \p radix - 2..64 + + @param in The input + @param radix The radix of the input + @param out The output buffer + @param len [in/out] The length of the output buffer + + @return CRYPT_OK on success. +*/ +int radix_to_bin(const void *in, int radix, void *out, unsigned long *len) +{ + unsigned long l; + void* mpi; + int err; + + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(len != NULL); + + if ((err = mp_init(&mpi)) != CRYPT_OK) return err; + if ((err = mp_read_radix(mpi, in, radix)) != CRYPT_OK) goto LBL_ERR; + + if ((l = mp_unsigned_bin_size(mpi)) > *len) { + *len = l; + err = CRYPT_BUFFER_OVERFLOW; + goto LBL_ERR; + } + *len = l; + + if ((err = mp_to_unsigned_bin(mpi, out)) != CRYPT_OK) goto LBL_ERR; + +LBL_ERR: + mp_clear(mpi); + return err; +} + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/math/rand_bn.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/math/rand_bn.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,75 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +#ifdef LTC_MDSA +/** + Generate a random number N with given bitlength (note: MSB can be 0) +*/ + +int rand_bn_bits(void *N, int bits, prng_state *prng, int wprng) +{ + int res, bytes; + unsigned char *buf, mask; + + LTC_ARGCHK(N != NULL); + LTC_ARGCHK(bits > 1); + + /* check PRNG */ + if ((res = prng_is_valid(wprng)) != CRYPT_OK) return res; + + bytes = (bits+7) >> 3; + mask = 0xff << (8 - bits % 8); + + /* allocate buffer */ + if ((buf = XCALLOC(1, bytes)) == NULL) return CRYPT_MEM; + + /* generate random bytes */ + if (prng_descriptor[wprng].read(buf, bytes, prng) != (unsigned long)bytes) { + res = CRYPT_ERROR_READPRNG; + goto cleanup; + } + /* mask bits */ + buf[0] &= ~mask; + /* load value */ + if ((res = mp_read_unsigned_bin(N, buf, bytes)) != CRYPT_OK) goto cleanup; + + res = CRYPT_OK; + +cleanup: +#ifdef LTC_CLEAN_STACK + zeromem(buf, bytes); +#endif + XFREE(buf); + return res; +} + +/** + Generate a random number N in a range: 1 <= N < limit +*/ +int rand_bn_upto(void *N, void *limit, prng_state *prng, int wprng) +{ + int res, bits; + + LTC_ARGCHK(N != NULL); + LTC_ARGCHK(limit != NULL); + + bits = mp_count_bits(limit); + do { + res = rand_bn_bits(N, bits, prng, wprng); + if (res != CRYPT_OK) return res; + } while (mp_cmp_d(N, 0) != LTC_MP_GT || mp_cmp(N, limit) != LTC_MP_LT); + + return CRYPT_OK; +} +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/math/rand_prime.c --- a/libtomcrypt/src/math/rand_prime.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/math/rand_prime.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,15 +5,15 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" +#if defined(LTC_MRSA) || (!defined(LTC_NO_MATH) && !defined(LTC_NO_PRNGS)) + /** @file rand_prime.c Generate a random prime, Tom St Denis -*/ +*/ #define USE_BBS 1 @@ -33,13 +33,13 @@ } /* allow sizes between 2 and 512 bytes for a prime size */ - if (len < 2 || len > 512) { + if (len < 2 || len > 512) { return CRYPT_INVALID_PRIME_SIZE; } - + /* valid PRNG? Better be! */ if ((err = prng_is_valid(wprng)) != CRYPT_OK) { - return err; + return err; } /* allocate buffer to work with */ @@ -58,7 +58,7 @@ /* munge bits */ buf[0] |= 0x80 | 0x40; buf[len-1] |= 0x01 | ((type & USE_BBS) ? 0x02 : 0x00); - + /* load value */ if ((err = mp_read_unsigned_bin(N, buf, len)) != CRYPT_OK) { XFREE(buf); @@ -66,7 +66,7 @@ } /* test */ - if ((err = mp_prime_is_prime(N, 8, &res)) != CRYPT_OK) { + if ((err = mp_prime_is_prime(N, LTC_MILLER_RABIN_REPS, &res)) != CRYPT_OK) { XFREE(buf); return err; } @@ -79,9 +79,10 @@ XFREE(buf); return CRYPT_OK; } - + +#endif /* LTC_NO_MATH */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/math/tfm_desc.c --- a/libtomcrypt/src/math/tfm_desc.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/math/tfm_desc.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #define DESC_DEF_ONLY @@ -25,7 +23,7 @@ }; /** - Convert a tfm error to a LTC error (Possibly the most powerful function ever! Oh wait... no) + Convert a tfm error to a LTC error (Possibly the most powerful function ever! Oh wait... no) @param err The error to convert @return The equivalent LTC error code or CRYPT_ERROR if none found */ @@ -34,7 +32,7 @@ int x; for (x = 0; x < (int)(sizeof(tfm_to_ltc_codes)/sizeof(tfm_to_ltc_codes[0])); x++) { - if (err == tfm_to_ltc_codes[x].tfm_code) { + if (err == tfm_to_ltc_codes[x].tfm_code) { return tfm_to_ltc_codes[x].ltc_code; } } @@ -84,7 +82,7 @@ } /* ---- trivial ---- */ -static int set_int(void *a, unsigned long b) +static int set_int(void *a, ltc_mp_digit b) { LTC_ARGCHK(a != NULL); fp_set(a, b); @@ -99,7 +97,7 @@ return A->used > 0 ? A->dp[0] : 0; } -static unsigned long get_digit(void *a, int n) +static ltc_mp_digit get_digit(void *a, int n) { fp_int *A; LTC_ARGCHK(a != NULL); @@ -114,7 +112,7 @@ A = a; return A->used; } - + static int compare(void *a, void *b) { int ret; @@ -129,7 +127,7 @@ return 0; } -static int compare_d(void *a, unsigned long b) +static int compare_d(void *a, ltc_mp_digit b) { int ret; LTC_ARGCHK(a != NULL); @@ -213,8 +211,8 @@ fp_add(a, b, c); return CRYPT_OK; } - -static int addi(void *a, unsigned long b, void *c) + +static int addi(void *a, ltc_mp_digit b, void *c) { LTC_ARGCHK(a != NULL); LTC_ARGCHK(c != NULL); @@ -232,7 +230,7 @@ return CRYPT_OK; } -static int subi(void *a, unsigned long b, void *c) +static int subi(void *a, ltc_mp_digit b, void *c) { LTC_ARGCHK(a != NULL); LTC_ARGCHK(c != NULL); @@ -246,11 +244,11 @@ LTC_ARGCHK(a != NULL); LTC_ARGCHK(b != NULL); LTC_ARGCHK(c != NULL); - fp_mul(a, b, c); + fp_mul(a, b, c); return CRYPT_OK; } -static int muli(void *a, unsigned long b, void *c) +static int muli(void *a, ltc_mp_digit b, void *c) { LTC_ARGCHK(a != NULL); LTC_ARGCHK(c != NULL); @@ -284,7 +282,7 @@ } /* modi */ -static int modi(void *a, unsigned long b, unsigned long *c) +static int modi(void *a, ltc_mp_digit b, ltc_mp_digit *c) { fp_digit tmp; int err; @@ -297,7 +295,7 @@ } *c = tmp; return CRYPT_OK; -} +} /* gcd */ static int gcd(void *a, void *b, void *c) @@ -319,6 +317,24 @@ return CRYPT_OK; } +static int addmod(void *a, void *b, void *c, void *d) +{ + LTC_ARGCHK(a != NULL); + LTC_ARGCHK(b != NULL); + LTC_ARGCHK(c != NULL); + LTC_ARGCHK(d != NULL); + return tfm_to_ltc_error(fp_addmod(a,b,c,d)); +} + +static int submod(void *a, void *b, void *c, void *d) +{ + LTC_ARGCHK(a != NULL); + LTC_ARGCHK(b != NULL); + LTC_ARGCHK(c != NULL); + LTC_ARGCHK(d != NULL); + return tfm_to_ltc_error(fp_submod(a,b,c,d)); +} + static int mulmod(void *a, void *b, void *c, void *d) { LTC_ARGCHK(a != NULL); @@ -393,13 +409,16 @@ LTC_ARGCHK(c != NULL); LTC_ARGCHK(d != NULL); return tfm_to_ltc_error(fp_exptmod(a,b,c,d)); -} +} -static int isprime(void *a, int *b) +static int isprime(void *a, int b, int *c) { LTC_ARGCHK(a != NULL); - LTC_ARGCHK(b != NULL); - *b = (fp_isprime(a) == FP_YES) ? LTC_MP_YES : LTC_MP_NO; + LTC_ARGCHK(c != NULL); + if (b == 0) { + b = LTC_MILLER_RABIN_REPS; + } /* if */ + *c = (fp_isprime_ex(a, b) == FP_YES) ? LTC_MP_YES : LTC_MP_NO; return CRYPT_OK; } @@ -437,7 +456,7 @@ if (fp_cmp(R->z, modulus) != FP_LT) { fp_sub(R->z, modulus, R->z); } - + /* &t2 = X - T1 */ fp_sub(R->x, &t1, &t2); if (fp_cmp_d(&t2, 0) == FP_LT) { @@ -496,7 +515,7 @@ fp_add(R->x, modulus, R->x); } - /* Y = Y - X */ + /* Y = Y - X */ fp_sub(R->y, R->x, R->y); if (fp_cmp_d(R->y, 0) == FP_LT) { fp_add(R->y, modulus, R->y); @@ -509,7 +528,7 @@ if (fp_cmp_d(R->y, 0) == FP_LT) { fp_add(R->y, modulus, R->y); } - + return CRYPT_OK; } @@ -519,14 +538,14 @@ @param Q The point to add @param R [out] The destination of the double @param modulus The modulus of the field the ECC curve is in - @param mp The "b" value from montgomery_setup() + @param Mp The "b" value from montgomery_setup() @return CRYPT_OK on success */ static int tfm_ecc_projective_add_point(ecc_point *P, ecc_point *Q, ecc_point *R, void *modulus, void *Mp) { fp_int t1, t2, x, y, z; - fp_digit mp; - + fp_digit mp; + LTC_ARGCHK(P != NULL); LTC_ARGCHK(Q != NULL); LTC_ARGCHK(R != NULL); @@ -543,7 +562,7 @@ /* should we dbl instead? */ fp_sub(modulus, Q->y, &t1); - if ( (fp_cmp(P->x, Q->x) == FP_EQ) && + if ( (fp_cmp(P->x, Q->x) == FP_EQ) && (Q->z != NULL && fp_cmp(P->z, Q->z) == FP_EQ) && (fp_cmp(P->y, Q->y) == FP_EQ || fp_cmp(P->y, &t1) == FP_EQ)) { return tfm_ecc_projective_dbl_point(P, R, modulus, Mp); @@ -636,7 +655,7 @@ /* T1 = T1 * X */ fp_mul(&t1, &x, &t1); fp_montgomery_reduce(&t1, modulus, mp); - + /* X = Y*Y */ fp_sqr(&y, &x); fp_montgomery_reduce(&x, modulus, mp); @@ -650,7 +669,7 @@ fp_sub(&t2, &x, &t2); if (fp_cmp_d(&t2, 0) == FP_LT) { fp_add(&t2, modulus, &t2); - } + } /* T2 = T2 - X */ fp_sub(&t2, &x, &t2); if (fp_cmp_d(&t2, 0) == FP_LT) { @@ -673,13 +692,20 @@ fp_copy(&x, R->x); fp_copy(&y, R->y); fp_copy(&z, R->z); - + return CRYPT_OK; } #endif +static int set_rand(void *a, int size) +{ + LTC_ARGCHK(a != NULL); + fp_rand(a, size); + return CRYPT_OK; +} + const ltc_math_descriptor tfm_desc = { "TomsFastMath", @@ -764,14 +790,18 @@ &rsa_make_key, &rsa_exptmod, #else - NULL, NULL + NULL, NULL, #endif - + &addmod, + &submod, + + set_rand, + }; #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/adler32.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/misc/adler32.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,131 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file adler32.c + Adler-32 checksum algorithm + Written and placed in the public domain by Wei Dai + Adapted for libtomcrypt by Steffen Jaeckel +*/ +#ifdef LTC_ADLER32 + +static const unsigned long _adler32_base = 65521; + +void adler32_init(adler32_state *ctx) +{ + LTC_ARGCHKVD(ctx != NULL); + ctx->s[0] = 1; + ctx->s[1] = 0; +} + +void adler32_update(adler32_state *ctx, const unsigned char *input, unsigned long length) +{ + unsigned long s1, s2; + + LTC_ARGCHKVD(ctx != NULL); + LTC_ARGCHKVD(input != NULL); + s1 = ctx->s[0]; + s2 = ctx->s[1]; + + if (length % 8 != 0) { + do { + s1 += *input++; + s2 += s1; + length--; + } while (length % 8 != 0); + + if (s1 >= _adler32_base) + s1 -= _adler32_base; + s2 %= _adler32_base; + } + + while (length > 0) { + s1 += input[0]; + s2 += s1; + s1 += input[1]; + s2 += s1; + s1 += input[2]; + s2 += s1; + s1 += input[3]; + s2 += s1; + s1 += input[4]; + s2 += s1; + s1 += input[5]; + s2 += s1; + s1 += input[6]; + s2 += s1; + s1 += input[7]; + s2 += s1; + + length -= 8; + input += 8; + + if (s1 >= _adler32_base) + s1 -= _adler32_base; + s2 %= _adler32_base; + } + + LTC_ARGCHKVD(s1 < _adler32_base); + LTC_ARGCHKVD(s2 < _adler32_base); + + ctx->s[0] = (unsigned short)s1; + ctx->s[1] = (unsigned short)s2; +} + +void adler32_finish(adler32_state *ctx, void *hash, unsigned long size) +{ + unsigned char* h; + + LTC_ARGCHKVD(ctx != NULL); + LTC_ARGCHKVD(hash != NULL); + + h = hash; + + switch (size) { + default: + h[3] = ctx->s[0] & 0x0ff; + /* FALLTHROUGH */ + case 3: + h[2] = (ctx->s[0] >> 8) & 0x0ff; + /* FALLTHROUGH */ + case 2: + h[1] = ctx->s[1] & 0x0ff; + /* FALLTHROUGH */ + case 1: + h[0] = (ctx->s[1] >> 8) & 0x0ff; + /* FALLTHROUGH */ + case 0: + ; + } +} + +int adler32_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + const void* in = "libtomcrypt"; + const unsigned char adler32[] = { 0x1b, 0xe8, 0x04, 0xba }; + unsigned char out[4]; + adler32_state ctx; + adler32_init(&ctx); + adler32_update(&ctx, in, strlen(in)); + adler32_finish(&ctx, out, 4); + if (compare_testvector(adler32, 4, out, 4, "adler32", 0)) { + return CRYPT_FAIL_TESTVECTOR; + } + return CRYPT_OK; +#endif +} +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/base64/base64_decode.c --- a/libtomcrypt/src/misc/base64/base64_decode.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/base64/base64_decode.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,20 +5,20 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file base64_decode.c Compliant base64 code donated by Wayne Scott (wscott@bitmover.com) + base64 URL Safe variant (RFC 4648 section 5) by Karel Miko */ -#ifdef LTC_BASE64 +#if defined(LTC_BASE64) || defined (LTC_BASE64_URL) -static const unsigned char map[256] = { +#if defined(LTC_BASE64) +static const unsigned char map_base64[256] = { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, @@ -41,17 +41,43 @@ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }; +#endif /* LTC_BASE64 */ -/** - base64 decode a block of memory - @param in The base64 data to decode - @param inlen The length of the base64 data - @param out [out] The destination of the binary decoded data - @param outlen [in/out] The max size and resulting size of the decoded data - @return CRYPT_OK if successful -*/ -int base64_decode(const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen) +static const unsigned char map_base64url[] = { +#if defined(LTC_BASE64_URL) +255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, +255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, +255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, +255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 255, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, +255, 254, 255, 255, 255, 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, 255, 255, 255, 255, 63, +255, 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, 255, 255, 255, 255, 255, 255, 255, 255, 255, +255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, +255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, +255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, +255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, +255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, +255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, +255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, +255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, +255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, +255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, +255, 255, 255, 255 +#endif /* LTC_BASE64_URL */ +}; + +enum { + relaxed = 0, + strict = 1 +}; + +static int _base64_decode_internal(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen, + const unsigned char *map, int is_strict) { unsigned long t, x, y, z; unsigned char c; @@ -61,44 +87,110 @@ LTC_ARGCHK(out != NULL); LTC_ARGCHK(outlen != NULL); - g = 3; + g = 0; /* '=' counter */ for (x = y = z = t = 0; x < inlen; x++) { c = map[in[x]&0xFF]; - if (c == 255) continue; - /* the final = symbols are read and used to trim the remaining bytes */ - if (c == 254) { - c = 0; - /* prevent g < 0 which would potentially allow an overflow later */ - if (--g < 0) { + if (c == 254) { + g++; + continue; + } + else if (is_strict && g > 0) { + /* we only allow '=' to be at the end */ + return CRYPT_INVALID_PACKET; + } + if (c == 255) { + if (is_strict) return CRYPT_INVALID_PACKET; - } - } else if (g != 3) { - /* we only allow = to be at the end */ - return CRYPT_INVALID_PACKET; + else + continue; } t = (t<<6)|c; if (++y == 4) { - if (z + g > *outlen) { - return CRYPT_BUFFER_OVERFLOW; - } + if (z + 3 > *outlen) return CRYPT_BUFFER_OVERFLOW; out[z++] = (unsigned char)((t>>16)&255); - if (g > 1) out[z++] = (unsigned char)((t>>8)&255); - if (g > 2) out[z++] = (unsigned char)(t&255); + out[z++] = (unsigned char)((t>>8)&255); + out[z++] = (unsigned char)(t&255); y = t = 0; } } + if (y != 0) { - return CRYPT_INVALID_PACKET; + if (y == 1) return CRYPT_INVALID_PACKET; + if ((y + g) != 4 && is_strict && map != map_base64url) return CRYPT_INVALID_PACKET; + t = t << (6 * (4 - y)); + if (z + y - 1 > *outlen) return CRYPT_BUFFER_OVERFLOW; + if (y >= 2) out[z++] = (unsigned char) ((t >> 16) & 255); + if (y == 3) out[z++] = (unsigned char) ((t >> 8) & 255); } *outlen = z; return CRYPT_OK; } +#if defined(LTC_BASE64) +/** + Relaxed base64 decode a block of memory + @param in The base64 data to decode + @param inlen The length of the base64 data + @param out [out] The destination of the binary decoded data + @param outlen [in/out] The max size and resulting size of the decoded data + @return CRYPT_OK if successful +*/ +int base64_decode(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen) +{ + return _base64_decode_internal(in, inlen, out, outlen, map_base64, relaxed); +} + +/** + Strict base64 decode a block of memory + @param in The base64 data to decode + @param inlen The length of the base64 data + @param out [out] The destination of the binary decoded data + @param outlen [in/out] The max size and resulting size of the decoded data + @return CRYPT_OK if successful +*/ +int base64_strict_decode(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen) +{ + return _base64_decode_internal(in, inlen, out, outlen, map_base64, strict); +} +#endif /* LTC_BASE64 */ + +#if defined(LTC_BASE64_URL) +/** + Relaxed base64 (URL Safe, RFC 4648 section 5) decode a block of memory + @param in The base64 data to decode + @param inlen The length of the base64 data + @param out [out] The destination of the binary decoded data + @param outlen [in/out] The max size and resulting size of the decoded data + @return CRYPT_OK if successful +*/ +int base64url_decode(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen) +{ + return _base64_decode_internal(in, inlen, out, outlen, map_base64url, relaxed); +} + +/** + Strict base64 (URL Safe, RFC 4648 section 5) decode a block of memory + @param in The base64 data to decode + @param inlen The length of the base64 data + @param out [out] The destination of the binary decoded data + @param outlen [in/out] The max size and resulting size of the decoded data + @return CRYPT_OK if successful +*/ +int base64url_strict_decode(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen) +{ + return _base64_decode_internal(in, inlen, out, outlen, map_base64url, strict); +} +#endif /* LTC_BASE64_URL */ + #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/base64/base64_encode.c --- a/libtomcrypt/src/misc/base64/base64_encode.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/base64/base64_encode.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,32 +5,31 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file base64_encode.c Compliant base64 encoder donated by Wayne Scott (wscott@bitmover.com) + base64 URL Safe variant (RFC 4648 section 5) by Karel Miko */ -#ifdef LTC_BASE64 +#if defined(LTC_BASE64) || defined (LTC_BASE64_URL) -static const char *codes = +#if defined(LTC_BASE64) +static const char * const codes_base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +#endif /* LTC_BASE64 */ -/** - base64 Encode a buffer (NUL terminated) - @param in The input buffer to encode - @param inlen The length of the input buffer - @param out [out] The destination of the base64 encoded data - @param outlen [in/out] The max size and resulting size - @return CRYPT_OK if successful -*/ -int base64_encode(const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen) +#if defined(LTC_BASE64_URL) +static const char * const codes_base64url = +"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; +#endif /* LTC_BASE64_URL */ + +static int _base64_encode_internal(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen, + const char *codes, int pad) { unsigned long i, len2, leven; unsigned char *p; @@ -61,21 +60,65 @@ *p++ = codes[(a >> 2) & 0x3F]; *p++ = codes[(((a & 3) << 4) + (b >> 4)) & 0x3F]; - *p++ = (i+1 < inlen) ? codes[(((b & 0xf) << 2)) & 0x3F] : '='; - *p++ = '='; + if (pad) { + *p++ = (i+1 < inlen) ? codes[(((b & 0xf) << 2)) & 0x3F] : '='; + *p++ = '='; + } + else { + if (i+1 < inlen) *p++ = codes[(((b & 0xf) << 2)) & 0x3F]; + } } /* append a NULL byte */ *p = '\0'; /* return ok */ - *outlen = p - out; + *outlen = (unsigned long)(p - out); return CRYPT_OK; } +#if defined(LTC_BASE64) +/** + base64 Encode a buffer (NUL terminated) + @param in The input buffer to encode + @param inlen The length of the input buffer + @param out [out] The destination of the base64 encoded data + @param outlen [in/out] The max size and resulting size + @return CRYPT_OK if successful +*/ +int base64_encode(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen) +{ + return _base64_encode_internal(in, inlen, out, outlen, codes_base64, 1); +} +#endif /* LTC_BASE64 */ + + +#if defined(LTC_BASE64_URL) +/** + base64 (URL Safe, RFC 4648 section 5) Encode a buffer (NUL terminated) + @param in The input buffer to encode + @param inlen The length of the input buffer + @param out [out] The destination of the base64 encoded data + @param outlen [in/out] The max size and resulting size + @return CRYPT_OK if successful +*/ +int base64url_encode(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen) +{ + return _base64_encode_internal(in, inlen, out, outlen, codes_base64url, 0); +} + +int base64url_strict_encode(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen) +{ + return _base64_encode_internal(in, inlen, out, outlen, codes_base64url, 1); +} +#endif /* LTC_BASE64_URL */ + #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/burn_stack.c --- a/libtomcrypt/src/misc/burn_stack.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/burn_stack.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -29,6 +27,6 @@ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/compare_testvector.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/misc/compare_testvector.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,87 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +/** + @file compare_testvector.c + Function to compare two testvectors and print a (detailed) error-message if required, Steffen Jaeckel +*/ + +#if defined(LTC_TEST) && defined(LTC_TEST_DBG) +static void _print_hex(const char* what, const void* v, const unsigned long l) +{ + const unsigned char* p = v; + unsigned long x, y = 0, z; + fprintf(stderr, "%s contents: \n", what); + for (x = 0; x < l; ) { + fprintf(stderr, "%02X ", p[x]); + if (!(++x % 16) || x == l) { + if((x % 16) != 0) { + z = 16 - (x % 16); + if(z >= 8) + fprintf(stderr, " "); + for (; z != 0; --z) { + fprintf(stderr, " "); + } + } + fprintf(stderr, " | "); + for(; y < x; y++) { + if((y % 8) == 0) + fprintf(stderr, " "); + if(isgraph(p[y])) + fprintf(stderr, "%c", p[y]); + else + fprintf(stderr, "."); + } + fprintf(stderr, "\n"); + } + else if((x % 8) == 0) { + fprintf(stderr, " "); + } + } +} +#endif + +/** + Compare two test-vectors + + @param is The data as it is + @param is_len The length of is + @param should The data as it should + @param should_len The length of should + @param what The type of the data + @param which The iteration count + @return 0 on equality, -1 or 1 on difference +*/ +int compare_testvector(const void* is, const unsigned long is_len, const void* should, const unsigned long should_len, const char* what, int which) +{ + int res = 0; + if(is_len != should_len) + res = is_len > should_len ? -1 : 1; + else + res = XMEMCMP(is, should, is_len); + +#if defined(LTC_TEST) && defined(LTC_TEST_DBG) + if (res != 0) { + fprintf(stderr, "Testvector #%i of %s failed:\n", which, what); + _print_hex("SHOULD", should, should_len); + _print_hex("IS ", is, is_len); + } +#else + LTC_UNUSED_PARAM(which); + LTC_UNUSED_PARAM(what); +#endif + + return res; +} + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crc32.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/misc/crc32.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,202 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file crc32.c + CRC-32 checksum algorithm + Written and placed in the public domain by Wei Dai + Adapted for libtomcrypt by Steffen Jaeckel +*/ +#ifdef LTC_CRC32 + +static const ulong32 _CRC32_NEGL = 0xffffffffUL; + +#if defined(ENDIAN_LITTLE) +#define CRC32_INDEX(c) (c & 0xff) +#define CRC32_SHIFTED(c) (c >> 8) +#elif defined(ENDIAN_BIG) +#define CRC32_INDEX(c) (c >> 24) +#define CRC32_SHIFTED(c) (c << 8) +#else +#error The existing CRC32 implementation only works properly when the endianness of the target platform is known. +#endif + +/* Table of CRC-32's of all single byte values (made by makecrc.c) */ +static const ulong32 crc32_m_tab[] = +{ +#if defined(ENDIAN_LITTLE) + 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, + 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, + 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, + 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL, + 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L, + 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L, + 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, + 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL, + 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L, + 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL, + 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, + 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L, + 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L, + 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL, + 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, + 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L, + 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL, + 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L, + 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, + 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L, + 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL, + 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L, + 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L, + 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL, + 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L, + 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L, + 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L, + 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L, + 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L, + 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL, + 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, + 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L, + 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L, + 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL, + 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL, + 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L, + 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL, + 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L, + 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, + 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L, + 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL, + 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L, + 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, + 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL, + 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L, + 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L, + 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, + 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L, + 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L, + 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L, + 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, + 0x2d02ef8dL +#else + 0x00000000L, 0x96300777L, 0x2c610eeeL, 0xba510999L, 0x19c46d07L, + 0x8ff46a70L, 0x35a563e9L, 0xa395649eL, 0x3288db0eL, 0xa4b8dc79L, + 0x1ee9d5e0L, 0x88d9d297L, 0x2b4cb609L, 0xbd7cb17eL, 0x072db8e7L, + 0x911dbf90L, 0x6410b71dL, 0xf220b06aL, 0x4871b9f3L, 0xde41be84L, + 0x7dd4da1aL, 0xebe4dd6dL, 0x51b5d4f4L, 0xc785d383L, 0x56986c13L, + 0xc0a86b64L, 0x7af962fdL, 0xecc9658aL, 0x4f5c0114L, 0xd96c0663L, + 0x633d0ffaL, 0xf50d088dL, 0xc8206e3bL, 0x5e10694cL, 0xe44160d5L, + 0x727167a2L, 0xd1e4033cL, 0x47d4044bL, 0xfd850dd2L, 0x6bb50aa5L, + 0xfaa8b535L, 0x6c98b242L, 0xd6c9bbdbL, 0x40f9bcacL, 0xe36cd832L, + 0x755cdf45L, 0xcf0dd6dcL, 0x593dd1abL, 0xac30d926L, 0x3a00de51L, + 0x8051d7c8L, 0x1661d0bfL, 0xb5f4b421L, 0x23c4b356L, 0x9995bacfL, + 0x0fa5bdb8L, 0x9eb80228L, 0x0888055fL, 0xb2d90cc6L, 0x24e90bb1L, + 0x877c6f2fL, 0x114c6858L, 0xab1d61c1L, 0x3d2d66b6L, 0x9041dc76L, + 0x0671db01L, 0xbc20d298L, 0x2a10d5efL, 0x8985b171L, 0x1fb5b606L, + 0xa5e4bf9fL, 0x33d4b8e8L, 0xa2c90778L, 0x34f9000fL, 0x8ea80996L, + 0x18980ee1L, 0xbb0d6a7fL, 0x2d3d6d08L, 0x976c6491L, 0x015c63e6L, + 0xf4516b6bL, 0x62616c1cL, 0xd8306585L, 0x4e0062f2L, 0xed95066cL, + 0x7ba5011bL, 0xc1f40882L, 0x57c40ff5L, 0xc6d9b065L, 0x50e9b712L, + 0xeab8be8bL, 0x7c88b9fcL, 0xdf1ddd62L, 0x492dda15L, 0xf37cd38cL, + 0x654cd4fbL, 0x5861b24dL, 0xce51b53aL, 0x7400bca3L, 0xe230bbd4L, + 0x41a5df4aL, 0xd795d83dL, 0x6dc4d1a4L, 0xfbf4d6d3L, 0x6ae96943L, + 0xfcd96e34L, 0x468867adL, 0xd0b860daL, 0x732d0444L, 0xe51d0333L, + 0x5f4c0aaaL, 0xc97c0dddL, 0x3c710550L, 0xaa410227L, 0x10100bbeL, + 0x86200cc9L, 0x25b56857L, 0xb3856f20L, 0x09d466b9L, 0x9fe461ceL, + 0x0ef9de5eL, 0x98c9d929L, 0x2298d0b0L, 0xb4a8d7c7L, 0x173db359L, + 0x810db42eL, 0x3b5cbdb7L, 0xad6cbac0L, 0x2083b8edL, 0xb6b3bf9aL, + 0x0ce2b603L, 0x9ad2b174L, 0x3947d5eaL, 0xaf77d29dL, 0x1526db04L, + 0x8316dc73L, 0x120b63e3L, 0x843b6494L, 0x3e6a6d0dL, 0xa85a6a7aL, + 0x0bcf0ee4L, 0x9dff0993L, 0x27ae000aL, 0xb19e077dL, 0x44930ff0L, + 0xd2a30887L, 0x68f2011eL, 0xfec20669L, 0x5d5762f7L, 0xcb676580L, + 0x71366c19L, 0xe7066b6eL, 0x761bd4feL, 0xe02bd389L, 0x5a7ada10L, + 0xcc4add67L, 0x6fdfb9f9L, 0xf9efbe8eL, 0x43beb717L, 0xd58eb060L, + 0xe8a3d6d6L, 0x7e93d1a1L, 0xc4c2d838L, 0x52f2df4fL, 0xf167bbd1L, + 0x6757bca6L, 0xdd06b53fL, 0x4b36b248L, 0xda2b0dd8L, 0x4c1b0aafL, + 0xf64a0336L, 0x607a0441L, 0xc3ef60dfL, 0x55df67a8L, 0xef8e6e31L, + 0x79be6946L, 0x8cb361cbL, 0x1a8366bcL, 0xa0d26f25L, 0x36e26852L, + 0x95770cccL, 0x03470bbbL, 0xb9160222L, 0x2f260555L, 0xbe3bbac5L, + 0x280bbdb2L, 0x925ab42bL, 0x046ab35cL, 0xa7ffd7c2L, 0x31cfd0b5L, + 0x8b9ed92cL, 0x1daede5bL, 0xb0c2649bL, 0x26f263ecL, 0x9ca36a75L, + 0x0a936d02L, 0xa906099cL, 0x3f360eebL, 0x85670772L, 0x13570005L, + 0x824abf95L, 0x147ab8e2L, 0xae2bb17bL, 0x381bb60cL, 0x9b8ed292L, + 0x0dbed5e5L, 0xb7efdc7cL, 0x21dfdb0bL, 0xd4d2d386L, 0x42e2d4f1L, + 0xf8b3dd68L, 0x6e83da1fL, 0xcd16be81L, 0x5b26b9f6L, 0xe177b06fL, + 0x7747b718L, 0xe65a0888L, 0x706a0fffL, 0xca3b0666L, 0x5c0b0111L, + 0xff9e658fL, 0x69ae62f8L, 0xd3ff6b61L, 0x45cf6c16L, 0x78e20aa0L, + 0xeed20dd7L, 0x5483044eL, 0xc2b30339L, 0x612667a7L, 0xf71660d0L, + 0x4d476949L, 0xdb776e3eL, 0x4a6ad1aeL, 0xdc5ad6d9L, 0x660bdf40L, + 0xf03bd837L, 0x53aebca9L, 0xc59ebbdeL, 0x7fcfb247L, 0xe9ffb530L, + 0x1cf2bdbdL, 0x8ac2bacaL, 0x3093b353L, 0xa6a3b424L, 0x0536d0baL, + 0x9306d7cdL, 0x2957de54L, 0xbf67d923L, 0x2e7a66b3L, 0xb84a61c4L, + 0x021b685dL, 0x942b6f2aL, 0x37be0bb4L, 0xa18e0cc3L, 0x1bdf055aL, + 0x8def022dL +#endif +}; + +void crc32_init(crc32_state *ctx) +{ + LTC_ARGCHKVD(ctx != NULL); + ctx->crc = _CRC32_NEGL; +} + +void crc32_update(crc32_state *ctx, const unsigned char *input, unsigned long length) +{ + ulong32 crc; + LTC_ARGCHKVD(ctx != NULL); + LTC_ARGCHKVD(input != NULL); + crc = ctx->crc; + + while (length--) + crc = crc32_m_tab[CRC32_INDEX(crc) ^ *input++] ^ CRC32_SHIFTED(crc); + + ctx->crc = crc; +} + +void crc32_finish(crc32_state *ctx, void *hash, unsigned long size) +{ + unsigned long i; + unsigned char* h; + ulong32 crc; + LTC_ARGCHKVD(ctx != NULL); + LTC_ARGCHKVD(hash != NULL); + + h = hash; + crc = ctx->crc; + crc ^= _CRC32_NEGL; + + if (size > 4) size = 4; + for (i = 0; i < size; i++) { + h[i] = ((unsigned char*)&(crc))[size-i-1]; + } +} + +int crc32_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + const void* in = "libtomcrypt"; + const unsigned char crc32[] = { 0xb3, 0x73, 0x76, 0xef }; + unsigned char out[4]; + crc32_state ctx; + crc32_init(&ctx); + crc32_update(&ctx, in, strlen(in)); + crc32_finish(&ctx, out, 4); + if (compare_testvector(crc32, 4, out, 4, "CRC32", 0)) { + return CRYPT_FAIL_TESTVECTOR; + } + return CRYPT_OK; +#endif +} +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt.c --- a/libtomcrypt/src/misc/crypt/crypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/crypt/crypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,57 +5,57 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file crypt.c Build strings, Tom St Denis -*/ +*/ +#define NAME_VALUE(s) #s"="NAME(s) +#define NAME(s) #s /* const char *crypt_build_settings = - "LibTomCrypt " SCRYPT " (Tom St Denis, tomstdenis@gmail.com)\n" + "LibTomCrypt " SCRYPT " (www.libtom.net)\n" "LibTomCrypt is public domain software.\n" - "Built on " __DATE__ " at " __TIME__ "\n\n\n" - "Endianess: " +#if defined(INCLUDE_BUILD_DATE) + "Built on " __DATE__ " at " __TIME__ "\n" +#endif + "\n\nEndianness: " #if defined(ENDIAN_NEUTRAL) - "neutral\n" -#elif defined(ENDIAN_LITTLE) + "neutral/" +#endif +#if defined(ENDIAN_LITTLE) "little" +#elif defined(ENDIAN_BIG) + "big" +#endif #if defined(ENDIAN_32BITWORD) " (32-bit words)\n" + #elif defined(ENDIAN_64BITWORD) + " (64-bit words)\n" #else - " (64-bit words)\n" + " (no wordsize defined)\n" #endif -#elif defined(ENDIAN_BIG) - "big" - #if defined(ENDIAN_32BITWORD) - " (32-bit words)\n" - #else - " (64-bit words)\n" - #endif -#endif "Clean stack: " #if defined(LTC_CLEAN_STACK) "enabled\n" #else "disabled\n" #endif - "Ciphers built-in:\n" + "\nCiphers built-in:\n" #if defined(LTC_BLOWFISH) " Blowfish\n" #endif #if defined(LTC_RC2) - " LTC_RC2\n" + " RC2\n" #endif #if defined(LTC_RC5) - " LTC_RC5\n" + " RC5\n" #endif #if defined(LTC_RC6) - " LTC_RC6\n" + " RC6\n" #endif #if defined(LTC_SAFERP) " Safer+\n" @@ -67,7 +67,7 @@ " Rijndael\n" #endif #if defined(LTC_XTEA) - " LTC_XTEA\n" + " XTEA\n" #endif #if defined(LTC_TWOFISH) " Twofish " @@ -90,10 +90,10 @@ #endif #endif #if defined(LTC_DES) - " LTC_DES\n" + " DES\n" #endif #if defined(LTC_CAST5) - " LTC_CAST5\n" + " CAST5\n" #endif #if defined(LTC_NOEKEON) " Noekeon\n" @@ -112,57 +112,88 @@ #endif "\n" #if defined(LTC_KSEED) - " LTC_KSEED\n" + " KSEED\n" #endif #if defined(LTC_KASUMI) " KASUMI\n" #endif +#if defined(LTC_MULTI2) + " MULTI2\n" +#endif +#if defined(LTC_CAMELLIA) + " Camellia\n" +#endif + "Stream ciphers built-in:\n" +#if defined(LTC_CHACHA) + " ChaCha\n" +#endif +#if defined(LTC_RC4_STREAM) + " RC4\n" +#endif +#if defined(LTC_SOBER128_STREAM) + " SOBER128\n" +#endif "\nHashes built-in:\n" +#if defined(LTC_SHA3) + " SHA3\n" +#endif #if defined(LTC_SHA512) - " LTC_SHA-512\n" + " SHA-512\n" #endif #if defined(LTC_SHA384) - " LTC_SHA-384\n" + " SHA-384\n" +#endif +#if defined(LTC_SHA512_256) + " SHA-512/256\n" #endif #if defined(LTC_SHA256) - " LTC_SHA-256\n" + " SHA-256\n" +#endif +#if defined(LTC_SHA512_224) + " SHA-512/224\n" #endif #if defined(LTC_SHA224) - " LTC_SHA-224\n" + " SHA-224\n" #endif #if defined(LTC_TIGER) - " LTC_TIGER\n" + " TIGER\n" #endif #if defined(LTC_SHA1) - " LTC_SHA1\n" + " SHA1\n" #endif #if defined(LTC_MD5) - " LTC_MD5\n" + " MD5\n" #endif #if defined(LTC_MD4) - " LTC_MD4\n" + " MD4\n" #endif #if defined(LTC_MD2) - " LTC_MD2\n" + " MD2\n" #endif #if defined(LTC_RIPEMD128) - " LTC_RIPEMD128\n" + " RIPEMD128\n" #endif #if defined(LTC_RIPEMD160) - " LTC_RIPEMD160\n" + " RIPEMD160\n" #endif #if defined(LTC_RIPEMD256) - " LTC_RIPEMD256\n" + " RIPEMD256\n" #endif #if defined(LTC_RIPEMD320) - " LTC_RIPEMD320\n" + " RIPEMD320\n" #endif #if defined(LTC_WHIRLPOOL) - " LTC_WHIRLPOOL\n" + " WHIRLPOOL\n" +#endif +#if defined(LTC_BLAKE2S) + " BLAKE2S\n" +#endif +#if defined(LTC_BLAKE2B) + " BLAKE2B\n" #endif #if defined(LTC_CHC_HASH) - " LTC_CHC_HASH \n" + " CHC_HASH\n" #endif "\nBlock Chaining Modes:\n" @@ -179,97 +210,151 @@ " CBC\n" #endif #if defined(LTC_CTR_MODE) - " CTR " -#endif -#if defined(LTC_CTR_OLD) - " (CTR_OLD) " + " CTR\n" #endif - "\n" -#if defined(LRW_MODE) - " LRW_MODE" -#if defined(LRW_TABLES) - " (LRW_TABLES) " +#if defined(LTC_LRW_MODE) + " LRW" +#if defined(LTC_LRW_TABLES) + " (tables) " #endif "\n" #endif #if defined(LTC_F8_MODE) - " F8 MODE\n" -#endif + " F8\n" +#endif #if defined(LTC_XTS_MODE) - " LTC_XTS_MODE\n" + " XTS\n" #endif "\nMACs:\n" #if defined(LTC_HMAC) - " LTC_HMAC\n" + " HMAC\n" #endif #if defined(LTC_OMAC) - " LTC_OMAC\n" + " OMAC\n" #endif #if defined(LTC_PMAC) " PMAC\n" #endif #if defined(LTC_PELICAN) - " LTC_PELICAN\n" + " PELICAN\n" #endif #if defined(LTC_XCBC) - " XCBC-MAC\n" + " XCBC\n" #endif #if defined(LTC_F9_MODE) - " F9-MAC\n" + " F9\n" +#endif +#if defined(LTC_POLY1305) + " POLY1305\n" +#endif +#if defined(LTC_BLAKE2SMAC) + " BLAKE2S MAC\n" +#endif +#if defined(LTC_BLAKE2BMAC) + " BLAKE2B MAC\n" #endif "\nENC + AUTH modes:\n" #if defined(LTC_EAX_MODE) - " LTC_EAX_MODE\n" + " EAX\n" #endif #if defined(LTC_OCB_MODE) - " LTC_OCB_MODE\n" + " OCB\n" +#endif +#if defined(LTC_OCB3_MODE) + " OCB3\n" #endif #if defined(LTC_CCM_MODE) - " LTC_CCM_MODE\n" + " CCM\n" #endif #if defined(LTC_GCM_MODE) - " LTC_GCM_MODE " + " GCM" +#if defined(LTC_GCM_TABLES) + " (tables) " #endif -#if defined(LTC_GCM_TABLES) - " (LTC_GCM_TABLES) " +#if defined(LTC_GCM_TABLES_SSE2) + " (SSE2) " #endif "\n" +#endif +#if defined(LTC_CHACHA20POLY1305_MODE) + " CHACHA20POLY1305\n" +#endif "\nPRNG:\n" #if defined(LTC_YARROW) - " Yarrow\n" + " Yarrow ("NAME_VALUE(LTC_YARROW_AES)")\n" #endif #if defined(LTC_SPRNG) - " LTC_SPRNG\n" + " SPRNG\n" #endif #if defined(LTC_RC4) - " LTC_RC4\n" + " RC4\n" +#endif +#if defined(LTC_CHACHA20_PRNG) + " ChaCha20\n" #endif #if defined(LTC_FORTUNA) - " Fortuna\n" + " Fortuna (" NAME_VALUE(LTC_FORTUNA_POOLS) ", " NAME_VALUE(LTC_FORTUNA_WD) ")\n" #endif #if defined(LTC_SOBER128) - " LTC_SOBER128\n" + " SOBER128\n" #endif - "\nPK Algs:\n" + "\nPK Crypto:\n" #if defined(LTC_MRSA) - " RSA \n" + " RSA" +#if defined(LTC_RSA_BLINDING) && defined(LTC_RSA_CRT_HARDENING) + " (with blinding and CRT hardening)" +#elif defined(LTC_RSA_BLINDING) + " (with blinding)" +#elif defined(LTC_RSA_CRT_HARDENING) + " (with CRT hardening)" +#endif + "\n" +#endif +#if defined(LTC_MDH) + " DH\n" #endif #if defined(LTC_MECC) - " ECC\n" + " ECC" +#if defined(LTC_ECC_TIMING_RESISTANT) + " (with blinding)" +#endif + "\n" #endif #if defined(LTC_MDSA) " DSA\n" #endif -#if defined(MKAT) +#if defined(LTC_MKAT) " Katja\n" -#endif +#endif +#if defined(LTC_PK_MAX_RETRIES) + " "NAME_VALUE(LTC_PK_MAX_RETRIES)"\n" +#endif + + "\nMPI (Math):\n" +#if defined(LTC_MPI) + " LTC_MPI\n" +#endif +#if defined(LTM_DESC) + " LTM_DESC\n" +#endif +#if defined(TFM_DESC) + " TFM_DESC\n" +#endif +#if defined(GMP_DESC) + " GMP_DESC\n" +#endif +#if defined(LTC_MILLER_RABIN_REPS) + " "NAME_VALUE(LTC_MILLER_RABIN_REPS)"\n" +#endif "\nCompiler:\n" -#if defined(WIN32) +#if defined(_WIN64) + " WIN64 platform detected.\n" +#elif defined(_WIN32) " WIN32 platform detected.\n" #endif #if defined(__CYGWIN__) @@ -281,37 +366,78 @@ #if defined(_MSC_VER) " MSVC compiler detected.\n" #endif -#if defined(__GNUC__) - " GCC compiler detected.\n" +#if defined(__clang_version__) + " Clang compiler " __clang_version__ ".\n" +#elif defined(INTEL_CC) + " Intel C Compiler " __VERSION__ ".\n" +#elif defined(__GNUC__) /* clang and icc also define __GNUC__ */ + " GCC compiler " __VERSION__ ".\n" #endif -#if defined(INTEL_CC) - " Intel C Compiler detected.\n" -#endif + #if defined(__x86_64__) " x86-64 detected.\n" #endif #if defined(LTC_PPC32) - " LTC_PPC32 defined \n" -#endif + " PPC32 detected.\n" +#endif "\nVarious others: " +#if defined(ARGTYPE) + " " NAME_VALUE(ARGTYPE) " " +#endif +#if defined(LTC_ADLER32) + " ADLER32 " +#endif #if defined(LTC_BASE64) - " LTC_BASE64 " + " BASE64 " +#endif +#if defined(LTC_BASE64_URL) + " BASE64-URL-SAFE " +#endif +#if defined(LTC_CRC32) + " CRC32 " +#endif +#if defined(LTC_DER) + " DER " +#endif +#if defined(LTC_PKCS_1) + " PKCS#1 " +#endif +#if defined(LTC_PKCS_5) + " PKCS#5 " #endif -#if defined(MPI) - " MPI " +#if defined(LTC_HKDF) + " HKDF " +#endif +#if defined(LTC_DEVRANDOM) + " LTC_DEVRANDOM " +#endif +#if defined(LTC_TRY_URANDOM_FIRST) + " LTC_TRY_URANDOM_FIRST " +#endif +#if defined(LTC_RNG_GET_BYTES) + " LTC_RNG_GET_BYTES " #endif -#if defined(TRY_UNRANDOM_FIRST) - " TRY_UNRANDOM_FIRST " +#if defined(LTC_RNG_MAKE_PRNG) + " LTC_RNG_MAKE_PRNG " +#endif +#if defined(LTC_PRNG_ENABLE_LTC_RNG) + " LTC_PRNG_ENABLE_LTC_RNG " +#endif +#if defined(LTC_HASH_HELPERS) + " LTC_HASH_HELPERS " +#endif +#if defined(LTC_VALGRIND) + " LTC_VALGRIND " #endif #if defined(LTC_TEST) " LTC_TEST " #endif -#if defined(LTC_PKCS_1) - " LTC_PKCS#1 " +#if defined(LTC_TEST_DBG) + " " NAME_VALUE(LTC_TEST_DBG) " " #endif -#if defined(LTC_PKCS_5) - " LTC_PKCS#5 " +#if defined(LTC_TEST_EXT) + " LTC_TEST_EXT " #endif #if defined(LTC_SMALL_CODE) " LTC_SMALL_CODE " @@ -319,8 +445,8 @@ #if defined(LTC_NO_FILE) " LTC_NO_FILE " #endif -#if defined(LTC_DER) - " LTC_DER " +#if defined(LTC_FILE_READ_BUFSIZE) + " " NAME_VALUE(LTC_FILE_READ_BUFSIZE) " " #endif #if defined(LTC_FAST) " LTC_FAST " @@ -334,6 +460,12 @@ #if defined(LTC_NO_ASM) " LTC_NO_ASM " #endif +#if defined(LTC_ROx_ASM) + " LTC_ROx_ASM " +#if defined(LTC_NO_ROLC) + " LTC_NO_ROLC " +#endif +#endif #if defined(LTC_NO_TEST) " LTC_NO_TEST " #endif @@ -343,21 +475,12 @@ #if defined(LTC_PTHREAD) " LTC_PTHREAD " #endif -#if defined(LTM_LTC_DESC) - " LTM_DESC " -#endif -#if defined(TFM_LTC_DESC) - " TFM_DESC " +#if defined(LTC_EASY) + " LTC_EASY " #endif #if defined(LTC_MECC_ACCEL) " LTC_MECC_ACCEL " #endif -#if defined(GMP_LTC_DESC) - " GMP_DESC " -#endif -#if defined(LTC_EASY) - " (easy) " -#endif #if defined(LTC_MECC_FP) " LTC_MECC_FP " #endif @@ -365,11 +488,10 @@ " LTC_ECC_SHAMIR " #endif "\n" - "\n\n\n" ; */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_argchk.c --- a/libtomcrypt/src/misc/crypt/crypt_argchk.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/crypt/crypt_argchk.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,19 +5,16 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -#include /** @file crypt_argchk.c Perform argument checking, Tom St Denis -*/ +*/ #if (ARGTYPE == 0) -void crypt_argchk(char *v, char *s, int d) +void crypt_argchk(const char *v, const char *s, int d) { fprintf(stderr, "LTC_ARGCHK '%s' failure on line %d of file %s\n", v, d, s); @@ -25,6 +22,6 @@ } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_cipher_descriptor.c --- a/libtomcrypt/src/misc/crypt/crypt_cipher_descriptor.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/crypt/crypt_cipher_descriptor.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -16,12 +14,12 @@ */ struct ltc_cipher_descriptor cipher_descriptor[TAB_SIZE] = { -{ NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL } +{ NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL } }; LTC_MUTEX_GLOBAL(ltc_cipher_mutex) -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_cipher_is_valid.c --- a/libtomcrypt/src/misc/crypt/crypt_cipher_is_valid.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/crypt/crypt_cipher_is_valid.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -31,6 +29,6 @@ return CRYPT_OK; } -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_constants.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/misc/crypt/crypt_constants.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,297 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file crypt_constants.c + + Make various constants available to dynamic languages + like Python - Larry Bugbee, February 2013 + + LB - Dec 2013 - revised to include compiler define options + LB - Mar 2014 - added endianness and word size +*/ + +typedef struct { + const char *name; + const int value; +} crypt_constant; + +#define _C_STRINGIFY(s) { #s, s } + +static const crypt_constant _crypt_constants[] = { + + _C_STRINGIFY(CRYPT_OK), + _C_STRINGIFY(CRYPT_ERROR), + _C_STRINGIFY(CRYPT_NOP), + _C_STRINGIFY(CRYPT_INVALID_KEYSIZE), + _C_STRINGIFY(CRYPT_INVALID_ROUNDS), + _C_STRINGIFY(CRYPT_FAIL_TESTVECTOR), + _C_STRINGIFY(CRYPT_BUFFER_OVERFLOW), + _C_STRINGIFY(CRYPT_INVALID_PACKET), + _C_STRINGIFY(CRYPT_INVALID_PRNGSIZE), + _C_STRINGIFY(CRYPT_ERROR_READPRNG), + _C_STRINGIFY(CRYPT_INVALID_CIPHER), + _C_STRINGIFY(CRYPT_INVALID_HASH), + _C_STRINGIFY(CRYPT_INVALID_PRNG), + _C_STRINGIFY(CRYPT_MEM), + _C_STRINGIFY(CRYPT_PK_TYPE_MISMATCH), + _C_STRINGIFY(CRYPT_PK_NOT_PRIVATE), + _C_STRINGIFY(CRYPT_INVALID_ARG), + _C_STRINGIFY(CRYPT_FILE_NOTFOUND), + _C_STRINGIFY(CRYPT_PK_INVALID_TYPE), + _C_STRINGIFY(CRYPT_OVERFLOW), + _C_STRINGIFY(CRYPT_UNUSED1), + _C_STRINGIFY(CRYPT_INPUT_TOO_LONG), + _C_STRINGIFY(CRYPT_PK_INVALID_SIZE), + _C_STRINGIFY(CRYPT_INVALID_PRIME_SIZE), + _C_STRINGIFY(CRYPT_PK_INVALID_PADDING), + _C_STRINGIFY(CRYPT_HASH_OVERFLOW), + + _C_STRINGIFY(PK_PUBLIC), + _C_STRINGIFY(PK_PRIVATE), + + _C_STRINGIFY(LTC_ENCRYPT), + _C_STRINGIFY(LTC_DECRYPT), + +#ifdef LTC_PKCS_1 + {"LTC_PKCS_1", 1}, + /* Block types */ + _C_STRINGIFY(LTC_PKCS_1_EMSA), + _C_STRINGIFY(LTC_PKCS_1_EME), + + /* Padding types */ + _C_STRINGIFY(LTC_PKCS_1_V1_5), + _C_STRINGIFY(LTC_PKCS_1_OAEP), + _C_STRINGIFY(LTC_PKCS_1_PSS), + _C_STRINGIFY(LTC_PKCS_1_V1_5_NA1), +#else + {"LTC_PKCS_1", 0}, +#endif + +#ifdef LTC_MRSA + {"LTC_MRSA", 1}, +#else + {"LTC_MRSA", 0}, +#endif + +#ifdef LTC_MKAT + {"LTC_MKAT", 1}, + _C_STRINGIFY(MIN_KAT_SIZE), + _C_STRINGIFY(MAX_KAT_SIZE), +#else + {"LTC_MKAT", 0}, +#endif + +#ifdef LTC_MECC + {"LTC_MECC", 1}, + _C_STRINGIFY(ECC_BUF_SIZE), + _C_STRINGIFY(ECC_MAXSIZE), +#else + {"LTC_MECC", 0}, +#endif + +#ifdef LTC_MDSA + {"LTC_MDSA", 1}, + _C_STRINGIFY(LTC_MDSA_DELTA), + _C_STRINGIFY(LTC_MDSA_MAX_GROUP), +#else + {"LTC_MDSA", 0}, +#endif + +#ifdef LTC_MILLER_RABIN_REPS + _C_STRINGIFY(LTC_MILLER_RABIN_REPS), +#endif + +#ifdef LTC_DER +/* DER handling */ + _C_STRINGIFY(LTC_ASN1_EOL), + _C_STRINGIFY(LTC_ASN1_BOOLEAN), + _C_STRINGIFY(LTC_ASN1_INTEGER), + _C_STRINGIFY(LTC_ASN1_SHORT_INTEGER), + _C_STRINGIFY(LTC_ASN1_BIT_STRING), + _C_STRINGIFY(LTC_ASN1_OCTET_STRING), + _C_STRINGIFY(LTC_ASN1_NULL), + _C_STRINGIFY(LTC_ASN1_OBJECT_IDENTIFIER), + _C_STRINGIFY(LTC_ASN1_IA5_STRING), + _C_STRINGIFY(LTC_ASN1_PRINTABLE_STRING), + _C_STRINGIFY(LTC_ASN1_UTF8_STRING), + _C_STRINGIFY(LTC_ASN1_UTCTIME), + _C_STRINGIFY(LTC_ASN1_CHOICE), + _C_STRINGIFY(LTC_ASN1_SEQUENCE), + _C_STRINGIFY(LTC_ASN1_SET), + _C_STRINGIFY(LTC_ASN1_SETOF), + _C_STRINGIFY(LTC_ASN1_RAW_BIT_STRING), + _C_STRINGIFY(LTC_ASN1_TELETEX_STRING), + _C_STRINGIFY(LTC_ASN1_CONSTRUCTED), + _C_STRINGIFY(LTC_ASN1_CONTEXT_SPECIFIC), + _C_STRINGIFY(LTC_ASN1_GENERALIZEDTIME), +#endif + +#ifdef LTC_CTR_MODE + {"LTC_CTR_MODE", 1}, + _C_STRINGIFY(CTR_COUNTER_LITTLE_ENDIAN), + _C_STRINGIFY(CTR_COUNTER_BIG_ENDIAN), + _C_STRINGIFY(LTC_CTR_RFC3686), +#else + {"LTC_CTR_MODE", 0}, +#endif +#ifdef LTC_GCM_MODE + _C_STRINGIFY(LTC_GCM_MODE_IV), + _C_STRINGIFY(LTC_GCM_MODE_AAD), + _C_STRINGIFY(LTC_GCM_MODE_TEXT), +#endif + + _C_STRINGIFY(LTC_MP_LT), + _C_STRINGIFY(LTC_MP_EQ), + _C_STRINGIFY(LTC_MP_GT), + + _C_STRINGIFY(LTC_MP_NO), + _C_STRINGIFY(LTC_MP_YES), + + _C_STRINGIFY(MAXBLOCKSIZE), + _C_STRINGIFY(TAB_SIZE), + _C_STRINGIFY(ARGTYPE), + +#ifdef LTM_DESC + {"LTM_DESC", 1}, +#else + {"LTM_DESC", 0}, +#endif +#ifdef TFM_DESC + {"TFM_DESC", 1}, +#else + {"TFM_DESC", 0}, +#endif +#ifdef GMP_DESC + {"GMP_DESC", 1}, +#else + {"GMP_DESC", 0}, +#endif + +#ifdef LTC_FAST + {"LTC_FAST", 1}, +#else + {"LTC_FAST", 0}, +#endif + +#ifdef LTC_NO_FILE + {"LTC_NO_FILE", 1}, +#else + {"LTC_NO_FILE", 0}, +#endif + +#ifdef ENDIAN_LITTLE + {"ENDIAN_LITTLE", 1}, +#else + {"ENDIAN_LITTLE", 0}, +#endif + +#ifdef ENDIAN_BIG + {"ENDIAN_BIG", 1}, +#else + {"ENDIAN_BIG", 0}, +#endif + +#ifdef ENDIAN_32BITWORD + {"ENDIAN_32BITWORD", 1}, +#else + {"ENDIAN_32BITWORD", 0}, +#endif + +#ifdef ENDIAN_64BITWORD + {"ENDIAN_64BITWORD", 1}, +#else + {"ENDIAN_64BITWORD", 0}, +#endif + +#ifdef ENDIAN_NEUTRAL + {"ENDIAN_NEUTRAL", 1}, +#else + {"ENDIAN_NEUTRAL", 0}, +#endif +}; + + +/* crypt_get_constant() + * valueout will be the value of the named constant + * return -1 if named item not found + */ +int crypt_get_constant(const char* namein, int *valueout) { + int i; + int _crypt_constants_len = sizeof(_crypt_constants) / sizeof(_crypt_constants[0]); + for (i=0; i<_crypt_constants_len; i++) { + if (XSTRCMP(_crypt_constants[i].name, namein) == 0) { + *valueout = _crypt_constants[i].value; + return 0; + } + } + return 1; +} + +/* crypt_list_all_constants() + * if names_list is NULL, names_list_size will be the minimum + * number of bytes needed to receive the complete names_list + * if names_list is NOT NULL, names_list must be the addr of + * sufficient memory allocated into which the names_list + * is to be written. Also, the value in names_list_size + * sets the upper bound of the number of characters to be + * written. + * a -1 return value signifies insufficient space made available + */ +int crypt_list_all_constants(char *names_list, unsigned int *names_list_size) { + int i; + unsigned int total_len = 0; + char number[32], *ptr; + int number_len; + int count = sizeof(_crypt_constants) / sizeof(_crypt_constants[0]); + + /* calculate amount of memory required for the list */ + for (i=0; i= sizeof(number))) + return -1; + total_len += number_len + 1; + /* this last +1 is for newlines (and ending NULL) */ + } + + if (names_list == NULL) { + *names_list_size = total_len; + } else { + if (total_len > *names_list_size) { + return -1; + } + /* build the names list */ + ptr = names_list; + for (i=0; i= 0 if found, -1 if not present @@ -44,6 +42,6 @@ return z; } -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_find_hash_id.c --- a/libtomcrypt/src/misc/crypt/crypt_find_hash_id.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/crypt/crypt_find_hash_id.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -35,6 +33,6 @@ return -1; } -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_find_hash_oid.c --- a/libtomcrypt/src/misc/crypt/crypt_find_hash_oid.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/crypt/crypt_find_hash_oid.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -30,6 +28,6 @@ return -1; } -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_find_prng.c --- a/libtomcrypt/src/misc/crypt/crypt_find_prng.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/crypt/crypt_find_prng.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -36,6 +34,6 @@ } -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_fsa.c --- a/libtomcrypt/src/misc/crypt/crypt_fsa.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/crypt/crypt_fsa.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" #include @@ -14,12 +12,11 @@ /** @file crypt_fsa.c LibTomCrypt FULL SPEED AHEAD!, Tom St Denis -*/ +*/ /* format is ltc_mp, cipher_desc, [cipher_desc], NULL, hash_desc, [hash_desc], NULL, prng_desc, [prng_desc], NULL */ int crypt_fsa(void *mp, ...) { - int err; va_list args; void *p; @@ -27,33 +24,33 @@ if (mp != NULL) { XMEMCPY(<c_mp, mp, sizeof(ltc_mp)); } - + while ((p = va_arg(args, void*)) != NULL) { - if ((err = register_cipher(p)) != CRYPT_OK) { + if (register_cipher(p) == -1) { va_end(args); - return err; + return CRYPT_INVALID_CIPHER; } } while ((p = va_arg(args, void*)) != NULL) { - if ((err = register_hash(p)) != CRYPT_OK) { + if (register_hash(p) == -1) { va_end(args); - return err; + return CRYPT_INVALID_HASH; } } while ((p = va_arg(args, void*)) != NULL) { - if ((err = register_prng(p)) != CRYPT_OK) { + if (register_prng(p) == -1) { va_end(args); - return err; + return CRYPT_INVALID_PRNG; } } va_end(args); - return CRYPT_OK; + return CRYPT_OK; } -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_hash_descriptor.c --- a/libtomcrypt/src/misc/crypt/crypt_hash_descriptor.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/crypt/crypt_hash_descriptor.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,14 +5,12 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file crypt_hash_descriptor.c - Stores the hash descriptor table, Tom St Denis + Stores the hash descriptor table, Tom St Denis */ struct ltc_hash_descriptor hash_descriptor[TAB_SIZE] = { @@ -22,6 +20,6 @@ LTC_MUTEX_GLOBAL(ltc_hash_mutex) -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_hash_is_valid.c --- a/libtomcrypt/src/misc/crypt/crypt_hash_is_valid.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/crypt/crypt_hash_is_valid.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,15 +5,13 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file crypt_hash_is_valid.c Determine if hash is valid, Tom St Denis -*/ +*/ /* Test if a hash index is valid @@ -31,6 +29,6 @@ return CRYPT_OK; } -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_inits.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/misc/crypt/crypt_inits.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,43 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file crypt_inits.c + + Provide math library functions for dynamic languages + like Python - Larry Bugbee, February 2013 +*/ + + +#ifdef LTM_DESC +void init_LTM(void) +{ + ltc_mp = ltm_desc; +} +#endif + +#ifdef TFM_DESC +void init_TFM(void) +{ + ltc_mp = tfm_desc; +} +#endif + +#ifdef GMP_DESC +void init_GMP(void) +{ + ltc_mp = gmp_desc; +} +#endif + + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_ltc_mp_descriptor.c --- a/libtomcrypt/src/misc/crypt/crypt_ltc_mp_descriptor.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/crypt/crypt_ltc_mp_descriptor.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,9 +5,12 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -ltc_math_descriptor ltc_mp = {0}; +/* Initialize ltc_mp to nulls, to force allocation on all platforms, including macOS. */ +ltc_math_descriptor ltc_mp = { 0 }; + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_prng_descriptor.c --- a/libtomcrypt/src/misc/crypt/crypt_prng_descriptor.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/crypt/crypt_prng_descriptor.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,15 +5,13 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file crypt_prng_descriptor.c Stores the PRNG descriptors, Tom St Denis -*/ +*/ struct ltc_prng_descriptor prng_descriptor[TAB_SIZE] = { { NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL } }; @@ -21,6 +19,6 @@ LTC_MUTEX_GLOBAL(ltc_prng_mutex) -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_prng_is_valid.c --- a/libtomcrypt/src/misc/crypt/crypt_prng_is_valid.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/crypt/crypt_prng_is_valid.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -31,6 +29,6 @@ return CRYPT_OK; } -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_prng_rng_descriptor.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/misc/crypt/crypt_prng_rng_descriptor.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,17 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +#ifdef LTC_PRNG_ENABLE_LTC_RNG +unsigned long (*ltc_rng)(unsigned char *out, unsigned long outlen, void (*callback)(void)); +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_register_all_ciphers.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/misc/crypt/crypt_register_all_ciphers.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,100 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +/** + @file crypt_register_all_ciphers.c + + Steffen Jaeckel +*/ + +#define REGISTER_CIPHER(h) do {\ + LTC_ARGCHK(register_cipher(h) != -1); \ +} while(0) + +int register_all_ciphers(void) +{ +#ifdef LTC_RIJNDAEL +#ifdef ENCRYPT_ONLY + /* alternative would be + * register_cipher(&rijndael_enc_desc); + */ + REGISTER_CIPHER(&aes_enc_desc); +#else + /* alternative would be + * register_cipher(&rijndael_desc); + */ + REGISTER_CIPHER(&aes_desc); +#endif +#endif +#ifdef LTC_BLOWFISH + REGISTER_CIPHER(&blowfish_desc); +#endif +#ifdef LTC_XTEA + REGISTER_CIPHER(&xtea_desc); +#endif +#ifdef LTC_RC5 + REGISTER_CIPHER(&rc5_desc); +#endif +#ifdef LTC_RC6 + REGISTER_CIPHER(&rc6_desc); +#endif +#ifdef LTC_SAFERP + REGISTER_CIPHER(&saferp_desc); +#endif +#ifdef LTC_TWOFISH + REGISTER_CIPHER(&twofish_desc); +#endif +#ifdef LTC_SAFER + REGISTER_CIPHER(&safer_k64_desc); + REGISTER_CIPHER(&safer_sk64_desc); + REGISTER_CIPHER(&safer_k128_desc); + REGISTER_CIPHER(&safer_sk128_desc); +#endif +#ifdef LTC_RC2 + REGISTER_CIPHER(&rc2_desc); +#endif +#ifdef LTC_DES + REGISTER_CIPHER(&des_desc); + REGISTER_CIPHER(&des3_desc); +#endif +#ifdef LTC_CAST5 + REGISTER_CIPHER(&cast5_desc); +#endif +#ifdef LTC_NOEKEON + REGISTER_CIPHER(&noekeon_desc); +#endif +#ifdef LTC_SKIPJACK + REGISTER_CIPHER(&skipjack_desc); +#endif +#ifdef LTC_ANUBIS + REGISTER_CIPHER(&anubis_desc); +#endif +#ifdef LTC_KHAZAD + REGISTER_CIPHER(&khazad_desc); +#endif +#ifdef LTC_KSEED + REGISTER_CIPHER(&kseed_desc); +#endif +#ifdef LTC_KASUMI + REGISTER_CIPHER(&kasumi_desc); +#endif +#ifdef LTC_MULTI2 + REGISTER_CIPHER(&multi2_desc); +#endif +#ifdef LTC_CAMELLIA + REGISTER_CIPHER(&camellia_desc); +#endif + return CRYPT_OK; +} + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_register_all_hashes.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/misc/crypt/crypt_register_all_hashes.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,99 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +/** + @file crypt_register_all_hashes.c + + Steffen Jaeckel +*/ + +#define REGISTER_HASH(h) do {\ + LTC_ARGCHK(register_hash(h) != -1); \ +} while(0) + +int register_all_hashes(void) +{ +#ifdef LTC_TIGER + REGISTER_HASH(&tiger_desc); +#endif +#ifdef LTC_MD2 + REGISTER_HASH(&md2_desc); +#endif +#ifdef LTC_MD4 + REGISTER_HASH(&md4_desc); +#endif +#ifdef LTC_MD5 + REGISTER_HASH(&md5_desc); +#endif +#ifdef LTC_SHA1 + REGISTER_HASH(&sha1_desc); +#endif +#ifdef LTC_SHA224 + REGISTER_HASH(&sha224_desc); +#endif +#ifdef LTC_SHA256 + REGISTER_HASH(&sha256_desc); +#endif +#ifdef LTC_SHA384 + REGISTER_HASH(&sha384_desc); +#endif +#ifdef LTC_SHA512 + REGISTER_HASH(&sha512_desc); +#endif +#ifdef LTC_SHA512_224 + REGISTER_HASH(&sha512_224_desc); +#endif +#ifdef LTC_SHA512_256 + REGISTER_HASH(&sha512_256_desc); +#endif +#ifdef LTC_SHA3 + REGISTER_HASH(&sha3_224_desc); + REGISTER_HASH(&sha3_256_desc); + REGISTER_HASH(&sha3_384_desc); + REGISTER_HASH(&sha3_512_desc); +#endif +#ifdef LTC_RIPEMD128 + REGISTER_HASH(&rmd128_desc); +#endif +#ifdef LTC_RIPEMD160 + REGISTER_HASH(&rmd160_desc); +#endif +#ifdef LTC_RIPEMD256 + REGISTER_HASH(&rmd256_desc); +#endif +#ifdef LTC_RIPEMD320 + REGISTER_HASH(&rmd320_desc); +#endif +#ifdef LTC_WHIRLPOOL + REGISTER_HASH(&whirlpool_desc); +#endif +#ifdef LTC_BLAKE2S + REGISTER_HASH(&blake2s_128_desc); + REGISTER_HASH(&blake2s_160_desc); + REGISTER_HASH(&blake2s_224_desc); + REGISTER_HASH(&blake2s_256_desc); +#endif +#ifdef LTC_BLAKE2S + REGISTER_HASH(&blake2b_160_desc); + REGISTER_HASH(&blake2b_256_desc); + REGISTER_HASH(&blake2b_384_desc); + REGISTER_HASH(&blake2b_512_desc); +#endif +#ifdef LTC_CHC_HASH + REGISTER_HASH(&chc_desc); + LTC_ARGCHK(chc_register(find_cipher_any("aes", 8, 16)) == CRYPT_OK); +#endif + return CRYPT_OK; +} + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_register_all_prngs.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/misc/crypt/crypt_register_all_prngs.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,48 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +/** + @file crypt_register_all_prngs.c + + Steffen Jaeckel +*/ + +#define REGISTER_PRNG(h) do {\ + LTC_ARGCHK(register_prng(h) != -1); \ +} while(0) + +int register_all_prngs(void) +{ +#ifdef LTC_YARROW + REGISTER_PRNG(&yarrow_desc); +#endif +#ifdef LTC_FORTUNA + REGISTER_PRNG(&fortuna_desc); +#endif +#ifdef LTC_RC4 + REGISTER_PRNG(&rc4_desc); +#endif +#ifdef LTC_CHACHA20_PRNG + REGISTER_PRNG(&chacha20_prng_desc); +#endif +#ifdef LTC_SOBER128 + REGISTER_PRNG(&sober128_desc); +#endif +#ifdef LTC_SPRNG + REGISTER_PRNG(&sprng_desc); +#endif + + return CRYPT_OK; +} + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_register_cipher.c --- a/libtomcrypt/src/misc/crypt/crypt_register_cipher.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/crypt/crypt_register_cipher.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -49,6 +47,6 @@ return -1; } -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_register_hash.c --- a/libtomcrypt/src/misc/crypt/crypt_register_hash.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/crypt/crypt_register_hash.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -49,6 +47,6 @@ return -1; } -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_register_prng.c --- a/libtomcrypt/src/misc/crypt/crypt_register_prng.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/crypt/crypt_register_prng.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -14,7 +12,7 @@ @file crypt_register_prng.c Register a PRNG, Tom St Denis */ - + /** Register a PRNG with the descriptor table @param prng The PRNG you wish to register @@ -49,6 +47,6 @@ return -1; } -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/crypt/crypt_sizes.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/misc/crypt/crypt_sizes.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,356 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file crypt_sizes.c + + Make various struct sizes available to dynamic languages + like Python - Larry Bugbee, February 2013 + + LB - Dec 2013 - revised to include compiler define options +*/ + + +typedef struct { + const char *name; + const unsigned int size; +} crypt_size; + +#define _SZ_STRINGIFY_S(s) { #s, sizeof(struct s) } +#define _SZ_STRINGIFY_T(s) { #s, sizeof(s) } + +static const crypt_size _crypt_sizes[] = { + /* hash state sizes */ + _SZ_STRINGIFY_S(ltc_hash_descriptor), + _SZ_STRINGIFY_T(hash_state), +#ifdef LTC_CHC_HASH + _SZ_STRINGIFY_S(chc_state), +#endif +#ifdef LTC_WHIRLPOOL + _SZ_STRINGIFY_S(whirlpool_state), +#endif +#ifdef LTC_SHA3 + _SZ_STRINGIFY_S(sha3_state), +#endif +#ifdef LTC_SHA512 + _SZ_STRINGIFY_S(sha512_state), +#endif +#ifdef LTC_SHA256 + _SZ_STRINGIFY_S(sha256_state), +#endif +#ifdef LTC_SHA1 + _SZ_STRINGIFY_S(sha1_state), +#endif +#ifdef LTC_MD5 + _SZ_STRINGIFY_S(md5_state), +#endif +#ifdef LTC_MD4 + _SZ_STRINGIFY_S(md4_state), +#endif +#ifdef LTC_MD2 + _SZ_STRINGIFY_S(md2_state), +#endif +#ifdef LTC_TIGER + _SZ_STRINGIFY_S(tiger_state), +#endif +#ifdef LTC_RIPEMD128 + _SZ_STRINGIFY_S(rmd128_state), +#endif +#ifdef LTC_RIPEMD160 + _SZ_STRINGIFY_S(rmd160_state), +#endif +#ifdef LTC_RIPEMD256 + _SZ_STRINGIFY_S(rmd256_state), +#endif +#ifdef LTC_RIPEMD320 + _SZ_STRINGIFY_S(rmd320_state), +#endif +#ifdef LTC_BLAKE2S + _SZ_STRINGIFY_S(blake2s_state), +#endif +#ifdef LTC_BLAKE2B + _SZ_STRINGIFY_S(blake2b_state), +#endif + + /* block cipher key sizes */ + _SZ_STRINGIFY_S(ltc_cipher_descriptor), + _SZ_STRINGIFY_T(symmetric_key), +#ifdef LTC_ANUBIS + _SZ_STRINGIFY_S(anubis_key), +#endif +#ifdef LTC_CAMELLIA + _SZ_STRINGIFY_S(camellia_key), +#endif +#ifdef LTC_BLOWFISH + _SZ_STRINGIFY_S(blowfish_key), +#endif +#ifdef LTC_CAST5 + _SZ_STRINGIFY_S(cast5_key), +#endif +#ifdef LTC_DES + _SZ_STRINGIFY_S(des_key), + _SZ_STRINGIFY_S(des3_key), +#endif +#ifdef LTC_KASUMI + _SZ_STRINGIFY_S(kasumi_key), +#endif +#ifdef LTC_KHAZAD + _SZ_STRINGIFY_S(khazad_key), +#endif +#ifdef LTC_KSEED + _SZ_STRINGIFY_S(kseed_key), +#endif +#ifdef LTC_MULTI2 + _SZ_STRINGIFY_S(multi2_key), +#endif +#ifdef LTC_NOEKEON + _SZ_STRINGIFY_S(noekeon_key), +#endif +#ifdef LTC_RC2 + _SZ_STRINGIFY_S(rc2_key), +#endif +#ifdef LTC_RC5 + _SZ_STRINGIFY_S(rc5_key), +#endif +#ifdef LTC_RC6 + _SZ_STRINGIFY_S(rc6_key), +#endif +#ifdef LTC_SKIPJACK + _SZ_STRINGIFY_S(skipjack_key), +#endif +#ifdef LTC_XTEA + _SZ_STRINGIFY_S(xtea_key), +#endif +#ifdef LTC_RIJNDAEL + _SZ_STRINGIFY_S(rijndael_key), +#endif +#ifdef LTC_SAFER + _SZ_STRINGIFY_S(safer_key), +#endif +#ifdef LTC_SAFERP + _SZ_STRINGIFY_S(saferp_key), +#endif +#ifdef LTC_TWOFISH + _SZ_STRINGIFY_S(twofish_key), +#endif + + /* mode sizes */ +#ifdef LTC_ECB_MODE + _SZ_STRINGIFY_T(symmetric_ECB), +#endif +#ifdef LTC_CFB_MODE + _SZ_STRINGIFY_T(symmetric_CFB), +#endif +#ifdef LTC_OFB_MODE + _SZ_STRINGIFY_T(symmetric_OFB), +#endif +#ifdef LTC_CBC_MODE + _SZ_STRINGIFY_T(symmetric_CBC), +#endif +#ifdef LTC_CTR_MODE + _SZ_STRINGIFY_T(symmetric_CTR), +#endif +#ifdef LTC_LRW_MODE + _SZ_STRINGIFY_T(symmetric_LRW), +#endif +#ifdef LTC_F8_MODE + _SZ_STRINGIFY_T(symmetric_F8), +#endif +#ifdef LTC_XTS_MODE + _SZ_STRINGIFY_T(symmetric_xts), +#endif + + /* stream cipher sizes */ +#ifdef LTC_CHACHA + _SZ_STRINGIFY_T(chacha_state), +#endif +#ifdef LTC_RC4_STREAM + _SZ_STRINGIFY_T(rc4_state), +#endif +#ifdef LTC_SOBER128_STREAM + _SZ_STRINGIFY_T(sober128_state), +#endif + + /* MAC sizes -- no states for ccm, lrw */ +#ifdef LTC_HMAC + _SZ_STRINGIFY_T(hmac_state), +#endif +#ifdef LTC_OMAC + _SZ_STRINGIFY_T(omac_state), +#endif +#ifdef LTC_PMAC + _SZ_STRINGIFY_T(pmac_state), +#endif +#ifdef LTC_POLY1305 + _SZ_STRINGIFY_T(poly1305_state), +#endif +#ifdef LTC_EAX_MODE + _SZ_STRINGIFY_T(eax_state), +#endif +#ifdef LTC_OCB_MODE + _SZ_STRINGIFY_T(ocb_state), +#endif +#ifdef LTC_OCB3_MODE + _SZ_STRINGIFY_T(ocb3_state), +#endif +#ifdef LTC_CCM_MODE + _SZ_STRINGIFY_T(ccm_state), +#endif +#ifdef LTC_GCM_MODE + _SZ_STRINGIFY_T(gcm_state), +#endif +#ifdef LTC_PELICAN + _SZ_STRINGIFY_T(pelican_state), +#endif +#ifdef LTC_XCBC + _SZ_STRINGIFY_T(xcbc_state), +#endif +#ifdef LTC_F9_MODE + _SZ_STRINGIFY_T(f9_state), +#endif +#ifdef LTC_CHACHA20POLY1305_MODE + _SZ_STRINGIFY_T(chacha20poly1305_state), +#endif + + /* asymmetric keys */ +#ifdef LTC_MRSA + _SZ_STRINGIFY_T(rsa_key), +#endif +#ifdef LTC_MDSA + _SZ_STRINGIFY_T(dsa_key), +#endif +#ifdef LTC_MDH + _SZ_STRINGIFY_T(dh_key), +#endif +#ifdef LTC_MECC + _SZ_STRINGIFY_T(ltc_ecc_set_type), + _SZ_STRINGIFY_T(ecc_point), + _SZ_STRINGIFY_T(ecc_key), +#endif +#ifdef LTC_MKAT + _SZ_STRINGIFY_T(katja_key), +#endif + + /* DER handling */ +#ifdef LTC_DER + _SZ_STRINGIFY_T(ltc_asn1_list), /* a list entry */ + _SZ_STRINGIFY_T(ltc_utctime), + _SZ_STRINGIFY_T(ltc_generalizedtime), +#endif + + /* prng state sizes */ + _SZ_STRINGIFY_S(ltc_prng_descriptor), + _SZ_STRINGIFY_T(prng_state), +#ifdef LTC_FORTUNA + _SZ_STRINGIFY_S(fortuna_prng), +#endif +#ifdef LTC_CHACHA20_PRNG + _SZ_STRINGIFY_S(chacha20_prng), +#endif +#ifdef LTC_RC4 + _SZ_STRINGIFY_S(rc4_prng), +#endif +#ifdef LTC_SOBER128 + _SZ_STRINGIFY_S(sober128_prng), +#endif +#ifdef LTC_YARROW + _SZ_STRINGIFY_S(yarrow_prng), +#endif + /* sprng has no state as it uses other potentially available sources */ + /* like /dev/random. See Developers Guide for more info. */ + +#ifdef LTC_ADLER32 + _SZ_STRINGIFY_T(adler32_state), +#endif +#ifdef LTC_CRC32 + _SZ_STRINGIFY_T(crc32_state), +#endif + + _SZ_STRINGIFY_T(ltc_mp_digit), + _SZ_STRINGIFY_T(ltc_math_descriptor) + +}; + +/* crypt_get_size() + * sizeout will be the size (bytes) of the named struct or union + * return -1 if named item not found + */ +int crypt_get_size(const char* namein, unsigned int *sizeout) { + int i; + int count = sizeof(_crypt_sizes) / sizeof(_crypt_sizes[0]); + for (i=0; i= sizeof(number))) + return -1; + total_len += (unsigned int)strlen(number) + 1; + /* this last +1 is for newlines (and ending NULL) */ + } + + if (names_list == NULL) { + *names_list_size = total_len; + } else { + if (total_len > *names_list_size) { + return -1; + } + /* build the names list */ + ptr = names_list; + for (i=0; i +#include +#include + +#include "tomcrypt.h" + +#ifdef LTC_HKDF + +/* This is mostly just a wrapper around hmac_memory */ +int hkdf_extract(int hash_idx, const unsigned char *salt, unsigned long saltlen, + const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen) +{ + /* libtomcrypt chokes on a zero length HMAC key, so we need to check for + that. HMAC specifies that keys shorter than the hash's blocksize are + 0 padded to the block size. HKDF specifies that a NULL salt is to be + substituted with a salt comprised of hashLen 0 bytes. HMAC's padding + means that in either case the HMAC is actually using a blocksize long + zero filled key. Unless blocksize < hashLen (which wouldn't make any + sense), we can use a single 0 byte as the HMAC key and still generate + valid results for HKDF. */ + if (salt == NULL || saltlen == 0) { + return hmac_memory(hash_idx, (const unsigned char *)"", 1, in, inlen, out, outlen); + } else { + return hmac_memory(hash_idx, salt, saltlen, in, inlen, out, outlen); + } +} + +int hkdf_expand(int hash_idx, const unsigned char *info, unsigned long infolen, + const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long outlen) +{ + unsigned long hashsize; + int err; + unsigned char N; + unsigned long Noutlen, outoff; + + unsigned char *T, *dat; + unsigned long Tlen, datlen; + + /* make sure hash descriptor is valid */ + if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) { + return err; + } + + hashsize = hash_descriptor[hash_idx].hashsize; + + /* RFC5869 parameter restrictions */ + if (inlen < hashsize || outlen > hashsize * 255) + return CRYPT_INVALID_ARG; + if (info == NULL && infolen != 0) + return CRYPT_INVALID_ARG; + LTC_ARGCHK(out != NULL); + + Tlen = hashsize + infolen + 1; + T = XMALLOC(Tlen); /* Replace with static buffer? */ + if (T == NULL) { + return CRYPT_MEM; + } + if (info != NULL) { + XMEMCPY(T + hashsize, info, infolen); + } + + /* HMAC data T(1) doesn't include a previous hash value */ + dat = T + hashsize; + datlen = Tlen - hashsize; + + N = 0; + outoff = 0; /* offset in out to write to */ + while (1) { /* an exit condition breaks mid-loop */ + Noutlen = MIN(hashsize, outlen - outoff); + T[Tlen - 1] = ++N; + if ((err = hmac_memory(hash_idx, in, inlen, dat, datlen, + out + outoff, &Noutlen)) != CRYPT_OK) { + zeromem(T, Tlen); + XFREE(T); + return err; + } + outoff += Noutlen; + + if (outoff >= outlen) /* loop exit condition */ + break; + + /* All subsequent HMAC data T(N) DOES include the previous hash value */ + XMEMCPY(T, out + hashsize * (N-1), hashsize); + if (N == 1) { + dat = T; + datlen = Tlen; + } + } + zeromem(T, Tlen); + XFREE(T); + return CRYPT_OK; +} + +/* all in one step */ +int hkdf(int hash_idx, const unsigned char *salt, unsigned long saltlen, + const unsigned char *info, unsigned long infolen, + const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long outlen) +{ + unsigned long hashsize; + int err; + unsigned char *extracted; + + /* make sure hash descriptor is valid */ + if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) { + return err; + } + + hashsize = hash_descriptor[hash_idx].hashsize; + + extracted = XMALLOC(hashsize); /* replace with static buffer? */ + if (extracted == NULL) { + return CRYPT_MEM; + } + if ((err = hkdf_extract(hash_idx, salt, saltlen, in, inlen, extracted, &hashsize)) != 0) { + zeromem(extracted, hashsize); + XFREE(extracted); + return err; + } + err = hkdf_expand(hash_idx, info, infolen, extracted, hashsize, out, outlen); + zeromem(extracted, hashsize); + XFREE(extracted); + return err; +} +#endif /* LTC_HKDF */ + + +/* vim: set ts=2 sw=2 et ai si: */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/hkdf/hkdf_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/misc/hkdf/hkdf_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,294 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file hkdf_test.c + LTC_HKDF support, self-test, Steffen Jaeckel +*/ + +#ifdef LTC_HKDF + +/* + TEST CASES SOURCE: + +Internet Engineering Task Force (IETF) H. Krawczyk +Request for Comments: 5869 IBM Research +Category: Informational P. Eronen +ISSN: 2070-1721 Nokia + May 2010 +Appendix A. Test Vectors +*/ + +/** + LTC_HKDF self-test + @return CRYPT_OK if successful, CRYPT_NOP if tests have been disabled. +*/ +int hkdf_test(void) +{ + #ifndef LTC_TEST + return CRYPT_NOP; + #else + unsigned char OKM[82]; + int i; + + static const struct hkdf_test_case { + int num; + const char* Hash; + unsigned char IKM[80]; + unsigned long IKM_l; + unsigned char salt[80]; + unsigned long salt_l; + unsigned char info[80]; + unsigned long info_l; + unsigned char PRK[32]; + unsigned long PRK_l; + unsigned char OKM[82]; + unsigned long OKM_l; + } cases[] = { +#ifdef LTC_SHA256 + /* + Basic test case with SHA-256 + + Hash = SHA-256 + IKM = 0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b (22 octets) + salt = 0x000102030405060708090a0b0c (13 octets) + info = 0xf0f1f2f3f4f5f6f7f8f9 (10 octets) + L = 42 + + PRK = 0x077709362c2e32df0ddc3f0dc47bba63 + 90b6c73bb50f9c3122ec844ad7c2b3e5 (32 octets) + OKM = 0x3cb25f25faacd57a90434f64d0362f2a + 2d2d0a90cf1a5a4c5db02d56ecc4c5bf + 34007208d5b887185865 (42 octets) + */ + {1, "sha256", + {0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, + 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, + 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b}, 22, + {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c}, 13, + {0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9}, 10, + {0x07, 0x77, 0x09, 0x36, 0x2c, 0x2e, 0x32, 0xdf, + 0x0d, 0xdc, 0x3f, 0x0d, 0xc4, 0x7b, 0xba, 0x63, + 0x90, 0xb6, 0xc7, 0x3b, 0xb5, 0x0f, 0x9c, 0x31, + 0x22, 0xec, 0x84, 0x4a, 0xd7, 0xc2, 0xb3, 0xe5}, 32, + {0x3c, 0xb2, 0x5f, 0x25, 0xfa, 0xac, 0xd5, 0x7a, + 0x90, 0x43, 0x4f, 0x64, 0xd0, 0x36, 0x2f, 0x2a, + 0x2d, 0x2d, 0x0a, 0x90, 0xcf, 0x1a, 0x5a, 0x4c, + 0x5d, 0xb0, 0x2d, 0x56, 0xec, 0xc4, 0xc5, 0xbf, + 0x34, 0x00, 0x72, 0x08, 0xd5, 0xb8, 0x87, 0x18, + 0x58, 0x65}, 42}, +#ifdef LTC_TEST_EXT + /* Test with SHA-256 and longer inputs/outputs */ + {2, "sha256", + {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f}, 80, +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 0xef, 0x76, 0x00, 0x14, 0x90, 0x46, 0x71, 0x01, + 0x4a, 0x19, 0x3f, 0x40, 0xc1, 0x5f, 0xc2, 0x44}, 32, + {0xb1, 0x1e, 0x39, 0x8d, 0xc8, 0x03, 0x27, 0xa1, + 0xc8, 0xe7, 0xf7, 0x8c, 0x59, 0x6a, 0x49, 0x34, + 0x4f, 0x01, 0x2e, 0xda, 0x2d, 0x4e, 0xfa, 0xd8, + 0xa0, 0x50, 0xcc, 0x4c, 0x19, 0xaf, 0xa9, 0x7c, + 0x59, 0x04, 0x5a, 0x99, 0xca, 0xc7, 0x82, 0x72, + 0x71, 0xcb, 0x41, 0xc6, 0x5e, 0x59, 0x0e, 0x09, + 0xda, 0x32, 0x75, 0x60, 0x0c, 0x2f, 0x09, 0xb8, + 0x36, 0x77, 0x93, 0xa9, 0xac, 0xa3, 0xdb, 0x71, + 0xcc, 0x30, 0xc5, 0x81, 0x79, 0xec, 0x3e, 0x87, + 0xc1, 0x4c, 0x01, 0xd5, 0xc1, 0xf3, 0x43, 0x4f, + 0x1d, 0x87}, 82}, + /* Test with SHA-256 and zero length salt/info */ + {3, "sha256", + {0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, + 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, + 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b}, 22, + {0}, 0, + {0}, 0, + {0x19, 0xef, 0x24, 0xa3, 0x2c, 0x71, 0x7b, 0x16, + 0x7f, 0x33, 0xa9, 0x1d, 0x6f, 0x64, 0x8b, 0xdf, + 0x96, 0x59, 0x67, 0x76, 0xaf, 0xdb, 0x63, 0x77, + 0xac, 0x43, 0x4c, 0x1c, 0x29, 0x3c, 0xcb, 0x04}, 32, + {0x8d, 0xa4, 0xe7, 0x75, 0xa5, 0x63, 0xc1, 0x8f, + 0x71, 0x5f, 0x80, 0x2a, 0x06, 0x3c, 0x5a, 0x31, + 0xb8, 0xa1, 0x1f, 0x5c, 0x5e, 0xe1, 0x87, 0x9e, + 0xc3, 0x45, 0x4e, 0x5f, 0x3c, 0x73, 0x8d, 0x2d, + 0x9d, 0x20, 0x13, 0x95, 0xfa, 0xa4, 0xb6, 0x1a, + 0x96, 0xc8}, 42}, +#endif /* LTC_TEST_EXT */ +#endif /* LTC_SHA256 */ +#ifdef LTC_SHA1 + /* Basic test case with SHA-1 */ + {4, "sha1", + {0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, + 0x0b, 0x0b, 0x0b}, 11, + {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c}, 13, + {0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9}, 10, + {0x9b, 0x6c, 0x18, 0xc4, 0x32, 0xa7, 0xbf, 0x8f, + 0x0e, 0x71, 0xc8, 0xeb, 0x88, 0xf4, 0xb3, 0x0b, + 0xaa, 0x2b, 0xa2, 0x43}, 20, + {0x08, 0x5a, 0x01, 0xea, 0x1b, 0x10, 0xf3, 0x69, + 0x33, 0x06, 0x8b, 0x56, 0xef, 0xa5, 0xad, 0x81, + 0xa4, 0xf1, 0x4b, 0x82, 0x2f, 0x5b, 0x09, 0x15, + 0x68, 0xa9, 0xcd, 0xd4, 0xf1, 0x55, 0xfd, 0xa2, + 0xc2, 0x2e, 0x42, 0x24, 0x78, 0xd3, 0x05, 0xf3, + 0xf8, 0x96}, 42}, +#ifdef LTC_TEST_EXT + /* Test with SHA-1 and longer inputs/outputs */ + {5, "sha1", + {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f}, 80, + {0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, + 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf}, 80, + {0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, + 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, + 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff}, 80, + {0x8a, 0xda, 0xe0, 0x9a, 0x2a, 0x30, 0x70, 0x59, + 0x47, 0x8d, 0x30, 0x9b, 0x26, 0xc4, 0x11, 0x5a, + 0x22, 0x4c, 0xfa, 0xf6}, 20, + {0x0b, 0xd7, 0x70, 0xa7, 0x4d, 0x11, 0x60, 0xf7, + 0xc9, 0xf1, 0x2c, 0xd5, 0x91, 0x2a, 0x06, 0xeb, + 0xff, 0x6a, 0xdc, 0xae, 0x89, 0x9d, 0x92, 0x19, + 0x1f, 0xe4, 0x30, 0x56, 0x73, 0xba, 0x2f, 0xfe, + 0x8f, 0xa3, 0xf1, 0xa4, 0xe5, 0xad, 0x79, 0xf3, + 0xf3, 0x34, 0xb3, 0xb2, 0x02, 0xb2, 0x17, 0x3c, + 0x48, 0x6e, 0xa3, 0x7c, 0xe3, 0xd3, 0x97, 0xed, + 0x03, 0x4c, 0x7f, 0x9d, 0xfe, 0xb1, 0x5c, 0x5e, + 0x92, 0x73, 0x36, 0xd0, 0x44, 0x1f, 0x4c, 0x43, + 0x00, 0xe2, 0xcf, 0xf0, 0xd0, 0x90, 0x0b, 0x52, + 0xd3, 0xb4}, 82}, + /* Test with SHA-1 and zero-length salt/info */ + {6, "sha1", + {0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, + 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, + 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b}, 22, + {0}, 0, + {0}, 0, + {0xda, 0x8c, 0x8a, 0x73, 0xc7, 0xfa, 0x77, 0x28, + 0x8e, 0xc6, 0xf5, 0xe7, 0xc2, 0x97, 0x78, 0x6a, + 0xa0, 0xd3, 0x2d, 0x01}, 20, + {0x0a, 0xc1, 0xaf, 0x70, 0x02, 0xb3, 0xd7, 0x61, + 0xd1, 0xe5, 0x52, 0x98, 0xda, 0x9d, 0x05, 0x06, + 0xb9, 0xae, 0x52, 0x05, 0x72, 0x20, 0xa3, 0x06, + 0xe0, 0x7b, 0x6b, 0x87, 0xe8, 0xdf, 0x21, 0xd0, + 0xea, 0x00, 0x03, 0x3d, 0xe0, 0x39, 0x84, 0xd3, + 0x49, 0x18}, 42}, + /* Test with SHA-1, salt not provided (defaults to HashLen zero octets), + zero-length info */ + {7, "sha1", + {0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, + 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, + 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c}, 22, + {0}, 0, /* pass a null pointer */ + {0}, 0, + {0x2a, 0xdc, 0xca, 0xda, 0x18, 0x77, 0x9e, 0x7c, + 0x20, 0x77, 0xad, 0x2e, 0xb1, 0x9d, 0x3f, 0x3e, + 0x73, 0x13, 0x85, 0xdd}, 20, + {0x2c, 0x91, 0x11, 0x72, 0x04, 0xd7, 0x45, 0xf3, + 0x50, 0x0d, 0x63, 0x6a, 0x62, 0xf6, 0x4f, 0x0a, + 0xb3, 0xba, 0xe5, 0x48, 0xaa, 0x53, 0xd4, 0x23, + 0xb0, 0xd1, 0xf2, 0x7e, 0xbb, 0xa6, 0xf5, 0xe5, + 0x67, 0x3a, 0x08, 0x1d, 0x70, 0xcc, 0xe7, 0xac, + 0xfc, 0x48}, 42}, +#endif /* LTC_TEST_EXT */ +#endif /* LTC_SHA1 */ + }; + + int err; + int tested=0,failed=0; + for(i=0; i < (int)(sizeof(cases) / sizeof(cases[0])); i++) { + int hash = find_hash(cases[i].Hash); + if (hash == -1) continue; + ++tested; + if((err = hkdf(hash, cases[i].salt, cases[i].salt_l, + cases[i].info, cases[i].info_l, + cases[i].IKM, cases[i].IKM_l, + OKM, cases[i].OKM_l)) != CRYPT_OK) { +#if defined(LTC_TEST_DBG) && (LTC_TEST_DBG > 1) + printf("LTC_HKDF-%s test #%d, %s\n", cases[i].Hash, i, error_to_string(err)); +#endif + return err; + } + + if(compare_testvector(OKM, cases[i].OKM_l, cases[i].OKM, (size_t)cases[i].OKM_l, "HKDF", cases[i].num)) { + failed++; + } + } + + if (failed != 0) { + return CRYPT_FAIL_TESTVECTOR; + } else if (tested == 0) { + return CRYPT_NOP; + } else { + return CRYPT_OK; + } + #endif +} + +#endif + + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/mem_neq.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/misc/mem_neq.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,63 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file mem_neq.c + Compare two blocks of memory for inequality in constant time. + Steffen Jaeckel +*/ + +/** + Compare two blocks of memory for inequality in constant time. + + The usage is similar to that of standard memcmp, but you can only test + if the memory is equal or not - you can not determine by how much the + first different byte differs. + + This function shall be used to compare results of cryptographic + operations where inequality means most likely usage of a wrong key. + The execution time has therefore to be constant as otherwise + timing attacks could be possible. + + @param a The first memory region + @param b The second memory region + @param len The length of the area to compare (octets) + + @return 0 when a and b are equal for len bytes, 1 they are not equal. +*/ +int mem_neq(const void *a, const void *b, size_t len) +{ + unsigned char ret = 0; + const unsigned char* pa; + const unsigned char* pb; + + LTC_ARGCHK(a != NULL); + LTC_ARGCHK(b != NULL); + + pa = a; + pb = b; + + while (len-- > 0) { + ret |= *pa ^ *pb; + ++pa; + ++pb; + } + + ret |= ret >> 4; + ret |= ret >> 2; + ret |= ret >> 1; + ret &= 1; + + return ret; +} + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/pk_get_oid.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/misc/pk_get_oid.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,44 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +#ifdef LTC_DER +static const oid_st rsa_oid = { + { 1, 2, 840, 113549, 1, 1, 1 }, + 7, +}; + +static const oid_st dsa_oid = { + { 1, 2, 840, 10040, 4, 1 }, + 6, +}; + +/* + Returns the OID of the public key algorithm. + @return CRYPT_OK if valid +*/ +int pk_get_oid(int pk, oid_st *st) +{ + switch (pk) { + case PKA_RSA: + XMEMCPY(st, &rsa_oid, sizeof(*st)); + break; + case PKA_DSA: + XMEMCPY(st, &dsa_oid, sizeof(*st)); + break; + default: + return CRYPT_INVALID_ARG; + } + return CRYPT_OK; +} +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/pkcs5/pkcs_5_1.c --- a/libtomcrypt/src/misc/pkcs5/pkcs_5_1.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/pkcs5/pkcs_5_1.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,36 +5,51 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -#include +#include "tomcrypt.h" -/** +/** @file pkcs_5_1.c - LTC_PKCS #5, Algorithm #1, Tom St Denis + PKCS #5, Algorithm #1, Tom St Denis */ #ifdef LTC_PKCS_5 /** - Execute LTC_PKCS #5 v1 + Execute PKCS #5 v1 in strict or OpenSSL EVP_BytesToKey()-compat mode. + + PKCS#5 v1 specifies that the output key length can be no larger than + the hash output length. OpenSSL unilaterally extended that by repeating + the hash process on a block-by-block basis for as long as needed to make + bigger keys. If you want to be compatible with KDF for e.g. "openssl enc", + you'll want that. + + If you want strict PKCS behavior, turn openssl_compat off. Or (more + likely), use one of the convenience functions below. + @param password The password (or key) @param password_len The length of the password (octet) @param salt The salt (or nonce) which is 8 octets long - @param iteration_count The LTC_PKCS #5 v1 iteration count + @param iteration_count The PKCS #5 v1 iteration count @param hash_idx The index of the hash desired @param out [out] The destination for this algorithm @param outlen [in/out] The max size and resulting size of the algorithm output + @param openssl_compat [in] Whether or not to grow the key to the buffer size ala OpenSSL @return CRYPT_OK if successful */ -int pkcs_5_alg1(const unsigned char *password, unsigned long password_len, - const unsigned char *salt, - int iteration_count, int hash_idx, - unsigned char *out, unsigned long *outlen) +static int _pkcs_5_alg1_common(const unsigned char *password, + unsigned long password_len, + const unsigned char *salt, + int iteration_count, int hash_idx, + unsigned char *out, unsigned long *outlen, + int openssl_compat) { int err; unsigned long x; hash_state *md; unsigned char *buf; + /* Storage vars in case we need to support > hashsize (OpenSSL compat) */ + unsigned long block = 0, iter; + /* How many bytes to put in the outbut buffer (convenience calc) */ + unsigned long outidx = 0, nb = 0; LTC_ARGCHK(password != NULL); LTC_ARGCHK(salt != NULL); @@ -53,42 +68,64 @@ if (md != NULL) { XFREE(md); } - if (buf != NULL) { + if (buf != NULL) { XFREE(buf); } return CRYPT_MEM; - } - - /* hash initial password + salt */ - if ((err = hash_descriptor[hash_idx].init(md)) != CRYPT_OK) { - goto LBL_ERR; - } - if ((err = hash_descriptor[hash_idx].process(md, password, password_len)) != CRYPT_OK) { - goto LBL_ERR; - } - if ((err = hash_descriptor[hash_idx].process(md, salt, 8)) != CRYPT_OK) { - goto LBL_ERR; - } - if ((err = hash_descriptor[hash_idx].done(md, buf)) != CRYPT_OK) { - goto LBL_ERR; } - while (--iteration_count) { - /* code goes here. */ - x = MAXBLOCKSIZE; - if ((err = hash_memory(hash_idx, buf, hash_descriptor[hash_idx].hashsize, buf, &x)) != CRYPT_OK) { - goto LBL_ERR; + while(block * hash_descriptor[hash_idx].hashsize < *outlen) { + + /* hash initial (maybe previous hash) + password + salt */ + if ((err = hash_descriptor[hash_idx].init(md)) != CRYPT_OK) { + goto LBL_ERR; + } + /* in OpenSSL mode, we first hash the previous result for blocks 2-n */ + if (openssl_compat && block) { + if ((err = hash_descriptor[hash_idx].process(md, buf, hash_descriptor[hash_idx].hashsize)) != CRYPT_OK) { + goto LBL_ERR; + } + } + if ((err = hash_descriptor[hash_idx].process(md, password, password_len)) != CRYPT_OK) { + goto LBL_ERR; + } + if ((err = hash_descriptor[hash_idx].process(md, salt, 8)) != CRYPT_OK) { + goto LBL_ERR; + } + if ((err = hash_descriptor[hash_idx].done(md, buf)) != CRYPT_OK) { + goto LBL_ERR; } + + iter = iteration_count; + while (--iter) { + /* code goes here. */ + x = MAXBLOCKSIZE; + if ((err = hash_memory(hash_idx, buf, hash_descriptor[hash_idx].hashsize, buf, &x)) != CRYPT_OK) { + goto LBL_ERR; + } + } + + /* limit the size of the copy to however many bytes we have left in + the output buffer (and how many bytes we have to copy) */ + outidx = block*hash_descriptor[hash_idx].hashsize; + nb = hash_descriptor[hash_idx].hashsize; + if(outidx+nb > *outlen) + nb = *outlen - outidx; + if(nb > 0) + XMEMCPY(out+outidx, buf, nb); + + block++; + if (!openssl_compat) + break; } + /* In strict mode, we always return the hashsize, in compat we filled it + as much as was requested, so we leave it alone. */ + if(!openssl_compat) + *outlen = hash_descriptor[hash_idx].hashsize; - /* copy upto outlen bytes */ - for (x = 0; x < hash_descriptor[hash_idx].hashsize && x < *outlen; x++) { - out[x] = buf[x]; - } - *outlen = x; err = CRYPT_OK; LBL_ERR: -#ifdef LTC_CLEAN_STACK +#ifdef LTC_CLEAN_STACK zeromem(buf, MAXBLOCKSIZE); zeromem(md, sizeof(hash_state)); #endif @@ -99,8 +136,52 @@ return err; } +/** + Execute PKCS #5 v1 - Strict mode (no OpenSSL-compatible extension) + @param password The password (or key) + @param password_len The length of the password (octet) + @param salt The salt (or nonce) which is 8 octets long + @param iteration_count The PKCS #5 v1 iteration count + @param hash_idx The index of the hash desired + @param out [out] The destination for this algorithm + @param outlen [in/out] The max size and resulting size of the algorithm output + @return CRYPT_OK if successful +*/ +int pkcs_5_alg1(const unsigned char *password, unsigned long password_len, + const unsigned char *salt, + int iteration_count, int hash_idx, + unsigned char *out, unsigned long *outlen) +{ + return _pkcs_5_alg1_common(password, password_len, salt, iteration_count, + hash_idx, out, outlen, 0); +} + +/** + Execute PKCS #5 v1 - OpenSSL-extension-compatible mode + + Use this one if you need to derive keys as "openssl enc" does by default. + OpenSSL (for better or worse), uses MD5 as the hash and iteration_count=1. + @param password The password (or key) + @param password_len The length of the password (octet) + @param salt The salt (or nonce) which is 8 octets long + @param iteration_count The PKCS #5 v1 iteration count + @param hash_idx The index of the hash desired + @param out [out] The destination for this algorithm + @param outlen [in/out] The max size and resulting size of the algorithm output + @return CRYPT_OK if successful +*/ +int pkcs_5_alg1_openssl(const unsigned char *password, + unsigned long password_len, + const unsigned char *salt, + int iteration_count, int hash_idx, + unsigned char *out, unsigned long *outlen) +{ + return _pkcs_5_alg1_common(password, password_len, salt, iteration_count, + hash_idx, out, outlen, 1); +} + #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/pkcs5/pkcs_5_2.c --- a/libtomcrypt/src/misc/pkcs5/pkcs_5_2.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/pkcs5/pkcs_5_2.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,30 +5,28 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -#include +#include "tomcrypt.h" -/** +/** @file pkcs_5_2.c - LTC_PKCS #5, Algorithm #2, Tom St Denis + PKCS #5, Algorithm #2, Tom St Denis */ #ifdef LTC_PKCS_5 /** - Execute LTC_PKCS #5 v2 + Execute PKCS #5 v2 @param password The input password (or key) @param password_len The length of the password (octets) @param salt The salt (or nonce) @param salt_len The length of the salt (octets) - @param iteration_count # of iterations desired for LTC_PKCS #5 v2 [read specs for more] + @param iteration_count # of iterations desired for PKCS #5 v2 [read specs for more] @param hash_idx The index of the hash desired @param out [out] The destination for this algorithm @param outlen [in/out] The max size and resulting size of the algorithm output @return CRYPT_OK if successful */ -int pkcs_5_alg2(const unsigned char *password, unsigned long password_len, +int pkcs_5_alg2(const unsigned char *password, unsigned long password_len, const unsigned char *salt, unsigned long salt_len, int iteration_count, int hash_idx, unsigned char *out, unsigned long *outlen) @@ -69,13 +67,13 @@ while (left != 0) { /* process block number blkno */ zeromem(buf[0], MAXBLOCKSIZE*2); - + /* store current block number and increment for next pass */ STORE32H(blkno, buf[1]); ++blkno; /* get PRF(P, S||int(blkno)) */ - if ((err = hmac_init(hmac, hash_idx, password, password_len)) != CRYPT_OK) { + if ((err = hmac_init(hmac, hash_idx, password, password_len)) != CRYPT_OK) { goto LBL_ERR; } if ((err = hmac_process(hmac, salt, salt_len)) != CRYPT_OK) { @@ -124,6 +122,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/pkcs5/pkcs_5_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/misc/pkcs5/pkcs_5_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,231 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file hkdf_test.c + PKCS #5 support, self-test, Steffen Jaeckel +*/ + +#ifdef LTC_PKCS_5 + +/* + TEST CASES SOURCE: + +Internet Engineering Task Force (IETF) S. Josefsson +Request for Comments: 6070 SJD AB +Category: Informational January 2011 +ISSN: 2070-1721 +*/ + +/** + PKCS #5 self-test + @return CRYPT_OK if successful, CRYPT_NOP if tests have been disabled. +*/ +int pkcs_5_test (void) +{ + #ifndef LTC_TEST + return CRYPT_NOP; + #else + + typedef struct { + const char* P; + unsigned long P_len; + const char* S; + unsigned long S_len; + int c; + unsigned long dkLen; + unsigned char DK[40]; + } case_item; + + static const case_item cases_5_2[] = { + { + "password", + 8, + "salt", + 4, + 1, + 20, + { 0x0c, 0x60, 0xc8, 0x0f, 0x96, 0x1f, 0x0e, 0x71, + 0xf3, 0xa9, 0xb5, 0x24, 0xaf, 0x60, 0x12, 0x06, + 0x2f, 0xe0, 0x37, 0xa6 } + }, + { + "password", + 8, + "salt", + 4, + 2, + 20, + { 0xea, 0x6c, 0x01, 0x4d, 0xc7, 0x2d, 0x6f, 0x8c, + 0xcd, 0x1e, 0xd9, 0x2a, 0xce, 0x1d, 0x41, 0xf0, + 0xd8, 0xde, 0x89, 0x57 } + }, +#ifdef LTC_TEST_EXT + { + "password", + 8, + "salt", + 4, + 4096, + 20, + { 0x4b, 0x00, 0x79, 0x01, 0xb7, 0x65, 0x48, 0x9a, + 0xbe, 0xad, 0x49, 0xd9, 0x26, 0xf7, 0x21, 0xd0, + 0x65, 0xa4, 0x29, 0xc1 } + }, + { + "password", + 8, + "salt", + 4, + 16777216, + 20, + { 0xee, 0xfe, 0x3d, 0x61, 0xcd, 0x4d, 0xa4, 0xe4, + 0xe9, 0x94, 0x5b, 0x3d, 0x6b, 0xa2, 0x15, 0x8c, + 0x26, 0x34, 0xe9, 0x84 } + }, + { + "passwordPASSWORDpassword", + 25, + "saltSALTsaltSALTsaltSALTsaltSALTsalt", + 36, + 4096, + 25, + { 0x3d, 0x2e, 0xec, 0x4f, 0xe4, 0x1c, 0x84, 0x9b, + 0x80, 0xc8, 0xd8, 0x36, 0x62, 0xc0, 0xe4, 0x4a, + 0x8b, 0x29, 0x1a, 0x96, 0x4c, 0xf2, 0xf0, 0x70, + 0x38 } + }, + { + "pass\0word", + 9, + "sa\0lt", + 5, + 4096, + 16, + { 0x56, 0xfa, 0x6a, 0xa7, 0x55, 0x48, 0x09, 0x9d, + 0xcc, 0x37, 0xd7, 0xf0, 0x34, 0x25, 0xe0, 0xc3 } + }, +#endif /* LTC_TEST_EXT */ + }; + + static const case_item cases_5_1[] = { + { + "password", + 8, + "saltsalt", /* must be 8 octects */ + 8, /* ignored by alg1 */ + 1, + 20, + { 0xca, 0xb8, 0x6d, 0xd6, 0x26, 0x17, 0x10, 0x89, 0x1e, 0x8c, + 0xb5, 0x6e, 0xe3, 0x62, 0x56, 0x91, 0xa7, 0x5d, 0xf3, 0x44 } + }, + }; + + static const case_item cases_5_1o[] = { + { + "password", + 8, + "saltsalt", /* must be 8 octects */ + 8, /* ignored by alg1_openssl */ + 1, + 20, + { 0xca, 0xb8, 0x6d, 0xd6, 0x26, 0x17, 0x10, 0x89, 0x1e, 0x8c, + 0xb5, 0x6e, 0xe3, 0x62, 0x56, 0x91, 0xa7, 0x5d, 0xf3, 0x44 } + + }, + { + "password", + 8, + "saltsalt", /* must be 8 octects */ + 8, /* ignored by alg1_openssl */ + 1, + 30, + { 0xca, 0xb8, 0x6d, 0xd6, 0x26, 0x17, 0x10, 0x89, 0x1e, 0x8c, + 0xb5, 0x6e, 0xe3, 0x62, 0x56, 0x91, 0xa7, 0x5d, 0xf3, 0x44, + 0xf0, 0xbf, 0xf4, 0xc1, 0x2c, 0xf3, 0x59, 0x6f, 0xc0, 0x0b } + + } + }; + + unsigned char DK[40]; + unsigned long dkLen; + int i, err; + int tested=0, failed=0; + int hash = find_hash("sha1"); + if (hash == -1) + { +#ifdef LTC_TEST_DBG + printf("PKCS#5 test failed: 'sha1' hash not found\n"); +#endif + return CRYPT_ERROR; + } + + /* testing alg 2 */ + for(i=0; i < (int)(sizeof(cases_5_2) / sizeof(cases_5_2[0])); i++) { + ++tested; + dkLen = cases_5_2[i].dkLen; + if((err = pkcs_5_alg2((unsigned char*)cases_5_2[i].P, cases_5_2[i].P_len, + (unsigned char*)cases_5_2[i].S, cases_5_2[i].S_len, + cases_5_2[i].c, hash, + DK, &dkLen)) != CRYPT_OK) { +#ifdef LTC_TEST_DBG + printf("\npkcs_5_alg2() #%d: Failed/1 (%s)\n", i, error_to_string(err)); +#endif + ++failed; + } + else if (compare_testvector(DK, dkLen, cases_5_2[i].DK, cases_5_2[i].dkLen, "PKCS#5_2", i)) { + ++failed; + } + } + + /* testing alg 1 */ + for(i=0; i < (int)(sizeof(cases_5_1) / sizeof(case_item)); i++, tested++) { + dkLen = cases_5_1[i].dkLen; + if((err = pkcs_5_alg1((unsigned char*)cases_5_1[i].P, cases_5_1[i].P_len, + (unsigned char*)cases_5_1[i].S, + cases_5_1[i].c, hash, + DK, &dkLen)) != CRYPT_OK) { +#ifdef LTC_TEST_DBG + printf("\npkcs_5_alg1() #%d: Failed/1 (%s)\n", i, error_to_string(err)); +#endif + ++failed; + } + else if (compare_testvector(DK, dkLen, cases_5_1[i].DK, cases_5_1[i].dkLen, "PKCS#5_1", i)) { + ++failed; + } + } + + /* testing alg 1_openssl */ + for(i = 0; i < (int)(sizeof(cases_5_1o) / sizeof(cases_5_1o[0])); i++, tested++) { + dkLen = cases_5_1o[i].dkLen; + if ((err = pkcs_5_alg1_openssl((unsigned char*)cases_5_1o[i].P, cases_5_1o[i].P_len, + (unsigned char*)cases_5_1o[i].S, + cases_5_1o[i].c, hash, + DK, &dkLen)) != CRYPT_OK) { +#ifdef LTC_TEST_DBG + printf("\npkcs_5_alg1_openssl() #%d: Failed/1 (%s)\n", i, error_to_string(err)); +#endif + ++failed; + } + else if (compare_testvector(DK, dkLen, cases_5_1o[i].DK, cases_5_1o[i].dkLen, "PKCS#5_1o", i)) { + ++failed; + } + } + + return (failed != 0) ? CRYPT_FAIL_TESTVECTOR : CRYPT_OK; + #endif +} + +#endif + + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/misc/zeromem.c --- a/libtomcrypt/src/misc/zeromem.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/misc/zeromem.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" #include "dbhelpers.h" @@ -21,11 +19,11 @@ @param out The destination of the area to zero @param outlen The length of the area to zero (octets) */ -void zeromem(void *out, size_t outlen) +void zeromem(volatile void *out, size_t outlen) { m_burn(out, outlen); } -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/cbc/cbc_decrypt.c --- a/libtomcrypt/src/modes/cbc/cbc_decrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/cbc/cbc_decrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -34,7 +32,7 @@ LTC_FAST_TYPE tmpy; #else unsigned char tmpy; -#endif +#endif LTC_ARGCHK(pt != NULL); LTC_ARGCHK(ct != NULL); @@ -43,21 +41,21 @@ if ((err = cipher_is_valid(cbc->cipher)) != CRYPT_OK) { return err; } - + /* is blocklen valid? */ - if (cbc->blocklen < 1 || cbc->blocklen > (int)sizeof(cbc->IV)) { + if (cbc->blocklen < 1 || cbc->blocklen > (int)sizeof(cbc->IV) || cbc->blocklen > (int)sizeof(tmp)) { return CRYPT_INVALID_ARG; - } + } if (len % cbc->blocklen) { return CRYPT_INVALID_ARG; } #ifdef LTC_FAST - if (cbc->blocklen % sizeof(LTC_FAST_TYPE)) { + if (cbc->blocklen % sizeof(LTC_FAST_TYPE)) { return CRYPT_INVALID_ARG; } #endif - + if (cipher_descriptor[cbc->cipher].accel_cbc_decrypt != NULL) { return cipher_descriptor[cbc->cipher].accel_cbc_decrypt(ct, pt, len / cbc->blocklen, cbc->IV, &cbc->key); } else { @@ -69,19 +67,19 @@ /* xor IV against plaintext */ #if defined(LTC_FAST) - for (x = 0; x < cbc->blocklen; x += sizeof(LTC_FAST_TYPE)) { - tmpy = *((LTC_FAST_TYPE*)((unsigned char *)cbc->IV + x)) ^ *((LTC_FAST_TYPE*)((unsigned char *)tmp + x)); - *((LTC_FAST_TYPE*)((unsigned char *)cbc->IV + x)) = *((LTC_FAST_TYPE*)((unsigned char *)ct + x)); - *((LTC_FAST_TYPE*)((unsigned char *)pt + x)) = tmpy; - } - #else - for (x = 0; x < cbc->blocklen; x++) { - tmpy = tmp[x] ^ cbc->IV[x]; - cbc->IV[x] = ct[x]; - pt[x] = tmpy; - } + for (x = 0; x < cbc->blocklen; x += sizeof(LTC_FAST_TYPE)) { + tmpy = *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)cbc->IV + x)) ^ *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)tmp + x)); + *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)cbc->IV + x)) = *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)ct + x)); + *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)pt + x)) = tmpy; + } + #else + for (x = 0; x < cbc->blocklen; x++) { + tmpy = tmp[x] ^ cbc->IV[x]; + cbc->IV[x] = ct[x]; + pt[x] = tmpy; + } #endif - + ct += cbc->blocklen; pt += cbc->blocklen; len -= cbc->blocklen; @@ -92,6 +90,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/cbc/cbc_done.c --- a/libtomcrypt/src/modes/cbc/cbc_done.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/cbc/cbc_done.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -33,10 +31,10 @@ return CRYPT_OK; } - + #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/cbc/cbc_encrypt.c --- a/libtomcrypt/src/modes/cbc/cbc_encrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/cbc/cbc_encrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -37,17 +35,17 @@ if ((err = cipher_is_valid(cbc->cipher)) != CRYPT_OK) { return err; } - + /* is blocklen valid? */ if (cbc->blocklen < 1 || cbc->blocklen > (int)sizeof(cbc->IV)) { return CRYPT_INVALID_ARG; - } + } if (len % cbc->blocklen) { return CRYPT_INVALID_ARG; } #ifdef LTC_FAST - if (cbc->blocklen % sizeof(LTC_FAST_TYPE)) { + if (cbc->blocklen % sizeof(LTC_FAST_TYPE)) { return CRYPT_INVALID_ARG; } #endif @@ -58,13 +56,13 @@ while (len) { /* xor IV against plaintext */ #if defined(LTC_FAST) - for (x = 0; x < cbc->blocklen; x += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)((unsigned char *)cbc->IV + x)) ^= *((LTC_FAST_TYPE*)((unsigned char *)pt + x)); - } - #else - for (x = 0; x < cbc->blocklen; x++) { - cbc->IV[x] ^= pt[x]; - } + for (x = 0; x < cbc->blocklen; x += sizeof(LTC_FAST_TYPE)) { + *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)cbc->IV + x)) ^= *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)pt + x)); + } + #else + for (x = 0; x < cbc->blocklen; x++) { + cbc->IV[x] ^= pt[x]; + } #endif /* encrypt */ @@ -72,27 +70,27 @@ return err; } - /* store IV [ciphertext] for a future block */ + /* store IV [ciphertext] for a future block */ #if defined(LTC_FAST) - for (x = 0; x < cbc->blocklen; x += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)((unsigned char *)cbc->IV + x)) = *((LTC_FAST_TYPE*)((unsigned char *)ct + x)); - } - #else - for (x = 0; x < cbc->blocklen; x++) { - cbc->IV[x] = ct[x]; - } + for (x = 0; x < cbc->blocklen; x += sizeof(LTC_FAST_TYPE)) { + *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)cbc->IV + x)) = *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)ct + x)); + } + #else + for (x = 0; x < cbc->blocklen; x++) { + cbc->IV[x] = ct[x]; + } #endif - - ct += cbc->blocklen; - pt += cbc->blocklen; - len -= cbc->blocklen; - } + + ct += cbc->blocklen; + pt += cbc->blocklen; + len -= cbc->blocklen; + } } return CRYPT_OK; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/cbc/cbc_getiv.c --- a/libtomcrypt/src/modes/cbc/cbc_getiv.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/cbc/cbc_getiv.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -18,9 +16,9 @@ #ifdef LTC_CBC_MODE /** - Get the current initial vector - @param IV [out] The destination of the initial vector - @param len [in/out] The max size and resulting size of the initial vector + Get the current initialization vector + @param IV [out] The destination of the initialization vector + @param len [in/out] The max size and resulting size of the initialization vector @param cbc The CBC state @return CRYPT_OK if successful */ @@ -41,6 +39,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/cbc/cbc_setiv.c --- a/libtomcrypt/src/modes/cbc/cbc_setiv.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/cbc/cbc_setiv.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -19,8 +17,8 @@ #ifdef LTC_CBC_MODE /** - Set an initial vector - @param IV The initial vector + Set an initialization vector + @param IV The initialization vector @param len The length of the vector (in octets) @param cbc The CBC state @return CRYPT_OK if successful @@ -36,9 +34,9 @@ return CRYPT_OK; } -#endif +#endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/cbc/cbc_start.c --- a/libtomcrypt/src/modes/cbc/cbc_start.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/cbc/cbc_start.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -20,18 +18,18 @@ /** Initialize a CBC context @param cipher The index of the cipher desired - @param IV The initial vector - @param key The secret key + @param IV The initialization vector + @param key The secret key @param keylen The length of the secret key (octets) @param num_rounds Number of rounds in the cipher desired (0 for default) @param cbc The CBC state to initialize @return CRYPT_OK if successful */ -int cbc_start(int cipher, const unsigned char *IV, const unsigned char *key, +int cbc_start(int cipher, const unsigned char *IV, const unsigned char *key, int keylen, int num_rounds, symmetric_CBC *cbc) { int x, err; - + LTC_ARGCHK(IV != NULL); LTC_ARGCHK(key != NULL); LTC_ARGCHK(cbc != NULL); @@ -57,6 +55,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/cfb/cfb_decrypt.c --- a/libtomcrypt/src/modes/cfb/cfb_decrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/cfb/cfb_decrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -52,7 +50,7 @@ } cfb->pad[cfb->padlen] = *ct; *pt = *ct ^ cfb->IV[cfb->padlen]; - ++pt; + ++pt; ++ct; ++(cfb->padlen); } @@ -62,6 +60,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/cfb/cfb_done.c --- a/libtomcrypt/src/modes/cfb/cfb_done.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/cfb/cfb_done.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -33,10 +31,10 @@ return CRYPT_OK; } - + #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/cfb/cfb_encrypt.c --- a/libtomcrypt/src/modes/cfb/cfb_encrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/cfb/cfb_encrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -51,7 +49,7 @@ cfb->padlen = 0; } cfb->pad[cfb->padlen] = (*ct = *pt ^ cfb->IV[cfb->padlen]); - ++pt; + ++pt; ++ct; ++(cfb->padlen); } @@ -60,6 +58,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/cfb/cfb_getiv.c --- a/libtomcrypt/src/modes/cfb/cfb_getiv.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/cfb/cfb_getiv.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -18,9 +16,9 @@ #ifdef LTC_CFB_MODE /** - Get the current initial vector - @param IV [out] The destination of the initial vector - @param len [in/out] The max size and resulting size of the initial vector + Get the current initialization vector + @param IV [out] The destination of the initialization vector + @param len [in/out] The max size and resulting size of the initialization vector @param cfb The CFB state @return CRYPT_OK if successful */ @@ -41,6 +39,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/cfb/cfb_setiv.c --- a/libtomcrypt/src/modes/cfb/cfb_setiv.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/cfb/cfb_setiv.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,21 +5,19 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file cfb_setiv.c CFB implementation, set IV, Tom St Denis -*/ +*/ #ifdef LTC_CFB_MODE /** - Set an initial vector - @param IV The initial vector + Set an initialization vector + @param IV The initialization vector @param len The length of the vector (in octets) @param cfb The CFB state @return CRYPT_OK if successful @@ -27,26 +25,26 @@ int cfb_setiv(const unsigned char *IV, unsigned long len, symmetric_CFB *cfb) { int err; - + LTC_ARGCHK(IV != NULL); LTC_ARGCHK(cfb != NULL); if ((err = cipher_is_valid(cfb->cipher)) != CRYPT_OK) { return err; } - + if (len != (unsigned long)cfb->blocklen) { return CRYPT_INVALID_ARG; } - + /* force next block */ cfb->padlen = 0; return cipher_descriptor[cfb->cipher].ecb_encrypt(IV, cfb->IV, &cfb->key); } -#endif +#endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/cfb/cfb_start.c --- a/libtomcrypt/src/modes/cfb/cfb_start.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/cfb/cfb_start.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -21,14 +19,14 @@ /** Initialize a CFB context @param cipher The index of the cipher desired - @param IV The initial vector - @param key The secret key + @param IV The initialization vector + @param key The secret key @param keylen The length of the secret key (octets) @param num_rounds Number of rounds in the cipher desired (0 for default) @param cfb The CFB state to initialize @return CRYPT_OK if successful */ -int cfb_start(int cipher, const unsigned char *IV, const unsigned char *key, +int cfb_start(int cipher, const unsigned char *IV, const unsigned char *key, int keylen, int num_rounds, symmetric_CFB *cfb) { int x, err; @@ -40,7 +38,7 @@ if ((err = cipher_is_valid(cipher)) != CRYPT_OK) { return err; } - + /* copy data */ cfb->cipher = cipher; @@ -60,6 +58,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/ctr/ctr_decrypt.c --- a/libtomcrypt/src/modes/ctr/ctr_decrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/ctr/ctr_decrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -37,6 +35,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/ctr/ctr_done.c --- a/libtomcrypt/src/modes/ctr/ctr_done.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/ctr/ctr_done.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -33,10 +31,10 @@ return CRYPT_OK; } - + #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/ctr/ctr_encrypt.c --- a/libtomcrypt/src/modes/ctr/ctr_encrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/ctr/ctr_encrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -37,7 +35,7 @@ if ((err = cipher_is_valid(ctr->cipher)) != CRYPT_OK) { return err; } - + /* is blocklen/padlen valid? */ if (ctr->blocklen < 1 || ctr->blocklen > (int)sizeof(ctr->ctr) || ctr->padlen < 0 || ctr->padlen > (int)sizeof(ctr->pad)) { @@ -49,12 +47,14 @@ return CRYPT_INVALID_ARG; } #endif - + /* handle acceleration only if pad is empty, accelerator is present and length is >= a block size */ if ((ctr->padlen == ctr->blocklen) && cipher_descriptor[ctr->cipher].accel_ctr_encrypt != NULL && (len >= (unsigned long)ctr->blocklen)) { if ((err = cipher_descriptor[ctr->cipher].accel_ctr_encrypt(pt, ct, len/ctr->blocklen, ctr->ctr, ctr->mode, &ctr->key)) != CRYPT_OK) { return err; } + pt += (len / ctr->blocklen) * ctr->blocklen; + ct += (len / ctr->blocklen) * ctr->blocklen; len %= ctr->blocklen; } @@ -89,8 +89,8 @@ #ifdef LTC_FAST if (ctr->padlen == 0 && len >= (unsigned long)ctr->blocklen) { for (x = 0; x < ctr->blocklen; x += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)((unsigned char *)ct + x)) = *((LTC_FAST_TYPE*)((unsigned char *)pt + x)) ^ - *((LTC_FAST_TYPE*)((unsigned char *)ctr->pad + x)); + *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)ct + x)) = *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)pt + x)) ^ + *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)ctr->pad + x)); } pt += ctr->blocklen; ct += ctr->blocklen; @@ -98,7 +98,7 @@ ctr->padlen = ctr->blocklen; continue; } -#endif +#endif *ct++ = *pt++ ^ ctr->pad[ctr->padlen++]; --len; } @@ -107,6 +107,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/ctr/ctr_getiv.c --- a/libtomcrypt/src/modes/ctr/ctr_getiv.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/ctr/ctr_getiv.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -18,9 +16,9 @@ #ifdef LTC_CTR_MODE /** - Get the current initial vector - @param IV [out] The destination of the initial vector - @param len [in/out] The max size and resulting size of the initial vector + Get the current initialization vector + @param IV [out] The destination of the initialization vector + @param len [in/out] The max size and resulting size of the initialization vector @param ctr The CTR state @return CRYPT_OK if successful */ @@ -41,6 +39,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/ctr/ctr_setiv.c --- a/libtomcrypt/src/modes/ctr/ctr_setiv.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/ctr/ctr_setiv.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -14,12 +12,12 @@ @file ctr_setiv.c CTR implementation, set IV, Tom St Denis */ - + #ifdef LTC_CTR_MODE /** - Set an initial vector - @param IV The initial vector + Set an initialization vector + @param IV The initialization vector @param len The length of the vector (in octets) @param ctr The CTR state @return CRYPT_OK if successful @@ -27,7 +25,7 @@ int ctr_setiv(const unsigned char *IV, unsigned long len, symmetric_CTR *ctr) { int err; - + LTC_ARGCHK(IV != NULL); LTC_ARGCHK(ctr != NULL); @@ -35,22 +33,22 @@ if ((err = cipher_is_valid(ctr->cipher)) != CRYPT_OK) { return err; } - + if (len != (unsigned long)ctr->blocklen) { return CRYPT_INVALID_ARG; } /* set IV */ XMEMCPY(ctr->ctr, IV, len); - + /* force next block */ ctr->padlen = 0; return cipher_descriptor[ctr->cipher].ecb_encrypt(IV, ctr->pad, &ctr->key); } -#endif +#endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/ctr/ctr_start.c --- a/libtomcrypt/src/modes/ctr/ctr_start.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/ctr/ctr_start.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -21,17 +19,17 @@ /** Initialize a CTR context @param cipher The index of the cipher desired - @param IV The initial vector - @param key The secret key + @param IV The initialization vector + @param key The secret key @param keylen The length of the secret key (octets) @param num_rounds Number of rounds in the cipher desired (0 for default) @param ctr_mode The counter mode (CTR_COUNTER_LITTLE_ENDIAN or CTR_COUNTER_BIG_ENDIAN) @param ctr The CTR state to initialize @return CRYPT_OK if successful */ -int ctr_start( int cipher, - const unsigned char *IV, - const unsigned char *key, int keylen, +int ctr_start( int cipher, + const unsigned char *IV, + const unsigned char *key, int keylen, int num_rounds, int ctr_mode, symmetric_CTR *ctr) { @@ -91,11 +89,11 @@ } } - return cipher_descriptor[ctr->cipher].ecb_encrypt(ctr->ctr, ctr->pad, &ctr->key); + return cipher_descriptor[ctr->cipher].ecb_encrypt(ctr->ctr, ctr->pad, &ctr->key); } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/ctr/ctr_test.c --- a/libtomcrypt/src/modes/ctr/ctr_test.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/ctr/ctr_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -52,7 +50,7 @@ unsigned char buf[64]; symmetric_CTR ctr; - /* AES can be under rijndael or aes... try to find it */ + /* AES can be under rijndael or aes... try to find it */ if ((idx = find_cipher("aes")) == -1) { if ((idx = find_cipher("rijndael")) == -1) { return CRYPT_NOP; @@ -67,7 +65,7 @@ return err; } ctr_done(&ctr); - if (XMEMCMP(buf, tests[x].ct, tests[x].msglen)) { + if (compare_testvector(buf, tests[x].msglen, tests[x].ct, tests[x].msglen, "CTR", x)) { return CRYPT_FAIL_TESTVECTOR; } } @@ -77,9 +75,9 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/ecb/ecb_decrypt.c --- a/libtomcrypt/src/modes/ecb/ecb_decrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/ecb/ecb_decrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -56,6 +54,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/ecb/ecb_done.c --- a/libtomcrypt/src/modes/ecb/ecb_done.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/ecb/ecb_done.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -33,10 +31,10 @@ return CRYPT_OK; } - + #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/ecb/ecb_encrypt.c --- a/libtomcrypt/src/modes/ecb/ecb_encrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/ecb/ecb_encrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -56,6 +54,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/ecb/ecb_start.c --- a/libtomcrypt/src/modes/ecb/ecb_start.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/ecb/ecb_start.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -21,7 +19,7 @@ /** Initialize a ECB context @param cipher The index of the cipher desired - @param key The secret key + @param key The secret key @param keylen The length of the secret key (octets) @param num_rounds Number of rounds in the cipher desired (0 for default) @param ecb The ECB state to initialize @@ -43,6 +41,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/f8/f8_decrypt.c --- a/libtomcrypt/src/modes/f8/f8_decrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/f8/f8_decrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -36,8 +34,8 @@ #endif - + -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/f8/f8_done.c --- a/libtomcrypt/src/modes/f8/f8_done.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/f8/f8_done.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -33,10 +31,10 @@ return CRYPT_OK; } - + #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/f8/f8_encrypt.c --- a/libtomcrypt/src/modes/f8/f8_encrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/f8/f8_encrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -35,13 +33,13 @@ if ((err = cipher_is_valid(f8->cipher)) != CRYPT_OK) { return err; } - + /* is blocklen/padlen valid? */ if (f8->blocklen < 0 || f8->blocklen > (int)sizeof(f8->IV) || f8->padlen < 0 || f8->padlen > (int)sizeof(f8->IV)) { return CRYPT_INVALID_ARG; } - + zeromem(buf, sizeof(buf)); /* make sure the pad is empty */ @@ -64,8 +62,8 @@ STORE32H(f8->blockcnt, (buf+(f8->blocklen-4))); ++(f8->blockcnt); for (x = 0; x < f8->blocklen; x += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)(&ct[x])) = *((LTC_FAST_TYPE*)(&pt[x])) ^ *((LTC_FAST_TYPE*)(&f8->IV[x])); - *((LTC_FAST_TYPE*)(&f8->IV[x])) ^= *((LTC_FAST_TYPE*)(&f8->MIV[x])) ^ *((LTC_FAST_TYPE*)(&buf[x])); + *(LTC_FAST_TYPE_PTR_CAST(&ct[x])) = *(LTC_FAST_TYPE_PTR_CAST(&pt[x])) ^ *(LTC_FAST_TYPE_PTR_CAST(&f8->IV[x])); + *(LTC_FAST_TYPE_PTR_CAST(&f8->IV[x])) ^= *(LTC_FAST_TYPE_PTR_CAST(&f8->MIV[x])) ^ *(LTC_FAST_TYPE_PTR_CAST(&buf[x])); } if ((err = cipher_descriptor[f8->cipher].ecb_encrypt(f8->IV, f8->IV, &f8->key)) != CRYPT_OK) { return err; @@ -75,7 +73,7 @@ ct += x; } } -#endif +#endif while (len > 0) { if (f8->padlen == f8->blocklen) { @@ -98,6 +96,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/f8/f8_getiv.c --- a/libtomcrypt/src/modes/f8/f8_getiv.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/f8/f8_getiv.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -18,9 +16,9 @@ #ifdef LTC_F8_MODE /** - Get the current initial vector - @param IV [out] The destination of the initial vector - @param len [in/out] The max size and resulting size of the initial vector + Get the current initialization vector + @param IV [out] The destination of the initialization vector + @param len [in/out] The max size and resulting size of the initialization vector @param f8 The F8 state @return CRYPT_OK if successful */ @@ -41,6 +39,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/f8/f8_setiv.c --- a/libtomcrypt/src/modes/f8/f8_setiv.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/f8/f8_setiv.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -18,8 +16,8 @@ #ifdef LTC_F8_MODE /** - Set an initial vector - @param IV The initial vector + Set an initialization vector + @param IV The initialization vector @param len The length of the vector (in octets) @param f8 The F8 state @return CRYPT_OK if successful @@ -44,9 +42,9 @@ return cipher_descriptor[f8->cipher].ecb_encrypt(IV, f8->IV, &f8->key); } -#endif +#endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/f8/f8_start.c --- a/libtomcrypt/src/modes/f8/f8_start.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/f8/f8_start.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -21,8 +19,8 @@ /** Initialize an F8 context @param cipher The index of the cipher desired - @param IV The initial vector - @param key The secret key + @param IV The initialization vector + @param key The secret key @param keylen The length of the secret key (octets) @param salt_key The salting key for the IV @param skeylen The length of the salting key (octets) @@ -30,8 +28,8 @@ @param f8 The F8 state to initialize @return CRYPT_OK if successful */ -int f8_start( int cipher, const unsigned char *IV, - const unsigned char *key, int keylen, +int f8_start( int cipher, const unsigned char *IV, + const unsigned char *key, int keylen, const unsigned char *salt_key, int skeylen, int num_rounds, symmetric_F8 *f8) { @@ -58,7 +56,7 @@ f8->cipher = cipher; f8->blocklen = cipher_descriptor[cipher].block_length; f8->padlen = f8->blocklen; - + /* now get key ^ salt_key [extend salt_ket with 0x55 as required to match length] */ zeromem(tkey, sizeof(tkey)); for (x = 0; x < keylen && x < (int)sizeof(tkey); x++) { @@ -66,16 +64,16 @@ } for (x = 0; x < skeylen && x < (int)sizeof(tkey); x++) { tkey[x] ^= salt_key[x]; - } + } for (; x < keylen && x < (int)sizeof(tkey); x++) { tkey[x] ^= 0x55; } - + /* now encrypt with tkey[0..keylen-1] the IV and use that as the IV */ if ((err = cipher_descriptor[cipher].setup(tkey, keylen, num_rounds, &f8->key)) != CRYPT_OK) { return err; } - + /* encrypt IV */ if ((err = cipher_descriptor[f8->cipher].ecb_encrypt(IV, f8->MIV, &f8->key)) != CRYPT_OK) { cipher_descriptor[f8->cipher].done(&f8->key); @@ -83,16 +81,16 @@ } zeromem(tkey, sizeof(tkey)); zeromem(f8->IV, sizeof(f8->IV)); - + /* terminate this cipher */ cipher_descriptor[f8->cipher].done(&f8->key); - + /* init the cipher */ return cipher_descriptor[cipher].setup(key, keylen, num_rounds, &f8->key); } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/f8/f8_test_mode.c --- a/libtomcrypt/src/modes/f8/f8_test_mode.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/f8/f8_test_mode.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -23,36 +21,36 @@ #ifndef LTC_TEST return CRYPT_NOP; #else - static const unsigned char key[16] = { 0x23, 0x48, 0x29, 0x00, 0x84, 0x67, 0xbe, 0x18, + static const unsigned char key[16] = { 0x23, 0x48, 0x29, 0x00, 0x84, 0x67, 0xbe, 0x18, 0x6c, 0x3d, 0xe1, 0x4a, 0xae, 0x72, 0xd6, 0x2c }; static const unsigned char salt[4] = { 0x32, 0xf2, 0x87, 0x0d }; - static const unsigned char IV[16] = { 0x00, 0x6e, 0x5c, 0xba, 0x50, 0x68, 0x1d, 0xe5, + static const unsigned char IV[16] = { 0x00, 0x6e, 0x5c, 0xba, 0x50, 0x68, 0x1d, 0xe5, 0x5c, 0x62, 0x15, 0x99, 0xd4, 0x62, 0x56, 0x4a }; - static const unsigned char pt[39] = { 0x70, 0x73, 0x65, 0x75, 0x64, 0x6f, 0x72, 0x61, + static const unsigned char pt[39] = { 0x70, 0x73, 0x65, 0x75, 0x64, 0x6f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x6e, 0x65, 0x73, 0x73, - 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x65, 0x78, 0x74, 0x20, 0x62, 0x65, 0x73, 0x74, 0x20, 0x74, 0x68, 0x69, 0x6e, 0x67 }; - static const unsigned char ct[39] = { 0x01, 0x9c, 0xe7, 0xa2, 0x6e, 0x78, 0x54, 0x01, + static const unsigned char ct[39] = { 0x01, 0x9c, 0xe7, 0xa2, 0x6e, 0x78, 0x54, 0x01, 0x4a, 0x63, 0x66, 0xaa, 0x95, 0xd4, 0xee, 0xfd, - 0x1a, 0xd4, 0x17, 0x2a, 0x14, 0xf9, 0xfa, 0xf4, + 0x1a, 0xd4, 0x17, 0x2a, 0x14, 0xf9, 0xfa, 0xf4, 0x55, 0xb7, 0xf1, 0xd4, 0xb6, 0x2b, 0xd0, 0x8f, 0x56, 0x2c, 0x0e, 0xef, 0x7c, 0x48, 0x02 }; unsigned char buf[39]; symmetric_F8 f8; int err, idx; - + idx = find_cipher("aes"); if (idx == -1) { idx = find_cipher("rijndael"); if (idx == -1) return CRYPT_NOP; - } - + } + /* initialize the context */ if ((err = f8_start(idx, IV, key, sizeof(key), salt, sizeof(salt), 0, &f8)) != CRYPT_OK) { return err; } - + /* encrypt block */ if ((err = f8_encrypt(pt, buf, sizeof(pt), &f8)) != CRYPT_OK) { f8_done(&f8); @@ -61,16 +59,16 @@ f8_done(&f8); /* compare */ - if (XMEMCMP(buf, ct, sizeof(ct))) { + if (compare_testvector(buf, sizeof(ct), ct, sizeof(ct), "f8", 0)) { return CRYPT_FAIL_TESTVECTOR; - } - + } + return CRYPT_OK; -#endif -} +#endif +} #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/lrw/lrw_decrypt.c --- a/libtomcrypt/src/modes/lrw/lrw_decrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/lrw/lrw_decrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -46,6 +44,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/lrw/lrw_done.c --- a/libtomcrypt/src/modes/lrw/lrw_done.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/lrw/lrw_done.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -22,12 +20,12 @@ @param lrw The state to terminate @return CRYPT_OK if successful */ -int lrw_done(symmetric_LRW *lrw) +int lrw_done(symmetric_LRW *lrw) { int err; LTC_ARGCHK(lrw != NULL); - + if ((err = cipher_is_valid(lrw->cipher)) != CRYPT_OK) { return err; } @@ -37,6 +35,6 @@ } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/lrw/lrw_encrypt.c --- a/libtomcrypt/src/modes/lrw/lrw_encrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/lrw/lrw_encrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -16,7 +14,7 @@ */ #ifdef LTC_LRW_MODE - + /** LRW encrypt blocks @param pt The plaintext @@ -45,6 +43,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/lrw/lrw_getiv.c --- a/libtomcrypt/src/modes/lrw/lrw_getiv.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/lrw/lrw_getiv.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -40,6 +38,6 @@ } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/lrw/lrw_process.c --- a/libtomcrypt/src/modes/lrw/lrw_process.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/lrw/lrw_process.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -30,7 +28,7 @@ { unsigned char prod[16]; int x, err; -#ifdef LRW_TABLES +#ifdef LTC_LRW_TABLES int y; #endif @@ -49,18 +47,18 @@ /* increment IV */ for (x = 15; x >= 0; x--) { lrw->IV[x] = (lrw->IV[x] + 1) & 255; - if (lrw->IV[x]) { + if (lrw->IV[x]) { break; } } /* update pad */ -#ifdef LRW_TABLES +#ifdef LTC_LRW_TABLES /* for each byte changed we undo it's affect on the pad then add the new product */ for (; x < 16; x++) { #ifdef LTC_FAST for (y = 0; y < 16; y += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE *)(lrw->pad + y)) ^= *((LTC_FAST_TYPE *)(&lrw->PC[x][lrw->IV[x]][y])) ^ *((LTC_FAST_TYPE *)(&lrw->PC[x][(lrw->IV[x]-1)&255][y])); + *(LTC_FAST_TYPE_PTR_CAST(lrw->pad + y)) ^= *(LTC_FAST_TYPE_PTR_CAST(&lrw->PC[x][lrw->IV[x]][y])) ^ *(LTC_FAST_TYPE_PTR_CAST(&lrw->PC[x][(lrw->IV[x]-1)&255][y])); } #else for (y = 0; y < 16; y++) { @@ -75,7 +73,7 @@ /* xor prod */ #ifdef LTC_FAST for (x = 0; x < 16; x += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE *)(ct + x)) = *((LTC_FAST_TYPE *)(pt + x)) ^ *((LTC_FAST_TYPE *)(prod + x)); + *(LTC_FAST_TYPE_PTR_CAST(ct + x)) = *(LTC_FAST_TYPE_PTR_CAST(pt + x)) ^ *(LTC_FAST_TYPE_PTR_CAST(prod + x)); } #else for (x = 0; x < 16; x++) { @@ -92,19 +90,19 @@ if ((err = cipher_descriptor[lrw->cipher].ecb_decrypt(ct, ct, &lrw->key)) != CRYPT_OK) { return err; } - } + } /* xor prod */ #ifdef LTC_FAST for (x = 0; x < 16; x += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE *)(ct + x)) = *((LTC_FAST_TYPE *)(ct + x)) ^ *((LTC_FAST_TYPE *)(prod + x)); + *(LTC_FAST_TYPE_PTR_CAST(ct + x)) = *(LTC_FAST_TYPE_PTR_CAST(ct + x)) ^ *(LTC_FAST_TYPE_PTR_CAST(prod + x)); } #else for (x = 0; x < 16; x++) { ct[x] = ct[x] ^ prod[x]; } #endif - + /* move to next */ pt += 16; ct += 16; @@ -113,8 +111,8 @@ return CRYPT_OK; } - + #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/lrw/lrw_setiv.c --- a/libtomcrypt/src/modes/lrw/lrw_setiv.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/lrw/lrw_setiv.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -27,7 +25,7 @@ int lrw_setiv(const unsigned char *IV, unsigned long len, symmetric_LRW *lrw) { int err; -#ifdef LRW_TABLES +#ifdef LTC_LRW_TABLES unsigned char T[16]; int x, y; #endif @@ -51,12 +49,12 @@ return CRYPT_OK; } -#ifdef LRW_TABLES +#ifdef LTC_LRW_TABLES XMEMCPY(T, &lrw->PC[0][IV[0]][0], 16); for (x = 1; x < 16; x++) { #ifdef LTC_FAST for (y = 0; y < 16; y += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE *)(T + y)) ^= *((LTC_FAST_TYPE *)(&lrw->PC[x][IV[x]][y])); + *(LTC_FAST_TYPE_PTR_CAST(T + y)) ^= *(LTC_FAST_TYPE_PTR_CAST(&lrw->PC[x][IV[x]][y])); } #else for (y = 0; y < 16; y++) { @@ -65,8 +63,8 @@ #endif } XMEMCPY(lrw->pad, T, 16); -#else - gcm_gf_mult(lrw->tweak, IV, lrw->pad); +#else + gcm_gf_mult(lrw->tweak, IV, lrw->pad); #endif return CRYPT_OK; @@ -74,6 +72,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/lrw/lrw_start.c --- a/libtomcrypt/src/modes/lrw/lrw_start.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/lrw/lrw_start.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -19,9 +17,9 @@ /** Initialize the LRW context - @param cipher The cipher desired, must be a 128-bit block cipher + @param cipher The cipher desired, must be a 128-bit block cipher @param IV The index value, must be 128-bits - @param key The cipher key + @param key The cipher key @param keylen The length of the cipher key in octets @param tweak The tweak value (second key), must be 128-bits @param num_rounds The number of rounds for the cipher (0 == default) @@ -32,19 +30,19 @@ const unsigned char *IV, const unsigned char *key, int keylen, const unsigned char *tweak, - int num_rounds, + int num_rounds, symmetric_LRW *lrw) { int err; -#ifdef LRW_TABLES +#ifdef LTC_LRW_TABLES unsigned char B[16]; int x, y, z, t; #endif - LTC_ARGCHK(IV != NULL); - LTC_ARGCHK(key != NULL); - LTC_ARGCHK(tweak != NULL); - LTC_ARGCHK(lrw != NULL); + LTC_ARGCHK(IV != NULL); + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(tweak != NULL); + LTC_ARGCHK(lrw != NULL); #ifdef LTC_FAST if (16 % sizeof(LTC_FAST_TYPE)) { @@ -69,7 +67,7 @@ /* copy the IV and tweak */ XMEMCPY(lrw->tweak, tweak, 16); -#ifdef LRW_TABLES +#ifdef LTC_LRW_TABLES /* setup tables */ /* generate the first table as it has no shifting (from which we make the other tables) */ zeromem(B, 16); @@ -88,8 +86,8 @@ } lrw->PC[x][y][0] = gcm_shift_table[t<<1]; lrw->PC[x][y][1] ^= gcm_shift_table[(t<<1)+1]; - } - } + } + } #endif /* generate first pad */ @@ -98,6 +96,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/lrw/lrw_test.c --- a/libtomcrypt/src/modes/lrw/lrw_test.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/lrw/lrw_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -88,7 +86,7 @@ } /* check pad against expected tweak */ - if (XMEMCMP(tests[x].expected_tweak, lrw.pad, 16)) { + if (compare_testvector(tests[x].expected_tweak, 16, lrw.pad, 16, "LRW Tweak", x)) { lrw_done(&lrw); return CRYPT_FAIL_TESTVECTOR; } @@ -99,13 +97,13 @@ return err; } - if (XMEMCMP(buf[0], tests[x].C, 16)) { + if (compare_testvector(buf[0], 16, tests[x].C, 16, "LRW Encrypt", x)) { lrw_done(&lrw); return CRYPT_FAIL_TESTVECTOR; } /* process block */ - if ((err = lrw_setiv(tests[x].IV, 16, &lrw)) != CRYPT_OK) { + if ((err = lrw_setiv(tests[x].IV, 16, &lrw)) != CRYPT_OK) { lrw_done(&lrw); return err; } @@ -115,15 +113,15 @@ return err; } - if (XMEMCMP(buf[1], tests[x].P, 16)) { + if (compare_testvector(buf[1], 16, tests[x].P, 16, "LRW Decrypt", x)) { lrw_done(&lrw); return CRYPT_FAIL_TESTVECTOR; } if ((err = lrw_done(&lrw)) != CRYPT_OK) { return err; } - } - return CRYPT_OK; + } + return CRYPT_OK; #endif } @@ -131,6 +129,6 @@ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/ofb/ofb_decrypt.c --- a/libtomcrypt/src/modes/ofb/ofb_decrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/ofb/ofb_decrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -36,8 +34,8 @@ #endif - + -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/ofb/ofb_done.c --- a/libtomcrypt/src/modes/ofb/ofb_done.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/ofb/ofb_done.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -33,10 +31,10 @@ return CRYPT_OK; } - + #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/ofb/ofb_encrypt.c --- a/libtomcrypt/src/modes/ofb/ofb_encrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/ofb/ofb_encrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -34,13 +32,13 @@ if ((err = cipher_is_valid(ofb->cipher)) != CRYPT_OK) { return err; } - + /* is blocklen/padlen valid? */ if (ofb->blocklen < 0 || ofb->blocklen > (int)sizeof(ofb->IV) || ofb->padlen < 0 || ofb->padlen > (int)sizeof(ofb->IV)) { return CRYPT_INVALID_ARG; } - + while (len-- > 0) { if (ofb->padlen == ofb->blocklen) { if ((err = cipher_descriptor[ofb->cipher].ecb_encrypt(ofb->IV, ofb->IV, &ofb->key)) != CRYPT_OK) { @@ -55,6 +53,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/ofb/ofb_getiv.c --- a/libtomcrypt/src/modes/ofb/ofb_getiv.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/ofb/ofb_getiv.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -18,9 +16,9 @@ #ifdef LTC_OFB_MODE /** - Get the current initial vector - @param IV [out] The destination of the initial vector - @param len [in/out] The max size and resulting size of the initial vector + Get the current initialization vector + @param IV [out] The destination of the initialization vector + @param len [in/out] The max size and resulting size of the initialization vector @param ofb The OFB state @return CRYPT_OK if successful */ @@ -41,6 +39,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/ofb/ofb_setiv.c --- a/libtomcrypt/src/modes/ofb/ofb_setiv.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/ofb/ofb_setiv.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -18,8 +16,8 @@ #ifdef LTC_OFB_MODE /** - Set an initial vector - @param IV The initial vector + Set an initialization vector + @param IV The initialization vector @param len The length of the vector (in octets) @param ofb The OFB state @return CRYPT_OK if successful @@ -44,9 +42,9 @@ return cipher_descriptor[ofb->cipher].ecb_encrypt(IV, ofb->IV, &ofb->key); } -#endif +#endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/ofb/ofb_start.c --- a/libtomcrypt/src/modes/ofb/ofb_start.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/ofb/ofb_start.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -21,14 +19,14 @@ /** Initialize a OFB context @param cipher The index of the cipher desired - @param IV The initial vector - @param key The secret key + @param IV The initialization vector + @param key The secret key @param keylen The length of the secret key (octets) @param num_rounds Number of rounds in the cipher desired (0 for default) @param ofb The OFB state to initialize @return CRYPT_OK if successful */ -int ofb_start(int cipher, const unsigned char *IV, const unsigned char *key, +int ofb_start(int cipher, const unsigned char *IV, const unsigned char *key, int keylen, int num_rounds, symmetric_OFB *ofb) { int x, err; @@ -55,6 +53,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/xts/xts_decrypt.c --- a/libtomcrypt/src/modes/xts/xts_decrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/xts/xts_decrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,18 +5,16 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** - Source donated by Elliptic Semiconductor Inc (www.ellipticsemi.com) to the LibTom Projects -*/ +/** + Source donated by Elliptic Semiconductor Inc (www.ellipticsemi.com) to the LibTom Projects + */ #ifdef LTC_XTS_MODE -static int tweak_uncrypt(const unsigned char *C, unsigned char *P, unsigned char *T, symmetric_xts *xts) +static int _tweak_uncrypt(const unsigned char *C, unsigned char *P, unsigned char *T, symmetric_xts *xts) { unsigned long x; int err; @@ -24,23 +22,23 @@ /* tweak encrypt block i */ #ifdef LTC_FAST for (x = 0; x < 16; x += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)&P[x]) = *((LTC_FAST_TYPE*)&C[x]) ^ *((LTC_FAST_TYPE*)&T[x]); + *(LTC_FAST_TYPE_PTR_CAST(&P[x])) = *(LTC_FAST_TYPE_PTR_CAST(&C[x])) ^ *(LTC_FAST_TYPE_PTR_CAST(&T[x])); } #else for (x = 0; x < 16; x++) { - P[x] = C[x] ^ T[x]; + P[x] = C[x] ^ T[x]; } #endif - - err = cipher_descriptor[xts->cipher].ecb_decrypt(P, P, &xts->key1); + + err = cipher_descriptor[xts->cipher].ecb_decrypt(P, P, &xts->key1); #ifdef LTC_FAST for (x = 0; x < 16; x += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)&P[x]) ^= *((LTC_FAST_TYPE*)&T[x]); + *(LTC_FAST_TYPE_PTR_CAST(&P[x])) ^= *(LTC_FAST_TYPE_PTR_CAST(&T[x])); } #else for (x = 0; x < 16; x++) { - P[x] = P[x] ^ T[x]; + P[x] = P[x] ^ T[x]; } #endif @@ -48,30 +46,28 @@ xts_mult_x(T); return err; -} +} /** XTS Decryption - @param ct [in] Ciphertext - @param ptlen Length of plaintext (and ciphertext) - @param pt [out] Plaintext - @param tweak [in] The 128--bit encryption tweak (e.g. sector number) - @param xts The XTS structure - Returns CRYPT_OK upon success -*/int xts_decrypt( - const unsigned char *ct, unsigned long ptlen, - unsigned char *pt, - const unsigned char *tweak, - symmetric_xts *xts) + @param ct [in] Ciphertext + @param ptlen Length of plaintext (and ciphertext) + @param pt [out] Plaintext + @param tweak [in] The 128--bit encryption tweak (e.g. sector number) + @param xts The XTS structure + Returns CRYPT_OK upon success + */ +int xts_decrypt(const unsigned char *ct, unsigned long ptlen, unsigned char *pt, unsigned char *tweak, + symmetric_xts *xts) { unsigned char PP[16], CC[16], T[16]; unsigned long i, m, mo, lim; - int err; + int err; /* check inputs */ - LTC_ARGCHK(pt != NULL); - LTC_ARGCHK(ct != NULL); + LTC_ARGCHK(pt != NULL); + LTC_ARGCHK(ct != NULL); LTC_ARGCHK(tweak != NULL); - LTC_ARGCHK(xts != NULL); + LTC_ARGCHK(xts != NULL); /* check if valid */ if ((err = cipher_is_valid(xts->cipher)) != CRYPT_OK) { @@ -79,7 +75,7 @@ } /* get number of blocks */ - m = ptlen >> 4; + m = ptlen >> 4; mo = ptlen & 15; /* must have at least one full block */ @@ -87,55 +83,74 @@ return CRYPT_INVALID_ARG; } - /* encrypt the tweak */ - if ((err = cipher_descriptor[xts->cipher].ecb_encrypt(tweak, T, &xts->key2)) != CRYPT_OK) { - return err; - } - - /* for i = 0 to m-2 do */ if (mo == 0) { lim = m; } else { lim = m - 1; } - for (i = 0; i < lim; i++) { - err = tweak_uncrypt(ct, pt, T, xts); - ct += 16; - pt += 16; + if (cipher_descriptor[xts->cipher].accel_xts_decrypt && lim > 0) { + + /* use accelerated decryption for whole blocks */ + if ((err = cipher_descriptor[xts->cipher].accel_xts_decrypt(ct, pt, lim, tweak, &xts->key1, &xts->key2)) != + CRYPT_OK) { + return err; + } + ct += lim * 16; + pt += lim * 16; + + /* tweak is encrypted on output */ + XMEMCPY(T, tweak, sizeof(T)); + } else { + /* encrypt the tweak */ + if ((err = cipher_descriptor[xts->cipher].ecb_encrypt(tweak, T, &xts->key2)) != CRYPT_OK) { + return err; + } + + for (i = 0; i < lim; i++) { + if ((err = _tweak_uncrypt(ct, pt, T, xts)) != CRYPT_OK) { + return err; + } + ct += 16; + pt += 16; + } } - + /* if ptlen not divide 16 then */ if (mo > 0) { XMEMCPY(CC, T, 16); xts_mult_x(CC); /* PP = tweak decrypt block m-1 */ - if ((err = tweak_uncrypt(ct, PP, CC, xts)) != CRYPT_OK) { + if ((err = _tweak_uncrypt(ct, PP, CC, xts)) != CRYPT_OK) { return err; } /* Pm = first ptlen % 16 bytes of PP */ for (i = 0; i < mo; i++) { - CC[i] = ct[16+i]; - pt[16+i] = PP[i]; + CC[i] = ct[16 + i]; + pt[16 + i] = PP[i]; } for (; i < 16; i++) { - CC[i] = PP[i]; + CC[i] = PP[i]; } /* Pm-1 = Tweak uncrypt CC */ - if ((err = tweak_uncrypt(CC, pt, T, xts)) != CRYPT_OK) { + if ((err = _tweak_uncrypt(CC, pt, T, xts)) != CRYPT_OK) { return err; } } + /* Decrypt the tweak back */ + if ((err = cipher_descriptor[xts->cipher].ecb_decrypt(T, tweak, &xts->key2)) != CRYPT_OK) { + return err; + } + return CRYPT_OK; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ - +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/xts/xts_done.c --- a/libtomcrypt/src/modes/xts/xts_done.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/xts/xts_done.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,19 +5,17 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** Source donated by Elliptic Semiconductor Inc (www.ellipticsemi.com) to the LibTom Projects */ #ifdef LTC_XTS_MODE -/** Terminate XTS state - @param XTS The state to terminate +/** Terminate XTS state + @param xts The state to terminate */ void xts_done(symmetric_xts *xts) { @@ -28,7 +26,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ - +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/xts/xts_encrypt.c --- a/libtomcrypt/src/modes/xts/xts_encrypt.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/xts/xts_encrypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,18 +5,16 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** - Source donated by Elliptic Semiconductor Inc (www.ellipticsemi.com) to the LibTom Projects -*/ +/** + Source donated by Elliptic Semiconductor Inc (www.ellipticsemi.com) to the LibTom Projects + */ #ifdef LTC_XTS_MODE -static int tweak_crypt(const unsigned char *P, unsigned char *C, unsigned char *T, symmetric_xts *xts) +static int _tweak_crypt(const unsigned char *P, unsigned char *C, unsigned char *T, symmetric_xts *xts) { unsigned long x; int err; @@ -24,25 +22,25 @@ /* tweak encrypt block i */ #ifdef LTC_FAST for (x = 0; x < 16; x += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)&C[x]) = *((LTC_FAST_TYPE*)&P[x]) ^ *((LTC_FAST_TYPE*)&T[x]); + *(LTC_FAST_TYPE_PTR_CAST(&C[x])) = *(LTC_FAST_TYPE_PTR_CAST(&P[x])) ^ *(LTC_FAST_TYPE_PTR_CAST(&T[x])); } #else for (x = 0; x < 16; x++) { C[x] = P[x] ^ T[x]; } #endif - + if ((err = cipher_descriptor[xts->cipher].ecb_encrypt(C, C, &xts->key1)) != CRYPT_OK) { return err; } #ifdef LTC_FAST for (x = 0; x < 16; x += sizeof(LTC_FAST_TYPE)) { - *((LTC_FAST_TYPE*)&C[x]) ^= *((LTC_FAST_TYPE*)&T[x]); + *(LTC_FAST_TYPE_PTR_CAST(&C[x])) ^= *(LTC_FAST_TYPE_PTR_CAST(&T[x])); } #else for (x = 0; x < 16; x++) { - C[x] = C[x] ^ T[x]; + C[x] = C[x] ^ T[x]; } #endif @@ -50,31 +48,28 @@ xts_mult_x(T); return CRYPT_OK; -} +} /** XTS Encryption - @param pt [in] Plaintext - @param ptlen Length of plaintext (and ciphertext) - @param ct [out] Ciphertext - @param tweak [in] The 128--bit encryption tweak (e.g. sector number) - @param xts The XTS structure - Returns CRYPT_OK upon success -*/ -int xts_encrypt( - const unsigned char *pt, unsigned long ptlen, - unsigned char *ct, - const unsigned char *tweak, - symmetric_xts *xts) + @param pt [in] Plaintext + @param ptlen Length of plaintext (and ciphertext) + @param ct [out] Ciphertext + @param tweak [in] The 128--bit encryption tweak (e.g. sector number) + @param xts The XTS structure + Returns CRYPT_OK upon success + */ +int xts_encrypt(const unsigned char *pt, unsigned long ptlen, unsigned char *ct, unsigned char *tweak, + symmetric_xts *xts) { unsigned char PP[16], CC[16], T[16]; unsigned long i, m, mo, lim; - int err; + int err; /* check inputs */ - LTC_ARGCHK(pt != NULL); - LTC_ARGCHK(ct != NULL); + LTC_ARGCHK(pt != NULL); + LTC_ARGCHK(ct != NULL); LTC_ARGCHK(tweak != NULL); - LTC_ARGCHK(xts != NULL); + LTC_ARGCHK(xts != NULL); /* check if valid */ if ((err = cipher_is_valid(xts->cipher)) != CRYPT_OK) { @@ -82,61 +77,81 @@ } /* get number of blocks */ - m = ptlen >> 4; + m = ptlen >> 4; mo = ptlen & 15; - /* must have at least one full block */ + /* must have at least one full block */ if (m == 0) { return CRYPT_INVALID_ARG; } - /* encrypt the tweak */ - if ((err = cipher_descriptor[xts->cipher].ecb_encrypt(tweak, T, &xts->key2)) != CRYPT_OK) { - return err; - } - - /* for i = 0 to m-2 do */ if (mo == 0) { lim = m; } else { lim = m - 1; } - for (i = 0; i < lim; i++) { - err = tweak_crypt(pt, ct, T, xts); - ct += 16; - pt += 16; + if (cipher_descriptor[xts->cipher].accel_xts_encrypt && lim > 0) { + + /* use accelerated encryption for whole blocks */ + if ((err = cipher_descriptor[xts->cipher].accel_xts_encrypt(pt, ct, lim, tweak, &xts->key1, &xts->key2)) != + CRYPT_OK) { + return err; + } + ct += lim * 16; + pt += lim * 16; + + /* tweak is encrypted on output */ + XMEMCPY(T, tweak, sizeof(T)); + } else { + + /* encrypt the tweak */ + if ((err = cipher_descriptor[xts->cipher].ecb_encrypt(tweak, T, &xts->key2)) != CRYPT_OK) { + return err; + } + + for (i = 0; i < lim; i++) { + if ((err = _tweak_crypt(pt, ct, T, xts)) != CRYPT_OK) { + return err; + } + ct += 16; + pt += 16; + } } - + /* if ptlen not divide 16 then */ if (mo > 0) { /* CC = tweak encrypt block m-1 */ - if ((err = tweak_crypt(pt, CC, T, xts)) != CRYPT_OK) { + if ((err = _tweak_crypt(pt, CC, T, xts)) != CRYPT_OK) { return err; } /* Cm = first ptlen % 16 bytes of CC */ for (i = 0; i < mo; i++) { - PP[i] = pt[16+i]; - ct[16+i] = CC[i]; + PP[i] = pt[16 + i]; + ct[16 + i] = CC[i]; } for (; i < 16; i++) { - PP[i] = CC[i]; + PP[i] = CC[i]; } /* Cm-1 = Tweak encrypt PP */ - if ((err = tweak_crypt(PP, ct, T, xts)) != CRYPT_OK) { + if ((err = _tweak_crypt(PP, ct, T, xts)) != CRYPT_OK) { return err; } } + /* Decrypt the tweak back */ + if ((err = cipher_descriptor[xts->cipher].ecb_decrypt(T, tweak, &xts->key2)) != CRYPT_OK) { + return err; + } + return err; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ - +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/xts/xts_init.c --- a/libtomcrypt/src/modes/xts/xts_init.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/xts/xts_init.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,18 +5,15 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** Source donated by Elliptic Semiconductor Inc (www.ellipticsemi.com) to the LibTom Projects */ #ifdef LTC_XTS_MODE - /** Start XTS mode @param cipher The index of the cipher to use @param key1 The encrypt key @@ -26,19 +23,15 @@ @param xts [out] XTS structure Returns CRYPT_OK upon success. */ -int xts_start( int cipher, - const unsigned char *key1, - const unsigned char *key2, - unsigned long keylen, - int num_rounds, - symmetric_xts *xts) +int xts_start(int cipher, const unsigned char *key1, const unsigned char *key2, unsigned long keylen, int num_rounds, + symmetric_xts *xts) { int err; /* check inputs */ - LTC_ARGCHK(key1 != NULL); - LTC_ARGCHK(key2 != NULL); - LTC_ARGCHK(xts != NULL); + LTC_ARGCHK(key1 != NULL); + LTC_ARGCHK(key2 != NULL); + LTC_ARGCHK(xts != NULL); /* check if valid */ if ((err = cipher_is_valid(cipher)) != CRYPT_OK) { @@ -63,7 +56,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ - +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/xts/xts_mult_x.c --- a/libtomcrypt/src/modes/xts/xts_mult_x.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/xts/xts_mult_x.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,38 +5,35 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** Source donated by Elliptic Semiconductor Inc (www.ellipticsemi.com) to the LibTom Projects */ #ifdef LTC_XTS_MODE -/** multiply by x +/** multiply by x @param I The value to multiply by x (LFSR shift) */ void xts_mult_x(unsigned char *I) { - int x; - unsigned char t, tt; + int x; + unsigned char t, tt; - for (x = t = 0; x < 16; x++) { - tt = I[x] >> 7; - I[x] = ((I[x] << 1) | t) & 0xFF; - t = tt; - } - if (tt) { - I[0] ^= 0x87; - } + for (x = t = 0; x < 16; x++) { + tt = I[x] >> 7; + I[x] = ((I[x] << 1) | t) & 0xFF; + t = tt; + } + if (tt) { + I[0] ^= 0x87; + } } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ - +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/modes/xts/xts_test.c --- a/libtomcrypt/src/modes/xts/xts_test.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/modes/xts/xts_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,15 +5,70 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" #ifdef LTC_XTS_MODE -/** +#ifndef LTC_NO_TEST +static int _xts_test_accel_xts_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long blocks, + unsigned char *tweak, symmetric_key *skey1, symmetric_key *skey2) +{ + int ret; + symmetric_xts xts; + int (*orig)(const unsigned char *, unsigned char *, + unsigned long , unsigned char *, symmetric_key *, + symmetric_key *); + + /* AES can be under rijndael or aes... try to find it */ + if ((xts.cipher = find_cipher("aes")) == -1) { + if ((xts.cipher = find_cipher("rijndael")) == -1) { + return CRYPT_NOP; + } + } + orig = cipher_descriptor[xts.cipher].accel_xts_encrypt; + cipher_descriptor[xts.cipher].accel_xts_encrypt = NULL; + + XMEMCPY(&xts.key1, skey1, sizeof(symmetric_key)); + XMEMCPY(&xts.key2, skey2, sizeof(symmetric_key)); + + ret = xts_encrypt(pt, blocks << 4, ct, tweak, &xts); + cipher_descriptor[xts.cipher].accel_xts_encrypt = orig; + + return ret; +} + +static int _xts_test_accel_xts_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long blocks, + unsigned char *tweak, symmetric_key *skey1, symmetric_key *skey2) +{ + int ret; + symmetric_xts xts; + int (*orig)(const unsigned char *, unsigned char *, + unsigned long , unsigned char *, symmetric_key *, + symmetric_key *); + + /* AES can be under rijndael or aes... try to find it */ + if ((xts.cipher = find_cipher("aes")) == -1) { + if ((xts.cipher = find_cipher("rijndael")) == -1) { + return CRYPT_NOP; + } + } + orig = cipher_descriptor[xts.cipher].accel_xts_decrypt; + cipher_descriptor[xts.cipher].accel_xts_decrypt = NULL; + + XMEMCPY(&xts.key1, skey1, sizeof(symmetric_key)); + XMEMCPY(&xts.key2, skey2, sizeof(symmetric_key)); + + ret = xts_decrypt(ct, blocks << 4, pt, tweak, &xts); + cipher_descriptor[xts.cipher].accel_xts_decrypt = orig; + + return ret; +} +#endif + +/** Source donated by Elliptic Semiconductor Inc (www.ellipticsemi.com) to the LibTom Projects + Returns CRYPT_OK upon success. */ int xts_test(void) @@ -21,7 +76,8 @@ #ifdef LTC_NO_TEST return CRYPT_NOP; #else - static const struct { + static const struct + { int keylen; unsigned char key1[32]; unsigned char key2[32]; @@ -142,50 +198,102 @@ }, }; - unsigned char OUT[512], T[16]; - ulong64 seq; + unsigned char OUT[512], Torg[16], T[16]; + ulong64 seq; symmetric_xts xts; - int i, err, idx; + int i, j, k, err, idx; + unsigned long len; - /* AES can be under rijndael or aes... try to find it */ + /* AES can be under rijndael or aes... try to find it */ if ((idx = find_cipher("aes")) == -1) { if ((idx = find_cipher("rijndael")) == -1) { return CRYPT_NOP; } } + for (k = 0; k < 4; ++k) { + cipher_descriptor[idx].accel_xts_encrypt = NULL; + cipher_descriptor[idx].accel_xts_decrypt = NULL; + if (k & 0x1) { + cipher_descriptor[idx].accel_xts_encrypt = _xts_test_accel_xts_encrypt; + } + if (k & 0x2) { + cipher_descriptor[idx].accel_xts_decrypt = _xts_test_accel_xts_decrypt; + } + for (j = 0; j < 2; j++) { + for (i = 0; i < (int)(sizeof(tests) / sizeof(tests[0])); i++) { + /* skip the cases where + * the length is smaller than 2*blocklen + * or the length is not a multiple of 32 + */ + if ((j == 1) && ((tests[i].PTLEN < 32) || (tests[i].PTLEN % 32))) { + continue; + } + if ((k > 0) && (j == 1)) { + continue; + } + len = tests[i].PTLEN / 2; - for (i = 0; i < (int)(sizeof(tests)/sizeof(tests[0])); i++) { - err = xts_start(idx, tests[i].key1, tests[i].key2, tests[i].keylen/2, 0, &xts); - if (err != CRYPT_OK) { - return err; - } - - seq = tests[i].seqnum; - STORE64L(seq,T); - XMEMSET(T+8, 0, 8); + err = xts_start(idx, tests[i].key1, tests[i].key2, tests[i].keylen / 2, 0, &xts); + if (err != CRYPT_OK) { + return err; + } - err = xts_encrypt(tests[i].PTX, tests[i].PTLEN, OUT, T, &xts); - if (err != CRYPT_OK) { - xts_done(&xts); - return err; - } + seq = tests[i].seqnum; + STORE64L(seq, Torg); + XMEMSET(Torg + 8, 0, 8); - if (XMEMCMP(OUT, tests[i].CTX, tests[i].PTLEN)) { - xts_done(&xts); - return CRYPT_FAIL_TESTVECTOR; - } + XMEMCPY(T, Torg, sizeof(T)); + if (j == 0) { + err = xts_encrypt(tests[i].PTX, tests[i].PTLEN, OUT, T, &xts); + if (err != CRYPT_OK) { + xts_done(&xts); + return err; + } + } else { + err = xts_encrypt(tests[i].PTX, len, OUT, T, &xts); + if (err != CRYPT_OK) { + xts_done(&xts); + return err; + } + err = xts_encrypt(&tests[i].PTX[len], len, &OUT[len], T, &xts); + if (err != CRYPT_OK) { + xts_done(&xts); + return err; + } + } + + if (compare_testvector(OUT, tests[i].PTLEN, tests[i].CTX, tests[i].PTLEN, "XTS encrypt", i)) { + xts_done(&xts); + return CRYPT_FAIL_TESTVECTOR; + } - err = xts_decrypt(tests[i].CTX, tests[i].PTLEN, OUT, T, &xts); - if (err != CRYPT_OK) { - xts_done(&xts); - return err; - } + XMEMCPY(T, Torg, sizeof(T)); + if (j == 0) { + err = xts_decrypt(tests[i].CTX, tests[i].PTLEN, OUT, T, &xts); + if (err != CRYPT_OK) { + xts_done(&xts); + return err; + } + } else { + err = xts_decrypt(tests[i].CTX, len, OUT, T, &xts); + if (err != CRYPT_OK) { + xts_done(&xts); + return err; + } + err = xts_decrypt(&tests[i].CTX[len], len, &OUT[len], T, &xts); + if (err != CRYPT_OK) { + xts_done(&xts); + return err; + } + } - if (XMEMCMP(OUT, tests[i].PTX, tests[i].PTLEN)) { - xts_done(&xts); - return CRYPT_FAIL_TESTVECTOR; - } - xts_done(&xts); + if (compare_testvector(OUT, tests[i].PTLEN, tests[i].PTX, tests[i].PTLEN, "XTS decrypt", i)) { + xts_done(&xts); + return CRYPT_FAIL_TESTVECTOR; + } + xts_done(&xts); + } + } } return CRYPT_OK; #endif @@ -193,7 +301,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ - +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/bit/der_decode_bit_string.c --- a/libtomcrypt/src/pk/asn1/der/bit/der_decode_bit_string.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/bit/der_decode_bit_string.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -45,8 +43,8 @@ return CRYPT_INVALID_PACKET; } - /* offset in the data */ - x = 1; + /* offset in the data */ + x = 1; /* get the length of the data */ if (in[x] & 0x80) { @@ -67,7 +65,7 @@ /* short format */ dlen = in[x++] & 0x7F; } - + /* is the data len too long or too short? */ if ((dlen == 0) || (dlen + x > inlen)) { return CRYPT_INVALID_PACKET; @@ -97,6 +95,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/bit/der_decode_raw_bit_string.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/asn1/der/bit/der_decode_raw_bit_string.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,107 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file der_decode_bit_string.c + ASN.1 DER, encode a BIT STRING, Tom St Denis +*/ + + +#ifdef LTC_DER + +#define SETBIT(v, n) (v=((unsigned char)(v) | (1U << (unsigned char)(n)))) +#define CLRBIT(v, n) (v=((unsigned char)(v) & ~(1U << (unsigned char)(n)))) + +/** + Store a BIT STRING + @param in The DER encoded BIT STRING + @param inlen The size of the DER BIT STRING + @param out [out] The array of bits stored (8 per char) + @param outlen [in/out] The number of bits stored + @return CRYPT_OK if successful +*/ +int der_decode_raw_bit_string(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen) +{ + unsigned long dlen, blen, x, y; + + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(out != NULL); + LTC_ARGCHK(outlen != NULL); + + /* packet must be at least 4 bytes */ + if (inlen < 4) { + return CRYPT_INVALID_ARG; + } + + /* check for 0x03 */ + if ((in[0]&0x1F) != 0x03) { + return CRYPT_INVALID_PACKET; + } + + /* offset in the data */ + x = 1; + + /* get the length of the data */ + if (in[x] & 0x80) { + /* long format get number of length bytes */ + y = in[x++] & 0x7F; + + /* invalid if 0 or > 2 */ + if (y == 0 || y > 2) { + return CRYPT_INVALID_PACKET; + } + + /* read the data len */ + dlen = 0; + while (y--) { + dlen = (dlen << 8) | (unsigned long)in[x++]; + } + } else { + /* short format */ + dlen = in[x++] & 0x7F; + } + + /* is the data len too long or too short? */ + if ((dlen == 0) || (dlen + x > inlen)) { + return CRYPT_INVALID_PACKET; + } + + /* get padding count */ + blen = ((dlen - 1) << 3) - (in[x++] & 7); + + /* too many bits? */ + if (blen > *outlen) { + *outlen = blen; + return CRYPT_BUFFER_OVERFLOW; + } + + /* decode/store the bits */ + for (y = 0; y < blen; y++) { + if (in[x] & (1 << (7 - (y & 7)))) { + SETBIT(out[y/8], 7-(y%8)); + } else { + CLRBIT(out[y/8], 7-(y%8)); + } + if ((y & 7) == 7) { + ++x; + } + } + + /* we done */ + *outlen = blen; + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/bit/der_encode_bit_string.c --- a/libtomcrypt/src/pk/asn1/der/bit/der_encode_bit_string.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/bit/der_encode_bit_string.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -84,6 +82,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/bit/der_encode_raw_bit_string.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/asn1/der/bit/der_encode_raw_bit_string.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,90 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file der_encode_bit_string.c + ASN.1 DER, encode a BIT STRING, Tom St Denis +*/ + + +#ifdef LTC_DER + +#define getbit(n, k) (((n) & ( 1 << (k) )) >> (k)) + +/** + Store a BIT STRING + @param in The array of bits to store (8 per char) + @param inlen The number of bits to store + @param out [out] The destination for the DER encoded BIT STRING + @param outlen [in/out] The max size and resulting size of the DER BIT STRING + @return CRYPT_OK if successful +*/ +int der_encode_raw_bit_string(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen) +{ + unsigned long len, x, y; + unsigned char buf; + int err; + + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(out != NULL); + LTC_ARGCHK(outlen != NULL); + + /* avoid overflows */ + if ((err = der_length_bit_string(inlen, &len)) != CRYPT_OK) { + return err; + } + + if (len > *outlen) { + *outlen = len; + return CRYPT_BUFFER_OVERFLOW; + } + + /* store header (include bit padding count in length) */ + x = 0; + y = (inlen >> 3) + ((inlen&7) ? 1 : 0) + 1; + + out[x++] = 0x03; + if (y < 128) { + out[x++] = (unsigned char)y; + } else if (y < 256) { + out[x++] = 0x81; + out[x++] = (unsigned char)y; + } else if (y < 65536) { + out[x++] = 0x82; + out[x++] = (unsigned char)((y>>8)&255); + out[x++] = (unsigned char)(y&255); + } + + /* store number of zero padding bits */ + out[x++] = (unsigned char)((8 - inlen) & 7); + + /* store the bits in big endian format */ + for (y = buf = 0; y < inlen; y++) { + buf |= (getbit(in[y/8],7-y%8)?1:0) << (7 - (y & 7)); + if ((y & 7) == 7) { + out[x++] = buf; + buf = 0; + } + } + /* store last byte */ + if (inlen & 7) { + out[x++] = buf; + } + + *outlen = x; + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/bit/der_length_bit_string.c --- a/libtomcrypt/src/pk/asn1/der/bit/der_length_bit_string.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/bit/der_length_bit_string.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -17,7 +15,7 @@ #ifdef LTC_DER /** - Gets length of DER encoding of BIT STRING + Gets length of DER encoding of BIT STRING @param nbits The number of bits in the string to encode @param outlen [out] The length of the DER encoding for the given string @return CRYPT_OK if successful @@ -29,7 +27,7 @@ /* get the number of the bytes */ nbytes = (nbits >> 3) + ((nbits & 7) ? 1 : 0) + 1; - + if (nbytes < 128) { /* 03 LL PP DD DD DD ... */ *outlen = 2 + nbytes; @@ -49,6 +47,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/boolean/der_decode_boolean.c --- a/libtomcrypt/src/pk/asn1/der/boolean/der_decode_boolean.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/boolean/der_decode_boolean.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -30,18 +28,18 @@ { LTC_ARGCHK(in != NULL); LTC_ARGCHK(out != NULL); - - if (inlen != 3 || in[0] != 0x01 || in[1] != 0x01 || (in[2] != 0x00 && in[2] != 0xFF)) { + + if (inlen < 3 || in[0] != 0x01 || in[1] != 0x01 || (in[2] != 0x00 && in[2] != 0xFF)) { return CRYPT_INVALID_ARG; } - + *out = (in[2]==0xFF) ? 1 : 0; - + return CRYPT_OK; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/boolean/der_encode_boolean.c --- a/libtomcrypt/src/pk/asn1/der/boolean/der_encode_boolean.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/boolean/der_encode_boolean.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -25,27 +23,27 @@ @param outlen [in/out] The max size and resulting size of the DER BOOLEAN @return CRYPT_OK if successful */ -int der_encode_boolean(int in, +int der_encode_boolean(int in, unsigned char *out, unsigned long *outlen) { LTC_ARGCHK(outlen != NULL); LTC_ARGCHK(out != NULL); - + if (*outlen < 3) { *outlen = 3; return CRYPT_BUFFER_OVERFLOW; } - + *outlen = 3; out[0] = 0x01; out[1] = 0x01; out[2] = in ? 0xFF : 0x00; - + return CRYPT_OK; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/boolean/der_length_boolean.c --- a/libtomcrypt/src/pk/asn1/der/boolean/der_length_boolean.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/boolean/der_length_boolean.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -17,7 +15,7 @@ #ifdef LTC_DER /** - Gets length of DER encoding of a BOOLEAN + Gets length of DER encoding of a BOOLEAN @param outlen [out] The length of the DER encoding @return CRYPT_OK if successful */ @@ -30,6 +28,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/choice/der_decode_choice.c --- a/libtomcrypt/src/pk/asn1/der/choice/der_decode_choice.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/choice/der_decode_choice.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -51,6 +49,16 @@ data = list[x].data; switch (list[x].type) { + case LTC_ASN1_BOOLEAN: + if (der_decode_boolean(in, *inlen, data) == CRYPT_OK) { + if (der_length_boolean(&z) == CRYPT_OK) { + list[x].used = 1; + *inlen = z; + return CRYPT_OK; + } + } + break; + case LTC_ASN1_INTEGER: if (der_decode_integer(in, *inlen, data) == CRYPT_OK) { if (der_length_integer(data, &z) == CRYPT_OK) { @@ -82,6 +90,17 @@ } break; + case LTC_ASN1_RAW_BIT_STRING: + if (der_decode_raw_bit_string(in, *inlen, data, &size) == CRYPT_OK) { + if (der_length_bit_string(size, &z) == CRYPT_OK) { + list[x].used = 1; + list[x].size = size; + *inlen = z; + return CRYPT_OK; + } + } + break; + case LTC_ASN1_OCTET_STRING: if (der_decode_octet_string(in, *inlen, data, &size) == CRYPT_OK) { if (der_length_octet_string(size, &z) == CRYPT_OK) { @@ -100,7 +119,7 @@ return CRYPT_OK; } break; - + case LTC_ASN1_OBJECT_IDENTIFIER: if (der_decode_object_identifier(in, *inlen, data, &size) == CRYPT_OK) { if (der_length_object_identifier(data, size, &z) == CRYPT_OK) { @@ -112,6 +131,17 @@ } break; + case LTC_ASN1_TELETEX_STRING: + if (der_decode_teletex_string(in, *inlen, data, &size) == CRYPT_OK) { + if (der_length_teletex_string(data, size, &z) == CRYPT_OK) { + list[x].used = 1; + list[x].size = size; + *inlen = z; + return CRYPT_OK; + } + } + break; + case LTC_ASN1_IA5_STRING: if (der_decode_ia5_string(in, *inlen, data, &size) == CRYPT_OK) { if (der_length_ia5_string(data, size, &z) == CRYPT_OK) { @@ -123,7 +153,6 @@ } break; - case LTC_ASN1_PRINTABLE_STRING: if (der_decode_printable_string(in, *inlen, data, &size) == CRYPT_OK) { if (der_length_printable_string(data, size, &z) == CRYPT_OK) { @@ -155,6 +184,15 @@ } break; + case LTC_ASN1_GENERALIZEDTIME: + z = *inlen; + if (der_decode_generalizedtime(in, &z, data) == CRYPT_OK) { + list[x].used = 1; + *inlen = z; + return CRYPT_OK; + } + break; + case LTC_ASN1_SET: case LTC_ASN1_SETOF: case LTC_ASN1_SEQUENCE: @@ -167,7 +205,10 @@ } break; - default: + case LTC_ASN1_CHOICE: + case LTC_ASN1_CONSTRUCTED: + case LTC_ASN1_CONTEXT_SPECIFIC: + case LTC_ASN1_EOL: return CRYPT_INVALID_ARG; } } @@ -177,6 +218,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/generalizedtime/der_decode_generalizedtime.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/asn1/der/generalizedtime/der_decode_generalizedtime.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,144 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file der_decode_generalizedtime.c + ASN.1 DER, decode a GeneralizedTime, Steffen Jaeckel + Based on der_decode_utctime.c +*/ + +#ifdef LTC_DER + +static int _char_to_int(unsigned char x) +{ + switch (x) { + case '0': return 0; + case '1': return 1; + case '2': return 2; + case '3': return 3; + case '4': return 4; + case '5': return 5; + case '6': return 6; + case '7': return 7; + case '8': return 8; + case '9': return 9; + default: return 100; + } +} + +#define DECODE_V(y, max) do {\ + y = _char_to_int(buf[x])*10 + _char_to_int(buf[x+1]); \ + if (y >= max) return CRYPT_INVALID_PACKET; \ + x += 2; \ +} while(0) + +#define DECODE_V4(y, max) do {\ + y = _char_to_int(buf[x])*1000 + _char_to_int(buf[x+1])*100 + _char_to_int(buf[x+2])*10 + _char_to_int(buf[x+3]); \ + if (y >= max) return CRYPT_INVALID_PACKET; \ + x += 4; \ +} while(0) + +/** + Decodes a Generalized time structure in DER format (reads all 6 valid encoding formats) + @param in Input buffer + @param inlen Length of input buffer in octets + @param out [out] Destination of Generalized time structure + @return CRYPT_OK if successful +*/ +int der_decode_generalizedtime(const unsigned char *in, unsigned long *inlen, + ltc_generalizedtime *out) +{ + unsigned char buf[32]; + unsigned long x; + int y; + + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(inlen != NULL); + LTC_ARGCHK(out != NULL); + + /* check header */ + if (*inlen < 2UL || (in[1] >= sizeof(buf)) || ((in[1] + 2UL) > *inlen)) { + return CRYPT_INVALID_PACKET; + } + + /* decode the string */ + for (x = 0; x < in[1]; x++) { + y = der_ia5_value_decode(in[x+2]); + if (y == -1) { + return CRYPT_INVALID_PACKET; + } + if (!((y >= '0' && y <= '9') + || y == 'Z' || y == '.' + || y == '+' || y == '-')) { + return CRYPT_INVALID_PACKET; + } + buf[x] = y; + } + *inlen = 2 + x; + + if (x < 15) { + return CRYPT_INVALID_PACKET; + } + + /* possible encodings are +YYYYMMDDhhmmssZ +YYYYMMDDhhmmss+hh'mm' +YYYYMMDDhhmmss-hh'mm' +YYYYMMDDhhmmss.fsZ +YYYYMMDDhhmmss.fs+hh'mm' +YYYYMMDDhhmmss.fs-hh'mm' + + So let's do a trivial decode upto [including] ss + */ + + x = 0; + DECODE_V4(out->YYYY, 10000); + DECODE_V(out->MM, 13); + DECODE_V(out->DD, 32); + DECODE_V(out->hh, 24); + DECODE_V(out->mm, 60); + DECODE_V(out->ss, 60); + + /* clear fractional seconds info */ + out->fs = 0; + + /* now is it Z or . */ + if (buf[x] == 'Z') { + return CRYPT_OK; + } else if (buf[x] == '.') { + x++; + while (buf[x] >= '0' && buf[x] <= '9') { + unsigned fs = out->fs; + if (x >= sizeof(buf)) return CRYPT_INVALID_PACKET; + out->fs *= 10; + out->fs += _char_to_int(buf[x]); + if (fs > out->fs) return CRYPT_OVERFLOW; + x++; + } + } + + /* now is it Z, +, - */ + if (buf[x] == 'Z') { + return CRYPT_OK; + } else if (buf[x] == '+' || buf[x] == '-') { + out->off_dir = (buf[x++] == '+') ? 0 : 1; + DECODE_V(out->off_hh, 24); + DECODE_V(out->off_mm, 60); + return CRYPT_OK; + } else { + return CRYPT_INVALID_PACKET; + } +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/generalizedtime/der_encode_generalizedtime.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/asn1/der/generalizedtime/der_encode_generalizedtime.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,108 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file der_encode_utctime.c + ASN.1 DER, encode a GeneralizedTime, Steffen Jaeckel + Based on der_encode_utctime.c +*/ + +#ifdef LTC_DER + +static const char * const baseten = "0123456789"; + +#define STORE_V(y) do {\ + out[x++] = der_ia5_char_encode(baseten[(y/10) % 10]); \ + out[x++] = der_ia5_char_encode(baseten[y % 10]); \ +} while(0) + +#define STORE_V4(y) do {\ + out[x++] = der_ia5_char_encode(baseten[(y/1000) % 10]); \ + out[x++] = der_ia5_char_encode(baseten[(y/100) % 10]); \ + out[x++] = der_ia5_char_encode(baseten[(y/10) % 10]); \ + out[x++] = der_ia5_char_encode(baseten[y % 10]); \ +} while(0) + +/** + Encodes a Generalized time structure in DER format + @param gtime The GeneralizedTime structure to encode + @param out The destination of the DER encoding of the GeneralizedTime structure + @param outlen [in/out] The length of the DER encoding + @return CRYPT_OK if successful +*/ +int der_encode_generalizedtime(ltc_generalizedtime *gtime, + unsigned char *out, unsigned long *outlen) +{ + unsigned long x, tmplen; + int err; + + LTC_ARGCHK(gtime != NULL); + LTC_ARGCHK(out != NULL); + LTC_ARGCHK(outlen != NULL); + + if ((err = der_length_generalizedtime(gtime, &tmplen)) != CRYPT_OK) { + return err; + } + if (tmplen > *outlen) { + *outlen = tmplen; + return CRYPT_BUFFER_OVERFLOW; + } + + /* store header */ + out[0] = 0x18; + + /* store values */ + x = 2; + STORE_V4(gtime->YYYY); + STORE_V(gtime->MM); + STORE_V(gtime->DD); + STORE_V(gtime->hh); + STORE_V(gtime->mm); + STORE_V(gtime->ss); + + if (gtime->fs) { + unsigned long divisor; + unsigned fs = gtime->fs; + unsigned len = 0; + out[x++] = der_ia5_char_encode('.'); + divisor = 1; + do { + fs /= 10; + divisor *= 10; + len++; + } while(fs != 0); + while (len-- > 1) { + divisor /= 10; + out[x++] = der_ia5_char_encode(baseten[(gtime->fs/divisor) % 10]); + } + out[x++] = der_ia5_char_encode(baseten[gtime->fs % 10]); + } + + if (gtime->off_mm || gtime->off_hh) { + out[x++] = der_ia5_char_encode(gtime->off_dir ? '-' : '+'); + STORE_V(gtime->off_hh); + STORE_V(gtime->off_mm); + } else { + out[x++] = der_ia5_char_encode('Z'); + } + + /* store length */ + out[1] = (unsigned char)(x - 2); + + /* all good let's return */ + *outlen = x; + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/generalizedtime/der_length_generalizedtime.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/asn1/der/generalizedtime/der_length_generalizedtime.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,58 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file der_length_utctime.c + ASN.1 DER, get length of GeneralizedTime, Steffen Jaeckel + Based on der_length_utctime.c +*/ + +#ifdef LTC_DER + +/** + Gets length of DER encoding of GeneralizedTime + @param gtime The GeneralizedTime structure to get the size of + @param outlen [out] The length of the DER encoding + @return CRYPT_OK if successful +*/ +int der_length_generalizedtime(ltc_generalizedtime *gtime, unsigned long *outlen) +{ + LTC_ARGCHK(outlen != NULL); + LTC_ARGCHK(gtime != NULL); + + if (gtime->fs == 0) { + /* we encode as YYYYMMDDhhmmssZ */ + *outlen = 2 + 14 + 1; + } else { + unsigned long len = 2 + 14 + 1; + unsigned fs = gtime->fs; + do { + fs /= 10; + len++; + } while(fs != 0); + if (gtime->off_hh == 0 && gtime->off_mm == 0) { + /* we encode as YYYYMMDDhhmmss.fsZ */ + len += 1; + } + else { + /* we encode as YYYYMMDDhhmmss.fs{+|-}hh'mm' */ + len += 5; + } + *outlen = len; + } + + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/ia5/der_decode_ia5_string.c --- a/libtomcrypt/src/pk/asn1/der/ia5/der_decode_ia5_string.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/ia5/der_decode_ia5_string.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -88,9 +86,9 @@ return CRYPT_OK; } - + #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/ia5/der_encode_ia5_string.c --- a/libtomcrypt/src/pk/asn1/der/ia5/der_encode_ia5_string.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/ia5/der_encode_ia5_string.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -37,7 +35,7 @@ /* get the size */ if ((err = der_length_ia5_string(in, inlen, &len)) != CRYPT_OK) { - return err; + return err; } /* too big? */ @@ -80,6 +78,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/ia5/der_length_ia5_string.c --- a/libtomcrypt/src/pk/asn1/der/ia5/der_length_ia5_string.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/ia5/der_length_ia5_string.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -21,106 +19,106 @@ int code, value; } ia5_table[] = { { '\0', 0 }, -{ '\a', 7 }, -{ '\b', 8 }, -{ '\t', 9 }, -{ '\n', 10 }, -{ '\f', 12 }, -{ '\r', 13 }, -{ ' ', 32 }, -{ '!', 33 }, -{ '"', 34 }, -{ '#', 35 }, -{ '$', 36 }, -{ '%', 37 }, -{ '&', 38 }, -{ '\'', 39 }, -{ '(', 40 }, -{ ')', 41 }, -{ '*', 42 }, -{ '+', 43 }, -{ ',', 44 }, -{ '-', 45 }, -{ '.', 46 }, -{ '/', 47 }, -{ '0', 48 }, -{ '1', 49 }, -{ '2', 50 }, -{ '3', 51 }, -{ '4', 52 }, -{ '5', 53 }, -{ '6', 54 }, -{ '7', 55 }, -{ '8', 56 }, -{ '9', 57 }, -{ ':', 58 }, -{ ';', 59 }, -{ '<', 60 }, -{ '=', 61 }, -{ '>', 62 }, -{ '?', 63 }, -{ '@', 64 }, -{ 'A', 65 }, -{ 'B', 66 }, -{ 'C', 67 }, -{ 'D', 68 }, -{ 'E', 69 }, -{ 'F', 70 }, -{ 'G', 71 }, -{ 'H', 72 }, -{ 'I', 73 }, -{ 'J', 74 }, -{ 'K', 75 }, -{ 'L', 76 }, -{ 'M', 77 }, -{ 'N', 78 }, -{ 'O', 79 }, -{ 'P', 80 }, -{ 'Q', 81 }, -{ 'R', 82 }, -{ 'S', 83 }, -{ 'T', 84 }, -{ 'U', 85 }, -{ 'V', 86 }, -{ 'W', 87 }, -{ 'X', 88 }, -{ 'Y', 89 }, -{ 'Z', 90 }, -{ '[', 91 }, -{ '\\', 92 }, -{ ']', 93 }, -{ '^', 94 }, -{ '_', 95 }, -{ '`', 96 }, -{ 'a', 97 }, -{ 'b', 98 }, -{ 'c', 99 }, -{ 'd', 100 }, -{ 'e', 101 }, -{ 'f', 102 }, -{ 'g', 103 }, -{ 'h', 104 }, -{ 'i', 105 }, -{ 'j', 106 }, -{ 'k', 107 }, -{ 'l', 108 }, -{ 'm', 109 }, -{ 'n', 110 }, -{ 'o', 111 }, -{ 'p', 112 }, -{ 'q', 113 }, -{ 'r', 114 }, -{ 's', 115 }, -{ 't', 116 }, -{ 'u', 117 }, -{ 'v', 118 }, -{ 'w', 119 }, -{ 'x', 120 }, -{ 'y', 121 }, -{ 'z', 122 }, -{ '{', 123 }, -{ '|', 124 }, -{ '}', 125 }, +{ '\a', 7 }, +{ '\b', 8 }, +{ '\t', 9 }, +{ '\n', 10 }, +{ '\f', 12 }, +{ '\r', 13 }, +{ ' ', 32 }, +{ '!', 33 }, +{ '"', 34 }, +{ '#', 35 }, +{ '$', 36 }, +{ '%', 37 }, +{ '&', 38 }, +{ '\'', 39 }, +{ '(', 40 }, +{ ')', 41 }, +{ '*', 42 }, +{ '+', 43 }, +{ ',', 44 }, +{ '-', 45 }, +{ '.', 46 }, +{ '/', 47 }, +{ '0', 48 }, +{ '1', 49 }, +{ '2', 50 }, +{ '3', 51 }, +{ '4', 52 }, +{ '5', 53 }, +{ '6', 54 }, +{ '7', 55 }, +{ '8', 56 }, +{ '9', 57 }, +{ ':', 58 }, +{ ';', 59 }, +{ '<', 60 }, +{ '=', 61 }, +{ '>', 62 }, +{ '?', 63 }, +{ '@', 64 }, +{ 'A', 65 }, +{ 'B', 66 }, +{ 'C', 67 }, +{ 'D', 68 }, +{ 'E', 69 }, +{ 'F', 70 }, +{ 'G', 71 }, +{ 'H', 72 }, +{ 'I', 73 }, +{ 'J', 74 }, +{ 'K', 75 }, +{ 'L', 76 }, +{ 'M', 77 }, +{ 'N', 78 }, +{ 'O', 79 }, +{ 'P', 80 }, +{ 'Q', 81 }, +{ 'R', 82 }, +{ 'S', 83 }, +{ 'T', 84 }, +{ 'U', 85 }, +{ 'V', 86 }, +{ 'W', 87 }, +{ 'X', 88 }, +{ 'Y', 89 }, +{ 'Z', 90 }, +{ '[', 91 }, +{ '\\', 92 }, +{ ']', 93 }, +{ '^', 94 }, +{ '_', 95 }, +{ '`', 96 }, +{ 'a', 97 }, +{ 'b', 98 }, +{ 'c', 99 }, +{ 'd', 100 }, +{ 'e', 101 }, +{ 'f', 102 }, +{ 'g', 103 }, +{ 'h', 104 }, +{ 'i', 105 }, +{ 'j', 106 }, +{ 'k', 107 }, +{ 'l', 108 }, +{ 'm', 109 }, +{ 'n', 110 }, +{ 'o', 111 }, +{ 'p', 112 }, +{ 'q', 113 }, +{ 'r', 114 }, +{ 's', 115 }, +{ 't', 116 }, +{ 'u', 117 }, +{ 'v', 118 }, +{ 'w', 119 }, +{ 'x', 120 }, +{ 'y', 121 }, +{ 'z', 122 }, +{ '{', 123 }, +{ '|', 124 }, +{ '}', 125 }, { '~', 126 } }; @@ -145,10 +143,10 @@ } return -1; } - + /** - Gets length of DER encoding of IA5 STRING - @param octets The values you want to encode + Gets length of DER encoding of IA5 STRING + @param octets The values you want to encode @param noctets The number of octets in the string to encode @param outlen [out] The length of the DER encoding for the given string @return CRYPT_OK if successful @@ -189,6 +187,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/integer/der_decode_integer.c --- a/libtomcrypt/src/pk/asn1/der/integer/der_decode_integer.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/integer/der_decode_integer.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -54,7 +52,7 @@ if (x + z > inlen) { return CRYPT_INVALID_PACKET; } - + /* no so read it */ if ((err = mp_read_unsigned_bin(num, (unsigned char *)in + x, z)) != CRYPT_OK) { return err; @@ -62,7 +60,7 @@ } else { /* long form */ z &= 0x7F; - + /* will number of length bytes overflow? (or > 4) */ if (((x + z) > inlen) || (z > 4) || (z == 0)) { return CRYPT_INVALID_PACKET; @@ -97,7 +95,7 @@ return CRYPT_MEM; } mp_clear(tmp); - } + } return CRYPT_OK; @@ -105,6 +103,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/integer/der_encode_integer.c --- a/libtomcrypt/src/pk/asn1/der/integer/der_encode_integer.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/integer/der_encode_integer.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -27,7 +25,7 @@ @return CRYPT_OK if successful */ int der_encode_integer(void *num, unsigned char *out, unsigned long *outlen) -{ +{ unsigned long tmplen, y; int err, leading_zero; @@ -97,7 +95,7 @@ } } else if (mp_iszero(num) != LTC_MP_YES) { void *tmp; - + /* negative */ if (mp_init(&tmp) != CRYPT_OK) { return CRYPT_MEM; @@ -119,12 +117,12 @@ } /* we good */ - *outlen = tmplen; + *outlen = tmplen; return CRYPT_OK; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/integer/der_length_integer.c --- a/libtomcrypt/src/pk/asn1/der/integer/der_length_integer.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/integer/der_length_integer.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -18,8 +16,8 @@ #ifdef LTC_DER /** - Gets length of DER encoding of num - @param num The int to get the size of + Gets length of DER encoding of num + @param num The int to get the size of @param outlen [out] The length of the DER encoding for the given integer @return CRYPT_OK if successful */ @@ -46,7 +44,6 @@ } else { /* it's negative */ /* find power of 2 that is a multiple of eight and greater than count bits */ - leading_zero = 0; z = mp_count_bits(num); z = z + (8 - (z & 7)); if (((mp_cnt_lsb(num)+1)==mp_count_bits(num)) && ((mp_count_bits(num)&7)==0)) --z; @@ -71,12 +68,12 @@ ++len; /* return length */ - *outlen = len; + *outlen = len; return CRYPT_OK; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/object_identifier/der_decode_object_identifier.c --- a/libtomcrypt/src/pk/asn1/der/object_identifier/der_decode_object_identifier.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/object_identifier/der_decode_object_identifier.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -28,6 +26,7 @@ unsigned long *words, unsigned long *outlen) { unsigned long x, y, t, len; + int err; LTC_ARGCHK(in != NULL); LTC_ARGCHK(words != NULL); @@ -40,6 +39,7 @@ /* must be room for at least two words */ if (*outlen < 2) { + *outlen = 2; return CRYPT_BUFFER_OVERFLOW; } @@ -48,19 +48,19 @@ if ((in[x++] & 0x1F) != 0x06) { return CRYPT_INVALID_PACKET; } - + /* get the length */ if (in[x] < 128) { - len = in[x++]; + len = in[x++]; } else { - if (in[x] < 0x81 || in[x] > 0x82) { - return CRYPT_INVALID_PACKET; - } - y = in[x++] & 0x7F; - len = 0; - while (y--) { - len = (len << 8) | (unsigned long)in[x++]; - } + if (in[x] < 0x81 || in[x] > 0x82) { + return CRYPT_INVALID_PACKET; + } + y = in[x++] & 0x7F; + len = 0; + while (y--) { + len = (len << 8) | (unsigned long)in[x++]; + } } if (len < 1 || (len + x) > inlen) { @@ -71,29 +71,36 @@ y = 0; t = 0; while (len--) { - t = (t << 7) | (in[x] & 0x7F); - if (!(in[x++] & 0x80)) { - /* store t */ - if (y >= *outlen) { - return CRYPT_BUFFER_OVERFLOW; - } - if (y == 0) { - words[0] = t / 40; - words[1] = t % 40; - y = 2; - } else { - words[y++] = t; + t = (t << 7) | (in[x] & 0x7F); + if (!(in[x++] & 0x80)) { + /* store t */ + if (y >= *outlen) { + y++; + } else { + if (y == 0) { + words[0] = t / 40; + words[1] = t % 40; + y = 2; + } else { + words[y++] = t; + } + } + t = 0; } - t = 0; - } } - + + if (y > *outlen) { + err = CRYPT_BUFFER_OVERFLOW; + } else { + err = CRYPT_OK; + } + *outlen = y; - return CRYPT_OK; + return err; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/object_identifier/der_encode_object_identifier.c --- a/libtomcrypt/src/pk/asn1/der/object_identifier/der_encode_object_identifier.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/object_identifier/der_encode_object_identifier.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -55,7 +53,7 @@ } /* store header + length */ - x = 0; + x = 0; out[x++] = 0x06; if (z < 128) { out[x++] = (unsigned char)z; @@ -71,33 +69,33 @@ } /* store first byte */ - wordbuf = words[0] * 40 + words[1]; - for (i = 1; i < nwords; i++) { - /* store 7 bit words in little endian */ - t = wordbuf & 0xFFFFFFFF; - if (t) { - y = x; - mask = 0; - while (t) { - out[x++] = (unsigned char)((t & 0x7F) | mask); - t >>= 7; - mask |= 0x80; /* upper bit is set on all but the last byte */ - } - /* now swap bytes y...x-1 */ - z = x - 1; - while (y < z) { - t = out[y]; out[y] = out[z]; out[z] = (unsigned char)t; - ++y; - --z; - } - } else { - /* zero word */ - out[x++] = 0x00; - } - - if (i < nwords - 1) { - wordbuf = words[i + 1]; - } + wordbuf = words[0] * 40 + words[1]; + for (i = 1; i < nwords; i++) { + /* store 7 bit words in little endian */ + t = wordbuf & 0xFFFFFFFF; + if (t) { + y = x; + mask = 0; + while (t) { + out[x++] = (unsigned char)((t & 0x7F) | mask); + t >>= 7; + mask |= 0x80; /* upper bit is set on all but the last byte */ + } + /* now swap bytes y...x-1 */ + z = x - 1; + while (y < z) { + t = out[y]; out[y] = out[z]; out[z] = (unsigned char)t; + ++y; + --z; + } + } else { + /* zero word */ + out[x++] = 0x00; + } + + if (i < nwords - 1) { + wordbuf = words[i + 1]; + } } *outlen = x; @@ -106,6 +104,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/object_identifier/der_length_object_identifier.c --- a/libtomcrypt/src/pk/asn1/der/object_identifier/der_length_object_identifier.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/object_identifier/der_length_object_identifier.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -32,14 +30,14 @@ /** Gets length of DER encoding of Object Identifier - @param nwords The number of OID words + @param nwords The number of OID words @param words The actual OID words to get the size of @param outlen [out] The length of the DER encoding for the given string @return CRYPT_OK if successful */ int der_length_object_identifier(unsigned long *words, unsigned long nwords, unsigned long *outlen) { - unsigned long y, z, t, wordbuf; + unsigned long y, z, t, wordbuf; LTC_ARGCHK(words != NULL); LTC_ARGCHK(outlen != NULL); @@ -84,6 +82,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/octet/der_decode_octet_string.c --- a/libtomcrypt/src/pk/asn1/der/octet/der_decode_octet_string.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/octet/der_decode_octet_string.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -83,9 +81,9 @@ return CRYPT_OK; } - + #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/octet/der_encode_octet_string.c --- a/libtomcrypt/src/pk/asn1/der/octet/der_encode_octet_string.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/octet/der_encode_octet_string.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -38,7 +36,7 @@ /* get the size */ if ((err = der_length_octet_string(inlen, &len)) != CRYPT_OK) { - return err; + return err; } /* too big? */ @@ -81,6 +79,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/octet/der_length_octet_string.c --- a/libtomcrypt/src/pk/asn1/der/octet/der_length_octet_string.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/octet/der_length_octet_string.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -17,7 +15,7 @@ #ifdef LTC_DER /** - Gets length of DER encoding of OCTET STRING + Gets length of DER encoding of OCTET STRING @param noctets The number of octets in the string to encode @param outlen [out] The length of the DER encoding for the given string @return CRYPT_OK if successful @@ -48,6 +46,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/printable_string/der_decode_printable_string.c --- a/libtomcrypt/src/pk/asn1/der/printable_string/der_decode_printable_string.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/printable_string/der_decode_printable_string.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -88,9 +86,9 @@ return CRYPT_OK; } - + #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/printable_string/der_encode_printable_string.c --- a/libtomcrypt/src/pk/asn1/der/printable_string/der_encode_printable_string.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/printable_string/der_encode_printable_string.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -37,7 +35,7 @@ /* get the size */ if ((err = der_length_printable_string(in, inlen, &len)) != CRYPT_OK) { - return err; + return err; } /* too big? */ @@ -80,6 +78,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/printable_string/der_length_printable_string.c --- a/libtomcrypt/src/pk/asn1/der/printable_string/der_length_printable_string.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/printable_string/der_length_printable_string.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -20,80 +18,80 @@ static const struct { int code, value; } printable_table[] = { -{ ' ', 32 }, -{ '\'', 39 }, -{ '(', 40 }, -{ ')', 41 }, -{ '+', 43 }, -{ ',', 44 }, -{ '-', 45 }, -{ '.', 46 }, -{ '/', 47 }, -{ '0', 48 }, -{ '1', 49 }, -{ '2', 50 }, -{ '3', 51 }, -{ '4', 52 }, -{ '5', 53 }, -{ '6', 54 }, -{ '7', 55 }, -{ '8', 56 }, -{ '9', 57 }, -{ ':', 58 }, -{ '=', 61 }, -{ '?', 63 }, -{ 'A', 65 }, -{ 'B', 66 }, -{ 'C', 67 }, -{ 'D', 68 }, -{ 'E', 69 }, -{ 'F', 70 }, -{ 'G', 71 }, -{ 'H', 72 }, -{ 'I', 73 }, -{ 'J', 74 }, -{ 'K', 75 }, -{ 'L', 76 }, -{ 'M', 77 }, -{ 'N', 78 }, -{ 'O', 79 }, -{ 'P', 80 }, -{ 'Q', 81 }, -{ 'R', 82 }, -{ 'S', 83 }, -{ 'T', 84 }, -{ 'U', 85 }, -{ 'V', 86 }, -{ 'W', 87 }, -{ 'X', 88 }, -{ 'Y', 89 }, -{ 'Z', 90 }, -{ 'a', 97 }, -{ 'b', 98 }, -{ 'c', 99 }, -{ 'd', 100 }, -{ 'e', 101 }, -{ 'f', 102 }, -{ 'g', 103 }, -{ 'h', 104 }, -{ 'i', 105 }, -{ 'j', 106 }, -{ 'k', 107 }, -{ 'l', 108 }, -{ 'm', 109 }, -{ 'n', 110 }, -{ 'o', 111 }, -{ 'p', 112 }, -{ 'q', 113 }, -{ 'r', 114 }, -{ 's', 115 }, -{ 't', 116 }, -{ 'u', 117 }, -{ 'v', 118 }, -{ 'w', 119 }, -{ 'x', 120 }, -{ 'y', 121 }, -{ 'z', 122 }, +{ ' ', 32 }, +{ '\'', 39 }, +{ '(', 40 }, +{ ')', 41 }, +{ '+', 43 }, +{ ',', 44 }, +{ '-', 45 }, +{ '.', 46 }, +{ '/', 47 }, +{ '0', 48 }, +{ '1', 49 }, +{ '2', 50 }, +{ '3', 51 }, +{ '4', 52 }, +{ '5', 53 }, +{ '6', 54 }, +{ '7', 55 }, +{ '8', 56 }, +{ '9', 57 }, +{ ':', 58 }, +{ '=', 61 }, +{ '?', 63 }, +{ 'A', 65 }, +{ 'B', 66 }, +{ 'C', 67 }, +{ 'D', 68 }, +{ 'E', 69 }, +{ 'F', 70 }, +{ 'G', 71 }, +{ 'H', 72 }, +{ 'I', 73 }, +{ 'J', 74 }, +{ 'K', 75 }, +{ 'L', 76 }, +{ 'M', 77 }, +{ 'N', 78 }, +{ 'O', 79 }, +{ 'P', 80 }, +{ 'Q', 81 }, +{ 'R', 82 }, +{ 'S', 83 }, +{ 'T', 84 }, +{ 'U', 85 }, +{ 'V', 86 }, +{ 'W', 87 }, +{ 'X', 88 }, +{ 'Y', 89 }, +{ 'Z', 90 }, +{ 'a', 97 }, +{ 'b', 98 }, +{ 'c', 99 }, +{ 'd', 100 }, +{ 'e', 101 }, +{ 'f', 102 }, +{ 'g', 103 }, +{ 'h', 104 }, +{ 'i', 105 }, +{ 'j', 106 }, +{ 'k', 107 }, +{ 'l', 108 }, +{ 'm', 109 }, +{ 'n', 110 }, +{ 'o', 111 }, +{ 'p', 112 }, +{ 'q', 113 }, +{ 'r', 114 }, +{ 's', 115 }, +{ 't', 116 }, +{ 'u', 117 }, +{ 'v', 118 }, +{ 'w', 119 }, +{ 'x', 120 }, +{ 'y', 121 }, +{ 'z', 122 }, }; int der_printable_char_encode(int c) @@ -117,10 +115,10 @@ } return -1; } - + /** - Gets length of DER encoding of Printable STRING - @param octets The values you want to encode + Gets length of DER encoding of Printable STRING + @param octets The values you want to encode @param noctets The number of octets in the string to encode @param outlen [out] The length of the DER encoding for the given string @return CRYPT_OK if successful @@ -161,6 +159,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/sequence/der_decode_sequence_ex.c --- a/libtomcrypt/src/pk/asn1/der/sequence/der_decode_sequence_ex.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/sequence/der_decode_sequence_ex.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,11 +5,8 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -#include /** @@ -31,13 +28,14 @@ int der_decode_sequence_ex(const unsigned char *in, unsigned long inlen, ltc_asn1_list *list, unsigned long outlen, int ordered) { - int err, type; - unsigned long size, x, y, z, i, blksize; + int err, i; + ltc_asn1_type type; + unsigned long size, x, y, z, blksize; void *data; LTC_ARGCHK(in != NULL); LTC_ARGCHK(list != NULL); - + /* get blk size */ if (inlen < 2) { return CRYPT_INVALID_PACKET; @@ -50,9 +48,12 @@ } ++x; + /* check if the msb is set, which signals that the + * 7 lsb bits represent the number of bytes of the length + */ if (in[x] < 128) { blksize = in[x++]; - } else if (in[x] & 0x80) { + } else { if (in[x] < 0x81 || in[x] > 0x83) { return CRYPT_INVALID_PACKET; } @@ -68,28 +69,28 @@ while (y--) { blksize = (blksize << 8) | (unsigned long)in[x++]; } - } + } - /* would this blksize overflow? */ - if (x + blksize > inlen) { - return CRYPT_INVALID_PACKET; - } + /* would this blksize overflow? */ + if (x + blksize > inlen) { + return CRYPT_INVALID_PACKET; + } /* mark all as unused */ - for (i = 0; i < outlen; i++) { + for (i = 0; i < (int)outlen; i++) { list[i].used = 0; - } + } - /* ok read data */ + /* ok read data */ inlen = blksize; - for (i = 0; i < outlen; i++) { + for (i = 0; i < (int)outlen; i++) { z = 0; type = list[i].type; size = list[i].size; data = list[i].data; if (!ordered && list[i].used == 1) { continue; } - if (type == LTC_ASN1_EOL) { + if (type == LTC_ASN1_EOL) { break; } @@ -97,13 +98,14 @@ case LTC_ASN1_BOOLEAN: z = inlen; if ((err = der_decode_boolean(in + x, z, ((int *)data))) != CRYPT_OK) { + if (!ordered) { continue; } goto LBL_ERR; } if ((err = der_length_boolean(&z)) != CRYPT_OK) { goto LBL_ERR; - } - break; - + } + break; + case LTC_ASN1_INTEGER: z = inlen; if ((err = der_decode_integer(in + x, z, data)) != CRYPT_OK) { @@ -124,7 +126,7 @@ if ((err = der_length_short_integer(((unsigned long*)data)[0], &z)) != CRYPT_OK) { goto LBL_ERR; } - + break; case LTC_ASN1_BIT_STRING: @@ -139,6 +141,18 @@ } break; + case LTC_ASN1_RAW_BIT_STRING: + z = inlen; + if ((err = der_decode_raw_bit_string(in + x, z, data, &size)) != CRYPT_OK) { + if (!ordered) { continue; } + goto LBL_ERR; + } + list[i].size = size; + if ((err = der_length_bit_string(size, &z)) != CRYPT_OK) { + goto LBL_ERR; + } + break; + case LTC_ASN1_OCTET_STRING: z = inlen; if ((err = der_decode_octet_string(in + x, z, data, &size)) != CRYPT_OK) { @@ -159,7 +173,7 @@ } z = 2; break; - + case LTC_ASN1_OBJECT_IDENTIFIER: z = inlen; if ((err = der_decode_object_identifier(in + x, z, data, &size)) != CRYPT_OK) { @@ -172,6 +186,18 @@ } break; + case LTC_ASN1_TELETEX_STRING: + z = inlen; + if ((err = der_decode_teletex_string(in + x, z, data, &size)) != CRYPT_OK) { + if (!ordered) { continue; } + goto LBL_ERR; + } + list[i].size = size; + if ((err = der_length_teletex_string(data, size, &z)) != CRYPT_OK) { + goto LBL_ERR; + } + break; + case LTC_ASN1_IA5_STRING: z = inlen; if ((err = der_decode_ia5_string(in + x, z, data, &size)) != CRYPT_OK) { @@ -217,6 +243,14 @@ } break; + case LTC_ASN1_GENERALIZEDTIME: + z = inlen; + if ((err = der_decode_generalizedtime(in + x, &z, data)) != CRYPT_OK) { + if (!ordered) { continue; } + goto LBL_ERR; + } + break; + case LTC_ASN1_SET: z = inlen; if ((err = der_decode_set(in + x, z, data, size)) != CRYPT_OK) { @@ -227,7 +261,7 @@ goto LBL_ERR; } break; - + case LTC_ASN1_SETOF: case LTC_ASN1_SEQUENCE: /* detect if we have the right type */ @@ -255,33 +289,40 @@ } break; - default: + case LTC_ASN1_CONSTRUCTED: + case LTC_ASN1_CONTEXT_SPECIFIC: + case LTC_ASN1_EOL: err = CRYPT_INVALID_ARG; goto LBL_ERR; } x += z; inlen -= z; list[i].used = 1; - if (!ordered) { + if (!ordered) { /* restart the decoder */ i = -1; - } + } } - - for (i = 0; i < outlen; i++) { + + for (i = 0; i < (int)outlen; i++) { if (list[i].used == 0) { err = CRYPT_INVALID_PACKET; goto LBL_ERR; } - } - err = CRYPT_OK; + } + + if (inlen == 0) { + err = CRYPT_OK; + } else { + err = CRYPT_INPUT_TOO_LONG; + } LBL_ERR: return err; -} - +} + #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/sequence/der_decode_sequence_flexi.c --- a/libtomcrypt/src/pk/asn1/der/sequence/der_decode_sequence_flexi.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/sequence/der_decode_sequence_flexi.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -17,102 +15,129 @@ #ifdef LTC_DER -static unsigned long fetch_length(const unsigned char *in, unsigned long inlen) +static unsigned long _fetch_length(const unsigned char *in, unsigned long inlen, unsigned long *data_offset) { - unsigned long x, y, z; + unsigned long x, z; - y = 0; + *data_offset = 0; /* skip type and read len */ if (inlen < 2) { return 0xFFFFFFFF; } - ++in; ++y; - + ++in; ++(*data_offset); + /* read len */ - x = *in++; ++y; - + x = *in++; ++(*data_offset); + /* <128 means literal */ if (x < 128) { - return x+y; + return x+*data_offset; } x &= 0x7F; /* the lower 7 bits are the length of the length */ inlen -= 2; - + /* len means len of len! */ if (x == 0 || x > 4 || x > inlen) { return 0xFFFFFFFF; } - - y += x; + + *data_offset += x; z = 0; - while (x--) { + while (x--) { z = (z<<8) | ((unsigned long)*in); ++in; } - return z+y; + return z+*data_offset; } -/** +static int _new_element(ltc_asn1_list **l) +{ + /* alloc new link */ + if (*l == NULL) { + *l = XCALLOC(1, sizeof(ltc_asn1_list)); + if (*l == NULL) { + return CRYPT_MEM; + } + } else { + (*l)->next = XCALLOC(1, sizeof(ltc_asn1_list)); + if ((*l)->next == NULL) { + return CRYPT_MEM; + } + (*l)->next->prev = *l; + *l = (*l)->next; + } + return CRYPT_OK; +} + +/** ASN.1 DER Flexi(ble) decoder will decode arbitrary DER packets and create a linked list of the decoded elements. @param in The input buffer - @param inlen [in/out] The length of the input buffer and on output the amount of decoded data + @param inlen [in/out] The length of the input buffer and on output the amount of decoded data @param out [out] A pointer to the linked list @return CRYPT_OK on success. -*/ +*/ int der_decode_sequence_flexi(const unsigned char *in, unsigned long *inlen, ltc_asn1_list **out) { ltc_asn1_list *l; - unsigned long err, type, len, totlen, x, y; + unsigned long err, type, len, totlen, data_offset; void *realloc_tmp; - + LTC_ARGCHK(in != NULL); LTC_ARGCHK(inlen != NULL); LTC_ARGCHK(out != NULL); l = NULL; totlen = 0; - + + if (*inlen == 0) { + /* alloc new link */ + if ((err = _new_element(&l)) != CRYPT_OK) { + goto error; + } + } + /* scan the input and and get lengths and what not */ - while (*inlen) { + while (*inlen) { /* read the type byte */ type = *in; /* fetch length */ - len = fetch_length(in, *inlen); + len = _fetch_length(in, *inlen, &data_offset); if (len > *inlen) { err = CRYPT_INVALID_PACKET; goto error; } /* alloc new link */ - if (l == NULL) { - l = XCALLOC(1, sizeof(*l)); - if (l == NULL) { - err = CRYPT_MEM; - goto error; - } - } else { - l->next = XCALLOC(1, sizeof(*l)); - if (l->next == NULL) { - err = CRYPT_MEM; - goto error; - } - l->next->prev = l; - l = l->next; + if ((err = _new_element(&l)) != CRYPT_OK) { + goto error; } - /* now switch on type */ + if ((type & 0x20) && (type != 0x30) && (type != 0x31)) { + /* constructed, use the 'used' field to store the original identifier */ + l->used = type; + /* treat constructed elements like SETs */ + type = 0x20; + } + else if ((type & 0xC0) == 0x80) { + /* context-specific, use the 'used' field to store the original identifier */ + l->used = type; + /* context-specific elements are treated as opaque data */ + type = 0x80; + } + + /* now switch on type */ switch (type) { case 0x01: /* BOOLEAN */ l->type = LTC_ASN1_BOOLEAN; l->size = 1; l->data = XCALLOC(1, sizeof(int)); - + if ((err = der_decode_boolean(in, *inlen, l->data)) != CRYPT_OK) { goto error; } - + if ((err = der_length_boolean(&len)) != CRYPT_OK) { goto error; } @@ -125,12 +150,12 @@ if ((err = mp_init(&l->data)) != CRYPT_OK) { goto error; } - + /* decode field */ if ((err = der_decode_integer(in, *inlen, l->data)) != CRYPT_OK) { goto error; } - + /* calc length of object */ if ((err = der_length_integer(l->data, &len)) != CRYPT_OK) { goto error; @@ -146,11 +171,11 @@ err = CRYPT_MEM; goto error; } - + if ((err = der_decode_bit_string(in, *inlen, l->data, &l->size)) != CRYPT_OK) { goto error; } - + if ((err = der_length_bit_string(l->size, &len)) != CRYPT_OK) { goto error; } @@ -166,34 +191,34 @@ err = CRYPT_MEM; goto error; } - + if ((err = der_decode_octet_string(in, *inlen, l->data, &l->size)) != CRYPT_OK) { goto error; } - + if ((err = der_length_octet_string(l->size, &len)) != CRYPT_OK) { goto error; } break; case 0x05: /* NULL */ - + /* valid NULL is 0x05 0x00 */ if (in[0] != 0x05 || in[1] != 0x00) { err = CRYPT_INVALID_PACKET; goto error; } - + /* simple to store ;-) */ l->type = LTC_ASN1_NULL; l->data = NULL; l->size = 0; len = 2; - + break; - + case 0x06: /* OID */ - + /* init field */ l->type = LTC_ASN1_OBJECT_IDENTIFIER; l->size = len; @@ -202,15 +227,15 @@ err = CRYPT_MEM; goto error; } - + if ((err = der_decode_object_identifier(in, *inlen, l->data, &l->size)) != CRYPT_OK) { goto error; } - + if ((err = der_length_object_identifier(l->data, l->size, &len)) != CRYPT_OK) { goto error; } - + /* resize it to save a bunch of mem */ if ((realloc_tmp = XREALLOC(l->data, l->size * sizeof(unsigned long))) == NULL) { /* out of heap but this is not an error */ @@ -218,9 +243,9 @@ } l->data = realloc_tmp; break; - + case 0x0C: /* UTF8 */ - + /* init field */ l->type = LTC_ASN1_UTF8_STRING; l->size = len; @@ -229,18 +254,18 @@ err = CRYPT_MEM; goto error; } - + if ((err = der_decode_utf8_string(in, *inlen, l->data, &l->size)) != CRYPT_OK) { goto error; } - + if ((err = der_length_utf8_string(l->data, l->size, &len)) != CRYPT_OK) { goto error; } break; case 0x13: /* PRINTABLE */ - + /* init field */ l->type = LTC_ASN1_PRINTABLE_STRING; l->size = len; @@ -249,18 +274,38 @@ err = CRYPT_MEM; goto error; } - + if ((err = der_decode_printable_string(in, *inlen, l->data, &l->size)) != CRYPT_OK) { goto error; } - + if ((err = der_length_printable_string(l->data, l->size, &len)) != CRYPT_OK) { goto error; } break; - + + case 0x14: /* TELETEXT */ + + /* init field */ + l->type = LTC_ASN1_TELETEX_STRING; + l->size = len; + + if ((l->data = XCALLOC(1, l->size)) == NULL) { + err = CRYPT_MEM; + goto error; + } + + if ((err = der_decode_teletex_string(in, *inlen, l->data, &l->size)) != CRYPT_OK) { + goto error; + } + + if ((err = der_length_teletex_string(l->data, l->size, &len)) != CRYPT_OK) { + goto error; + } + break; + case 0x16: /* IA5 */ - + /* init field */ l->type = LTC_ASN1_IA5_STRING; l->size = len; @@ -269,18 +314,18 @@ err = CRYPT_MEM; goto error; } - + if ((err = der_decode_ia5_string(in, *inlen, l->data, &l->size)) != CRYPT_OK) { goto error; } - + if ((err = der_length_ia5_string(l->data, l->size, &len)) != CRYPT_OK) { goto error; } break; - + case 0x17: /* UTC TIME */ - + /* init field */ l->type = LTC_ASN1_UTCTIME; l->size = 1; @@ -289,83 +334,125 @@ err = CRYPT_MEM; goto error; } - + len = *inlen; if ((err = der_decode_utctime(in, &len, l->data)) != CRYPT_OK) { goto error; } - + if ((err = der_length_utctime(l->data, &len)) != CRYPT_OK) { goto error; } break; - + + case 0x18: + l->type = LTC_ASN1_GENERALIZEDTIME; + l->size = len; + + if ((l->data = XCALLOC(1, sizeof(ltc_generalizedtime))) == NULL) { + err = CRYPT_MEM; + goto error; + } + + if ((err = der_decode_generalizedtime(in, &len, l->data)) != CRYPT_OK) { + goto error; + } + + if ((err = der_length_generalizedtime(l->data, &len)) != CRYPT_OK) { + goto error; + } + + break; + + case 0x20: /* Any CONSTRUCTED element that is neither SEQUENCE nor SET */ case 0x30: /* SEQUENCE */ case 0x31: /* SET */ - + /* init field */ - l->type = (type == 0x30) ? LTC_ASN1_SEQUENCE : LTC_ASN1_SET; - - /* we have to decode the SEQUENCE header and get it's length */ - - /* move past type */ - ++in; --(*inlen); - - /* read length byte */ - x = *in++; --(*inlen); - - /* smallest SEQUENCE/SET header */ - y = 2; - - /* now if it's > 127 the next bytes are the length of the length */ - if (x > 128) { - x &= 0x7F; - in += x; - *inlen -= x; - - /* update sequence header len */ - y += x; - } - + if (type == 0x20) { + l->type = LTC_ASN1_CONSTRUCTED; + } + else if (type == 0x30) { + l->type = LTC_ASN1_SEQUENCE; + } + else { + l->type = LTC_ASN1_SET; + } + + if ((l->data = XMALLOC(len)) == NULL) { + err = CRYPT_MEM; + goto error; + } + + XMEMCPY(l->data, in, len); + l->size = len; + + + /* jump to the start of the data */ + in += data_offset; + *inlen -= data_offset; + len = len - data_offset; + /* Sequence elements go as child */ - len = len - y; if ((err = der_decode_sequence_flexi(in, &len, &(l->child))) != CRYPT_OK) { goto error; } - + /* len update */ - totlen += y; - - /* link them up y0 */ - l->child->parent = l; - + totlen += data_offset; + + /* the flexi decoder can also do nothing, so make sure a child has been allocated */ + if (l->child) { + /* link them up y0 */ + l->child->parent = l; + } + break; + + case 0x80: /* Context-specific */ + l->type = LTC_ASN1_CONTEXT_SPECIFIC; + + if ((l->data = XCALLOC(1, len - data_offset)) == NULL) { + err = CRYPT_MEM; + goto error; + } + + XMEMCPY(l->data, in + data_offset, len - data_offset); + l->size = len - data_offset; + + break; + default: /* invalid byte ... this is a soft error */ /* remove link */ - l = l->prev; - XFREE(l->next); - l->next = NULL; + if (l->prev) { + l = l->prev; + XFREE(l->next); + l->next = NULL; + } goto outside; } - + /* advance pointers */ totlen += len; in += len; *inlen -= len; } - -outside: + +outside: - /* rewind l please */ - while (l->prev != NULL || l->parent != NULL) { - if (l->parent != NULL) { - l = l->parent; - } else { - l = l->prev; + /* in case we processed anything */ + if (totlen) { + /* rewind l please */ + while (l->prev != NULL || l->parent != NULL) { + if (l->parent != NULL) { + l = l->parent; + } else { + l = l->prev; + } } } - + /* return */ *out = l; *inlen = totlen; @@ -381,6 +468,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/sequence/der_decode_sequence_multi.c --- a/libtomcrypt/src/pk/asn1/der/sequence/der_decode_sequence_multi.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/sequence/der_decode_sequence_multi.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" #include @@ -25,10 +23,11 @@ @param inlen Length of input in octets @remark <...> is of the form (int, unsigned long, void*) @return CRYPT_OK on success -*/ +*/ int der_decode_sequence_multi(const unsigned char *in, unsigned long inlen, ...) { - int err, type; + int err; + ltc_asn1_type type; unsigned long size, x; void *data; va_list args; @@ -40,11 +39,13 @@ va_start(args, inlen); x = 0; for (;;) { - type = va_arg(args, int); + type = (ltc_asn1_type)va_arg(args, int); size = va_arg(args, unsigned long); data = va_arg(args, void*); + LTC_UNUSED_PARAM(size); + LTC_UNUSED_PARAM(data); - if (type == LTC_ASN1_EOL) { + if (type == LTC_ASN1_EOL) { break; } @@ -64,10 +65,15 @@ case LTC_ASN1_SETOF: case LTC_ASN1_SEQUENCE: case LTC_ASN1_CHOICE: - ++x; + case LTC_ASN1_RAW_BIT_STRING: + case LTC_ASN1_TELETEX_STRING: + case LTC_ASN1_GENERALIZEDTIME: + ++x; break; - - default: + + case LTC_ASN1_EOL: + case LTC_ASN1_CONSTRUCTED: + case LTC_ASN1_CONTEXT_SPECIFIC: va_end(args); return CRYPT_INVALID_ARG; } @@ -88,11 +94,11 @@ va_start(args, inlen); x = 0; for (;;) { - type = va_arg(args, int); + type = (ltc_asn1_type)va_arg(args, int); size = va_arg(args, unsigned long); data = va_arg(args, void*); - if (type == LTC_ASN1_EOL) { + if (type == LTC_ASN1_EOL) { break; } @@ -110,23 +116,23 @@ case LTC_ASN1_UTCTIME: case LTC_ASN1_SEQUENCE: case LTC_ASN1_SET: - case LTC_ASN1_SETOF: + case LTC_ASN1_SETOF: case LTC_ASN1_CHOICE: - list[x].type = type; - list[x].size = size; - list[x++].data = data; + case LTC_ASN1_RAW_BIT_STRING: + case LTC_ASN1_TELETEX_STRING: + case LTC_ASN1_GENERALIZEDTIME: + LTC_SET_ASN1(list, x++, type, data, size); break; - - default: - va_end(args); - err = CRYPT_INVALID_ARG; - goto LBL_ERR; + /* coverity[dead_error_line] */ + case LTC_ASN1_EOL: + case LTC_ASN1_CONSTRUCTED: + case LTC_ASN1_CONTEXT_SPECIFIC: + break; } } va_end(args); err = der_decode_sequence(in, inlen, list, x); -LBL_ERR: XFREE(list); return err; } @@ -134,6 +140,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/sequence/der_decode_subject_public_key_info.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/asn1/der/sequence/der_decode_subject_public_key_info.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,112 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" +/** + @file der_decode_subject_public_key_info.c + ASN.1 DER, encode a Subject Public Key structure --nmav +*/ + +#ifdef LTC_DER + +/* AlgorithmIdentifier := SEQUENCE { + * algorithm OBJECT IDENTIFIER, + * parameters ANY DEFINED BY algorithm + * } + * + * SubjectPublicKeyInfo := SEQUENCE { + * algorithm AlgorithmIdentifier, + * subjectPublicKey BIT STRING + * } + */ +/** + Decode a subject public key info + @param in The input buffer + @param inlen The length of the input buffer + @param algorithm One out of the enum #public_key_algorithms + @param public_key The buffer for the public key + @param public_key_len [in/out] The length of the public key buffer and the written length + @param parameters_type The parameters' type out of the enum ltc_asn1_type + @param parameters The parameters to include + @param parameters_len The number of parameters to include + @return CRYPT_OK on success +*/ +int der_decode_subject_public_key_info(const unsigned char *in, unsigned long inlen, + unsigned int algorithm, void* public_key, unsigned long* public_key_len, + unsigned long parameters_type, ltc_asn1_list* parameters, unsigned long parameters_len) +{ + int err; + unsigned long len; + oid_st oid; + unsigned char *tmpbuf; + unsigned long tmpoid[16]; + ltc_asn1_list alg_id[2]; + ltc_asn1_list subject_pubkey[2]; + + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(inlen != 0); + LTC_ARGCHK(public_key_len != NULL); + + err = pk_get_oid(algorithm, &oid); + if (err != CRYPT_OK) { + return err; + } + + /* see if the OpenSSL DER format RSA public key will work */ + tmpbuf = XCALLOC(1, inlen); + if (tmpbuf == NULL) { + err = CRYPT_MEM; + goto LBL_ERR; + } + + /* this includes the internal hash ID and optional params (NULL in this case) */ + LTC_SET_ASN1(alg_id, 0, LTC_ASN1_OBJECT_IDENTIFIER, tmpoid, sizeof(tmpoid)/sizeof(tmpoid[0])); + LTC_SET_ASN1(alg_id, 1, (ltc_asn1_type)parameters_type, parameters, parameters_len); + + /* the actual format of the SSL DER key is odd, it stores a RSAPublicKey + * in a **BIT** string ... so we have to extract it then proceed to convert bit to octet + */ + LTC_SET_ASN1(subject_pubkey, 0, LTC_ASN1_SEQUENCE, alg_id, 2); + LTC_SET_ASN1(subject_pubkey, 1, LTC_ASN1_RAW_BIT_STRING, tmpbuf, inlen*8U); + + err=der_decode_sequence(in, inlen, subject_pubkey, 2UL); + if (err != CRYPT_OK) { + goto LBL_ERR; + } + + if ((alg_id[0].size != oid.OIDlen) || + XMEMCMP(oid.OID, alg_id[0].data, oid.OIDlen * sizeof(oid.OID[0]))) { + /* OID mismatch */ + err = CRYPT_PK_INVALID_TYPE; + goto LBL_ERR; + } + + len = subject_pubkey[1].size/8; + if (*public_key_len > len) { + XMEMCPY(public_key, subject_pubkey[1].data, len); + *public_key_len = len; + } else { + *public_key_len = len; + err = CRYPT_BUFFER_OVERFLOW; + goto LBL_ERR; + } + + err = CRYPT_OK; + +LBL_ERR: + + XFREE(tmpbuf); + + return err; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/sequence/der_encode_sequence_ex.c --- a/libtomcrypt/src/pk/asn1/der/sequence/der_encode_sequence_ex.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/sequence/der_encode_sequence_ex.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,11 +5,8 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -#include /** @@ -23,15 +20,16 @@ Encode a SEQUENCE @param list The list of items to encode @param inlen The number of items in the list - @param out [out] The destination + @param out [out] The destination @param outlen [in/out] The size of the output @param type_of LTC_ASN1_SEQUENCE or LTC_ASN1_SET/LTC_ASN1_SETOF @return CRYPT_OK on success */ int der_encode_sequence_ex(ltc_asn1_list *list, unsigned long inlen, - unsigned char *out, unsigned long *outlen, int type_of) + unsigned char *out, unsigned long *outlen, int type_of) { - int err, type; + int err; + ltc_asn1_type type; unsigned long size, x, y, z, i; void *data; @@ -40,123 +38,8 @@ LTC_ARGCHK(outlen != NULL); /* get size of output that will be required */ - y = 0; - for (i = 0; i < inlen; i++) { - type = list[i].type; - size = list[i].size; - data = list[i].data; - - if (type == LTC_ASN1_EOL) { - break; - } - - switch (type) { - case LTC_ASN1_BOOLEAN: - if ((err = der_length_boolean(&x)) != CRYPT_OK) { - goto LBL_ERR; - } - y += x; - break; - - case LTC_ASN1_INTEGER: - if ((err = der_length_integer(data, &x)) != CRYPT_OK) { - goto LBL_ERR; - } - y += x; - break; - - case LTC_ASN1_SHORT_INTEGER: - if ((err = der_length_short_integer(*((unsigned long*)data), &x)) != CRYPT_OK) { - goto LBL_ERR; - } - y += x; - break; - - case LTC_ASN1_BIT_STRING: - if ((err = der_length_bit_string(size, &x)) != CRYPT_OK) { - goto LBL_ERR; - } - y += x; - break; - - case LTC_ASN1_OCTET_STRING: - if ((err = der_length_octet_string(size, &x)) != CRYPT_OK) { - goto LBL_ERR; - } - y += x; - break; - - case LTC_ASN1_NULL: - y += 2; - break; - - case LTC_ASN1_OBJECT_IDENTIFIER: - if ((err = der_length_object_identifier(data, size, &x)) != CRYPT_OK) { - goto LBL_ERR; - } - y += x; - break; - - case LTC_ASN1_IA5_STRING: - if ((err = der_length_ia5_string(data, size, &x)) != CRYPT_OK) { - goto LBL_ERR; - } - y += x; - break; - - case LTC_ASN1_PRINTABLE_STRING: - if ((err = der_length_printable_string(data, size, &x)) != CRYPT_OK) { - goto LBL_ERR; - } - y += x; - break; - - case LTC_ASN1_UTF8_STRING: - if ((err = der_length_utf8_string(data, size, &x)) != CRYPT_OK) { - goto LBL_ERR; - } - y += x; - break; - - case LTC_ASN1_UTCTIME: - if ((err = der_length_utctime(data, &x)) != CRYPT_OK) { - goto LBL_ERR; - } - y += x; - break; - - case LTC_ASN1_SET: - case LTC_ASN1_SETOF: - case LTC_ASN1_SEQUENCE: - if ((err = der_length_sequence(data, size, &x)) != CRYPT_OK) { - goto LBL_ERR; - } - y += x; - break; - - default: - err = CRYPT_INVALID_ARG; - goto LBL_ERR; - } - } - - /* calc header size */ - z = y; - if (y < 128) { - y += 2; - } else if (y < 256) { - /* 0x30 0x81 LL */ - y += 3; - } else if (y < 65536UL) { - /* 0x30 0x82 LL LL */ - y += 4; - } else if (y < 16777216UL) { - /* 0x30 0x83 LL LL LL */ - y += 5; - } else { - err = CRYPT_INVALID_ARG; - goto LBL_ERR; - } + y = 0; z = 0; + if ((err = der_length_sequence_ex(list, inlen, &y, &z)) != CRYPT_OK) return CRYPT_INVALID_ARG; /* too big ? */ if (*outlen < y) { @@ -168,7 +51,7 @@ /* store header */ x = 0; out[x++] = (type_of == LTC_ASN1_SEQUENCE) ? 0x30 : 0x31; - + if (z < 128) { out[x++] = (unsigned char)z; } else if (z < 256) { @@ -192,7 +75,7 @@ size = list[i].size; data = list[i].data; - if (type == LTC_ASN1_EOL) { + if (type == LTC_ASN1_EOL) { break; } @@ -202,17 +85,13 @@ if ((err = der_encode_boolean(*((int *)data), out + x, &z)) != CRYPT_OK) { goto LBL_ERR; } - x += z; - *outlen -= z; break; - + case LTC_ASN1_INTEGER: z = *outlen; if ((err = der_encode_integer(data, out + x, &z)) != CRYPT_OK) { goto LBL_ERR; } - x += z; - *outlen -= z; break; case LTC_ASN1_SHORT_INTEGER: @@ -220,8 +99,6 @@ if ((err = der_encode_short_integer(*((unsigned long*)data), out + x, &z)) != CRYPT_OK) { goto LBL_ERR; } - x += z; - *outlen -= z; break; case LTC_ASN1_BIT_STRING: @@ -229,8 +106,13 @@ if ((err = der_encode_bit_string(data, size, out + x, &z)) != CRYPT_OK) { goto LBL_ERR; } - x += z; - *outlen -= z; + break; + + case LTC_ASN1_RAW_BIT_STRING: + z = *outlen; + if ((err = der_encode_raw_bit_string(data, size, out + x, &z)) != CRYPT_OK) { + goto LBL_ERR; + } break; case LTC_ASN1_OCTET_STRING: @@ -238,14 +120,12 @@ if ((err = der_encode_octet_string(data, size, out + x, &z)) != CRYPT_OK) { goto LBL_ERR; } - x += z; - *outlen -= z; break; case LTC_ASN1_NULL: - out[x++] = 0x05; - out[x++] = 0x00; - *outlen -= 2; + out[x] = 0x05; + out[x+1] = 0x00; + z = 2; break; case LTC_ASN1_OBJECT_IDENTIFIER: @@ -253,8 +133,6 @@ if ((err = der_encode_object_identifier(data, size, out + x, &z)) != CRYPT_OK) { goto LBL_ERR; } - x += z; - *outlen -= z; break; case LTC_ASN1_IA5_STRING: @@ -262,17 +140,13 @@ if ((err = der_encode_ia5_string(data, size, out + x, &z)) != CRYPT_OK) { goto LBL_ERR; } - x += z; - *outlen -= z; break; - + case LTC_ASN1_PRINTABLE_STRING: z = *outlen; if ((err = der_encode_printable_string(data, size, out + x, &z)) != CRYPT_OK) { goto LBL_ERR; } - x += z; - *outlen -= z; break; case LTC_ASN1_UTF8_STRING: @@ -280,8 +154,6 @@ if ((err = der_encode_utf8_string(data, size, out + x, &z)) != CRYPT_OK) { goto LBL_ERR; } - x += z; - *outlen -= z; break; case LTC_ASN1_UTCTIME: @@ -289,8 +161,13 @@ if ((err = der_encode_utctime(data, out + x, &z)) != CRYPT_OK) { goto LBL_ERR; } - x += z; - *outlen -= z; + break; + + case LTC_ASN1_GENERALIZEDTIME: + z = *outlen; + if ((err = der_encode_generalizedtime(data, out + x, &z)) != CRYPT_OK) { + goto LBL_ERR; + } break; case LTC_ASN1_SET: @@ -298,8 +175,6 @@ if ((err = der_encode_set(data, size, out + x, &z)) != CRYPT_OK) { goto LBL_ERR; } - x += z; - *outlen -= z; break; case LTC_ASN1_SETOF: @@ -307,8 +182,6 @@ if ((err = der_encode_setof(data, size, out + x, &z)) != CRYPT_OK) { goto LBL_ERR; } - x += z; - *outlen -= z; break; case LTC_ASN1_SEQUENCE: @@ -316,20 +189,29 @@ if ((err = der_encode_sequence_ex(data, size, out + x, &z, type)) != CRYPT_OK) { goto LBL_ERR; } - x += z; - *outlen -= z; break; - - default: + + case LTC_ASN1_CHOICE: + case LTC_ASN1_CONSTRUCTED: + case LTC_ASN1_CONTEXT_SPECIFIC: + case LTC_ASN1_EOL: + case LTC_ASN1_TELETEX_STRING: err = CRYPT_INVALID_ARG; goto LBL_ERR; } + + x += z; + *outlen -= z; } *outlen = x; - err = CRYPT_OK; + err = CRYPT_OK; LBL_ERR: return err; } #endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/sequence/der_encode_sequence_multi.c --- a/libtomcrypt/src/pk/asn1/der/sequence/der_encode_sequence_multi.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/sequence/der_encode_sequence_multi.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" #include @@ -25,10 +23,11 @@ @param outlen [in/out] Length of buffer and resulting length of output @remark <...> is of the form (int, unsigned long, void*) @return CRYPT_OK on success -*/ +*/ int der_encode_sequence_multi(unsigned char *out, unsigned long *outlen, ...) { - int err, type; + int err; + ltc_asn1_type type; unsigned long size, x; void *data; va_list args; @@ -41,11 +40,13 @@ va_start(args, outlen); x = 0; for (;;) { - type = va_arg(args, int); + type = (ltc_asn1_type)va_arg(args, int); size = va_arg(args, unsigned long); data = va_arg(args, void*); + LTC_UNUSED_PARAM(size); + LTC_UNUSED_PARAM(data); - if (type == LTC_ASN1_EOL) { + if (type == LTC_ASN1_EOL) { break; } @@ -64,10 +65,16 @@ case LTC_ASN1_SEQUENCE: case LTC_ASN1_SET: case LTC_ASN1_SETOF: - ++x; + case LTC_ASN1_RAW_BIT_STRING: + case LTC_ASN1_GENERALIZEDTIME: + ++x; break; - - default: + + case LTC_ASN1_CHOICE: + case LTC_ASN1_CONSTRUCTED: + case LTC_ASN1_CONTEXT_SPECIFIC: + case LTC_ASN1_EOL: + case LTC_ASN1_TELETEX_STRING: va_end(args); return CRYPT_INVALID_ARG; } @@ -88,11 +95,11 @@ va_start(args, outlen); x = 0; for (;;) { - type = va_arg(args, int); + type = (ltc_asn1_type)va_arg(args, int); size = va_arg(args, unsigned long); data = va_arg(args, void*); - if (type == LTC_ASN1_EOL) { + if (type == LTC_ASN1_EOL) { break; } @@ -111,12 +118,16 @@ case LTC_ASN1_SEQUENCE: case LTC_ASN1_SET: case LTC_ASN1_SETOF: - list[x].type = type; - list[x].size = size; - list[x++].data = data; + case LTC_ASN1_RAW_BIT_STRING: + case LTC_ASN1_GENERALIZEDTIME: + LTC_SET_ASN1(list, x++, type, data, size); break; - - default: + + case LTC_ASN1_CHOICE: + case LTC_ASN1_CONSTRUCTED: + case LTC_ASN1_CONTEXT_SPECIFIC: + case LTC_ASN1_EOL: + case LTC_ASN1_TELETEX_STRING: va_end(args); err = CRYPT_INVALID_ARG; goto LBL_ERR; @@ -124,7 +135,7 @@ } va_end(args); - err = der_encode_sequence(list, x, out, outlen); + err = der_encode_sequence(list, x, out, outlen); LBL_ERR: XFREE(list); return err; @@ -133,6 +144,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/sequence/der_encode_subject_public_key_info.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/asn1/der/sequence/der_encode_subject_public_key_info.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,71 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file der_encode_subject_public_key_info.c + ASN.1 DER, encode a Subject Public Key structure --nmav +*/ + +#ifdef LTC_DER + +/* AlgorithmIdentifier := SEQUENCE { + * algorithm OBJECT IDENTIFIER, + * parameters ANY DEFINED BY algorithm + * } + * + * SubjectPublicKeyInfo := SEQUENCE { + * algorithm AlgorithmIdentifier, + * subjectPublicKey BIT STRING + * } + */ +/** + Encode a subject public key info + @param out The output buffer + @param outlen [in/out] Length of buffer and resulting length of output + @param algorithm One out of the enum #public_key_algorithms + @param public_key The buffer for the public key + @param public_key_len The length of the public key buffer + @param parameters_type The parameters' type out of the enum ltc_asn1_type + @param parameters The parameters to include + @param parameters_len The number of parameters to include + @return CRYPT_OK on success +*/ +int der_encode_subject_public_key_info(unsigned char *out, unsigned long *outlen, + unsigned int algorithm, void* public_key, unsigned long public_key_len, + unsigned long parameters_type, void* parameters, unsigned long parameters_len) +{ + int err; + ltc_asn1_list alg_id[2]; + oid_st oid; + + LTC_ARGCHK(out != NULL); + LTC_ARGCHK(outlen != NULL); + + err = pk_get_oid(algorithm, &oid); + if (err != CRYPT_OK) { + return err; + } + + LTC_SET_ASN1(alg_id, 0, LTC_ASN1_OBJECT_IDENTIFIER, oid.OID, oid.OIDlen); + LTC_SET_ASN1(alg_id, 1, (ltc_asn1_type)parameters_type, parameters, parameters_len); + + return der_encode_sequence_multi(out, outlen, + LTC_ASN1_SEQUENCE, (unsigned long)sizeof(alg_id)/sizeof(alg_id[0]), alg_id, + LTC_ASN1_RAW_BIT_STRING, public_key_len*8U, public_key, + LTC_ASN1_EOL, 0UL, NULL); + +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ + diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/sequence/der_length_sequence.c --- a/libtomcrypt/src/pk/asn1/der/sequence/der_length_sequence.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/sequence/der_length_sequence.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -18,17 +16,24 @@ #ifdef LTC_DER /** - Get the length of a DER sequence + Get the length of a DER sequence @param list The sequences of items in the SEQUENCE @param inlen The number of items - @param outlen [out] The length required in octets to store it + @param outlen [out] The length required in octets to store it @return CRYPT_OK on success */ int der_length_sequence(ltc_asn1_list *list, unsigned long inlen, - unsigned long *outlen) + unsigned long *outlen) { - int err, type; - unsigned long size, x, y, z, i; + return der_length_sequence_ex(list, inlen, outlen, NULL); +} + +int der_length_sequence_ex(ltc_asn1_list *list, unsigned long inlen, + unsigned long *outlen, unsigned long *payloadlen) +{ + int err; + ltc_asn1_type type; + unsigned long size, x, y, i, z; void *data; LTC_ARGCHK(list != NULL); @@ -41,7 +46,7 @@ size = list[i].size; data = list[i].data; - if (type == LTC_ASN1_EOL) { + if (type == LTC_ASN1_EOL) { break; } @@ -52,7 +57,7 @@ } y += x; break; - + case LTC_ASN1_INTEGER: if ((err = der_length_integer(data, &x)) != CRYPT_OK) { goto LBL_ERR; @@ -68,6 +73,7 @@ break; case LTC_ASN1_BIT_STRING: + case LTC_ASN1_RAW_BIT_STRING: if ((err = der_length_bit_string(size, &x)) != CRYPT_OK) { goto LBL_ERR; } @@ -99,6 +105,13 @@ y += x; break; + case LTC_ASN1_TELETEX_STRING: + if ((err = der_length_teletex_string(data, size, &x)) != CRYPT_OK) { + goto LBL_ERR; + } + y += x; + break; + case LTC_ASN1_PRINTABLE_STRING: if ((err = der_length_printable_string(data, size, &x)) != CRYPT_OK) { goto LBL_ERR; @@ -113,6 +126,13 @@ y += x; break; + case LTC_ASN1_GENERALIZEDTIME: + if ((err = der_length_generalizedtime(data, &x)) != CRYPT_OK) { + goto LBL_ERR; + } + y += x; + break; + case LTC_ASN1_UTF8_STRING: if ((err = der_length_utf8_string(data, size, &x)) != CRYPT_OK) { goto LBL_ERR; @@ -129,8 +149,11 @@ y += x; break; - - default: + + case LTC_ASN1_CHOICE: + case LTC_ASN1_CONSTRUCTED: + case LTC_ASN1_CONTEXT_SPECIFIC: + case LTC_ASN1_EOL: err = CRYPT_INVALID_ARG; goto LBL_ERR; } @@ -155,6 +178,7 @@ } /* store size */ + if (payloadlen) *payloadlen = z; *outlen = y; err = CRYPT_OK; @@ -164,6 +188,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/sequence/der_sequence_free.c --- a/libtomcrypt/src/pk/asn1/der/sequence/der_sequence_free.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/sequence/der_sequence_free.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -20,11 +18,13 @@ /** Free memory allocated by der_decode_sequence_flexi() @param in The list to free -*/ +*/ void der_sequence_free(ltc_asn1_list *in) { ltc_asn1_list *l; - + + if (!in) return; + /* walk to the start of the chain */ while (in->prev != NULL || in->parent != NULL) { if (in->parent != NULL) { @@ -33,7 +33,7 @@ in = in->prev; } } - + /* now walk the list and free stuff */ while (in != NULL) { /* is there a child? */ @@ -42,24 +42,22 @@ in->child->parent = NULL; der_sequence_free(in->child); } - - switch (in->type) { - case LTC_ASN1_SET: - case LTC_ASN1_SETOF: - case LTC_ASN1_SEQUENCE: break; + + switch (in->type) { + case LTC_ASN1_SETOF: break; case LTC_ASN1_INTEGER : if (in->data != NULL) { mp_clear(in->data); } break; default : if (in->data != NULL) { XFREE(in->data); } } - + /* move to next and free current */ l = in->next; - free(in); + XFREE(in); in = l; - } + } } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/sequence/der_sequence_shrink.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/asn1/der/sequence/der_sequence_shrink.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,50 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file der_sequence_shrink.c + Free memory allocated for CONSTRUCTED, SET or SEQUENCE elements by der_decode_sequence_flexi(), Steffen Jaeckel +*/ + +#ifdef LTC_DER + +/** + Free memory allocated for CONSTRUCTED, + SET or SEQUENCE elements by der_decode_sequence_flexi() + @param in The list to shrink +*/ +void der_sequence_shrink(ltc_asn1_list *in) +{ + if (!in) return; + + /* now walk the list and free stuff */ + while (in != NULL) { + /* is there a child? */ + if (in->child) { + der_sequence_shrink(in->child); + } + + switch (in->type) { + case LTC_ASN1_CONSTRUCTED: + case LTC_ASN1_SET: + case LTC_ASN1_SEQUENCE : if (in->data != NULL) { XFREE(in->data); in->data = NULL; } break; + default: break; + } + + /* move to next and free current */ + in = in->next; + } +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/set/der_encode_set.c --- a/libtomcrypt/src/pk/asn1/der/set/der_encode_set.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/set/der_encode_set.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -18,35 +16,42 @@ #ifdef LTC_DER /* LTC define to ASN.1 TAG */ -static int ltc_to_asn1(int v) +static int _ltc_to_asn1(ltc_asn1_type v) { switch (v) { case LTC_ASN1_BOOLEAN: return 0x01; case LTC_ASN1_INTEGER: case LTC_ASN1_SHORT_INTEGER: return 0x02; + case LTC_ASN1_RAW_BIT_STRING: case LTC_ASN1_BIT_STRING: return 0x03; case LTC_ASN1_OCTET_STRING: return 0x04; case LTC_ASN1_NULL: return 0x05; case LTC_ASN1_OBJECT_IDENTIFIER: return 0x06; case LTC_ASN1_UTF8_STRING: return 0x0C; case LTC_ASN1_PRINTABLE_STRING: return 0x13; + case LTC_ASN1_TELETEX_STRING: return 0x14; case LTC_ASN1_IA5_STRING: return 0x16; case LTC_ASN1_UTCTIME: return 0x17; + case LTC_ASN1_GENERALIZEDTIME: return 0x18; case LTC_ASN1_SEQUENCE: return 0x30; case LTC_ASN1_SET: case LTC_ASN1_SETOF: return 0x31; - default: return -1; + case LTC_ASN1_CHOICE: + case LTC_ASN1_CONSTRUCTED: + case LTC_ASN1_CONTEXT_SPECIFIC: + case LTC_ASN1_EOL: return -1; } -} - + return -1; +} -static int qsort_helper(const void *a, const void *b) + +static int _qsort_helper(const void *a, const void *b) { ltc_asn1_list *A = (ltc_asn1_list *)a, *B = (ltc_asn1_list *)b; int r; - - r = ltc_to_asn1(A->type) - ltc_to_asn1(B->type); - + + r = _ltc_to_asn1(A->type) - _ltc_to_asn1(B->type); + /* for QSORT the order is UNDEFINED if they are "equal" which means it is NOT DETERMINISTIC. So we force it to be :-) */ if (r == 0) { /* their order in the original list now determines the position */ @@ -54,13 +59,13 @@ } else { return r; } -} +} /* Encode a SET type @param list The list of items to encode @param inlen The number of items in the list - @param out [out] The destination + @param out [out] The destination @param outlen [in/out] The size of the output @return CRYPT_OK on success */ @@ -70,34 +75,34 @@ ltc_asn1_list *copy; unsigned long x; int err; - + /* make copy of list */ copy = XCALLOC(inlen, sizeof(*copy)); if (copy == NULL) { return CRYPT_MEM; - } - + } + /* fill in used member with index so we can fully sort it */ for (x = 0; x < inlen; x++) { copy[x] = list[x]; copy[x].used = x; - } - + } + /* sort it by the "type" field */ - XQSORT(copy, inlen, sizeof(*copy), &qsort_helper); - + XQSORT(copy, inlen, sizeof(*copy), &_qsort_helper); + /* call der_encode_sequence_ex() */ - err = der_encode_sequence_ex(copy, inlen, out, outlen, LTC_ASN1_SET); - + err = der_encode_sequence_ex(copy, inlen, out, outlen, LTC_ASN1_SET); + /* free list */ XFREE(copy); - + return err; -} +} #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/set/der_encode_setof.c --- a/libtomcrypt/src/pk/asn1/der/set/der_encode_setof.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/set/der_encode_setof.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -22,15 +20,15 @@ unsigned long size; }; -static int qsort_helper(const void *a, const void *b) +static int _qsort_helper(const void *a, const void *b) { struct edge *A = (struct edge *)a, *B = (struct edge *)b; int r; unsigned long x; - + /* compare min length */ r = XMEMCMP(A->start, B->start, MIN(A->size, B->size)); - + if (r == 0 && A->size != B->size) { if (A->size > B->size) { for (x = B->size; x < A->size; x++) { @@ -44,28 +42,29 @@ return -1; } } - } + } } - - return r; + + return r; } /** Encode a SETOF stucture @param list The list of items to encode @param inlen The number of items in the list - @param out [out] The destination + @param out [out] The destination @param outlen [in/out] The size of the output @return CRYPT_OK on success -*/ +*/ int der_encode_setof(ltc_asn1_list *list, unsigned long inlen, unsigned char *out, unsigned long *outlen) { - unsigned long x, y, z, hdrlen; + unsigned long x, y, z; + ptrdiff_t hdrlen; int err; struct edge *edges; unsigned char *ptr, *buf; - + /* check that they're all the same type */ for (x = 1; x < inlen; x++) { if (list[x].type != list[x-1].type) { @@ -77,43 +76,43 @@ buf = XCALLOC(1, *outlen); if (buf == NULL) { return CRYPT_MEM; - } - + } + /* encode list */ if ((err = der_encode_sequence_ex(list, inlen, buf, outlen, LTC_ASN1_SETOF)) != CRYPT_OK) { XFREE(buf); return err; } - + /* allocate edges */ edges = XCALLOC(inlen, sizeof(*edges)); if (edges == NULL) { XFREE(buf); return CRYPT_MEM; - } - + } + /* skip header */ - ptr = buf + 1; + ptr = buf + 1; - /* now skip length data */ - x = *ptr++; - if (x >= 0x80) { - ptr += (x & 0x7F); - } - - /* get the size of the static header */ - hdrlen = ((unsigned long)ptr) - ((unsigned long)buf); - - + /* now skip length data */ + x = *ptr++; + if (x >= 0x80) { + ptr += (x & 0x7F); + } + + /* get the size of the static header */ + hdrlen = ptr - buf; + + /* scan for edges */ x = 0; while (ptr < (buf + *outlen)) { /* store start */ edges[x].start = ptr; - + /* skip type */ z = 1; - + /* parse length */ y = ptr[z++]; if (y < 128) { @@ -125,38 +124,38 @@ edges[x].size = (edges[x].size << 8) | ((unsigned long)ptr[z++]); } } - + /* skip content */ edges[x].size += z; ptr += edges[x].size; ++x; - } - + } + /* sort based on contents (using edges) */ - XQSORT(edges, inlen, sizeof(*edges), &qsort_helper); - + XQSORT(edges, inlen, sizeof(*edges), &_qsort_helper); + /* copy static header */ XMEMCPY(out, buf, hdrlen); - + /* copy+sort using edges+indecies to output from buffer */ - for (y = hdrlen, x = 0; x < inlen; x++) { + for (y = (unsigned long)hdrlen, x = 0; x < inlen; x++) { XMEMCPY(out+y, edges[x].start, edges[x].size); y += edges[x].size; - } - + } + #ifdef LTC_CLEAN_STACK zeromem(buf, *outlen); -#endif - +#endif + /* free buffers */ XFREE(edges); XFREE(buf); - + return CRYPT_OK; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/short_integer/der_decode_short_integer.c --- a/libtomcrypt/src/pk/asn1/der/short_integer/der_decode_short_integer.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/short_integer/der_decode_short_integer.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -63,6 +61,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/short_integer/der_encode_short_integer.c --- a/libtomcrypt/src/pk/asn1/der/short_integer/der_encode_short_integer.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/short_integer/der_encode_short_integer.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -26,10 +24,10 @@ @return CRYPT_OK if successful */ int der_encode_short_integer(unsigned long num, unsigned char *out, unsigned long *outlen) -{ +{ unsigned long len, x, y, z; int err; - + LTC_ARGCHK(out != NULL); LTC_ARGCHK(outlen != NULL); @@ -86,12 +84,12 @@ /* we good */ *outlen = x; - + return CRYPT_OK; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/short_integer/der_length_short_integer.c --- a/libtomcrypt/src/pk/asn1/der/short_integer/der_length_short_integer.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/short_integer/der_length_short_integer.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -18,8 +16,8 @@ #ifdef LTC_DER /** - Gets length of DER encoding of num - @param num The integer to get the size of + Gets length of DER encoding of num + @param num The integer to get the size of @param outlen [out] The length of the DER encoding for the given integer @return CRYPT_OK if successful */ @@ -39,7 +37,7 @@ ++z; y >>= 8; } - + /* handle zero */ if (z == 0) { z = 1; @@ -58,13 +56,13 @@ len += (num&(1UL<<((z<<3) - 1))) ? 1 : 0; /* return length */ - *outlen = len; - + *outlen = len; + return CRYPT_OK; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/teletex_string/der_decode_teletex_string.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/asn1/der/teletex_string/der_decode_teletex_string.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,93 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file der_decode_teletex_string.c + ASN.1 DER, encode a teletex STRING +*/ + +#ifdef LTC_DER + +/** + Store a teletex STRING + @param in The DER encoded teletex STRING + @param inlen The size of the DER teletex STRING + @param out [out] The array of octets stored (one per char) + @param outlen [in/out] The number of octets stored + @return CRYPT_OK if successful +*/ +int der_decode_teletex_string(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen) +{ + unsigned long x, y, len; + int t; + + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(out != NULL); + LTC_ARGCHK(outlen != NULL); + + /* must have header at least */ + if (inlen < 2) { + return CRYPT_INVALID_PACKET; + } + + /* check for 0x14 */ + if ((in[0] & 0x1F) != 0x14) { + return CRYPT_INVALID_PACKET; + } + x = 1; + + /* decode the length */ + if (in[x] & 0x80) { + /* valid # of bytes in length are 1,2,3 */ + y = in[x] & 0x7F; + if ((y == 0) || (y > 3) || ((x + y) > inlen)) { + return CRYPT_INVALID_PACKET; + } + + /* read the length in */ + len = 0; + ++x; + while (y--) { + len = (len << 8) | in[x++]; + } + } else { + len = in[x++] & 0x7F; + } + + /* is it too long? */ + if (len > *outlen) { + *outlen = len; + return CRYPT_BUFFER_OVERFLOW; + } + + if (len + x > inlen) { + return CRYPT_INVALID_PACKET; + } + + /* read the data */ + for (y = 0; y < len; y++) { + t = der_teletex_value_decode(in[x++]); + if (t == -1) { + return CRYPT_INVALID_ARG; + } + out[y] = t; + } + + *outlen = y; + + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/teletex_string/der_length_teletex_string.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/asn1/der/teletex_string/der_length_teletex_string.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,208 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file der_length_teletex_string.c + ASN.1 DER, get length of teletex STRING +*/ + +#ifdef LTC_DER + +static const struct { + int code, value; +} teletex_table[] = { +{ '\0', 0 }, +{ '\a', 7 }, +{ '\b', 8 }, +{ '\t', 9 }, +{ '\n', 10 }, +{ '\v', 11 }, +{ '\f', 12 }, +{ '\r', 13 }, +{ ' ', 32 }, +{ '!', 33 }, +{ '"', 34 }, +{ '%', 37 }, +{ '&', 38 }, +{ '\'', 39 }, +{ '(', 40 }, +{ ')', 41 }, +{ '+', 43 }, +{ ',', 44 }, +{ '-', 45 }, +{ '.', 46 }, +{ '/', 47 }, +{ '0', 48 }, +{ '1', 49 }, +{ '2', 50 }, +{ '3', 51 }, +{ '4', 52 }, +{ '5', 53 }, +{ '6', 54 }, +{ '7', 55 }, +{ '8', 56 }, +{ '9', 57 }, +{ ':', 58 }, +{ ';', 59 }, +{ '<', 60 }, +{ '=', 61 }, +{ '>', 62 }, +{ '?', 63 }, +{ '@', 64 }, +{ 'A', 65 }, +{ 'B', 66 }, +{ 'C', 67 }, +{ 'D', 68 }, +{ 'E', 69 }, +{ 'F', 70 }, +{ 'G', 71 }, +{ 'H', 72 }, +{ 'I', 73 }, +{ 'J', 74 }, +{ 'K', 75 }, +{ 'L', 76 }, +{ 'M', 77 }, +{ 'N', 78 }, +{ 'O', 79 }, +{ 'P', 80 }, +{ 'Q', 81 }, +{ 'R', 82 }, +{ 'S', 83 }, +{ 'T', 84 }, +{ 'U', 85 }, +{ 'V', 86 }, +{ 'W', 87 }, +{ 'X', 88 }, +{ 'Y', 89 }, +{ 'Z', 90 }, +{ '[', 91 }, +{ ']', 93 }, +{ '_', 95 }, +{ 'a', 97 }, +{ 'b', 98 }, +{ 'c', 99 }, +{ 'd', 100 }, +{ 'e', 101 }, +{ 'f', 102 }, +{ 'g', 103 }, +{ 'h', 104 }, +{ 'i', 105 }, +{ 'j', 106 }, +{ 'k', 107 }, +{ 'l', 108 }, +{ 'm', 109 }, +{ 'n', 110 }, +{ 'o', 111 }, +{ 'p', 112 }, +{ 'q', 113 }, +{ 'r', 114 }, +{ 's', 115 }, +{ 't', 116 }, +{ 'u', 117 }, +{ 'v', 118 }, +{ 'w', 119 }, +{ 'x', 120 }, +{ 'y', 121 }, +{ 'z', 122 }, +{ '|', 124 }, +{ ' ', 160 }, +{ 0xa1, 161 }, +{ 0xa2, 162 }, +{ 0xa3, 163 }, +{ '$', 164 }, +{ 0xa5, 165 }, +{ '#', 166 }, +{ 0xa7, 167 }, +{ 0xa4, 168 }, +{ 0xab, 171 }, +{ 0xb0, 176 }, +{ 0xb1, 177 }, +{ 0xb2, 178 }, +{ 0xb3, 179 }, +{ 0xd7, 180 }, +{ 0xb5, 181 }, +{ 0xb6, 182 }, +{ 0xb7, 183 }, +{ 0xf7, 184 }, +{ 0xbb, 187 }, +{ 0xbc, 188 }, +{ 0xbd, 189 }, +{ 0xbe, 190 }, +{ 0xbf, 191 }, +}; + +int der_teletex_char_encode(int c) +{ + int x; + for (x = 0; x < (int)(sizeof(teletex_table)/sizeof(teletex_table[0])); x++) { + if (teletex_table[x].code == c) { + return teletex_table[x].value; + } + } + return -1; +} + +int der_teletex_value_decode(int v) +{ + int x; + for (x = 0; x < (int)(sizeof(teletex_table)/sizeof(teletex_table[0])); x++) { + if (teletex_table[x].value == v) { + return teletex_table[x].code; + } + } + return -1; +} + +/** + Gets length of DER encoding of teletex STRING + @param octets The values you want to encode + @param noctets The number of octets in the string to encode + @param outlen [out] The length of the DER encoding for the given string + @return CRYPT_OK if successful +*/ +int der_length_teletex_string(const unsigned char *octets, unsigned long noctets, unsigned long *outlen) +{ + unsigned long x; + + LTC_ARGCHK(outlen != NULL); + LTC_ARGCHK(octets != NULL); + + /* scan string for validity */ + for (x = 0; x < noctets; x++) { + if (der_teletex_char_encode(octets[x]) == -1) { + return CRYPT_INVALID_ARG; + } + } + + if (noctets < 128) { + /* 16 LL DD DD DD ... */ + *outlen = 2 + noctets; + } else if (noctets < 256) { + /* 16 81 LL DD DD DD ... */ + *outlen = 3 + noctets; + } else if (noctets < 65536UL) { + /* 16 82 LL LL DD DD DD ... */ + *outlen = 4 + noctets; + } else if (noctets < 16777216UL) { + /* 16 83 LL LL LL DD DD DD ... */ + *outlen = 5 + noctets; + } else { + return CRYPT_INVALID_ARG; + } + + return CRYPT_OK; +} + +#endif + + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/utctime/der_decode_utctime.c --- a/libtomcrypt/src/pk/asn1/der/utctime/der_decode_utctime.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/utctime/der_decode_utctime.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -17,7 +15,7 @@ #ifdef LTC_DER -static int char_to_int(unsigned char x) +static int _char_to_int(unsigned char x) { switch (x) { case '0': return 0; @@ -30,12 +28,12 @@ case '7': return 7; case '8': return 8; case '9': return 9; + default: return 100; } - return 100; } #define DECODE_V(y, max) \ - y = char_to_int(buf[x])*10 + char_to_int(buf[x+1]); \ + y = _char_to_int(buf[x])*10 + _char_to_int(buf[x+1]); \ if (y >= max) return CRYPT_INVALID_PACKET; \ x += 2; @@ -49,7 +47,7 @@ int der_decode_utctime(const unsigned char *in, unsigned long *inlen, ltc_utctime *out) { - unsigned char buf[32]; + unsigned char buf[32] = { 0 }; /* initialize as all zeroes */ unsigned long x; int y; @@ -73,7 +71,7 @@ *inlen = 2 + x; - /* possible encodings are + /* possible encodings are YYMMDDhhmmZ YYMMDDhhmm+hh'mm' YYMMDDhhmm-hh'mm' @@ -81,7 +79,7 @@ YYMMDDhhmmss+hh'mm' YYMMDDhhmmss-hh'mm' - So let's do a trivial decode upto [including] mm + So let's do a trivial decode upto [including] mm */ x = 0; @@ -122,6 +120,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/utctime/der_encode_utctime.c --- a/libtomcrypt/src/pk/asn1/der/utctime/der_encode_utctime.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/utctime/der_encode_utctime.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -17,7 +15,7 @@ #ifdef LTC_DER -static const char *baseten = "0123456789"; +static const char * const baseten = "0123456789"; #define STORE_V(y) \ out[x++] = der_ia5_char_encode(baseten[(y/10) % 10]); \ @@ -30,12 +28,12 @@ @param outlen [in/out] The length of the DER encoding @return CRYPT_OK if successful */ -int der_encode_utctime(ltc_utctime *utctime, +int der_encode_utctime(ltc_utctime *utctime, unsigned char *out, unsigned long *outlen) { unsigned long x, tmplen; int err; - + LTC_ARGCHK(utctime != NULL); LTC_ARGCHK(out != NULL); LTC_ARGCHK(outlen != NULL); @@ -47,7 +45,7 @@ *outlen = tmplen; return CRYPT_BUFFER_OVERFLOW; } - + /* store header */ out[0] = 0x17; @@ -70,7 +68,7 @@ /* store length */ out[1] = (unsigned char)(x - 2); - + /* all good let's return */ *outlen = x; return CRYPT_OK; @@ -78,6 +76,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/utctime/der_length_utctime.c --- a/libtomcrypt/src/pk/asn1/der/utctime/der_length_utctime.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/utctime/der_length_utctime.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -41,6 +39,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/utf8/der_decode_utf8_string.c --- a/libtomcrypt/src/pk/asn1/der/utf8/der_decode_utf8_string.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/utf8/der_decode_utf8_string.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -31,6 +29,7 @@ { wchar_t tmp; unsigned long x, y, z, len; + int err; LTC_ARGCHK(in != NULL); LTC_ARGCHK(out != NULL); @@ -73,10 +72,10 @@ for (y = 0; x < inlen; ) { /* get first byte */ tmp = in[x++]; - + /* count number of bytes */ for (z = 0; (tmp & 0x80) && (z <= 4); z++, tmp = (tmp << 1) & 0xFF); - + if (z > 4 || (x + (z - 1) > inlen)) { return CRYPT_INVALID_PACKET; } @@ -93,19 +92,23 @@ tmp = (tmp << 6) | ((wchar_t)in[x++] & 0x3F); } - if (y > *outlen) { - *outlen = y; - return CRYPT_BUFFER_OVERFLOW; + if (y < *outlen) { + out[y] = tmp; } - out[y++] = tmp; + y++; + } + if (y > *outlen) { + err = CRYPT_BUFFER_OVERFLOW; + } else { + err = CRYPT_OK; } *outlen = y; - return CRYPT_OK; + return err; } - + #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/utf8/der_encode_utf8_string.c --- a/libtomcrypt/src/pk/asn1/der/utf8/der_encode_utf8_string.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/utf8/der_encode_utf8_string.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -37,9 +35,7 @@ /* get the size */ for (x = len = 0; x < inlen; x++) { - if (in[x] < 0 || in[x] > 0x1FFFF) { - return CRYPT_INVALID_ARG; - } + if (!der_utf8_valid_char(in[x])) return CRYPT_INVALID_ARG; len += der_utf8_charsize(in[x]); } @@ -57,7 +53,7 @@ /* too big? */ if (y > *outlen) { - *outlen = len; + *outlen = y; return CRYPT_BUFFER_OVERFLOW; } @@ -79,6 +75,7 @@ out[x++] = (unsigned char)((len>>8)&255); out[x++] = (unsigned char)(len&255); } else { + /* coverity[dead_error_line] */ return CRYPT_INVALID_ARG; } @@ -88,7 +85,9 @@ case 1: out[x++] = (unsigned char)in[y]; break; case 2: out[x++] = 0xC0 | ((in[y] >> 6) & 0x1F); out[x++] = 0x80 | (in[y] & 0x3F); break; case 3: out[x++] = 0xE0 | ((in[y] >> 12) & 0x0F); out[x++] = 0x80 | ((in[y] >> 6) & 0x3F); out[x++] = 0x80 | (in[y] & 0x3F); break; +#if !defined(LTC_WCHAR_MAX) || LTC_WCHAR_MAX > 0xFFFF case 4: out[x++] = 0xF0 | ((in[y] >> 18) & 0x07); out[x++] = 0x80 | ((in[y] >> 12) & 0x3F); out[x++] = 0x80 | ((in[y] >> 6) & 0x3F); out[x++] = 0x80 | (in[y] & 0x3F); break; +#endif } } @@ -100,6 +99,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/asn1/der/utf8/der_length_utf8_string.c --- a/libtomcrypt/src/pk/asn1/der/utf8/der_length_utf8_string.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/asn1/der/utf8/der_length_utf8_string.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -27,15 +25,38 @@ return 1; } else if (c <= 0x7FF) { return 2; +#if LTC_WCHAR_MAX == 0xFFFF + } else { + return 3; + } +#else } else if (c <= 0xFFFF) { return 3; } else { return 4; } +#endif } /** - Gets length of DER encoding of UTF8 STRING + Test whether the given code point is valid character + @param c The UTF-8 character to test + @return 1 - valid, 0 - invalid +*/ +int der_utf8_valid_char(const wchar_t c) +{ + LTC_UNUSED_PARAM(c); +#if !defined(LTC_WCHAR_MAX) || LTC_WCHAR_MAX > 0xFFFF + if (c > 0x10FFFF) return 0; +#endif +#if LTC_WCHAR_MAX != 0xFFFF && LTC_WCHAR_MAX != 0xFFFFFFFF + if (c < 0) return 0; +#endif + return 1; +} + +/** + Gets length of DER encoding of UTF8 STRING @param in The characters to measure the length of @param noctets The number of octets in the string to encode @param outlen [out] The length of the DER encoding for the given string @@ -50,9 +71,7 @@ len = 0; for (x = 0; x < noctets; x++) { - if (in[x] < 0 || in[x] > 0x10FFFF) { - return CRYPT_INVALID_ARG; - } + if (!der_utf8_valid_char(in[x])) return CRYPT_INVALID_ARG; len += der_utf8_charsize(in[x]); } @@ -78,6 +97,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dh/dh.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/dh/dh.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,237 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_MDH + +/* This holds the key settings. ***MUST*** be organized by size from smallest to largest. */ +const ltc_dh_set_type ltc_dh_sets[] = { +#ifdef LTC_DH768 +{ /* 768-bit MODP Group 1 - https://tools.ietf.org/html/rfc7296#appendix-B.1 */ + 96, + "DH-768", + "2", + "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" + "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" + "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" + "E485B576625E7EC6F44C42E9A63A3620FFFFFFFFFFFFFFFF" +}, +#endif +#ifdef LTC_DH1024 +{ /* 1024-bit MODP Group 2 - https://tools.ietf.org/html/rfc7296#appendix-B.2 */ + 128, + "DH-1024", + "2", + "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" + "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" + "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" + "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" + "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381" + "FFFFFFFFFFFFFFFF" +}, +#endif +#ifdef LTC_DH1536 +{ /* 1536-bit MODP Group 5 - https://tools.ietf.org/html/rfc3526#section-2 */ + 192, + "DH-1536", + "2", + "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" + "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" + "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" + "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" + "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" + "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" + "83655D23DCA3AD961C62F356208552BB9ED529077096966D" + "670C354E4ABC9804F1746C08CA237327FFFFFFFFFFFFFFFF" +}, +#endif +#ifdef LTC_DH2048 +{ /* 2048-bit MODP Group 14 - https://tools.ietf.org/html/rfc3526#section-3 */ + 256, + "DH-2048", + "2", + "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" + "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" + "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" + "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" + "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" + "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" + "83655D23DCA3AD961C62F356208552BB9ED529077096966D" + "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" + "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" + "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" + "15728E5A8AACAA68FFFFFFFFFFFFFFFF" +}, +#endif +#ifdef LTC_DH3072 +{ /* 3072-bit MODP Group 15 - https://tools.ietf.org/html/rfc3526#section-4 */ + 384, + "DH-3072", + "2", + "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" + "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" + "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" + "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" + "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" + "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" + "83655D23DCA3AD961C62F356208552BB9ED529077096966D" + "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" + "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" + "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" + "15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64" + "ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7" + "ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B" + "F12FFA06D98A0864D87602733EC86A64521F2B18177B200C" + "BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31" + "43DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF" +}, +#endif +#ifdef LTC_DH4096 +{ /* 4096-bit MODP Group 16 - https://tools.ietf.org/html/rfc3526#section-5 */ + 512, + "DH-4096", + "2", + "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" + "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" + "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" + "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" + "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" + "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" + "83655D23DCA3AD961C62F356208552BB9ED529077096966D" + "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" + "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" + "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" + "15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64" + "ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7" + "ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B" + "F12FFA06D98A0864D87602733EC86A64521F2B18177B200C" + "BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31" + "43DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D7" + "88719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA" + "2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6" + "287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED" + "1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA9" + "93B4EA988D8FDDC186FFB7DC90A6C08F4DF435C934063199" + "FFFFFFFFFFFFFFFF" +}, +#endif +#ifdef LTC_DH6144 +{ /* 6144-bit MODP Group 17 - https://tools.ietf.org/html/rfc3526#section-6 */ + 768, + "DH-6144", + "2", + "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" + "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" + "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" + "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" + "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" + "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" + "83655D23DCA3AD961C62F356208552BB9ED529077096966D" + "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" + "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" + "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" + "15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64" + "ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7" + "ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B" + "F12FFA06D98A0864D87602733EC86A64521F2B18177B200C" + "BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31" + "43DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D7" + "88719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA" + "2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6" + "287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED" + "1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA9" + "93B4EA988D8FDDC186FFB7DC90A6C08F4DF435C934028492" + "36C3FAB4D27C7026C1D4DCB2602646DEC9751E763DBA37BD" + "F8FF9406AD9E530EE5DB382F413001AEB06A53ED9027D831" + "179727B0865A8918DA3EDBEBCF9B14ED44CE6CBACED4BB1B" + "DB7F1447E6CC254B332051512BD7AF426FB8F401378CD2BF" + "5983CA01C64B92ECF032EA15D1721D03F482D7CE6E74FEF6" + "D55E702F46980C82B5A84031900B1C9E59E7C97FBEC7E8F3" + "23A97A7E36CC88BE0F1D45B7FF585AC54BD407B22B4154AA" + "CC8F6D7EBF48E1D814CC5ED20F8037E0A79715EEF29BE328" + "06A1D58BB7C5DA76F550AA3D8A1FBFF0EB19CCB1A313D55C" + "DA56C9EC2EF29632387FE8D76E3C0468043E8F663F4860EE" + "12BF2D5B0B7474D6E694F91E6DCC4024FFFFFFFFFFFFFFFF" +}, +#endif +#ifdef LTC_DH8192 +{ /* 8192-bit MODP Group 18 - https://tools.ietf.org/html/rfc3526#section-7 */ + 1024, + "DH-8192", + "2", + "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" + "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" + "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" + "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" + "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" + "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" + "83655D23DCA3AD961C62F356208552BB9ED529077096966D" + "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" + "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" + "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" + "15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64" + "ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7" + "ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B" + "F12FFA06D98A0864D87602733EC86A64521F2B18177B200C" + "BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31" + "43DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D7" + "88719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA" + "2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6" + "287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED" + "1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA9" + "93B4EA988D8FDDC186FFB7DC90A6C08F4DF435C934028492" + "36C3FAB4D27C7026C1D4DCB2602646DEC9751E763DBA37BD" + "F8FF9406AD9E530EE5DB382F413001AEB06A53ED9027D831" + "179727B0865A8918DA3EDBEBCF9B14ED44CE6CBACED4BB1B" + "DB7F1447E6CC254B332051512BD7AF426FB8F401378CD2BF" + "5983CA01C64B92ECF032EA15D1721D03F482D7CE6E74FEF6" + "D55E702F46980C82B5A84031900B1C9E59E7C97FBEC7E8F3" + "23A97A7E36CC88BE0F1D45B7FF585AC54BD407B22B4154AA" + "CC8F6D7EBF48E1D814CC5ED20F8037E0A79715EEF29BE328" + "06A1D58BB7C5DA76F550AA3D8A1FBFF0EB19CCB1A313D55C" + "DA56C9EC2EF29632387FE8D76E3C0468043E8F663F4860EE" + "12BF2D5B0B7474D6E694F91E6DBE115974A3926F12FEE5E4" + "38777CB6A932DF8CD8BEC4D073B931BA3BC832B68D9DD300" + "741FA7BF8AFC47ED2576F6936BA424663AAB639C5AE4F568" + "3423B4742BF1C978238F16CBE39D652DE3FDB8BEFC848AD9" + "22222E04A4037C0713EB57A81A23F0C73473FC646CEA306B" + "4BCBC8862F8385DDFA9D4B7FA2C087E879683303ED5BDD3A" + "062B3CF5B3A278A66D2A13F83F44F82DDF310EE074AB6A36" + "4597E899A0255DC164F31CC50846851DF9AB48195DED7EA1" + "B1D510BD7EE74D73FAF36BC31ECFA268359046F4EB879F92" + "4009438B481C6CD7889A002ED5EE382BC9190DA6FC026E47" + "9558E4475677E9AA9E3050E2765694DFC81F56E880B96E71" + "60C980DD98EDD3DFFFFFFFFFFFFFFFFF" +}, +#endif +{ + 0, + NULL, + NULL, + NULL +} +}; + +/** + Returns the DH group size (octets) for given key + @param key The DH key to get the size of + @return The group size in octets (0 on error) + */ +int dh_get_groupsize(dh_key *key) +{ + if (key == NULL) return 0; + return mp_unsigned_bin_size(key->prime); +} + +#endif /* LTC_MDH */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dh/dh_check_pubkey.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/dh/dh_check_pubkey.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,65 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_MDH + +/** + Check DH public key (INTERNAL ONLY, not part of public API) + @param key The key you wish to test + @return CRYPT_OK if successful +*/ +int dh_check_pubkey(dh_key *key) +{ + void *p_minus1; + ltc_mp_digit digit; + int i, digit_count, bits_set = 0, err; + + LTC_ARGCHK(key != NULL); + + if ((err = mp_init(&p_minus1)) != CRYPT_OK) { + return err; + } + + /* avoid: y <= 1 OR y >= p-1 */ + if ((err = mp_sub_d(key->prime, 1, p_minus1)) != CRYPT_OK) { + goto error; + } + if (mp_cmp(key->y, p_minus1) != LTC_MP_LT || mp_cmp_d(key->y, 1) != LTC_MP_GT) { + err = CRYPT_INVALID_ARG; + goto error; + } + + /* public key must have more than one bit set */ + digit_count = mp_get_digit_count(key->y); + for (i = 0; i < digit_count && bits_set < 2; i++) { + digit = mp_get_digit(key->y, i); + while (digit > 0) { + if (digit & 1) bits_set++; + digit >>= 1; + } + } + if (bits_set > 1) { + err = CRYPT_OK; + } + else { + err = CRYPT_INVALID_ARG; + } + +error: + mp_clear(p_minus1); + return err; +} + +#endif /* LTC_MDH */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dh/dh_export.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/dh/dh_export.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,62 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_MDH + +/** + Export a DH key to a binary packet + @param out [out] The destination for the key + @param outlen [in/out] The max size and resulting size of the DH key + @param type Which type of key (PK_PRIVATE or PK_PUBLIC) + @param key The key you wish to export + @return CRYPT_OK if successful +*/ +int dh_export(unsigned char *out, unsigned long *outlen, int type, dh_key *key) +{ + unsigned char flags[1]; + int err; + unsigned long version = 0; + + LTC_ARGCHK(out != NULL); + LTC_ARGCHK(outlen != NULL); + LTC_ARGCHK(key != NULL); + + if (type == PK_PRIVATE) { + /* export x - private key */ + flags[0] = 1; + err = der_encode_sequence_multi(out, outlen, + LTC_ASN1_SHORT_INTEGER, 1UL, &version, + LTC_ASN1_BIT_STRING, 1UL, flags, + LTC_ASN1_INTEGER, 1UL, key->prime, + LTC_ASN1_INTEGER, 1UL, key->base, + LTC_ASN1_INTEGER, 1UL, key->x, + LTC_ASN1_EOL, 0UL, NULL); + } + else { + /* export y - public key */ + flags[0] = 0; + err = der_encode_sequence_multi(out, outlen, + LTC_ASN1_SHORT_INTEGER, 1UL, &version, + LTC_ASN1_BIT_STRING, 1UL, flags, + LTC_ASN1_INTEGER, 1UL, key->prime, + LTC_ASN1_INTEGER, 1UL, key->base, + LTC_ASN1_INTEGER, 1UL, key->y, + LTC_ASN1_EOL, 0UL, NULL); + } + + return err; +} + +#endif /* LTC_MDH */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dh/dh_export_key.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/dh/dh_export_key.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,47 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_MDH + +/** + Binary export a DH key to a buffer + @param out [out] The destination for the key + @param outlen [in/out] The max size and resulting size of the DH key + @param type Which type of key (PK_PRIVATE or PK_PUBLIC) + @param key The key you wish to export + @return CRYPT_OK if successful +*/ +int dh_export_key(void *out, unsigned long *outlen, int type, dh_key *key) +{ + unsigned long len; + void *k; + + LTC_ARGCHK(out != NULL); + LTC_ARGCHK(outlen != NULL); + LTC_ARGCHK(key != NULL); + + k = (type == PK_PRIVATE) ? key->x : key->y; + len = mp_unsigned_bin_size(k); + + if (*outlen < len) { + *outlen = len; + return CRYPT_BUFFER_OVERFLOW; + } + *outlen = len; + + return mp_to_unsigned_bin(k, out); +} + +#endif /* LTC_MDH */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dh/dh_free.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/dh/dh_free.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,28 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_MDH + +/** + Free the allocated ram for a DH key + @param key The key which you wish to free +*/ +void dh_free(dh_key *key) +{ + LTC_ARGCHKVD(key != NULL); + mp_cleanup_multi(&key->prime, &key->base, &key->y, &key->x, NULL); +} + +#endif /* LTC_MDH */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dh/dh_generate_key.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/dh/dh_generate_key.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,102 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_MDH + +static int _dh_groupsize_to_keysize(int groupsize) +{ + /* The strength estimates from https://tools.ietf.org/html/rfc3526#section-8 + * We use "Estimate 2" to get an appropriate private key (exponent) size. + */ + if (groupsize <= 0) { + return 0; + } + else if (groupsize <= 192) { + return 30; /* 1536-bit => key size 240-bit */ + } + else if (groupsize <= 256) { + return 40; /* 2048-bit => key size 320-bit */ + } + else if (groupsize <= 384) { + return 52; /* 3072-bit => key size 416-bit */ + } + else if (groupsize <= 512) { + return 60; /* 4096-bit => key size 480-bit */ + } + else if (groupsize <= 768) { + return 67; /* 6144-bit => key size 536-bit */ + } + else if (groupsize <= 1024) { + return 77; /* 8192-bit => key size 616-bit */ + } + else { + return 0; + } +} + +int dh_generate_key(prng_state *prng, int wprng, dh_key *key) +{ + unsigned char *buf; + unsigned long keysize; + int err, max_iterations = LTC_PK_MAX_RETRIES; + + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(ltc_mp.name != NULL); + + /* good prng? */ + if ((err = prng_is_valid(wprng)) != CRYPT_OK) { + return err; + } + + keysize = _dh_groupsize_to_keysize(mp_unsigned_bin_size(key->prime)); + if (keysize == 0) { + err = CRYPT_INVALID_KEYSIZE; + goto freemp; + } + + /* allocate buffer */ + buf = XMALLOC(keysize); + if (buf == NULL) { + err = CRYPT_MEM; + goto freemp; + } + + key->type = PK_PRIVATE; + do { + /* make up random buf */ + if (prng_descriptor[wprng].read(buf, keysize, prng) != keysize) { + err = CRYPT_ERROR_READPRNG; + goto freebuf; + } + /* load the x value - private key */ + if ((err = mp_read_unsigned_bin(key->x, buf, keysize)) != CRYPT_OK) { + goto freebuf; + } + /* compute the y value - public key */ + if ((err = mp_exptmod(key->base, key->x, key->prime, key->y)) != CRYPT_OK) { + goto freebuf; + } + err = dh_check_pubkey(key); + } while (err != CRYPT_OK && max_iterations-- > 0); + +freebuf: + zeromem(buf, keysize); + XFREE(buf); +freemp: + if (err != CRYPT_OK) dh_free(key); + return err; +} + +#endif /* LTC_MDH */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dh/dh_import.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/dh/dh_import.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,99 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_MDH + +/** + Import a DH key from a binary packet + @param in The packet to read + @param inlen The length of the input packet + @param key [out] Where to import the key to + @return CRYPT_OK if successful, on error all allocated memory is freed automatically +*/ +int dh_import(const unsigned char *in, unsigned long inlen, dh_key *key) +{ + unsigned char flags[1]; + int err; + unsigned long version; + + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(key != NULL); + + /* init */ + if ((err = mp_init_multi(&key->x, &key->y, &key->base, &key->prime, NULL)) != CRYPT_OK) { + return err; + } + + /* find out what type of key it is */ + err = der_decode_sequence_multi(in, inlen, + LTC_ASN1_SHORT_INTEGER, 1UL, &version, + LTC_ASN1_BIT_STRING, 1UL, &flags, + LTC_ASN1_EOL, 0UL, NULL); + if (err != CRYPT_OK && err != CRYPT_INPUT_TOO_LONG) { + goto error; + } + + if (version == 0) { + if (flags[0] == 1) { + key->type = PK_PRIVATE; + if ((err = der_decode_sequence_multi(in, inlen, + LTC_ASN1_SHORT_INTEGER, 1UL, &version, + LTC_ASN1_BIT_STRING, 1UL, flags, + LTC_ASN1_INTEGER, 1UL, key->prime, + LTC_ASN1_INTEGER, 1UL, key->base, + LTC_ASN1_INTEGER, 1UL, key->x, + LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { + goto error; + } + /* compute public key: y = (base ^ x) mod prime */ + if ((err = mp_exptmod(key->base, key->x, key->prime, key->y)) != CRYPT_OK) { + goto error; + } + } + else if (flags[0] == 0) { + key->type = PK_PUBLIC; + if ((err = der_decode_sequence_multi(in, inlen, + LTC_ASN1_SHORT_INTEGER, 1UL, &version, + LTC_ASN1_BIT_STRING, 1UL, flags, + LTC_ASN1_INTEGER, 1UL, key->prime, + LTC_ASN1_INTEGER, 1UL, key->base, + LTC_ASN1_INTEGER, 1UL, key->y, + LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { + goto error; + } + } + else { + err = CRYPT_INVALID_PACKET; + goto error; + } + } + else { + err = CRYPT_INVALID_PACKET; + goto error; + } + + /* check public key */ + if ((err = dh_check_pubkey(key)) != CRYPT_OK) { + goto error; + } + + return CRYPT_OK; + +error: + dh_free(key); + return err; +} + +#endif /* LTC_MDH */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dh/dh_set.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/dh/dh_set.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,124 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_MDH + +/** + Import DH key parts p and g from raw numbers + + @param p DH's p (prime) + @param plen DH's p's length + @param g DH's g (group) + @param glen DH's g's length + @param key [out] the destination for the imported key + @return CRYPT_OK if successful +*/ +int dh_set_pg(const unsigned char *p, unsigned long plen, + const unsigned char *g, unsigned long glen, + dh_key *key) +{ + int err; + + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(p != NULL); + LTC_ARGCHK(g != NULL); + LTC_ARGCHK(ltc_mp.name != NULL); + + if ((err = mp_init_multi(&key->x, &key->y, &key->base, &key->prime, NULL)) != CRYPT_OK) { + return err; + } + + if ((err = mp_read_unsigned_bin(key->base, (unsigned char*)g, glen)) != CRYPT_OK) { goto LBL_ERR; } + if ((err = mp_read_unsigned_bin(key->prime, (unsigned char*)p, plen)) != CRYPT_OK) { goto LBL_ERR; } + + return CRYPT_OK; + +LBL_ERR: + dh_free(key); + return err; +} + +/** + Import DH key parts p and g from built-in DH groups + + @param groupsize The size of the DH group to use + @param key [out] Where the newly created DH key will be stored + @return CRYPT_OK if successful, note: on error all allocated memory will be freed automatically. +*/ +int dh_set_pg_groupsize(int groupsize, dh_key *key) +{ + int err, i; + + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(ltc_mp.name != NULL); + LTC_ARGCHK(groupsize > 0); + + for (i = 0; (groupsize > ltc_dh_sets[i].size) && (ltc_dh_sets[i].size != 0); i++); + if (ltc_dh_sets[i].size == 0) return CRYPT_INVALID_KEYSIZE; + + if ((err = mp_init_multi(&key->x, &key->y, &key->base, &key->prime, NULL)) != CRYPT_OK) { + return err; + } + if ((err = mp_read_radix(key->base, ltc_dh_sets[i].base, 16)) != CRYPT_OK) { goto LBL_ERR; } + if ((err = mp_read_radix(key->prime, ltc_dh_sets[i].prime, 16)) != CRYPT_OK) { goto LBL_ERR; } + + return CRYPT_OK; + +LBL_ERR: + dh_free(key); + return err; +} + +/** + Import DH public or private key part from raw numbers + + NB: The p & g parts must be set beforehand + + @param in The key-part to import, either public or private. + @param inlen The key-part's length + @param type Which type of key (PK_PRIVATE or PK_PUBLIC) + @param key [out] the destination for the imported key + @return CRYPT_OK if successful +*/ +int dh_set_key(const unsigned char *in, unsigned long inlen, int type, dh_key *key) +{ + int err; + + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(ltc_mp.name != NULL); + + if (type == PK_PRIVATE) { + key->type = PK_PRIVATE; + if ((err = mp_read_unsigned_bin(key->x, (unsigned char*)in, inlen)) != CRYPT_OK) { goto LBL_ERR; } + if ((err = mp_exptmod(key->base, key->x, key->prime, key->y)) != CRYPT_OK) { goto LBL_ERR; } + } + else { + key->type = PK_PUBLIC; + if ((err = mp_read_unsigned_bin(key->y, (unsigned char*)in, inlen)) != CRYPT_OK) { goto LBL_ERR; } + } + + /* check public key */ + if ((err = dh_check_pubkey(key)) != CRYPT_OK) { + goto LBL_ERR; + } + + return CRYPT_OK; + +LBL_ERR: + dh_free(key); + return err; +} + +#endif /* LTC_MDH */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dh/dh_set_pg_dhparam.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/dh/dh_set_pg_dhparam.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,54 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_MDH + +/** + Import DH key parts p and g from dhparam + + dhparam data: openssl dhparam -outform DER -out dhparam.der 2048 + + @param dhparam The DH param DER encoded data + @param dhparamlen The length of dhparam data + @param key [out] Where the newly created DH key will be stored + @return CRYPT_OK if successful, note: on error all allocated memory will be freed automatically. +*/ +int dh_set_pg_dhparam(const unsigned char *dhparam, unsigned long dhparamlen, dh_key *key) +{ + int err; + + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(ltc_mp.name != NULL); + LTC_ARGCHK(dhparam != NULL); + LTC_ARGCHK(dhparamlen > 0); + + if ((err = mp_init_multi(&key->x, &key->y, &key->base, &key->prime, NULL)) != CRYPT_OK) { + return err; + } + if ((err = der_decode_sequence_multi(dhparam, dhparamlen, + LTC_ASN1_INTEGER, 1UL, key->prime, + LTC_ASN1_INTEGER, 1UL, key->base, + LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { + goto LBL_ERR; + } + + return CRYPT_OK; + +LBL_ERR: + dh_free(key); + return err; +} + +#endif /* LTC_MDH */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dh/dh_shared_secret.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/dh/dh_shared_secret.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,80 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_MDH + +/** + Create a DH shared secret. + @param private_key The private DH key in the pair + @param public_key The public DH key in the pair + @param out [out] The destination of the shared data + @param outlen [in/out] The max size and resulting size of the shared data. + @return CRYPT_OK if successful +*/ +int dh_shared_secret(dh_key *private_key, dh_key *public_key, + unsigned char *out, unsigned long *outlen) +{ + void *tmp; + unsigned long x; + int err; + + LTC_ARGCHK(private_key != NULL); + LTC_ARGCHK(public_key != NULL); + LTC_ARGCHK(out != NULL); + LTC_ARGCHK(outlen != NULL); + + /* types valid? */ + if (private_key->type != PK_PRIVATE) { + return CRYPT_PK_NOT_PRIVATE; + } + + /* same DH group? */ + if (mp_cmp(private_key->prime, public_key->prime) != LTC_MP_EQ) { return CRYPT_PK_TYPE_MISMATCH; } + if (mp_cmp(private_key->base, public_key->base) != LTC_MP_EQ) { return CRYPT_PK_TYPE_MISMATCH; } + + /* init big numbers */ + if ((err = mp_init(&tmp)) != CRYPT_OK) { + return err; + } + + /* check public key */ + if ((err = dh_check_pubkey(public_key)) != CRYPT_OK) { + goto error; + } + + /* compute tmp = y^x mod p */ + if ((err = mp_exptmod(public_key->y, private_key->x, private_key->prime, tmp)) != CRYPT_OK) { + goto error; + } + + /* enough space for output? */ + x = (unsigned long)mp_unsigned_bin_size(tmp); + if (*outlen < x) { + *outlen = x; + err = CRYPT_BUFFER_OVERFLOW; + goto error; + } + if ((err = mp_to_unsigned_bin(tmp, out)) != CRYPT_OK) { + goto error; + } + *outlen = x; + err = CRYPT_OK; + +error: + mp_clear(tmp); + return err; +} + +#endif /* LTC_MDH */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dsa/dsa_decrypt_key.c --- a/libtomcrypt/src/pk/dsa/dsa_decrypt_key.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/dsa/dsa_decrypt_key.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,15 +5,13 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file dsa_decrypt_key.c DSA Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MDSA @@ -27,12 +25,13 @@ @return CRYPT_OK if successful */ int dsa_decrypt_key(const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen, + unsigned char *out, unsigned long *outlen, dsa_key *key) { unsigned char *skey, *expt; void *g_pub; - unsigned long x, y, hashOID[32]; + unsigned long x, y; + unsigned long hashOID[32] = { 0 }; int hash, err; ltc_asn1_list decode[3]; @@ -45,21 +44,21 @@ if (key->type != PK_PRIVATE) { return CRYPT_PK_NOT_PRIVATE; } - + /* decode to find out hash */ LTC_SET_ASN1(decode, 0, LTC_ASN1_OBJECT_IDENTIFIER, hashOID, sizeof(hashOID)/sizeof(hashOID[0])); - - if ((err = der_decode_sequence(in, inlen, decode, 1)) != CRYPT_OK) { + err = der_decode_sequence(in, inlen, decode, 1); + if (err != CRYPT_OK && err != CRYPT_INPUT_TOO_LONG) { return err; } - hash = find_hash_oid(hashOID, decode[0].size); + hash = find_hash_oid(hashOID, decode[0].size); if (hash_is_valid(hash) != CRYPT_OK) { return CRYPT_INVALID_PACKET; } /* we now have the hash! */ - + if ((err = mp_init(&g_pub)) != CRYPT_OK) { return err; } @@ -77,7 +76,7 @@ mp_clear(g_pub); return CRYPT_MEM; } - + LTC_SET_ASN1(decode, 1, LTC_ASN1_INTEGER, g_pub, 1UL); LTC_SET_ASN1(decode, 2, LTC_ASN1_OCTET_STRING, skey, MAXBLOCKSIZE); @@ -92,7 +91,8 @@ goto LBL_ERR; } - y = MIN(mp_unsigned_bin_size(key->p) + 1, MAXBLOCKSIZE); + y = mp_unsigned_bin_size(key->p) + 1; + y = MIN(y, MAXBLOCKSIZE); if ((err = hash_memory(hash, expt, x, expt, &y)) != CRYPT_OK) { goto LBL_ERR; } @@ -125,7 +125,7 @@ XFREE(expt); XFREE(skey); - + mp_clear(g_pub); return err; @@ -133,7 +133,7 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dsa/dsa_encrypt_key.c --- a/libtomcrypt/src/pk/dsa/dsa_encrypt_key.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/dsa/dsa_encrypt_key.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,15 +5,13 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file dsa_encrypt_key.c DSA Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MDSA @@ -24,14 +22,14 @@ @param out [out] The destination for the ciphertext @param outlen [in/out] The max size and resulting size of the ciphertext @param prng An active PRNG state - @param wprng The index of the PRNG you wish to use - @param hash The index of the hash you want to use + @param wprng The index of the PRNG you wish to use + @param hash The index of the hash you want to use @param key The DSA key you want to encrypt to @return CRYPT_OK if successful */ int dsa_encrypt_key(const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen, - prng_state *prng, int wprng, int hash, + unsigned char *out, unsigned long *outlen, + prng_state *prng, int wprng, int hash, dsa_key *key) { unsigned char *expt, *skey; @@ -61,7 +59,7 @@ if ((err = mp_init_multi(&g_pub, &g_priv, NULL)) != CRYPT_OK) { return err; } - + expt = XMALLOC(mp_unsigned_bin_size(key->p) + 1); skey = XMALLOC(MAXBLOCKSIZE); if (expt == NULL || skey == NULL) { @@ -74,24 +72,19 @@ mp_clear_multi(g_pub, g_priv, NULL); return CRYPT_MEM; } - - /* make a random x, g^x pair */ - x = mp_unsigned_bin_size(key->q); - if (prng_descriptor[wprng].read(expt, x, prng) != x) { - err = CRYPT_ERROR_READPRNG; - goto LBL_ERR; + + /* make a random g_priv, g_pub = g^x pair + private key x should be in range: 1 <= x <= q-1 (see FIPS 186-4 B.1.2) + */ + if ((err = rand_bn_upto(g_priv, key->q, prng, wprng)) != CRYPT_OK) { + goto LBL_ERR; } - - /* load x */ - if ((err = mp_read_unsigned_bin(g_priv, expt, x)) != CRYPT_OK) { - goto LBL_ERR; - } - + /* compute y */ if ((err = mp_exptmod(key->g, g_priv, key->p, g_pub)) != CRYPT_OK) { goto LBL_ERR; } - + /* make random key */ x = mp_unsigned_bin_size(key->p) + 1; if ((err = dsa_shared_secret(g_priv, key->y, key, expt, &x)) != CRYPT_OK) { @@ -102,7 +95,7 @@ if ((err = hash_memory(hash, expt, x, skey, &y)) != CRYPT_OK) { goto LBL_ERR; } - + /* Encrypt key */ for (x = 0; x < inlen; x++) { skey[x] ^= in[x]; @@ -123,13 +116,13 @@ XFREE(skey); XFREE(expt); - + mp_clear_multi(g_pub, g_priv, NULL); return err; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dsa/dsa_export.c --- a/libtomcrypt/src/pk/dsa/dsa_export.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/dsa/dsa_export.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -27,12 +25,16 @@ */ int dsa_export(unsigned char *out, unsigned long *outlen, int type, dsa_key *key) { - unsigned char flags[1]; + unsigned long zero=0; + int err, std; LTC_ARGCHK(out != NULL); LTC_ARGCHK(outlen != NULL); LTC_ARGCHK(key != NULL); + std = type & PK_STD; + type &= ~PK_STD; + /* can we store the static header? */ if (type == PK_PRIVATE && key->type != PK_PRIVATE) { return CRYPT_PK_TYPE_MISMATCH; @@ -42,31 +44,73 @@ return CRYPT_INVALID_ARG; } - flags[0] = (type != PK_PUBLIC) ? 1 : 0; + if (type == PK_PRIVATE) { + if (std) { + return der_encode_sequence_multi(out, outlen, + LTC_ASN1_SHORT_INTEGER, 1UL, &zero, + LTC_ASN1_INTEGER, 1UL, key->p, + LTC_ASN1_INTEGER, 1UL, key->q, + LTC_ASN1_INTEGER, 1UL, key->g, + LTC_ASN1_INTEGER, 1UL, key->y, + LTC_ASN1_INTEGER, 1UL, key->x, + LTC_ASN1_EOL, 0UL, NULL); + } + else { + unsigned char flags[1]; + flags[0] = 1; + return der_encode_sequence_multi(out, outlen, + LTC_ASN1_BIT_STRING, 1UL, flags, + LTC_ASN1_INTEGER, 1UL, key->g, + LTC_ASN1_INTEGER, 1UL, key->p, + LTC_ASN1_INTEGER, 1UL, key->q, + LTC_ASN1_INTEGER, 1UL, key->y, + LTC_ASN1_INTEGER, 1UL, key->x, + LTC_ASN1_EOL, 0UL, NULL); + } + } else { + if (std) { + unsigned long tmplen = (mp_count_bits(key->y) / 8) + 8; + unsigned char* tmp = XMALLOC(tmplen); + ltc_asn1_list int_list[3]; - if (type == PK_PRIVATE) { - return der_encode_sequence_multi(out, outlen, - LTC_ASN1_BIT_STRING, 1UL, flags, - LTC_ASN1_INTEGER, 1UL, key->g, - LTC_ASN1_INTEGER, 1UL, key->p, - LTC_ASN1_INTEGER, 1UL, key->q, - LTC_ASN1_INTEGER, 1UL, key->y, - LTC_ASN1_INTEGER, 1UL, key->x, - LTC_ASN1_EOL, 0UL, NULL); - } else { - return der_encode_sequence_multi(out, outlen, - LTC_ASN1_BIT_STRING, 1UL, flags, - LTC_ASN1_INTEGER, 1UL, key->g, - LTC_ASN1_INTEGER, 1UL, key->p, - LTC_ASN1_INTEGER, 1UL, key->q, - LTC_ASN1_INTEGER, 1UL, key->y, - LTC_ASN1_EOL, 0UL, NULL); + if (tmp == NULL) { + return CRYPT_MEM; + } + + err = der_encode_integer(key->y, tmp, &tmplen); + if (err != CRYPT_OK) { + goto error; + } + + LTC_SET_ASN1(int_list, 0, LTC_ASN1_INTEGER, key->p, 1UL); + LTC_SET_ASN1(int_list, 1, LTC_ASN1_INTEGER, key->q, 1UL); + LTC_SET_ASN1(int_list, 2, LTC_ASN1_INTEGER, key->g, 1UL); + + err = der_encode_subject_public_key_info(out, outlen, PKA_DSA, tmp, + tmplen, LTC_ASN1_SEQUENCE, int_list, + sizeof(int_list) / sizeof(int_list[0])); + +error: + XFREE(tmp); + return err; + } + else { + unsigned char flags[1]; + flags[0] = 0; + return der_encode_sequence_multi(out, outlen, + LTC_ASN1_BIT_STRING, 1UL, flags, + LTC_ASN1_INTEGER, 1UL, key->g, + LTC_ASN1_INTEGER, 1UL, key->p, + LTC_ASN1_INTEGER, 1UL, key->q, + LTC_ASN1_INTEGER, 1UL, key->y, + LTC_ASN1_EOL, 0UL, NULL); + } } } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dsa/dsa_free.c --- a/libtomcrypt/src/pk/dsa/dsa_free.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/dsa/dsa_free.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -24,11 +22,12 @@ void dsa_free(dsa_key *key) { LTC_ARGCHKVD(key != NULL); - mp_clear_multi(key->g, key->q, key->p, key->x, key->y, NULL); + mp_cleanup_multi(&key->y, &key->x, &key->q, &key->g, &key->p, NULL); + key->type = key->qord = 0; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dsa/dsa_generate_key.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/dsa/dsa_generate_key.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,47 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file dsa_make_key.c + DSA implementation, generate a DSA key +*/ + +#ifdef LTC_MDSA + +/** + Create a DSA key + @param prng An active PRNG state + @param wprng The index of the PRNG desired + @param key [in/out] Where to store the created key + @return CRYPT_OK if successful. +*/ +int dsa_generate_key(prng_state *prng, int wprng, dsa_key *key) +{ + int err; + + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(ltc_mp.name != NULL); + + /* so now we have our DH structure, generator g, order q, modulus p + Now we need a random exponent [mod q] and it's power g^x mod p + */ + /* private key x should be from range: 1 <= x <= q-1 (see FIPS 186-4 B.1.2) */ + if ((err = rand_bn_upto(key->x, key->q, prng, wprng)) != CRYPT_OK) { return err; } + if ((err = mp_exptmod(key->g, key->x, key->p, key->y)) != CRYPT_OK) { return err; } + key->type = PK_PRIVATE; + + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dsa/dsa_generate_pqg.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/dsa/dsa_generate_pqg.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,244 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file dsa_generate_pqg.c + DSA implementation - generate DSA parameters p, q & g +*/ + +#ifdef LTC_MDSA + +/** + Create DSA parameters (INTERNAL ONLY, not part of public API) + @param prng An active PRNG state + @param wprng The index of the PRNG desired + @param group_size Size of the multiplicative group (octets) + @param modulus_size Size of the modulus (octets) + @param p [out] bignum where generated 'p' is stored (must be initialized by caller) + @param q [out] bignum where generated 'q' is stored (must be initialized by caller) + @param g [out] bignum where generated 'g' is stored (must be initialized by caller) + @return CRYPT_OK if successful, upon error this function will free all allocated memory +*/ +static int _dsa_make_params(prng_state *prng, int wprng, int group_size, int modulus_size, void *p, void *q, void *g) +{ + unsigned long L, N, n, outbytes, seedbytes, counter, j, i; + int err, res, mr_tests_q, mr_tests_p, found_p, found_q, hash; + unsigned char *wbuf, *sbuf, digest[MAXBLOCKSIZE]; + void *t2L1, *t2N1, *t2q, *t2seedlen, *U, *W, *X, *c, *h, *e, *seedinc; + + /* check size */ + if (group_size >= LTC_MDSA_MAX_GROUP || group_size < 1 || group_size >= modulus_size) { + return CRYPT_INVALID_ARG; + } + + /* FIPS-186-4 A.1.1.2 Generation of the Probable Primes p and q Using an Approved Hash Function + * + * L = The desired length of the prime p (in bits e.g. L = 1024) + * N = The desired length of the prime q (in bits e.g. N = 160) + * seedlen = The desired bit length of the domain parameter seed; seedlen shallbe equal to or greater than N + * outlen = The bit length of Hash function + * + * 1. Check that the (L, N) + * 2. If (seedlen = 2^(L-1)) { + * Test whether or not p is prime as specified in Appendix C.3. + * If p is determined to be prime, then return VALID and the values of p, qand (optionally) the values of domain_parameter_seed and counter + * } + * offset = offset + n + 1 Comment: Increment offset + * } + */ + + seedbytes = group_size; + L = modulus_size * 8; + N = group_size * 8; + + /* XXX-TODO no Lucas test */ +#ifdef LTC_MPI_HAS_LUCAS_TEST + /* M-R tests (when followed by one Lucas test) according FIPS-186-4 - Appendix C.3 - table C.1 */ + mr_tests_p = (L <= 2048) ? 3 : 2; + if (N <= 160) { mr_tests_q = 19; } + else if (N <= 224) { mr_tests_q = 24; } + else { mr_tests_q = 27; } +#else + /* M-R tests (without Lucas test) according FIPS-186-4 - Appendix C.3 - table C.1 */ + if (L <= 1024) { mr_tests_p = 40; } + else if (L <= 2048) { mr_tests_p = 56; } + else { mr_tests_p = 64; } + + if (N <= 160) { mr_tests_q = 40; } + else if (N <= 224) { mr_tests_q = 56; } + else { mr_tests_q = 64; } +#endif + + if (N <= 256) { + hash = register_hash(&sha256_desc); + } + else if (N <= 384) { + hash = register_hash(&sha384_desc); + } + else if (N <= 512) { + hash = register_hash(&sha512_desc); + } + else { + return CRYPT_INVALID_ARG; /* group_size too big */ + } + + if ((err = hash_is_valid(hash)) != CRYPT_OK) { return err; } + outbytes = hash_descriptor[hash].hashsize; + + n = ((L + outbytes*8 - 1) / (outbytes*8)) - 1; + + if ((wbuf = XMALLOC((n+1)*outbytes)) == NULL) { err = CRYPT_MEM; goto cleanup3; } + if ((sbuf = XMALLOC(seedbytes)) == NULL) { err = CRYPT_MEM; goto cleanup2; } + + err = mp_init_multi(&t2L1, &t2N1, &t2q, &t2seedlen, &U, &W, &X, &c, &h, &e, &seedinc, NULL); + if (err != CRYPT_OK) { goto cleanup1; } + + if ((err = mp_2expt(t2L1, L-1)) != CRYPT_OK) { goto cleanup; } + /* t2L1 = 2^(L-1) */ + if ((err = mp_2expt(t2N1, N-1)) != CRYPT_OK) { goto cleanup; } + /* t2N1 = 2^(N-1) */ + if ((err = mp_2expt(t2seedlen, seedbytes*8)) != CRYPT_OK) { goto cleanup; } + /* t2seedlen = 2^seedlen */ + + for(found_p=0; !found_p;) { + /* q */ + for(found_q=0; !found_q;) { + if (prng_descriptor[wprng].read(sbuf, seedbytes, prng) != seedbytes) { err = CRYPT_ERROR_READPRNG; goto cleanup; } + i = outbytes; + if ((err = hash_memory(hash, sbuf, seedbytes, digest, &i)) != CRYPT_OK) { goto cleanup; } + if ((err = mp_read_unsigned_bin(U, digest, outbytes)) != CRYPT_OK) { goto cleanup; } + if ((err = mp_mod(U, t2N1, U)) != CRYPT_OK) { goto cleanup; } + if ((err = mp_add(t2N1, U, q)) != CRYPT_OK) { goto cleanup; } + if (!mp_isodd(q)) mp_add_d(q, 1, q); + if ((err = mp_prime_is_prime(q, mr_tests_q, &res)) != CRYPT_OK) { goto cleanup; } + if (res == LTC_MP_YES) found_q = 1; + } + + /* p */ + if ((err = mp_read_unsigned_bin(seedinc, sbuf, seedbytes)) != CRYPT_OK) { goto cleanup; } + if ((err = mp_add(q, q, t2q)) != CRYPT_OK) { goto cleanup; } + for(counter=0; counter < 4*L && !found_p; counter++) { + for(j=0; j<=n; j++) { + if ((err = mp_add_d(seedinc, 1, seedinc)) != CRYPT_OK) { goto cleanup; } + if ((err = mp_mod(seedinc, t2seedlen, seedinc)) != CRYPT_OK) { goto cleanup; } + /* seedinc = (seedinc+1) % 2^seed_bitlen */ + if ((i = mp_unsigned_bin_size(seedinc)) > seedbytes) { err = CRYPT_INVALID_ARG; goto cleanup; } + zeromem(sbuf, seedbytes); + if ((err = mp_to_unsigned_bin(seedinc, sbuf + seedbytes-i)) != CRYPT_OK) { goto cleanup; } + i = outbytes; + err = hash_memory(hash, sbuf, seedbytes, wbuf+(n-j)*outbytes, &i); + if (err != CRYPT_OK) { goto cleanup; } + } + if ((err = mp_read_unsigned_bin(W, wbuf, (n+1)*outbytes)) != CRYPT_OK) { goto cleanup; } + if ((err = mp_mod(W, t2L1, W)) != CRYPT_OK) { goto cleanup; } + if ((err = mp_add(W, t2L1, X)) != CRYPT_OK) { goto cleanup; } + if ((err = mp_mod(X, t2q, c)) != CRYPT_OK) { goto cleanup; } + if ((err = mp_sub_d(c, 1, p)) != CRYPT_OK) { goto cleanup; } + if ((err = mp_sub(X, p, p)) != CRYPT_OK) { goto cleanup; } + if (mp_cmp(p, t2L1) != LTC_MP_LT) { + /* p >= 2^(L-1) */ + if ((err = mp_prime_is_prime(p, mr_tests_p, &res)) != CRYPT_OK) { goto cleanup; } + if (res == LTC_MP_YES) { + found_p = 1; + } + } + } + } + + /* FIPS-186-4 A.2.1 Unverifiable Generation of the Generator g + * 1. e = (p - 1)/q + * 2. h = any integer satisfying: 1 < h < (p - 1) + * h could be obtained from a random number generator or from a counter that changes after each use + * 3. g = h^e mod p + * 4. if (g == 1), then go to step 2. + * + */ + + if ((err = mp_sub_d(p, 1, e)) != CRYPT_OK) { goto cleanup; } + if ((err = mp_div(e, q, e, c)) != CRYPT_OK) { goto cleanup; } + /* e = (p - 1)/q */ + i = mp_count_bits(p); + do { + do { + if ((err = rand_bn_bits(h, i, prng, wprng)) != CRYPT_OK) { goto cleanup; } + } while (mp_cmp(h, p) != LTC_MP_LT || mp_cmp_d(h, 2) != LTC_MP_GT); + if ((err = mp_sub_d(h, 1, h)) != CRYPT_OK) { goto cleanup; } + /* h is randon and 1 < h < (p-1) */ + if ((err = mp_exptmod(h, e, p, g)) != CRYPT_OK) { goto cleanup; } + } while (mp_cmp_d(g, 1) == LTC_MP_EQ); + + err = CRYPT_OK; +cleanup: + mp_clear_multi(t2L1, t2N1, t2q, t2seedlen, U, W, X, c, h, e, seedinc, NULL); +cleanup1: + XFREE(sbuf); +cleanup2: + XFREE(wbuf); +cleanup3: + return err; +} + +/** + Generate DSA parameters p, q & g + @param prng An active PRNG state + @param wprng The index of the PRNG desired + @param group_size Size of the multiplicative group (octets) + @param modulus_size Size of the modulus (octets) + @param key [out] Where to store the created key + @return CRYPT_OK if successful. +*/ +int dsa_generate_pqg(prng_state *prng, int wprng, int group_size, int modulus_size, dsa_key *key) +{ + int err; + + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(ltc_mp.name != NULL); + + /* init mp_ints */ + if ((err = mp_init_multi(&key->p, &key->g, &key->q, &key->x, &key->y, NULL)) != CRYPT_OK) { + return err; + } + /* generate params */ + err = _dsa_make_params(prng, wprng, group_size, modulus_size, key->p, key->q, key->g); + if (err != CRYPT_OK) { + goto cleanup; + } + + key->qord = group_size; + + return CRYPT_OK; + +cleanup: + dsa_free(key); + return err; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dsa/dsa_import.c --- a/libtomcrypt/src/pk/dsa/dsa_import.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/dsa/dsa_import.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -18,7 +16,7 @@ #ifdef LTC_MDSA /** - Import a DSA key + Import a DSA key @param in The binary packet to import from @param inlen The length of the binary packet @param key [out] Where to store the imported key @@ -26,8 +24,10 @@ */ int dsa_import(const unsigned char *in, unsigned long inlen, dsa_key *key) { + int err, stat; + unsigned long zero = 0; + unsigned char* tmpbuf = NULL; unsigned char flags[1]; - int err; LTC_ARGCHK(in != NULL); LTC_ARGCHK(key != NULL); @@ -38,53 +38,115 @@ return CRYPT_MEM; } + /* try to match the old libtomcrypt format */ + err = der_decode_sequence_multi(in, inlen, LTC_ASN1_BIT_STRING, 1UL, flags, + LTC_ASN1_EOL, 0UL, NULL); + + if (err == CRYPT_OK || err == CRYPT_INPUT_TOO_LONG) { + /* private key */ + if (flags[0] == 1) { + if ((err = der_decode_sequence_multi(in, inlen, + LTC_ASN1_BIT_STRING, 1UL, flags, + LTC_ASN1_INTEGER, 1UL, key->g, + LTC_ASN1_INTEGER, 1UL, key->p, + LTC_ASN1_INTEGER, 1UL, key->q, + LTC_ASN1_INTEGER, 1UL, key->y, + LTC_ASN1_INTEGER, 1UL, key->x, + LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { + goto LBL_ERR; + } + key->type = PK_PRIVATE; + goto LBL_OK; + } + /* public key */ + else if (flags[0] == 0) { + if ((err = der_decode_sequence_multi(in, inlen, + LTC_ASN1_BIT_STRING, 1UL, flags, + LTC_ASN1_INTEGER, 1UL, key->g, + LTC_ASN1_INTEGER, 1UL, key->p, + LTC_ASN1_INTEGER, 1UL, key->q, + LTC_ASN1_INTEGER, 1UL, key->y, + LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { + goto LBL_ERR; + } + key->type = PK_PUBLIC; + goto LBL_OK; + } + else { + err = CRYPT_INVALID_PACKET; + goto LBL_ERR; + } + } /* get key type */ if ((err = der_decode_sequence_multi(in, inlen, - LTC_ASN1_BIT_STRING, 1UL, flags, - LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { - goto error; + LTC_ASN1_SHORT_INTEGER, 1UL, &zero, + LTC_ASN1_INTEGER, 1UL, key->p, + LTC_ASN1_INTEGER, 1UL, key->q, + LTC_ASN1_INTEGER, 1UL, key->g, + LTC_ASN1_INTEGER, 1UL, key->y, + LTC_ASN1_INTEGER, 1UL, key->x, + LTC_ASN1_EOL, 0UL, NULL)) == CRYPT_OK) { + + key->type = PK_PRIVATE; + } else { /* public */ + ltc_asn1_list params[3]; + unsigned long tmpbuf_len = inlen; + + LTC_SET_ASN1(params, 0, LTC_ASN1_INTEGER, key->p, 1UL); + LTC_SET_ASN1(params, 1, LTC_ASN1_INTEGER, key->q, 1UL); + LTC_SET_ASN1(params, 2, LTC_ASN1_INTEGER, key->g, 1UL); + + tmpbuf = XCALLOC(1, tmpbuf_len); + if (tmpbuf == NULL) { + err = CRYPT_MEM; + goto LBL_ERR; + } + + err = der_decode_subject_public_key_info(in, inlen, PKA_DSA, + tmpbuf, &tmpbuf_len, + LTC_ASN1_SEQUENCE, params, 3); + if (err != CRYPT_OK) { + XFREE(tmpbuf); + goto LBL_ERR; + } + + if ((err=der_decode_integer(tmpbuf, tmpbuf_len, key->y)) != CRYPT_OK) { + XFREE(tmpbuf); + goto LBL_ERR; + } + + XFREE(tmpbuf); + key->type = PK_PUBLIC; } - if (flags[0] == 1) { - if ((err = der_decode_sequence_multi(in, inlen, - LTC_ASN1_BIT_STRING, 1UL, flags, - LTC_ASN1_INTEGER, 1UL, key->g, - LTC_ASN1_INTEGER, 1UL, key->p, - LTC_ASN1_INTEGER, 1UL, key->q, - LTC_ASN1_INTEGER, 1UL, key->y, - LTC_ASN1_INTEGER, 1UL, key->x, - LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { - goto error; - } - key->type = PK_PRIVATE; - } else { - if ((err = der_decode_sequence_multi(in, inlen, - LTC_ASN1_BIT_STRING, 1UL, flags, - LTC_ASN1_INTEGER, 1UL, key->g, - LTC_ASN1_INTEGER, 1UL, key->p, - LTC_ASN1_INTEGER, 1UL, key->q, - LTC_ASN1_INTEGER, 1UL, key->y, - LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { - goto error; - } - key->type = PK_PUBLIC; - } - key->qord = mp_unsigned_bin_size(key->q); +LBL_OK: + key->qord = mp_unsigned_bin_size(key->q); - if (key->qord >= LTC_MDSA_MAX_GROUP || key->qord <= 15 || - (unsigned long)key->qord >= mp_unsigned_bin_size(key->p) || (mp_unsigned_bin_size(key->p) - key->qord) >= LTC_MDSA_DELTA) { + /* quick p, q, g validation, without primality testing */ + if ((err = dsa_int_validate_pqg(key, &stat)) != CRYPT_OK) { + goto LBL_ERR; + } + if (stat == 0) { err = CRYPT_INVALID_PACKET; - goto error; + goto LBL_ERR; + } + /* validate x, y */ + if ((err = dsa_int_validate_xy(key, &stat)) != CRYPT_OK) { + goto LBL_ERR; + } + if (stat == 0) { + err = CRYPT_INVALID_PACKET; + goto LBL_ERR; } return CRYPT_OK; -error: - mp_clear_multi(key->p, key->g, key->q, key->x, key->y, NULL); +LBL_ERR: + dsa_free(key); return err; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dsa/dsa_make_key.c --- a/libtomcrypt/src/pk/dsa/dsa_make_key.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/dsa/dsa_make_key.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,133 +5,37 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file dsa_make_key.c - DSA implementation, generate a DSA key, Tom St Denis + DSA implementation, generate a DSA key */ #ifdef LTC_MDSA /** - Create a DSA key + Old-style creation of a DSA key @param prng An active PRNG state @param wprng The index of the PRNG desired @param group_size Size of the multiplicative group (octets) @param modulus_size Size of the modulus (octets) @param key [out] Where to store the created key - @return CRYPT_OK if successful, upon error this function will free all allocated memory + @return CRYPT_OK if successful. */ int dsa_make_key(prng_state *prng, int wprng, int group_size, int modulus_size, dsa_key *key) { - void *tmp, *tmp2; - int err, res; - unsigned char *buf; - - LTC_ARGCHK(key != NULL); - LTC_ARGCHK(ltc_mp.name != NULL); - - /* check prng */ - if ((err = prng_is_valid(wprng)) != CRYPT_OK) { - return err; - } - - /* check size */ - if (group_size >= LTC_MDSA_MAX_GROUP || group_size <= 15 || - group_size >= modulus_size || (modulus_size - group_size) >= LTC_MDSA_DELTA) { - return CRYPT_INVALID_ARG; - } - - /* allocate ram */ - buf = XMALLOC(LTC_MDSA_DELTA); - if (buf == NULL) { - return CRYPT_MEM; - } - - /* init mp_ints */ - if ((err = mp_init_multi(&tmp, &tmp2, &key->g, &key->q, &key->p, &key->x, &key->y, NULL)) != CRYPT_OK) { - XFREE(buf); - return err; - } - - /* make our prime q */ - if ((err = rand_prime(key->q, group_size, prng, wprng)) != CRYPT_OK) { goto error; } - - /* double q */ - if ((err = mp_add(key->q, key->q, tmp)) != CRYPT_OK) { goto error; } - - /* now make a random string and multply it against q */ - if (prng_descriptor[wprng].read(buf+1, modulus_size - group_size, prng) != (unsigned long)(modulus_size - group_size)) { - err = CRYPT_ERROR_READPRNG; - goto error; - } - - /* force magnitude */ - buf[0] |= 0xC0; - - /* force even */ - buf[modulus_size - group_size - 1] &= ~1; + int err; - if ((err = mp_read_unsigned_bin(tmp2, buf, modulus_size - group_size)) != CRYPT_OK) { goto error; } - if ((err = mp_mul(key->q, tmp2, key->p)) != CRYPT_OK) { goto error; } - if ((err = mp_add_d(key->p, 1, key->p)) != CRYPT_OK) { goto error; } - - /* now loop until p is prime */ - for (;;) { - if ((err = mp_prime_is_prime(key->p, 8, &res)) != CRYPT_OK) { goto error; } - if (res == LTC_MP_YES) break; - - /* add 2q to p and 2 to tmp2 */ - if ((err = mp_add(tmp, key->p, key->p)) != CRYPT_OK) { goto error; } - if ((err = mp_add_d(tmp2, 2, tmp2)) != CRYPT_OK) { goto error; } - } - - /* now p = (q * tmp2) + 1 is prime, find a value g for which g^tmp2 != 1 */ - mp_set(key->g, 1); - - do { - if ((err = mp_add_d(key->g, 1, key->g)) != CRYPT_OK) { goto error; } - if ((err = mp_exptmod(key->g, tmp2, key->p, tmp)) != CRYPT_OK) { goto error; } - } while (mp_cmp_d(tmp, 1) == LTC_MP_EQ); - - /* at this point tmp generates a group of order q mod p */ - mp_exch(tmp, key->g); + if ((err = dsa_generate_pqg(prng, wprng, group_size, modulus_size, key)) != CRYPT_OK) { return err; } + if ((err = dsa_generate_key(prng, wprng, key)) != CRYPT_OK) { return err; } - /* so now we have our DH structure, generator g, order q, modulus p - Now we need a random exponent [mod q] and it's power g^x mod p - */ - do { - if (prng_descriptor[wprng].read(buf, group_size, prng) != (unsigned long)group_size) { - err = CRYPT_ERROR_READPRNG; - goto error; - } - if ((err = mp_read_unsigned_bin(key->x, buf, group_size)) != CRYPT_OK) { goto error; } - } while (mp_cmp_d(key->x, 1) != LTC_MP_GT); - if ((err = mp_exptmod(key->g, key->x, key->p, key->y)) != CRYPT_OK) { goto error; } - - key->type = PK_PRIVATE; - key->qord = group_size; - -#ifdef LTC_CLEAN_STACK - zeromem(buf, LTC_MDSA_DELTA); -#endif - - err = CRYPT_OK; - goto done; -error: - mp_clear_multi(key->g, key->q, key->p, key->x, key->y, NULL); -done: - mp_clear_multi(tmp, tmp2, NULL); - XFREE(buf); - return err; + return CRYPT_OK; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dsa/dsa_set.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/dsa/dsa_set.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,112 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + + +#ifdef LTC_MDSA + +/** + Import DSA's p, q & g from raw numbers + @param p DSA's p in binary representation + @param plen The length of p + @param q DSA's q in binary representation + @param qlen The length of q + @param g DSA's g in binary representation + @param glen The length of g + @param key [out] the destination for the imported key + @return CRYPT_OK if successful. +*/ +int dsa_set_pqg(const unsigned char *p, unsigned long plen, + const unsigned char *q, unsigned long qlen, + const unsigned char *g, unsigned long glen, + dsa_key *key) +{ + int err, stat; + + LTC_ARGCHK(p != NULL); + LTC_ARGCHK(q != NULL); + LTC_ARGCHK(g != NULL); + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(ltc_mp.name != NULL); + + /* init key */ + err = mp_init_multi(&key->p, &key->g, &key->q, &key->x, &key->y, NULL); + if (err != CRYPT_OK) return err; + + if ((err = mp_read_unsigned_bin(key->p, (unsigned char *)p , plen)) != CRYPT_OK) { goto LBL_ERR; } + if ((err = mp_read_unsigned_bin(key->g, (unsigned char *)g , glen)) != CRYPT_OK) { goto LBL_ERR; } + if ((err = mp_read_unsigned_bin(key->q, (unsigned char *)q , qlen)) != CRYPT_OK) { goto LBL_ERR; } + + key->qord = mp_unsigned_bin_size(key->q); + + /* do only a quick validation, without primality testing */ + if ((err = dsa_int_validate_pqg(key, &stat)) != CRYPT_OK) { goto LBL_ERR; } + if (stat == 0) { + err = CRYPT_INVALID_PACKET; + goto LBL_ERR; + } + + return CRYPT_OK; + +LBL_ERR: + dsa_free(key); + return err; +} + +/** + Import DSA public or private key-part from raw numbers + + NB: The p, q & g parts must be set beforehand + + @param in The key-part to import, either public or private. + @param inlen The key-part's length + @param type Which type of key (PK_PRIVATE or PK_PUBLIC) + @param key [out] the destination for the imported key + @return CRYPT_OK if successful. +*/ +int dsa_set_key(const unsigned char *in, unsigned long inlen, int type, dsa_key *key) +{ + int err, stat = 0; + + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(key->x != NULL); + LTC_ARGCHK(key->y != NULL); + LTC_ARGCHK(key->p != NULL); + LTC_ARGCHK(key->g != NULL); + LTC_ARGCHK(key->q != NULL); + LTC_ARGCHK(ltc_mp.name != NULL); + + if (type == PK_PRIVATE) { + key->type = PK_PRIVATE; + if ((err = mp_read_unsigned_bin(key->x, (unsigned char *)in, inlen)) != CRYPT_OK) { goto LBL_ERR; } + if ((err = mp_exptmod(key->g, key->x, key->p, key->y)) != CRYPT_OK) { goto LBL_ERR; } + } + else { + key->type = PK_PUBLIC; + if ((err = mp_read_unsigned_bin(key->y, (unsigned char *)in, inlen)) != CRYPT_OK) { goto LBL_ERR; } + } + + if ((err = dsa_int_validate_xy(key, &stat)) != CRYPT_OK) { goto LBL_ERR; } + if (stat == 0) { + err = CRYPT_INVALID_PACKET; + goto LBL_ERR; + } + + return CRYPT_OK; + +LBL_ERR: + dsa_free(key); + return err; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dsa/dsa_set_pqg_dsaparam.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/dsa/dsa_set_pqg_dsaparam.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,67 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + + +#ifdef LTC_MDSA + +/** + Import DSA's p, q & g from dsaparam + + dsaparam data: openssl dsaparam -outform DER -out dsaparam.der 2048 + + @param dsaparam The DSA param DER encoded data + @param dsaparamlen The length of dhparam data + @param key [out] the destination for the imported key + @return CRYPT_OK if successful. +*/ +int dsa_set_pqg_dsaparam(const unsigned char *dsaparam, unsigned long dsaparamlen, + dsa_key *key) +{ + int err, stat; + + LTC_ARGCHK(dsaparam != NULL); + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(ltc_mp.name != NULL); + + /* init key */ + err = mp_init_multi(&key->p, &key->g, &key->q, &key->x, &key->y, NULL); + if (err != CRYPT_OK) return err; + + if ((err = der_decode_sequence_multi(dsaparam, dsaparamlen, + LTC_ASN1_INTEGER, 1UL, key->p, + LTC_ASN1_INTEGER, 1UL, key->q, + LTC_ASN1_INTEGER, 1UL, key->g, + LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { + goto LBL_ERR; + } + + key->qord = mp_unsigned_bin_size(key->q); + + /* quick p, q, g validation, without primality testing */ + if ((err = dsa_int_validate_pqg(key, &stat)) != CRYPT_OK) { + goto LBL_ERR; + } + if (stat == 0) { + err = CRYPT_INVALID_PACKET; + goto LBL_ERR; + } + + return CRYPT_OK; + +LBL_ERR: + dsa_free(key); + return err; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dsa/dsa_shared_secret.c --- a/libtomcrypt/src/pk/dsa/dsa_shared_secret.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/dsa/dsa_shared_secret.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,22 +5,20 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file dsa_shared_secret.c DSA Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MDSA /** Create a DSA shared secret between two keys @param private_key The private DSA key (the exponent) - @param base The base of the exponentiation (allows this to be used for both encrypt and decrypt) + @param base The base of the exponentiation (allows this to be used for both encrypt and decrypt) @param public_key The public key @param out [out] Destination of the shared secret @param outlen [in/out] The max size and resulting size of the shared secret @@ -48,7 +46,7 @@ mp_clear(res); return err; } - + x = (unsigned long)mp_unsigned_bin_size(res); if (*outlen < x) { *outlen = x; @@ -66,7 +64,7 @@ } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dsa/dsa_sign_hash.c --- a/libtomcrypt/src/pk/dsa/dsa_sign_hash.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/dsa/dsa_sign_hash.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -34,7 +32,7 @@ { void *k, *kinv, *tmp; unsigned char *buf; - int err; + int err, qbits; LTC_ARGCHK(in != NULL); LTC_ARGCHK(r != NULL); @@ -61,20 +59,15 @@ /* Init our temps */ if ((err = mp_init_multi(&k, &kinv, &tmp, NULL)) != CRYPT_OK) { goto ERRBUF; } + qbits = mp_count_bits(key->q); retry: do { /* gen random k */ - if (prng_descriptor[wprng].read(buf, key->qord, prng) != (unsigned long)key->qord) { - err = CRYPT_ERROR_READPRNG; - goto error; - } + if ((err = rand_bn_bits(k, qbits, prng, wprng)) != CRYPT_OK) { goto error; } - /* read k */ - if ((err = mp_read_unsigned_bin(k, buf, key->qord)) != CRYPT_OK) { goto error; } - - /* k > 1 ? */ - if (mp_cmp_d(k, 1) != LTC_MP_GT) { goto retry; } + /* k should be from range: 1 <= k <= q-1 (see FIPS 186-4 B.2.2) */ + if (mp_cmp_d(k, 0) != LTC_MP_GT || mp_cmp(k, key->q) != LTC_MP_LT) { goto retry; } /* test gcd */ if ((err = mp_gcd(k, key->q, tmp)) != CRYPT_OK) { goto error; } @@ -89,6 +82,9 @@ if (mp_iszero(r) == LTC_MP_YES) { goto retry; } + /* FIPS 186-4 4.6: use leftmost min(bitlen(q), bitlen(hash)) bits of 'hash'*/ + inlen = MIN(inlen, (unsigned long)(key->qord)); + /* now find s = (in + xr)/k mod q */ if ((err = mp_read_unsigned_bin(tmp, (unsigned char *)in, inlen)) != CRYPT_OK) { goto error; } if ((err = mp_mul(key->x, r, s)) != CRYPT_OK) { goto error; } @@ -98,7 +94,7 @@ if (mp_iszero(s) == LTC_MP_YES) { goto retry; } err = CRYPT_OK; -error: +error: mp_clear_multi(k, kinv, tmp, NULL); ERRBUF: #ifdef LTC_CLEAN_STACK @@ -139,9 +135,9 @@ goto error; } - err = der_encode_sequence_multi(out, outlen, - LTC_ASN1_INTEGER, 1UL, r, - LTC_ASN1_INTEGER, 1UL, s, + err = der_encode_sequence_multi(out, outlen, + LTC_ASN1_INTEGER, 1UL, r, + LTC_ASN1_INTEGER, 1UL, s, LTC_ASN1_EOL, 0UL, NULL); error: @@ -151,6 +147,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dsa/dsa_verify_hash.c --- a/libtomcrypt/src/pk/dsa/dsa_verify_hash.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/dsa/dsa_verify_hash.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -25,11 +23,11 @@ @param hash The hash that was signed @param hashlen The length of the hash that was signed @param stat [out] The result of the signature verification, 1==valid, 0==invalid - @param key The corresponding public DH key + @param key The corresponding public DSA key @return CRYPT_OK if successful (even if the signature is invalid) */ int dsa_verify_hash_raw( void *r, void *s, - const unsigned char *hash, unsigned long hashlen, + const unsigned char *hash, unsigned long hashlen, int *stat, dsa_key *key) { void *w, *v, *u1, *u2; @@ -49,11 +47,14 @@ } /* neither r or s can be null or >q*/ - if (mp_iszero(r) == LTC_MP_YES || mp_iszero(s) == LTC_MP_YES || mp_cmp(r, key->q) != LTC_MP_LT || mp_cmp(s, key->q) != LTC_MP_LT) { + if (mp_cmp_d(r, 0) != LTC_MP_GT || mp_cmp_d(s, 0) != LTC_MP_GT || mp_cmp(r, key->q) != LTC_MP_LT || mp_cmp(s, key->q) != LTC_MP_LT) { err = CRYPT_INVALID_PACKET; goto error; } - + + /* FIPS 186-4 4.7: use leftmost min(bitlen(q), bitlen(hash)) bits of 'hash' */ + hashlen = MIN(hashlen, (unsigned long)(key->qord)); + /* w = 1/s mod q */ if ((err = mp_invmod(s, key->q, w)) != CRYPT_OK) { goto error; } @@ -62,7 +63,7 @@ if ((err = mp_mulmod(u1, w, key->q, u1)) != CRYPT_OK) { goto error; } /* u2 = r*w mod q */ - if ((err = mp_mulmod(r, w, key->q, u2)) != CRYPT_OK) { goto error; } + if ((err = mp_mulmod(r, w, key->q, u2)) != CRYPT_OK) { goto error; } /* v = g^u1 * y^u2 mod p mod q */ if ((err = mp_exptmod(key->g, u1, key->p, u1)) != CRYPT_OK) { goto error; } @@ -88,25 +89,35 @@ @param hash The hash that was signed @param hashlen The length of the hash that was signed @param stat [out] The result of the signature verification, 1==valid, 0==invalid - @param key The corresponding public DH key + @param key The corresponding public DSA key @return CRYPT_OK if successful (even if the signature is invalid) */ int dsa_verify_hash(const unsigned char *sig, unsigned long siglen, - const unsigned char *hash, unsigned long hashlen, + const unsigned char *hash, unsigned long hashlen, int *stat, dsa_key *key) { int err; void *r, *s; + ltc_asn1_list sig_seq[2]; + unsigned long reallen = 0; + + LTC_ARGCHK(stat != NULL); + *stat = 0; /* must be set before the first return */ if ((err = mp_init_multi(&r, &s, NULL)) != CRYPT_OK) { - return CRYPT_MEM; + return err; } - /* decode the sequence */ - if ((err = der_decode_sequence_multi(sig, siglen, - LTC_ASN1_INTEGER, 1UL, r, - LTC_ASN1_INTEGER, 1UL, s, - LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { + LTC_SET_ASN1(sig_seq, 0, LTC_ASN1_INTEGER, r, 1UL); + LTC_SET_ASN1(sig_seq, 1, LTC_ASN1_INTEGER, s, 1UL); + + err = der_decode_sequence(sig, siglen, sig_seq, 2); + if (err != CRYPT_OK) { + goto LBL_ERR; + } + + err = der_length_sequence(sig_seq, 2, &reallen); + if (err != CRYPT_OK || reallen != siglen) { goto LBL_ERR; } @@ -121,6 +132,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/dsa/dsa_verify_key.c --- a/libtomcrypt/src/pk/dsa/dsa_verify_key.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/dsa/dsa_verify_key.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -18,83 +16,184 @@ #ifdef LTC_MDSA /** - Verify a DSA key for validity - @param key The key to verify + Validate a DSA key + + Yeah, this function should've been called dsa_validate_key() + in the first place and for compat-reasons we keep it + as it was (for now). + + @param key The key to validate @param stat [out] Result of test, 1==valid, 0==invalid @return CRYPT_OK if successful */ int dsa_verify_key(dsa_key *key, int *stat) { - void *tmp, *tmp2; - int res, err; + int err; + + err = dsa_int_validate_primes(key, stat); + if (err != CRYPT_OK || *stat == 0) return err; + + err = dsa_int_validate_pqg(key, stat); + if (err != CRYPT_OK || *stat == 0) return err; + + return dsa_int_validate_xy(key, stat); +} + +/** + Non-complex part (no primality testing) of the validation + of DSA params (p, q, g) + + @param key The key to validate + @param stat [out] Result of test, 1==valid, 0==invalid + @return CRYPT_OK if successful +*/ +int dsa_int_validate_pqg(dsa_key *key, int *stat) +{ + void *tmp1, *tmp2; + int err; LTC_ARGCHK(key != NULL); LTC_ARGCHK(stat != NULL); - - /* default to an invalid key */ *stat = 0; - /* first make sure key->q and key->p are prime */ - if ((err = mp_prime_is_prime(key->q, 8, &res)) != CRYPT_OK) { - return err; - } - if (res == 0) { + /* check q-order */ + if ( key->qord >= LTC_MDSA_MAX_GROUP || key->qord <= 15 || + (unsigned long)key->qord >= mp_unsigned_bin_size(key->p) || + (mp_unsigned_bin_size(key->p) - key->qord) >= LTC_MDSA_DELTA ) { return CRYPT_OK; } - if ((err = mp_prime_is_prime(key->p, 8, &res)) != CRYPT_OK) { - return err; - } - if (res == 0) { + /* FIPS 186-4 chapter 4.1: 1 < g < p */ + if (mp_cmp_d(key->g, 1) != LTC_MP_GT || mp_cmp(key->g, key->p) != LTC_MP_LT) { return CRYPT_OK; } - /* now make sure that g is not -1, 0 or 1 and

g, 0) == LTC_MP_EQ || mp_cmp_d(key->g, 1) == LTC_MP_EQ) { - return CRYPT_OK; - } - if ((err = mp_init_multi(&tmp, &tmp2, NULL)) != CRYPT_OK) { return err; } - if ((err = mp_sub_d(key->p, 1, tmp)) != CRYPT_OK) { goto error; } - if (mp_cmp(tmp, key->g) == LTC_MP_EQ || mp_cmp(key->g, key->p) != LTC_MP_LT) { - err = CRYPT_OK; - goto error; - } + if ((err = mp_init_multi(&tmp1, &tmp2, NULL)) != CRYPT_OK) { return err; } - /* 1 < y < p-1 */ - if (!(mp_cmp_d(key->y, 1) == LTC_MP_GT && mp_cmp(key->y, tmp) == LTC_MP_LT)) { - err = CRYPT_OK; - goto error; - } - - /* now we have to make sure that g^q = 1, and that p-1/q gives 0 remainder */ - if ((err = mp_div(tmp, key->q, tmp, tmp2)) != CRYPT_OK) { goto error; } + /* FIPS 186-4 chapter 4.1: q is a divisor of (p - 1) */ + if ((err = mp_sub_d(key->p, 1, tmp1)) != CRYPT_OK) { goto error; } + if ((err = mp_div(tmp1, key->q, tmp1, tmp2)) != CRYPT_OK) { goto error; } if (mp_iszero(tmp2) != LTC_MP_YES) { err = CRYPT_OK; goto error; } - if ((err = mp_exptmod(key->g, key->q, key->p, tmp)) != CRYPT_OK) { goto error; } - if (mp_cmp_d(tmp, 1) != LTC_MP_EQ) { - err = CRYPT_OK; - goto error; - } - - /* now we have to make sure that y^q = 1, this makes sure y \in g^x mod p */ - if ((err = mp_exptmod(key->y, key->q, key->p, tmp)) != CRYPT_OK) { goto error; } - if (mp_cmp_d(tmp, 1) != LTC_MP_EQ) { + /* FIPS 186-4 chapter 4.1: g is a generator of a subgroup of order q in + * the multiplicative group of GF(p) - so we make sure that g^q mod p = 1 + */ + if ((err = mp_exptmod(key->g, key->q, key->p, tmp1)) != CRYPT_OK) { goto error; } + if (mp_cmp_d(tmp1, 1) != LTC_MP_EQ) { err = CRYPT_OK; goto error; } - /* at this point we are out of tests ;-( */ err = CRYPT_OK; *stat = 1; -error: - mp_clear_multi(tmp, tmp2, NULL); +error: + mp_clear_multi(tmp2, tmp1, NULL); return err; } + +/** + Primality testing of DSA params p and q + + @param key The key to validate + @param stat [out] Result of test, 1==valid, 0==invalid + @return CRYPT_OK if successful +*/ +int dsa_int_validate_primes(dsa_key *key, int *stat) +{ + int err, res; + + *stat = 0; + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(stat != NULL); + + /* key->q prime? */ + if ((err = mp_prime_is_prime(key->q, LTC_MILLER_RABIN_REPS, &res)) != CRYPT_OK) { + return err; + } + if (res == LTC_MP_NO) { + return CRYPT_OK; + } + + /* key->p prime? */ + if ((err = mp_prime_is_prime(key->p, LTC_MILLER_RABIN_REPS, &res)) != CRYPT_OK) { + return err; + } + if (res == LTC_MP_NO) { + return CRYPT_OK; + } + + *stat = 1; + return CRYPT_OK; +} + +/** + Validation of a DSA key (x and y values) + + @param key The key to validate + @param stat [out] Result of test, 1==valid, 0==invalid + @return CRYPT_OK if successful +*/ +int dsa_int_validate_xy(dsa_key *key, int *stat) +{ + void *tmp; + int err; + + *stat = 0; + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(stat != NULL); + + /* 1 < y < p-1 */ + if ((err = mp_init(&tmp)) != CRYPT_OK) { + return err; + } + if ((err = mp_sub_d(key->p, 1, tmp)) != CRYPT_OK) { + goto error; + } + if (mp_cmp_d(key->y, 1) != LTC_MP_GT || mp_cmp(key->y, tmp) != LTC_MP_LT) { + err = CRYPT_OK; + goto error; + } + + if (key->type == PK_PRIVATE) { + /* FIPS 186-4 chapter 4.1: 0 < x < q */ + if (mp_cmp_d(key->x, 0) != LTC_MP_GT || mp_cmp(key->x, key->q) != LTC_MP_LT) { + err = CRYPT_OK; + goto error; + } + /* FIPS 186-4 chapter 4.1: y = g^x mod p */ + if ((err = mp_exptmod(key->g, key->x, key->p, tmp)) != CRYPT_OK) { + goto error; + } + if (mp_cmp(tmp, key->y) != LTC_MP_EQ) { + err = CRYPT_OK; + goto error; + } + } + else { + /* with just a public key we cannot test y = g^x mod p therefore we + * only test that y^q mod p = 1, which makes sure y is in g^x mod p + */ + if ((err = mp_exptmod(key->y, key->q, key->p, tmp)) != CRYPT_OK) { + goto error; + } + if (mp_cmp_d(tmp, 1) != LTC_MP_EQ) { + err = CRYPT_OK; + goto error; + } + } + + err = CRYPT_OK; + *stat = 1; +error: + mp_clear(tmp); + return err; +} + #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ecc.c --- a/libtomcrypt/src/pk/ecc/ecc.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ecc.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -19,13 +17,13 @@ /** @file ecc.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC /* This holds the key settings. ***MUST*** be organized by size from smallest to largest. */ const ltc_ecc_set_type ltc_ecc_sets[] = { -#ifdef ECC112 +#ifdef LTC_ECC112 { 14, "SECP112R1", @@ -36,7 +34,7 @@ "A89CE5AF8724C0A23E0E0FF77500" }, #endif -#ifdef ECC128 +#ifdef LTC_ECC128 { 16, "SECP128R1", @@ -47,7 +45,7 @@ "CF5AC8395BAFEB13C02DA292DDED7A83", }, #endif -#ifdef ECC160 +#ifdef LTC_ECC160 { 20, "SECP160R1", @@ -58,7 +56,7 @@ "23A628553168947D59DCC912042351377AC5FB32", }, #endif -#ifdef ECC192 +#ifdef LTC_ECC192 { 24, "ECC-192", @@ -69,7 +67,7 @@ "7192B95FFC8DA78631011ED6B24CDD573F977A11E794811", }, #endif -#ifdef ECC224 +#ifdef LTC_ECC224 { 28, "ECC-224", @@ -80,7 +78,7 @@ "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34", }, #endif -#ifdef ECC256 +#ifdef LTC_ECC256 { 32, "ECC-256", @@ -91,7 +89,7 @@ "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5", }, #endif -#ifdef ECC384 +#ifdef LTC_ECC384 { 48, "ECC-384", @@ -102,7 +100,7 @@ "3617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F", }, #endif -#ifdef ECC521 +#ifdef LTC_ECC521 { 66, "ECC-521", @@ -121,7 +119,7 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ecc_ansi_x963_export.c --- a/libtomcrypt/src/pk/ecc/ecc_ansi_x963_export.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ecc_ansi_x963_export.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -19,7 +17,7 @@ /** @file ecc_ansi_x963_export.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC @@ -32,33 +30,40 @@ int ecc_ansi_x963_export(ecc_key *key, unsigned char *out, unsigned long *outlen) { unsigned char buf[ECC_BUF_SIZE]; - unsigned long numlen; + unsigned long numlen, xlen, ylen; LTC_ARGCHK(key != NULL); - LTC_ARGCHK(out != NULL); LTC_ARGCHK(outlen != NULL); if (ltc_ecc_is_valid_idx(key->idx) == 0) { return CRYPT_INVALID_ARG; } numlen = key->dp->size; + xlen = mp_unsigned_bin_size(key->pubkey.x); + ylen = mp_unsigned_bin_size(key->pubkey.y); + + if (xlen > numlen || ylen > numlen || sizeof(buf) < numlen) { + return CRYPT_BUFFER_OVERFLOW; + } if (*outlen < (1 + 2*numlen)) { *outlen = 1 + 2*numlen; return CRYPT_BUFFER_OVERFLOW; } + LTC_ARGCHK(out != NULL); + /* store byte 0x04 */ out[0] = 0x04; /* pad and store x */ zeromem(buf, sizeof(buf)); - mp_to_unsigned_bin(key->pubkey.x, buf + (numlen - mp_unsigned_bin_size(key->pubkey.x))); + mp_to_unsigned_bin(key->pubkey.x, buf + (numlen - xlen)); XMEMCPY(out+1, buf, numlen); /* pad and store y */ zeromem(buf, sizeof(buf)); - mp_to_unsigned_bin(key->pubkey.y, buf + (numlen - mp_unsigned_bin_size(key->pubkey.y))); + mp_to_unsigned_bin(key->pubkey.y, buf + (numlen - ylen)); XMEMCPY(out+1+numlen, buf, numlen); *outlen = 1 + 2*numlen; @@ -67,6 +72,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ecc_ansi_x963_import.c --- a/libtomcrypt/src/pk/ecc/ecc_ansi_x963_import.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ecc_ansi_x963_import.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -19,11 +17,11 @@ /** @file ecc_ansi_x963_import.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC -/** Import an ANSI X9.63 format public key +/** Import an ANSI X9.63 format public key @param in The input data to read @param inlen The length of the input data @param key [out] destination to store imported key \ @@ -36,10 +34,10 @@ int ecc_ansi_x963_import_ex(const unsigned char *in, unsigned long inlen, ecc_key *key, ltc_ecc_set_type *dp) { int x, err; - + LTC_ARGCHK(in != NULL); LTC_ARGCHK(key != NULL); - + /* must be odd */ if ((inlen & 1) == 0) { return CRYPT_INVALID_ARG; @@ -99,6 +97,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ecc_decrypt_key.c --- a/libtomcrypt/src/pk/ecc/ecc_decrypt_key.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ecc_decrypt_key.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -19,7 +17,7 @@ /** @file ecc_decrypt_key.c ECC Crypto, Tom St Denis -*/ +*/ #if defined(LTC_MECC) && defined(LTC_DER) @@ -33,11 +31,12 @@ @return CRYPT_OK if successful */ int ecc_decrypt_key(const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen, + unsigned char *out, unsigned long *outlen, ecc_key *key) { unsigned char *ecc_shared, *skey, *pub_expt; - unsigned long x, y, hashOID[32]; + unsigned long x, y; + unsigned long hashOID[32] = { 0 }; int hash, err; ecc_key pubkey; ltc_asn1_list decode[3]; @@ -51,15 +50,15 @@ if (key->type != PK_PRIVATE) { return CRYPT_PK_NOT_PRIVATE; } - + /* decode to find out hash */ LTC_SET_ASN1(decode, 0, LTC_ASN1_OBJECT_IDENTIFIER, hashOID, sizeof(hashOID)/sizeof(hashOID[0])); - - if ((err = der_decode_sequence(in, inlen, decode, 1)) != CRYPT_OK) { + err = der_decode_sequence(in, inlen, decode, 1); + if (err != CRYPT_OK && err != CRYPT_INPUT_TOO_LONG) { return err; } - hash = find_hash_oid(hashOID, decode[0].size); + hash = find_hash_oid(hashOID, decode[0].size); if (hash_is_valid(hash) != CRYPT_OK) { return CRYPT_INVALID_PACKET; } @@ -144,7 +143,7 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ecc_encrypt_key.c --- a/libtomcrypt/src/pk/ecc/ecc_encrypt_key.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ecc_encrypt_key.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -19,25 +17,25 @@ /** @file ecc_encrypt_key.c ECC Crypto, Tom St Denis -*/ +*/ #if defined(LTC_MECC) && defined(LTC_DER) /** - Encrypt a symmetric key with ECC + Encrypt a symmetric key with ECC @param in The symmetric key you want to encrypt @param inlen The length of the key to encrypt (octets) @param out [out] The destination for the ciphertext @param outlen [in/out] The max size and resulting size of the ciphertext @param prng An active PRNG state - @param wprng The index of the PRNG you wish to use - @param hash The index of the hash you want to use + @param wprng The index of the PRNG you wish to use + @param hash The index of the hash you want to use @param key The ECC key you want to encrypt to @return CRYPT_OK if successful */ int ecc_encrypt_key(const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen, - prng_state *prng, int wprng, int hash, + unsigned char *out, unsigned long *outlen, + prng_state *prng, int wprng, int hash, ecc_key *key) { unsigned char *pub_expt, *ecc_shared, *skey; @@ -90,7 +88,7 @@ ecc_free(&pubkey); goto LBL_ERR; } - + /* make random key */ x = ECC_BUF_SIZE; if ((err = ecc_shared_secret(&pubkey, key, ecc_shared, &x)) != CRYPT_OK) { @@ -102,7 +100,7 @@ if ((err = hash_memory(hash, ecc_shared, x, skey, &y)) != CRYPT_OK) { goto LBL_ERR; } - + /* Encrypt key */ for (x = 0; x < inlen; x++) { skey[x] ^= in[x]; @@ -130,7 +128,7 @@ } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ecc_export.c --- a/libtomcrypt/src/pk/ecc/ecc_export.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ecc_export.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -19,7 +17,7 @@ /** @file ecc_export.c ECC Crypto, Tom St Denis -*/ +*/ #if defined(LTC_MECC) && defined(LTC_DER) @@ -40,7 +38,7 @@ LTC_ARGCHK(out != NULL); LTC_ARGCHK(outlen != NULL); LTC_ARGCHK(key != NULL); - + /* type valid? */ if (key->type != PK_PRIVATE && type == PK_PRIVATE) { return CRYPT_PK_TYPE_MISMATCH; @@ -76,7 +74,7 @@ } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ecc_free.c --- a/libtomcrypt/src/pk/ecc/ecc_free.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ecc_free.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -19,7 +17,7 @@ /** @file ecc_free.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC @@ -34,7 +32,7 @@ } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ecc_get_size.c --- a/libtomcrypt/src/pk/ecc/ecc_get_size.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ecc_get_size.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -19,13 +17,13 @@ /** @file ecc_get_size.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC /** Get the size of an ECC key - @param key The key to get the size of + @param key The key to get the size of @return The size (octets) of the key or INT_MAX on error */ int ecc_get_size(ecc_key *key) @@ -38,7 +36,7 @@ } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ecc_import.c --- a/libtomcrypt/src/pk/ecc/ecc_import.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ecc_import.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -19,34 +17,34 @@ /** @file ecc_import.c ECC Crypto, Tom St Denis -*/ +*/ #if defined(LTC_MECC) && defined(LTC_DER) -static int is_point(ecc_key *key) +static int _is_point(ecc_key *key) { void *prime, *b, *t1, *t2; int err; - + if ((err = mp_init_multi(&prime, &b, &t1, &t2, NULL)) != CRYPT_OK) { return err; } - + /* load prime and b */ if ((err = mp_read_radix(prime, key->dp->prime, 16)) != CRYPT_OK) { goto error; } if ((err = mp_read_radix(b, key->dp->B, 16)) != CRYPT_OK) { goto error; } - + /* compute y^2 */ if ((err = mp_sqr(key->pubkey.y, t1)) != CRYPT_OK) { goto error; } - + /* compute x^3 */ if ((err = mp_sqr(key->pubkey.x, t2)) != CRYPT_OK) { goto error; } if ((err = mp_mod(t2, prime, t2)) != CRYPT_OK) { goto error; } if ((err = mp_mul(key->pubkey.x, t2, t2)) != CRYPT_OK) { goto error; } - + /* compute y^2 - x^3 */ if ((err = mp_sub(t1, t2, t1)) != CRYPT_OK) { goto error; } - + /* compute y^2 - x^3 + 3x */ if ((err = mp_add(t1, key->pubkey.x, t1)) != CRYPT_OK) { goto error; } if ((err = mp_add(t1, key->pubkey.x, t1)) != CRYPT_OK) { goto error; } @@ -58,14 +56,14 @@ while (mp_cmp(t1, prime) != LTC_MP_LT) { if ((err = mp_sub(t1, prime, t1)) != CRYPT_OK) { goto error; } } - + /* compare to b */ if (mp_cmp(t1, b) != LTC_MP_EQ) { err = CRYPT_INVALID_PACKET; } else { err = CRYPT_OK; } - + error: mp_clear_multi(prime, b, t1, t2, NULL); return err; @@ -107,9 +105,9 @@ } /* find out what type of key it is */ - if ((err = der_decode_sequence_multi(in, inlen, - LTC_ASN1_BIT_STRING, 1UL, &flags, - LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { + err = der_decode_sequence_multi(in, inlen, LTC_ASN1_BIT_STRING, 1UL, flags, + LTC_ASN1_EOL, 0UL, NULL); + if (err != CRYPT_OK && err != CRYPT_INPUT_TOO_LONG) { goto done; } @@ -126,7 +124,7 @@ LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { goto done; } - } else { + } else if (flags[0] == 0) { /* public key */ key->type = PK_PUBLIC; if ((err = der_decode_sequence_multi(in, inlen, @@ -138,6 +136,10 @@ goto done; } } + else { + err = CRYPT_INVALID_PACKET; + goto done; + } if (dp == NULL) { /* find the idx */ @@ -153,9 +155,9 @@ } /* set z */ if ((err = mp_set(key->pubkey.z, 1)) != CRYPT_OK) { goto done; } - + /* is it a point on the curve? */ - if ((err = is_point(key)) != CRYPT_OK) { + if ((err = _is_point(key)) != CRYPT_OK) { goto done; } @@ -166,7 +168,7 @@ return err; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ecc_make_key.c --- a/libtomcrypt/src/pk/ecc/ecc_make_key.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ecc_make_key.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -19,12 +17,12 @@ /** @file ecc_make_key.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC /** - Make a new ECC key + Make a new ECC key @param prng An active PRNG state @param wprng The index of the PRNG you wish to use @param keysize The keysize for the new key (in octets from 20 to 65 bytes) @@ -124,7 +122,7 @@ } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ecc_shared_secret.c --- a/libtomcrypt/src/pk/ecc/ecc_shared_secret.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ecc_shared_secret.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -19,7 +17,7 @@ /** @file ecc_shared_secret.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC @@ -89,7 +87,7 @@ } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ecc_sign_hash.c --- a/libtomcrypt/src/pk/ecc/ecc_sign_hash.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ecc_sign_hash.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,42 +5,26 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b - * - * All curves taken from NIST recommendation paper of July 1999 - * Available at http://csrc.nist.gov/cryptval/dss.htm - */ #include "tomcrypt.h" +#ifdef LTC_MECC + /** @file ecc_sign_hash.c ECC Crypto, Tom St Denis */ -#if defined(LTC_MECC) && defined(LTC_DER) - -/** - Sign a message digest - @param in The message digest to sign - @param inlen The length of the digest - @param out [out] The destination for the signature - @param outlen [in/out] The max size and resulting size of the signature - @param prng An active PRNG state - @param wprng The index of the PRNG you wish to use - @param key A private ECC key - @return CRYPT_OK if successful -*/ -int ecc_sign_hash(const unsigned char *in, unsigned long inlen, +static int _ecc_sign_hash(const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen, - prng_state *prng, int wprng, ecc_key *key) + prng_state *prng, int wprng, ecc_key *key, int sigformat) { ecc_key pubkey; void *r, *s, *e, *p; - int err; + int err, max_iterations = LTC_PK_MAX_RETRIES; + unsigned long pbits, pbytes, i, shift_right; + unsigned char ch, buf[MAXBLOCKSIZE]; LTC_ARGCHK(in != NULL); LTC_ARGCHK(out != NULL); @@ -61,16 +45,33 @@ return err; } - /* get the hash and load it as a bignum into 'e' */ /* init the bignums */ if ((err = mp_init_multi(&r, &s, &p, &e, NULL)) != CRYPT_OK) { return err; } if ((err = mp_read_radix(p, (char *)key->dp->order, 16)) != CRYPT_OK) { goto errnokey; } - if ((err = mp_read_unsigned_bin(e, (unsigned char *)in, (int)inlen)) != CRYPT_OK) { goto errnokey; } + + /* get the hash and load it as a bignum into 'e' */ + pbits = mp_count_bits(p); + pbytes = (pbits+7) >> 3; + if (pbits > inlen*8) { + if ((err = mp_read_unsigned_bin(e, (unsigned char *)in, inlen)) != CRYPT_OK) { goto errnokey; } + } + else if (pbits % 8 == 0) { + if ((err = mp_read_unsigned_bin(e, (unsigned char *)in, pbytes)) != CRYPT_OK) { goto errnokey; } + } + else { + shift_right = 8 - pbits % 8; + for (i=0, ch=0; i> shift_right); + } + if ((err = mp_read_unsigned_bin(e, (unsigned char *)buf, pbytes)) != CRYPT_OK) { goto errnokey; } + } /* make up a key and export the public copy */ - for (;;) { + do { if ((err = ecc_make_key_ex(prng, wprng, &pubkey, key->dp)) != CRYPT_OK) { goto errnokey; } @@ -92,13 +93,30 @@ break; } } + } while (--max_iterations > 0); + + if (max_iterations == 0) { + goto errnokey; } - /* store as SEQUENCE { r, s -- integer } */ + if (sigformat == 1) { + /* RFC7518 format */ + if (*outlen < 2*pbytes) { err = CRYPT_MEM; goto errnokey; } + zeromem(out, 2*pbytes); + i = mp_unsigned_bin_size(r); + if ((err = mp_to_unsigned_bin(r, out + (pbytes - i))) != CRYPT_OK) { goto errnokey; } + i = mp_unsigned_bin_size(s); + if ((err = mp_to_unsigned_bin(s, out + (2*pbytes - i))) != CRYPT_OK) { goto errnokey; } + *outlen = 2*pbytes; + err = CRYPT_OK; + } + else { + /* store as ASN.1 SEQUENCE { r, s -- integer } */ err = der_encode_sequence_multi(out, outlen, LTC_ASN1_INTEGER, 1UL, r, LTC_ASN1_INTEGER, 1UL, s, LTC_ASN1_EOL, 0UL, NULL); + } goto errnokey; error: ecc_free(&pubkey); @@ -107,8 +125,44 @@ return err; } +/** + Sign a message digest + @param in The message digest to sign + @param inlen The length of the digest + @param out [out] The destination for the signature + @param outlen [in/out] The max size and resulting size of the signature + @param prng An active PRNG state + @param wprng The index of the PRNG you wish to use + @param key A private ECC key + @return CRYPT_OK if successful +*/ +int ecc_sign_hash(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen, + prng_state *prng, int wprng, ecc_key *key) +{ + return _ecc_sign_hash(in, inlen, out, outlen, prng, wprng, key, 0); +} + +/** + Sign a message digest in RFC7518 format + @param in The message digest to sign + @param inlen The length of the digest + @param out [out] The destination for the signature + @param outlen [in/out] The max size and resulting size of the signature + @param prng An active PRNG state + @param wprng The index of the PRNG you wish to use + @param key A private ECC key + @return CRYPT_OK if successful +*/ +int ecc_sign_hash_rfc7518(const unsigned char *in, unsigned long inlen, + unsigned char *out, unsigned long *outlen, + prng_state *prng, int wprng, ecc_key *key) +{ + return _ecc_sign_hash(in, inlen, out, outlen, prng, wprng, key, 1); +} + #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ecc_sizes.c --- a/libtomcrypt/src/pk/ecc/ecc_sizes.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ecc_sizes.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -19,7 +17,7 @@ /** @file ecc_sizes.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC @@ -42,7 +40,7 @@ } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ecc_test.c --- a/libtomcrypt/src/pk/ecc/ecc_test.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ecc_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -19,7 +17,7 @@ /** @file ecc_test.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC @@ -89,7 +87,7 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ecc_verify_hash.c --- a/libtomcrypt/src/pk/ecc/ecc_verify_hash.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ecc_verify_hash.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,52 +5,27 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b - * - * All curves taken from NIST recommendation paper of July 1999 - * Available at http://csrc.nist.gov/cryptval/dss.htm - */ #include "tomcrypt.h" +#ifdef LTC_MECC + /** @file ecc_verify_hash.c ECC Crypto, Tom St Denis */ -#if defined(LTC_MECC) && defined(LTC_DER) - -/* verify - * - * w = s^-1 mod n - * u1 = xw - * u2 = rw - * X = u1*G + u2*Q - * v = X_x1 mod n - * accept if v == r - */ - -/** - Verify an ECC signature - @param sig The signature to verify - @param siglen The length of the signature (octets) - @param hash The hash (message digest) that was signed - @param hashlen The length of the hash (octets) - @param stat Result of signature, 1==valid, 0==invalid - @param key The corresponding public ECC key - @return CRYPT_OK if successful (even if the signature is not valid) -*/ -int ecc_verify_hash(const unsigned char *sig, unsigned long siglen, +static int _ecc_verify_hash(const unsigned char *sig, unsigned long siglen, const unsigned char *hash, unsigned long hashlen, - int *stat, ecc_key *key) + int *stat, ecc_key *key, int sigformat) { ecc_point *mG, *mQ; void *r, *s, *v, *w, *u1, *u2, *e, *p, *m; void *mp; int err; + unsigned long pbits, pbytes, i, shift_right; + unsigned char ch, buf[MAXBLOCKSIZE]; LTC_ARGCHK(sig != NULL); LTC_ARGCHK(hash != NULL); @@ -79,12 +54,22 @@ goto error; } - /* parse header */ + if (sigformat == 1) { + /* RFC7518 format */ + if ((siglen % 2) == 1) { + err = CRYPT_INVALID_PACKET; + goto error; + } + i = siglen / 2; + if ((err = mp_read_unsigned_bin(r, (unsigned char *)sig, i)) != CRYPT_OK) { goto error; } + if ((err = mp_read_unsigned_bin(s, (unsigned char *)sig+i, i)) != CRYPT_OK) { goto error; } + } + else { + /* ASN.1 format */ if ((err = der_decode_sequence_multi(sig, siglen, LTC_ASN1_INTEGER, 1UL, r, LTC_ASN1_INTEGER, 1UL, s, - LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { - goto error; + LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { goto error; } } /* get the order */ @@ -99,8 +84,24 @@ goto error; } - /* read hash */ - if ((err = mp_read_unsigned_bin(e, (unsigned char *)hash, (int)hashlen)) != CRYPT_OK) { goto error; } + /* read hash - truncate if needed */ + pbits = mp_count_bits(p); + pbytes = (pbits+7) >> 3; + if (pbits > hashlen*8) { + if ((err = mp_read_unsigned_bin(e, (unsigned char *)hash, hashlen)) != CRYPT_OK) { goto error; } + } + else if (pbits % 8 == 0) { + if ((err = mp_read_unsigned_bin(e, (unsigned char *)hash, pbytes)) != CRYPT_OK) { goto error; } + } + else { + shift_right = 8 - pbits % 8; + for (i=0, ch=0; i> shift_right); + } + if ((err = mp_read_unsigned_bin(e, (unsigned char *)buf, pbytes)) != CRYPT_OK) { goto error; } + } /* w = s^-1 mod n */ if ((err = mp_invmod(s, p, w)) != CRYPT_OK) { goto error; } @@ -158,8 +159,42 @@ return err; } +/** + Verify an ECC signature + @param sig The signature to verify + @param siglen The length of the signature (octets) + @param hash The hash (message digest) that was signed + @param hashlen The length of the hash (octets) + @param stat Result of signature, 1==valid, 0==invalid + @param key The corresponding public ECC key + @return CRYPT_OK if successful (even if the signature is not valid) +*/ +int ecc_verify_hash(const unsigned char *sig, unsigned long siglen, + const unsigned char *hash, unsigned long hashlen, + int *stat, ecc_key *key) +{ + return _ecc_verify_hash(sig, siglen, hash, hashlen, stat, key, 0); +} + +/** + Verify an ECC signature in RFC7518 format + @param sig The signature to verify + @param siglen The length of the signature (octets) + @param hash The hash (message digest) that was signed + @param hashlen The length of the hash (octets) + @param stat Result of signature, 1==valid, 0==invalid + @param key The corresponding public ECC key + @return CRYPT_OK if successful (even if the signature is not valid) +*/ +int ecc_verify_hash_rfc7518(const unsigned char *sig, unsigned long siglen, + const unsigned char *hash, unsigned long hashlen, + int *stat, ecc_key *key) +{ + return _ecc_verify_hash(sig, siglen, hash, hashlen, stat, key, 1); +} + #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ltc_ecc_is_valid_idx.c --- a/libtomcrypt/src/pk/ecc/ltc_ecc_is_valid_idx.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ltc_ecc_is_valid_idx.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -19,14 +17,14 @@ /** @file ltc_ecc_is_valid_idx.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC /** Returns whether an ECC idx is valid or not @param n The idx number to check @return 1 if valid, 0 if not -*/ +*/ int ltc_ecc_is_valid_idx(int n) { int x; @@ -40,7 +38,7 @@ } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ltc_ecc_map.c --- a/libtomcrypt/src/pk/ecc/ltc_ecc_map.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ltc_ecc_map.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -19,7 +17,7 @@ /** @file ltc_ecc_map.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC @@ -40,7 +38,7 @@ LTC_ARGCHK(mp != NULL); if ((err = mp_init_multi(&t1, &t2, NULL)) != CRYPT_OK) { - return CRYPT_MEM; + return err; } /* first map z back to normal */ @@ -48,7 +46,7 @@ /* get 1/z */ if ((err = mp_invmod(P->z, modulus, t1)) != CRYPT_OK) { goto done; } - + /* get 1/z^2 and 1/z^3 */ if ((err = mp_sqr(t1, t2)) != CRYPT_OK) { goto done; } if ((err = mp_mod(t2, modulus, t2)) != CRYPT_OK) { goto done; } @@ -70,7 +68,7 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ltc_ecc_mul2add.c --- a/libtomcrypt/src/pk/ecc/ltc_ecc_mul2add.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ltc_ecc_mul2add.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -19,7 +17,7 @@ /** @file ltc_ecc_mul2add.c ECC Crypto, Shamir's Trick, Tom St Denis -*/ +*/ #ifdef LTC_MECC @@ -31,9 +29,9 @@ @param B Second point to multiply @param kB What to multiple B by @param C [out] Destination point (can overlap with A or B - @param modulus Modulus for curve + @param modulus Modulus for curve @return CRYPT_OK on success -*/ +*/ int ltc_ecc_mul2add(ecc_point *A, void *kA, ecc_point *B, void *kB, ecc_point *C, @@ -44,7 +42,7 @@ unsigned char *tA, *tB; int err, first; void *mp, *mu; - + /* argchks */ LTC_ARGCHK(A != NULL); LTC_ARGCHK(B != NULL); @@ -93,16 +91,16 @@ } } - /* init montgomery reduction */ - if ((err = mp_montgomery_setup(modulus, &mp)) != CRYPT_OK) { + /* init montgomery reduction */ + if ((err = mp_montgomery_setup(modulus, &mp)) != CRYPT_OK) { goto ERR_P; - } - if ((err = mp_init(&mu)) != CRYPT_OK) { + } + if ((err = mp_init(&mu)) != CRYPT_OK) { goto ERR_MP; - } - if ((err = mp_montgomery_normalization(mu, modulus)) != CRYPT_OK) { + } + if ((err = mp_montgomery_normalization(mu, modulus)) != CRYPT_OK) { goto ERR_MU; - } + } /* copy ones ... */ if ((err = mp_mulmod(A->x, mu, modulus, precomp[1]->x)) != CRYPT_OK) { goto ERR_MU; } @@ -126,7 +124,7 @@ for (y = 1; y < 4; y++) { if ((err = ltc_mp.ecc_ptadd(precomp[x], precomp[(y<<2)], precomp[x+(y<<2)], modulus, mp)) != CRYPT_OK) { goto ERR_MU; } } - } + } nibble = 3; first = 1; @@ -134,20 +132,21 @@ bitbufB = tB[0]; /* for every byte of the multiplicands */ - for (x = -1;; ) { + for (x = 0;; ) { /* grab a nibble */ if (++nibble == 4) { - ++x; if (x == len) break; + if (x == len) break; bitbufA = tA[x]; bitbufB = tB[x]; nibble = 0; + ++x; } /* extract two bits from both, shift/update */ nA = (bitbufA >> 6) & 0x03; nB = (bitbufB >> 6) & 0x03; - bitbufA = (bitbufA << 2) & 0xFF; - bitbufB = (bitbufB << 2) & 0xFF; + bitbufA = (bitbufA << 2) & 0xFF; + bitbufB = (bitbufB << 2) & 0xFF; /* if both zero, if first, continue */ if ((nA == 0) && (nB == 0) && (first == 1)) { @@ -202,6 +201,6 @@ #endif #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ltc_ecc_mulmod.c --- a/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -19,7 +17,7 @@ /** @file ltc_ecc_mulmod.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC #ifndef LTC_ECC_TIMING_RESISTANT @@ -28,7 +26,7 @@ #define WINSIZE 4 /** - Perform a point multiplication + Perform a point multiplication @param k The scalar to multiply by @param G The base point @param R [out] Destination for kG @@ -41,7 +39,7 @@ ecc_point *tG, *M[8]; int i, j, err; void *mu, *mp; - unsigned long buf; + ltc_mp_digit buf; int first, bitbuf, bitcpy, bitcnt, mode, digidx; LTC_ARGCHK(k != NULL); @@ -62,7 +60,7 @@ mp_clear(mu); return err; } - + /* alloc ram for window temps */ for (i = 0; i < 8; i++) { M[i] = ltc_ecc_new_point(); @@ -85,14 +83,14 @@ if ((err = mp_copy(G->x, tG->x)) != CRYPT_OK) { goto done; } if ((err = mp_copy(G->y, tG->y)) != CRYPT_OK) { goto done; } if ((err = mp_copy(G->z, tG->z)) != CRYPT_OK) { goto done; } - } else { + } else { if ((err = mp_mulmod(G->x, mu, modulus, tG->x)) != CRYPT_OK) { goto done; } if ((err = mp_mulmod(G->y, mu, modulus, tG->y)) != CRYPT_OK) { goto done; } if ((err = mp_mulmod(G->z, mu, modulus, tG->z)) != CRYPT_OK) { goto done; } } mp_clear(mu); mu = NULL; - + /* calc the M tab, which holds kG for k==8..15 */ /* M[0] == 8G */ if ((err = ltc_mp.ecc_ptdbl(tG, M[0], modulus, mp)) != CRYPT_OK) { goto done; } @@ -217,6 +215,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ltc_ecc_mulmod_timing.c --- a/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod_timing.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod_timing.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -39,7 +37,7 @@ ecc_point *tG, *M[3]; int i, j, err; void *mu, *mp; - unsigned long buf; + ltc_mp_digit buf; int bitcnt, mode, digidx; LTC_ARGCHK(k != NULL); @@ -159,7 +157,7 @@ #endif #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ltc_ecc_points.c --- a/libtomcrypt/src/pk/ecc/ltc_ecc_points.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ltc_ecc_points.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -19,13 +17,13 @@ /** @file ltc_ecc_points.c ECC Crypto, Tom St Denis -*/ +*/ #ifdef LTC_MECC /** Allocate a new ECC point - @return A newly allocated point or NULL on error + @return A newly allocated point or NULL on error */ ecc_point *ltc_ecc_new_point(void) { @@ -54,7 +52,7 @@ } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ltc_ecc_projective_add_point.c --- a/libtomcrypt/src/pk/ecc/ltc_ecc_projective_add_point.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ltc_ecc_projective_add_point.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -19,9 +17,9 @@ /** @file ltc_ecc_projective_add_point.c ECC Crypto, Tom St Denis -*/ +*/ -#if defined(LTC_MECC) && (!defined(LTC_MECC_ACCEL) || defined(LTM_LTC_DESC)) +#if defined(LTC_MECC) && (!defined(LTC_MECC_ACCEL) || defined(LTM_DESC)) /** Add two ECC points @@ -46,11 +44,11 @@ if ((err = mp_init_multi(&t1, &t2, &x, &y, &z, NULL)) != CRYPT_OK) { return err; } - + /* should we dbl instead? */ if ((err = mp_sub(modulus, Q->y, t1)) != CRYPT_OK) { goto done; } - if ( (mp_cmp(P->x, Q->x) == LTC_MP_EQ) && + if ( (mp_cmp(P->x, Q->x) == LTC_MP_EQ) && (Q->z != NULL && mp_cmp(P->z, Q->z) == LTC_MP_EQ) && (mp_cmp(P->y, Q->y) == LTC_MP_EQ || mp_cmp(P->y, t1) == LTC_MP_EQ)) { mp_clear_multi(t1, t2, x, y, z, NULL); @@ -144,7 +142,7 @@ /* T1 = T1 * X */ if ((err = mp_mul(t1, x, t1)) != CRYPT_OK) { goto done; } if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; } - + /* X = Y*Y */ if ((err = mp_sqr(y, x)) != CRYPT_OK) { goto done; } if ((err = mp_montgomery_reduce(x, modulus, mp)) != CRYPT_OK) { goto done; } @@ -158,7 +156,7 @@ if ((err = mp_sub(t2, x, t2)) != CRYPT_OK) { goto done; } if (mp_cmp_d(t2, 0) == LTC_MP_LT) { if ((err = mp_add(t2, modulus, t2)) != CRYPT_OK) { goto done; } - } + } /* T2 = T2 - X */ if ((err = mp_sub(t2, x, t2)) != CRYPT_OK) { goto done; } if (mp_cmp_d(t2, 0) == LTC_MP_LT) { @@ -190,7 +188,7 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/ecc/ltc_ecc_projective_dbl_point.c --- a/libtomcrypt/src/pk/ecc/ltc_ecc_projective_dbl_point.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/ecc/ltc_ecc_projective_dbl_point.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -19,9 +17,9 @@ /** @file ltc_ecc_projective_dbl_point.c ECC Crypto, Tom St Denis -*/ +*/ -#if defined(LTC_MECC) && (!defined(LTC_MECC_ACCEL) || defined(LTM_LTC_DESC)) +#if defined(LTC_MECC) && (!defined(LTC_MECC_ACCEL) || defined(LTM_DESC)) /** Double an ECC point @@ -62,7 +60,7 @@ if (mp_cmp(R->z, modulus) != LTC_MP_LT) { if ((err = mp_sub(R->z, modulus, R->z)) != CRYPT_OK) { goto done; } } - + /* T2 = X - T1 */ if ((err = mp_sub(R->x, t1, t2)) != CRYPT_OK) { goto done; } if (mp_cmp_d(t2, 0) == LTC_MP_LT) { @@ -121,7 +119,7 @@ if ((err = mp_add(R->x, modulus, R->x)) != CRYPT_OK) { goto done; } } - /* Y = Y - X */ + /* Y = Y - X */ if ((err = mp_sub(R->y, R->x, R->y)) != CRYPT_OK) { goto done; } if (mp_cmp_d(R->y, 0) == LTC_MP_LT) { if ((err = mp_add(R->y, modulus, R->y)) != CRYPT_OK) { goto done; } @@ -134,14 +132,14 @@ if (mp_cmp_d(R->y, 0) == LTC_MP_LT) { if ((err = mp_add(R->y, modulus, R->y)) != CRYPT_OK) { goto done; } } - + err = CRYPT_OK; done: mp_clear_multi(t1, t2, NULL); return err; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/katja/katja_decrypt_key.c --- a/libtomcrypt/src/pk/katja/katja_decrypt_key.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/katja/katja_decrypt_key.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,20 +5,18 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file katja_decrypt_key.c - Katja LTC_PKCS #1 OAEP Decryption, Tom St Denis -*/ + Katja PKCS #1 OAEP Decryption, Tom St Denis +*/ -#ifdef MKAT +#ifdef LTC_MKAT /** - (LTC_PKCS #1 v2.0) decrypt then OAEP depad + (PKCS #1 v2.0) decrypt then OAEP depad @param in The ciphertext @param inlen The length of the ciphertext (octets) @param out [out] The plaintext @@ -31,7 +29,7 @@ @return CRYPT_OK if succcessul (even if invalid) */ int katja_decrypt_key(const unsigned char *in, unsigned long inlen, - unsigned char *out, unsigned long *outlen, + unsigned char *out, unsigned long *outlen, const unsigned char *lparam, unsigned long lparamlen, int hash_idx, int *stat, katja_key *key) @@ -39,7 +37,7 @@ unsigned long modulus_bitlen, modulus_bytelen, x; int err; unsigned char *tmp; - + LTC_ARGCHK(out != NULL); LTC_ARGCHK(outlen != NULL); LTC_ARGCHK(key != NULL); @@ -52,7 +50,7 @@ if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) { return err; } - + /* get modulus len in bits */ modulus_bitlen = mp_count_bits( (key->N)); @@ -100,6 +98,6 @@ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/katja/katja_encrypt_key.c --- a/libtomcrypt/src/pk/katja/katja_encrypt_key.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/katja/katja_encrypt_key.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,20 +5,18 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file katja_encrypt_key.c - Katja LTC_PKCS-style OAEP encryption, Tom St Denis -*/ + Katja PKCS-style OAEP encryption, Tom St Denis +*/ -#ifdef MKAT +#ifdef LTC_MKAT /** - (LTC_PKCS #1 v2.0) OAEP pad then encrypt + (PKCS #1 v2.0) OAEP pad then encrypt @param in The plaintext @param inlen The length of the plaintext (octets) @param out [out] The ciphertext @@ -30,7 +28,7 @@ @param hash_idx The index of the desired hash @param key The Katja key to encrypt to @return CRYPT_OK if successful -*/ +*/ int katja_encrypt_key(const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen, const unsigned char *lparam, unsigned long lparamlen, @@ -38,12 +36,12 @@ { unsigned long modulus_bitlen, modulus_bytelen, x; int err; - + LTC_ARGCHK(in != NULL); LTC_ARGCHK(out != NULL); LTC_ARGCHK(outlen != NULL); LTC_ARGCHK(key != NULL); - + /* valid prng and hash ? */ if ((err = prng_is_valid(prng_idx)) != CRYPT_OK) { return err; @@ -51,7 +49,7 @@ if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) { return err; } - + /* get modulus len in bits */ modulus_bitlen = mp_count_bits((key->N)); @@ -70,11 +68,11 @@ /* OAEP pad the key */ x = *outlen; - if ((err = pkcs_1_oaep_encode(in, inlen, lparam, - lparamlen, modulus_bitlen, prng, prng_idx, hash_idx, + if ((err = pkcs_1_oaep_encode(in, inlen, lparam, + lparamlen, modulus_bitlen, prng, prng_idx, hash_idx, out, &x)) != CRYPT_OK) { return err; - } + } /* Katja exptmod the OAEP pad */ return katja_exptmod(out, x, out, outlen, PK_PUBLIC, key); @@ -82,6 +80,6 @@ #endif /* LTC_MRSA */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/katja/katja_export.c --- a/libtomcrypt/src/pk/katja/katja_export.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/katja/katja_export.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,17 +5,15 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file katja_export.c - Export Katja LTC_PKCS-style keys, Tom St Denis -*/ + Export Katja PKCS-style keys, Tom St Denis +*/ -#ifdef MKAT +#ifdef LTC_MKAT /** This will export either an KatjaPublicKey or KatjaPrivateKey @@ -24,7 +22,7 @@ @param type The type of exported key (PK_PRIVATE or PK_PUBLIC) @param key The Katja key to export @return CRYPT_OK if successful -*/ +*/ int katja_export(unsigned char *out, unsigned long *outlen, int type, katja_key *key) { int err; @@ -41,35 +39,35 @@ if (type == PK_PRIVATE) { /* private key */ - /* output is + /* output is Version, n, d, p, q, d mod (p-1), d mod (q - 1), 1/q mod p, pq */ - if ((err = der_encode_sequence_multi(out, outlen, - LTC_ASN1_SHORT_INTEGER, 1UL, &zero, - LTC_ASN1_INTEGER, 1UL, key->N, - LTC_ASN1_INTEGER, 1UL, key->d, - LTC_ASN1_INTEGER, 1UL, key->p, - LTC_ASN1_INTEGER, 1UL, key->q, + if ((err = der_encode_sequence_multi(out, outlen, + LTC_ASN1_SHORT_INTEGER, 1UL, &zero, + LTC_ASN1_INTEGER, 1UL, key->N, + LTC_ASN1_INTEGER, 1UL, key->d, + LTC_ASN1_INTEGER, 1UL, key->p, + LTC_ASN1_INTEGER, 1UL, key->q, LTC_ASN1_INTEGER, 1UL, key->dP, - LTC_ASN1_INTEGER, 1UL, key->dQ, - LTC_ASN1_INTEGER, 1UL, key->qP, - LTC_ASN1_INTEGER, 1UL, key->pq, + LTC_ASN1_INTEGER, 1UL, key->dQ, + LTC_ASN1_INTEGER, 1UL, key->qP, + LTC_ASN1_INTEGER, 1UL, key->pq, LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { return err; } - + /* clear zero and return */ return CRYPT_OK; } else { /* public key */ - return der_encode_sequence_multi(out, outlen, - LTC_ASN1_INTEGER, 1UL, key->N, + return der_encode_sequence_multi(out, outlen, + LTC_ASN1_INTEGER, 1UL, key->N, LTC_ASN1_EOL, 0UL, NULL); } } #endif /* LTC_MRSA */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/katja/katja_exptmod.c --- a/libtomcrypt/src/pk/katja/katja_exptmod.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/katja/katja_exptmod.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,28 +5,26 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file katja_exptmod.c - Katja LTC_PKCS-style exptmod, Tom St Denis -*/ + Katja PKCS-style exptmod, Tom St Denis +*/ -#ifdef MKAT +#ifdef LTC_MKAT -/** - Compute an RSA modular exponentiation +/** + Compute an RSA modular exponentiation @param in The input data to send into RSA @param inlen The length of the input (octets) - @param out [out] The destination + @param out [out] The destination @param outlen [in/out] The max size and resulting size of the output @param which Which exponent to use, e.g. PK_PRIVATE or PK_PUBLIC - @param key The RSA key to use + @param key The RSA key to use @return CRYPT_OK if successful -*/ +*/ int katja_exptmod(const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen, int which, katja_key *key) @@ -39,7 +37,7 @@ LTC_ARGCHK(out != NULL); LTC_ARGCHK(outlen != NULL); LTC_ARGCHK(key != NULL); - + /* is the key of the right type for the operation? */ if (which == PK_PRIVATE && (key->type != PK_PRIVATE)) { return CRYPT_PK_NOT_PRIVATE; @@ -110,6 +108,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/katja/katja_free.c --- a/libtomcrypt/src/pk/katja/katja_free.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/katja/katja_free.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,17 +5,15 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file katja_free.c Free an Katja key, Tom St Denis -*/ +*/ -#ifdef MKAT +#ifdef LTC_MKAT /** Free an Katja key from memory @@ -30,6 +28,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/katja/katja_import.c --- a/libtomcrypt/src/pk/katja/katja_import.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/katja/katja_import.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,20 +5,18 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file katja_import.c - Import a LTC_PKCS-style Katja key, Tom St Denis -*/ + Import a PKCS-style Katja key, Tom St Denis +*/ -#ifdef MKAT +#ifdef LTC_MKAT /** - Import an KatjaPublicKey or KatjaPrivateKey [two-prime only, only support >= 1024-bit keys, defined in LTC_PKCS #1 v2.1] + Import an KatjaPublicKey or KatjaPrivateKey [two-prime only, only support >= 1024-bit keys, defined in PKCS #1 v2.1] @param in The packet to import from @param inlen It's length (octets) @param key [out] Destination for newly imported key @@ -34,29 +32,29 @@ LTC_ARGCHK(ltc_mp.name != NULL); /* init key */ - if ((err = mp_init_multi(&zero, &key->d, &key->N, &key->dQ, + if ((err = mp_init_multi(&zero, &key->d, &key->N, &key->dQ, &key->dP, &key->qP, &key->p, &key->q, &key->pq, NULL)) != CRYPT_OK) { return err; } - if ((err = der_decode_sequence_multi(in, inlen, - LTC_ASN1_INTEGER, 1UL, key->N, + if ((err = der_decode_sequence_multi(in, inlen, + LTC_ASN1_INTEGER, 1UL, key->N, LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { goto LBL_ERR; } if (mp_cmp_d(key->N, 0) == LTC_MP_EQ) { /* it's a private key */ - if ((err = der_decode_sequence_multi(in, inlen, - LTC_ASN1_INTEGER, 1UL, zero, - LTC_ASN1_INTEGER, 1UL, key->N, - LTC_ASN1_INTEGER, 1UL, key->d, - LTC_ASN1_INTEGER, 1UL, key->p, - LTC_ASN1_INTEGER, 1UL, key->q, + if ((err = der_decode_sequence_multi(in, inlen, + LTC_ASN1_INTEGER, 1UL, zero, + LTC_ASN1_INTEGER, 1UL, key->N, + LTC_ASN1_INTEGER, 1UL, key->d, + LTC_ASN1_INTEGER, 1UL, key->p, + LTC_ASN1_INTEGER, 1UL, key->q, LTC_ASN1_INTEGER, 1UL, key->dP, - LTC_ASN1_INTEGER, 1UL, key->dQ, - LTC_ASN1_INTEGER, 1UL, key->qP, - LTC_ASN1_INTEGER, 1UL, key->pq, + LTC_ASN1_INTEGER, 1UL, key->dQ, + LTC_ASN1_INTEGER, 1UL, key->qP, + LTC_ASN1_INTEGER, 1UL, key->pq, LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { goto LBL_ERR; } @@ -76,6 +74,6 @@ #endif /* LTC_MRSA */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/katja/katja_make_key.c --- a/libtomcrypt/src/pk/katja/katja_make_key.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/katja/katja_make_key.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,19 +5,17 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file katja_make_key.c Katja key generation, Tom St Denis -*/ +*/ -#ifdef MKAT +#ifdef LTC_MKAT -/** +/** Create a Katja key @param prng An active PRNG state @param wprng The index of the PRNG desired @@ -29,7 +27,7 @@ { void *p, *q, *tmp1, *tmp2; int err; - + LTC_ARGCHK(key != NULL); LTC_ARGCHK(ltc_mp.name != NULL); @@ -68,7 +66,7 @@ if ((err = mp_copy( p, key->p)) != CRYPT_OK) { goto error2; } if ((err = mp_copy( q, key->q)) != CRYPT_OK) { goto error2; } if ((err = mp_mul(key->p, key->q, key->pq)) != CRYPT_OK) { goto error2; } /* tmp1 = pq */ - if ((err = mp_mul(key->pq, key->p, key->N)) != CRYPT_OK) { goto error2; } /* N = p^2q */ + if ((err = mp_mul(key->pq, key->p, key->N)) != CRYPT_OK) { goto error2; } /* N = p^2q */ if ((err = mp_sub_d( p, 1, tmp1)) != CRYPT_OK) { goto error2; } /* tmp1 = q-1 */ if ((err = mp_sub_d( q, 1, tmp2)) != CRYPT_OK) { goto error2; } /* tmp2 = p-1 */ if ((err = mp_lcm(tmp1, tmp2, key->d)) != CRYPT_OK) { goto error2; } /* tmp1 = lcd(p-1,q-1) */ @@ -96,6 +94,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/pkcs1/pkcs_1_i2osp.c --- a/libtomcrypt/src/pk/pkcs1/pkcs_1_i2osp.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/pkcs1/pkcs_1_i2osp.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,14 +5,12 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file pkcs_1_i2osp.c - Integer to Octet I2OSP, Tom St Denis + Integer to Octet I2OSP, Tom St Denis */ #ifdef LTC_PKCS_1 @@ -22,7 +20,7 @@ */ /** - LTC_PKCS #1 Integer to binary + PKCS #1 Integer to binary @param n The integer to store @param modulus_len The length of the RSA modulus @param out [out] The destination for the integer @@ -46,6 +44,6 @@ #endif /* LTC_PKCS_1 */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/pkcs1/pkcs_1_mgf1.c --- a/libtomcrypt/src/pk/pkcs1/pkcs_1_mgf1.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/pkcs1/pkcs_1_mgf1.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,23 +5,21 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file pkcs_1_mgf1.c - The Mask Generation Function (MGF1) for LTC_PKCS #1, Tom St Denis + The Mask Generation Function (MGF1) for PKCS #1, Tom St Denis */ #ifdef LTC_PKCS_1 /** - Perform LTC_PKCS #1 MGF1 (internal) + Perform PKCS #1 MGF1 (internal) + @param hash_idx The index of the hash desired @param seed The seed for MGF1 @param seedlen The length of the seed - @param hash_idx The index of the hash desired @param mask [out] The destination @param masklen The length of the mask desired @return CRYPT_OK if successful @@ -35,12 +33,12 @@ int err; hash_state *md; unsigned char *buf; - + LTC_ARGCHK(seed != NULL); LTC_ARGCHK(mask != NULL); /* ensure valid hash */ - if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) { + if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) { return err; } @@ -103,6 +101,6 @@ #endif /* LTC_PKCS_1 */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_decode.c --- a/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_decode.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_decode.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,20 +5,18 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file pkcs_1_oaep_decode.c - OAEP Padding for LTC_PKCS #1, Tom St Denis + OAEP Padding for PKCS #1, Tom St Denis */ #ifdef LTC_PKCS_1 /** - LTC_PKCS #1 v2.00 OAEP decode + PKCS #1 v2.00 OAEP decode @param msg The encoded data to decode @param msglen The length of the encoded data (octets) @param lparam The session or system data (can be NULL) @@ -28,7 +26,7 @@ @param out [out] Destination of decoding @param outlen [in/out] The max size and resulting size of the decoding @param res [out] Result of decoding, 1==valid, 0==invalid - @return CRYPT_OK if successful (even if invalid) + @return CRYPT_OK if successful */ int pkcs_1_oaep_decode(const unsigned char *msg, unsigned long msglen, const unsigned char *lparam, unsigned long lparamlen, @@ -38,7 +36,7 @@ { unsigned char *DB, *seed, *mask; unsigned long hLen, x, y, modulus_len; - int err; + int err, ret; LTC_ARGCHK(msg != NULL); LTC_ARGCHK(out != NULL); @@ -47,9 +45,9 @@ /* default to invalid packet */ *res = 0; - + /* test valid hash */ - if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) { + if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) { return err; } hLen = hash_descriptor[hash_idx].hashsize; @@ -78,17 +76,18 @@ } /* ok so it's now in the form - - 0x00 || maskedseed || maskedDB - + + 0x00 || maskedseed || maskedDB + 1 || hLen || modulus_len - hLen - 1 - + */ + ret = CRYPT_OK; + /* must have leading 0x00 byte */ if (msg[0] != 0x00) { - err = CRYPT_OK; - goto LBL_ERR; + ret = CRYPT_INVALID_PACKET; } /* now read the masked seed */ @@ -100,7 +99,7 @@ XMEMCPY(DB, msg + x, modulus_len - hLen - 1); x += modulus_len - hLen - 1; - /* compute MGF1 of maskedDB (hLen) */ + /* compute MGF1 of maskedDB (hLen) */ if ((err = pkcs_1_mgf1(hash_idx, DB, modulus_len - hLen - 1, mask, hLen)) != CRYPT_OK) { goto LBL_ERR; } @@ -117,7 +116,7 @@ /* xor against DB */ for (y = 0; y < (modulus_len - hLen - 1); y++) { - DB[y] ^= mask[y]; + DB[y] ^= mask[y]; } /* now DB == lhash || PS || 0x01 || M, PS == k - mlen - 2hlen - 2 zeroes */ @@ -136,9 +135,8 @@ } /* compare the lhash'es */ - if (XMEMCMP(seed, DB, hLen) != 0) { - err = CRYPT_OK; - goto LBL_ERR; + if (XMEM_NEQ(seed, DB, hLen) != 0) { + ret = CRYPT_INVALID_PACKET; } /* now zeroes before a 0x01 */ @@ -146,28 +144,26 @@ /* step... */ } - /* error out if wasn't 0x01 */ + /* error if wasn't 0x01 */ if (x == (modulus_len - hLen - 1) || DB[x] != 0x01) { - err = CRYPT_INVALID_PACKET; - goto LBL_ERR; + ret = CRYPT_INVALID_PACKET; } /* rest is the message (and skip 0x01) */ if ((modulus_len - hLen - 1 - ++x) > *outlen) { - *outlen = modulus_len - hLen - 1 - x; - err = CRYPT_BUFFER_OVERFLOW; - goto LBL_ERR; + ret = CRYPT_INVALID_PACKET; } - /* copy message */ - *outlen = modulus_len - hLen - 1 - x; - XMEMCPY(out, DB + x, modulus_len - hLen - 1 - x); - x += modulus_len - hLen - 1; + if (ret == CRYPT_OK) { + /* copy message */ + *outlen = modulus_len - hLen - 1 - x; + XMEMCPY(out, DB + x, modulus_len - hLen - 1 - x); - /* valid packet */ - *res = 1; + /* valid packet */ + *res = 1; + } + err = ret; - err = CRYPT_OK; LBL_ERR: #ifdef LTC_CLEAN_STACK zeromem(DB, modulus_len); @@ -184,6 +180,6 @@ #endif /* LTC_PKCS_1 */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_encode.c --- a/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_encode.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_encode.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,20 +5,18 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file pkcs_1_oaep_encode.c - OAEP Padding for LTC_PKCS #1, Tom St Denis + OAEP Padding for PKCS #1, Tom St Denis */ #ifdef LTC_PKCS_1 /** - LTC_PKCS #1 v2.00 OAEP encode + PKCS #1 v2.00 OAEP encode @param msg The data to encode @param msglen The length of the data to encode (octets) @param lparam A session or system parameter (can be NULL) @@ -46,7 +44,7 @@ LTC_ARGCHK(outlen != NULL); /* test valid hash */ - if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) { + if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) { return err; } @@ -120,10 +118,10 @@ /* xor against DB */ for (y = 0; y < (modulus_len - hLen - 1); y++) { - DB[y] ^= mask[y]; + DB[y] ^= mask[y]; } - /* compute MGF1 of maskedDB (hLen) */ + /* compute MGF1 of maskedDB (hLen) */ if ((err = pkcs_1_mgf1(hash_idx, DB, modulus_len - hLen - 1, mask, hLen)) != CRYPT_OK) { goto LBL_ERR; } @@ -149,7 +147,7 @@ x += modulus_len - hLen - 1; *outlen = x; - + err = CRYPT_OK; LBL_ERR: #ifdef LTC_CLEAN_STACK @@ -168,6 +166,6 @@ #endif /* LTC_PKCS_1 */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/pkcs1/pkcs_1_os2ip.c --- a/libtomcrypt/src/pk/pkcs1/pkcs_1_os2ip.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/pkcs1/pkcs_1_os2ip.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,14 +5,12 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file pkcs_1_os2ip.c - Octet to Integer OS2IP, Tom St Denis + Octet to Integer OS2IP, Tom St Denis */ #ifdef LTC_PKCS_1 @@ -31,6 +29,6 @@ #endif /* LTC_PKCS_1 */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/pkcs1/pkcs_1_pss_decode.c --- a/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_decode.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_decode.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,20 +5,18 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file pkcs_1_pss_decode.c - LTC_PKCS #1 PSS Signature Padding, Tom St Denis + PKCS #1 PSS Signature Padding, Tom St Denis */ #ifdef LTC_PKCS_1 /** - LTC_PKCS #1 v2.00 PSS decode + PKCS #1 v2.00 PSS decode @param msghash The hash to verify @param msghashlen The length of the hash (octets) @param sig The signature data (encoded data) @@ -51,11 +49,12 @@ } hLen = hash_descriptor[hash_idx].hashsize; + modulus_bitlen--; modulus_len = (modulus_bitlen>>3) + (modulus_bitlen & 7 ? 1 : 0); /* check sizes */ - if ((saltlen > modulus_len) || - (modulus_len < hLen + saltlen + 2) || (siglen != modulus_len)) { + if ((saltlen > modulus_len) || + (modulus_len < hLen + saltlen + 2)) { return CRYPT_PK_INVALID_SIZE; } @@ -93,10 +92,10 @@ /* copy out the hash */ XMEMCPY(hash, sig + x, hLen); - x += hLen; + /* x += hLen; */ /* check the MSB */ - if ((sig[0] & ~(0xFF >> ((modulus_len<<3) - (modulus_bitlen-1)))) != 0) { + if ((sig[0] & ~(0xFF >> ((modulus_len<<3) - (modulus_bitlen)))) != 0) { err = CRYPT_INVALID_PACKET; goto LBL_ERR; } @@ -110,9 +109,9 @@ for (y = 0; y < (modulus_len - hLen - 1); y++) { DB[y] ^= mask[y]; } - + /* now clear the first byte [make sure smaller than modulus] */ - DB[0] &= 0xFF >> ((modulus_len<<3) - (modulus_bitlen-1)); + DB[0] &= 0xFF >> ((modulus_len<<3) - (modulus_bitlen)); /* DB = PS || 0x01 || salt, PS == modulus_len - saltlen - hLen - 2 zero bytes */ @@ -149,17 +148,17 @@ } /* mask == hash means valid signature */ - if (XMEMCMP(mask, hash, hLen) == 0) { + if (XMEM_NEQ(mask, hash, hLen) == 0) { *res = 1; } err = CRYPT_OK; LBL_ERR: #ifdef LTC_CLEAN_STACK - zeromem(DB, modulus_len); - zeromem(mask, modulus_len); - zeromem(salt, modulus_len); - zeromem(hash, modulus_len); + zeromem(DB, modulus_len); + zeromem(mask, modulus_len); + zeromem(salt, modulus_len); + zeromem(hash, modulus_len); #endif XFREE(hash); @@ -172,6 +171,6 @@ #endif /* LTC_PKCS_1 */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/pkcs1/pkcs_1_pss_encode.c --- a/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_encode.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_encode.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,20 +5,18 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +/** @file pkcs_1_pss_encode.c - LTC_PKCS #1 PSS Signature Padding, Tom St Denis + PKCS #1 PSS Signature Padding, Tom St Denis */ #ifdef LTC_PKCS_1 /** - LTC_PKCS #1 v2.00 Signature Encoding + PKCS #1 v2.00 Signature Encoding @param msghash The hash to encode @param msghashlen The length of the hash (octets) @param saltlen The length of the salt desired (octets) @@ -31,7 +29,7 @@ @return CRYPT_OK if successful */ int pkcs_1_pss_encode(const unsigned char *msghash, unsigned long msghashlen, - unsigned long saltlen, prng_state *prng, + unsigned long saltlen, prng_state *prng, int prng_idx, int hash_idx, unsigned long modulus_bitlen, unsigned char *out, unsigned long *outlen) @@ -54,6 +52,7 @@ } hLen = hash_descriptor[hash_idx].hashsize; + modulus_bitlen--; modulus_len = (modulus_bitlen>>3) + (modulus_bitlen & 7 ? 1 : 0); /* check sizes */ @@ -115,7 +114,7 @@ x += modulus_len - saltlen - hLen - 2; DB[x++] = 0x01; XMEMCPY(DB + x, salt, saltlen); - x += saltlen; + /* x += saltlen; */ /* generate mask of length modulus_len - hLen - 1 from hash */ if ((err = pkcs_1_mgf1(hash_idx, hash, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) { @@ -147,17 +146,17 @@ out[y] = 0xBC; /* now clear the 8*modulus_len - modulus_bitlen most significant bits */ - out[0] &= 0xFF >> ((modulus_len<<3) - (modulus_bitlen-1)); + out[0] &= 0xFF >> ((modulus_len<<3) - modulus_bitlen); /* store output size */ *outlen = modulus_len; err = CRYPT_OK; LBL_ERR: #ifdef LTC_CLEAN_STACK - zeromem(DB, modulus_len); - zeromem(mask, modulus_len); - zeromem(salt, modulus_len); - zeromem(hash, modulus_len); + zeromem(DB, modulus_len); + zeromem(mask, modulus_len); + zeromem(salt, modulus_len); + zeromem(hash, modulus_len); #endif XFREE(hash); @@ -170,6 +169,6 @@ #endif /* LTC_PKCS_1 */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_decode.c --- a/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_decode.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_decode.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,19 +5,17 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file pkcs_1_v1_5_decode.c * - * LTC_PKCS #1 v1.5 Padding. (Andreas Lange) + * PKCS #1 v1.5 Padding. (Andreas Lange) */ #ifdef LTC_PKCS_1 -/** @brief LTC_PKCS #1 v1.5 decode. +/** @brief PKCS #1 v1.5 decode. * * @param msg The encoded data to decode * @param msglen The length of the encoded data (octets) @@ -27,13 +25,13 @@ * @param outlen [in/out] The max size and resulting size of the decoding * @param is_valid [out] Boolean whether the padding was valid * - * @return CRYPT_OK if successful (even if invalid) + * @return CRYPT_OK if successful */ -int pkcs_1_v1_5_decode(const unsigned char *msg, +int pkcs_1_v1_5_decode(const unsigned char *msg, unsigned long msglen, int block_type, unsigned long modulus_bitlen, - unsigned char *out, + unsigned char *out, unsigned long *outlen, int *is_valid) { @@ -51,26 +49,25 @@ return CRYPT_PK_INVALID_SIZE; } + result = CRYPT_OK; + /* separate encoded message */ if ((msg[0] != 0x00) || (msg[1] != (unsigned char)block_type)) { result = CRYPT_INVALID_PACKET; - goto bail; } - if (block_type == LTC_LTC_PKCS_1_EME) { + if (block_type == LTC_PKCS_1_EME) { for (i = 2; i < modulus_len; i++) { /* separator */ if (msg[i] == 0x00) { break; } } ps_len = i++ - 2; - if ((i >= modulus_len) || (ps_len < 8)) { - /* There was no octet with hexadecimal value 0x00 to separate ps from m, - * or the length of ps is less than 8 octets. + if (i >= modulus_len) { + /* There was no octet with hexadecimal value 0x00 to separate ps from m. */ result = CRYPT_INVALID_PACKET; - goto bail; } } else { for (i = 2; i < modulus_len - 1; i++) { @@ -81,30 +78,35 @@ if (msg[i] != 0) { /* There was no octet with hexadecimal value 0x00 to separate ps from m. */ result = CRYPT_INVALID_PACKET; - goto bail; } ps_len = i - 2; } - if (*outlen < (msglen - (2 + ps_len + 1))) { - *outlen = msglen - (2 + ps_len + 1); - result = CRYPT_BUFFER_OVERFLOW; - goto bail; + if (ps_len < 8) + { + /* The length of ps is less than 8 octets. + */ + result = CRYPT_INVALID_PACKET; } - *outlen = (msglen - (2 + ps_len + 1)); - XMEMCPY(out, &msg[2 + ps_len + 1], *outlen); + if (*outlen < (msglen - (2 + ps_len + 1))) { + result = CRYPT_INVALID_PACKET; + } - /* valid packet */ - *is_valid = 1; - result = CRYPT_OK; -bail: + if (result == CRYPT_OK) { + *outlen = (msglen - (2 + ps_len + 1)); + XMEMCPY(out, &msg[2 + ps_len + 1], *outlen); + + /* valid packet */ + *is_valid = 1; + } + return result; } /* pkcs_1_v1_5_decode */ #endif /* #ifdef LTC_PKCS_1 */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_encode.c --- a/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_encode.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_encode.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,38 +5,36 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /*! \file pkcs_1_v1_5_encode.c * - * LTC_PKCS #1 v1.5 Padding (Andreas Lange) + * PKCS #1 v1.5 Padding (Andreas Lange) */ #ifdef LTC_PKCS_1 -/*! \brief LTC_PKCS #1 v1.5 encode. +/*! \brief PKCS #1 v1.5 encode. * * \param msg The data to encode * \param msglen The length of the data to encode (octets) * \param block_type Block type to use in padding (\sa ltc_pkcs_1_v1_5_blocks) * \param modulus_bitlen The bit length of the RSA modulus - * \param prng An active PRNG state (only for LTC_LTC_PKCS_1_EME) - * \param prng_idx The index of the PRNG desired (only for LTC_LTC_PKCS_1_EME) + * \param prng An active PRNG state (only for LTC_PKCS_1_EME) + * \param prng_idx The index of the PRNG desired (only for LTC_PKCS_1_EME) * \param out [out] The destination for the encoded data * \param outlen [in/out] The max size and resulting size of the encoded data * * \return CRYPT_OK if successful */ -int pkcs_1_v1_5_encode(const unsigned char *msg, +int pkcs_1_v1_5_encode(const unsigned char *msg, unsigned long msglen, int block_type, unsigned long modulus_bitlen, - prng_state *prng, + prng_state *prng, int prng_idx, - unsigned char *out, + unsigned char *out, unsigned long *outlen) { unsigned long modulus_len, ps_len, i; @@ -44,12 +42,12 @@ int result; /* valid block_type? */ - if ((block_type != LTC_LTC_PKCS_1_EMSA) && - (block_type != LTC_LTC_PKCS_1_EME)) { + if ((block_type != LTC_PKCS_1_EMSA) && + (block_type != LTC_PKCS_1_EME)) { return CRYPT_PK_INVALID_PADDING; } - if (block_type == LTC_LTC_PKCS_1_EME) { /* encryption padding, we need a valid PRNG */ + if (block_type == LTC_PKCS_1_EME) { /* encryption padding, we need a valid PRNG */ if ((result = prng_is_valid(prng_idx)) != CRYPT_OK) { return result; } @@ -72,7 +70,7 @@ ps = &out[2]; ps_len = modulus_len - msglen - 3; - if (block_type == LTC_LTC_PKCS_1_EME) { + if (block_type == LTC_PKCS_1_EME) { /* now choose a random ps */ if (prng_descriptor[prng_idx].read(ps, ps_len, prng) != ps_len) { result = CRYPT_ERROR_READPRNG; @@ -106,6 +104,6 @@ #endif /* #ifdef LTC_PKCS_1 */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/rsa/rsa_decrypt_key.c --- a/libtomcrypt/src/pk/rsa/rsa_decrypt_key.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/rsa/rsa_decrypt_key.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,20 +5,18 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file rsa_decrypt_key.c - RSA LTC_PKCS #1 Decryption, Tom St Denis and Andreas Lange + RSA PKCS #1 Decryption, Tom St Denis and Andreas Lange */ #ifdef LTC_MRSA /** - LTC_PKCS #1 decrypt then v1.5 or OAEP depad + PKCS #1 decrypt then v1.5 or OAEP depad @param in The ciphertext @param inlen The length of the ciphertext (octets) @param out [out] The plaintext @@ -26,7 +24,7 @@ @param lparam The system "lparam" value @param lparamlen The length of the lparam value (octets) @param hash_idx The index of the hash desired - @param padding Type of padding (LTC_LTC_PKCS_1_OAEP or LTC_LTC_PKCS_1_V1_5) + @param padding Type of padding (LTC_PKCS_1_OAEP or LTC_PKCS_1_V1_5) @param stat [out] Result of the decryption, 1==valid, 0==invalid @param key The corresponding private RSA key @return CRYPT_OK if succcessul (even if invalid) @@ -51,12 +49,12 @@ /* valid padding? */ - if ((padding != LTC_LTC_PKCS_1_V1_5) && - (padding != LTC_LTC_PKCS_1_OAEP)) { + if ((padding != LTC_PKCS_1_V1_5) && + (padding != LTC_PKCS_1_OAEP)) { return CRYPT_PK_INVALID_PADDING; } - if (padding == LTC_LTC_PKCS_1_OAEP) { + if (padding == LTC_PKCS_1_OAEP) { /* valid hash ? */ if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) { return err; @@ -85,13 +83,13 @@ return err; } - if (padding == LTC_LTC_PKCS_1_OAEP) { + if (padding == LTC_PKCS_1_OAEP) { /* now OAEP decode the packet */ err = pkcs_1_oaep_decode(tmp, x, lparam, lparamlen, modulus_bitlen, hash_idx, out, outlen, stat); } else { - /* now LTC_PKCS #1 v1.5 depad the packet */ - err = pkcs_1_v1_5_decode(tmp, x, LTC_LTC_PKCS_1_EME, modulus_bitlen, out, outlen, stat); + /* now PKCS #1 v1.5 depad the packet */ + err = pkcs_1_v1_5_decode(tmp, x, LTC_PKCS_1_EME, modulus_bitlen, out, outlen, stat); } XFREE(tmp); @@ -100,6 +98,6 @@ #endif /* LTC_MRSA */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/rsa/rsa_encrypt_key.c --- a/libtomcrypt/src/pk/rsa/rsa_encrypt_key.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/rsa/rsa_encrypt_key.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,20 +5,18 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file rsa_encrypt_key.c - RSA LTC_PKCS #1 encryption, Tom St Denis and Andreas Lange + RSA PKCS #1 encryption, Tom St Denis and Andreas Lange */ #ifdef LTC_MRSA /** - (LTC_PKCS #1 v2.0) OAEP pad then encrypt + (PKCS #1 v2.0) OAEP pad then encrypt @param in The plaintext @param inlen The length of the plaintext (octets) @param out [out] The ciphertext @@ -28,7 +26,7 @@ @param prng An active PRNG @param prng_idx The index of the desired prng @param hash_idx The index of the desired hash - @param padding Type of padding (LTC_LTC_PKCS_1_OAEP or LTC_LTC_PKCS_1_V1_5) + @param padding Type of padding (LTC_PKCS_1_OAEP or LTC_PKCS_1_V1_5) @param key The RSA key to encrypt to @return CRYPT_OK if successful */ @@ -46,8 +44,8 @@ LTC_ARGCHK(key != NULL); /* valid padding? */ - if ((padding != LTC_LTC_PKCS_1_V1_5) && - (padding != LTC_LTC_PKCS_1_OAEP)) { + if ((padding != LTC_PKCS_1_V1_5) && + (padding != LTC_PKCS_1_OAEP)) { return CRYPT_PK_INVALID_PADDING; } @@ -56,7 +54,7 @@ return err; } - if (padding == LTC_LTC_PKCS_1_OAEP) { + if (padding == LTC_PKCS_1_OAEP) { /* valid hash? */ if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) { return err; @@ -73,7 +71,7 @@ return CRYPT_BUFFER_OVERFLOW; } - if (padding == LTC_LTC_PKCS_1_OAEP) { + if (padding == LTC_PKCS_1_OAEP) { /* OAEP pad the key */ x = *outlen; if ((err = pkcs_1_oaep_encode(in, inlen, lparam, @@ -82,21 +80,21 @@ return err; } } else { - /* LTC_PKCS #1 v1.5 pad the key */ + /* PKCS #1 v1.5 pad the key */ x = *outlen; - if ((err = pkcs_1_v1_5_encode(in, inlen, LTC_LTC_PKCS_1_EME, + if ((err = pkcs_1_v1_5_encode(in, inlen, LTC_PKCS_1_EME, modulus_bitlen, prng, prng_idx, out, &x)) != CRYPT_OK) { return err; } } - /* rsa exptmod the OAEP or LTC_PKCS #1 v1.5 pad */ + /* rsa exptmod the OAEP or PKCS #1 v1.5 pad */ return ltc_mp.rsa_me(out, x, out, outlen, PK_PUBLIC, key); } #endif /* LTC_MRSA */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/rsa/rsa_export.c --- a/libtomcrypt/src/pk/rsa/rsa_export.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/rsa/rsa_export.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,29 +5,28 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file rsa_export.c - Export RSA LTC_PKCS keys, Tom St Denis -*/ + Export RSA PKCS keys, Tom St Denis +*/ #ifdef LTC_MRSA /** - This will export either an RSAPublicKey or RSAPrivateKey [defined in LTC_PKCS #1 v2.1] + This will export either an RSAPublicKey or RSAPrivateKey [defined in PKCS #1 v2.1] @param out [out] Destination of the packet @param outlen [in/out] The max size and resulting size of the packet @param type The type of exported key (PK_PRIVATE or PK_PUBLIC) @param key The RSA key to export @return CRYPT_OK if successful -*/ +*/ int rsa_export(unsigned char *out, unsigned long *outlen, int type, rsa_key *key) { unsigned long zero=0; + int err; LTC_ARGCHK(out != NULL); LTC_ARGCHK(outlen != NULL); LTC_ARGCHK(key != NULL); @@ -39,31 +38,60 @@ if (type == PK_PRIVATE) { /* private key */ - /* output is + /* output is Version, n, e, d, p, q, d mod (p-1), d mod (q - 1), 1/q mod p */ - return der_encode_sequence_multi(out, outlen, - LTC_ASN1_SHORT_INTEGER, 1UL, &zero, - LTC_ASN1_INTEGER, 1UL, key->N, + return der_encode_sequence_multi(out, outlen, + LTC_ASN1_SHORT_INTEGER, 1UL, &zero, + LTC_ASN1_INTEGER, 1UL, key->N, LTC_ASN1_INTEGER, 1UL, key->e, - LTC_ASN1_INTEGER, 1UL, key->d, - LTC_ASN1_INTEGER, 1UL, key->p, - LTC_ASN1_INTEGER, 1UL, key->q, + LTC_ASN1_INTEGER, 1UL, key->d, + LTC_ASN1_INTEGER, 1UL, key->p, + LTC_ASN1_INTEGER, 1UL, key->q, LTC_ASN1_INTEGER, 1UL, key->dP, - LTC_ASN1_INTEGER, 1UL, key->dQ, - LTC_ASN1_INTEGER, 1UL, key->qP, + LTC_ASN1_INTEGER, 1UL, key->dQ, + LTC_ASN1_INTEGER, 1UL, key->qP, LTC_ASN1_EOL, 0UL, NULL); } else { /* public key */ - return der_encode_sequence_multi(out, outlen, - LTC_ASN1_INTEGER, 1UL, key->N, - LTC_ASN1_INTEGER, 1UL, key->e, + unsigned long tmplen, *ptmplen; + unsigned char* tmp = NULL; + + if (type & PK_STD) { + tmplen = (mp_count_bits(key->N)/8)*2+8; + tmp = XMALLOC(tmplen); + ptmplen = &tmplen; + if (tmp == NULL) { + return CRYPT_MEM; + } + } + else { + tmp = out; + ptmplen = outlen; + } + + err = der_encode_sequence_multi(tmp, ptmplen, + LTC_ASN1_INTEGER, 1UL, key->N, + LTC_ASN1_INTEGER, 1UL, key->e, LTC_ASN1_EOL, 0UL, NULL); + + if ((err != CRYPT_OK) || !(type & PK_STD)) { + goto finish; + } + + err = der_encode_subject_public_key_info(out, outlen, + PKA_RSA, tmp, tmplen, LTC_ASN1_NULL, NULL, 0); + +finish: + if (tmp != out) + XFREE(tmp); + return err; + } } #endif /* LTC_MRSA */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/rsa/rsa_exptmod.c --- a/libtomcrypt/src/pk/rsa/rsa_exptmod.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/rsa/rsa_exptmod.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,41 +5,43 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file rsa_exptmod.c - RSA LTC_PKCS exptmod, Tom St Denis -*/ + RSA PKCS exptmod, Tom St Denis + Added RSA blinding --nmav +*/ #ifdef LTC_MRSA -/** - Compute an RSA modular exponentiation +/** + Compute an RSA modular exponentiation @param in The input data to send into RSA @param inlen The length of the input (octets) - @param out [out] The destination + @param out [out] The destination @param outlen [in/out] The max size and resulting size of the output @param which Which exponent to use, e.g. PK_PRIVATE or PK_PUBLIC - @param key The RSA key to use + @param key The RSA key to use @return CRYPT_OK if successful -*/ +*/ int rsa_exptmod(const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen, int which, rsa_key *key) { - void *tmp, *tmpa, *tmpb; + void *tmp, *tmpa, *tmpb; + #ifdef LTC_RSA_BLINDING + void *rnd, *rndi /* inverse of rnd */; + #endif unsigned long x; - int err; + int err, has_crt_parameters; LTC_ARGCHK(in != NULL); LTC_ARGCHK(out != NULL); LTC_ARGCHK(outlen != NULL); LTC_ARGCHK(key != NULL); - + /* is the key of the right type for the operation? */ if (which == PK_PRIVATE && (key->type != PK_PRIVATE)) { return CRYPT_PK_NOT_PRIVATE; @@ -51,8 +53,15 @@ } /* init and copy into tmp */ - if ((err = mp_init_multi(&tmp, &tmpa, &tmpb, NULL)) != CRYPT_OK) { return err; } - if ((err = mp_read_unsigned_bin(tmp, (unsigned char *)in, (int)inlen)) != CRYPT_OK) { goto error; } + if ((err = mp_init_multi(&tmp, &tmpa, &tmpb, +#ifdef LTC_RSA_BLINDING + &rnd, &rndi, +#endif /* LTC_RSA_BLINDING */ + NULL)) != CRYPT_OK) + { return err; } + if ((err = mp_read_unsigned_bin(tmp, (unsigned char *)in, (int)inlen)) != CRYPT_OK) + { goto error; } + /* sanity check on the input */ if (mp_cmp(key->N, tmp) == LTC_MP_LT) { @@ -62,19 +71,75 @@ /* are we using the private exponent and is the key optimized? */ if (which == PK_PRIVATE) { - /* tmpa = tmp^dP mod p */ - if ((err = mp_exptmod(tmp, key->dP, key->p, tmpa)) != CRYPT_OK) { goto error; } + #ifdef LTC_RSA_BLINDING + /* do blinding */ + err = mp_rand(rnd, mp_get_digit_count(key->N)); + if (err != CRYPT_OK) { + goto error; + } + + /* rndi = 1/rnd mod N */ + err = mp_invmod(rnd, key->N, rndi); + if (err != CRYPT_OK) { + goto error; + } - /* tmpb = tmp^dQ mod q */ - if ((err = mp_exptmod(tmp, key->dQ, key->q, tmpb)) != CRYPT_OK) { goto error; } + /* rnd = rnd^e */ + err = mp_exptmod( rnd, key->e, key->N, rnd); + if (err != CRYPT_OK) { + goto error; + } + + /* tmp = tmp*rnd mod N */ + err = mp_mulmod( tmp, rnd, key->N, tmp); + if (err != CRYPT_OK) { + goto error; + } + #endif /* LTC_RSA_BLINDING */ + + has_crt_parameters = (key->p != NULL) && (mp_get_digit_count(key->p) != 0) && + (key->q != NULL) && (mp_get_digit_count(key->q) != 0) && + (key->dP != NULL) && (mp_get_digit_count(key->dP) != 0) && + (key->dQ != NULL) && (mp_get_digit_count(key->dQ) != 0) && + (key->qP != NULL) && (mp_get_digit_count(key->qP) != 0); - /* tmp = (tmpa - tmpb) * qInv (mod p) */ - if ((err = mp_sub(tmpa, tmpb, tmp)) != CRYPT_OK) { goto error; } - if ((err = mp_mulmod(tmp, key->qP, key->p, tmp)) != CRYPT_OK) { goto error; } + if (!has_crt_parameters) { + /* + * In case CRT optimization parameters are not provided, + * the private key is directly used to exptmod it + */ + if ((err = mp_exptmod(tmp, key->d, key->N, tmp)) != CRYPT_OK) { goto error; } + } else { + /* tmpa = tmp^dP mod p */ + if ((err = mp_exptmod(tmp, key->dP, key->p, tmpa)) != CRYPT_OK) { goto error; } + + /* tmpb = tmp^dQ mod q */ + if ((err = mp_exptmod(tmp, key->dQ, key->q, tmpb)) != CRYPT_OK) { goto error; } + + /* tmp = (tmpa - tmpb) * qInv (mod p) */ + if ((err = mp_sub(tmpa, tmpb, tmp)) != CRYPT_OK) { goto error; } + if ((err = mp_mulmod(tmp, key->qP, key->p, tmp)) != CRYPT_OK) { goto error; } - /* tmp = tmpb + q * tmp */ - if ((err = mp_mul(tmp, key->q, tmp)) != CRYPT_OK) { goto error; } - if ((err = mp_add(tmp, tmpb, tmp)) != CRYPT_OK) { goto error; } + /* tmp = tmpb + q * tmp */ + if ((err = mp_mul(tmp, key->q, tmp)) != CRYPT_OK) { goto error; } + if ((err = mp_add(tmp, tmpb, tmp)) != CRYPT_OK) { goto error; } + } + + #ifdef LTC_RSA_BLINDING + /* unblind */ + err = mp_mulmod( tmp, rndi, key->N, tmp); + if (err != CRYPT_OK) { + goto error; + } + #endif + + #ifdef LTC_RSA_CRT_HARDENING + if (has_crt_parameters) { + if ((err = mp_exptmod(tmp, key->e, key->N, tmpa)) != CRYPT_OK) { goto error; } + if ((err = mp_read_unsigned_bin(tmpb, (unsigned char *)in, (int)inlen)) != CRYPT_OK) { goto error; } + if (mp_cmp(tmpa, tmpb) != LTC_MP_EQ) { err = CRYPT_ERROR; goto error; } + } + #endif } else { /* exptmod it */ if ((err = mp_exptmod(tmp, key->e, key->N, tmp)) != CRYPT_OK) { goto error; } @@ -102,12 +167,16 @@ /* clean up and return */ err = CRYPT_OK; error: - mp_clear_multi(tmp, tmpa, tmpb, NULL); + mp_clear_multi( +#ifdef LTC_RSA_BLINDING + rndi, rnd, +#endif /* LTC_RSA_BLINDING */ + tmpb, tmpa, tmp, NULL); return err; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/rsa/rsa_free.c --- a/libtomcrypt/src/pk/rsa/rsa_free.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/rsa/rsa_free.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,15 +5,13 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file rsa_free.c Free an RSA key, Tom St Denis -*/ +*/ #ifdef LTC_MRSA @@ -24,11 +22,11 @@ void rsa_free(rsa_key *key) { LTC_ARGCHKVD(key != NULL); - mp_clear_multi(key->e, key->d, key->N, key->dQ, key->dP, key->qP, key->p, key->q, NULL); + mp_cleanup_multi(&key->q, &key->p, &key->qP, &key->dP, &key->dQ, &key->N, &key->d, &key->e, NULL); } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/rsa/rsa_get_size.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/rsa/rsa_get_size.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,40 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file rsa_get_size.c + Retrieve the size of an RSA key, Steffen Jaeckel. +*/ + +#ifdef LTC_MRSA + +/** + Retrieve the size in bytes of an RSA key. + @param key The RSA key + @return The size in bytes of the RSA key or INT_MAX on error. +*/ +int rsa_get_size(rsa_key *key) +{ + int ret = INT_MAX; + LTC_ARGCHK(key != NULL); + + if (key) + { + ret = mp_unsigned_bin_size(key->N); + } /* if */ + + return ret; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/rsa/rsa_import.c --- a/libtomcrypt/src/pk/rsa/rsa_import.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/rsa/rsa_import.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,20 +5,18 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file rsa_import.c - Import a LTC_PKCS RSA key, Tom St Denis -*/ + Import a PKCS RSA key, Tom St Denis +*/ #ifdef LTC_MRSA /** - Import an RSAPublicKey or RSAPrivateKey [two-prime only, only support >= 1024-bit keys, defined in LTC_PKCS #1 v2.1] + Import an RSAPublicKey or RSAPrivateKey [two-prime only, only support >= 1024-bit keys, defined in PKCS #1 v2.1] @param in The packet to import from @param inlen It's length (octets) @param key [out] Destination for newly imported key @@ -28,87 +26,68 @@ { int err; void *zero; - unsigned char *tmpbuf; - unsigned long t, x, y, z, tmpoid[16]; - ltc_asn1_list ssl_pubkey_hashoid[2]; - ltc_asn1_list ssl_pubkey[2]; + unsigned char *tmpbuf=NULL; + unsigned long tmpbuf_len; LTC_ARGCHK(in != NULL); LTC_ARGCHK(key != NULL); LTC_ARGCHK(ltc_mp.name != NULL); /* init key */ - if ((err = mp_init_multi(&key->e, &key->d, &key->N, &key->dQ, + if ((err = mp_init_multi(&key->e, &key->d, &key->N, &key->dQ, &key->dP, &key->qP, &key->p, &key->q, NULL)) != CRYPT_OK) { return err; } /* see if the OpenSSL DER format RSA public key will work */ - tmpbuf = XCALLOC(1, MAX_RSA_SIZE*8); + tmpbuf_len = inlen; + tmpbuf = XCALLOC(1, tmpbuf_len); if (tmpbuf == NULL) { err = CRYPT_MEM; goto LBL_ERR; } - /* this includes the internal hash ID and optional params (NULL in this case) */ - LTC_SET_ASN1(ssl_pubkey_hashoid, 0, LTC_ASN1_OBJECT_IDENTIFIER, tmpoid, sizeof(tmpoid)/sizeof(tmpoid[0])); - LTC_SET_ASN1(ssl_pubkey_hashoid, 1, LTC_ASN1_NULL, NULL, 0); - - /* the actual format of the SSL DER key is odd, it stores a RSAPublicKey in a **BIT** string ... so we have to extract it - then proceed to convert bit to octet - */ - LTC_SET_ASN1(ssl_pubkey, 0, LTC_ASN1_SEQUENCE, &ssl_pubkey_hashoid, 2); - LTC_SET_ASN1(ssl_pubkey, 1, LTC_ASN1_BIT_STRING, tmpbuf, MAX_RSA_SIZE*8); + err = der_decode_subject_public_key_info(in, inlen, + PKA_RSA, tmpbuf, &tmpbuf_len, + LTC_ASN1_NULL, NULL, 0); - if (der_decode_sequence(in, inlen, - ssl_pubkey, 2UL) == CRYPT_OK) { - - /* ok now we have to reassemble the BIT STRING to an OCTET STRING. Thanks OpenSSL... */ - for (t = y = z = x = 0; x < ssl_pubkey[1].size; x++) { - y = (y << 1) | tmpbuf[x]; - if (++z == 8) { - tmpbuf[t++] = (unsigned char)y; - y = 0; - z = 0; - } - } + if (err == CRYPT_OK) { /* SubjectPublicKeyInfo format */ /* now it should be SEQUENCE { INTEGER, INTEGER } */ - if ((err = der_decode_sequence_multi(tmpbuf, t, - LTC_ASN1_INTEGER, 1UL, key->N, - LTC_ASN1_INTEGER, 1UL, key->e, + if ((err = der_decode_sequence_multi(tmpbuf, tmpbuf_len, + LTC_ASN1_INTEGER, 1UL, key->N, + LTC_ASN1_INTEGER, 1UL, key->e, LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { - XFREE(tmpbuf); goto LBL_ERR; } - XFREE(tmpbuf); key->type = PK_PUBLIC; - return CRYPT_OK; + err = CRYPT_OK; + goto LBL_FREE; } - XFREE(tmpbuf); - /* not SSL public key, try to match against LTC_PKCS #1 standards */ - if ((err = der_decode_sequence_multi(in, inlen, - LTC_ASN1_INTEGER, 1UL, key->N, - LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { + /* not SSL public key, try to match against PKCS #1 standards */ + err = der_decode_sequence_multi(in, inlen, LTC_ASN1_INTEGER, 1UL, key->N, + LTC_ASN1_EOL, 0UL, NULL); + + if (err != CRYPT_OK && err != CRYPT_INPUT_TOO_LONG) { goto LBL_ERR; } if (mp_cmp_d(key->N, 0) == LTC_MP_EQ) { - if ((err = mp_init(&zero)) != CRYPT_OK) { + if ((err = mp_init(&zero)) != CRYPT_OK) { goto LBL_ERR; } /* it's a private key */ - if ((err = der_decode_sequence_multi(in, inlen, - LTC_ASN1_INTEGER, 1UL, zero, - LTC_ASN1_INTEGER, 1UL, key->N, + if ((err = der_decode_sequence_multi(in, inlen, + LTC_ASN1_INTEGER, 1UL, zero, + LTC_ASN1_INTEGER, 1UL, key->N, LTC_ASN1_INTEGER, 1UL, key->e, - LTC_ASN1_INTEGER, 1UL, key->d, - LTC_ASN1_INTEGER, 1UL, key->p, - LTC_ASN1_INTEGER, 1UL, key->q, + LTC_ASN1_INTEGER, 1UL, key->d, + LTC_ASN1_INTEGER, 1UL, key->p, + LTC_ASN1_INTEGER, 1UL, key->q, LTC_ASN1_INTEGER, 1UL, key->dP, - LTC_ASN1_INTEGER, 1UL, key->dQ, - LTC_ASN1_INTEGER, 1UL, key->qP, + LTC_ASN1_INTEGER, 1UL, key->dQ, + LTC_ASN1_INTEGER, 1UL, key->qP, LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { mp_clear(zero); goto LBL_ERR; @@ -121,23 +100,30 @@ goto LBL_ERR; } else { /* it's a public key and we lack e */ - if ((err = der_decode_sequence_multi(in, inlen, - LTC_ASN1_INTEGER, 1UL, key->N, - LTC_ASN1_INTEGER, 1UL, key->e, + if ((err = der_decode_sequence_multi(in, inlen, + LTC_ASN1_INTEGER, 1UL, key->N, + LTC_ASN1_INTEGER, 1UL, key->e, LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { goto LBL_ERR; } key->type = PK_PUBLIC; } - return CRYPT_OK; + err = CRYPT_OK; + goto LBL_FREE; + LBL_ERR: mp_clear_multi(key->d, key->e, key->N, key->dQ, key->dP, key->qP, key->p, key->q, NULL); + +LBL_FREE: + if (tmpbuf != NULL) + XFREE(tmpbuf); + return err; } #endif /* LTC_MRSA */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/rsa/rsa_import_pkcs8.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/rsa/rsa_import_pkcs8.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,153 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file rsa_import_pkcs8.c + Import a PKCS RSA key +*/ + +#ifdef LTC_MRSA + +/* Public-Key Cryptography Standards (PKCS) #8: + * Private-Key Information Syntax Specification Version 1.2 + * https://tools.ietf.org/html/rfc5208 + * + * PrivateKeyInfo ::= SEQUENCE { + * version Version, + * privateKeyAlgorithm PrivateKeyAlgorithmIdentifier, + * privateKey PrivateKey, + * attributes [0] IMPLICIT Attributes OPTIONAL } + * where: + * - Version ::= INTEGER + * - PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier + * - PrivateKey ::= OCTET STRING + * - Attributes ::= SET OF Attribute + * + * EncryptedPrivateKeyInfo ::= SEQUENCE { + * encryptionAlgorithm EncryptionAlgorithmIdentifier, + * encryptedData EncryptedData } + * where: + * - EncryptionAlgorithmIdentifier ::= AlgorithmIdentifier + * - EncryptedData ::= OCTET STRING + */ + +/** + Import an RSAPublicKey or RSAPrivateKey in PKCS#8 format + @param in The packet to import from + @param inlen It's length (octets) + @param passwd The password for decrypting privkey (NOT SUPPORTED YET) + @param passwdlen Password's length (octets) + @param key [out] Destination for newly imported key + @return CRYPT_OK if successful, upon error allocated memory is freed +*/ +int rsa_import_pkcs8(const unsigned char *in, unsigned long inlen, + const void *passwd, unsigned long passwdlen, + rsa_key *key) +{ + int err; + void *zero, *iter; + unsigned char *buf1 = NULL, *buf2 = NULL; + unsigned long buf1len, buf2len; + unsigned long oid[16]; + oid_st rsaoid; + ltc_asn1_list alg_seq[2], top_seq[3]; + ltc_asn1_list alg_seq_e[2], key_seq_e[2], top_seq_e[2]; + unsigned char *decrypted = NULL; + unsigned long decryptedlen; + + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(ltc_mp.name != NULL); + + /* get RSA alg oid */ + err = pk_get_oid(PKA_RSA, &rsaoid); + if (err != CRYPT_OK) { goto LBL_NOFREE; } + + /* alloc buffers */ + buf1len = inlen; /* approx. */ + buf1 = XMALLOC(buf1len); + if (buf1 == NULL) { err = CRYPT_MEM; goto LBL_NOFREE; } + buf2len = inlen; /* approx. */ + buf2 = XMALLOC(buf2len); + if (buf2 == NULL) { err = CRYPT_MEM; goto LBL_FREE1; } + + /* init key */ + err = mp_init_multi(&key->e, &key->d, &key->N, &key->dQ, &key->dP, &key->qP, &key->p, &key->q, &zero, &iter, NULL); + if (err != CRYPT_OK) { goto LBL_FREE2; } + + /* try to decode encrypted priv key */ + LTC_SET_ASN1(key_seq_e, 0, LTC_ASN1_OCTET_STRING, buf1, buf1len); + LTC_SET_ASN1(key_seq_e, 1, LTC_ASN1_INTEGER, iter, 1UL); + LTC_SET_ASN1(alg_seq_e, 0, LTC_ASN1_OBJECT_IDENTIFIER, oid, 16UL); + LTC_SET_ASN1(alg_seq_e, 1, LTC_ASN1_SEQUENCE, key_seq_e, 2UL); + LTC_SET_ASN1(top_seq_e, 0, LTC_ASN1_SEQUENCE, alg_seq_e, 2UL); + LTC_SET_ASN1(top_seq_e, 1, LTC_ASN1_OCTET_STRING, buf2, buf2len); + err=der_decode_sequence(in, inlen, top_seq_e, 2UL); + if (err == CRYPT_OK) { + LTC_UNUSED_PARAM(passwd); + LTC_UNUSED_PARAM(passwdlen); + /* XXX: TODO encrypted pkcs8 not implemented yet */ + /* fprintf(stderr, "decrypt: iter=%ld salt.len=%ld encdata.len=%ld\n", mp_get_int(iter), key_seq_e[0].size, top_seq_e[1].size); */ + err = CRYPT_PK_INVALID_TYPE; + goto LBL_ERR; + } + else { + decrypted = (unsigned char *)in; + decryptedlen = inlen; + } + + /* try to decode unencrypted priv key */ + LTC_SET_ASN1(alg_seq, 0, LTC_ASN1_OBJECT_IDENTIFIER, oid, 16UL); + LTC_SET_ASN1(alg_seq, 1, LTC_ASN1_NULL, NULL, 0UL); + LTC_SET_ASN1(top_seq, 0, LTC_ASN1_INTEGER, zero, 1UL); + LTC_SET_ASN1(top_seq, 1, LTC_ASN1_SEQUENCE, alg_seq, 2UL); + LTC_SET_ASN1(top_seq, 2, LTC_ASN1_OCTET_STRING, buf1, buf1len); + err=der_decode_sequence(decrypted, decryptedlen, top_seq, 3UL); + if (err != CRYPT_OK) { goto LBL_ERR; } + + /* check alg oid */ + if ((alg_seq[0].size != rsaoid.OIDlen) || + XMEMCMP(rsaoid.OID, alg_seq[0].data, rsaoid.OIDlen * sizeof(rsaoid.OID[0]))) { + err = CRYPT_PK_INVALID_TYPE; + goto LBL_ERR; + } + + err = der_decode_sequence_multi(buf1, top_seq[2].size, + LTC_ASN1_INTEGER, 1UL, zero, + LTC_ASN1_INTEGER, 1UL, key->N, + LTC_ASN1_INTEGER, 1UL, key->e, + LTC_ASN1_INTEGER, 1UL, key->d, + LTC_ASN1_INTEGER, 1UL, key->p, + LTC_ASN1_INTEGER, 1UL, key->q, + LTC_ASN1_INTEGER, 1UL, key->dP, + LTC_ASN1_INTEGER, 1UL, key->dQ, + LTC_ASN1_INTEGER, 1UL, key->qP, + LTC_ASN1_EOL, 0UL, NULL); + if (err != CRYPT_OK) { goto LBL_ERR; } + key->type = PK_PRIVATE; + err = CRYPT_OK; + goto LBL_FREE2; + +LBL_ERR: + rsa_free(key); +LBL_FREE2: + mp_clear_multi(iter, zero, NULL); + XFREE(buf2); +LBL_FREE1: + XFREE(buf1); +LBL_NOFREE: + return err; +} + +#endif /* LTC_MRSA */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/rsa/rsa_import_x509.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/rsa/rsa_import_x509.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,118 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file rsa_import.c + Import an RSA key from a X.509 certificate, Steffen Jaeckel +*/ + +#ifdef LTC_MRSA + +/** + Import an RSA key from a X.509 certificate + @param in The packet to import from + @param inlen It's length (octets) + @param key [out] Destination for newly imported key + @return CRYPT_OK if successful, upon error allocated memory is freed +*/ +int rsa_import_x509(const unsigned char *in, unsigned long inlen, rsa_key *key) +{ + int err; + unsigned char *tmpbuf; + unsigned long tmpbuf_len, tmp_inlen; + ltc_asn1_list *decoded_list = NULL, *l; + + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(ltc_mp.name != NULL); + + /* init key */ + if ((err = mp_init_multi(&key->e, &key->d, &key->N, &key->dQ, + &key->dP, &key->qP, &key->p, &key->q, NULL)) != CRYPT_OK) { + return err; + } + + tmpbuf_len = inlen; + tmpbuf = XCALLOC(1, tmpbuf_len); + if (tmpbuf == NULL) { + err = CRYPT_MEM; + goto LBL_ERR; + } + + tmp_inlen = inlen; + if ((err = der_decode_sequence_flexi(in, &tmp_inlen, &decoded_list)) == CRYPT_OK) { + l = decoded_list; + /* Move 2 levels up in the tree + SEQUENCE + SEQUENCE + ... + */ + if (l->type == LTC_ASN1_SEQUENCE && l->child) { + l = l->child; + if (l->type == LTC_ASN1_SEQUENCE && l->child) { + l = l->child; + + err = CRYPT_ERROR; + + /* Move forward in the tree until we find this combination + ... + SEQUENCE + SEQUENCE + OBJECT IDENTIFIER 1.2.840.113549.1.1.1 + NULL + BIT STRING + */ + do { + /* The additional check for l->data is there to make sure + * we won't try to decode a list that has been 'shrunk' + */ + if (l->type == LTC_ASN1_SEQUENCE && l->data && l->child && + l->child->type == LTC_ASN1_SEQUENCE && l->child->child && + l->child->child->type == LTC_ASN1_OBJECT_IDENTIFIER && l->child->next && + l->child->next->type == LTC_ASN1_BIT_STRING) { + err = der_decode_subject_public_key_info(l->data, l->size, + PKA_RSA, tmpbuf, &tmpbuf_len, + LTC_ASN1_NULL, NULL, 0); + if (err == CRYPT_OK) { + /* now it should be SEQUENCE { INTEGER, INTEGER } */ + if ((err = der_decode_sequence_multi(tmpbuf, tmpbuf_len, + LTC_ASN1_INTEGER, 1UL, key->N, + LTC_ASN1_INTEGER, 1UL, key->e, + LTC_ASN1_EOL, 0UL, NULL)) != CRYPT_OK) { + goto LBL_ERR; + } + key->type = PK_PUBLIC; + err = CRYPT_OK; + goto LBL_FREE; + } + } + l = l->next; + } while(l); + } + } + } + + +LBL_ERR: + rsa_free(key); + +LBL_FREE: + if (decoded_list) der_free_sequence_flexi(decoded_list); + if (tmpbuf != NULL) XFREE(tmpbuf); + + return err; +} + +#endif /* LTC_MRSA */ + + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/rsa/rsa_make_key.c --- a/libtomcrypt/src/pk/rsa/rsa_make_key.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/rsa/rsa_make_key.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,19 +5,17 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file rsa_make_key.c RSA key generation, Tom St Denis -*/ +*/ #ifdef LTC_MRSA -/** +/** Create an RSA key @param prng An active PRNG state @param wprng The index of the PRNG desired @@ -33,10 +31,7 @@ LTC_ARGCHK(ltc_mp.name != NULL); LTC_ARGCHK(key != NULL); - - if ((size < (MIN_RSA_SIZE/8)) || (size > (MAX_RSA_SIZE/8))) { - return CRYPT_INVALID_KEYSIZE; - } + LTC_ARGCHK(size > 0); if ((e < 3) || ((e & 1) == 0)) { return CRYPT_INVALID_ARG; @@ -51,26 +46,26 @@ } /* make primes p and q (optimization provided by Wayne Scott) */ - if ((err = mp_set_int(tmp3, e)) != CRYPT_OK) { goto errkey; } /* tmp3 = e */ + if ((err = mp_set_int(tmp3, e)) != CRYPT_OK) { goto cleanup; } /* tmp3 = e */ /* make prime "p" */ do { - if ((err = rand_prime( p, size/2, prng, wprng)) != CRYPT_OK) { goto errkey; } - if ((err = mp_sub_d( p, 1, tmp1)) != CRYPT_OK) { goto errkey; } /* tmp1 = p-1 */ - if ((err = mp_gcd( tmp1, tmp3, tmp2)) != CRYPT_OK) { goto errkey; } /* tmp2 = gcd(p-1, e) */ + if ((err = rand_prime( p, size/2, prng, wprng)) != CRYPT_OK) { goto cleanup; } + if ((err = mp_sub_d( p, 1, tmp1)) != CRYPT_OK) { goto cleanup; } /* tmp1 = p-1 */ + if ((err = mp_gcd( tmp1, tmp3, tmp2)) != CRYPT_OK) { goto cleanup; } /* tmp2 = gcd(p-1, e) */ } while (mp_cmp_d( tmp2, 1) != 0); /* while e divides p-1 */ /* make prime "q" */ do { - if ((err = rand_prime( q, size/2, prng, wprng)) != CRYPT_OK) { goto errkey; } - if ((err = mp_sub_d( q, 1, tmp1)) != CRYPT_OK) { goto errkey; } /* tmp1 = q-1 */ - if ((err = mp_gcd( tmp1, tmp3, tmp2)) != CRYPT_OK) { goto errkey; } /* tmp2 = gcd(q-1, e) */ + if ((err = rand_prime( q, size/2, prng, wprng)) != CRYPT_OK) { goto cleanup; } + if ((err = mp_sub_d( q, 1, tmp1)) != CRYPT_OK) { goto cleanup; } /* tmp1 = q-1 */ + if ((err = mp_gcd( tmp1, tmp3, tmp2)) != CRYPT_OK) { goto cleanup; } /* tmp2 = gcd(q-1, e) */ } while (mp_cmp_d( tmp2, 1) != 0); /* while e divides q-1 */ /* tmp1 = lcm(p-1, q-1) */ - if ((err = mp_sub_d( p, 1, tmp2)) != CRYPT_OK) { goto errkey; } /* tmp2 = p-1 */ + if ((err = mp_sub_d( p, 1, tmp2)) != CRYPT_OK) { goto cleanup; } /* tmp2 = p-1 */ /* tmp1 = q-1 (previous do/while loop) */ - if ((err = mp_lcm( tmp1, tmp2, tmp1)) != CRYPT_OK) { goto errkey; } /* tmp1 = lcm(p-1, q-1) */ + if ((err = mp_lcm( tmp1, tmp2, tmp1)) != CRYPT_OK) { goto cleanup; } /* tmp1 = lcm(p-1, q-1) */ /* make key */ if ((err = mp_init_multi(&key->e, &key->d, &key->N, &key->dQ, &key->dP, &key->qP, &key->p, &key->q, NULL)) != CRYPT_OK) { @@ -99,14 +94,14 @@ err = CRYPT_OK; goto cleanup; errkey: - mp_clear_multi(key->d, key->e, key->N, key->dQ, key->dP, key->qP, key->p, key->q, NULL); + rsa_free(key); cleanup: - mp_clear_multi(tmp3, tmp2, tmp1, p, q, NULL); + mp_clear_multi(tmp3, tmp2, tmp1, q, p, NULL); return err; } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/rsa/rsa_set.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/rsa/rsa_set.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,134 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + + +#ifdef LTC_MRSA + +/** + Import RSA key from raw numbers + + @param N RSA's N + @param Nlen RSA's N's length + @param e RSA's e + @param elen RSA's e's length + @param d RSA's d (only private key, NULL for public key) + @param dlen RSA's d's length + @param key [out] the destination for the imported key + @return CRYPT_OK if successful +*/ +int rsa_set_key(const unsigned char *N, unsigned long Nlen, + const unsigned char *e, unsigned long elen, + const unsigned char *d, unsigned long dlen, + rsa_key *key) +{ + int err; + + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(N != NULL); + LTC_ARGCHK(e != NULL); + LTC_ARGCHK(ltc_mp.name != NULL); + + err = mp_init_multi(&key->e, &key->d, &key->N, &key->dQ, &key->dP, &key->qP, &key->p, &key->q, NULL); + if (err != CRYPT_OK) return err; + + if ((err = mp_read_unsigned_bin(key->N , (unsigned char *)N , Nlen)) != CRYPT_OK) { goto LBL_ERR; } + if ((err = mp_read_unsigned_bin(key->e , (unsigned char *)e , elen)) != CRYPT_OK) { goto LBL_ERR; } + if (d && dlen) { + if ((err = mp_read_unsigned_bin(key->d , (unsigned char *)d , dlen)) != CRYPT_OK) { goto LBL_ERR; } + key->type = PK_PRIVATE; + } + else { + key->type = PK_PUBLIC; + } + return CRYPT_OK; + +LBL_ERR: + rsa_free(key); + return err; +} + +/** + Import factors of an RSA key from raw numbers + + Only for private keys. + + @param p RSA's p + @param plen RSA's p's length + @param q RSA's q + @param qlen RSA's q's length + @param key [out] the destination for the imported key + @return CRYPT_OK if successful +*/ +int rsa_set_factors(const unsigned char *p, unsigned long plen, + const unsigned char *q, unsigned long qlen, + rsa_key *key) +{ + int err; + + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(p != NULL); + LTC_ARGCHK(q != NULL); + LTC_ARGCHK(ltc_mp.name != NULL); + + if (key->type != PK_PRIVATE) return CRYPT_PK_TYPE_MISMATCH; + + if ((err = mp_read_unsigned_bin(key->p , (unsigned char *)p , plen)) != CRYPT_OK) { goto LBL_ERR; } + if ((err = mp_read_unsigned_bin(key->q , (unsigned char *)q , qlen)) != CRYPT_OK) { goto LBL_ERR; } + return CRYPT_OK; + +LBL_ERR: + rsa_free(key); + return err; +} + +/** + Import CRT parameters of an RSA key from raw numbers + + Only for private keys. + + @param dP RSA's dP + @param dPlen RSA's dP's length + @param dQ RSA's dQ + @param dQlen RSA's dQ's length + @param qP RSA's qP + @param qPlen RSA's qP's length + @param key [out] the destination for the imported key + @return CRYPT_OK if successful +*/ +int rsa_set_crt_params(const unsigned char *dP, unsigned long dPlen, + const unsigned char *dQ, unsigned long dQlen, + const unsigned char *qP, unsigned long qPlen, + rsa_key *key) +{ + int err; + + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(dP != NULL); + LTC_ARGCHK(dQ != NULL); + LTC_ARGCHK(qP != NULL); + LTC_ARGCHK(ltc_mp.name != NULL); + + if (key->type != PK_PRIVATE) return CRYPT_PK_TYPE_MISMATCH; + + if ((err = mp_read_unsigned_bin(key->dP, (unsigned char *)dP, dPlen)) != CRYPT_OK) { goto LBL_ERR; } + if ((err = mp_read_unsigned_bin(key->dQ, (unsigned char *)dQ, dQlen)) != CRYPT_OK) { goto LBL_ERR; } + if ((err = mp_read_unsigned_bin(key->qP, (unsigned char *)qP, qPlen)) != CRYPT_OK) { goto LBL_ERR; } + return CRYPT_OK; + +LBL_ERR: + rsa_free(key); + return err; +} + +#endif /* LTC_MRSA */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/rsa/rsa_sign_hash.c --- a/libtomcrypt/src/pk/rsa/rsa_sign_hash.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/rsa/rsa_sign_hash.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,25 +5,23 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file rsa_sign_hash.c - RSA LTC_PKCS #1 v1.5 and v2 PSS sign hash, Tom St Denis and Andreas Lange + RSA PKCS #1 v1.5 and v2 PSS sign hash, Tom St Denis and Andreas Lange */ #ifdef LTC_MRSA /** - LTC_PKCS #1 pad then sign + PKCS #1 pad then sign @param in The hash to sign @param inlen The length of the hash to sign (octets) @param out [out] The signature @param outlen [in/out] The max size and resulting size of the signature - @param padding Type of padding (LTC_LTC_PKCS_1_PSS or LTC_LTC_PKCS_1_V1_5) + @param padding Type of padding (LTC_PKCS_1_PSS, LTC_PKCS_1_V1_5 or LTC_PKCS_1_V1_5_NA1) @param prng An active PRNG state @param prng_idx The index of the PRNG desired @param hash_idx The index of the hash desired @@ -47,15 +45,21 @@ LTC_ARGCHK(key != NULL); /* valid padding? */ - if ((padding != LTC_LTC_PKCS_1_V1_5) && (padding != LTC_LTC_PKCS_1_PSS)) { + if ((padding != LTC_PKCS_1_V1_5) && + (padding != LTC_PKCS_1_PSS) && + (padding != LTC_PKCS_1_V1_5_NA1)) { return CRYPT_PK_INVALID_PADDING; } - if (padding == LTC_LTC_PKCS_1_PSS) { - /* valid prng and hash ? */ + if (padding == LTC_PKCS_1_PSS) { + /* valid prng ? */ if ((err = prng_is_valid(prng_idx)) != CRYPT_OK) { return err; } + } + + if (padding != LTC_PKCS_1_V1_5_NA1) { + /* valid hash ? */ if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) { return err; } @@ -71,7 +75,7 @@ return CRYPT_BUFFER_OVERFLOW; } - if (padding == LTC_LTC_PKCS_1_PSS) { + if (padding == LTC_PKCS_1_PSS) { /* PSS pad the key */ x = *outlen; if ((err = pkcs_1_pss_encode(in, inlen, saltlen, prng, prng_idx, @@ -79,48 +83,56 @@ return err; } } else { - /* LTC_PKCS #1 v1.5 pad the hash */ + /* PKCS #1 v1.5 pad the hash */ unsigned char *tmpin; - ltc_asn1_list digestinfo[2], siginfo[2]; - /* not all hashes have OIDs... so sad */ - if (hash_descriptor[hash_idx].OIDlen == 0) { - return CRYPT_INVALID_ARG; - } - - /* construct the SEQUENCE - SEQUENCE { - SEQUENCE {hashoid OID - blah NULL - } - hash OCTET STRING + if (padding == LTC_PKCS_1_V1_5) { + ltc_asn1_list digestinfo[2], siginfo[2]; + /* not all hashes have OIDs... so sad */ + if (hash_descriptor[hash_idx].OIDlen == 0) { + return CRYPT_INVALID_ARG; } - */ - LTC_SET_ASN1(digestinfo, 0, LTC_ASN1_OBJECT_IDENTIFIER, hash_descriptor[hash_idx].OID, hash_descriptor[hash_idx].OIDlen); - LTC_SET_ASN1(digestinfo, 1, LTC_ASN1_NULL, NULL, 0); - LTC_SET_ASN1(siginfo, 0, LTC_ASN1_SEQUENCE, digestinfo, 2); - LTC_SET_ASN1(siginfo, 1, LTC_ASN1_OCTET_STRING, in, inlen); + + /* construct the SEQUENCE + SEQUENCE { + SEQUENCE {hashoid OID + blah NULL + } + hash OCTET STRING + } + */ + LTC_SET_ASN1(digestinfo, 0, LTC_ASN1_OBJECT_IDENTIFIER, hash_descriptor[hash_idx].OID, hash_descriptor[hash_idx].OIDlen); + LTC_SET_ASN1(digestinfo, 1, LTC_ASN1_NULL, NULL, 0); + LTC_SET_ASN1(siginfo, 0, LTC_ASN1_SEQUENCE, digestinfo, 2); + LTC_SET_ASN1(siginfo, 1, LTC_ASN1_OCTET_STRING, in, inlen); - /* allocate memory for the encoding */ - y = mp_unsigned_bin_size(key->N); - tmpin = XMALLOC(y); - if (tmpin == NULL) { - return CRYPT_MEM; - } + /* allocate memory for the encoding */ + y = mp_unsigned_bin_size(key->N); + tmpin = XMALLOC(y); + if (tmpin == NULL) { + return CRYPT_MEM; + } - if ((err = der_encode_sequence(siginfo, 2, tmpin, &y)) != CRYPT_OK) { - XFREE(tmpin); - return err; + if ((err = der_encode_sequence(siginfo, 2, tmpin, &y)) != CRYPT_OK) { + XFREE(tmpin); + return err; + } + } else { + /* set the pointer and data-length to the input values */ + tmpin = (unsigned char *)in; + y = inlen; } x = *outlen; - if ((err = pkcs_1_v1_5_encode(tmpin, y, LTC_LTC_PKCS_1_EMSA, - modulus_bitlen, NULL, 0, - out, &x)) != CRYPT_OK) { + err = pkcs_1_v1_5_encode(tmpin, y, LTC_PKCS_1_EMSA, modulus_bitlen, NULL, 0, out, &x); + + if (padding == LTC_PKCS_1_V1_5) { XFREE(tmpin); + } + + if (err != CRYPT_OK) { return err; } - XFREE(tmpin); } /* RSA encode it */ @@ -129,6 +141,6 @@ #endif /* LTC_MRSA */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/rsa/rsa_sign_saltlen_get.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/pk/rsa/rsa_sign_saltlen_get.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,47 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file rsa_sign_saltlen_get.c + Retrieve the maximum size of the salt, Steffen Jaeckel. +*/ + +#ifdef LTC_MRSA + +/** + Retrieve the maximum possible size of the salt when creating a PKCS#1 PSS signature. + @param padding Type of padding (LTC_PKCS_1_PSS only) + @param hash_idx The index of the desired hash + @param key The RSA key + @return The maximum salt length in bytes or INT_MAX on error. +*/ +int rsa_sign_saltlen_get_max_ex(int padding, int hash_idx, rsa_key *key) +{ + int ret = INT_MAX; + LTC_ARGCHK(key != NULL); + + if ((hash_is_valid(hash_idx) == CRYPT_OK) && + (padding == LTC_PKCS_1_PSS)) + { + ret = rsa_get_size(key); + if (ret < INT_MAX) + { + ret -= (hash_descriptor[hash_idx].hashsize + 2); + } /* if */ + } /* if */ + + return ret; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/pk/rsa/rsa_verify_hash.c --- a/libtomcrypt/src/pk/rsa/rsa_verify_hash.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/pk/rsa/rsa_verify_hash.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,25 +5,23 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file rsa_verify_hash.c - RSA LTC_PKCS #1 v1.5 or v2 PSS signature verification, Tom St Denis and Andreas Lange + RSA PKCS #1 v1.5 or v2 PSS signature verification, Tom St Denis and Andreas Lange */ #ifdef LTC_MRSA /** - LTC_PKCS #1 de-sign then v1.5 or PSS depad + PKCS #1 de-sign then v1.5 or PSS depad @param sig The signature data @param siglen The length of the signature data (octets) @param hash The hash of the message that was signed @param hashlen The length of the hash of the message that was signed (octets) - @param padding Type of padding (LTC_LTC_PKCS_1_PSS or LTC_LTC_PKCS_1_V1_5) + @param padding Type of padding (LTC_PKCS_1_PSS, LTC_PKCS_1_V1_5 or LTC_PKCS_1_V1_5_NA1) @param hash_idx The index of the desired hash @param saltlen The length of the salt used during signature @param stat [out] The result of the signature comparison, 1==valid, 0==invalid @@ -50,12 +48,13 @@ /* valid padding? */ - if ((padding != LTC_LTC_PKCS_1_V1_5) && - (padding != LTC_LTC_PKCS_1_PSS)) { + if ((padding != LTC_PKCS_1_V1_5) && + (padding != LTC_PKCS_1_PSS) && + (padding != LTC_PKCS_1_V1_5_NA1)) { return CRYPT_PK_INVALID_PADDING; } - if (padding == LTC_LTC_PKCS_1_PSS) { + if (padding != LTC_PKCS_1_V1_5_NA1) { /* valid hash ? */ if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) { return err; @@ -90,21 +89,21 @@ return CRYPT_INVALID_PACKET; } - if (padding == LTC_LTC_PKCS_1_PSS) { + if (padding == LTC_PKCS_1_PSS) { /* PSS decode and verify it */ - err = pkcs_1_pss_decode(hash, hashlen, tmpbuf, x, saltlen, hash_idx, modulus_bitlen, stat); + + if(modulus_bitlen%8 == 1){ + err = pkcs_1_pss_decode(hash, hashlen, tmpbuf+1, x-1, saltlen, hash_idx, modulus_bitlen, stat); + } + else{ + err = pkcs_1_pss_decode(hash, hashlen, tmpbuf, x, saltlen, hash_idx, modulus_bitlen, stat); + } + } else { - /* LTC_PKCS #1 v1.5 decode it */ + /* PKCS #1 v1.5 decode it */ unsigned char *out; - unsigned long outlen, loid[16]; + unsigned long outlen; int decoded; - ltc_asn1_list digestinfo[2], siginfo[2]; - - /* not all hashes have OIDs... so sad */ - if (hash_descriptor[hash_idx].OIDlen == 0) { - err = CRYPT_INVALID_ARG; - goto bail_2; - } /* allocate temp buffer for decoded hash */ outlen = ((modulus_bitlen >> 3) + (modulus_bitlen & 7 ? 1 : 0)) - 3; @@ -114,36 +113,63 @@ goto bail_2; } - if ((err = pkcs_1_v1_5_decode(tmpbuf, x, LTC_LTC_PKCS_1_EMSA, modulus_bitlen, out, &outlen, &decoded)) != CRYPT_OK) { - XFREE(out); + if ((err = pkcs_1_v1_5_decode(tmpbuf, x, LTC_PKCS_1_EMSA, modulus_bitlen, out, &outlen, &decoded)) != CRYPT_OK) { + XFREE(out); goto bail_2; } - /* now we must decode out[0...outlen-1] using ASN.1, test the OID and then test the hash */ - /* construct the SEQUENCE - SEQUENCE { - SEQUENCE {hashoid OID - blah NULL - } - hash OCTET STRING + if (padding == LTC_PKCS_1_V1_5) { + unsigned long loid[16], reallen; + ltc_asn1_list digestinfo[2], siginfo[2]; + + /* not all hashes have OIDs... so sad */ + if (hash_descriptor[hash_idx].OIDlen == 0) { + err = CRYPT_INVALID_ARG; + goto bail_2; } - */ - LTC_SET_ASN1(digestinfo, 0, LTC_ASN1_OBJECT_IDENTIFIER, loid, sizeof(loid)/sizeof(loid[0])); - LTC_SET_ASN1(digestinfo, 1, LTC_ASN1_NULL, NULL, 0); - LTC_SET_ASN1(siginfo, 0, LTC_ASN1_SEQUENCE, digestinfo, 2); - LTC_SET_ASN1(siginfo, 1, LTC_ASN1_OCTET_STRING, tmpbuf, siglen); - - if ((err = der_decode_sequence(out, outlen, siginfo, 2)) != CRYPT_OK) { - XFREE(out); - goto bail_2; - } + + /* now we must decode out[0...outlen-1] using ASN.1, test the OID and then test the hash */ + /* construct the SEQUENCE + SEQUENCE { + SEQUENCE {hashoid OID + blah NULL + } + hash OCTET STRING + } + */ + LTC_SET_ASN1(digestinfo, 0, LTC_ASN1_OBJECT_IDENTIFIER, loid, sizeof(loid)/sizeof(loid[0])); + LTC_SET_ASN1(digestinfo, 1, LTC_ASN1_NULL, NULL, 0); + LTC_SET_ASN1(siginfo, 0, LTC_ASN1_SEQUENCE, digestinfo, 2); + LTC_SET_ASN1(siginfo, 1, LTC_ASN1_OCTET_STRING, tmpbuf, siglen); - /* test OID */ - if ((digestinfo[0].size == hash_descriptor[hash_idx].OIDlen) && + if ((err = der_decode_sequence(out, outlen, siginfo, 2)) != CRYPT_OK) { + /* fallback to Legacy:missing NULL */ + LTC_SET_ASN1(siginfo, 0, LTC_ASN1_SEQUENCE, digestinfo, 1); + if ((err = der_decode_sequence(out, outlen, siginfo, 2)) != CRYPT_OK) { + XFREE(out); + goto bail_2; + } + } + + if ((err = der_length_sequence(siginfo, 2, &reallen)) != CRYPT_OK) { + XFREE(out); + goto bail_2; + } + + /* test OID */ + if ((reallen == outlen) && + (digestinfo[0].size == hash_descriptor[hash_idx].OIDlen) && (XMEMCMP(digestinfo[0].data, hash_descriptor[hash_idx].OID, sizeof(unsigned long) * hash_descriptor[hash_idx].OIDlen) == 0) && - (siginfo[1].size == hashlen) && + (siginfo[1].size == hashlen) && (XMEMCMP(siginfo[1].data, hash, hashlen) == 0)) { - *stat = 1; + *stat = 1; + } + } else { + /* only check if the hash is equal */ + if ((hashlen == outlen) && + (XMEMCMP(out, hash, hashlen) == 0)) { + *stat = 1; + } } #ifdef LTC_CLEAN_STACK @@ -162,6 +188,6 @@ #endif /* LTC_MRSA */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/prngs/chacha20.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/prngs/chacha20.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,247 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + + /* the idea of re-keying loosely follows the approach used in: + * http://bxr.su/OpenBSD/lib/libc/crypt/arc4random.c + */ + +#include "tomcrypt.h" + +#ifdef LTC_CHACHA20_PRNG + +const struct ltc_prng_descriptor chacha20_prng_desc = +{ + "chacha20", + 40, + &chacha20_prng_start, + &chacha20_prng_add_entropy, + &chacha20_prng_ready, + &chacha20_prng_read, + &chacha20_prng_done, + &chacha20_prng_export, + &chacha20_prng_import, + &chacha20_prng_test +}; + +/** + Start the PRNG + @param prng The PRNG state to initialize + @return CRYPT_OK if successful +*/ +int chacha20_prng_start(prng_state *prng) +{ + LTC_ARGCHK(prng != NULL); + prng->ready = 0; + XMEMSET(&prng->chacha.ent, 0, sizeof(prng->chacha.ent)); + prng->chacha.idx = 0; + LTC_MUTEX_INIT(&prng->lock) + return CRYPT_OK; +} + +/** + Add entropy to the PRNG state + @param in The data to add + @param inlen Length of the data to add + @param prng PRNG state to update + @return CRYPT_OK if successful +*/ +int chacha20_prng_add_entropy(const unsigned char *in, unsigned long inlen, prng_state *prng) +{ + unsigned char buf[40]; + unsigned long i; + int err; + + LTC_ARGCHK(prng != NULL); + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(inlen > 0); + + LTC_MUTEX_LOCK(&prng->lock); + if (prng->ready) { + /* chacha20_prng_ready() was already called, do "rekey" operation */ + if ((err = chacha_keystream(&prng->chacha.s, buf, sizeof(buf))) != CRYPT_OK) goto LBL_UNLOCK; + for(i = 0; i < inlen; i++) buf[i % sizeof(buf)] ^= in[i]; + /* key 32 bytes, 20 rounds */ + if ((err = chacha_setup(&prng->chacha.s, buf, 32, 20)) != CRYPT_OK) goto LBL_UNLOCK; + /* iv 8 bytes */ + if ((err = chacha_ivctr64(&prng->chacha.s, buf + 32, 8, 0)) != CRYPT_OK) goto LBL_UNLOCK; + /* clear KEY + IV */ + zeromem(buf, sizeof(buf)); + } + else { + /* chacha20_prng_ready() was not called yet, add entropy to ent buffer */ + while (inlen--) prng->chacha.ent[prng->chacha.idx++ % sizeof(prng->chacha.ent)] ^= *in++; + } + err = CRYPT_OK; +LBL_UNLOCK: + LTC_MUTEX_UNLOCK(&prng->lock); + return err; +} + +/** + Make the PRNG ready to read from + @param prng The PRNG to make active + @return CRYPT_OK if successful +*/ +int chacha20_prng_ready(prng_state *prng) +{ + int err; + + LTC_ARGCHK(prng != NULL); + + LTC_MUTEX_LOCK(&prng->lock); + if (prng->ready) { err = CRYPT_OK; goto LBL_UNLOCK; } + /* key 32 bytes, 20 rounds */ + if ((err = chacha_setup(&prng->chacha.s, prng->chacha.ent, 32, 20)) != CRYPT_OK) goto LBL_UNLOCK; + /* iv 8 bytes */ + if ((err = chacha_ivctr64(&prng->chacha.s, prng->chacha.ent + 32, 8, 0)) != CRYPT_OK) goto LBL_UNLOCK; + XMEMSET(&prng->chacha.ent, 0, sizeof(prng->chacha.ent)); + prng->chacha.idx = 0; + prng->ready = 1; +LBL_UNLOCK: + LTC_MUTEX_UNLOCK(&prng->lock); + return err; +} + +/** + Read from the PRNG + @param out Destination + @param outlen Length of output + @param prng The active PRNG to read from + @return Number of octets read +*/ +unsigned long chacha20_prng_read(unsigned char *out, unsigned long outlen, prng_state *prng) +{ + if (outlen == 0 || prng == NULL || out == NULL) return 0; + LTC_MUTEX_LOCK(&prng->lock); + if (!prng->ready) { outlen = 0; goto LBL_UNLOCK; } + if (chacha_keystream(&prng->chacha.s, out, outlen) != CRYPT_OK) outlen = 0; +LBL_UNLOCK: + LTC_MUTEX_UNLOCK(&prng->lock); + return outlen; +} + +/** + Terminate the PRNG + @param prng The PRNG to terminate + @return CRYPT_OK if successful +*/ +int chacha20_prng_done(prng_state *prng) +{ + int err; + LTC_ARGCHK(prng != NULL); + LTC_MUTEX_LOCK(&prng->lock); + prng->ready = 0; + err = chacha_done(&prng->chacha.s); + LTC_MUTEX_UNLOCK(&prng->lock); + LTC_MUTEX_DESTROY(&prng->lock); + return err; +} + +/** + Export the PRNG state + @param out [out] Destination + @param outlen [in/out] Max size and resulting size of the state + @param prng The PRNG to export + @return CRYPT_OK if successful +*/ +int chacha20_prng_export(unsigned char *out, unsigned long *outlen, prng_state *prng) +{ + unsigned long len = chacha20_prng_desc.export_size; + + LTC_ARGCHK(prng != NULL); + LTC_ARGCHK(out != NULL); + LTC_ARGCHK(outlen != NULL); + + if (*outlen < len) { + *outlen = len; + return CRYPT_BUFFER_OVERFLOW; + } + + if (chacha20_prng_read(out, len, prng) != len) { + return CRYPT_ERROR_READPRNG; + } + + *outlen = len; + return CRYPT_OK; +} + +/** + Import a PRNG state + @param in The PRNG state + @param inlen Size of the state + @param prng The PRNG to import + @return CRYPT_OK if successful +*/ +int chacha20_prng_import(const unsigned char *in, unsigned long inlen, prng_state *prng) +{ + int err; + + LTC_ARGCHK(prng != NULL); + LTC_ARGCHK(in != NULL); + if (inlen < (unsigned long)chacha20_prng_desc.export_size) return CRYPT_INVALID_ARG; + + if ((err = chacha20_prng_start(prng)) != CRYPT_OK) return err; + if ((err = chacha20_prng_add_entropy(in, inlen, prng)) != CRYPT_OK) return err; + return CRYPT_OK; +} + +/** + PRNG self-test + @return CRYPT_OK if successful, CRYPT_NOP if self-testing has been disabled +*/ +int chacha20_prng_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + prng_state st; + unsigned char en[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, + 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, + 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, + 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32 }; + unsigned char dmp[300]; + unsigned long dmplen = sizeof(dmp); + unsigned char out[500]; + unsigned char t1[] = { 0x59, 0xB2, 0x26, 0x95, 0x2B, 0x01, 0x8F, 0x05, 0xBE, 0xD8 }; + unsigned char t2[] = { 0x47, 0xC9, 0x0D, 0x03, 0xE4, 0x75, 0x34, 0x27, 0xBD, 0xDE }; + unsigned char t3[] = { 0xBC, 0xFA, 0xEF, 0x59, 0x37, 0x7F, 0x1A, 0x91, 0x1A, 0xA6 }; + int err; + + if ((err = chacha20_prng_start(&st)) != CRYPT_OK) return err; + /* add entropy to uninitialized prng */ + if ((err = chacha20_prng_add_entropy(en, sizeof(en), &st)) != CRYPT_OK) return err; + if ((err = chacha20_prng_ready(&st)) != CRYPT_OK) return err; + if (chacha20_prng_read(out, 10, &st) != 10) return CRYPT_ERROR_READPRNG; /* 10 bytes for testing */ + if (compare_testvector(out, 10, t1, sizeof(t1), "CHACHA-PRNG", 1)) return CRYPT_FAIL_TESTVECTOR; + if (chacha20_prng_read(out, 500, &st) != 500) return CRYPT_ERROR_READPRNG; /* skip 500 bytes */ + /* add entropy to already initialized prng */ + if ((err = chacha20_prng_add_entropy(en, sizeof(en), &st)) != CRYPT_OK) return err; + if (chacha20_prng_read(out, 500, &st) != 500) return CRYPT_ERROR_READPRNG; /* skip 500 bytes */ + if ((err = chacha20_prng_export(dmp, &dmplen, &st)) != CRYPT_OK) return err; + if (chacha20_prng_read(out, 500, &st) != 500) return CRYPT_ERROR_READPRNG; /* skip 500 bytes */ + if (chacha20_prng_read(out, 10, &st) != 10) return CRYPT_ERROR_READPRNG; /* 10 bytes for testing */ + if (compare_testvector(out, 10, t2, sizeof(t2), "CHACHA-PRNG", 2)) return CRYPT_FAIL_TESTVECTOR; + if ((err = chacha20_prng_done(&st)) != CRYPT_OK) return err; + if ((err = chacha20_prng_import(dmp, dmplen, &st)) != CRYPT_OK) return err; + if ((err = chacha20_prng_ready(&st)) != CRYPT_OK) return err; + if (chacha20_prng_read(out, 500, &st) != 500) return CRYPT_ERROR_READPRNG; /* skip 500 bytes */ + if (chacha20_prng_read(out, 10, &st) != 10) return CRYPT_ERROR_READPRNG; /* 10 bytes for testing */ + if (compare_testvector(out, 10, t3, sizeof(t3), "CHACHA-PRNG", 3)) return CRYPT_FAIL_TESTVECTOR; + if ((err = chacha20_prng_done(&st)) != CRYPT_OK) return err; + + return CRYPT_OK; +#endif +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/prngs/fortuna.c --- a/libtomcrypt/src/prngs/fortuna.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/prngs/fortuna.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -14,14 +12,14 @@ @file fortuna.c Fortuna PRNG, Tom St Denis */ - -/* Implementation of Fortuna by Tom St Denis + +/* Implementation of Fortuna by Tom St Denis We deviate slightly here for reasons of simplicity [and to fit in the API]. First all "sources" -in the AddEntropy function are fixed to 0. Second since no reliable timer is provided +in the AddEntropy function are fixed to 0. Second since no reliable timer is provided we reseed automatically when len(pool0) >= 64 or every LTC_FORTUNA_WD calls to the read function */ -#ifdef LTC_FORTUNA +#ifdef LTC_FORTUNA /* requries LTC_SHA256 and AES */ #if !(defined(LTC_RIJNDAEL) && defined(LTC_SHA256)) @@ -38,7 +36,8 @@ #endif const struct ltc_prng_descriptor fortuna_desc = { - "fortuna", 1024, + "fortuna", + (32 * LTC_FORTUNA_POOLS), /* default: 1024 */ &fortuna_start, &fortuna_add_entropy, &fortuna_ready, @@ -50,7 +49,7 @@ }; /* update the IV */ -static void fortuna_update_iv(prng_state *prng) +static void _fortuna_update_iv(prng_state *prng) { int x; unsigned char *IV; @@ -63,7 +62,7 @@ } /* reseed the PRNG */ -static int fortuna_reseed(prng_state *prng) +static int _fortuna_reseed(prng_state *prng) { unsigned char tmp[MAXBLOCKSIZE]; hash_state md; @@ -79,11 +78,11 @@ } for (x = 0; x < LTC_FORTUNA_POOLS; x++) { - if (x == 0 || ((prng->fortuna.reset_cnt >> (x-1)) & 1) == 0) { + if (x == 0 || ((prng->fortuna.reset_cnt >> (x-1)) & 1) == 0) { /* terminate this hash */ if ((err = sha256_done(&prng->fortuna.pool[x], tmp)) != CRYPT_OK) { sha256_done(&md, tmp); - return err; + return err; } /* add it to the string */ if ((err = sha256_process(&md, tmp, 32)) != CRYPT_OK) { @@ -102,12 +101,12 @@ /* finish key */ if ((err = sha256_done(&md, prng->fortuna.K)) != CRYPT_OK) { - return err; + return err; } if ((err = rijndael_setup(prng->fortuna.K, 32, 0, &prng->fortuna.skey)) != CRYPT_OK) { return err; } - fortuna_update_iv(prng); + _fortuna_update_iv(prng); /* reset pool len */ prng->fortuna.pool0_len = 0; @@ -126,14 +125,15 @@ Start the PRNG @param prng [out] The PRNG state to initialize @return CRYPT_OK if successful -*/ +*/ int fortuna_start(prng_state *prng) { int err, x, y; unsigned char tmp[MAXBLOCKSIZE]; LTC_ARGCHK(prng != NULL); - + prng->ready = 0; + /* initialize the pools */ for (x = 0; x < LTC_FORTUNA_POOLS; x++) { if ((err = sha256_init(&prng->fortuna.pool[x])) != CRYPT_OK) { @@ -155,9 +155,9 @@ return err; } zeromem(prng->fortuna.IV, 16); - - LTC_MUTEX_INIT(&prng->fortuna.prng_lock) - + + LTC_MUTEX_INIT(&prng->lock) + return CRYPT_OK; } @@ -167,33 +167,31 @@ @param inlen Length of the data to add @param prng PRNG state to update @return CRYPT_OK if successful -*/ +*/ int fortuna_add_entropy(const unsigned char *in, unsigned long inlen, prng_state *prng) { unsigned char tmp[2]; int err; - LTC_ARGCHK(in != NULL); LTC_ARGCHK(prng != NULL); - - LTC_MUTEX_LOCK(&prng->fortuna.prng_lock); + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(inlen > 0); /* ensure inlen <= 32 */ if (inlen > 32) { - LTC_MUTEX_UNLOCK(&prng->fortuna.prng_lock); - return CRYPT_INVALID_ARG; + inlen = 32; } /* add s || length(in) || in to pool[pool_idx] */ tmp[0] = 0; tmp[1] = (unsigned char)inlen; + + LTC_MUTEX_LOCK(&prng->lock); if ((err = sha256_process(&prng->fortuna.pool[prng->fortuna.pool_idx], tmp, 2)) != CRYPT_OK) { - LTC_MUTEX_UNLOCK(&prng->fortuna.prng_lock); - return err; + goto LBL_UNLOCK; } if ((err = sha256_process(&prng->fortuna.pool[prng->fortuna.pool_idx], in, inlen)) != CRYPT_OK) { - LTC_MUTEX_UNLOCK(&prng->fortuna.prng_lock); - return err; + goto LBL_UNLOCK; } if (prng->fortuna.pool_idx == 0) { prng->fortuna.pool0_len += inlen; @@ -201,19 +199,29 @@ if (++(prng->fortuna.pool_idx) == LTC_FORTUNA_POOLS) { prng->fortuna.pool_idx = 0; } + err = CRYPT_OK; /* success */ - LTC_MUTEX_UNLOCK(&prng->fortuna.prng_lock); - return CRYPT_OK; +LBL_UNLOCK: + LTC_MUTEX_UNLOCK(&prng->lock); + return err; } /** Make the PRNG ready to read from @param prng The PRNG to make active @return CRYPT_OK if successful -*/ +*/ int fortuna_ready(prng_state *prng) { - return fortuna_reseed(prng); + int err; + LTC_ARGCHK(prng != NULL); + + LTC_MUTEX_LOCK(&prng->lock); + err = _fortuna_reseed(prng); + prng->ready = (err == CRYPT_OK) ? 1 : 0; + + LTC_MUTEX_UNLOCK(&prng->lock); + return err; } /** @@ -222,23 +230,24 @@ @param outlen Length of output @param prng The active PRNG to read from @return Number of octets read -*/ +*/ unsigned long fortuna_read(unsigned char *out, unsigned long outlen, prng_state *prng) { unsigned char tmp[16]; - int err; - unsigned long tlen; + unsigned long tlen = 0; + + if (outlen == 0 || prng == NULL || out == NULL) return 0; - LTC_ARGCHK(out != NULL); - LTC_ARGCHK(prng != NULL); + LTC_MUTEX_LOCK(&prng->lock); - LTC_MUTEX_LOCK(&prng->fortuna.prng_lock); + if (!prng->ready) { + goto LBL_UNLOCK; + } /* do we have to reseed? */ if (++prng->fortuna.wd == LTC_FORTUNA_WD || prng->fortuna.pool0_len >= 64) { - if ((err = fortuna_reseed(prng)) != CRYPT_OK) { - LTC_MUTEX_UNLOCK(&prng->fortuna.prng_lock); - return 0; + if (_fortuna_reseed(prng) != CRYPT_OK) { + goto LBL_UNLOCK; } } @@ -251,59 +260,66 @@ rijndael_ecb_encrypt(prng->fortuna.IV, out, &prng->fortuna.skey); out += 16; outlen -= 16; - fortuna_update_iv(prng); + _fortuna_update_iv(prng); } /* left over bytes? */ if (outlen > 0) { rijndael_ecb_encrypt(prng->fortuna.IV, tmp, &prng->fortuna.skey); XMEMCPY(out, tmp, outlen); - fortuna_update_iv(prng); - } - - /* generate new key */ - rijndael_ecb_encrypt(prng->fortuna.IV, prng->fortuna.K , &prng->fortuna.skey); fortuna_update_iv(prng); - rijndael_ecb_encrypt(prng->fortuna.IV, prng->fortuna.K+16, &prng->fortuna.skey); fortuna_update_iv(prng); - if ((err = rijndael_setup(prng->fortuna.K, 32, 0, &prng->fortuna.skey)) != CRYPT_OK) { - LTC_MUTEX_UNLOCK(&prng->fortuna.prng_lock); - return 0; + _fortuna_update_iv(prng); } + /* generate new key */ + rijndael_ecb_encrypt(prng->fortuna.IV, prng->fortuna.K , &prng->fortuna.skey); + _fortuna_update_iv(prng); + + rijndael_ecb_encrypt(prng->fortuna.IV, prng->fortuna.K+16, &prng->fortuna.skey); + _fortuna_update_iv(prng); + + if (rijndael_setup(prng->fortuna.K, 32, 0, &prng->fortuna.skey) != CRYPT_OK) { + tlen = 0; + } + +LBL_UNLOCK: #ifdef LTC_CLEAN_STACK zeromem(tmp, sizeof(tmp)); #endif - LTC_MUTEX_UNLOCK(&prng->fortuna.prng_lock); + LTC_MUTEX_UNLOCK(&prng->lock); return tlen; -} +} /** Terminate the PRNG @param prng The PRNG to terminate @return CRYPT_OK if successful -*/ +*/ int fortuna_done(prng_state *prng) { int err, x; unsigned char tmp[32]; LTC_ARGCHK(prng != NULL); - LTC_MUTEX_LOCK(&prng->fortuna.prng_lock); + + LTC_MUTEX_LOCK(&prng->lock); + prng->ready = 0; /* terminate all the hashes */ for (x = 0; x < LTC_FORTUNA_POOLS; x++) { if ((err = sha256_done(&(prng->fortuna.pool[x]), tmp)) != CRYPT_OK) { - LTC_MUTEX_UNLOCK(&prng->fortuna.prng_lock); - return err; + goto LBL_UNLOCK; } } /* call cipher done when we invent one ;-) */ + err = CRYPT_OK; /* success */ +LBL_UNLOCK: #ifdef LTC_CLEAN_STACK zeromem(tmp, sizeof(tmp)); #endif - - LTC_MUTEX_UNLOCK(&prng->fortuna.prng_lock); - return CRYPT_OK; + LTC_MUTEX_UNLOCK(&prng->lock); + LTC_MUTEX_DESTROY(&prng->lock); + return err; } /** @@ -312,34 +328,40 @@ @param outlen [in/out] Max size and resulting size of the state @param prng The PRNG to export @return CRYPT_OK if successful -*/ +*/ int fortuna_export(unsigned char *out, unsigned long *outlen, prng_state *prng) { int x, err; hash_state *md; + unsigned long len = fortuna_desc.export_size; LTC_ARGCHK(out != NULL); LTC_ARGCHK(outlen != NULL); LTC_ARGCHK(prng != NULL); - LTC_MUTEX_LOCK(&prng->fortuna.prng_lock); + LTC_MUTEX_LOCK(&prng->lock); + + if (!prng->ready) { + err = CRYPT_ERROR; + goto LBL_UNLOCK; + } /* we'll write bytes for s&g's */ - if (*outlen < 32*LTC_FORTUNA_POOLS) { - LTC_MUTEX_UNLOCK(&prng->fortuna.prng_lock); - *outlen = 32*LTC_FORTUNA_POOLS; - return CRYPT_BUFFER_OVERFLOW; + if (*outlen < len) { + *outlen = len; + err = CRYPT_BUFFER_OVERFLOW; + goto LBL_UNLOCK; } md = XMALLOC(sizeof(hash_state)); if (md == NULL) { - LTC_MUTEX_UNLOCK(&prng->fortuna.prng_lock); - return CRYPT_MEM; + err = CRYPT_MEM; + goto LBL_UNLOCK; } - /* to emit the state we copy each pool, terminate it then hash it again so - * an attacker who sees the state can't determine the current state of the PRNG - */ + /* to emit the state we copy each pool, terminate it then hash it again so + * an attacker who sees the state can't determine the current state of the PRNG + */ for (x = 0; x < LTC_FORTUNA_POOLS; x++) { /* copy the PRNG */ XMEMCPY(md, &(prng->fortuna.pool[x]), sizeof(*md)); @@ -360,7 +382,7 @@ goto LBL_ERR; } } - *outlen = 32*LTC_FORTUNA_POOLS; + *outlen = len; err = CRYPT_OK; LBL_ERR: @@ -368,17 +390,18 @@ zeromem(md, sizeof(*md)); #endif XFREE(md); - LTC_MUTEX_UNLOCK(&prng->fortuna.prng_lock); +LBL_UNLOCK: + LTC_MUTEX_UNLOCK(&prng->lock); return err; } - + /** Import a PRNG state @param in The PRNG state @param inlen Size of the state @param prng The PRNG to import @return CRYPT_OK if successful -*/ +*/ int fortuna_import(const unsigned char *in, unsigned long inlen, prng_state *prng) { int err, x; @@ -386,7 +409,7 @@ LTC_ARGCHK(in != NULL); LTC_ARGCHK(prng != NULL); - if (inlen != 32*LTC_FORTUNA_POOLS) { + if (inlen < (unsigned long)fortuna_desc.export_size) { return CRYPT_INVALID_ARG; } @@ -398,13 +421,13 @@ return err; } } - return err; + return CRYPT_OK; } /** PRNG self-test @return CRYPT_OK if successful, CRYPT_NOP if self-testing has been disabled -*/ +*/ int fortuna_test(void) { #ifndef LTC_TEST @@ -422,6 +445,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/prngs/rc4.c --- a/libtomcrypt/src/prngs/rc4.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/prngs/rc4.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,44 +5,45 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** - @file rc4.c - LTC_RC4 PRNG, Tom St Denis -*/ + @file prngs/rc4.c + RC4 PRNG, Tom St Denis +*/ #ifdef LTC_RC4 -const struct ltc_prng_descriptor rc4_desc = +const struct ltc_prng_descriptor rc4_desc = { - "rc4", 32, - &rc4_start, - &rc4_add_entropy, - &rc4_ready, - &rc4_read, - &rc4_done, - &rc4_export, - &rc4_import, - &rc4_test + "rc4", + 32, + &rc4_start, + &rc4_add_entropy, + &rc4_ready, + &rc4_read, + &rc4_done, + &rc4_export, + &rc4_import, + &rc4_test }; /** Start the PRNG @param prng [out] The PRNG state to initialize @return CRYPT_OK if successful -*/ +*/ int rc4_start(prng_state *prng) { - LTC_ARGCHK(prng != NULL); - - /* set keysize to zero */ - prng->rc4.x = 0; - - return CRYPT_OK; + LTC_ARGCHK(prng != NULL); + prng->ready = 0; + /* set entropy (key) size to zero */ + prng->rc4.s.x = 0; + /* clear entropy (key) buffer */ + XMEMSET(&prng->rc4.s.buf, 0, sizeof(prng->rc4.s.buf)); + LTC_MUTEX_INIT(&prng->lock) + return CRYPT_OK; } /** @@ -51,68 +52,63 @@ @param inlen Length of the data to add @param prng PRNG state to update @return CRYPT_OK if successful -*/ +*/ int rc4_add_entropy(const unsigned char *in, unsigned long inlen, prng_state *prng) { - LTC_ARGCHK(in != NULL); - LTC_ARGCHK(prng != NULL); - - /* trim as required */ - if (prng->rc4.x + inlen > 256) { - if (prng->rc4.x == 256) { - /* I can't possibly accept another byte, ok maybe a mint wafer... */ - return CRYPT_OK; - } else { - /* only accept part of it */ - inlen = 256 - prng->rc4.x; - } - } + unsigned char buf[256]; + unsigned long i; + int err; + + LTC_ARGCHK(prng != NULL); + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(inlen > 0); - while (inlen--) { - prng->rc4.buf[prng->rc4.x++] = *in++; - } - - return CRYPT_OK; - + LTC_MUTEX_LOCK(&prng->lock); + if (prng->ready) { + /* rc4_ready() was already called, do "rekey" operation */ + if ((err = rc4_stream_keystream(&prng->rc4.s, buf, sizeof(buf))) != CRYPT_OK) goto LBL_UNLOCK; + for(i = 0; i < inlen; i++) buf[i % sizeof(buf)] ^= in[i]; + /* initialize RC4 */ + if ((err = rc4_stream_setup(&prng->rc4.s, buf, sizeof(buf))) != CRYPT_OK) goto LBL_UNLOCK; + /* drop first 3072 bytes - https://en.wikipedia.org/wiki/RC4#Fluhrer.2C_Mantin_and_Shamir_attack */ + for (i = 0; i < 12; i++) rc4_stream_keystream(&prng->rc4.s, buf, sizeof(buf)); + zeromem(buf, sizeof(buf)); + } + else { + /* rc4_ready() was not called yet, add entropy to the buffer */ + while (inlen--) prng->rc4.s.buf[prng->rc4.s.x++ % sizeof(prng->rc4.s.buf)] ^= *in++; + } + err = CRYPT_OK; +LBL_UNLOCK: + LTC_MUTEX_UNLOCK(&prng->lock); + return err; } /** Make the PRNG ready to read from @param prng The PRNG to make active @return CRYPT_OK if successful -*/ +*/ int rc4_ready(prng_state *prng) { - unsigned char key[256], tmp, *s; - int keylen, x, y, j; - - LTC_ARGCHK(prng != NULL); + unsigned char buf[256] = { 0 }; + unsigned long len; + int err, i; - /* extract the key */ - s = prng->rc4.buf; - XMEMCPY(key, s, 256); - keylen = prng->rc4.x; - - /* make LTC_RC4 perm and shuffle */ - for (x = 0; x < 256; x++) { - s[x] = x; - } + LTC_ARGCHK(prng != NULL); - for (j = x = y = 0; x < 256; x++) { - y = (y + prng->rc4.buf[x] + key[j++]) & 255; - if (j == keylen) { - j = 0; - } - tmp = s[x]; s[x] = s[y]; s[y] = tmp; - } - prng->rc4.x = 0; - prng->rc4.y = 0; - -#ifdef LTC_CLEAN_STACK - zeromem(key, sizeof(key)); -#endif - - return CRYPT_OK; + LTC_MUTEX_LOCK(&prng->lock); + if (prng->ready) { err = CRYPT_OK; goto LBL_UNLOCK; } + XMEMCPY(buf, prng->rc4.s.buf, sizeof(buf)); + /* initialize RC4 */ + len = MIN(prng->rc4.s.x, 256); /* TODO: we can perhaps always use all 256 bytes */ + if ((err = rc4_stream_setup(&prng->rc4.s, buf, len)) != CRYPT_OK) goto LBL_UNLOCK; + /* drop first 3072 bytes - https://en.wikipedia.org/wiki/RC4#Fluhrer.2C_Mantin_and_Shamir_attack */ + for (i = 0; i < 12; i++) rc4_stream_keystream(&prng->rc4.s, buf, sizeof(buf)); + prng->ready = 1; +LBL_UNLOCK: + LTC_MUTEX_UNLOCK(&prng->lock); + return err; } /** @@ -121,44 +117,33 @@ @param outlen Length of output @param prng The active PRNG to read from @return Number of octets read -*/ +*/ unsigned long rc4_read(unsigned char *out, unsigned long outlen, prng_state *prng) { - unsigned char x, y, *s, tmp; - unsigned long n; - - LTC_ARGCHK(out != NULL); - LTC_ARGCHK(prng != NULL); - -#ifdef LTC_VALGRIND - zeromem(out, outlen); -#endif - - n = outlen; - x = prng->rc4.x; - y = prng->rc4.y; - s = prng->rc4.buf; - while (outlen--) { - x = (x + 1) & 255; - y = (y + s[x]) & 255; - tmp = s[x]; s[x] = s[y]; s[y] = tmp; - tmp = (s[x] + s[y]) & 255; - *out++ ^= s[tmp]; - } - prng->rc4.x = x; - prng->rc4.y = y; - return n; + if (outlen == 0 || prng == NULL || out == NULL) return 0; + LTC_MUTEX_LOCK(&prng->lock); + if (!prng->ready) { outlen = 0; goto LBL_UNLOCK; } + if (rc4_stream_keystream(&prng->rc4.s, out, outlen) != CRYPT_OK) outlen = 0; +LBL_UNLOCK: + LTC_MUTEX_UNLOCK(&prng->lock); + return outlen; } /** Terminate the PRNG @param prng The PRNG to terminate @return CRYPT_OK if successful -*/ +*/ int rc4_done(prng_state *prng) { + int err; LTC_ARGCHK(prng != NULL); - return CRYPT_OK; + LTC_MUTEX_LOCK(&prng->lock); + prng->ready = 0; + err = rc4_stream_done(&prng->rc4.s); + LTC_MUTEX_UNLOCK(&prng->lock); + LTC_MUTEX_DESTROY(&prng->lock); + return err; } /** @@ -167,103 +152,99 @@ @param outlen [in/out] Max size and resulting size of the state @param prng The PRNG to export @return CRYPT_OK if successful -*/ +*/ int rc4_export(unsigned char *out, unsigned long *outlen, prng_state *prng) { - LTC_ARGCHK(outlen != NULL); - LTC_ARGCHK(out != NULL); + unsigned long len = rc4_desc.export_size; + LTC_ARGCHK(prng != NULL); + LTC_ARGCHK(out != NULL); + LTC_ARGCHK(outlen != NULL); - if (*outlen < 32) { - *outlen = 32; + if (*outlen < len) { + *outlen = len; return CRYPT_BUFFER_OVERFLOW; } - if (rc4_read(out, 32, prng) != 32) { + if (rc4_read(out, len, prng) != len) { return CRYPT_ERROR_READPRNG; } - *outlen = 32; + *outlen = len; return CRYPT_OK; } - + /** Import a PRNG state @param in The PRNG state @param inlen Size of the state @param prng The PRNG to import @return CRYPT_OK if successful -*/ +*/ int rc4_import(const unsigned char *in, unsigned long inlen, prng_state *prng) { int err; - LTC_ARGCHK(in != NULL); - LTC_ARGCHK(prng != NULL); - if (inlen != 32) { - return CRYPT_INVALID_ARG; - } - - if ((err = rc4_start(prng)) != CRYPT_OK) { - return err; - } - return rc4_add_entropy(in, 32, prng); + LTC_ARGCHK(prng != NULL); + LTC_ARGCHK(in != NULL); + if (inlen < (unsigned long)rc4_desc.export_size) return CRYPT_INVALID_ARG; + + if ((err = rc4_start(prng)) != CRYPT_OK) return err; + if ((err = rc4_add_entropy(in, inlen, prng)) != CRYPT_OK) return err; + return CRYPT_OK; } /** PRNG self-test @return CRYPT_OK if successful, CRYPT_NOP if self-testing has been disabled -*/ +*/ int rc4_test(void) { -#if !defined(LTC_TEST) || defined(LTC_VALGRIND) +#ifndef LTC_TEST return CRYPT_NOP; #else - static const struct { - unsigned char key[8], pt[8], ct[8]; - } tests[] = { -{ - { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, - { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, - { 0x75, 0xb7, 0x87, 0x80, 0x99, 0xe0, 0xc5, 0x96 } -} -}; - prng_state prng; - unsigned char dst[8]; - int err, x; + prng_state st; + unsigned char en[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, + 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, + 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, + 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32 }; + unsigned char dmp[500]; + unsigned long dmplen = sizeof(dmp); + unsigned char out[1000]; + unsigned char t1[] = { 0xE0, 0x4D, 0x9A, 0xF6, 0xA8, 0x9D, 0x77, 0x53, 0xAE, 0x09 }; + unsigned char t2[] = { 0xEF, 0x80, 0xA2, 0xE6, 0x50, 0x91, 0xF3, 0x17, 0x4A, 0x8A }; + unsigned char t3[] = { 0x4B, 0xD6, 0x5C, 0x67, 0x99, 0x03, 0x56, 0x12, 0x80, 0x48 }; + int err; - for (x = 0; x < (int)(sizeof(tests)/sizeof(tests[0])); x++) { - if ((err = rc4_start(&prng)) != CRYPT_OK) { - return err; - } - if ((err = rc4_add_entropy(tests[x].key, 8, &prng)) != CRYPT_OK) { - return err; - } - if ((err = rc4_ready(&prng)) != CRYPT_OK) { - return err; - } - XMEMCPY(dst, tests[x].pt, 8); - if (rc4_read(dst, 8, &prng) != 8) { - return CRYPT_ERROR_READPRNG; - } - rc4_done(&prng); - if (XMEMCMP(dst, tests[x].ct, 8)) { -#if 0 - int y; - printf("\n\nLTC_RC4 failed, I got:\n"); - for (y = 0; y < 8; y++) printf("%02x ", dst[y]); - printf("\n"); -#endif - return CRYPT_FAIL_TESTVECTOR; - } - } + if ((err = rc4_start(&st)) != CRYPT_OK) return err; + /* add entropy to uninitialized prng */ + if ((err = rc4_add_entropy(en, sizeof(en), &st)) != CRYPT_OK) return err; + if ((err = rc4_ready(&st)) != CRYPT_OK) return err; + if (rc4_read(out, 10, &st) != 10) return CRYPT_ERROR_READPRNG; /* 10 bytes for testing */ + if (compare_testvector(out, 10, t1, sizeof(t1), "RC4-PRNG", 1)) return CRYPT_FAIL_TESTVECTOR; + if (rc4_read(out, 500, &st) != 500) return CRYPT_ERROR_READPRNG; /* skip 500 bytes */ + /* add entropy to already initialized prng */ + if ((err = rc4_add_entropy(en, sizeof(en), &st)) != CRYPT_OK) return err; + if (rc4_read(out, 500, &st) != 500) return CRYPT_ERROR_READPRNG; /* skip 500 bytes */ + if ((err = rc4_export(dmp, &dmplen, &st)) != CRYPT_OK) return err; + if (rc4_read(out, 500, &st) != 500) return CRYPT_ERROR_READPRNG; /* skip 500 bytes */ + if (rc4_read(out, 10, &st) != 10) return CRYPT_ERROR_READPRNG; /* 10 bytes for testing */ + if (compare_testvector(out, 10, t2, sizeof(t2), "RC4-PRNG", 2)) return CRYPT_FAIL_TESTVECTOR; + if ((err = rc4_done(&st)) != CRYPT_OK) return err; + if ((err = rc4_import(dmp, dmplen, &st)) != CRYPT_OK) return err; + if ((err = rc4_ready(&st)) != CRYPT_OK) return err; + if (rc4_read(out, 500, &st) != 500) return CRYPT_ERROR_READPRNG; /* skip 500 bytes */ + if (rc4_read(out, 10, &st) != 10) return CRYPT_ERROR_READPRNG; /* 10 bytes for testing */ + if (compare_testvector(out, 10, t3, sizeof(t3), "RC4-PRNG", 3)) return CRYPT_FAIL_TESTVECTOR; + if ((err = rc4_done(&st)) != CRYPT_OK) return err; + return CRYPT_OK; #endif } #endif - -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/prngs/rng_get_bytes.c --- a/libtomcrypt/src/prngs/rng_get_bytes.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/prngs/rng_get_bytes.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,42 +5,45 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +#ifdef LTC_RNG_GET_BYTES +/** @file rng_get_bytes.c portable way to get secure random bits to feed a PRNG (Tom St Denis) */ -#ifdef LTC_DEVRANDOM +#if defined(LTC_DEVRANDOM) && !defined(_WIN32) /* on *NIX read /dev/random */ -static unsigned long rng_nix(unsigned char *buf, unsigned long len, +static unsigned long _rng_nix(unsigned char *buf, unsigned long len, void (*callback)(void)) { #ifdef LTC_NO_FILE + LTC_UNUSED_PARAM(callback); + LTC_UNUSED_PARAM(buf); + LTC_UNUSED_PARAM(len); return 0; #else FILE *f; unsigned long x; -#ifdef TRY_URANDOM_FIRST + LTC_UNUSED_PARAM(callback); +#ifdef LTC_TRY_URANDOM_FIRST f = fopen("/dev/urandom", "rb"); if (f == NULL) -#endif /* TRY_URANDOM_FIRST */ +#endif /* LTC_TRY_URANDOM_FIRST */ f = fopen("/dev/random", "rb"); if (f == NULL) { return 0; } - + /* disable buffering */ if (setvbuf(f, NULL, _IONBF, 0) != 0) { fclose(f); return 0; - } - + } + x = (unsigned long)fread(buf, 1, (size_t)len, f); fclose(f); return x; @@ -49,21 +52,16 @@ #endif /* LTC_DEVRANDOM */ -/* on ANSI C platforms with 100 < CLOCKS_PER_SEC < 10000 */ -#if defined(CLOCKS_PER_SEC) && !defined(WINCE) +#if !defined(_WIN32_WCE) #define ANSI_RNG -static unsigned long rng_ansic(unsigned char *buf, unsigned long len, +static unsigned long _rng_ansic(unsigned char *buf, unsigned long len, void (*callback)(void)) { clock_t t1; int l, acc, bits, a, b; - if (XCLOCKS_PER_SEC < 100 || XCLOCKS_PER_SEC > 10000) { - return 0; - } - l = len; bits = 8; acc = a = b = 0; @@ -76,33 +74,37 @@ } while (a == b); acc = (acc << 1) | a; } - *buf++ = acc; + *buf++ = acc; acc = 0; bits = 8; } - acc = bits = a = b = 0; return l; } -#endif +#endif /* Try the Microsoft CSP */ -#if defined(WIN32) || defined(WINCE) -#define _WIN32_WINNT 0x0400 -#ifdef WINCE +#if defined(_WIN32) || defined(_WIN32_WCE) +#ifndef _WIN32_WINNT + #define _WIN32_WINNT 0x0400 +#endif +#ifdef _WIN32_WCE #define UNDER_CE #define ARM #endif + +#define WIN32_LEAN_AND_MEAN #include #include -static unsigned long rng_win32(unsigned char *buf, unsigned long len, +static unsigned long _rng_win32(unsigned char *buf, unsigned long len, void (*callback)(void)) { HCRYPTPROV hProv = 0; - if (!CryptAcquireContext(&hProv, NULL, MS_DEF_PROV, PROV_RSA_FULL, - (CRYPT_VERIFYCONTEXT | CRYPT_MACHINE_KEYSET)) && - !CryptAcquireContext (&hProv, NULL, MS_DEF_PROV, PROV_RSA_FULL, + LTC_UNUSED_PARAM(callback); + if (!CryptAcquireContext(&hProv, NULL, MS_DEF_PROV, PROV_RSA_FULL, + (CRYPT_VERIFYCONTEXT | CRYPT_MACHINE_KEYSET)) && + !CryptAcquireContext (&hProv, NULL, MS_DEF_PROV, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_MACHINE_KEYSET | CRYPT_NEWKEYSET)) return 0; @@ -123,26 +125,35 @@ @param outlen Length desired (octets) @param callback Pointer to void function to act as "callback" when RNG is slow. This can be NULL @return Number of octets read -*/ -unsigned long rng_get_bytes(unsigned char *out, unsigned long outlen, +*/ +unsigned long rng_get_bytes(unsigned char *out, unsigned long outlen, void (*callback)(void)) { unsigned long x; LTC_ARGCHK(out != NULL); -#if defined(LTC_DEVRANDOM) - x = rng_nix(out, outlen, callback); if (x != 0) { return x; } +#ifdef LTC_PRNG_ENABLE_LTC_RNG + if (ltc_rng) { + x = ltc_rng(out, outlen, callback); + if (x != 0) { + return x; + } + } #endif -#ifdef WIN32 - x = rng_win32(out, outlen, callback); if (x != 0) { return x; } + +#if defined(_WIN32) || defined(_WIN32_WCE) + x = _rng_win32(out, outlen, callback); if (x != 0) { return x; } +#elif defined(LTC_DEVRANDOM) + x = _rng_nix(out, outlen, callback); if (x != 0) { return x; } #endif #ifdef ANSI_RNG - x = rng_ansic(out, outlen, callback); if (x != 0) { return x; } + x = _rng_ansic(out, outlen, callback); if (x != 0) { return x; } #endif return 0; } +#endif /* #ifdef LTC_RNG_GET_BYTES */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/prngs/rng_make_prng.c --- a/libtomcrypt/src/prngs/rng_make_prng.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/prngs/rng_make_prng.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,12 +5,11 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" -/** +#ifdef LTC_RNG_MAKE_PRNG +/** @file rng_make_prng.c portable way to get secure random bits to feed a PRNG (Tom St Denis) */ @@ -22,13 +21,13 @@ @param prng [out] PRNG state to initialize @param callback A pointer to a void function for when the RNG is slow, this can be NULL @return CRYPT_OK if successful -*/ -int rng_make_prng(int bits, int wprng, prng_state *prng, +*/ +int rng_make_prng(int bits, int wprng, prng_state *prng, void (*callback)(void)) { unsigned char buf[256]; int err; - + LTC_ARGCHK(prng != NULL); /* check parameter */ @@ -62,8 +61,9 @@ #endif return CRYPT_OK; } +#endif /* #ifdef LTC_RNG_MAKE_PRNG */ -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/prngs/sober128.c --- a/libtomcrypt/src/prngs/sober128.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/prngs/sober128.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,196 +5,45 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ + #include "tomcrypt.h" /** - @file sober128.c + @file prngs/sober128.c Implementation of SOBER-128 by Tom St Denis. Based on s128fast.c reference code supplied by Greg Rose of QUALCOMM. */ #ifdef LTC_SOBER128 -#include "sober128tab.c" - -const struct ltc_prng_descriptor sober128_desc = -{ - "sober128", 64, - &sober128_start, - &sober128_add_entropy, - &sober128_ready, - &sober128_read, - &sober128_done, - &sober128_export, - &sober128_import, - &sober128_test -}; - -/* don't change these... */ -#define N 17 -#define FOLD N /* how many iterations of folding to do */ -#define INITKONST 0x6996c53a /* value of KONST to use during key loading */ -#define KEYP 15 /* where to insert key words */ -#define FOLDP 4 /* where to insert non-linear feedback */ - -#define B(x,i) ((unsigned char)(((x) >> (8*i)) & 0xFF)) - -static ulong32 BYTE2WORD(unsigned char *b) -{ - ulong32 t; - LOAD32L(t, b); - return t; -} - -#define WORD2BYTE(w, b) STORE32L(b, w) - -static void XORWORD(ulong32 w, unsigned char *b) +const struct ltc_prng_descriptor sober128_desc = { - ulong32 t; - LOAD32L(t, b); - t ^= w; - STORE32L(t, b); -} - -/* give correct offset for the current position of the register, - * where logically R[0] is at position "zero". - */ -#define OFF(zero, i) (((zero)+(i)) % N) - -/* step the LFSR */ -/* After stepping, "zero" moves right one place */ -#define STEP(R,z) \ - R[OFF(z,0)] = R[OFF(z,15)] ^ R[OFF(z,4)] ^ (R[OFF(z,0)] << 8) ^ Multab[(R[OFF(z,0)] >> 24) & 0xFF]; - -static void cycle(ulong32 *R) -{ - ulong32 t; - int i; - - STEP(R,0); - t = R[0]; - for (i = 1; i < N; ++i) { - R[i-1] = R[i]; - } - R[N-1] = t; -} - -/* Return a non-linear function of some parts of the register. - */ -#define NLFUNC(c,z) \ -{ \ - t = c->R[OFF(z,0)] + c->R[OFF(z,16)]; \ - t ^= Sbox[(t >> 24) & 0xFF]; \ - t = RORc(t, 8); \ - t = ((t + c->R[OFF(z,1)]) ^ c->konst) + c->R[OFF(z,6)]; \ - t ^= Sbox[(t >> 24) & 0xFF]; \ - t = t + c->R[OFF(z,13)]; \ -} - -static ulong32 nltap(struct sober128_prng *c) -{ - ulong32 t; - NLFUNC(c, 0); - return t; -} + "sober128", + 40, + &sober128_start, + &sober128_add_entropy, + &sober128_ready, + &sober128_read, + &sober128_done, + &sober128_export, + &sober128_import, + &sober128_test +}; /** Start the PRNG @param prng [out] The PRNG state to initialize @return CRYPT_OK if successful -*/ +*/ int sober128_start(prng_state *prng) { - int i; - struct sober128_prng *c; - - LTC_ARGCHK(prng != NULL); - - c = &(prng->sober128); - - /* Register initialised to Fibonacci numbers */ - c->R[0] = 1; - c->R[1] = 1; - for (i = 2; i < N; ++i) { - c->R[i] = c->R[i-1] + c->R[i-2]; - } - c->konst = INITKONST; - - /* next add_entropy will be the key */ - c->flag = 1; - c->set = 0; - - return CRYPT_OK; -} - -/* Save the current register state - */ -static void s128_savestate(struct sober128_prng *c) -{ - int i; - for (i = 0; i < N; ++i) { - c->initR[i] = c->R[i]; - } -} - -/* initialise to previously saved register state - */ -static void s128_reloadstate(struct sober128_prng *c) -{ - int i; - - for (i = 0; i < N; ++i) { - c->R[i] = c->initR[i]; - } -} - -/* Initialise "konst" - */ -static void s128_genkonst(struct sober128_prng *c) -{ - ulong32 newkonst; - - do { - cycle(c->R); - newkonst = nltap(c); - } while ((newkonst & 0xFF000000) == 0); - c->konst = newkonst; -} - -/* Load key material into the register - */ -#define ADDKEY(k) \ - c->R[KEYP] += (k); - -#define XORNL(nl) \ - c->R[FOLDP] ^= (nl); - -/* nonlinear diffusion of register for key */ -#define DROUND(z) STEP(c->R,z); NLFUNC(c,(z+1)); c->R[OFF((z+1),FOLDP)] ^= t; -static void s128_diffuse(struct sober128_prng *c) -{ - ulong32 t; - /* relies on FOLD == N == 17! */ - DROUND(0); - DROUND(1); - DROUND(2); - DROUND(3); - DROUND(4); - DROUND(5); - DROUND(6); - DROUND(7); - DROUND(8); - DROUND(9); - DROUND(10); - DROUND(11); - DROUND(12); - DROUND(13); - DROUND(14); - DROUND(15); - DROUND(16); + LTC_ARGCHK(prng != NULL); + prng->ready = 0; + XMEMSET(&prng->sober128.ent, 0, sizeof(prng->sober128.ent)); + prng->sober128.idx = 0; + LTC_MUTEX_INIT(&prng->lock) + return CRYPT_OK; } /** @@ -203,81 +52,63 @@ @param inlen Length of the data to add @param prng PRNG state to update @return CRYPT_OK if successful -*/ +*/ int sober128_add_entropy(const unsigned char *in, unsigned long inlen, prng_state *prng) { - struct sober128_prng *c; - ulong32 i, k; - - LTC_ARGCHK(in != NULL); - LTC_ARGCHK(prng != NULL); - c = &(prng->sober128); + unsigned char buf[40]; + unsigned long i; + int err; - if (c->flag == 1) { - /* this is the first call to the add_entropy so this input is the key */ - /* inlen must be multiple of 4 bytes */ - if ((inlen & 3) != 0) { - return CRYPT_INVALID_KEYSIZE; - } - - for (i = 0; i < inlen; i += 4) { - k = BYTE2WORD((unsigned char *)&in[i]); - ADDKEY(k); - cycle(c->R); - XORNL(nltap(c)); - } - - /* also fold in the length of the key */ - ADDKEY(inlen); - - /* now diffuse */ - s128_diffuse(c); + LTC_ARGCHK(prng != NULL); + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(inlen > 0); - s128_genkonst(c); - s128_savestate(c); - c->nbuf = 0; - c->flag = 0; - c->set = 1; - } else { - /* ok we are adding an IV then... */ - s128_reloadstate(c); - - /* inlen must be multiple of 4 bytes */ - if ((inlen & 3) != 0) { - return CRYPT_INVALID_KEYSIZE; - } - - for (i = 0; i < inlen; i += 4) { - k = BYTE2WORD((unsigned char *)&in[i]); - ADDKEY(k); - cycle(c->R); - XORNL(nltap(c)); - } - - /* also fold in the length of the key */ - ADDKEY(inlen); - - /* now diffuse */ - s128_diffuse(c); - c->nbuf = 0; - } - - return CRYPT_OK; + LTC_MUTEX_LOCK(&prng->lock); + if (prng->ready) { + /* sober128_ready() was already called, do "rekey" operation */ + if ((err = sober128_stream_keystream(&prng->sober128.s, buf, sizeof(buf))) != CRYPT_OK) goto LBL_UNLOCK; + for(i = 0; i < inlen; i++) buf[i % sizeof(buf)] ^= in[i]; + /* key 32 bytes, 20 rounds */ + if ((err = sober128_stream_setup(&prng->sober128.s, buf, 32)) != CRYPT_OK) goto LBL_UNLOCK; + /* iv 8 bytes */ + if ((err = sober128_stream_setiv(&prng->sober128.s, buf + 32, 8)) != CRYPT_OK) goto LBL_UNLOCK; + /* clear KEY + IV */ + zeromem(buf, sizeof(buf)); + } + else { + /* sober128_ready() was not called yet, add entropy to ent buffer */ + while (inlen--) prng->sober128.ent[prng->sober128.idx++ % sizeof(prng->sober128.ent)] ^= *in++; + } + err = CRYPT_OK; +LBL_UNLOCK: + LTC_MUTEX_UNLOCK(&prng->lock); + return err; } /** Make the PRNG ready to read from @param prng The PRNG to make active @return CRYPT_OK if successful -*/ +*/ int sober128_ready(prng_state *prng) { - return prng->sober128.set == 1 ? CRYPT_OK : CRYPT_ERROR; -} + int err; + + LTC_ARGCHK(prng != NULL); -/* XOR pseudo-random bytes into buffer - */ -#define SROUND(z) STEP(c->R,z); NLFUNC(c,(z+1)); XORWORD(t, out+(z*4)); + LTC_MUTEX_LOCK(&prng->lock); + if (prng->ready) { err = CRYPT_OK; goto LBL_UNLOCK; } + /* key 32 bytes, 20 rounds */ + if ((err = sober128_stream_setup(&prng->sober128.s, prng->sober128.ent, 32)) != CRYPT_OK) goto LBL_UNLOCK; + /* iv 8 bytes */ + if ((err = sober128_stream_setiv(&prng->sober128.s, prng->sober128.ent + 32, 8)) != CRYPT_OK) goto LBL_UNLOCK; + XMEMSET(&prng->sober128.ent, 0, sizeof(prng->sober128.ent)); + prng->sober128.idx = 0; + prng->ready = 1; +LBL_UNLOCK: + LTC_MUTEX_UNLOCK(&prng->lock); + return err; +} /** Read from the PRNG @@ -285,90 +116,33 @@ @param outlen Length of output @param prng The active PRNG to read from @return Number of octets read -*/ +*/ unsigned long sober128_read(unsigned char *out, unsigned long outlen, prng_state *prng) { - struct sober128_prng *c; - ulong32 t, tlen; - - LTC_ARGCHK(out != NULL); - LTC_ARGCHK(prng != NULL); - -#ifdef LTC_VALGRIND - zeromem(out, outlen); -#endif - - c = &(prng->sober128); - t = 0; - tlen = outlen; - - /* handle any previously buffered bytes */ - while (c->nbuf != 0 && outlen != 0) { - *out++ ^= c->sbuf & 0xFF; - c->sbuf >>= 8; - c->nbuf -= 8; - --outlen; - } - -#ifndef LTC_SMALL_CODE - /* do lots at a time, if there's enough to do */ - while (outlen >= N*4) { - SROUND(0); - SROUND(1); - SROUND(2); - SROUND(3); - SROUND(4); - SROUND(5); - SROUND(6); - SROUND(7); - SROUND(8); - SROUND(9); - SROUND(10); - SROUND(11); - SROUND(12); - SROUND(13); - SROUND(14); - SROUND(15); - SROUND(16); - out += 4*N; - outlen -= 4*N; - } -#endif - - /* do small or odd size buffers the slow way */ - while (4 <= outlen) { - cycle(c->R); - t = nltap(c); - XORWORD(t, out); - out += 4; - outlen -= 4; - } - - /* handle any trailing bytes */ - if (outlen != 0) { - cycle(c->R); - c->sbuf = nltap(c); - c->nbuf = 32; - while (c->nbuf != 0 && outlen != 0) { - *out++ ^= c->sbuf & 0xFF; - c->sbuf >>= 8; - c->nbuf -= 8; - --outlen; - } - } - - return tlen; + if (outlen == 0 || prng == NULL || out == NULL) return 0; + LTC_MUTEX_LOCK(&prng->lock); + if (!prng->ready) { outlen = 0; goto LBL_UNLOCK; } + if (sober128_stream_keystream(&prng->sober128.s, out, outlen) != CRYPT_OK) outlen = 0; +LBL_UNLOCK: + LTC_MUTEX_UNLOCK(&prng->lock); + return outlen; } /** Terminate the PRNG @param prng The PRNG to terminate @return CRYPT_OK if successful -*/ +*/ int sober128_done(prng_state *prng) { + int err; LTC_ARGCHK(prng != NULL); - return CRYPT_OK; + LTC_MUTEX_LOCK(&prng->lock); + prng->ready = 0; + err = sober128_stream_done(&prng->sober128.s); + LTC_MUTEX_UNLOCK(&prng->lock); + LTC_MUTEX_DESTROY(&prng->lock); + return err; } /** @@ -377,124 +151,99 @@ @param outlen [in/out] Max size and resulting size of the state @param prng The PRNG to export @return CRYPT_OK if successful -*/ +*/ int sober128_export(unsigned char *out, unsigned long *outlen, prng_state *prng) { - LTC_ARGCHK(outlen != NULL); - LTC_ARGCHK(out != NULL); + unsigned long len = sober128_desc.export_size; + LTC_ARGCHK(prng != NULL); + LTC_ARGCHK(out != NULL); + LTC_ARGCHK(outlen != NULL); - if (*outlen < 64) { - *outlen = 64; + if (*outlen < len) { + *outlen = len; return CRYPT_BUFFER_OVERFLOW; } - if (sober128_read(out, 64, prng) != 64) { + if (sober128_read(out, len, prng) != len) { return CRYPT_ERROR_READPRNG; } - *outlen = 64; + *outlen = len; return CRYPT_OK; } - + /** Import a PRNG state @param in The PRNG state @param inlen Size of the state @param prng The PRNG to import @return CRYPT_OK if successful -*/ +*/ int sober128_import(const unsigned char *in, unsigned long inlen, prng_state *prng) { int err; - LTC_ARGCHK(in != NULL); - LTC_ARGCHK(prng != NULL); - if (inlen != 64) { - return CRYPT_INVALID_ARG; - } - - if ((err = sober128_start(prng)) != CRYPT_OK) { - return err; - } - if ((err = sober128_add_entropy(in, 64, prng)) != CRYPT_OK) { - return err; - } - return sober128_ready(prng); + LTC_ARGCHK(prng != NULL); + LTC_ARGCHK(in != NULL); + if (inlen < (unsigned long)sober128_desc.export_size) return CRYPT_INVALID_ARG; + + if ((err = sober128_start(prng)) != CRYPT_OK) return err; + if ((err = sober128_add_entropy(in, sober128_desc.export_size, prng)) != CRYPT_OK) return err; + return CRYPT_OK; } /** PRNG self-test @return CRYPT_OK if successful, CRYPT_NOP if self-testing has been disabled -*/ +*/ int sober128_test(void) { #ifndef LTC_TEST return CRYPT_NOP; #else - static const struct { - int keylen, ivlen, len; - unsigned char key[16], iv[4], out[20]; - } tests[] = { - -{ - 16, 4, 20, - - /* key */ - { 0x74, 0x65, 0x73, 0x74, 0x20, 0x6b, 0x65, 0x79, - 0x20, 0x31, 0x32, 0x38, 0x62, 0x69, 0x74, 0x73 }, - - /* IV */ - { 0x00, 0x00, 0x00, 0x00 }, - - /* expected output */ - { 0x43, 0x50, 0x0c, 0xcf, 0x89, 0x91, 0x9f, 0x1d, - 0xaa, 0x37, 0x74, 0x95, 0xf4, 0xb4, 0x58, 0xc2, - 0x40, 0x37, 0x8b, 0xbb } -} - -}; - prng_state prng; - unsigned char dst[20]; - int err, x; + prng_state st; + unsigned char en[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, + 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, + 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, + 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32 }; + unsigned char dmp[300]; + unsigned long dmplen = sizeof(dmp); + unsigned char out[500]; + unsigned char t1[] = { 0x31, 0x82, 0xA7, 0xA5, 0x8B, 0xD7, 0xCB, 0x39, 0x86, 0x1A }; + unsigned char t2[] = { 0x6B, 0x43, 0x9E, 0xBC, 0xE7, 0x62, 0x9B, 0xE6, 0x9B, 0x83 }; + unsigned char t3[] = { 0x4A, 0x0E, 0x6C, 0xC1, 0xCF, 0xB4, 0x73, 0x49, 0x99, 0x05 }; + int err; - for (x = 0; x < (int)(sizeof(tests)/sizeof(tests[0])); x++) { - if ((err = sober128_start(&prng)) != CRYPT_OK) { - return err; - } - if ((err = sober128_add_entropy(tests[x].key, tests[x].keylen, &prng)) != CRYPT_OK) { - return err; - } - /* add IV */ - if ((err = sober128_add_entropy(tests[x].iv, tests[x].ivlen, &prng)) != CRYPT_OK) { - return err; - } + if ((err = sober128_start(&st)) != CRYPT_OK) return err; + /* add entropy to uninitialized prng */ + if ((err = sober128_add_entropy(en, sizeof(en), &st)) != CRYPT_OK) return err; + if ((err = sober128_ready(&st)) != CRYPT_OK) return err; + if (sober128_read(out, 10, &st) != 10) return CRYPT_ERROR_READPRNG; /* 10 bytes for testing */ + if (compare_testvector(out, 10, t1, sizeof(t1), "SOBER128-PRNG", 1)) return CRYPT_FAIL_TESTVECTOR; + if (sober128_read(out, 500, &st) != 500) return CRYPT_ERROR_READPRNG; /* skip 500 bytes */ + /* add entropy to already initialized prng */ + if ((err = sober128_add_entropy(en, sizeof(en), &st)) != CRYPT_OK) return err; + if (sober128_read(out, 500, &st) != 500) return CRYPT_ERROR_READPRNG; /* skip 500 bytes */ + if ((err = sober128_export(dmp, &dmplen, &st)) != CRYPT_OK) return err; + if (sober128_read(out, 500, &st) != 500) return CRYPT_ERROR_READPRNG; /* skip 500 bytes */ + if (sober128_read(out, 10, &st) != 10) return CRYPT_ERROR_READPRNG; /* 10 bytes for testing */ + if (compare_testvector(out, 10, t2, sizeof(t2), "SOBER128-PRNG", 2)) return CRYPT_FAIL_TESTVECTOR; + if ((err = sober128_done(&st)) != CRYPT_OK) return err; + if ((err = sober128_import(dmp, dmplen, &st)) != CRYPT_OK) return err; + if ((err = sober128_ready(&st)) != CRYPT_OK) return err; + if (sober128_read(out, 500, &st) != 500) return CRYPT_ERROR_READPRNG; /* skip 500 bytes */ + if (sober128_read(out, 10, &st) != 10) return CRYPT_ERROR_READPRNG; /* 10 bytes for testing */ + if (compare_testvector(out, 10, t3, sizeof(t3), "SOBER128-PRNG", 3)) return CRYPT_FAIL_TESTVECTOR; + if ((err = sober128_done(&st)) != CRYPT_OK) return err; - /* ready up */ - if ((err = sober128_ready(&prng)) != CRYPT_OK) { - return err; - } - XMEMSET(dst, 0, tests[x].len); - if (sober128_read(dst, tests[x].len, &prng) != (unsigned long)tests[x].len) { - return CRYPT_ERROR_READPRNG; - } - sober128_done(&prng); - if (XMEMCMP(dst, tests[x].out, tests[x].len)) { -#if 0 - printf("\n\nLTC_SOBER128 failed, I got:\n"); - for (y = 0; y < tests[x].len; y++) printf("%02x ", dst[y]); - printf("\n"); -#endif - return CRYPT_FAIL_TESTVECTOR; - } - } return CRYPT_OK; #endif } #endif - -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/prngs/sprng.c --- a/libtomcrypt/src/prngs/sprng.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/prngs/sprng.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,8 +5,6 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" @@ -14,7 +12,7 @@ @file sprng.c Secure PRNG, Tom St Denis */ - + /* A secure PRNG using the RNG functions. Basically this is a * wrapper that allows you to use a secure RNG as a PRNG * in the various other functions. @@ -39,10 +37,11 @@ Start the PRNG @param prng [out] The PRNG state to initialize @return CRYPT_OK if successful -*/ +*/ int sprng_start(prng_state *prng) { - return CRYPT_OK; + LTC_UNUSED_PARAM(prng); + return CRYPT_OK; } /** @@ -51,9 +50,12 @@ @param inlen Length of the data to add @param prng PRNG state to update @return CRYPT_OK if successful -*/ +*/ int sprng_add_entropy(const unsigned char *in, unsigned long inlen, prng_state *prng) { + LTC_UNUSED_PARAM(in); + LTC_UNUSED_PARAM(inlen); + LTC_UNUSED_PARAM(prng); return CRYPT_OK; } @@ -61,9 +63,10 @@ Make the PRNG ready to read from @param prng The PRNG to make active @return CRYPT_OK if successful -*/ +*/ int sprng_ready(prng_state *prng) { + LTC_UNUSED_PARAM(prng); return CRYPT_OK; } @@ -73,10 +76,11 @@ @param outlen Length of output @param prng The active PRNG to read from @return Number of octets read -*/ +*/ unsigned long sprng_read(unsigned char *out, unsigned long outlen, prng_state *prng) { LTC_ARGCHK(out != NULL); + LTC_UNUSED_PARAM(prng); return rng_get_bytes(out, outlen, NULL); } @@ -84,9 +88,10 @@ Terminate the PRNG @param prng The PRNG to terminate @return CRYPT_OK if successful -*/ +*/ int sprng_done(prng_state *prng) { + LTC_UNUSED_PARAM(prng); return CRYPT_OK; } @@ -96,41 +101,61 @@ @param outlen [in/out] Max size and resulting size of the state @param prng The PRNG to export @return CRYPT_OK if successful -*/ +*/ int sprng_export(unsigned char *out, unsigned long *outlen, prng_state *prng) { LTC_ARGCHK(outlen != NULL); + LTC_UNUSED_PARAM(out); + LTC_UNUSED_PARAM(prng); *outlen = 0; return CRYPT_OK; } - + /** Import a PRNG state @param in The PRNG state @param inlen Size of the state @param prng The PRNG to import @return CRYPT_OK if successful -*/ +*/ int sprng_import(const unsigned char *in, unsigned long inlen, prng_state *prng) { + LTC_UNUSED_PARAM(in); + LTC_UNUSED_PARAM(inlen); + LTC_UNUSED_PARAM(prng); return CRYPT_OK; } /** PRNG self-test @return CRYPT_OK if successful, CRYPT_NOP if self-testing has been disabled -*/ +*/ int sprng_test(void) { +#ifndef LTC_TEST + return CRYPT_NOP; +#else + prng_state st; + unsigned char en[] = { 0x01, 0x02, 0x03, 0x04 }; + unsigned char out[1000]; + int err; + + if ((err = sprng_start(&st)) != CRYPT_OK) return err; + if ((err = sprng_add_entropy(en, sizeof(en), &st)) != CRYPT_OK) return err; + if ((err = sprng_ready(&st)) != CRYPT_OK) return err; + if (sprng_read(out, 500, &st) != 500) return CRYPT_ERROR_READPRNG; /* skip 500 bytes */ + if ((err = sprng_done(&st)) != CRYPT_OK) return err; + return CRYPT_OK; +#endif } #endif - + -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/prngs/yarrow.c --- a/libtomcrypt/src/prngs/yarrow.c Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/src/prngs/yarrow.c Fri Feb 09 21:44:05 2018 +0800 @@ -5,15 +5,13 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" /** @file yarrow.c Yarrow PRNG, Tom St Denis -*/ +*/ #ifdef LTC_YARROW @@ -34,12 +32,13 @@ Start the PRNG @param prng [out] The PRNG state to initialize @return CRYPT_OK if successful -*/ +*/ int yarrow_start(prng_state *prng) { int err; - + LTC_ARGCHK(prng != NULL); + prng->ready = 0; /* these are the default hash/cipher combo used */ #ifdef LTC_RIJNDAEL @@ -64,13 +63,13 @@ prng->yarrow.cipher = register_cipher(&saferp_desc); #elif defined(LTC_RC2) prng->yarrow.cipher = register_cipher(&rc2_desc); -#elif defined(LTC_NOEKEON) +#elif defined(LTC_NOEKEON) prng->yarrow.cipher = register_cipher(&noekeon_desc); -#elif defined(LTC_ANUBIS) +#elif defined(LTC_ANUBIS) prng->yarrow.cipher = register_cipher(&anubis_desc); -#elif defined(LTC_KSEED) +#elif defined(LTC_KSEED) prng->yarrow.cipher = register_cipher(&kseed_desc); -#elif defined(LTC_KHAZAD) +#elif defined(LTC_KHAZAD) prng->yarrow.cipher = register_cipher(&khazad_desc); #elif defined(LTC_CAST5) prng->yarrow.cipher = register_cipher(&cast5_desc); @@ -120,7 +119,7 @@ /* zero the memory used */ zeromem(prng->yarrow.pool, sizeof(prng->yarrow.pool)); - LTC_MUTEX_INIT(&prng->yarrow.prng_lock) + LTC_MUTEX_INIT(&prng->lock) return CRYPT_OK; } @@ -131,78 +130,71 @@ @param inlen Length of the data to add @param prng PRNG state to update @return CRYPT_OK if successful -*/ +*/ int yarrow_add_entropy(const unsigned char *in, unsigned long inlen, prng_state *prng) { hash_state md; int err; - LTC_ARGCHK(in != NULL); LTC_ARGCHK(prng != NULL); - - LTC_MUTEX_LOCK(&prng->yarrow.prng_lock); - + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(inlen > 0); + + LTC_MUTEX_LOCK(&prng->lock); + if ((err = hash_is_valid(prng->yarrow.hash)) != CRYPT_OK) { - LTC_MUTEX_UNLOCK(&prng->yarrow.prng_lock); - return err; + goto LBL_UNLOCK; } /* start the hash */ if ((err = hash_descriptor[prng->yarrow.hash].init(&md)) != CRYPT_OK) { - LTC_MUTEX_UNLOCK(&prng->yarrow.prng_lock); - return err; + goto LBL_UNLOCK; } /* hash the current pool */ - if ((err = hash_descriptor[prng->yarrow.hash].process(&md, prng->yarrow.pool, + if ((err = hash_descriptor[prng->yarrow.hash].process(&md, prng->yarrow.pool, hash_descriptor[prng->yarrow.hash].hashsize)) != CRYPT_OK) { - LTC_MUTEX_UNLOCK(&prng->yarrow.prng_lock); - return err; + goto LBL_UNLOCK; } /* add the new entropy */ if ((err = hash_descriptor[prng->yarrow.hash].process(&md, in, inlen)) != CRYPT_OK) { - LTC_MUTEX_UNLOCK(&prng->yarrow.prng_lock); - return err; + goto LBL_UNLOCK; } /* store result */ - if ((err = hash_descriptor[prng->yarrow.hash].done(&md, prng->yarrow.pool)) != CRYPT_OK) { - LTC_MUTEX_UNLOCK(&prng->yarrow.prng_lock); - return err; - } + err = hash_descriptor[prng->yarrow.hash].done(&md, prng->yarrow.pool); - LTC_MUTEX_UNLOCK(&prng->yarrow.prng_lock); - return CRYPT_OK; +LBL_UNLOCK: + LTC_MUTEX_UNLOCK(&prng->lock); + return err; } /** Make the PRNG ready to read from @param prng The PRNG to make active @return CRYPT_OK if successful -*/ +*/ int yarrow_ready(prng_state *prng) { int ks, err; LTC_ARGCHK(prng != NULL); - LTC_MUTEX_LOCK(&prng->yarrow.prng_lock); + + LTC_MUTEX_LOCK(&prng->lock); if ((err = hash_is_valid(prng->yarrow.hash)) != CRYPT_OK) { - LTC_MUTEX_UNLOCK(&prng->yarrow.prng_lock); - return err; + goto LBL_UNLOCK; } - + if ((err = cipher_is_valid(prng->yarrow.cipher)) != CRYPT_OK) { - LTC_MUTEX_UNLOCK(&prng->yarrow.prng_lock); - return err; + goto LBL_UNLOCK; } /* setup CTR mode using the "pool" as the key */ ks = (int)hash_descriptor[prng->yarrow.hash].hashsize; if ((err = cipher_descriptor[prng->yarrow.cipher].keysize(&ks)) != CRYPT_OK) { - LTC_MUTEX_UNLOCK(&prng->yarrow.prng_lock); - return err; + goto LBL_UNLOCK; } if ((err = ctr_start(prng->yarrow.cipher, /* what cipher to use */ @@ -211,11 +203,13 @@ 0, /* number of rounds */ CTR_COUNTER_LITTLE_ENDIAN, /* little endian counter */ &prng->yarrow.ctr)) != CRYPT_OK) { - LTC_MUTEX_UNLOCK(&prng->yarrow.prng_lock); - return err; + goto LBL_UNLOCK; } - LTC_MUTEX_UNLOCK(&prng->yarrow.prng_lock); - return CRYPT_OK; + prng->ready = 1; + +LBL_UNLOCK: + LTC_MUTEX_UNLOCK(&prng->lock); + return err; } /** @@ -224,23 +218,28 @@ @param outlen Length of output @param prng The active PRNG to read from @return Number of octets read -*/ +*/ unsigned long yarrow_read(unsigned char *out, unsigned long outlen, prng_state *prng) { - LTC_ARGCHK(out != NULL); - LTC_ARGCHK(prng != NULL); + if (outlen == 0 || prng == NULL || out == NULL) return 0; + + LTC_MUTEX_LOCK(&prng->lock); - LTC_MUTEX_LOCK(&prng->yarrow.prng_lock); + if (!prng->ready) { + outlen = 0; + goto LBL_UNLOCK; + } /* put out in predictable state first */ zeromem(out, outlen); - + /* now randomize it */ if (ctr_encrypt(out, out, outlen, &prng->yarrow.ctr) != CRYPT_OK) { - LTC_MUTEX_UNLOCK(&prng->yarrow.prng_lock); - return 0; + outlen = 0; } - LTC_MUTEX_UNLOCK(&prng->yarrow.prng_lock); + +LBL_UNLOCK: + LTC_MUTEX_UNLOCK(&prng->lock); return outlen; } @@ -248,20 +247,22 @@ Terminate the PRNG @param prng The PRNG to terminate @return CRYPT_OK if successful -*/ +*/ int yarrow_done(prng_state *prng) { int err; LTC_ARGCHK(prng != NULL); - LTC_MUTEX_LOCK(&prng->yarrow.prng_lock); + LTC_MUTEX_LOCK(&prng->lock); + prng->ready = 0; /* call cipher done when we invent one ;-) */ /* we invented one */ err = ctr_done(&prng->yarrow.ctr); - - LTC_MUTEX_UNLOCK(&prng->yarrow.prng_lock); + + LTC_MUTEX_UNLOCK(&prng->lock); + LTC_MUTEX_DESTROY(&prng->lock); return err; } @@ -271,65 +272,52 @@ @param outlen [in/out] Max size and resulting size of the state @param prng The PRNG to export @return CRYPT_OK if successful -*/ +*/ int yarrow_export(unsigned char *out, unsigned long *outlen, prng_state *prng) { + unsigned long len = yarrow_desc.export_size; + LTC_ARGCHK(out != NULL); LTC_ARGCHK(outlen != NULL); LTC_ARGCHK(prng != NULL); - LTC_MUTEX_LOCK(&prng->yarrow.prng_lock); - - /* we'll write 64 bytes for s&g's */ - if (*outlen < 64) { - LTC_MUTEX_UNLOCK(&prng->yarrow.prng_lock); - *outlen = 64; + if (*outlen < len) { + *outlen = len; return CRYPT_BUFFER_OVERFLOW; } - if (yarrow_read(out, 64, prng) != 64) { - LTC_MUTEX_UNLOCK(&prng->yarrow.prng_lock); + if (yarrow_read(out, len, prng) != len) { return CRYPT_ERROR_READPRNG; } - *outlen = 64; + *outlen = len; return CRYPT_OK; } - + /** Import a PRNG state @param in The PRNG state @param inlen Size of the state @param prng The PRNG to import @return CRYPT_OK if successful -*/ +*/ int yarrow_import(const unsigned char *in, unsigned long inlen, prng_state *prng) { int err; LTC_ARGCHK(in != NULL); LTC_ARGCHK(prng != NULL); - - LTC_MUTEX_LOCK(&prng->yarrow.prng_lock); - - if (inlen != 64) { - LTC_MUTEX_UNLOCK(&prng->yarrow.prng_lock); - return CRYPT_INVALID_ARG; - } + if (inlen < (unsigned long)yarrow_desc.export_size) return CRYPT_INVALID_ARG; - if ((err = yarrow_start(prng)) != CRYPT_OK) { - LTC_MUTEX_UNLOCK(&prng->yarrow.prng_lock); - return err; - } - err = yarrow_add_entropy(in, 64, prng); - LTC_MUTEX_UNLOCK(&prng->yarrow.prng_lock); - return err; + if ((err = yarrow_start(prng)) != CRYPT_OK) return err; + if ((err = yarrow_add_entropy(in, inlen, prng)) != CRYPT_OK) return err; + return CRYPT_OK; } /** PRNG self-test @return CRYPT_OK if successful, CRYPT_NOP if self-testing has been disabled -*/ +*/ int yarrow_test(void) { #ifndef LTC_TEST @@ -341,13 +329,15 @@ if ((err = yarrow_start(&prng)) != CRYPT_OK) { return err; } - + /* now let's test the hash/cipher that was chosen */ - if ((err = cipher_descriptor[prng.yarrow.cipher].test()) != CRYPT_OK) { - return err; + if (cipher_descriptor[prng.yarrow.cipher].test && + ((err = cipher_descriptor[prng.yarrow.cipher].test()) != CRYPT_OK)) { + return err; } - if ((err = hash_descriptor[prng.yarrow.hash].test()) != CRYPT_OK) { - return err; + if (hash_descriptor[prng.yarrow.hash].test && + ((err = hash_descriptor[prng.yarrow.hash].test()) != CRYPT_OK)) { + return err; } return CRYPT_OK; @@ -357,6 +347,6 @@ #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/stream/chacha/chacha_crypt.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/stream/chacha/chacha_crypt.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,101 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/* The implementation is based on: + * chacha-ref.c version 20080118 + * Public domain from D. J. Bernstein + */ + +#include "tomcrypt.h" + +#ifdef LTC_CHACHA + +#define QUARTERROUND(a,b,c,d) \ + x[a] += x[b]; x[d] = ROL(x[d] ^ x[a], 16); \ + x[c] += x[d]; x[b] = ROL(x[b] ^ x[c], 12); \ + x[a] += x[b]; x[d] = ROL(x[d] ^ x[a], 8); \ + x[c] += x[d]; x[b] = ROL(x[b] ^ x[c], 7); + +static void _chacha_block(unsigned char *output, const ulong32 *input, int rounds) +{ + ulong32 x[16]; + int i; + XMEMCPY(x, input, sizeof(x)); + for (i = rounds; i > 0; i -= 2) { + QUARTERROUND(0, 4, 8,12) + QUARTERROUND(1, 5, 9,13) + QUARTERROUND(2, 6,10,14) + QUARTERROUND(3, 7,11,15) + QUARTERROUND(0, 5,10,15) + QUARTERROUND(1, 6,11,12) + QUARTERROUND(2, 7, 8,13) + QUARTERROUND(3, 4, 9,14) + } + for (i = 0; i < 16; ++i) { + x[i] += input[i]; + STORE32L(x[i], output + 4 * i); + } +} + +/** + Encrypt (or decrypt) bytes of ciphertext (or plaintext) with ChaCha + @param st The ChaCha state + @param in The plaintext (or ciphertext) + @param inlen The length of the input (octets) + @param out [out] The ciphertext (or plaintext), length inlen + @return CRYPT_OK if successful +*/ +int chacha_crypt(chacha_state *st, const unsigned char *in, unsigned long inlen, unsigned char *out) +{ + unsigned char buf[64]; + unsigned long i, j; + + if (inlen == 0) return CRYPT_OK; /* nothing to do */ + + LTC_ARGCHK(st != NULL); + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(out != NULL); + LTC_ARGCHK(st->ivlen != 0); + + if (st->ksleft > 0) { + j = MIN(st->ksleft, inlen); + for (i = 0; i < j; ++i, st->ksleft--) out[i] = in[i] ^ st->kstream[64 - st->ksleft]; + inlen -= j; + if (inlen == 0) return CRYPT_OK; + out += j; + in += j; + } + for (;;) { + _chacha_block(buf, st->input, st->rounds); + if (st->ivlen == 8) { + /* IV-64bit, increment 64bit counter */ + if (0 == ++st->input[12] && 0 == ++st->input[13]) return CRYPT_OVERFLOW; + } + else { + /* IV-96bit, increment 32bit counter */ + if (0 == ++st->input[12]) return CRYPT_OVERFLOW; + } + if (inlen <= 64) { + for (i = 0; i < inlen; ++i) out[i] = in[i] ^ buf[i]; + st->ksleft = 64 - inlen; + for (i = inlen; i < 64; ++i) st->kstream[i] = buf[i]; + return CRYPT_OK; + } + for (i = 0; i < 64; ++i) out[i] = in[i] ^ buf[i]; + inlen -= 64; + out += 64; + in += 64; + } +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/stream/chacha/chacha_done.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/stream/chacha/chacha_done.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,30 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_CHACHA + +/** + Terminate and clear ChaCha state + @param st The ChaCha state + @return CRYPT_OK on success +*/ +int chacha_done(chacha_state *st) +{ + LTC_ARGCHK(st != NULL); + XMEMSET(st, 0, sizeof(chacha_state)); + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/stream/chacha/chacha_ivctr32.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/stream/chacha/chacha_ivctr32.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,47 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/* The implementation is based on: + * chacha-ref.c version 20080118 + * Public domain from D. J. Bernstein + */ + +#include "tomcrypt.h" + +#ifdef LTC_CHACHA + +/** + Set IV + counter data to the ChaCha state + @param st The ChaCha20 state + @param iv The IV data to add + @param ivlen The length of the IV (must be 12) + @param counter 32bit (unsigned) initial counter value + @return CRYPT_OK on success + */ +int chacha_ivctr32(chacha_state *st, const unsigned char *iv, unsigned long ivlen, ulong32 counter) +{ + LTC_ARGCHK(st != NULL); + LTC_ARGCHK(iv != NULL); + /* 96bit IV + 32bit counter */ + LTC_ARGCHK(ivlen == 12); + + st->input[12] = counter; + LOAD32L(st->input[13], iv + 0); + LOAD32L(st->input[14], iv + 4); + LOAD32L(st->input[15], iv + 8); + st->ksleft = 0; + st->ivlen = ivlen; + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/stream/chacha/chacha_ivctr64.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/stream/chacha/chacha_ivctr64.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,47 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/* The implementation is based on: + * chacha-ref.c version 20080118 + * Public domain from D. J. Bernstein + */ + +#include "tomcrypt.h" + +#ifdef LTC_CHACHA + +/** + Set IV + counter data to the ChaCha state + @param st The ChaCha20 state + @param iv The IV data to add + @param ivlen The length of the IV (must be 8) + @param counter 64bit (unsigned) initial counter value + @return CRYPT_OK on success + */ +int chacha_ivctr64(chacha_state *st, const unsigned char *iv, unsigned long ivlen, ulong64 counter) +{ + LTC_ARGCHK(st != NULL); + LTC_ARGCHK(iv != NULL); + /* 64bit IV + 64bit counter */ + LTC_ARGCHK(ivlen == 8); + + st->input[12] = (ulong32)(counter & 0xFFFFFFFF); + st->input[13] = (ulong32)(counter >> 32); + LOAD32L(st->input[14], iv + 0); + LOAD32L(st->input[15], iv + 4); + st->ksleft = 0; + st->ivlen = ivlen; + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/stream/chacha/chacha_keystream.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/stream/chacha/chacha_keystream.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,38 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/* The implementation is based on: + * chacha-ref.c version 20080118 + * Public domain from D. J. Bernstein + */ + +#include "tomcrypt.h" + +#ifdef LTC_CHACHA + +/** + Generate a stream of random bytes via ChaCha + @param st The ChaCha20 state + @param out [out] The output buffer + @param outlen The output length + @return CRYPT_OK on success + */ +int chacha_keystream(chacha_state *st, unsigned char *out, unsigned long outlen) +{ + if (outlen == 0) return CRYPT_OK; /* nothing to do */ + LTC_ARGCHK(out != NULL); + XMEMSET(out, 0, outlen); + return chacha_crypt(st, out, outlen, out); +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/stream/chacha/chacha_setup.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/stream/chacha/chacha_setup.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,67 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/* The implementation is based on: + * chacha-ref.c version 20080118 + * Public domain from D. J. Bernstein + */ + +#include "tomcrypt.h" + +#ifdef LTC_CHACHA + +static const char * const sigma = "expand 32-byte k"; +static const char * const tau = "expand 16-byte k"; + +/** + Initialize an ChaCha context (only the key) + @param st [out] The destination of the ChaCha state + @param key The secret key + @param keylen The length of the secret key (octets) + @param rounds Number of rounds (e.g. 20 for ChaCha20) + @return CRYPT_OK if successful +*/ +int chacha_setup(chacha_state *st, const unsigned char *key, unsigned long keylen, int rounds) +{ + const char *constants; + + LTC_ARGCHK(st != NULL); + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(keylen == 32 || keylen == 16); + + if (rounds == 0) rounds = 20; + + LOAD32L(st->input[4], key + 0); + LOAD32L(st->input[5], key + 4); + LOAD32L(st->input[6], key + 8); + LOAD32L(st->input[7], key + 12); + if (keylen == 32) { /* 256bit */ + key += 16; + constants = sigma; + } else { /* 128bit */ + constants = tau; + } + LOAD32L(st->input[8], key + 0); + LOAD32L(st->input[9], key + 4); + LOAD32L(st->input[10], key + 8); + LOAD32L(st->input[11], key + 12); + LOAD32L(st->input[0], constants + 0); + LOAD32L(st->input[1], constants + 4); + LOAD32L(st->input[2], constants + 8); + LOAD32L(st->input[3], constants + 12); + st->rounds = rounds; /* e.g. 20 for chacha20 */ + st->ivlen = 0; /* will be set later by chacha_ivctr(32|64) */ + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/stream/chacha/chacha_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/stream/chacha/chacha_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,71 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/* The implementation is based on: + * chacha-ref.c version 20080118 + * Public domain from D. J. Bernstein + */ + +#include "tomcrypt.h" + +#ifdef LTC_CHACHA + +int chacha_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + unsigned long len; + unsigned char out[1000]; + /* https://tools.ietf.org/html/rfc7539#section-2.4.2 */ + unsigned char k[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }; + unsigned char n[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x00 }; + unsigned char ct[] = { 0x6E, 0x2E, 0x35, 0x9A, 0x25, 0x68, 0xF9, 0x80, 0x41, 0xBA, 0x07, 0x28, 0xDD, 0x0D, 0x69, 0x81, + 0xE9, 0x7E, 0x7A, 0xEC, 0x1D, 0x43, 0x60, 0xC2, 0x0A, 0x27, 0xAF, 0xCC, 0xFD, 0x9F, 0xAE, 0x0B, + 0xF9, 0x1B, 0x65, 0xC5, 0x52, 0x47, 0x33, 0xAB, 0x8F, 0x59, 0x3D, 0xAB, 0xCD, 0x62, 0xB3, 0x57, + 0x16, 0x39, 0xD6, 0x24, 0xE6, 0x51, 0x52, 0xAB, 0x8F, 0x53, 0x0C, 0x35, 0x9F, 0x08, 0x61, 0xD8, + 0x07, 0xCA, 0x0D, 0xBF, 0x50, 0x0D, 0x6A, 0x61, 0x56, 0xA3, 0x8E, 0x08, 0x8A, 0x22, 0xB6, 0x5E, + 0x52, 0xBC, 0x51, 0x4D, 0x16, 0xCC, 0xF8, 0x06, 0x81, 0x8C, 0xE9, 0x1A, 0xB7, 0x79, 0x37, 0x36, + 0x5A, 0xF9, 0x0B, 0xBF, 0x74, 0xA3, 0x5B, 0xE6, 0xB4, 0x0B, 0x8E, 0xED, 0xF2, 0x78, 0x5E, 0x42, + 0x87, 0x4D }; + char pt[] = "Ladies and Gentlemen of the class of '99: If I could offer you only one tip for the future, sunscreen would be it."; + chacha_state st; + int err; + + len = strlen(pt); + /* crypt piece by piece */ + if ((err = chacha_setup(&st, k, sizeof(k), 20)) != CRYPT_OK) return err; + if ((err = chacha_ivctr32(&st, n, sizeof(n), 1)) != CRYPT_OK) return err; + if ((err = chacha_crypt(&st, (unsigned char*)pt, 35, out)) != CRYPT_OK) return err; + if ((err = chacha_crypt(&st, (unsigned char*)pt + 35, 35, out + 35)) != CRYPT_OK) return err; + if ((err = chacha_crypt(&st, (unsigned char*)pt + 70, 5, out + 70)) != CRYPT_OK) return err; + if ((err = chacha_crypt(&st, (unsigned char*)pt + 75, 5, out + 75)) != CRYPT_OK) return err; + if ((err = chacha_crypt(&st, (unsigned char*)pt + 80, len - 80, out + 80)) != CRYPT_OK) return err; + if (compare_testvector(out, len, ct, sizeof(ct), "CHACHA-TV1", 1)) return CRYPT_FAIL_TESTVECTOR; + /* crypt in one go */ + if ((err = chacha_setup(&st, k, sizeof(k), 20)) != CRYPT_OK) return err; + if ((err = chacha_ivctr32(&st, n, sizeof(n), 1)) != CRYPT_OK) return err; + if ((err = chacha_crypt(&st, (unsigned char*)pt, len, out)) != CRYPT_OK) return err; + if (compare_testvector(out, len, ct, sizeof(ct), "CHACHA-TV2", 1)) return CRYPT_FAIL_TESTVECTOR; + /* crypt in one go - using chacha_ivctr64() */ + if ((err = chacha_setup(&st, k, sizeof(k), 20)) != CRYPT_OK) return err; + if ((err = chacha_ivctr64(&st, n + 4, sizeof(n) - 4, 1)) != CRYPT_OK) return err; + if ((err = chacha_crypt(&st, (unsigned char*)pt, len, out)) != CRYPT_OK) return err; + if (compare_testvector(out, len, ct, sizeof(ct), "CHACHA-TV3", 1)) return CRYPT_FAIL_TESTVECTOR; + + return CRYPT_OK; +#endif +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/stream/rc4/rc4_stream.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/stream/rc4/rc4_stream.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,111 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_RC4_STREAM + +/** + Initialize an RC4 context (only the key) + @param st [out] The destination of the RC4 state + @param key The secret key + @param keylen The length of the secret key (8 - 256 bytes) + @return CRYPT_OK if successful +*/ +int rc4_stream_setup(rc4_state *st, const unsigned char *key, unsigned long keylen) +{ + unsigned char tmp, *s; + int x, y; + unsigned long j; + + LTC_ARGCHK(st != NULL); + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(keylen >= 5); /* 40-2048 bits */ + + s = st->buf; + for (x = 0; x < 256; x++) { + s[x] = x; + } + + for (j = x = y = 0; x < 256; x++) { + y = (y + s[x] + key[j++]) & 255; + if (j == keylen) { + j = 0; + } + tmp = s[x]; s[x] = s[y]; s[y] = tmp; + } + st->x = 0; + st->y = 0; + + return CRYPT_OK; +} + +/** + Encrypt (or decrypt) bytes of ciphertext (or plaintext) with RC4 + @param st The RC4 state + @param in The plaintext (or ciphertext) + @param inlen The length of the input (octets) + @param out [out] The ciphertext (or plaintext), length inlen + @return CRYPT_OK if successful +*/ +int rc4_stream_crypt(rc4_state *st, const unsigned char *in, unsigned long inlen, unsigned char *out) +{ + unsigned char x, y, *s, tmp; + + LTC_ARGCHK(st != NULL); + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(out != NULL); + + x = st->x; + y = st->y; + s = st->buf; + while (inlen--) { + x = (x + 1) & 255; + y = (y + s[x]) & 255; + tmp = s[x]; s[x] = s[y]; s[y] = tmp; + tmp = (s[x] + s[y]) & 255; + *out++ = *in++ ^ s[tmp]; + } + st->x = x; + st->y = y; + return CRYPT_OK; +} + +/** + Generate a stream of random bytes via RC4 + @param st The RC420 state + @param out [out] The output buffer + @param outlen The output length + @return CRYPT_OK on success + */ +int rc4_stream_keystream(rc4_state *st, unsigned char *out, unsigned long outlen) +{ + if (outlen == 0) return CRYPT_OK; /* nothing to do */ + LTC_ARGCHK(out != NULL); + XMEMSET(out, 0, outlen); + return rc4_stream_crypt(st, out, outlen, out); +} + +/** + Terminate and clear RC4 state + @param st The RC4 state + @return CRYPT_OK on success +*/ +int rc4_stream_done(rc4_state *st) +{ + LTC_ARGCHK(st != NULL); + XMEMSET(st, 0, sizeof(rc4_state)); + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/stream/rc4/rc4_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/stream/rc4/rc4_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,39 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_RC4_STREAM + +int rc4_stream_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + rc4_state st; + int err; + const unsigned char key[] = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }; + const unsigned char pt[] = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }; + const unsigned char ct[] = { 0x75, 0xb7, 0x87, 0x80, 0x99, 0xe0, 0xc5, 0x96 }; + unsigned char buf[10]; + + if ((err = rc4_stream_setup(&st, key, sizeof(key))) != CRYPT_OK) return err; + if ((err = rc4_stream_crypt(&st, pt, sizeof(pt), buf)) != CRYPT_OK) return err; + if (compare_testvector(buf, sizeof(ct), ct, sizeof(ct), "RC4", 0)) return CRYPT_FAIL_TESTVECTOR; + if ((err = rc4_stream_done(&st)) != CRYPT_OK) return err; + + return CRYPT_OK; +#endif +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/stream/sober128/sober128_stream.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/stream/sober128/sober128_stream.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,346 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file sober128_stream.c + Implementation of SOBER-128 by Tom St Denis. + Based on s128fast.c reference code supplied by Greg Rose of QUALCOMM. +*/ + +#ifdef LTC_SOBER128 + +#define __LTC_SOBER128TAB_C__ +#include "sober128tab.c" + +/* don't change these... */ +#define N 17 +#define FOLD N /* how many iterations of folding to do */ +#define INITKONST 0x6996c53a /* value of KONST to use during key loading */ +#define KEYP 15 /* where to insert key words */ +#define FOLDP 4 /* where to insert non-linear feedback */ + +#define B(x,i) ((unsigned char)(((x) >> (8*i)) & 0xFF)) + +static ulong32 BYTE2WORD(unsigned char *b) +{ + ulong32 t; + LOAD32L(t, b); + return t; +} + +static void XORWORD(ulong32 w, const unsigned char *in, unsigned char *out) +{ + ulong32 t; + LOAD32L(t, in); + t ^= w; + STORE32L(t, out); +} + +/* give correct offset for the current position of the register, + * where logically R[0] is at position "zero". + */ +#define OFF(zero, i) (((zero)+(i)) % N) + +/* step the LFSR */ +/* After stepping, "zero" moves right one place */ +#define STEP(R,z) \ + R[OFF(z,0)] = R[OFF(z,15)] ^ R[OFF(z,4)] ^ (R[OFF(z,0)] << 8) ^ Multab[(R[OFF(z,0)] >> 24) & 0xFF]; + +static void cycle(ulong32 *R) +{ + ulong32 t; + int i; + + STEP(R,0); + t = R[0]; + for (i = 1; i < N; ++i) { + R[i-1] = R[i]; + } + R[N-1] = t; +} + +/* Return a non-linear function of some parts of the register. + */ +#define NLFUNC(c,z) \ +{ \ + t = c->R[OFF(z,0)] + c->R[OFF(z,16)]; \ + t ^= Sbox[(t >> 24) & 0xFF]; \ + t = RORc(t, 8); \ + t = ((t + c->R[OFF(z,1)]) ^ c->konst) + c->R[OFF(z,6)]; \ + t ^= Sbox[(t >> 24) & 0xFF]; \ + t = t + c->R[OFF(z,13)]; \ +} + +static ulong32 nltap(sober128_state *c) +{ + ulong32 t; + NLFUNC(c, 0); + return t; +} + +/* Save the current register state + */ +static void s128_savestate(sober128_state *c) +{ + int i; + for (i = 0; i < N; ++i) { + c->initR[i] = c->R[i]; + } +} + +/* initialise to previously saved register state + */ +static void s128_reloadstate(sober128_state *c) +{ + int i; + + for (i = 0; i < N; ++i) { + c->R[i] = c->initR[i]; + } +} + +/* Initialise "konst" + */ +static void s128_genkonst(sober128_state *c) +{ + ulong32 newkonst; + + do { + cycle(c->R); + newkonst = nltap(c); + } while ((newkonst & 0xFF000000) == 0); + c->konst = newkonst; +} + +/* Load key material into the register + */ +#define ADDKEY(k) \ + c->R[KEYP] += (k); + +#define XORNL(nl) \ + c->R[FOLDP] ^= (nl); + +/* nonlinear diffusion of register for key */ +#define DROUND(z) STEP(c->R,z); NLFUNC(c,(z+1)); c->R[OFF((z+1),FOLDP)] ^= t; +static void s128_diffuse(sober128_state *c) +{ + ulong32 t; + /* relies on FOLD == N == 17! */ + DROUND(0); + DROUND(1); + DROUND(2); + DROUND(3); + DROUND(4); + DROUND(5); + DROUND(6); + DROUND(7); + DROUND(8); + DROUND(9); + DROUND(10); + DROUND(11); + DROUND(12); + DROUND(13); + DROUND(14); + DROUND(15); + DROUND(16); +} + +/** + Initialize an Sober128 context (only the key) + @param c [out] The destination of the Sober128 state + @param key The secret key + @param keylen The length of the secret key (octets) + @return CRYPT_OK if successful +*/ +int sober128_stream_setup(sober128_state *c, const unsigned char *key, unsigned long keylen) +{ + ulong32 i, k; + + LTC_ARGCHK(c != NULL); + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(keylen > 0); + + /* keylen must be multiple of 4 bytes */ + if ((keylen & 3) != 0) { + return CRYPT_INVALID_KEYSIZE; + } + + /* Register initialised to Fibonacci numbers */ + c->R[0] = 1; + c->R[1] = 1; + for (i = 2; i < N; ++i) { + c->R[i] = c->R[i-1] + c->R[i-2]; + } + c->konst = INITKONST; + + for (i = 0; i < keylen; i += 4) { + k = BYTE2WORD((unsigned char *)&key[i]); + ADDKEY(k); + cycle(c->R); + XORNL(nltap(c)); + } + + /* also fold in the length of the key */ + ADDKEY(keylen); + + /* now diffuse */ + s128_diffuse(c); + s128_genkonst(c); + s128_savestate(c); + c->nbuf = 0; + + return CRYPT_OK; +} + +/** + Set IV to the Sober128 state + @param c The Sober12820 state + @param iv The IV data to add + @param ivlen The length of the IV (must be 12) + @return CRYPT_OK on success + */ +int sober128_stream_setiv(sober128_state *c, const unsigned char *iv, unsigned long ivlen) +{ + ulong32 i, k; + + LTC_ARGCHK(c != NULL); + LTC_ARGCHK(iv != NULL); + LTC_ARGCHK(ivlen > 0); + + /* ok we are adding an IV then... */ + s128_reloadstate(c); + + /* ivlen must be multiple of 4 bytes */ + if ((ivlen & 3) != 0) { + return CRYPT_INVALID_KEYSIZE; + } + + for (i = 0; i < ivlen; i += 4) { + k = BYTE2WORD((unsigned char *)&iv[i]); + ADDKEY(k); + cycle(c->R); + XORNL(nltap(c)); + } + + /* also fold in the length of the key */ + ADDKEY(ivlen); + + /* now diffuse */ + s128_diffuse(c); + c->nbuf = 0; + + return CRYPT_OK; +} + +/* XOR pseudo-random bytes into buffer + */ +#define SROUND(z) STEP(c->R,z); NLFUNC(c,(z+1)); XORWORD(t, in+(z*4), out+(z*4)); + +/** + Encrypt (or decrypt) bytes of ciphertext (or plaintext) with Sober128 + @param c The Sober128 state + @param in The plaintext (or ciphertext) + @param inlen The length of the input (octets) + @param out [out] The ciphertext (or plaintext), length inlen + @return CRYPT_OK if successful +*/ +int sober128_stream_crypt(sober128_state *c, const unsigned char *in, unsigned long inlen, unsigned char *out) +{ + ulong32 t; + + if (inlen == 0) return CRYPT_OK; /* nothing to do */ + LTC_ARGCHK(out != NULL); + LTC_ARGCHK(c != NULL); + + /* handle any previously buffered bytes */ + while (c->nbuf != 0 && inlen != 0) { + *out++ = *in++ ^ (unsigned char)(c->sbuf & 0xFF); + c->sbuf >>= 8; + c->nbuf -= 8; + --inlen; + } + +#ifndef LTC_SMALL_CODE + /* do lots at a time, if there's enough to do */ + while (inlen >= N*4) { + SROUND(0); + SROUND(1); + SROUND(2); + SROUND(3); + SROUND(4); + SROUND(5); + SROUND(6); + SROUND(7); + SROUND(8); + SROUND(9); + SROUND(10); + SROUND(11); + SROUND(12); + SROUND(13); + SROUND(14); + SROUND(15); + SROUND(16); + out += 4*N; + in += 4*N; + inlen -= 4*N; + } +#endif + + /* do small or odd size buffers the slow way */ + while (4 <= inlen) { + cycle(c->R); + t = nltap(c); + XORWORD(t, in, out); + out += 4; + in += 4; + inlen -= 4; + } + + /* handle any trailing bytes */ + if (inlen != 0) { + cycle(c->R); + c->sbuf = nltap(c); + c->nbuf = 32; + while (c->nbuf != 0 && inlen != 0) { + *out++ = *in++ ^ (unsigned char)(c->sbuf & 0xFF); + c->sbuf >>= 8; + c->nbuf -= 8; + --inlen; + } + } + + return CRYPT_OK; +} + +int sober128_stream_keystream(sober128_state *c, unsigned char *out, unsigned long outlen) +{ + if (outlen == 0) return CRYPT_OK; /* nothing to do */ + LTC_ARGCHK(out != NULL); + XMEMSET(out, 0, outlen); + return sober128_stream_crypt(c, out, outlen, out); +} + +/** + Terminate and clear Sober128 state + @param c The Sober128 state + @return CRYPT_OK on success +*/ +int sober128_stream_done(sober128_state *c) +{ + LTC_ARGCHK(c != NULL); + XMEMSET(c, 0, sizeof(sober128_state)); + return CRYPT_OK; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/stream/sober128/sober128_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/stream/sober128/sober128_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,45 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "tomcrypt.h" + +#ifdef LTC_SOBER128 + +int sober128_stream_test(void) +{ +#ifndef LTC_TEST + return CRYPT_NOP; +#else + unsigned char key[16] = { 0x74, 0x65, 0x73, 0x74, 0x20, 0x6b, 0x65, 0x79, + 0x20, 0x31, 0x32, 0x38, 0x62, 0x69, 0x74, 0x73 }; + unsigned char iv[4] = { 0x00, 0x00, 0x00, 0x00 }; + unsigned char out[20] = { 0x43, 0x50, 0x0c, 0xcf, 0x89, 0x91, 0x9f, 0x1d, + 0xaa, 0x37, 0x74, 0x95, 0xf4, 0xb4, 0x58, 0xc2, + 0x40, 0x37, 0x8b, 0xbb }; + int err, len = 20; + unsigned char src[20], dst[20]; + sober128_state st; + + XMEMSET(src, 0, len); /* input */ + if ((err = sober128_stream_setup(&st, key, sizeof(key))) != CRYPT_OK) return err; + if ((err = sober128_stream_setiv(&st, iv, sizeof(iv))) != CRYPT_OK) return err; + if ((err = sober128_stream_crypt(&st, src, len, dst)) != CRYPT_OK) return err; + if ((err = sober128_stream_done(&st)) != CRYPT_OK) return err; + if (compare_testvector(dst, len, out, len, "SOBER-128", 0)) { + return CRYPT_FAIL_TESTVECTOR; + } + return CRYPT_OK; +#endif +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/src/stream/sober128/sober128tab.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/src/stream/sober128/sober128tab.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,176 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +/** + @file sober128tab.c + SOBER-128 Tables +*/ + +#ifdef __LTC_SOBER128TAB_C__ + +/* $ID$ */ +/* @(#)TuringMultab.h 1.3 (QUALCOMM) 02/09/03 */ +/* Multiplication table for Turing using 0xD02B4367 */ +static const ulong32 Multab[256] = { + 0x00000000, 0xD02B4367, 0xED5686CE, 0x3D7DC5A9, + 0x97AC41D1, 0x478702B6, 0x7AFAC71F, 0xAAD18478, + 0x631582EF, 0xB33EC188, 0x8E430421, 0x5E684746, + 0xF4B9C33E, 0x24928059, 0x19EF45F0, 0xC9C40697, + 0xC62A4993, 0x16010AF4, 0x2B7CCF5D, 0xFB578C3A, + 0x51860842, 0x81AD4B25, 0xBCD08E8C, 0x6CFBCDEB, + 0xA53FCB7C, 0x7514881B, 0x48694DB2, 0x98420ED5, + 0x32938AAD, 0xE2B8C9CA, 0xDFC50C63, 0x0FEE4F04, + 0xC154926B, 0x117FD10C, 0x2C0214A5, 0xFC2957C2, + 0x56F8D3BA, 0x86D390DD, 0xBBAE5574, 0x6B851613, + 0xA2411084, 0x726A53E3, 0x4F17964A, 0x9F3CD52D, + 0x35ED5155, 0xE5C61232, 0xD8BBD79B, 0x089094FC, + 0x077EDBF8, 0xD755989F, 0xEA285D36, 0x3A031E51, + 0x90D29A29, 0x40F9D94E, 0x7D841CE7, 0xADAF5F80, + 0x646B5917, 0xB4401A70, 0x893DDFD9, 0x59169CBE, + 0xF3C718C6, 0x23EC5BA1, 0x1E919E08, 0xCEBADD6F, + 0xCFA869D6, 0x1F832AB1, 0x22FEEF18, 0xF2D5AC7F, + 0x58042807, 0x882F6B60, 0xB552AEC9, 0x6579EDAE, + 0xACBDEB39, 0x7C96A85E, 0x41EB6DF7, 0x91C02E90, + 0x3B11AAE8, 0xEB3AE98F, 0xD6472C26, 0x066C6F41, + 0x09822045, 0xD9A96322, 0xE4D4A68B, 0x34FFE5EC, + 0x9E2E6194, 0x4E0522F3, 0x7378E75A, 0xA353A43D, + 0x6A97A2AA, 0xBABCE1CD, 0x87C12464, 0x57EA6703, + 0xFD3BE37B, 0x2D10A01C, 0x106D65B5, 0xC04626D2, + 0x0EFCFBBD, 0xDED7B8DA, 0xE3AA7D73, 0x33813E14, + 0x9950BA6C, 0x497BF90B, 0x74063CA2, 0xA42D7FC5, + 0x6DE97952, 0xBDC23A35, 0x80BFFF9C, 0x5094BCFB, + 0xFA453883, 0x2A6E7BE4, 0x1713BE4D, 0xC738FD2A, + 0xC8D6B22E, 0x18FDF149, 0x258034E0, 0xF5AB7787, + 0x5F7AF3FF, 0x8F51B098, 0xB22C7531, 0x62073656, + 0xABC330C1, 0x7BE873A6, 0x4695B60F, 0x96BEF568, + 0x3C6F7110, 0xEC443277, 0xD139F7DE, 0x0112B4B9, + 0xD31DD2E1, 0x03369186, 0x3E4B542F, 0xEE601748, + 0x44B19330, 0x949AD057, 0xA9E715FE, 0x79CC5699, + 0xB008500E, 0x60231369, 0x5D5ED6C0, 0x8D7595A7, + 0x27A411DF, 0xF78F52B8, 0xCAF29711, 0x1AD9D476, + 0x15379B72, 0xC51CD815, 0xF8611DBC, 0x284A5EDB, + 0x829BDAA3, 0x52B099C4, 0x6FCD5C6D, 0xBFE61F0A, + 0x7622199D, 0xA6095AFA, 0x9B749F53, 0x4B5FDC34, + 0xE18E584C, 0x31A51B2B, 0x0CD8DE82, 0xDCF39DE5, + 0x1249408A, 0xC26203ED, 0xFF1FC644, 0x2F348523, + 0x85E5015B, 0x55CE423C, 0x68B38795, 0xB898C4F2, + 0x715CC265, 0xA1778102, 0x9C0A44AB, 0x4C2107CC, + 0xE6F083B4, 0x36DBC0D3, 0x0BA6057A, 0xDB8D461D, + 0xD4630919, 0x04484A7E, 0x39358FD7, 0xE91ECCB0, + 0x43CF48C8, 0x93E40BAF, 0xAE99CE06, 0x7EB28D61, + 0xB7768BF6, 0x675DC891, 0x5A200D38, 0x8A0B4E5F, + 0x20DACA27, 0xF0F18940, 0xCD8C4CE9, 0x1DA70F8E, + 0x1CB5BB37, 0xCC9EF850, 0xF1E33DF9, 0x21C87E9E, + 0x8B19FAE6, 0x5B32B981, 0x664F7C28, 0xB6643F4F, + 0x7FA039D8, 0xAF8B7ABF, 0x92F6BF16, 0x42DDFC71, + 0xE80C7809, 0x38273B6E, 0x055AFEC7, 0xD571BDA0, + 0xDA9FF2A4, 0x0AB4B1C3, 0x37C9746A, 0xE7E2370D, + 0x4D33B375, 0x9D18F012, 0xA06535BB, 0x704E76DC, + 0xB98A704B, 0x69A1332C, 0x54DCF685, 0x84F7B5E2, + 0x2E26319A, 0xFE0D72FD, 0xC370B754, 0x135BF433, + 0xDDE1295C, 0x0DCA6A3B, 0x30B7AF92, 0xE09CECF5, + 0x4A4D688D, 0x9A662BEA, 0xA71BEE43, 0x7730AD24, + 0xBEF4ABB3, 0x6EDFE8D4, 0x53A22D7D, 0x83896E1A, + 0x2958EA62, 0xF973A905, 0xC40E6CAC, 0x14252FCB, + 0x1BCB60CF, 0xCBE023A8, 0xF69DE601, 0x26B6A566, + 0x8C67211E, 0x5C4C6279, 0x6131A7D0, 0xB11AE4B7, + 0x78DEE220, 0xA8F5A147, 0x958864EE, 0x45A32789, + 0xEF72A3F1, 0x3F59E096, 0x0224253F, 0xD20F6658, +}; + +/* $ID$ */ +/* Sbox for SOBER-128 */ +/* + * This is really the combination of two SBoxes; the least significant + * 24 bits comes from: + * 8->32 Sbox generated by Millan et. al. at Queensland University of + * Technology. See: E. Dawson, W. Millan, L. Burnett, G. Carter, + * "On the Design of 8*32 S-boxes". Unpublished report, by the + * Information Systems Research Centre, + * Queensland University of Technology, 1999. + * + * The most significant 8 bits are the Skipjack "F table", which can be + * found at http://csrc.nist.gov/CryptoToolkit/skipjack/skipjack.pdf . + * In this optimised table, though, the intent is to XOR the word from + * the table selected by the high byte with the input word. Thus, the + * high byte is actually the Skipjack F-table entry XORED with its + * table index. + */ +static const ulong32 Sbox[256] = { + 0xa3aa1887, 0xd65e435c, 0x0b65c042, 0x800e6ef4, + 0xfc57ee20, 0x4d84fed3, 0xf066c502, 0xf354e8ae, + 0xbb2ee9d9, 0x281f38d4, 0x1f829b5d, 0x735cdf3c, + 0x95864249, 0xbc2e3963, 0xa1f4429f, 0xf6432c35, + 0xf7f40325, 0x3cc0dd70, 0x5f973ded, 0x9902dc5e, + 0xda175b42, 0x590012bf, 0xdc94d78c, 0x39aab26b, + 0x4ac11b9a, 0x8c168146, 0xc3ea8ec5, 0x058ac28f, + 0x52ed5c0f, 0x25b4101c, 0x5a2db082, 0x370929e1, + 0x2a1843de, 0xfe8299fc, 0x202fbc4b, 0x833915dd, + 0x33a803fa, 0xd446b2de, 0x46233342, 0x4fcee7c3, + 0x3ad607ef, 0x9e97ebab, 0x507f859b, 0xe81f2e2f, + 0xc55b71da, 0xd7e2269a, 0x1339c3d1, 0x7ca56b36, + 0xa6c9def2, 0xb5c9fc5f, 0x5927b3a3, 0x89a56ddf, + 0xc625b510, 0x560f85a7, 0xace82e71, 0x2ecb8816, + 0x44951e2a, 0x97f5f6af, 0xdfcbc2b3, 0xce4ff55d, + 0xcb6b6214, 0x2b0b83e3, 0x549ea6f5, 0x9de041af, + 0x792f1f17, 0xf73b99ee, 0x39a65ec0, 0x4c7016c6, + 0x857709a4, 0xd6326e01, 0xc7b280d9, 0x5cfb1418, + 0xa6aff227, 0xfd548203, 0x506b9d96, 0xa117a8c0, + 0x9cd5bf6e, 0xdcee7888, 0x61fcfe64, 0xf7a193cd, + 0x050d0184, 0xe8ae4930, 0x88014f36, 0xd6a87088, + 0x6bad6c2a, 0x1422c678, 0xe9204de7, 0xb7c2e759, + 0x0200248e, 0x013b446b, 0xda0d9fc2, 0x0414a895, + 0x3a6cc3a1, 0x56fef170, 0x86c19155, 0xcf7b8a66, + 0x551b5e69, 0xb4a8623e, 0xa2bdfa35, 0xc4f068cc, + 0x573a6acd, 0x6355e936, 0x03602db9, 0x0edf13c1, + 0x2d0bb16d, 0x6980b83c, 0xfeb23763, 0x3dd8a911, + 0x01b6bc13, 0xf55579d7, 0xf55c2fa8, 0x19f4196e, + 0xe7db5476, 0x8d64a866, 0xc06e16ad, 0xb17fc515, + 0xc46feb3c, 0x8bc8a306, 0xad6799d9, 0x571a9133, + 0x992466dd, 0x92eb5dcd, 0xac118f50, 0x9fafb226, + 0xa1b9cef3, 0x3ab36189, 0x347a19b1, 0x62c73084, + 0xc27ded5c, 0x6c8bc58f, 0x1cdde421, 0xed1e47fb, + 0xcdcc715e, 0xb9c0ff99, 0x4b122f0f, 0xc4d25184, + 0xaf7a5e6c, 0x5bbf18bc, 0x8dd7c6e0, 0x5fb7e420, + 0x521f523f, 0x4ad9b8a2, 0xe9da1a6b, 0x97888c02, + 0x19d1e354, 0x5aba7d79, 0xa2cc7753, 0x8c2d9655, + 0x19829da1, 0x531590a7, 0x19c1c149, 0x3d537f1c, + 0x50779b69, 0xed71f2b7, 0x463c58fa, 0x52dc4418, + 0xc18c8c76, 0xc120d9f0, 0xafa80d4d, 0x3b74c473, + 0xd09410e9, 0x290e4211, 0xc3c8082b, 0x8f6b334a, + 0x3bf68ed2, 0xa843cc1b, 0x8d3c0ff3, 0x20e564a0, + 0xf8f55a4f, 0x2b40f8e7, 0xfea7f15f, 0xcf00fe21, + 0x8a6d37d6, 0xd0d506f1, 0xade00973, 0xefbbde36, + 0x84670fa8, 0xfa31ab9e, 0xaedab618, 0xc01f52f5, + 0x6558eb4f, 0x71b9e343, 0x4b8d77dd, 0x8cb93da6, + 0x740fd52d, 0x425412f8, 0xc5a63360, 0x10e53ad0, + 0x5a700f1c, 0x8324ed0b, 0xe53dc1ec, 0x1a366795, + 0x6d549d15, 0xc5ce46d7, 0xe17abe76, 0x5f48e0a0, + 0xd0f07c02, 0x941249b7, 0xe49ed6ba, 0x37a47f78, + 0xe1cfffbd, 0xb007ca84, 0xbb65f4da, 0xb59f35da, + 0x33d2aa44, 0x417452ac, 0xc0d674a7, 0x2d61a46a, + 0xdc63152a, 0x3e12b7aa, 0x6e615927, 0xa14fb118, + 0xa151758d, 0xba81687b, 0xe152f0b3, 0x764254ed, + 0x34c77271, 0x0a31acab, 0x54f94aec, 0xb9e994cd, + 0x574d9e81, 0x5b623730, 0xce8a21e8, 0x37917f0b, + 0xe8a9b5d6, 0x9697adf8, 0xf3d30431, 0x5dcac921, + 0x76b35d46, 0xaa430a36, 0xc2194022, 0x22bca65e, + 0xdaec70ba, 0xdfaea8cc, 0x777bae8b, 0x242924d5, + 0x1f098a5a, 0x4b396b81, 0x55de2522, 0x435c1cb8, + 0xaeb8fe1d, 0x9db3c697, 0x5b164f83, 0xe0c16376, + 0xa319224c, 0xd0203b35, 0x433ac0fe, 0x1466a19a, + 0x45f0b24f, 0x51fda998, 0xc0d52d71, 0xfa0896a8, + 0xf9e6053f, 0xa4b0d300, 0xd499cbcc, 0xb95e3d40, +}; + +#endif /* __LTC_SOBER128TAB_C__ */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/testbuild.sh --- a/libtomcrypt/testbuild.sh Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/testbuild.sh Fri Feb 09 21:44:05 2018 +0800 @@ -1,4 +1,8 @@ #!/bin/bash + +# output version +bash printinfo.sh + echo "$1 (Build Only, $2, $3)..." make clean 1>/dev/null 2>/dev/null echo -n "building..." diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/testme.sh --- a/libtomcrypt/testme.sh Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/testme.sh Fri Feb 09 21:44:05 2018 +0800 @@ -1,58 +1,71 @@ #!/bin/bash +if [ $# -lt 3 ] +then + echo "usage is: ${0##*/} " + echo "e.g. \"${0##*/} \"makefile -j9\" \"-DUSE_LTM -DLTM_DESC -I../libtommath\" ../libtommath/libtommath.a\"" + echo "to create aggregate coverage: pre-pend with LTC_COVERAGE=1" + exit -1 +fi + # date echo "date="`date` -# output version -echo "Testing verion" `grep "^VERSION=" makefile | sed "s/.*=//"` -#grep "VERSION=" makefile | perl -e "@a = split('=', <>); print @a[1];"` +# check sources +bash check_source.sh "CHECK_SOURCES" " " "$1" "$2" "$3" || exit 1 -# get uname -echo "uname="`uname -a` +mk="$1" -# get gcc name -echo "gcc="`gcc -dumpversion` -echo +[ "$LTC_COVERAGE" != "" ] && mk="$mk COVERAGE=1" # stock build -bash run.sh "STOCK" " " "$1" "$2" "$3" || exit 1 +bash run.sh "STOCK" " " "$mk" "$2" "$3" || exit 1 + +# EASY build +bash run.sh "EASY" "-DLTC_EASY" "$mk" "$2" "$3" || exit 1 # SMALL code -bash run.sh "SMALL" "-DLTC_SMALL_CODE" "$1" "$2" "$3" || exit 1 +bash run.sh "SMALL" "-DLTC_SMALL_CODE" "$mk" "$2" "$3" || exit 1 # NOTABLES -bash run.sh "NOTABLES" "-DLTC_NO_TABLES" "$1" "$2" "$3" || exit 1 +bash run.sh "NOTABLES" "-DLTC_NO_TABLES" "$mk" "$2" "$3" || exit 1 # SMALL+NOTABLES -bash run.sh "SMALL+NOTABLES" "-DLTC_SMALL_CODE -DLTC_NO_TABLES" "$1" "$2" "$3" || exit 1 +bash run.sh "SMALL+NOTABLES" "-DLTC_SMALL_CODE -DLTC_NO_TABLES" "$mk" "$2" "$3" || exit 1 # CLEANSTACK -bash run.sh "CLEANSTACK" "-DLTC_CLEAN_STACK" "$1" "$2" "$3" || exit 1 +bash run.sh "CLEANSTACK" "-DLTC_CLEAN_STACK" "$mk" "$2" "$3" || exit 1 # CLEANSTACK + SMALL -bash run.sh "CLEANSTACK+SMALL" "-DLTC_SMALL_CODE -DLTC_CLEAN_STACK" "$1" "$2" "$3" || exit 1 +bash run.sh "CLEANSTACK+SMALL" "-DLTC_SMALL_CODE -DLTC_CLEAN_STACK" "$mk" "$2" "$3" || exit 1 # CLEANSTACK + NOTABLES -bash run.sh "CLEANSTACK+NOTABLES" "-DLTC_NO_TABLES -DLTC_CLEAN_STACK" "$1" "$2" "$3" || exit 1 +bash run.sh "CLEANSTACK+NOTABLES" "-DLTC_NO_TABLES -DLTC_CLEAN_STACK" "$mk" "$2" "$3" || exit 1 # CLEANSTACK + NOTABLES + SMALL -bash run.sh "CLEANSTACK+NOTABLES+SMALL" "-DLTC_NO_TABLES -DLTC_CLEAN_STACK -DLTC_SMALL_CODE" "$1" "$2" "$3" || exit 1 +bash run.sh "CLEANSTACK+NOTABLES+SMALL" "-DLTC_NO_TABLES -DLTC_CLEAN_STACK -DLTC_SMALL_CODE" "$mk" "$2" "$3" || exit 1 # NO_FAST -bash run.sh "NO_FAST" "-DLTC_NO_FAST" "$1" "$2" "$3" || exit 1 +bash run.sh "NO_FAST" "-DLTC_NO_FAST" "$mk" "$2" "$3" || exit 1 # NO_FAST + NOTABLES -bash run.sh "NO_FAST+NOTABLES" "-DLTC_NO_FAST -DLTC_NO_TABLES" "$1" "$2" "$3" || exit 1 +bash run.sh "NO_FAST+NOTABLES" "-DLTC_NO_FAST -DLTC_NO_TABLES" "$mk" "$2" "$3" || exit 1 # NO_ASM -bash run.sh "NO_ASM" "-DLTC_NO_ASM" "$1" "$2" "$3" || exit 1 +bash run.sh "NO_ASM" "-DLTC_NO_ASM" "$mk" "$2" "$3" || exit 1 + +# NO_TIMING_RESISTANCE +bash run.sh "NO_TIMING_RESISTANCE" "-DLTC_NO_ECC_TIMING_RESISTANT -DLTC_NO_RSA_BLINDING" "$mk" "$2" "$3" || exit 1 + +# CLEANSTACK+NOTABLES+SMALL+NO_ASM+NO_TIMING_RESISTANCE +bash run.sh "CLEANSTACK+NOTABLES+SMALL+NO_ASM+NO_TIMING_RESISTANCE" "-DLTC_CLEAN_STACK -DLTC_NO_TABLES -DLTC_SMALL_CODE -DLTC_NO_ECC_TIMING_RESISTANT -DLTC_NO_RSA_BLINDING" "$mk" "$2" "$3" || exit 1 # test build with no testing -bash testbuild.sh "NOTEST" "-DLTC_NO_TEST" "$1" "$2" "$3" || exit 1 +bash testbuild.sh "NOTEST" "-DLTC_NO_TEST" "$mk" "$2" "$3" || exit 1 # test build with no file routines -bash testbuild.sh "NOFILE" "-DLTC_NO_FILE" "$1" "$2" "$3" || exit 1 +bash testbuild.sh "NOFILE" "-DLTC_NO_FILE" "$mk" "$2" "$3" || exit 1 -# $Source: /cvs/libtom/libtomcrypt/testme.sh,v $ -# $Revision: 1.20 $ -# $Date: 2006/01/26 14:49:43 $ +# ref: $Format:%D$ +# git commit: $Format:%H$ +# commit time: $Format:%ai$ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/base64_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/base64_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,134 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include + +#if defined(LTC_BASE64) || defined(LTC_BASE64_URL) +int base64_test(void) +{ + unsigned char in[64], out[256], tmp[64]; + unsigned long x, l1, l2, slen1; + + const unsigned char special_case[] = { + 0xbe, 0xe8, 0x92, 0x3c, 0xa2, 0x25, 0xf0, 0xf8, + 0x91, 0xe4, 0xef, 0xab, 0x0b, 0x8c, 0xfd, 0xff, + 0x14, 0xd0, 0x29, 0x9d, 0x00 }; + +#if defined(LTC_BASE64) + /* + TEST CASES SOURCE: + + Network Working Group S. Josefsson + Request for Comments: 4648 SJD + Obsoletes: 3548 October 2006 + Category: Standards Track + */ + const struct { + const char* s; + const char* b64; + } cases[] = { + {"", "" }, + {"f", "Zg==" }, + {"fo", "Zm8=" }, + {"foo", "Zm9v" }, + {"foob", "Zm9vYg==" }, + {"fooba", "Zm9vYmE=" }, + {"foobar", "Zm9vYmFy"}, + {(char*)special_case,"vuiSPKIl8PiR5O+rC4z9/xTQKZ0="} + }; +#endif + +#ifdef LTC_BASE64_URL + const struct { + const char* s; + int is_strict; + } url_cases[] = { + {"vuiSPKIl8PiR5O-rC4z9_xTQKZ0", 0}, + {"vuiSPKIl8PiR5O-rC4z9_xTQKZ0=", 1}, + {"vuiS*PKIl8P*iR5O-rC4*z9_xTQKZ0", 0}, + {"vuiS*PKIl8P*iR5O-rC4*z9_xTQKZ0=", 0}, + {"vuiS*PKIl8P*iR5O-rC4*z9_xTQKZ0==", 0}, + {"vuiS*PKIl8P*iR5O-rC4*z9_xTQKZ0===", 0}, + {"vuiS*PKIl8P*iR5O-rC4*z9_xTQKZ0====", 0}, + {"vuiS*=PKIl8P*iR5O-rC4*z9_xTQKZ0=", 0}, + {"vuiS*==PKIl8P*iR5O-rC4*z9_xTQKZ0=", 0}, + {"vuiS*===PKIl8P*iR5O-rC4*z9_xTQKZ0=", 0}, + }; + + for (x = 0; x < sizeof(url_cases)/sizeof(url_cases[0]); ++x) { + slen1 = strlen(url_cases[x].s); + l1 = sizeof(out); + if(url_cases[x].is_strict) + DO(base64url_strict_decode((unsigned char*)url_cases[x].s, slen1, out, &l1)); + else + DO(base64url_decode((unsigned char*)url_cases[x].s, slen1, out, &l1)); + if (compare_testvector(out, l1, special_case, sizeof(special_case) - 1, "base64url decode", x)) { + return 1; + } + if(x < 2) { + l2 = sizeof(tmp); + if(x == 0) + DO(base64url_encode(out, l1, tmp, &l2)); + else + DO(base64url_strict_encode(out, l1, tmp, &l2)); + if (compare_testvector(tmp, l2, url_cases[x].s, strlen(url_cases[x].s), "base64url encode", x)) { + return 1; + } + } + } + + DO(base64url_strict_decode((unsigned char*)url_cases[4].s, slen1, out, &l1) == CRYPT_INVALID_PACKET ? CRYPT_OK : CRYPT_INVALID_PACKET); +#endif + +#if defined(LTC_BASE64) + for (x = 0; x < sizeof(cases)/sizeof(cases[0]); ++x) { + memset(out, 0, sizeof(out)); + memset(tmp, 0, sizeof(tmp)); + slen1 = strlen(cases[x].s); + l1 = sizeof(out); + DO(base64_encode((unsigned char*)cases[x].s, slen1, out, &l1)); + l2 = sizeof(tmp); + DO(base64_strict_decode(out, l1, tmp, &l2)); + if (compare_testvector(out, l1, cases[x].b64, strlen(cases[x].b64), "base64 encode", x) || + compare_testvector(tmp, l2, cases[x].s, slen1, "base64 decode", x)) { + return 1; + } + } + + for (x = 0; x < 64; x++) { + yarrow_read(in, x, &yarrow_prng); + l1 = sizeof(out); + DO(base64_encode(in, x, out, &l1)); + l2 = sizeof(tmp); + DO(base64_decode(out, l1, tmp, &l2)); + if (compare_testvector(tmp, x, in, x, "random base64", x)) { + return 1; + } + } + + x--; + memmove(&out[11], &out[10], l1 - 10); + out[10] = '='; + l1++; + l2 = sizeof(tmp); + DO(base64_decode(out, l1, tmp, &l2)); + if (compare_testvector(tmp, l2, in, l2, "relaxed base64 decoding", -1)) { + print_hex("input ", out, l1); + return 1; + } + l2 = sizeof(tmp); + DO(base64_strict_decode(out, l1, tmp, &l2) == CRYPT_INVALID_PACKET ? CRYPT_OK : CRYPT_INVALID_PACKET); +#endif + + return 0; +} +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/cipher_hash_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/cipher_hash_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,46 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +/* test the ciphers and hashes using their built-in self-tests */ + +#include + +int cipher_hash_test(void) +{ + int x; + + /* test ciphers */ + for (x = 0; cipher_descriptor[x].name != NULL; x++) { + DOX(cipher_descriptor[x].test(), cipher_descriptor[x].name); + } + + /* stream ciphers */ +#ifdef LTC_CHACHA + DO(chacha_test()); +#endif +#ifdef LTC_RC4_STREAM + DO(rc4_stream_test()); +#endif +#ifdef LTC_SOBER128_STREAM + DO(sober128_stream_test()); +#endif + + /* test hashes */ + for (x = 0; hash_descriptor[x].name != NULL; x++) { + DOX(hash_descriptor[x].test(), hash_descriptor[x].name); + } + + /* SHAKE128 + SHAKE256 tests are a bit special */ + DOX(sha3_shake_test(), "sha3_shake"); + + return 0; +} + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/common.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/common.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,68 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#include "common.h" + +/** + @file common.c + + Steffen Jaeckel +*/ + +void run_cmd(int res, int line, const char *file, const char *cmd, const char *algorithm) +{ + if (res != CRYPT_OK) { + fprintf(stderr, "%s (%d)%s%s\n%s:%d:%s\n", + error_to_string(res), res, + (algorithm ? " - " : ""), (algorithm ? algorithm : ""), + file, line, cmd); + if (res != CRYPT_NOP) { + exit(EXIT_FAILURE); + } + } +} + +void print_hex(const char* what, const void* v, const unsigned long l) +{ + const unsigned char* p = v; + unsigned long x, y = 0, z; + fprintf(stderr, "%s contents: \n", what); + for (x = 0; x < l; ) { + fprintf(stderr, "%02X ", p[x]); + if (!(++x % 16) || x == l) { + if((x % 16) != 0) { + z = 16 - (x % 16); + if(z >= 8) + fprintf(stderr, " "); + for (; z != 0; --z) { + fprintf(stderr, " "); + } + } + fprintf(stderr, " | "); + for(; y < x; y++) { + if((y % 8) == 0) + fprintf(stderr, " "); + if(isgraph(p[y])) + fprintf(stderr, "%c", p[y]); + else + fprintf(stderr, "."); + } + fprintf(stderr, "\n"); + } + else if((x % 8) == 0) { + fprintf(stderr, " "); + } + } +} + +prng_state yarrow_prng; + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/common.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/common.h Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,32 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#ifndef DEMOS_COMMON_H_ +#define DEMOS_COMMON_H_ + +#include + +extern prng_state yarrow_prng; + +#ifdef LTC_VERBOSE +#define DO(x) do { fprintf(stderr, "%s:\n", #x); run_cmd((x), __LINE__, __FILE__, #x, NULL); } while (0) +#define DOX(x, str) do { fprintf(stderr, "%s - %s:\n", #x, (str)); run_cmd((x), __LINE__, __FILE__, #x, (str)); } while (0) +#else +#define DO(x) do { run_cmd((x), __LINE__, __FILE__, #x, NULL); } while (0) +#define DOX(x, str) do { run_cmd((x), __LINE__, __FILE__, #x, (str)); } while (0) +#endif + +void run_cmd(int res, int line, const char *file, const char *cmd, const char *algorithm); + +void print_hex(const char* what, const void* v, const unsigned long l); + +#endif /* DEMOS_COMMON_H_ */ + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/der_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/der_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,1451 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include +#if defined(GMP_LTC_DESC) || defined(USE_GMP) +#include +#endif + +#if !defined(LTC_DER) || !defined(LTC_TEST_MPI) + +int der_test(void) +{ + return CRYPT_NOP; +} + +#else + +static const unsigned char _der_tests_stinky_root_cert[] = + "MIIFETCCA/mgAwIBAgIQbv53JNmv518t5lkCHE272jANBgkqhkiG9w0BAQUFADCB" + "lTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug" + "Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho" + "dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHTAbBgNVBAMTFFVUTi1VU0VSRmlyc3Qt" + "T2JqZWN0MB4XDTA4MDQyOTAwMDAwMFoXDTEwMDQyOTIzNTk1OVowgbUxCzAJBgNV" + "BAYTAlVTMQ4wDAYDVQQRDAU0NDE0MzELMAkGA1UECAwCT0gxGTAXBgNVBAcMEE1h" + "eWZpZWxkIFZpbGxhZ2UxEDAOBgNVBAkMB1N1aXRlIEExFDASBgNVBAkMCzc2NyBC" + "ZXRhIERyMSIwIAYDVQQKDBlQcmVlbXB0aXZlIFNvbHV0aW9ucywgTExDMSIwIAYD" + "VQQDDBlQcmVlbXB0aXZlIFNvbHV0aW9ucywgTExDMIIBIjANBgkqhkiG9w0BAQEF" + "AAOCAQ8AMIIBCgKCAQEAzH7ZBkMcBuHx8d2f10RGTHAf7gzzVteGbOihJGH2BwlS" + "ZvNp6WEE4DfL+s1vp0wzk1XeLN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IRjCVXaepgN9KYu3VOgiSDI6wXiTwP44/LUXQM" + "hetwa7s="; +const unsigned char _der_tests_cacert_root_cert[] = + "MIIHPTCCBSWgAwIBAgIBADANBgkqhkiG9w0BAQQFADB5MRAwDgYDVQQKEwdSb290" + "IENBMR4wHAYDVQQLExVodHRwOi8vd3d3LmNhY2VydC5vcmcxIjAgBgNVBAMTGUNB" + "IENlcnQgU2lnbmluZyBBdXRob3JpdHkxITAfBgkqhkiG9w0BCQEWEnN1cHBvcnRA" + "Y2FjZXJ0Lm9yZzAeFw0wMzAzMzAxMjI5NDlaFw0zMzAzMjkxMjI5NDlaMHkxEDAO" + "BgNVBAoTB1Jvb3QgQ0ExHjAcBgNVBAsTFWh0dHA6Ly93d3cuY2FjZXJ0Lm9yZzEi" + "MCAGA1UEAxMZQ0EgQ2VydCBTaWduaW5nIEF1dGhvcml0eTEhMB8GCSqGSIb3DQEJ" + "ARYSc3VwcG9ydEBjYWNlcnQub3JnMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC" + "CgKCAgEAziLA4kZ97DYoB1CW8qAzQIxL8TtmPzHlawI229Z89vGIj053NgVBlfkJ" + "8BLPRoZzYLdufujAWGSuzbCtRRcMY/pnCujW0r8+55jE8Ez64AO7NV1sId6eINm6" + "zWYyN3L69wj1x81YyY7nDl7qPv4coRQKFWyGhFtkZip6qUtTefWIonvuLwphK42y" + "fk1WpRPs6tqSnqxEQR5YYGUFZvjARL3LlPdCfgv3ZWiYUQXw8wWRBB0bF4LsyFe7" + "w2t6iPGwcswlWyCR7BYCEo8y6RcYSNDHBS4CMEK4JZwFaz+qOqfrU0j36NK2B5jc" + "G8Y0f3/JHIJ6BVgrCFvzOKKrF11myZjXnhCLotLddJr3cQxyYN/Nb5gznZY0dj4k" + "epKwDpUeb+agRThHqtdB7Uq3EvbXG4OKDy7YCbZZ16oE/9KTfWgu3YtLq1i6L43q" + "laegw1SJpfvbi1EinbLDvhG+LJGGi5Z4rSDTii8aP8bQUWWHIbE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TyGpkO/c" + "gr/c6EWtTZBzCDyUZbAEmXZ/4rzCahWqlwQ3JNgelE5tDlG+1sSPypZt90Pf6DBl" + "Jzt7u0NDY8RD97LsaMzhGY4i+5jhe1o+ATc7iwiwovOVThrLm82asduycPAtStvY" + "sONvRUgzEv/+PDIqVPfE94rwiCPCR/5kenHA0R6mY7AHfqQv0wGP3J8rtsYIqQ+T" + "SCX8Ev2fQtzzxD72V7DX3WnRBnc0CkvSyqD/HMaMyRa+xMwyN2hzXwj7UfdJUzYF" + "CpUCTPJ5GhD22Dp1nPMd8aINcGeGG7MW9S/lpOt5hvk9C8JzC6WZrG/8Z7jlLwum" + "GCSNe9FINSkYQKyTYOGWhlC0elnYjyELn8+CkcY7v2vcB5G5l1YjqrZslMZIBjzk" + "zk6q5PYvCdxTby78dOs6Y5nCpqyJvKeyRKANihDjbPIky/qbn3BHLt4Ui9SyIAmW" + "omTxJBzcoTWcFbLUvFUufQb1nA5V9FrWk9p2rSVzTMVD"; +const unsigned long _der_tests_cacert_root_cert_size = sizeof(_der_tests_cacert_root_cert); + +/* +SEQUENCE(3 elem) + SEQUENCE(8 elem) + [0](1) + INTEGER 2 + INTEGER 0 + SEQUENCE(2 elem) + OBJECT IDENTIFIER 1.2.840.113549.1.1.4 + NULL + SEQUENCE(4 elem) + SET(1 elem) + SEQUENCE(2 elem) + OBJECT IDENTIFIER 2.5.4.10 + PrintableString Root CA + SET(1 elem) + SEQUENCE(2 elem) + OBJECT IDENTIFIER 2.5.4.11 + PrintableString http://www.cacert.org + SET(1 elem) + SEQUENCE(2 elem) + OBJECT IDENTIFIER 2.5.4.3 + PrintableString CA Cert Signing Authority + SET(1 elem) + SEQUENCE(2 elem) + OBJECT IDENTIFIER 1.2.840.113549.1.9.1 + IA5String support@cacert.org + SEQUENCE(2 elem) + UTCTime03-03-30 12:29:49 UTC + UTCTime33-03-29 12:29:49 UTC + SEQUENCE(4 elem) + SET(1 elem) + SEQUENCE(2 elem) + OBJECT IDENTIFIER 2.5.4.10 + PrintableString Root CA + SET(1 elem) + SEQUENCE(2 elem) + OBJECT IDENTIFIER 2.5.4.11 + PrintableString http://www.cacert.org + SET(1 elem) + SEQUENCE(2 elem) + OBJECT IDENTIFIER 2.5.4.3 + PrintableString CA Cert Signing Authority + SET(1 elem) + SEQUENCE(2 elem) + OBJECT IDENTIFIER 1.2.840.113549.1.9.1 + IA5String support@cacert.org + SEQUENCE(2 elem) + SEQUENCE(2 elem) + OBJECT IDENTIFIER 1.2.840.113549.1.1.1 + NULL + BIT STRING(1 elem) + SEQUENCE(2 elem) + INTEGER (4096 bit) + INTEGER 65537 + [3](1) + SEQUENCE(7 elem) + SEQUENCE(2 elem) + OBJECT IDENTIFIER 2.5.29.14 + OCTET STRING(1 elem) + OCTET STRING(20 byte) 16B5321BD4C7F3E0E68EF3BDD2B03AEEB23918D1 + SEQUENCE(2 elem) + OBJECT IDENTIFIER 2.5.29.35 + OCTET STRING(1 elem) + SEQUENCE(3 elem) + [0] + [1](1) + [4](1) + SEQUENCE(4 elem) + SET(1 elem) + SEQUENCE(2 elem) + OBJECT IDENTIFIER 2.5.4.10 + PrintableString Root CA + SET(1 elem) + SEQUENCE(2 elem) + OBJECT IDENTIFIER 2.5.4.11 + PrintableString http://www.cacert.org + SET(1 elem) + SEQUENCE(2 elem) + OBJECT IDENTIFIER 2.5.4.3 + PrintableString CA Cert Signing Authority + SET(1 elem) + SEQUENCE(2 elem) + OBJECT IDENTIFIER 1.2.840.113549.1.9.1 + IA5String support@cacert.org + [2] + SEQUENCE(3 elem) + OBJECT IDENTIFIER 2.5.29.19 + BOOLEAN true + OCTET STRING(1 elem) + SEQUENCE(1 elem) + BOOLEAN true + SEQUENCE(2 elem) + OBJECT IDENTIFIER 2.5.29.31 + OCTET STRING(1 elem) + SEQUENCE(1 elem) + SEQUENCE(1 elem) + [0](1) + [0](1) + [6] + SEQUENCE(2 elem) + OBJECT IDENTIFIER 2.16.840.1.113730.1.4 + OCTET STRING(1 elem) + IA5String https://www.cacert.org/revoke.crl + SEQUENCE(2 elem) + OBJECT IDENTIFIER 2.16.840.1.113730.1.8 + OCTET STRING(1 elem) + IA5String http://www.cacert.org/index.php?id=10 + SEQUENCE(2 elem) + OBJECT IDENTIFIER 2.16.840.1.113730.1.13 + OCTET STRING(1 elem) + IA5String To get your own certificate for FREE head over to http://www.cacert.org + SEQUENCE(2 elem) + OBJECT IDENTIFIER 1.2.840.113549.1.1.4 + NULL + BIT STRING(4096 bit) + */ + +#define __ASN1_FMTSTRING_FMT "line: %d, type=%d, size=%lu, data=%p, self=%p, next=%p, prev=%p, parent=%p, child=%p" +#define __ASN1_FMTSTRING_VAL(l) __LINE__, (l)->type, (l)->size, (l)->data, (l), (l)->next, (l)->prev, (l)->parent, (l)->child + +#define __ASN1_ERR(l) fprintf(stderr, __ASN1_FMTSTRING_FMT "\n", __ASN1_FMTSTRING_VAL(l)); \ + exit(EXIT_FAILURE) + +#define __CHECK_ASN1_HAS(l, w) do { if ((l)->w == NULL) { \ + __ASN1_ERR(l);\ +} } while(0) + +#define __CHECK_ASN1_HAS_NO(l, w) do { if ((l)->w != NULL) { \ + __ASN1_ERR(l);\ +} } while(0) + + + +#define CHECK_ASN1_TYPE(l, t) do { if ((l)->type != (t)) { \ + __ASN1_ERR(l);\ +} } while(0) + +#define CHECK_ASN1_HAS_CHILD(l) __CHECK_ASN1_HAS(l, child) +#define CHECK_ASN1_HAS_NO_CHILD(l) __CHECK_ASN1_HAS_NO(l, child) +#define CHECK_ASN1_HAS_NEXT(l) __CHECK_ASN1_HAS(l, next) +#define CHECK_ASN1_HAS_NO_NEXT(l) __CHECK_ASN1_HAS_NO(l, next) +#define CHECK_ASN1_HAS_DATA(l) __CHECK_ASN1_HAS(l, data) +#define CHECK_ASN1_HAS_NO_DATA(l) __CHECK_ASN1_HAS_NO(l, data) + +#ifdef LTC_DER_TESTS_PRINT_FLEXI +static void _der_tests_print_flexi(ltc_asn1_list* l, unsigned int level) +{ + char buf[1024]; + const char* name = NULL; + const char* text = NULL; + ltc_asn1_list* ostring = NULL; + unsigned int n; + + switch (l->type) + { + case LTC_ASN1_EOL: + name = "EOL"; + snprintf(buf, sizeof(buf),__ASN1_FMTSTRING_FMT "\n", __ASN1_FMTSTRING_VAL(l)); + text = buf; + break; + case LTC_ASN1_BOOLEAN: + name = "BOOLEAN"; + { + if (*(int*)l->data) + text = "true"; + else + text = "false"; + } + break; + case LTC_ASN1_INTEGER: + name = "INTEGER"; + break; + case LTC_ASN1_SHORT_INTEGER: + name = "SHORT INTEGER"; + break; + case LTC_ASN1_BIT_STRING: + name = "BIT STRING"; + break; + case LTC_ASN1_OCTET_STRING: + name = "OCTET STRING"; + { + unsigned long ostring_l = l->size; + /* sometimes there's another sequence in an octet string... + * try to decode that... if it fails print out the octet string + */ + if (der_decode_sequence_flexi(l->data, &ostring_l, &ostring) == CRYPT_OK) { + text = ""; + } + else { + int r; + char* s = buf; + int sz = sizeof(buf); + for (n = 0; n < l->size; ++n) { + r = snprintf(s, sz, "%02X", ((unsigned char*)l->data)[n]); + if (r < 0 || r >= sz) { + fprintf(stderr, "%s boom\n", name); + exit(EXIT_FAILURE); + } + s += r; + sz -= r; + } + text = buf; + } + } + break; + case LTC_ASN1_NULL: + name = "NULL"; + text = ""; + break; + case LTC_ASN1_OBJECT_IDENTIFIER: + name = "OBJECT IDENTIFIER"; + { + unsigned long i; + int r; + char* s = buf; + int sz = sizeof(buf); + for (i = 0; i < l->size; ++i) { + r = snprintf(s, sz, "%lu.", ((unsigned long*)l->data)[i]); + if (r < 0 || r >= sz) { + fprintf(stderr, "%s boom\n", name); + exit(EXIT_FAILURE); + } + s += r; + sz -= r; + } + /* replace the last . with a \0 */ + *(s - 1) = '\0'; + text = buf; + } + break; + case LTC_ASN1_IA5_STRING: + name = "IA5 STRING"; + text = l->data; + break; + case LTC_ASN1_PRINTABLE_STRING: + name = "PRINTABLE STRING"; + text = l->data; + break; + case LTC_ASN1_UTF8_STRING: + name = "UTF8 STRING"; + break; + case LTC_ASN1_UTCTIME: + name = "UTCTIME"; + { + ltc_utctime* ut = l->data; + snprintf(buf, sizeof(buf), "%02d-%02d-%02d %02d:%02d:%02d %c%02d:%02d", + ut->YY, ut->MM, ut->DD, ut->hh, ut->mm, ut->ss, + ut->off_dir ? '-' : '+', ut->off_hh, ut->off_mm); + text = buf; + } + break; + case LTC_ASN1_GENERALIZEDTIME: + name = "GENERALIZED TIME"; + { + ltc_generalizedtime* gt = l->data; + if(gt->fs) + snprintf(buf, sizeof(buf), "%04d-%02d-%02d %02d:%02d:%02d.%02dZ", + gt->YYYY, gt->MM, gt->DD, gt->hh, gt->mm, gt->ss, gt->fs); + else + snprintf(buf, sizeof(buf), "%04d-%02d-%02d %02d:%02d:%02dZ", + gt->YYYY, gt->MM, gt->DD, gt->hh, gt->mm, gt->ss); + text = buf; + } + break; + case LTC_ASN1_CHOICE: + name = "CHOICE"; + break; + case LTC_ASN1_SEQUENCE: + name = "SEQUENCE"; + text = ""; + break; + case LTC_ASN1_SET: + name = "SET"; + text = ""; + break; + case LTC_ASN1_SETOF: + name = "SETOF"; + text = ""; + break; + case LTC_ASN1_RAW_BIT_STRING: + name = "RAW BIT STRING"; + break; + case LTC_ASN1_TELETEX_STRING: + name = "TELETEX STRING"; + text = l->data; + break; + case LTC_ASN1_CONSTRUCTED: + if (l->used & 0x80) + name = "CONTEXT SPECIFIC"; + else + name = "CONSTRUCTED"; + snprintf(buf, sizeof(buf), "[%d]", l->used & 0x1f); + text = buf; + break; + case LTC_ASN1_CONTEXT_SPECIFIC: + name = "CONTEXT SPECIFIC"; + { + int r; + char* s = buf; + int sz = sizeof(buf); + r = snprintf(s, sz, "[%d] ", l->used & 0x1f); + if (r < 0 || r >= sz) { + printf("Context Specific boom"); + exit(EXIT_FAILURE); + } + s += r; + sz -= r; + for (n = 0; n < l->size; ++n) { + r = snprintf(s, sz, "%02X", ((unsigned char*)l->data)[n]); + if (r < 0 || r >= sz) { + printf("Context Specific boom"); + exit(EXIT_FAILURE); + } + s += r; + sz -= r; + } + text = buf; + } + break; + } + + for (n = 0; n < level; ++n) { + fprintf(stderr, " "); + } + if (name) { + if (text) + fprintf(stderr, "%s %s\n", name, text); + else + fprintf(stderr, "%s \n", name); + } + else + fprintf(stderr, "WTF type=%i\n", l->type); + + if (ostring) { + _der_tests_print_flexi(ostring, level + 1); + der_free_sequence_flexi(ostring); + } + + if (l->child) + _der_tests_print_flexi(l->child, level + 1); + + if (l->next) + _der_tests_print_flexi(l->next, level); +} +#endif + +static void der_cacert_test(void) +{ + unsigned char buf[sizeof(_der_tests_cacert_root_cert)]; + unsigned long len1 = sizeof(buf), len2; + + ltc_asn1_list *decoded_list, *l, *l1, *l2; + + DO(base64_decode(_der_tests_stinky_root_cert, sizeof(_der_tests_stinky_root_cert), buf, &len1)); + len2 = len1; + DO(der_decode_sequence_flexi(buf, &len2, &decoded_list)); + der_free_sequence_flexi(decoded_list); + + len1 = sizeof(buf); + DO(base64_decode(_der_tests_cacert_root_cert, sizeof(_der_tests_cacert_root_cert), buf, &len1)); + len2 = len1; + DO(der_decode_sequence_flexi(buf, &len2, &decoded_list)); + CHECK_ASN1_TYPE(decoded_list, LTC_ASN1_SEQUENCE); + CHECK_ASN1_HAS_DATA(decoded_list); + + der_sequence_shrink(decoded_list); + + CHECK_ASN1_TYPE(decoded_list, LTC_ASN1_SEQUENCE); + CHECK_ASN1_HAS_NO_DATA(decoded_list); + +#ifdef LTC_DER_TESTS_PRINT_FLEXI + printf("\n\n--- test print start ---\n\n"); + _der_tests_print_flexi(decoded_list, 0); + printf("\n\n--- test print end ---\n\n"); +#endif + + l = decoded_list; + + /* +SEQUENCE(3 elem) + SEQUENCE(8 elem) + */ + + CHECK_ASN1_TYPE(l, LTC_ASN1_SEQUENCE); + CHECK_ASN1_HAS_CHILD(l); + CHECK_ASN1_HAS_NO_NEXT(l); + + l = l->child; + + CHECK_ASN1_TYPE(l, LTC_ASN1_SEQUENCE); + CHECK_ASN1_HAS_CHILD(l); + CHECK_ASN1_HAS_NEXT(l); + + l1 = l->child; + + /* + [0](1) + INTEGER 2 + */ + + CHECK_ASN1_TYPE(l1, LTC_ASN1_CONSTRUCTED); + CHECK_ASN1_HAS_CHILD(l1); + CHECK_ASN1_HAS_NEXT(l1); + + l2 = l1->child; + + CHECK_ASN1_TYPE(l2, LTC_ASN1_INTEGER); + CHECK_ASN1_HAS_NO_CHILD(l2); + CHECK_ASN1_HAS_NO_NEXT(l2); + + l1 = l1->next; + + /* + INTEGER 0 + */ + + CHECK_ASN1_TYPE(l1, LTC_ASN1_INTEGER); + CHECK_ASN1_HAS_NO_CHILD(l1); + CHECK_ASN1_HAS_NEXT(l1); + + l1 = l1->next; + + /* + SEQUENCE(2 elem) + OBJECT IDENTIFIER 1.2.840.113549.1.1.4 + NULL + */ + + CHECK_ASN1_TYPE(l1, LTC_ASN1_SEQUENCE); + CHECK_ASN1_HAS_CHILD(l1); + CHECK_ASN1_HAS_NEXT(l1); + + l2 = l1->child; + + CHECK_ASN1_TYPE(l2, LTC_ASN1_OBJECT_IDENTIFIER); + CHECK_ASN1_HAS_NO_CHILD(l2); + CHECK_ASN1_HAS_NEXT(l2); + + l2 = l2->next; + + CHECK_ASN1_TYPE(l2, LTC_ASN1_NULL); + CHECK_ASN1_HAS_NO_CHILD(l2); + CHECK_ASN1_HAS_NO_NEXT(l2); + + /* + SEQUENCE(4 elem) + SET(1 elem) + SEQUENCE(2 elem) + OBJECT IDENTIFIER 2.5.4.10 + PrintableString Root CA + SET(1 elem) + SEQUENCE(2 elem) + OBJECT IDENTIFIER 2.5.4.11 + PrintableString http://www.cacert.org + SET(1 elem) + SEQUENCE(2 elem) + OBJECT IDENTIFIER 2.5.4.3 + PrintableString CA Cert Signing Authority + SET(1 elem) + SEQUENCE(2 elem) + OBJECT IDENTIFIER 1.2.840.113549.1.9.1 + IA5String support@cacert.org + */ + + l = l->next; + + /* + SEQUENCE(2 elem) + OBJECT IDENTIFIER 1.2.840.113549.1.1.4 + NULL + */ + + CHECK_ASN1_TYPE(l, LTC_ASN1_SEQUENCE); + CHECK_ASN1_HAS_CHILD(l); + CHECK_ASN1_HAS_NEXT(l); + + l1 = l->child; + + CHECK_ASN1_TYPE(l1, LTC_ASN1_OBJECT_IDENTIFIER); + CHECK_ASN1_HAS_NO_CHILD(l1); + CHECK_ASN1_HAS_NEXT(l1); + + l1 = l1->next; + + CHECK_ASN1_TYPE(l1, LTC_ASN1_NULL); + CHECK_ASN1_HAS_NO_CHILD(l1); + CHECK_ASN1_HAS_NO_NEXT(l1); + + l = l->next; + + /* + BIT STRING(4096 bit) + */ + + CHECK_ASN1_TYPE(l, LTC_ASN1_BIT_STRING); + CHECK_ASN1_HAS_NO_CHILD(l); + CHECK_ASN1_HAS_NO_NEXT(l); + + der_free_sequence_flexi(decoded_list); +} + +static void der_set_test(void) +{ + ltc_asn1_list list[10]; + static const unsigned char oct_str[] = { 1, 2, 3, 4 }; + static const unsigned char bin_str[] = { 1, 0, 0, 1 }; + static const unsigned long int_val = 12345678UL; + + unsigned char strs[10][10], outbuf[128]; + unsigned long x, val, outlen; + + /* make structure and encode it */ + LTC_SET_ASN1(list, 0, LTC_ASN1_OCTET_STRING, oct_str, sizeof(oct_str)); + LTC_SET_ASN1(list, 1, LTC_ASN1_BIT_STRING, bin_str, sizeof(bin_str)); + LTC_SET_ASN1(list, 2, LTC_ASN1_SHORT_INTEGER, &int_val, 1); + + /* encode it */ + outlen = sizeof(outbuf); + DO(der_encode_set(list, 3, outbuf, &outlen)); + + /* first let's test the set_decoder out of order to see what happens, we should get all the fields we expect even though they're in a diff order */ + LTC_SET_ASN1(list, 0, LTC_ASN1_BIT_STRING, strs[1], sizeof(strs[1])); + LTC_SET_ASN1(list, 1, LTC_ASN1_SHORT_INTEGER, &val, 1); + LTC_SET_ASN1(list, 2, LTC_ASN1_OCTET_STRING, strs[0], sizeof(strs[0])); + + DO(der_decode_set(outbuf, outlen, list, 3)); + + /* now compare the items */ + if (memcmp(strs[0], oct_str, sizeof(oct_str))) { + fprintf(stderr, "error decoding set using der_decode_set (oct_str is wrong):\n"); + exit(EXIT_FAILURE); + } + + if (memcmp(strs[1], bin_str, sizeof(bin_str))) { + fprintf(stderr, "error decoding set using der_decode_set (bin_str is wrong):\n"); + exit(EXIT_FAILURE); + } + + if (val != int_val) { + fprintf(stderr, "error decoding set using der_decode_set (int_val is wrong):\n"); + exit(EXIT_FAILURE); + } + + strcpy((char*)strs[0], "one"); + strcpy((char*)strs[1], "one2"); + strcpy((char*)strs[2], "two"); + strcpy((char*)strs[3], "aaa"); + strcpy((char*)strs[4], "aaaa"); + strcpy((char*)strs[5], "aab"); + strcpy((char*)strs[6], "aaab"); + strcpy((char*)strs[7], "bbb"); + strcpy((char*)strs[8], "bbba"); + strcpy((char*)strs[9], "bbbb"); + + for (x = 0; x < 10; x++) { + LTC_SET_ASN1(list, x, LTC_ASN1_PRINTABLE_STRING, strs[x], strlen((char*)strs[x])); + } + + outlen = sizeof(outbuf); + DO(der_encode_setof(list, 10, outbuf, &outlen)); + + for (x = 0; x < 10; x++) { + LTC_SET_ASN1(list, x, LTC_ASN1_PRINTABLE_STRING, strs[x], sizeof(strs[x]) - 1); + } + XMEMSET(strs, 0, sizeof(strs)); + + DO(der_decode_set(outbuf, outlen, list, 10)); + + /* now compare */ + for (x = 1; x < 10; x++) { + if (!(strlen((char*)strs[x-1]) <= strlen((char*)strs[x])) && strcmp((char*)strs[x-1], (char*)strs[x]) >= 0) { + fprintf(stderr, "error SET OF order at %lu is wrong\n", x); + exit(EXIT_FAILURE); + } + } + +} + + +/* we are encoding + + SEQUENCE { + PRINTABLE "printable" + IA5 "ia5" + SEQUENCE { + INTEGER 12345678 + UTCTIME { 91, 5, 6, 16, 45, 40, 1, 7, 0 } + GENERALIZEDTIME { 2017, 03, 21, 10, 21, 12, 4, 1, 2, 0 } + SEQUENCE { + OCTET STRING { 1, 2, 3, 4 } + BIT STRING { 1, 0, 0, 1 } + SEQUENCE { + OID { 1, 2, 840, 113549 } + NULL + SET OF { + PRINTABLE "333" -- WILL GET SORTED + PRINTABLE "222" + } + } + } + } + +*/ + +static void der_flexi_test(void) +{ + static const char printable_str[] = "printable"; + static const char set1_str[] = "333"; + static const char set2_str[] = "222"; + static const char ia5_str[] = "ia5"; + static const unsigned long int_val = 12345678UL; + static const ltc_utctime utctime = { 91, 5, 6, 16, 45, 40, 1, 7, 0 }; + static const ltc_generalizedtime gtime = { 2017, 03, 21, 10, 21, 12, 421, 1, 2, 0 }; + static const unsigned char oct_str[] = { 1, 2, 3, 4 }; + static const unsigned char bit_str[] = { 1, 0, 0, 1 }; + static const unsigned long oid_str[] = { 1, 2, 840, 113549 }; + + unsigned char encode_buf[192]; + unsigned long encode_buf_len, decode_len; + + ltc_asn1_list static_list[5][4], *decoded_list, *l; + + /* build list */ + LTC_SET_ASN1(static_list[0], 0, LTC_ASN1_PRINTABLE_STRING, (void *)printable_str, strlen(printable_str)); + LTC_SET_ASN1(static_list[0], 1, LTC_ASN1_IA5_STRING, (void *)ia5_str, strlen(ia5_str)); + LTC_SET_ASN1(static_list[0], 2, LTC_ASN1_SEQUENCE, static_list[1], 4); + + LTC_SET_ASN1(static_list[1], 0, LTC_ASN1_SHORT_INTEGER, (void *)&int_val, 1); + LTC_SET_ASN1(static_list[1], 1, LTC_ASN1_UTCTIME, (void *)&utctime, 1); + LTC_SET_ASN1(static_list[1], 2, LTC_ASN1_GENERALIZEDTIME, (void *)>ime, 1); + LTC_SET_ASN1(static_list[1], 3, LTC_ASN1_SEQUENCE, static_list[2], 3); + + LTC_SET_ASN1(static_list[2], 0, LTC_ASN1_OCTET_STRING, (void *)oct_str, 4); + LTC_SET_ASN1(static_list[2], 1, LTC_ASN1_BIT_STRING, (void *)bit_str, 4); + LTC_SET_ASN1(static_list[2], 2, LTC_ASN1_SEQUENCE, static_list[3], 3); + + LTC_SET_ASN1(static_list[3], 0, LTC_ASN1_OBJECT_IDENTIFIER,(void *)oid_str, 4); + LTC_SET_ASN1(static_list[3], 1, LTC_ASN1_NULL, NULL, 0); + LTC_SET_ASN1(static_list[3], 2, LTC_ASN1_SETOF, static_list[4], 2); + + LTC_SET_ASN1(static_list[4], 0, LTC_ASN1_PRINTABLE_STRING, set1_str, strlen(set1_str)); + LTC_SET_ASN1(static_list[4], 1, LTC_ASN1_PRINTABLE_STRING, set2_str, strlen(set2_str)); + + /* encode it */ + encode_buf_len = sizeof(encode_buf); + DO(der_encode_sequence(&static_list[0][0], 3, encode_buf, &encode_buf_len)); + +#if 0 + { + FILE *f; + f = fopen("t.bin", "wb"); + fwrite(encode_buf, 1, encode_buf_len, f); + fclose(f); + } +#endif + + /* decode with flexi */ + decode_len = encode_buf_len; + DO(der_decode_sequence_flexi(encode_buf, &decode_len, &decoded_list)); + + if (decode_len != encode_buf_len) { + fprintf(stderr, "Decode len of %lu does not match encode len of %lu \n", decode_len, encode_buf_len); + exit(EXIT_FAILURE); + } + + /* we expect l->next to be NULL and l->child to not be */ + l = decoded_list; + if (l->next != NULL || l->child == NULL) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + /* we expect a SEQUENCE */ + if (l->type != LTC_ASN1_SEQUENCE) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + l = l->child; + + /* PRINTABLE STRING */ + /* we expect printable_str */ + if (l->next == NULL || l->child != NULL) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (l->type != LTC_ASN1_PRINTABLE_STRING) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (l->size != strlen(printable_str) || memcmp(printable_str, l->data, l->size)) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + /* move to next */ + l = l->next; + + /* IA5 STRING */ + /* we expect ia5_str */ + if (l->next == NULL || l->child != NULL) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (l->type != LTC_ASN1_IA5_STRING) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (l->size != strlen(ia5_str) || memcmp(ia5_str, l->data, l->size)) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + /* move to next */ + l = l->next; + + /* expect child anve move down */ + + if (l->next != NULL || l->child == NULL) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (l->type != LTC_ASN1_SEQUENCE) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + l = l->child; + + + /* INTEGER */ + + if (l->next == NULL || l->child != NULL) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (l->type != LTC_ASN1_INTEGER) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (mp_cmp_d(l->data, 12345678UL) != LTC_MP_EQ) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + /* move to next */ + l = l->next; + + /* UTCTIME */ + + if (l->next == NULL || l->child != NULL) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (l->type != LTC_ASN1_UTCTIME) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (memcmp(l->data, &utctime, sizeof(utctime))) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + /* move to next */ + l = l->next; + + /* GeneralizedTime */ + + if (l->next == NULL || l->child != NULL) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (l->type != LTC_ASN1_GENERALIZEDTIME) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (memcmp(l->data, >ime, sizeof(gtime))) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + /* move to next */ + l = l->next; + + /* expect child anve move down */ + + if (l->next != NULL || l->child == NULL) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (l->type != LTC_ASN1_SEQUENCE) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + l = l->child; + + + /* OCTET STRING */ + /* we expect oct_str */ + if (l->next == NULL || l->child != NULL) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (l->type != LTC_ASN1_OCTET_STRING) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (l->size != sizeof(oct_str) || memcmp(oct_str, l->data, l->size)) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + /* move to next */ + l = l->next; + + /* BIT STRING */ + /* we expect oct_str */ + if (l->next == NULL || l->child != NULL) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (l->type != LTC_ASN1_BIT_STRING) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (l->size != sizeof(bit_str) || memcmp(bit_str, l->data, l->size)) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + /* move to next */ + l = l->next; + + /* expect child anve move down */ + + if (l->next != NULL || l->child == NULL) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (l->type != LTC_ASN1_SEQUENCE) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + l = l->child; + + + /* OID STRING */ + /* we expect oid_str */ + if (l->next == NULL || l->child != NULL) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (l->type != LTC_ASN1_OBJECT_IDENTIFIER) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (l->size != sizeof(oid_str)/sizeof(oid_str[0]) || memcmp(oid_str, l->data, l->size*sizeof(oid_str[0]))) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + /* move to next */ + l = l->next; + + /* NULL */ + if (l->type != LTC_ASN1_NULL) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + /* move to next */ + l = l->next; + + /* expect child anve move down */ + if (l->next != NULL || l->child == NULL) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (l->type != LTC_ASN1_SET) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + l = l->child; + + /* PRINTABLE STRING */ + /* we expect printable_str */ + if (l->next == NULL || l->child != NULL) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (l->type != LTC_ASN1_PRINTABLE_STRING) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + +/* note we compare set2_str FIRST because the SET OF is sorted and "222" comes before "333" */ + if (l->size != strlen(set2_str) || memcmp(set2_str, l->data, l->size)) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + /* move to next */ + l = l->next; + + /* PRINTABLE STRING */ + /* we expect printable_str */ + if (l->type != LTC_ASN1_PRINTABLE_STRING) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + if (l->size != strlen(set1_str) || memcmp(set1_str, l->data, l->size)) { + fprintf(stderr, "(%d), %d, %lu, next=%p, prev=%p, parent=%p, child=%p\n", __LINE__, l->type, l->size, l->next, l->prev, l->parent, l->child); + exit(EXIT_FAILURE); + } + + + der_sequence_free(l); + +} + +static int der_choice_test(void) +{ + ltc_asn1_list types[7], host[1]; + unsigned char bitbuf[10], octetbuf[10], ia5buf[10], printbuf[10], outbuf[256], x, y; + unsigned long integer, oidbuf[10], outlen, inlen; + void *mpinteger; + ltc_utctime utctime = { 91, 5, 6, 16, 45, 40, 1, 7, 0 }; + ltc_generalizedtime gtime = { 2038, 01, 19, 3, 14, 8, 0, 0, 0, 0 }; + + /* setup variables */ + for (x = 0; x < sizeof(bitbuf); x++) { bitbuf[x] = x & 1; } + for (x = 0; x < sizeof(octetbuf); x++) { octetbuf[x] = x; } + for (x = 0; x < sizeof(ia5buf); x++) { ia5buf[x] = 'a'; } + for (x = 0; x < sizeof(printbuf); x++) { printbuf[x] = 'a'; } + integer = 1; + for (x = 0; x < sizeof(oidbuf)/sizeof(oidbuf[0]); x++) { oidbuf[x] = x + 1; } + DO(mp_init(&mpinteger)); + + for (x = 0; x < 14; x++) { + /* setup list */ + LTC_SET_ASN1(types, 0, LTC_ASN1_PRINTABLE_STRING, printbuf, sizeof(printbuf)); + LTC_SET_ASN1(types, 1, LTC_ASN1_BIT_STRING, bitbuf, sizeof(bitbuf)); + LTC_SET_ASN1(types, 2, LTC_ASN1_OCTET_STRING, octetbuf, sizeof(octetbuf)); + LTC_SET_ASN1(types, 3, LTC_ASN1_IA5_STRING, ia5buf, sizeof(ia5buf)); + if (x > 7) { + LTC_SET_ASN1(types, 4, LTC_ASN1_SHORT_INTEGER, &integer, 1); + } else { + LTC_SET_ASN1(types, 4, LTC_ASN1_INTEGER, mpinteger, 1); + } + LTC_SET_ASN1(types, 5, LTC_ASN1_OBJECT_IDENTIFIER, oidbuf, sizeof(oidbuf)/sizeof(oidbuf[0])); + if (x > 7) { + LTC_SET_ASN1(types, 6, LTC_ASN1_UTCTIME, &utctime, 1); + } else { + LTC_SET_ASN1(types, 6, LTC_ASN1_GENERALIZEDTIME, >ime, 1); + } + + LTC_SET_ASN1(host, 0, LTC_ASN1_CHOICE, types, 7); + + + /* encode */ + outlen = sizeof(outbuf); + DO(der_encode_sequence(&types[x>6?x-7:x], 1, outbuf, &outlen)); + + /* decode it */ + inlen = outlen; + DO(der_decode_sequence(outbuf, inlen, &host[0], 1)); + + for (y = 0; y < 7; y++) { + if (types[y].used && y != (x>6?x-7:x)) { + fprintf(stderr, "CHOICE, flag %u in trial %u was incorrectly set to one\n", y, x); + return 1; + } + if (!types[y].used && y == (x>6?x-7:x)) { + fprintf(stderr, "CHOICE, flag %u in trial %u was incorrectly set to zero\n", y, x); + return 1; + } + } + } + mp_clear(mpinteger); + return 0; +} + + +int der_test(void) +{ + unsigned long x, y, z, zz, oid[2][32]; + unsigned char buf[3][2048]; + void *a, *b, *c, *d, *e, *f, *g; + + static const unsigned char rsa_oid_der[] = { 0x06, 0x06, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d }; + static const unsigned long rsa_oid[] = { 1, 2, 840, 113549 }; + + static const unsigned char rsa_ia5[] = "test1@rsa.com"; + static const unsigned char rsa_ia5_der[] = { 0x16, 0x0d, 0x74, 0x65, 0x73, 0x74, 0x31, + 0x40, 0x72, 0x73, 0x61, 0x2e, 0x63, 0x6f, 0x6d }; + + static const unsigned char rsa_printable[] = "Test User 1"; + static const unsigned char rsa_printable_der[] = { 0x13, 0x0b, 0x54, 0x65, 0x73, 0x74, 0x20, 0x55, + 0x73, 0x65, 0x72, 0x20, 0x31 }; + + static const ltc_utctime rsa_time1 = { 91, 5, 6, 16, 45, 40, 1, 7, 0 }; + static const ltc_utctime rsa_time2 = { 91, 5, 6, 23, 45, 40, 0, 0, 0 }; + ltc_utctime tmp_time; + + static const unsigned char rsa_time1_der[] = { 0x17, 0x11, 0x39, 0x31, 0x30, 0x35, 0x30, 0x36, 0x31, 0x36, 0x34, 0x35, 0x34, 0x30, 0x2D, 0x30, 0x37, 0x30, 0x30 }; + static const unsigned char rsa_time2_der[] = { 0x17, 0x0d, 0x39, 0x31, 0x30, 0x35, 0x30, 0x36, 0x32, 0x33, 0x34, 0x35, 0x34, 0x30, 0x5a }; + + static const wchar_t utf8_1[] = { 0x0041, 0x2262, 0x0391, 0x002E }; + static const unsigned char utf8_1_der[] = { 0x0C, 0x07, 0x41, 0xE2, 0x89, 0xA2, 0xCE, 0x91, 0x2E }; + static const wchar_t utf8_2[] = { 0xD55C, 0xAD6D, 0xC5B4 }; + static const unsigned char utf8_2_der[] = { 0x0C, 0x09, 0xED, 0x95, 0x9C, 0xEA, 0xB5, 0xAD, 0xEC, 0x96, 0xB4 }; + + unsigned char utf8_buf[32]; + wchar_t utf8_out[32]; + + der_cacert_test(); + + DO(mp_init_multi(&a, &b, &c, &d, &e, &f, &g, NULL)); + for (zz = 0; zz < 16; zz++) { +#ifdef USE_TFM + for (z = 0; z < 256; z++) { +#else + for (z = 0; z < 1024; z++) { +#endif + if (yarrow_read(buf[0], z, &yarrow_prng) != z) { + fprintf(stderr, "Failed to read %lu bytes from yarrow\n", z); + return 1; + } + DO(mp_read_unsigned_bin(a, buf[0], z)); +/* if (mp_iszero(a) == LTC_MP_NO) { a.sign = buf[0][0] & 1 ? LTC_MP_ZPOS : LTC_MP_NEG; } */ + x = sizeof(buf[0]); + DO(der_encode_integer(a, buf[0], &x)); + DO(der_length_integer(a, &y)); + if (y != x) { fprintf(stderr, "DER INTEGER size mismatch\n"); return 1; } + mp_set_int(b, 0); + DO(der_decode_integer(buf[0], y, b)); + if (y != x || mp_cmp(a, b) != LTC_MP_EQ) { + fprintf(stderr, "%lu: %lu vs %lu\n", z, x, y); + mp_clear_multi(a, b, c, d, e, f, g, NULL); + return 1; + } + } + } + +/* test short integer */ + for (zz = 0; zz < 256; zz++) { + for (z = 1; z < 4; z++) { + if (yarrow_read(buf[2], z, &yarrow_prng) != z) { + fprintf(stderr, "Failed to read %lu bytes from yarrow\n", z); + return 1; + } + /* encode with normal */ + DO(mp_read_unsigned_bin(a, buf[2], z)); + + x = sizeof(buf[0]); + DO(der_encode_integer(a, buf[0], &x)); + + /* encode with short */ + y = sizeof(buf[1]); + DO(der_encode_short_integer(mp_get_int(a), buf[1], &y)); + if (x != y || memcmp(buf[0], buf[1], x)) { + fprintf(stderr, "DER INTEGER short encoding failed, %lu, %lu, 0x%lX\n", x, y, mp_get_int(a)); + for (zz = 0; zz < z; zz++) fprintf(stderr, "%02x ", buf[2][zz]); + fprintf(stderr, "\n"); + for (z = 0; z < x; z++) fprintf(stderr, "%02x ", buf[0][z]); + fprintf(stderr, "\n"); + for (z = 0; z < y; z++) fprintf(stderr, "%02x ", buf[1][z]); + fprintf(stderr, "\n"); + mp_clear_multi(a, b, c, d, e, f, g, NULL); + return 1; + } + + /* decode it */ + x = 0; + DO(der_decode_short_integer(buf[1], y, &x)); + if (x != mp_get_int(a)) { + fprintf(stderr, "DER INTEGER short decoding failed, %lu, %lu\n", x, mp_get_int(a)); + mp_clear_multi(a, b, c, d, e, f, g, NULL); + return 1; + } + } + } + mp_clear_multi(a, b, c, d, e, f, g, NULL); + + +/* Test bit string */ + for (zz = 1; zz < 1536; zz++) { + yarrow_read(buf[0], zz, &yarrow_prng); + for (z = 0; z < zz; z++) { + buf[0][z] &= 0x01; + } + x = sizeof(buf[1]); + DO(der_encode_bit_string(buf[0], zz, buf[1], &x)); + DO(der_length_bit_string(zz, &y)); + if (y != x) { + fprintf(stderr, "\nDER BIT STRING length of encoded not match expected : %lu, %lu, %lu\n", z, x, y); + return 1; + } + + y = sizeof(buf[2]); + DO(der_decode_bit_string(buf[1], x, buf[2], &y)); + if (y != zz || memcmp(buf[0], buf[2], zz)) { + fprintf(stderr, "%lu, %lu, %d\n", y, zz, memcmp(buf[0], buf[2], zz)); + return 1; + } + } + +/* Test octet string */ + for (zz = 1; zz < 1536; zz++) { + yarrow_read(buf[0], zz, &yarrow_prng); + x = sizeof(buf[1]); + DO(der_encode_octet_string(buf[0], zz, buf[1], &x)); + DO(der_length_octet_string(zz, &y)); + if (y != x) { + fprintf(stderr, "\nDER OCTET STRING length of encoded not match expected : %lu, %lu, %lu\n", z, x, y); + return 1; + } + y = sizeof(buf[2]); + DO(der_decode_octet_string(buf[1], x, buf[2], &y)); + if (y != zz || memcmp(buf[0], buf[2], zz)) { + fprintf(stderr, "%lu, %lu, %d\n", y, zz, memcmp(buf[0], buf[2], zz)); + return 1; + } + } + +/* test OID */ + x = sizeof(buf[0]); + DO(der_encode_object_identifier((unsigned long*)rsa_oid, sizeof(rsa_oid)/sizeof(rsa_oid[0]), buf[0], &x)); + if (x != sizeof(rsa_oid_der) || memcmp(rsa_oid_der, buf[0], x)) { + fprintf(stderr, "rsa_oid_der encode failed to match, %lu, ", x); + for (y = 0; y < x; y++) fprintf(stderr, "%02x ", buf[0][y]); + fprintf(stderr, "\n"); + return 1; + } + + y = sizeof(oid[0])/sizeof(oid[0][0]); + DO(der_decode_object_identifier(buf[0], x, oid[0], &y)); + if (y != sizeof(rsa_oid)/sizeof(rsa_oid[0]) || memcmp(rsa_oid, oid[0], sizeof(rsa_oid))) { + fprintf(stderr, "rsa_oid_der decode failed to match, %lu, ", y); + for (z = 0; z < y; z++) fprintf(stderr, "%lu ", oid[0][z]); + fprintf(stderr, "\n"); + return 1; + } + + /* do random strings */ + for (zz = 0; zz < 5000; zz++) { + /* pick a random number of words */ + yarrow_read(buf[0], 4, &yarrow_prng); + LOAD32L(z, buf[0]); + z = 2 + (z % ((sizeof(oid[0])/sizeof(oid[0][0])) - 2)); + + /* fill them in */ + oid[0][0] = buf[0][0] % 3; + oid[0][1] = buf[0][1] % 40; + + for (y = 2; y < z; y++) { + yarrow_read(buf[0], 4, &yarrow_prng); + LOAD32L(oid[0][y], buf[0]); + } + + /* encode it */ + x = sizeof(buf[0]); + DO(der_encode_object_identifier(oid[0], z, buf[0], &x)); + DO(der_length_object_identifier(oid[0], z, &y)); + if (x != y) { + fprintf(stderr, "Random OID %lu test failed, length mismatch: %lu, %lu\n", z, x, y); + for (x = 0; x < z; x++) fprintf(stderr, "%lu\n", oid[0][x]); + return 1; + } + + /* decode it */ + y = sizeof(oid[0])/sizeof(oid[0][0]); + DO(der_decode_object_identifier(buf[0], x, oid[1], &y)); + if (y != z) { + fprintf(stderr, "Random OID %lu test failed, decode length mismatch: %lu, %lu\n", z, x, y); + return 1; + } + if (memcmp(oid[0], oid[1], sizeof(oid[0][0]) * z)) { + fprintf(stderr, "Random OID %lu test failed, decoded values wrong\n", z); + for (x = 0; x < z; x++) fprintf(stderr, "%lu\n", oid[0][x]); + fprintf(stderr, "\n\n Got \n\n"); + for (x = 0; x < z; x++) fprintf(stderr, "%lu\n", oid[1][x]); + return 1; + } + } + +/* IA5 string */ + x = sizeof(buf[0]); + DO(der_encode_ia5_string(rsa_ia5, strlen((char*)rsa_ia5), buf[0], &x)); + if (x != sizeof(rsa_ia5_der) || memcmp(buf[0], rsa_ia5_der, x)) { + fprintf(stderr, "IA5 encode failed: %lu, %lu\n", x, (unsigned long)sizeof(rsa_ia5_der)); + return 1; + } + DO(der_length_ia5_string(rsa_ia5, strlen((char*)rsa_ia5), &y)); + if (y != x) { + fprintf(stderr, "IA5 length failed to match: %lu, %lu\n", x, y); + return 1; + } + y = sizeof(buf[1]); + DO(der_decode_ia5_string(buf[0], x, buf[1], &y)); + if (y != strlen((char*)rsa_ia5) || memcmp(buf[1], rsa_ia5, strlen((char*)rsa_ia5))) { + fprintf(stderr, "DER IA5 failed test vector\n"); + return 1; + } + +/* Printable string */ + x = sizeof(buf[0]); + DO(der_encode_printable_string(rsa_printable, strlen((char*)rsa_printable), buf[0], &x)); + if (x != sizeof(rsa_printable_der) || memcmp(buf[0], rsa_printable_der, x)) { + fprintf(stderr, "PRINTABLE encode failed: %lu, %lu\n", x, (unsigned long)sizeof(rsa_printable_der)); + return 1; + } + DO(der_length_printable_string(rsa_printable, strlen((char*)rsa_printable), &y)); + if (y != x) { + fprintf(stderr, "printable length failed to match: %lu, %lu\n", x, y); + return 1; + } + y = sizeof(buf[1]); + DO(der_decode_printable_string(buf[0], x, buf[1], &y)); + if (y != strlen((char*)rsa_printable) || memcmp(buf[1], rsa_printable, strlen((char*)rsa_printable))) { + fprintf(stderr, "DER printable failed test vector\n"); + return 1; + } + +/* Test UTC time */ + x = sizeof(buf[0]); + DO(der_encode_utctime((ltc_utctime*)&rsa_time1, buf[0], &x)); + if (x != sizeof(rsa_time1_der) || memcmp(buf[0], rsa_time1_der, x)) { + fprintf(stderr, "UTCTIME encode of rsa_time1 failed: %lu, %lu\n", x, (unsigned long)sizeof(rsa_time1_der)); + fprintf(stderr, "\n\n"); + for (y = 0; y < x; y++) fprintf(stderr, "%02x ", buf[0][y]); + fprintf(stderr, "\n"); + return 1; + } + DO(der_length_utctime((ltc_utctime*)&rsa_time1, &y)); + if (y != x) { + fprintf(stderr, "UTCTIME length failed to match for rsa_time1: %lu, %lu\n", x, y); + return 1; + } + DO(der_decode_utctime(buf[0], &y, &tmp_time)); + if (y != x || memcmp(&rsa_time1, &tmp_time, sizeof(ltc_utctime))) { + fprintf(stderr, "UTCTIME decode failed for rsa_time1: %lu %lu\n", x, y); +fprintf(stderr, "\n\n%u %u %u %u %u %u %u %u %u\n\n", +tmp_time.YY, +tmp_time.MM, +tmp_time.DD, +tmp_time.hh, +tmp_time.mm, +tmp_time.ss, +tmp_time.off_dir, +tmp_time.off_mm, +tmp_time.off_hh); + return 1; + } + + x = sizeof(buf[0]); + DO(der_encode_utctime((ltc_utctime*)&rsa_time2, buf[0], &x)); + if (x != sizeof(rsa_time2_der) || memcmp(buf[0], rsa_time2_der, x)) { + fprintf(stderr, "UTCTIME encode of rsa_time2 failed: %lu, %lu\n", x, (unsigned long)sizeof(rsa_time1_der)); + fprintf(stderr, "\n\n"); + for (y = 0; y < x; y++) fprintf(stderr, "%02x ", buf[0][y]); + fprintf(stderr, "\n"); + return 1; + } + DO(der_length_utctime((ltc_utctime*)&rsa_time2, &y)); + if (y != x) { + fprintf(stderr, "UTCTIME length failed to match for rsa_time2: %lu, %lu\n", x, y); + return 1; + } + DO(der_decode_utctime(buf[0], &y, &tmp_time)); + if (y != x || memcmp(&rsa_time2, &tmp_time, sizeof(ltc_utctime))) { + fprintf(stderr, "UTCTIME decode failed for rsa_time2: %lu %lu\n", x, y); +fprintf(stderr, "\n\n%u %u %u %u %u %u %u %u %u\n\n", +tmp_time.YY, +tmp_time.MM, +tmp_time.DD, +tmp_time.hh, +tmp_time.mm, +tmp_time.ss, +tmp_time.off_dir, +tmp_time.off_mm, +tmp_time.off_hh); + + + return 1; + } + + /* UTF 8 */ + /* encode it */ + x = sizeof(utf8_buf); + DO(der_encode_utf8_string(utf8_1, sizeof(utf8_1) / sizeof(utf8_1[0]), utf8_buf, &x)); + DO(der_length_utf8_string(utf8_1, sizeof(utf8_1) / sizeof(utf8_1[0]), &y)); + if (x != sizeof(utf8_1_der) || memcmp(utf8_buf, utf8_1_der, x) || x != y) { + fprintf(stderr, "DER UTF8_1 encoded to %lu bytes\n", x); + for (y = 0; y < x; y++) fprintf(stderr, "%02x ", (unsigned)utf8_buf[y]); + fprintf(stderr, "\n"); + return 1; + } + /* decode it */ + y = sizeof(utf8_out) / sizeof(utf8_out[0]); + DO(der_decode_utf8_string(utf8_buf, x, utf8_out, &y)); + if (y != (sizeof(utf8_1) / sizeof(utf8_1[0])) || memcmp(utf8_1, utf8_out, y * sizeof(wchar_t))) { + fprintf(stderr, "DER UTF8_1 decoded to %lu wchar_t\n", y); + for (x = 0; x < y; x++) fprintf(stderr, "%04lx ", (unsigned long)utf8_out[x]); + fprintf(stderr, "\n"); + return 1; + } + + /* encode it */ + x = sizeof(utf8_buf); + DO(der_encode_utf8_string(utf8_2, sizeof(utf8_2) / sizeof(utf8_2[0]), utf8_buf, &x)); + if (x != sizeof(utf8_2_der) || memcmp(utf8_buf, utf8_2_der, x)) { + fprintf(stderr, "DER UTF8_2 encoded to %lu bytes\n", x); + for (y = 0; y < x; y++) fprintf(stderr, "%02x ", (unsigned)utf8_buf[y]); + fprintf(stderr, "\n"); + return 1; + } + /* decode it */ + y = sizeof(utf8_out) / sizeof(utf8_out[0]); + DO(der_decode_utf8_string(utf8_buf, x, utf8_out, &y)); + if (y != (sizeof(utf8_2) / sizeof(utf8_2[0])) || memcmp(utf8_2, utf8_out, y * sizeof(wchar_t))) { + fprintf(stderr, "DER UTF8_2 decoded to %lu wchar_t\n", y); + for (x = 0; x < y; x++) fprintf(stderr, "%04lx ", (unsigned long)utf8_out[x]); + fprintf(stderr, "\n"); + return 1; + } + + + der_set_test(); + der_flexi_test(); + return der_choice_test(); +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/dh_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/dh_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,454 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include + +#if defined(LTC_MDH) && defined(LTC_TEST_MPI) + +#ifdef LTC_DH4096 +#define KEYSIZE 4096 +#else +#define KEYSIZE 2048 +#endif + +static int _prime_test(void) +{ + void *p, *g, *tmp; + int x, err, primality; + + if ((err = mp_init_multi(&p, &g, &tmp, NULL)) != CRYPT_OK) { goto error; } + + for (x = 0; ltc_dh_sets[x].size != 0; x++) { + if ((err = mp_read_radix(g, ltc_dh_sets[x].base, 16)) != CRYPT_OK) { goto error; } + if ((err = mp_read_radix(p, ltc_dh_sets[x].prime, 16)) != CRYPT_OK) { goto error; } + + /* ensure p is prime */ + if ((err = mp_prime_is_prime(p, 8, &primality)) != CRYPT_OK) { goto done; } + if (primality != LTC_MP_YES ) { + err = CRYPT_FAIL_TESTVECTOR; + goto done; + } + + if ((err = mp_sub_d(p, 1, tmp)) != CRYPT_OK) { goto error; } + if ((err = mp_div_2(tmp, tmp)) != CRYPT_OK) { goto error; } + + /* ensure (p-1)/2 is prime */ + if ((err = mp_prime_is_prime(tmp, 8, &primality)) != CRYPT_OK) { goto done; } + if (primality == 0) { + err = CRYPT_FAIL_TESTVECTOR; + goto done; + } + + /* now see if g^((p-1)/2) mod p is in fact 1 */ + if ((err = mp_exptmod(g, tmp, p, tmp)) != CRYPT_OK) { goto error; } + if (mp_cmp_d(tmp, 1)) { + err = CRYPT_FAIL_TESTVECTOR; + goto done; + } + } + err = CRYPT_OK; +error: +done: + mp_clear_multi(tmp, g, p, NULL); + return err; +} + +static int _dhparam_test(void) +{ + dh_key k; + unsigned char buf[1024]; + /* generated by: openssl dhparam -outform der -out dhparam.der 2048 */ + unsigned char dhparam_der[] = { + 0x30, 0x82, 0x01, 0x08, 0x02, 0x82, 0x01, 0x01, 0x00, 0xae, 0xfe, 0x78, 0xce, 0x80, 0xd5, 0xd7, + 0x8e, 0xcc, 0x4f, 0x0c, 0x1b, 0xb0, 0x95, 0x10, 0xe1, 0x41, 0x15, 0x53, 0x4d, 0x0e, 0x68, 0xb0, + 0xf8, 0x5a, 0x41, 0x0e, 0x65, 0x2f, 0x9f, 0xac, 0x9c, 0x30, 0xb0, 0x76, 0xec, 0x02, 0xe9, 0x43, + 0x55, 0x08, 0xb4, 0x20, 0x60, 0xd9, 0x52, 0xda, 0x2d, 0xab, 0x9a, 0xba, 0xe6, 0xcf, 0x11, 0xa7, + 0x00, 0x44, 0xc2, 0x5e, 0xd1, 0xba, 0x9b, 0xaa, 0xfe, 0x03, 0xdd, 0xdc, 0xef, 0x41, 0x89, 0x9c, + 0xac, 0x64, 0x13, 0xd9, 0x6a, 0x8a, 0x55, 0xa0, 0x5b, 0xff, 0x12, 0x92, 0x37, 0x52, 0x6a, 0x91, + 0xa4, 0x6e, 0x9e, 0x61, 0xb7, 0xfe, 0xb0, 0x17, 0x8e, 0x67, 0x0f, 0x88, 0x46, 0xa7, 0x9e, 0xb1, + 0xdb, 0x68, 0x77, 0x70, 0xb5, 0x77, 0xf2, 0x7e, 0x33, 0xb1, 0x3e, 0x10, 0xc4, 0x63, 0x36, 0xd0, + 0x13, 0x27, 0xd3, 0x29, 0xc3, 0xb6, 0x5d, 0xf6, 0x5d, 0xa7, 0xd8, 0x25, 0x5c, 0x0b, 0x65, 0x99, + 0xfa, 0xf9, 0x5f, 0x1d, 0xee, 0xd1, 0x86, 0x64, 0x7c, 0x44, 0xcb, 0xa0, 0x12, 0x52, 0x4c, 0xd4, + 0x46, 0x81, 0xae, 0x07, 0xdb, 0xc7, 0x13, 0x29, 0xce, 0x9b, 0xcf, 0x1c, 0x06, 0xd2, 0x0f, 0x2d, + 0xbb, 0x12, 0x33, 0xb9, 0xb1, 0x0f, 0x67, 0x5d, 0x3f, 0x0c, 0xe4, 0xfa, 0x67, 0x26, 0xe2, 0x89, + 0xa2, 0xd5, 0x66, 0x29, 0x1c, 0xe2, 0x8e, 0xbb, 0x7b, 0xcb, 0xcc, 0x70, 0x7e, 0x4f, 0x0e, 0xd3, + 0x5d, 0x64, 0x64, 0x1b, 0x27, 0xbb, 0xda, 0xa9, 0x08, 0x2b, 0x62, 0xd4, 0xca, 0xc3, 0x3a, 0x23, + 0x39, 0x58, 0x57, 0xaf, 0x7b, 0x8b, 0x0c, 0x5b, 0x2e, 0xfc, 0x42, 0x57, 0x59, 0x39, 0x2e, 0x6d, + 0x39, 0x97, 0xdb, 0x5b, 0x5c, 0xb9, 0x59, 0x71, 0x42, 0xf3, 0xcd, 0xea, 0xda, 0x86, 0x54, 0x86, + 0x61, 0x8d, 0x93, 0x66, 0xc7, 0x65, 0xd1, 0x98, 0xcb, 0x02, 0x01, 0x02 + }; + /* text dump: openssl dh -inform DER -in dhparam.der -text + DH Parameters: (2048 bit) + prime: + 00:ae:fe:78:ce:80:d5:d7:8e:cc:4f:0c:1b:b0:95: + 10:e1:41:15:53:4d:0e:68:b0:f8:5a:41:0e:65:2f: + 9f:ac:9c:30:b0:76:ec:02:e9:43:55:08:b4:20:60: + d9:52:da:2d:ab:9a:ba:e6:cf:11:a7:00:44:c2:5e: + d1:ba:9b:aa:fe:03:dd:dc:ef:41:89:9c:ac:64:13: + d9:6a:8a:55:a0:5b:ff:12:92:37:52:6a:91:a4:6e: + 9e:61:b7:fe:b0:17:8e:67:0f:88:46:a7:9e:b1:db: + 68:77:70:b5:77:f2:7e:33:b1:3e:10:c4:63:36:d0: + 13:27:d3:29:c3:b6:5d:f6:5d:a7:d8:25:5c:0b:65: + 99:fa:f9:5f:1d:ee:d1:86:64:7c:44:cb:a0:12:52: + 4c:d4:46:81:ae:07:db:c7:13:29:ce:9b:cf:1c:06: + d2:0f:2d:bb:12:33:b9:b1:0f:67:5d:3f:0c:e4:fa: + 67:26:e2:89:a2:d5:66:29:1c:e2:8e:bb:7b:cb:cc: + 70:7e:4f:0e:d3:5d:64:64:1b:27:bb:da:a9:08:2b: + 62:d4:ca:c3:3a:23:39:58:57:af:7b:8b:0c:5b:2e: + fc:42:57:59:39:2e:6d:39:97:db:5b:5c:b9:59:71: + 42:f3:cd:ea:da:86:54:86:61:8d:93:66:c7:65:d1: + 98:cb + generator: 2 (0x2) + */ + unsigned char prime[] = { + 0xae, 0xfe, 0x78, 0xce, 0x80, 0xd5, 0xd7, 0x8e, 0xcc, 0x4f, 0x0c, 0x1b, 0xb0, 0x95, + 0x10, 0xe1, 0x41, 0x15, 0x53, 0x4d, 0x0e, 0x68, 0xb0, 0xf8, 0x5a, 0x41, 0x0e, 0x65, 0x2f, + 0x9f, 0xac, 0x9c, 0x30, 0xb0, 0x76, 0xec, 0x02, 0xe9, 0x43, 0x55, 0x08, 0xb4, 0x20, 0x60, + 0xd9, 0x52, 0xda, 0x2d, 0xab, 0x9a, 0xba, 0xe6, 0xcf, 0x11, 0xa7, 0x00, 0x44, 0xc2, 0x5e, + 0xd1, 0xba, 0x9b, 0xaa, 0xfe, 0x03, 0xdd, 0xdc, 0xef, 0x41, 0x89, 0x9c, 0xac, 0x64, 0x13, + 0xd9, 0x6a, 0x8a, 0x55, 0xa0, 0x5b, 0xff, 0x12, 0x92, 0x37, 0x52, 0x6a, 0x91, 0xa4, 0x6e, + 0x9e, 0x61, 0xb7, 0xfe, 0xb0, 0x17, 0x8e, 0x67, 0x0f, 0x88, 0x46, 0xa7, 0x9e, 0xb1, 0xdb, + 0x68, 0x77, 0x70, 0xb5, 0x77, 0xf2, 0x7e, 0x33, 0xb1, 0x3e, 0x10, 0xc4, 0x63, 0x36, 0xd0, + 0x13, 0x27, 0xd3, 0x29, 0xc3, 0xb6, 0x5d, 0xf6, 0x5d, 0xa7, 0xd8, 0x25, 0x5c, 0x0b, 0x65, + 0x99, 0xfa, 0xf9, 0x5f, 0x1d, 0xee, 0xd1, 0x86, 0x64, 0x7c, 0x44, 0xcb, 0xa0, 0x12, 0x52, + 0x4c, 0xd4, 0x46, 0x81, 0xae, 0x07, 0xdb, 0xc7, 0x13, 0x29, 0xce, 0x9b, 0xcf, 0x1c, 0x06, + 0xd2, 0x0f, 0x2d, 0xbb, 0x12, 0x33, 0xb9, 0xb1, 0x0f, 0x67, 0x5d, 0x3f, 0x0c, 0xe4, 0xfa, + 0x67, 0x26, 0xe2, 0x89, 0xa2, 0xd5, 0x66, 0x29, 0x1c, 0xe2, 0x8e, 0xbb, 0x7b, 0xcb, 0xcc, + 0x70, 0x7e, 0x4f, 0x0e, 0xd3, 0x5d, 0x64, 0x64, 0x1b, 0x27, 0xbb, 0xda, 0xa9, 0x08, 0x2b, + 0x62, 0xd4, 0xca, 0xc3, 0x3a, 0x23, 0x39, 0x58, 0x57, 0xaf, 0x7b, 0x8b, 0x0c, 0x5b, 0x2e, + 0xfc, 0x42, 0x57, 0x59, 0x39, 0x2e, 0x6d, 0x39, 0x97, 0xdb, 0x5b, 0x5c, 0xb9, 0x59, 0x71, + 0x42, 0xf3, 0xcd, 0xea, 0xda, 0x86, 0x54, 0x86, 0x61, 0x8d, 0x93, 0x66, 0xc7, 0x65, 0xd1, + 0x98, 0xcb + }; + + DO(dh_set_pg_dhparam(dhparam_der, sizeof(dhparam_der), &k)); + DO(dh_generate_key(&yarrow_prng, find_prng ("yarrow"), &k)); + if (mp_unsigned_bin_size(k.prime) > sizeof(buf)) { + printf("dhparam_test: short buf\n"); + dh_free(&k); + return CRYPT_ERROR; + } + DO(mp_to_unsigned_bin(k.prime, buf)); + if (compare_testvector(buf, sizeof(prime), prime, sizeof(prime), "dhparam_test", 1)) { + printf("dhparam_test: prime mismatch\n"); + dh_free(&k); + return CRYPT_ERROR; + } + if (mp_cmp_d(k.base, 2) != LTC_MP_EQ) { + printf("dhparam_test: base mismatch\n"); + dh_free(&k); + return CRYPT_ERROR; + } + dh_free(&k); + return CRYPT_OK; +} + +static int _set_test(void) +{ + dh_key k1, k2, k3; + unsigned char buf[4096]; + unsigned long len; + int i; + unsigned char gbin[] = { 0x02 }; + unsigned char pbin[] = { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, + 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, + 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, + 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, 0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, + 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45, 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, + 0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED, + 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, 0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, 0x1F, 0xE6, + 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D, 0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, + 0x98, 0xDA, 0x48, 0x36, 0x1C, 0x55, 0xD3, 0x9A, 0x69, 0x16, 0x3F, 0xA8, 0xFD, 0x24, 0xCF, 0x5F, + 0x83, 0x65, 0x5D, 0x23, 0xDC, 0xA3, 0xAD, 0x96, 0x1C, 0x62, 0xF3, 0x56, 0x20, 0x85, 0x52, 0xBB, + 0x9E, 0xD5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6D, 0x67, 0x0C, 0x35, 0x4E, 0x4A, 0xBC, 0x98, 0x04, + 0xF1, 0x74, 0x6C, 0x08, 0xCA, 0x18, 0x21, 0x7C, 0x32, 0x90, 0x5E, 0x46, 0x2E, 0x36, 0xCE, 0x3B, + 0xE3, 0x9E, 0x77, 0x2C, 0x18, 0x0E, 0x86, 0x03, 0x9B, 0x27, 0x83, 0xA2, 0xEC, 0x07, 0xA2, 0x8F, + 0xB5, 0xC5, 0x5D, 0xF0, 0x6F, 0x4C, 0x52, 0xC9, 0xDE, 0x2B, 0xCB, 0xF6, 0x95, 0x58, 0x17, 0x18, + 0x39, 0x95, 0x49, 0x7C, 0xEA, 0x95, 0x6A, 0xE5, 0x15, 0xD2, 0x26, 0x18, 0x98, 0xFA, 0x05, 0x10, + 0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAC, 0xAA, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + }; + unsigned char xbin[] = { + 0xA6, 0x68, 0x1A, 0xDC, 0x38, 0x6C, 0xE9, 0x44, 0xC3, 0xDE, 0xD9, 0xA7, 0x30, 0x1D, 0xCC, 0x9C, + 0x51, 0x82, 0x50, 0xE3, 0xED, 0xB6, 0x2F, 0x95, 0x91, 0x98, 0xF8, 0xDC, 0x00, 0x57, 0xDD, 0x6F, + 0xB5, 0x7A, 0xBA, 0xFD, 0x78, 0x81, 0x98, 0xB1 + }; + unsigned char ybin[] = { + 0x39, 0x04, 0x66, 0x32, 0xC8, 0x34, 0x41, 0x8D, 0xFA, 0x07, 0xB3, 0x09, 0x15, 0x38, 0xB6, 0x14, + 0xD1, 0xFB, 0x5D, 0xBB, 0x78, 0x5C, 0x0F, 0xBE, 0xA3, 0xB9, 0x8B, 0x29, 0x5B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62, 0x0A, 0xCD, 0x03, 0xA3, 0x83, 0x45, 0xEB, 0xB6, 0x73, 0x5E, 0x62, 0x33, 0x0A, 0x8E, 0xE9, + 0xAA, 0x6C, 0x83, 0x70, 0x41, 0x0F, 0x5C, 0xD4, 0x5A, 0xF3, 0x7E, 0xE9, 0x0A, 0x0D, 0xA9, 0x5B, + 0xE9, 0x6F, 0xC9, 0x39, 0xE8, 0x8F, 0xE0, 0xBD, 0x2C, 0xD0, 0x9F, 0xC8, 0xF5, 0x24, 0x20, 0x8C + }; + + struct { + int radix; + void* g; int glen; + void* p; int plen; + void* x; int xlen; + void* y; int ylen; + } test[1] = { + { 256, gbin, sizeof(gbin), pbin, sizeof(pbin), xbin, sizeof(xbin), ybin, sizeof(ybin) } + }; + + unsigned char export_private[] = { + 0x30, 0x82, 0x01, 0x3A, 0x02, 0x01, 0x00, 0x03, 0x02, 0x07, 0x80, 0x02, 0x82, 0x01, 0x01, 0x00, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, + 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, + 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, + 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, 0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, + 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45, 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, + 0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06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, 0xCC, 0x9C, 0x51, 0x82, 0x50, 0xE3, 0xED, 0xB6, 0x2F, 0x95, 0x91, 0x98, + 0xF8, 0xDC, 0x00, 0x57, 0xDD, 0x6F, 0xB5, 0x7A, 0xBA, 0xFD, 0x78, 0x81, 0x98, 0xB1 + }; + unsigned char export_public[] = { + 0x30, 0x82, 0x02, 0x13, 0x02, 0x01, 0x00, 0x03, 0x02, 0x07, 0x00, 0x02, 0x82, 0x01, 0x01, 0x00, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, + 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, + 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, + 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, 0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, + 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45, 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, + 0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED, + 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, 0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, 0x1F, 0xE6, + 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D, 0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, + 0x98, 0xDA, 0x48, 0x36, 0x1C, 0x55, 0xD3, 0x9A, 0x69, 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0A, 0x0D, 0xA9, 0x5B, 0xE9, 0x6F, 0xC9, 0x39, 0xE8, 0x8F, 0xE0, 0xBD, 0x2C, + 0xD0, 0x9F, 0xC8, 0xF5, 0x24, 0x20, 0x8C + }; + + for (i = 0; i < 1; i++) { + DO(dh_set_pg(test[i].p, test[i].plen, test[i].g, test[i].glen, &k1)); + DO(dh_set_key(test[i].x, test[i].xlen, PK_PRIVATE, &k1)); + + len = sizeof(buf); + DO(dh_export(buf, &len, PK_PRIVATE, &k1)); + if (compare_testvector(buf, len, export_private, sizeof(export_private), "radix_test", i*10 + 0)) { + printf("radix_test: dh_export+PK_PRIVATE mismatch\n"); + dh_free(&k1); + return CRYPT_ERROR; + } + len = sizeof(buf); + DO(dh_export(buf, &len, PK_PUBLIC, &k1)); + if (compare_testvector(buf, len, export_public, sizeof(export_public), "radix_test", i*10 + 1)) { + printf("radix_test: dh_export+PK_PUBLIC mismatch\n"); + dh_free(&k1); + return CRYPT_ERROR; + } + len = sizeof(buf); + DO(dh_export_key(buf, &len, PK_PRIVATE, &k1)); + if (compare_testvector(buf, len, xbin, sizeof(xbin), "radix_test", i*10 + 2)) { + printf("radix_test: dh_export+PK_PRIVATE mismatch\n"); + dh_free(&k1); + return CRYPT_ERROR; + } + len = sizeof(buf); + DO(dh_export_key(buf, &len, PK_PUBLIC, &k1)); + if (compare_testvector(buf, len, ybin, sizeof(ybin), "radix_test", i*10 + 3)) { + printf("radix_test: dh_export+PK_PUBLIC mismatch\n"); + dh_free(&k1); + return CRYPT_ERROR; + } + dh_free(&k1); + + DO(dh_set_pg(test[i].p, test[i].plen, test[i].g, test[i].glen, &k1)); + DO(dh_set_key(test[i].x, test[i].xlen, PK_PRIVATE, &k1)); + + len = sizeof(buf); + DO(dh_export(buf, &len, PK_PRIVATE, &k1)); + if (compare_testvector(buf, len, export_private, sizeof(export_private), "radix_test", i*10 + 4)) { + printf("radix_test: dh_export+PK_PRIVATE mismatch\n"); + dh_free(&k1); + return CRYPT_ERROR; + } + len = sizeof(buf); + DO(dh_export(buf, &len, PK_PUBLIC, &k1)); + if (compare_testvector(buf, len, export_public, sizeof(export_public), "radix_test", i*10 + 5)) { + printf("radix_test: dh_export+PK_PUBLIC mismatch\n"); + dh_free(&k1); + return CRYPT_ERROR; + } + dh_free(&k1); + + DO(dh_set_pg(test[i].p, test[i].plen, test[i].g, test[i].glen, &k2)); + DO(dh_set_key(test[i].y, test[i].ylen, PK_PUBLIC, &k2)); + + len = sizeof(buf); + DO(dh_export(buf, &len, PK_PUBLIC, &k2)); + if (compare_testvector(buf, len, export_public, sizeof(export_public), "radix_test", i*10 + 6)) { + printf("radix_test: dh_export+PK_PUBLIC mismatch\n"); + dh_free(&k2); + return CRYPT_ERROR; + } + len = sizeof(buf); + DO(dh_export_key(buf, &len, PK_PUBLIC, &k2)); + if (compare_testvector(buf, len, ybin, sizeof(ybin), "radix_test", i*10 + 7)) { + printf("radix_test: dh_export+PK_PUBLIC mismatch\n"); + dh_free(&k2); + return CRYPT_ERROR; + } + dh_free(&k2); + + DO(dh_set_pg(test[i].p, test[i].plen, test[i].g, test[i].glen, &k3)); + DO(dh_generate_key(&yarrow_prng, find_prng("yarrow"), &k3)); + + len = mp_unsigned_bin_size(k3.prime); + DO(mp_to_unsigned_bin(k3.prime, buf)); + if (compare_testvector(buf, len, pbin, sizeof(pbin), "radix_test", i*10 + 8)) { + printf("radix_test: dh_make_key_ex prime mismatch\n"); + dh_free(&k3); + return CRYPT_ERROR; + } + len = mp_unsigned_bin_size(k3.base); + DO(mp_to_unsigned_bin(k3.base, buf)); + if (compare_testvector(buf, len, gbin, sizeof(gbin), "radix_test", i*10 + 9)) { + printf("radix_test: dh_make_key_ex base mismatch\n"); + dh_free(&k3); + return CRYPT_ERROR; + } + dh_free(&k3); + } + + return CRYPT_OK; +} + +static int _basic_test(void) +{ + unsigned char buf[3][4096]; + unsigned long x, y, z; + int size; + dh_key usera, userb; + + /* make up two keys */ + DO(dh_set_pg_groupsize(KEYSIZE/8, &usera)); + DO(dh_generate_key(&yarrow_prng, find_prng ("yarrow"), &usera)); + DO(dh_set_pg_groupsize(KEYSIZE/8, &userb)); + DO(dh_generate_key(&yarrow_prng, find_prng ("yarrow"), &userb)); + + /* make the shared secret */ + x = KEYSIZE; + DO(dh_shared_secret (&usera, &userb, buf[0], &x)); + + y = KEYSIZE; + DO(dh_shared_secret (&userb, &usera, buf[1], &y)); + if (y != x) { + fprintf(stderr, "DH Shared keys are not same size.\n"); + dh_free (&usera); + dh_free (&userb); + return CRYPT_ERROR; + } + if (memcmp (buf[0], buf[1], x)) { + fprintf(stderr, "DH Shared keys not same contents.\n"); + dh_free (&usera); + dh_free (&userb); + return CRYPT_ERROR; + } + + /* now export userb */ + y = KEYSIZE; + DO(dh_export (buf[1], &y, PK_PUBLIC, &userb)); + dh_free (&userb); + + /* import and make the shared secret again */ + DO(dh_import (buf[1], y, &userb)); + z = KEYSIZE; + DO(dh_shared_secret (&usera, &userb, buf[2], &z)); + + dh_free (&usera); + dh_free (&userb); + + if (z != x) { + fprintf(stderr, "failed. Size don't match?\n"); + return CRYPT_ERROR; + } + if (memcmp (buf[0], buf[2], x)) { + fprintf(stderr, "Failed. Content didn't match.\n"); + return CRYPT_ERROR; + } + + for (x = 0; ltc_dh_sets[x].size != 0; x++) { + DO(dh_set_pg_groupsize(ltc_dh_sets[x].size, &usera)); + DO(dh_generate_key(&yarrow_prng, find_prng ("yarrow"), &usera)); + size = dh_get_groupsize(&usera); + dh_free(&usera); + if (size != ltc_dh_sets[x].size) { + fprintf(stderr, "dh_groupsize mismatch %d %d\n", size, ltc_dh_sets[x].size); + return CRYPT_ERROR; + } + dh_free(&usera); + } + + return CRYPT_OK; +} + +int dh_test(void) +{ + int fails = 0; + if (_prime_test() != CRYPT_OK) fails++; + if (_basic_test() != CRYPT_OK) fails++; + if (_dhparam_test() != CRYPT_OK) fails++; + if (_set_test() != CRYPT_OK) fails++; + return fails > 0 ? CRYPT_FAIL_TESTVECTOR : CRYPT_OK; +} + +#else + +int dh_test(void) +{ + return CRYPT_NOP; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/dsa_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/dsa_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,400 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include + +#if defined(LTC_MDSA) && defined(LTC_TEST_MPI) + +/* This is the private key from test_dsa.key */ +static const unsigned char openssl_priv_dsa[] = { + 0x30, 0x82, 0x01, 0xbb, 0x02, 0x01, 0x00, 0x02, 0x81, 0x81, 0x00, 0xc5, + 0x0a, 0x37, 0x51, 0x5c, 0xab, 0xd6, 0x18, 0xd5, 0xa2, 0x70, 0xbd, 0x4a, + 0x6f, 0x6b, 0x4a, 0xf9, 0xe1, 0x39, 0x95, 0x0f, 0x2b, 0x99, 0x38, 0x7d, + 0x9a, 0x64, 0xd6, 0x4c, 0xb5, 0x96, 0x7a, 0xdc, 0xed, 0xac, 0xa8, 0xac, + 0xc6, 0x1b, 0x65, 0x5a, 0xde, 0xdb, 0x00, 0x61, 0x25, 0x1a, 0x18, 0x2c, + 0xee, 0xa1, 0x07, 0x90, 0x62, 0x5e, 0x4d, 0x12, 0x31, 0x90, 0xc7, 0x03, + 0x21, 0xfa, 0x09, 0xe7, 0xb1, 0x73, 0xd7, 0x8e, 0xaf, 0xdb, 0xfd, 0xbf, + 0xb3, 0xef, 0xad, 0xd1, 0xa1, 0x2a, 0x03, 0x6d, 0xe7, 0x06, 0x92, 0x4a, + 0x85, 0x2a, 0xff, 0x7a, 0x01, 0x66, 0x53, 0x1f, 0xea, 0xc6, 0x67, 0x41, + 0x84, 0x5a, 0xc0, 0x6c, 0xed, 0x62, 0xf9, 0xc2, 0x62, 0x62, 0x05, 0xa4, + 0xfa, 0x48, 0xa0, 0x66, 0xec, 0x35, 0xc9, 0xa8, 0x11, 0xfe, 0xb9, 0x81, + 0xab, 0xee, 0xbe, 0x31, 0xb6, 0xbf, 0xcf, 0x02, 0x15, 0x00, 0xaa, 0x5b, + 0xd7, 0xf4, 0xe5, 0x06, 0x24, 0x13, 0xe5, 0x88, 0x35, 0xca, 0x00, 0xc7, + 0xa6, 0x35, 0x71, 0x61, 0x94, 0xc5, 0x02, 0x81, 0x80, 0x3b, 0x92, 0xe4, + 0xff, 0x59, 0x29, 0x15, 0x0b, 0x08, 0x99, 0x5a, 0x7b, 0xf2, 0xad, 0x14, + 0x40, 0x55, 0x6f, 0xa0, 0x47, 0xff, 0x90, 0x99, 0xb3, 0x44, 0xb3, 0xd4, + 0xfc, 0x45, 0x15, 0x05, 0xae, 0x67, 0x22, 0x43, 0x9c, 0xba, 0x37, 0x10, + 0xa5, 0x89, 0x47, 0x37, 0xec, 0xcc, 0xf5, 0xae, 0xad, 0xa8, 0xb4, 0x7a, + 0x35, 0xcb, 0x9d, 0x93, 0x5c, 0xed, 0xe6, 0xb0, 0x7e, 0x96, 0x94, 0xc4, + 0xa6, 0x0c, 0x7d, 0xd6, 0x70, 0x8a, 0x09, 0x4f, 0x81, 0x4a, 0x0e, 0xc2, + 0x13, 0xfb, 0xeb, 0x16, 0xbf, 0xea, 0xa4, 0xf4, 0x56, 0xff, 0x72, 0x30, + 0x05, 0xde, 0x8a, 0x44, 0x3f, 0xbe, 0xc6, 0x85, 0x26, 0x55, 0xd6, 0x2d, + 0x1d, 0x1e, 0xdb, 0x15, 0xda, 0xa4, 0x45, 0x83, 0x3c, 0x17, 0x97, 0x98, + 0x0b, 0x8d, 0x87, 0xf3, 0x49, 0x0d, 0x90, 0xbd, 0xa9, 0xab, 0x67, 0x6e, + 0x87, 0x68, 0x72, 0x23, 0xdc, 0x02, 0x81, 0x80, 0x53, 0x16, 0xb0, 0xfb, + 0xbf, 0x59, 0x8a, 0x5e, 0x55, 0x95, 0xc1, 0x4f, 0xac, 0x43, 0xb8, 0x08, + 0x53, 0xe6, 0xcf, 0x0d, 0x92, 0x23, 0xfa, 0xb1, 0x84, 0x59, 0x52, 0x39, + 0xbf, 0xcb, 0xf2, 0x2d, 0x38, 0x3a, 0xdd, 0x93, 0x52, 0x05, 0x49, 0x7e, + 0x2b, 0x12, 0xc4, 0x61, 0x73, 0xe3, 0x6f, 0x54, 0xbd, 0x96, 0xe5, 0xa7, + 0xaa, 0xa9, 0x5a, 0x58, 0xa4, 0xb7, 0x67, 0xd2, 0xc0, 0xbd, 0xc8, 0x1e, + 0xb1, 0x3a, 0x12, 0x4f, 0x98, 0xc0, 0x05, 0xef, 0x39, 0x5d, 0x6a, 0xba, + 0xb7, 0x0b, 0x3b, 0xd8, 0xb7, 0x95, 0xdd, 0x79, 0x6e, 0xa2, 0xd2, 0x84, + 0x73, 0x47, 0x03, 0x88, 0xb4, 0x64, 0xd9, 0xb9, 0xb8, 0x4f, 0xf1, 0xc9, + 0x34, 0xbb, 0xf9, 0x73, 0x66, 0xf5, 0x7c, 0x2e, 0x11, 0xfe, 0xc3, 0x31, + 0xe6, 0x08, 0x38, 0x59, 0x67, 0x81, 0xeb, 0x6d, 0x41, 0x27, 0xd7, 0x0d, + 0x74, 0xaf, 0xa0, 0x35, 0x02, 0x15, 0x00, 0x99, 0x36, 0xe5, 0xe4, 0xe9, + 0xfb, 0x28, 0xbe, 0x91, 0xf5, 0x06, 0x5f, 0xe8, 0xc9, 0x35, 0xb3, 0xf5, + 0xd8, 0x1f, 0xc5 +}; + +/* private key - raw hexadecimal numbers */ +static const char *hex_g = "3B92E4FF5929150B08995A7BF2AD1440556FA047FF9099B344B3D4FC451505AE6722439CBA3710A5894737ECCCF5AEADA8B47A35CB9D935CEDE6B07E9694C4A60C7DD6708A094F814A0EC213FBEB16BFEAA4F456FF723005DE8A443FBEC6852655D62D1D1EDB15DAA445833C1797980B8D87F3490D90BDA9AB676E87687223DC"; +static const char *hex_p = "C50A37515CABD618D5A270BD4A6F6B4AF9E139950F2B99387D9A64D64CB5967ADCEDACA8ACC61B655ADEDB0061251A182CEEA10790625E4D123190C70321FA09E7B173D78EAFDBFDBFB3EFADD1A12A036DE706924A852AFF7A0166531FEAC66741845AC06CED62F9C2626205A4FA48A066EC35C9A811FEB981ABEEBE31B6BFCF"; +static const char *hex_q = "AA5BD7F4E5062413E58835CA00C7A635716194C5"; +static const char *hex_x = "9936E5E4E9FB28BE91F5065FE8C935B3F5D81FC5"; +static const char *hex_y = "5316B0FBBF598A5E5595C14FAC43B80853E6CF0D9223FAB184595239BFCBF22D383ADD935205497E2B12C46173E36F54BD96E5A7AAA95A58A4B767D2C0BDC81EB13A124F98C005EF395D6ABAB70B3BD8B795DD796EA2D28473470388B464D9B9B84FF1C934BBF97366F57C2E11FEC331E60838596781EB6D4127D70D74AFA035"; + +/* The public part of test_dsa.key in SubjectPublicKeyInfo format */ +static const unsigned char openssl_pub_dsa[] = { + 0x30, 0x82, 0x01, 0xb6, 0x30, 0x82, 0x01, 0x2b, 0x06, 0x07, 0x2a, 0x86, + 0x48, 0xce, 0x38, 0x04, 0x01, 0x30, 0x82, 0x01, 0x1e, 0x02, 0x81, 0x81, + 0x00, 0xc5, 0x0a, 0x37, 0x51, 0x5c, 0xab, 0xd6, 0x18, 0xd5, 0xa2, 0x70, + 0xbd, 0x4a, 0x6f, 0x6b, 0x4a, 0xf9, 0xe1, 0x39, 0x95, 0x0f, 0x2b, 0x99, + 0x38, 0x7d, 0x9a, 0x64, 0xd6, 0x4c, 0xb5, 0x96, 0x7a, 0xdc, 0xed, 0xac, + 0xa8, 0xac, 0xc6, 0x1b, 0x65, 0x5a, 0xde, 0xdb, 0x00, 0x61, 0x25, 0x1a, + 0x18, 0x2c, 0xee, 0xa1, 0x07, 0x90, 0x62, 0x5e, 0x4d, 0x12, 0x31, 0x90, + 0xc7, 0x03, 0x21, 0xfa, 0x09, 0xe7, 0xb1, 0x73, 0xd7, 0x8e, 0xaf, 0xdb, + 0xfd, 0xbf, 0xb3, 0xef, 0xad, 0xd1, 0xa1, 0x2a, 0x03, 0x6d, 0xe7, 0x06, + 0x92, 0x4a, 0x85, 0x2a, 0xff, 0x7a, 0x01, 0x66, 0x53, 0x1f, 0xea, 0xc6, + 0x67, 0x41, 0x84, 0x5a, 0xc0, 0x6c, 0xed, 0x62, 0xf9, 0xc2, 0x62, 0x62, + 0x05, 0xa4, 0xfa, 0x48, 0xa0, 0x66, 0xec, 0x35, 0xc9, 0xa8, 0x11, 0xfe, + 0xb9, 0x81, 0xab, 0xee, 0xbe, 0x31, 0xb6, 0xbf, 0xcf, 0x02, 0x15, 0x00, + 0xaa, 0x5b, 0xd7, 0xf4, 0xe5, 0x06, 0x24, 0x13, 0xe5, 0x88, 0x35, 0xca, + 0x00, 0xc7, 0xa6, 0x35, 0x71, 0x61, 0x94, 0xc5, 0x02, 0x81, 0x80, 0x3b, + 0x92, 0xe4, 0xff, 0x59, 0x29, 0x15, 0x0b, 0x08, 0x99, 0x5a, 0x7b, 0xf2, + 0xad, 0x14, 0x40, 0x55, 0x6f, 0xa0, 0x47, 0xff, 0x90, 0x99, 0xb3, 0x44, + 0xb3, 0xd4, 0xfc, 0x45, 0x15, 0x05, 0xae, 0x67, 0x22, 0x43, 0x9c, 0xba, + 0x37, 0x10, 0xa5, 0x89, 0x47, 0x37, 0xec, 0xcc, 0xf5, 0xae, 0xad, 0xa8, + 0xb4, 0x7a, 0x35, 0xcb, 0x9d, 0x93, 0x5c, 0xed, 0xe6, 0xb0, 0x7e, 0x96, + 0x94, 0xc4, 0xa6, 0x0c, 0x7d, 0xd6, 0x70, 0x8a, 0x09, 0x4f, 0x81, 0x4a, + 0x0e, 0xc2, 0x13, 0xfb, 0xeb, 0x16, 0xbf, 0xea, 0xa4, 0xf4, 0x56, 0xff, + 0x72, 0x30, 0x05, 0xde, 0x8a, 0x44, 0x3f, 0xbe, 0xc6, 0x85, 0x26, 0x55, + 0xd6, 0x2d, 0x1d, 0x1e, 0xdb, 0x15, 0xda, 0xa4, 0x45, 0x83, 0x3c, 0x17, + 0x97, 0x98, 0x0b, 0x8d, 0x87, 0xf3, 0x49, 0x0d, 0x90, 0xbd, 0xa9, 0xab, + 0x67, 0x6e, 0x87, 0x68, 0x72, 0x23, 0xdc, 0x03, 0x81, 0x84, 0x00, 0x02, + 0x81, 0x80, 0x53, 0x16, 0xb0, 0xfb, 0xbf, 0x59, 0x8a, 0x5e, 0x55, 0x95, + 0xc1, 0x4f, 0xac, 0x43, 0xb8, 0x08, 0x53, 0xe6, 0xcf, 0x0d, 0x92, 0x23, + 0xfa, 0xb1, 0x84, 0x59, 0x52, 0x39, 0xbf, 0xcb, 0xf2, 0x2d, 0x38, 0x3a, + 0xdd, 0x93, 0x52, 0x05, 0x49, 0x7e, 0x2b, 0x12, 0xc4, 0x61, 0x73, 0xe3, + 0x6f, 0x54, 0xbd, 0x96, 0xe5, 0xa7, 0xaa, 0xa9, 0x5a, 0x58, 0xa4, 0xb7, + 0x67, 0xd2, 0xc0, 0xbd, 0xc8, 0x1e, 0xb1, 0x3a, 0x12, 0x4f, 0x98, 0xc0, + 0x05, 0xef, 0x39, 0x5d, 0x6a, 0xba, 0xb7, 0x0b, 0x3b, 0xd8, 0xb7, 0x95, + 0xdd, 0x79, 0x6e, 0xa2, 0xd2, 0x84, 0x73, 0x47, 0x03, 0x88, 0xb4, 0x64, + 0xd9, 0xb9, 0xb8, 0x4f, 0xf1, 0xc9, 0x34, 0xbb, 0xf9, 0x73, 0x66, 0xf5, + 0x7c, 0x2e, 0x11, 0xfe, 0xc3, 0x31, 0xe6, 0x08, 0x38, 0x59, 0x67, 0x81, + 0xeb, 0x6d, 0x41, 0x27, 0xd7, 0x0d, 0x74, 0xaf, 0xa0, 0x35 +}; + +static unsigned char dsaparam_der[] = { + 0x30, 0x82, 0x01, 0x1e, 0x02, 0x81, 0x81, 0x00, 0xc5, 0x0a, 0x37, 0x51, + 0x5c, 0xab, 0xd6, 0x18, 0xd5, 0xa2, 0x70, 0xbd, 0x4a, 0x6f, 0x6b, 0x4a, + 0xf9, 0xe1, 0x39, 0x95, 0x0f, 0x2b, 0x99, 0x38, 0x7d, 0x9a, 0x64, 0xd6, + 0x4c, 0xb5, 0x96, 0x7a, 0xdc, 0xed, 0xac, 0xa8, 0xac, 0xc6, 0x1b, 0x65, + 0x5a, 0xde, 0xdb, 0x00, 0x61, 0x25, 0x1a, 0x18, 0x2c, 0xee, 0xa1, 0x07, + 0x90, 0x62, 0x5e, 0x4d, 0x12, 0x31, 0x90, 0xc7, 0x03, 0x21, 0xfa, 0x09, + 0xe7, 0xb1, 0x73, 0xd7, 0x8e, 0xaf, 0xdb, 0xfd, 0xbf, 0xb3, 0xef, 0xad, + 0xd1, 0xa1, 0x2a, 0x03, 0x6d, 0xe7, 0x06, 0x92, 0x4a, 0x85, 0x2a, 0xff, + 0x7a, 0x01, 0x66, 0x53, 0x1f, 0xea, 0xc6, 0x67, 0x41, 0x84, 0x5a, 0xc0, + 0x6c, 0xed, 0x62, 0xf9, 0xc2, 0x62, 0x62, 0x05, 0xa4, 0xfa, 0x48, 0xa0, + 0x66, 0xec, 0x35, 0xc9, 0xa8, 0x11, 0xfe, 0xb9, 0x81, 0xab, 0xee, 0xbe, + 0x31, 0xb6, 0xbf, 0xcf, 0x02, 0x15, 0x00, 0xaa, 0x5b, 0xd7, 0xf4, 0xe5, + 0x06, 0x24, 0x13, 0xe5, 0x88, 0x35, 0xca, 0x00, 0xc7, 0xa6, 0x35, 0x71, + 0x61, 0x94, 0xc5, 0x02, 0x81, 0x80, 0x3b, 0x92, 0xe4, 0xff, 0x59, 0x29, + 0x15, 0x0b, 0x08, 0x99, 0x5a, 0x7b, 0xf2, 0xad, 0x14, 0x40, 0x55, 0x6f, + 0xa0, 0x47, 0xff, 0x90, 0x99, 0xb3, 0x44, 0xb3, 0xd4, 0xfc, 0x45, 0x15, + 0x05, 0xae, 0x67, 0x22, 0x43, 0x9c, 0xba, 0x37, 0x10, 0xa5, 0x89, 0x47, + 0x37, 0xec, 0xcc, 0xf5, 0xae, 0xad, 0xa8, 0xb4, 0x7a, 0x35, 0xcb, 0x9d, + 0x93, 0x5c, 0xed, 0xe6, 0xb0, 0x7e, 0x96, 0x94, 0xc4, 0xa6, 0x0c, 0x7d, + 0xd6, 0x70, 0x8a, 0x09, 0x4f, 0x81, 0x4a, 0x0e, 0xc2, 0x13, 0xfb, 0xeb, + 0x16, 0xbf, 0xea, 0xa4, 0xf4, 0x56, 0xff, 0x72, 0x30, 0x05, 0xde, 0x8a, + 0x44, 0x3f, 0xbe, 0xc6, 0x85, 0x26, 0x55, 0xd6, 0x2d, 0x1d, 0x1e, 0xdb, + 0x15, 0xda, 0xa4, 0x45, 0x83, 0x3c, 0x17, 0x97, 0x98, 0x0b, 0x8d, 0x87, + 0xf3, 0x49, 0x0d, 0x90, 0xbd, 0xa9, 0xab, 0x67, 0x6e, 0x87, 0x68, 0x72, + 0x23, 0xdc + }; + + +static int _dsa_compat_test(void) +{ + dsa_key key; + unsigned char tmp[1024], buf[1024]; + unsigned long x, len; + unsigned char key_parts[5][256]; + unsigned long key_lens[5]; + int stat; + + DO(dsa_import(openssl_priv_dsa, sizeof(openssl_priv_dsa), &key)); + + x = sizeof(tmp); + DO(dsa_export(tmp, &x, PK_PRIVATE | PK_STD, &key)); + if (compare_testvector(tmp, x, openssl_priv_dsa, sizeof(openssl_priv_dsa), + "DSA private export failed from dsa_import(priv_key)\n", __LINE__)) { + return CRYPT_FAIL_TESTVECTOR; + } + + x = sizeof(tmp); + DO(dsa_export(tmp, &x, PK_PUBLIC | PK_STD, &key)); + if (compare_testvector(tmp, x, openssl_pub_dsa, sizeof(openssl_pub_dsa), + "DSA public export failed from dsa_import(priv_key)\n", __LINE__)) { + return CRYPT_FAIL_TESTVECTOR; + } + dsa_free(&key); + + DO(dsa_import(openssl_pub_dsa, sizeof(openssl_pub_dsa), &key)); + + x = sizeof(tmp); + DO(dsa_export(tmp, &x, PK_PUBLIC | PK_STD, &key)); + if (compare_testvector(tmp, x, openssl_pub_dsa, sizeof(openssl_pub_dsa), + "DSA public export failed from dsa_import(pub_key)\n", __LINE__)) { + return CRYPT_FAIL_TESTVECTOR; + } + dsa_free(&key); + + /* try import private key from raw hexadecimal numbers */ + for (x = 0; x < 5; ++x) { + key_lens[x] = sizeof(key_parts[x]); + } + DO(radix_to_bin(hex_p, 16, key_parts[0], &key_lens[0])); + DO(radix_to_bin(hex_q, 16, key_parts[1], &key_lens[1])); + DO(radix_to_bin(hex_g, 16, key_parts[2], &key_lens[2])); + DO(radix_to_bin(hex_y, 16, key_parts[3], &key_lens[3])); + DO(radix_to_bin(hex_x, 16, key_parts[4], &key_lens[4])); + + DO(dsa_set_pqg(key_parts[0], key_lens[0], + key_parts[1], key_lens[1], + key_parts[2], key_lens[2], + &key)); + DO(dsa_set_key(key_parts[4], key_lens[4], + PK_PRIVATE, + &key)); + len = sizeof(buf); + DO(dsa_export(buf, &len, PK_PRIVATE | PK_STD, &key)); + if (compare_testvector(buf, len, openssl_priv_dsa, sizeof(openssl_priv_dsa), + "DSA private export failed from dsa_set_pqg() & dsa_set_key()\n", __LINE__)) { + return CRYPT_FAIL_TESTVECTOR; + } + dsa_free(&key); + + /* try import public key from raw hexadecimal numbers */ + DO(dsa_set_pqg(key_parts[0], key_lens[0], + key_parts[1], key_lens[1], + key_parts[2], key_lens[2], + &key)); + DO(dsa_set_key(key_parts[3], key_lens[3], + PK_PUBLIC, + &key)); + len = sizeof(buf); + DO(dsa_export(buf, &len, PK_PUBLIC | PK_STD, &key)); + if (compare_testvector(buf, len, openssl_pub_dsa, sizeof(openssl_pub_dsa), + "DSA public export failed from dsa_set_pqg() & dsa_set_key()\n", __LINE__)) { + return CRYPT_FAIL_TESTVECTOR; + } + dsa_free(&key); + + /* try import dsaparam */ + DO(dsa_set_pqg_dsaparam(dsaparam_der, sizeof(dsaparam_der), &key)); + DO(dsa_generate_key(&yarrow_prng, find_prng("yarrow"), &key)); + /* verify it */ + DO(dsa_verify_key(&key, &stat)); + if (stat == 0) { + fprintf(stderr, "dsa_verify_key after dsa_set_pqg_dsaparam()"); + return CRYPT_FAIL_TESTVECTOR; + } + dsa_free(&key); + + /* try import dsaparam - our public key */ + DO(dsa_set_pqg_dsaparam(dsaparam_der, sizeof(dsaparam_der), &key)); + DO(dsa_set_key(key_parts[3], key_lens[3], + PK_PUBLIC, + &key)); + len = sizeof(buf); + DO(dsa_export(buf, &len, PK_PUBLIC | PK_STD, &key)); + if (compare_testvector(buf, len, openssl_pub_dsa, sizeof(openssl_pub_dsa), + "DSA public export failed from dsa_set_pqg_dsaparam()\n", __LINE__)) { + return CRYPT_FAIL_TESTVECTOR; + } + dsa_free(&key); + + /* try import dsaparam - our private key */ + DO(dsa_set_pqg_dsaparam(dsaparam_der, sizeof(dsaparam_der), &key)); + DO(dsa_set_key(key_parts[4], key_lens[4], + PK_PRIVATE, + &key)); + len = sizeof(buf); + DO(dsa_export(buf, &len, PK_PRIVATE | PK_STD, &key)); + if (compare_testvector(buf, len, openssl_priv_dsa, sizeof(openssl_priv_dsa), + "DSA private export failed from dsa_set_pqg_dsaparam()\n", __LINE__)) { + return CRYPT_FAIL_TESTVECTOR; + } + dsa_free(&key); + + return CRYPT_OK; +} + +static int _dsa_wycheproof_test(void) +{ + /* test case from https://github.com/google/wycheproof/blob/master/testvectors/dsa_test.json + * + * "comment" : "appending unused 0's", + * "message" : "48656c6c6f", + * "result" : "invalid", + * "sig" : "303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe87862360000", + * "tcId" : 55 + */ + unsigned char msg[] = { 0x48, 0x65, 0x6c, 0x6c, 0x6f }; + unsigned char sig[] = { 0x30, 0x3d, 0x02, 0x1c, 0x1e, 0x41, 0xb4, 0x79, 0xad, 0x57, 0x69, 0x05, 0xb9, 0x60, 0xfe, + 0x14, 0xea, 0xdb, 0x91, 0xb0, 0xcc, 0xf3, 0x48, 0x43, 0xda, 0xb9, 0x16, 0x17, 0x3b, 0xb8, + 0xc9, 0xcd, 0x02, 0x1d, 0x00, 0xad, 0xe6, 0x59, 0x88, 0xd2, 0x37, 0xd3, 0x0f, 0x9e, 0xf4, + 0x1d, 0xd4, 0x24, 0xa4, 0xe1, 0xc8, 0xf1, 0x69, 0x67, 0xcf, 0x33, 0x65, 0x81, 0x3f, 0xe8, + 0x78, 0x62, 0x36, 0x00, 0x00 }; + const char* b64key = + "MIIDQjCCAjUGByqGSM44BAEwggIoAoIBAQCPeTXZuarpv6vtiHrPSVG28y7FnjuvNxjo6sSWHz79" + "NgbnQ1GpxBgzObgJ58KuHFObp0dbhdARrbi0eYd1SYRpXKwOjxSzNggooi/6JxEKPWKpk0U0CaD+" + "aWxGWPhL3SCBnDcJoBBXsZWtzQAjPbpUhLYpH51kjviDRIZ3l5zsBLQ0pqwudemYXeI9sCkvwRGM" + "n/qdgYHnM423krcw17njSVkvaAmYchU5Feo9a4tGU8YzRY+AOzKkwuDycpAlbk4/ijsIOKHEUOTh" + "jBopo33fXqFD3ktm/wSQPtXPFiPhWNSHxgjpfyEc2B3KI8tuOAdl+CLjQr5ITAV2OTlgHNZnAh0A" + "uvaWpoV499/e5/pnyXfHhe8ysjO65YDAvNVpXQKCAQAWplxYIEhQcE51AqOXVwQNNNo6NHjBVNTk" + "pcAtJC7gT5bmHkvQkEq9rI837rHgnzGC0jyQQ8tkL4gAQWDt+coJsyB2p5wypifyRz6Rh5uixOdE" + "vSCBVEy1W4AsNo0fqD7UielOD6BojjJCilx4xHjGjQUntxyaOrsLC+EsRGiWOefTznTbEBplqiuH" + "9kxoJts+xy9LVZmDS7TtsC98kOmkltOlXVNb6/xF1PYZ9j897buHOSXC8iTgdzEpbaiH7B5HSPh+" + "+1/et1SEMWsiMt7lU92vAhErDR8C2jCXMiT+J67ai51LKSLZuovjntnhA6Y8UoELxoi34u1DFuHv" + "F9veA4IBBQACggEAHnf4QrGuD82ZKdOUFh1B4UYU/3UHqaMfSh8U0i4qYnofTllmJIg/GlsWjpQl" + "FG8i1fbuKHV0FHFLuZS6ESnwFdbgSnF+35tTCl1cq5TxRjHotM95rrNYzHQYRVU4QeisRhYw6ASm" + "L0Nna6Z5SvZomcN3uGnqYSp7n+ZhGqlr5S64tiyXkRe7vMqKfsHh/6scffz8cEhwDTrjhYE26Jdw" + "HXwpIbXf7x0fiX9Q2WyhtcLtxYytoYkZ41ZC8IB+6/oAyZoy9NCVwxiPeO1UcRvgMlxLUyrszWVA" + "pWfDJyJUQOoVMZveBlEEeaGGF5niW1fezHPANtdaBwK9NzyiMTSZMQ=="; + unsigned char derkey[838]; + unsigned long derlen = sizeof(derkey); + unsigned char hash[32]; + unsigned long hashlen = sizeof(hash); + dsa_key key; + int stat; + + DO(base64_decode((unsigned char*)b64key, strlen(b64key), derkey, &derlen)); + if (derlen != 838) { + fprintf(stderr, "base64_decode failed, derlen=%lu (expected 838)\n", derlen); + return CRYPT_FAIL_TESTVECTOR; + } + DO(dsa_import(derkey, derlen, &key)); + DO(hash_memory(find_hash("sha224"), msg, sizeof(msg), hash, &hashlen)); + if (hashlen != 28) { + fprintf(stderr, "hash_memory failed, hashlen=%lu (expected 32)\n", hashlen); + return CRYPT_FAIL_TESTVECTOR; + } + + stat = 666; /* intentionally not one, not zero */ + DO(dsa_verify_hash(sig, sizeof(sig)-2, hash, hashlen, &stat, &key)); + /* without the last two 0x00 bytes it is a valid signature */ + if (stat != 1) { + fprintf(stderr, "dsa_verify_hash rejected valid signature\n"); + return CRYPT_FAIL_TESTVECTOR; + } + + stat = 666; /* intentionally not one, not zero */ + DO(dsa_verify_hash(sig, sizeof(sig), hash, hashlen, &stat, &key)); + /* this should be invalid */ + if (stat != 0) { + fprintf(stderr, "dsa_verify_hash did not reject invalid signature\n"); + return CRYPT_FAIL_TESTVECTOR; + } + + dsa_free(&key); + return CRYPT_OK; +} + +int dsa_test(void) +{ + unsigned char msg[16], out[1024], out2[1024], ch; + unsigned long x, y; + int stat1, stat2; + dsa_key key, key2; + + DO(_dsa_compat_test()); + DO(_dsa_wycheproof_test()); + + /* make a random key */ + DO(dsa_generate_pqg(&yarrow_prng, find_prng("yarrow"), 20, 128, &key)); + DO(dsa_generate_key(&yarrow_prng, find_prng("yarrow"), &key)); + + /* verify it */ + DO(dsa_verify_key(&key, &stat1)); + if (stat1 == 0) { fprintf(stderr, "dsa_verify_key "); return 1; } + + /* encrypt a message */ + for (ch = 0; ch < 16; ch++) { msg[ch] = ch; } + x = sizeof(out); + DO(dsa_encrypt_key(msg, 16, out, &x, &yarrow_prng, find_prng("yarrow"), find_hash("sha1"), &key)); + + /* decrypt */ + y = sizeof(out2); + DO(dsa_decrypt_key(out, x, out2, &y, &key)); + + if (y != 16 || memcmp(out2, msg, 16)) { + fprintf(stderr, "dsa_decrypt failed, y == %lu\n", y); + return 1; + } + + /* sign the message */ + x = sizeof(out); + DO(dsa_sign_hash(msg, sizeof(msg), out, &x, &yarrow_prng, find_prng("yarrow"), &key)); + + /* verify it once */ + DO(dsa_verify_hash(out, x, msg, sizeof(msg), &stat1, &key)); + + /* Modify and verify again */ + msg[0] ^= 1; + DO(dsa_verify_hash(out, x, msg, sizeof(msg), &stat2, &key)); + msg[0] ^= 1; + if (!(stat1 == 1 && stat2 == 0)) { fprintf(stderr, "dsa_verify %d %d", stat1, stat2); return 1; } + + /* test exporting it */ + y = sizeof(out2); + DO(dsa_export(out2, &y, PK_PRIVATE, &key)); + DO(dsa_import(out2, y, &key2)); + + /* verify a signature with it */ + DO(dsa_verify_hash(out, x, msg, sizeof(msg), &stat1, &key2)); + if (stat1 == 0) { fprintf(stderr, "dsa_verify (import private) %d ", stat1); return 1; } + dsa_free(&key2); + + /* export as public now */ + y = sizeof(out2); + DO(dsa_export(out2, &y, PK_PUBLIC, &key)); + + DO(dsa_import(out2, y, &key2)); + /* verify a signature with it */ + DO(dsa_verify_hash(out, x, msg, sizeof(msg), &stat1, &key2)); + if (stat1 == 0) { fprintf(stderr, "dsa_verify (import public) %d ", stat1); return 1; } + dsa_free(&key2); + dsa_free(&key); + + return 0; +} + +#else + +int dsa_test(void) +{ + return CRYPT_NOP; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/ecc_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/ecc_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,268 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include + +#if defined(LTC_MECC) && defined(LTC_TEST_MPI) + +static unsigned int sizes[] = { +#ifdef LTC_ECC112 +14, +#endif +#ifdef LTC_ECC128 +16, +#endif +#ifdef LTC_ECC160 +20, +#endif +#ifdef LTC_ECC192 +24, +#endif +#ifdef LTC_ECC224 +28, +#endif +#ifdef LTC_ECC256 +32, +#endif +#ifdef LTC_ECC384 +48, +#endif +#ifdef LTC_ECC521 +65 +#endif +}; + +#ifdef LTC_ECC_SHAMIR +int ecc_test_shamir(void) +{ + void *modulus, *mp, *kA, *kB, *rA, *rB; + ecc_point *G, *A, *B, *C1, *C2; + int x, y, z; + unsigned char buf[ECC_BUF_SIZE]; + + DO(mp_init_multi(&kA, &kB, &rA, &rB, &modulus, NULL)); + LTC_ARGCHK((G = ltc_ecc_new_point()) != NULL); + LTC_ARGCHK((A = ltc_ecc_new_point()) != NULL); + LTC_ARGCHK((B = ltc_ecc_new_point()) != NULL); + LTC_ARGCHK((C1 = ltc_ecc_new_point()) != NULL); + LTC_ARGCHK((C2 = ltc_ecc_new_point()) != NULL); + + for (x = 0; x < (int)(sizeof(sizes)/sizeof(sizes[0])); x++) { + /* get the base point */ + for (z = 0; ltc_ecc_sets[z].name; z++) { + if (sizes[z] < (unsigned int)ltc_ecc_sets[z].size) break; + } + LTC_ARGCHK(ltc_ecc_sets[z].name != NULL); + + /* load it */ + DO(mp_read_radix(G->x, ltc_ecc_sets[z].Gx, 16)); + DO(mp_read_radix(G->y, ltc_ecc_sets[z].Gy, 16)); + DO(mp_set(G->z, 1)); + DO(mp_read_radix(modulus, ltc_ecc_sets[z].prime, 16)); + DO(mp_montgomery_setup(modulus, &mp)); + + /* do 100 random tests */ + for (y = 0; y < 100; y++) { + /* pick a random r1, r2 */ + LTC_ARGCHK(yarrow_read(buf, sizes[x], &yarrow_prng) == sizes[x]); + DO(mp_read_unsigned_bin(rA, buf, sizes[x])); + LTC_ARGCHK(yarrow_read(buf, sizes[x], &yarrow_prng) == sizes[x]); + DO(mp_read_unsigned_bin(rB, buf, sizes[x])); + + /* compute rA * G = A */ + DO(ltc_mp.ecc_ptmul(rA, G, A, modulus, 1)); + + /* compute rB * G = B */ + DO(ltc_mp.ecc_ptmul(rB, G, B, modulus, 1)); + + /* pick a random kA, kB */ + LTC_ARGCHK(yarrow_read(buf, sizes[x], &yarrow_prng) == sizes[x]); + DO(mp_read_unsigned_bin(kA, buf, sizes[x])); + LTC_ARGCHK(yarrow_read(buf, sizes[x], &yarrow_prng) == sizes[x]); + DO(mp_read_unsigned_bin(kB, buf, sizes[x])); + + /* now, compute kA*A + kB*B = C1 using the older method */ + DO(ltc_mp.ecc_ptmul(kA, A, C1, modulus, 0)); + DO(ltc_mp.ecc_ptmul(kB, B, C2, modulus, 0)); + DO(ltc_mp.ecc_ptadd(C1, C2, C1, modulus, mp)); + DO(ltc_mp.ecc_map(C1, modulus, mp)); + + /* now compute using mul2add */ + DO(ltc_mp.ecc_mul2add(A, kA, B, kB, C2, modulus)); + + /* is they the sames? */ + if ((mp_cmp(C1->x, C2->x) != LTC_MP_EQ) || (mp_cmp(C1->y, C2->y) != LTC_MP_EQ) || (mp_cmp(C1->z, C2->z) != LTC_MP_EQ)) { + fprintf(stderr, "ECC failed shamir test: size=%d, testno=%d\n", sizes[x], y); + return 1; + } + } + mp_montgomery_free(mp); + } + ltc_ecc_del_point(C2); + ltc_ecc_del_point(C1); + ltc_ecc_del_point(B); + ltc_ecc_del_point(A); + ltc_ecc_del_point(G); + mp_clear_multi(kA, kB, rA, rB, modulus, NULL); + return 0; +} +#endif + +int ecc_tests (void) +{ + unsigned char buf[4][4096], ch; + unsigned long x, y, z, s; + int stat, stat2; + ecc_key usera, userb, pubKey, privKey; + + DO(ecc_test ()); + + for (s = 0; s < (sizeof(sizes)/sizeof(sizes[0])); s++) { + /* make up two keys */ + DO(ecc_make_key (&yarrow_prng, find_prng ("yarrow"), sizes[s], &usera)); + DO(ecc_make_key (&yarrow_prng, find_prng ("yarrow"), sizes[s], &userb)); + + /* make the shared secret */ + x = sizeof(buf[0]); + DO(ecc_shared_secret (&usera, &userb, buf[0], &x)); + + y = sizeof(buf[1]); + DO(ecc_shared_secret (&userb, &usera, buf[1], &y)); + + if (y != x) { + fprintf(stderr, "ecc Shared keys are not same size."); + return 1; + } + + if (memcmp (buf[0], buf[1], x)) { + fprintf(stderr, "ecc Shared keys not same contents."); + return 1; + } + + /* now export userb */ + y = sizeof(buf[0]); + DO(ecc_export (buf[1], &y, PK_PUBLIC, &userb)); + ecc_free (&userb); + + /* import and make the shared secret again */ + DO(ecc_import (buf[1], y, &userb)); + + z = sizeof(buf[0]); + DO(ecc_shared_secret (&usera, &userb, buf[2], &z)); + + if (z != x) { + fprintf(stderr, "failed. Size don't match?"); + return 1; + } + if (memcmp (buf[0], buf[2], x)) { + fprintf(stderr, "Failed. Contents didn't match."); + return 1; + } + + /* export with ANSI X9.63 */ + y = sizeof(buf[1]); + DO(ecc_ansi_x963_export(&userb, buf[1], &y)); + ecc_free (&userb); + + /* now import the ANSI key */ + DO(ecc_ansi_x963_import(buf[1], y, &userb)); + + /* shared secret */ + z = sizeof(buf[0]); + DO(ecc_shared_secret (&usera, &userb, buf[2], &z)); + + if (z != x) { + fprintf(stderr, "failed. Size don't match?"); + return 1; + } + if (memcmp (buf[0], buf[2], x)) { + fprintf(stderr, "Failed. Contents didn't match."); + return 1; + } + + ecc_free (&usera); + ecc_free (&userb); + + /* test encrypt_key */ + DO(ecc_make_key (&yarrow_prng, find_prng ("yarrow"), sizes[s], &usera)); + + /* export key */ + x = sizeof(buf[0]); + DO(ecc_export(buf[0], &x, PK_PUBLIC, &usera)); + DO(ecc_import(buf[0], x, &pubKey)); + x = sizeof(buf[0]); + DO(ecc_export(buf[0], &x, PK_PRIVATE, &usera)); + DO(ecc_import(buf[0], x, &privKey)); + + for (ch = 0; ch < 32; ch++) { + buf[0][ch] = ch; + } + y = sizeof (buf[1]); + DO(ecc_encrypt_key (buf[0], 32, buf[1], &y, &yarrow_prng, find_prng ("yarrow"), find_hash ("sha256"), &pubKey)); + zeromem (buf[0], sizeof (buf[0])); + x = sizeof (buf[0]); + DO(ecc_decrypt_key (buf[1], y, buf[0], &x, &privKey)); + if (x != 32) { + fprintf(stderr, "Failed (length)"); + return 1; + } + for (ch = 0; ch < 32; ch++) { + if (buf[0][ch] != ch) { + fprintf(stderr, "Failed (contents)"); + return 1; + } + } + /* test sign_hash */ + for (ch = 0; ch < 16; ch++) { + buf[0][ch] = ch; + } + x = sizeof (buf[1]); + DO(ecc_sign_hash (buf[0], 16, buf[1], &x, &yarrow_prng, find_prng ("yarrow"), &privKey)); + DO(ecc_verify_hash (buf[1], x, buf[0], 16, &stat, &pubKey)); + buf[0][0] ^= 1; + DO(ecc_verify_hash (buf[1], x, buf[0], 16, &stat2, &privKey)); + if (!(stat == 1 && stat2 == 0)) { + fprintf(stderr, "ecc_verify_hash failed %d, %d, ", stat, stat2); + return 1; + } + /* test sign_hash_rfc7518 */ + for (ch = 0; ch < 16; ch++) { + buf[0][ch] = ch; + } + x = sizeof (buf[1]); + DO(ecc_sign_hash_rfc7518(buf[0], 16, buf[1], &x, &yarrow_prng, find_prng ("yarrow"), &privKey)); + DO(ecc_verify_hash_rfc7518(buf[1], x, buf[0], 16, &stat, &pubKey)); + buf[0][0] ^= 1; + DO(ecc_verify_hash_rfc7518(buf[1], x, buf[0], 16, &stat2, &privKey)); + if (!(stat == 1 && stat2 == 0)) { + fprintf(stderr, "ecc_verify_hash_rfc7518 failed %d, %d, ", stat, stat2); + return 1; + } + ecc_free (&usera); + ecc_free (&pubKey); + ecc_free (&privKey); + } +#ifdef LTC_ECC_SHAMIR + return ecc_test_shamir(); +#else + return 0; +#endif +} + +#else + +int ecc_tests(void) +{ + return CRYPT_NOP; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/file_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/file_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,115 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +/* test file related functions */ + +#include + +int file_test(void) +{ +#ifdef LTC_NO_FILE + return CRYPT_NOP; +#else + unsigned char key[32] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F }; + unsigned char buf[200]; + unsigned long len; + const char *fname = "tests/test.key"; + FILE *in; + int err, isha256, iaes; + + /* expected results */ + unsigned char exp_sha256[32] = { 0x76, 0xEC, 0x7F, 0xAE, 0xBD, 0xC4, 0x2A, 0x4D, 0xE3, 0x5C, 0xA7, 0x00, 0x24, 0xC2, 0xD2, 0x73, + 0xE9, 0xF7, 0x85, 0x6C, 0xA6, 0x16, 0x12, 0xE8, 0x9F, 0x5F, 0x66, 0x35, 0x0B, 0xA8, 0xCF, 0x5F }; + isha256 = find_hash("sha256"); + iaes = find_cipher("aes"); + + len = sizeof(buf); + if ((in = fopen(fname, "rb")) == NULL) return CRYPT_FILE_NOTFOUND; + err = hash_filehandle(isha256, in, buf, &len); + fclose(in); + if (err != CRYPT_OK) return err; + if (compare_testvector(buf, len, exp_sha256, 32, "hash_filehandle", 1)) return 1; + + len = sizeof(buf); + if ((err = hash_file(isha256, fname, buf, &len)) != CRYPT_OK) return err; + if (compare_testvector(buf, len, exp_sha256, 32, "hash_file", 1)) return 1; + +#ifdef LTC_HMAC + { + unsigned char exp_hmacsha256[32] = { 0xE4, 0x07, 0x74, 0x95, 0xF1, 0xF8, 0x5B, 0xB5, 0xF1, 0x4F, 0x7D, 0x4F, 0x59, 0x8E, 0x4B, 0xBC, + 0x8F, 0x68, 0xCF, 0xBA, 0x2E, 0xAD, 0xC4, 0x63, 0x9D, 0x7F, 0x02, 0x99, 0x8C, 0x08, 0xAC, 0xC0 }; + len = sizeof(buf); + if ((err = hmac_file(isha256, fname, key, 32, buf, &len)) != CRYPT_OK) return err; + if (compare_testvector(buf, len, exp_hmacsha256, 32, "hmac_file", 1)) return 1; + } +#endif +#ifdef LTC_OMAC + { + unsigned char exp_omacaes[16] = { 0x50, 0xB4, 0x6C, 0x62, 0xE9, 0xCA, 0x48, 0xFC, 0x38, 0x8D, 0xF4, 0xA2, 0x7D, 0x6A, 0x1E, 0xD8 }; + len = sizeof(buf); + if ((err = omac_file(iaes, key, 32, fname, buf, &len)) != CRYPT_OK) return err; + if (compare_testvector(buf, len, exp_omacaes, 16, "omac_file", 1)) return 1; + } +#endif +#ifdef LTC_PMAC + { + unsigned char exp_pmacaes[16] = { 0x7D, 0x65, 0xF0, 0x75, 0x4F, 0x8D, 0xE2, 0xB0, 0xE4, 0xFA, 0x54, 0x4E, 0x45, 0x01, 0x36, 0x1B }; + len = sizeof(buf); + if ((err = pmac_file(iaes, key, 32, fname, buf, &len)) != CRYPT_OK) return err; + if (compare_testvector(buf, len, exp_pmacaes, 16, "pmac_file", 1)) return 1; + } +#endif +#ifdef LTC_XCBC + { + unsigned char exp_xcbcaes[16] = { 0x9C, 0x73, 0xA2, 0xD7, 0x90, 0xA5, 0x86, 0x25, 0x4D, 0x3C, 0x8A, 0x6A, 0x24, 0x6D, 0xD1, 0xAB }; + len = sizeof(buf); + if ((err = xcbc_file(iaes, key, 32, fname, buf, &len)) != CRYPT_OK) return err; + if (compare_testvector(buf, len, exp_xcbcaes, 16, "xcbc_file", 1)) return 1; + } +#endif +#ifdef LTC_F9_MODE + { + unsigned char exp_f9aes[16] = { 0x6B, 0x6A, 0x18, 0x34, 0x13, 0x8E, 0x01, 0xEF, 0x33, 0x8E, 0x7A, 0x3F, 0x5B, 0x9A, 0xA6, 0x7A }; + len = sizeof(buf); + if ((err = f9_file(iaes, key, 32, fname, buf, &len)) != CRYPT_OK) return err; + if (compare_testvector(buf, len, exp_f9aes, 16, "f9_file", 1)) return 1; + } +#endif +#ifdef LTC_POLY1305 + { + unsigned char exp_poly1305[16] = { 0xD0, 0xC7, 0xFB, 0x13, 0xA8, 0x87, 0x84, 0x23, 0x21, 0xCC, 0xA9, 0x43, 0x81, 0x18, 0x75, 0xBE }; + len = sizeof(buf); + if ((err = poly1305_file(fname, key, 32, buf, &len)) != CRYPT_OK) return err; + if (compare_testvector(buf, len, exp_poly1305, 16, "poly1305_file", 1)) return 1; + } +#endif +#ifdef LTC_BLAKE2SMAC + { + unsigned char exp_blake2smac[16] = { 0x4f, 0x94, 0x45, 0x15, 0xcd, 0xd1, 0xca, 0x02, 0x1a, 0x0c, 0x7a, 0xe4, 0x6d, 0x2f, 0xe8, 0xb3 }; + len = 16; + if ((err = blake2smac_file(fname, key, 32, buf, &len)) != CRYPT_OK) return err; + if (compare_testvector(buf, len, exp_blake2smac, 16, "exp_blake2smac_file", 1)) return 1; + } +#endif +#ifdef LTC_BLAKE2BMAC + { + unsigned char exp_blake2bmac[16] = { 0xdf, 0x0e, 0x7a, 0xab, 0x96, 0x6b, 0x75, 0x4e, 0x52, 0x6a, 0x43, 0x96, 0xbd, 0xef, 0xab, 0x44 }; + len = 16; + if ((err = blake2bmac_file(fname, key, 32, buf, &len)) != CRYPT_OK) return err; + if (compare_testvector(buf, len, exp_blake2bmac, 16, "exp_blake2bmac_file", 1)) return 1; + } +#endif + + return CRYPT_OK; +#endif +} + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/katja_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/katja_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,242 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include + +#if defined(LTC_MKAT) && defined(LTC_TEST_MPI) + +int katja_test(void) +{ + unsigned char in[1024], out[1024], tmp[1024]; + katja_key key, privKey, pubKey; + int hash_idx, prng_idx, stat, stat2, size; + unsigned long kat_msgsize, len, len2, cnt; + static unsigned char lparam[] = { 0x01, 0x02, 0x03, 0x04 }; + + hash_idx = find_hash("sha1"); + prng_idx = find_prng("yarrow"); + if (hash_idx == -1 || prng_idx == -1) { + fprintf(stderr, "katja_test requires LTC_SHA1 and yarrow"); + return 1; + } + +for (size = 1024; size <= 2048; size += 256) { + + /* make 10 random key */ + for (cnt = 0; cnt < 10; cnt++) { + DO(katja_make_key(&yarrow_prng, prng_idx, size/8, &key)); + if (mp_count_bits(key.N) < size - 7) { + fprintf(stderr, "katja_%d key modulus has %d bits\n", size, mp_count_bits(key.N)); + +len = mp_unsigned_bin_size(key.N); +mp_to_unsigned_bin(key.N, tmp); + fprintf(stderr, "N == \n"); +for (cnt = 0; cnt < len; ) { + fprintf(stderr, "%02x ", tmp[cnt]); + if (!(++cnt & 15)) fprintf(stderr, "\n"); +} + +len = mp_unsigned_bin_size(key.p); +mp_to_unsigned_bin(key.p, tmp); + fprintf(stderr, "p == \n"); +for (cnt = 0; cnt < len; ) { + fprintf(stderr, "%02x ", tmp[cnt]); + if (!(++cnt & 15)) fprintf(stderr, "\n"); +} + +len = mp_unsigned_bin_size(key.q); +mp_to_unsigned_bin(key.q, tmp); + fprintf(stderr, "\nq == \n"); +for (cnt = 0; cnt < len; ) { + fprintf(stderr, "%02x ", tmp[cnt]); + if (!(++cnt & 15)) fprintf(stderr, "\n"); +} + fprintf(stderr, "\n"); + + + return 1; + } + if (cnt != 9) { + katja_free(&key); + } + } + /* encrypt the key (without lparam) */ + for (cnt = 0; cnt < 4; cnt++) { + for (kat_msgsize = 1; kat_msgsize <= 42; kat_msgsize++) { + /* make a random key/msg */ + yarrow_read(in, kat_msgsize, &yarrow_prng); + + len = sizeof(out); + len2 = kat_msgsize; + + DO(katja_encrypt_key(in, kat_msgsize, out, &len, NULL, 0, &yarrow_prng, prng_idx, hash_idx, &key)); + /* change a byte */ + out[8] ^= 1; + DO(katja_decrypt_key(out, len, tmp, &len2, NULL, 0, hash_idx, &stat2, &key)); + /* change a byte back */ + out[8] ^= 1; + if (len2 != kat_msgsize) { + fprintf(stderr, "\nkatja_decrypt_key mismatch len %lu (first decrypt)", len2); + return 1; + } + + len2 = kat_msgsize; + DO(katja_decrypt_key(out, len, tmp, &len2, NULL, 0, hash_idx, &stat, &key)); + if (!(stat == 1 && stat2 == 0)) { + fprintf(stderr, "katja_decrypt_key failed"); + return 1; + } + if (len2 != kat_msgsize || memcmp(tmp, in, kat_msgsize)) { + unsigned long x; + fprintf(stderr, "\nkatja_decrypt_key mismatch, len %lu (second decrypt)\n", len2); + fprintf(stderr, "Original contents: \n"); + for (x = 0; x < kat_msgsize; ) { + fprintf(stderr, "%02x ", in[x]); + if (!(++x % 16)) { + fprintf(stderr, "\n"); + } + } + fprintf(stderr, "\n"); + fprintf(stderr, "Output contents: \n"); + for (x = 0; x < kat_msgsize; ) { + fprintf(stderr, "%02x ", out[x]); + if (!(++x % 16)) { + fprintf(stderr, "\n"); + } + } + fprintf(stderr, "\n"); + return 1; + } + } + } + + /* encrypt the key (with lparam) */ + for (kat_msgsize = 1; kat_msgsize <= 42; kat_msgsize++) { + len = sizeof(out); + len2 = kat_msgsize; + DO(katja_encrypt_key(in, kat_msgsize, out, &len, lparam, sizeof(lparam), &yarrow_prng, prng_idx, hash_idx, &key)); + /* change a byte */ + out[8] ^= 1; + DO(katja_decrypt_key(out, len, tmp, &len2, lparam, sizeof(lparam), hash_idx, &stat2, &key)); + if (len2 != kat_msgsize) { + fprintf(stderr, "\nkatja_decrypt_key mismatch len %lu (first decrypt)", len2); + return 1; + } + /* change a byte back */ + out[8] ^= 1; + + len2 = kat_msgsize; + DO(katja_decrypt_key(out, len, tmp, &len2, lparam, sizeof(lparam), hash_idx, &stat, &key)); + if (!(stat == 1 && stat2 == 0)) { + fprintf(stderr, "katja_decrypt_key failed"); + return 1; + } + if (len2 != kat_msgsize || memcmp(tmp, in, kat_msgsize)) { + fprintf(stderr, "katja_decrypt_key mismatch len %lu", len2); + return 1; + } + } + +#if 0 + + /* sign a message (unsalted, lower cholestorol and Atkins approved) now */ + len = sizeof(out); + DO(katja_sign_hash(in, 20, out, &len, &yarrow_prng, prng_idx, hash_idx, 0, &key)); + +/* export key and import as both private and public */ + len2 = sizeof(tmp); + DO(katja_export(tmp, &len2, PK_PRIVATE, &key)); + DO(katja_import(tmp, len2, &privKey)); + len2 = sizeof(tmp); + DO(katja_export(tmp, &len2, PK_PUBLIC, &key)); + DO(katja_import(tmp, len2, &pubKey)); + + /* verify with original */ + DO(katja_verify_hash(out, len, in, 20, hash_idx, 0, &stat, &key)); + /* change a byte */ + in[0] ^= 1; + DO(katja_verify_hash(out, len, in, 20, hash_idx, 0, &stat2, &key)); + + if (!(stat == 1 && stat2 == 0)) { + fprintf(stderr, "katja_verify_hash (unsalted, origKey) failed, %d, %d", stat, stat2); + katja_free(&key); + katja_free(&pubKey); + katja_free(&privKey); + return 1; + } + + /* verify with privKey */ + /* change a byte */ + in[0] ^= 1; + DO(katja_verify_hash(out, len, in, 20, hash_idx, 0, &stat, &privKey)); + /* change a byte */ + in[0] ^= 1; + DO(katja_verify_hash(out, len, in, 20, hash_idx, 0, &stat2, &privKey)); + + if (!(stat == 1 && stat2 == 0)) { + fprintf(stderr, "katja_verify_hash (unsalted, privKey) failed, %d, %d", stat, stat2); + katja_free(&key); + katja_free(&pubKey); + katja_free(&privKey); + return 1; + } + + /* verify with pubKey */ + /* change a byte */ + in[0] ^= 1; + DO(katja_verify_hash(out, len, in, 20, hash_idx, 0, &stat, &pubKey)); + /* change a byte */ + in[0] ^= 1; + DO(katja_verify_hash(out, len, in, 20, hash_idx, 0, &stat2, &pubKey)); + + if (!(stat == 1 && stat2 == 0)) { + fprintf(stderr, "katja_verify_hash (unsalted, pubkey) failed, %d, %d", stat, stat2); + katja_free(&key); + katja_free(&pubKey); + katja_free(&privKey); + return 1; + } + + /* sign a message (salted) now (use privKey to make, pubKey to verify) */ + len = sizeof(out); + DO(katja_sign_hash(in, 20, out, &len, &yarrow_prng, prng_idx, hash_idx, 8, &privKey)); + DO(katja_verify_hash(out, len, in, 20, hash_idx, 8, &stat, &pubKey)); + /* change a byte */ + in[0] ^= 1; + DO(katja_verify_hash(out, len, in, 20, hash_idx, 8, &stat2, &pubKey)); + + if (!(stat == 1 && stat2 == 0)) { + fprintf(stderr, "katja_verify_hash (salted) failed, %d, %d", stat, stat2); + katja_free(&key); + katja_free(&pubKey); + katja_free(&privKey); + return 1; + } +#endif + + katja_free(&key); + katja_free(&pubKey); + katja_free(&privKey); +} + + /* free the key and return */ + return 0; +} + +#else + +int katja_test(void) +{ + return CRYPT_NOP; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/mac_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/mac_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,64 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +/* test pmac/omac/hmac */ +#include + +int mac_test(void) +{ +#ifdef LTC_HMAC + DO(hmac_test()); +#endif +#ifdef LTC_PMAC + DO(pmac_test()); +#endif +#ifdef LTC_OMAC + DO(omac_test()); +#endif +#ifdef LTC_XCBC + DO(xcbc_test()); +#endif +#ifdef LTC_F9_MODE + DO(f9_test()); +#endif +#ifdef LTC_EAX_MODE + DO(eax_test()); +#endif +#ifdef LTC_OCB_MODE + DO(ocb_test()); +#endif +#ifdef LTC_OCB3_MODE + DO(ocb3_test()); +#endif +#ifdef LTC_CCM_MODE + DO(ccm_test()); +#endif +#ifdef LTC_GCM_MODE + DO(gcm_test()); +#endif +#ifdef LTC_PELICAN + DO(pelican_test()); +#endif +#ifdef LTC_POLY1305 + DO(poly1305_test()); +#endif +#ifdef LTC_CHACHA20POLY1305_MODE + DO(chacha20poly1305_test()); +#endif +#ifdef LTC_BLAKE2SMAC + DO(blake2smac_test()); +#endif +#ifdef LTC_BLAKE2BMAC + DO(blake2bmac_test()); +#endif + return 0; +} + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/misc_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/misc_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,33 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include + +int misc_test(void) +{ +#ifdef LTC_HKDF + DO(hkdf_test()); +#endif +#ifdef LTC_PKCS_5 + DO(pkcs_5_test()); +#endif +#ifdef LTC_BASE64 + DO(base64_test()); +#endif +#ifdef LTC_ADLER32 + DO(adler32_test()); +#endif +#ifdef LTC_CRC32 + DO(crc32_test()); +#endif + return 0; +} + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/modes_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/modes_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,130 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +/* test CFB/OFB/CBC modes */ +#include + +int modes_test(void) +{ + int ret = CRYPT_NOP; +#ifdef LTC_CBC_MODE + symmetric_CBC cbc; +#endif +#ifdef LTC_CFB_MODE + symmetric_CFB cfb; +#endif +#ifdef LTC_OFB_MODE + symmetric_OFB ofb; +#endif +#if defined(LTC_CBC_MODE) || defined(LTC_CFB_MODE) || defined(LTC_OFB_MODE) + unsigned char pt[64], ct[64], tmp[64], key[16], iv[16], iv2[16]; + int cipher_idx; + unsigned long l; + + /* make a random pt, key and iv */ + yarrow_read(pt, 64, &yarrow_prng); + yarrow_read(key, 16, &yarrow_prng); + yarrow_read(iv, 16, &yarrow_prng); + + /* get idx of AES handy */ + cipher_idx = find_cipher("aes"); + if (cipher_idx == -1) { + fprintf(stderr, "test requires AES"); + return 1; + } +#endif + +#ifdef LTC_F8_MODE + DO(ret = f8_test_mode()); +#endif + +#ifdef LTC_LRW_MODE + DO(ret = lrw_test()); +#endif + +#ifdef LTC_CBC_MODE + /* test CBC mode */ + /* encode the block */ + DO(ret = cbc_start(cipher_idx, iv, key, 16, 0, &cbc)); + l = sizeof(iv2); + DO(ret = cbc_getiv(iv2, &l, &cbc)); + if (l != 16 || memcmp(iv2, iv, 16)) { + fprintf(stderr, "cbc_getiv failed"); + return 1; + } + DO(ret = cbc_encrypt(pt, ct, 64, &cbc)); + + /* decode the block */ + DO(ret = cbc_setiv(iv2, l, &cbc)); + zeromem(tmp, sizeof(tmp)); + DO(ret = cbc_decrypt(ct, tmp, 64, &cbc)); + if (memcmp(tmp, pt, 64) != 0) { + fprintf(stderr, "CBC failed"); + return 1; + } +#endif + +#ifdef LTC_CFB_MODE + /* test CFB mode */ + /* encode the block */ + DO(ret = cfb_start(cipher_idx, iv, key, 16, 0, &cfb)); + l = sizeof(iv2); + DO(ret = cfb_getiv(iv2, &l, &cfb)); + /* note we don't memcmp iv2/iv since cfb_start processes the IV for the first block */ + if (l != 16) { + fprintf(stderr, "cfb_getiv failed"); + return 1; + } + DO(ret = cfb_encrypt(pt, ct, 64, &cfb)); + + /* decode the block */ + DO(ret = cfb_setiv(iv, l, &cfb)); + zeromem(tmp, sizeof(tmp)); + DO(ret = cfb_decrypt(ct, tmp, 64, &cfb)); + if (memcmp(tmp, pt, 64) != 0) { + fprintf(stderr, "CFB failed"); + return 1; + } +#endif + +#ifdef LTC_OFB_MODE + /* test OFB mode */ + /* encode the block */ + DO(ret = ofb_start(cipher_idx, iv, key, 16, 0, &ofb)); + l = sizeof(iv2); + DO(ret = ofb_getiv(iv2, &l, &ofb)); + if (l != 16 || memcmp(iv2, iv, 16)) { + fprintf(stderr, "ofb_getiv failed"); + return 1; + } + DO(ret = ofb_encrypt(pt, ct, 64, &ofb)); + + /* decode the block */ + DO(ret = ofb_setiv(iv2, l, &ofb)); + zeromem(tmp, sizeof(tmp)); + DO(ret = ofb_decrypt(ct, tmp, 64, &ofb)); + if (memcmp(tmp, pt, 64) != 0) { + fprintf(stderr, "OFB failed"); + return 1; + } +#endif + +#if defined(LTC_CTR_MODE) && defined(LTC_RIJNDAEL) + DO(ret = ctr_test()); +#endif + +#ifdef LTC_XTS_MODE + DO(ret = xts_test()); +#endif + + return 0; +} + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/mpi_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/mpi_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,147 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include + +#if defined(LTC_MPI) && defined(LTC_TEST_MPI) +static int _radix_to_bin_test(void) +{ + /* RADIX 16 */ + const char *ghex = "2"; + const char *phex = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22" + "514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6" + "F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" + "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB" + "9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E8603" + "9B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA0510" + "15728E5A8AACAA68FFFFFFFFFFFFFFFF"; + const char *xhex = "A6681ADC386CE944C3DED9A7301DCC9C518250E3EDB62F959198F8DC0057DD6FB57ABAFD788198B1"; + const char *yhex = "39046632C834418DFA07B3091538B614D1FB5DBB785C0FBEA3B98B295BC0CD076A88D9452141A269" + "E8BAEB1DD654EBA03A5705318D129754CDF4003A8C399240FBB8F162490F6F0DC70E414B6FEE8808" + "6AFAA48E9F3A248EDC093452663D34E0E809D4F6BADBB36F80B6813EBF7C3281B862209E5604BDEA" + "8B8F5F7BFDC3EEB7ADB73048289BCEA0F5A5CDEE7DF91CD1F0BA632F06DBE9BA7EF014B84B02D497" + "CA7D0C60F734752A649DA496946B4E531B30D9F82EDD855636C0B0F2AE232E4186454E8887BB423E" + "32A5A2495EACBA99620ACD03A38345EBB6735E62330A8EE9AA6C8370410F5CD45AF37EE90A0DA95B" + "E96FC939E88FE0BD2CD09FC8F524208C"; + /* RADIX 47 */ + const char *gr47 = "2"; + const char *pr47 = "F27Mg1SadOFIRbDOJ5dHgHiVF02Z1LHHQ6G5SLG2U8aTdfH1ETk4GARRE7WW99dBUBLb9e2OHFIaSM1A" + "ag2LNNjgYa9I9CjQGJihL3J7A2SGQe8j5Ch8EHMj5jVbAYDiQKhhPhM6Hc56fKS40GUfJkGO7KJ6EXZQ" + "VgbSa2AkPC65F91g0PaYie8AGNVaFKaV9HOQf3ia1iW4i6eCOB9CcBbH7TbQij8AEgjZ0VRBcLKc6UYO" + "1Zc3I2Jc0h1H2HBEH8ONI3OYBbaPV6XhAd8WCc60D0RDBU3H9U7cWL28a0c90XNO0dh5RXEFBbUCE2ZG" + "gh9XQSVIHkVbFIS5F5IGVOkiWAVc9i8BHB2V0UbGW6UdRTZVV"; + const char *xr47 = "6bhO7O9NWFRgEMjdU0Y5POj3c1JP15MYEdIg3FO1PEjUY2aGYNSXcaF01R"; + const char *yr47 = "3GNPNWEYfKML1cIbI7Cc1Z0O7aQLJgB734dO2i56LLYDdI4gHYk2GAbQH2WI97hNeC7dj3fPEH8I9gV9" + "U323AXj1AJXbFPFIHGOTdC29QUUeH2SSc6NWhfQDDXd5Q5iXCKEAUGX3SKcNFIfVOYJgZCLjfHYQdgOQ" + "GCjKNgbEV7Hj34MU3b79iANX2DbMYfb9iGi78BWH2HYAd7IAhk7U0OYGHKJX1bIUUj1KBLhAUg46GaER" + "G9W3ARMfBCj6kSdDF9TdkWAjWTDj722IeVJERC4bKU2VDFG20kDhCMF985efD1SS8DfXcdCHF1kDUkSA" + "884FHYiFEPkaagQOBQaN9BNaEHNbbd002DCIIX5eMP4HgPJPF"; + /* RADIX 64 */ + const char *gr64 = "2"; + const char *pr64 = "3//////////yaFsg8XQC8qnCPYYu3S7D4f0au8YcVCT08BlgOx4viYKKe8UOuq1DtlbHcppJf36p0h2c" + "toNnGtJ+4rRMrHmaNaXRLsObv+nlHCGkccD+rh2/zSjlG6j+tkE6lxMecVfQwV915yIn/cIIXcKUpaMp" + "t207oueME/1PZQI3OSLTEQQHO/gFqapr+3PLqZtAEjbXnYyrOWXLAxdjKf1t2Mbcrd33LEIhoO1F5qR0" + "ZA625yCf1UHYuspZlZddSi60w60vidWwBi1wAFjSLTy6zCKidUAylsbLWN63cLINpgbMhb5T8c69Zw1H" + "0LSevQYgogQF//////////"; + const char *xr64 = "2cQ1hSE6pfHCFUsQSm7SoSKO9Gu+ssBvMHcFZS05VTRxLwklruWPYn"; + const char *yr64 = "v16Ooo3H1ZVe7imaLEBOKqVjTktXS3xwZkOifMy3D1sg8sKKXGQ9fwBhh7TPKww0wLmKnZHANLCtq03g" + "CEP90+xZnOaaFRmt73a5BR+w826hwf8wVEYIEt0aqKcOzDE3e2TJskjkpRu2sWJw/V3A1k68WdbO4lUg" + "BZrzx/SFkjwstC4WecywWzQNDxdtv7D7mkcCl1jlfkdxm5BXB0jINodqCOFSqTIfadQIMb6jEKnimsVW" + "ktOLMDi2myguZBa66HKw8Xxj2FZAbeabUhBgPOWhD0wE3HUksSrvYCmgEwQfiWt113rpKMlD+wGeDgLl" + "fRyavw8/WlIpGdyZr922C"; + /* RADIX 256 */ + unsigned char gbin[] = { 0x02 }; + unsigned char pbin[] = { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, + 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x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 0x4C, 0x52, 0xC9, 0xDE, 0x2B, 0xCB, 0xF6, 0x95, 0x58, 0x17, 0x18, + 0x39, 0x95, 0x49, 0x7C, 0xEA, 0x95, 0x6A, 0xE5, 0x15, 0xD2, 0x26, 0x18, 0x98, 0xFA, 0x05, 0x10, + 0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAC, 0xAA, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + }; + unsigned char xbin[] = { + 0xA6, 0x68, 0x1A, 0xDC, 0x38, 0x6C, 0xE9, 0x44, 0xC3, 0xDE, 0xD9, 0xA7, 0x30, 0x1D, 0xCC, 0x9C, + 0x51, 0x82, 0x50, 0xE3, 0xED, 0xB6, 0x2F, 0x95, 0x91, 0x98, 0xF8, 0xDC, 0x00, 0x57, 0xDD, 0x6F, + 0xB5, 0x7A, 0xBA, 0xFD, 0x78, 0x81, 0x98, 0xB1 + }; + unsigned char ybin[] = { + 0x39, 0x04, 0x66, 0x32, 0xC8, 0x34, 0x41, 0x8D, 0xFA, 0x07, 0xB3, 0x09, 0x15, 0x38, 0xB6, 0x14, + 0xD1, 0xFB, 0x5D, 0xBB, 0x78, 0x5C, 0x0F, 0xBE, 0xA3, 0xB9, 0x8B, 0x29, 0x5B, 0xC0, 0xCD, 0x07, + 0x6A, 0x88, 0xD9, 0x45, 0x21, 0x41, 0xA2, 0x69, 0xE8, 0xBA, 0xEB, 0x1D, 0xD6, 0x54, 0xEB, 0xA0, + 0x3A, 0x57, 0x05, 0x31, 0x8D, 0x12, 0x97, 0x54, 0xCD, 0xF4, 0x00, 0x3A, 0x8C, 0x39, 0x92, 0x40, + 0xFB, 0xB8, 0xF1, 0x62, 0x49, 0x0F, 0x6F, 0x0D, 0xC7, 0x0E, 0x41, 0x4B, 0x6F, 0xEE, 0x88, 0x08, + 0x6A, 0xFA, 0xA4, 0x8E, 0x9F, 0x3A, 0x24, 0x8E, 0xDC, 0x09, 0x34, 0x52, 0x66, 0x3D, 0x34, 0xE0, + 0xE8, 0x09, 0xD4, 0xF6, 0xBA, 0xDB, 0xB3, 0x6F, 0x80, 0xB6, 0x81, 0x3E, 0xBF, 0x7C, 0x32, 0x81, + 0xB8, 0x62, 0x20, 0x9E, 0x56, 0x04, 0xBD, 0xEA, 0x8B, 0x8F, 0x5F, 0x7B, 0xFD, 0xC3, 0xEE, 0xB7, + 0xAD, 0xB7, 0x30, 0x48, 0x28, 0x9B, 0xCE, 0xA0, 0xF5, 0xA5, 0xCD, 0xEE, 0x7D, 0xF9, 0x1C, 0xD1, + 0xF0, 0xBA, 0x63, 0x2F, 0x06, 0xDB, 0xE9, 0xBA, 0x7E, 0xF0, 0x14, 0xB8, 0x4B, 0x02, 0xD4, 0x97, + 0xCA, 0x7D, 0x0C, 0x60, 0xF7, 0x34, 0x75, 0x2A, 0x64, 0x9D, 0xA4, 0x96, 0x94, 0x6B, 0x4E, 0x53, + 0x1B, 0x30, 0xD9, 0xF8, 0x2E, 0xDD, 0x85, 0x56, 0x36, 0xC0, 0xB0, 0xF2, 0xAE, 0x23, 0x2E, 0x41, + 0x86, 0x45, 0x4E, 0x88, 0x87, 0xBB, 0x42, 0x3E, 0x32, 0xA5, 0xA2, 0x49, 0x5E, 0xAC, 0xBA, 0x99, + 0x62, 0x0A, 0xCD, 0x03, 0xA3, 0x83, 0x45, 0xEB, 0xB6, 0x73, 0x5E, 0x62, 0x33, 0x0A, 0x8E, 0xE9, + 0xAA, 0x6C, 0x83, 0x70, 0x41, 0x0F, 0x5C, 0xD4, 0x5A, 0xF3, 0x7E, 0xE9, 0x0A, 0x0D, 0xA9, 0x5B, + 0xE9, 0x6F, 0xC9, 0x39, 0xE8, 0x8F, 0xE0, 0xBD, 0x2C, 0xD0, 0x9F, 0xC8, 0xF5, 0x24, 0x20, 0x8C + }; + + struct { + int radix; + const void* g; int glen; + const void* p; int plen; + const void* x; int xlen; + const void* y; int ylen; + } test[4] = { + { 256, gbin, sizeof(gbin), pbin, sizeof(pbin), xbin, sizeof(xbin), ybin, sizeof(ybin) }, + { 16, ghex, strlen(ghex)+1, phex, strlen(phex)+1, xhex, strlen(xhex)+1, yhex, strlen(yhex)+1 }, + { 47, gr47, strlen(gr47)+1, pr47, strlen(pr47)+1, xr47, strlen(xr47)+1, yr47, strlen(yr47)+1 }, + { 64, gr64, strlen(gr64)+1, pr64, strlen(pr64)+1, xr64, strlen(xr64)+1, yr64, strlen(yr64)+1 }, + }; + int i, j; + unsigned char key_parts[4][256]; + unsigned long key_lens[4]; + + for (i = 1; i < 4; i++) { + for (j = 0; j < 4; ++j) { + key_lens[j] = sizeof(key_parts[j]); + } + DO(radix_to_bin(test[i].x, test[i].radix, key_parts[0], &key_lens[0])); + DO(radix_to_bin(test[i].y, test[i].radix, key_parts[1], &key_lens[1])); + DO(radix_to_bin(test[i].p, test[i].radix, key_parts[2], &key_lens[2])); + DO(radix_to_bin(test[i].g, test[i].radix, key_parts[3], &key_lens[3])); + + if (compare_testvector(key_parts[0], key_lens[0], test[0].x, test[0].xlen, "radix_to_bin(x)", i)) return CRYPT_FAIL_TESTVECTOR; + if (compare_testvector(key_parts[1], key_lens[1], test[0].y, test[0].ylen, "radix_to_bin(y)", i)) return CRYPT_FAIL_TESTVECTOR; + if (compare_testvector(key_parts[2], key_lens[2], test[0].p, test[0].plen, "radix_to_bin(p)", i)) return CRYPT_FAIL_TESTVECTOR; + if (compare_testvector(key_parts[3], key_lens[3], test[0].g, test[0].glen, "radix_to_bin(g)", i)) return CRYPT_FAIL_TESTVECTOR; + } + return CRYPT_OK; +} + +int mpi_test(void) +{ + return _radix_to_bin_test(); +} +#else +int mpi_test(void) +{ + return CRYPT_NOP; +} +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/multi_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/multi_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,237 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +/* test the multi helpers... */ +#include + +int multi_test(void) +{ + unsigned char key[32] = { 0 }; + unsigned char buf[2][MAXBLOCKSIZE]; + unsigned long len, len2; + +/* register algos */ + register_hash(&sha256_desc); + register_cipher(&aes_desc); + +/* HASH testing */ + len = sizeof(buf[0]); + hash_memory(find_hash("sha256"), (unsigned char*)"hello", 5, buf[0], &len); + len2 = sizeof(buf[0]); + hash_memory_multi(find_hash("sha256"), buf[1], &len2, (unsigned char*)"hello", 5, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } + len2 = sizeof(buf[0]); + hash_memory_multi(find_hash("sha256"), buf[1], &len2, (unsigned char*)"he", 2UL, "llo", 3UL, NULL, 0); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } + len2 = sizeof(buf[0]); + hash_memory_multi(find_hash("sha256"), buf[1], &len2, (unsigned char*)"h", 1UL, "e", 1UL, "l", 1UL, "l", 1UL, "o", 1UL, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } + +#ifdef LTC_HMAC + len = sizeof(buf[0]); + hmac_memory(find_hash("sha256"), key, 16, (unsigned char*)"hello", 5, buf[0], &len); + len2 = sizeof(buf[0]); + hmac_memory_multi(find_hash("sha256"), key, 16, buf[1], &len2, (unsigned char*)"hello", 5UL, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } + len2 = sizeof(buf[0]); + hmac_memory_multi(find_hash("sha256"), key, 16, buf[1], &len2, (unsigned char*)"he", 2UL, "llo", 3UL, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } + len2 = sizeof(buf[0]); + hmac_memory_multi(find_hash("sha256"), key, 16, buf[1], &len2, (unsigned char*)"h", 1UL, "e", 1UL, "l", 1UL, "l", 1UL, "o", 1UL, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } +#endif + +#ifdef LTC_OMAC + len = sizeof(buf[0]); + omac_memory(find_cipher("aes"), key, 16, (unsigned char*)"hello", 5, buf[0], &len); + len2 = sizeof(buf[0]); + omac_memory_multi(find_cipher("aes"), key, 16, buf[1], &len2, (unsigned char*)"hello", 5UL, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } + len2 = sizeof(buf[0]); + omac_memory_multi(find_cipher("aes"), key, 16, buf[1], &len2, (unsigned char*)"he", 2UL, "llo", 3UL, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } + len2 = sizeof(buf[0]); + omac_memory_multi(find_cipher("aes"), key, 16, buf[1], &len2, (unsigned char*)"h", 1UL, "e", 1UL, "l", 1UL, "l", 1UL, "o", 1UL, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } +#endif + +#ifdef LTC_PMAC + len = sizeof(buf[0]); + pmac_memory(find_cipher("aes"), key, 16, (unsigned char*)"hello", 5, buf[0], &len); + len2 = sizeof(buf[0]); + pmac_memory_multi(find_cipher("aes"), key, 16, buf[1], &len2, (unsigned char*)"hello", 5, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } + len2 = sizeof(buf[0]); + pmac_memory_multi(find_cipher("aes"), key, 16, buf[1], &len2, (unsigned char*)"he", 2UL, "llo", 3UL, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } + len2 = sizeof(buf[0]); + pmac_memory_multi(find_cipher("aes"), key, 16, buf[1], &len2, (unsigned char*)"h", 1UL, "e", 1UL, "l", 1UL, "l", 1UL, "o", 1UL, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } +#endif + +#ifdef LTC_XCBC + len = sizeof(buf[0]); + xcbc_memory(find_cipher("aes"), key, 16, (unsigned char*)"hello", 5, buf[0], &len); + len2 = sizeof(buf[0]); + xcbc_memory_multi(find_cipher("aes"), key, 16, buf[1], &len2, (unsigned char*)"hello", 5, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } + len2 = sizeof(buf[0]); + xcbc_memory_multi(find_cipher("aes"), key, 16, buf[1], &len2, (unsigned char*)"he", 2UL, "llo", 3UL, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } + len2 = sizeof(buf[0]); + xcbc_memory_multi(find_cipher("aes"), key, 16, buf[1], &len2, (unsigned char*)"h", 1UL, "e", 1UL, "l", 1UL, "l", 1UL, "o", 1UL, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } +#endif + +#ifdef LTC_F9 + len = sizeof(buf[0]); + f9_memory(find_cipher("aes"), key, 16, (unsigned char*)"hello", 5, buf[0], &len); + len2 = sizeof(buf[0]); + f9_memory_multi(find_cipher("aes"), key, 16, buf[1], &len2, (unsigned char*)"hello", 5, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } + len2 = sizeof(buf[0]); + f9_memory_multi(find_cipher("aes"), key, 16, buf[1], &len2, (unsigned char*)"he", 2UL, "llo", 3UL, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } + len2 = sizeof(buf[0]); + f9_memory_multi(find_cipher("aes"), key, 16, buf[1], &len2, (unsigned char*)"h", 1UL, "e", 1UL, "l", 1UL, "l", 1UL, "o", 1UL, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } +#endif + +#ifdef LTC_PELICAN + /* TODO: there is no pelican_memory_multi(..) */ +#endif + +#ifdef LTC_POLY1305 + len = sizeof(buf[0]); + poly1305_memory(key, 32, (unsigned char*)"hello", 5, buf[0], &len); + len2 = sizeof(buf[0]); + poly1305_memory_multi(key, 32, buf[1], &len2, (unsigned char*)"hello", 5, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } + len2 = sizeof(buf[0]); + poly1305_memory_multi(key, 32, buf[1], &len2, (unsigned char*)"he", 2UL, "llo", 3UL, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } + len2 = sizeof(buf[0]); + poly1305_memory_multi(key, 32, buf[1], &len2, (unsigned char*)"h", 1UL, "e", 1UL, "l", 1UL, "l", 1UL, "o", 1UL, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } +#endif + +#ifdef LTC_BLAKE2SMAC + len = 32; + blake2smac_memory(key, 16, (unsigned char*)"hello", 5, buf[0], &len); + len2 = 32; + blake2smac_memory_multi(key, 16, buf[1], &len2, (unsigned char*)"hello", 5, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } + len2 = 32; + blake2smac_memory_multi(key, 16, buf[1], &len2, (unsigned char*)"he", 2UL, "llo", 3UL, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } + len2 = 32; + blake2smac_memory_multi(key, 16, buf[1], &len2, (unsigned char*)"h", 1UL, "e", 1UL, "l", 1UL, "l", 1UL, "o", 1UL, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } +#endif + +#ifdef LTC_BLAKE2BMAC + len = 64; + blake2bmac_memory(key, 16, (unsigned char*)"hello", 5, buf[0], &len); + len2 = 64; + blake2bmac_memory_multi(key, 16, buf[1], &len2, (unsigned char*)"hello", 5, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } + len2 = 64; + blake2bmac_memory_multi(key, 16, buf[1], &len2, (unsigned char*)"he", 2UL, "llo", 3UL, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } + len2 = 64; + blake2bmac_memory_multi(key, 16, buf[1], &len2, (unsigned char*)"h", 1UL, "e", 1UL, "l", 1UL, "l", 1UL, "o", 1UL, NULL); + if (len != len2 || memcmp(buf[0], buf[1], len)) { + printf("Failed: %d %lu %lu\n", __LINE__, len, len2); + return CRYPT_FAIL_TESTVECTOR; + } +#endif + + return CRYPT_OK; +} + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/no_prng.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/no_prng.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,185 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include "tomcrypt.h" + +/** + @file no_prng.c + NO PRNG, Steffen Jaeckel +*/ + +#ifdef LTC_PKCS_1 + +typedef struct +{ + struct ltc_prng_descriptor desc; + char name[64]; + unsigned char entropy[1024]; + unsigned long len; + unsigned long offset; +} no_prng_desc_t; + +/** + Start the PRNG + @param prng [out] The PRNG state to initialize + @return CRYPT_OK if successful +*/ +int no_prng_start(prng_state *prng) +{ + no_prng_desc_t *no_prng = (no_prng_desc_t*) prng; + LTC_ARGCHK(no_prng != NULL); + LTC_ARGCHK(no_prng->name == (char*)no_prng + offsetof(no_prng_desc_t, name)); + no_prng->len = 0; + no_prng->offset = 0; + + return CRYPT_OK; +} + +/** + Add entropy to the PRNG state + @param in The data to add + @param inlen Length of the data to add + @param prng PRNG state to update + @return CRYPT_OK if successful +*/ +int no_prng_add_entropy(const unsigned char *in, unsigned long inlen, prng_state *prng) +{ + no_prng_desc_t *no_prng = (no_prng_desc_t*) prng; + LTC_ARGCHK(no_prng != NULL); + LTC_ARGCHK(no_prng->name == (char*)no_prng + offsetof(no_prng_desc_t, name)); + LTC_ARGCHK(in != NULL); + LTC_ARGCHK(inlen <= sizeof(no_prng->entropy)); + + no_prng->len = MIN(inlen, sizeof(no_prng->entropy)); + memcpy(no_prng->entropy, in, no_prng->len); + no_prng->offset = 0; + + return CRYPT_OK; + +} + +/** + Make the PRNG ready to read from + @param prng The PRNG to make active + @return CRYPT_OK if successful +*/ +int no_prng_ready(prng_state *prng) +{ + LTC_ARGCHK(prng != NULL); + + return CRYPT_OK; +} + +/** + Read from the PRNG + @param out Destination + @param outlen Length of output + @param prng The active PRNG to read from + @return Number of octets read +*/ +unsigned long no_prng_read(unsigned char *out, unsigned long outlen, prng_state *prng) +{ + no_prng_desc_t *no_prng = (no_prng_desc_t*) prng; + LTC_ARGCHK(no_prng != NULL); + LTC_ARGCHK(no_prng->name == (char*)no_prng + offsetof(no_prng_desc_t, name)); + LTC_ARGCHK(out != NULL); + + outlen = MIN(outlen, no_prng->len - no_prng->offset); + memcpy(out, &no_prng->entropy[no_prng->offset], outlen); + no_prng->offset += outlen; + + return outlen; +} + +/** + Terminate the PRNG + @param prng The PRNG to terminate + @return CRYPT_OK if successful +*/ +int no_prng_done(prng_state *prng) +{ + LTC_UNUSED_PARAM(prng); + return CRYPT_OK; +} + +/** + Export the PRNG state + @param out [out] Destination + @param outlen [in/out] Max size and resulting size of the state + @param prng The PRNG to export + @return CRYPT_OK if successful +*/ +int no_prng_export(unsigned char *out, unsigned long *outlen, prng_state *prng) +{ + LTC_UNUSED_PARAM(out); + LTC_UNUSED_PARAM(outlen); + LTC_UNUSED_PARAM(prng); + return CRYPT_OK; +} + +/** + Import a PRNG state + @param in The PRNG state + @param inlen Size of the state + @param prng The PRNG to import + @return CRYPT_OK if successful +*/ +int no_prng_import(const unsigned char *in, unsigned long inlen, prng_state *prng) +{ + LTC_UNUSED_PARAM(in); + LTC_UNUSED_PARAM(inlen); + LTC_UNUSED_PARAM(prng); + return CRYPT_OK; +} + +/** + PRNG self-test + @return CRYPT_OK if successful, CRYPT_NOP if self-testing has been disabled +*/ +int no_prng_test(void) +{ + return CRYPT_OK; +} + +static const struct ltc_prng_descriptor no_prng_desc = +{ + NULL, 0, + &no_prng_start, + &no_prng_add_entropy, + &no_prng_ready, + &no_prng_read, + &no_prng_done, + &no_prng_export, + &no_prng_import, + &no_prng_test +}; + +struct ltc_prng_descriptor* no_prng_desc_get(void) +{ + no_prng_desc_t* no_prng = XMALLOC(sizeof(*no_prng)); + LTC_ARGCHK(no_prng != NULL); + XMEMCPY(&no_prng->desc, &no_prng_desc, sizeof(no_prng_desc)); + LTC_ARGCHK(snprintf(no_prng->name, sizeof(no_prng->name), "no_prng@%p", no_prng) < (int)sizeof(no_prng->name)); + no_prng->desc.name = no_prng->name; + return &no_prng->desc; +} + +void no_prng_desc_free(struct ltc_prng_descriptor* prng) +{ + no_prng_desc_t *no_prng = (no_prng_desc_t*) prng; + LTC_ARGCHK(no_prng != NULL); + LTC_ARGCHK(no_prng->name == (char*)no_prng + offsetof(no_prng_desc_t, name)); + XFREE(no_prng); +} + +#endif + + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/pkcs_1_eme_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/pkcs_1_eme_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,78 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include + +#if defined(LTC_PKCS_1) && defined(LTC_TEST_MPI) + +#include "../notes/rsa-testvectors/pkcs1v15crypt-vectors.c" + + + +int pkcs_1_eme_test(void) +{ + struct ltc_prng_descriptor* no_prng_desc = no_prng_desc_get(); + int prng_idx = register_prng(no_prng_desc); + int hash_idx = find_hash("sha1"); + unsigned int i; + unsigned int j; + + DO(prng_is_valid(prng_idx)); + DO(hash_is_valid(hash_idx)); + + for (i = 0; i < sizeof(testcases_eme)/sizeof(testcases_eme[0]); ++i) { + testcase_t* t = &testcases_eme[i]; + rsa_key k, *key = &k; + DOX(mp_init_multi(&key->e, &key->d, &key->N, &key->dQ, + &key->dP, &key->qP, &key->p, &key->q, NULL), t->name); + + DOX(mp_read_unsigned_bin(key->e, t->rsa.e, t->rsa.e_l), t->name); + DOX(mp_read_unsigned_bin(key->d, t->rsa.d, t->rsa.d_l), t->name); + DOX(mp_read_unsigned_bin(key->N, t->rsa.n, t->rsa.n_l), t->name); + DOX(mp_read_unsigned_bin(key->dQ, t->rsa.dQ, t->rsa.dQ_l), t->name); + DOX(mp_read_unsigned_bin(key->dP, t->rsa.dP, t->rsa.dP_l), t->name); + DOX(mp_read_unsigned_bin(key->qP, t->rsa.qInv, t->rsa.qInv_l), t->name); + DOX(mp_read_unsigned_bin(key->q, t->rsa.q, t->rsa.q_l), t->name); + DOX(mp_read_unsigned_bin(key->p, t->rsa.p, t->rsa.p_l), t->name); + key->type = PK_PRIVATE; + + for (j = 0; j < sizeof(t->data)/sizeof(t->data[0]); ++j) { + rsaData_t* s = &t->data[j]; + unsigned char buf[256], obuf[256]; + unsigned long buflen = sizeof(buf), obuflen = sizeof(obuf); + int stat; + prng_descriptor[prng_idx].add_entropy(s->o2, s->o2_l, (prng_state*)no_prng_desc); + DOX(rsa_encrypt_key_ex(s->o1, s->o1_l, obuf, &obuflen, NULL, 0, (prng_state*)no_prng_desc, prng_idx, -1, LTC_PKCS_1_V1_5, key), s->name); + DOX(obuflen == (unsigned long)s->o3_l?CRYPT_OK:CRYPT_FAIL_TESTVECTOR, s->name); + DOX(memcmp(s->o3, obuf, s->o3_l)==0?CRYPT_OK:CRYPT_FAIL_TESTVECTOR, s->name); + DOX(rsa_decrypt_key_ex(obuf, obuflen, buf, &buflen, NULL, 0, -1, LTC_PKCS_1_V1_5, &stat, key), s->name); + DOX(stat == 1?CRYPT_OK:CRYPT_FAIL_TESTVECTOR, s->name); + } /* for */ + + mp_clear_multi(key->d, key->e, key->N, key->dQ, key->dP, key->qP, key->p, key->q, NULL); + } /* for */ + + unregister_prng(no_prng_desc); + no_prng_desc_free(no_prng_desc); + + return 0; +} + +#else + +int pkcs_1_eme_test(void) +{ + return CRYPT_NOP; +} + +#endif + + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/pkcs_1_emsa_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/pkcs_1_emsa_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,72 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include + +#if defined(LTC_PKCS_1) && defined(LTC_TEST_MPI) + +#include "../notes/rsa-testvectors/pkcs1v15sign-vectors.c" + + + +int pkcs_1_emsa_test(void) +{ + int hash_idx = find_hash("sha1"); + unsigned int i; + unsigned int j; + + DO(hash_is_valid(hash_idx)); + + for (i = 0; i < sizeof(testcases_emsa)/sizeof(testcases_emsa[0]); ++i) { + testcase_t* t = &testcases_emsa[i]; + rsa_key k, *key = &k; + DOX(mp_init_multi(&key->e, &key->d, &key->N, &key->dQ, + &key->dP, &key->qP, &key->p, &key->q, NULL), t->name); + + DOX(mp_read_unsigned_bin(key->e, t->rsa.e, t->rsa.e_l), t->name); + DOX(mp_read_unsigned_bin(key->d, t->rsa.d, t->rsa.d_l), t->name); + DOX(mp_read_unsigned_bin(key->N, t->rsa.n, t->rsa.n_l), t->name); + DOX(mp_read_unsigned_bin(key->dQ, t->rsa.dQ, t->rsa.dQ_l), t->name); + DOX(mp_read_unsigned_bin(key->dP, t->rsa.dP, t->rsa.dP_l), t->name); + DOX(mp_read_unsigned_bin(key->qP, t->rsa.qInv, t->rsa.qInv_l), t->name); + DOX(mp_read_unsigned_bin(key->q, t->rsa.q, t->rsa.q_l), t->name); + DOX(mp_read_unsigned_bin(key->p, t->rsa.p, t->rsa.p_l), t->name); + key->type = PK_PRIVATE; + + for (j = 0; j < sizeof(t->data)/sizeof(t->data[0]); ++j) { + rsaData_t* s = &t->data[j]; + unsigned char buf[20], obuf[256]; + unsigned long buflen = sizeof(buf), obuflen = sizeof(obuf); + int stat; + DOX(hash_memory(hash_idx, s->o1, s->o1_l, buf, &buflen), s->name); + DOX(rsa_sign_hash_ex(buf, buflen, obuf, &obuflen, LTC_PKCS_1_V1_5, NULL, -1, hash_idx, 0, key), s->name); + DOX(obuflen == (unsigned long)s->o2_l?CRYPT_OK:CRYPT_FAIL_TESTVECTOR, s->name); + DOX(memcmp(s->o2, obuf, s->o2_l)==0?CRYPT_OK:CRYPT_FAIL_TESTVECTOR, s->name); + DOX(rsa_verify_hash_ex(obuf, obuflen, buf, buflen, LTC_PKCS_1_V1_5, hash_idx, 0, &stat, key), s->name); + DOX(stat == 1?CRYPT_OK:CRYPT_FAIL_TESTVECTOR, s->name); + } /* for */ + + mp_clear_multi(key->d, key->e, key->N, key->dQ, key->dP, key->qP, key->p, key->q, NULL); + } /* for */ + + return 0; +} + +#else + +int pkcs_1_emsa_test(void) +{ + return CRYPT_NOP; +} + +#endif + + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/pkcs_1_oaep_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/pkcs_1_oaep_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,78 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include + +#if defined(LTC_PKCS_1) && defined(LTC_TEST_MPI) + +#include "../notes/rsa-testvectors/oaep-vect.c" + + + +int pkcs_1_oaep_test(void) +{ + struct ltc_prng_descriptor* no_prng_desc = no_prng_desc_get(); + int prng_idx = register_prng(no_prng_desc); + int hash_idx = find_hash("sha1"); + unsigned int i; + unsigned int j; + + DO(prng_is_valid(prng_idx)); + DO(hash_is_valid(hash_idx)); + + for (i = 0; i < sizeof(testcases_oaep)/sizeof(testcases_oaep[0]); ++i) { + testcase_t* t = &testcases_oaep[i]; + rsa_key k, *key = &k; + DOX(mp_init_multi(&key->e, &key->d, &key->N, &key->dQ, + &key->dP, &key->qP, &key->p, &key->q, NULL), t->name); + + DOX(mp_read_unsigned_bin(key->e, t->rsa.e, t->rsa.e_l), t->name); + DOX(mp_read_unsigned_bin(key->d, t->rsa.d, t->rsa.d_l), t->name); + DOX(mp_read_unsigned_bin(key->N, t->rsa.n, t->rsa.n_l), t->name); + DOX(mp_read_unsigned_bin(key->dQ, t->rsa.dQ, t->rsa.dQ_l), t->name); + DOX(mp_read_unsigned_bin(key->dP, t->rsa.dP, t->rsa.dP_l), t->name); + DOX(mp_read_unsigned_bin(key->qP, t->rsa.qInv, t->rsa.qInv_l), t->name); + DOX(mp_read_unsigned_bin(key->q, t->rsa.q, t->rsa.q_l), t->name); + DOX(mp_read_unsigned_bin(key->p, t->rsa.p, t->rsa.p_l), t->name); + key->type = PK_PRIVATE; + + for (j = 0; j < sizeof(t->data)/sizeof(t->data[0]); ++j) { + rsaData_t* s = &t->data[j]; + unsigned char buf[256], obuf[256]; + unsigned long buflen = sizeof(buf), obuflen = sizeof(obuf); + int stat; + prng_descriptor[prng_idx].add_entropy(s->o2, s->o2_l, (prng_state*)no_prng_desc); + DOX(rsa_encrypt_key(s->o1, s->o1_l, obuf, &obuflen, NULL, 0, (prng_state*)no_prng_desc, prng_idx, hash_idx, key), s->name); + DOX(obuflen == (unsigned long)s->o3_l?CRYPT_OK:CRYPT_FAIL_TESTVECTOR, s->name); + DOX(memcmp(s->o3, obuf, s->o3_l)==0?CRYPT_OK:CRYPT_FAIL_TESTVECTOR, s->name); + DOX(rsa_decrypt_key(obuf, obuflen, buf, &buflen, NULL, 0, hash_idx, &stat, key), s->name); + DOX(stat == 1?CRYPT_OK:CRYPT_FAIL_TESTVECTOR, s->name); + } /* for */ + + mp_clear_multi(key->d, key->e, key->N, key->dQ, key->dP, key->qP, key->p, key->q, NULL); + } /* for */ + + unregister_prng(no_prng_desc); + no_prng_desc_free(no_prng_desc); + + return 0; +} + +#else + +int pkcs_1_oaep_test(void) +{ + return CRYPT_NOP; +} + +#endif + + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/pkcs_1_pss_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/pkcs_1_pss_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,79 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include + +#if defined(LTC_PKCS_1) && defined(LTC_TEST_MPI) + +#include "../notes/rsa-testvectors/pss-vect.c" + + + +int pkcs_1_pss_test(void) +{ + struct ltc_prng_descriptor* no_prng_desc = no_prng_desc_get(); + int prng_idx = register_prng(no_prng_desc); + int hash_idx = find_hash("sha1"); + unsigned int i; + unsigned int j; + + DO(prng_is_valid(prng_idx)); + DO(hash_is_valid(hash_idx)); + + for (i = 0; i < sizeof(testcases_pss)/sizeof(testcases_pss[0]); ++i) { + testcase_t* t = &testcases_pss[i]; + rsa_key k, *key = &k; + DOX(mp_init_multi(&key->e, &key->d, &key->N, &key->dQ, + &key->dP, &key->qP, &key->p, &key->q, NULL), t->name); + + DOX(mp_read_unsigned_bin(key->e, t->rsa.e, t->rsa.e_l), t->name); + DOX(mp_read_unsigned_bin(key->d, t->rsa.d, t->rsa.d_l), t->name); + DOX(mp_read_unsigned_bin(key->N, t->rsa.n, t->rsa.n_l), t->name); + DOX(mp_read_unsigned_bin(key->dQ, t->rsa.dQ, t->rsa.dQ_l), t->name); + DOX(mp_read_unsigned_bin(key->dP, t->rsa.dP, t->rsa.dP_l), t->name); + DOX(mp_read_unsigned_bin(key->qP, t->rsa.qInv, t->rsa.qInv_l), t->name); + DOX(mp_read_unsigned_bin(key->q, t->rsa.q, t->rsa.q_l), t->name); + DOX(mp_read_unsigned_bin(key->p, t->rsa.p, t->rsa.p_l), t->name); + key->type = PK_PRIVATE; + + for (j = 0; j < sizeof(t->data)/sizeof(t->data[0]); ++j) { + rsaData_t* s = &t->data[j]; + unsigned char buf[20], obuf[256]; + unsigned long buflen = sizeof(buf), obuflen = sizeof(obuf); + int stat; + prng_descriptor[prng_idx].add_entropy(s->o2, s->o2_l, (prng_state*)no_prng_desc); + DOX(hash_memory(hash_idx, s->o1, s->o1_l, buf, &buflen), s->name); + DOX(rsa_sign_hash(buf, buflen, obuf, &obuflen, (prng_state*)no_prng_desc, prng_idx, hash_idx, s->o2_l, key), s->name); + DOX(obuflen == (unsigned long)s->o3_l?CRYPT_OK:CRYPT_FAIL_TESTVECTOR, s->name); + DOX(memcmp(s->o3, obuf, s->o3_l)==0?CRYPT_OK:CRYPT_FAIL_TESTVECTOR, s->name); + DOX(rsa_verify_hash(obuf, obuflen, buf, buflen, hash_idx, s->o2_l, &stat, key), s->name); + DOX(stat == 1?CRYPT_OK:CRYPT_FAIL_TESTVECTOR, s->name); + } /* for */ + + mp_clear_multi(key->d, key->e, key->N, key->dQ, key->dP, key->qP, key->p, key->q, NULL); + } /* for */ + + unregister_prng(no_prng_desc); + no_prng_desc_free(no_prng_desc); + + return 0; +} + +#else + +int pkcs_1_pss_test(void) +{ + return CRYPT_NOP; +} + +#endif + + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/pkcs_1_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/pkcs_1_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,106 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include + +#ifdef LTC_PKCS_1 + +#ifdef LTC_TEST_REAL_RAND +#define LTC_TEST_RAND_SEED time(NULL) +#else +#define LTC_TEST_RAND_SEED 23 +#endif + +int pkcs_1_test(void) +{ + unsigned char buf[3][128]; + int res1, res2, res3, prng_idx, hash_idx; + unsigned long x, y, l1, l2, l3, i1, i2, lparamlen, saltlen, modlen; + static const unsigned char lparam[] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 }; + + /* get hash/prng */ + hash_idx = find_hash("sha1"); + prng_idx = find_prng("yarrow"); + + if (hash_idx == -1 || prng_idx == -1) { + fprintf(stderr, "pkcs_1 tests require sha1/yarrow"); + return 1; + } + + srand(LTC_TEST_RAND_SEED); + /* do many tests */ + for (x = 0; x < 100; x++) { + zeromem(buf, sizeof(buf)); + + /* make a dummy message (of random length) */ + l3 = (rand() & 31) + 8; + for (y = 0; y < l3; y++) buf[0][y] = rand() & 255; + + /* pick a random lparam len [0..16] */ + lparamlen = abs(rand()) % 17; + + /* pick a random saltlen 0..16 */ + saltlen = abs(rand()) % 17; + + /* PKCS #1 v2.0 supports modlens not multiple of 8 */ + modlen = 800 + (abs(rand()) % 224); + + /* encode it */ + l1 = sizeof(buf[1]); + DO(pkcs_1_oaep_encode(buf[0], l3, lparam, lparamlen, modlen, &yarrow_prng, prng_idx, hash_idx, buf[1], &l1)); + + /* decode it */ + l2 = sizeof(buf[2]); + DO(pkcs_1_oaep_decode(buf[1], l1, lparam, lparamlen, modlen, hash_idx, buf[2], &l2, &res1)); + + if (res1 != 1 || l2 != l3 || memcmp(buf[2], buf[0], l3) != 0) { + fprintf(stderr, "Outsize == %lu, should have been %lu, res1 = %d, lparamlen = %lu, msg contents follow.\n", l2, l3, res1, lparamlen); + fprintf(stderr, "ORIGINAL:\n"); + for (x = 0; x < l3; x++) { + fprintf(stderr, "%02x ", buf[0][x]); + } + fprintf(stderr, "\nRESULT:\n"); + for (x = 0; x < l2; x++) { + fprintf(stderr, "%02x ", buf[2][x]); + } + fprintf(stderr, "\n\n"); + return 1; + } + + /* test PSS */ + l1 = sizeof(buf[1]); + DO(pkcs_1_pss_encode(buf[0], l3, saltlen, &yarrow_prng, prng_idx, hash_idx, modlen, buf[1], &l1)); + DO(pkcs_1_pss_decode(buf[0], l3, buf[1], l1, saltlen, hash_idx, modlen, &res1)); + + buf[0][i1 = abs(rand()) % l3] ^= 1; + DO(pkcs_1_pss_decode(buf[0], l3, buf[1], l1, saltlen, hash_idx, modlen, &res2)); + + buf[0][i1] ^= 1; + buf[1][i2 = abs(rand()) % (l1 - 1)] ^= 1; + pkcs_1_pss_decode(buf[0], l3, buf[1], l1, saltlen, hash_idx, modlen, &res3); + if (!(res1 == 1 && res2 == 0 && res3 == 0)) { + fprintf(stderr, "PSS failed: %d, %d, %d, %lu, %lu\n", res1, res2, res3, l3, saltlen); + return 1; + } + } + return 0; +} + +#else + +int pkcs_1_test(void) +{ + return CRYPT_NOP; +} + +#endif + + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/prng_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/prng_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,90 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include + +#ifdef LTC_PRNG_ENABLE_LTC_RNG + +static unsigned long my_test_rng_read; + +static unsigned long my_test_rng(unsigned char *buf, unsigned long len, + void (*callback)(void)) +{ + unsigned long n; + LTC_UNUSED_PARAM(callback); + for (n = 0; n < len; ++n) { + buf[n] = 4; + } + my_test_rng_read += n; + return n; +} + +#endif + +int prng_test(void) +{ + int err = CRYPT_NOP; + int x; + unsigned char buf[4096] = { 0 }; + unsigned long n, one; + prng_state nprng; + +#ifdef LTC_PRNG_ENABLE_LTC_RNG + unsigned long before; + + unsigned long (*previous)(unsigned char *, unsigned long , void (*)(void)) = ltc_rng; + ltc_rng = my_test_rng; + + before = my_test_rng_read; + + if ((err = rng_make_prng(128, find_prng("yarrow"), &yarrow_prng, NULL)) != CRYPT_OK) { + fprintf(stderr, "rng_make_prng with 'my_test_rng' failed: %s\n", error_to_string(err)); + exit(EXIT_FAILURE); + } + + if (before == my_test_rng_read) { + fprintf(stderr, "somehow there was no read from the ltc_rng! %lu == %lu\n", before, my_test_rng_read); + exit(EXIT_FAILURE); + } + + ltc_rng = previous; +#endif + + /* test prngs (test, import/export) */ + for (x = 0; prng_descriptor[x].name != NULL; x++) { + if(strstr(prng_descriptor[x].name, "no_prng") == prng_descriptor[x].name) continue; + err = CRYPT_OK; + DOX(prng_descriptor[x].test(), prng_descriptor[x].name); + DOX(prng_descriptor[x].start(&nprng), prng_descriptor[x].name); + DOX(prng_descriptor[x].add_entropy((unsigned char *)"helloworld12", 12, &nprng), prng_descriptor[x].name); + DOX(prng_descriptor[x].ready(&nprng), prng_descriptor[x].name); + n = sizeof(buf); + if (strcmp(prng_descriptor[x].name, "sprng")) { + one = 1; + if (prng_descriptor[x].pexport(buf, &one, &nprng) != CRYPT_BUFFER_OVERFLOW) { + fprintf(stderr, "Error testing pexport with a short buffer (%s)\n", prng_descriptor[x].name); + return CRYPT_ERROR; + } + } + DOX(prng_descriptor[x].pexport(buf, &n, &nprng), prng_descriptor[x].name); + prng_descriptor[x].done(&nprng); + DOX(prng_descriptor[x].pimport(buf, n, &nprng), prng_descriptor[x].name); + DOX(prng_descriptor[x].pimport(buf, 4096, &nprng), prng_descriptor[x].name); /* try to import larger data */ + DOX(prng_descriptor[x].ready(&nprng), prng_descriptor[x].name); + if (prng_descriptor[x].read(buf, 100, &nprng) != 100) { + fprintf(stderr, "Error reading from imported PRNG (%s)!\n", prng_descriptor[x].name); + return CRYPT_ERROR; + } + prng_descriptor[x].done(&nprng); + } + return err; +} + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/rotate_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/rotate_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,416 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include + +/* Test rotate macros */ +int rotate_test(void) +{ + ulong32 L32 = 0x12345678UL; + ulong64 L64 = CONST64(0x1122334455667788); + int err = 0; + + /* ROR */ + if (ROR(L32, 0 ) != 0x12345678UL) { fprintf(stderr, "ROR 0 failed\n"); err++; } + if (ROR(L32, 1 ) != 0x091a2b3cUL) { fprintf(stderr, "ROR 1 failed\n"); err++; } + if (ROR(L32, 2 ) != 0x048d159eUL) { fprintf(stderr, "ROR 2 failed\n"); err++; } + if (ROR(L32, 3 ) != 0x02468acfUL) { fprintf(stderr, "ROR 3 failed\n"); err++; } + if (ROR(L32, 4 ) != 0x81234567UL) { fprintf(stderr, "ROR 4 failed\n"); err++; } + if (ROR(L32, 5 ) != 0xc091a2b3UL) { fprintf(stderr, "ROR 5 failed\n"); err++; } + if (ROR(L32, 6 ) != 0xe048d159UL) { fprintf(stderr, "ROR 6 failed\n"); err++; } + if (ROR(L32, 7 ) != 0xf02468acUL) { fprintf(stderr, "ROR 7 failed\n"); err++; } + if (ROR(L32, 8 ) != 0x78123456UL) { fprintf(stderr, "ROR 8 failed\n"); err++; } + if (ROR(L32, 9 ) != 0x3c091a2bUL) { fprintf(stderr, "ROR 9 failed\n"); err++; } + if (ROR(L32, 10) != 0x9e048d15UL) { fprintf(stderr, "ROR 10 failed\n"); err++; } + if (ROR(L32, 11) != 0xcf02468aUL) { fprintf(stderr, "ROR 11 failed\n"); err++; } + if (ROR(L32, 12) != 0x67812345UL) { fprintf(stderr, "ROR 12 failed\n"); err++; } + if (ROR(L32, 13) != 0xb3c091a2UL) { fprintf(stderr, "ROR 13 failed\n"); err++; } + if (ROR(L32, 14) != 0x59e048d1UL) { fprintf(stderr, "ROR 14 failed\n"); err++; } + if (ROR(L32, 15) != 0xacf02468UL) { fprintf(stderr, "ROR 15 failed\n"); err++; } + if (ROR(L32, 16) != 0x56781234UL) { fprintf(stderr, "ROR 16 failed\n"); err++; } + if (ROR(L32, 17) != 0x2b3c091aUL) { fprintf(stderr, "ROR 17 failed\n"); err++; } + if (ROR(L32, 18) != 0x159e048dUL) { fprintf(stderr, "ROR 18 failed\n"); err++; } + if (ROR(L32, 19) != 0x8acf0246UL) { fprintf(stderr, "ROR 19 failed\n"); err++; } + if (ROR(L32, 20) != 0x45678123UL) { fprintf(stderr, "ROR 20 failed\n"); err++; } + if (ROR(L32, 21) != 0xa2b3c091UL) { fprintf(stderr, "ROR 21 failed\n"); err++; } + if (ROR(L32, 22) != 0xd159e048UL) { fprintf(stderr, "ROR 22 failed\n"); err++; } + if (ROR(L32, 23) != 0x68acf024UL) { fprintf(stderr, "ROR 23 failed\n"); err++; } + if (ROR(L32, 24) != 0x34567812UL) { fprintf(stderr, "ROR 24 failed\n"); err++; } + if (ROR(L32, 25) != 0x1a2b3c09UL) { fprintf(stderr, "ROR 25 failed\n"); err++; } + if (ROR(L32, 26) != 0x8d159e04UL) { fprintf(stderr, "ROR 26 failed\n"); err++; } + if (ROR(L32, 27) != 0x468acf02UL) { fprintf(stderr, "ROR 27 failed\n"); err++; } + if (ROR(L32, 28) != 0x23456781UL) { fprintf(stderr, "ROR 28 failed\n"); err++; } + if (ROR(L32, 29) != 0x91a2b3c0UL) { fprintf(stderr, "ROR 29 failed\n"); err++; } + if (ROR(L32, 30) != 0x48d159e0UL) { fprintf(stderr, "ROR 30 failed\n"); err++; } + if (ROR(L32, 31) != 0x2468acf0UL) { fprintf(stderr, "ROR 31 failed\n"); err++; } + /* ROR64 */ + if (ROR64(L64, 0 ) != CONST64(0x1122334455667788)) { fprintf(stderr, "ROR64 0 failed\n"); err++; } + if (ROR64(L64, 1 ) != CONST64(0x089119a22ab33bc4)) { fprintf(stderr, "ROR64 1 failed\n"); err++; } + if (ROR64(L64, 2 ) != CONST64(0x04488cd115599de2)) { fprintf(stderr, "ROR64 2 failed\n"); err++; } + if (ROR64(L64, 3 ) != CONST64(0x022446688aaccef1)) { fprintf(stderr, "ROR64 3 failed\n"); err++; } + if (ROR64(L64, 4 ) != CONST64(0x8112233445566778)) { fprintf(stderr, "ROR64 4 failed\n"); err++; } + if (ROR64(L64, 5 ) != CONST64(0x4089119a22ab33bc)) { fprintf(stderr, "ROR64 5 failed\n"); err++; } + if (ROR64(L64, 6 ) != CONST64(0x204488cd115599de)) { fprintf(stderr, "ROR64 6 failed\n"); err++; } + if (ROR64(L64, 7 ) != CONST64(0x1022446688aaccef)) { fprintf(stderr, "ROR64 7 failed\n"); err++; } + if (ROR64(L64, 8 ) != CONST64(0x8811223344556677)) { fprintf(stderr, "ROR64 8 failed\n"); err++; } + if (ROR64(L64, 9 ) != CONST64(0xc4089119a22ab33b)) { fprintf(stderr, "ROR64 9 failed\n"); err++; } + if (ROR64(L64, 10) != CONST64(0xe204488cd115599d)) { fprintf(stderr, "ROR64 10 failed\n"); err++; } + if (ROR64(L64, 11) != CONST64(0xf1022446688aacce)) { fprintf(stderr, "ROR64 11 failed\n"); err++; } + if (ROR64(L64, 12) != CONST64(0x7881122334455667)) { fprintf(stderr, "ROR64 12 failed\n"); err++; } + if (ROR64(L64, 13) != CONST64(0xbc4089119a22ab33)) { fprintf(stderr, "ROR64 13 failed\n"); err++; } + if (ROR64(L64, 14) != CONST64(0xde204488cd115599)) { fprintf(stderr, "ROR64 14 failed\n"); err++; } + if (ROR64(L64, 15) != CONST64(0xef1022446688aacc)) { fprintf(stderr, "ROR64 15 failed\n"); err++; } + if (ROR64(L64, 16) != CONST64(0x7788112233445566)) { fprintf(stderr, "ROR64 16 failed\n"); err++; } + if (ROR64(L64, 17) != CONST64(0x3bc4089119a22ab3)) { fprintf(stderr, "ROR64 17 failed\n"); err++; } + if (ROR64(L64, 18) != CONST64(0x9de204488cd11559)) { fprintf(stderr, "ROR64 18 failed\n"); err++; } + if (ROR64(L64, 19) != CONST64(0xcef1022446688aac)) { fprintf(stderr, "ROR64 19 failed\n"); err++; } + if (ROR64(L64, 20) != CONST64(0x6778811223344556)) { fprintf(stderr, "ROR64 20 failed\n"); err++; } + if (ROR64(L64, 21) != CONST64(0x33bc4089119a22ab)) { fprintf(stderr, "ROR64 21 failed\n"); err++; } + if (ROR64(L64, 22) != CONST64(0x99de204488cd1155)) { fprintf(stderr, "ROR64 22 failed\n"); err++; } + if (ROR64(L64, 23) != CONST64(0xccef1022446688aa)) { fprintf(stderr, "ROR64 23 failed\n"); err++; } + if (ROR64(L64, 24) != CONST64(0x6677881122334455)) { fprintf(stderr, "ROR64 24 failed\n"); err++; } + if (ROR64(L64, 25) != CONST64(0xb33bc4089119a22a)) { fprintf(stderr, "ROR64 25 failed\n"); err++; } + if (ROR64(L64, 26) != CONST64(0x599de204488cd115)) { fprintf(stderr, "ROR64 26 failed\n"); err++; } + if (ROR64(L64, 27) != CONST64(0xaccef1022446688a)) { fprintf(stderr, "ROR64 27 failed\n"); err++; } + if (ROR64(L64, 28) != CONST64(0x5667788112233445)) { fprintf(stderr, "ROR64 28 failed\n"); err++; } + if (ROR64(L64, 29) != CONST64(0xab33bc4089119a22)) { fprintf(stderr, "ROR64 29 failed\n"); err++; } + if (ROR64(L64, 30) != CONST64(0x5599de204488cd11)) { fprintf(stderr, "ROR64 30 failed\n"); err++; } + if (ROR64(L64, 31) != CONST64(0xaaccef1022446688)) { fprintf(stderr, "ROR64 31 failed\n"); err++; } + if (ROR64(L64, 32) != CONST64(0x5566778811223344)) { fprintf(stderr, "ROR64 32 failed\n"); err++; } + if (ROR64(L64, 33) != CONST64(0x2ab33bc4089119a2)) { fprintf(stderr, "ROR64 33 failed\n"); err++; } + if (ROR64(L64, 34) != CONST64(0x15599de204488cd1)) { fprintf(stderr, "ROR64 34 failed\n"); err++; } + if (ROR64(L64, 35) != CONST64(0x8aaccef102244668)) { fprintf(stderr, "ROR64 35 failed\n"); err++; } + if (ROR64(L64, 36) != CONST64(0x4556677881122334)) { fprintf(stderr, "ROR64 36 failed\n"); err++; } + if (ROR64(L64, 37) != CONST64(0x22ab33bc4089119a)) { fprintf(stderr, "ROR64 37 failed\n"); err++; } + if (ROR64(L64, 38) != CONST64(0x115599de204488cd)) { fprintf(stderr, "ROR64 38 failed\n"); err++; } + if (ROR64(L64, 39) != CONST64(0x88aaccef10224466)) { fprintf(stderr, "ROR64 39 failed\n"); err++; } + if (ROR64(L64, 40) != CONST64(0x4455667788112233)) { fprintf(stderr, "ROR64 40 failed\n"); err++; } + if (ROR64(L64, 41) != CONST64(0xa22ab33bc4089119)) { fprintf(stderr, "ROR64 41 failed\n"); err++; } + if (ROR64(L64, 42) != CONST64(0xd115599de204488c)) { fprintf(stderr, "ROR64 42 failed\n"); err++; } + if (ROR64(L64, 43) != CONST64(0x688aaccef1022446)) { fprintf(stderr, "ROR64 43 failed\n"); err++; } + if (ROR64(L64, 44) != CONST64(0x3445566778811223)) { fprintf(stderr, "ROR64 44 failed\n"); err++; } + if (ROR64(L64, 45) != CONST64(0x9a22ab33bc408911)) { fprintf(stderr, "ROR64 45 failed\n"); err++; } + if (ROR64(L64, 46) != CONST64(0xcd115599de204488)) { fprintf(stderr, "ROR64 46 failed\n"); err++; } + if (ROR64(L64, 47) != CONST64(0x6688aaccef102244)) { fprintf(stderr, "ROR64 47 failed\n"); err++; } + if (ROR64(L64, 48) != CONST64(0x3344556677881122)) { fprintf(stderr, "ROR64 48 failed\n"); err++; } + if (ROR64(L64, 49) != CONST64(0x19a22ab33bc40891)) { fprintf(stderr, "ROR64 49 failed\n"); err++; } + if (ROR64(L64, 50) != CONST64(0x8cd115599de20448)) { fprintf(stderr, "ROR64 50 failed\n"); err++; } + if (ROR64(L64, 51) != CONST64(0x46688aaccef10224)) { fprintf(stderr, "ROR64 51 failed\n"); err++; } + if (ROR64(L64, 52) != CONST64(0x2334455667788112)) { fprintf(stderr, "ROR64 52 failed\n"); err++; } + if (ROR64(L64, 53) != CONST64(0x119a22ab33bc4089)) { fprintf(stderr, "ROR64 53 failed\n"); err++; } + if (ROR64(L64, 54) != CONST64(0x88cd115599de2044)) { fprintf(stderr, "ROR64 54 failed\n"); err++; } + if (ROR64(L64, 55) != CONST64(0x446688aaccef1022)) { fprintf(stderr, "ROR64 55 failed\n"); err++; } + if (ROR64(L64, 56) != CONST64(0x2233445566778811)) { fprintf(stderr, "ROR64 56 failed\n"); err++; } + if (ROR64(L64, 57) != CONST64(0x9119a22ab33bc408)) { fprintf(stderr, "ROR64 57 failed\n"); err++; } + if (ROR64(L64, 58) != CONST64(0x488cd115599de204)) { fprintf(stderr, "ROR64 58 failed\n"); err++; } + if (ROR64(L64, 59) != CONST64(0x2446688aaccef102)) { fprintf(stderr, "ROR64 59 failed\n"); err++; } + if (ROR64(L64, 60) != CONST64(0x1223344556677881)) { fprintf(stderr, "ROR64 60 failed\n"); err++; } + if (ROR64(L64, 61) != CONST64(0x89119a22ab33bc40)) { fprintf(stderr, "ROR64 61 failed\n"); err++; } + if (ROR64(L64, 62) != CONST64(0x4488cd115599de20)) { fprintf(stderr, "ROR64 62 failed\n"); err++; } + if (ROR64(L64, 63) != CONST64(0x22446688aaccef10)) { fprintf(stderr, "ROR64 63 failed\n"); err++; } + /* ROL */ + if (ROL(L32, 0 ) != 0x12345678UL) { fprintf(stderr, "ROL 0 failed\n"); err++; } + if (ROL(L32, 1 ) != 0x2468acf0UL) { fprintf(stderr, "ROL 1 failed\n"); err++; } + if (ROL(L32, 2 ) != 0x48d159e0UL) { fprintf(stderr, "ROL 2 failed\n"); err++; } + if (ROL(L32, 3 ) != 0x91a2b3c0UL) { fprintf(stderr, "ROL 3 failed\n"); err++; } + if (ROL(L32, 4 ) != 0x23456781UL) { fprintf(stderr, "ROL 4 failed\n"); err++; } + if (ROL(L32, 5 ) != 0x468acf02UL) { fprintf(stderr, "ROL 5 failed\n"); err++; } + if (ROL(L32, 6 ) != 0x8d159e04UL) { fprintf(stderr, "ROL 6 failed\n"); err++; } + if (ROL(L32, 7 ) != 0x1a2b3c09UL) { fprintf(stderr, "ROL 7 failed\n"); err++; } + if (ROL(L32, 8 ) != 0x34567812UL) { fprintf(stderr, "ROL 8 failed\n"); err++; } + if (ROL(L32, 9 ) != 0x68acf024UL) { fprintf(stderr, "ROL 9 failed\n"); err++; } + if (ROL(L32, 10) != 0xd159e048UL) { fprintf(stderr, "ROL 10 failed\n"); err++; } + if (ROL(L32, 11) != 0xa2b3c091UL) { fprintf(stderr, "ROL 11 failed\n"); err++; } + if (ROL(L32, 12) != 0x45678123UL) { fprintf(stderr, "ROL 12 failed\n"); err++; } + if (ROL(L32, 13) != 0x8acf0246UL) { fprintf(stderr, "ROL 13 failed\n"); err++; } + if (ROL(L32, 14) != 0x159e048dUL) { fprintf(stderr, "ROL 14 failed\n"); err++; } + if (ROL(L32, 15) != 0x2b3c091aUL) { fprintf(stderr, "ROL 15 failed\n"); err++; } + if (ROL(L32, 16) != 0x56781234UL) { fprintf(stderr, "ROL 16 failed\n"); err++; } + if (ROL(L32, 17) != 0xacf02468UL) { fprintf(stderr, "ROL 17 failed\n"); err++; } + if (ROL(L32, 18) != 0x59e048d1UL) { fprintf(stderr, "ROL 18 failed\n"); err++; } + if (ROL(L32, 19) != 0xb3c091a2UL) { fprintf(stderr, "ROL 19 failed\n"); err++; } + if (ROL(L32, 20) != 0x67812345UL) { fprintf(stderr, "ROL 20 failed\n"); err++; } + if (ROL(L32, 21) != 0xcf02468aUL) { fprintf(stderr, "ROL 21 failed\n"); err++; } + if (ROL(L32, 22) != 0x9e048d15UL) { fprintf(stderr, "ROL 22 failed\n"); err++; } + if (ROL(L32, 23) != 0x3c091a2bUL) { fprintf(stderr, "ROL 23 failed\n"); err++; } + if (ROL(L32, 24) != 0x78123456UL) { fprintf(stderr, "ROL 24 failed\n"); err++; } + if (ROL(L32, 25) != 0xf02468acUL) { fprintf(stderr, "ROL 25 failed\n"); err++; } + if (ROL(L32, 26) != 0xe048d159UL) { fprintf(stderr, "ROL 26 failed\n"); err++; } + if (ROL(L32, 27) != 0xc091a2b3UL) { fprintf(stderr, "ROL 27 failed\n"); err++; } + if (ROL(L32, 28) != 0x81234567UL) { fprintf(stderr, "ROL 28 failed\n"); err++; } + if (ROL(L32, 29) != 0x02468acfUL) { fprintf(stderr, "ROL 29 failed\n"); err++; } + if (ROL(L32, 30) != 0x048d159eUL) { fprintf(stderr, "ROL 30 failed\n"); err++; } + if (ROL(L32, 31) != 0x091a2b3cUL) { fprintf(stderr, "ROL 31 failed\n"); err++; } + /* ROL64 */ + if (ROL64(L64, 0 ) != CONST64(0x1122334455667788)) { fprintf(stderr, "ROL64 0 failed\n"); err++; } + if (ROL64(L64, 1 ) != CONST64(0x22446688aaccef10)) { fprintf(stderr, "ROL64 1 failed\n"); err++; } + if (ROL64(L64, 2 ) != CONST64(0x4488cd115599de20)) { fprintf(stderr, "ROL64 2 failed\n"); err++; } + if (ROL64(L64, 3 ) != CONST64(0x89119a22ab33bc40)) { fprintf(stderr, "ROL64 3 failed\n"); err++; } + if (ROL64(L64, 4 ) != CONST64(0x1223344556677881)) { fprintf(stderr, "ROL64 4 failed\n"); err++; } + if (ROL64(L64, 5 ) != CONST64(0x2446688aaccef102)) { fprintf(stderr, "ROL64 5 failed\n"); err++; } + if (ROL64(L64, 6 ) != CONST64(0x488cd115599de204)) { fprintf(stderr, "ROL64 6 failed\n"); err++; } + if (ROL64(L64, 7 ) != CONST64(0x9119a22ab33bc408)) { fprintf(stderr, "ROL64 7 failed\n"); err++; } + if (ROL64(L64, 8 ) != CONST64(0x2233445566778811)) { fprintf(stderr, "ROL64 8 failed\n"); err++; } + if (ROL64(L64, 9 ) != CONST64(0x446688aaccef1022)) { fprintf(stderr, "ROL64 9 failed\n"); err++; } + if (ROL64(L64, 10) != CONST64(0x88cd115599de2044)) { fprintf(stderr, "ROL64 10 failed\n"); err++; } + if (ROL64(L64, 11) != CONST64(0x119a22ab33bc4089)) { fprintf(stderr, "ROL64 11 failed\n"); err++; } + if (ROL64(L64, 12) != CONST64(0x2334455667788112)) { fprintf(stderr, "ROL64 12 failed\n"); err++; } + if (ROL64(L64, 13) != CONST64(0x46688aaccef10224)) { fprintf(stderr, "ROL64 13 failed\n"); err++; } + if (ROL64(L64, 14) != CONST64(0x8cd115599de20448)) { fprintf(stderr, "ROL64 14 failed\n"); err++; } + if (ROL64(L64, 15) != CONST64(0x19a22ab33bc40891)) { fprintf(stderr, "ROL64 15 failed\n"); err++; } + if (ROL64(L64, 16) != CONST64(0x3344556677881122)) { fprintf(stderr, "ROL64 16 failed\n"); err++; } + if (ROL64(L64, 17) != CONST64(0x6688aaccef102244)) { fprintf(stderr, "ROL64 17 failed\n"); err++; } + if (ROL64(L64, 18) != CONST64(0xcd115599de204488)) { fprintf(stderr, "ROL64 18 failed\n"); err++; } + if (ROL64(L64, 19) != CONST64(0x9a22ab33bc408911)) { fprintf(stderr, "ROL64 19 failed\n"); err++; } + if (ROL64(L64, 20) != CONST64(0x3445566778811223)) { fprintf(stderr, "ROL64 20 failed\n"); err++; } + if (ROL64(L64, 21) != CONST64(0x688aaccef1022446)) { fprintf(stderr, "ROL64 21 failed\n"); err++; } + if (ROL64(L64, 22) != CONST64(0xd115599de204488c)) { fprintf(stderr, "ROL64 22 failed\n"); err++; } + if (ROL64(L64, 23) != CONST64(0xa22ab33bc4089119)) { fprintf(stderr, "ROL64 23 failed\n"); err++; } + if (ROL64(L64, 24) != CONST64(0x4455667788112233)) { fprintf(stderr, "ROL64 24 failed\n"); err++; } + if (ROL64(L64, 25) != CONST64(0x88aaccef10224466)) { fprintf(stderr, "ROL64 25 failed\n"); err++; } + if (ROL64(L64, 26) != CONST64(0x115599de204488cd)) { fprintf(stderr, "ROL64 26 failed\n"); err++; } + if (ROL64(L64, 27) != CONST64(0x22ab33bc4089119a)) { fprintf(stderr, "ROL64 27 failed\n"); err++; } + if (ROL64(L64, 28) != CONST64(0x4556677881122334)) { fprintf(stderr, "ROL64 28 failed\n"); err++; } + if (ROL64(L64, 29) != CONST64(0x8aaccef102244668)) { fprintf(stderr, "ROL64 29 failed\n"); err++; } + if (ROL64(L64, 30) != CONST64(0x15599de204488cd1)) { fprintf(stderr, "ROL64 30 failed\n"); err++; } + if (ROL64(L64, 31) != CONST64(0x2ab33bc4089119a2)) { fprintf(stderr, "ROL64 31 failed\n"); err++; } + if (ROL64(L64, 32) != CONST64(0x5566778811223344)) { fprintf(stderr, "ROL64 32 failed\n"); err++; } + if (ROL64(L64, 33) != CONST64(0xaaccef1022446688)) { fprintf(stderr, "ROL64 33 failed\n"); err++; } + if (ROL64(L64, 34) != CONST64(0x5599de204488cd11)) { fprintf(stderr, "ROL64 34 failed\n"); err++; } + if (ROL64(L64, 35) != CONST64(0xab33bc4089119a22)) { fprintf(stderr, "ROL64 35 failed\n"); err++; } + if (ROL64(L64, 36) != CONST64(0x5667788112233445)) { fprintf(stderr, "ROL64 36 failed\n"); err++; } + if (ROL64(L64, 37) != CONST64(0xaccef1022446688a)) { fprintf(stderr, "ROL64 37 failed\n"); err++; } + if (ROL64(L64, 38) != CONST64(0x599de204488cd115)) { fprintf(stderr, "ROL64 38 failed\n"); err++; } + if (ROL64(L64, 39) != CONST64(0xb33bc4089119a22a)) { fprintf(stderr, "ROL64 39 failed\n"); err++; } + if (ROL64(L64, 40) != CONST64(0x6677881122334455)) { fprintf(stderr, "ROL64 40 failed\n"); err++; } + if (ROL64(L64, 41) != CONST64(0xccef1022446688aa)) { fprintf(stderr, "ROL64 41 failed\n"); err++; } + if (ROL64(L64, 42) != CONST64(0x99de204488cd1155)) { fprintf(stderr, "ROL64 42 failed\n"); err++; } + if (ROL64(L64, 43) != CONST64(0x33bc4089119a22ab)) { fprintf(stderr, "ROL64 43 failed\n"); err++; } + if (ROL64(L64, 44) != CONST64(0x6778811223344556)) { fprintf(stderr, "ROL64 44 failed\n"); err++; } + if (ROL64(L64, 45) != CONST64(0xcef1022446688aac)) { fprintf(stderr, "ROL64 45 failed\n"); err++; } + if (ROL64(L64, 46) != CONST64(0x9de204488cd11559)) { fprintf(stderr, "ROL64 46 failed\n"); err++; } + if (ROL64(L64, 47) != CONST64(0x3bc4089119a22ab3)) { fprintf(stderr, "ROL64 47 failed\n"); err++; } + if (ROL64(L64, 48) != CONST64(0x7788112233445566)) { fprintf(stderr, "ROL64 48 failed\n"); err++; } + if (ROL64(L64, 49) != CONST64(0xef1022446688aacc)) { fprintf(stderr, "ROL64 49 failed\n"); err++; } + if (ROL64(L64, 50) != CONST64(0xde204488cd115599)) { fprintf(stderr, "ROL64 50 failed\n"); err++; } + if (ROL64(L64, 51) != CONST64(0xbc4089119a22ab33)) { fprintf(stderr, "ROL64 51 failed\n"); err++; } + if (ROL64(L64, 52) != CONST64(0x7881122334455667)) { fprintf(stderr, "ROL64 52 failed\n"); err++; } + if (ROL64(L64, 53) != CONST64(0xf1022446688aacce)) { fprintf(stderr, "ROL64 53 failed\n"); err++; } + if (ROL64(L64, 54) != CONST64(0xe204488cd115599d)) { fprintf(stderr, "ROL64 54 failed\n"); err++; } + if (ROL64(L64, 55) != CONST64(0xc4089119a22ab33b)) { fprintf(stderr, "ROL64 55 failed\n"); err++; } + if (ROL64(L64, 56) != CONST64(0x8811223344556677)) { fprintf(stderr, "ROL64 56 failed\n"); err++; } + if (ROL64(L64, 57) != CONST64(0x1022446688aaccef)) { fprintf(stderr, "ROL64 57 failed\n"); err++; } + if (ROL64(L64, 58) != CONST64(0x204488cd115599de)) { fprintf(stderr, "ROL64 58 failed\n"); err++; } + if (ROL64(L64, 59) != CONST64(0x4089119a22ab33bc)) { fprintf(stderr, "ROL64 59 failed\n"); err++; } + if (ROL64(L64, 60) != CONST64(0x8112233445566778)) { fprintf(stderr, "ROL64 60 failed\n"); err++; } + if (ROL64(L64, 61) != CONST64(0x022446688aaccef1)) { fprintf(stderr, "ROL64 61 failed\n"); err++; } + if (ROL64(L64, 62) != CONST64(0x04488cd115599de2)) { fprintf(stderr, "ROL64 62 failed\n"); err++; } + if (ROL64(L64, 63) != CONST64(0x089119a22ab33bc4)) { fprintf(stderr, "ROL64 63 failed\n"); err++; } + /* RORc */ + if (RORc(L32, 0 ) != 0x12345678UL) { fprintf(stderr, "RORc 0 failed\n"); err++; } + if (RORc(L32, 1 ) != 0x091a2b3cUL) { fprintf(stderr, "RORc 1 failed\n"); err++; } + if (RORc(L32, 2 ) != 0x048d159eUL) { fprintf(stderr, "RORc 2 failed\n"); err++; } + if (RORc(L32, 3 ) != 0x02468acfUL) { fprintf(stderr, "RORc 3 failed\n"); err++; } + if (RORc(L32, 4 ) != 0x81234567UL) { fprintf(stderr, "RORc 4 failed\n"); err++; } + if (RORc(L32, 5 ) != 0xc091a2b3UL) { fprintf(stderr, "RORc 5 failed\n"); err++; } + if (RORc(L32, 6 ) != 0xe048d159UL) { fprintf(stderr, "RORc 6 failed\n"); err++; } + if (RORc(L32, 7 ) != 0xf02468acUL) { fprintf(stderr, "RORc 7 failed\n"); err++; } + if (RORc(L32, 8 ) != 0x78123456UL) { fprintf(stderr, "RORc 8 failed\n"); err++; } + if (RORc(L32, 9 ) != 0x3c091a2bUL) { fprintf(stderr, "RORc 9 failed\n"); err++; } + if (RORc(L32, 10) != 0x9e048d15UL) { fprintf(stderr, "RORc 10 failed\n"); err++; } + if (RORc(L32, 11) != 0xcf02468aUL) { fprintf(stderr, "RORc 11 failed\n"); err++; } + if (RORc(L32, 12) != 0x67812345UL) { fprintf(stderr, "RORc 12 failed\n"); err++; } + if (RORc(L32, 13) != 0xb3c091a2UL) { fprintf(stderr, "RORc 13 failed\n"); err++; } + if (RORc(L32, 14) != 0x59e048d1UL) { fprintf(stderr, "RORc 14 failed\n"); err++; } + if (RORc(L32, 15) != 0xacf02468UL) { fprintf(stderr, "RORc 15 failed\n"); err++; } + if (RORc(L32, 16) != 0x56781234UL) { fprintf(stderr, "RORc 16 failed\n"); err++; } + if (RORc(L32, 17) != 0x2b3c091aUL) { fprintf(stderr, "RORc 17 failed\n"); err++; } + if (RORc(L32, 18) != 0x159e048dUL) { fprintf(stderr, "RORc 18 failed\n"); err++; } + if (RORc(L32, 19) != 0x8acf0246UL) { fprintf(stderr, "RORc 19 failed\n"); err++; } + if (RORc(L32, 20) != 0x45678123UL) { fprintf(stderr, "RORc 20 failed\n"); err++; } + if (RORc(L32, 21) != 0xa2b3c091UL) { fprintf(stderr, "RORc 21 failed\n"); err++; } + if (RORc(L32, 22) != 0xd159e048UL) { fprintf(stderr, "RORc 22 failed\n"); err++; } + if (RORc(L32, 23) != 0x68acf024UL) { fprintf(stderr, "RORc 23 failed\n"); err++; } + if (RORc(L32, 24) != 0x34567812UL) { fprintf(stderr, "RORc 24 failed\n"); err++; } + if (RORc(L32, 25) != 0x1a2b3c09UL) { fprintf(stderr, "RORc 25 failed\n"); err++; } + if (RORc(L32, 26) != 0x8d159e04UL) { fprintf(stderr, "RORc 26 failed\n"); err++; } + if (RORc(L32, 27) != 0x468acf02UL) { fprintf(stderr, "RORc 27 failed\n"); err++; } + if (RORc(L32, 28) != 0x23456781UL) { fprintf(stderr, "RORc 28 failed\n"); err++; } + if (RORc(L32, 29) != 0x91a2b3c0UL) { fprintf(stderr, "RORc 29 failed\n"); err++; } + if (RORc(L32, 30) != 0x48d159e0UL) { fprintf(stderr, "RORc 30 failed\n"); err++; } + if (RORc(L32, 31) != 0x2468acf0UL) { fprintf(stderr, "RORc 31 failed\n"); err++; } + /* ROR64c */ + if (ROR64c(L64, 0 ) != CONST64(0x1122334455667788)) { fprintf(stderr, "ROR64c 0 failed\n"); err++; } + if (ROR64c(L64, 1 ) != CONST64(0x089119a22ab33bc4)) { fprintf(stderr, "ROR64c 1 failed\n"); err++; } + if (ROR64c(L64, 2 ) != CONST64(0x04488cd115599de2)) { fprintf(stderr, "ROR64c 2 failed\n"); err++; } + if (ROR64c(L64, 3 ) != CONST64(0x022446688aaccef1)) { fprintf(stderr, "ROR64c 3 failed\n"); err++; } + if (ROR64c(L64, 4 ) != CONST64(0x8112233445566778)) { fprintf(stderr, "ROR64c 4 failed\n"); err++; } + if (ROR64c(L64, 5 ) != CONST64(0x4089119a22ab33bc)) { fprintf(stderr, "ROR64c 5 failed\n"); err++; } + if (ROR64c(L64, 6 ) != CONST64(0x204488cd115599de)) { fprintf(stderr, "ROR64c 6 failed\n"); err++; } + if (ROR64c(L64, 7 ) != CONST64(0x1022446688aaccef)) { fprintf(stderr, "ROR64c 7 failed\n"); err++; } + if (ROR64c(L64, 8 ) != CONST64(0x8811223344556677)) { fprintf(stderr, "ROR64c 8 failed\n"); err++; } + if (ROR64c(L64, 9 ) != CONST64(0xc4089119a22ab33b)) { fprintf(stderr, "ROR64c 9 failed\n"); err++; } + if (ROR64c(L64, 10) != CONST64(0xe204488cd115599d)) { fprintf(stderr, "ROR64c 10 failed\n"); err++; } + if (ROR64c(L64, 11) != CONST64(0xf1022446688aacce)) { fprintf(stderr, "ROR64c 11 failed\n"); err++; } + if (ROR64c(L64, 12) != CONST64(0x7881122334455667)) { fprintf(stderr, "ROR64c 12 failed\n"); err++; } + if (ROR64c(L64, 13) != CONST64(0xbc4089119a22ab33)) { fprintf(stderr, "ROR64c 13 failed\n"); err++; } + if (ROR64c(L64, 14) != CONST64(0xde204488cd115599)) { fprintf(stderr, "ROR64c 14 failed\n"); err++; } + if (ROR64c(L64, 15) != CONST64(0xef1022446688aacc)) { fprintf(stderr, "ROR64c 15 failed\n"); err++; } + if (ROR64c(L64, 16) != CONST64(0x7788112233445566)) { fprintf(stderr, "ROR64c 16 failed\n"); err++; } + if (ROR64c(L64, 17) != CONST64(0x3bc4089119a22ab3)) { fprintf(stderr, "ROR64c 17 failed\n"); err++; } + if (ROR64c(L64, 18) != CONST64(0x9de204488cd11559)) { fprintf(stderr, "ROR64c 18 failed\n"); err++; } + if (ROR64c(L64, 19) != CONST64(0xcef1022446688aac)) { fprintf(stderr, "ROR64c 19 failed\n"); err++; } + if (ROR64c(L64, 20) != CONST64(0x6778811223344556)) { fprintf(stderr, "ROR64c 20 failed\n"); err++; } + if (ROR64c(L64, 21) != CONST64(0x33bc4089119a22ab)) { fprintf(stderr, "ROR64c 21 failed\n"); err++; } + if (ROR64c(L64, 22) != CONST64(0x99de204488cd1155)) { fprintf(stderr, "ROR64c 22 failed\n"); err++; } + if (ROR64c(L64, 23) != CONST64(0xccef1022446688aa)) { fprintf(stderr, "ROR64c 23 failed\n"); err++; } + if (ROR64c(L64, 24) != CONST64(0x6677881122334455)) { fprintf(stderr, "ROR64c 24 failed\n"); err++; } + if (ROR64c(L64, 25) != CONST64(0xb33bc4089119a22a)) { fprintf(stderr, "ROR64c 25 failed\n"); err++; } + if (ROR64c(L64, 26) != CONST64(0x599de204488cd115)) { fprintf(stderr, "ROR64c 26 failed\n"); err++; } + if (ROR64c(L64, 27) != CONST64(0xaccef1022446688a)) { fprintf(stderr, "ROR64c 27 failed\n"); err++; } + if (ROR64c(L64, 28) != CONST64(0x5667788112233445)) { fprintf(stderr, "ROR64c 28 failed\n"); err++; } + if (ROR64c(L64, 29) != CONST64(0xab33bc4089119a22)) { fprintf(stderr, "ROR64c 29 failed\n"); err++; } + if (ROR64c(L64, 30) != CONST64(0x5599de204488cd11)) { fprintf(stderr, "ROR64c 30 failed\n"); err++; } + if (ROR64c(L64, 31) != CONST64(0xaaccef1022446688)) { fprintf(stderr, "ROR64c 31 failed\n"); err++; } + if (ROR64c(L64, 32) != CONST64(0x5566778811223344)) { fprintf(stderr, "ROR64c 32 failed\n"); err++; } + if (ROR64c(L64, 33) != CONST64(0x2ab33bc4089119a2)) { fprintf(stderr, "ROR64c 33 failed\n"); err++; } + if (ROR64c(L64, 34) != CONST64(0x15599de204488cd1)) { fprintf(stderr, "ROR64c 34 failed\n"); err++; } + if (ROR64c(L64, 35) != CONST64(0x8aaccef102244668)) { fprintf(stderr, "ROR64c 35 failed\n"); err++; } + if (ROR64c(L64, 36) != CONST64(0x4556677881122334)) { fprintf(stderr, "ROR64c 36 failed\n"); err++; } + if (ROR64c(L64, 37) != CONST64(0x22ab33bc4089119a)) { fprintf(stderr, "ROR64c 37 failed\n"); err++; } + if (ROR64c(L64, 38) != CONST64(0x115599de204488cd)) { fprintf(stderr, "ROR64c 38 failed\n"); err++; } + if (ROR64c(L64, 39) != CONST64(0x88aaccef10224466)) { fprintf(stderr, "ROR64c 39 failed\n"); err++; } + if (ROR64c(L64, 40) != CONST64(0x4455667788112233)) { fprintf(stderr, "ROR64c 40 failed\n"); err++; } + if (ROR64c(L64, 41) != CONST64(0xa22ab33bc4089119)) { fprintf(stderr, "ROR64c 41 failed\n"); err++; } + if (ROR64c(L64, 42) != CONST64(0xd115599de204488c)) { fprintf(stderr, "ROR64c 42 failed\n"); err++; } + if (ROR64c(L64, 43) != CONST64(0x688aaccef1022446)) { fprintf(stderr, "ROR64c 43 failed\n"); err++; } + if (ROR64c(L64, 44) != CONST64(0x3445566778811223)) { fprintf(stderr, "ROR64c 44 failed\n"); err++; } + if (ROR64c(L64, 45) != CONST64(0x9a22ab33bc408911)) { fprintf(stderr, "ROR64c 45 failed\n"); err++; } + if (ROR64c(L64, 46) != CONST64(0xcd115599de204488)) { fprintf(stderr, "ROR64c 46 failed\n"); err++; } + if (ROR64c(L64, 47) != CONST64(0x6688aaccef102244)) { fprintf(stderr, "ROR64c 47 failed\n"); err++; } + if (ROR64c(L64, 48) != CONST64(0x3344556677881122)) { fprintf(stderr, "ROR64c 48 failed\n"); err++; } + if (ROR64c(L64, 49) != CONST64(0x19a22ab33bc40891)) { fprintf(stderr, "ROR64c 49 failed\n"); err++; } + if (ROR64c(L64, 50) != CONST64(0x8cd115599de20448)) { fprintf(stderr, "ROR64c 50 failed\n"); err++; } + if (ROR64c(L64, 51) != CONST64(0x46688aaccef10224)) { fprintf(stderr, "ROR64c 51 failed\n"); err++; } + if (ROR64c(L64, 52) != CONST64(0x2334455667788112)) { fprintf(stderr, "ROR64c 52 failed\n"); err++; } + if (ROR64c(L64, 53) != CONST64(0x119a22ab33bc4089)) { fprintf(stderr, "ROR64c 53 failed\n"); err++; } + if (ROR64c(L64, 54) != CONST64(0x88cd115599de2044)) { fprintf(stderr, "ROR64c 54 failed\n"); err++; } + if (ROR64c(L64, 55) != CONST64(0x446688aaccef1022)) { fprintf(stderr, "ROR64c 55 failed\n"); err++; } + if (ROR64c(L64, 56) != CONST64(0x2233445566778811)) { fprintf(stderr, "ROR64c 56 failed\n"); err++; } + if (ROR64c(L64, 57) != CONST64(0x9119a22ab33bc408)) { fprintf(stderr, "ROR64c 57 failed\n"); err++; } + if (ROR64c(L64, 58) != CONST64(0x488cd115599de204)) { fprintf(stderr, "ROR64c 58 failed\n"); err++; } + if (ROR64c(L64, 59) != CONST64(0x2446688aaccef102)) { fprintf(stderr, "ROR64c 59 failed\n"); err++; } + if (ROR64c(L64, 60) != CONST64(0x1223344556677881)) { fprintf(stderr, "ROR64c 60 failed\n"); err++; } + if (ROR64c(L64, 61) != CONST64(0x89119a22ab33bc40)) { fprintf(stderr, "ROR64c 61 failed\n"); err++; } + if (ROR64c(L64, 62) != CONST64(0x4488cd115599de20)) { fprintf(stderr, "ROR64c 62 failed\n"); err++; } + if (ROR64c(L64, 63) != CONST64(0x22446688aaccef10)) { fprintf(stderr, "ROR64c 63 failed\n"); err++; } + /* ROLc */ + if (ROLc(L32, 0 ) != 0x12345678UL) { fprintf(stderr, "ROLc 0 failed\n"); err++; } + if (ROLc(L32, 1 ) != 0x2468acf0UL) { fprintf(stderr, "ROLc 1 failed\n"); err++; } + if (ROLc(L32, 2 ) != 0x48d159e0UL) { fprintf(stderr, "ROLc 2 failed\n"); err++; } + if (ROLc(L32, 3 ) != 0x91a2b3c0UL) { fprintf(stderr, "ROLc 3 failed\n"); err++; } + if (ROLc(L32, 4 ) != 0x23456781UL) { fprintf(stderr, "ROLc 4 failed\n"); err++; } + if (ROLc(L32, 5 ) != 0x468acf02UL) { fprintf(stderr, "ROLc 5 failed\n"); err++; } + if (ROLc(L32, 6 ) != 0x8d159e04UL) { fprintf(stderr, "ROLc 6 failed\n"); err++; } + if (ROLc(L32, 7 ) != 0x1a2b3c09UL) { fprintf(stderr, "ROLc 7 failed\n"); err++; } + if (ROLc(L32, 8 ) != 0x34567812UL) { fprintf(stderr, "ROLc 8 failed\n"); err++; } + if (ROLc(L32, 9 ) != 0x68acf024UL) { fprintf(stderr, "ROLc 9 failed\n"); err++; } + if (ROLc(L32, 10) != 0xd159e048UL) { fprintf(stderr, "ROLc 10 failed\n"); err++; } + if (ROLc(L32, 11) != 0xa2b3c091UL) { fprintf(stderr, "ROLc 11 failed\n"); err++; } + if (ROLc(L32, 12) != 0x45678123UL) { fprintf(stderr, "ROLc 12 failed\n"); err++; } + if (ROLc(L32, 13) != 0x8acf0246UL) { fprintf(stderr, "ROLc 13 failed\n"); err++; } + if (ROLc(L32, 14) != 0x159e048dUL) { fprintf(stderr, "ROLc 14 failed\n"); err++; } + if (ROLc(L32, 15) != 0x2b3c091aUL) { fprintf(stderr, "ROLc 15 failed\n"); err++; } + if (ROLc(L32, 16) != 0x56781234UL) { fprintf(stderr, "ROLc 16 failed\n"); err++; } + if (ROLc(L32, 17) != 0xacf02468UL) { fprintf(stderr, "ROLc 17 failed\n"); err++; } + if (ROLc(L32, 18) != 0x59e048d1UL) { fprintf(stderr, "ROLc 18 failed\n"); err++; } + if (ROLc(L32, 19) != 0xb3c091a2UL) { fprintf(stderr, "ROLc 19 failed\n"); err++; } + if (ROLc(L32, 20) != 0x67812345UL) { fprintf(stderr, "ROLc 20 failed\n"); err++; } + if (ROLc(L32, 21) != 0xcf02468aUL) { fprintf(stderr, "ROLc 21 failed\n"); err++; } + if (ROLc(L32, 22) != 0x9e048d15UL) { fprintf(stderr, "ROLc 22 failed\n"); err++; } + if (ROLc(L32, 23) != 0x3c091a2bUL) { fprintf(stderr, "ROLc 23 failed\n"); err++; } + if (ROLc(L32, 24) != 0x78123456UL) { fprintf(stderr, "ROLc 24 failed\n"); err++; } + if (ROLc(L32, 25) != 0xf02468acUL) { fprintf(stderr, "ROLc 25 failed\n"); err++; } + if (ROLc(L32, 26) != 0xe048d159UL) { fprintf(stderr, "ROLc 26 failed\n"); err++; } + if (ROLc(L32, 27) != 0xc091a2b3UL) { fprintf(stderr, "ROLc 27 failed\n"); err++; } + if (ROLc(L32, 28) != 0x81234567UL) { fprintf(stderr, "ROLc 28 failed\n"); err++; } + if (ROLc(L32, 29) != 0x02468acfUL) { fprintf(stderr, "ROLc 29 failed\n"); err++; } + if (ROLc(L32, 30) != 0x048d159eUL) { fprintf(stderr, "ROLc 30 failed\n"); err++; } + if (ROLc(L32, 31) != 0x091a2b3cUL) { fprintf(stderr, "ROLc 31 failed\n"); err++; } + /* ROL64c */ + if (ROL64c(L64, 0 ) != CONST64(0x1122334455667788)) { fprintf(stderr, "ROL64c 0 failed\n"); err++; } + if (ROL64c(L64, 1 ) != CONST64(0x22446688aaccef10)) { fprintf(stderr, "ROL64c 1 failed\n"); err++; } + if (ROL64c(L64, 2 ) != CONST64(0x4488cd115599de20)) { fprintf(stderr, "ROL64c 2 failed\n"); err++; } + if (ROL64c(L64, 3 ) != CONST64(0x89119a22ab33bc40)) { fprintf(stderr, "ROL64c 3 failed\n"); err++; } + if (ROL64c(L64, 4 ) != CONST64(0x1223344556677881)) { fprintf(stderr, "ROL64c 4 failed\n"); err++; } + if (ROL64c(L64, 5 ) != CONST64(0x2446688aaccef102)) { fprintf(stderr, "ROL64c 5 failed\n"); err++; } + if (ROL64c(L64, 6 ) != CONST64(0x488cd115599de204)) { fprintf(stderr, "ROL64c 6 failed\n"); err++; } + if (ROL64c(L64, 7 ) != CONST64(0x9119a22ab33bc408)) { fprintf(stderr, "ROL64c 7 failed\n"); err++; } + if (ROL64c(L64, 8 ) != CONST64(0x2233445566778811)) { fprintf(stderr, "ROL64c 8 failed\n"); err++; } + if (ROL64c(L64, 9 ) != CONST64(0x446688aaccef1022)) { fprintf(stderr, "ROL64c 9 failed\n"); err++; } + if (ROL64c(L64, 10) != CONST64(0x88cd115599de2044)) { fprintf(stderr, "ROL64c 10 failed\n"); err++; } + if (ROL64c(L64, 11) != CONST64(0x119a22ab33bc4089)) { fprintf(stderr, "ROL64c 11 failed\n"); err++; } + if (ROL64c(L64, 12) != CONST64(0x2334455667788112)) { fprintf(stderr, "ROL64c 12 failed\n"); err++; } + if (ROL64c(L64, 13) != CONST64(0x46688aaccef10224)) { fprintf(stderr, "ROL64c 13 failed\n"); err++; } + if (ROL64c(L64, 14) != CONST64(0x8cd115599de20448)) { fprintf(stderr, "ROL64c 14 failed\n"); err++; } + if (ROL64c(L64, 15) != CONST64(0x19a22ab33bc40891)) { fprintf(stderr, "ROL64c 15 failed\n"); err++; } + if (ROL64c(L64, 16) != CONST64(0x3344556677881122)) { fprintf(stderr, "ROL64c 16 failed\n"); err++; } + if (ROL64c(L64, 17) != CONST64(0x6688aaccef102244)) { fprintf(stderr, "ROL64c 17 failed\n"); err++; } + if (ROL64c(L64, 18) != CONST64(0xcd115599de204488)) { fprintf(stderr, "ROL64c 18 failed\n"); err++; } + if (ROL64c(L64, 19) != CONST64(0x9a22ab33bc408911)) { fprintf(stderr, "ROL64c 19 failed\n"); err++; } + if (ROL64c(L64, 20) != CONST64(0x3445566778811223)) { fprintf(stderr, "ROL64c 20 failed\n"); err++; } + if (ROL64c(L64, 21) != CONST64(0x688aaccef1022446)) { fprintf(stderr, "ROL64c 21 failed\n"); err++; } + if (ROL64c(L64, 22) != CONST64(0xd115599de204488c)) { fprintf(stderr, "ROL64c 22 failed\n"); err++; } + if (ROL64c(L64, 23) != CONST64(0xa22ab33bc4089119)) { fprintf(stderr, "ROL64c 23 failed\n"); err++; } + if (ROL64c(L64, 24) != CONST64(0x4455667788112233)) { fprintf(stderr, "ROL64c 24 failed\n"); err++; } + if (ROL64c(L64, 25) != CONST64(0x88aaccef10224466)) { fprintf(stderr, "ROL64c 25 failed\n"); err++; } + if (ROL64c(L64, 26) != CONST64(0x115599de204488cd)) { fprintf(stderr, "ROL64c 26 failed\n"); err++; } + if (ROL64c(L64, 27) != CONST64(0x22ab33bc4089119a)) { fprintf(stderr, "ROL64c 27 failed\n"); err++; } + if (ROL64c(L64, 28) != CONST64(0x4556677881122334)) { fprintf(stderr, "ROL64c 28 failed\n"); err++; } + if (ROL64c(L64, 29) != CONST64(0x8aaccef102244668)) { fprintf(stderr, "ROL64c 29 failed\n"); err++; } + if (ROL64c(L64, 30) != CONST64(0x15599de204488cd1)) { fprintf(stderr, "ROL64c 30 failed\n"); err++; } + if (ROL64c(L64, 31) != CONST64(0x2ab33bc4089119a2)) { fprintf(stderr, "ROL64c 31 failed\n"); err++; } + if (ROL64c(L64, 32) != CONST64(0x5566778811223344)) { fprintf(stderr, "ROL64c 32 failed\n"); err++; } + if (ROL64c(L64, 33) != CONST64(0xaaccef1022446688)) { fprintf(stderr, "ROL64c 33 failed\n"); err++; } + if (ROL64c(L64, 34) != CONST64(0x5599de204488cd11)) { fprintf(stderr, "ROL64c 34 failed\n"); err++; } + if (ROL64c(L64, 35) != CONST64(0xab33bc4089119a22)) { fprintf(stderr, "ROL64c 35 failed\n"); err++; } + if (ROL64c(L64, 36) != CONST64(0x5667788112233445)) { fprintf(stderr, "ROL64c 36 failed\n"); err++; } + if (ROL64c(L64, 37) != CONST64(0xaccef1022446688a)) { fprintf(stderr, "ROL64c 37 failed\n"); err++; } + if (ROL64c(L64, 38) != CONST64(0x599de204488cd115)) { fprintf(stderr, "ROL64c 38 failed\n"); err++; } + if (ROL64c(L64, 39) != CONST64(0xb33bc4089119a22a)) { fprintf(stderr, "ROL64c 39 failed\n"); err++; } + if (ROL64c(L64, 40) != CONST64(0x6677881122334455)) { fprintf(stderr, "ROL64c 40 failed\n"); err++; } + if (ROL64c(L64, 41) != CONST64(0xccef1022446688aa)) { fprintf(stderr, "ROL64c 41 failed\n"); err++; } + if (ROL64c(L64, 42) != CONST64(0x99de204488cd1155)) { fprintf(stderr, "ROL64c 42 failed\n"); err++; } + if (ROL64c(L64, 43) != CONST64(0x33bc4089119a22ab)) { fprintf(stderr, "ROL64c 43 failed\n"); err++; } + if (ROL64c(L64, 44) != CONST64(0x6778811223344556)) { fprintf(stderr, "ROL64c 44 failed\n"); err++; } + if (ROL64c(L64, 45) != CONST64(0xcef1022446688aac)) { fprintf(stderr, "ROL64c 45 failed\n"); err++; } + if (ROL64c(L64, 46) != CONST64(0x9de204488cd11559)) { fprintf(stderr, "ROL64c 46 failed\n"); err++; } + if (ROL64c(L64, 47) != CONST64(0x3bc4089119a22ab3)) { fprintf(stderr, "ROL64c 47 failed\n"); err++; } + if (ROL64c(L64, 48) != CONST64(0x7788112233445566)) { fprintf(stderr, "ROL64c 48 failed\n"); err++; } + if (ROL64c(L64, 49) != CONST64(0xef1022446688aacc)) { fprintf(stderr, "ROL64c 49 failed\n"); err++; } + if (ROL64c(L64, 50) != CONST64(0xde204488cd115599)) { fprintf(stderr, "ROL64c 50 failed\n"); err++; } + if (ROL64c(L64, 51) != CONST64(0xbc4089119a22ab33)) { fprintf(stderr, "ROL64c 51 failed\n"); err++; } + if (ROL64c(L64, 52) != CONST64(0x7881122334455667)) { fprintf(stderr, "ROL64c 52 failed\n"); err++; } + if (ROL64c(L64, 53) != CONST64(0xf1022446688aacce)) { fprintf(stderr, "ROL64c 53 failed\n"); err++; } + if (ROL64c(L64, 54) != CONST64(0xe204488cd115599d)) { fprintf(stderr, "ROL64c 54 failed\n"); err++; } + if (ROL64c(L64, 55) != CONST64(0xc4089119a22ab33b)) { fprintf(stderr, "ROL64c 55 failed\n"); err++; } + if (ROL64c(L64, 56) != CONST64(0x8811223344556677)) { fprintf(stderr, "ROL64c 56 failed\n"); err++; } + if (ROL64c(L64, 57) != CONST64(0x1022446688aaccef)) { fprintf(stderr, "ROL64c 57 failed\n"); err++; } + if (ROL64c(L64, 58) != CONST64(0x204488cd115599de)) { fprintf(stderr, "ROL64c 58 failed\n"); err++; } + if (ROL64c(L64, 59) != CONST64(0x4089119a22ab33bc)) { fprintf(stderr, "ROL64c 59 failed\n"); err++; } + if (ROL64c(L64, 60) != CONST64(0x8112233445566778)) { fprintf(stderr, "ROL64c 60 failed\n"); err++; } + if (ROL64c(L64, 61) != CONST64(0x022446688aaccef1)) { fprintf(stderr, "ROL64c 61 failed\n"); err++; } + if (ROL64c(L64, 62) != CONST64(0x04488cd115599de2)) { fprintf(stderr, "ROL64c 62 failed\n"); err++; } + if (ROL64c(L64, 63) != CONST64(0x089119a22ab33bc4)) { fprintf(stderr, "ROL64c 63 failed\n"); err++; } + + return err; +} + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/rsa_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/rsa_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,702 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include + +#if defined(LTC_MRSA) && defined(LTC_TEST_MPI) + +#define RSA_MSGSIZE 78 + +/* These are test keys [see file test.key] that I use to test my import/export against */ +static const unsigned char openssl_private_rsa[] = { + 0x30, 0x82, 0x02, 0x5e, 0x02, 0x01, 0x00, 0x02, 0x81, 0x81, 0x00, 0xcf, 0x9a, 0xde, 0x64, 0x8a, + 0xda, 0xc8, 0x33, 0x20, 0xa9, 0xd7, 0x83, 0x31, 0x19, 0x54, 0xb2, 0x9a, 0x85, 0xa7, 0xa1, 0xb7, + 0x75, 0x33, 0xb6, 0xa9, 0xac, 0x84, 0x24, 0xb3, 0xde, 0xdb, 0x7d, 0x85, 0x2d, 0x96, 0x65, 0xe5, + 0x3f, 0x72, 0x95, 0x24, 0x9f, 0x28, 0x68, 0xca, 0x4f, 0xdb, 0x44, 0x1c, 0x3e, 0x60, 0x12, 0x8a, + 0xdd, 0x26, 0xa5, 0xeb, 0xff, 0x0b, 0x5e, 0xd4, 0x88, 0x38, 0x49, 0x2a, 0x6e, 0x5b, 0xbf, 0x12, + 0x37, 0x47, 0xbd, 0x05, 0x6b, 0xbc, 0xdb, 0xf3, 0xee, 0xe4, 0x11, 0x8e, 0x41, 0x68, 0x7c, 0x61, + 0x13, 0xd7, 0x42, 0xc8, 0x80, 0xbe, 0x36, 0x8f, 0xdc, 0x08, 0x8b, 0x4f, 0xac, 0xa4, 0xe2, 0x76, + 0x0c, 0xc9, 0x63, 0x6c, 0x49, 0x58, 0x93, 0xed, 0xcc, 0xaa, 0xdc, 0x25, 0x3b, 0x0a, 0x60, 0x3f, + 0x8b, 0x54, 0x3a, 0xc3, 0x4d, 0x31, 0xe7, 0x94, 0xa4, 0x44, 0xfd, 0x02, 0x03, 0x01, 0x00, 0x01, + 0x02, 0x81, 0x81, 0x00, 0xc8, 0x62, 0xb9, 0xea, 0xde, 0x44, 0x53, 0x1d, 0x56, 0x97, 0xd9, 0x97, + 0x9e, 0x1a, 0xcf, 0x30, 0x1e, 0x0a, 0x88, 0x45, 0x86, 0x29, 0x30, 0xa3, 0x4d, 0x9f, 0x61, 0x65, + 0x73, 0xe0, 0xd6, 0x87, 0x8f, 0xb6, 0xf3, 0x06, 0xa3, 0x82, 0xdc, 0x7c, 0xac, 0xfe, 0x9b, 0x28, + 0x9a, 0xae, 0xfd, 0xfb, 0xfe, 0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xf2, 0xe9, 0x6c, 0x7a, + 0x06, 0x4c, 0xac, 0x76, 0x3d, 0xed, 0x8c, 0xa1, 0xce, 0xad, 0x1b, 0xbd, 0xb4, 0x7d, 0x28, 0xbc, + 0xe3, 0x0e, 0x38, 0x8d, 0x99, 0xd8, 0x05, 0xb5, 0xa3, 0x71, 0x02, 0x40, 0x6d, 0xeb, 0xc3, 0x2d, + 0x2e, 0xf0, 0x5e, 0xa4, 0x88, 0x31, 0x05, 0x29, 0x00, 0x8a, 0xd1, 0x95, 0x29, 0x9b, 0x83, 0xcf, + 0x75, 0xdb, 0x31, 0xe3, 0x7a, 0x27, 0xde, 0x3a, 0x74, 0x30, 0x0c, 0x76, 0x4c, 0xd4, 0x50, 0x2a, + 0x40, 0x2d, 0x39, 0xd9, 0x99, 0x63, 0xa9, 0x5d, 0x80, 0xae, 0x53, 0xca, 0x94, 0x3f, 0x05, 0x23, + 0x1e, 0xf8, 0x05, 0x04, 0xe1, 0xb8, 0x35, 0xf2, 0x17, 0xb3, 0xa0, 0x89, 0x02, 0x41, 0x00, 0xab, + 0x90, 0x88, 0xfa, 0x60, 0x08, 0x29, 0x50, 0x9a, 0x43, 0x8b, 0xa0, 0x50, 0xcc, 0xd8, 0x5a, 0xfe, + 0x97, 0x64, 0x63, 0x71, 0x74, 0x22, 0xa3, 0x20, 0x02, 0x5a, 0xcf, 0xeb, 0xc6, 0x16, 0x95, 0x54, + 0xd1, 0xcb, 0xab, 0x8d, 0x1a, 0xc6, 0x00, 0xfa, 0x08, 0x92, 0x9c, 0x71, 0xd5, 0x52, 0x52, 0x35, + 0x96, 0x71, 0x4b, 0x8b, 0x92, 0x0c, 0xd0, 0xe9, 0xbf, 0xad, 0x63, 0x0b, 0xa5, 0xe9, 0xb1, 0x02, + 0x41, 0x00, 0xdc, 0xcc, 0x27, 0xc8, 0xe4, 0xdc, 0x62, 0x48, 0xd5, 0x9b, 0xaf, 0xf5, 0xab, 0x60, + 0xf6, 0x21, 0xfd, 0x53, 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184oOCwImI+VYRokdXdQ1AMGfVUomHJxsFPia\ + bv5Aw3hiKsIG3jigKHwmMScgkl3yn+8hLkx6thNbqQoa6Yyo20RqaEFBwlZ5G8lF\ + rZsdeO84SeCH"; + +static const unsigned char pkcs8_private_rsa[] = { + 0x30, 0x82, 0x02, 0x78, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, + 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x04, 0x82, 0x02, 0x62, 0x30, 0x82, 0x02, 0x5e, 0x02, 0x01, + 0x00, 0x02, 0x81, 0x81, 0x00, 0xcf, 0x9a, 0xde, 0x64, 0x8a, 0xda, 0xc8, 0x33, 0x20, 0xa9, 0xd7, + 0x83, 0x31, 0x19, 0x54, 0xb2, 0x9a, 0x85, 0xa7, 0xa1, 0xb7, 0x75, 0x33, 0xb6, 0xa9, 0xac, 0x84, + 0x24, 0xb3, 0xde, 0xdb, 0x7d, 0x85, 0x2d, 0x96, 0x65, 0xe5, 0x3f, 0x72, 0x95, 0x24, 0x9f, 0x28, + 0x68, 0xca, 0x4f, 0xdb, 0x44, 0x1c, 0x3e, 0x60, 0x12, 0x8a, 0xdd, 0x26, 0xa5, 0xeb, 0xff, 0x0b, + 0x5e, 0xd4, 0x88, 0x38, 0x49, 0x2a, 0x6e, 0x5b, 0xbf, 0x12, 0x37, 0x47, 0xbd, 0x05, 0x6b, 0xbc, + 0xdb, 0xf3, 0xee, 0xe4, 0x11, 0x8e, 0x41, 0x68, 0x7c, 0x61, 0x13, 0xd7, 0x42, 0xc8, 0x80, 0xbe, + 0x36, 0x8f, 0xdc, 0x08, 0x8b, 0x4f, 0xac, 0xa4, 0xe2, 0x76, 0x0c, 0xc9, 0x63, 0x6c, 0x49, 0x58, + 0x93, 0xed, 0xcc, 0xaa, 0xdc, 0x25, 0x3b, 0x0a, 0x60, 0x3f, 0x8b, 0x54, 0x3a, 0xc3, 0x4d, 0x31, + 0xe7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 0x92, 0x42, 0xeb, 0xb8, 0xf1, 0xf3, 0x0a, 0x05, + 0xe3, 0x94, 0xd1, 0x55, 0x78, 0x35, 0xa0, 0x36, 0xa0, 0x9b, 0x7c, 0x92, 0x84, 0x6c, 0xdd, 0xdc, + 0x4d, 0x02, 0x41, 0x00, 0xd6, 0x86, 0x0e, 0x85, 0x42, 0x0b, 0x04, 0x08, 0x84, 0x21, 0x60, 0xf0, + 0x0e, 0x0d, 0x88, 0xfd, 0x1e, 0x36, 0x10, 0x65, 0x4f, 0x1e, 0x53, 0xb4, 0x08, 0x72, 0x80, 0x5c, + 0x3f, 0x59, 0x66, 0x17, 0xe6, 0x98, 0xf2, 0xe9, 0x6c, 0x7a, 0x06, 0x4c, 0xac, 0x76, 0x3d, 0xed, + 0x8c, 0xa1, 0xce, 0xad, 0x1b, 0xbd, 0xb4, 0x7d, 0x28, 0xbc, 0xe3, 0x0e, 0x38, 0x8d, 0x99, 0xd8, + 0x05, 0xb5, 0xa3, 0x71, 0x02, 0x40, 0x6d, 0xeb, 0xc3, 0x2d, 0x2e, 0xf0, 0x5e, 0xa4, 0x88, 0x31, + 0x05, 0x29, 0x00, 0x8a, 0xd1, 0x95, 0x29, 0x9b, 0x83, 0xcf, 0x75, 0xdb, 0x31, 0xe3, 0x7a, 0x27, + 0xde, 0x3a, 0x74, 0x30, 0x0c, 0x76, 0x4c, 0xd4, 0x50, 0x2a, 0x40, 0x2d, 0x39, 0xd9, 0x99, 0x63, + 0xa9, 0x5d, 0x80, 0xae, 0x53, 0xca, 0x94, 0x3f, 0x05, 0x23, 0x1e, 0xf8, 0x05, 0x04, 0xe1, 0xb8, + 0x35, 0xf2, 0x17, 0xb3, 0xa0, 0x89, 0x02, 0x41, 0x00, 0xab, 0x90, 0x88, 0xfa, 0x60, 0x08, 0x29, + 0x50, 0x9a, 0x43, 0x8b, 0xa0, 0x50, 0xcc, 0xd8, 0x5a, 0xfe, 0x97, 0x64, 0x63, 0x71, 0x74, 0x22, + 0xa3, 0x20, 0x02, 0x5a, 0xcf, 0xeb, 0xc6, 0x16, 0x95, 0x54, 0xd1, 0xcb, 0xab, 0x8d, 0x1a, 0xc6, + 0x00, 0xfa, 0x08, 0x92, 0x9c, 0x71, 0xd5, 0x52, 0x52, 0x35, 0x96, 0x71, 0x4b, 0x8b, 0x92, 0x0c, + 0xd0, 0xe9, 0xbf, 0xad, 0x63, 0x0b, 0xa5, 0xe9, 0xb1, 0x02, 0x41, 0x00, 0xdc, 0xcc, 0x27, 0xc8, + 0xe4, 0xdc, 0x62, 0x48, 0xd5, 0x9b, 0xaf, 0xf5, 0xab, 0x60, 0xf6, 0x21, 0xfd, 0x53, 0xe2, 0xb7, + 0x5d, 0x09, 0xc9, 0x1a, 0xa1, 0x04, 0xa9, 0xfc, 0x61, 0x2c, 0x5d, 0x04, 0x58, 0x3a, 0x5a, 0x39, + 0xf1, 0x4a, 0x21, 0x56, 0x67, 0xfd, 0xcc, 0x20, 0xa3, 0x8f, 0x78, 0x18, 0x5a, 0x79, 0x3d, 0x2e, + 0x8e, 0x7e, 0x86, 0x0a, 0xe6, 0xa8, 0x33, 0xc1, 0x04, 0x17, 0x4a, 0x9f }; + +/* private key - hexadecimal */ +enum { + pk_d , + pk_dP, + pk_dQ, + pk_e , + pk_N , + pk_p , + pk_q , + pk_qP, +}; +static const char *hex_key[] = { + "C862B9EADE44531D5697D9979E1ACF301E0A8845862930A34D9F616573E0D6878FB6F306A382DC7CACFE9B289AAEFDFBFE2F0ED89704E3BB1FD1EC0DBAA3497F47AC8A44047E86B739423FAD1EB70EA551F440631EFDBDEA9F419FA8901D6F0A5A9513110D80AF5F64988A2C786865B02B8BA25387CAF16404ABF27BDB83C881", + "6DEBC32D2EF05EA488310529008AD195299B83CF75DB31E37A27DE3A74300C764CD4502A402D39D99963A95D80AE53CA943F05231EF80504E1B835F217B3A089", + "AB9088FA600829509A438BA050CCD85AFE976463717422A320025ACFEBC6169554D1CBAB8D1AC600FA08929C71D552523596714B8B920CD0E9BFAD630BA5E9B1", + "010001", + "CF9ADE648ADAC83320A9D783311954B29A85A7A1B77533B6A9AC8424B3DEDB7D852D9665E53F7295249F2868CA4FDB441C3E60128ADD26A5EBFF0B5ED48838492A6E5BBF123747BD056BBCDBF3EEE4118E41687C6113D742C880BE368FDC088B4FACA4E2760CC9636C495893EDCCAADC253B0A603F8B543AC34D31E794A444FD", + "F7BE5E23C3323FBF8B8E3AEEFCFCCBE5F7F10BBC4282AED57A3ECAF7D5693F6425A21FB77575059242EBB8F1F30A05E394D1557835A036A09B7C92846CDDDC4D", + "D6860E85420B0408842160F00E0D88FD1E3610654F1E53B40872805C3F596617E698F2E96C7A064CAC763DED8CA1CEAD1BBDB47D28BCE30E388D99D805B5A371", + "DCCC27C8E4DC6248D59BAFF5AB60F621FD53E2B75D09C91AA104A9FC612C5D04583A5A39F14A215667FDCC20A38F78185A793D2E8E7E860AE6A833C104174A9F" }; + +/*** openssl public RSA key in DER format */ +static const unsigned char openssl_public_rsa[] = { + 0x30, 0x81, 0x9f, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, + 0x05, 0x00, 0x03, 0x81, 0x8d, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xcf, 0x9a, 0xde, + 0x64, 0x8a, 0xda, 0xc8, 0x33, 0x20, 0xa9, 0xd7, 0x83, 0x31, 0x19, 0x54, 0xb2, 0x9a, 0x85, 0xa7, + 0xa1, 0xb7, 0x75, 0x33, 0xb6, 0xa9, 0xac, 0x84, 0x24, 0xb3, 0xde, 0xdb, 0x7d, 0x85, 0x2d, 0x96, + 0x65, 0xe5, 0x3f, 0x72, 0x95, 0x24, 0x9f, 0x28, 0x68, 0xca, 0x4f, 0xdb, 0x44, 0x1c, 0x3e, 0x60, + 0x12, 0x8a, 0xdd, 0x26, 0xa5, 0xeb, 0xff, 0x0b, 0x5e, 0xd4, 0x88, 0x38, 0x49, 0x2a, 0x6e, 0x5b, + 0xbf, 0x12, 0x37, 0x47, 0xbd, 0x05, 0x6b, 0xbc, 0xdb, 0xf3, 0xee, 0xe4, 0x11, 0x8e, 0x41, 0x68, + 0x7c, 0x61, 0x13, 0xd7, 0x42, 0xc8, 0x80, 0xbe, 0x36, 0x8f, 0xdc, 0x08, 0x8b, 0x4f, 0xac, 0xa4, + 0xe2, 0x76, 0x0c, 0xc9, 0x63, 0x6c, 0x49, 0x58, 0x93, 0xed, 0xcc, 0xaa, 0xdc, 0x25, 0x3b, 0x0a, + 0x60, 0x3f, 0x8b, 0x54, 0x3a, 0xc3, 0x4d, 0x31, 0xe7, 0x94, 0xa4, 0x44, 0xfd, 0x02, 0x03, 0x01, + 0x00, 0x01, }; + +/* same key but with extra headers stripped */ +static const unsigned char openssl_public_rsa_stripped[] = { + 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xcf, 0x9a, 0xde, + 0x64, 0x8a, 0xda, 0xc8, 0x33, 0x20, 0xa9, 0xd7, 0x83, 0x31, 0x19, 0x54, 0xb2, 0x9a, 0x85, 0xa7, + 0xa1, 0xb7, 0x75, 0x33, 0xb6, 0xa9, 0xac, 0x84, 0x24, 0xb3, 0xde, 0xdb, 0x7d, 0x85, 0x2d, 0x96, + 0x65, 0xe5, 0x3f, 0x72, 0x95, 0x24, 0x9f, 0x28, 0x68, 0xca, 0x4f, 0xdb, 0x44, 0x1c, 0x3e, 0x60, + 0x12, 0x8a, 0xdd, 0x26, 0xa5, 0xeb, 0xff, 0x0b, 0x5e, 0xd4, 0x88, 0x38, 0x49, 0x2a, 0x6e, 0x5b, + 0xbf, 0x12, 0x37, 0x47, 0xbd, 0x05, 0x6b, 0xbc, 0xdb, 0xf3, 0xee, 0xe4, 0x11, 0x8e, 0x41, 0x68, + 0x7c, 0x61, 0x13, 0xd7, 0x42, 0xc8, 0x80, 0xbe, 0x36, 0x8f, 0xdc, 0x08, 0x8b, 0x4f, 0xac, 0xa4, + 0xe2, 0x76, 0x0c, 0xc9, 0x63, 0x6c, 0x49, 0x58, 0x93, 0xed, 0xcc, 0xaa, 0xdc, 0x25, 0x3b, 0x0a, + 0x60, 0x3f, 0x8b, 0x54, 0x3a, 0xc3, 0x4d, 0x31, 0xe7, 0x94, 0xa4, 0x44, 0xfd, 0x02, 0x03, 0x01, + 0x00, 0x01, }; + + +/* generated with the private key above as: + echo -n 'test' | openssl rsautl -sign -inkey rsa_private.pem -pkcs -hexdump + */ +static const unsigned char openssl_rsautl_pkcs[] = { + 0x24, 0xef, 0x54, 0xea, 0x1a, 0x12, 0x0c, 0xf4, 0x04, 0x0c, 0x48, 0xc8, 0xe8, 0x17, 0xd2, 0x6f, + 0xc3, 0x41, 0xb3, 0x97, 0x5c, 0xbc, 0xa3, 0x2d, 0x21, 0x00, 0x10, 0x0e, 0xbb, 0xf7, 0x30, 0x21, + 0x7e, 0x12, 0xd2, 0xdf, 0x26, 0x28, 0xd8, 0x0f, 0x6d, 0x4d, 0xc8, 0x4d, 0xa8, 0x78, 0xe7, 0x03, + 0xee, 0xbc, 0x68, 0xba, 0x98, 0xea, 0xe9, 0xb6, 0x06, 0x8d, 0x85, 0x5b, 0xdb, 0xa6, 0x49, 0x86, + 0x6f, 0xc7, 0x3d, 0xe0, 0x53, 0x83, 0xe0, 0xea, 0xb1, 0x08, 0x6a, 0x7b, 0xbd, 0xeb, 0xb5, 0x4a, + 0xdd, 0xbc, 0x64, 0x97, 0x8c, 0x17, 0x20, 0xa3, 0x5c, 0xd4, 0xb8, 0x87, 0x43, 0xc5, 0x13, 0xad, + 0x41, 0x6e, 0x45, 0x41, 0x32, 0xd4, 0x09, 0x12, 0x7f, 0xdc, 0x59, 0x1f, 0x28, 0x3f, 0x1e, 0xbc, + 0xef, 0x57, 0x23, 0x4b, 0x3a, 0xa3, 0x24, 0x91, 0x4d, 0xfb, 0xb2, 0xd4, 0xe7, 0x5e, 0x41, 0x7e, +}; + +extern const unsigned char _der_tests_cacert_root_cert[]; +extern const unsigned long _der_tests_cacert_root_cert_size; + +static int rsa_compat_test(void) +{ + rsa_key key, pubkey; + int stat, i; + unsigned char buf[1024], key_parts[8][128]; + unsigned long len, key_lens[8]; + + /* try reading the key */ + DO(rsa_import(openssl_private_rsa, sizeof(openssl_private_rsa), &key)); + DO(rsa_import(openssl_public_rsa, sizeof(openssl_public_rsa), &pubkey)); + + /* sign-verify a message with PKCS #1 v1.5 no ASN.1 */ + len = sizeof(buf); + DO(rsa_sign_hash_ex((unsigned char*)"test", 4, buf, &len, LTC_PKCS_1_V1_5_NA1, NULL, 0, 0, 0, &key)); + if (len != sizeof(openssl_rsautl_pkcs) || memcmp(buf, openssl_rsautl_pkcs, len)) { + fprintf(stderr, "RSA rsa_sign_hash_ex + LTC_PKCS_1_V1_5_NA1 failed\n"); + return 1; + } + stat = 0; + DO(rsa_verify_hash_ex(openssl_rsautl_pkcs, sizeof(openssl_rsautl_pkcs), (unsigned char*)"test", 4, LTC_PKCS_1_V1_5_NA1, 0, 0, &stat, &pubkey)); + if (stat != 1) { + fprintf(stderr, "RSA rsa_verify_hash_ex + LTC_PKCS_1_V1_5_NA1 failed\n"); + return 1; + } + rsa_free(&pubkey); + + /* now try to export private/public and compare */ + len = sizeof(buf); + DO(rsa_export(buf, &len, PK_PRIVATE, &key)); + if (compare_testvector(buf, len, openssl_private_rsa, sizeof(openssl_private_rsa), "RSA private export (from OpenSSL)", 0)) { + return 1; + } + + len = sizeof(buf); + DO(rsa_export(buf, &len, PK_PUBLIC, &key)); + if (compare_testvector(buf, len, openssl_public_rsa_stripped, sizeof(openssl_public_rsa_stripped), "RSA public export (from OpenSSL private key)", 0)) { + return 1; + } + rsa_free(&key); + + /* try reading the public key */ + DO(rsa_import(openssl_public_rsa_stripped, sizeof(openssl_public_rsa_stripped), &key)); + len = sizeof(buf); + DO(rsa_export(buf, &len, PK_PUBLIC, &key)); + if (compare_testvector(buf, len, openssl_public_rsa_stripped, sizeof(openssl_public_rsa_stripped), "RSA public export (from stripped OpenSSL)", 0)) { + return 1; + } + rsa_free(&key); + + /* try reading the public key */ + DO(rsa_import(openssl_public_rsa, sizeof(openssl_public_rsa), &key)); + len = sizeof(buf); + DO(rsa_export(buf, &len, PK_PUBLIC, &key)); + if (compare_testvector(buf, len, openssl_public_rsa_stripped, sizeof(openssl_public_rsa_stripped), "RSA public export (from OpenSSL)", 0)) { + return 1; + } + rsa_free(&key); + + /* try import private key in pkcs8 format */ + DO(rsa_import_pkcs8(pkcs8_private_rsa, sizeof(pkcs8_private_rsa), NULL, 0, &key)); + len = sizeof(buf); + DO(rsa_export(buf, &len, PK_PRIVATE, &key)); + if (compare_testvector(buf, len, openssl_private_rsa, sizeof(openssl_private_rsa), "RSA private export (from PKCS#8)", 0)) { + return 1; + } + rsa_free(&key); + + /* convert raw hexadecimal numbers to binary */ + for (i = 0; i < 8; ++i) { + key_lens[i] = sizeof(key_parts[i]); + DO(radix_to_bin(hex_key[i], 16, key_parts[i], &key_lens[i])); + } + /* try import private key from converted raw hexadecimal numbers */ + DO(rsa_set_key(key_parts[pk_N], key_lens[pk_N], key_parts[pk_e], key_lens[pk_e], key_parts[pk_d], key_lens[pk_d], &key)); + DO(rsa_set_factors(key_parts[pk_p], key_lens[pk_p], key_parts[pk_q], key_lens[pk_q], &key)); + DO(rsa_set_crt_params(key_parts[pk_dP], key_lens[pk_dP], key_parts[pk_dQ], key_lens[pk_dQ], key_parts[pk_qP], key_lens[pk_qP], &key)); + len = sizeof(buf); + DO(rsa_export(buf, &len, PK_PRIVATE, &key)); + if (compare_testvector(buf, len, openssl_private_rsa, sizeof(openssl_private_rsa), "RSA private export (from hex)", 0)) { + return 1; + } + rsa_free(&key); + + /* try import public key from converted raw hexadecimal numbers */ + DO(rsa_set_key(key_parts[pk_N], key_lens[pk_N], key_parts[pk_e], key_lens[pk_e], NULL, 0, &key)); + len = sizeof(buf); + DO(rsa_export(buf, &len, PK_PUBLIC, &key)); + if (compare_testvector(buf, len, openssl_public_rsa_stripped, sizeof(openssl_public_rsa_stripped), "RSA public export (from hex)", 0)) { + return 1; + } + rsa_free(&key); + + /* try export in SubjectPublicKeyInfo format of the public key */ + DO(rsa_import(openssl_public_rsa, sizeof(openssl_public_rsa), &key)); + len = sizeof(buf); + DO(rsa_export(buf, &len, PK_PUBLIC | PK_STD, &key)); + if (len != sizeof(openssl_public_rsa) || memcmp(buf, openssl_public_rsa, len)) { + fprintf(stderr, "RSA(public) SSL public X.509 export failed to match OpenSSL output\n"); + print_hex("should", openssl_public_rsa, sizeof(openssl_public_rsa)); + print_hex("is", buf, len); + return 1; + } + rsa_free(&key); + + return 0; +} + +static int _rsa_key_cmp(const int should_type, const rsa_key *should, const rsa_key *is) +{ + if(should_type != is->type) + return CRYPT_ERROR; + if(should_type == PK_PRIVATE) { + if(mp_cmp(should->q, is->q) != LTC_MP_EQ) + return CRYPT_ERROR; + if(mp_cmp(should->p, is->p) != LTC_MP_EQ) + return CRYPT_ERROR; + if(mp_cmp(should->qP, is->qP) != LTC_MP_EQ) + return CRYPT_ERROR; + if(mp_cmp(should->dP, is->dP) != LTC_MP_EQ) + return CRYPT_ERROR; + if(mp_cmp(should->dQ, is->dQ) != LTC_MP_EQ) + return CRYPT_ERROR; + if(mp_cmp(should->d, is->d) != LTC_MP_EQ) + return CRYPT_ERROR; + } + if(mp_cmp(should->N, is->N) != LTC_MP_EQ) + return CRYPT_ERROR; + if(mp_cmp(should->e, is->e) != LTC_MP_EQ) + return CRYPT_ERROR; + return CRYPT_OK; +} + +static int _rsa_issue_301(int prng_idx) +{ + rsa_key key, key_in; + unsigned char buf[4096]; + unsigned long len; + + DO(rsa_make_key(&yarrow_prng, prng_idx, sizeof(buf)/8, 65537, &key)); + + len = sizeof(buf); + DO(rsa_export(buf, &len, PK_PRIVATE, &key)); + DO(rsa_import(buf, len, &key_in)); + + DO(_rsa_key_cmp(PK_PRIVATE, &key, &key_in)); + rsa_free(&key_in); + + len = sizeof(buf); + DO(rsa_export(buf, &len, PK_PUBLIC, &key)); + DO(rsa_import(buf, len, &key_in)); + + DO(_rsa_key_cmp(PK_PUBLIC, &key, &key_in)); + rsa_free(&key_in); + + len = sizeof(buf); + DO(rsa_export(buf, &len, PK_PUBLIC | PK_STD, &key)); + DO(rsa_import(buf, len, &key_in)); + + DO(_rsa_key_cmp(PK_PUBLIC, &key, &key_in)); + rsa_free(&key_in); + + rsa_free(&key); + return CRYPT_OK; +} + +int rsa_test(void) +{ + unsigned char in[1024], out[1024], tmp[3072]; + rsa_key key, privKey, pubKey; + int hash_idx, prng_idx, stat, stat2, i, err; + unsigned long rsa_msgsize, len, len2, len3, cnt, cnt2; + static unsigned char lparam[] = { 0x01, 0x02, 0x03, 0x04 }; + void* dP; + unsigned char* p; + unsigned char* p2; + unsigned char* p3; + + if (rsa_compat_test() != 0) { + return 1; + } + + hash_idx = find_hash("sha1"); + prng_idx = find_prng("yarrow"); + if (hash_idx == -1 || prng_idx == -1) { + fprintf(stderr, "rsa_test requires LTC_SHA1 and yarrow"); + return 1; + } + + DO(_rsa_issue_301(prng_idx)); + + /* make 10 random key */ + for (cnt = 0; cnt < 10; cnt++) { + DO(rsa_make_key(&yarrow_prng, prng_idx, 1024/8, 65537, &key)); + if (mp_count_bits(key.N) != 1024) { + fprintf(stderr, "rsa_1024 key modulus has %d bits\n", mp_count_bits(key.N)); + +len = mp_unsigned_bin_size(key.N); +mp_to_unsigned_bin(key.N, tmp); +print_hex("N", tmp, len); + +len = mp_unsigned_bin_size(key.p); +mp_to_unsigned_bin(key.p, tmp); +print_hex("p", tmp, len); + +len = mp_unsigned_bin_size(key.q); +mp_to_unsigned_bin(key.q, tmp); +print_hex("q", tmp, len); + + return 1; + } + if (cnt != 9) { + rsa_free(&key); + } + } + + /* encrypt the key (without lparam) */ + for (cnt = 0; cnt < 4; cnt++) { + for (rsa_msgsize = 1; rsa_msgsize <= 86; rsa_msgsize++) { + /* make a random key/msg */ + yarrow_read(in, rsa_msgsize, &yarrow_prng); + + len = sizeof(out); + len2 = rsa_msgsize; + + DO(rsa_encrypt_key(in, rsa_msgsize, out, &len, NULL, 0, &yarrow_prng, prng_idx, hash_idx, &key)); + /* change a byte */ + out[8] ^= 1; + DOX((err = rsa_decrypt_key(out, len, tmp, &len2, NULL, 0, hash_idx, &stat2, &key)) + == CRYPT_INVALID_PACKET ? CRYPT_OK:err, "should fail"); + /* change a byte back */ + out[8] ^= 1; + if (len2 != rsa_msgsize) { + fprintf(stderr, "\n%i:rsa_decrypt_key mismatch len %lu (first decrypt)", __LINE__, len2); + return 1; + } + + len2 = rsa_msgsize; + DO(rsa_decrypt_key(out, len, tmp, &len2, NULL, 0, hash_idx, &stat, &key)); + if (!(stat == 1 && stat2 == 0)) { + fprintf(stderr, "rsa_decrypt_key (without lparam) failed (rsa_msgsize = %lu)", rsa_msgsize); + fprintf(stderr, "\n stat: %i stat2: %i", stat, stat2); + return 1; + } + if (len2 != rsa_msgsize || memcmp(tmp, in, rsa_msgsize)) { + fprintf(stderr, "\nrsa_decrypt_key mismatch, len %lu (second decrypt)\n", len2); + print_hex("Original", in, rsa_msgsize); + print_hex("Output", tmp, len2); + return 1; + } + } + } + + /* encrypt the key (with lparam) */ + for (rsa_msgsize = 1; rsa_msgsize <= 86; rsa_msgsize++) { + len = sizeof(out); + len2 = rsa_msgsize; + DO(rsa_encrypt_key(in, rsa_msgsize, out, &len, lparam, sizeof(lparam), &yarrow_prng, prng_idx, hash_idx, &key)); + /* change a byte */ + out[8] ^= 1; + DOX((err = rsa_decrypt_key(out, len, tmp, &len2, lparam, sizeof(lparam), hash_idx, &stat2, &key)) + == CRYPT_INVALID_PACKET ? CRYPT_OK:err, "should fail"); + if (len2 != rsa_msgsize) { + fprintf(stderr, "\n%i:rsa_decrypt_key mismatch len %lu (first decrypt)", __LINE__, len2); + return 1; + } + /* change a byte back */ + out[8] ^= 1; + + len2 = rsa_msgsize; + DO(rsa_decrypt_key(out, len, tmp, &len2, lparam, sizeof(lparam), hash_idx, &stat, &key)); + if (!(stat == 1 && stat2 == 0)) { + fprintf(stderr, "rsa_decrypt_key (with lparam) failed (rsa_msgsize = %lu)", rsa_msgsize); + return 1; + } + if (len2 != rsa_msgsize || memcmp(tmp, in, rsa_msgsize)) { + fprintf(stderr, "rsa_decrypt_key mismatch len %lu", len2); + print_hex("Original", in, rsa_msgsize); + print_hex("Output", tmp, len2); + return 1; + } + } + + /* encrypt the key PKCS #1 v1.5 (payload from 1 to 117 bytes) */ + for (rsa_msgsize = 1; rsa_msgsize <= 117; rsa_msgsize++) { + len = sizeof(out); + len2 = rsa_msgsize; + /* make a random key/msg */ + yarrow_read(in, rsa_msgsize, &yarrow_prng); + DO(rsa_encrypt_key_ex(in, rsa_msgsize, out, &len, NULL, 0, &yarrow_prng, prng_idx, 0, LTC_PKCS_1_V1_5, &key)); + + len2 = rsa_msgsize; + DO(rsa_decrypt_key_ex(out, len, tmp, &len2, NULL, 0, 0, LTC_PKCS_1_V1_5, &stat, &key)); + if (stat != 1) { + fprintf(stderr, "rsa_decrypt_key_ex failed, %d, %d", stat, stat2); + return 1; + } + if (len2 != rsa_msgsize) { + fprintf(stderr, "rsa_decrypt_key_ex mismatch len %lu", len2); + return 1; + } + if (memcmp(tmp, in, rsa_msgsize)) { + fprintf(stderr, "rsa_decrypt_key_ex mismatch data"); + print_hex("Original", in, rsa_msgsize); + print_hex("Output", tmp, rsa_msgsize); + return 1; + } + } + + /* sign a message (unsalted, lower cholestorol and Atkins approved) now */ + len = sizeof(out); + DO(rsa_sign_hash(in, 20, out, &len, &yarrow_prng, prng_idx, hash_idx, 0, &key)); + +/* export key and import as both private and public */ + len2 = sizeof(tmp); + DO(rsa_export(tmp, &len2, PK_PRIVATE, &key)); + DO(rsa_import(tmp, len2, &privKey)); + len2 = sizeof(tmp); + DO(rsa_export(tmp, &len2, PK_PUBLIC, &key)); + DO(rsa_import(tmp, len2, &pubKey)); + + /* verify with original */ + DO(rsa_verify_hash(out, len, in, 20, hash_idx, 0, &stat, &key)); + /* change a byte */ + in[0] ^= 1; + DO(rsa_verify_hash(out, len, in, 20, hash_idx, 0, &stat2, &key)); + + if (!(stat == 1 && stat2 == 0)) { + fprintf(stderr, "rsa_verify_hash (unsalted, origKey) failed, %d, %d", stat, stat2); + rsa_free(&key); + rsa_free(&pubKey); + rsa_free(&privKey); + return 1; + } + + /* verify with privKey */ + /* change byte back to original */ + in[0] ^= 1; + DO(rsa_verify_hash(out, len, in, 20, hash_idx, 0, &stat, &privKey)); + /* change a byte */ + in[0] ^= 1; + DO(rsa_verify_hash(out, len, in, 20, hash_idx, 0, &stat2, &privKey)); + + if (!(stat == 1 && stat2 == 0)) { + fprintf(stderr, "rsa_verify_hash (unsalted, privKey) failed, %d, %d", stat, stat2); + rsa_free(&key); + rsa_free(&pubKey); + rsa_free(&privKey); + return 1; + } + + /* verify with privKey but remove pointer to dP to test without CRT */ + + dP = privKey.dP; + privKey.dP = NULL; + /* change byte back to original */ + in[0] ^= 1; + DO(rsa_verify_hash(out, len, in, 20, hash_idx, 0, &stat, &privKey)); + /* change a byte */ + in[0] ^= 1; + DO(rsa_verify_hash(out, len, in, 20, hash_idx, 0, &stat2, &privKey)); + + if (!(stat == 1 && stat2 == 0)) { + fprintf(stderr, "rsa_verify_hash (unsalted, privKey) failed, %d, %d", stat, stat2); + rsa_free(&key); + rsa_free(&pubKey); + rsa_free(&privKey); + return 1; + } + privKey.dP = dP; + + /* verify with pubKey */ + /* change byte back to original */ + in[0] ^= 1; + DO(rsa_verify_hash(out, len, in, 20, hash_idx, 0, &stat, &pubKey)); + /* change a byte */ + in[0] ^= 1; + DO(rsa_verify_hash(out, len, in, 20, hash_idx, 0, &stat2, &pubKey)); + + if (!(stat == 1 && stat2 == 0)) { + fprintf(stderr, "rsa_verify_hash (unsalted, pubkey) failed, %d, %d", stat, stat2); + rsa_free(&key); + rsa_free(&pubKey); + rsa_free(&privKey); + return 1; + } + + /* sign a message (salted) now (use privKey to make, pubKey to verify) */ + len = sizeof(out); + DO(rsa_sign_hash(in, 20, out, &len, &yarrow_prng, prng_idx, hash_idx, 8, &privKey)); + DO(rsa_verify_hash(out, len, in, 20, hash_idx, 8, &stat, &pubKey)); + /* change a byte */ + in[0] ^= 1; + DO(rsa_verify_hash(out, len, in, 20, hash_idx, 8, &stat2, &pubKey)); + + if (!(stat == 1 && stat2 == 0)) { + fprintf(stderr, "rsa_verify_hash (salted) failed, %d, %d", stat, stat2); + rsa_free(&key); + rsa_free(&pubKey); + rsa_free(&privKey); + return 1; + } + + /* sign a message with PKCS #1 v1.5 */ + len = sizeof(out); + DO(rsa_sign_hash_ex(in, 20, out, &len, LTC_PKCS_1_V1_5, &yarrow_prng, prng_idx, hash_idx, 8, &privKey)); + DO(rsa_verify_hash_ex(out, len, in, 20, LTC_PKCS_1_V1_5, hash_idx, 8, &stat, &pubKey)); + /* change a byte */ + in[0] ^= 1; + DO(rsa_verify_hash_ex(out, len, in, 20, LTC_PKCS_1_V1_5, hash_idx, 8, &stat2, &pubKey)); + + if (!(stat == 1 && stat2 == 0)) { + fprintf(stderr, "rsa_verify_hash_ex failed, %d, %d", stat, stat2); + rsa_free(&key); + rsa_free(&pubKey); + rsa_free(&privKey); + return 1; + } + + /* Testcase for Bleichenbacher attack + * + * (1) Create a valid signature + * (2) Check that it can be verified + * (3) Decrypt the package to fetch plain text + * (4) Forge the structure of PKCS#1-EMSA encoded data + * (4.1) Search for start and end of the padding string + * (4.2) Move the signature to the front of the padding string + * (4.3) Zero the message until the end + * (5) Encrypt the package again + * (6) Profit :) + * For PS lengths < 8: the verification process should fail + * For PS lengths >= 8: the verification process should succeed + * For all PS lengths: the result should not be valid + */ + + p = in; + p2 = out; + p3 = tmp; + for (i = 0; i < 9; ++i) { + len = sizeof(in); + len2 = sizeof(out); + /* (1) */ + DO(rsa_sign_hash_ex(p, 20, p2, &len2, LTC_PKCS_1_V1_5, &yarrow_prng, prng_idx, hash_idx, 8, &privKey)); + /* (2) */ + DOX(rsa_verify_hash_ex(p2, len2, p, 20, LTC_PKCS_1_V1_5, hash_idx, -1, &stat, &pubKey), "should succeed"); + DOX(stat == 1?CRYPT_OK:CRYPT_FAIL_TESTVECTOR, "should succeed"); + len3 = sizeof(tmp); + /* (3) */ + DO(ltc_mp.rsa_me(p2, len2, p3, &len3, PK_PUBLIC, &key)); + /* (4) */ +#if defined(LTC_TEST_DBG) && LTC_TEST_DBG > 1 + print_hex("Original signature", p3, len3); +#endif + /* (4.1) */ + for (cnt = 0; cnt < len3; ++cnt) { + if (p3[cnt] == 0xff) + break; + } + for (cnt2 = cnt+1; cnt2 < len3; ++cnt2) { + if (p3[cnt2] != 0xff) + break; + } + /* (4.2) */ + memmove(&p3[cnt+i], &p3[cnt2], len3-cnt2); + /* (4.3) */ + for (cnt = cnt + len3-cnt2+i; cnt < len; ++cnt) { + p3[cnt] = 0; + } +#if defined(LTC_TEST_DBG) && LTC_TEST_DBG > 1 + print_hex("Forged signature", p3, len3); +#endif + + len2 = sizeof(out); + /* (5) */ + DO(ltc_mp.rsa_me(p3, len3, p2, &len2, PK_PRIVATE, &key)); + + len3 = sizeof(tmp); + /* (6) */ + if (i < 8) + DOX(rsa_verify_hash_ex(p2, len2, p, 20, LTC_PKCS_1_V1_5, hash_idx, -1, &stat, &pubKey) + == CRYPT_INVALID_PACKET ? CRYPT_OK:CRYPT_INVALID_PACKET, "should fail"); + else + DOX(rsa_verify_hash_ex(p2, len2, p, 20, LTC_PKCS_1_V1_5, hash_idx, -1, &stat, &pubKey), "should succeed"); + DOX(stat == 0?CRYPT_OK:CRYPT_FAIL_TESTVECTOR, "should fail"); + } + rsa_free(&key); + + /* try reading the public RSA key from a X509 certificate */ + len3 = sizeof(tmp); + DO(base64_decode(x509_public_rsa, sizeof(x509_public_rsa), tmp, &len3)); + DO(rsa_import_x509(tmp, len3, &key)); + len = sizeof(tmp); + DO(rsa_export(tmp, &len, PK_PUBLIC, &key)); + if (len != sizeof(openssl_public_rsa_stripped) || memcmp(tmp, openssl_public_rsa_stripped, len)) { + fprintf(stderr, "RSA public export failed to match rsa_import_x509\n"); + return 1; + } + rsa_free(&key); + + len3 = sizeof(tmp); + DO(base64_decode(_der_tests_cacert_root_cert, _der_tests_cacert_root_cert_size, tmp, &len3)); + + DO(rsa_import_x509(tmp, len3, &key)); + + /* free the key and return */ + rsa_free(&key); + rsa_free(&pubKey); + rsa_free(&privKey); + return 0; +} + +#else + +int rsa_test(void) +{ + return CRYPT_NOP; +} + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/store_test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/store_test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,86 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include + +/* Test store/load macros with offsets */ +int store_test(void) +{ + unsigned char buf[256]; + int y; + ulong32 L, L1; + ulong64 LL, LL1; +#ifdef LTC_FAST + int x, z; +#endif + + for (y = 0; y < 4; y++) { + L = 0x12345678UL; + L1 = 0; + STORE32L(L, buf + y); + LOAD32L(L1, buf + y); + if (L1 != L) { + fprintf(stderr, "\n32L failed at offset %d\n", y); + return 1; + } + STORE32H(L, buf + y); + LOAD32H(L1, buf + y); + if (L1 != L) { + fprintf(stderr, "\n32H failed at offset %d\n", y); + return 1; + } + } + + for (y = 0; y < 8; y++) { + LL = CONST64 (0x01020304050607); + LL1 = 0; + STORE64L(LL, buf + y); + LOAD64L(LL1, buf + y); + if (LL1 != LL) { + fprintf(stderr, "\n64L failed at offset %d\n", y); + return 1; + } + STORE64H(LL, buf + y); + LOAD64H(LL1, buf + y); + if (LL1 != LL) { + fprintf(stderr, "\n64H failed at offset %d\n", y); + return 1; + } + } + +/* test LTC_FAST */ +#ifdef LTC_FAST + y = 16; + + for (z = 0; z < y; z++) { + /* fill y bytes with random */ + yarrow_read(buf+z, y, &yarrow_prng); + yarrow_read(buf+z+y, y, &yarrow_prng); + + /* now XOR it byte for byte */ + for (x = 0; x < y; x++) { + buf[2*y+z+x] = buf[z+x] ^ buf[z+y+x]; + } + + /* now XOR it word for word */ + for (x = 0; x < y; x += sizeof(LTC_FAST_TYPE)) { + *(LTC_FAST_TYPE_PTR_CAST(&buf[3*y+z+x])) = *(LTC_FAST_TYPE_PTR_CAST(&buf[z+x])) ^ *(LTC_FAST_TYPE_PTR_CAST(&buf[z+y+x])); + } + + if (memcmp(&buf[2*y+z], &buf[3*y+z], y)) { + fprintf(stderr, "\nLTC_FAST failed at offset %d\n", z); + return 1; + } + } +#endif + return 0; +} + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/test.c Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,433 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ +#include + +#ifndef GIT_VERSION +#define GIT_VERSION "Undefined version" +#endif + +#define LTC_TEST_FN(f) { f, #f } + +typedef struct { + int (*fn)(void); + const char* name; +} test_function; + +static const test_function test_functions[] = +{ + LTC_TEST_FN(store_test), + LTC_TEST_FN(rotate_test), + LTC_TEST_FN(misc_test), + LTC_TEST_FN(mpi_test), + LTC_TEST_FN(cipher_hash_test), + LTC_TEST_FN(mac_test), + LTC_TEST_FN(modes_test), + LTC_TEST_FN(der_test), + LTC_TEST_FN(pkcs_1_test), + LTC_TEST_FN(pkcs_1_pss_test), + LTC_TEST_FN(pkcs_1_oaep_test), + LTC_TEST_FN(pkcs_1_emsa_test), + LTC_TEST_FN(pkcs_1_eme_test), + LTC_TEST_FN(rsa_test), + LTC_TEST_FN(dh_test), + LTC_TEST_FN(ecc_tests), + LTC_TEST_FN(dsa_test), + LTC_TEST_FN(katja_test), + LTC_TEST_FN(file_test), + LTC_TEST_FN(multi_test), + /* keep the prng_test always at the end as + * it has to be handled specially when + * testing with LTC_PTHREAD enabled + */ + LTC_TEST_FN(prng_test), +}; + + +#if defined(_WIN32) + #include /* GetSystemTimeAsFileTime */ +#else + #include +#endif + +/* microseconds since 1970 (UNIX epoch) */ +static ulong64 epoch_usec(void) +{ +#if defined(LTC_NO_TEST_TIMING) + return 0; +#elif defined(_WIN32) + FILETIME CurrentTime; + ulong64 cur_time; + ULARGE_INTEGER ul; + GetSystemTimeAsFileTime(&CurrentTime); + ul.LowPart = CurrentTime.dwLowDateTime; + ul.HighPart = CurrentTime.dwHighDateTime; + cur_time = ul.QuadPart; + cur_time -= CONST64(116444736000000000); /* subtract epoch in microseconds */ + cur_time /= 10; /* nanoseconds > microseconds */ + return cur_time; +#else + struct timeval tv; + gettimeofday(&tv, NULL); + return (ulong64)(tv.tv_sec) * 1000000 + (ulong64)(tv.tv_usec); /* get microseconds */ +#endif +} + +#ifdef LTC_PTHREAD +typedef struct +{ + pthread_t thread_id; + const test_function* t; + int err; + ulong64 delta; +} thread_info; + +static void *run(void *arg) +{ + thread_info *tinfo = arg; + ulong64 ts; + + ts = epoch_usec(); + tinfo->err = tinfo->t->fn(); + tinfo->delta = epoch_usec() - ts; + + return arg; +} +#endif + + +/* + * unregister ciphers, hashes & prngs + */ +static void _unregister_all(void) +{ +#ifdef LTC_RIJNDAEL +#ifdef ENCRYPT_ONLY + /* alternative would be + * unregister_cipher(&rijndael_enc_desc); + */ + unregister_cipher(&aes_enc_desc); +#else + /* alternative would be + * unregister_cipher(&rijndael_desc); + */ + unregister_cipher(&aes_desc); +#endif +#endif +#ifdef LTC_BLOWFISH + unregister_cipher(&blowfish_desc); +#endif +#ifdef LTC_XTEA + unregister_cipher(&xtea_desc); +#endif +#ifdef LTC_RC5 + unregister_cipher(&rc5_desc); +#endif +#ifdef LTC_RC6 + unregister_cipher(&rc6_desc); +#endif +#ifdef LTC_SAFERP + unregister_cipher(&saferp_desc); +#endif +#ifdef LTC_TWOFISH + unregister_cipher(&twofish_desc); +#endif +#ifdef LTC_SAFER + unregister_cipher(&safer_k64_desc); + unregister_cipher(&safer_sk64_desc); + unregister_cipher(&safer_k128_desc); + unregister_cipher(&safer_sk128_desc); +#endif +#ifdef LTC_RC2 + unregister_cipher(&rc2_desc); +#endif +#ifdef LTC_DES + unregister_cipher(&des_desc); + unregister_cipher(&des3_desc); +#endif +#ifdef LTC_CAST5 + unregister_cipher(&cast5_desc); +#endif +#ifdef LTC_NOEKEON + unregister_cipher(&noekeon_desc); +#endif +#ifdef LTC_SKIPJACK + unregister_cipher(&skipjack_desc); +#endif +#ifdef LTC_KHAZAD + unregister_cipher(&khazad_desc); +#endif +#ifdef LTC_ANUBIS + unregister_cipher(&anubis_desc); +#endif +#ifdef LTC_KSEED + unregister_cipher(&kseed_desc); +#endif +#ifdef LTC_KASUMI + unregister_cipher(&kasumi_desc); +#endif +#ifdef LTC_MULTI2 + unregister_cipher(&multi2_desc); +#endif +#ifdef LTC_CAMELLIA + unregister_cipher(&camellia_desc); +#endif + +#ifdef LTC_TIGER + unregister_hash(&tiger_desc); +#endif +#ifdef LTC_MD2 + unregister_hash(&md2_desc); +#endif +#ifdef LTC_MD4 + unregister_hash(&md4_desc); +#endif +#ifdef LTC_MD5 + unregister_hash(&md5_desc); +#endif +#ifdef LTC_SHA1 + unregister_hash(&sha1_desc); +#endif +#ifdef LTC_SHA224 + unregister_hash(&sha224_desc); +#endif +#ifdef LTC_SHA256 + unregister_hash(&sha256_desc); +#endif +#ifdef LTC_SHA384 + unregister_hash(&sha384_desc); +#endif +#ifdef LTC_SHA512 + unregister_hash(&sha512_desc); +#endif +#ifdef LTC_SHA512_224 + unregister_hash(&sha512_224_desc); +#endif +#ifdef LTC_SHA512_256 + unregister_hash(&sha512_256_desc); +#endif +#ifdef LTC_SHA3 + unregister_hash(&sha3_224_desc); + unregister_hash(&sha3_256_desc); + unregister_hash(&sha3_384_desc); + unregister_hash(&sha3_512_desc); +#endif +#ifdef LTC_RIPEMD128 + unregister_hash(&rmd128_desc); +#endif +#ifdef LTC_RIPEMD160 + unregister_hash(&rmd160_desc); +#endif +#ifdef LTC_RIPEMD256 + unregister_hash(&rmd256_desc); +#endif +#ifdef LTC_RIPEMD320 + unregister_hash(&rmd320_desc); +#endif +#ifdef LTC_WHIRLPOOL + unregister_hash(&whirlpool_desc); +#endif +#ifdef LTC_BLAKE2S + unregister_hash(&blake2s_128_desc); + unregister_hash(&blake2s_160_desc); + unregister_hash(&blake2s_224_desc); + unregister_hash(&blake2s_256_desc); +#endif +#ifdef LTC_BLAKE2B + unregister_hash(&blake2b_160_desc); + unregister_hash(&blake2b_256_desc); + unregister_hash(&blake2b_384_desc); + unregister_hash(&blake2b_512_desc); +#endif +#ifdef LTC_CHC_HASH + unregister_hash(&chc_desc); +#endif + + unregister_prng(&yarrow_desc); +#ifdef LTC_FORTUNA + unregister_prng(&fortuna_desc); +#endif +#ifdef LTC_RC4 + unregister_prng(&rc4_desc); +#endif +#ifdef LTC_CHACHA20_PRNG + unregister_prng(&chacha20_prng_desc); +#endif +#ifdef LTC_SOBER128 + unregister_prng(&sober128_desc); +#endif +#ifdef LTC_SPRNG + unregister_prng(&sprng_desc); +#endif +} /* _cleanup() */ + +static void register_algs(void) +{ + int err; + + atexit(_unregister_all); + +#ifndef LTC_YARROW + #error This demo requires Yarrow. +#endif + if ((err = register_all_ciphers()) != CRYPT_OK) { + fprintf(stderr, "register_all_ciphers err=%s\n", error_to_string(err)); + exit(EXIT_FAILURE); + } + if ((err = register_all_hashes()) != CRYPT_OK) { + fprintf(stderr, "register_all_hashes err=%s\n", error_to_string(err)); + exit(EXIT_FAILURE); + } + if ((err = register_all_prngs()) != CRYPT_OK) { + fprintf(stderr, "register_all_prngs err=%s\n", error_to_string(err)); + exit(EXIT_FAILURE); + } + + if ((err = rng_make_prng(128, find_prng("yarrow"), &yarrow_prng, NULL)) != CRYPT_OK) { + fprintf(stderr, "rng_make_prng failed: %s\n", error_to_string(err)); + exit(EXIT_FAILURE); + } + + if (strcmp("CRYPT_OK", error_to_string(err))) { + exit(EXIT_FAILURE); + } +} + +int main(int argc, char **argv) +{ +#ifdef LTC_PTHREAD + thread_info *tinfo, *res; +#endif + int x, pass = 0, fail = 0, nop = 0; + size_t fn_len, i, dots; + char *single_test = NULL; + ulong64 ts; + long delta, dur, real = 0; + register_algs(); + + printf("LTC_VERSION = %s\n%s\n\n", GIT_VERSION, crypt_build_settings); + +#ifdef USE_LTM + ltc_mp = ltm_desc; + printf("MP_PROVIDER = LibTomMath\n"); +#elif defined(USE_TFM) + ltc_mp = tfm_desc; + printf("MP_PROVIDER = TomsFastMath\n"); +#elif defined(USE_GMP) + ltc_mp = gmp_desc; + printf("MP_PROVIDER = GnuMP\n"); +#elif defined(EXT_MATH_LIB) + { + extern ltc_math_descriptor EXT_MATH_LIB; + ltc_mp = EXT_MATH_LIB; + } + +#define NAME_VALUE(s) #s"="NAME(s) +#define NAME(s) #s + printf("MP_PROVIDER = %s\n", NAME_VALUE(EXT_MATH_LIB)); +#undef NAME_VALUE +#undef NAME + +#endif +#ifdef LTC_TEST_MPI + printf("MP_DIGIT_BIT = %d\n", MP_DIGIT_BIT); +#else + printf("NO math provider selected, all tests requiring MPI were disabled and will 'nop'\n"); +#endif + + printf("sizeof(ltc_mp_digit) = %d\n", (int)sizeof(ltc_mp_digit)); + +#ifdef LTC_PTHREAD + tinfo = XCALLOC(sizeof(test_functions)/sizeof(test_functions[0]), sizeof(thread_info)); + if (tinfo == NULL) { + printf("\n\nFAILURE: XCALLOC\n"); + return EXIT_FAILURE; + } +#endif + + fn_len = 0; + for (i = 0; i < sizeof(test_functions) / sizeof(test_functions[0]); ++i) { + size_t len = strlen(test_functions[i].name); + if (fn_len < len) fn_len = len; + +#ifdef LTC_PTHREAD + if(test_functions[i].fn == prng_test) continue; + tinfo[i].t = &test_functions[i]; + x = pthread_create(&tinfo[i].thread_id, NULL, run, &tinfo[i]); + if (x != 0) { + printf("\n\nFAILURE: pthread_create\n"); + return EXIT_FAILURE; + } +#endif + } + + fn_len = fn_len + (4 - (fn_len % 4)); + + /* single test name from commandline */ + if (argc > 1) single_test = argv[1]; + + dur = epoch_usec(); + for (i = 0; i < sizeof(test_functions)/sizeof(test_functions[0]); ++i) { + if (single_test && strstr(test_functions[i].name, single_test) == NULL) { + continue; + } + dots = fn_len - strlen(test_functions[i].name); + + printf("\n%s", test_functions[i].name); + while(dots--) printf("."); + fflush(stdout); + +#ifdef LTC_PTHREAD + if(test_functions[i].fn != prng_test) { + x = pthread_join(tinfo[i].thread_id, (void**)&res); + if (x != 0){ + printf("\n\nFAILURE: pthread_join\n"); + return EXIT_FAILURE; + } + x = res->err; + delta = res->delta; + } + else { + ts = epoch_usec(); + x = test_functions[i].fn(); + delta = (long)(epoch_usec() - ts); + } +#else + ts = epoch_usec(); + x = test_functions[i].fn(); + delta = (long)(epoch_usec() - ts); +#endif + real += delta; + + if (x == CRYPT_OK) { + printf("passed %10.3fms", (double)(delta)/1000); + pass++; + } + else if (x == CRYPT_NOP) { + printf("nop"); + nop++; + } + else { + printf("failed (%s) %10.3fms", error_to_string(x), (double)(delta)/1000); + fail++; + } + } + dur = epoch_usec() - dur; + +#ifdef LTC_PTHREAD + XFREE(tinfo); +#endif + + x = (fail > 0 || fail+pass+nop == 0) ? EXIT_FAILURE : EXIT_SUCCESS; + printf("\n\n%s: passed=%d failed=%d nop=%d duration=%.1fsec real=%.1fsec\n", x ? "FAILURE" : "SUCCESS", pass, fail, nop, (double)(dur)/(1000*1000), (double)(real)/(1000*1000)); + return x; +} + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/test.der Binary file libtomcrypt/tests/test.der has changed diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/test.key --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/test.key Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXgIBAAKBgQDPmt5kitrIMyCp14MxGVSymoWnobd1M7aprIQks97bfYUtlmXl +P3KVJJ8oaMpP20QcPmASit0mpev/C17UiDhJKm5bvxI3R70Fa7zb8+7kEY5BaHxh +E9dCyIC+No/cCItPrKTidgzJY2xJWJPtzKrcJTsKYD+LVDrDTTHnlKRE/QIDAQAB +AoGBAMhiuereRFMdVpfZl54azzAeCohFhikwo02fYWVz4NaHj7bzBqOC3Hys/pso +mq79+/4vDtiXBOO7H9HsDbqjSX9HrIpEBH6GtzlCP60etw6lUfRAYx79veqfQZ+o +kB1vClqVExENgK9fZJiKLHhoZbAri6JTh8rxZASr8nvbg8iBAkEA975eI8MyP7+L +jjru/PzL5ffxC7xCgq7Vej7K99VpP2Qloh+3dXUFkkLruPHzCgXjlNFVeDWgNqCb +fJKEbN3cTQJBANaGDoVCCwQIhCFg8A4NiP0eNhBlTx5TtAhygFw/WWYX5pjy6Wx6 +Bkysdj3tjKHOrRu9tH0ovOMOOI2Z2AW1o3ECQG3rwy0u8F6kiDEFKQCK0ZUpm4PP +ddsx43on3jp0MAx2TNRQKkAtOdmZY6ldgK5TypQ/BSMe+AUE4bg18hezoIkCQQCr +kIj6YAgpUJpDi6BQzNha/pdkY3F0IqMgAlrP68YWlVTRy6uNGsYA+giSnHHVUlI1 +lnFLi5IM0Om/rWMLpemxAkEA3MwnyOTcYkjVm6/1q2D2If1T4rddCckaoQSp/GEs +XQRYOlo58UohVmf9zCCjj3gYWnk9Lo5+hgrmqDPBBBdKnw== +-----END RSA PRIVATE KEY----- diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/test_dsa.key --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/test_dsa.key Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,12 @@ +-----BEGIN DSA PRIVATE KEY----- +MIIBuwIBAAKBgQDFCjdRXKvWGNWicL1Kb2tK+eE5lQ8rmTh9mmTWTLWWetztrKis +xhtlWt7bAGElGhgs7qEHkGJeTRIxkMcDIfoJ57Fz146v2/2/s++t0aEqA23nBpJK +hSr/egFmUx/qxmdBhFrAbO1i+cJiYgWk+kigZuw1yagR/rmBq+6+Mba/zwIVAKpb +1/TlBiQT5Yg1ygDHpjVxYZTFAoGAO5Lk/1kpFQsImVp78q0UQFVvoEf/kJmzRLPU +/EUVBa5nIkOcujcQpYlHN+zM9a6tqLR6Ncudk1zt5rB+lpTEpgx91nCKCU+BSg7C +E/vrFr/qpPRW/3IwBd6KRD++xoUmVdYtHR7bFdqkRYM8F5eYC42H80kNkL2pq2du +h2hyI9wCgYBTFrD7v1mKXlWVwU+sQ7gIU+bPDZIj+rGEWVI5v8vyLTg63ZNSBUl+ +KxLEYXPjb1S9luWnqqlaWKS3Z9LAvcgesToST5jABe85XWq6tws72LeV3XluotKE +c0cDiLRk2bm4T/HJNLv5c2b1fC4R/sMx5gg4WWeB621BJ9cNdK+gNQIVAJk25eTp ++yi+kfUGX+jJNbP12B/F +-----END DSA PRIVATE KEY----- diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/tests/tomcrypt_test.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libtomcrypt/tests/tomcrypt_test.h Fri Feb 09 21:44:05 2018 +0800 @@ -0,0 +1,69 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + */ + +#ifndef __TEST_H_ +#define __TEST_H_ + +#include + +#include "common.h" + +#ifdef USE_LTM +/* Use libtommath as MPI provider */ +#define LTC_TEST_MPI +#elif defined(USE_TFM) +/* Use tomsfastmath as MPI provider */ +#define LTC_TEST_MPI +#elif defined(USE_GMP) +/* Use GNU Multiple Precision Arithmetic Library as MPI provider */ +#define LTC_TEST_MPI +#elif defined(EXT_MATH_LIB) +/* The user must define his own MPI provider! */ +#define LTC_TEST_MPI +#endif + +typedef struct { + char *name, *prov, *req; + int (*entry)(void); +} test_entry; + +/* TESTS */ +int cipher_hash_test(void); +int modes_test(void); +int mac_test(void); +int pkcs_1_test(void); +int pkcs_1_pss_test(void); +int pkcs_1_oaep_test(void); +int pkcs_1_emsa_test(void); +int pkcs_1_eme_test(void); +int store_test(void); +int rotate_test(void); +int rsa_test(void); +int dh_test(void); +int katja_test(void); +int ecc_tests(void); +int dsa_test(void); +int der_test(void); +int misc_test(void); +int base64_test(void); +int file_test(void); +int multi_test(void); +int prng_test(void); +int mpi_test(void); + +#ifdef LTC_PKCS_1 +struct ltc_prng_descriptor* no_prng_desc_get(void); +void no_prng_desc_free(struct ltc_prng_descriptor*); +#endif + +#endif + +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */ diff -r 8bba51a55704 -r 6dba84798cd5 libtomcrypt/updatemakes.sh --- a/libtomcrypt/updatemakes.sh Thu Feb 08 23:11:40 2018 +0800 +++ b/libtomcrypt/updatemakes.sh Fri Feb 09 21:44:05 2018 +0800 @@ -1,21 +1,12 @@ #!/bin/bash -bash genlist.sh > tmplist +./helper.pl --update-makefiles || exit 1 -perl filter.pl makefile tmplist -mv -f tmp.delme makefile - -perl filter.pl makefile.icc tmplist -mv -f tmp.delme makefile.icc +makefiles=(makefile makefile_include.mk makefile.shared makefile.unix makefile.mingw makefile.msvc) +vcproj=(libtomcrypt_VS2008.vcproj) -perl filter.pl makefile.shared tmplist -mv -f tmp.delme makefile.shared - -perl filter.pl makefile.unix tmplist -mv -f tmp.delme makefile.unix +if [ $# -eq 1 ] && [ "$1" == "-c" ]; then + git add ${makefiles[@]} ${vcproj[@]} doc/Doxyfile && git commit -m 'Update makefiles' +fi -perl filter.pl makefile.msvc tmplist -sed -e 's/\.o /.obj /g' < tmp.delme > makefile.msvc - -rm -f tmplist -rm -f tmp.delme +exit 0